From c21fd35030382b88257bc053e0657394916432c5 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 15 Nov 2026 13:56:51 -0800 Subject: [PATCH 1/3] FRLG AutoStory: tests that 16.05 Giovanni, 18.02 Sabrina and 17.04 Giovanni resolve to the doc's policies --- ...okemonFRLG_AutoStoryBattlePolicy_Tests.cpp | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattlePolicy_Tests.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattlePolicy_Tests.cpp index 79eb34a6a9..7939e4fb53 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattlePolicy_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattlePolicy_Tests.cpp @@ -525,6 +525,80 @@ UnitTestResult test_plan_bruno(){ return true; } +// What a boss's step resolves to: the policy, the doc's setup goals and +// the generator's foe rows (PokemonSimulation planning_risk() for each foe +// leading against the fight's pokeguy entry, as the League's). +struct ResolvedPolicy{ + BattlePolicyKind kind = BattlePolicyKind::NONE; + SetupGoals goals = {}; + std::vector> rows = {}; +}; + +UnitTestResult check_resolved_policy(std::string_view id, std::string_view name, const ResolvedPolicy& expected){ + const StoryStep& step = battle_step(id, name); + const BattlePolicy policy = battle_policy_of(step.args); + if (policy.kind != expected.kind){ + return std::format("{} {}: the step does not resolve to the doc's policy.", id, name); + } + const SetupGoals& goals = policy.goals; + const SetupGoals& want = expected.goals; + if (goals.spa != want.spa || goals.accuracy != want.accuracy || goals.outspeed != want.outspeed + || goals.guard_accuracy != want.guard_accuracy || goals.torrent_power != want.torrent_power + || goals.target_torrent != want.target_torrent + ){ + return std::format("{} {}: the setup goals differ from the doc's.", id, name); + } + if (arg_of>>(step, "foe_threats") != expected.rows || policy.foes.size() != expected.rows.size()){ + return std::format("{} {}: foe_threats are not the generator's rows.", id, name); + } + return true; +} + +// Silph Co.'s Giovanni (doc: silph-giovanni, C). Without a policy the step +// fought potions-only: console B's lead attacked from turn 1, poisoned, +// never used an X item, and lost twice (2026-11-15, 16.05). +UnitTestResult test_plan_silph_giovanni(){ + return check_resolved_policy("16.05", "giovanni", { + .kind = BattlePolicyKind::GOAL_BASED_SETUP, + .goals = {.spa = 1, .outspeed = true, .guard_accuracy = true}, + .rows = { + {64, 15, 11, 45, 21, 0, 0}, // Nidorino + {70, 26, 12, 63, 31, 0, 0}, // Kangaskhan + {34, 18, 13, 112, 55, 0, 0}, // Rhyhorn + {79, 19, 12, 52, 26, 0, 0}, // Nidoqueen + }, + }); +} + +// Sabrina (doc: sabrina, C): no Sp. Atk goal, X Speed to outspeed Alakazam. +UnitTestResult test_plan_sabrina(){ + return check_resolved_policy("18.02", "sabrina", { + .kind = BattlePolicyKind::GOAL_BASED_SETUP, + .goals = {.outspeed = true, .guard_accuracy = true}, + .rows = { + {84, 0, 5, 57, 28, 0, 0}, // Kadabra + {71, 0, 3, 45, 22, 0, 0}, // Mr. Mime + {73, 12, 12, 26, 13, 0, 0}, // Venomoth + {108, 47, 47, 96, 48, 0, 0}, // Alakazam + }, + }); +} + +// Viridian's Giovanni (doc: giovanni-gym, A): A fights run B, the doc's +// default runtime, so solo-recovery; Dugtrio's Mud-Slap lowers accuracy. +UnitTestResult test_plan_giovanni_gym(){ + return check_resolved_policy("17.04", "giovanni", { + .kind = BattlePolicyKind::SOLO_RECOVERY, + .rows = { + {27, 45, 36, 126, 59, 0, 0}, // Rhyhorn + {105, 36, 36, 75, 37, 1, 0}, // Dugtrio + {71, 41, 41, 84, 42, 0, 0}, // Nidoqueen + {81, 48, 45, 99, 49, 0, 0}, // Nidoking + {27, 52, 41, 140, 69, 0, 0}, // Rhydon (the doc's Lv50 Rhyhorn) + }, + }); +} + struct AutoStoryBattlePolicyInput{ std::string name; @@ -643,6 +717,18 @@ const std::vector AUTO_STORY_BATTLE_POLICY_CASES = { .input = {.name = "plan: 10.03 rival_tower names the policy, goals and foes", .body = test_plan_tower_rival}, .expectation = {.description = "the policy, goals and 5 foe rows"}, }, + { + .input = {.name = "plan: 16.05 giovanni resolves to the doc's C2", .body = test_plan_silph_giovanni}, + .expectation = {.description = "goal-based-setup, Sp. Atk +1, outspeed, Guard Spec first, 4 generator rows"}, + }, + { + .input = {.name = "plan: 18.02 sabrina resolves to the doc's C2", .body = test_plan_sabrina}, + .expectation = {.description = "goal-based-setup, outspeed, Guard Spec first, 4 generator rows"}, + }, + { + .input = {.name = "plan: 17.04 giovanni resolves to the doc's B", .body = test_plan_giovanni_gym}, + .expectation = {.description = "solo-recovery, 5 generator rows"}, + }, }; } // namespace From 866f642fc4592699d7e9d080da1009e6a34decd1 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 15 Nov 2026 13:59:37 -0800 Subject: [PATCH 2/3] FRLG AutoStory: Silph Giovanni and Sabrina by PokeGuy's C2, each its own checkpoint 16.05's Giovanni and 18.02's Sabrina had no battle policy, so they were fought potions-only; console B lost 16.05 twice (2026-11-15). Both now name goal-based-setup with the doc's goals (silph-giovanni: Sp. Atk +1, outspeed, Guard Spec first; sabrina: outspeed, Guard Spec first) and foe_threats from PokemonSimulation planning_risk() against the doc's entry. 17.04's Giovanni (an A fight) runs B, the doc's default runtime: solo-recovery with its rows. A boss battle is its own checkpoint: 16.05 ends at Giovanni and 16.05b walks to the president for the Master Ball; 18.02 ends at Sabrina and 18.02b takes the pads out and heals. 16.04's save still starts 16.05. --- .../AutoStory/PokemonFRLG_AutoStory.cpp | 2 +- .../AutoStory/PokemonFRLG_AutoStory.h | 2 +- .../AutoStory/PokemonFRLG_AutoStoryEvents.h | 2 +- .../PokemonFRLG_AutoStoryPlanGolden16.h | 8 +- .../PokemonFRLG_AutoStoryPlanGolden18.h | 50 ++-- .../PokemonFRLG_AutoStoryRows18_Tests.h | 2 +- .../PokemonFRLG_AutoStoryRunPlan_Tests.cpp | 8 +- .../PokemonFRLG_AutoStorySaffronGym_Tests.cpp | 41 ++- .../PokemonFRLG_AutoStorySilph_Tests.cpp | 50 ++-- .../AutoStory/PokemonFRLG_AutoStoryTable.cpp | 4 +- .../PokemonFRLG_AutoStoryTable_Tests.cpp | 4 +- .../AutoStory/PokemonFRLG_AutoStory_Tests.cpp | 8 +- .../AutoStory/StoryData/frlg-16.05.plan.json | 81 +++--- .../AutoStory/StoryData/frlg-16.05b.plan.json | 79 ++++++ .../AutoStory/StoryData/frlg-16.06.plan.json | 2 +- .../AutoStory/StoryData/frlg-17.04.plan.json | 50 +++- .../AutoStory/StoryData/frlg-18.02.plan.json | 245 +++-------------- .../AutoStory/StoryData/frlg-18.02b.plan.json | 246 ++++++++++++++++++ 18 files changed, 574 insertions(+), 310 deletions(-) create mode 100644 SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.05b.plan.json create mode 100644 SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-18.02b.plan.json diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory.cpp index 29765e8ef8..c4670c692e 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory.cpp @@ -122,7 +122,7 @@ const std::string RUN_GIFT_RNG_TEXT = const std::string TAKE_MASTER_BALL_TEXT = "Take the Master Ball:
On by default. After Giovanni on Silph Co.'s 11F, talk to the president for the " - "Master Ball (16.05). Off, or with the checks on SPEEDRUN, skips it."; + "Master Ball (16.05b). Off, or with the checks on SPEEDRUN, skips it."; // code-health: allow function_lines -- a flat list of the program's options, each one line of its own; splitting it hides which belong AutoStory::AutoStory() diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory.h b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory.h index a1b73f4817..a955dfcf0e 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory.h +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory.h @@ -102,7 +102,7 @@ class AutoStory : public SingleSwitchProgramInstance{ // Runs Gift RNG's attempts in the program after 04.02 (the Magikarp) // and 09.03 (the Eevee). BooleanCheckBoxOption RUN_GIFT_RNG; - // Takes the Master Ball from Silph Co.'s president (16.05), unless the + // Takes the Master Ball from Silph Co.'s president (16.05b), unless the // run is a SPEEDRUN. BooleanCheckBoxOption TAKE_MASTER_BALL; StarterRngPlanOptions RNG_PLAN; diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.h b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.h index 80346512fa..f3242020ce 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.h +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.h @@ -107,7 +107,7 @@ struct StoryEnv{ // restores into `party.users`. The program starts it from its settings // and keeps it there. SavedFieldMoveUsers saved_field_moves = {}; - // The program's "Take the Master Ball" option: 16.05's talk with Silph + // The program's "Take the Master Ball" option: 16.05b's talk with Silph // Co.'s president (skip_if master_ball_skipped). bool take_master_ball = true; // The run's breakpoints (the BREAKPOINTS option): StoryExecutor pauses diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden16.h b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden16.h index 094198e143..bee769a8b2 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden16.h +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden16.h @@ -74,10 +74,10 @@ inline constexpr std::string_view FRLG_PLAN_GOLDEN_16[] = { "16.05 walk east 3 -> SilphCo_11F (5, 18)", "16.05 open gate north -> SilphCo_11F (5, 18)", "16.05 walk north 2 -> SilphCo_11F (5, 16)", - "16.05 below_president from SilphCo_11F (5, 15) facing east to SilphCo_11F (9, 10) facing north", - "16.05 walk north 5 -> SilphCo_11F (5, 10)", - "16.05 walk east 4 -> SilphCo_11F (9, 10)", - "16.05 face north -> SilphCo_11F (9, 10)", + "16.05b below_president from SilphCo_11F (5, 15) facing east to SilphCo_11F (9, 10) facing north", + "16.05b walk north 5 -> SilphCo_11F (5, 10)", + "16.05b walk east 4 -> SilphCo_11F (9, 10)", + "16.05b face north -> SilphCo_11F (9, 10)", "16.06 below_center_door from SilphCo_11F (9, 10) facing north to SaffronCity (24, 39) facing north", "16.06 walk west 4 (to wall) -> SilphCo_11F (5, 10)", "16.06 walk south 9 (to wall) -> SilphCo_11F (5, 19)", diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden18.h b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden18.h index f077bade6e..1778a21440 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden18.h +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden18.h @@ -2,7 +2,7 @@ * * From: https://github.com/PokemonAutomation/ * - * The golden's lines for 18.01 and 18.02, Saffron Gym (after + * The golden's lines for 18.01 to 18.02b, Saffron Gym (after * PokemonFRLG_AutoStoryPlanGolden16.h's, before PokemonFRLG_AutoStoryPlanGolden17.h's * 17.01), in the story's order. * @@ -17,7 +17,7 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonFRLG{ -// The stored plan lines of 18.01 and 18.02, Saffron Gym. +// The stored plan lines of 18.01 to 18.02b, Saffron Gym. inline constexpr std::string_view FRLG_PLAN_GOLDEN_18[] = { "18.01 by_pad_to_bottom_right from SaffronCity_Gym (14, 23) facing north to SaffronCity_Gym (17, 20) facing east", "18.01 walk east 3 -> SaffronCity_Gym (17, 23) [walk only]", @@ -37,29 +37,29 @@ inline constexpr std::string_view FRLG_PLAN_GOLDEN_18[] = { "18.01 below_sabrina from SaffronCity_Gym (18, 15) facing south to SaffronCity_Gym (14, 12) facing north", "18.01 walk west 4 -> SaffronCity_Gym (14, 15) [walk only]", "18.01 walk north 3 -> SaffronCity_Gym (14, 12) [walk only]", - "18.02 by_pad_out_of_sabrina from SaffronCity_Gym (14, 12) facing north to SaffronCity_Gym (17, 15) facing east", - "18.02 walk south 3 (to wall) -> SaffronCity_Gym (14, 15) [walk only]", - "18.02 walk east 3 -> SaffronCity_Gym (17, 15) [walk only]", - "18.02 by_pad_from_top_left from SaffronCity_Gym (0, 7) facing east to SaffronCity_Gym (0, 5) facing north", - "18.02 walk north 2 -> SaffronCity_Gym (0, 5) [walk only]", - "18.02 along_row_6 from SaffronCity_Gym (20, 7) facing north to SaffronCity_Gym (28, 6) facing east", - "18.02 walk north 1 -> SaffronCity_Gym (20, 6) [walk only]", - "18.02 walk east 8 (to wall) -> SaffronCity_Gym (28, 6) [walk only]", - "18.02 below_pad_from_top_right from SaffronCity_Gym (28, 6) facing east to SaffronCity_Gym (28, 5) facing north", - "18.02 walk north 1 -> SaffronCity_Gym (28, 5) [walk only]", - "18.02 by_pad_from_bottom_right from SaffronCity_Gym (20, 20) facing north to SaffronCity_Gym (28, 22) facing south", - "18.02 walk south 2 -> SaffronCity_Gym (20, 22) [walk only]", - "18.02 walk east 8 (to wall) -> SaffronCity_Gym (28, 22) [walk only]", - "18.02 face south -> SaffronCity_Gym (28, 22) [walk only]", - "18.02 below_center_door from SaffronCity_Gym (18, 20) facing south to SaffronCity (24, 39) facing north", - "18.02 walk south 3 (to wall) -> SaffronCity_Gym (18, 23) [walk only]", - "18.02 walk west 4 -> SaffronCity_Gym (14, 23) [walk only] [tapped]", - "18.02 walk south 1 (warp) -> SaffronCity (46, 13) [walk only]", - "18.02 walk south 4 (to wall) -> SaffronCity (46, 17)", - "18.02 walk east 4 -> SaffronCity (50, 17)", - "18.02 walk south 24 (to wall) -> SaffronCity (50, 41)", - "18.02 walk west 26 -> SaffronCity (24, 41)", - "18.02 walk north 2 -> SaffronCity (24, 39)", + "18.02b by_pad_out_of_sabrina from SaffronCity_Gym (14, 12) facing north to SaffronCity_Gym (17, 15) facing east", + "18.02b walk south 3 (to wall) -> SaffronCity_Gym (14, 15) [walk only]", + "18.02b walk east 3 -> SaffronCity_Gym (17, 15) [walk only]", + "18.02b by_pad_from_top_left from SaffronCity_Gym (0, 7) facing east to SaffronCity_Gym (0, 5) facing north", + "18.02b walk north 2 -> SaffronCity_Gym (0, 5) [walk only]", + "18.02b along_row_6 from SaffronCity_Gym (20, 7) facing north to SaffronCity_Gym (28, 6) facing east", + "18.02b walk north 1 -> SaffronCity_Gym (20, 6) [walk only]", + "18.02b walk east 8 (to wall) -> SaffronCity_Gym (28, 6) [walk only]", + "18.02b below_pad_from_top_right from SaffronCity_Gym (28, 6) facing east to SaffronCity_Gym (28, 5) facing north", + "18.02b walk north 1 -> SaffronCity_Gym (28, 5) [walk only]", + "18.02b by_pad_from_bottom_right from SaffronCity_Gym (20, 20) facing north to SaffronCity_Gym (28, 22) facing south", + "18.02b walk south 2 -> SaffronCity_Gym (20, 22) [walk only]", + "18.02b walk east 8 (to wall) -> SaffronCity_Gym (28, 22) [walk only]", + "18.02b face south -> SaffronCity_Gym (28, 22) [walk only]", + "18.02b below_center_door from SaffronCity_Gym (18, 20) facing south to SaffronCity (24, 39) facing north", + "18.02b walk south 3 (to wall) -> SaffronCity_Gym (18, 23) [walk only]", + "18.02b walk west 4 -> SaffronCity_Gym (14, 23) [walk only] [tapped]", + "18.02b walk south 1 (warp) -> SaffronCity (46, 13) [walk only]", + "18.02b walk south 4 (to wall) -> SaffronCity (46, 17)", + "18.02b walk east 4 -> SaffronCity (50, 17)", + "18.02b walk south 24 (to wall) -> SaffronCity (50, 41)", + "18.02b walk west 26 -> SaffronCity (24, 41)", + "18.02b walk north 2 -> SaffronCity (24, 39)", }; } // namespace PokemonFRLG diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRows18_Tests.h b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRows18_Tests.h index 3cf7db99d7..ce365a190f 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRows18_Tests.h +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRows18_Tests.h @@ -18,7 +18,7 @@ namespace NintendoSwitch{ namespace PokemonFRLG{ -// Rows 18.01 and 18.02, Saffron Gym's pads, on the overworld sim +// Rows 18.01 to 18.02b, Saffron Gym's pads, on the overworld sim // (PokemonFRLG_AutoStorySaffronGym_Tests.cpp). void add_tests_AutoStorySaffronGym(UnitTestDatabase& database); diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRunPlan_Tests.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRunPlan_Tests.cpp index 6795d10b51..7ba98ec582 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRunPlan_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRunPlan_Tests.cpp @@ -145,7 +145,7 @@ class Test_RunPlan : public UnitTest{ const RunPlanScenario m_scenario; }; -const std::string TODAY = "01.01 01.03 01.04 01.05 02.01 02.02 02.03 03.01 03.02 03.03 04.01 04.02 04.04 04.05 04.06 05.01 05.02 05.03 05.04 05.05 05.06 05.07 05.08 05.09 05.10 06.01 06.02 06.03 06.04 07.01 07.02 08.01 08.02 08.03 09.01 09.02 09.03 10.01 10.02 10.03 10.04 10.05 10.06 11.01 11.02 11.03 12.01 12.02 12.02b 12.03 13.01 13.02 13.03 13.04 14.01 14.02 14.02b 14.03 14.04 14.04b 15.01 16.01 16.02 16.03 16.03b 16.05 16.06 18.01 18.02 17.02 17.03 17.04 17.04b 19.01a 19.01 19.02 19.03 19.04 19.04b 19.04c 19.04d 19.05 20.01a 20.01 20.02 20.03 20.04 20.05"; +const std::string TODAY = "01.01 01.03 01.04 01.05 02.01 02.02 02.03 03.01 03.02 03.03 04.01 04.02 04.04 04.05 04.06 05.01 05.02 05.03 05.04 05.05 05.06 05.07 05.08 05.09 05.10 06.01 06.02 06.03 06.04 07.01 07.02 08.01 08.02 08.03 09.01 09.02 09.03 10.01 10.02 10.03 10.04 10.05 10.06 11.01 11.02 11.03 12.01 12.02 12.02b 12.03 13.01 13.02 13.03 13.04 14.01 14.02 14.02b 14.03 14.04 14.04b 15.01 16.01 16.02 16.03 16.03b 16.05 16.05b 16.06 18.01 18.02 18.02b 17.02 17.03 17.04 17.04b 19.01a 19.01 19.02 19.03 19.04 19.04b 19.04c 19.04d 19.05 20.01a 20.01 20.02 20.03 20.04 20.05"; const RunPlanScenario RUN_PLAN_CASES[] = { { @@ -236,11 +236,11 @@ const RunPlanScenario RUN_PLAN_CASES[] = { }, { .input = {.name = "Gift RNG off: 04.03 is passed over", .first = "04.01"}, - .expectation = {.expected_ids = "04.01 04.02 04.04 04.05 04.06 05.01 05.02 05.03 05.04 05.05 05.06 05.07 05.08 05.09 05.10 06.01 06.02 06.03 06.04 07.01 07.02 08.01 08.02 08.03 09.01 09.02 09.03 10.01 10.02 10.03 10.04 10.05 10.06 11.01 11.02 11.03 12.01 12.02 12.02b 12.03 13.01 13.02 13.03 13.04 14.01 14.02 14.02b 14.03 14.04 14.04b 15.01 16.01 16.02 16.03 16.03b 16.05 16.06 18.01 18.02 17.02 17.03 17.04 17.04b 19.01a 19.01 19.02 19.03 19.04 19.04b 19.04c 19.04d 19.05 20.01a 20.01 20.02 20.03 20.04 20.05"}, + .expectation = {.expected_ids = "04.01 04.02 04.04 04.05 04.06 05.01 05.02 05.03 05.04 05.05 05.06 05.07 05.08 05.09 05.10 06.01 06.02 06.03 06.04 07.01 07.02 08.01 08.02 08.03 09.01 09.02 09.03 10.01 10.02 10.03 10.04 10.05 10.06 11.01 11.02 11.03 12.01 12.02 12.02b 12.03 13.01 13.02 13.03 13.04 14.01 14.02 14.02b 14.03 14.04 14.04b 15.01 16.01 16.02 16.03 16.03b 16.05 16.05b 16.06 18.01 18.02 18.02b 17.02 17.03 17.04 17.04b 19.01a 19.01 19.02 19.03 19.04 19.04b 19.04c 19.04d 19.05 20.01a 20.01 20.02 20.03 20.04 20.05"}, }, { .input = {.name = "Gift RNG off: 04.03 runs when started at", .first = "04.03"}, - .expectation = {.expected_ids = "04.03 04.04 04.05 04.06 05.01 05.02 05.03 05.04 05.05 05.06 05.07 05.08 05.09 05.10 06.01 06.02 06.03 06.04 07.01 07.02 08.01 08.02 08.03 09.01 09.02 09.03 10.01 10.02 10.03 10.04 10.05 10.06 11.01 11.02 11.03 12.01 12.02 12.02b 12.03 13.01 13.02 13.03 13.04 14.01 14.02 14.02b 14.03 14.04 14.04b 15.01 16.01 16.02 16.03 16.03b 16.05 16.06 18.01 18.02 17.02 17.03 17.04 17.04b 19.01a 19.01 19.02 19.03 19.04 19.04b 19.04c 19.04d 19.05 20.01a 20.01 20.02 20.03 20.04 20.05"}, + .expectation = {.expected_ids = "04.03 04.04 04.05 04.06 05.01 05.02 05.03 05.04 05.05 05.06 05.07 05.08 05.09 05.10 06.01 06.02 06.03 06.04 07.01 07.02 08.01 08.02 08.03 09.01 09.02 09.03 10.01 10.02 10.03 10.04 10.05 10.06 11.01 11.02 11.03 12.01 12.02 12.02b 12.03 13.01 13.02 13.03 13.04 14.01 14.02 14.02b 14.03 14.04 14.04b 15.01 16.01 16.02 16.03 16.03b 16.05 16.05b 16.06 18.01 18.02 18.02b 17.02 17.03 17.04 17.04b 19.01a 19.01 19.02 19.03 19.04 19.04b 19.04c 19.04d 19.05 20.01a 20.01 20.02 20.03 20.04 20.05"}, }, { .input = { .name = "Gift RNG: started at 04.03, from the save beside the salesman", @@ -279,7 +279,7 @@ const RunPlanScenario RUN_PLAN_CASES[] = { }, { .input = {.name = "Starter RNG alone: 04.03 runs when started at", .first = "04.03", .handoffs = {.starter_rng = true}}, - .expectation = {.expected_ids = "04.03 04.04 04.05 04.06 05.01 05.02 05.03 05.04 05.05 05.06 05.07 05.08 05.09 05.10 06.01 06.02 06.03 06.04 07.01 07.02 08.01 08.02 08.03 09.01 09.02 09.03 10.01 10.02 10.03 10.04 10.05 10.06 11.01 11.02 11.03 12.01 12.02 12.02b 12.03 13.01 13.02 13.03 13.04 14.01 14.02 14.02b 14.03 14.04 14.04b 15.01 16.01 16.02 16.03 16.03b 16.05 16.06 18.01 18.02 17.02 17.03 17.04 17.04b 19.01a 19.01 19.02 19.03 19.04 19.04b 19.04c 19.04d 19.05 20.01a 20.01 20.02 20.03 20.04 20.05"}, + .expectation = {.expected_ids = "04.03 04.04 04.05 04.06 05.01 05.02 05.03 05.04 05.05 05.06 05.07 05.08 05.09 05.10 06.01 06.02 06.03 06.04 07.01 07.02 08.01 08.02 08.03 09.01 09.02 09.03 10.01 10.02 10.03 10.04 10.05 10.06 11.01 11.02 11.03 12.01 12.02 12.02b 12.03 13.01 13.02 13.03 13.04 14.01 14.02 14.02b 14.03 14.04 14.04b 15.01 16.01 16.02 16.03 16.03b 16.05 16.05b 16.06 18.01 18.02 18.02b 17.02 17.03 17.04 17.04b 19.01a 19.01 19.02 19.03 19.04 19.04b 19.04c 19.04d 19.05 20.01a 20.01 20.02 20.03 20.04 20.05"}, }, { .input = { .name = "Starter RNG first, with both on", diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySaffronGym_Tests.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySaffronGym_Tests.cpp index 357ac89222..096e772745 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySaffronGym_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySaffronGym_Tests.cpp @@ -2,9 +2,10 @@ * * From: https://github.com/PokemonAutomation/ * - * Rows 18.01 and 18.02 (StoryData/frlg-18.0[12].plan.json) on the overworld - * sim: Saffron Gym's teleport pads, from the door to the tile below Sabrina - * and back out to Saffron's Center, with no trainer met on the way. + * Rows 18.01, 18.02 and 18.02b (StoryData/frlg-18.02*.plan.json ...) on the + * overworld sim: Saffron Gym's teleport pads, from the door to the tile below + * Sabrina and back out to Saffron's Center, with no trainer met on the way; + * Sabrina's battle is a checkpoint of its own. * */ @@ -133,10 +134,25 @@ UnitTestResult test_pads_to_sabrina(){ return true; } -// The way out: the same pads the other way, each pair linked both ways, -// then the door onto Saffron City and the street to below the Center's door. +// A boss battle is its own checkpoint (user, 2026-11-12): 18.02 ends with +// Sabrina's battle, in front of her, and 18.02b starts there. +UnitTestResult test_sabrina_own_checkpoint(){ + const std::vector& steps = checkpoint("18.02").steps; + if (steps.empty() || steps.back().kind != StoryStepKind::BATTLE || steps.back().name != "sabrina"){ + return "18.02 does not end with Sabrina's battle."; + } + const StoryPose next = *story_pose(Pokemon::pose_of(*checkpoint("18.02b").start)); + const MapPosition below_sabrina{"SaffronCity_Gym", {14, 12}}; + if (next.map != below_sabrina.map || !(next.tile == below_sabrina.point) || next.facing != Direction::NORTH){ + return "18.02b doesn't start in front of Sabrina, where her battle leaves the player."; + } + return true; +} + +// The way out (18.02b): the same pads the other way, each pair linked both +// ways, then the door onto Saffron City and the street to below the Center's door. UnitTestResult test_pads_out_to_center(){ - const PadWalk walk = walk_pads(checkpoint("18.02")); + const PadWalk walk = walk_pads(checkpoint("18.02b")); if (!walk.failure.empty()){ return walk.failure; } @@ -144,14 +160,14 @@ UnitTestResult test_pads_out_to_center(){ {"SaffronCity_Gym", {0, 7}}, {"SaffronCity_Gym", {20, 7}}, {"SaffronCity_Gym", {20, 20}}, {"SaffronCity_Gym", {18, 20}}, }; if (walk.landings != expected){ - return "18.02: the pads did not land on (0, 7), (20, 7), (20, 20) and (18, 20), in that order."; + return "18.02b: the pads did not land on (0, 7), (20, 7), (20, 20) and (18, 20), in that order."; } const MapPosition below_center{"SaffronCity", {24, 39}}; if (!(walk.end == below_center)){ - return std::format("18.02: ended on {}, not below Saffron's Center door {}.", to_string(walk.end), to_string(below_center)); + return std::format("18.02b: ended on {}, not below Saffron's Center door {}.", to_string(walk.end), to_string(below_center)); } if (!walk.clean){ - return "18.02: met a trainer or broke a rule on the way."; + return "18.02b: met a trainer or broke a rule on the way."; } return true; } @@ -182,7 +198,12 @@ const AutoStorySaffronGymCase AUTO_STORY_SAFFRON_GYM_CASES[] = { .expectation = {.description = "four pads, landing in the rooms in order, below Sabrina, nobody met"}, }, { - .name = "18.02 Saffron Gym's pads back out to the Center's door", + .name = "18.02 Sabrina's battle is its own checkpoint", + .input = {.body = test_sabrina_own_checkpoint}, + .expectation = {.description = "18.02 ends with her battle; 18.02b starts in front of her"}, + }, + { + .name = "18.02b Saffron Gym's pads back out to the Center's door", .input = {.body = test_pads_out_to_center}, .expectation = {.description = "four pads the other way, below Saffron's Center door, nobody met"}, }, diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySilph_Tests.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySilph_Tests.cpp index 6fc145a939..e9dee88ae2 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySilph_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySilph_Tests.cpp @@ -369,21 +369,31 @@ UnitTestResult test_after_gift_row(){ // 16.05: the pad to 11F, down its left wall out of the Rocket's column, the // Rocket beside the player (his fight), the Card Key door and Giovanni's -// trigger, then to the president. +// trigger; it ends with his battle, where it leaves the player (a boss +// battle is its own checkpoint), and 16.05b starts there. UnitTestResult test_giovanni_row(){ const RowResult result = walk_row("16.05", maps_after_16_02()); - if (const std::string wrong = wrong_end("16.05", result, MapPosition{"SilphCo_11F", {9, 10}}); !wrong.empty()){ + const MapPosition after_giovanni{"SilphCo_11F", {5, 15}}; + if (const std::string wrong = wrong_end("16.05", result, after_giovanni); !wrong.empty()){ return wrong; } if (result.trainers.size() != size_t(1)){ return "16.05: the Rocket at (2, 19) did not fight alone."; } + const std::vector& steps = checkpoint("16.05").steps; + if (steps.empty() || steps.back().name != "giovanni"){ + return "16.05 does not end with Giovanni's battle."; + } + const StoryPose next = *story_pose(Pokemon::pose_of(*checkpoint("16.05b").start)); + if (next.map != after_giovanni.map || !(next.tile == after_giovanni.point) || next.facing != Direction::EAST){ + return "16.05b doesn't start where 16.05 ends, facing east."; + } return true; } -// 16.05's step named `name`; none if it has none. -const StoryStep* giovanni_row_step(std::string_view name){ - for (const StoryStep& step : checkpoint("16.05").steps){ +// Checkpoint `id`'s step named `name`; none if it has none. +const StoryStep* step_of_row(std::string_view id, std::string_view name){ + for (const StoryStep& step : checkpoint(id).steps){ if (step.name == name){ return &step; } @@ -391,7 +401,7 @@ const StoryStep* giovanni_row_step(std::string_view name){ return nullptr; } -// 16.05 below_president from where Giovanni's battle leaves the player: +// 16.05b below_president from where Giovanni's battle leaves the player: // (5, 15) facing east, to Giovanni, who walked down to (6, 15) (pokefirered // data/maps/SilphCo_11F/scripts.inc, SilphCo_11F_Movement_GiovanniApproachLeft // and _PlayerFaceGiovanni). The walk is planned from the giovanni step's @@ -401,10 +411,10 @@ const StoryStep* giovanni_row_step(std::string_view name){ // again at the wrong tile and ended below the table, where the president's // talk opened no message (console B, 2026-11-15 13:02, 16.05). UnitTestResult test_president_walk_after_giovanni(){ - const StoryStep* giovanni = giovanni_row_step("giovanni"); - const StoryStep* below = giovanni_row_step("below_president"); + const StoryStep* giovanni = step_of_row("16.05", "giovanni"); + const StoryStep* below = step_of_row("16.05b", "below_president"); if (giovanni == nullptr || below == nullptr || !giovanni->pose_after){ - return "16.05 has no giovanni step with a pose after it, or no below_president."; + return "16.05 has no giovanni step with a pose after it, or 16.05b no below_president."; } const StoryPose at = *story_pose(Pokemon::pose_of(*giovanni->pose_after)); const std::optional target = story_pose(Pokemon::pose_of(Pokemon::story_arg(below->args, "target"))); @@ -423,12 +433,12 @@ UnitTestResult test_president_walk_after_giovanni(){ OverworldSim sim(maps, MapPosition{"SilphCo_11F", {5, 15}}, Direction::EAST); const RoutePlanning planning{.maps = &maps, .costs = story_route_costs(), .start = start, .label = "below_president"}; if (const std::string failure = OverworldSimWalker(sim).run(*route, planning, at.facing); !failure.empty()){ - return std::format("16.05: ended on {}; {}", to_string(sim.state().position), failure); + return std::format("16.05b: ended on {}; {}", to_string(sim.state().position), failure); } const MapPosition president_talk{"SilphCo_11F", {9, 10}}; if (!(sim.state().position == president_talk) || sim.state().facing != Direction::NORTH){ return std::format( - "16.05: ended on {} facing {}, not {} facing north.", + "16.05b: ended on {} facing {}, not {} facing north.", to_string(sim.state().position), direction_name(sim.state().facing), to_string(president_talk) ); } @@ -515,9 +525,11 @@ UnitTestResult test_silph_cleared_flag(){ if (!set){ return "16.05's Giovanni step does not set silph_cleared."; } - const std::vector& start = checkpoint("16.06").start_flags; - if (std::find(start.begin(), start.end(), SILPH_CLEARED_FLAG) == start.end()){ - return "16.06 does not start with silph_cleared."; + for (const std::string_view id : {"16.05b", "16.06"}){ + const std::vector& start = checkpoint(id).start_flags; + if (std::find(start.begin(), start.end(), SILPH_CLEARED_FLAG) == start.end()){ + return std::format("{} does not start with silph_cleared.", id); + } } return true; } @@ -534,12 +546,12 @@ UnitTestResult test_master_ball_option(){ if (!StoryExecutor::master_ball_skipped(true, StoryCheckLevel::SPEEDRUN)){ return "The Master Ball is taken in a SPEEDRUN."; } - const StoryCheckpoint& row = checkpoint("16.05"); + const StoryCheckpoint& row = checkpoint("16.05b"); const bool skippable = std::any_of(row.steps.begin(), row.steps.end(), [](const StoryStep& step){ return step.name == "master_ball" && step.skip_if == std::vector{"master_ball_skipped"}; }); if (!skippable){ - return "16.05's master_ball step is not skip_if master_ball_skipped."; + return "16.05b's master_ball step is not skip_if master_ball_skipped."; } return true; } @@ -684,10 +696,10 @@ const AutoStorySilphCase AUTO_STORY_SILPH_CASES[] = { }, { .input = {.name = "16.05 11F's Card Key door and Giovanni", .body = test_giovanni_row}, - .expectation = {.description = "one Rocket fought, 11F's door opened, ends below the president"}, + .expectation = {.description = "one Rocket fought, 11F's door opened, ends with Giovanni's battle where 16.05b starts"}, }, { - .input = {.name = "16.05 to the president from where Giovanni's battle leaves the player", .body = test_president_walk_after_giovanni}, + .input = {.name = "16.05b to the president from where Giovanni's battle leaves the player", .body = test_president_walk_after_giovanni}, .expectation = {.description = "from (5, 15) facing east, ends on (9, 10) facing north"}, }, { @@ -708,7 +720,7 @@ const AutoStorySilphCase AUTO_STORY_SILPH_CASES[] = { }, { .input = {.name = "silph_cleared is set by the Giovanni step", .body = test_silph_cleared_flag}, - .expectation = {.description = "16.05's giovanni sets it; 16.06 starts with it"}, + .expectation = {.description = "16.05's giovanni sets it; 16.05b and 16.06 start with it"}, }, { .input = {.name = "the Master Ball option and SPEEDRUN", .body = test_master_ball_option}, diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.cpp index d1ad360d42..712386d914 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.cpp @@ -246,8 +246,8 @@ constexpr std::string_view STORY_ORDER[] = { "09.04", "10.01", "10.02", "10.03", "10.04", "10.05", "10.06", "11.01", "11.02", "11.03", "12.01", "12.02", "12.02b", "12.03", "13.01", "13.02", "13.03", "13.04", "14.01", "14.02", "14.02b", - "14.03", "14.04", "14.04b", "15.01", "16.01", "16.02", "16.03", "16.03b", "16.04", "16.05", "16.06", - "18.01", "18.02", + "14.03", "14.04", "14.04b", "15.01", "16.01", "16.02", "16.03", "16.03b", "16.04", "16.05", "16.05b", "16.06", + "18.01", "18.02", "18.02b", "17.02", "17.03", "17.04", "17.04b", "19.01a", "19.01", "19.02", "19.03", "19.04", "19.04b", "19.04c", "19.04d", "19.05", "20.01a", "20.01", "20.02", "20.03", "20.04", "20.05", }; diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable_Tests.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable_Tests.cpp index 126188f08a..2101f5561a 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable_Tests.cpp @@ -35,8 +35,8 @@ const std::vector PINNED_ORDER = { "09.04", "10.01", "10.02", "10.03", "10.04", "10.05", "10.06", "11.01", "11.02", "11.03", "12.01", "12.02", "12.02b", "12.03", "13.01", "13.02", "13.03", "13.04", "14.01", "14.02", "14.02b", - "14.03", "14.04", "14.04b", "15.01", "16.01", "16.02", "16.03", "16.03b", "16.04", "16.05", "16.06", - "18.01", "18.02", + "14.03", "14.04", "14.04b", "15.01", "16.01", "16.02", "16.03", "16.03b", "16.04", "16.05", "16.05b", "16.06", + "18.01", "18.02", "18.02b", "17.02", "17.03", "17.04", "17.04b", "19.01a", "19.01", "19.02", "19.03", "19.04", "19.04b", "19.04c", "19.04d", "19.05", "20.01a", "20.01", "20.02", "20.03", "20.04", "20.05", }; diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp index 2026b65c8e..2a5acc58c6 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp @@ -400,8 +400,8 @@ UnitTestResult check_checkpoint(const StoryCheckpoint& checkpoint, StoryPose& po // start: starts_after_unauthored_rows()), and adds the plans to `golden`. UnitTestResult chain_story_routes(std::vector& golden){ const std::vector& checkpoints = story_checkpoints(); - if (checkpoints.size() != 93 || checkpoints[0].start){ - return "Expected 93 checkpoints, the first from a new game."; + if (checkpoints.size() != 95 || checkpoints[0].start){ + return "Expected 95 checkpoints, the first from a new game."; } StoryPose pose; walk_state() = WalkGates{}; @@ -970,7 +970,7 @@ std::string approach_off_tile(const std::vector& legs){ // (console B, 2026-11-14 05:48). // PASSED_ON_CONSOLE: approaches before 10.05 that passed their console // runs as held legs (a follow-up to tap them). 13.03 and 13.04 plan their statue -// approaches (PRESS_SWITCH) and have not run on a console, nor has 16.05's walk to the +// approaches (PRESS_SWITCH) and have not run on a console, nor has 16.05b's walk to the // president: it ends at (9, 10) facing north, the only tile that faces him, with no wall to // end a leg against (tap it once Silph Co. has run). UnitTestResult test_approaches_end_on_their_tile(){ @@ -978,7 +978,7 @@ UnitTestResult test_approaches_end_on_their_tile(){ "02.02/below_oak", "03.02/before_brock", "05.07/below_bill_clefairy", "05.07/pc_front", "05.07/beside_bill", "06.01/behind_captain", "07.01/beside_chairman", "07.01/bike_clerk", "09.01/below_poster_guard", "09.02/below_left_guard", "09.03/above_tea_woman", "10.01/below_fly_woman", "13.03/to_elixir", "13.04/to_key", - "16.05/below_president", + "16.05b/below_president", }; std::string wrong; size_t count = 0; diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.05.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.05.plan.json index 95e4dda500..d84bb3fc39 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.05.plan.json +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.05.plan.json @@ -3,7 +3,7 @@ "game": "frlg", "checkpoint": { "id": "16.05", - "title": "Silph Co. 11F: Giovanni and the MASTER BALL", + "title": "Silph Co. 11F: Giovanni", "start": { "map": "SilphCo_7F", "tiles": [ @@ -110,6 +110,49 @@ "kangaskhan", "rhyhorn", "nidoqueen" + ], + "policy": "goal-based-setup", + "setup_spa": 1, + "setup_accuracy": 0, + "setup_outspeed": true, + "setup_guard_accuracy": true, + "foe_threats": [ + [ + 64, + 15, + 11, + 45, + 21, + 0, + 0 + ], + [ + 70, + 26, + 12, + 63, + 31, + 0, + 0 + ], + [ + 34, + 18, + 13, + 112, + 55, + 0, + 0 + ], + [ + 79, + 19, + 12, + 52, + 26, + 0, + 0 + ] ] }, "declared_after": { @@ -125,33 +168,7 @@ "flags_after": [ "silph_cleared" ], - "why": "Giovanni (TRAINER_BOSS_GIOVANNI_2): Nidorino Lv37, Kangaskhan Lv35, Rhyhorn Lv37, Nidoqueen Lv41; then he and the Rockets leave Silph Co. and Saffron City (FLAG_HIDE_SAFFRON_ROCKETS), the story's maps from here have none. He walks down to (6, 15) and the player turns east to him (SilphCo_11F_Movement_GiovanniApproachLeft, _PlayerFaceGiovanni), so the battle leaves the player facing east" - }, - { - "id": "below_president", - "kind": "route", - "action": "run", - "args": { - "target": { - "map": "SilphCo_11F", - "tiles": [ - [ - 9, - 10 - ] - ], - "facing": "north" - } - }, - "why": "up the room to (9, 10), below the president (9, 9)" - }, - { - "id": "master_ball", - "kind": "talk", - "skip_if": [ - "master_ball_skipped" - ], - "why": "the president gives the MASTER BALL (SilphCo_11F_EventScript_President, FLAG_GOT_MASTER_BALL_FROM_SILPH); skipped by the program's option and in a SPEEDRUN (pokeguy skips it, 1:32:51)" + "why": "Giovanni (TRAINER_BOSS_GIOVANNI_2): Nidorino Lv37, Kangaskhan Lv35, Rhyhorn Lv37, Nidoqueen Lv41; then he and the Rockets leave Silph Co. and Saffron City (FLAG_HIDE_SAFFRON_ROCKETS), the story's maps from here have none. He walks down to (6, 15) and the player turns east to him (SilphCo_11F_Movement_GiovanniApproachLeft, _PlayerFaceGiovanni), so the battle leaves the player facing east. Fought by pokeguy's C2 (PokemonSimulation docs/battles/pokeguy-conditions.md, silph-giovanni: goal-based-setup to Sp. Atk +1, outspeed, Guard Spec first; 100% of the doc's sims from 33/143 HP); foe_threats are planning_risk() for each foe leading against the doc's entry (Blastoise Lv46). Without a policy console B's lead attacked from turn 1 with potions only and lost twice (2026-11-15)" } ] }, @@ -159,7 +176,7 @@ "menu": "full", "notes": { "checkpoint": [ - "Starts on 7F beside the employee, where 16.04 saves (16.03b without Gift RNG). Ends facing the president, with the MASTER BALL if taken; the save after it is the retry point before the walk back (16.06). Giovanni is a boss fight (pokeguy: C, TRAINER_BOSS_GIOVANNI_2)." + "Starts on 7F beside the employee, where 16.04 saves (16.03b without Gift RNG). A boss battle is its own checkpoint (user, 2026-11-12): it ends where Giovanni's battle leaves the player, (5, 15) facing east, and saves there; 16.05b goes on to the president. Giovanni is a boss fight (pokeguy: C, TRAINER_BOSS_GIOVANNI_2)." ] } }, @@ -170,11 +187,11 @@ "map": "SilphCo_11F", "tiles": [ [ - 9, - 10 + 5, + 15 ] ], - "facing": "north" + "facing": "east" } } } diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.05b.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.05b.plan.json new file mode 100644 index 0000000000..1180d7dcaa --- /dev/null +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.05b.plan.json @@ -0,0 +1,79 @@ +{ + "format": "pokesim-authored-checkpoint/1", + "game": "frlg", + "checkpoint": { + "id": "16.05b", + "title": "Silph Co. 11F: the president and the MASTER BALL", + "start": { + "map": "SilphCo_11F", + "tiles": [ + [ + 5, + 15 + ] + ], + "facing": "east" + }, + "start_gates": { + "opened": [ + "SilphCo_3F/door_2", + "SilphCo_11F/door" + ] + }, + "start_flags": [ + "card_key_held", + "silph_cleared" + ], + "events": [ + { + "id": "below_president", + "kind": "route", + "action": "run", + "args": { + "target": { + "map": "SilphCo_11F", + "tiles": [ + [ + 9, + 10 + ] + ], + "facing": "north" + } + }, + "why": "up the room to (9, 10), below the president (9, 9)" + }, + { + "id": "master_ball", + "kind": "talk", + "skip_if": [ + "master_ball_skipped" + ], + "why": "the president gives the MASTER BALL (SilphCo_11F_EventScript_President, FLAG_GOT_MASTER_BALL_FROM_SILPH); skipped by the program's option and in a SPEEDRUN (pokeguy skips it, 1:32:51)" + } + ] + }, + "execution": { + "menu": "full", + "notes": { + "checkpoint": [ + "Starts where 16.05 ends after Giovanni's battle and saves: (5, 15) facing east, Giovanni gone and the Rockets with him (silph_cleared). Ends facing the president, with the MASTER BALL if taken; the save after it is the retry point before the walk back (16.06)." + ] + } + }, + "metadata": { + "phase": "testing", + "postconditions": { + "position": { + "map": "SilphCo_11F", + "tiles": [ + [ + 9, + 10 + ] + ], + "facing": "north" + } + } + } +} diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.06.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.06.plan.json index 319a4f29dc..71914204d3 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.06.plan.json +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.06.plan.json @@ -70,7 +70,7 @@ "menu": "full", "notes": { "checkpoint": [ - "Starts facing the president on 11F, where 16.05 ends. The Rockets are gone from Silph Co. and Saffron City (silph_cleared): the Grunt at Saffron (46, 13) no longer blocks the Gym's door." + "Starts facing the president on 11F, where 16.05b ends. The Rockets are gone from Silph Co. and Saffron City (silph_cleared): the Grunt at Saffron (46, 13) no longer blocks the Gym's door." ] } }, diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-17.04.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-17.04.plan.json index df66993362..c9dc486307 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-17.04.plan.json +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-17.04.plan.json @@ -41,6 +41,54 @@ "nidoqueen", "nidoking", "rhydon" + ], + "policy": "solo-recovery", + "foe_threats": [ + [ + 27, + 45, + 36, + 126, + 59, + 0, + 0 + ], + [ + 105, + 36, + 36, + 75, + 37, + 1, + 0 + ], + [ + 71, + 41, + 41, + 84, + 42, + 0, + 0 + ], + [ + 81, + 48, + 45, + 99, + 49, + 0, + 0 + ], + [ + 27, + 52, + 41, + 140, + 69, + 0, + 0 + ] ] }, "declared_after": { @@ -53,7 +101,7 @@ ], "facing": "north" }, - "why": "Giovanni: Rhyhorn Lv45, Dugtrio Lv42, Nidoqueen Lv44, Nidoking Lv45, Rhydon Lv50; then the EARTHBADGE and TM26 Earthquake" + "why": "Giovanni: Rhyhorn Lv45, Dugtrio Lv42, Nidoqueen Lv44, Nidoking Lv45, Rhydon Lv50; then the EARTHBADGE and TM26 Earthquake. Fought by pokeguy's B (solo-recovery: cure and heal by safety, no setup): the doc's giovanni-gym is an A fight, and B is its default runtime (PokemonSimulation docs/battles/pokeguy-conditions.md, Strategy rules); foe_threats are planning_risk() for each foe leading against the doc's entry (Blastoise Lv48), Dugtrio's Mud-Slap lowering accuracy" } ] }, diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-18.02.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-18.02.plan.json index 99660a8f29..79a05feb13 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-18.02.plan.json +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-18.02.plan.json @@ -3,7 +3,7 @@ "game": "frlg", "checkpoint": { "id": "18.02", - "title": "Saffron Gym: Sabrina and the MARSHBADGE, the pads back out, heal at Saffron's Center", + "title": "Saffron Gym: Sabrina and the MARSHBADGE", "start": { "map": "SaffronCity_Gym", "tiles": [ @@ -40,220 +40,62 @@ "mr-mime", "venomoth", "alakazam" - ] - }, - "declared_after": { - "map": "SaffronCity_Gym", - "tiles": [ - [ - 14, - 12 - ] ], - "facing": "north" - }, - "why": "Sabrina (TRAINER_LEADER_SABRINA): Kadabra Lv38, Mr. Mime Lv37, Venomoth Lv38, Alakazam Lv43 (pokeguy: Water Pulse, Surf, Bite and Blizzard, 1:33:30 to 1:34:38); then the MARSHBADGE and TM04 Calm Mind" - }, - { - "id": "by_pad_out_of_sabrina", - "kind": "route", - "action": "run", - "args": { - "target": { - "map": "SaffronCity_Gym", - "tiles": [ - [ - 17, - 15 - ] - ], - "facing": "east" - } - }, - "why": "back to the tile west of the pad (18, 15) the way in landed on" - }, - { - "id": "pad_out_of_sabrina", - "kind": "step", - "args": { - "direction": "east" - }, - "declared_after": { - "map": "SaffronCity_Gym", - "tiles": [ + "policy": "goal-based-setup", + "setup_spa": 0, + "setup_accuracy": 0, + "setup_outspeed": true, + "setup_guard_accuracy": true, + "foe_threats": [ [ + 84, 0, - 7 - ] - ], - "facing": "east" - }, - "why": "onto the pad (18, 15), which warps to (0, 7) in the top left room" - }, - { - "id": "by_pad_from_top_left", - "kind": "route", - "action": "run", - "args": { - "target": { - "map": "SaffronCity_Gym", - "tiles": [ - [ - 0, - 5 - ] + 5, + 57, + 28, + 0, + 0 ], - "facing": "north" - } - }, - "why": "up column 0 to a tile below the pad (0, 4)" - }, - { - "id": "pad_from_top_left", - "kind": "step", - "args": { - "direction": "north" - }, - "declared_after": { - "map": "SaffronCity_Gym", - "tiles": [ [ - 20, - 7 - ] - ], - "facing": "north" - }, - "why": "onto the pad (0, 4), which warps to (20, 7) in the top right room" - }, - { - "id": "along_row_6", - "kind": "route", - "action": "run", - "args": { - "target": { - "map": "SaffronCity_Gym", - "tiles": [ - [ - 28, - 6 - ] - ], - "facing": "east" - } - }, - "why": "east along row 6 (Johan (24, 2) sees (24, 3) to (24, 5), so not row 5) to the room's east wall" - }, - { - "id": "below_pad_from_top_right", - "kind": "route", - "action": "run", - "args": { - "target": { - "map": "SaffronCity_Gym", - "tiles": [ - [ - 28, - 5 - ] + 71, + 0, + 3, + 45, + 22, + 0, + 0 ], - "facing": "north" - } - }, - "why": "up to the tile below the pad (28, 4)" - }, - { - "id": "pad_from_top_right", - "kind": "step", - "args": { - "direction": "north" - }, - "declared_after": { - "map": "SaffronCity_Gym", - "tiles": [ [ - 20, - 20 - ] - ], - "facing": "north" - }, - "why": "onto the pad (28, 4), which warps to (20, 20) in the bottom right room" - }, - { - "id": "by_pad_from_bottom_right", - "kind": "route", - "action": "run", - "args": { - "target": { - "map": "SaffronCity_Gym", - "tiles": [ - [ - 28, - 22 - ] + 73, + 12, + 12, + 26, + 13, + 0, + 0 ], - "facing": "south" - } - }, - "why": "east along row 22, below Cameron's line (24, 19 to 21), to a tile above the pad (28, 23)" - }, - { - "id": "pad_from_bottom_right", - "kind": "step", - "args": { - "direction": "south" - }, - "declared_after": { - "map": "SaffronCity_Gym", - "tiles": [ [ - 18, - 20 + 108, + 47, + 47, + 96, + 48, + 0, + 0 ] - ], - "facing": "south" - }, - "why": "onto the pad (28, 23), which warps to (18, 20) in the entrance room" - }, - { - "id": "below_center_door", - "kind": "route", - "action": "run", - "args": { - "target": { - "map": "SaffronCity", - "tiles": [ - [ - 24, - 39 - ] - ], - "facing": "north" - } + ] }, - "why": "down the entrance room and out of the door (14, 23) onto Saffron City below the gym (46, 13), then through the city to below the Center's door (24, 38)" - }, - { - "id": "saffron_nurse", - "kind": "game_action", - "action": "center_enter", "declared_after": { - "map": "SaffronCity_PokemonCenter_1F", + "map": "SaffronCity_Gym", "tiles": [ [ - 7, - 4 + 14, + 12 ] ], "facing": "north" }, - "why": "the Center script in: through the door and up to the nurse; no map of the Center" - }, - { - "id": "heal_saffron", - "kind": "heal", - "why": "full HP and PP" + "why": "Sabrina (TRAINER_LEADER_SABRINA): Kadabra Lv38, Mr. Mime Lv37, Venomoth Lv38, Alakazam Lv43 (pokeguy: Water Pulse, Surf, Bite and Blizzard, 1:33:30 to 1:34:38); then the MARSHBADGE and TM04 Calm Mind. Fought by pokeguy's C2 (PokemonSimulation docs/battles/pokeguy-conditions.md, sabrina: goal-based-setup with no Sp. Atk goal, X Speed to outspeed Alakazam, Guard Spec first; 98.3% of the doc's sims from 33/143 HP); foe_threats are planning_risk() for each foe leading against the doc's entry (Blastoise Lv46)" } ] }, @@ -262,8 +104,7 @@ "notes": { "checkpoint": [ "Sabrina (14, 11), talked to from below, from the save in front of her (18.01): Kadabra Lv38, Mr. Mime Lv37, Venomoth Lv38, Alakazam Lv43 (sParty_LeaderSabrina); then the MARSHBADGE and TM04 Calm Mind. PokeGuy has Blastoise at Lv46 here (pokeguy-route.md, section 14).", - "Out by the four pads in reverse, each pair a two-way link: (18, 15) to (0, 7), (0, 4) to (20, 7), (28, 4) to (20, 20), (28, 23) to (18, 20), keeping to the same rows as the way in (18.01). No gym trainer is fought on the way out.", - "Ends at Saffron's nurse, facing her: 17.01's start. Silph Co.'s Rocket Grunts are gone by now (FLAG_HIDE_SAFFRON_ROCKETS), but story_maps() still has them, so the city route here goes round their lines as 15.01's does; the walk out of the gym lands the player on (46, 13), where one of them stands on that map." + "A boss battle is its own checkpoint (user, 2026-11-12): it ends in front of her after the MARSHBADGE and TM04 text, and saves there; 18.02b goes on out of the gym." ] } }, @@ -271,11 +112,11 @@ "phase": "testing", "postconditions": { "position": { - "map": "SaffronCity_PokemonCenter_1F", + "map": "SaffronCity_Gym", "tiles": [ [ - 7, - 4 + 14, + 12 ] ], "facing": "north" diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-18.02b.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-18.02b.plan.json new file mode 100644 index 0000000000..00f8de6c53 --- /dev/null +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-18.02b.plan.json @@ -0,0 +1,246 @@ +{ + "format": "pokesim-authored-checkpoint/1", + "game": "frlg", + "checkpoint": { + "id": "18.02b", + "title": "Out of Saffron Gym by the pads, heal at Saffron's Center", + "start": { + "map": "SaffronCity_Gym", + "tiles": [ + [ + 14, + 12 + ] + ], + "facing": "north" + }, + "events": [ + { + "id": "by_pad_out_of_sabrina", + "kind": "route", + "action": "run", + "args": { + "target": { + "map": "SaffronCity_Gym", + "tiles": [ + [ + 17, + 15 + ] + ], + "facing": "east" + } + }, + "why": "back to the tile west of the pad (18, 15) the way in landed on" + }, + { + "id": "pad_out_of_sabrina", + "kind": "step", + "args": { + "direction": "east" + }, + "declared_after": { + "map": "SaffronCity_Gym", + "tiles": [ + [ + 0, + 7 + ] + ], + "facing": "east" + }, + "why": "onto the pad (18, 15), which warps to (0, 7) in the top left room" + }, + { + "id": "by_pad_from_top_left", + "kind": "route", + "action": "run", + "args": { + "target": { + "map": "SaffronCity_Gym", + "tiles": [ + [ + 0, + 5 + ] + ], + "facing": "north" + } + }, + "why": "up column 0 to a tile below the pad (0, 4)" + }, + { + "id": "pad_from_top_left", + "kind": "step", + "args": { + "direction": "north" + }, + "declared_after": { + "map": "SaffronCity_Gym", + "tiles": [ + [ + 20, + 7 + ] + ], + "facing": "north" + }, + "why": "onto the pad (0, 4), which warps to (20, 7) in the top right room" + }, + { + "id": "along_row_6", + "kind": "route", + "action": "run", + "args": { + "target": { + "map": "SaffronCity_Gym", + "tiles": [ + [ + 28, + 6 + ] + ], + "facing": "east" + } + }, + "why": "east along row 6 (Johan (24, 2) sees (24, 3) to (24, 5), so not row 5) to the room's east wall" + }, + { + "id": "below_pad_from_top_right", + "kind": "route", + "action": "run", + "args": { + "target": { + "map": "SaffronCity_Gym", + "tiles": [ + [ + 28, + 5 + ] + ], + "facing": "north" + } + }, + "why": "up to the tile below the pad (28, 4)" + }, + { + "id": "pad_from_top_right", + "kind": "step", + "args": { + "direction": "north" + }, + "declared_after": { + "map": "SaffronCity_Gym", + "tiles": [ + [ + 20, + 20 + ] + ], + "facing": "north" + }, + "why": "onto the pad (28, 4), which warps to (20, 20) in the bottom right room" + }, + { + "id": "by_pad_from_bottom_right", + "kind": "route", + "action": "run", + "args": { + "target": { + "map": "SaffronCity_Gym", + "tiles": [ + [ + 28, + 22 + ] + ], + "facing": "south" + } + }, + "why": "east along row 22, below Cameron's line (24, 19 to 21), to a tile above the pad (28, 23)" + }, + { + "id": "pad_from_bottom_right", + "kind": "step", + "args": { + "direction": "south" + }, + "declared_after": { + "map": "SaffronCity_Gym", + "tiles": [ + [ + 18, + 20 + ] + ], + "facing": "south" + }, + "why": "onto the pad (28, 23), which warps to (18, 20) in the entrance room" + }, + { + "id": "below_center_door", + "kind": "route", + "action": "run", + "args": { + "target": { + "map": "SaffronCity", + "tiles": [ + [ + 24, + 39 + ] + ], + "facing": "north" + } + }, + "why": "down the entrance room and out of the door (14, 23) onto Saffron City below the gym (46, 13), then through the city to below the Center's door (24, 38)" + }, + { + "id": "saffron_nurse", + "kind": "game_action", + "action": "center_enter", + "declared_after": { + "map": "SaffronCity_PokemonCenter_1F", + "tiles": [ + [ + 7, + 4 + ] + ], + "facing": "north" + }, + "why": "the Center script in: through the door and up to the nurse; no map of the Center" + }, + { + "id": "heal_saffron", + "kind": "heal", + "why": "full HP and PP" + } + ] + }, + "execution": { + "menu": "full", + "notes": { + "checkpoint": [ + "Starts in front of Sabrina, where 18.02 ends after her battle and saves.", + "Out by the four pads in reverse, each pair a two-way link: (18, 15) to (0, 7), (0, 4) to (20, 7), (28, 4) to (20, 20), (28, 23) to (18, 20), keeping to the same rows as the way in (18.01). No gym trainer is fought on the way out.", + "Ends at Saffron's nurse, facing her: 17.01's start. Silph Co.'s Rocket Grunts are gone by now (FLAG_HIDE_SAFFRON_ROCKETS), but story_maps() still has them, so the city route here goes round their lines as 15.01's does; the walk out of the gym lands the player on (46, 13), where one of them stands on that map." + ] + } + }, + "metadata": { + "phase": "testing", + "postconditions": { + "position": { + "map": "SaffronCity_PokemonCenter_1F", + "tiles": [ + [ + 7, + 4 + ] + ], + "facing": "north" + } + } + } +} \ No newline at end of file From 188003d9c58b17736aef69b611aca2d17899f65b Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 15 Nov 2026 14:50:20 -0800 Subject: [PATCH 3/3] FRLG AutoStory: no checkpoint ends on a talk's open message A talk returns as soon as its first message opens. 16.05b ended on the president's talk, so the save pressed + into his dialog and failed (console B, 2026-11-15). 16.05b gets a master_ball_obtained scene after the talk, with the talk's skip_if; 09.01, 10.06 and 16.02 ended on a talk the same way and get a scene too. A new lint test checks that a step running whenever the talk does follows every talk. --- .../AutoStory/PokemonFRLG_AutoStory_Tests.cpp | 28 +++++++++++++++++++ .../AutoStory/StoryData/frlg-09.01.plan.json | 6 ++++ .../AutoStory/StoryData/frlg-10.06.plan.json | 6 ++++ .../AutoStory/StoryData/frlg-16.02.plan.json | 6 ++++ .../AutoStory/StoryData/frlg-16.05b.plan.json | 9 ++++++ 5 files changed, 55 insertions(+) diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp index 2a5acc58c6..c42bb56534 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp @@ -1435,6 +1435,30 @@ UnitTestResult test_unique_names(){ } return true; } +// A talk returns as soon as its first message opens, so a talk that ends +// its checkpoint leaves that message up and the save's + presses go into +// it (16.05b's president, 2026-11-15). Each talk is followed by a step +// that runs whenever the talk does: one whose skip_if is part of the +// talk's. +UnitTestResult test_no_talk_ends_checkpoint(){ + for (const StoryCheckpoint& checkpoint : story_checkpoints()){ + for (size_t i = 0; i < checkpoint.steps.size(); i++){ + const StoryStep& talk = checkpoint.steps[i]; + if (talk.kind != StoryStepKind::TALK){ + continue; + } + const bool followed = std::any_of(checkpoint.steps.begin() + i + 1, checkpoint.steps.end(), [&](const StoryStep& step){ + return std::ranges::all_of(step.skip_if, [&](const std::string& name){ + return std::ranges::find(talk.skip_if, name) != talk.skip_if.end(); + }); + }); + if (!followed){ + return std::format("{}: talk {} ends the checkpoint with its message open.", checkpoint.id, talk.name); + } + } + } + return true; +} // The intro's names: the player's keyboard first, then the rival's list, // where a preset is picked; a keyboard after the player's means the list // was missed. @@ -1569,6 +1593,10 @@ const AutoStoryTestCase AUTO_STORY_CASES[] = { .input = {.name = "step names are unique per checkpoint", .body = test_unique_names}, .expectation = {.description = "ensures step identifier uniqueness within checkpoints"}, }, + { + .input = {.name = "no talk ends a checkpoint", .body = test_no_talk_ends_checkpoint}, + .expectation = {.description = "a step that runs whenever the talk does follows each talk, so the save never opens into its message"}, + }, { .input = {.name = "every save has a place on the save card", .body = test_save_places}, .expectation = {.description = "validates save location identifiers on save card"}, diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-09.01.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-09.01.plan.json index 82544454f4..eab54564b0 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-09.01.plan.json +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-09.01.plan.json @@ -208,6 +208,12 @@ "id": "b3f_rare_candy", "kind": "talk", "why": "pick up the Rare Candy: two, with Route 9's" + }, + { + "id": "found_b3f_rare_candy", + "kind": "scene", + "declared_after": {"map": "RocketHideout_B3F", "tiles": [[12, 13]], "facing": "north"}, + "why": "\" found a RARE CANDY!\", then the pocket line; the ball is gone. The talk returns at the first message, so the save must not follow it" } ] }, diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.06.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.06.plan.json index 058d207f70..b3d8316e07 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.06.plan.json +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.06.plan.json @@ -127,6 +127,12 @@ "id": "poke_flute", "kind": "talk", "why": "Mr. Fuji gives the POKE FLUTE (FLAG_GOT_POKE_FLUTE), no YES/NO" + }, + { + "id": "poke_flute_obtained", + "kind": "scene", + "declared_after": {"map": "LavenderTown_VolunteerPokemonHouse", "tiles": [[3, 4]], "facing": "north"}, + "why": "Mr. Fuji's lines and the POKE FLUTE, to the overworld. The talk returns at his first message, so the save must not follow it" } ] }, diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.02.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.02.plan.json index f88f07c118..1b3bbe488d 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.02.plan.json +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.02.plan.json @@ -88,6 +88,12 @@ "flags_after": [ "card_key_held" ] + }, + { + "id": "found_card_key", + "kind": "scene", + "declared_after": {"map": "SilphCo_5F", "tiles": [[21, 21]], "facing": "east"}, + "why": "\" found a CARD KEY!\", then the pocket line; the ball is gone. The talk returns at the first message, so the save must not follow it" } ] }, diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.05b.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.05b.plan.json index 1180d7dcaa..8813891abb 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.05b.plan.json +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.05b.plan.json @@ -50,6 +50,15 @@ "master_ball_skipped" ], "why": "the president gives the MASTER BALL (SilphCo_11F_EventScript_President, FLAG_GOT_MASTER_BALL_FROM_SILPH); skipped by the program's option and in a SPEEDRUN (pokeguy skips it, 1:32:51)" + }, + { + "id": "master_ball_obtained", + "kind": "scene", + "skip_if": [ + "master_ball_skipped" + ], + "declared_after": {"map": "SilphCo_11F", "tiles": [[9, 10]], "facing": "north"}, + "why": "the president's thanks, the MASTER BALL and his last line, to the overworld (SilphCo_11F_EventScript_President); the talk returns at his first message, and the save's Start presses went into it (console B, 2026-11-15)" } ] },