diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Inference/Menus/PokemonFRLG_SaveCardReader.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Inference/Menus/PokemonFRLG_SaveCardReader.cpp index 851011bbdf..d2cfeece86 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Inference/Menus/PokemonFRLG_SaveCardReader.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Inference/Menus/PokemonFRLG_SaveCardReader.cpp @@ -85,6 +85,7 @@ class PlaceNameMatcher : public OCR::SmallDictionaryMatcher{ {"fuchsia-city", "Fuchsia City"}, {"saffron-city", "Saffron City"}, {"cinnabar-island", "Cinnabar Island"}, + {"silph-co", "Silph Co"}, }){ JsonArray names; names.push_back(std::string(name)); diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps.cpp index 792a16fa08..52ea13652d 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps.cpp @@ -150,6 +150,19 @@ constexpr std::string_view MAP_NAMES[] = { "CinnabarIsland", "Route21_North", "Route21_South", + // Silph Co.'s floors, 1F to 11F (the lift's map, SilphCo_Elevator, is + // not built in). + "SilphCo_1F", + "SilphCo_2F", + "SilphCo_3F", + "SilphCo_4F", + "SilphCo_5F", + "SilphCo_6F", + "SilphCo_7F", + "SilphCo_8F", + "SilphCo_9F", + "SilphCo_10F", + "SilphCo_11F", "CeruleanCave_1F", "CeruleanCave_2F", "CeruleanCave_B1F", diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Tests.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Tests.cpp index 3df4cc152d..f3486697a1 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Tests.cpp @@ -57,6 +57,7 @@ #include "Programs/AutoStory/PokemonFRLG_AutoStoryHealing.h" #include "Programs/AutoStory/PokemonFRLG_AutoStoryRows12_Tests.h" #include "Programs/AutoStory/PokemonFRLG_AutoStoryRows15_Tests.h" +#include "Programs/AutoStory/PokemonFRLG_AutoStoryRows16_Tests.h" #include "Programs/AutoStory/PokemonFRLG_AutoStoryTable.h" #include "Programs/AutoStory/PokemonFRLG_AutoStoryTrashCans.h" #include "Programs/AutoStory/Data/Json_Tests.h" @@ -112,6 +113,7 @@ static void add_tests_AutoStoryRows(UnitTestDatabase& database){ add_tests_AutoStoryHealing(database); add_tests_AutoStoryCeladonGym(database); add_tests_AutoStorySaffron(database); + add_tests_AutoStorySilph(database); } void add_tests(UnitTestDatabase& database){ diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.cpp index b30b0c7c2b..435c2fb451 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.cpp @@ -372,6 +372,7 @@ std::string save_card_place(const std::string& map){ {"FuchsiaCity", "fuchsia-city"}, {"SaffronCity", "saffron-city"}, {"CinnabarIsland", "cinnabar-island"}, + {"SilphCo", "silph-co"}, }; for (const auto& [prefix, place] : PLACES){ if (map == prefix || map.rfind(prefix + "_", 0) == 0){ diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden16.h b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden16.h new file mode 100644 index 0000000000..3381f705f2 --- /dev/null +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden16.h @@ -0,0 +1,40 @@ +/* FRLG AutoStory Plan Golden, Segment 16 + * + * From: https://github.com/PokemonAutomation/ + * + * The golden's lines from segment 16 on, after + * PokemonFRLG_AutoStoryPlanGolden15.h's. The test reads FRLG_PLAN_GOLDEN, + * FRLG_PLAN_GOLDEN_10, _11, _12 and _15, then these. + * + */ + +#ifndef PokemonAutomation_PokemonFRLG_AutoStoryPlanGolden16_H +#define PokemonAutomation_PokemonFRLG_AutoStoryPlanGolden16_H + +#include + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonFRLG{ + +// The stored plan lines from segment 16 on, after FRLG_PLAN_GOLDEN_15's. +inline constexpr std::string_view FRLG_PLAN_GOLDEN_16[] = { + "16.01 silph_3f_by_pad from SaffronCity_PokemonCenter_1F (7, 4) facing north to SilphCo_3F (5, 6) facing west", + "16.01 walk south 5 (warp) -> SaffronCity (24, 39) [walk only]", + "16.01 walk west 9 (to wall) -> SaffronCity (15, 39)", + "16.01 walk north 7 -> SaffronCity (15, 32)", + "16.01 walk east 18 -> SaffronCity (33, 32)", + "16.01 walk north 2 (warp) -> SilphCo_1F (8, 20)", + "16.01 walk north 15 (to wall) -> SilphCo_1F (8, 5)", + "16.01 walk east 23 -> SilphCo_1F (31, 5)", + "16.01 walk north 3 (to wall) -> SilphCo_1F (31, 2)", + "16.01 walk east 1 (warp) -> SilphCo_2F (30, 2)", + "16.01 walk west 3 (warp) -> SilphCo_3F (28, 2)", + "16.01 walk south 4 -> SilphCo_3F (28, 6)", + "16.01 walk west 23 -> SilphCo_3F (5, 6)", +}; + +} // namespace PokemonFRLG +} // namespace NintendoSwitch +} // namespace PokemonAutomation +#endif diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRows16_Tests.h b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRows16_Tests.h new file mode 100644 index 0000000000..c5a7d77654 --- /dev/null +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRows16_Tests.h @@ -0,0 +1,27 @@ +/* AutoStory Row Tests, Segment 16 + * + * From: https://github.com/PokemonAutomation/ + * + * Registration of the tests that run segment 16's rows on the overworld + * sim, beside PokemonFRLG_AutoStoryRows_Tests.h's earlier stretches. + * + */ + +#ifndef PokemonAutomation_PokemonFRLG_AutoStoryRows16_Tests_H +#define PokemonAutomation_PokemonFRLG_AutoStoryRows16_Tests_H + +#include "Common/Cpp/TestRunners/UnitTestDatabase.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonFRLG{ + + +// Row 16.01, Silph Co., on the overworld sim (PokemonFRLG_AutoStorySilph_Tests.cpp). +void add_tests_AutoStorySilph(UnitTestDatabase& database); + + +} // namespace PokemonFRLG +} // namespace NintendoSwitch +} // namespace PokemonAutomation +#endif 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 bcbe948153..0678a7f55f 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 14.03 14.04 14.04b 15.01"; +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 14.03 14.04 14.04b 15.01 16.01"; 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 14.03 14.04 14.04b 15.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 14.03 14.04 14.04b 15.01 16.01"}, }, { .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 14.03 14.04 14.04b 15.01"}, + .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 14.03 14.04 14.04b 15.01 16.01"}, }, { .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 14.03 14.04 14.04b 15.01"}, + .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 14.03 14.04 14.04b 15.01 16.01"}, }, { .input = { .name = "Starter RNG first, with both on", diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySilph_Tests.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySilph_Tests.cpp new file mode 100644 index 0000000000..d5ccb81d4d --- /dev/null +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySilph_Tests.cpp @@ -0,0 +1,124 @@ +/* AutoStory Silph Tests + * + * From: https://github.com/PokemonAutomation/ + * + * Row 16.01 (StoryData/frlg-16.01.plan.json) on the overworld sim: from + * Saffron's nurse into Silph Co., up to 3F and through its pad to 5F. + * + */ + +#include +#include +#include +#include +#include +#include +#include "Common/Cpp/Exceptions.h" +#include "Common/Cpp/TestRunners/UnitTest.h" +#include "Pokemon/AutoStory/Pokemon_BuiltinStoryActions.h" +#include "Pokemon/AutoStory/Pokemon_StoryStepExecutor.h" +#include "VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps.h" +#include "VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldSim.h" +#include "PokemonFRLG_AutoStoryEvents.h" +#include "PokemonFRLG_AutoStoryRooms.h" +#include "PokemonFRLG_AutoStoryRowSim.h" +#include "PokemonFRLG_AutoStoryRows_Tests.h" +#include "PokemonFRLG_AutoStoryRows16_Tests.h" +#include "PokemonFRLG_AutoStoryTable.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonFRLG{ + + +namespace{ + +struct AutoStorySilphInput{ + std::string name; + std::function body; +}; + +struct AutoStorySilphExpectation{ + std::string_view description; +}; + +struct AutoStorySilphCase{ + AutoStorySilphInput input; + AutoStorySilphExpectation expectation; +}; + +class Test_AutoStorySilph : public UnitTest{ +public: + explicit Test_AutoStorySilph(AutoStorySilphCase test_case) + : UnitTest(std::format("PokemonFRLG::AutoStory - Simulation: {}", test_case.input.name)) + , m_case(std::move(test_case)) + {} + virtual UnitTestResult run(Logger&, CancellableScope&) const override{ + try{ + return m_case.input.body(); + }catch (Exception& e){ + return std::format("{}: {}", e.name(), e.message()); + } + } + +private: + AutoStorySilphCase m_case; +}; + +const StoryCheckpoint& checkpoint(std::string_view id){ + for (const StoryCheckpoint& row : story_checkpoints()){ + if (row.id == id){ + return row; + } + } + throw InternalProgramError(nullptr, PA_CURRENT_FUNCTION, std::format("No checkpoint {}.", id)); +} + +// 16.01 on the sim from Saffron's nurse: Silph Co.'s stairs to 3F, west +// along the hall and onto the pad to 5F, where the player stands on the pad +// that leads back. No trainer is met and no rule is broken. +UnitTestResult test_pad_to_5f(){ + const StoryCheckpoint& row = checkpoint("16.01"); + StoryPose at = *story_pose(Pokemon::pose_of(*row.start)); + OverworldSim sim(story_maps(), MapPosition{at.map, at.tile}, *at.facing); + std::vector floors; + for (const StoryStep& step : row.steps){ + if (const std::string failure = row_step_on_sim(sim, at, step, row.id); !failure.empty()){ + return std::format("16.01: ended on {}; {}", to_string(sim.state().position), failure); + } + floors.push_back(sim.state().position.map); + } + const MapPosition pad{"SilphCo_5F", {15, 7}}; + if (!(sim.state().position == pad)){ + return std::format("16.01: ended on {}, not on 5F's pad {}.", to_string(sim.state().position), to_string(pad)); + } + if (floors != std::vector{"SilphCo_3F", "SilphCo_5F"}){ + return "16.01: the steps ended on the wrong floors."; + } + if (!sim.state().trainers_beaten.empty() || !sim.state().violations.empty()){ + return "16.01: met a trainer or broke a rule on the way."; + } + return true; +} + +const AutoStorySilphCase AUTO_STORY_SILPH_CASES[] = { + { + .input = {.name = "16.01 Silph Co.'s stairs to 3F and its pad to 5F", .body = test_pad_to_5f}, + .expectation = {.description = "to 3F's pad (4, 6), onto 5F's (15, 7), nobody met"}, + }, +}; + +} // namespace + + +void add_tests_AutoStorySilph(UnitTestDatabase& database){ + for (const auto& item : AUTO_STORY_SILPH_CASES){ + database.add(item); + } +} + + + +} // namespace PokemonFRLG +} // namespace NintendoSwitch +} // namespace PokemonAutomation diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.cpp index 0d1c4f4ce4..b16885c6eb 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.cpp @@ -234,7 +234,7 @@ constexpr std::string_view STORY_ORDER[] = { "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", "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", "14.03", "14.04", "14.04b", "15.01", + "12.01", "12.02", "12.02b", "12.03", "14.03", "14.04", "14.04b", "15.01", "16.01", }; // `checkpoints` in STORY_ORDER's order. Throws ParseException for a 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 a21f8e4b6d..1a9e110858 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory_Tests.cpp @@ -39,6 +39,7 @@ #include "PokemonFRLG_AutoStoryPlanGolden11.h" #include "PokemonFRLG_AutoStoryPlanGolden12.h" #include "PokemonFRLG_AutoStoryPlanGolden15.h" +#include "PokemonFRLG_AutoStoryPlanGolden16.h" #include "PokemonFRLG_AutoStoryRows_Tests.h" #include "PokemonFRLG_AutoStoryMoveData.h" #include "PokemonFRLG_AutoStoryStepTable.h" @@ -286,8 +287,8 @@ UnitTestResult check_checkpoint(const StoryCheckpoint& checkpoint, StoryPose& po // before leaves the player, and adds the plans to `golden`. UnitTestResult chain_story_routes(std::vector& golden){ const std::vector& checkpoints = story_checkpoints(); - if (checkpoints.size() != 58 || checkpoints[0].start){ - return "Expected 58 checkpoints, the first from a new game."; + if (checkpoints.size() != 59 || checkpoints[0].start){ + return "Expected 59 checkpoints, the first from a new game."; } StoryPose pose; for (size_t c = 0; c < checkpoints.size(); c++){ @@ -331,6 +332,7 @@ UnitTestResult test_golden_plans(){ golden.insert(golden.end(), std::begin(FRLG_PLAN_GOLDEN_12), std::end(FRLG_PLAN_GOLDEN_12)); golden.insert(golden.end(), std::begin(FRLG_PLAN_GOLDEN_12_CELADON), std::end(FRLG_PLAN_GOLDEN_12_CELADON)); golden.insert(golden.end(), std::begin(FRLG_PLAN_GOLDEN_15), std::end(FRLG_PLAN_GOLDEN_15)); + golden.insert(golden.end(), std::begin(FRLG_PLAN_GOLDEN_16), std::end(FRLG_PLAN_GOLDEN_16)); const size_t stored = golden.size(); size_t first_diff = 0; while (first_diff < actual.size() && first_diff < stored && actual[first_diff] == golden[first_diff]){ diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.01.plan.json b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.01.plan.json new file mode 100644 index 0000000000..53e5e76fad --- /dev/null +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-16.01.plan.json @@ -0,0 +1,82 @@ +{ + "format": "pokesim-authored-checkpoint/1", + "game": "frlg", + "checkpoint": { + "id": "16.01", + "title": "Saffron to Silph Co.: 3F's pad to 9F's, 9F's to 5F's corridor, the CARD KEY", + "start": { + "map": "SaffronCity_PokemonCenter_1F", + "tiles": [ + [ + 7, + 4 + ] + ], + "facing": "north" + }, + "events": [ + { + "id": "silph_3f_by_pad", + "kind": "route", + "action": "run", + "args": { + "target": { + "map": "SilphCo_3F", + "tiles": [ + [ + 5, + 6 + ] + ], + "facing": "west" + } + }, + "why": "out of Saffron's Center, along the city to Silph Co.'s door (33, 30), up its stairs (1F (31, 2), 2F (28, 2)) to 3F and west along the hall to (5, 6), a tile east of the warp pad (4, 6); the hall keeps clear of the Rocket at (25, 9), who faces west along row 9 (pokeguy bikes in and climbs to 3F, 1:27:44)" + }, + { + "id": "pad_3f_to_5f", + "kind": "step", + "args": { + "direction": "west" + }, + "declared_after": { + "map": "SilphCo_5F", + "tiles": [ + [ + 15, + 7 + ] + ], + "facing": "west" + }, + "why": "onto the pad (4, 6), which warps to 5F's (15, 7) (SilphCo_3F map.json warp 1)" + } + ] + }, + "execution": { + "menu": "full", + "notes": { + "checkpoint": [ + "Starts at Saffron's nurse, facing her, where 15.01 ends (healed there, so no Max Elixir or Super Potion on 5F as pokeguy's low-HP run has). Ends on 5F's pad (15, 7), where the pad from 3F leaves the player.", + "PokeGuy (1:27:44 to 1:28:14): stairs to 3F, warp pads via 5F and briefly 9F, back to the 5F corridor, the CARD KEY at 1:28:11. His pad coordinates were not measured; these are read from the decomp (SilphCo_3F, 5F and 9F map.json warps): 3F (4, 6) to 5F (15, 7), then 5F (10, 20) to 9F (22, 18) and back (the pad pair is the only way into 5F's bottom corridor; the Rocket at 3F (25, 9), facing west along row 9, blocks the other way round to 3F's west rooms).", + "Next (16.02, not authored): 5F (15, 7) down column 10 to (10, 19), the pad (10, 20), a step off 9F's pad (22, 18) and back on, east along the corridor to the CARD KEY (22, 21). Open: Beau, the scientist who wanders 5F (10..12, 5..7) with sight 1, sees every way from (15, 7) to column 9 or 10 (the walk cannot tell where he would stop the player: a wait or a battle is needed); the Rocket at (9, 21) looks up and right, and (12, 21) is in his line; and the Card Key doors (5F bg_events (8, 9), (8, 10), (8, 18), (8, 19)) are open tiles on the pack's map, so a planned route could cross a closed door.", + "TODO (RNG gift, later rows): the Lapras Lv25 from the employee on 7F (SilphCo_7F_EventScript_LaprasGuy, FLAG_GOT_LAPRAS_FROM_SILPH) is a Gift RNG shiny target; the Master Ball from the president on 11F is taken too (pokeguy skips both, 1:32:51)." + ] + } + }, + "metadata": { + "phase": "testing", + "postconditions": { + "position": { + "map": "SilphCo_5F", + "tiles": [ + [ + 15, + 7 + ] + ], + "facing": "west" + } + } + } +} diff --git a/SerialPrograms/cmake/SourceFiles.cmake b/SerialPrograms/cmake/SourceFiles.cmake index a84695d347..22be3d4d53 100644 --- a/SerialPrograms/cmake/SourceFiles.cmake +++ b/SerialPrograms/cmake/SourceFiles.cmake @@ -2109,6 +2109,8 @@ file(GLOB LIBRARY_SOURCES Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryCeladon_Tests.cpp Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryCeladonGym_Tests.cpp Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySaffron_Tests.cpp + Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySilph_Tests.cpp + Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryRows16_Tests.h Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryChoice.cpp Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryChoice.h Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryChoice_Tests.cpp @@ -2196,6 +2198,7 @@ file(GLOB LIBRARY_SOURCES Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden11.h Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden12.h Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden15.h + Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryPlanGolden16.h Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryResources.cpp Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryResources.h Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryResources_Tests.cpp