Repository navigation
Conversation
Squash of fork PRs #211 and #212 (frlg/cerulean-gym at 3ad4d24). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
This was referenced Nov 3, 2026
The status badge read Sleep Powder's SLP as "a status" (console B, m56, 00.15b run 2). SLP is now its own StatusCondition, from the badge's mean color on that run's turn 6 and 7 captures. Awakenings are a counted supply (bag reader name, Supplies, bag read, Mart count). In a trainer's battle the lead uses one when asleep, the foe can hurt it, and it outlasts the hit the item's turn costs; the sim plays the same rule (awakening_now()) and the win chance counts them. 00.15's Cerulean Mart step buys 3 Potions and 2 Awakenings within its 1500 floor. The turn 7 move at 13/65 HP with 15 Potions was the Potion rule: the last turn took 21 HP (Vine Whip and Leech Seed), more than a Potion heals, and an item's turn doesn't count sleep down. Each turn now logs why a Potion was or wasn't used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…win chance Nugget Bridge (00.16) failed twice on console B with "bug_catcher_cale: no_battle": the open leg onto the bridge ended on (11, 33), a tile short, and the one step onto Cale's row reached only (11, 32), out of his sight. A STEP of the new TRAINER_LINE_VARIANT (into_line() in the table) now steps a tile at a time, at most 3, until a trainer's message or battle shows (step_until_seen()), and the five bridge lines use it. The battle's end pose stays the trainer's row. A story sim test walks the row on the OverworldSim from the walk's end whole and a tile short; it failed with the console's error before. Preparation runs once per save. StoryStep::once_per_save marks a step that a retry after a reload of the same save skips once it succeeded changing nothing (the new Outcome::changed_nothing); one that changed the game runs again, as the reload undid it. build_story_checkpoint() takes the PreparedSteps memory, which FRLG keeps in StoryEnv across reloads and empties on a save. TEACH and MART steps are once per save, and report changed_nothing for a move already known, no TM, or nothing to buy. The reload hook reads the bag only until one read is complete. Runner tests cover a retry after a loss and verify mode's three runs. MIN_WIN_CHANCE is 0.50: the Cerulean rival at a sim chance of 56% passed console verification 2 of 3 (m56), and verify mode is the backstop for HIGH battles. Tests that assumed 70% now use 50%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
The Potion rule compared a Potion's 20 HP to the foe's biggest hit, so against the Cerulean rival's Bulbasaur (Vine Whip, or Leech Seed, Sleep Powder and Poison Powder) it rarely healed. The sim now draws the AI's move scores 1000 times from a fixed seed for each move's chance, mixes each move's rolls, crits and accuracy with the end-of-turn poison and Leech Seed into the next turn's damage, and heals when a Potion's HP beats its 80th percentile (POTION_COVER_PERCENTILE). The Awakening rule uses the same figure and now comes before a Potion. The console battle and the win-chance sim share the rule; the log names the percentile and the move chances. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Pokemon_StoryEvents.h, Pokemon_StorySteps.cpp and Pokemon_StorySteps_Tests.cpp conflicted only on line endings (LF here, CRLF in nav/story-steps, same content); take the CRLF versions. 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
# Conflicts: # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySimulation_Tests.cpp
…tart pose # Conflicts: # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.cpp # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.h # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySimulation_Tests.cpp
# Conflicts: # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySimulation_Tests.cpp
…frame # Conflicts: # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.cpp # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.h # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySimulation_Tests.cpp
…frame # Conflicts: # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySimulation_Tests.cpp
…frame # Conflicts: # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.h
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 # Conflicts: # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.h
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 # Conflicts: # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.h
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…'s opening before any step)
…its fade; screen before each step)
…tch HOME menu fails at once
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
… as JSON Stage 4's checkpoints 00.14 to 00.16 (with 00.14b, 00.14c and 00.15b) as StoryData files in the #312 step format, each marked "phase": "testing". The STEP "trainer_line" action is a spec, Mart and TEACH steps load as once per save, and stage 4's tests read steps through their args. A parity test checks the files load to the C++ rows they replace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The parity test passed in the merge before this commit: every story file loads to the C++ row it replaces. The rows went with the merge's Table.cpp; this removes the parity test that held them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
FRLG AutoStory: stage 4's checkpoints as JSON
…tle sim) into frlg/stage4-cerulean Detector files take frlg/detectors' versions. Cerulean's maps (Mart, Gym, Route 24/25, Sea Cottage) come from the pinned Packages resources, so the stage's map JSONs and frlg_maps.py edit go. The battle sim and win chance go with the parent's: the Potion rule is the plain one again (any bar not green, unless the foe's last hit took a Potion's worth), and an Awakening is used asleep in a trainer's battle unless the bar is red; SLP reading, Awakenings as a supply, trainer lines and once-per-save steps stay. 00.15's GRIND grinds to Lv22, where console B's Wartortle beat the rival, without the beat/chance args. Every battle step in 00.14c, 00.15b and 00.16 names its trainer and party, from the trainer table #213 removed. Stage additions to split headers go into the sub-headers; the trainer line steps get PokemonFRLG_AutoStoryTrainerLine.h and the status badge reader PokemonFRLG_AutoStoryStatusBadge.h. Files the stage had turned to LF keep the parent's CRLF. 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
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_01AKYzhrMnPK61XHWEch4a6E
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
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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #215
FRLG AutoStory stage 4: from Mt. Moon to Cerulean City, the Cerulean rival, Nugget Bridge, and Misty before the rival; Cerulean's maps come from the pinned Packages resources, and each battle step names its trainer and party in the plan. The battle reads SLP and, in a trainer's battle, uses an Awakening while asleep unless the HP bar is red, and each turn logs why a Potion was or wasn't used; the Potion rule is the plain one (any bar not green, unless the foe's last hit took a Potion's worth), since the battle sim that sized it is gone. A step into a Nugget Bridge trainer's line goes a tile at a time, up to 3, until the trainer speaks, and TEACH and MART steps that changed nothing are skipped on a retry from the same save. 00.15's GRIND now grinds to Lv22, where console B's Wartortle beat the rival, instead of to a sim win chance. Tested with the FRLG and Pokemon:: unit tests locally (only the image tests that need CommandLineTests fail) and the code-health gate; it will be split again for upstream.
🤖 Generated with Claude Code
https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss