From 51e99108bfe92983ab16c8a773748c883f830e34 Mon Sep 17 00:00:00 2001 From: dayfine Date: Wed, 11 Nov 2026 00:34:04 -0800 Subject: [PATCH] FRLG AutoStory sim: sweep a slow fade-in after every warp The fixed-wait audit's fault class (BDSP 00.04b heal_sandgem, lab-B 2026-11-10: a fixed wait after a fade, then a move during the fade-in) swept over FRLG's rows: SimTiming::fade_in keeps the game from taking input for that long after a warp's fade, and FaultClass::SLOW_FADE_IN runs every row with 1000 ms of it. The walker's only fixed wait after a warp's fade (WARP_FADE_IN, 300 ms) is followed by the 5 s after-warp battle watch before the next input, so no console change. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss --- .../Overworld/PokemonFRLG_OverworldSim.cpp | 5 +++- .../Overworld/PokemonFRLG_OverworldSim.h | 4 ++++ .../PokemonFRLG_AutoStoryFaultSweep_Tests.cpp | 24 +++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldSim.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldSim.cpp index bd1aec8936..968d92d3a2 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldSim.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldSim.cpp @@ -380,7 +380,10 @@ bool OverworldSim::after_step(const Step& step, Milliseconds pressed){ if (!dims){ schedule(pressed + timing.tile, SimScreen::FADE, false); } - schedule(pressed + timing.tile + timing.fade, SimScreen::OVERWORLD, true); + schedule(pressed + timing.tile + timing.fade, SimScreen::OVERWORLD, timing.fade_in == 0ms); + if (timing.fade_in > 0ms){ + schedule(pressed + timing.tile + timing.fade + timing.fade_in, SimScreen::OVERWORLD, true); + } note("warped to " + to_string(m_state.position) + "."); return true; } diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldSim.h b/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldSim.h index 736752e7d3..30c31fea07 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldSim.h +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldSim.h @@ -106,6 +106,10 @@ struct SimTiming{ std::optional battle_wipe; Milliseconds message{400}; Milliseconds fade{1000}; // from the step's end to the new map + // From the fade's end, the new map fades in this long, and the game + // takes no input yet (fault-class sweep; BDSP's Center, lab-B + // 2026-11-10). Not measured on FRLG: 0, none. + Milliseconds fade_in{0}; Milliseconds trainer_notice{1000}; // "!" over the trainer, before they walk up Milliseconds trainer_battle{2000}; // after the trainer's message closes // From a battle's end on, the game ignores taps this long. diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryFaultSweep_Tests.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryFaultSweep_Tests.cpp index 16c050c69a..a6f174c939 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryFaultSweep_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryFaultSweep_Tests.cpp @@ -13,6 +13,9 @@ * land encounters, over GAME_ODDS_SEEDS seeds (08.01's Rock Tunnel). * - LATE_FADE: every warp's fade ends LATE_FADE later than the sim's * usual (07.02's warp to Cerulean City). + * - SLOW_FADE_IN: after every warp's fade the new map fades in for + * SLOW_FADE_IN, the game taking no input yet: a fixed wait after a + * fade, then a move (BDSP 00.04b heal_sandgem, lab-B 2026-11-10). * - DARK_CAVE: the caves without Flash dark (DARK_MAPS), so each * battle there ends on the dark cave's overworld, with no wild * battles and with them at the game's odds (08.01 hiker_lenny, lab-B @@ -68,6 +71,7 @@ enum class FaultClass{ SCENE_END_POSE, WILD_BATTLES, LATE_FADE, + SLOW_FADE_IN, DARK_CAVE, LOST_TAP, }; @@ -79,6 +83,8 @@ const char* fault_class_name(FaultClass fault){ return "wild battles at the game's odds"; case FaultClass::LATE_FADE: return "late warp fade"; + case FaultClass::SLOW_FADE_IN: + return "slow fade-in after every warp"; case FaultClass::DARK_CAVE: return "dark cave without Flash"; case FaultClass::LOST_TAP: @@ -114,6 +120,9 @@ constexpr unsigned DARK_CAVE_SEEDS = 10; // How much later than SimTiming's a late fade ends: the new map shows // this long after the usual. constexpr Milliseconds LATE_FADE = 1500ms; +// How long the new map fades in after a warp's fade, taking no input: a +// model, longer than the GBA's fade-in, to find moves made in it. +constexpr Milliseconds SLOW_FADE_IN = 1000ms; // The maps as the story after the Hall of Fame and a new game flag them: // the same set for every row, as each stage's tests use. @@ -389,6 +398,18 @@ UnitTestResult sweep_late_fade(Logger& logger, const StoryCheckpoint& row, const return sweep_result(logger, FaultClass::LATE_FADE, row.id, 1, failures); } +// Row `row` with every warp's new map fading in for SLOW_FADE_IN. +UnitTestResult sweep_slow_fade_in(Logger& logger, const StoryCheckpoint& row, const RowRun& clean){ + SimScript script; + script.timing.fade_in = SLOW_FADE_IN; + const std::string stopped = differs(run_row(row, script, {}, clean.scripted), clean); + std::vector failures; + if (!stopped.empty()){ + failures.push_back({"", std::format("every warp fading in {} ms", SLOW_FADE_IN.count()), stopped}); + } + return sweep_result(logger, FaultClass::SLOW_FADE_IN, row.id, 1, failures); +} + // Row `row` with DARK_MAPS dark: once with no wild battles, then with // them at the game's odds from DARK_CAVE_SEEDS seeds. Each trainer's // battle there ends on the dark overworld (battle_end_on_sim() in @@ -543,6 +564,8 @@ class Test_AutoStoryFaultSweep : public UnitTest{ return sweep_wild_battles(logger, m_row, clean); case FaultClass::LATE_FADE: return sweep_late_fade(logger, m_row, clean); + case FaultClass::SLOW_FADE_IN: + return sweep_slow_fade_in(logger, m_row, clean); case FaultClass::DARK_CAVE: return sweep_dark_cave(logger, m_row, clean); case FaultClass::LOST_TAP: @@ -562,6 +585,7 @@ const FaultSweepCase FAULT_SWEEP_CASES[] = { {.input = {.fault = FaultClass::SCENE_END_POSE}, .expectation = {}}, {.input = {.fault = FaultClass::WILD_BATTLES}, .expectation = {}}, {.input = {.fault = FaultClass::LATE_FADE}, .expectation = {}}, + {.input = {.fault = FaultClass::SLOW_FADE_IN}, .expectation = {}}, {.input = {.fault = FaultClass::DARK_CAVE}, .expectation = {}}, {.input = {.fault = FaultClass::LOST_TAP}, .expectation = {}}, };