Skip to content

BDSP AutoStory: fight a wild battle the game will not let the walker leave - #255

Merged
dayfine merged 6 commits into
bdsp/autostory-mine-floaroma-wipfrom
bdsp/autostory-cant-escape
Nov 9, 2026
Merged

dayfine merged 6 commits into
bdsp/autostory-mine-floaroma-wipfrom
bdsp/autostory-cant-escape

Conversation

@dayfine

@dayfine dayfine commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Depends on #226

On console B (2026-11-07) an Onix's Bind in Oreburgh Mine refused nine Runs in a row and escape_wild_battle() gave up with "Exit transition and late main-menu fallback could not confirm escape." This change puts the escape's decisions behind a small seam (WildBattleEscapeActions + WildBattleEscapePolicy, data: run attempts, refusals before the fallback, the fallback itself) so the console and GridSim run the same policy. After three refused Runs (the battle menu back each time) the walker now fights the battle to its end through the existing fight_wild_battle() path instead of pressing Run until the attempts run out. The first commit adds the seam and a red GridSim test (a scripted wall-leg encounter whose battle refuses every Run); the second makes it green. Pure BDSP program files; nothing in Pokemon/AutoStory or Pokemon/Navigation changes. This is meant to become the BDSP binding of a shared WildBattlePolicy later (plan item B2), not that itself.

The GridSim cases live in their own file, Simulation/PokemonBDSP_AutoStory_WallBattleSim_Tests.cpp, so GridSim_Tests.cpp stays as the base has it and under 1000 lines.

Testing: new suites "Wild battle escape policy" (7 cases) and "Grid sim: a wild battle on a wall leg" (3 cases) pass locally with the headless runner; all other BDSP AutoStory suites give the same results as the base tip (two pre-existing failures there: the 01.03 oreburgh_north and above_the_mine wanderer multi-seed sims). Code health: 0 failures against the base. Not yet run on the console.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

dayfine and others added 6 commits November 8, 2026 01:28
…battle

escape_wild_battle() only pressed Run until a timeout; in Oreburgh Mine an
Onix's Bind refused nine Runs in 60 s and the walk failed (console B,
2026-11-07). Its decisions now run over a small WildBattleEscapeActions
seam (WildBattlePolicy.h) with a console binding and a GridSim fake, so
the simulation can script a battle that refuses the escape. The new
GridSim case "bound: every Run refused" fails: the policy still only runs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…leave

On console B (2026-11-07) an Onix's Bind in Oreburgh Mine refused nine Runs
in a row and escape_wild_battle() gave up with "Exit transition and late
main-menu fallback could not confirm escape." The escape policy now counts
refused Runs (the battle menu back after Run) and, after `run_refusals`
of them (default 3), fights the battle to its end through the existing
fight_wild_battle() path instead of pressing Run until the attempts run out.
Both the count and the fallback are policy data, so GridSim runs the same
decisions with a scripted battle; the wall-leg GridSim test and the policy
tests cover escape, fight, and fight turned off.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…' into bdsp/autostory-cant-escape

# Conflicts:
#	SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_GridSim_Tests.cpp
GridSim_Tests went over the 1000-line limit once the base's new grid
tests met this PR's. This PR's wall-leg battle cases move, unchanged,
to Simulation/PokemonBDSP_AutoStory_WallBattleSim_Tests, one UnitTest
per case, and GridSim_Tests is back to the base's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
@dayfine
dayfine marked this pull request as ready for review November 9, 2026 04:26
@dayfine
dayfine merged commit 352b050 into bdsp/autostory-mine-floaroma-wip Nov 9, 2026
17 of 23 checks passed
@dayfine
dayfine deleted the bdsp/autostory-cant-escape branch November 9, 2026 04:27
dayfine added a commit that referenced this pull request Nov 9, 2026
…story-warp-events

GridSim walk_to_wall: keep both the scripted wall-leg wild battle count
(#255) and the warp fade report (#284).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant