Map node evaluation and path planning for Slay the Spire 2 — full-act path computation, node type priority, risk assessment, and travelable node selection
Use this skill when the Game Master needs to choose a map node.
Do NOT make greedy per-node decisions. Instead, compute the optimal path for the ENTIRE act upfront, then follow it step by step.
current_coord is null or first floor)travelable_coords that matches the plan.1. Run `./sts2 state`, read `map.nodes[]` and `map.travelable_coords[]`
2. Read `run-state.md` for Infinite Readiness level and HP
3. Build graph from nodes[]:
- Each node has {col, row, type, state, children[], parents[]}
- children[] gives edges to next-row nodes
4. Enumerate ALL possible paths from travelable starting nodes to BOSS
5. Score each path using the scoring function below
6. Select the highest-scoring path
7. Store the planned path in run-state.md as: Planned Path: [(col,row), (col,row), ...]
8. Execute first step: ./sts2 choose_map_node <col> <row>
1. Run `./sts2 state`, read `map.travelable_coords[]`
2. Read `run-state.md` for Planned Path
3. Find the next node in Planned Path that appears in travelable_coords
4. Check re-plan triggers (HP, readiness change) — if triggered, go to Step 1
5. Execute: ./sts2 choose_map_node <col> <row>
Score each complete path (list of nodes from start to boss) by summing node scores.
| Node Type | Base Score | Rationale |
|---|---|---|
SHOP | +30 | Card removal is #1 priority for Infinite |
REST_SITE | +25 | Heal or upgrade — both critical |
TREASURE | +20 | Free relic, zero risk |
MONSTER | +15 | Card reward + gold, manageable risk |
UNKNOWN | +12 | May offer removal/transform, some risk |
ANCIENT | +10 | Ancient event, varies |
ELITE | -5 | High risk, random reward. Negative by default. |
BOSS | 0 | Mandatory, no choice |
Apply these modifiers ON TOP of base scores:
Elite Modifiers (can make elites positive or more negative):
| Condition | Modifier | Explanation |
|---|---|---|
| Elite has REST_SITE within 2 steps before AND after | +15 | Campfire adjacency makes elite safe |
| Elite is in late act (row > 60% of total rows) | +10 | Deck is stronger later in the act |
| Elite is in early act (row < 40% of total rows) | -15 | Starting deck can't handle early elites |
| Multiple elites on same path (2nd+) | -10 each | Cumulative HP drain is dangerous |
| Infinite Ready | +20 | Engine handles long fights reliably |
| HP < 50% at planning time | -20 | Too risky when already low |
Shop Modifier:
| Condition | Modifier |
|---|---|
| Player gold > 100 | +5 (per shop) |
| Readiness = Almost Ready | +10 (per shop, removal might complete the build) |
Rest Site Modifier:
| Condition | Modifier |
|---|---|
| HP < 60% | +10 (healing value is high) |
| Have upgradable Infinite component | +5 (upgrade value) |
Path A: MONSTER → MONSTER → SHOP → REST_SITE → MONSTER → ELITE → REST_SITE → BOSS
Scores: 15 + 15 + 30 + 25 + 15 + (-5+15+10) + 25 + 0 = 145
(Elite has campfire before+after, late act)
Path B: MONSTER → ELITE → MONSTER → MONSTER → SHOP → MONSTER → EVENT → BOSS
Scores: 15 + (-5-15) + 15 + 15 + 30 + 15 + 12 + 0 = 82
(Elite is early, no campfire before)
→ Choose Path A (145 > 82)
Ironclad's starting deck is weak. Before the Infinite engine comes online, the deck has no scaling and struggles against elites.
| Readiness | Pathing Adjustment |
|---|---|
| Not Started | Maximum caution. SHOP > MONSTER > REST_SITE. Avoid elites. |
| Building | Heavily favor SHOP — removal is critical. Only take elites late with campfire adjacency. |
| Almost Ready | SHOP is #1 — one more removal might complete the build. Avoid fights that bloat the deck. |
| Infinite Ready | Elites become safe — engine provides reliable block/damage. Take elites aggressively for relics. |
Progressive Infinite depends heavily on card removal. Actively seek paths with SHOP nodes:
| HP % | Action |
|---|---|
| > 70% | Follow plan. Can consider elites per plan. |
| 50-70% | If plan includes elite, re-evaluate. May re-plan to safer route. |
| 30-50% | Re-plan. Prioritize REST_SITE. Remove elites from path. |
| < 30% | Must REST_SITE. Re-plan to safest available path. |
Re-compute the full path if any of these occur:
After computing, store the path:
## Map Plan
Planned Path: (1,0) → (2,1) → (2,2) → (1,3) → (2,4) → (2,5) → (1,6) → BOSS
Path Score: 145
Plan Reason: 2 shops, 2 campfires, 1 late elite with campfire adjacency, 0 early elites
| Type | Reward | Risk | Infinite Value |
|---|---|---|---|
MONSTER | Card reward + gold | Low-moderate | Medium — gold for removal, card options |
ELITE | Card reward + gold + relic | High | Low pre-engine, High post-engine |
BOSS | Relic selection | Very high | Mandatory |
SHOP | Buy/remove cards | None | Very High — removal is #1 priority |
REST_SITE | Heal or upgrade | None | Very High — upgrades advance engine |
TREASURE | Free relic | None | High — free value, no risk |
ANCIENT | Ancient event | Varies | Medium |
UNKNOWN | Random event | Varies | Medium — may offer removal/transforms |
[MAP Act 1: Planning full path. 4 possible routes to boss.
Best path (score 145): MONSTER→MONSTER→SHOP→REST→MONSTER→ELITE→REST→BOSS
2 shops, 2 campfires, 1 late elite with adjacency. Starting with MONSTER at (1,0)]
> ./sts2 choose_map_node 1 0
[MAP Act 1 Floor 3: Following plan. Next node: SHOP at (2,2). Readiness=Building, HP 68/80]
> ./sts2 choose_map_node 2 2
[MAP Act 1 Floor 5: HP dropped to 28/80 — re-planning. Removing elite from path.
New path (score 120): ...→REST→MONSTER→SHOP→REST→BOSS. Next: REST at (1,4)]
> ./sts2 choose_map_node 1 4