Skip to content

FRLG AutoStory: segment 19, Route 22 rival (19.01) - #446

Draft
dayfine wants to merge 41 commits into
frlg/stage17-viridianfrom
frlg/stage19-victory-road
Draft

dayfine wants to merge 41 commits into
frlg/stage17-viridianfrom
frlg/stage19-victory-road

Conversation

@dayfine

@dayfine dayfine commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Depends on #441

Adds FRLG checkpoints 19.01 (Route 22 rival) and 19.02 (Route 22 ledge to Route 23 arrival), with sim tests for the rival trigger and the gate-guard trigger. The rival's foe_threats rows now come from PokemonSimulation's planning_risk(), pinned by a test. Tested with the headless runner, filter "19.0" (21 passed, 0 failed). Route 23, the boulder solver and Victory Road are not in this PR yet.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

dayfine and others added 25 commits November 12, 2026 15:51
…ate in story data

Runtime maps carry gates (G tiles), switches (statue presses) and one_way
warps. A gate state (opened gates, switches on) resolves tiles; plan_gated_legs
wraps a game step model and adds open-gate / press-switch action legs. Steps
carry gates_after, checkpoints start_gates.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…r start/goal

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…e executor and sim

plan_overworld_route_gated() wraps FRLG's step rules in the shared gated planner
(a closed gate is a wall; a plan may open a card-key gate with the Card Key or
press a statue). Route steps OPEN_GATE and PRESS_SWITCH carry their gate change;
the console walker faces the gate/statue, A (Yes), B through the text, and the
run reads its maps through the gates each one changes. The sim holds the gate
state (SimField::OPEN_GATE / PRESS_SWITCH), so the leg-to-command sequence is
tested with the fake console.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…n with gates

RunState carries GateState; steps apply gates_after and flags_after on
success; checkpoints give start_gates and start_flags; walk_route plans
with the gated planner when the maps have gates, and the Card Key flag
allows card-key gates.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
… WalkGates header)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…uy's C2 policy

Adds the Route 22 north entrance, Route 23, Victory Road 1F-3F and Indigo
Plateau maps to the loaded set, the 19.01 plan (Potions to 4, the lead at
Lv49, the trigger step at (33, 5), the rival with setup goals and foe_threats),
its golden and a sim test of the walk to the trigger.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…te 23

The rival's trigger area reaches the gate's side of Route 22 over the ledge
row (15..21, 8); the guard at the gate is a trigger at (7, 2), one message
with the Boulder Badge. Route 22 gets a save card place (route-22).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…inned by a test

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…o Victory Road, Indigo Plateau's Center

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ver fixture

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRunPlan_Tests.cpp
#	SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.cpp
#	SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp
# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRunPlan_Tests.cpp
#	SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.cpp
…rge counted one twice)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRunPlan_Tests.cpp
#	SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.cpp
#	SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp
A boss battle is its own checkpoint (user, 2026-11-12). The potions at Viridian's Mart come first in the new 19.01a, which starts at the nurse and ends at the Mart's counter; 19.01 starts there, walks to Route 22 and ends after the rival's battle. Ids are not renumbered; the golden, run-plan, table, count and Victory Road tests follow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine and others added 13 commits November 13, 2026 07:01
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…ough GatedModel

Moved from the FRLG stack, where they were edited in game PRs:
- f1aad34: switch_key() (a switch one map owns is keyed by that map),
  switch_with_button() and MapSwitch::buttons read from the map JSON;
- bc6a558: GatedModel passes open_stop_risk() through to the inner model;
- 9411b93: GatedModel passes tap_stop_risk() through as well.
The four headers and GateTiles.cpp are taken unchanged from
frlg/stage20-league; MapData.cpp takes f1aad34's buttons hunks only.

(cherry picked from commits f1aad34, bc6a558 and 9411b93, Pokemon/Navigation gate files only)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Moved from the FRLG stack, where 5f81d2a added them inside a game PR: a
gated plan's legs that open a card-key gate or press a statue are logged as
"open gate <dir>" and "press switch <dir>".

(cherry picked from commit 5f81d2a, Pokemon_RouteLog.cpp and Pokemon_RouteLogTypes.h only)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Takes PokemonAutomation#1896's PokemonFRLG_Navigation and EggRng from the parent, undoing
d11b360's keep of the old copies. OverworldSim.h: this branch's gate
additions with the ScreenEvents include from CommonTools, in the file's LF
endings. AutoStoryScreenEvents_Tests.cpp: the parent's version.

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