Repository navigation
Conversation
Move GiftRng::program's reset, calibrate and attempt loop into a GiftRngAttempts class whose run() returns the outcome, so another program (AutoStory) can run Gift RNG with its own options and displays. GiftRng::program builds it from its options and keeps its behaviour. The per-target base stats move into gift_rng_species(), tested along with the shiny outcome. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…to frlg/autostory-gift-rng # Conflicts: # SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Tests.cpp
Adds a GIFT_RNG handoff at 00.12, which saves facing Route 4's Magikarp salesman, and a Run Gift RNG in AutoStory option (off by default). With it on, AutoStory plans the attempts from the RNG plan's TID and SID before 00.12 saves, runs Gift RNG's attempts through the RNG plan loop, and on a shiny runs the new live-start row 00.12b, which leaves the summary and saves. The program now runs its plan as a loop of handoffs, so a run with both Starter RNG and Gift RNG on goes from one to the other. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…from the salesman save A save beside the Magikarp salesman (00.12's end, or a failed Gift RNG run) had no way back into the in-program handoff short of replaying 00.12. Now a run started at 00.12b with Run Gift RNG in AutoStory on loads that save, checks it is in Route 4, runs Gift RNG's attempts and, for a shiny, goes on with 00.12b. With the option off, 00.12b stays the way back in after a by-hand Gift RNG run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…op-construct Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
row_index() only compares and reports the id, and the Gift RNG case now loops over its two ids as string_views rather than raw char pointers. 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 # Conflicts: # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory.cpp # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRngLoop.cpp # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRngLoop_Tests.cpp
Gift RNG in AutoStory starts from the console's seed and CSF offsets in the RNG plan's calibration, which Starter RNG may already have learned, and its own in-game advances offset (GIFT_INGAME, 0 until saved): the salesman's in-game offset isn't Starter RNG's. Each reset's calibration is saved back as Starter RNG's is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Gift RNG's attempts report each reset's reads (on_read) as Starter RNG's do, and AutoStory puts them on the overlay log as one line, as "Gift RNG try 28/50: seed 9cf3 = target, advance 1669 (target 1670, -1). Missed." Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
# Conflicts: # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.cpp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…nto frlg/autostory-gift-rng 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
…RUN in a dark cave) into frlg/autostory-gift-rng
…ver showed) into frlg/autostory-gift-rng
…autostory-gift-rng
…mpts out of step) into frlg/autostory-gift-rng
…g/autostory-gift-rng
…/autostory-gift-rng
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…g/autostory-gift-rng Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…name) into frlg/autostory-gift-rng Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E # Conflicts: # SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory.cpp
Owner
Author
|
Superseded by #215 (FRLG stack consolidated into stage PRs; will be resplit for upstream). |
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 #191 and #189 (base
frlg/autostory-route3, withfrlg/gift-rng-callable-stepsmerged in, so the diff also shows #189'sGiftRng*files; this change alone is commits 6701329, 72430b5, 5c37581 and ed05b85).AutoStory can now buy the Magikarp from Route 4's salesman with Gift RNG in the program, the way it already runs Starter RNG, and save a shiny one.
GIFT_RNGhandoff on 00.12 (saved facing the salesman) and a Run Gift RNG in AutoStory option, off by default, so runs without it are unchanged.plan_starter_rng(); other languages are refused.ConsoleGiftRngStepsrunsGiftRngAttemptsas the RNG plan loop's steps, mapping its outcomes onto the loop's.program()now runs its plan as a loop of handoffs, so a run with both Starter RNG and Gift RNG on goes from one to the other.GIFT_INGAME, 0 until saved, not Starter RNG's), and saves each reset's calibration back, as Starter RNG does.Testing
Syntax-checked every changed file with the build's flags (
-Wall -Wextra -Werror); code health 0 failures againstfrlg/autostory-route3.New and updated unit tests in the AutoStory and AutoStoryRngLoop suites: run plans with the Gift RNG handoff, rows after a shiny Squirtle (now on to Gift RNG's stop) and after a shiny Magikarp, the 00.12/00.12b rows, Gift RNG's messages and its outcomes in the RNG plan, and run plans started at 00.12b with and without Gift RNG. Not run locally; CI dispatched.
Not run on a console yet.
Gift RNG's resets get the same one-line overlay entry as Starter RNG's (
Gift RNG try 28/50: seed 9cf3 = target, advance 1669 (target 1670, -1). Missed.); Gift RNG's attempts report their reads throughon_read.🤖 Generated with Claude Code
https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E