From 1430fb01477ba7b81c4a4e97227e0bb8c077120b Mon Sep 17 00:00:00 2001 From: dayfine Date: Wed, 11 Nov 2026 00:14:10 -0800 Subject: [PATCH 1/6] FRLG AutoStory: 10.01-10.03, back to Lavender and the Pokemon Tower 10.01 walks back from Celadon to Lavender's Pokemon Center, 10.02 climbs the Pokemon Tower to the Marowak ghost on 6F, 10.03 beats 7F's Grunts and gets the POKE FLUTE from Mr. Fuji. The Tower's maps join the overworld maps, its trainers the story's, and the Marowak is the story's first scripted wild battle. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss --- .../Overworld/PokemonFRLG_OverworldMaps.cpp | 9 + .../PokemonFRLG_AutoStoryBattleData.cpp | 32 ++ .../PokemonFRLG_AutoStoryBattleData.h | 4 + .../PokemonFRLG_AutoStoryBattleData_Tests.cpp | 9 + .../PokemonFRLG_AutoStoryRunPlan_Tests.cpp | 8 +- .../AutoStory/StoryData/frlg-10.01.plan.json | 131 ++++++ .../AutoStory/StoryData/frlg-10.02.plan.json | 408 ++++++++++++++++++ .../AutoStory/StoryData/frlg-10.03.plan.json | 222 ++++++++++ 8 files changed, 819 insertions(+), 4 deletions(-) create mode 100644 SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.01.plan.json create mode 100644 SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json create mode 100644 SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.03.plan.json diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps.cpp index 4c9eeb3f6c..c0d2412296 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps.cpp @@ -99,6 +99,15 @@ const char* const MAP_NAMES[] = { "RocketHideout_B2F", "RocketHideout_B3F", "RocketHideout_B4F", + // Back in Lavender: the Pokemon Tower and Mr. Fuji's house. + "LavenderTown_VolunteerPokemonHouse", + "PokemonTower_1F", + "PokemonTower_2F", + "PokemonTower_3F", + "PokemonTower_4F", + "PokemonTower_5F", + "PokemonTower_6F", + "PokemonTower_7F", "CeruleanCave_1F", "CeruleanCave_2F", "CeruleanCave_B1F", diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.cpp index 4f1b034a19..329df5d146 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.cpp @@ -97,6 +97,29 @@ constexpr StoryTrainer STORY_TRAINERS[] = { {.map = "RocketHideout_B4F", .battle = "left_guard", .trainer = "TRAINER_TEAM_ROCKET_GRUNT_16"}, {.map = "RocketHideout_B4F", .battle = "right_guard", .trainer = "TRAINER_TEAM_ROCKET_GRUNT_17"}, {.map = "RocketHideout_B4F", .battle = "giovanni", .trainer = "TRAINER_BOSS_GIOVANNI"}, + // The Pokemon Tower (10.02, 10.03; pret PokemonTower_*F scripts.inc): + // the rival on 2F, the Channelers in the only ways up on 5F and 6F, + // and 7F's three Grunts. + {.map = "PokemonTower_2F", .battle = "rival_pokemon_tower", .trainer = "TRAINER_RIVAL_POKEMON_TOWER_BULBASAUR"}, + {.map = "PokemonTower_5F", .battle = "channeler_ruth", .trainer = "TRAINER_CHANNELER_RUTH"}, + {.map = "PokemonTower_5F", .battle = "channeler_tammy", .trainer = "TRAINER_CHANNELER_TAMMY"}, + {.map = "PokemonTower_6F", .battle = "channeler_jennifer", .trainer = "TRAINER_CHANNELER_JENNIFER"}, + {.map = "PokemonTower_6F", .battle = "channeler_emilia", .trainer = "TRAINER_CHANNELER_EMILIA"}, + {.map = "PokemonTower_7F", .battle = "tower_grunt1", .trainer = "TRAINER_TEAM_ROCKET_GRUNT_19"}, + {.map = "PokemonTower_7F", .battle = "tower_grunt2", .trainer = "TRAINER_TEAM_ROCKET_GRUNT_20"}, + {.map = "PokemonTower_7F", .battle = "tower_grunt3", .trainer = "TRAINER_TEAM_ROCKET_GRUNT_21"}, +}; + +// The story's scripted wild battles, which no trainer fights: the battle +// step's map and name, and the species (pret setwildbattle). +struct StoryWildBattle{ + std::string_view map; + std::string_view battle; + std::string_view species; +}; +constexpr StoryWildBattle STORY_WILD_BATTLES[] = { + // PokemonTower_6F_EventScript_MarowakGhost: the Silph Scope shows it. + {.map = "PokemonTower_6F", .battle = "marowak_ghost", .species = "marowak"}, }; using JsonTable = std::map>; @@ -338,6 +361,15 @@ std::optional story_trainer(std::string_view map, std::string_ return std::nullopt; } +std::optional story_wild_battle(std::string_view map, std::string_view battle){ + for (const StoryWildBattle& entry : STORY_WILD_BATTLES){ + if (entry.map == map && entry.battle == battle){ + return entry.species; + } + } + return std::nullopt; +} + const char* battle_risk_name(BattleRisk risk){ return risk == BattleRisk::HIGH ? "high" : "low"; } diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.h b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.h index cf7ddb06d1..41e5bf3d87 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.h +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.h @@ -145,6 +145,10 @@ std::vector map_trainers(std::string_view map); // it leaves the player on). None for a battle the table doesn't name. std::optional story_trainer(std::string_view map, std::string_view battle); +// The species of the story's scripted wild battle step `battle` on `map` +// (the Pokemon Tower's Marowak). None for a trainer's battle. +std::optional story_wild_battle(std::string_view map, std::string_view battle); + // How carefully a battle step is fought. enum class BattleRisk{ // The move with the best expected damage against the foe out. diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData_Tests.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData_Tests.cpp index 37ebca198a..f2792d3cfe 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData_Tests.cpp @@ -119,6 +119,12 @@ UnitTestResult test_story_trainers(){ battles++; const std::string map = step.pose_after ? step.pose_after->map : ""; const std::optional trainer = story_trainer(map, step.name); + if (!trainer && story_wild_battle(map, step.name)){ + if (!species_data(*story_wild_battle(map, step.name))){ + return std::format("{}, {} on {}: no such species.", checkpoint.id, step.name, map); + } + continue; + } if (!trainer){ return std::format("{}, {} on {}: no trainer.", checkpoint.id, step.name, map); } @@ -137,6 +143,9 @@ UnitTestResult test_story_trainers(){ if (trainer_party(*story_trainer("CeruleanCity_Gym", "misty")) != std::vector{"staryu", "starmie"}){ return "Expected Misty's Staryu and Starmie."; } + if (story_wild_battle("PokemonTower_6F", "marowak_ghost") != "marowak" || story_trainer("PokemonTower_6F", "marowak_ghost")){ + return "Expected the Tower's Marowak as a wild battle, no trainer's."; + } return true; } 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 25569d12cd..495c382c24 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRunPlan_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRunPlan_Tests.cpp @@ -138,7 +138,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"; +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 10.01 10.02 10.03"; const RunPlanScenario RUN_PLAN_CASES[] = { { @@ -229,11 +229,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"}, + .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 10.01 10.02 10.03"}, }, { .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"}, + .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 10.01 10.02 10.03"}, }, { .input = { .name = "Gift RNG: started at 04.03, from the save beside the salesman", @@ -258,7 +258,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"}, + .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 10.01 10.02 10.03"}, }, { .input = { .name = "Starter RNG first, with both on", diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.01.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.01.plan.json new file mode 100644 index 0000000000..6764abe976 --- /dev/null +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.01.plan.json @@ -0,0 +1,131 @@ +{ + "format": "pokesim-authored-checkpoint/1", + "game": "frlg", + "checkpoint": { + "id": "10.01", + "title": "Back east from Celadon: Route 7, the Underground Path and Route 8 to Lavender Town's Pokemon Center", + "notes": [ + "Bulbapedia's FireRed/LeafGreen walkthrough part 10 (Pokemon Tower). PokeGuy flies to Lavender with HM02 (1:03:59); the story has no Fly yet, so it walks back the way 08.03 came. Route 8's tiles and trainers: pret data/maps/Route8/map.json." + ], + "start": { + "certainty": "tile", + "map": "CeladonCity", + "where": { + "facing": "south", + "kind": "tiles", + "tiles": [ + [ + 34, + 22 + ] + ] + } + }, + "events": [ + { + "id": "underground_route8_exit", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "Route8", + "where": { + "facing": "south", + "kind": "tiles", + "tiles": [ + [ + 13, + 5 + ] + ] + } + }, + "why": "east over Celadon onto Route 7, in at the Underground Path's west door, through the east-west tunnel and out of the east entrance onto Route 8, a step below its door (13, 4)" + }, + { + "id": "route8_row14", + "kind": "legs", + "variant": "run", + "legs": [ + { + "direction": "east", + "tiles": 1 + }, + { + "direction": "south", + "tiles": 9 + }, + { + "direction": "east", + "tiles": 12 + } + ], + "why": "east to (14, 5), down column 14 east of Aidan's line (10..13, 6) to (14, 14), a tile above Ricardo's sight (14, 15), and east along row 14 above Jaren (24, 17) to (26, 14)" + }, + { + "id": "route8_row7", + "kind": "legs", + "variant": "run", + "legs": [ + { + "direction": "north", + "tiles": 7 + }, + { + "direction": "east", + "tiles": 22 + } + ], + "why": "up column 26 to (26, 7), a row below Andrea's line (26..28, 5), and east along row 7 below Megan's (30..35, 6) to (48, 7), west of Glenn's south line (51, 7..10)" + }, + { + "id": "route8_row18", + "kind": "legs", + "variant": "run", + "legs": [ + { + "direction": "south", + "tiles": 11 + }, + { + "direction": "east", + "tiles": 19 + }, + { + "direction": "north", + "tiles": 8 + } + ], + "why": "down column 48 to the wall (48, 19), east along row 18 past Rich (beaten in 08.03) to the wall (68, 18), and up column 67 to row 10, the way onto Lavender Town (rows 9..11)" + }, + { + "id": "lavender_nurse", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "LavenderTown_PokemonCenter_1F", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 7, + 4 + ] + ] + } + }, + "why": "east over the connection into Lavender Town and in at the Center's door (6, 5), to the nurse" + }, + { + "id": "heal_lavender", + "kind": "heal", + "why": "full HP before the Pokemon Tower" + } + ] + }, + "execution": { + "menu": "full" + } +} diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json new file mode 100644 index 0000000000..a13d749a5e --- /dev/null +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json @@ -0,0 +1,408 @@ +{ + "format": "pokesim-authored-checkpoint/1", + "game": "frlg", + "checkpoint": { + "id": "10.02", + "title": "Pokemon Tower to 6F: the rival on 2F, a Super Repel, Ruth and Tammy on 5F, Jennifer and Emilia on 6F, the Rare Candy and the Marowak ghost", + "notes": [ + "Pokemon Tower: pret data/maps/PokemonTower_*/map.json and scripts.inc. The way up avoids every Channeler a route can go round; 5F's Ruth and Tammy and 6F's Jennifer and Emilia stand in the only ways on (pokeguy fights Tammy, Jennifer and Emilia)." + ], + "start": { + "certainty": "tile", + "map": "LavenderTown_PokemonCenter_1F", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 7, + 4 + ] + ] + } + }, + "events": [ + { + "id": "tower_rival_corner", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_2F", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 18, + 6 + ] + ] + } + }, + "why": "out of the Center, east over Lavender to the Tower's door (18, 6), up 1F to its stairs (18, 9) and up 2F's column 18 to (18, 6), below the rival's trigger (17, 5)" + }, + { + "id": "tower_rival_trigger", + "kind": "legs", + "variant": "run", + "legs": [ + { + "direction": "north", + "tiles": 1 + }, + { + "direction": "west", + "tiles": 1 + } + ], + "why": "up to (18, 5) and west onto the trigger (17, 5) (PokemonTower_2F_EventScript_RivalTriggerRight): the rival (16, 5) turns to the player" + }, + { + "id": "rival_pokemon_tower", + "kind": "battle", + "declared_after": { + "certainty": "tile", + "map": "PokemonTower_2F", + "where": { + "facing": "west", + "kind": "tiles", + "tiles": [ + [ + 17, + 5 + ] + ] + } + }, + "why": "the rival (TRAINER_RIVAL_POKEMON_TOWER_BULBASAUR): Pidgeotto, Gyarados, Growlithe, Kadabra and Ivysaur; he leaves by the stairs" + }, + { + "id": "tower_3f", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_3F", + "where": { + "facing": "south", + "kind": "tiles", + "tiles": [ + [ + 4, + 11 + ] + ] + } + }, + "why": "round the graves to 2F's stairs (4, 10), onto 3F, a step down" + }, + { + "id": "super_repel_tower", + "kind": "game_action", + "variant": "use_item", + "args": { + "item": "super-repel" + }, + "why": "3F up are full of ghosts (pokeguy uses a Super Repel at 1:03:50)" + }, + { + "id": "tower_3f_stairs", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_4F", + "where": { + "facing": "south", + "kind": "tiles", + "tiles": [ + [ + 18, + 11 + ] + ] + } + }, + "why": "down column 4, east along row 14 to column 7, up it to row 7 and east along row 7 above Carly's line (9, 10..12), down column 18 to the stairs (18, 10), onto 4F a step down" + }, + { + "id": "tower_4f_stairs", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_5F", + "where": { + "facing": "south", + "kind": "tiles", + "tiles": [ + [ + 4, + 11 + ] + ] + } + }, + "why": "west of Laurel's line (17, 8..10) up column 16, along row 6 to column 11, round by row 3 and down column 9 to row 9, west to 4F's stairs (4, 10), onto 5F a step down" + }, + { + "id": "west_of_ruth_line", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_5F", + "where": { + "facing": "east", + "kind": "tiles", + "tiles": [ + [ + 10, + 6 + ] + ] + } + }, + "why": "up column 4 to row 6 and east along it to (10, 6), a tile west of Ruth's south line (11, 5..6)" + }, + { + "id": "ruth_sight", + "kind": "step", + "variant": "trainer_wait", + "direction": "east", + "why": "onto (11, 6), two below Ruth (11, 4), who looks around: when she looks south she walks down to (11, 5)" + }, + { + "id": "channeler_ruth", + "kind": "battle", + "declared_after": { + "certainty": "tile", + "map": "PokemonTower_5F", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 11, + 6 + ] + ] + } + }, + "why": "Channeler Ruth (TRAINER_CHANNELER_RUTH): Gastly" + }, + { + "id": "above_tammy_line", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_5F", + "where": { + "facing": "south", + "kind": "tiles", + "tiles": [ + [ + 18, + 6 + ] + ] + } + }, + "why": "east along row 6 to (18, 6), above Tammy's line (16..18, 7)" + }, + { + "id": "tammy_line", + "kind": "step", + "variant": "trainer_line", + "direction": "south", + "why": "onto (18, 7), beside Tammy (19, 7): she sees the player there" + }, + { + "id": "channeler_tammy", + "kind": "battle", + "declared_after": { + "certainty": "tile", + "map": "PokemonTower_5F", + "where": { + "facing": "east", + "kind": "tiles", + "tiles": [ + [ + 18, + 7 + ] + ] + } + }, + "why": "Channeler Tammy (TRAINER_CHANNELER_TAMMY): Haunter (pokeguy 1:06:36)" + }, + { + "id": "below_jennifer_line", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_6F", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 16, + 8 + ] + ] + } + }, + "why": "down column 18 to the stairs (18, 10), onto 6F, and up to (16, 8), two below Jennifer's line (15..17, 6)" + }, + { + "id": "jennifer_line", + "kind": "step", + "variant": "trainer_line", + "direction": "north", + "why": "a tile at a time onto (16, 6): Jennifer (18, 6) walks to (17, 6)" + }, + { + "id": "channeler_jennifer", + "kind": "battle", + "declared_after": { + "certainty": "tile", + "map": "PokemonTower_6F", + "where": { + "facing": "east", + "kind": "tiles", + "tiles": [ + [ + 16, + 6 + ] + ] + } + }, + "why": "Channeler Jennifer (TRAINER_CHANNELER_JENNIFER): Gastly (pokeguy 1:07:00)" + }, + { + "id": "east_of_emilia_line", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_6F", + "where": { + "facing": "west", + "kind": "tiles", + "tiles": [ + [ + 11, + 8 + ] + ] + } + }, + "why": "up column 16 to row 4, west along it to column 12, down to (12, 8) and west to (11, 8), two east of Emilia's line (9, 7..9)" + }, + { + "id": "emilia_line", + "kind": "step", + "variant": "trainer_line", + "direction": "west", + "why": "a tile at a time onto (9, 8): Emilia (9, 6) walks down to (9, 7)" + }, + { + "id": "channeler_emilia", + "kind": "battle", + "declared_after": { + "certainty": "tile", + "map": "PokemonTower_6F", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 9, + 8 + ] + ] + } + }, + "why": "Channeler Emilia (TRAINER_CHANNELER_EMILIA): Gastly (pokeguy 1:07:28)" + }, + { + "id": "above_rare_candy", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_6F", + "where": { + "facing": "south", + "kind": "tiles", + "tiles": [ + [ + 5, + 14 + ] + ] + } + }, + "why": "west along row 8 to column 6, down it to row 12, round to (5, 14), above the Rare Candy (5, 15)" + }, + { + "id": "rare_candy", + "kind": "talk", + "why": "pick up the RARE CANDY (pokeguy 1:07:53)" + }, + { + "id": "above_marowak_trigger", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_6F", + "where": { + "facing": "south", + "kind": "tiles", + "tiles": [ + [ + 11, + 14 + ] + ] + } + }, + "why": "east along row 12 to column 11 and down to (11, 14), above the Marowak trigger (11, 15)" + }, + { + "id": "marowak_trigger", + "kind": "step", + "direction": "south", + "why": "onto (11, 15) (PokemonTower_6F_EventScript_MarowakGhost): \"Be gone... Intruders...\"" + }, + { + "id": "marowak_ghost", + "kind": "battle", + "declared_after": { + "certainty": "tile", + "map": "PokemonTower_6F", + "where": { + "facing": "south", + "kind": "tiles", + "tiles": [ + [ + 11, + 15 + ] + ] + } + }, + "why": "the Silph Scope shows the ghost: MAROWAK Lv30 (setwildbattle SPECIES_MAROWAK, 30), which has to be beaten (fleeing walks the player back up); then Cubone's mother's spirit is calmed" + } + ] + }, + "execution": { + "menu": "full" + } +} diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.03.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.03.plan.json new file mode 100644 index 0000000000..d22e6c9545 --- /dev/null +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.03.plan.json @@ -0,0 +1,222 @@ +{ + "format": "pokesim-authored-checkpoint/1", + "game": "frlg", + "checkpoint": { + "id": "10.03", + "title": "Pokemon Tower 7F: the three Grunts, Mr. Fuji, the POKE FLUTE in his house, back to Lavender's Pokemon Center", + "notes": [ + "7F's three Grunts stand on the only way up (column 9..13); each sees four tiles (pret PokemonTower_7F map.json) and leaves after the battle. Mr. Fuji's talk warps the player to his house, where a second talk gives the POKE FLUTE." + ], + "start": { + "certainty": "tile", + "map": "PokemonTower_6F", + "where": { + "facing": "south", + "kind": "tiles", + "tiles": [ + [ + 11, + 15 + ] + ] + } + }, + "events": [ + { + "id": "below_grunt1_line", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_7F", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 11, + 12 + ] + ] + } + }, + "why": "down onto the stairs (11, 16), onto 7F, and up column 11 to (11, 12), two below Grunt 1's line (10..13, 10)" + }, + { + "id": "grunt1_line", + "kind": "step", + "variant": "trainer_line", + "direction": "north", + "why": "a tile at a time onto (11, 10): Grunt 1 (9, 10) walks to (10, 10)" + }, + { + "id": "tower_grunt1", + "kind": "battle", + "declared_after": { + "certainty": "tile", + "map": "PokemonTower_7F", + "where": { + "facing": "west", + "kind": "tiles", + "tiles": [ + [ + 11, + 10 + ] + ] + } + }, + "why": "Rocket Grunt (TRAINER_TEAM_ROCKET_GRUNT_19): Zubat, Zubat, Golbat (pokeguy 1:08:32)" + }, + { + "id": "grunt2_line", + "kind": "step", + "variant": "trainer_line", + "direction": "north", + "why": "a tile at a time onto (11, 8): Grunt 2 (13, 8) walks to (12, 8)" + }, + { + "id": "tower_grunt2", + "kind": "battle", + "declared_after": { + "certainty": "tile", + "map": "PokemonTower_7F", + "where": { + "facing": "east", + "kind": "tiles", + "tiles": [ + [ + 11, + 8 + ] + ] + } + }, + "why": "Rocket Grunt (TRAINER_TEAM_ROCKET_GRUNT_20): Koffing, Drowzee (pokeguy 1:09:20)" + }, + { + "id": "grunt3_line", + "kind": "step", + "variant": "trainer_line", + "direction": "north", + "why": "a tile at a time onto (11, 6): Grunt 3 (9, 6) walks to (10, 6)" + }, + { + "id": "tower_grunt3", + "kind": "battle", + "declared_after": { + "certainty": "tile", + "map": "PokemonTower_7F", + "where": { + "facing": "west", + "kind": "tiles", + "tiles": [ + [ + 11, + 6 + ] + ] + } + }, + "why": "Rocket Grunt (TRAINER_TEAM_ROCKET_GRUNT_21): Zubat, Zubat, Rattata, Raticate (pokeguy 1:10:12)" + }, + { + "id": "below_fuji", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_7F", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 11, + 5 + ] + ] + } + }, + "why": "a tile up, below Mr. Fuji (11, 4)" + }, + { + "id": "mr_fuji", + "kind": "talk", + "why": "\"Follow me\": the game warps the player into his house" + }, + { + "id": "fuji_house", + "kind": "scene", + "declared_after": { + "certainty": "tile", + "map": "LavenderTown_VolunteerPokemonHouse", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 4, + 7 + ] + ] + } + }, + "why": "warp MAP_LAVENDER_TOWN_VOLUNTEER_POKEMON_HOUSE, 4, 7 (PokemonTower_7F_EventScript_MrFuji); the facing on arrival is not yet seen on a console" + }, + { + "id": "beside_fuji", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "LavenderTown_VolunteerPokemonHouse", + "where": { + "facing": "west", + "kind": "tiles", + "tiles": [ + [ + 4, + 3 + ] + ] + } + }, + "why": "up column 4 to (4, 3), east of Mr. Fuji (3, 3); the Youngster (3, 5) stands below him" + }, + { + "id": "poke_flute", + "kind": "talk", + "why": "\"I'd like you to have this\": the POKE FLUTE (pokeguy 1:11:04, a second talk after the warp)" + }, + { + "id": "lavender_nurse", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "LavenderTown_PokemonCenter_1F", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 7, + 4 + ] + ] + } + }, + "why": "out of the house's door (4, 7), over Lavender to the Center's door (6, 5), to the nurse" + }, + { + "id": "heal_lavender", + "kind": "heal", + "why": "full HP" + } + ] + }, + "execution": { + "menu": "full" + } +} From f0e7eebb3bd33b2b26e5026694d10065294d757b Mon Sep 17 00:00:00 2001 From: dayfine Date: Wed, 11 Nov 2026 00:36:46 -0800 Subject: [PATCH 2/6] FRLG AutoStory: one Tower checkpoint to Mr. Fuji's house; 3F round Patricia Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss --- .../PokemonFRLG_AutoStoryRunPlan_Tests.cpp | 8 +- .../AutoStory/StoryData/frlg-10.02.plan.json | 194 ++++++++++++++- .../AutoStory/StoryData/frlg-10.03.plan.json | 222 ------------------ 3 files changed, 195 insertions(+), 229 deletions(-) delete mode 100644 SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.03.plan.json 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 495c382c24..6442176daa 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRunPlan_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRunPlan_Tests.cpp @@ -138,7 +138,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 10.01 10.02 10.03"; +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 10.01 10.02"; const RunPlanScenario RUN_PLAN_CASES[] = { { @@ -229,11 +229,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 10.01 10.02 10.03"}, + .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 10.01 10.02"}, }, { .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 10.01 10.02 10.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 10.01 10.02"}, }, { .input = { .name = "Gift RNG: started at 04.03, from the save beside the salesman", @@ -258,7 +258,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 10.01 10.02 10.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 10.01 10.02"}, }, { .input = { .name = "Starter RNG first, with both on", diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json index a13d749a5e..3c37f9927e 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json @@ -3,9 +3,10 @@ "game": "frlg", "checkpoint": { "id": "10.02", - "title": "Pokemon Tower to 6F: the rival on 2F, a Super Repel, Ruth and Tammy on 5F, Jennifer and Emilia on 6F, the Rare Candy and the Marowak ghost", + "title": "The Pokemon Tower: the rival on 2F, a Super Repel, Ruth and Tammy on 5F, Jennifer and Emilia on 6F, the Rare Candy, the Marowak ghost, 7F's three Grunts and Mr. Fuji, the POKE FLUTE in his house", "notes": [ - "Pokemon Tower: pret data/maps/PokemonTower_*/map.json and scripts.inc. The way up avoids every Channeler a route can go round; 5F's Ruth and Tammy and 6F's Jennifer and Emilia stand in the only ways on (pokeguy fights Tammy, Jennifer and Emilia)." + "Pokemon Tower: pret data/maps/PokemonTower_*/map.json and scripts.inc. The way up avoids every Channeler a route can go round; 5F's Ruth and Tammy and 6F's Jennifer and Emilia stand in the only ways on (pokeguy fights Tammy, Jennifer and Emilia).", + "7F's three Grunts stand on the only way up (columns 9..13); each sees four tiles and leaves after the battle. Mr. Fuji's talk warps the player to his house, where a second talk gives the POKE FLUTE. The checkpoint ends there: the house's exit mats are three wide and the warp's arrival tile is not yet seen on a console." ], "start": { "certainty": "tile", @@ -106,6 +107,26 @@ }, "why": "3F up are full of ghosts (pokeguy uses a Super Repel at 1:03:50)" }, + { + "id": "tower_3f_row7", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_3F", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 7, + 7 + ] + ] + } + }, + "why": "down column 4, east along row 14 to column 7, west of Patricia's line (10, 15..16), and up column 7 to row 7" + }, { "id": "tower_3f_stairs", "kind": "route", @@ -124,7 +145,7 @@ ] } }, - "why": "down column 4, east along row 14 to column 7, up it to row 7 and east along row 7 above Carly's line (9, 10..12), down column 18 to the stairs (18, 10), onto 4F a step down" + "why": "east along row 7 above Carly's line (9, 10..12), down column 18 to the stairs (18, 10), onto 4F a step down" }, { "id": "tower_4f_stairs", @@ -399,6 +420,173 @@ } }, "why": "the Silph Scope shows the ghost: MAROWAK Lv30 (setwildbattle SPECIES_MAROWAK, 30), which has to be beaten (fleeing walks the player back up); then Cubone's mother's spirit is calmed" + }, + { + "id": "below_grunt1_line", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_7F", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 11, + 12 + ] + ] + } + }, + "why": "down onto the stairs (11, 16), onto 7F, and up column 11 to (11, 12), two below Grunt 1's line (10..13, 10)" + }, + { + "id": "grunt1_line", + "kind": "step", + "variant": "trainer_line", + "direction": "north", + "why": "a tile at a time onto (11, 10): Grunt 1 (9, 10) walks to (10, 10)" + }, + { + "id": "tower_grunt1", + "kind": "battle", + "declared_after": { + "certainty": "tile", + "map": "PokemonTower_7F", + "where": { + "facing": "west", + "kind": "tiles", + "tiles": [ + [ + 11, + 10 + ] + ] + } + }, + "why": "Rocket Grunt (TRAINER_TEAM_ROCKET_GRUNT_19): Zubat, Zubat, Golbat (pokeguy 1:08:32)" + }, + { + "id": "grunt2_line", + "kind": "step", + "variant": "trainer_line", + "direction": "north", + "why": "a tile at a time onto (11, 8): Grunt 2 (13, 8) walks to (12, 8)" + }, + { + "id": "tower_grunt2", + "kind": "battle", + "declared_after": { + "certainty": "tile", + "map": "PokemonTower_7F", + "where": { + "facing": "east", + "kind": "tiles", + "tiles": [ + [ + 11, + 8 + ] + ] + } + }, + "why": "Rocket Grunt (TRAINER_TEAM_ROCKET_GRUNT_20): Koffing, Drowzee (pokeguy 1:09:20)" + }, + { + "id": "grunt3_line", + "kind": "step", + "variant": "trainer_line", + "direction": "north", + "why": "a tile at a time onto (11, 6): Grunt 3 (9, 6) walks to (10, 6)" + }, + { + "id": "tower_grunt3", + "kind": "battle", + "declared_after": { + "certainty": "tile", + "map": "PokemonTower_7F", + "where": { + "facing": "west", + "kind": "tiles", + "tiles": [ + [ + 11, + 6 + ] + ] + } + }, + "why": "Rocket Grunt (TRAINER_TEAM_ROCKET_GRUNT_21): Zubat, Zubat, Rattata, Raticate (pokeguy 1:10:12)" + }, + { + "id": "below_fuji", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "PokemonTower_7F", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 11, + 5 + ] + ] + } + }, + "why": "a tile up, below Mr. Fuji (11, 4)" + }, + { + "id": "mr_fuji", + "kind": "talk", + "why": "\"Follow me\": the game warps the player into his house" + }, + { + "id": "fuji_house", + "kind": "scene", + "declared_after": { + "certainty": "tile", + "map": "LavenderTown_VolunteerPokemonHouse", + "where": { + "facing": "north", + "kind": "tiles", + "tiles": [ + [ + 4, + 7 + ] + ] + } + }, + "why": "warp MAP_LAVENDER_TOWN_VOLUNTEER_POKEMON_HOUSE, 4, 7 (PokemonTower_7F_EventScript_MrFuji); the facing on arrival is not yet seen on a console" + }, + { + "id": "beside_fuji", + "kind": "route", + "variant": "run", + "target": { + "certainty": "tile", + "map": "LavenderTown_VolunteerPokemonHouse", + "where": { + "facing": "west", + "kind": "tiles", + "tiles": [ + [ + 4, + 3 + ] + ] + } + }, + "why": "up column 4 to (4, 3), east of Mr. Fuji (3, 3); the Youngster (3, 5) stands below him" + }, + { + "id": "poke_flute", + "kind": "talk", + "why": "\"I'd like you to have this\": the POKE FLUTE (pokeguy 1:11:04, a second talk after the warp)" } ] }, diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.03.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.03.plan.json deleted file mode 100644 index d22e6c9545..0000000000 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.03.plan.json +++ /dev/null @@ -1,222 +0,0 @@ -{ - "format": "pokesim-authored-checkpoint/1", - "game": "frlg", - "checkpoint": { - "id": "10.03", - "title": "Pokemon Tower 7F: the three Grunts, Mr. Fuji, the POKE FLUTE in his house, back to Lavender's Pokemon Center", - "notes": [ - "7F's three Grunts stand on the only way up (column 9..13); each sees four tiles (pret PokemonTower_7F map.json) and leaves after the battle. Mr. Fuji's talk warps the player to his house, where a second talk gives the POKE FLUTE." - ], - "start": { - "certainty": "tile", - "map": "PokemonTower_6F", - "where": { - "facing": "south", - "kind": "tiles", - "tiles": [ - [ - 11, - 15 - ] - ] - } - }, - "events": [ - { - "id": "below_grunt1_line", - "kind": "route", - "variant": "run", - "target": { - "certainty": "tile", - "map": "PokemonTower_7F", - "where": { - "facing": "north", - "kind": "tiles", - "tiles": [ - [ - 11, - 12 - ] - ] - } - }, - "why": "down onto the stairs (11, 16), onto 7F, and up column 11 to (11, 12), two below Grunt 1's line (10..13, 10)" - }, - { - "id": "grunt1_line", - "kind": "step", - "variant": "trainer_line", - "direction": "north", - "why": "a tile at a time onto (11, 10): Grunt 1 (9, 10) walks to (10, 10)" - }, - { - "id": "tower_grunt1", - "kind": "battle", - "declared_after": { - "certainty": "tile", - "map": "PokemonTower_7F", - "where": { - "facing": "west", - "kind": "tiles", - "tiles": [ - [ - 11, - 10 - ] - ] - } - }, - "why": "Rocket Grunt (TRAINER_TEAM_ROCKET_GRUNT_19): Zubat, Zubat, Golbat (pokeguy 1:08:32)" - }, - { - "id": "grunt2_line", - "kind": "step", - "variant": "trainer_line", - "direction": "north", - "why": "a tile at a time onto (11, 8): Grunt 2 (13, 8) walks to (12, 8)" - }, - { - "id": "tower_grunt2", - "kind": "battle", - "declared_after": { - "certainty": "tile", - "map": "PokemonTower_7F", - "where": { - "facing": "east", - "kind": "tiles", - "tiles": [ - [ - 11, - 8 - ] - ] - } - }, - "why": "Rocket Grunt (TRAINER_TEAM_ROCKET_GRUNT_20): Koffing, Drowzee (pokeguy 1:09:20)" - }, - { - "id": "grunt3_line", - "kind": "step", - "variant": "trainer_line", - "direction": "north", - "why": "a tile at a time onto (11, 6): Grunt 3 (9, 6) walks to (10, 6)" - }, - { - "id": "tower_grunt3", - "kind": "battle", - "declared_after": { - "certainty": "tile", - "map": "PokemonTower_7F", - "where": { - "facing": "west", - "kind": "tiles", - "tiles": [ - [ - 11, - 6 - ] - ] - } - }, - "why": "Rocket Grunt (TRAINER_TEAM_ROCKET_GRUNT_21): Zubat, Zubat, Rattata, Raticate (pokeguy 1:10:12)" - }, - { - "id": "below_fuji", - "kind": "route", - "variant": "run", - "target": { - "certainty": "tile", - "map": "PokemonTower_7F", - "where": { - "facing": "north", - "kind": "tiles", - "tiles": [ - [ - 11, - 5 - ] - ] - } - }, - "why": "a tile up, below Mr. Fuji (11, 4)" - }, - { - "id": "mr_fuji", - "kind": "talk", - "why": "\"Follow me\": the game warps the player into his house" - }, - { - "id": "fuji_house", - "kind": "scene", - "declared_after": { - "certainty": "tile", - "map": "LavenderTown_VolunteerPokemonHouse", - "where": { - "facing": "north", - "kind": "tiles", - "tiles": [ - [ - 4, - 7 - ] - ] - } - }, - "why": "warp MAP_LAVENDER_TOWN_VOLUNTEER_POKEMON_HOUSE, 4, 7 (PokemonTower_7F_EventScript_MrFuji); the facing on arrival is not yet seen on a console" - }, - { - "id": "beside_fuji", - "kind": "route", - "variant": "run", - "target": { - "certainty": "tile", - "map": "LavenderTown_VolunteerPokemonHouse", - "where": { - "facing": "west", - "kind": "tiles", - "tiles": [ - [ - 4, - 3 - ] - ] - } - }, - "why": "up column 4 to (4, 3), east of Mr. Fuji (3, 3); the Youngster (3, 5) stands below him" - }, - { - "id": "poke_flute", - "kind": "talk", - "why": "\"I'd like you to have this\": the POKE FLUTE (pokeguy 1:11:04, a second talk after the warp)" - }, - { - "id": "lavender_nurse", - "kind": "route", - "variant": "run", - "target": { - "certainty": "tile", - "map": "LavenderTown_PokemonCenter_1F", - "where": { - "facing": "north", - "kind": "tiles", - "tiles": [ - [ - 7, - 4 - ] - ] - } - }, - "why": "out of the house's door (4, 7), over Lavender to the Center's door (6, 5), to the nurse" - }, - { - "id": "heal_lavender", - "kind": "heal", - "why": "full HP" - } - ] - }, - "execution": { - "menu": "full" - } -} From d2e2b72ffcd9b00fd6fcab2c51bb9f75a86107bc Mon Sep 17 00:00:00 2001 From: dayfine Date: Wed, 11 Nov 2026 00:59:43 -0800 Subject: [PATCH 3/6] FRLG AutoStory 10.02: round Laurel on 4F, Mr. Fuji's house from any tile round the mats; 41 checkpoints Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss --- .../AutoStory/PokemonFRLG_AutoStory_Tests.cpp | 4 +- .../AutoStory/StoryData/frlg-10.02.plan.json | 40 ++++++++++++++++++- 2 files changed, 40 insertions(+), 4 deletions(-) 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 42afb44c46..7f109a82a1 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp @@ -231,8 +231,8 @@ UnitTestResult check_checkpoint(const StoryCheckpoint& checkpoint, StoryPose& po UnitTestResult test_routes_and_chain(){ const std::vector& checkpoints = story_checkpoints(); - if (checkpoints.size() != 39 || checkpoints[0].start){ - return "Expected 39 checkpoints, the first from a new game."; + if (checkpoints.size() != 41 || checkpoints[0].start){ + return "Expected 41 checkpoints, the first from a new game."; } StoryPose pose; for (size_t c = 0; c < checkpoints.size(); c++){ diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json index 3c37f9927e..e3b1f9919e 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json @@ -147,6 +147,18 @@ }, "why": "east along row 7 above Carly's line (9, 10..12), down column 18 to the stairs (18, 10), onto 4F a step down" }, + { + "id": "west_of_laurel_line", + "kind": "legs", + "variant": "run", + "legs": [ + { + "direction": "west", + "tiles": 2 + } + ], + "why": "west along row 11 to (16, 11), below and west of Laurel's line (17, 8..10)" + }, { "id": "tower_4f_stairs", "kind": "route", @@ -165,7 +177,7 @@ ] } }, - "why": "west of Laurel's line (17, 8..10) up column 16, along row 6 to column 11, round by row 3 and down column 9 to row 9, west to 4F's stairs (4, 10), onto 5F a step down" + "why": "up column 16, along row 6 to column 11, round by row 3 and down column 9 to row 9, west to 4F's stairs (4, 10), onto 5F a step down" }, { "id": "west_of_ruth_line", @@ -563,6 +575,30 @@ }, "why": "warp MAP_LAVENDER_TOWN_VOLUNTEER_POKEMON_HOUSE, 4, 7 (PokemonTower_7F_EventScript_MrFuji); the facing on arrival is not yet seen on a console" }, + { + "id": "house_east_side", + "kind": "legs", + "variant": "run", + "legs": [ + { + "direction": "east", + "tiles": 2 + }, + { + "direction": "north", + "tiles": 1 + }, + { + "direction": "east", + "tiles": 2 + }, + { + "direction": "north", + "tiles": 2 + } + ], + "why": "from the mat (4, 7): east to (6, 7), up to (6, 6), east to the Psyduck (9, 6) and up column 8 to the wall (8, 3); from any tile round the mats the walls and the Psyduck end it on (8, 4) too" + }, { "id": "beside_fuji", "kind": "route", @@ -581,7 +617,7 @@ ] } }, - "why": "up column 4 to (4, 3), east of Mr. Fuji (3, 3); the Youngster (3, 5) stands below him" + "why": "west along row 4, round the wall (5..6, 4) by row 3, to (4, 3), east of Mr. Fuji (3, 3)" }, { "id": "poke_flute", From f57a871a7194620ecb13b75a20b7efbc4fbb6ef4 Mon Sep 17 00:00:00 2001 From: dayfine Date: Wed, 11 Nov 2026 01:04:35 -0800 Subject: [PATCH 4/6] FRLG AutoStory 10.02: hold the house legs to their walls; 5F from its stairs Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss --- .../Programs/AutoStory/StoryData/frlg-10.02.plan.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json index e3b1f9919e..ef5680e64d 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json @@ -172,7 +172,7 @@ "tiles": [ [ 4, - 11 + 10 ] ] } @@ -590,14 +590,14 @@ }, { "direction": "east", - "tiles": 2 + "tiles": 5 }, { "direction": "north", - "tiles": 2 + "tiles": 3 } ], - "why": "from the mat (4, 7): east to (6, 7), up to (6, 6), east to the Psyduck (9, 6) and up column 8 to the wall (8, 3); from any tile round the mats the walls and the Psyduck end it on (8, 4) too" + "why": "from the mat (4, 7): east to (6, 7), up to (6, 6), east to the Psyduck (9, 6) and up column 8 to the wall (8, 3), each of the last two legs held long enough to end on (8, 4) from any tile round the mats" }, { "id": "beside_fuji", From 257cd1b6b342cd44da65f39d13ffb69ddbdaa311 Mon Sep 17 00:00:00 2001 From: dayfine Date: Wed, 11 Nov 2026 01:07:10 -0800 Subject: [PATCH 5/6] FRLG AutoStory 10.02: house legs as planned from the mat Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss --- .../Programs/AutoStory/StoryData/frlg-10.02.plan.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json index ef5680e64d..5d59c01bbc 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-10.02.plan.json @@ -590,14 +590,14 @@ }, { "direction": "east", - "tiles": 5 + "tiles": 2 }, { "direction": "north", - "tiles": 3 + "tiles": 2 } ], - "why": "from the mat (4, 7): east to (6, 7), up to (6, 6), east to the Psyduck (9, 6) and up column 8 to the wall (8, 3), each of the last two legs held long enough to end on (8, 4) from any tile round the mats" + "why": "from the mat (4, 7): east to (6, 7), up to (6, 6), east to the Psyduck (9, 6) and up column 8 to the wall (8, 3)" }, { "id": "beside_fuji", From f9358b42eab773db2be6b183d2b4ef9f021175e6 Mon Sep 17 00:00:00 2001 From: dayfine Date: Wed, 11 Nov 2026 01:08:21 -0800 Subject: [PATCH 6/6] FRLG AutoStory: the Tower's Marowak as a test-side wild battle; no new BattleData header symbol Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss --- .../PokemonFRLG_AutoStoryBattleData.cpp | 21 ----------------- .../PokemonFRLG_AutoStoryBattleData.h | 4 ---- .../PokemonFRLG_AutoStoryBattleData_Tests.cpp | 23 +++++++++++++++++++ 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.cpp index 329df5d146..2e4ed3179b 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.cpp @@ -110,18 +110,6 @@ constexpr StoryTrainer STORY_TRAINERS[] = { {.map = "PokemonTower_7F", .battle = "tower_grunt3", .trainer = "TRAINER_TEAM_ROCKET_GRUNT_21"}, }; -// The story's scripted wild battles, which no trainer fights: the battle -// step's map and name, and the species (pret setwildbattle). -struct StoryWildBattle{ - std::string_view map; - std::string_view battle; - std::string_view species; -}; -constexpr StoryWildBattle STORY_WILD_BATTLES[] = { - // PokemonTower_6F_EventScript_MarowakGhost: the Silph Scope shows it. - {.map = "PokemonTower_6F", .battle = "marowak_ghost", .species = "marowak"}, -}; - using JsonTable = std::map>; const JsonValue& file_json(std::string_view name){ @@ -361,15 +349,6 @@ std::optional story_trainer(std::string_view map, std::string_ return std::nullopt; } -std::optional story_wild_battle(std::string_view map, std::string_view battle){ - for (const StoryWildBattle& entry : STORY_WILD_BATTLES){ - if (entry.map == map && entry.battle == battle){ - return entry.species; - } - } - return std::nullopt; -} - const char* battle_risk_name(BattleRisk risk){ return risk == BattleRisk::HIGH ? "high" : "low"; } diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.h b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.h index 41e5bf3d87..cf7ddb06d1 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.h +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.h @@ -145,10 +145,6 @@ std::vector map_trainers(std::string_view map); // it leaves the player on). None for a battle the table doesn't name. std::optional story_trainer(std::string_view map, std::string_view battle); -// The species of the story's scripted wild battle step `battle` on `map` -// (the Pokemon Tower's Marowak). None for a trainer's battle. -std::optional story_wild_battle(std::string_view map, std::string_view battle); - // How carefully a battle step is fought. enum class BattleRisk{ // The move with the best expected damage against the foe out. diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData_Tests.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData_Tests.cpp index f2792d3cfe..412191e2a0 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData_Tests.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include "Common/Cpp/Exceptions.h" @@ -107,6 +108,28 @@ UnitTestResult test_data(){ return true; } +// The story's scripted wild battles, which no trainer fights: the battle +// step's map and name, and the species (pret setwildbattle). The battle +// step fights them as any battle with no trainer. +struct StoryWildBattle{ + std::string_view map; + std::string_view battle; + std::string_view species; +}; +constexpr StoryWildBattle STORY_WILD_BATTLES[] = { + // PokemonTower_6F_EventScript_MarowakGhost: the Silph Scope shows it. + {.map = "PokemonTower_6F", .battle = "marowak_ghost", .species = "marowak"}, +}; + +std::optional story_wild_battle(std::string_view map, std::string_view battle){ + for (const StoryWildBattle& entry : STORY_WILD_BATTLES){ + if (entry.map == map && entry.battle == battle){ + return entry.species; + } + } + return std::nullopt; +} + // Every battle step in the table fights a trainer its map battles in // pret's scripts, with a party. UnitTestResult test_story_trainers(){