sts2-bot/docs/research/14-character-mechanics-and-policy.md

8.8 KiB

Character mechanics and bot policy

Scope and confidence

This research covers Slay the Spire 2, not the original game. It combines developer previews, community guides, and inspection of the current bot.

The game is in Early Access. Developer previews establish design intent, not exact rules for every installed patch. Community build advice is not measured win-rate evidence. Verify costs, trigger timing, and card effects against the installed game before implementation.

Do not import fixed tier lists, universal deck-size targets, or advice to force an archetype early. One search result claimed Focus was removed; other guides describe Focus interactions. That conflict makes the former unsuitable as a rules source.

No gameplay code changed for this research.

Character comparison

Character Main mechanics Useful deck directions Bot requirements
Ironclad Strength, Vulnerable, HP spending, Exhaust Attack scaling; Exhaust with draw/block payoffs; supported self-damage packages Evaluate HP costs, recovery, Exhaust triggers, and setup before attacks.
Silent Poison, Shivs, discard, Sly Poison with defense; repeated small attacks with attack payoffs; draw/discard with Sly Model delayed damage, discard-triggered plays, hand space, and attack-count effects.
Defect Ordered orb slots, Channel, Evoke, Focus Lightning/Frost engines; orb cycling; supported Power or attack packages Model orb order, passive versus Evoke effects, slot capacity, and setup time.
Regent Energy plus Stars, Forge, Sovereign Blade Star generation/spending; Blade scaling; compatible mixed packages Track both resources, persistent Stars, Blade state, and Forge sequencing.
Necrobinder Doom, Osty, Summon, Souls Doom with defense; Osty attacks/survival; Soul draw supporting either Track Doom timing, companion HP and attacks, and generated-card draw.

These are overlapping packages, not mutually exclusive deck labels. Rewards should address current weaknesses and available support.

Important timing distinctions

Ironclad

HP spending can buy energy, block, or damage. The bot must compare that benefit with survival and expected recovery. It must not treat every self-damage card as bad, or every damage increase as safe.

Exhaust removes a card from the current combat cycle. With appropriate powers or relics, it can also generate block or draw. Card value therefore depends on the current engine, not just printed damage.

The current parser already treats displayed hand damage as attacker-modified. Character support must not apply Strength or Weak a second time.

Silent

Sly allows a discarded card to play through its discard interaction. A useful Sly card can be the best discard target, rather than a card to preserve. Verify the exact trigger conditions locally; do not assume all end-turn hand cleanup triggers Sly.

Poison resolves at the start of the enemy turn according to the community guide. This differs from immediate attack damage and Necrobinder's normal Doom check. Other end-turn effects can occur before Poison kills an enemy.

Shivs benefit from repeated-attack payoffs. Their value also depends on enemy reactions, hand capacity, and available draw.

Defect

Channel and Evoke change the ordered orb state. Filling slots and forcing an Evoke can produce different outcomes from keeping an orb for its passive effect.

A Frost-based defense must not be treated as zero defense just because the played card lacks plain Gain N Block text. Random orb damage must not become a guaranteed targeted kill.

Focus and orb-specific rules require local verification. Do not implement a universal multiplier from a guide summary.

Regent

Mega Crit describes Stars as a second resource that persists between turns. Energy-only optimization cannot establish affordability or optimal sequencing for Regent.

Forge creates or strengthens the Sovereign Blade. Track the actual Blade and its current effect instead of using a fixed damage value. A resource generator or Forge play can be more valuable than the largest immediate attack.

Necrobinder

Mega Crit describes Doom as an execution threshold: the affected creature dies when Doom meets or exceeds current HP at the end of its turn. Doom is not ordinary damage over time. Under that rule, reaching the threshold does not prevent the enemy's intervening attack.

Specific cards can change normal timing. Check their effects rather than generalizing the default rule.

Osty is a separate companion that can attack and absorb attack damage. Summon can restore or increase Osty's HP. The developer preview states that Necrobinder's debuffs do not automatically apply to Osty's attacks.

Souls support card draw. Their value includes the cards they enable, not immediate damage alone.

Current bot gaps

Inspected brain.py, facts.py, policy/combat.py, and policy/selection.py.

  • Character selection prefers IRONCLAD, then SILENT. This is not a capability check.
  • The direct-damage search explicitly excludes star costs, conditional effects, unsupported powers, and ordering effects.
  • CombatFacts.to_state() has no explicit character, Stars, orb queue, or Osty representation. Its hand entries omit star_cost.
  • Combat model questions use a generic best-play preference. Reward and other policy paths do include some character data.
  • Deterministic defense can run before the model. Missing character mechanics therefore cannot be fixed by prompt text alone.
  • The fallback favors displayed immediate damage and plain block. It does not evaluate these character engines.
  • Existing tests establish generic safety and selected arithmetic behavior. They do not establish five-character gameplay competence.

Ironclad is the default, not a fully modeled character. His Exhaust and self-damage interactions also need work.

Proposed implementation order

This is a recommendation, not an implemented architectural decision.

  1. Record the installed game/mod versions and inspect read-only state fields for each character.
  2. Add explicit character selection and declare unsupported capabilities. Do not imply that menu access means policy support.
  3. Preserve character resources in parsed facts and model input. Missing required fields must mean unknown, not zero.
  4. Add focused timing and resource rules in code. Keep model calls for preferences, not arithmetic or legality.
  5. Improve Ironclad interactions, then Silent. These extend the current attack/block and selection paths.
  6. Add Regent, Defect, and Necrobinder after confirming their state exposure. Reorder if the API supports one substantially better.
  7. Add deck-role evaluation: immediate damage, defense, draw, resources, scaling, and support requirements.
  8. Evaluate each character separately by run and game version. Keep deterministic fallback sessions separate from model-enabled sessions.

Use a shared observation/action loop with small mechanic-specific components. Avoid copying the whole policy five times. Some mechanics can occur outside their usual character through generated or acquired cards.

Essential regression scenarios

  • Ironclad: Exhaust produces block/draw; HP spending cannot bypass a survival check.
  • Silent: discarding a Sly card is beneficial; Poison timing differs from immediate lethal.
  • Defect: orb order changes Evoke results; passive Frost changes survival; random damage is not guaranteed lethal.
  • Regent: insufficient Stars rejects a plan; Stars persist into the next turn; Forge changes Blade value.
  • Necrobinder: Doom threshold still permits the enemy attack; Osty changes damage taken; companion modifiers remain separate.
  • All characters: execute one action, read fresh state, and rebuild the next proposal.

Sources

Developer sources

Community strategy sources

Use these as strategy references, not executable specifications or verified win-rate rankings.