diff --git a/SerialPrograms/Source/PokemonBDSP/PokemonBDSP_Tests.cpp b/SerialPrograms/Source/PokemonBDSP/PokemonBDSP_Tests.cpp index 1903e9b9a0..25793edcd2 100644 --- a/SerialPrograms/Source/PokemonBDSP/PokemonBDSP_Tests.cpp +++ b/SerialPrograms/Source/PokemonBDSP/PokemonBDSP_Tests.cpp @@ -9,6 +9,11 @@ #include "Inference/PokemonBDSP_MenuDetector.h" #include "Programs/AutoStory/Actions/PokemonBDSP_AutoStory_Actions_Tests.h" #include "Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_FrozenTrainer_Tests.h" +#include "Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_GridSim_Tests.h" +#include "Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_FaultSweep_Tests.h" +#include "Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimFailureCases_Tests.h" +#include "Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimGolden_Tests.h" +#include "Programs/AutoStory/PokemonBDSP_AutoStory_RecoveryWalk_Tests.h" #include "Programs/AutoStory/PokemonBDSP_AutoStory_Maps_Tests.h" #include "Programs/AutoStory/PokemonBDSP_AutoStory_PlannedRoute_Tests.h" #include "Programs/AutoStory/PokemonBDSP_AutoStory_SimulatedRoute_Tests.h" @@ -17,6 +22,9 @@ #include "Programs/AutoStory/PokemonBDSP_AutoStory_StoryMaps_Tests.h" #include "Programs/AutoStory/PokemonBDSP_AutoStory_StoryWorld_Tests.h" #include "Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StoryActions_Tests.h" +#include "Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StoryMonteCarlo_Tests.h" +#include "Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim_Tests.h" +#include "Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySimulation_Tests.h" #include "Programs/AutoStory/PokemonBDSP_AutoStory_StoryData_Tests.h" #include "Programs/AutoStory/PokemonBDSP_AutoStory_StoryTable_Tests.h" #include "Programs/AutoStory/PokemonBDSP_AutoStory_RouteBench_Tests.h" @@ -42,14 +50,22 @@ void add_tests(UnitTestDatabase& database){ add_tests_AutoStory_RouteBench(database); add_tests_AutoStory_StoryMaps(database); add_tests_AutoStory_Segment00(database); + add_tests_AutoStory_StorySimulation(database); add_tests_AutoStory_StoryData(database); add_tests_AutoStory_StoryTable(database); add_tests_AutoStory_Walk(database); add_tests_AutoStory_WildBattlePolicy(database); add_tests_AutoStory_PlannedRoute(database); add_tests_AutoStory_SimulatedRoute(database); + add_tests_AutoStory_GridSim(database); add_tests_AutoStory_FrozenTrainer(database); add_tests_AutoStory_WallBattleSim(database); + add_tests_AutoStory_RecoveryWalk(database); + add_tests_AutoStory_StorySim(database); + add_tests_AutoStory_StoryMonteCarlo(database); + add_tests_AutoStory_SimFailureCases(database); + add_tests_AutoStory_FaultSweep(database); + add_tests_AutoStory_SimGolden(database); add_tests_AutoStory_StoryActions(database); add_tests_StarterRng(database); } diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Data/route_plans.golden.txt b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Data/route_plans.golden.txt index 4543ae1d29..f967f06877 100644 --- a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Data/route_plans.golden.txt +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Data/route_plans.golden.txt @@ -267,3 +267,198 @@ anchor); 0 from one start tile. 2. east 14 (to wall) -> Jubilife City (59, 26) 3. north 5 (to wall) -> Jubilife City (59, 21) totals: 3 legs, 2 turns, 1 open, 0 localization + +== 01.01 west_of_barrys_trigger (costs: town) + from: JubilifeCity (59, 21) facing north (tile) + target: Route203 (4, 18) facing east (tile) + start candidates: Jubilife City (59, 21) + 1. south 1 (open) -> Jubilife City (59, 22) + 2. east 8 (open) -> Route 203 (4, 18) + totals: 2 legs, 1 turns, 2 open, 0 localization + +== 01.02 south_to_the_cliff (costs: route) + from: Route203 (5, 17) (5, 18) (5, 19) (5, 20) facing east (set) + target: Route203 (5, 20) facing south (tile) + start candidates: Route 203 (5, 17), Route 203 (5, 18), Route 203 (5, 19), Route 203 (5, 20) + 1. south 3 (to wall) -> Route 203 (5, 20) + totals: 1 legs, 0 turns, 0 open, 1 localization + +== 01.02 by_the_gate (costs: route) + from: Route203 (5, 20) facing south (tile) + target: Route203 (55, 9) facing east (tile) + start candidates: Route 203 (5, 20) + 1. north 2 (open) -> Route 203 (5, 18) + 2. east 50 (to wall) -> Route 203 (55, 18) + 3. north 12 (to wall) -> Route 203 (55, 6) + 4. south 3 (open) -> Route 203 (55, 9) + totals: 4 legs, 3 turns, 2 open, 0 localization + +== 01.02 into_the_hikers_scene (costs: into_scene) + from: OreburghGate (4, 22) (5, 22) facing east (set) + target: OreburghGate (4, 22) (5, 22) facing east (set) + start candidates: OreburghGate (4, 22), OreburghGate (5, 22) + totals: 0 legs, 0 turns, 0 open, 0 localization + +== 01.02 past_curtis (costs: exit) + from: OreburghGate (7, 22) facing east (tile) + target: OreburghGate (20, 22) facing east (tile) + start candidates: OreburghGate (7, 22) + 1. east 13 (open) -> OreburghGate (20, 22) + totals: 1 legs, 0 turns, 1 open, 0 localization + +== 01.02 by_the_east_mouth (costs: exit) + from: OreburghGate (20, 22) facing east (tile) + target: OreburghGate (26, 22) facing east (tile) + start candidates: OreburghGate (20, 22) + 1. east 6 (open) -> OreburghGate (26, 22) + totals: 1 legs, 0 turns, 1 open, 0 localization + +== 01.02 into_the_welcome_scene (costs: into_scene) + from: OreburghCity (2, 13) (3, 13) facing east (set) + target: OreburghCity (2, 13) (3, 13) facing east (set) + start candidates: Oreburgh City (2, 13), Oreburgh City (3, 13) + totals: 0 legs, 0 turns, 0 open, 0 localization + +== 01.02b below_the_centers_door (costs: town) + from: OreburghCity (26, 22) facing north (tile) + target: OreburghCity (47, 21) facing north (tile) + start candidates: Oreburgh City (26, 22) + 1. east 22 (to wall) -> Oreburgh City (48, 22) + 2. north 1 (to wall) -> Oreburgh City (48, 21) + 3. west 1 (open) -> Oreburgh City (47, 21) + totals: 3 legs, 2 turns, 1 open, 0 localization + +== 01.03 above_the_mine (costs: town) + from: OreburghCity (47, 21) (46, 21) facing south (set) + target: OreburghCity (46, 57) facing south (tile) + start candidates: Oreburgh City (47, 21), Oreburgh City (46, 21) + 1. east 2 (to wall) -> Oreburgh City (48, 21) + 2. west 4 (open) -> Oreburgh City (44, 21) + 3. south 20 (to wall) -> Oreburgh City (44, 41) + 4. west 1 (open) -> Oreburgh City (43, 41) + 5. south 16 (to wall) -> Oreburgh City (43, 57) + 6. east 3 (open) -> Oreburgh City (46, 57) + totals: 6 legs, 5 turns, 3 open, 1 localization + +== 01.05 east_of_barrys_trigger (costs: town) + from: OreburghCity (26, 21) (26, 22) facing south (set) + target: OreburghCity (7, 13) facing west (tile) + start candidates: Oreburgh City (26, 21), Oreburgh City (26, 22) + 1. south 5 (to wall) -> Oreburgh City (26, 26) + 2. north 1 (open) -> Oreburgh City (26, 25) + 3. west 14 (to wall) -> Oreburgh City (12, 25) + 4. north 12 (open) -> Oreburgh City (12, 13) + 5. west 5 (open) -> Oreburgh City (7, 13) + totals: 5 legs, 4 turns, 3 open, 1 localization + +== 01.05 through_the_gate (costs: route) + from: OreburghGate (27, 22) (26, 22) facing west (set) + target: OreburghGate (5, 22) facing west (tile) + start candidates: OreburghGate (27, 22), OreburghGate (26, 22) + 1. north 2 (to wall) -> OreburghGate (27, 20), OreburghGate (26, 21) + 2. east 1 (to wall) -> OreburghGate (27, 20), OreburghGate (27, 21) + 3. south 3 (to wall) -> OreburghGate (27, 23) + 4. west 19 (to wall) -> OreburghGate (8, 23) + 5. north 1 (to wall) -> OreburghGate (8, 22) + 6. west 3 (open) -> OreburghGate (5, 22) + totals: 6 legs, 5 turns, 1 open, 3 localization + +== 01.06 up_jubilifes_road (costs: town) + from: Route203 (55, 9) facing west (tile) + target: JubilifeCity (41, 8) facing north (tile) + start candidates: Route 203 (55, 9) + 1. south 10 (to wall) -> Route 203 (55, 19) + 2. west 17 (to wall) -> Route 203 (38, 19) + 3. north 1 (open) -> Route 203 (38, 18) + 4. west 60 (open) -> Jubilife City (41, 22) + 5. north 14 (to wall) -> Jubilife City (41, 8) + totals: 5 legs, 4 turns, 2 open, 0 localization + +== 01.06 below_rowans_trigger (costs: town) + from: JubilifeCity (41, 8) facing north (tile) + target: JubilifeCity (47, 8) facing north (tile) + start candidates: Jubilife City (41, 8) + 1. east 6 (to wall) -> Jubilife City (47, 8) + totals: 1 legs, 0 turns, 0 open, 0 localization + +== 01.08 west_to_the_wall (costs: route) + from: JubilifeCity (46, 5) (47, 5) (set) + target: JubilifeCity (44, 5) facing west (tile) + start candidates: Jubilife City (46, 5), Jubilife City (47, 5) + 1. west 3 (to wall) -> Jubilife City (44, 5) + totals: 1 legs, 0 turns, 0 open, 1 localization + +== 01.08 below_the_ravaged_path (costs: town) + from: JubilifeCity (44, 5) facing west (tile) + target: Route204South (11, 3) facing north (tile) + start candidates: Jubilife City (44, 5) + 1. east 2 (open) -> Jubilife City (46, 5) + 2. north 19 (to wall) -> Route 204 (14, 18) + 3. west 4 (open) -> Route 204 (10, 18) + 4. north 15 (to wall) -> Route 204 (10, 3) + 5. east 1 (open) -> Route 204 (11, 3) + totals: 5 legs, 4 turns, 3 open, 0 localization + +== 01.09 west_of_the_rock (costs: route) + from: RavagedPath (19, 50) facing north (tile) + target: RavagedPath (21, 43) facing east (tile) + start candidates: RavagedPath (19, 50) + 1. north 10 (to wall) -> RavagedPath (19, 40) + 2. south 3 (open) -> RavagedPath (19, 43) + 3. east 2 (open) -> RavagedPath (21, 43) + totals: 3 legs, 2 turns, 2 open, 0 localization + +== 01.09 above_the_way_out (costs: route) + from: RavagedPath (21, 43) facing east (tile) + target: RavagedPath (28, 44) facing south (tile) + start candidates: RavagedPath (21, 43) + 1. east 8 (to wall) -> RavagedPath (29, 43) + 2. south 1 (to wall) -> RavagedPath (29, 44) + 3. west 1 (open) -> RavagedPath (28, 44) + totals: 3 legs, 2 turns, 1 open, 0 localization + +== 01.10 line_1 (costs: line) + from: Route204North (20, 26) (20, 27) facing south (set) + target: Route204North (20, 30) (tile) + start candidates: Route 204 (20, 26), Route 204 (20, 27) + 1. south 4 (to wall) -> Route 204 (20, 30) + totals: 1 legs, 0 turns, 0 open, 1 localization + +== 01.10 line_2 (costs: line) + from: Route204North (20, 30) (tile) + target: Route204North (11, 27) (tile) + start candidates: Route 204 (20, 30) + 1. north 3 (open) -> Route 204 (20, 27) + 2. west 9 (open) -> Route 204 (11, 27) + totals: 2 legs, 1 turns, 2 open, 0 localization + +== 01.10 line_3 (costs: line) + from: Route204North (11, 27) (tile) + target: Route204North (11, 22) (tile) + start candidates: Route 204 (11, 27) + 1. north 5 (open) -> Route 204 (11, 22) + totals: 1 legs, 0 turns, 1 open, 0 localization + +== 01.10 line_4 (costs: line) + from: Route204North (11, 22) (tile) + target: Route204North (19, 22) (tile) + start candidates: Route 204 (11, 22) + 1. east 10 (to wall) -> Route 204 (21, 22) + 2. west 2 (open) -> Route 204 (19, 22) + totals: 2 legs, 1 turns, 1 open, 0 localization + +== 01.10 line_5 (costs: line) + from: Route204North (19, 22) (tile) + target: Route204North (19, 12) (tile) + start candidates: Route 204 (19, 22) + 1. north 15 (to wall) -> Route 204 (19, 7) + 2. south 5 (open) -> Route 204 (19, 12) + totals: 2 legs, 1 turns, 1 open, 0 localization + +== 01.10 line_6 (costs: line) + from: Route204North (19, 12) (tile) + target: Route204North (11, 12) (tile) + start candidates: Route 204 (19, 12) + 1. west 9 (to wall) -> Route 204 (10, 12) + 2. east 1 (open) -> Route 204 (11, 12) + totals: 2 legs, 1 turns, 1 open, 0 localization diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_RecoveryWalk_Tests.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_RecoveryWalk_Tests.cpp new file mode 100644 index 0000000000..4a393b3b21 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_RecoveryWalk_Tests.cpp @@ -0,0 +1,938 @@ +/* BDSP Recovery Walk Tests + * + * From: https://github.com/PokemonAutomation/ + * + * November 5 mine report: EAST 14 moved 4 beside Machop on row 15. + * The exact deployed revision/run ID is unavailable. BEFORE/AFTER events + * and two interrupted advances are explicit diagnostics, not an inferred + * physical cause. Run the real story step and route walker on GridSim. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include "Common/Cpp/Exceptions.h" +#include "Pokemon/AutoStory/Pokemon_TilePose.h" +#include "Pokemon/AutoStory/Pokemon_BuiltinStoryActions.h" +#include "Pokemon/AutoStory/Types/Pokemon_GridPose.h" +#include "Pokemon/AutoStory/Types/Pokemon_StoryActionArg.h" +#include "Pokemon/AutoStory/Types/Pokemon_StoryActionArg.h" +#include "PokemonBDSP/Programs/AutoStory/Utils/PokemonBDSP_AutoStory_WalkResult.h" +#include "Simulation/PokemonBDSP_AutoStory_GridSim.h" +#include "PokemonBDSP_AutoStory_StoryPlaces.h" +#include "PokemonBDSP_AutoStory_StoryStepIO.h" +#include "PokemonBDSP_AutoStory_StoryTable.h" +#include "PokemonBDSP_AutoStory_StoryWalkSteps.h" +#include "PokemonBDSP_AutoStory_RecoveryWalk_Tests.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ +using namespace detail; +namespace{ +using namespace std::chrono_literals; +using Pokemon::Direction; +using Pokemon::TilePos; +using Pokemon::GridPose; +using Pokemon::story_arg; + +// A wild battle in the recovery walk itself, on its first input of the +// kind: one the console cannot tell from a battle before that input began +// (WalkOrigin::MAY_PRECEDE_LEG). +enum class RecoveryBattle{ NONE, FIRST_TAP, FIRST_HOLD }; + +class InterruptingRouteIO : public GridSimRouteIO{ +public: + InterruptingRouteIO(GridSim& sim, std::vector& notes, + std::vector taps, size_t interrupted_holds, RecoveryBattle recovery_battle = RecoveryBattle::NONE) + : GridSimRouteIO(sim, notes, std::move(taps)), m_notes(notes), m_left(interrupted_holds), m_recovery_battle(recovery_battle) + {} + virtual WalkResult walk_to_wall(const RouteWallWalk& walk) override{ + if (m_left > 0){ + m_left--; + return {.stop = WalkStop::LIMIT, .walked = 400ms, .wild_battles = 1}; + } + if (take_recovery_battle(RecoveryBattle::FIRST_HOLD, walk.label)){ + return {.stop = WalkStop::LIMIT, .walked = 400ms, .wild_battles = 1, .origin = WalkOrigin::MAY_PRECEDE_LEG}; + } + return GridSimRouteIO::walk_to_wall(walk); + } + virtual WalkResult walk_taps(Direction direction, size_t tiles, const std::string& label) override{ + if (take_recovery_battle(RecoveryBattle::FIRST_TAP, label)){ + WalkResult result = GridSimRouteIO::walk_taps(direction, tiles - 1, label); + result.wild_battles++; + result.moved_chunks++; + result.origin = WalkOrigin::MAY_PRECEDE_LEG; + return result; + } + return GridSimRouteIO::walk_taps(direction, tiles, label); + } +private: + bool take_recovery_battle(RecoveryBattle kind, const std::string& label){ + if (m_recovery_battle != kind || label.find("recovery") == std::string::npos){ + return false; + } + m_recovery_battle = RecoveryBattle::NONE; + m_notes.push_back("[Sim] a wild battle on the first input of " + label); + return true; + } + + std::vector& m_notes; + size_t m_left; + RecoveryBattle m_recovery_battle; +}; + +// Only walking is needed for this real LEGS step. Unexpected story actions +// fail the test. The actual RouteWalker executes through the GridSim RouteIO. +class RecoveryStepIO : public StoryStepIO{ +public: + explicit RecoveryStepIO(RouteIO& route) : m_route(route){} + virtual RouteIO& route() override{ return m_route; } + virtual bool fight(const std::string&) override{ throw GridSimFailure{"unexpected trainer"}; } + virtual void walk_until_stopped(Direction, size_t, const std::string&) override{ throw GridSimFailure{"unexpected blind hold"}; } + virtual bool run_until_map(Direction, Milliseconds, const std::string&, const std::string&) override{ throw GridSimFailure{"unexpected banner walk"}; } + virtual WarpSeen run_into_door(Direction, bool, Milliseconds = Milliseconds(12000), Milliseconds = Milliseconds(0), const std::string& = "") override{ throw GridSimFailure{"unexpected door"}; } + virtual std::optional tap_to_banner(Direction, const std::string&, size_t) override{ throw GridSimFailure{"unexpected banner"}; } + virtual void settle(Button, const std::string&, SettleKind, const std::string&) override{ throw GridSimFailure{"unexpected scene"}; } +private: + RouteIO& m_route; +}; + +// The coal room's counted walk from the corridor rock (15, 9) to below +// Roark (18, 29), as 01.03 walked it before its end was clipped to his +// rock and the wall: nine counted legs, the last one 9 tiles west along +// an open row, which is what these recovery cases need. +const Pokemon::StoryStep& mine_step(){ + static const Pokemon::StoryStep step = []{ + Pokemon::StoryStep step; + step.kind = Pokemon::StoryStepKind::LEGS; + step.name = "below_roark"; + step.args["legs"] = std::vector{ + {.direction = Direction::EAST, .tiles = 1}, + {.direction = Direction::SOUTH, .tiles = 2}, + {.direction = Direction::WEST, .tiles = 1}, + {.direction = Direction::SOUTH, .tiles = 5}, + {.direction = Direction::EAST, .tiles = 14}, + {.direction = Direction::SOUTH, .tiles = 10}, + {.direction = Direction::WEST, .tiles = 2}, + {.direction = Direction::SOUTH, .tiles = 3}, + {.direction = Direction::WEST, .tiles = 9}, + }; + return step; + }(); + return step; +} + +struct RecoveryInput{ + std::string name; + std::vector taps; + Direction direction = Direction::SOUTH; + size_t tiles = 5; + SimEncounterPhase phase = SimEncounterPhase::BEFORE_MOVEMENT; + WalkOrigin origin = WalkOrigin::CURRENT_LEG; + size_t interrupted_holds = 0; + RecoveryBattle recovery_battle = RecoveryBattle::NONE; +}; +struct RecoveryExpectation{ + std::string failure = {}; + TilePos end = {.x = 18, .y = 29}; + Direction facing = Direction::WEST; +}; +struct RecoveryCase{ + RecoveryInput input; + RecoveryExpectation expectation; +}; + +class Test_RecoveryWalk : public UnitTest{ +public: + explicit Test_RecoveryWalk(RecoveryCase data) + : UnitTest("PokemonBDSP::AutoStory - Recovery walk: " + data.input.name), m_case(std::move(data)) + {} + virtual UnitTestResult run(Logger&, CancellableScope&) const override{ + const StoryWorld* world = story_plan_world("OreburghMine", "OreburghMine"); + if (world == nullptr){ + return "Missing native mine world."; + } + GridSim sim({.world = world}, world->to_world("OreburghMine", {15, 9}), Direction::SOUTH, true); + std::vector taps; + for (size_t tap : m_case.input.taps){ + taps.push_back({.label = "below_roark", .direction = m_case.input.direction, + .requested_tiles = m_case.input.tiles, .tap = tap, .phase = m_case.input.phase, .origin = m_case.input.origin}); + } + std::vector notes; + InterruptingRouteIO route(sim, notes, std::move(taps), m_case.input.interrupted_holds, m_case.input.recovery_battle); + RecoveryStepIO io(route); + StoryWalkSteps walks(io); + walks.begin_attempt("01.03"); + Pokemon::RunState state{.pose = Pokemon::tile_pose("OreburghMine", {{15, 9}}, Direction::SOUTH), .flags = {}}; + std::string failure; + std::optional declared; + try{ + const auto outcome = walks.legs(state, mine_step()); + failure = outcome.failure; + declared = outcome.pose; + }catch (const GridSimFailure& error){ + failure = error.message; + } + if (!m_case.expectation.failure.empty()){ + return failure.find(m_case.expectation.failure) != std::string::npos ? UnitTestResult(true) + : UnitTestResult("Expected " + m_case.expectation.failure + ", got " + failure); + } + const auto end = story_to_local(*world, "OreburghMine", nearest_tile(sim.player().pos)); + if (!failure.empty() || !end || *end != m_case.expectation.end || !declared + || Pokemon::facing_of(*declared) != sim.player().facing || sim.player().facing != m_case.expectation.facing){ + return "Expected below Roark (18,29), got " + to_string(sim.player().pos) + ": " + failure; + } + return true; + } +private: + RecoveryCase m_case; +}; + +// A wild battle on below_roark's open leg east 14, on the input's tap: the +// leg's screen events must place the player a tile or so from where the +// taps left them, not anywhere along the 14 tiles. The taps go on after +// the battle, as the console's do: the player ends at the leg's end, a +// tile short when the battle came before its tap moved. Red until the +// story's taps read their events: the leg kept all 15 of its tiles. +struct PlacedBattleInput{ + std::string name; + size_t tap; + SimEncounterPhase phase; +}; +struct PlacedBattleExpectation{ + size_t tiles_in; // how far along east 14 the taps left the player +}; +struct PlacedBattleCase{ + PlacedBattleInput input; + PlacedBattleExpectation expectation; +}; + +// "4 to 6 tiles in." in a placement line, if any. +std::optional> placed_span(const std::vector& notes){ + for (const std::string& note : notes){ + const size_t line = note.find("battle on the leg:"); + const size_t in = note.find(" tiles in."); + if (line == std::string::npos || in == std::string::npos){ + continue; + } + const size_t to = note.rfind(" to ", in); + const size_t from = note.rfind(' ', to - 1); + return std::pair{std::stoul(note.substr(from + 1, to - from - 1)), std::stoul(note.substr(to + 4, in - to - 4))}; + } + return std::nullopt; +} + +class Test_PlacedLegBattle : public UnitTest{ +public: + explicit Test_PlacedLegBattle(PlacedBattleCase data) + : UnitTest("PokemonBDSP::AutoStory - Recovery walk: a battle on an open leg's taps, placed by its screen events: " + data.input.name) + , m_case(std::move(data)) + {} + virtual UnitTestResult run(Logger& logger, CancellableScope&) const override{ + const StoryWorld* world = story_plan_world("OreburghMine", "OreburghMine"); + GridSim sim({.world = world}, world->to_world("OreburghMine", {15, 9}), Direction::SOUTH, true); + std::vector notes; + InterruptingRouteIO route(sim, notes, {{.label = "below_roark", .direction = Direction::EAST, + .requested_tiles = 14, .tap = m_case.input.tap, .phase = m_case.input.phase}}, 0, RecoveryBattle::NONE); + RecoveryStepIO io(route); + StoryWalkSteps walks(io); + walks.begin_attempt("01.03"); + Pokemon::RunState state{.pose = Pokemon::tile_pose("OreburghMine", {{15, 9}}, Direction::SOUTH), .flags = {}}; + std::string failure; + try{ + failure = walks.legs(state, mine_step()).failure; + }catch (const GridSimFailure& error){ + failure = error.message; + } + for (const std::string& note : notes){ + logger.log(note); + } + const auto end = story_to_local(*world, "OreburghMine", nearest_tile(sim.player().pos)); + if (!failure.empty() || !end || *end != TilePos{18, 29}){ + return "Expected below Roark (18, 29), got " + to_string(sim.player().pos) + ": " + failure; + } + const auto span = placed_span(notes); + const size_t tiles_in = m_case.expectation.tiles_in; + if (!span){ + return "The battle was not placed: the leg kept every one of its tiles."; + } + if (span->first > tiles_in || tiles_in > span->second || span->second - span->first > 2){ + return std::format("Placed {} to {} tiles in; the taps left the player {} in.", span->first, span->second, tiles_in); + } + return true; + } +private: + PlacedBattleCase m_case; +}; + +// The route walker's open legs as lab-B 2026-11-08 11:55 saw one: a leg of +// more than a tile that ends on open ground, not at a wall, goes a tile +// past where it was planned to stop (there, south 5 went 6). The walker is +// not told. A single tap stays tile-exact, and so do the story's own +// counted taps. +class OvershootingRouteIO : public GridSimRouteIO{ +public: + OvershootingRouteIO(GridSim& sim, std::vector& notes, std::vector taps) + : GridSimRouteIO(sim, notes, std::move(taps)), m_sim(sim), m_notes(notes) + {} + virtual WalkResult walk_taps(Direction direction, size_t tiles, const std::string& label) override{ + const WalkResult result = GridSimRouteIO::walk_taps(direction, tiles, label); + if (tiles > 1 && label.ends_with("(open)") && result.stop == WalkStop::LIMIT && sim_can_step(m_sim, direction)){ + m_sim.tap(direction, route_ms_per_tile(direction, MoveSpeed::WALK), false); + m_notes.push_back(std::format("[Sim] {}: overshot a tile {} to {}.", label, direction_name(direction), to_string(m_sim.player().pos))); + } + return result; + } +private: + GridSim& m_sim; + std::vector& m_notes; +}; + +// RecoveryStepIO that also walks to walls, as the story simulation does. +class WallStepIO : public RecoveryStepIO{ +public: + WallStepIO(RouteIO& route, GridSim& sim) : RecoveryStepIO(route), m_sim(sim){} + virtual void walk_until_stopped(Direction direction, size_t tiles, const std::string&) override{ + m_sim.tap(direction, ROUTE_TURN_TAP, false); + m_sim.hold(direction, ROUTE_START_DELAY + 800ms + route_ms_per_tile(direction) * (int64_t)(2 * tiles), SimPace::WALK); + } +private: + GridSim& m_sim; +}; + +const Pokemon::StoryStep& story_step(std::string_view row, std::string_view name){ + for (const Pokemon::StoryCheckpoint& checkpoint : story_checkpoints()){ + for (const Pokemon::StoryStep& step : checkpoint.steps){ + if (checkpoint.id == row && step.name == name){ + return step; + } + } + } + throw GridSimFailure{std::format("no step {} in {}", name, row)}; +} + +// lab-B 2026-11-08 11:55: a wild battle on 01.03's counted taps across +// Roark's room re-planned to the end of the interrupted leg, the open tile +// (15, 16); the re-plan's open run south overshot a row, and the taps after +// ran a row off, under Roark's rocks. With a wild battle on the input's +// tap, the table's to_roarks_corner from (15, 9) must end on his corner +// (20, 28) facing west, and beside_roarks_rock on (20, 29). +struct CornerInput{ + std::string name; + std::vector battle; +}; +struct CornerExpectation{ + std::string failure = {}; +}; +struct CornerCase{ + CornerInput input; + CornerExpectation expectation; +}; +class Test_RoarksCorner : public UnitTest{ +public: + explicit Test_RoarksCorner(CornerCase data) + : UnitTest("PokemonBDSP::AutoStory - Recovery walk: 01.03 to Roark's corner, " + data.input.name), m_case(std::move(data)) + {} + virtual UnitTestResult run(Logger& logger, CancellableScope&) const override{ + const StoryWorld& world = *story_plan_world("OreburghMine", "OreburghMine"); + GridSim sim({.world = &world}, world.to_world("OreburghMine", {15, 9}), Direction::SOUTH, true); + std::vector notes; + OvershootingRouteIO route(sim, notes, m_case.input.battle); + WallStepIO io(route, sim); + StoryWalkSteps walks(io); + walks.begin_attempt("01.03"); + Pokemon::RunState state{.pose = Pokemon::tile_pose("OreburghMine", {{15, 9}}, Direction::SOUTH), .flags = {}}; + std::string failure; + try{ + for (std::string_view name : {"to_roarks_corner", "beside_roarks_rock"}){ + const Pokemon::StoryStep& step = story_step("01.03", name); + failure = walks.legs(state, step).failure; + const auto end = story_to_local(world, "OreburghMine", nearest_tile(sim.player().pos)); + logger.log(std::format("{} ended at {}.", name, to_string(sim.player().pos))); + const Pokemon::TileDeclared& declared = std::get(*step.pose_after); + const std::vector& tiles = declared.tiles; + const bool on_tile = end && std::find(tiles.begin(), tiles.end(), *end) != tiles.end(); + if (failure.empty() && (!on_tile || declared.facing != sim.player().facing)){ + failure = std::format("{} ended at {} facing {}, not on {}.", name, to_string(sim.player().pos), + direction_name(sim.player().facing), Pokemon::to_string(Pokemon::pose_of(*step.pose_after))); + } + if (!failure.empty()){ + break; + } + state.pose = Pokemon::pose_of(*step.pose_after); + } + }catch (const GridSimFailure& error){ + failure = error.message; + } + for (const std::string& note : notes){ + if (note.find("recovery") != std::string::npos || note.find("overshot") != std::string::npos){ + logger.log(note); + } + } + return failure == m_case.expectation.failure ? UnitTestResult(true) + : UnitTestResult("Expected '" + m_case.expectation.failure + "', got '" + failure + "'"); + } +private: + CornerCase m_case; +}; + +const CornerCase CORNER_CASES[] = { + {.input = {.name = "no battle", .battle = {}}, .expectation = {}}, + {.input = {.name = "battle on south 5 tap 3", + .battle = {{.label = "to_roarks_corner", .direction = Direction::SOUTH, .requested_tiles = 5, .tap = 3}}}, .expectation = {}}, + {.input = {.name = "battle on south 5 tap 5", + .battle = {{.label = "to_roarks_corner", .direction = Direction::SOUTH, .requested_tiles = 5, .tap = 5}}}, .expectation = {}}, + {.input = {.name = "battle on east 14 tap 7", + .battle = {{.label = "to_roarks_corner", .direction = Direction::EAST, .requested_tiles = 14, .tap = 7}}}, .expectation = {}}, + {.input = {.name = "battle on south 10 tap 4", + .battle = {{.label = "to_roarks_corner", .direction = Direction::SOUTH, .requested_tiles = 10, .tap = 4}}}, .expectation = {}}, + // On a leg's first tap the battle may have begun before it (MC seed 90037). + {.input = {.name = "battle on east 14 tap 1", + .battle = {{.label = "to_roarks_corner", .direction = Direction::EAST, .requested_tiles = 14, .tap = 1}}}, .expectation = {}}, + {.input = {.name = "battle on south 10 tap 1", + .battle = {{.label = "to_roarks_corner", .direction = Direction::SOUTH, .requested_tiles = 10, .tap = 1}}}, .expectation = {}}, +}; + +// The Oreburgh Mine's warps, from the decomp's warp events (Platinum's +// res/field/maps/*/events.json; BDSP keeps DP's layout): the city's five +// warp tiles lead to the hall's three 2-1-2, the hall's back a column +// each, and the coal room's warp to the hall's column 12. +struct WarpLink{ + std::string from_map; + TilePos from; + std::string to_map; + TilePos to; +}; +const WarpLink MINE_WARPS[] = { + {"OreburghCity", {44, 59}, "OreburghMineB1F", {11, 1}}, + {"OreburghCity", {45, 59}, "OreburghMineB1F", {11, 1}}, + {"OreburghCity", {46, 59}, "OreburghMineB1F", {12, 1}}, + {"OreburghCity", {47, 59}, "OreburghMineB1F", {13, 1}}, + {"OreburghCity", {48, 59}, "OreburghMineB1F", {13, 1}}, + {"OreburghMineB1F", {11, 1}, "OreburghCity", {45, 59}}, + {"OreburghMineB1F", {12, 1}, "OreburghCity", {46, 59}}, + {"OreburghMineB1F", {13, 1}, "OreburghCity", {47, 59}}, + {"OreburghMine", {15, 1}, "OreburghMineB1F", {12, 21}}, +}; + +// Oreburgh's Hiker, who wanders (46..48, 25..27) from (47, 26) on the +// Diamond decomp's map: across column 46, the walk north to the Center. +SimWanderer oreburgh_hiker(uint64_t seed, Milliseconds start){ + const StoryWorld& city = *story_plan_world("OreburghCity", "OreburghCity"); + const TilePos first = story_to_world(city, "OreburghCity", {46, 25}); + const TilePos last = story_to_world(city, "OreburghCity", {48, 27}); + return {.name = "hiker_0", .box = {first.x, first.y, last.x, last.y}, .pos = story_to_world(city, "OreburghCity", {47, 26}), + .seed = seed, .step_interval = 2000ms, .time_offset = start}; +} + +// Puts the player on `map`'s `start` and walks north to a warp, then puts +// them where it lands, with `wanderers` about. Returns where, on which map. +std::pair warp_north(GridSim& sim, const std::string& map, const TilePos& start, std::vector wanderers = {}){ + const StoryWorld& from = *story_plan_world(map, map); + sim.place({.world = &from}, story_to_world(from, map, start), Direction::NORTH); + if (sim.hold(Direction::NORTH, 20000ms, SimPace::WALK).stop != SimStop::WARP){ + throw GridSimFailure{std::format("no warp north of {} on {}", Pokemon::to_string(start), map)}; + } + const std::optional warp = story_to_local(from, map, *sim.player().warped); + for (const WarpLink& link : MINE_WARPS){ + if (link.from_map == map && warp == link.from){ + const StoryWorld& to = *story_plan_world(link.to_map, link.to_map); + sim.place({.world = &to, .trainers = story_trainers(to), .wanderers = std::move(wanderers)}, + story_to_world(to, link.to_map, link.to), Direction::NORTH); + return std::pair{link.to_map, link.to}; + } + } + throw GridSimFailure{std::format("no warp known at {} on {}", warp ? Pokemon::to_string(*warp) : "?", map)}; +} + +// A LEGS step on Oreburgh City, after which the player stands on one of +// `end` facing `facing` (nowhere said if `end` is empty). +Pokemon::StoryStep city_legs(std::string_view name, std::vector legs, std::string_view variant, + std::vector end = {}, Direction facing = Direction::NORTH +){ + Pokemon::StoryStep out; + out.kind = Pokemon::StoryStepKind::LEGS; + out.name = name; + out.action = variant; + out.args["legs"] = std::move(legs); + out.args["fight_wild"] = false; + if (!end.empty()){ + out.pose_after = Pokemon::TileDeclared{.map = "OreburghCity", .tiles = std::move(end), .facing = facing}; + } + return out; +} +// A planned route on Oreburgh City to `target`, facing `facing`. +Pokemon::StoryStep city_route(std::string_view name, TilePos target, Direction facing){ + Pokemon::StoryStep out; + out.kind = Pokemon::StoryStepKind::ROUTE; + out.name = name; + out.action = "town"; + const GridPose gp{.map = "OreburghCity", .tiles = {target}, .facing = facing}; + out.args["target"] = gp; + out.args["fight_wild"] = false; + out.pose_after = Pokemon::TileDeclared{.map = gp.map, .tiles = gp.tiles, .facing = gp.facing}; + return out; +} + +using CitySteps = std::pair>; + +// 01.03 out of the mine as the table had it before lab-B 2026-11-08: from +// the city's (45, 59) north against the mine's sign (45, 56), a route to +// below the Center's door (47, 21), a tap south, the walls east and north +// of (48, 22), and a tap west. +CitySteps old_steps_out_of_the_mine(){ + Pokemon::StoryStep route = city_route("below_the_centers_door_again", {47, 21}, Direction::NORTH); + route.pose_after.reset(); + return {Pokemon::tile_pose("OreburghCity", {TilePos{45, 59}, TilePos{45, 58}}, Direction::NORTH), { + city_legs("up_to_the_mines_sign", {{.direction = Direction::NORTH, .tiles = 3}}, "to_wall", {{45, 57}}), + route, + city_legs("south_of_the_centers_door", {{.direction = Direction::SOUTH, .tiles = 1}}, ""), + city_legs("against_the_walls_east_of_the_door", {{.direction = Direction::EAST, .tiles = 3}, {.direction = Direction::NORTH, .tiles = 1}}, + "to_wall", {{48, 21}}), + city_legs("below_the_centers_door_lined_up", {{.direction = Direction::WEST, .tiles = 1}}, "", {{47, 21}}), + }}; +} +// 01.03 out of the mine as the table had it at lab-B 2026-11-08 13:50: pin +// the column against the walls east of the mine, route to the street west +// of the door, (44, 22), and line up against the walls east and north of +// (48, 22). Its route goes round the Hiker's rows west of column 46. +CitySteps previous_steps_out_of_the_mine(){ + return {Pokemon::tile_pose("OreburghCity", {TilePos{46, 59}, TilePos{45, 59}, TilePos{47, 59}, TilePos{46, 58}, TilePos{45, 58}, TilePos{47, 58}}, + Direction::NORTH), { + city_legs("off_the_mines_warp_tiles", {{.direction = Direction::NORTH, .tiles = 1}}, ""), + city_legs("east_of_the_mine", {{.direction = Direction::EAST, .tiles = 4}}, "to_wall", {{48, 58}, {49, 57}}, Direction::EAST), + city_legs("north_of_row_58", {{.direction = Direction::NORTH, .tiles = 1}}, ""), + city_legs("against_the_walls_east_of_the_mine", {{.direction = Direction::EAST, .tiles = 1}, {.direction = Direction::SOUTH, .tiles = 1}}, + "to_wall", {{49, 57}}, Direction::SOUTH), + city_route("west_of_the_centers_door", {44, 22}, Direction::WEST), + city_legs("against_the_walls_east_of_the_door", {{.direction = Direction::EAST, .tiles = 4}, {.direction = Direction::NORTH, .tiles = 1}}, + "to_wall", {{48, 21}}), + city_legs("below_the_centers_door_lined_up", {{.direction = Direction::WEST, .tiles = 1}}, "", {{47, 21}}), + }}; +} +// The table's 01.03 steps out of the mine, from where it has us on the +// city to below the Center's door. +CitySteps table_steps_out_of_the_mine(){ + std::vector steps; + for (const Pokemon::StoryCheckpoint& checkpoint : story_checkpoints()){ + bool on = false; + for (const Pokemon::StoryStep& step : checkpoint.steps){ + on = checkpoint.id == "01.03" && step.name != "heal_oreburgh" && (on || step.name == "out_of_the_mine"); + if (on && step.name != "out_of_the_mine"){ + steps.push_back(step); + } + } + } + return {Pokemon::pose_of(*story_step("01.03", "out_of_the_mine").pose_after), steps}; +} + +// OvershootingRouteIO that keeps where each walk and tap left the player. +class TracingRouteIO : public OvershootingRouteIO{ +public: + TracingRouteIO(GridSim& sim, std::vector& notes) + : OvershootingRouteIO(sim, notes, {}), m_sim(sim) + {} + virtual WalkResult walk_to_wall(const RouteWallWalk& walk) override{ + const WalkResult result = OvershootingRouteIO::walk_to_wall(walk); + m_trail.push_back(m_sim.player().pos); + return result; + } + virtual WalkResult walk_taps(Direction direction, size_t tiles, const std::string& label) override{ + const WalkResult result = OvershootingRouteIO::walk_taps(direction, tiles, label); + m_trail.push_back(m_sim.player().pos); + return result; + } + void mark(){ + m_trail.push_back(m_sim.player().pos); + } + const std::vector& trail() const{ + return m_trail; + } +private: + GridSim& m_sim; + std::vector m_trail; +}; + +// How `steps` went: why they did not end on (47, 21) with the Center's +// door north ("" if they did), and whether the walk stood west of column +// 46 on the way. +struct CenterWalk{ + std::string miss; + bool west_of_column_46 = false; +}; +bool went_west_of_column_46(const StoryWorld& city, const std::vector& trail){ + return std::any_of(trail.begin(), trail.end(), [&city](const SimPos& pos){ + const std::optional tile = story_to_local(city, "OreburghCity", nearest_tile(pos)); + return tile && tile->x < 46; + }); +} +std::string walk_city_steps(StoryWalkSteps& walks, TracingRouteIO& route, const CitySteps& steps, Logger& logger){ + Pokemon::RunState state{.pose = steps.first, .flags = {}}; + std::string ends; + for (const Pokemon::StoryStep& step : steps.second){ + const Pokemon::Outcome outcome = step.kind == Pokemon::StoryStepKind::ROUTE ? walks.route(state, step) : walks.legs(state, step); + route.mark(); + ends += std::format(" {} {}", step.name, to_string(route.trail().back())); + if (!outcome.succeeded()){ + return step.name + ": " + Pokemon::to_string(outcome); + } + state.pose = step.pose_after ? Pokemon::pose_of(*step.pose_after) : outcome.pose ? *outcome.pose : state.pose; + } + logger.log(" " + ends); + return ""; +} +// Walks `steps` on `sim` from where the player stands, the table having +// them on `steps.first`, with open legs overshooting. +CenterWalk center_walk(GridSim& sim, const CitySteps& steps, Logger& logger){ + std::vector notes; + TracingRouteIO route(sim, notes); + WallStepIO io(route, sim); + StoryWalkSteps walks(io); + walks.begin_attempt("01.03"); + CenterWalk out; + try{ + out.miss = walk_city_steps(walks, route, steps, logger); + }catch (const GridSimFailure& error){ + out.miss = error.message; + }catch (const Exception& error){ + out.miss = std::string(error.name()) + ": " + error.message(); + } + for (const std::string& note : notes){ + if (note.find("waiting") != std::string::npos || note.find("tiles to the wall") != std::string::npos){ + logger.log(" " + note); + } + } + const StoryWorld& city = sim.world(); + out.west_of_column_46 = went_west_of_column_46(city, route.trail()); + if (!out.miss.empty()){ + return out; + } + if (story_to_local(city, "OreburghCity", nearest_tile(sim.player().pos)) != TilePos{47, 21} || !on_grid(sim.player().pos)){ + out.miss = std::format("ended at {}, not on (47, 21).", to_string(sim.player().pos)); + }else if (sim.hold(Direction::NORTH, 3000ms, SimPace::RUN).stop != SimStop::WARP){ + out.miss = "no door north of (47, 21)."; + } + return out; +} + +// lab-B 2026-11-08 (09:46, 10:39, 12:03): out of the mine, the walk north +// to the mine's sign never stopped on it, and the route after went up the +// wrong column; at 12:04 it ran through the Center's door. The coal room's +// warp lands us on the hall's column 12, which comes out on the city's +// (46, 59), east of the sign. At 13:50 the steps that pinned the column +// east of the mine went astray too: the hold east from (48, 57) moved 0 +// where the map has (49, 57) open. The table now runs straight north up +// column 46 to the wall at (46, 20), waiting for Oreburgh's Hiker when he +// wanders into the column, and taps east below the door. From the hall's +// column 12, with or without a tile past the fade, and with the Hiker at +// any seed and start time, its steps must end below the door, (47, 21), +// and walk in, never west of column 46. From the hall's other columns the +// count north is far off the map's and the walk must fail. +enum class MineExitSteps{ OLD, PREVIOUS, TABLE }; +struct MineExitInput{ + std::string name; + int hall_column = 12; + bool past_the_fade = false; + MineExitSteps steps = MineExitSteps::TABLE; + // Every seed and start time of the Hiker's, not just the first. + bool every_hiker = false; +}; +struct MineExitExpectation{ + bool below_the_door = true; + std::optional west_of_column_46 = false; +}; +struct MineExitCase{ + MineExitInput input; + MineExitExpectation expectation; +}; +class Test_MineExit : public UnitTest{ +public: + explicit Test_MineExit(MineExitCase data) + : UnitTest("PokemonBDSP::AutoStory - Recovery walk: 01.03 out of the mine on the decomp's warps, " + data.input.name) + , m_case(std::move(data)) + {} + virtual UnitTestResult run(Logger& logger, CancellableScope&) const override{ + const std::vector seeds = m_case.input.every_hiker ? std::vector{0, 1, 2, 7, 42, 100, 999, 1337} : std::vector{0}; + const std::vector starts = m_case.input.every_hiker + ? std::vector{0ms, 500ms, 1200ms, 2000ms, 3500ms, 5000ms} : std::vector{0ms}; + for (uint64_t seed : seeds){ + for (Milliseconds start : starts){ + const std::string failure = run_once(oreburgh_hiker(seed, start), logger); + if (!failure.empty()){ + return std::format("the Hiker's seed {}, {} ms in: {}", seed, start.count(), failure); + } + } + } + return true; + } +private: + CitySteps steps() const{ + switch (m_case.input.steps){ + case MineExitSteps::OLD: + return old_steps_out_of_the_mine(); + case MineExitSteps::PREVIOUS: + return previous_steps_out_of_the_mine(); + case MineExitSteps::TABLE: + break; + } + return table_steps_out_of_the_mine(); + } + std::string run_once(const SimWanderer& hiker, Logger& logger) const{ + CenterWalk walk; + try{ + const StoryWorld& room = *story_plan_world("OreburghMine", "OreburghMine"); + GridSim sim({.world = &room}, story_to_world(room, "OreburghMine", {15, 2}), Direction::NORTH, true); + const TilePos hall = warp_north(sim, "OreburghMine", {15, 2}).second; + const TilePos out = warp_north(sim, "OreburghMineB1F", {m_case.input.hall_column, hall.y}, {hiker}).second; + if (m_case.input.past_the_fade){ + sim.tap(Direction::NORTH, route_ms_per_tile(Direction::NORTH, MoveSpeed::WALK), false); + } + walk = center_walk(sim, steps(), logger); + logger.log(std::format("Coal room to the hall's {}, up column {} to the city's {}: {}{}", Pokemon::to_string(hall), + m_case.input.hall_column, Pokemon::to_string(out), walk.miss.empty() ? "below the door" : walk.miss, + walk.west_of_column_46 ? ", west of column 46 on the way" : "")); + }catch (const GridSimFailure& error){ + walk.miss = error.message; + } + if (walk.miss.empty() != m_case.expectation.below_the_door){ + return walk.miss.empty() ? "Reached below the door: the test no longer shows the console's failure." : walk.miss; + } + if (m_case.expectation.west_of_column_46 && walk.west_of_column_46 != *m_case.expectation.west_of_column_46){ + return walk.west_of_column_46 ? "The walk went west of column 46." : "The walk stayed on column 46 and east."; + } + return ""; + } + + MineExitCase m_case; +}; + +const MineExitCase MINE_EXIT_CASES[] = { + {.input = {.name = "old steps from the hall's column 12", .hall_column = 12, .steps = MineExitSteps::OLD}, + .expectation = {.below_the_door = false, .west_of_column_46 = std::nullopt}}, + {.input = {.name = "old steps from the hall's column 13", .hall_column = 13, .steps = MineExitSteps::OLD}, + .expectation = {.below_the_door = false, .west_of_column_46 = std::nullopt}}, + // The steps of 13:50 reach the door on the map, round the Hiker's rows + // to the west. + {.input = {.name = "13:50's steps from the hall's column 12", .hall_column = 12, .steps = MineExitSteps::PREVIOUS}, + .expectation = {.below_the_door = true, .west_of_column_46 = true}}, + {.input = {.name = "from the hall's column 12", .hall_column = 12}, .expectation = {}}, + {.input = {.name = "from the hall's column 12, a tile past the fade", .hall_column = 12, .past_the_fade = true}, .expectation = {}}, + {.input = {.name = "from the hall's column 12, the Hiker at every seed and start time", .hall_column = 12, .every_hiker = true}, + .expectation = {}}, + {.input = {.name = "from the hall's column 12, a tile past the fade, the Hiker at every seed and start time", .hall_column = 12, + .past_the_fade = true, .every_hiker = true}, .expectation = {}}, + // Off column 46 the run north is not the map's 37 or 38 tiles: up + // column 45 it stops at the mine's sign, up column 47 it goes through + // the Center's door. + {.input = {.name = "from the hall's column 11", .hall_column = 11}, + .expectation = {.below_the_door = false, .west_of_column_46 = std::nullopt}}, + {.input = {.name = "from the hall's column 13", .hall_column = 13}, + .expectation = {.below_the_door = false, .west_of_column_46 = std::nullopt}}, +}; + +// A wild battle after `tiles` tiles of the first walk north longer than +// that, tapped or run until a banner (none if 0); the walk goes on after +// it, as walk_tiles_dpad() and walk_until_dpad() go on after running. +class ColumnBattle{ +public: + ColumnBattle(std::vector& notes, size_t tiles) : m_notes(notes), m_tiles(tiles){} + size_t tiles() const{ return m_tiles; } + // Whether the battle comes after `tile` tiles of a walk of `tiles` `direction`. + bool after(Direction direction, size_t tiles, size_t tile){ + if (m_taken || m_tiles == 0 || direction != Direction::NORTH || tiles <= m_tiles || tile != m_tiles){ + return false; + } + m_taken = true; + m_notes.push_back(std::format("[Sim] a wild battle after {} tiles north.", tile)); + return true; + } +private: + std::vector& m_notes; + size_t m_tiles; + bool m_taken = false; +}; + +class ColumnBattleRouteIO : public GridSimRouteIO{ +public: + ColumnBattleRouteIO(GridSim& sim, std::vector& notes, ColumnBattle& battle) + : GridSimRouteIO(sim, notes), m_battle(battle) + {} + virtual WalkResult walk_taps(Direction direction, size_t tiles, const std::string& label) override{ + if (!m_battle.after(direction, tiles, m_battle.tiles())){ + return GridSimRouteIO::walk_taps(direction, tiles, label); + } + WalkResult result = GridSimRouteIO::walk_taps(direction, m_battle.tiles(), label); + const WalkResult rest = GridSimRouteIO::walk_taps(direction, tiles - m_battle.tiles(), label); + result.stop = rest.stop; + result.walked += rest.walked; + result.moved_chunks += rest.moved_chunks; + result.wild_battles++; + return result; + } +private: + ColumnBattle& m_battle; +}; + +// RecoveryStepIO that also runs until a map's banner: it reads +// SIM_BANNER_TILES into the map, as the story simulation's does, or where +// something stops the run on it. +class BannerStepIO : public RecoveryStepIO{ +public: + static constexpr size_t SIM_BANNER_TILES = 3; + BannerStepIO(RouteIO& route, GridSim& sim, ColumnBattle& battle) : RecoveryStepIO(route), m_sim(sim), m_battle(battle){} + virtual bool run_until_map(Direction direction, Milliseconds limit, const std::string& map, const std::string&) override{ + size_t on = 0; + size_t tiles = 0; + for (Milliseconds ran = 0ms; ran < limit; ran += ROUTE_RUN_MS_PER_TILE_ACROSS){ + m_battle.after(direction, SIZE_MAX, tiles); + const SimMove move = m_sim.tap(direction, ROUTE_MS_PER_TILE_ACROSS, false); + tiles++; + const bool stopped = move.distance == 0 || move.stop != SimStop::DONE; + on = story_to_local(m_sim.world(), map, nearest_tile(m_sim.player().pos)) ? on + 1 : 0; + if (on > 0 && (on >= SIM_BANNER_TILES || stopped)){ + return true; + } + if (stopped){ + return false; + } + } + return false; + } +private: + GridSim& m_sim; + ColumnBattle& m_battle; +}; + +// 01.10's last stretch, north up column 11 from (11, 12) through the grass +// on (11, 5..11) into Floaroma (lab-B 2026-11-08 18:17:53): a wild battle +// on "north 7 (open)" to (11, 5) left (11, 5..12), and no plan came, for +// column 11 has no wall to the north and no other wall brings those tiles +// together. The table's steps after line 6, with a wild battle the input's +// tiles up, must end in Floaroma where the row's last walk says. +struct LineSevenInput{ + std::string name; + size_t battle_after_tiles = 0; +}; +struct LineSevenExpectation{ +}; +struct LineSevenCase{ + LineSevenInput input; + LineSevenExpectation expectation; +}; + +UnitTestResult test_line_7_battle_reaches_floaroma(Logger& logger, const LineSevenInput& input){ + const StoryWorld& world = *story_plan_world("Route204North", "FloaromaTown"); + GridSim sim({.world = &world}, story_to_world(world, "Route204North", {11, 12}), Direction::WEST, true); + std::vector notes; + ColumnBattle battle(notes, input.battle_after_tiles); + ColumnBattleRouteIO route(sim, notes, battle); + BannerStepIO io(route, sim, battle); + StoryWalkSteps walks(io); + walks.begin_attempt("01.10"); + Pokemon::RunState state{.pose = Pokemon::tile_pose("Route204North", {{11, 12}}, Direction::WEST), .flags = {}}; + std::string failure; + std::optional last; + try{ + bool after_line_6 = false; + for (const Pokemon::StoryCheckpoint& checkpoint : story_checkpoints()){ + for (const Pokemon::StoryStep& step : checkpoint.id == "01.10" ? checkpoint.steps : std::vector{}){ + const bool walks_here = after_line_6 && (step.kind == Pokemon::StoryStepKind::ROUTE || step.kind == Pokemon::StoryStepKind::LEGS); + after_line_6 |= step.name == "line_6"; + if (!walks_here || !failure.empty()){ + continue; + } + const Pokemon::Outcome outcome = step.kind == Pokemon::StoryStepKind::ROUTE ? walks.route(state, step) : walks.legs(state, step); + failure = outcome.failure; + last = step.pose_after ? Pokemon::pose_of(*step.pose_after) + : step.args.contains("target") ? Pokemon::pose_of(story_arg(step.args, "target")) : last; + state.pose = outcome.pose ? *outcome.pose : *last; + logger.log(std::format("01.10 {} ended at {}.", step.name, to_string(sim.player().pos))); + } + } + }catch (const GridSimFailure& error){ + failure = error.message; + } + for (const std::string& note : notes){ + logger.log(note); + } + if (!failure.empty() || !last){ + return "01.10 after line 6: " + (failure.empty() ? std::string("no walk") : failure); + } + const std::vector tiles = Pokemon::tiles_of(*last); + const auto end = story_to_local(world, last->map, nearest_tile(sim.player().pos)); + if (!end || std::find(tiles.begin(), tiles.end(), *end) == tiles.end()){ + return std::format("01.10 ended at {}, not on {}.", to_string(sim.player().pos), Pokemon::to_string(*last)); + } + if (last->map != "FloaromaTown"){ + return "01.10 ends on " + last->map + ", not in Floaroma."; + } + return true; +} + +class Test_LineSevenBattle : public UnitTest{ +public: + explicit Test_LineSevenBattle(LineSevenCase data) + : UnitTest("PokemonBDSP::AutoStory - Recovery walk: 01.10 into Floaroma, " + data.input.name), m_case(std::move(data)) + {} + virtual UnitTestResult run(Logger& logger, CancellableScope&) const override{ + return test_line_7_battle_reaches_floaroma(logger, m_case.input); + } +private: + LineSevenCase m_case; +}; + +const LineSevenCase LINE_SEVEN_CASES[] = { + {.input = {.name = "no battle", .battle_after_tiles = 0}, .expectation = {}}, + {.input = {.name = "a wild battle 3 tiles up (lab-B, 2026-11-08)", .battle_after_tiles = 3}, .expectation = {}}, + {.input = {.name = "a wild battle 6 tiles up", .battle_after_tiles = 6}, .expectation = {}}, +}; + +} // namespace + +void add_tests_AutoStory_RecoveryWalk(UnitTestDatabase& database){ + const RecoveryCase CASES[] = { + {.input = {.name = "uninterrupted native mine step", .taps = {}}, .expectation = {.failure = ""}}, + {.input = {.name = "last tap interrupted before movement", .taps = {5}}, .expectation = {.failure = ""}}, + {.input = {.name = "last tap completed before battle", .taps = {5}, .phase = SimEncounterPhase::AFTER_MOVEMENT}, .expectation = {.failure = ""}}, + {.input = {.name = "two interrupted advances, row 15", .taps = {4, 5}}, .expectation = {.failure = ""}}, + {.input = {.name = "last west leg recovers position and facing", .taps = {9}, .direction = Direction::WEST, .tiles = 9}, .expectation = {.failure = ""}}, + {.input = {.name = "repeat the interrupted recovery hold", .taps = {5}, .interrupted_holds = 1}, .expectation = {.failure = ""}}, + {.input = {.name = "recovery hold budget exhausted", .taps = {5}, .interrupted_holds = 10}, .expectation = {.failure = "recovery budget"}}, + // A second battle, in the recovery walk, on its first tap or hold + // (MC seeds 717266 and 331438): the walk plans again to the step's end. + {.input = {.name = "battle on the recovery's first tap", .taps = {5}, .recovery_battle = RecoveryBattle::FIRST_TAP}, .expectation = {.failure = ""}}, + {.input = {.name = "battle on the recovery's first hold", .taps = {5}, .recovery_battle = RecoveryBattle::FIRST_HOLD}, .expectation = {.failure = ""}}, + // A battle that may have begun before the leg: localized from the + // leg's tiles all the same, and re-planned to the step's end. + {.input = {.name = "first input may belong to previous leg", .taps = {1}}, .expectation = {.failure = ""}}, + {.input = {.name = "late encounter origin unknown", .taps = {5}, .origin = WalkOrigin::MAY_PRECEDE_LEG}, .expectation = {.failure = ""}}, + }; + for (const RecoveryCase& scenario : CASES){ + database.add(scenario); + } + const PlacedBattleCase PLACED_CASES[] = { + {.input = {.name = "tap 3", .tap = 3, .phase = SimEncounterPhase::AFTER_MOVEMENT}, .expectation = {.tiles_in = 14}}, + {.input = {.name = "tap 7, before it moved", .tap = 7, .phase = SimEncounterPhase::BEFORE_MOVEMENT}, .expectation = {.tiles_in = 13}}, + {.input = {.name = "the last tap", .tap = 14, .phase = SimEncounterPhase::AFTER_MOVEMENT}, .expectation = {.tiles_in = 14}}, + }; + for (const PlacedBattleCase& scenario : PLACED_CASES){ + database.add(scenario); + } + for (const CornerCase& scenario : CORNER_CASES){ + database.add(scenario); + } + for (const MineExitCase& scenario : MINE_EXIT_CASES){ + database.add(scenario); + } + for (const LineSevenCase& scenario : LINE_SEVEN_CASES){ + database.add(scenario); + } +} +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_RecoveryWalk_Tests.h b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_RecoveryWalk_Tests.h new file mode 100644 index 0000000000..9ee770013b --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_RecoveryWalk_Tests.h @@ -0,0 +1,15 @@ +/* BDSP Recovery Walk Tests + * From: https://github.com/PokemonAutomation/ + */ +#ifndef PokemonAutomation_PokemonBDSP_AutoStory_RecoveryWalk_Tests_H +#define PokemonAutomation_PokemonBDSP_AutoStory_RecoveryWalk_Tests_H +#include "Common/Cpp/TestRunners/UnitTestDatabase.h" +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ +// Register mine interruption, localization and bounded recovery scenarios. +void add_tests_AutoStory_RecoveryWalk(UnitTestDatabase& database); +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation +#endif diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryTable_Tests.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryTable_Tests.cpp index c15cbd44ae..2504429e02 100644 --- a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryTable_Tests.cpp +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryTable_Tests.cpp @@ -91,8 +91,8 @@ UnitTestResult test_story_table_lints(Logger&){ } } } - if (!ids.contains("00.00") || !ids.contains("00.05c") || story_checkpoints().front().on_failure != StoryFailure::STOP){ - return "Expected 00.00 (which stops on a failure) to 00.05c."; + if (!ids.contains("00.00") || !ids.contains("01.11") || story_checkpoints().front().on_failure != StoryFailure::STOP){ + return "Expected 00.00 (which stops on a failure) to 01.11."; } return true; } @@ -137,6 +137,66 @@ UnitTestResult test_story_table_rows_join(Logger&){ return true; } +// 01.02: a scene's trigger on an open row is reached by walking toward it +// until the scene starts, not by a localizing detour (south, east to a +// rock, north) to a tile beside the trigger and a step onto it (the +// user's rule, 2026-11-12). The Gate's hikers (trigger (7, 22)) and the +// city's welcome guide (trigger (10, 12..15)) are each one "into_scene" +// route that runs east along the row it arrives on. +UnitTestResult test_oreburgh_scenes_are_walked_into(Logger&){ + for (const StoryCheckpoint& row : story_checkpoints()){ + if (row.id != "01.02"){ + continue; + } + size_t found = 0; + for (size_t i = 0; i < row.steps.size(); i++){ + const Pokemon::StoryStep& step = row.steps[i]; + if (step.name.starts_with("west_of_") || step.name.ends_with("_trigger") || step.name == "welcome_trigger"){ + return std::format("{} {}: a detour to land beside the trigger.", row.id, step.name); + } + if (step.name != "the_hiker" && step.name != "oreburgh_welcome"){ + continue; + } + found++; + const Pokemon::StoryStep& walk = row.steps[i - 1]; + if (walk.kind != StoryStepKind::ROUTE || walk.action != ROUTE_INTO_SCENE){ + return std::format("{}: the step before is {}, not an into_scene route.", step.name, walk.name); + } + const auto& legs = story_arg>(walk.args, "legs"); + if (legs.size() != 1 || legs.front().direction != Direction::EAST){ + return std::format("{}: {} does not run one leg east.", step.name, walk.name); + } + } + return found == 2 ? UnitTestResult(true) : UnitTestResult("01.02 has no hikers and welcome scenes."); + } + return "No 01.02."; +} + +// 01.03's doors into and out of the mine have no text on the far side: they +// settle as a door (the fade back up and a short still spell), not by B +// through the cave's ambient motion for 15 s (lab-B 2026-11-12 21:57, +// into_the_mine 18 s and into_the_coal_room 16.7 s). +UnitTestResult test_mine_doors_settle_as_doors(Logger&){ + for (const StoryCheckpoint& row : story_checkpoints()){ + if (row.id != "01.03"){ + continue; + } + size_t found = 0; + for (const Pokemon::StoryStep& step : row.steps){ + if (step.name == "into_the_mine" || step.name == "into_the_coal_room" || + step.name == "up_to_the_hall" || step.name == "out_of_the_mine" + ){ + found++; + if (step.action != "door"){ + return step.name + ": not a \"door\" step, so it settles as a talk."; + } + } + } + return found == 4 ? UnitTestResult(true) : UnitTestResult("01.03 lacks a mine door step."); + } + return "No 01.03."; +} + struct LadyLeg{ Direction direction; size_t tiles; // 0: walk until the wall @@ -610,6 +670,37 @@ UnitTestResult test_no_wall_and_back_after_taps(Logger& logger){ return found.empty() ? UnitTestResult(true) : UnitTestResult("a wall and back after a tapped leg:" + out); } +// 01.08's walk below the Ravaged Path keeps off the row Route 204 South's +// youngster_3 wanders, (12, 2) to (14, 2): on lab-B (2026-11-08) the plan +// "north 35 (to wall) to (13, 2), west 2 (to wall) to (11, 2)" walked along +// it, and he stopped the leg west twice. A leg may cross his row through +// one of his tiles, not walk two of them. +UnitTestResult test_ravaged_path_keeps_off_the_youngster(Logger& logger){ + for (const PlannedStoryRoute& route : plan_story_routes(logger)){ + if (route.name != "01.08 below_the_ravaged_path"){ + continue; + } + if (!route.legs){ + return "01.08 below_the_ravaged_path: no plan."; + } + const StoryWorld& world = *route.world; + for (const PlannedLeg& planned : *route.legs){ + logger.log("01.08 below_the_ravaged_path: " + to_string(planned)); + } + const auto youngster_row = [&](const TilePos& pos){ + const std::optional local = story_to_local(world, "Route204South", pos); + return local && local->y == 2 && local->x >= 12 && local->x <= 14; + }; + const auto [most, leg] = most_zone_tiles(world, route.from, *route.legs, youngster_row); + if (most >= 2){ + return std::format("the leg {} walks {} tiles of the youngster's row (12..14, 2).", leg, most); + } + return true; + } + return "01.08 below_the_ravaged_path is not a ROUTE step from a known place."; +} + + // The route plan dump: every table ROUTE step's legs, in a golden file // beside the story data, so a planner or table change shows its plans' diff // in review. @@ -1025,6 +1116,10 @@ const AutoStoryStoryTableCase AUTO_STORY_STORY_TABLE_CASES[] = { .input = {"no run to a wall and back after a tapped leg (00.05c east 19, south 15, north 1, lab-B 2026-11-12 14:24)", test_no_wall_and_back_after_taps}, .expectation = {}, }, + { + .input = {"01.08: the walk below the Ravaged Path keeps off the youngster's row (lab-B, 2026-11-08)", test_ravaged_path_keeps_off_the_youngster}, + .expectation = {}, + }, { .input = {"00.05b, 00.05c: no leg enters a wander zone (lab-B, 2026-11-11)", test_jubilife_routes_cross_no_wander_zone}, .expectation = {}, @@ -1037,6 +1132,14 @@ const AutoStoryStoryTableCase AUTO_STORY_STORY_TABLE_CASES[] = { .input = {"00.05c: a plan from (35, 24), (36, 24) past the woman on row 24 (lab-B, 2026-11-12 02:52)", test_company_clown_after_the_woman_on_row_24}, .expectation = {}, }, + { + .input = {"01.02: the hikers' and the welcome scenes are walked into along their rows, no detour to a tile beside the trigger", test_oreburgh_scenes_are_walked_into}, + .expectation = {}, + }, + { + .input = {"01.03: the mine's doors are \"door\" steps, settled as doors (lab-B 2026-11-12 21:57)", test_mine_doors_settle_as_doors}, + .expectation = {}, + }, { .input = {"Starter RNG handoff: stops after 00.01 saved at the Verity Lakefront", test_plan_story_run_starter_rng}, .expectation = {}, diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_FaultSweep_Tests.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_FaultSweep_Tests.cpp new file mode 100644 index 0000000000..5dc6906357 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_FaultSweep_Tests.cpp @@ -0,0 +1,651 @@ +/* BDSP AutoStory - Fault sweeps on the story simulation + * + * From: https://github.com/PokemonAutomation/ + * + * Each class of failure console B showed, injected at every step of every + * row where the game can cause it, instead of only where it was seen: + * + * - SCENE_END_POSE: a step whose end pose the game sets (a talk, a scene, + * a battle, an event) leaves the player on another walkable tile within + * one of the table's (00.03, lab-B 2026-11-09: Rowan's scene ended a row + * low). SimWorldKnobs::lands. + * - BATTLE_OPENING: a battle's opening is still playing when a step starts + * (00.02's Starly, lab-B 2026-11-09), at each battle step and at each + * step after a walk, which can end in a trainer's sight or in grass. + * SimWorldKnobs::battle_opening_before. + * - GRASS_BATTLES: a wild battle on every pass through tall grass, one + * each 8 grass tiles (00.04, lab-B 2026-11-09 16:14: four in a row on + * Route 201, each replan back through the grass, "too many plans"). + * SimWorldKnobs::grass. One variant a row: the whole row so. + * - SCENE_EARLY: a scene starts early, on the last tiles of the route walk + * before its step, or before the plain step onto its trigger: the + * trigger lies on the way, not where the decomp has it (00.04's Mom's call on + * (6, 9), lab-B 2026-11-09 17:29: the walk took it for a trainer and + * pressed through it). A variant also fails when the walk fights it. + * SimWorldKnobs::scene_at_walk_end. + * - SLOW_FADE_IN: every warp's fade-in runs long, so a move after a fade + * with no settle() between goes nowhere (lab-B 2026-11-10, 00.04b + * heal_sandgem: a fixed 1500 ms wait, then the walk to the nurse + * stopped on "transition"). SimWorldKnobs::slow_fade_in. + * - START_OFFSET: the row's save leaves the player 1 to 3 tiles off its + * declared start, each way the player can walk there (00.05, lab-B + * 2026-11-11 15:22: the route planned open legs from Jubilife's declared + * (48, 62), and its third leg walked into a building). + * SimWorldKnobs::start_at. + * + * Missed and short fades are swept by SimFailureCases_Tests (every single + * missed fade, banner and fade hold). + * A lost tap from the input lockout waits for the measured movement + * table (FRLG #293); FaultClass::LOST_TAP is its slot. + * + * Each row is run clean first; a row that fails clean is not swept. A + * variant fails when the row then fails. A sweep the program fails today + * is on KNOWN_FAILING with its likely fix: its test passes while it still + * fails, and fails once it passes, to be taken off the list. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "Common/Cpp/Exceptions.h" +#include "Common/Cpp/TestRunners/UnitTestDatabase.h" +#include "Pokemon/AutoStory/Pokemon_TilePose.h" +#include "Pokemon/AutoStory/Pokemon_BuiltinStoryActions.h" +#include "Pokemon/AutoStory/Pokemon_StoryCertainty.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryData.h" +#include "Pokemon/Navigation/Pokemon_MapData.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_Maps.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_WalkRules.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryPlaces.h" +#include "PokemonBDSP_AutoStory_StorySim.h" +#include "PokemonBDSP_AutoStory_FaultSweep_Tests.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ + +namespace{ + +using Pokemon::Direction; +using Pokemon::Pose; +using Pokemon::StoryStep; +using Pokemon::StoryStepKind; +using Pokemon::TilePos; + +enum class FaultClass{ + SCENE_END_POSE, + BATTLE_OPENING, + GRASS_BATTLES, + SCENE_EARLY, + SLOW_FADE_IN, + START_OFFSET, + // Not swept yet: the measured movement table's lost taps (#293). + LOST_TAP, +}; +std::string_view fault_class_name(FaultClass fault){ + switch (fault){ + case FaultClass::SCENE_END_POSE: + return "scene end pose"; + case FaultClass::BATTLE_OPENING: + return "battle opening at step start"; + case FaultClass::GRASS_BATTLES: + return "wild battles on every grass pass"; + case FaultClass::SCENE_EARLY: + return "scene starts during the walk before it"; + case FaultClass::SLOW_FADE_IN: + return "slow fade-in after every warp"; + case FaultClass::START_OFFSET: + return "start off its declared tile"; + case FaultClass::LOST_TAP: + return "lost tap"; + } + return "?"; +} + +// The rows swept: those the clean simulation runs (SimFailureCases_Tests). +constexpr std::string_view FIRST_ROW = "00.00"; +constexpr std::string_view LAST_ROW = "01.11"; + +// Sweeps the program fails today, by test name, with the likely fix. +const std::map KNOWN_FAILING{ + {"PokemonBDSP::AutoStory - Fault sweep: 00.01, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 00.02, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 00.03, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 00.04, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 00.04b, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 00.05, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 00.05b, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 00.05c, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 01.01, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 01.02, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 01.02b, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 01.03, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 01.05, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 01.06, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 01.07, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 01.08, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 01.09, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 01.10, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, + {"PokemonBDSP::AutoStory - Fault sweep: 01.11, start off its declared tile", "a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center)"}, +}; + +// Steps that need a surer pose than the steps before them leave, from +// the table before certainty_gaps(): each is to start on a wall leg or +// a landmark, as 00.05's walk to the Center does. +const std::set KNOWN_CERTAINTY_GAPS{ + "00.01 step 1 below_the_flute: needs tile, has set", + "00.01 step 12 into_barrys_house: needs tile, has set", + "00.01 step 19 down_barrys_stairs: needs tile, has set", + "00.01 step 23 barrys_warning: needs tile, has set", + "00.01 step 26 below_the_lake_entrance: needs tile, has set", + "00.01 step 4 down_the_stairs: needs tile, has set", + "00.01 step 6 above_the_door: needs tile, has set", + "00.02 step 1 to_the_lake_entrance: needs tile, has set", + "00.03 step 1 into_rowans_scene: needs tile, has set", + "00.03 step 3 out_of_the_house_again: needs tile, has set", + "00.04 step 1 out_of_the_lab: needs tile, has set", + "00.04 step 18 short_of_the_catch_tutorial: needs tile, has set", + "00.04 step 2 onto_the_path: needs tile, has set", + "00.04 step 5 to_ledge_column: needs tile, has set", + "00.04 step 7 along_route_201_road: needs tile, has set", + "00.04b step 1 to_catch_grass: needs tile, has set", + "00.04b step 3 into_sandgem: needs tile, has set", + "00.04d step 1 north_to_jubilife: needs tile, has set", + "00.05 step 10 barry: needs tile, has unknown", + "00.05 step 12 out_of_the_school: needs tile, has set", + "00.05b step 1 below_the_presidents_trigger: needs tile, has set", + "00.05b step 10 below_the_company_clown: needs tile, has set", + "00.05b step 4 past_the_president: needs tile, has set", + "00.05c step 6 below_the_east_exit_sign: needs tile, has set", + "01.01 step 2 west_of_barrys_trigger: needs tile, has set", + "01.02 step 1 south_to_the_cliff: needs tile, has set", + "01.02 step 4 into_the_hikers_scene: needs tile, has set", + "01.02 step 6 past_curtis: needs tile, has set", + "01.02 step 9 into_the_welcome_scene: needs tile, has set", + "01.02b step 2 barry: needs tile, has set", + "01.02b step 4 below_the_centers_door: needs tile, has set", + "01.03 step 1 above_the_mine: needs tile, has set", + "01.03 step 11 up_to_the_hall: needs tile, has set", + "01.03 step 15 heal_oreburgh: needs tile, has set", + "01.03 step 8 roark: needs tile, has set", + "01.05 step 2 east_of_barrys_trigger: needs tile, has set", + "01.05 step 8 through_the_gate: needs tile, has set", + "01.06 step 1 up_jubilifes_road: needs tile, has set", + "01.07 step 1 rowans_trigger: needs tile, has set", + "01.08 step 1 west_to_the_wall: needs tile, has set", + "01.09 step 1 west_of_the_rock: needs tile, has set", + "01.09 step 3 above_the_way_out: needs tile, has set", + "01.10 step 1 line_1: needs tile, has set", + "01.11 step 7 old_man: needs tile, has set", +}; + +// Scenes whose end the console has proven, by step name: the sweep leaves +// them out, as the tiles next to it are not where the game leaves us. +const std::map PROVEN_SCENE_ENDS{ + // Mom's Running Shoes scene: (6, 8) facing east in 7 of 7 runs stopped + // right after it (lab-B 2026-11-09). The rows 7, 9 and 10 seen before + // were our input landing in its closing fade, now waited out. + {"rowan_and_dawn", "lab-B 2026-11-09, 7 of 7 runs on (6, 8)"}, +}; + +// A talk that walks to its end itself: wait_for_wanderer counts its taps +// along one column and ends with taps into two walls that must not move, +// so a tile beside its end fails the step on the console. +constexpr std::string_view WALKS_TO_ITS_END = "wait_for_wanderer"; + +// Runs row `row` with `knobs`: "" if it passes, else where and why it stopped. +std::string run_row(Logger& logger, const std::string& row, SimWorldKnobs knobs){ + SimExecutor executor(logger, {.fade = {}, .banner = {}}, std::move(knobs)); + const Pokemon::SegmentReport report = run_rows_on(executor, logger, {.from = row, .to = row}); + return report.completed ? "" : std::format("stopped in {}: {}", executor.result().failed_step, executor.result().error); +} + +// Whether the game, not our walking, sets where `kind` ends. +bool game_sets_end(StoryStepKind kind){ + switch (kind){ + case StoryStepKind::NEW_GAME: + case StoryStepKind::TALK: + case StoryStepKind::ANSWER: + case StoryStepKind::MASH: + case StoryStepKind::BATTLE: + case StoryStepKind::GAME: + return true; + default: + return false; + } +} +bool walks(StoryStepKind kind){ + return kind == StoryStepKind::ROUTE || kind == StoryStepKind::LEGS || kind == StoryStepKind::STEP; +} +// Whether row `row` run clean up to its step `c` leaves the player on one +// of `pose`'s tiles: a talk, a trainer's battle or a scene that only turns +// the player ends where our walk did, so its end is not the game's. +bool already_there(Logger& logger, const StoryCheckpoint& row, size_t c, const Pose& pose){ + StoryCheckpoint head = row; + head.steps.resize(c); + SimExecutor executor(logger, {.fade = {}, .banner = {}}, {}); + if (!run_rows_on(executor, logger, {.from = row.id, .to = row.id}, {head}).completed || executor.result().world == nullptr){ + return false; + } + const SimRun& run = executor.result(); + for (const TilePos& tile : Pokemon::tiles_of(pose)){ + try{ + if (story_to_world(*run.world, pose.map, tile) == run.end){ + return true; + } + }catch (const InternalProgramError&){} + } + return false; +} +// Whether walk `step` ends where a battle can start: on a route (grass, a +// trainer's sight) or in a cave. Towns and rooms have neither. +bool wild_or_trainers(const StoryStep& step){ + std::string map; + if (step.pose_after){ + map = Pokemon::grid_pose_of(*step.pose_after).map; + }else if (step.args.contains("target")){ + map = Pokemon::story_arg(step.args, "target").map; + }else{ + return true; + } + for (std::string_view place : {"Route", "Gate", "Mine", "RavagedPath"}){ + if (map.find(place) != std::string::npos){ + return true; + } + } + return false; +} + +// The tiles within one of `center`, diagonals too, that the player can +// reach from it in one or two steps, and not in `seen`: where a scene can +// leave them instead. A tile behind a wall is not one, nor a door's: a +// step onto it goes through (00.04's moms_hat by the house's door). +// The tile next to `tile` toward `direction`. +TilePos step_from(const TilePos& tile, Direction direction){ + switch (direction){ + case Direction::NORTH: + return TilePos{tile.x, tile.y - 1}; + case Direction::SOUTH: + return TilePos{tile.x, tile.y + 1}; + case Direction::WEST: + return TilePos{tile.x - 1, tile.y}; + default: + return TilePos{tile.x + 1, tile.y}; + } +} + +void walkable_neighbors(const StoryWorld* world, const Pose& pose, const TilePos& center, std::set>& seen, std::vector& out){ + const auto step = [](const TilePos& tile, Direction direction){ + switch (direction){ + case Direction::NORTH: + return TilePos{tile.x, tile.y - 1}; + case Direction::SOUTH: + return TilePos{tile.x, tile.y + 1}; + case Direction::WEST: + return TilePos{tile.x - 1, tile.y}; + default: + return TilePos{tile.x + 1, tile.y}; + } + }; + const auto can_step = [&](const TilePos& from, Direction direction){ + GridSim sim(SimWorld{.world = world}, story_to_world(*world, pose.map, from), direction, false); + return detail::sim_can_step(sim, direction); + }; + const Pokemon::MapData& map = story_map(pose.map); + const auto add = [&](const TilePos& tile){ + if (map.tiles.at(tile) == Pokemon::TileKind::DOOR){ + return; + } + if (seen.insert({tile.x, tile.y}).second){ + out.push_back(tile); + } + }; + const Direction all[] = {Direction::NORTH, Direction::SOUTH, Direction::WEST, Direction::EAST}; + for (Direction first : all){ + if (!can_step(center, first)){ + continue; + } + const TilePos one = step(center, first); + add(one); + for (Direction second : all){ + const TilePos two = step(one, second); + const bool diagonal = two.x != center.x && two.y != center.y; + if (diagonal && can_step(one, second)){ + add(two); + } + } + } +} +// The walkable tiles next to any of `pose`'s tiles, not its own. +std::vector walkable_neighbors(const Pose& pose){ + const std::vector tiles = Pokemon::tiles_of(pose); + const StoryWorld* world = pose.map.empty() ? nullptr : story_plan_world(pose.map, pose.map); + std::vector out; + if (world == nullptr){ + return out; + } + std::set> seen; + for (const TilePos& tile : tiles){ + seen.insert({tile.x, tile.y}); + } + for (const TilePos& tile : tiles){ + walkable_neighbors(world, pose, tile, seen, out); + } + return out; +} + +// One injected variant that failed its row. +struct SweepFailure{ + std::string step; + std::string variant; + std::string stopped; +}; + +UnitTestResult sweep_result(Logger& logger, FaultClass fault, const std::string& row, size_t variants, const std::vector& failures){ + logger.log(std::format("Fault sweep {} {}: {} variants, {} fail.", row, fault_class_name(fault), variants, failures.size())); + if (failures.empty()){ + return true; + } + std::string out = std::format("{} of {} variants fail {}:", failures.size(), variants, row); + for (const SweepFailure& failure : failures){ + logger.log(std::format("| {} | {} | {} | {} | {} |", row, failure.step, fault_class_name(fault), failure.variant, failure.stopped)); + out += std::format("\n {} {}: {}", failure.step, failure.variant, failure.stopped); + } + return out; +} + +// Row `row`'s steps whose end the game sets, each ending on every walkable +// tile next to the table's pose in turn. +UnitTestResult sweep_scene_end_pose(Logger& logger, const StoryCheckpoint& row){ + std::vector failures; + size_t variants = 0; + for (size_t c = 0; c < row.steps.size(); c++){ + const StoryStep& step = row.steps[c]; + if (!game_sets_end(step.kind) || step.action == WALKS_TO_ITS_END || !step.pose_after || PROVEN_SCENE_ENDS.contains(step.name) || + already_there(logger, row, c, Pokemon::pose_of(*step.pose_after))){ + continue; + } + for (const TilePos& tile : walkable_neighbors(Pokemon::pose_of(*step.pose_after))){ + SimWorldKnobs knobs; + knobs.lands[step.name] = Pokemon::tile_pose(Pokemon::grid_pose_of(*step.pose_after).map, {tile}, Pokemon::facing_of(Pokemon::pose_of(*step.pose_after))); + variants++; + const std::string stopped = run_row(logger, row.id, std::move(knobs)); + if (!stopped.empty()){ + failures.push_back({step.name, std::format("ends on ({}, {})", tile.x, tile.y), stopped}); + } + } + } + return sweep_result(logger, FaultClass::SCENE_END_POSE, row.id, variants, failures); +} + +// Row `row` with a battle's opening still playing at the start of each +// battle step and of each step after a walk, one at a time. +UnitTestResult sweep_battle_opening(Logger& logger, const StoryCheckpoint& row){ + std::vector failures; + size_t variants = 0; + for (size_t c = 0; c < row.steps.size(); c++){ + const StoryStep& step = row.steps[c]; + const bool after_walk = c > 0 && walks(row.steps[c - 1].kind) && wild_or_trainers(row.steps[c - 1]); + if (step.kind != StoryStepKind::BATTLE && !after_walk){ + continue; + } + SimWorldKnobs knobs; + knobs.battle_opening_before = [id = row.id, name = step.name](const std::string& r, const std::string& s){ + return r == id && s == name; + }; + variants++; + const std::string stopped = run_row(logger, row.id, std::move(knobs)); + if (!stopped.empty()){ + failures.push_back({step.name, "opening at its start", stopped}); + } + } + return sweep_result(logger, FaultClass::BATTLE_OPENING, row.id, variants, failures); +} + +// Row `row` with a wild battle each 8 tall-grass tiles stepped onto, all +// through the row. +UnitTestResult sweep_grass_battles(Logger& logger, const StoryCheckpoint& row){ + SimWorldKnobs knobs; + knobs.grass.every = 8; + const std::string stopped = run_row(logger, row.id, std::move(knobs)); + std::vector failures; + if (!stopped.empty()){ + failures.push_back({"", "a battle each 8 grass tiles", stopped}); + } + return sweep_result(logger, FaultClass::GRASS_BATTLES, row.id, 1, failures); +} + +// Row `row` with every warp's fade-in slow, all through the row. +UnitTestResult sweep_slow_fade_in(Logger& logger, const StoryCheckpoint& row){ + SimWorldKnobs knobs; + knobs.slow_fade_in = true; + const std::string stopped = run_row(logger, row.id, std::move(knobs)); + std::vector failures; + if (!stopped.empty()){ + failures.push_back({"", "a slow fade-in after every warp", stopped}); + } + return sweep_result(logger, FaultClass::SLOW_FADE_IN, row.id, 1, failures); +} + +// Row `row` from 1 to 3 tiles off its declared start, each way the +// player can walk from it, one at a time. +UnitTestResult sweep_start_offset(Logger& logger, const StoryCheckpoint& row){ + std::vector failures; + size_t variants = 0; + if (!row.start){ + return sweep_result(logger, FaultClass::START_OFFSET, row.id, variants, failures); + } + const Pose start = Pokemon::pose_of(*row.start); + const std::vector tiles = Pokemon::tiles_of(start); + const StoryWorld* world = start.map.empty() ? nullptr : story_plan_world(start.map, start.map); + if (world == nullptr || tiles.empty()){ + return sweep_result(logger, FaultClass::START_OFFSET, row.id, variants, failures); + } + for (Direction direction : {Direction::NORTH, Direction::SOUTH, Direction::WEST, Direction::EAST}){ + TilePos at = tiles.front(); + for (int off = 1; off <= 3; off++){ + GridSim sim(SimWorld{.world = world}, story_to_world(*world, start.map, at), direction, false); + if (!detail::sim_can_step(sim, direction)){ + break; + } + at = step_from(at, direction); + SimWorldKnobs knobs; + knobs.start_at = Pokemon::tile_pose(start.map, {at}, Pokemon::facing_of(start)); + variants++; + const std::string stopped = run_row(logger, row.id, std::move(knobs)); + if (!stopped.empty()){ + failures.push_back({"", std::format("starts on ({}, {})", at.x, at.y), stopped}); + } + } + } + return sweep_result(logger, FaultClass::START_OFFSET, row.id, variants, failures); +} + +// The route before scene step `c` of `steps`, right before it or before +// the plain step onto its trigger; none if there is none. +std::optional route_before_scene(const std::vector& steps, size_t c){ + if (steps[c].kind != StoryStepKind::MASH || c == 0){ + return std::nullopt; + } + if (steps[c - 1].kind == StoryStepKind::ROUTE){ + return c - 1; + } + const StoryStep& step = steps[c - 1]; + const bool onto_trigger = step.kind == StoryStepKind::STEP && step.action.empty() && !step.pose_after; + if (onto_trigger && c >= 2 && steps[c - 2].kind == StoryStepKind::ROUTE){ + return c - 2; + } + return std::nullopt; +} + +// Row `row` with the scene of each scene step after a route starting on +// that route's target, one at a time. +UnitTestResult sweep_scene_early(Logger& logger, const StoryCheckpoint& row){ + std::vector failures; + size_t variants = 0; + for (size_t c = 1; c < row.steps.size(); c++){ + const std::optional w = route_before_scene(row.steps, c); + if (!w){ + continue; + } + const StoryStep& walk = row.steps[*w]; + SimWorldKnobs knobs; + knobs.scene_at_walk_end = [id = row.id, name = walk.name](const std::string& r, const std::string& s){ + return r == id && s == name; + }; + variants++; + SimExecutor executor(logger, {.fade = {}, .banner = {}}, std::move(knobs)); + const Pokemon::SegmentReport report = run_rows_on(executor, logger, {.from = row.id, .to = row.id}); + const SimRun& run = executor.result(); + const std::string early = "early scene after " + walk.name; + const bool fought = std::any_of(run.scenes_fought.begin(), run.scenes_fought.end(), [&](const std::string& scene){ + return scene.ends_with(early); + }); + if (!report.completed){ + failures.push_back({row.steps[c].name, "starts on " + walk.name + "'s end", std::format("stopped in {}: {}", run.failed_step, run.error)}); + }else if (fought){ + failures.push_back({row.steps[c].name, "starts on " + walk.name + "'s end", "the walk fought it as a trainer's"}); + } + } + return sweep_result(logger, FaultClass::SCENE_EARLY, row.id, variants, failures); +} + +// A fault class swept over row `row` (empty in FAULT_SWEEP_CASES: each +// row from FIRST_ROW to LAST_ROW). +struct FaultSweepInput{ + FaultClass fault = FaultClass::SCENE_END_POSE; + std::string row = {}; +}; +// Whether a sweep is expected to fail is KNOWN_FAILING's, by name. +struct FaultSweepExpectation{ +}; +struct FaultSweepCase{ + FaultSweepInput input; + FaultSweepExpectation expectation; +}; + +// The table's row `id`. +const StoryCheckpoint& table_row(const std::string& id){ + for (const StoryCheckpoint& row : story_checkpoints()){ + if (row.id == id){ + return row; + } + } + throw InternalProgramError(nullptr, PA_CURRENT_FUNCTION, "No row " + id); +} + +class Test_AutoStoryFaultSweep : public UnitTest{ +public: + explicit Test_AutoStoryFaultSweep(FaultSweepCase test_case) + : UnitTest(std::format("PokemonBDSP::AutoStory - Fault sweep: {}, {}", test_case.input.row, fault_class_name(test_case.input.fault))) + , m_fault(test_case.input.fault) + , m_row(table_row(test_case.input.row)) + {} + virtual UnitTestResult run(Logger& logger, CancellableScope&) const override{ + UnitTestResult result; + try{ + result = sweep(logger); + }catch (Exception& e){ + result = std::string(e.name()) + ": " + e.message(); + } + const auto known = KNOWN_FAILING.find(name()); + if (known == KNOWN_FAILING.end()){ + return result; + } + if (result.result == UnitTestResult::PASSED){ + return "on KNOWN_FAILING (" + known->second + ") but passes now: take it off the list."; + } + logger.log("Known failing until " + known->second + ": " + result.message); + return true; + } + +private: + UnitTestResult sweep(Logger& logger) const{ + const std::string clean = run_row(logger, m_row.id, {}); + if (!clean.empty()){ + logger.log(std::format("Fault sweep {}: not swept, the row fails clean: {}", m_row.id, clean)); + return true; + } + switch (m_fault){ + case FaultClass::SCENE_END_POSE: + return sweep_scene_end_pose(logger, m_row); + case FaultClass::BATTLE_OPENING: + return sweep_battle_opening(logger, m_row); + case FaultClass::GRASS_BATTLES: + return sweep_grass_battles(logger, m_row); + case FaultClass::SCENE_EARLY: + return sweep_scene_early(logger, m_row); + case FaultClass::SLOW_FADE_IN: + return sweep_slow_fade_in(logger, m_row); + case FaultClass::START_OFFSET: + return sweep_start_offset(logger, m_row); + case FaultClass::LOST_TAP: + break; + } + return true; + } + + FaultClass m_fault; + const StoryCheckpoint& m_row; +}; + +// No step of the table needs a surer pose than the steps before it leave +// (Pokemon_StoryCertainty.h), but those on KNOWN_CERTAINTY_GAPS. +class Test_AutoStoryCertainty : public UnitTest{ +public: + Test_AutoStoryCertainty() + : UnitTest("PokemonBDSP::AutoStory - Certainty: no step walks from a pose surer than the steps before leave") + {} + virtual UnitTestResult run(Logger& logger, CancellableScope&) const override{ + std::string out; + size_t known = 0; + for (const StoryCheckpoint& row : story_checkpoints()){ + for (const std::string& gap : Pokemon::certainty_gaps(row, bdsp_story_actions())){ + logger.log("Certainty gap: " + gap); + if (KNOWN_CERTAINTY_GAPS.contains(gap)){ + known++; + continue; + } + out += "\n " + gap; + } + } + if (known != KNOWN_CERTAINTY_GAPS.size()){ + out += std::format("\n {} of the {} known gaps are gone: take them off KNOWN_CERTAINTY_GAPS.", KNOWN_CERTAINTY_GAPS.size() - known, KNOWN_CERTAINTY_GAPS.size()); + } + return out.empty() ? UnitTestResult(true) : UnitTestResult("Certainty gaps:" + out); + } +}; + +} // namespace + +const FaultSweepCase FAULT_SWEEP_CASES[] = { + {.input = {.fault = FaultClass::SCENE_END_POSE}, .expectation = {}}, + {.input = {.fault = FaultClass::BATTLE_OPENING}, .expectation = {}}, + {.input = {.fault = FaultClass::GRASS_BATTLES}, .expectation = {}}, + {.input = {.fault = FaultClass::SCENE_EARLY}, .expectation = {}}, + {.input = {.fault = FaultClass::SLOW_FADE_IN}, .expectation = {}}, + {.input = {.fault = FaultClass::START_OFFSET}, .expectation = {}}, +}; + +void add_tests_AutoStory_FaultSweep(UnitTestDatabase& database){ + database.add(); + for (const FaultSweepCase& item : FAULT_SWEEP_CASES){ + for (const StoryCheckpoint& row : story_checkpoints()){ + if (row.id < FIRST_ROW || row.id > LAST_ROW){ + continue; + } + database.add(FaultSweepCase{.input = {.fault = item.input.fault, .row = row.id}, .expectation = item.expectation}); + } + } +} + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_FaultSweep_Tests.h b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_FaultSweep_Tests.h new file mode 100644 index 0000000000..7222d25869 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_FaultSweep_Tests.h @@ -0,0 +1,27 @@ +/* BDSP AutoStory - Fault sweeps on the story simulation + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonBDSP_AutoStory_FaultSweep_Tests_H +#define PokemonAutomation_PokemonBDSP_AutoStory_FaultSweep_Tests_H + +#include "Common/Cpp/TestRunners/UnitTestDatabase.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ + + + +// Each class of console failure injected at every step of every row where +// the game can cause it; the rows the program still fails are known failing. +void add_tests_AutoStory_FaultSweep(UnitTestDatabase& database); + + + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation +#endif diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_GridSim_Tests.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_GridSim_Tests.cpp new file mode 100644 index 0000000000..0876daa2e5 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_GridSim_Tests.cpp @@ -0,0 +1,1073 @@ +/* BDSP AutoStory Grid Simulation Tests + * + * From: https://github.com/PokemonAutomation/ + * + * The grid simulation's moves against the console's measurements, then the + * route walker (walk_route()) on it: every route of the story table from + * where the table has the player, and the routes to doors that a turn on + * the stick missed on the console (r49, r57). + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include "Common/Cpp/Exceptions.h" +#include "Common/Cpp/TestRunners/UnitTestDatabase.h" +#include "Pokemon/AutoStory/Pokemon_TilePose.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_Maps.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_PlanCosts.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_RobustRoute.h" +#include "PokemonBDSP/Programs/AutoStory/Utils/PokemonBDSP_AutoStory_WalkResult.h" +#include "PokemonBDSP_AutoStory_GridSim.h" +#include "Pokemon/AutoStory/Pokemon_BuiltinStoryActions.h" +#include "Pokemon/AutoStory/Pokemon_StoryStepExecutor.h" +#include "Pokemon/AutoStory/Types/Pokemon_GridPose.h" +#include "Pokemon/AutoStory/Types/Pokemon_StoryActionArg.h" +#include "PokemonBDSP/Programs/AutoStory/Utils/PokemonBDSP_AutoStory_PlannedRoute.h" +#include "PokemonBDSP_AutoStory_OldStorySteps.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryExecutor.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryPlaces.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryStepIO.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryTable.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryWalkSteps.h" +#include "PokemonBDSP_AutoStory_GridSim_Tests.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ +using namespace detail; + + +namespace{ + +using namespace std::chrono_literals; +using Pokemon::Direction; +using Pokemon::GridPose; +using Pokemon::story_arg; +using Pokemon::Pose; +using Pokemon::StoryStep; +using Pokemon::StoryStepKind; +using Pokemon::TileBox; +using Pokemon::TilePos; + + +// A map of `rows`, with someone wandering `wander` if given. +StoryWorld make_world(const std::vector& rows, const std::optional& wander = std::nullopt){ + Pokemon::MapData map; + map.name = "Test"; + map.tiles = Pokemon::Grid{(int)rows[0].size(), (int)rows.size(), {}}; + for (const std::string& row : rows){ + for (char glyph : row){ + map.tiles.cells.push_back(*Pokemon::tile_from_glyph(glyph)); + } + } + if (wander){ + map.objects.push_back({.name = "wanderer", .x = wander->x0, .y = wander->y0, .facing = std::nullopt, + .wander = wander, .trainer = std::nullopt, .hide_flag = std::nullopt}); + } + StoryWorld world; + world.add("Test", map, {0, 0}); + return world; +} + +SimPos at_tile(int x, int y, int part_x = 0, int part_y = 0){ + return {x * SIM_TILE + part_x, y * SIM_TILE + part_y}; +} + + +// One input to the simulation. +enum class SimInputKind{ + DPAD, + STICK, + HOLD, +}; +struct SimInput{ + SimInputKind kind; + Direction direction; + Milliseconds time; +}; + +// Inputs from `start`, and where the player must end and how the last +// input ended. +struct MoveCase{ + std::string name; + TilePos start; + std::vector inputs; + SimPos end; + SimStop stop; +}; + +SimMove apply(GridSim& sim, const SimInput& input){ + switch (input.kind){ + case SimInputKind::DPAD: + return sim.tap(input.direction, input.time, false); + case SimInputKind::STICK: + return sim.tap(input.direction, input.time, true); + case SimInputKind::HOLD: + return sim.hold(input.direction, input.time, SimPace::WALK); + } + return {}; +} + +// A room with a door in row 3 at x 3, a ledge south at x 7, someone +// standing at (5, 1), and a trainer east of row 2 who looks west 3 tiles. +UnitTestResult test_moves(Logger&){ + StoryWorld world = make_world({ + "#########", + "#.......#", + "#.......#", + "###D###v#", + "#.......#", + "#########", + }); + world.block({5, 1}); + const SimWorld setup{.world = &world, .trainers = {{.name = "watcher", .pos = {8, 2}, .facing = Direction::WEST, .range = 3}}}; + constexpr Direction EAST = Direction::EAST; + constexpr Direction SOUTH = Direction::SOUTH; + constexpr Direction WEST = Direction::WEST; + const std::vector cases{ + {.name = "a 50 ms D-pad tap only turns", .start = {2, 1}, .inputs = {{SimInputKind::DPAD, EAST, 50ms}}, .end = at_tile(2, 1), .stop = SimStop::DONE}, + {.name = "a 160 ms D-pad tap steps a tile", .start = {2, 1}, .inputs = {{SimInputKind::DPAD, EAST, 160ms}}, .end = at_tile(3, 1), .stop = SimStop::DONE}, + {.name = "a 100 ms stick tap steps 0.6 tile across", .start = {2, 1}, .inputs = {{SimInputKind::STICK, EAST, 100ms}}, .end = at_tile(2, 1, 625), .stop = SimStop::DONE}, + {.name = "a 100 ms stick tap steps 0.4 tile down", .start = {2, 1}, .inputs = {{SimInputKind::STICK, SOUTH, 100ms}}, .end = at_tile(2, 1, 0, 416), .stop = SimStop::DONE}, + {.name = "the D-pad keeps a stick tap's offset", .start = {2, 1}, + .inputs = {{SimInputKind::STICK, EAST, 100ms}, {SimInputKind::DPAD, EAST, 160ms}}, .end = at_tile(3, 1, 625), .stop = SimStop::DONE}, + {.name = "a held walk stops at someone standing", .start = {2, 1}, .inputs = {{SimInputKind::HOLD, EAST, 5000ms}}, .end = at_tile(4, 1), .stop = SimStop::BLOCKED}, + {.name = "a door warps from its column", .start = {3, 2}, .inputs = {{SimInputKind::HOLD, SOUTH, 3000ms}}, .end = at_tile(3, 3), .stop = SimStop::WARP}, + {.name = "part of a tile off the door's column, the frame stops us", .start = {3, 2}, + .inputs = {{SimInputKind::STICK, WEST, 100ms}, {SimInputKind::HOLD, SOUTH, 3000ms}}, .end = at_tile(2, 2, 375), .stop = SimStop::BLOCKED}, + {.name = "a trainer's sight stops a walk", .start = {1, 2}, .inputs = {{SimInputKind::HOLD, EAST, 5000ms}}, .end = at_tile(5, 2), .stop = SimStop::DIALOG}, + {.name = "a ledge hops two tiles", .start = {7, 2}, .inputs = {{SimInputKind::DPAD, SOUTH, 160ms}}, .end = at_tile(7, 4), .stop = SimStop::DONE}, + }; + for (const MoveCase& item : cases){ + GridSim sim(setup, item.start, Direction::NORTH, false); + SimMove last; + for (const SimInput& input : item.inputs){ + last = apply(sim, input); + } + if (sim.player().pos != item.end || last.stop != item.stop){ + return std::format("{}: expected {} ({}), got {} ({}).", item.name, to_string(item.end), sim_stop_name(item.stop), + to_string(sim.player().pos), sim_stop_name(last.stop)); + } + } + return true; +} + + +// A turn on the stick, as before r49: each turn tap of the D-pad becomes a +// 100 ms stick tap, which moves the player part of a tile. +class StickTurnIO : public RouteIO{ +public: + explicit StickTurnIO(RouteIO& io) + : m_io(io) + {} + virtual WalkResult walk_to_wall(const RouteWallWalk& walk) override{ + return m_io.walk_to_wall(walk); + } + virtual WalkResult walk_taps(Direction direction, size_t tiles, const std::string& label) override{ + return m_io.walk_taps(direction, tiles, label); + } + virtual void press(const RouteInput& input) override{ + if (input.kind != RouteInputKind::DPAD || input.hold >= 100ms){ + m_io.press(input); + return; + } + RouteInput stick = input; + stick.kind = RouteInputKind::STICK; + stick.hold = 100ms; + m_io.press(stick); + } + virtual RouteSight sight_within(const RouteWatch& watch) override{ + return m_io.sight_within(watch); + } + virtual bool holding_against_wall(Direction direction, const std::string& label) override{ + return m_io.holding_against_wall(direction, label); + } + virtual void look(const std::function& at) override{ + m_io.look(at); + } + virtual void note(const std::string& text, RouteNote kind) override{ + m_io.note(text, kind); + } + +private: + RouteIO& m_io; +}; + + +// A route walked on the simulation: where the walker believes it ended, +// where the player is, and why it failed. +struct SimWalk{ + std::vector believed; + SimPos actual; + std::string failure; + std::vector notes; +}; + +// One route to walk: on `world`, from `from` (the walker's belief) with the +// player on `start`, to any of `targets`. +struct SimRoute{ + std::string label; + const StoryWorld* world; + std::vector from; + TilePos start; + std::vector targets; + RobustPlanCosts costs; + bool can_run; +}; + +SimWalk walk_on_sim(const SimRoute& route, bool stick_turns){ + SimWalk out; + GridSim sim({.world = route.world, .trainers = story_trainers(*route.world)}, route.start, Direction::NORTH, route.can_run); + GridSimRouteIO sim_io(sim, out.notes); + StickTurnIO stick_io(sim_io); + RouteIO& io = stick_turns ? static_cast(stick_io) : sim_io; + RouteTrainers trainers{story_trainers(*route.world), [&sim](const std::string&){ sim.end_dialogue(); return true; }}; + const std::vector& targets = route.targets; + std::vector avoid = wandering_hazards(*route.world); + std::erase_if(avoid, [&](const TilePos& pos){ + return std::find(route.from.begin(), route.from.end(), pos) != route.from.end() + || std::find(targets.begin(), targets.end(), pos) != targets.end(); + }); + try{ + out.believed = walk_route(io, *route.world, route.from, trainers, { + .goal = [&targets](const TilePos& pos){ return std::find(targets.begin(), targets.end(), pos) != targets.end(); }, + .label = route.label, + .avoid = std::move(avoid), + .costs = route.costs, + .speed = route.can_run ? MoveSpeed::RUN : MoveSpeed::WALK, + }); + }catch (const GridSimFailure& e){ + out.failure = e.message; + } + out.actual = sim.player().pos; + return out; +} + +// Why a walk did not end where it should: on the grid, on one of the +// targets, and on a tile the walker believes. Empty if it did. +std::string walk_error(const SimRoute& route, const SimWalk& walk){ + const auto has = [](const std::vector& tiles, const TilePos& pos){ + return std::find(tiles.begin(), tiles.end(), pos) != tiles.end(); + }; + const TilePos tile = nearest_tile(walk.actual); + if (!walk.failure.empty()){ + return std::format("{} from {}: failed at {}: {}", route.label, describe(*route.world, route.start), + to_string(walk.actual), walk.failure); + } + if (!on_grid(walk.actual) || !has(route.targets, tile) || !has(walk.believed, tile)){ + return std::format("{} from {}: ended at {} ({}), off the grid or off the target.", route.label, + describe(*route.world, route.start), to_string(walk.actual), describe(*route.world, tile)); + } + return ""; +} + + +std::vector world_tiles(const StoryWorld& world, const Pose& pose){ + std::vector tiles; + for (const TilePos& pos : Pokemon::tiles_of(pose)){ + tiles.push_back(story_to_world(world, pose.map, pos)); + } + return tiles; +} + +// Where the table has the player after `step`, from `at`: a route's +// target, a walk's last tile, a step's next tile; a scene or an event's +// end is the table's pose_after, or unknown. +std::optional pose_after_step(const std::optional& at, const StoryStep& step){ + std::optional next; + if (step.kind == StoryStepKind::ROUTE){ + const GridPose& target = story_arg(step.args, "target"); + next = Pokemon::pose_of(target); + }else if (at && step.kind == StoryStepKind::STEP){ + const Direction direction = story_arg(step.args, "direction"); + std::vector tiles; + for (const TilePos& pos : Pokemon::tiles_of(*at)){ + tiles.push_back(pos.next(direction)); + } + next = Pokemon::tile_pose(at->map, tiles, direction); + }else if (at && step.kind == StoryStepKind::LEGS && (step.action.empty() || step.action == "legs" || step.action == "open")){ + std::vector tiles = Pokemon::tiles_of(*at); + const auto& legs_list = story_arg>(step.args, "legs"); + for (const Pokemon::StoryLeg& leg : legs_list){ + for (TilePos& pos : tiles){ + for (int i = 0; i < leg.tiles; i++){ + pos = pos.next(leg.direction); + } + } + } + next = Pokemon::tile_pose(at->map, tiles, legs_list.back().direction); + }else if (step.kind != StoryStepKind::GAME && step.kind != StoryStepKind::SHOP && + step.kind != StoryStepKind::MASH && step.kind != StoryStepKind::LEGS + ){ + next = at; + } + return step.pose_after ? std::optional(Pokemon::pose_of(*step.pose_after)) : next; +} + +// Every ROUTE step of the table that starts from a known pose, from its +// first and its last tile, at the pace StoryExecutor walks it. +std::vector table_routes(){ + std::vector routes; + for (const StoryCheckpoint& row : story_checkpoints()){ + std::optional at = row.start ? std::optional(Pokemon::pose_of(*row.start)) : std::nullopt; + bool shoes = row.id > std::string(RUNNING_SHOES_ROW); + for (const StoryStep& step : row.steps){ + const GridPose* target_ptr = step.kind == StoryStepKind::ROUTE ? &story_arg(step.args, "target") : nullptr; + const StoryWorld* world = at && target_ptr ? story_plan_world(at->map, target_ptr->map) : nullptr; + const std::vector from = world ? world_tiles(*world, *at) : std::vector{}; + std::vector starts; + if (!from.empty()){ + starts.push_back(from.front()); + } + if (from.size() > 1){ + starts.push_back(from.back()); + } + for (const TilePos& start : starts){ + routes.push_back({.label = row.id + " " + step.name, .world = world, .from = from, .start = start, + .targets = world_tiles(*world, Pokemon::pose_of(*target_ptr)), .costs = *story_route_costs(step.action), .can_run = shoes}); + } + at = pose_after_step(at, step); + shoes = shoes || (row.id == RUNNING_SHOES_ROW && step.name == RUNNING_SHOES_STEP); + } + } + return routes; +} + +UnitTestResult test_table_routes(Logger& logger){ + std::string errors; + size_t walked = 0; + for (const SimRoute& route : table_routes()){ + const SimWalk walk = walk_on_sim(route, false); + walked++; + const std::string error = walk_error(route, walk); + logger.log(std::format("{} from {}: {}", route.label, describe(*route.world, route.start), error.empty() ? "on target" : error)); + if (!error.empty()){ + errors += "\n " + error; + } + } + if (walked < 10){ + return std::format("Expected the table's routes; found {}.", walked); + } + return errors.empty() ? UnitTestResult(true) : UnitTestResult("Routes that did not end on their target:" + errors); +} + + +// A route to the tile below a door, then a walk north into it. +struct DoorRoute{ + std::string name; + std::string map; + TilePos from; + std::string door; +}; + +// Whether the route ends below the door and a walk north goes in. +std::string door_route_error(const DoorRoute& item, bool stick_turns){ + const StoryWorld& world = *story_plan_world(item.map, item.map); + const TilePos from = story_to_world(world, item.map, item.from); + const TilePos below = story_to_world(world, item.map, map_point(item.map, item.door).next(Direction::SOUTH)); + const SimRoute route{.label = item.name, .world = &world, .from = {from}, .start = from, .targets = {below}, + .costs = town_plan_costs(), .can_run = true}; + const SimWalk walk = walk_on_sim(route, stick_turns); + const std::string error = walk_error(route, walk); + if (!error.empty()){ + return error; + } + GridSim sim({.world = &world}, below, Direction::NORTH, true); + if (sim.hold(Direction::NORTH, 3000ms, SimPace::RUN).stop != SimStop::WARP){ + return item.name + ": the walk north did not go through the door."; + } + return ""; +} + +// r49 put us a tile west of Sandgem's Center door after a stick "turn", +// and r57 walked the Jubilife School's row a column short: a turn tap on +// the stick moves part of a tile, and every D-pad tap after keeps it. With +// D-pad turns both routes end below their doors; with stick turns they +// must miss, or the simulation would not have caught it. +UnitTestResult test_door_routes(Logger& logger){ + const std::vector routes{ + {.name = "Sandgem: below the Center's door", .map = "SandgemTown", .from = map_point("SandgemTown", "front_row_east_end"), + .door = "pokemon_center_door"}, + {.name = "Jubilife: below the School's door", .map = "JubilifeCity", .from = map_point("JubilifeCity", "pokemon_center_door").next(Direction::SOUTH), + .door = "trainers_school_door"}, + }; + for (const DoorRoute& item : routes){ + const std::string dpad = door_route_error(item, false); + if (!dpad.empty()){ + return "D-pad turns: " + dpad; + } + const std::string stick = door_route_error(item, true); + logger.log(item.name + ", stick turns: " + stick); + if (stick.empty()){ + return item.name + ": with turns on the stick, expected the route to miss the door; it went in."; + } + } + return true; +} + + +// The story's walking steps on a GridSim: the route walker's IO and walks +// until something stops us (as the story simulation walks them). Anything +// else fails the walk. +class WalkStepsIO : public StoryStepIO{ +public: + WalkStepsIO(GridSim& sim, GridSimRouteIO& route) + : m_sim(sim) + , m_route(route) + {} + + virtual RouteIO& route() override{ + return m_route; + } + virtual bool fight(const std::string& trainer) override{ + return unsupported("a fight with " + trainer); + } + virtual void walk_until_stopped(Direction direction, size_t tiles, const std::string& label) override{ + m_sim.tap(direction, ROUTE_TURN_TAP, false); + const Milliseconds limit = ROUTE_START_DELAY + 800ms + route_ms_per_tile(direction) * (int64_t)(2 * tiles); + const SimMove move = m_sim.hold(direction, limit, SimPace::WALK); + if (move.stop == SimStop::DIALOG || move.stop == SimStop::WARP){ + m_route.note(label + ": " + std::string(sim_stop_name(move.stop)) + " instead of a stop.", RouteNote::FAILURE); + } + } + virtual bool run_until_map(Direction, Milliseconds, const std::string& map, const std::string&) override{ + return unsupported("a run onto " + map); + } + virtual WarpSeen run_into_door(Direction, bool, Milliseconds, Milliseconds, const std::string&) override{ + unsupported("a run into a door"); + return {}; + } + virtual std::optional tap_to_banner(Direction, const std::string& map, size_t) override{ + unsupported("taps to " + map + "'s banner"); + return std::nullopt; + } + virtual void settle(Button, const std::string& label, SettleKind, const std::string&) override{ + unsupported(label + "'s settle"); + } + +private: + bool unsupported(const std::string& what){ + m_route.note(what + " is not simulated here.", RouteNote::FAILURE); + return false; + } + + GridSim& m_sim; + GridSimRouteIO& m_route; +}; + +// Row `row`'s steps from `first` up to the one before `last`, and where +// the table has the player before `first`. +struct TableSteps{ + Pose start; + std::vector steps; +}; +std::optional table_steps(const std::string& row, const std::string& first, const std::string& last){ + const std::vector& table = story_checkpoints(); + const auto checkpoint = std::find_if(table.begin(), table.end(), [&row](const StoryCheckpoint& item){ return item.id == row; }); + if (checkpoint == table.end()){ + return std::nullopt; + } + std::optional out; + std::optional at = checkpoint->start ? std::optional(Pokemon::pose_of(*checkpoint->start)) : std::nullopt; + for (const StoryStep& step : checkpoint->steps){ + if (step.name == last){ + return out; + } + if (step.name == first && at){ + out = TableSteps{*at, {}}; + } + if (out){ + out->steps.push_back(step); + } + at = pose_after_step(at, step); + } + return std::nullopt; +} + +// Where each of `table`'s steps, walked on `sim` from wherever its player +// stands, left the player, and why the walk failed if it did. +struct StepsWalk{ + std::vector> ends; + std::string failure; +}; +StepsWalk walk_steps(GridSim& sim, const TableSteps& table){ + StepsWalk out; + std::vector notes; + GridSimRouteIO route_io(sim, notes); + WalkStepsIO io(sim, route_io); + StoryWalkSteps walk(io); + walk.begin_attempt("01.03"); + Pokemon::RunState state{.pose = table.start, .flags = {}}; + try{ + for (const StoryStep& step : table.steps){ + const Pokemon::Outcome outcome = step.kind == StoryStepKind::ROUTE ? walk.route(state, step) + : step.kind == StoryStepKind::LEGS ? walk.legs(state, step) + : Pokemon::outcome_failed("not_a_walk", step.name); + out.ends.emplace_back(step.name, sim.player().pos); + if (!outcome.succeeded()){ + out.failure = step.name + ": " + Pokemon::to_string(outcome); + break; + } + state.pose = step.pose_after ? Pokemon::pose_of(*step.pose_after) : outcome.pose ? *outcome.pose : state.pose; + } + }catch (const GridSimFailure& e){ + out.failure = e.message; + } + return out; +} +// Where `table`'s steps, walked from `start` instead of where the table +// has the player, failed or left the player off `checks`' tiles; empty if +// they did not. +std::string walk_misses(const StoryWorld& world, const TableSteps& table, const TilePos& start, + const std::vector>& checks, Logger& logger){ + GridSim sim({.world = &world, .trainers = story_trainers(world)}, start, Direction::SOUTH, true); + const StepsWalk walk = walk_steps(sim, table); + std::string ends; + for (const auto& [name, end] : walk.ends){ + ends += std::format(" {} {}", name, to_string(end)); + } + logger.log(std::format("from {}:{}{}", Pokemon::to_string(start), ends, walk.failure.empty() ? "" : ", failed: " + walk.failure)); + if (!walk.failure.empty()){ + return std::format("from {}: failed at {}: {}", Pokemon::to_string(start), to_string(sim.player().pos), walk.failure); + } + for (const auto& [name, tile] : checks){ + const auto end = std::find_if(walk.ends.begin(), walk.ends.end(), [&name](const auto& item){ return item.first == name; }); + if (end == walk.ends.end() || end->second != sim_pos(tile)){ + return std::format("from {}: {} ended{}, not on {}.", Pokemon::to_string(start), name, + end == walk.ends.end() ? " nowhere" : " at " + to_string(end->second), Pokemon::to_string(tile)); + } + } + return {}; +} + +// Roark's room the old way: counted taps across the room, down column 29 +// and onto his row from (15, 16), then west against the rock east of him +// and south against the wall. +TableSteps old_taps_across_roarks_room(){ + StoryStep taps; + taps.kind = StoryStepKind::LEGS; + taps.name = "above_roarks_row"; + taps.action = "legs"; + taps.args["legs"] = std::vector{ + {.direction = Direction::EAST, .tiles = 14}, {.direction = Direction::SOUTH, .tiles = 10}, + {.direction = Direction::WEST, .tiles = 2}, {.direction = Direction::SOUTH, .tiles = 2}, + }; + StoryStep walls; + walls.kind = StoryStepKind::LEGS; + walls.name = "beside_roarks_rock"; + walls.action = "to_wall"; + walls.args["legs"] = std::vector{{.direction = Direction::WEST, .tiles = 7}, {.direction = Direction::SOUTH, .tiles = 1}}; + return {Pokemon::tile_pose("OreburghMine", {TilePos{15, 16}}, Direction::SOUTH), {taps, walls}}; +} + +// lab-B 2026-11-08 11:55: a wild battle on 01.03's counted taps through +// Roark's room re-planned to the end of the interrupted leg, (15, 16), and +// the re-plan's open run south overshot a row; the taps after landed a row +// too far south, the walk west went under Roark's rocks, and no one +// answered the talk. From a row south of (15, 16), the old taps miss +// beside his rock (20, 29): the sim shows the console's failure. The +// wild battle itself: Recovery walk tests, "01.03 to Roark's corner". +UnitTestResult test_roarks_room_from_a_row_off(Logger& logger){ + const StoryWorld& world = *story_plan_world("OreburghMine", "OreburghMine"); + const std::string miss = walk_misses(world, old_taps_across_roarks_room(), {15, 17}, {{"beside_roarks_rock", {20, 29}}}, logger); + if (miss.empty()){ + return "The old taps across Roark's room reached (20, 29) from a row south: the test no longer shows the console's failure."; + } + return true; +} + +// lab-B 2026-11-08 15:31 to 15:54: 01.05's open walk west 3 from (5, 13), +// where Barry's push leaves us, to (2, 13) beside the Oreburgh Gate's mouth +// (1, 13) went on into the Gate. D-pad taps move whole tiles but keep a +// part-tile offset: 0.375 of a tile west of (5, 13), the three taps take +// the warp; on the tile, they stop beside it. +UnitTestResult test_gate_walk_part_tile_off(Logger&){ + const StoryWorld& world = *story_plan_world("OreburghCity", "OreburghCity"); + for (const bool off : {false, true}){ + GridSim sim({.world = &world}, story_to_world(world, "OreburghCity", {5, 13}), Direction::WEST, true); + if (off){ + sim.tap(Direction::WEST, 60ms, true); + } + SimStop stop = SimStop::DONE; + for (int tap = 0; tap < 3 && stop == SimStop::DONE; tap++){ + stop = sim.tap(Direction::WEST, 160ms, false).stop; + } + if ((stop == SimStop::WARP) != off){ + return std::format("{} (5, 13): three taps west ended {} at {}.", off ? "0.375 west of" : "on", + sim_stop_name(stop), to_string(sim.player().pos)); + } + } + return true; +} + +// lab-B 2026-11-08 18:41: 01.11's 8 taps west, then north, ended below the +// old man, and no one answered the old woman's talk. Floaroma's banner +// stops us on any of (10..12, 27..29): the old taps miss her from x 10 and +// 11; the table's walk west to the field's edge and 4 taps east end below +// her from all nine. +UnitTestResult test_old_couple_from_each_arrival(Logger& logger){ + const std::optional table = table_steps("01.11", "west_to_the_field_edge", "old_woman"); + const StoryWorld* world = story_plan_world("FloaromaTown", "FloaromaTown"); + if (!table || table->steps.empty() || world == nullptr){ + return "01.11 has no walk west to the field's edge, or Floaroma no map."; + } + const TableSteps old_taps{table->start, {old_west_along_the_field(), table->steps.back()}}; + const TilePos below_her = story_to_world(*world, "FloaromaTown", map_point("FloaromaTown", "old_woman").next(Direction::SOUTH)); + for (int x = 10; x <= 12; x++){ + for (int y = 27; y <= 29; y++){ + const TilePos start = story_to_world(*world, "FloaromaTown", {x, y}); + const std::string old_miss = walk_misses(*world, old_taps, start, {{"up_to_the_old_woman", below_her}}, logger); + if (old_miss.empty() != (x == 12)){ + return std::format("The old taps from ({}, {}): {}", x, y, old_miss.empty() ? "ended below her." : old_miss); + } + const std::string miss = walk_misses(*world, *table, start, {{"up_to_the_old_woman", below_her}}, logger); + if (!miss.empty()){ + return "The table's walk " + miss; + } + } + } + return true; +} + +UnitTestResult test_wandering_npc_mechanics(Logger& logger){ + StoryWorld world = make_world({ + "#######", + "#.....#", + "#.....#", + "#.....#", + "#######", + }); + SimWanderer wanderer{ + .name = "wanderer", + .box = {1, 1, 3, 3}, + .pos = {2, 2}, + .seed = 42, + .step_interval = 2000ms, + }; + GridSim sim({.world = &world, .wanderers = {wanderer}}, {1, 2}, Direction::EAST, false); + sim_advance_time(sim, 100000ms); + const SimWanderer& after = sim_wanderers(sim).front(); + if (after.pos.x < 1 || after.pos.x > 3 || after.pos.y < 1 || after.pos.y > 3){ + return "wanderer stepped outside its bounding box"; + } + GridSim sim2({.world = &world, .wanderers = {wanderer}}, {1, 2}, Direction::EAST, false); + sim_advance_time(sim2, 100000ms); + if (sim_wanderers(sim2).front().pos != after.pos){ + return "wanderer simulation is not deterministic across identical seeds"; + } + return true; +} + +UnitTestResult test_wandering_npc_collision_and_dialog(Logger& logger){ + StoryWorld world = make_world({ + "#####", + "#...#", + "#####", + }); + SimWanderer wanderer{ + .name = "blocker", + .box = {2, 1, 2, 1}, + .pos = {2, 1}, + .seed = 0, + .step_interval = 10000ms, + }; + GridSim sim({.world = &world, .wanderers = {wanderer}}, {1, 1}, Direction::EAST, false); + const SimMove move = sim.tap(Direction::EAST, 160ms, false); + if (move.stop != SimStop::BLOCKED || sim.player().pos != sim_pos({1, 1})){ + return "player was not blocked by wandering NPC"; + } + if (!sim.press_a()){ + return "pressing A facing wandering NPC failed to open dialogue"; + } + return true; +} + +UnitTestResult test_wandering_npc_routes_multi_seed(Logger& logger){ + const StoryWorld* world = story_plan_world("OreburghCity", "OreburghCity"); + if (world == nullptr){ + return "OreburghCity world not found"; + } + const TilePos start = story_to_world(*world, "OreburghCity", {26, 22}); + const TilePos target = story_to_world(*world, "OreburghCity", {46, 58}); + const TileBox hiker_box{ + story_to_world(*world, "OreburghCity", {46, 25}).x, + story_to_world(*world, "OreburghCity", {46, 25}).y, + story_to_world(*world, "OreburghCity", {48, 27}).x, + story_to_world(*world, "OreburghCity", {48, 27}).y + }; + const TilePos hiker_home = story_to_world(*world, "OreburghCity", {47, 26}); + const std::vector seeds = {0, 1, 2, 7, 42, 100, 999, 1337}; + const std::vector start_times = {0ms, 500ms, 1200ms, 2000ms, 3500ms, 5000ms}; + for (uint64_t seed : seeds){ + for (Milliseconds start_time : start_times){ + SimWanderer hiker{ + .name = "hiker_0", + .box = hiker_box, + .pos = hiker_home, + .seed = seed, + .step_interval = 2000ms, + .time_offset = start_time, + }; + GridSim sim({.world = world, .trainers = story_trainers(*world), .wanderers = {hiker}}, start, Direction::NORTH, true); + std::vector notes; + GridSimRouteIO sim_io(sim, notes); + RouteTrainers trainers{story_trainers(*world), [&sim](const std::string&){ sim.end_dialogue(); return true; }}; + const auto result = walk_route(sim_io, *world, {start}, trainers, { + .goal = [&](const TilePos& pos){ return pos == target; }, + .label = "01.03 above_the_mine", + .avoid = {}, + .costs = *story_route_costs("town"), + .speed = MoveSpeed::RUN, + }); + if (result.empty() || result.front() != target || nearest_tile(sim.player().pos) != target){ + return std::format("route failed for seed {} and start_time {} ms", seed, start_time.count()); + } + } + } + return true; +} + +// Routes never run along a wander zone, but cross one: a row someone +// wanders, (2..4, 2), crossed south at (3, 2) while they stand there. +UnitTestResult test_wandering_npc_wait_clearance(Logger& logger){ + const TileBox row_zone{.x0 = 2, .y0 = 2, .x1 = 4, .y1 = 2}; + const StoryWorld room = make_world({"#######", "#.....#", "#.....#", "#.....#", "#.....#", "#######"}, row_zone); + const StoryWorld* world = &room; + const TilePos start{3, 1}; + const TilePos target{3, 4}; + SimWanderer hiker{ + .name = "hiker_0", + .box = row_zone, + .pos = {3, 2}, + .seed = 2, + .step_interval = 2000ms, + }; + GridSim sim({.world = world, .trainers = {}, .wanderers = {hiker}}, start, Direction::NORTH, true); + std::vector notes; + GridSimRouteIO sim_io(sim, notes); + RouteTrainers trainers{{}, [&sim](const std::string&){ sim.end_dialogue(); return true; }}; + const auto result = walk_route(sim_io, *world, {start}, trainers, { + .goal = [&](const TilePos& pos){ return pos == target; }, + .label = "walk_through_hiker", + .avoid = {}, + .costs = *story_route_costs("town"), + .speed = MoveSpeed::RUN, + }); + if (result.empty() || result.front() != target){ + return "wait clearance route did not reach target"; + } + bool saw_blocked_note = false; + for (const std::string& n : notes){ + if (n.find("waiting for the way to clear") != std::string::npos){ + saw_blocked_note = true; + break; + } + } + if (!saw_blocked_note){ + return "expected route to encounter blocked wanderer and wait for clearance"; + } + return true; +} + +UnitTestResult test_wandering_npc_oreburgh_north_multi_seed(Logger& logger){ + const StoryWorld* world = story_plan_world("OreburghCity", "OreburghCity"); + if (world == nullptr){ + return "OreburghCity world not found"; + } + const TilePos start = story_to_world(*world, "OreburghCity", {46, 52}); + const TilePos target = story_to_world(*world, "OreburghCity", {46, 21}); + const TileBox hiker_box{ + story_to_world(*world, "OreburghCity", {46, 25}).x, + story_to_world(*world, "OreburghCity", {46, 25}).y, + story_to_world(*world, "OreburghCity", {48, 27}).x, + story_to_world(*world, "OreburghCity", {48, 27}).y + }; + const TilePos hiker_home = story_to_world(*world, "OreburghCity", {47, 26}); + const std::vector seeds = {0, 1, 2, 7, 42, 100, 999, 1337}; + const std::vector start_times = {0ms, 500ms, 1200ms, 2000ms, 3500ms, 5000ms}; + for (uint64_t seed : seeds){ + for (Milliseconds start_time : start_times){ + SimWanderer hiker{ + .name = "hiker_0", + .box = hiker_box, + .pos = hiker_home, + .seed = seed, + .step_interval = 2000ms, + .time_offset = start_time, + }; + GridSim sim({.world = world, .trainers = story_trainers(*world), .wanderers = {hiker}}, start, Direction::NORTH, true); + std::vector notes; + GridSimRouteIO sim_io(sim, notes); + RouteTrainers trainers{story_trainers(*world), [&sim](const std::string&){ sim.end_dialogue(); return true; }}; + const auto result = walk_route(sim_io, *world, {start}, trainers, { + .goal = [&](const TilePos& pos){ return pos == target; }, + .label = "01.03 oreburgh_north", + .avoid = {}, + .costs = *story_route_costs("town"), + .speed = MoveSpeed::RUN, + }); + if (result.empty() || result.front() != target || nearest_tile(sim.player().pos) != target){ + return std::format("oreburgh north route failed for seed {} and start_time {} ms", seed, start_time.count()); + } + } + } + return true; +} + +class StalledWallLegRouteIO : public GridSimRouteIO{ +public: + StalledWallLegRouteIO(GridSim& sim, std::vector& notes) + : GridSimRouteIO(sim, notes) + {} + + virtual WalkResult walk_to_wall(const RouteWallWalk& walk) override{ + if (m_first_wall_call){ + m_first_wall_call = false; + return WalkResult{ + .stop = WalkStop::LIMIT, + .walked = 5000ms, + .wild_battles = 0, + .moved_chunks = 2, + }; + } + return GridSimRouteIO::walk_to_wall(walk); + } + +private: + bool m_first_wall_call = true; +}; + +UnitTestResult test_wall_leg_check_at_wall_short_distance_safeguard(Logger& logger){ + StoryWorld world = make_world({ + "########################", + "#......................#", + "########################", + }); + const TilePos start{1, 1}; + const TilePos target{22, 1}; + GridSim sim({.world = &world}, start, Direction::EAST, true); + std::vector notes; + StalledWallLegRouteIO sim_io(sim, notes); + RouteTrainers trainers{{}, [](const std::string&){ return true; }}; + try{ + walk_route(sim_io, world, {start}, trainers, { + .goal = [&](const TilePos& pos){ return pos == target; }, + .label = "test_check_at_wall_safeguard", + .avoid = {}, + .costs = *story_route_costs("town"), + .speed = MoveSpeed::RUN, + }); + return "check_at_wall falsely accepted leg stalled well short of expected distance"; + }catch (const GridSimFailure& f){ + if (f.message.find("short of the wall") != std::string::npos){ + return true; + } + return "caught unexpected failure: " + f.message; + } +} +// A hold into someone standing still reads as stopped `late` after a stop +// at a wall would: the screen moves on while we push against them. +class PushingRouteIO : public GridSimRouteIO{ +public: + PushingRouteIO(GridSim& sim, std::vector& notes, Milliseconds late) + : GridSimRouteIO(sim, notes) + , m_sim(sim) + , m_late(late) + {} + + virtual WalkResult walk_to_wall(const RouteWallWalk& walk) override{ + WalkResult result = GridSimRouteIO::walk_to_wall(walk); + const TilePos ahead = nearest_tile(m_sim.player().pos).next(walk.direction); + const std::vector& people = sim_wanderers(m_sim); + if (result.stop == WalkStop::BLOCKED && std::any_of(people.begin(), people.end(), [&](const SimWanderer& person){ + return person.pos == ahead; + })){ + result.walked += m_late; + } + return result; + } + +private: + GridSim& m_sim; + Milliseconds m_late; +}; + +// Someone the map lacks stands on Jubilife's row 26 at (54, 26), and the +// walk west to the wall from (58, 26) pushes against them, which reads as +// stopped 1000 ms late: on lab-B (2026-11-12 02:52) "west 17 (to wall)" +// stopped after 2400 ms, its time read as "about 13 tiles", and the stop's +// tiles round the count, (44..46, 26), went on as where we stood. Any tile +// of the leg fits; taps back to the wall behind find which. +UnitTestResult test_stranger_stops_a_wall_leg_early(Logger& logger){ + const StoryWorld* world = story_plan_world("JubilifeCity", "JubilifeCity"); + if (world == nullptr){ + return "JubilifeCity world not found."; + } + const TilePos start = story_to_world(*world, "JubilifeCity", {58, 26}); + const TilePos target = story_to_world(*world, "JubilifeCity", {41, 26}); + const TilePos stranger = story_to_world(*world, "JubilifeCity", {54, 26}); + const SimWanderer person{.name = "a stranger", .box = {.x0 = stranger.x, .y0 = stranger.y, .x1 = stranger.x, .y1 = stranger.y}, + .pos = stranger, .seed = 0, .step_interval = 0ms}; + GridSim sim({.world = world, .trainers = {}, .wanderers = {person}}, start, Direction::WEST, true); + std::vector notes; + PushingRouteIO sim_io(sim, notes, 1000ms); + RouteTrainers trainers{{}, [&sim](const std::string&){ sim.end_dialogue(); return true; }}; + std::vector believed; + try{ + believed = walk_route(sim_io, *world, {start}, trainers, { + .goal = [&](const TilePos& pos){ return pos == target; }, + .label = "west on row 26", + .avoid = {}, + .costs = *story_route_costs("town"), + .speed = MoveSpeed::RUN, + }); + }catch (const GridSimFailure& e){ + return "failed: " + e.message; + } + for (const std::string& note : notes){ + logger.log(note); + } + const TilePos at = nearest_tile(sim.player().pos); + if (believed != std::vector{target} || at != target){ + return std::format("ended on {}, believed {} tile(s), not on {}.", describe(*world, at), believed.size(), describe(*world, target)); + } + return true; +} + +// Oreburgh Mine B1F: the entrance hall corridor is traversed to and back by +// running south from (12, 1) to (12, 21), and north from (12, 21), where the +// coal room's warp lands us, to (12, 1). +UnitTestResult test_oreburgh_mine_hall_corridor(Logger& logger){ + const StoryWorld* world = story_plan_world("OreburghMineB1F", "OreburghMineB1F"); + if (world == nullptr){ + return "OreburghMineB1F world not found."; + } + const SimWorld sim_world{.world = world, .can_run = true}; + const auto test_run = [&](TilePos start, Direction dir, TilePos expected, std::string_view label){ + GridSim sim(sim_world, start, dir, true); + const SimMove move = sim.hold(dir, 5000ms, SimPace::RUN); + if (move.stop != SimStop::WARP || sim.player().pos != sim_pos(expected)){ + return std::format("{}: expected WARP at {}, got {} at {}.", label, + Pokemon::to_string(expected), sim_stop_name(move.stop), Pokemon::to_string(nearest_tile(sim.player().pos))); + } + logger.log(std::format("{} hall run reached {} in {} ms.", label, Pokemon::to_string(expected), move.time.count())); + return std::string{}; + }; + std::string err = test_run({12, 1}, Direction::SOUTH, {12, 21}, "Southbound"); + if (!err.empty()){ + return err; + } + err = test_run({12, 21}, Direction::NORTH, {12, 1}, "Northbound"); + return err.empty() ? UnitTestResult(true) : UnitTestResult(err); +} + +struct AutoStoryGridSimInput{ + std::string name; + std::function body; +}; + +struct AutoStoryGridSimExpectation{ +}; + +struct AutoStoryGridSimCase{ + AutoStoryGridSimInput input; + AutoStoryGridSimExpectation expectation; +}; + +class Test_GridSim : public UnitTest{ +public: + explicit Test_GridSim(AutoStoryGridSimCase test_case) + : UnitTest("PokemonBDSP::AutoStory - Grid sim: " + test_case.input.name) + , m_case(std::move(test_case)) + {} + virtual UnitTestResult run(Logger& logger, CancellableScope&) const override{ + try{ + return m_case.input.body(logger); + }catch (Exception& e){ + return std::string(e.name()) + ": " + e.message(); + } + } + +private: + AutoStoryGridSimCase m_case; +}; + +} // namespace + + +const AutoStoryGridSimCase AUTO_STORY_GRID_SIM_CASES[] = { + { + .input = {"taps, holds, stick offsets, doors, people and trainers as measured", test_moves}, + .expectation = {}, + }, + { + .input = {"the table's routes end on their targets", test_table_routes}, + .expectation = {}, + }, + { + .input = {"a stick-tap turn misses the Sandgem Center and Jubilife School doors", test_door_routes}, + .expectation = {}, + }, + { + .input = {"01.03's old taps across Roark's room miss his rock from a row off (lab-B, 2026-11-08)", test_roarks_room_from_a_row_off}, + .expectation = {}, + }, + { + .input = {"wandering NPC movement and deterministic seed behavior", test_wandering_npc_mechanics}, + .expectation = {}, + }, + { + .input = {"wandering NPC collision stops player and opens dialogue", test_wandering_npc_collision_and_dialog}, + .expectation = {}, + }, + { + .input = {"01.03 above_the_mine paths through wanderer zone across seeds and start times", test_wandering_npc_routes_multi_seed}, + .expectation = {}, + }, + { + .input = {"wandering NPC collision without avoid waits for clearance and resumes", test_wandering_npc_wait_clearance}, + .expectation = {}, + }, + { + .input = {"01.03 oreburgh_north paths straight up column 46 across seeds and start times", test_wandering_npc_oreburgh_north_multi_seed}, + .expectation = {}, + }, + { + .input = {"check_at_wall safeguard rejects legs stalled well short of expected distance", test_wall_leg_check_at_wall_short_distance_safeguard}, + .expectation = {}, + }, + { + .input = {"00.05c, someone the map lacks stops a wall leg early, the push read as many tiles (lab-B, 2026-11-12 02:52)", test_stranger_stops_a_wall_leg_early}, + .expectation = {}, + }, + { + .input = {"01.03, Oreburgh Mine B1F entrance hall corridor runs to and back", test_oreburgh_mine_hall_corridor}, + .expectation = {}, + }, + { + .input = {"01.05, a part of a tile off, the old open walk west takes the Gate's warp (lab-B, 2026-11-08)", test_gate_walk_part_tile_off}, + .expectation = {}, + }, + { + .input = {"01.11, the old woman from each tile Floaroma's banner stops us on (lab-B, 2026-11-08)", test_old_couple_from_each_arrival}, + .expectation = {}, + }, +}; + +void add_tests_AutoStory_GridSim(UnitTestDatabase& database){ + for (const auto& item : AUTO_STORY_GRID_SIM_CASES){ + database.add(item); + } +} + + + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_GridSim_Tests.h b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_GridSim_Tests.h new file mode 100644 index 0000000000..dc085dda37 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_GridSim_Tests.h @@ -0,0 +1,28 @@ +/* BDSP AutoStory Grid Simulation Tests + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonBDSP_AutoStory_GridSim_Tests_H +#define PokemonAutomation_PokemonBDSP_AutoStory_GridSim_Tests_H + +#include "Common/Cpp/TestRunners/UnitTestDatabase.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ + + + +// The grid simulation (PokemonBDSP_AutoStory_GridSim.h): the moves +// measured on the console, the story table's routes walked by the route +// walker on it, and walks that missed doors on the console missing them here. +void add_tests_AutoStory_GridSim(UnitTestDatabase& database); + + + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation +#endif diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimFailureCases_Tests.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimFailureCases_Tests.cpp new file mode 100644 index 0000000000..10d9c332c1 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimFailureCases_Tests.cpp @@ -0,0 +1,864 @@ +/* BDSP AutoStory - Console failure cases on the story simulation + * + * From: https://github.com/PokemonAutomation/ + * + * One case per failure console B showed in its events and perception + * (#268's design note, the planner note), run on the story simulation + * with the knobs that make it happen there (SimWorldKnobs, SimMisses): + * walks that slide on onto a warp, fades the walks' watchers miss or read + * as a battle, banners missed or gone, dim floors, late first lines and + * people who wander. + * + * A case the program fails today is on KNOWN_FAILING with the change that + * is to fix it. Its test passes while the case still fails, and fails + * once the case passes: then take it off the list. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "Common/Cpp/Exceptions.h" +#include "Common/Cpp/TestRunners/UnitTestDatabase.h" +#include "Pokemon/AutoStory/Pokemon_TilePose.h" +#include "Pokemon/AutoStory/Pokemon_BuiltinStoryActions.h" +#include "Pokemon/AutoStory/Pokemon_StoryStepExecutor.h" +#include "Pokemon/AutoStory/Types/Pokemon_GridPose.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_Maps.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_RobustRoute.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_RoutePlanner.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_WallRecovery.h" +#include "PokemonBDSP/Programs/AutoStory/Actions/PokemonBDSP_AutoStory_Center.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryPlaces.h" +#include "PokemonBDSP_AutoStory_OldStorySteps.h" +#include "PokemonBDSP_AutoStory_StorySim.h" +#include "PokemonBDSP_AutoStory_SimFailureCases_Tests.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ +using namespace detail; + +namespace{ + +using namespace std::chrono_literals; +using Pokemon::Direction; +using Pokemon::GridPose; +using Pokemon::Pose; +using Pokemon::story_arg; +using Pokemon::StoryStep; +using Pokemon::StoryStepKind; +using Pokemon::TilePos; + +// Cases the program fails today, with what is to fix each. +const std::map KNOWN_FAILING{ + {"01.05 through_the_gate is one run west", "planner: goal kinds and ms costs (PLANNER_DESIGN.md)"}, + {"any one missed fade or banner from 00.00 to 01.11: every row still passes", + "a third signal where a warp gives one (ONE_SIGNAL_STEPS): position (PLANNER_DESIGN.md 2, 4)"}, +}; + +// Warps that give one signal only (#268 slice 1: door = fade or banner), so +// a miss there leaves nothing to go on: a fade and no banner (stairs, into +// a building, between the mine's floors), or a banner and no fade (an open +// border crossed by run_until_map()). +const std::set ONE_SIGNAL_STEPS{ + "00.01 down_the_stairs", "00.01 into_barrys_house", "00.01 up_barrys_stairs", "00.01 down_barrys_stairs", + "00.04 into_the_house", "00.05 into_the_school", "01.03 into_the_coal_room", "01.03 up_to_the_hall", + "00.04 to_route_201", "01.10 into_floaroma", +}; + +// The table's step `name` in row `row`. +const StoryStep& table_step(std::string_view row, std::string_view name){ + for (const StoryCheckpoint& checkpoint : story_checkpoints()){ + for (const StoryStep& step : checkpoint.steps){ + if (checkpoint.id == row && step.name == name){ + return step; + } + } + } + throw InternalProgramError(nullptr, PA_CURRENT_FUNCTION, "No step " + std::string(name) + " in " + std::string(row)); +} + +// Runs rows `from` to `to` of `rows` with `misses` and `knobs`: "" if they +// all pass, else where and why the run stopped. +std::string run_case( + Logger& logger, const std::string& from, const std::string& to, + SimMisses misses, SimWorldKnobs knobs, const std::vector& rows = story_checkpoints() +){ + SimExecutor executor(logger, std::move(misses), std::move(knobs)); + const Pokemon::SegmentReport report = run_rows_on(executor, logger, {.from = from, .to = to}, rows); + return report.completed ? "" : std::format("stopped in {}: {}", executor.result().failed_step, executor.result().error); +} +UnitTestResult passes(const std::string& stopped){ + return stopped.empty() ? UnitTestResult(true) : UnitTestResult(stopped); +} + +// The old 01.05 walk west along row 22 to the tile beside the west mouth's +// warp (3, 22), as before #269 stopped routes two short of warps. +StoryStep old_walk_beside_the_west_mouth(){ + StoryStep step = table_step("01.05", "through_the_gate"); + step.args["target"] = GridPose{"OreburghGate", {{4, 22}}, Direction::WEST}; + return step; +} + +// 01.05's walk west through the Gate whose last open leg runs a tile on; +// the old walk's slides onto the west mouth's warp to Route 203. +SimWorldKnobs gate_slide(SimFade fade, bool banner_up){ + const Pose far = Pokemon::pose_of(*table_step("01.05", "out_of_oreburgh_gate").pose_after); + return {.slides = {{.step = "through_the_gate", .direction = Direction::WEST, .tiles = 1, + .far = far, .fade = fade, .banner_up = banner_up}}}; +} +UnitTestResult gate_old_walk_slides(Logger& logger, SimFade fade, bool banner_up){ + const std::vector rows = table_with("01.05", old_walk_beside_the_west_mouth()); + return passes(run_case(logger, "01.05", "01.05", {.fade = {}, .banner = {}}, gate_slide(fade, banner_up), rows)); +} + +// The planner's legs for 01.05's walk through the Gate: one run west +// along row 22 works on the console; at most a hold to find the row first. +UnitTestResult gate_plan_one_run(Logger& logger){ + const StoryWorld* world = story_plan_world("OreburghGate", "OreburghGate"); + const std::vector from{story_to_world(*world, "OreburghGate", {27, 22}), story_to_world(*world, "OreburghGate", {26, 22})}; + const TilePos goal = story_to_world(*world, "OreburghGate", {5, 22}); + const auto plan = plan_recovered_route(*world, from, [&](const TilePos& pos){ return pos == goal; }, *story_route_costs(table_step("01.05", "through_the_gate").action)); + if (!plan){ + return "no plan"; + } + std::string legs; + for (const PlannedLeg& leg : *plan){ + legs += (legs.empty() ? "" : ", ") + to_string(leg.leg); + } + logger.log("through_the_gate plans: " + legs); + return plan->size() <= 2 ? UnitTestResult(true) : UnitTestResult(std::format("{} legs: {}", plan->size(), legs)); +} + +// What a single miss leaves out: a fade whole, a fade's hold, or a banner. +enum class SingleMiss{ + FADE, + HOLD, + BANNER, +}; + +// The run of the row the clean run's `index`th fade or banner (`rows`' +// counts) falls in, with that one missed as `kind` says; none if it passes. +std::optional run_single_miss(Logger& logger, const std::vector& rows, SingleMiss kind, size_t index){ + const bool fade = kind != SingleMiss::BANNER; + size_t k = 0; + while (k + 1 < rows.size() && (fade ? rows[k + 1].fades : rows[k + 1].banners) <= index){ + k++; + } + const size_t in_row = index - (fade ? rows[k].fades : rows[k].banners); + SimMisses misses{.fade = {}, .banner = {}}; + (kind == SingleMiss::FADE ? misses.fade : kind == SingleMiss::HOLD ? misses.hold : misses.banner) = in_row; + SimExecutor executor(logger, misses); + if (run_rows_on(executor, logger, {.from = rows[k].row, .to = rows[k].row}).completed){ + return std::nullopt; + } + return executor.result(); +} + +// Each fade and each banner the clean run looks for, missed alone: the +// row it falls in must still pass, but for a miss in one of `skip`'s steps. +// A door step once accepted only its fade, so a missed fade there failed a +// real arrival (#268's Monte Carlo, 19/20 on 01.05). +UnitTestResult every_single_miss(Logger& logger, const std::set& skip){ + SimExecutor clean(logger); + if (!run_rows_on(clean, logger, {.from = "00.00", .to = "01.11"}).completed){ + return "the run fails without misses: " + clean.result().error; + } + const std::vector& rows = clean.result().rows; + std::vector failed; + const auto miss = [&](bool fade, size_t index){ + const std::optional run = run_single_miss(logger, rows, fade ? SingleMiss::FADE : SingleMiss::BANNER, index); + if (run && !skip.contains(run->failed_step)){ + failed.push_back(std::format("{} {} missed: stopped in {}: {}", fade ? "fade" : "banner", index, + run->failed_step, run->error)); + } + }; + for (size_t i = 0; i < looked_for(clean.misses().fade_chances); i++){ + miss(true, i); + } + for (size_t i = 0; i < looked_for(clean.misses().banner_chances); i++){ + miss(false, i); + } + std::string out = std::format("{} of {} single misses fail their row:", failed.size(), looked_for(clean.misses().fade_chances) + looked_for(clean.misses().banner_chances)); + for (const std::string& line : failed){ + out += "\n " + line; + } + return failed.empty() ? UnitTestResult(true) : UnitTestResult(out); +} + +// Each fade the clean run looks for with only its hold unseen, a short +// fade between two frames (the door's watcher missed 13 of 35 fades on +// lab-B, 2026-11-08): the program's fade watch takes the scene after the +// fall, so every row passes, at every warp, ONE_SIGNAL_STEPS' too. +UnitTestResult every_single_hold_miss(Logger& logger){ + SimExecutor clean(logger); + if (!run_rows_on(clean, logger, {.from = "00.00", .to = "01.11"}).completed){ + return "the run fails without misses: " + clean.result().error; + } + std::vector failed; + for (size_t i = 0; i < looked_for(clean.misses().fade_chances); i++){ + const std::optional run = run_single_miss(logger, clean.result().rows, SingleMiss::HOLD, i); + if (run){ + failed.push_back(std::format("fade {}'s hold unseen: stopped in {}: {}", i, run->failed_step, run->error)); + } + } + std::string out = std::format("{} of {} fades with their hold unseen fail their row:", failed.size(), looked_for(clean.misses().fade_chances)); + for (const std::string& line : failed){ + out += "\n " + line; + } + return failed.empty() ? UnitTestResult(true) : UnitTestResult(out); +} + +// Oreburgh's street at night (88, game clock 00:25; 104 by day, r74), the +// Gate's dim floor (46) and a cave mouth's dim fade (45 to 64): the tap +// steps judge their fades with fade_of(): uniform, so a textured floor +// is none. The old "brightness under 75" took the Gate's floor for a fade +// (lab-B 2026-11-08). +UnitTestResult night_and_dim_floors(Logger& logger){ + SimWorldKnobs knobs{ + .floor = {{"OreburghCity", 88}, {"Route203", 88}, {"OreburghGate", 46}}, + .fade_into = {{"OreburghGate", 64}, {"OreburghCity", 255}, {"Route203", 255}}, + }; + return passes(run_case(logger, "01.02", "01.05", {.fade = {}, .banner = {}}, knobs)); +} + +// lab-B 2026-11-12 18:36, 01.02's by_the_east_mouth: the walk to the east +// mouth's door ran two tiles further east than it counted (a blocked leg +// left its column open, and the wall it stopped against was judged by the +// screen's change), onto the warp, whose fade the walk did not see. The +// step must see the far map's banner after the leg (gone by the next +// step's taps) and take the way through as done, not tap east into the city's fence. +UnitTestResult east_mouth_crossed_unseen(Logger& logger){ + const Pose far = Pokemon::pose_of(*table_step("01.02", "into_oreburgh").pose_after); + const SimWorldKnobs knobs{.slides = {{.step = "by_the_east_mouth", .direction = Direction::EAST, .tiles = 2, + .far = far, .fade = SimFade::UNSEEN, .banner_up = false}}}; + return passes(run_case(logger, "01.02", "01.02", {.fade = {}, .banner = {}}, knobs)); +} + +// 01.03: Roark's first line in the mine comes after the camera zooms in on +// us, some seconds after the A press (r98; the old event waited 8 s). +UnitTestResult roark_speaks_late(Logger& logger){ + std::string talk; + for (const StoryCheckpoint& row : story_checkpoints()){ + for (const StoryStep& step : row.steps){ + if (row.id == "01.03" && step.kind == StoryStepKind::TALK){ + talk = step.name; + } + } + } + return passes(run_case(logger, "01.03", "01.03", {.fade = {}, .banner = {}}, {.first_line = {{talk, 7000ms}}})); +} + +// `row` with everyone on its maps walking their wander boxes, seeds 1 to 8. +UnitTestResult wanderers_move(Logger& logger, const std::string& row){ + std::vector failed; + for (uint64_t seed = 1; seed <= 8; seed++){ + const std::string stopped = run_case(logger, row, row, {.fade = {}, .banner = {}}, {.wander_seed = seed}); + if (!stopped.empty()){ + failed.push_back(std::format("seed {}: {}", seed, stopped)); + } + } + std::string out = std::format("{} of 8 seeds fail:", failed.size()); + for (const std::string& line : failed){ + out += "\n " + line; + } + return failed.empty() ? UnitTestResult(true) : UnitTestResult(out); +} + +// Roark's badge speech after the battle: four lines, the fanfare's pause +// with no box, then the badge's and the TM's lines (lab-B 2026-10-31 09:45 +// and 2026-11-08 15:06: "no box for a moment" read as the end, and the +// Potion's menu opened under his next line). Then a scene: someone walks +// off with no box for 6 s before the last line, as Rowan does in r23 (the +// walk is a model, not measured after Roark). Played on the talk-over the +// battle's end runs (confirm_battle_overworld()). +UnitTestResult roark_badge_speech(Logger& logger){ + const SimScene scene{ + sim_line("Roark: the battle's last line"), + sim_line("Roark: you beat me"), + sim_line("Roark: the Coal Badge"), + sim_line("Received the Coal Badge"), + sim_pause("the badge's fanfare", 3000ms, false), + sim_line("Roark: the TM"), + sim_line("Roark: Stealth Rock"), + sim_pause("someone walks off", 6000ms, true), + sim_line("the last line"), + }; + const std::string early = play_scene(scene, {}); + logger.log("Roark's badge speech: " + (early.empty() ? std::string("over after the last line") : early)); + return passes(early); +} + +// The door's settle inside a Pokemon Center (TalkOverRule::door; the +// heal's, lab-B 2026-11-10 00.04b and 2026-11-11 01:28, where the talk's +// 5 s quiet took 18 s with visitors about). Visitors walking about, even +// right past the player, must not hold it up: over within 3 s of the fade +// back up. And it is never over while the fade still shows, however long +// the fade-in runs: a walk then goes nowhere. +UnitTestResult center_inside_settles(Logger& logger){ + struct Inside{ + std::string_view what; + Milliseconds fade; + SimBeat after; + }; + const Milliseconds most_after_fade = 3000ms; + const Inside cases[] = { + {"visitors walking about", 1500ms, sim_pause("visitors walking about", 60000ms, true)}, + {"a visitor walking past the player", 1500ms, sim_walk_past("a visitor walking past the player", 60000ms)}, + {"a slow fade-in", 4000ms, sim_pause("visitors walking about", 60000ms, true)}, + }; + for (const Inside& inside : cases){ + const SimScene scene{ + sim_fade("the Center's door fade", inside.fade), + inside.after, + }; + const std::string over = play_scene(scene, {.door = true}); + logger.log(std::format("Center inside, {}: {}", inside.what, over)); + const long long least = inside.fade.count(); + const long long most = (inside.fade + most_after_fade).count(); + long long ms = -1; + if (std::sscanf(over.c_str(), "judged over %lld ms in", &ms) != 1 || ms < least || ms > most){ + return std::format("Center inside, {}: not settled between {} and {} ms: {}", inside.what, least, most, over); + } + } + return true; +} + +// 01.03's doors into the mine and the coal room (lab-B 2026-11-12 21:57): +// a plain door with no text, and the cave's ambient motion kept the talk's +// quiet from ever coming, so B was pressed 14 times over 16 to 18 s. The +// door's settle is over within 3 s of the fade back up, banner read or not, +// and the talk's is not (it takes the 15 s calm). +UnitTestResult mine_doors_settle_fast(Logger& logger){ + const Milliseconds fade = 1500ms; + const Milliseconds most = fade + 3000ms; + const SimScene scene{sim_fade("the mine's door fade", fade), sim_pause("the cave's ambient motion", 60000ms, true)}; + for (const bool door : {true, false}){ + const std::string over = play_scene(scene, {.door = door}); + logger.log(std::format("mine door, {}: {}", door ? "door settle" : "talk settle", over)); + long long ms = -1; + const bool parsed = std::sscanf(over.c_str(), "judged over %lld ms in", &ms) == 1; + if (door && (!parsed || ms < fade.count() || ms > most.count())){ + return std::format("the door's settle took more than {} ms: {}", most.count(), over); + } + if (!door && parsed && ms <= most.count()){ + return "the talk's settle ended with the cave still moving: the test no longer shows the bug."; + } + } + return true; +} + +// From the door mat, one held run north reaches the nurse's counter, even +// at walking pace: the counter is the wall that stops it, and A talks. +UnitTestResult nurse_in_one_run(Logger&){ + const Milliseconds needed = ROUTE_START_DELAY + route_ms_per_tile(Direction::NORTH) * (int64_t)CENTER_MAT_TO_COUNTER_TILES; + if (NURSE_RUN_HOLD < needed){ + return std::format("the run to the nurse holds {} ms, under the {} ms of {} tiles at walking pace.", + NURSE_RUN_HOLD.count(), needed.count(), CENTER_MAT_TO_COUNTER_TILES); + } + return true; +} + +// 00.05b with the boy below the Mart (school_kid_m_5, who wanders x 51, +// y 33..35) standing on (51, `row`), and a push against him reading as +// stopped only 1600 ms late, as on lab-B 2026-11-11 21:00 ("east 8 (to +// wall)" along row 34 stopped after 2800 ms about 5 tiles in, and the +// route went on from the wall). +std::string boy_below_the_mart(Logger& logger, int row){ + SimWorldKnobs knobs; + knobs.standing = {{"school_kid_m_5", TilePos{51, row}}}; + knobs.pushing_someone = 1600ms; + return run_case(logger, "00.05b", "00.05b", {.fade = {}, .banner = {}}, std::move(knobs)); +} + +// 01.10 on lab-B (2026-11-13 02:35 and 02:37): the player walked Route +// 204's row 28, not the plan's row 27, and "west 10 (to wall)" stopped +// against the youngster (youngster_4, who wanders x 14..16 on row 28) +// about 5 tiles in. The push read as stopped late (2400 and 2800 ms), the +// time counted 13 tiles and more, and the stop passed as the wall at +// (10, 27): every later leg ran 5 columns off, and "west 1 (to wall)" ran +// on 6 tiles to "position unknown". Which way the row went wrong is open: +// `cave_exit_low`, the cave leaves us on (20, 27) and the old line 1's +// "south 1" goes on to row 28, on today's table; else, on the old line 1, +// that south 1 moved two tiles, and the walker must tell the youngster +// from the wall. The youngster stands on (14, 28), as on the console's +// run 1. +std::string youngster_on_route_204(Logger& logger, bool cave_exit_low){ + SimWorldKnobs knobs; + knobs.standing = {{"youngster_4", TilePos{14, 28}}}; + knobs.pushing_someone = 1200ms; + if (cave_exit_low){ + knobs.start_at = Pokemon::tile_pose("Route204North", {TilePos{20, 27}}, Direction::SOUTH); + return run_case(logger, "01.10", "01.10", {.fade = {}, .banner = {}}, std::move(knobs)); + } + StoryStep old_line_1 = table_step("01.10", "line_1"); + old_line_1.args["target"] = GridPose{"Route204North", {{20, 27}}, std::nullopt}; + knobs.lands["line_1"] = Pokemon::tile_pose("Route204North", {TilePos{20, 28}}, Direction::SOUTH); + return run_case(logger, "01.10", "01.10", {.fade = {}, .banner = {}}, std::move(knobs), table_with("01.10", old_line_1)); +} + +// 01.07: after the tag battle the screen fades back from the battle and +// the grunts run off before anyone speaks: a scene that opens with no box, +// 6 s of people moving (Rowan's cutscene shape), then Rowan's and Dawn's +// lines, and Bebe walks over with hers. The lengths are a model: r80 saved +// over her lines. +UnitTestResult grunts_run_off_before_rowan(Logger& logger){ + SimWorldKnobs knobs; + knobs.scenes["galactic_grunts"] = { + sim_fade("back from the battle", 1000ms), + sim_pause("the grunts run off", 6000ms, true), + sim_line("Rowan"), + sim_line("Rowan"), + sim_line("Dawn"), + sim_pause("Bebe walks over", 5000ms, true), + sim_line("Bebe"), + sim_line("Bebe: the Pokemon Center's PC"), + }; + return passes(run_case(logger, "01.07", "01.07", {.fade = {}, .banner = {}}, knobs)); +} + +// 00.03: Rowan's scene opens with no box: Rowan and Dawn walk back and +// stand a moment before his first line; after he leaves, Dawn's and +// Barry's lines, the fade home, and Mom walks over before she speaks +// (r23, r24, r31). The scene changes map, so only the quiet after the +// fade counts. +UnitTestResult rowans_scene_opens_with_no_box(Logger& logger){ + SimWorldKnobs knobs; + knobs.scenes["rowan_and_dawn"] = { + sim_pause("Rowan and Dawn walk back", 7000ms, true), + sim_pause("they stand a moment", 3000ms, false), + sim_line("Rowan"), + sim_line("Rowan"), + sim_pause("Rowan leaves", 6000ms, true), + sim_pause("Dawn and Barry stand", 3000ms, false), + sim_line("Dawn"), + sim_line("Barry"), + sim_fade("the fade home", 1500ms), + sim_pause("home, still", 4000ms, false), + sim_pause("Mom walks over", 5000ms, true), + sim_line("Mom: the Running Shoes"), + sim_line("Mom"), + }; + return passes(run_case(logger, "00.03", "00.03", {.fade = {}, .banner = {}}, knobs)); +} + +// 00.03: Mom's lines, a still moment, then the scene's closing fade +// (lab-B 2026-11-09 14:33). The scene once ended as the fade went down, +// and the next step's input landed in it: the talk-over must wait for the +// fade to come back up and for the quiet after it. +UnitTestResult moms_scene_ends_with_a_fade(Logger& logger){ + SimWorldKnobs knobs; + knobs.scenes["rowan_and_dawn"] = { + sim_line("Dawn"), + sim_line("Barry"), + sim_fade("the fade home", 1500ms), + sim_line("Mom: the Running Shoes"), + sim_line("Mom"), + sim_pause("Mom stands", 4000ms, false), + sim_fade("the scene's closing fade", 2000ms), + }; + return passes(run_case(logger, "00.03", "00.03", {.fade = {}, .banner = {}}, knobs)); +} + +// 00.02: the Starly battle's opening is still playing when the battle +// step starts, right after choose_starter (lab-B 2026-11-09 run 3, event +// 7): the battle step's, not interrupt_unsettled before it. +UnitTestResult starly_opening_after_the_starter(Logger& logger){ + SimWorldKnobs knobs; + knobs.battle_opening_before = [](const std::string& row, const std::string& step){ + return row == "00.02" && step == "starly"; + }; + return passes(run_case(logger, "00.02", "00.02", {.fade = {}, .banner = {}}, knobs)); +} + +// 00.04b: the run down Route 202's road into Sandgem stopped two columns +// west of the table's (29, 5), on (27, 5), and the counted walk on to +// the Center's door ended below its west wall: the heal ran north into +// the wall (lab-B 2026-11-09 20:09). The walk to the door must find its +// column on walls, wherever on the road's last row the run stopped. +UnitTestResult sandgem_entry_two_columns_west(Logger& logger){ + SimWorldKnobs knobs; + knobs.lands["into_sandgem"] = Pokemon::tile_pose("SandgemTown", {TilePos{27, 5}}, Direction::SOUTH); + return passes(run_case(logger, "00.04b", "00.04b", {.fade = {}, .banner = {}}, std::move(knobs))); +} + +// 00.05c on lab-B 2026-11-11: 00.05b's Poketch Company clown was +// "answered" by the sign's text, so the save held two coupons; the +// president gave no Poketch and 00.05c went on to the street as passed. +// 00.05c talks to no clown (00.05b checks its coupons before its save): +// from such a save it stops at its Poketch check. +UnitTestResult no_poketch_fails_00_05c(Logger& logger){ + SimWorldKnobs knobs; + knobs.coupons_at_start = {"mart_clown", "tv_clown"}; + knobs.poketch_at_start = false; + const std::string stopped = run_case(logger, "00.05c", "00.05c", {.fade = {}, .banner = {}}, std::move(knobs)); + if (stopped.find("00.05c poketch") == std::string::npos){ + return UnitTestResult("expected a stop at 00.05c's Poketch check; got " + (stopped.empty() ? std::string("a pass") : stopped)); + } + return true; +} +// 00.05b with the Poketch Company's clown answered by the sign's text +// (lab-B 2026-11-11): two coupons. The row fails at its coupon check +// instead of saving them. +UnitTestResult missing_coupon_fails_00_05b(Logger& logger){ + SimWorldKnobs knobs; + knobs.coupons_at_start = {}; + knobs.talks_without_coupon = {"company_clown"}; + const std::string stopped = run_case(logger, "00.05b", "00.05b", {.fade = {}, .banner = {}}, std::move(knobs)); + if (stopped.find("00.05b all_three_coupons") == std::string::npos){ + return UnitTestResult("expected a stop at 00.05b's coupon check; got " + (stopped.empty() ? std::string("a pass") : stopped)); + } + return true; +} +// 00.05c's walk up the main road on lab-B 2026-11-12 13:32: its open leg +// north ended a row off, the leg east to the wall stopped at the Mart's +// hedges, and the walk took it for (59, 26) and "arrived" below the +// east-exit sign beside them. The end on (59, 21) must hold from a row +// off either way, into 01.01 from there. +UnitTestResult main_road_a_row_off_00_05c(Logger& logger){ + std::string failures; + for (const Direction direction : {Direction::NORTH, Direction::SOUTH}){ + SimWorldKnobs knobs; + knobs.slides = {{.step = "below_the_east_exit_sign", .direction = direction, .tiles = 1}}; + const std::string stopped = run_case(logger, "00.05c", "01.01", {.fade = {}, .banner = {}}, std::move(knobs)); + if (!stopped.empty()){ + failures += std::format("\n a row {}: {}", Pokemon::direction_name(direction), stopped); + } + } + return failures.empty() ? UnitTestResult(true) : UnitTestResult("00.05c up the main road:" + failures); +} +// 00.05c on lab-B 2026-11-12 13:55: a short D-pad tap in a new direction +// after the east leg only turned the player, and the walk, counting its +// taps against an inferred start, tapped east against the hedges. Every +// tap leg now turns first and then steps a whole tile, so the walk from +// the street ends on (59, 21) and the row goes on into 01.01. +UnitTestResult turn_tap_after_the_east_leg_00_05c(Logger& logger){ + const std::string stopped = run_case(logger, "00.05c", "01.01", {.fade = {}, .banner = {}}, SimWorldKnobs{}); + return stopped.empty() ? UnitTestResult(true) : UnitTestResult("00.05c to the east-exit sign: " + stopped); +} +// 01.01 from a save with no Poketch: Jubilife's east-exit guard would +// ask about the Poketch campaign and turn us back (lab-B 2026-11-11, the +// walk took him for a trainer); the row stops at its first step instead. +UnitTestResult gate_guard_stops_01_01(Logger& logger){ + SimWorldKnobs knobs; + knobs.poketch_at_start = false; + const std::string stopped = run_case(logger, "01.01", "01.01", {.fade = {}, .banner = {}}, std::move(knobs)); + if (stopped.find("01.01 poketch_before_the_gate") == std::string::npos){ + return UnitTestResult("expected a stop at 01.01's Poketch check; got " + (stopped.empty() ? std::string("a pass") : stopped)); + } + return true; +} + +// 00.03: Rowan's scene ends at home on (6, 8) beside Mom (lab-B +// 2026-11-09, 7 of 7 runs). The way out holds south onto the door's tile +// (6, 10); from a column west, (5, 8), the hold stops on (5, 10) with no +// fade, and a tap east onto the mat goes out. +UnitTestResult home_from_each_scene_end(Logger& logger){ + std::string failures; + for (const TilePos& tile : {TilePos{6, 8}, TilePos{5, 8}}){ + SimWorldKnobs knobs; + knobs.lands["rowan_and_dawn"] = Pokemon::tile_pose("PlayerHouse1F", {tile}, Direction::EAST); + const std::string stopped = run_case(logger, "00.03", "00.03", {.fade = {}, .banner = {}}, std::move(knobs)); + if (!stopped.empty()){ + failures += std::format("\nfrom ({}, {}): {}", tile.x, tile.y, stopped); + } + } + return passes(failures); +} + +// The table with row `id` cut to `step` alone, from `start`. +std::vector table_with_row(const std::string& id, const Pose& start, const StoryStep& step){ + std::vector rows = story_checkpoints(); + for (StoryCheckpoint& checkpoint : rows){ + if (checkpoint.id == id){ + checkpoint.start = Pokemon::TileDeclared{start.map, Pokemon::tiles_of(start), Pokemon::facing_of(start)}; + checkpoint.steps = {step}; + } + } + return rows; +} +// 00.03: Rowan's trigger is the column (5, 14..16) on Route 201 (decomp), +// 20 tiles east of the Lakefront's wall row 21 (Route 201's row 14). The +// step routes from where the lake's scene leaves us, or from a row or two +// lower (21..23), onto that row, then runs east until his scene stops the +// run on a tile of the column. +UnitTestResult rowans_scene_from_each_start(Logger& logger){ + const StoryStep& walk = table_step("00.03", "into_rowans_scene"); + const Pose trigger = Pokemon::tile_pose("Route201", {TilePos{5, 14}, TilePos{5, 15}, TilePos{5, 16}}, Direction::EAST); + std::string failures; + for (const TilePos& tile : {TilePos{17, 14}, TilePos{17, 15}, TilePos{20, 21}, TilePos{20, 22}, TilePos{20, 23}}){ + const Pose start = Pokemon::tile_pose("VerityLakefront", {tile}, Direction::SOUTH); + const std::vector rows = table_with_row("00.03", start, walk); + SimExecutor executor(logger, {.fade = {}, .banner = {}}, {}); + const Pokemon::SegmentReport report = run_rows_on(executor, logger, {.from = "00.03", .to = "00.03"}, rows); + if (!report.completed){ + failures += std::format("\nfrom ({}, {}): stopped in {}: {}", tile.x, tile.y, executor.result().failed_step, executor.result().error); + }else if (!ends_on(executor.result(), trigger)){ + failures += std::format("\nfrom ({}, {}): the walk ended at {}, not on Rowan's trigger", tile.x, tile.y, end_of(executor.result())); + } + } + return passes(failures); +} +// 00.03: Dawn's scene starts on Sandgem's column 4 (rows 10..15, decomp), +// five tiles into the run east from Route 201's edge (Sandgem (-1, 12) is +// Route 201 (63, 5)). From the house's doorstep, the step routes to the +// edge and runs on until her scene stops it there (r35, r36: an exact +// tile and banner raced her scene). +UnitTestResult dawns_scene_mid_run(Logger& logger){ + const StoryStep& walk = table_step("00.03", "into_dawns_scene"); + const Pose start = Pokemon::tile_pose("TwinleafTown", {map_point("TwinleafTown", "house_doorstep")}, Direction::SOUTH); + const std::vector rows = table_with_row("00.03", start, walk); + SimExecutor executor(logger, {.fade = {}, .banner = {}}, {}); + const Pokemon::SegmentReport report = run_rows_on(executor, logger, {.from = "00.03", .to = "00.03"}, rows); + if (!report.completed){ + return std::format("stopped in {}: {}", executor.result().failed_step, executor.result().error); + } + const Pose trigger = Pokemon::tile_pose("SandgemTown", {TilePos{4, 12}}, Direction::EAST); + if (!ends_on(executor.result(), trigger)){ + return std::format("the walk ended at {}, not on Dawn's trigger (4, 12).", end_of(executor.result())); + } + return true; +} + +// Route 201's grass, as the console met it: a wild battle on each of four +// passes of 10 tiles of row 5's grass (lab-B 2026-11-09 16:14). A battle +// each 8 grass tiles gives one on every such pass. +SimWorldKnobs route_201_grass(){ + SimWorldKnobs knobs; + knobs.grass.every = 8; + return knobs; +} +// 00.04's steps from the east end of Sandgem's path down over Route 201's +// ledge: "to_route_201" through "over_the_ledge", less `skip`. The run +// west leaves us on one of seven tiles, as on the console. +std::vector ledge_walk(const std::set& skip){ + std::vector steps; + bool on = false; + for (const StoryCheckpoint& checkpoint : story_checkpoints()){ + for (const StoryStep& step : checkpoint.steps){ + if (checkpoint.id != "00.04"){ + continue; + } + on |= step.name == "to_route_201"; + if (on && !skip.contains(step.name)){ + steps.push_back(step); + } + if (step.name == "over_the_ledge"){ + return steps; + } + } + } + throw InternalProgramError(nullptr, PA_CURRENT_FUNCTION, "No over_the_ledge after to_route_201 in 00.04"); +} +// 00.04 from the east end of Sandgem's path to below Route 201's ledge, a +// wild battle each 8 grass tiles: "" if it gets there, else where and why +// it stopped. Without `skip`, the table's walk. +std::string ledge_walk_in_grass(Logger& logger, const std::set& skip){ + std::vector rows = story_checkpoints(); + for (StoryCheckpoint& checkpoint : rows){ + if (checkpoint.id == "00.04"){ + const GridPose target = story_arg(table_step("00.04", "onto_the_path").args, "target"); + checkpoint.start = Pokemon::TileDeclared{target.map, target.tiles, target.facing}; + checkpoint.steps = ledge_walk(skip); + } + } + return run_case(logger, "00.04", "00.04", {.fade = {}, .banner = {}}, route_201_grass(), rows); +} + +// The scenes a run's walks fought as trainers', or "none". +std::string fought(const SimRun& run){ + std::string out; + for (const std::string& scene : run.scenes_fought){ + out += (out.empty() ? "" : "; ") + scene; + } + return out.empty() ? "none" : out; +} +// 00.04: Mom's call after her heal fires on (6, 9), above the mat +// (lab-B 2026-11-09 17:29). The walk into it ends in her call, which her +// hat scene's step plays to the fade out with her; no walk fights it. +UnitTestResult moms_call_above_the_mat(Logger& logger){ + SimExecutor executor(logger, {.fade = {}, .banner = {}}, {}); + const Pokemon::SegmentReport report = run_rows_on(executor, logger, {.from = "00.04", .to = "00.04"}); + if (!report.completed){ + return std::format("stopped in {}: {}", executor.result().failed_step, executor.result().error); + } + if (!executor.result().scenes_fought.empty()){ + return "a walk fought a scene: " + fought(executor.result()); + } + return true; +} +// 00.04's old walk round Mom to (6, 9) and step onto the mat. On the +// console the walk fought her call, the step went out of the door and her +// hat scene saw no fade. A route before a step onto a scene's trigger now +// hands a scene that starts on the way to the scene's step, and the step +// onto the trigger is not taken. +UnitTestResult old_walk_hands_moms_call_over(Logger& logger){ + std::vector rows = story_checkpoints(); + for (StoryCheckpoint& checkpoint : rows){ + if (checkpoint.id != "00.04"){ + continue; + } + std::vector steps; + for (StoryStep& step : checkpoint.steps){ + if (step.name != "into_moms_call"){ + steps.push_back(std::move(step)); + continue; + } + for (StoryStep& old : old_round_mom_to_the_mat()){ + steps.push_back(std::move(old)); + } + } + checkpoint.steps = std::move(steps); + } + SimExecutor executor(logger, {.fade = {}, .banner = {}}, {}); + const Pokemon::SegmentReport report = run_rows_on(executor, logger, {.from = "00.04", .to = "00.04"}, rows); + const SimRun& run = executor.result(); + if (!report.completed){ + return std::format("stopped in {}: {}", run.failed_step, run.error); + } + if (!run.scenes_fought.empty()){ + return "a walk fought a scene: " + fought(run); + } + return true; +} + +struct FailureCaseInput{ + std::string name; + std::function body; +}; +// Whether a case is expected to fail is KNOWN_FAILING's, by name. +struct FailureCaseExpectation{ +}; +struct FailureCase{ + FailureCaseInput input; + FailureCaseExpectation expectation; +}; + +class Test_AutoStoryFailureCase : public UnitTest{ +public: + explicit Test_AutoStoryFailureCase(FailureCase test_case) + : UnitTest("PokemonBDSP::AutoStory - Console failure on the sim: " + test_case.input.name) + , m_case(std::move(test_case)) + {} + virtual UnitTestResult run(Logger& logger, CancellableScope&) const override{ + UnitTestResult result; + try{ + result = m_case.input.body(logger); + }catch (Exception& e){ + result = std::string(e.name()) + ": " + e.message(); + } + const auto known = KNOWN_FAILING.find(m_case.input.name); + if (known == KNOWN_FAILING.end()){ + return result; + } + if (result.result == UnitTestResult::PASSED){ + return "on KNOWN_FAILING (" + known->second + ") but passes now: take it off the list."; + } + logger.log("Known failing until " + known->second + ": " + result.message); + return true; + } + +private: + FailureCase m_case; +}; + +} // namespace + +const FailureCase AUTO_STORY_FAILURE_CASES[] = { + {.input = {"01.05 through_the_gate's last leg runs a tile on (lab-B 2026-11-08 15:31)", [](Logger& logger){ + return passes(run_case(logger, "01.05", "01.05", {.fade = {}, .banner = {}}, gate_slide(SimFade::DIM, false))); + }}, .expectation = {}}, + {.input = {"01.05 old walk slides onto the Gate's west mouth, dim fade, banner gone", [](Logger& logger){ + return gate_old_walk_slides(logger, SimFade::DIM, false); + }}, .expectation = {}}, + {.input = {"01.05 old walk slides onto the Gate's west mouth, dim fade, banner up", [](Logger& logger){ + return gate_old_walk_slides(logger, SimFade::DIM, true); + }}, .expectation = {}}, + {.input = {"01.05 old walk slides onto the Gate's west mouth, black fade", [](Logger& logger){ + return gate_old_walk_slides(logger, SimFade::BLACK, true); + }}, .expectation = {}}, + {.input = {"01.05 old walk slides onto the Gate's west mouth, white fade", [](Logger& logger){ + return gate_old_walk_slides(logger, SimFade::WHITE, true); + }}, .expectation = {}}, + {.input = {"01.05 through_the_gate is one run west", gate_plan_one_run}, .expectation = {}}, + {.input = {"any one missed fade or banner from 00.00 to 01.11: every row still passes", [](Logger& logger){ + return every_single_miss(logger, {}); + }}, .expectation = {}}, + {.input = {"any one missed fade or banner at a warp that shows both: its row still passes", [](Logger& logger){ + return every_single_miss(logger, ONE_SIGNAL_STEPS); + }}, .expectation = {}}, + {.input = {"any one fade with its hold unseen from 00.00 to 01.11: every row still passes", every_single_hold_miss}, .expectation = {}}, + {.input = {"01.02 by_the_east_mouth runs onto the Gate's east warp, fade unseen (lab-B 2026-11-12)", east_mouth_crossed_unseen}, .expectation = {}}, + {.input = {"01.02 to 01.05 at night, the Gate's dim floor", night_and_dim_floors}, .expectation = {}}, + {.input = {"01.03 Roark's first line 7 s after the A press", roark_speaks_late}, .expectation = {}}, + {.input = {"01.03 with Oreburgh's people wandering (the pokefan on 45, 37..39)", [](Logger& logger){ + return wanderers_move(logger, "01.03"); + }}, .expectation = {}}, + {.input = {"01.08 with Route 204's youngster wandering (12..14, 2)", [](Logger& logger){ + return wanderers_move(logger, "01.08"); + }}, .expectation = {}}, + {.input = {"00.05b with Jubilife's people wandering (the clowns, the boy below the Mart on 51, 33..35)", [](Logger& logger){ + return wanderers_move(logger, "00.05b"); + }}, .expectation = {}}, + {.input = {"00.05c with Jubilife's people wandering (the clowns, the boy below the Mart on 51, 33..35)", [](Logger& logger){ + return wanderers_move(logger, "00.05c"); + }}, .expectation = {}}, + {.input = {"01.04 Roark's badge speech: the fanfare's pause, then a scene", roark_badge_speech}, .expectation = {}}, + {.input = {"inside a Pokemon Center, the door's settle ends within 3 s of the fade-up with visitors walking, never during the fade", center_inside_settles}, .expectation = {}}, + {.input = {"01.03: a door into the mine or the coal room settles within 3 s of the fade-up, whatever moves in the cave (lab-B 2026-11-12 21:57)", mine_doors_settle_fast}, .expectation = {}}, + {.input = {"inside a Pokemon Center, one held run north from the door mat reaches the nurse", nurse_in_one_run}, .expectation = {}}, + {.input = {"01.07 after the tag battle the grunts run off before anyone speaks", grunts_run_off_before_rowan}, .expectation = {}}, + {.input = {"00.03 Rowan's scene opens with no box and fades home", rowans_scene_opens_with_no_box}, .expectation = {}}, + {.input = {"00.03 Mom's scene ends with a closing fade: over once it is back up (lab-B 2026-11-09)", moms_scene_ends_with_a_fade}, .expectation = {}}, + {.input = {"00.02 the Starly battle's opening still plays after the starter (lab-B 2026-11-09)", starly_opening_after_the_starter}, .expectation = {}}, + {.input = {"00.03 out of the house from (6, 8), where Rowan's scene ends, and from a column west", home_from_each_scene_end}, .expectation = {}}, + {.input = {"00.03 the walk into Rowan's scene routes onto his row and stops on his trigger mid-run", rowans_scene_from_each_start}, .expectation = {}}, + {.input = {"00.03 the walk into Sandgem stops on Dawn's trigger mid-run", dawns_scene_mid_run}, .expectation = {}}, + {.input = {"00.04 Mom's call fires above the mat, on (6, 9): the walk ends in it, her hat scene plays it (lab-B 2026-11-09 17:29)", moms_call_above_the_mat}, .expectation = {}}, + {.input = {"00.04 the old walk round Mom to (6, 9) runs into her call: it hands it to her hat scene, not fights it (lab-B 2026-11-09 17:29)", old_walk_hands_moms_call_over}, .expectation = {}}, + {.input = {"00.04b the run into Sandgem stops two columns west: the walk still ends below the Center's door (lab-B 2026-11-09 20:09)", sandgem_entry_two_columns_west}, .expectation = {}}, + {.input = {"00.05b the boy below the Mart stands on row 34: the walk to the Mart clown goes round his zone (lab-B 2026-11-11 21:00)", [](Logger& logger){ + return passes(boy_below_the_mart(logger, 34)); + }}, .expectation = {}}, + {.input = {"00.05b someone stands in the walk's way on row 36: a wall leg held up is not at its wall (lab-B 2026-11-11 21:00)", [](Logger& logger){ + const std::string stopped = boy_below_the_mart(logger, 36); + return stopped.find("sim_mismatch") == std::string::npos ? UnitTestResult(true) + : UnitTestResult("the program went on from a tile the player is not on: " + stopped); + }}, .expectation = {}}, + {.input = {"01.10 the cave exit leaves us a row low, on (20, 27): the youngster on row 28 stops west 10 (to wall), not its wall (lab-B 2026-11-13 02:35)", [](Logger& logger){ + return passes(youngster_on_route_204(logger, true)); + }}, .expectation = {}}, + {.input = {"01.10 the old line 1's south 1 moves two tiles, to (20, 28): the youngster on row 28 stops west 10 (to wall), not its wall (lab-B 2026-11-13 02:35)", [](Logger& logger){ + return passes(youngster_on_route_204(logger, false)); + }}, .expectation = {}}, + {.input = {"00.05c a coupon missing (the sign read for the Poketch Company clown): no Poketch, 00.05c fails (lab-B 2026-11-11)", no_poketch_fails_00_05c}, .expectation = {}}, + {.input = {"00.05b a coupon missing at its end: the row fails at its coupon check, before the save", missing_coupon_fails_00_05b}, .expectation = {}}, + {.input = {"00.05c the walk up the main road ends a row off: still on (59, 21) below the east-exit sign, into 01.01 (lab-B 2026-11-12 13:32)", main_road_a_row_off_00_05c}, .expectation = {}}, + {.input = {"00.05c the turn tap after the east leg only turns: the walk ends on (59, 21), into 01.01 (lab-B 2026-11-12 13:55)", turn_tap_after_the_east_leg_00_05c}, .expectation = {}}, + {.input = {"01.01 with no Poketch: the east-exit guard's gate stops the row at its check, not a trainer fight (lab-B 2026-11-11)", gate_guard_stops_01_01}, .expectation = {}}, + {.input = {"00.04 to the ledge column with a wild battle on each pass through Route 201's grass (lab-B 2026-11-09 16:14)", [](Logger& logger){ + return passes(ledge_walk_in_grass(logger, {})); + }}, .expectation = {}}, + // It failed there with "too many plans" until replans crossed the + // grass on legs to a wall (replan_costs(), 2026-11-09). + {.input = {"00.04 the old walk to the ledge column, west to row 5's wall through the grass, now passes", [](Logger& logger){ + return passes(ledge_walk_in_grass(logger, {"to_the_signs_row"})); + }}, .expectation = {}}, +}; + +void add_tests_AutoStory_SimFailureCases(UnitTestDatabase& database){ + for (const auto& item : AUTO_STORY_FAILURE_CASES){ + database.add(item); + } +} + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimFailureCases_Tests.h b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimFailureCases_Tests.h new file mode 100644 index 0000000000..b196c4baf9 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimFailureCases_Tests.h @@ -0,0 +1,27 @@ +/* BDSP AutoStory - Console failure cases on the story simulation + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonBDSP_AutoStory_SimFailureCases_Tests_H +#define PokemonAutomation_PokemonBDSP_AutoStory_SimFailureCases_Tests_H + +#include "Common/Cpp/TestRunners/UnitTestDatabase.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ + + + +// Each failure console B showed in events and perception, run on the story +// simulation; the ones the program still fails are known failing. +void add_tests_AutoStory_SimFailureCases(UnitTestDatabase& database); + + + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation +#endif diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimGolden_Tests.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimGolden_Tests.cpp new file mode 100644 index 0000000000..b14177b248 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimGolden_Tests.cpp @@ -0,0 +1,222 @@ +/* BDSP AutoStory - Sim golden tests + * + * From: https://github.com/PokemonAutomation/ + * + * What the story simulation (SimExecutor on GridSim) does with each row, + * kept as goldens so that the shared sim core (seam 3) can move BDSP's + * sim onto it and show that nothing changed: + * + * - sim_golden_rows.txt: each row the fault sweep runs (FaultSweep_Tests' + * FIRST_ROW to LAST_ROW), run clean on its own: whether it completed or + * where it stopped, where the player ended, the steps the sim stubbed, + * the walks that end where nothing says, the scenes a walk fought, the + * fades, banners, doors and tap steps it looked for, and every line its + * walks wrote (the route walker's and the leg records). + * - sim_golden_faults.txt: the fault sweep's outcome for each row and + * fault class: its result and its summary lines. The segment runner's + * lines of each variant are left out: they repeat the rows golden. + * + * Rewrite both with PA_UPDATE_SIM_GOLDENS=1 (Pokemon_SimGolden.h). + * + */ + +#include +#include +#include +#include +#include +#include "Common/Cpp/Exceptions.h" +#include "Common/Cpp/Logging/AbstractLogger.h" +#include "Common/Cpp/TestRunners/UnitTest.h" +#include "Pokemon/Navigation/Simulation/Pokemon_SimGolden.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryTable.h" +#include "PokemonBDSP_AutoStory_FaultSweep_Tests.h" +#include "PokemonBDSP_AutoStory_StorySim.h" +#include "PokemonBDSP_AutoStory_SimGolden_Tests.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ + + +namespace{ + +// The rows the goldens run: the fault sweep's (FaultSweep_Tests.cpp). +constexpr std::string_view FIRST_ROW = "00.00"; +constexpr std::string_view LAST_ROW = "01.11"; + +// Drops the lines it is given: the segment runner's, which the goldens +// leave out. +class QuietLogger : public Logger{ +public: + using Logger::log; + virtual void log(const std::string&, Color) override{} +}; + +// Keeps the lines it is given. +class LineLogger : public Logger{ +public: + using Logger::log; + virtual void log(const std::string& msg, Color) override{ + lines.push_back(msg); + } + std::vector lines; +}; + +// `text`'s lines, each indented by `indent`. +void add_indented(const std::string& text, const std::string& indent, std::vector& lines){ + size_t begin = 0; + while (begin <= text.size()){ + const size_t end = std::min(text.find('\n', begin), text.size()); + lines.push_back(indent + text.substr(begin, end - begin)); + begin = end + 1; + } +} + +// Row `row` run clean on its own, a line per fact. +void golden_row(const StoryCheckpoint& row, std::vector& lines){ + QuietLogger quiet; + SimExecutor executor(quiet, {.fade = {}, .banner = {}}, {}); + const Pokemon::SegmentReport report = run_rows_on(executor, quiet, {.from = row.id, .to = row.id}); + const SimRun& run = executor.result(); + if (report.completed){ + lines.push_back(row.id + ": completed"); + }else{ + lines.push_back(std::format("{}: stopped in {}: {}", row.id, run.failed_step, run.error)); + } + lines.push_back(" ends on " + detail::end_of(run)); + for (const SimRun::RowStart& start : run.rows){ + for (const std::string& stubbed : start.stubbed){ + lines.push_back(" stubbed " + stubbed); + } + } + for (const std::string& step : run.unchecked){ + lines.push_back(" no end to check after " + step); + } + for (const std::string& scene : run.scenes_fought){ + lines.push_back(" fought scene " + scene); + } + const SimMisses& misses = executor.misses(); + lines.push_back(std::format( + " looked for {} fades, {} banners, {} doors, {} tap steps", + looked_for(misses.fade_chances), looked_for(misses.banner_chances), + looked_for(misses.door_chances), looked_for(misses.tap_step_chances) + )); + for (const std::string& note : executor.notes()){ + add_indented(note, " | ", lines); + } +} + +UnitTestResult test_rows_golden(Logger& logger, CancellableScope&){ + std::vector lines; + for (const StoryCheckpoint& row : story_checkpoints()){ + if (row.id >= FIRST_ROW && row.id <= LAST_ROW){ + golden_row(row, lines); + } + } + const std::string text = Pokemon::sim_golden_text( + "BDSP AutoStory rows on the story simulation, clean (PokemonBDSP_AutoStory_SimGolden_Tests.cpp)", lines + ); + return Pokemon::check_sim_golden(logger, Pokemon::sim_golden_path(__FILE__, "sim_golden_rows.txt"), text); +} + + +std::string result_name(UnitTestResult::Result result){ + switch (result){ + case UnitTestResult::PASSED: + return "passed"; + case UnitTestResult::FAILED: + return "failed"; + case UnitTestResult::SKIPPED: + return "skipped"; + default: + return "not run"; + } +} + +// Whether `line` is one of the sweep's own: its summary, a failed +// variant, a known failure, or why it did not sweep. +bool sweep_line(std::string_view line){ + return line.starts_with("Fault sweep ") || line.starts_with("| ") || line.starts_with("Known failing "); +} + +UnitTestResult test_faults_golden(Logger& logger, CancellableScope& scope){ + UnitTestDatabase sweep; + add_tests_AutoStory_FaultSweep(sweep); + std::vector lines; + for (const auto& item : sweep){ + LineLogger captured; + UnitTestResult result; + try{ + result = item.second->run(captured, scope); + }catch (Exception& e){ + result = std::string(e.name()) + ": " + e.message(); + } + lines.push_back(item.first + ": " + result_name(result.result)); + if (!result.message.empty()){ + add_indented(result.message, " | ", lines); + } + for (const std::string& line : captured.lines){ + if (sweep_line(line)){ + add_indented(line, " ", lines); + } + } + } + const std::string text = Pokemon::sim_golden_text( + "BDSP AutoStory fault sweep outcomes (PokemonBDSP_AutoStory_SimGolden_Tests.cpp)", lines + ); + return Pokemon::check_sim_golden(logger, Pokemon::sim_golden_path(__FILE__, "sim_golden_faults.txt"), text); +} + + +struct SimGoldenInput{ + std::string name; + UnitTestResult (*body)(Logger& logger, CancellableScope& scope); +}; + +struct SimGoldenExpectation{ + std::string_view description; +}; + +struct SimGoldenTestCase{ + SimGoldenInput input; + SimGoldenExpectation expectation; +}; + +class Test_AutoStorySimGolden : public UnitTest{ +public: + explicit Test_AutoStorySimGolden(SimGoldenTestCase scenario) + : UnitTest("PokemonBDSP::AutoStory - Sim golden: " + scenario.input.name) + , m_scenario(std::move(scenario)) + {} + virtual UnitTestResult run(Logger& logger, CancellableScope& scope) const override{ + try{ + return m_scenario.input.body(logger, scope); + }catch (Exception& e){ + return std::string(e.name()) + ": " + e.message(); + } + } + +private: + SimGoldenTestCase m_scenario; +}; + +const SimGoldenTestCase SIM_GOLDEN_CASES[] = { + {.input = {.name = "rows on the story simulation, clean", .body = test_rows_golden}, .expectation = {.description = "each row run clean matches sim_golden_rows.txt"}}, + {.input = {.name = "fault sweep outcomes", .body = test_faults_golden}, .expectation = {.description = "each fault sweep's outcome matches sim_golden_faults.txt"}}, +}; + +} // namespace + + +void add_tests_AutoStory_SimGolden(UnitTestDatabase& database){ + for (const SimGoldenTestCase& scenario : SIM_GOLDEN_CASES){ + database.add(scenario); + } +} + + + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimGolden_Tests.h b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimGolden_Tests.h new file mode 100644 index 0000000000..25a0172505 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimGolden_Tests.h @@ -0,0 +1,26 @@ +/* BDSP AutoStory - Sim golden tests + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonBDSP_AutoStory_SimGolden_Tests_H +#define PokemonAutomation_PokemonBDSP_AutoStory_SimGolden_Tests_H + +#include "Common/Cpp/TestRunners/UnitTestDatabase.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ + + +// What the story simulation does with each row, clean and under the fault +// sweep, against the goldens beside the tests +// (PokemonBDSP_AutoStory_SimGolden_Tests.cpp). +void add_tests_AutoStory_SimGolden(UnitTestDatabase& database); + + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation +#endif diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StoryMonteCarlo_Tests.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StoryMonteCarlo_Tests.cpp new file mode 100644 index 0000000000..8c484909c1 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StoryMonteCarlo_Tests.cpp @@ -0,0 +1,475 @@ +/* BDSP AutoStory Story Monte Carlo Tests + * + * From: https://github.com/PokemonAutomation/ + * + * The story's rows on the story simulation (SimExecutor: the program's own + * walking steps on the grid sim), each run once per pinned seed with that + * seed's disturbances (SimDisturbance): wild battles on grass and in caves, + * drift off the grid, the maps' wanderers, and sometimes one missed fade or + * banner. Each row's test logs its pass rate and, per failing step, the + * failure kinds with a seed that reproduces each, and fails only below the + * row's pinned floor. The old 01.03 test shows the harness finds the + * failure lab-B met across Roark's room on 2026-11-08. Each row's seeds that pass with no + * miss run again with one fade's hold unseen, and must pass again. With + * dialogs popping up between steps, a seed that passes without them + * must pass with them, the executor clearing them before each step. + * + */ + +#include +#include +#include +#include +#include +#include +#include "Common/Cpp/Exceptions.h" +#include "Common/Cpp/Time.h" +#include "Common/Cpp/TestRunners/UnitTest.h" +#include "Pokemon/AutoStory/Pokemon_StoryMonteCarlo.h" +#include "Pokemon/AutoStory/Pokemon_TilePose.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryPlaces.h" +#include "PokemonBDSP_AutoStory_SimDisturbance.h" +#include "PokemonBDSP_AutoStory_StorySim.h" +#include "PokemonBDSP_AutoStory_StoryMonteCarlo_Tests.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ + +namespace{ + +using namespace std::chrono_literals; +using Pokemon::Direction; +using Pokemon::RowReport; +using Pokemon::SeedOutcome; +using Pokemon::StoryStep; +using Pokemon::TilePos; + +constexpr std::string_view SEEDS_VARIABLE = "PA_BDSP_STORY_MC_SEEDS"; +constexpr std::string_view ROWS_VARIABLE = "PA_BDSP_STORY_MC_ROWS"; +constexpr std::string_view TRACE_VARIABLE = "PA_BDSP_STORY_MC_TRACE"; +constexpr size_t DEFAULT_SEEDS = 20; + +// The runs log nothing: a seed's own log is a reproduction away. +class SilentLogger : public Logger{ +public: + virtual void log(const std::string&, Color) override{} +}; + +// The fades and banners an undisturbed run of `row` looks for. +SimMisses looked_for(const std::vector& rows, const std::string& row){ + SilentLogger logger; + SimExecutor executor(logger); + run_rows_on(executor, logger, {.from = row, .to = row}, rows); + return executor.misses(); +} + +// How a failed run failed, as the report groups it. +SeedOutcome failed_outcome(const Pokemon::SegmentReport& report, const SimRun& run, const SimDisturbance& noise){ + const bool in_step = !run.failed_step.empty(); + SeedOutcome out{ + .passed = false, + .failed_step = in_step ? run.failed_step : report.failed_checkpoint + " " + report.failed_event, + .kind = in_step ? Pokemon::failure_kind(run.failure, run.failure_detail) + : Pokemon::failure_kind(report.failure.failure, report.failure.detail), + .detail = std::format("{}; {} wild battle(s)", describe(noise.plan()), run.battles), + }; + if (run.failed_step_battles > 0){ + out.kind += " [wild battle in the step]"; + } + if (in_step && run.missed_step == run.failed_step){ + out.kind += " [missed detection in the step]"; + } + return out; +} + +// How a row's seeds are disturbed: at `rates`, missing one of the fades +// and banners its undisturbed run looked for (`clean`). +struct RowNoise{ + SimMisses clean; + Pokemon::DisturbanceRates rates; +}; + +// The rates the harness was first built with, harsher than lab-B's (see +// DisturbanceRates): Gen IV's encounter rates, taps that drift as the +// stick does, and a miss in about a quarter of 01.03's seeds. +Pokemon::DisturbanceRates stress_rates(){ + Pokemon::DisturbanceRates rates; + rates.grass_encounter = 30.0 / 180; + rates.cave_encounter = 10.0 / 180; + rates.tap_drift_per_tile = rates.drift_per_tile; + rates.missed_detection = 0.04; + return rates; +} + +// What the executor does with a dialog that pops up between steps. +enum class PoppedDialog{ + CLEARED, // cleared before the next step, as the console does + LEFT_UP, // left up, as before the executor looked (SimWorldKnobs::clear_interrupts) +}; + +// Row `row` of `rows`, disturbed by `seed`, logging to `logger`. +SeedOutcome run_seed( + Logger& logger, const std::vector& rows, const RowNoise& noise_of, const std::string& row, uint64_t seed, + PoppedDialog popped = PoppedDialog::CLEARED +){ + const SimMisses& clean = noise_of.clean; + SimDisturbance noise(Pokemon::make_disturbance_plan(seed, noise_of.rates, PokemonBDSP::looked_for(clean.fade_chances), PokemonBDSP::looked_for(clean.banner_chances))); + Pokemon::SimRandom dialogs = noise.plan().dialogs; + const double dialog_rate = noise_of.rates.dialog_between_steps; + SimWorldKnobs knobs{ + .dialog_before = [&dialogs, dialog_rate](const std::string&, const std::string&){ + return dialog_rate > 0 && dialogs.chance(dialog_rate); + }, + .clear_interrupts = popped == PoppedDialog::CLEARED, + .noise = &noise, + }; + SimExecutor executor(logger, {.fade = noise.plan().missed_fade, .banner = noise.plan().missed_banner, .hold = noise.plan().missed_hold}, std::move(knobs)); + try{ + const Pokemon::SegmentReport report = run_rows_on(executor, logger, {.from = row, .to = row}, rows); + logger.log(std::format("[Sim] {}: {} wild battle(s) over {} grass and {} cave tiles.", describe(noise.plan()), + noise.battles(), noise.encounter_tiles().grass, noise.encounter_tiles().cave)); + return report.completed ? SeedOutcome{.passed = true} : failed_outcome(report, executor.result(), noise); + }catch (const GridSimFailure& e){ + return {.failed_step = row + " (thrown)", .kind = Pokemon::failure_kind("sim_failure", e.message), .detail = describe(noise.plan())}; + }catch (const Exception& e){ + return {.failed_step = row + " (thrown)", .kind = Pokemon::failure_kind(e.name(), e.message()), .detail = describe(noise.plan())}; + } +} + +RowReport run_row(const std::vector& rows, const std::string& row, size_t seeds, + const Pokemon::DisturbanceRates& rates = {} +){ + const RowNoise noise{.clean = looked_for(rows, row), .rates = rates}; + return Pokemon::run_row_seeds(row, Pokemon::story_seeds(seeds), [&](const std::string& id, uint64_t seed){ + SilentLogger logger; + return run_seed(logger, rows, noise, id, seed); + }); +} + + +// A row's seeds (run_row()), and each that passes with no miss run again +// with one fade's hold dropped (a short fade between two frames; the +// door's watcher missed 13 of 35 on lab-B, 2026-11-08): the program's fade +// watch takes the scene after the fall, so it must pass again. How many +// ran again, and those that then failed, as "plan: step kind". +struct HeldRowReport{ + RowReport report; + size_t rerun = 0; + std::vector hold_failed; +}; +HeldRowReport run_row_holding(const std::vector& rows, const std::string& row, size_t seeds){ + const RowNoise noise{.clean = looked_for(rows, row), .rates = {}}; + RowNoise hold_noise = noise; + hold_noise.rates.missed_hold = 1; + HeldRowReport out; + out.report = Pokemon::run_row_seeds(row, Pokemon::story_seeds(seeds), [&](const std::string& id, uint64_t seed){ + SilentLogger silent; + const SeedOutcome plain = run_seed(silent, rows, noise, id, seed); + const Pokemon::DisturbancePlan plan = Pokemon::make_disturbance_plan(seed, noise.rates, PokemonBDSP::looked_for(noise.clean.fade_chances), PokemonBDSP::looked_for(noise.clean.banner_chances)); + if (plain.passed && PokemonBDSP::looked_for(noise.clean.fade_chances) > 0 && !plan.missed_fade && !plan.missed_banner){ + out.rerun++; + const SeedOutcome hold = run_seed(silent, rows, hold_noise, id, seed); + if (!hold.passed){ + out.hold_failed.push_back(std::format("{}: {} {}", hold.detail, hold.failed_step, hold.kind)); + } + } + return plain; + }); + return out; +} + + +// Row `row` for the seeds, under `floor` passes in a hundred a failure: +// each row's floor is what it passed at this branch's tip, so a row that +// passes less often has got worse. A row PA_BDSP_STORY_MC_ROWS leaves out +// is skipped. +UnitTestResult test_row(Logger& logger, const std::string& row, size_t floor){ + if (Pokemon::selected_rows(ROWS_VARIABLE, {row}).empty()){ + return {UnitTestResult::SKIPPED, std::string(ROWS_VARIABLE) + " leaves it out"}; + } + // One seed's run, logged step by step: how a failure the report + // names came about. + if (const size_t traced = Pokemon::seed_count(TRACE_VARIABLE, 0); traced > 0){ + const std::vector rows = story_checkpoints(); + const SeedOutcome out = run_seed(logger, rows, {.clean = looked_for(rows, row), .rates = {}}, row, traced); + logger.log(std::format("{} seed {}: {} {} {}", row, traced, out.passed ? "passed" : "failed", out.failed_step, out.kind)); + return true; + } + const size_t seeds = Pokemon::seed_count(SEEDS_VARIABLE, DEFAULT_SEEDS); + const WallClock start = current_time(); + const HeldRowReport held = run_row_holding(story_checkpoints(), row, seeds); + const RowReport& report = held.report; + const std::vector& hold_failed = held.hold_failed; + const auto took = std::chrono::duration_cast(current_time() - start); + logger.log(Pokemon::format_report(report) + std::format("\n ({} seeds in {} ms)", seeds, took.count())); + logger.log(std::format("{}: one fade's hold unseen: {} of {} seeds that passed with no miss fail.", row, hold_failed.size(), held.rerun)); + if (!hold_failed.empty()){ + std::string out = std::format("{} fails with one fade's hold unseen where it passed without:", row); + for (const std::string& line : hold_failed){ + out += "\n " + line; + } + return out; + } + // The floors are the default seeds' counts; other counts only report. + if (seeds == DEFAULT_SEEDS && report.passes * 100 < floor * report.runs){ + return std::format("{} passed {} of {}, under its floor of {}%:\n{}", row, report.passes, report.runs, + floor, Pokemon::format_report(report)); + } + return true; +} + + +// The chance a dialog pops up before a step, in the test that pops them, +// and its seeds a row: each runs three times, so fewer than a row's own. +constexpr double DIALOG_RATE = 0.1; +constexpr size_t DIALOG_SEEDS = 5; + +// How a row's seeds fare with dialogs popping up between steps: without +// them, with them cleared before each step, and with them left up (the +// executor before it looked). Seeds that pass without them and fail with +// them cleared, as "row plan: step kind". +struct DialogRowReport{ + size_t runs = 0; + size_t plain = 0; + size_t cleared = 0; + size_t left = 0; + std::vector regressions; +}; +void run_row_dialogs(DialogRowReport& out, const std::vector& rows, const std::string& row, size_t seeds){ + const RowNoise plain{.clean = looked_for(rows, row), .rates = {}}; + RowNoise popping = plain; + popping.rates.dialog_between_steps = DIALOG_RATE; + for (uint64_t seed : Pokemon::story_seeds(seeds)){ + SilentLogger silent; + const bool passes = run_seed(silent, rows, plain, row, seed).passed; + const SeedOutcome cleared = run_seed(silent, rows, popping, row, seed); + const bool left = run_seed(silent, rows, popping, row, seed, PoppedDialog::LEFT_UP).passed; + out.runs++; + out.plain += passes ? 1 : 0; + out.cleared += cleared.passed ? 1 : 0; + out.left += left ? 1 : 0; + if (passes && !cleared.passed){ + out.regressions.push_back(std::format("{} {}: {} {}", row, cleared.detail, cleared.failed_step, cleared.kind)); + } + } +} + +// Every row to 01.11, its seeds with dialogs popping up between steps +// (DIALOG_RATE a step): one that passes without them must pass with them. +UnitTestResult test_dialogs_between_steps(Logger& logger){ + const std::vector rows = story_checkpoints(); + const size_t seeds = Pokemon::seed_count(SEEDS_VARIABLE, DIALOG_SEEDS); + DialogRowReport report; + for (const StoryCheckpoint& row : rows){ + if (row.id > "01.11"){ + continue; + } + run_row_dialogs(report, rows, row.id, seeds); + } + logger.log(std::format( + "Dialogs between steps, {} runs: {} pass without them, {} with them cleared, {} with them left up.", + report.runs, report.plain, report.cleared, report.left + )); + if (report.regressions.empty()){ + return true; + } + std::string out = "Seeds that pass without dialogs between steps fail with them cleared:"; + for (const std::string& line : report.regressions){ + out += "\n " + line; + } + return out; +} + + +// 01.03's steps across Roark's room as they were before 4f13c19bb: +// counted taps onto Roark's row, then west against his rock. +std::vector old_steps_to_roark(){ + StoryStep taps; + taps.kind = Pokemon::StoryStepKind::LEGS; + taps.name = "above_roarks_row"; + taps.action = "legs"; + taps.args["legs"] = std::vector{ + {.direction = Direction::EAST, .tiles = 1}, {.direction = Direction::SOUTH, .tiles = 2}, + {.direction = Direction::WEST, .tiles = 1}, {.direction = Direction::SOUTH, .tiles = 5}, + {.direction = Direction::EAST, .tiles = 14}, {.direction = Direction::SOUTH, .tiles = 10}, + {.direction = Direction::WEST, .tiles = 2}, {.direction = Direction::SOUTH, .tiles = 2}, + }; + taps.pose_after = Pokemon::TileDeclared{.map = "OreburghMine", .tiles = {TilePos{27, 28}}, .facing = Direction::SOUTH}; + StoryStep walls; + walls.kind = Pokemon::StoryStepKind::LEGS; + walls.name = "beside_roarks_rock"; + walls.action = "to_wall"; + walls.args["legs"] = std::vector{{.direction = Direction::WEST, .tiles = 7}, {.direction = Direction::SOUTH, .tiles = 1}}; + walls.pose_after = Pokemon::TileDeclared{.map = "OreburghMine", .tiles = {TilePos{20, 29}}, .facing = Direction::SOUTH}; + return {taps, walls}; +} + +// 01.03 as it was before 4f13c19bb: counted taps across Roark's room. +std::vector old_0103(){ + const std::vector old = old_steps_to_roark(); + std::vector rows = story_checkpoints(); + for (StoryCheckpoint& row : rows){ + if (row.id != "01.03"){ + continue; + } + std::replace_if(row.steps.begin(), row.steps.end(), [](const StoryStep& step){ return step.name == "to_roarks_corner"; }, old[0]); + std::replace_if(row.steps.begin(), row.steps.end(), [](const StoryStep& step){ return step.name == "beside_roarks_rock"; }, old[1]); + } + return rows; +} + +// Whether `report` failed `step` in a way whose kind holds `text` and `also`. +bool failed_with(const RowReport& report, const std::string& step, const std::string& text, const std::string& also = ""){ + const auto found = report.failures.find(step); + return found != report.failures.end() && std::ranges::any_of(found->second, [&](const auto& kind){ + return kind.first.find(text) != std::string::npos && kind.first.find(also) != std::string::npos; + }); +} + +// lab-B 2026-11-08 11:55: a wild battle on the counted taps across +// Roark's room re-planned to an open leg and the row went one off. The +// old row must show it, at the stress rates: at lab-B's own, 200 seeds +// need not draw it. +UnitTestResult test_old_0103(Logger& logger){ + const size_t seeds = std::max(200, Pokemon::seed_count(SEEDS_VARIABLE, DEFAULT_SEEDS)); + const RowReport whole = run_row(old_0103(), "01.03", seeds, stress_rates()); + logger.log("The old 01.03: " + Pokemon::format_report(whole)); + // A battle on the taps, then the row ends off the tile the taps count. + if (!failed_with(whole, "01.03 above_roarks_row", "sim_mismatch", "[wild battle in the step]")){ + return "expected the old 01.03 to fail across Roark's room after a wild battle:\n" + Pokemon::format_report(whole); + } + return true; +} + + +// A disturbed hold with no disturbance walks as the grid sim's own hold +// does, at its pace: a hold timed a tile at the walker's 160 ms east +// moved no tile at the sim's 200 ms (fe2da03e7), and every hold east or +// west at a walk stood still (00.05 east_to_the_wall, 2026-11-12). +UnitTestResult test_disturbed_hold_as_plain(Logger& logger){ + const StoryWorld* world = story_plan_world("JubilifeCity", "JubilifeCity"); + if (world == nullptr){ + return "JubilifeCity world not found"; + } + struct Hold{ + Direction direction; + SimPace pace; + bool can_run; + }; + const Hold holds[] = { + {Direction::EAST, SimPace::WALK, false}, {Direction::WEST, SimPace::WALK, false}, + {Direction::NORTH, SimPace::WALK, false}, {Direction::EAST, SimPace::RUN, true}, + }; + Pokemon::DisturbanceRates still; + still.grass_encounter = 0; + still.cave_encounter = 0; + still.drift_per_tile = 0; + const TilePos start = story_to_world(*world, "JubilifeCity", {46, 54}); + for (const Hold& hold : holds){ + GridSim plain({.world = world}, start, hold.direction, hold.can_run); + const SimMove expected = plain.hold(hold.direction, 10000ms, hold.pace); + GridSim disturbed({.world = world}, start, hold.direction, hold.can_run); + SimDisturbance noise(Pokemon::make_disturbance_plan(1, still, 0, 0)); + const SimMove got = disturbed_hold(disturbed, &noise, hold.direction, 10000ms, hold.pace).move; + logger.log(std::format("{}: plain {} to {}, disturbed {} to {}.", direction_name(hold.direction), + expected.distance / SIM_TILE, to_string(plain.player().pos), got.distance / SIM_TILE, to_string(disturbed.player().pos))); + if (got.distance != expected.distance || got.stop != expected.stop || disturbed.player().pos != plain.player().pos){ + return std::format("{} held: the disturbed hold moved {} where the plain one moved {}.", + direction_name(hold.direction), got.distance / SIM_TILE, expected.distance / SIM_TILE); + } + } + return true; +} + + +// A row of the table, disturbed; or, with a body, another test. +struct StoryMonteCarloInput{ + std::string row; + std::function body = nullptr; +}; + +// The fewest passes in a hundred a row's seeds may have. +struct StoryMonteCarloExpectation{ + size_t floor = 0; +}; + +struct StoryMonteCarloCase{ + StoryMonteCarloInput input; + StoryMonteCarloExpectation expectation; +}; + +class Test_StoryMonteCarlo : public UnitTest{ +public: + explicit Test_StoryMonteCarlo(StoryMonteCarloCase test_case) + : UnitTest("PokemonBDSP::AutoStory - Story Monte Carlo: " + test_case.input.row) + , m_case(std::move(test_case)) + {} + virtual UnitTestResult run(Logger& logger, CancellableScope&) const override{ + try{ + return m_case.input.body ? m_case.input.body(logger) + : test_row(logger, m_case.input.row, m_case.expectation.floor); + }catch (const GridSimFailure& e){ + return "GridSimFailure: " + e.message; + }catch (Exception& e){ + return std::string(e.name()) + ": " + e.message(); + } + } + +private: + StoryMonteCarloCase m_case; +}; + +} // namespace + + +const StoryMonteCarloCase AUTO_STORY_MONTE_CARLO_CASES[] = { + {.input = {"00.00"}, .expectation = {.floor = 100}}, + {.input = {"00.01"}, .expectation = {.floor = 95}}, + {.input = {"00.02"}, .expectation = {.floor = 100}}, + {.input = {"00.03"}, .expectation = {.floor = 95}}, + {.input = {"00.04"}, .expectation = {.floor = 95}}, + {.input = {"00.04b"}, .expectation = {.floor = 100}}, + {.input = {"00.04c"}, .expectation = {.floor = 100}}, + {.input = {"00.04d"}, .expectation = {.floor = 100}}, + {.input = {"00.05"}, .expectation = {.floor = 100}}, + {.input = {"00.05b"}, .expectation = {.floor = 85}}, + {.input = {"00.05c"}, .expectation = {.floor = 100}}, + {.input = {"01.01"}, .expectation = {.floor = 100}}, + {.input = {"01.02"}, .expectation = {.floor = 85}}, + {.input = {"01.02b"}, .expectation = {.floor = 90}}, + {.input = {"01.03"}, .expectation = {.floor = 75}}, + {.input = {"01.04"}, .expectation = {.floor = 100}}, + {.input = {"01.05"}, .expectation = {.floor = 100}}, + {.input = {"01.06"}, .expectation = {.floor = 95}}, + {.input = {"01.07"}, .expectation = {.floor = 100}}, + {.input = {"01.08"}, .expectation = {.floor = 40}}, + {.input = {"01.09"}, .expectation = {.floor = 100}}, + {.input = {"01.10"}, .expectation = {.floor = 80}}, + {.input = {"01.11"}, .expectation = {.floor = 100}}, + { + .input = {"a disturbed hold with no disturbance walks as the plain hold does", test_disturbed_hold_as_plain}, + .expectation = {}, + }, + { + .input = {"the old 01.03 fails across Roark's room after a wild battle (lab-B, 2026-11-08)", test_old_0103}, + .expectation = {}, + }, + { + .input = {"dialogs pop up between steps, 00.00 to 01.11", test_dialogs_between_steps}, + .expectation = {}, + }, +}; + +void add_tests_AutoStory_StoryMonteCarlo(UnitTestDatabase& database){ + for (const StoryMonteCarloCase& item : AUTO_STORY_MONTE_CARLO_CASES){ + database.add(item); + } +} + + + + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StoryMonteCarlo_Tests.h b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StoryMonteCarlo_Tests.h new file mode 100644 index 0000000000..9f75939200 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StoryMonteCarlo_Tests.h @@ -0,0 +1,29 @@ +/* BDSP AutoStory Story Monte Carlo Tests + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonBDSP_AutoStory_StoryMonteCarlo_Tests_H +#define PokemonAutomation_PokemonBDSP_AutoStory_StoryMonteCarlo_Tests_H + +#include "Common/Cpp/TestRunners/UnitTestDatabase.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ + + + +// Each row of the story table run on the story simulation for the pinned +// seeds, disturbed (wild battles, drift, wanderers, a missed detection): +// its pass rate and failing steps. PA_BDSP_STORY_MC_SEEDS sets the seed +// count (20 by default), PA_BDSP_STORY_MC_ROWS the rows ("01.03,01.04"). +void add_tests_AutoStory_StoryMonteCarlo(UnitTestDatabase& database); + + + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation +#endif diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim_Tests.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim_Tests.cpp new file mode 100644 index 0000000000..d71abdf3d4 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim_Tests.cpp @@ -0,0 +1,395 @@ +/* BDSP AutoStory Story Sim Tests + * + * From: https://github.com/PokemonAutomation/ + * + * Rows of the story table run as the program runs them (the segment + * runner, make_story_segment()), with the program's own walking steps + * (StoryWalkSteps: ROUTE, LEGS, STEP, TALK, MASH) on the grid simulation. + * After each walking step the simulated player must stand, on the grid, + * on a tile the table gives; a step through a door must have warped. + * + * Events, battles, shops and saves are stubs: a dialogue they open is + * closed, and the table's pose_after puts the player where they end. A + * heal checks that a walk north from where we stand enters a door. A scene + * starts when the player steps onto one of the maps' coord events while + * its story variable holds (story_vars()). Rooms with no + * map (the Trainers' School) are passed over. Each row must start where + * the row before left the player. + * + * A tap or hold through a door or cave mouth stops on its tile, as the + * console stops at the fade; a hold that does not see the fade goes on + * onto the step's pose_after and on along it, and a location banner reads + * only a few tiles into its map (SIM_BANNER_TILES). The exit tests run + * r75's and r81's old open-ended walks that way. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "Common/Cpp/Exceptions.h" +#include "Common/Cpp/TestRunners/UnitTestDatabase.h" +#include "Pokemon/AutoStory/Pokemon_StorySegments.h" +#include "Pokemon/AutoStory/Pokemon_TilePose.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_CoordEvents.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_Maps.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_WalkRules.h" +#include "PokemonBDSP_AutoStory_GridSim.h" +#include "PokemonBDSP_AutoStory_LegTrace_Tests.h" +#include "PokemonBDSP_AutoStory_WanderWait_Tests.h" +#include "PokemonBDSP_AutoStory_OldStorySteps.h" +#include "PokemonBDSP/Programs/AutoStory/Utils/PokemonBDSP_AutoStory_RouteWalk.h" +#include "PokemonBDSP/Programs/AutoStory/Actions/PokemonBDSP_AutoStory_Events.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryExecutor.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryPlaces.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryStepIO.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryTable.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_Resources.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryWalkSteps.h" +#include "PokemonBDSP_AutoStory_StorySim.h" +#include "PokemonBDSP_AutoStory_StorySim_Tests.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ +using namespace detail; + +namespace{ + +using namespace std::chrono_literals; +using Pokemon::Direction; +using Pokemon::Outcome; +using Pokemon::Pose; +using Pokemon::RunState; +using Pokemon::StoryStep; +using Pokemon::StoryStepKind; +using Pokemon::TilePos; + +UnitTestResult run_exit_test(Logger& logger, const std::string& row_id, const StoryStep& old_step, const SimMisses& misses, const Pose& overshoot){ + SimExecutor executor(logger, misses); + const std::vector rows = table_with(row_id, old_step); + run_rows_on(executor, logger, {.from = row_id, .to = row_id}, rows); + const SimRun& run = executor.result(); + logger.log(std::format("The old {}: {}, ended on {}.", old_step.name, run.error, end_of(run))); + if (run.failed_step != row_id + " " + old_step.name || !ends_on(run, overshoot)){ + return std::format("the old {} should end on {} and fail there; it ended on {}: {}", + old_step.name, Pokemon::to_string(overshoot), end_of(run), run.error.empty() ? "no failure" : run.error); + } + SimExecutor clean(logger); + if (!run_rows_on(clean, logger, {.from = row_id, .to = row_id}).completed){ + return "the table's row fails without misses: " + clean.result().error; + } + std::vector runs; + for (size_t i = 0; i < looked_for(clean.misses().fade_chances); i++){ + runs.push_back({.fade = i, .banner = std::nullopt}); + } + for (size_t i = 0; i < looked_for(clean.misses().banner_chances); i++){ + runs.push_back({.fade = std::nullopt, .banner = i}); + } + for (const SimMisses& m : runs){ + SimExecutor sim(logger, m); + run_rows_on(sim, logger, {.from = row_id, .to = row_id}); + if (ends_on(sim.result(), overshoot)){ + return std::format("the table's {} ended on {} with a miss in {}.", old_step.name, end_of(sim.result()), + sim.result().missed_step); + } + } + return true; +} + +UnitTestResult test_coord_events(Logger&){ + for (const auto& [map, json] : bdsp_map_json()){ + const StoryWorld* world = story_plan_world(map, map); + for (const CoordEvent& event : world == nullptr ? std::vector{} : story_coord_events(map)){ + const auto open = [&](const TilePos& pos){ + const TilePos tile = story_to_world(*world, map, pos); + return standable(*world, tile) || world->tile(tile) == Pokemon::TileKind::DOOR; + }; + if (!std::ranges::any_of(event.tiles, open)){ + return std::format("{} {}: no tile is open ground or a door.", map, event.name); + } + } + } + const size_t armed = story_triggers().size(); + return armed == story_vars().size() ? UnitTestResult(true) + : UnitTestResult(std::format("Expected {} coord events armed by the story's variables, found {}.", story_vars().size(), armed)); +} + +std::string miss(Logger& logger, const SimRun& clean, bool fade, size_t index){ + size_t k = 0; + while (k + 1 < clean.rows.size() && (fade ? clean.rows[k + 1].fades : clean.rows[k + 1].banners) <= index){ + k++; + } + const SimRun::RowStart& start = clean.rows[k]; + SimMisses misses; + (fade ? misses.fade : misses.banner) = index - (fade ? start.fades : start.banners); + SimExecutor executor(logger, misses); + const Pokemon::SegmentReport report = run_rows_on(executor, logger, + {.from = start.row, .to = clean.rows[std::min(k + 1, clean.rows.size() - 1)].row}); + const SimRun& run = executor.result(); + const std::string what = std::format("{} {}", fade ? "fade" : "banner", index); + logger.log(std::format("Missed {} in {}: {}.", what, run.missed_step, + report.completed ? "got over it" : "stopped in " + run.failed_step + ": " + run.error)); + if (report.completed || run.failed_step == run.missed_step){ + return ""; + } + return std::format("{} missed in {}, failed later in {}: {}", what, run.missed_step, run.failed_step, run.error); +} + +UnitTestResult test_story_sim_misses(Logger& logger){ + Pokemon::SegmentRange range{.from = "00.00", .to = "01.11"}; + SimExecutor clean(logger); + if (!run_rows_on(clean, logger, range).completed){ + return "the run fails without misses: " + clean.result().error; + } + logger.log(std::format("{} fades and {} banners to miss.", looked_for(clean.misses().fade_chances), looked_for(clean.misses().banner_chances))); + std::vector unseen; + for (size_t i = 0; i < looked_for(clean.misses().fade_chances) + looked_for(clean.misses().banner_chances); i++){ + const std::string line = miss(logger, clean.result(), i < looked_for(clean.misses().fade_chances), i < looked_for(clean.misses().fade_chances) ? i : i - looked_for(clean.misses().fade_chances)); + if (!line.empty()){ + unseen.push_back(line); + } + } + std::string out = "Misses that went unseen:"; + for (const std::string& line : unseen){ + out += "\n " + line; + } + return unseen.empty() ? UnitTestResult(true) : UnitTestResult(out); +} + +// Someone talks to the player before every step (SimWorldKnobs:: +// dialog_before): cleared between steps, the whole table still passes; +// left up, as before the executor looked, the first walk fails on it. +UnitTestResult test_dialog_between_steps(Logger& logger){ + const Pokemon::SegmentRange range{.from = "00.00", .to = "01.11"}; + const auto always = [](const std::string&, const std::string&){ + return true; + }; + SimExecutor cleared(logger, {}, {.dialog_before = always}); + if (!run_rows_on(cleared, logger, range).completed){ + return "A dialog before every step, cleared: " + cleared.result().error; + } + SimExecutor left(logger, {}, {.dialog_before = always, .clear_interrupts = false}); + run_rows_on(left, logger, range); + if (left.result().error.find(" dialog: ") == std::string::npos){ + return "Expected a dialog left up to stop a walk, got: " + left.result().error; + } + return true; +} + +UnitTestResult test_story_sim_whole_table(Logger& logger){ + return run_rows(logger, {.from = "00.00", .to = "01.11"}); +} + +UnitTestResult test_story_sim_each_row(Logger& logger){ + for (const StoryCheckpoint& row : story_checkpoints()){ + const auto res = run_rows(logger, {.from = row.id, .to = row.id}); + if (res.result != UnitTestResult::PASSED){ + return std::format("Row {} failed: {}", row.id, res.message); + } + } + return true; +} + +UnitTestResult test_exit_gate(Logger& logger){ + return run_exit_test(logger, "01.05", r75_old_gate_exit(), SimMisses{}, r75_pond_pocket()); +} + +UnitTestResult test_exit_ravaged_path(Logger& logger){ + return run_exit_test(logger, "01.09", r81_old_cave_exit(), SimMisses{.fade = 0, .banner = std::nullopt}, r81_below_the_mouth()); +} + +// lab-B 2026-11-08 15:31 to 15:54: 01.05's walk to the tile beside the +// Oreburgh Gate's mouth slid onto the warp, and the tap step after it began +// inside the Gate. With its banner up, the step ends there with no tap and +// no fade (the clean run's fade into the Gate is not seen); with it gone, +// it fails a few taps on, not across the Gate. +UnitTestResult test_tap_through_already(Logger& logger, bool banner){ + const std::vector rows = table_with("01.05", old_tap_into_the_gate()); + SimExecutor clean(logger); + run_rows_on(clean, logger, {.from = "01.05", .to = "01.05"}, rows); + SimExecutor through(logger, {.fade = {}, .banner = {}, .through = 1, .through_banner = banner}); + run_rows_on(through, logger, {.from = "01.05", .to = "01.05"}, rows); + const SimRun& run = through.result(); + const std::optional at = run.world ? story_to_local(*run.world, "OreburghGate", run.end) : std::nullopt; + const bool passed = banner + ? run.error.empty() && looked_for(through.misses().fade_chances) + 1 == looked_for(clean.misses().fade_chances) + : run.failed_step == "01.05 into_oreburgh_gate" && at && at->y == 22 && at->x >= 21; + return passed ? UnitTestResult(true) : UnitTestResult(std::format("failed in '{}' on {} after {} fades (clean {}): {}", + run.failed_step, end_of(run), looked_for(through.misses().fade_chances), looked_for(clean.misses().fade_chances), run.error.empty() ? "no failure" : run.error)); +} + +UnitTestResult test_story_sim_step_failure(Logger& logger, const std::string& row, const StoryStep& old_step, const std::string& expected_failed_step, const std::string& expected_error){ + SimExecutor executor(logger); + const std::vector rows = table_with(row, old_step); + run_rows_on(executor, logger, {.from = row, .to = row}, rows); + const SimRun& run = executor.result(); + if (run.failed_step != expected_failed_step || run.error.find(expected_error) == std::string::npos){ + return std::format("expected old {} to fail at '{}' with '{}', but got failed_step='{}', error='{}'.", + old_step.name, expected_failed_step, expected_error, run.failed_step, run.error); + } + return true; +} + +// lab-B 2026-11-08: 01.03's run into Oreburgh's Center saw no fade and went +// on to the nurse's counter. The heal must find it is inside and go on. +UnitTestResult test_heal_fade_unseen(Logger& logger){ + SimExecutor clean(logger); + run_rows_on(clean, logger, {.from = "01.03", .to = "01.03"}); + for (size_t i = 0; i < looked_for(clean.misses().fade_chances); i++){ + SimExecutor sim(logger, {.fade = i, .banner = {}}); + run_rows_on(sim, logger, {.from = "01.03", .to = "01.03"}); + const SimRun& run = sim.result(); + if (run.missed_step == "01.03 heal_oreburgh"){ + return run.error.empty() ? UnitTestResult(true) : UnitTestResult(std::format("failed in '{}': {}", run.failed_step, run.error)); + } + } + return "no fade in 01.03 heal_oreburgh to miss: the heal never ran into its door."; +} + +// The sim's frames of a warp's fade through the program's own watches +// (sim_watch_fade()): a door's black, a cave mouth's dim fade and a cave +// exit's white, each with its hold seen and unseen. Only on a floor as +// dark as the fall (a street at night, 88) is a fade whose hold went unseen +// still missed: no frame shows the scene before it. +UnitTestResult test_sim_fade_frames(Logger&){ + struct FadeCase{ + std::string_view name; + bool door; + double floor; + double fade; + bool hold_seen; + WarpFade seen; + }; + const std::vector cases{ + {"a door's black", true, SIM_FLOOR, SIM_DOOR_FADE, true, WarpFade::BLACK}, + {"a door's black, its hold unseen", true, SIM_FLOOR, SIM_DOOR_FADE, false, WarpFade::BLACK}, + {"a tap into a door's black", false, SIM_FLOOR, SIM_DOOR_FADE, true, WarpFade::BLACK}, + {"a tap into a door's black, its hold unseen", false, SIM_FLOOR, SIM_DOOR_FADE, false, WarpFade::BLACK}, + {"a tap into a cave mouth's dim fade", false, SIM_FLOOR, SIM_DIM_FADE, true, WarpFade::BLACK}, + {"a tap into a cave mouth's dim fade, its hold unseen", false, SIM_FLOOR, SIM_DIM_FADE, false, WarpFade::BLACK}, + {"a tap into a cave exit's white", false, SIM_FLOOR, SIM_WHITE_FADE, true, WarpFade::WHITE}, + {"a tap into a cave exit's white, its hold unseen", false, SIM_FLOOR, SIM_WHITE_FADE, false, WarpFade::WHITE}, + {"a door's black from the Gate's dim floor (46), its hold unseen", true, 46, SIM_DOOR_FADE, false, WarpFade::BLACK}, + {"a tap from a street at night (88)", false, 88, SIM_DOOR_FADE, true, WarpFade::BLACK}, + {"a tap from a street at night (88), its hold unseen", false, 88, SIM_DOOR_FADE, false, WarpFade::NONE}, + }; + for (const FadeCase& item : cases){ + const WarpFade seen = sim_watch_fade(item.door ? DOOR_FADE_RULE : TAP_FADE_RULE, item.floor, item.fade, item.hold_seen); + if (seen != item.seen){ + return std::format("{}: saw {}, expected {}.", item.name, warp_fade_name(seen), warp_fade_name(item.seen)); + } + } + return true; +} + +struct AutoStoryStorySimInput{ + std::string name; + std::function body; +}; + +struct AutoStoryStorySimExpectation{ +}; + +struct AutoStoryStorySimCase{ + AutoStoryStorySimInput input; + AutoStoryStorySimExpectation expectation; +}; + +class Test_AutoStoryStorySim : public UnitTest{ +public: + explicit Test_AutoStoryStorySim(AutoStoryStorySimCase test_case) + : UnitTest("PokemonBDSP::AutoStory - Story sim: " + test_case.input.name) + , m_case(std::move(test_case)) + {} + virtual UnitTestResult run(Logger& logger, CancellableScope&) const override{ + try{ + return m_case.input.body(logger); + }catch (Exception& e){ + return std::string(e.name()) + ": " + e.message(); + } + } + +private: + AutoStoryStorySimCase m_case; +}; + +} // namespace + +const AutoStoryStorySimCase AUTO_STORY_STORY_SIM_CASES[] = { + {.input = {"the maps' coord events are on open ground or doors", test_coord_events}, .expectation = {}}, + {.input = {"detector misses from 00.00 to 01.11", test_story_sim_misses}, .expectation = {}}, + {.input = {"a warp's fade on the sim's frames, through the door's and the taps' watches", test_sim_fade_frames}, .expectation = {}}, + {.input = {"00.00 to 01.11: the whole table, from the new game to Floaroma", test_story_sim_whole_table}, .expectation = {}}, + {.input = {"each row from 00.00 to 01.11 in isolation", test_story_sim_each_row}, .expectation = {}}, + {.input = {"a dialog pops up before every step from 00.00 to 01.11", test_dialog_between_steps}, .expectation = {}}, + {.input = {"01.02b, Barry's lines, then the Center past his doorstep (lab-B, 2026-11-08)", [](Logger& logger){ + return run_rows(logger, {.from = "01.02b", .to = "01.02b"}); + }}, .expectation = {}}, + {.input = {"r75, out of the Oreburgh Gate", test_exit_gate}, .expectation = {}}, + {.input = {"r81, out of the Ravaged Path", test_exit_ravaged_path}, .expectation = {}}, + {.input = {"01.05, a tap step begun through the Gate's mouth, its banner up (lab-B, 2026-11-08)", [](Logger& logger){ + return test_tap_through_already(logger, true); + }}, .expectation = {}}, + {.input = {"01.05, a tap step begun through the Gate's mouth, its banner gone (lab-B, 2026-11-08)", [](Logger& logger){ + return test_tap_through_already(logger, false); + }}, .expectation = {}}, + { + .input = {"01.03, a dark frame 1.8 s down the mine's entrance hall is not its mouth (lab-B, 2026-11-08)", [](Logger& logger){ + SimExecutor executor(logger, {.fade = {}, .banner = {}, .dark = 1}); + run_rows_on(executor, logger, {.from = "01.03", .to = "01.03"}); + const SimRun& run = executor.result(); + return run.missed_step == "01.03 into_the_coal_room" && run.error.empty() ? UnitTestResult(true) + : UnitTestResult(std::format("dark in '{}', failed in '{}': {}", run.missed_step, run.failed_step, run.error)); + }}, + .expectation = {}, + }, + { + .input = {"01.03, the Center's fade unseen, the heal goes on from the counter (lab-B, 2026-11-08)", test_heal_fade_unseen}, + .expectation = {}, + }, + { + .input = {"00.04b, the walk to the nurse waits out the Center's fade-in (lab-B, 2026-11-10)", [](Logger& logger){ + return run_rows(logger, {.from = "00.04b", .to = "00.04b"}); + }}, + .expectation = {}, + }, + { + .input = {"01.03, counted 19 taps south leaves player in hall", [](Logger& logger){ + return test_story_sim_step_failure(logger, "01.03", old_mine_hall_19("into_the_coal_room", Direction::SOUTH), "01.03 south_to_the_rock", "warp instead of a stop."); + }}, + .expectation = {}, + }, + { + .input = {"01.03, counted 19 taps north leaves player in hall", [](Logger& logger){ + return test_story_sim_step_failure(logger, "01.03", old_mine_hall_19("out_of_the_mine", Direction::NORTH), "01.03 north_to_the_centers_wall", "map_mismatch"); + }}, + .expectation = {}, + }, + { + .input = {"01.03, cut corner through coal room crate at col 29", [](Logger& logger){ + return test_story_sim_step_failure(logger, "01.03", old_coal_room_crate_cut(), "01.03 to_roarks_corner", "short_leg: south 2 moved 1"); + }}, + .expectation = {}, + }, +}; + +void add_tests_AutoStory_StorySim(UnitTestDatabase& database){ + for (const auto& item : AUTO_STORY_STORY_SIM_CASES){ + database.add(item); + } + add_tests_AutoStoryResources(database); + add_tests_AutoStory_LegTrace(database); + add_tests_AutoStory_WanderWait(database); +} + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim_Tests.h b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim_Tests.h new file mode 100644 index 0000000000..bc1ed57d3a --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim_Tests.h @@ -0,0 +1,28 @@ +/* BDSP AutoStory Story Sim Tests + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonBDSP_AutoStory_StorySim_Tests_H +#define PokemonAutomation_PokemonBDSP_AutoStory_StorySim_Tests_H + +#include "Common/Cpp/TestRunners/UnitTestDatabase.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ + + + +// The story table's rows run by the program's own walking steps +// (StoryWalkSteps) on the grid simulation: each walk must end where the +// table says the player is. +void add_tests_AutoStory_StorySim(UnitTestDatabase& database); + + + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation +#endif diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySimulation_Tests.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySimulation_Tests.cpp new file mode 100644 index 0000000000..6b405e3ada --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySimulation_Tests.cpp @@ -0,0 +1,834 @@ +/* BDSP AutoStory Story Simulation Tests + * + * From: https://github.com/PokemonAutomation/ + * + * A run of the whole story table, new game to Floaroma, without the + * console: story_checkpoints() built into one segment as the program builds + * it (make_story_segment()), run by the shared runner with the program's + * retry policy, against a fake game. The fake plans each ROUTE on the story + * world that holds its start and target, walks each LEGS tile by tile, and + * passes every other step unless told to fail it. Events pass as a whole. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "Common/Cpp/Exceptions.h" +#include "Common/Cpp/TestRunners/UnitTest.h" +#include "Pokemon/AutoStory/Pokemon_StorySegments.h" +#include "Pokemon/AutoStory/Pokemon_BuiltinStoryActions.h" +#include "Pokemon/AutoStory/Pokemon_StoryStepExecutor.h" +#include "Pokemon/AutoStory/Types/Pokemon_GridPose.h" +#include "Pokemon/AutoStory/Types/Pokemon_StorySaveMode.h" +#include "Pokemon/AutoStory/Pokemon_TilePose.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_RobustRoute.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_PlanGolden.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_WalkRules.h" +#include "PokemonBDSP/Programs/AutoStory/Utils/PokemonBDSP_AutoStory_Location.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_PlanCosts.h" +#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_WallRecovery.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryPlaces.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryTable.h" +#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryWalkSteps.h" +#include "PokemonBDSP/Programs/AutoStory/Utils/PokemonBDSP_AutoStory_StoryLanguage.h" +#include "PokemonBDSP_AutoStory_StorySimulation_Tests.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ + + +namespace{ + +using Pokemon::Direction; +using Pokemon::GridPose; +using Pokemon::Outcome; +using Pokemon::Pose; +using Pokemon::RunState; +using Pokemon::StoryLeg; +using Pokemon::StoryStep; +using Pokemon::StoryStepKind; +using Pokemon::TilePos; +using Pokemon::story_arg; + +std::string describe(const std::string& map, const std::vector& tiles){ + std::string text = " " + map; + for (const TilePos& pos : tiles){ + text += " " + Pokemon::to_string(pos); + } + return text; +} + +std::string joined(const std::vector& lines){ + std::string text; + for (const std::string& line : lines){ + text += "\n " + line; + } + return text; +} + +bool contains(const std::vector& tiles, const TilePos& pos){ + return std::find(tiles.begin(), tiles.end(), pos) != tiles.end(); +} + +// Where a step ends, or why it does not plan. A "measured" step ends on +// one of `at`'s tiles and the program knows which (`measured`). +struct Walked{ + std::optional at; + std::string error; + std::string plan; + bool measured = false; + std::vector golden = {}; +}; + +// The tiles a plan walks. +int tiles_walked(const std::vector& plan){ + int tiles = 0; + for (const PlannedLeg& leg : plan){ + tiles += leg.leg.tiles; + } + return tiles; +} + +// A route may walk a little further than the shortest way, for a wall at a +// leg's end, but not round the town: r64 went 38 tiles to the School's door +// for 12 straight (the "town" costs still feared stick-era open legs). +std::string detour_error(const StoryWorld& world, const std::vector& start, + const std::function& at_goal, const std::vector& plan +){ + const auto shortest = plan_robust_route(world, start, at_goal, waypoint_plan_costs()); + const int walked = tiles_walked(plan); + const int least = shortest ? tiles_walked(*shortest) : walked; + if (walked <= least + least / 2 + 4){ + return ""; + } + return std::format("the plan walks {} tiles where {} would do.", walked, least); +} + + +// The golden test's lines for one planned ROUTE: a header, then each leg +// with the tiles it may end on. +void add_golden_lines( + const StoryWorld& world, const Pose& from, const Pose& goal, const StoryStep& step, + const std::vector& plan, std::vector& golden +){ + golden.push_back(std::format("{} costs={} from{} to{}", step.name, step.action.empty() ? "default" : step.action, + describe(from.map, Pokemon::tiles_of(from)), describe(goal.map, Pokemon::tiles_of(goal)))); + for (const PlannedLeg& leg : plan){ + std::string line = std::format(" {} ->", to_string(leg.leg)); + for (const TilePos& pos : leg.after){ + line += std::format(" {}", describe(world, pos)); + } + golden.push_back(line); + } +} + +// A ROUTE step from `from`, planned as StoryExecutor::walk_to() walks it. +Walked plan_route(const Pose& from, const StoryStep& step){ + const GridPose& target = story_arg(step.args, "target"); + const Pose goal = Pokemon::pose_of(target); + const StoryWorld* world = story_plan_world(from.map, goal.map); + const std::optional costs = story_route_costs(step.action); + if (world == nullptr || !costs){ + return {std::nullopt, std::format("{}: no world joins {} and {}, or no costs \"{}\".", step.name, from.map, goal.map, step.action), ""}; + } + std::vector start; + for (const TilePos& pos : Pokemon::tiles_of(from)){ + start.push_back(story_to_world(*world, from.map, pos)); + } + std::vector targets; + for (const TilePos& pos : Pokemon::tiles_of(goal)){ + targets.push_back(story_to_world(*world, goal.map, pos)); + } + const std::function at_goal = [&](const TilePos& pos){ return contains(targets, pos); }; + // As walk_route() plans: from a wall when the start is one of a few + // tiles, then with the default costs if the step's find nothing. From + // 01.03's two start tiles a search over both found no plan within its + // budget once routes kept off the hiker's zone. + std::optional> plan = plan_recovered_route(*world, start, at_goal, *costs); + if (!plan){ + plan = plan_recovered_route(*world, start, at_goal, RobustPlanCosts()); + } + if (!plan){ + return {std::nullopt, step.name + ": no plan from" + describe(from.map, Pokemon::tiles_of(from)) + ".", ""}; + } + Walked walked{std::nullopt, "", std::format("{}: {} legs", step.name, plan->size())}; + std::vector local; + for (const PlannedLeg& leg : *plan){ + walked.plan += " " + to_string(leg.leg); + } + add_golden_lines(*world, from, goal, step, *plan, walked.golden); + const std::string detour = detour_error(*world, start, at_goal, *plan); + if (!detour.empty()){ + return {std::nullopt, step.name + ": " + detour, walked.plan}; + } + for (const TilePos& pos : plan->empty() ? start : plan->back().after){ + const std::optional tile = story_to_local(*world, goal.map, pos); + if (!tile || !contains(Pokemon::tiles_of(goal), *tile)){ + return {std::nullopt, step.name + ": the plan may end off the target, at " + describe(*world, pos) + ".", walked.plan}; + } + local.push_back(*tile); + } + walked.at = Pokemon::tile_pose(goal.map, local, Pokemon::facing_of(goal)); + return walked; +} + +// A ROUTE step after a "measured" one: the program plans from the one +// tile it measured, so each tile of `from` must plan on its own. +Walked plan_route_from_each(const Pose& from, const StoryStep& step){ + Walked walked; + std::vector ends; + for (const TilePos& pos : Pokemon::tiles_of(from)){ + const Walked one = plan_route(Pokemon::tile_pose(from.map, {pos}, Pokemon::facing_of(from)), step); + if (!one.error.empty() || !one.at){ + return one; + } + walked.plan += (walked.plan.empty() ? "" : "; ") + one.plan; + for (const TilePos& end : Pokemon::tiles_of(*one.at)){ + if (!contains(ends, end)){ + ends.push_back(end); + } + } + walked.at = Pokemon::tile_pose(one.at->map, ends, Pokemon::facing_of(*one.at)); + } + return walked; +} + +// `leg` of `step` from `pos`: adds where it ends to `next` (and a tile +// short where the step allows it). Returns why it is blocked, or "". +std::string walk_leg_from( + const StoryWorld& world, TilePos pos, const Pokemon::StoryLeg& leg, const StoryStep& step, + std::vector& next +){ + for (int i = 0; i < leg.tiles; i++){ + const std::optional stepped = PokemonBDSP::step(world, pos, leg.direction); + if (!stepped){ + return step.name + ": " + direction_name(leg.direction) + " is blocked at " + describe(world, pos) + "."; + } + if (step.action == "one_short_ok" && i + 1 == leg.tiles){ + next.push_back(pos); + } + pos = *stepped; + } + next.push_back(pos); + return ""; +} + +// A LEGS step from `from`, walked tile by tile on its map, a tile short too +// where the step allows it. Walks to walls, and walks that end on another +// map (into Sandgem until Dawn's scene starts), end where nothing is known. +Walked walk_legs(const Pose& from, const StoryStep& step){ + if (step.action == "to_wall"){ + return {std::nullopt, "", ""}; + } + // A run until a map's banner ends where the banner reads. + if (step.action == "to_map"){ + return {step.pose_after ? std::optional(Pokemon::pose_of(*step.pose_after)) : std::nullopt, "", ""}; + } + if (step.action == "measured"){ + const std::optional ends = measured_ends(from, step); + return {ends, ends ? "" : step.name + ": no world holds " + from.map + ".", "", true}; + } + const StoryWorld* world = story_plan_world(from.map, from.map); + if (world == nullptr){ + return {std::nullopt, step.name + ": no world holds " + from.map + ".", ""}; + } + const auto& legs = story_arg>(step.args, "legs"); + std::vector at; + for (const TilePos& pos : Pokemon::tiles_of(from)){ + at.push_back(story_to_world(*world, from.map, pos)); + } + for (const Pokemon::StoryLeg& leg : legs){ + std::vector next; + for (const TilePos& pos : at){ + const std::string blocked = walk_leg_from(*world, pos, leg, step, next); + if (!blocked.empty()){ + return {std::nullopt, blocked, ""}; + } + } + at = std::move(next); + } + // Legs may cross onto a neighbouring map of the same world (Route 201's + // east end into Sandgem): the pose lands on the map the tiles are on. + std::string map; + std::vector local; + for (const TilePos& pos : at){ + const std::optional tile = story_to_local(*world, pos); + if (!tile){ + return {std::nullopt, step.name + ": the legs end off every map, at " + Pokemon::to_string(pos) + ".", ""}; + } + if (!map.empty() && tile->map != map){ + return {std::nullopt, step.name + ": the legs end across " + map + " and " + tile->map + ".", ""}; + } + map = tile->map; + local.push_back(tile->pos); + } + return {Pokemon::tile_pose(map, local, legs.back().direction), "", ""}; +} + +// A STEP onto the next tile of the same map. +Walked step_on(const Pose& from, const StoryStep& step){ + const Direction direction = story_arg(step.args, "direction"); + std::vector at; + for (const TilePos& pos : Pokemon::tiles_of(from)){ + at.push_back(pos.next(direction)); + } + return {Pokemon::tile_pose(from.map, at, direction), "", ""}; +} + + +// The game: steps pass, routes, legs and steps move the pose on the maps, +// and the steps in `failures` ("/") fail, so many times. +class FakeGame : public Pokemon::StoryStepExecutor{ +public: + struct Failure{ + std::string failure; + size_t times = 0; + }; + + std::vector& trace; + std::map failures; + std::vector plans; + // Every ROUTE's legs, one header line per route, for the golden test. + std::vector golden; + + explicit FakeGame(std::vector& trace) + : trace(trace) + {} + + virtual void begin_attempt(const Pokemon::StoryCheckpoint& data) override{ + m_row = data.id; + trace.push_back("begin " + data.id); + } + virtual Outcome run(const StoryStep& step, RunState& state) override{ + const std::string key = m_row + "/" + step.name; + trace.push_back(key); + auto failure = failures.find(key); + if (failure != failures.end() && failure->second.times > 0){ + failure->second.times--; + return Pokemon::outcome_failed(failure->second.failure, key); + } + switch (step.kind){ + case StoryStepKind::ROUTE: + return route(state, step); + case StoryStepKind::LEGS: + return legs(state, step); + case StoryStepKind::STEP: + return this->step(state, step); + case StoryStepKind::SAVE: + return save(state, step); + default: + return Pokemon::outcome_ok(); + } + } +protected: + Outcome route(RunState& state, const StoryStep& step){ + return moved(plan_route(state.pose, step), "no_plan"); + } + Outcome legs(RunState& state, const StoryStep& step){ + Walked walked = walk_legs(state.pose, step); + // The fake player stands on the first tile a measured step may end on. + if (walked.measured && walked.at && !Pokemon::tiles_of(*walked.at).empty()){ + walked.at = Pokemon::tile_pose(walked.at->map, {Pokemon::tiles_of(*walked.at).front()}, Pokemon::facing_of(*walked.at)); + } + return moved(walked, "blocked"); } + Outcome step(RunState& state, const StoryStep& step){ + return moved(step_on(state.pose, step), "blocked"); + } + Outcome save(RunState&, const StoryStep& step){ + trace.push_back("save in " + m_row); + if (!step.action.empty()){ + trace.push_back("card for " + m_row + ": " + step.action); + } + return Pokemon::outcome_ok(); + } +public: + void set_language(PokemonAutomation::Language){} + +private: + Outcome moved(const Walked& walked, std::string_view failure){ + if (!walked.error.empty()){ + return Pokemon::outcome_failed(std::string(failure), walked.error); + } + if (!walked.plan.empty()){ + plans.push_back(walked.plan); + } + for (const std::string& line : walked.golden){ + golden.push_back(std::format("{} {}", m_row, line)); + } + return walked.at ? Pokemon::outcome_ok(*walked.at) : Pokemon::outcome_ok(Pose{}); + } + + std::string m_row; +}; + + +// One simulated run, as the program runs it, in `language`. Japanese has +// no text reader, so a step that needed text would show. (The console's +// global language is left alone: tests run in parallel.) +struct Simulation{ + std::vector trace; + std::vector lines; + FakeGame game{trace}; + std::set saved; + Pokemon::SegmentPolicy policy; + + Pokemon::SegmentReport run(const Pokemon::SegmentRange& range, Language language = Language::Japanese){ + game.set_language(language); + Pokemon::Segment segment = make_story_segment(story_checkpoints(), game, saved, policy.save_mode); + Pokemon::SegmentHooks hooks; + hooks.reload = [this](RunState&){ + trace.push_back("reload"); + return Pokemon::outcome_ok(); + }; + hooks.log = [this](const std::string& line){ lines.push_back(line); }; + RunState state; + return Pokemon::run_segment(range, policy, segment, hooks, state); + } + std::vector begun() const{ + std::vector ids; + for (const std::string& item : trace){ + if (item.starts_with("begin ")){ + ids.push_back(item.substr(6)); + } + } + return ids; + } + size_t count(const std::string& item) const{ + return (size_t)std::count(trace.begin(), trace.end(), item); + } + bool logged(const std::string& line) const{ + return std::find(lines.begin(), lines.end(), line) != lines.end(); + } +}; + +std::vector all_ids(){ + std::vector ids; + for (const StoryCheckpoint& row : story_checkpoints()){ + ids.push_back(row.id); + } + return ids; +} + + +UnitTestResult test_whole_table(Logger& logger){ + for (Language language : {Language::English, Language::Japanese}){ + Simulation sim; + const Pokemon::SegmentReport report = sim.run({}, language); + for (const std::string& plan : sim.game.plans){ + logger.log(plan); + } + if (!report.completed){ + return std::string(language_data(language).name) + ": expected the whole story through:" + joined(sim.lines); + } + if (sim.begun() != all_ids()){ + return "Unexpected checkpoint order:" + joined(sim.begun()); + } + // Every row saves first but 00.00, which a failure ends; 01.10 and + // 01.11 save again at their ends. + for (const std::string& id : all_ids()){ + const size_t saves = sim.count("save in " + id); + const size_t expected = id == "00.00" ? 0 : id == "01.10" || id == "01.11" ? 2 : 1; + if (saves != expected){ + return std::format("{} saved {} times, expected {}:{}", id, saves, expected, joined(sim.trace)); + } + } + // Each start save checks the card for its row's map. + for (const StoryCheckpoint& row : story_checkpoints()){ + if (!row.saves_in.empty() && sim.count("card for " + row.id + ": " + row.saves_in) != 1){ + return std::format("{}'s start save did not check the card for {}:{}", row.id, row.saves_in, joined(sim.trace)); + } + } + if (report.one_shot_passes() != report.checkpoints_run){ + return "Expected every checkpoint one-shot:" + joined(sim.lines); + } + } + return true; +} + +// The legs planned for every ROUTE of the whole story, against the stored +// copy in PokemonBDSP_AutoStory_PlanGolden.h. A change that should not +// alter any plan must leave this byte-identical. To regenerate after an +// intended plan change: run this suite, and replace the lines of +// BDSP_PLAN_GOLDEN with the lines the failure logs after "GOLDEN|". +UnitTestResult test_golden_plans(Logger& logger){ + Simulation sim; + const Pokemon::SegmentReport report = sim.run({}, Language::English); + if (!report.completed){ + return "expected the whole story through:" + joined(sim.lines); + } + const std::vector& actual = sim.game.golden; + const size_t stored = sizeof(BDSP_PLAN_GOLDEN) / sizeof(BDSP_PLAN_GOLDEN[0]); + size_t first_diff = 0; + while (first_diff < actual.size() && first_diff < stored && actual[first_diff] == BDSP_PLAN_GOLDEN[first_diff]){ + first_diff++; + } + if (first_diff == actual.size() && first_diff == stored){ + return true; + } + for (const std::string& line : actual){ + logger.log(std::format("GOLDEN|{}", line)); + } + return std::format("plans differ from the golden at line {} ({} lines now, {} stored): now \"{}\", stored \"{}\".", + first_diff + 1, actual.size(), stored, + first_diff < actual.size() ? std::string_view(actual[first_diff]) : std::string_view(), + first_diff < stored ? BDSP_PLAN_GOLDEN[first_diff] : std::string_view()); +} + +UnitTestResult test_start_and_end(Logger&){ + Simulation sim; + Pokemon::SegmentReport report = sim.run({.from = "00.04b", .to = "00.04d"}); + if (!report.completed || sim.begun() != std::vector{"00.04b", "00.04c", "00.04d"}){ + return "Expected 00.04b to 00.04d only:" + joined(sim.begun()); + } + Simulation tail; + report = tail.run({.from = "01.10", .to = std::nullopt}); + if (!report.completed || tail.begun() != std::vector{"01.10", "01.11"}){ + return "Expected 01.10 to the end:" + joined(tail.begun()); + } + Simulation one; + report = one.run({.from = "00.02", .to = "00.02"}); + if (!report.completed || one.begun() != std::vector{"00.02"}){ + return "Expected 00.02 alone:" + joined(one.begun()); + } + // With Stop for Starter RNG on, a 00.00..01.11 run stops after 00.01 + // saves at the Verity Lakefront (17, 14) facing north. + Simulation handoff_sim; + const StoryRunPlan plan = plan_story_run( + story_checkpoints(), 0, story_checkpoints().size() - 1, StoryHandoffs{.starter_rng = Pokemon::RngHandoffMode::STOP} + ); + Pokemon::Segment handoff_segment = make_story_segment(plan.rows, handoff_sim.game, handoff_sim.saved, handoff_sim.policy.save_mode); + Pokemon::SegmentHooks hooks; + hooks.reload = [&](RunState&){ return Pokemon::outcome_ok(); }; + RunState handoff_state; + const Pokemon::SegmentReport handoff_report = Pokemon::run_segment( + {.from = plan.rows.front().id, .to = plan.rows.back().id}, handoff_sim.policy, handoff_segment, hooks, handoff_state + ); + if (!handoff_report.completed || plan.stop != StoryHandoff::STARTER_RNG || + handoff_sim.begun() != std::vector{"00.00", "00.01"} || + handoff_sim.count("00.01/save_for_starter_rng") != 1 || + handoff_sim.count("card for 00.01: Verity Lakefront") != 1 || + handoff_state.pose.map != "VerityLakefront" || + Pokemon::tiles_of(handoff_state.pose) != std::vector{{17, 14}} + ){ + return std::format("Expected Starter RNG handoff to stop after 00.01 saved at VerityLakefront (17, 14), checking the Verity Lakefront card:{}", joined(handoff_sim.trace)); + } + return true; +} + +// With Run Starter RNG in AutoStory on, 00.02 saves at the Verity +// Lakefront, runs 00.02/starter_rng, and chains into 00.03. +UnitTestResult test_run_starter_rng_in_story(Logger&){ + Pokemon::SegmentHooks hooks; + hooks.reload = [&](RunState&){ return Pokemon::outcome_ok(); }; + Simulation in_program_sim; + const StoryRunPlan in_program_plan = plan_story_run( + story_checkpoints(), 0, 3, StoryHandoffs{.starter_rng = Pokemon::RngHandoffMode::RUN} + ); + Pokemon::Segment in_program_segment = make_story_segment(in_program_plan.rows, in_program_sim.game, in_program_sim.saved, in_program_sim.policy.save_mode); + RunState in_program_state; + const Pokemon::SegmentReport in_program_report = Pokemon::run_segment( + {.from = "00.00", .to = "00.03"}, in_program_sim.policy, in_program_segment, hooks, in_program_state + ); + if (!in_program_report.completed || + in_program_sim.begun() != std::vector{"00.00", "00.01", "00.02", "00.03"} || + in_program_sim.count("save in 00.02") != 1 || + in_program_sim.count("card for 00.02: Verity Lakefront") != 1 || + in_program_sim.count("00.02/starter_rng") != 1 || + in_program_sim.count("00.02/choose_starter") != 0 + ){ + return std::format( + "Expected 00.02 with Run Starter RNG in AutoStory to save at Verity Lakefront, run 00.02/starter_rng, and continue to 00.03:{}", + joined(in_program_sim.trace) + ); + } + return true; +} + +// Console B, 2026-11-11: with save mode none, 00.05b and 00.05c saved at +// their starts, overwriting 00.05's save. Save mode none saves nowhere. +UnitTestResult test_save_mode_none_saves_nowhere(Logger&){ + Simulation sim; + sim.policy.save_mode = Pokemon::StorySaveMode::NONE; + const Pokemon::SegmentReport report = sim.run({.from = "00.04b", .to = "00.05c"}); + if (!report.completed){ + return "Expected 00.04b to 00.05c through:" + joined(sim.lines); + } + for (const std::string& item : sim.trace){ + if (item.starts_with("save in ")){ + return "Expected no save with save mode none:" + joined(sim.trace); + } + } + return true; +} + +// r72: a blackout in 00.04b's training. The checkpoint resets to the save +// it made at its start, does not save again, and walks from that save's +// pose to the grass again. +UnitTestResult test_training_blackout(Logger&){ + Simulation sim; + sim.game.failures["00.04b/train"] = {.failure = "blackout", .times = 1}; + const Pokemon::SegmentReport report = sim.run({.from = "00.04b", .to = "00.04d"}); + const std::vector expected{"00.04b", "00.04b", "00.04c", "00.04d"}; + if (!report.completed || report.reloads != 1 || sim.begun() != expected){ + return "Expected 00.04b reloaded once, then on:" + joined(sim.trace); + } + if (sim.count("save in 00.04b") != 1 || sim.count("00.04b/to_catch_grass") != 2){ + return "Expected the retry to start from 00.04b's one save and walk to the grass again:" + joined(sim.trace); + } + if (!sim.logged("[Checkpoint] 00.04b: passed on attempt 2 (1 reset)")){ + return "Expected the retried pass logged:" + joined(sim.lines); + } + return true; +} + +// A step that fails every time: three attempts from the checkpoint's +// save, then the segment stops on it and runs nothing after. +UnitTestResult test_gives_up_after_attempts(Logger&){ + const std::string step = "01.04/gym_until_roark_beaten"; + Simulation sim; + sim.game.failures[step] = {.failure = "operation_failed", .times = 10}; + const Pokemon::SegmentReport report = sim.run({.from = "01.01", .to = std::nullopt}); + if (report.completed || report.reloads != 2 || report.failed_checkpoint != "01.04" || report.failed_event != "gym_until_roark_beaten" + || report.runs.empty() || report.runs.back().attempts != 3 || sim.count(step) != 3 + || sim.count("save in 01.04") != 1 || sim.count("begin 01.05") != 0 + ){ + return "Expected 01.04 tried 3 times from its save, then a stop:" + joined(sim.trace) + joined(sim.lines); + } + Simulation lab; + lab.policy.attempts_per_checkpoint = 1; + lab.game.failures[step] = {.failure = "operation_failed", .times = 10}; + const Pokemon::SegmentReport stopped = lab.run({.from = "01.01", .to = std::nullopt}); + if (stopped.completed || stopped.reloads != 0 || lab.count("reload") != 0){ + return "Expected a stop at the first failure without a reload:" + joined(lab.trace); + } + return true; +} + +// Events that leave the player where they were: the look at the Poketch, +// and 00.05c's start probe, whose step west the Poketch Company's sign +// stops on 00.05b's end, (14, 19). +const std::set EVENTS_IN_PLACE{"check_poketch", "jubilife_start_probe", "check_coupons"}; + +// Each row that has a start pose starts where the row before it leaves +// the player, by the same planning and walking the fake run does. +UnitTestResult test_poses_chain(Logger&){ + std::optional at; + bool measured = false; + std::string last; + for (const StoryCheckpoint& row : story_checkpoints()){ + if (row.start){ + const Pose start_pose = Pokemon::pose_of(*row.start); + const std::vector start = Pokemon::tiles_of(start_pose); + if (at && (at->map != Pokemon::grid_pose_of(*row.start).map || + !std::ranges::all_of(Pokemon::tiles_of(*at), [&](const TilePos& pos){ return contains(start, pos); })) + ){ + return std::format("{} starts at{}, but {} may end at{}.", row.id, describe(Pokemon::grid_pose_of(*row.start).map, start), + last, describe(at->map, Pokemon::tiles_of(*at))); + } + at = start_pose; + }else{ + at.reset(); + } + for (const StoryStep& step : row.steps){ + if (step.kind == StoryStepKind::ROUTE || step.kind == StoryStepKind::LEGS || step.kind == StoryStepKind::STEP){ + if (!at && step.action != "to_wall" && step.action != "jubilife_stairs"){ + return row.id + " " + step.name + ": walks from an unknown pose."; + } + const bool known = std::exchange(measured, false); + const Walked walked = !at ? Walked{} : step.kind == StoryStepKind::ROUTE + ? (known ? plan_route_from_each(*at, step) : plan_route(*at, step)) + : step.kind == StoryStepKind::LEGS ? walk_legs(*at, step) : step_on(*at, step); + if (!walked.error.empty()){ + return row.id + " " + walked.error; + } + at = walked.at; + measured = walked.measured; + }else if (step.kind == StoryStepKind::GAME && EVENTS_IN_PLACE.contains(step.action)){ + // Where it was. + }else if (step.kind == StoryStepKind::GAME || step.kind == StoryStepKind::SHOP || step.kind == StoryStepKind::MASH){ + // A scene or an event: where it ends is the table's to say. + at.reset(); + } + if (step.pose_after){ + at = Pokemon::pose_of(*step.pose_after); + } + } + last = row.id; + } + return true; +} + +// Walks are planned on the maps: a LEGS step ("east 6, north 18") is +// left only where no route can do its job, and says why in its own "why" +// (a wall that pins the column, a door's mat no route starts on). +UnitTestResult test_no_hand_written_legs(Logger&){ + for (const StoryCheckpoint& row : story_checkpoints()){ + for (const StoryStep& step : row.steps){ + if (step.kind == StoryStepKind::LEGS && step.why.empty()){ + return std::format("{}/{}: hand-written legs with no why; plan a route to where they end, or say why none can.", + row.id, step.name); + } + } + } + return true; +} + +// Legs that run off the end of their map land on the next one of the same +// world: east along Route 201's top row ends in Sandgem, not off the map. +UnitTestResult test_legs_cross_maps(Logger&){ + const Pose from = Pokemon::tile_pose("Route201", {{42, 5}}, Direction::EAST); + StoryStep step{.kind = StoryStepKind::LEGS, .name = "east into Sandgem"}; + step.args["legs"] = std::vector{{Direction::EAST, 22}}; + const Walked walked = walk_legs(from, step); + if (!walked.error.empty()){ + return walked.error; + } + if (!walked.at || walked.at->map != "SandgemTown"){ + return "The legs end on " + (walked.at ? walked.at->map : std::string("no pose")) + ", not SandgemTown."; + } + return true; +} + +// With no reader for the game's language, the reads that used text give +// way: a banner or save card that showed matches any map. +UnitTestResult test_no_text_reader(Logger&){ + for (Language language : {Language::Japanese, Language::Korean, Language::French}){ + if (story_reads_text(language)){ + return std::string("Expected no text reader for ") + language_data(language).name + "."; + } + } + if (!location_banner_matches(UNREAD_LOCATION, "Route 202") || location_banner_matches("", "Route 202")){ + return "Expected a shown, unread banner to match and no banner not to."; + } + if (!story_reads_text(Language::English) || location_banner_matches("sandgemtown", "Route 202")){ + return "Expected English banners read and compared."; + } + return true; +} + + +struct AutoStoryStorySimulationInput{ + std::string name; + std::function body; +}; + +struct AutoStoryStorySimulationExpectation{ +}; + +struct AutoStoryStorySimulationCase{ + AutoStoryStorySimulationInput input; + AutoStoryStorySimulationExpectation expectation; +}; + +class Test_StorySimulation : public UnitTest{ +public: + explicit Test_StorySimulation(AutoStoryStorySimulationCase test_case) + : UnitTest("PokemonBDSP::AutoStory - Simulation: " + test_case.input.name) + , m_case(std::move(test_case)) + {} + virtual UnitTestResult run(Logger& logger, CancellableScope&) const override{ + try{ + return m_case.input.body(logger); + }catch (Exception& e){ + return std::string(e.name()) + ": " + e.message(); + } + } + +private: + AutoStoryStorySimulationCase m_case; +}; + +} // namespace + + +// Execute the authored mine resource through the actual table and shared engine. +UnitTestResult test_authored_mine(Logger&){ + Simulation sim; + const auto report = sim.run({.from = "01.03", .to = "01.03"}); + if (!report.completed || sim.begun() != std::vector{"01.03"} + || sim.count("save in 01.03") != 1 || sim.count("card for 01.03: Oreburgh City") != 1 + || sim.count("01.03/heal_oreburgh") != 1 || sim.count("01.03/roark") != 1){ + return "Expected the JSON-authored mine checkpoint to save once, talk to Roark, heal and finish:" + joined(sim.trace) + joined(sim.lines); + } + return true; +} + +UnitTestResult test_authored_mine_stops(Logger&){ + Simulation sim; + sim.game.failures["01.03/out_of_the_mine"] = {.failure = "unconfirmed_transition", .times = 3}; + const auto report = sim.run({.from = "01.03", .to = "01.03"}); + if (report.completed || report.reloads != 2 || report.failed_event != "out_of_the_mine" + || sim.count("01.03/heal_oreburgh") != 0){ + return "Expected failed mine transition to exhaust retries before healing:" + joined(sim.trace) + joined(sim.lines); + } + return true; +} + +const AutoStoryStorySimulationCase AUTO_STORY_STORY_SIMULATION_CASES[] = { + {.input = {.name = "01.03 authored mine executes through the real table", .body = test_authored_mine}, .expectation = {}}, + {.input = {.name = "01.03 unconfirmed mine exit stops before healing", .body = test_authored_mine_stops}, .expectation = {}}, + { + .input = {"00.00 to Floaroma, in order, each row saved first, English and Japanese", test_whole_table}, + .expectation = {}, + }, + { + .input = {"start and end checkpoints", test_start_and_end}, + .expectation = {}, + }, + { + .input = {"save mode none saves at no row's start, 00.04b to 00.05c (lab-B, 2026-11-11)", test_save_mode_none_saves_nowhere}, + .expectation = {}, + }, + { + .input = {"Run Starter RNG in AutoStory chains 00.02 into 00.03", test_run_starter_rng_in_story}, + .expectation = {}, + }, + { + .input = {"a blackout in 00.04b's training resets to its save", test_training_blackout}, + .expectation = {}, + }, + { + .input = {"a step that keeps failing stops after 3 attempts", test_gives_up_after_attempts}, + .expectation = {}, + }, + { + .input = {"each start pose is where the row before ends; routes plan on the maps", test_poses_chain}, + .expectation = {}, + }, + { + .input = {"legs that run off their map land on the next", test_legs_cross_maps}, + .expectation = {}, + }, + { + .input = {"no text reader for the game's language", test_no_text_reader}, + .expectation = {}, + }, + { + .input = {"no hand-written legs without a why", test_no_hand_written_legs}, + .expectation = {}, + }, + { + .input = {"plans match the golden", test_golden_plans}, + .expectation = {}, + }, +}; + +void add_tests_AutoStory_StorySimulation(UnitTestDatabase& database){ + for (const auto& item : AUTO_STORY_STORY_SIMULATION_CASES){ + database.add(item); + } +} + + + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySimulation_Tests.h b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySimulation_Tests.h new file mode 100644 index 0000000000..0363e1e75d --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySimulation_Tests.h @@ -0,0 +1,27 @@ +/* BDSP AutoStory Story Simulation Tests + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonBDSP_AutoStory_StorySimulation_Tests_H +#define PokemonAutomation_PokemonBDSP_AutoStory_StorySimulation_Tests_H + +#include "Common/Cpp/TestRunners/UnitTestDatabase.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonBDSP{ + + +// Segments 00 and 01 run end to end without a console: the story table, +// the shared segment runner and its retry policy, against a fake game +// that plans every route and walk on the built-in maps. +void add_tests_AutoStory_StorySimulation(UnitTestDatabase& database); + + + +} // namespace PokemonBDSP +} // namespace NintendoSwitch +} // namespace PokemonAutomation +#endif diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/sim_golden_faults.txt b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/sim_golden_faults.txt new file mode 100644 index 0000000000..f04783910f --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/sim_golden_faults.txt @@ -0,0 +1,495 @@ +# BDSP AutoStory fault sweep outcomes (PokemonBDSP_AutoStory_SimGolden_Tests.cpp) +PokemonBDSP::AutoStory - Certainty: no step walks from a pose surer than the steps before leave: passed +PokemonBDSP::AutoStory - Fault sweep: 00.00, battle opening at step start: passed + Fault sweep 00.00 battle opening at step start: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.00, scene end pose: passed + Fault sweep 00.00 scene end pose: 8 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.00, scene starts during the walk before it: passed + Fault sweep 00.00 scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.00, slow fade-in after every warp: passed + Fault sweep 00.00 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.00, start off its declared tile: passed + Fault sweep 00.00 start off its declared tile: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.00, wild battles on every grass pass: passed + Fault sweep 00.00 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.01, battle opening at step start: passed + Fault sweep 00.01 battle opening at step start: 6 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.01, scene end pose: passed + Fault sweep 00.01 scene end pose: 14 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.01, scene starts during the walk before it: passed + Fault sweep 00.01 scene starts during the walk before it: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.01, slow fade-in after every warp: passed + Fault sweep 00.01 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.01, start off its declared tile: passed + Fault sweep 00.01 start off its declared tile: 10 variants, 7 fail. + | 00.01 | | start off its declared tile | starts on (4, 5) | stopped in 00.01 below_the_flute: 00.01 sim_mismatch: below_the_flute: ended at (7, 4) (PlayerHouse2F (7, 4)), not on PlayerHouse2F (7, 5) facing north (tile). | + | 00.01 | | start off its declared tile | starts on (3, 6) | stopped in 00.01 below_the_flute: 00.01 sim_mismatch: below_the_flute: ended at (6, 5) (PlayerHouse2F (6, 5)), not on PlayerHouse2F (7, 5) facing north (tile). | + | 00.01 | | start off its declared tile | starts on (2, 6) | stopped in 00.01 below_the_flute: 00.01 sim_mismatch: below_the_flute: ended at (5, 5) (PlayerHouse2F (5, 5)), not on PlayerHouse2F (7, 5) facing north (tile). | + | 00.01 | | start off its declared tile | starts on (1, 6) | stopped in 00.01 below_the_flute: 00.01 sim_mismatch: below_the_flute: ended at (4, 5) (PlayerHouse2F (4, 5)), not on PlayerHouse2F (7, 5) facing north (tile). | + | 00.01 | | start off its declared tile | starts on (5, 6) | stopped in 00.01 below_the_flute: 00.01 sim_mismatch: below_the_flute: ended at (8, 5) (PlayerHouse2F (8, 5)), not on PlayerHouse2F (7, 5) facing north (tile). | + | 00.01 | | start off its declared tile | starts on (6, 6) | stopped in 00.01 below_the_flute: 00.01 sim_failure: below the flute: east 3 (open): unexpected transition. | + | 00.01 | | start off its declared tile | starts on (7, 6) | stopped in 00.01 below_the_flute: 00.01 sim_failure: below the flute: east 3 (open): unexpected transition. | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 7 of 10 variants fail 00.01: + starts on (4, 5): stopped in 00.01 below_the_flute: 00.01 sim_mismatch: below_the_flute: ended at (7, 4) (PlayerHouse2F (7, 4)), not on PlayerHouse2F (7, 5) facing north (tile). + starts on (3, 6): stopped in 00.01 below_the_flute: 00.01 sim_mismatch: below_the_flute: ended at (6, 5) (PlayerHouse2F (6, 5)), not on PlayerHouse2F (7, 5) facing north (tile). + starts on (2, 6): stopped in 00.01 below_the_flute: 00.01 sim_mismatch: below_the_flute: ended at (5, 5) (PlayerHouse2F (5, 5)), not on PlayerHouse2F (7, 5) facing north (tile). + starts on (1, 6): stopped in 00.01 below_the_flute: 00.01 sim_mismatch: below_the_flute: ended at (4, 5) (PlayerHouse2F (4, 5)), not on PlayerHouse2F (7, 5) facing north (tile). + starts on (5, 6): stopped in 00.01 below_the_flute: 00.01 sim_mismatch: below_the_flute: ended at (8, 5) (PlayerHouse2F (8, 5)), not on PlayerHouse2F (7, 5) facing north (tile). + starts on (6, 6): stopped in 00.01 below_the_flute: 00.01 sim_failure: below the flute: east 3 (open): unexpected transition. + starts on (7, 6): stopped in 00.01 below_the_flute: 00.01 sim_failure: below the flute: east 3 (open): unexpected transition. +PokemonBDSP::AutoStory - Fault sweep: 00.01, wild battles on every grass pass: passed + Fault sweep 00.01 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.02, battle opening at step start: passed + Fault sweep 00.02 battle opening at step start: 2 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.02, scene end pose: passed + Fault sweep 00.02 scene end pose: 9 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.02, scene starts during the walk before it: passed + Fault sweep 00.02 scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.02, slow fade-in after every warp: passed + Fault sweep 00.02 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.02, start off its declared tile: passed + Fault sweep 00.02 start off its declared tile: 9 variants, 9 fail. + | 00.02 | | start off its declared tile | starts on (17, 13) | stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (17, 44) (Verity Lakefront (17, 12)), not on VerityLakefront (17, 13) facing north (tile). | + | 00.02 | | start off its declared tile | starts on (17, 12) | stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (17, 43) (Verity Lakefront (17, 11)), not on VerityLakefront (17, 13) facing north (tile). | + | 00.02 | | start off its declared tile | starts on (17, 11) | stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (17, 43) (Verity Lakefront (17, 11)), not on VerityLakefront (17, 13) facing north (tile). | + | 00.02 | | start off its declared tile | starts on (17, 15) | stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (17, 46) (Verity Lakefront (17, 14)), not on VerityLakefront (17, 13) facing north (tile). | + | 00.02 | | start off its declared tile | starts on (17, 16) | stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (17, 47) (Verity Lakefront (17, 15)), not on VerityLakefront (17, 13) facing north (tile). | + | 00.02 | | start off its declared tile | starts on (17, 17) | stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (17, 48) (Verity Lakefront (17, 16)), not on VerityLakefront (17, 13) facing north (tile). | + | 00.02 | | start off its declared tile | starts on (16, 14) | stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (16, 45) (Verity Lakefront (16, 13)), not on VerityLakefront (17, 13) facing north (tile). | + | 00.02 | | start off its declared tile | starts on (18, 14) | stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (18, 46) (Verity Lakefront (18, 14)), not on VerityLakefront (17, 13) facing north (tile). | + | 00.02 | | start off its declared tile | starts on (19, 14) | stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (19, 46) (Verity Lakefront (19, 14)), not on VerityLakefront (17, 13) facing north (tile). | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 9 of 9 variants fail 00.02: + starts on (17, 13): stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (17, 44) (Verity Lakefront (17, 12)), not on VerityLakefront (17, 13) facing north (tile). + starts on (17, 12): stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (17, 43) (Verity Lakefront (17, 11)), not on VerityLakefront (17, 13) facing north (tile). + starts on (17, 11): stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (17, 43) (Verity Lakefront (17, 11)), not on VerityLakefront (17, 13) facing north (tile). + starts on (17, 15): stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (17, 46) (Verity Lakefront (17, 14)), not on VerityLakefront (17, 13) facing north (tile). + starts on (17, 16): stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (17, 47) (Verity Lakefront (17, 15)), not on VerityLakefront (17, 13) facing north (tile). + starts on (17, 17): stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (17, 48) (Verity Lakefront (17, 16)), not on VerityLakefront (17, 13) facing north (tile). + starts on (16, 14): stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (16, 45) (Verity Lakefront (16, 13)), not on VerityLakefront (17, 13) facing north (tile). + starts on (18, 14): stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (18, 46) (Verity Lakefront (18, 14)), not on VerityLakefront (17, 13) facing north (tile). + starts on (19, 14): stopped in 00.02 to_the_lake_entrance: 00.02 sim_mismatch: to_the_lake_entrance: ended at (19, 46) (Verity Lakefront (19, 14)), not on VerityLakefront (17, 13) facing north (tile). +PokemonBDSP::AutoStory - Fault sweep: 00.02, wild battles on every grass pass: passed + Fault sweep 00.02 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.03, battle opening at step start: passed + Fault sweep 00.03 battle opening at step start: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.03, scene end pose: passed + Fault sweep 00.03 scene end pose: 7 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.03, scene starts during the walk before it: passed + Fault sweep 00.03 scene starts during the walk before it: 2 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.03, slow fade-in after every warp: passed + Fault sweep 00.03 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.03, start off its declared tile: passed + Fault sweep 00.03 start off its declared tile: 9 variants, 1 fail. + | 00.03 | | start off its declared tile | starts on (17, 17) | stopped in 00.03 into_rowans_scene: 00.03 sim_failure: into rowans scene: too many plans. | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 1 of 9 variants fail 00.03: + starts on (17, 17): stopped in 00.03 into_rowans_scene: 00.03 sim_failure: into rowans scene: too many plans. +PokemonBDSP::AutoStory - Fault sweep: 00.03, wild battles on every grass pass: passed + Fault sweep 00.03 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04, battle opening at step start: passed + Fault sweep 00.04 battle opening at step start: 7 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04, scene end pose: passed + Fault sweep 00.04 scene end pose: 12 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04, scene starts during the walk before it: passed + Fault sweep 00.04 scene starts during the walk before it: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04, slow fade-in after every warp: passed + Fault sweep 00.04 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04, start off its declared tile: passed + Fault sweep 00.04 start off its declared tile: 9 variants, 6 fail. + | 00.04 | | start off its declared tile | starts on (6, 6) | stopped in 00.04 out_of_the_lab: 00.04 sim_failure: out of the lab: no fade, so we are not where the step goes (map mismatch). | + | 00.04 | | start off its declared tile | starts on (5, 6) | stopped in 00.04 out_of_the_lab: 00.04 sim_failure: out of the lab: no fade, so we are not where the step goes (map mismatch). | + | 00.04 | | start off its declared tile | starts on (4, 6) | stopped in 00.04 out_of_the_lab: 00.04 sim_failure: out of the lab: no fade, so we are not where the step goes (map mismatch). | + | 00.04 | | start off its declared tile | starts on (8, 6) | stopped in 00.04 out_of_the_lab: 00.04 sim_failure: out of the lab: no fade, so we are not where the step goes (map mismatch). | + | 00.04 | | start off its declared tile | starts on (9, 6) | stopped in 00.04 out_of_the_lab: 00.04 sim_failure: out of the lab: no fade, so we are not where the step goes (map mismatch). | + | 00.04 | | start off its declared tile | starts on (10, 6) | stopped in 00.04 out_of_the_lab: 00.04 sim_failure: out of the lab: no fade, so we are not where the step goes (map mismatch). | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 6 of 9 variants fail 00.04: + starts on (6, 6): stopped in 00.04 out_of_the_lab: 00.04 sim_failure: out of the lab: no fade, so we are not where the step goes (map mismatch). + starts on (5, 6): stopped in 00.04 out_of_the_lab: 00.04 sim_failure: out of the lab: no fade, so we are not where the step goes (map mismatch). + starts on (4, 6): stopped in 00.04 out_of_the_lab: 00.04 sim_failure: out of the lab: no fade, so we are not where the step goes (map mismatch). + starts on (8, 6): stopped in 00.04 out_of_the_lab: 00.04 sim_failure: out of the lab: no fade, so we are not where the step goes (map mismatch). + starts on (9, 6): stopped in 00.04 out_of_the_lab: 00.04 sim_failure: out of the lab: no fade, so we are not where the step goes (map mismatch). + starts on (10, 6): stopped in 00.04 out_of_the_lab: 00.04 sim_failure: out of the lab: no fade, so we are not where the step goes (map mismatch). +PokemonBDSP::AutoStory - Fault sweep: 00.04, wild battles on every grass pass: passed + Fault sweep 00.04 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04b, battle opening at step start: passed + Fault sweep 00.04b battle opening at step start: 2 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04b, scene end pose: passed + Fault sweep 00.04b scene end pose: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04b, scene starts during the walk before it: passed + Fault sweep 00.04b scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04b, slow fade-in after every warp: passed + Fault sweep 00.04b slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04b, start off its declared tile: passed + Fault sweep 00.04b start off its declared tile: 8 variants, 2 fail. + | 00.04b | | start off its declared tile | starts on (13, 25) | stopped in 00.04b to_catch_grass: 00.04b sim_mismatch: to_catch_grass: ended at (107, 24) (Route 202 (12, 24)), not on Route202 (20, 25) (tile). | + | 00.04b | | start off its declared tile | starts on (12, 25) | stopped in 00.04b to_catch_grass: 00.04b sim_mismatch: to_catch_grass: ended at (105, 24) (Route 202 (10, 24)), not on Route202 (20, 25) (tile). | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 2 of 8 variants fail 00.04b: + starts on (13, 25): stopped in 00.04b to_catch_grass: 00.04b sim_mismatch: to_catch_grass: ended at (107, 24) (Route 202 (12, 24)), not on Route202 (20, 25) (tile). + starts on (12, 25): stopped in 00.04b to_catch_grass: 00.04b sim_mismatch: to_catch_grass: ended at (105, 24) (Route 202 (10, 24)), not on Route202 (20, 25) (tile). +PokemonBDSP::AutoStory - Fault sweep: 00.04b, wild battles on every grass pass: passed + Fault sweep 00.04b wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04c, battle opening at step start: passed + Fault sweep 00.04c battle opening at step start: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04c, scene end pose: passed + Fault sweep 00.04c scene end pose: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04c, scene starts during the walk before it: passed + Fault sweep 00.04c scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04c, slow fade-in after every warp: passed + Fault sweep 00.04c slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04c, start off its declared tile: passed + Fault sweep 00.04c start off its declared tile: 9 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04c, wild battles on every grass pass: passed + Fault sweep 00.04c wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04d, battle opening at step start: passed + Fault sweep 00.04d battle opening at step start: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04d, scene end pose: passed + Fault sweep 00.04d scene end pose: 8 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04d, scene starts during the walk before it: passed + Fault sweep 00.04d scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04d, slow fade-in after every warp: passed + Fault sweep 00.04d slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04d, start off its declared tile: passed + Fault sweep 00.04d start off its declared tile: 6 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.04d, wild battles on every grass pass: passed + Fault sweep 00.04d wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05, battle opening at step start: passed + Fault sweep 00.05 battle opening at step start: 2 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05, scene end pose: passed + Fault sweep 00.05 scene end pose: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05, scene starts during the walk before it: passed + Fault sweep 00.05 scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05, slow fade-in after every warp: passed + Fault sweep 00.05 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05, start off its declared tile: passed + Fault sweep 00.05 start off its declared tile: 12 variants, 1 fail. + | 00.05 | | start off its declared tile | starts on (46, 57) | stopped in 00.05 east_to_the_wall: 00.05 sim_mismatch: east_to_the_wall: ended at (48, 53) (Jubilife City (48, 53)), not on JubilifeCity (52, 51) (52, 52) (52, 53) (52, 54) (52, 55) (52, 56) (52, 57) facing east (set). | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 1 of 12 variants fail 00.05: + starts on (46, 57): stopped in 00.05 east_to_the_wall: 00.05 sim_mismatch: east_to_the_wall: ended at (48, 53) (Jubilife City (48, 53)), not on JubilifeCity (52, 51) (52, 52) (52, 53) (52, 54) (52, 55) (52, 56) (52, 57) facing east (set). +PokemonBDSP::AutoStory - Fault sweep: 00.05, wild battles on every grass pass: passed + Fault sweep 00.05 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05b, battle opening at step start: passed + Fault sweep 00.05b battle opening at step start: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05b, scene end pose: passed + Fault sweep 00.05b scene end pose: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05b, scene starts during the walk before it: passed + Fault sweep 00.05b scene starts during the walk before it: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05b, slow fade-in after every warp: passed + Fault sweep 00.05b slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05b, start off its declared tile: passed + Fault sweep 00.05b start off its declared tile: 10 variants, 10 fail. + | 00.05b | | start off its declared tile | starts on (40, 40) | stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (46, 40) (Jubilife City (46, 40)), not on JubilifeCity (46, 41) facing north (tile). | + | 00.05b | | start off its declared tile | starts on (40, 42) | stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (46, 42) (Jubilife City (46, 42)), not on JubilifeCity (46, 41) facing north (tile). | + | 00.05b | | start off its declared tile | starts on (40, 43) | stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (46, 43) (Jubilife City (46, 43)), not on JubilifeCity (46, 41) facing north (tile). | + | 00.05b | | start off its declared tile | starts on (40, 44) | stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (34, 44) (Jubilife City (34, 44)), not on JubilifeCity (46, 41) facing north (tile). | + | 00.05b | | start off its declared tile | starts on (39, 41) | stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (45, 41) (Jubilife City (45, 41)), not on JubilifeCity (46, 41) facing north (tile). | + | 00.05b | | start off its declared tile | starts on (38, 41) | stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (44, 41) (Jubilife City (44, 41)), not on JubilifeCity (46, 41) facing north (tile). | + | 00.05b | | start off its declared tile | starts on (37, 41) | stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (43, 41) (Jubilife City (43, 41)), not on JubilifeCity (46, 41) facing north (tile). | + | 00.05b | | start off its declared tile | starts on (41, 41) | stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (47, 41) (Jubilife City (47, 41)), not on JubilifeCity (46, 41) facing north (tile). | + | 00.05b | | start off its declared tile | starts on (42, 41) | stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (48, 41) (Jubilife City (48, 41)), not on JubilifeCity (46, 41) facing north (tile). | + | 00.05b | | start off its declared tile | starts on (43, 41) | stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (49, 41) (Jubilife City (49, 41)), not on JubilifeCity (46, 41) facing north (tile). | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 10 of 10 variants fail 00.05b: + starts on (40, 40): stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (46, 40) (Jubilife City (46, 40)), not on JubilifeCity (46, 41) facing north (tile). + starts on (40, 42): stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (46, 42) (Jubilife City (46, 42)), not on JubilifeCity (46, 41) facing north (tile). + starts on (40, 43): stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (46, 43) (Jubilife City (46, 43)), not on JubilifeCity (46, 41) facing north (tile). + starts on (40, 44): stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (34, 44) (Jubilife City (34, 44)), not on JubilifeCity (46, 41) facing north (tile). + starts on (39, 41): stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (45, 41) (Jubilife City (45, 41)), not on JubilifeCity (46, 41) facing north (tile). + starts on (38, 41): stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (44, 41) (Jubilife City (44, 41)), not on JubilifeCity (46, 41) facing north (tile). + starts on (37, 41): stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (43, 41) (Jubilife City (43, 41)), not on JubilifeCity (46, 41) facing north (tile). + starts on (41, 41): stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (47, 41) (Jubilife City (47, 41)), not on JubilifeCity (46, 41) facing north (tile). + starts on (42, 41): stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (48, 41) (Jubilife City (48, 41)), not on JubilifeCity (46, 41) facing north (tile). + starts on (43, 41): stopped in 00.05b below_the_presidents_trigger: 00.05b sim_mismatch: below_the_presidents_trigger: ended at (49, 41) (Jubilife City (49, 41)), not on JubilifeCity (46, 41) facing north (tile). +PokemonBDSP::AutoStory - Fault sweep: 00.05b, wild battles on every grass pass: passed + Fault sweep 00.05b wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05c, battle opening at step start: passed + Fault sweep 00.05c battle opening at step start: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05c, scene end pose: passed + Fault sweep 00.05c scene end pose: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05c, scene starts during the walk before it: passed + Fault sweep 00.05c scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05c, slow fade-in after every warp: passed + Fault sweep 00.05c slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 00.05c, start off its declared tile: passed + Fault sweep 00.05c start off its declared tile: 9 variants, 6 fail. + | 00.05c | | start off its declared tile | starts on (14, 18) | stopped in 00.05c beside_the_president: 00.05c sim_mismatch: beside_the_president: ended at (56, 34) (Jubilife City (56, 34)), not on JubilifeCity (45, 35) facing east (tile). | + | 00.05c | | start off its declared tile | starts on (14, 17) | stopped in 00.05c beside_the_president: 00.05c sim_mismatch: beside_the_president: ended at (56, 33) (Jubilife City (56, 33)), not on JubilifeCity (45, 35) facing east (tile). | + | 00.05c | | start off its declared tile | starts on (14, 16) | stopped in 00.05c beside_the_president: 00.05c sim_mismatch: beside_the_president: ended at (56, 32) (Jubilife City (56, 32)), not on JubilifeCity (45, 35) facing east (tile). | + | 00.05c | | start off its declared tile | starts on (14, 20) | stopped in 00.05c beside_the_president: 00.05c sim_mismatch: beside_the_president: ended at (45, 36) (Jubilife City (45, 36)), not on JubilifeCity (45, 35) facing east (tile). | + | 00.05c | | start off its declared tile | starts on (14, 21) | stopped in 00.05c beside_the_president: 00.05c sim_mismatch: beside_the_president: ended at (45, 36) (Jubilife City (45, 36)), not on JubilifeCity (45, 35) facing east (tile). | + | 00.05c | | start off its declared tile | starts on (14, 22) | stopped in 00.05c beside_the_president: 00.05c sim_failure: beside the president: too many plans. | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 6 of 9 variants fail 00.05c: + starts on (14, 18): stopped in 00.05c beside_the_president: 00.05c sim_mismatch: beside_the_president: ended at (56, 34) (Jubilife City (56, 34)), not on JubilifeCity (45, 35) facing east (tile). + starts on (14, 17): stopped in 00.05c beside_the_president: 00.05c sim_mismatch: beside_the_president: ended at (56, 33) (Jubilife City (56, 33)), not on JubilifeCity (45, 35) facing east (tile). + starts on (14, 16): stopped in 00.05c beside_the_president: 00.05c sim_mismatch: beside_the_president: ended at (56, 32) (Jubilife City (56, 32)), not on JubilifeCity (45, 35) facing east (tile). + starts on (14, 20): stopped in 00.05c beside_the_president: 00.05c sim_mismatch: beside_the_president: ended at (45, 36) (Jubilife City (45, 36)), not on JubilifeCity (45, 35) facing east (tile). + starts on (14, 21): stopped in 00.05c beside_the_president: 00.05c sim_mismatch: beside_the_president: ended at (45, 36) (Jubilife City (45, 36)), not on JubilifeCity (45, 35) facing east (tile). + starts on (14, 22): stopped in 00.05c beside_the_president: 00.05c sim_failure: beside the president: too many plans. +PokemonBDSP::AutoStory - Fault sweep: 00.05c, wild battles on every grass pass: passed + Fault sweep 00.05c wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.01, battle opening at step start: passed + Fault sweep 01.01 battle opening at step start: 2 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.01, scene end pose: passed + Fault sweep 01.01 scene end pose: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.01, scene starts during the walk before it: passed + Fault sweep 01.01 scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.01, slow fade-in after every warp: passed + Fault sweep 01.01 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.01, start off its declared tile: passed + Fault sweep 01.01 start off its declared tile: 9 variants, 8 fail. + | 01.01 | | start off its declared tile | starts on (59, 22) | stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (67, 23) (Route 203 (4, 19)), not on Route203 (4, 18) facing east (tile). | + | 01.01 | | start off its declared tile | starts on (59, 23) | stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (67, 24) (Route 203 (4, 20)), not on Route203 (4, 18) facing east (tile). | + | 01.01 | | start off its declared tile | starts on (58, 21) | stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (66, 22) (Route 203 (3, 18)), not on Route203 (4, 18) facing east (tile). | + | 01.01 | | start off its declared tile | starts on (57, 21) | stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (65, 22) (Route 203 (2, 18)), not on Route203 (4, 18) facing east (tile). | + | 01.01 | | start off its declared tile | starts on (56, 21) | stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (64, 22) (Route 203 (1, 18)), not on Route203 (4, 18) facing east (tile). | + | 01.01 | | start off its declared tile | starts on (60, 21) | stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (68, 22) (Route 203 (5, 18)), not on Route203 (4, 18) facing east (tile). | + | 01.01 | | start off its declared tile | starts on (61, 21) | stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (69, 22) (Route 203 (6, 18)), not on Route203 (4, 18) facing east (tile). | + | 01.01 | | start off its declared tile | starts on (62, 21) | stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (70, 22) (Route 203 (7, 18)), not on Route203 (4, 18) facing east (tile). | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 8 of 9 variants fail 01.01: + starts on (59, 22): stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (67, 23) (Route 203 (4, 19)), not on Route203 (4, 18) facing east (tile). + starts on (59, 23): stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (67, 24) (Route 203 (4, 20)), not on Route203 (4, 18) facing east (tile). + starts on (58, 21): stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (66, 22) (Route 203 (3, 18)), not on Route203 (4, 18) facing east (tile). + starts on (57, 21): stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (65, 22) (Route 203 (2, 18)), not on Route203 (4, 18) facing east (tile). + starts on (56, 21): stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (64, 22) (Route 203 (1, 18)), not on Route203 (4, 18) facing east (tile). + starts on (60, 21): stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (68, 22) (Route 203 (5, 18)), not on Route203 (4, 18) facing east (tile). + starts on (61, 21): stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (69, 22) (Route 203 (6, 18)), not on Route203 (4, 18) facing east (tile). + starts on (62, 21): stopped in 01.01 west_of_barrys_trigger: 01.01 sim_mismatch: west_of_barrys_trigger: ended at (70, 22) (Route 203 (7, 18)), not on Route203 (4, 18) facing east (tile). +PokemonBDSP::AutoStory - Fault sweep: 01.01, wild battles on every grass pass: passed + Fault sweep 01.01 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.02, battle opening at step start: passed + Fault sweep 01.02 battle opening at step start: 6 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.02, scene end pose: passed + Fault sweep 01.02 scene end pose: 8 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.02, scene starts during the walk before it: passed + Fault sweep 01.02 scene starts during the walk before it: 2 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.02, slow fade-in after every warp: passed + Fault sweep 01.02 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.02, start off its declared tile: passed + Fault sweep 01.02 start off its declared tile: 12 variants, 6 fail. + | 01.02 | | start off its declared tile | starts on (4, 17) | stopped in 01.02 south_to_the_cliff: 01.02 sim_mismatch: south_to_the_cliff: ended at (67, 24) (Route 203 (4, 20)), not on Route203 (5, 20) facing south (tile). | + | 01.02 | | start off its declared tile | starts on (3, 17) | stopped in 01.02 south_to_the_cliff: 01.02 sim_mismatch: south_to_the_cliff: ended at (66, 24) (Route 203 (3, 20)), not on Route203 (5, 20) facing south (tile). | + | 01.02 | | start off its declared tile | starts on (2, 17) | stopped in 01.02 south_to_the_cliff: 01.02 sim_mismatch: south_to_the_cliff: ended at (65, 24) (Route 203 (2, 20)), not on Route203 (5, 20) facing south (tile). | + | 01.02 | | start off its declared tile | starts on (6, 17) | stopped in 01.02 south_to_the_cliff: 01.02 sim_mismatch: south_to_the_cliff: ended at (69, 24) (Route 203 (6, 20)), not on Route203 (5, 20) facing south (tile). | + | 01.02 | | start off its declared tile | starts on (7, 17) | stopped in 01.02 south_to_the_cliff: 01.02 sim_mismatch: south_to_the_cliff: ended at (70, 24) (Route 203 (7, 20)), not on Route203 (5, 20) facing south (tile). | + | 01.02 | | start off its declared tile | starts on (8, 17) | stopped in 01.02 south_to_the_cliff: 01.02 sim_mismatch: south_to_the_cliff: ended at (71, 24) (Route 203 (8, 20)), not on Route203 (5, 20) facing south (tile). | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 6 of 12 variants fail 01.02: + starts on (4, 17): stopped in 01.02 south_to_the_cliff: 01.02 sim_mismatch: south_to_the_cliff: ended at (67, 24) (Route 203 (4, 20)), not on Route203 (5, 20) facing south (tile). + starts on (3, 17): stopped in 01.02 south_to_the_cliff: 01.02 sim_mismatch: south_to_the_cliff: ended at (66, 24) (Route 203 (3, 20)), not on Route203 (5, 20) facing south (tile). + starts on (2, 17): stopped in 01.02 south_to_the_cliff: 01.02 sim_mismatch: south_to_the_cliff: ended at (65, 24) (Route 203 (2, 20)), not on Route203 (5, 20) facing south (tile). + starts on (6, 17): stopped in 01.02 south_to_the_cliff: 01.02 sim_mismatch: south_to_the_cliff: ended at (69, 24) (Route 203 (6, 20)), not on Route203 (5, 20) facing south (tile). + starts on (7, 17): stopped in 01.02 south_to_the_cliff: 01.02 sim_mismatch: south_to_the_cliff: ended at (70, 24) (Route 203 (7, 20)), not on Route203 (5, 20) facing south (tile). + starts on (8, 17): stopped in 01.02 south_to_the_cliff: 01.02 sim_mismatch: south_to_the_cliff: ended at (71, 24) (Route 203 (8, 20)), not on Route203 (5, 20) facing south (tile). +PokemonBDSP::AutoStory - Fault sweep: 01.02, wild battles on every grass pass: passed + Fault sweep 01.02 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.02b, battle opening at step start: passed + Fault sweep 01.02b battle opening at step start: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.02b, scene end pose: passed + Fault sweep 01.02b scene end pose: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.02b, scene starts during the walk before it: passed + Fault sweep 01.02b scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.02b, slow fade-in after every warp: passed + Fault sweep 01.02b slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.02b, start off its declared tile: passed + Fault sweep 01.02b start off its declared tile: 10 variants, 10 fail. + | 01.02b | | start off its declared tile | starts on (23, 22) | stopped in 01.02b below_barry: 01.02b short_leg: north 2 moved 1 | + | 01.02b | | start off its declared tile | starts on (23, 21) | stopped in 01.02b below_barry: 01.02b short_leg: north 2 moved 0 | + | 01.02b | | start off its declared tile | starts on (23, 24) | stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (26, 23) (Oreburgh City (26, 23)), not on OreburghCity (26, 22) facing north (tile). | + | 01.02b | | start off its declared tile | starts on (23, 25) | stopped in 01.02b below_barry: 01.02b short_leg: south 1 moved 0 | + | 01.02b | | start off its declared tile | starts on (22, 23) | stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (25, 22) (Oreburgh City (25, 22)), not on OreburghCity (26, 22) facing north (tile). | + | 01.02b | | start off its declared tile | starts on (21, 23) | stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (24, 22) (Oreburgh City (24, 22)), not on OreburghCity (26, 22) facing north (tile). | + | 01.02b | | start off its declared tile | starts on (20, 23) | stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (23, 22) (Oreburgh City (23, 22)), not on OreburghCity (26, 22) facing north (tile). | + | 01.02b | | start off its declared tile | starts on (24, 23) | stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (27, 22) (Oreburgh City (27, 22)), not on OreburghCity (26, 22) facing north (tile). | + | 01.02b | | start off its declared tile | starts on (25, 23) | stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (28, 22) (Oreburgh City (28, 22)), not on OreburghCity (26, 22) facing north (tile). | + | 01.02b | | start off its declared tile | starts on (26, 23) | stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (29, 22) (Oreburgh City (29, 22)), not on OreburghCity (26, 22) facing north (tile). | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 10 of 10 variants fail 01.02b: + starts on (23, 22): stopped in 01.02b below_barry: 01.02b short_leg: north 2 moved 1 + starts on (23, 21): stopped in 01.02b below_barry: 01.02b short_leg: north 2 moved 0 + starts on (23, 24): stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (26, 23) (Oreburgh City (26, 23)), not on OreburghCity (26, 22) facing north (tile). + starts on (23, 25): stopped in 01.02b below_barry: 01.02b short_leg: south 1 moved 0 + starts on (22, 23): stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (25, 22) (Oreburgh City (25, 22)), not on OreburghCity (26, 22) facing north (tile). + starts on (21, 23): stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (24, 22) (Oreburgh City (24, 22)), not on OreburghCity (26, 22) facing north (tile). + starts on (20, 23): stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (23, 22) (Oreburgh City (23, 22)), not on OreburghCity (26, 22) facing north (tile). + starts on (24, 23): stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (27, 22) (Oreburgh City (27, 22)), not on OreburghCity (26, 22) facing north (tile). + starts on (25, 23): stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (28, 22) (Oreburgh City (28, 22)), not on OreburghCity (26, 22) facing north (tile). + starts on (26, 23): stopped in 01.02b below_barry: 01.02b sim_mismatch: below_barry: ended at (29, 22) (Oreburgh City (29, 22)), not on OreburghCity (26, 22) facing north (tile). +PokemonBDSP::AutoStory - Fault sweep: 01.02b, wild battles on every grass pass: passed + Fault sweep 01.02b wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.03, battle opening at step start: passed + Fault sweep 01.03 battle opening at step start: 8 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.03, scene end pose: passed + Fault sweep 01.03 scene end pose: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.03, scene starts during the walk before it: passed + Fault sweep 01.03 scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.03, slow fade-in after every warp: passed + Fault sweep 01.03 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.03, start off its declared tile: passed + Fault sweep 01.03 start off its declared tile: 8 variants, 3 fail. + | 01.03 | | start off its declared tile | starts on (47, 23) | stopped in 01.03 above_the_mine: 01.03 sim_mismatch: above_the_mine: ended at (46, 58) (Oreburgh City (46, 58)), not on OreburghCity (46, 57) facing south (tile). | + | 01.03 | | start off its declared tile | starts on (47, 24) | stopped in 01.03 above_the_mine: 01.03 sim_mismatch: above_the_mine: ended at (46, 59) (Oreburgh City (46, 59)), not on OreburghCity (46, 39) facing south (tile). | + | 01.03 | | start off its declared tile | starts on (48, 21) | stopped in 01.03 above_the_mine: 01.03 sim_mismatch: above_the_mine: ended at (46, 59) (Oreburgh City (46, 59)), not on OreburghCity (46, 36) facing south (tile). | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 3 of 8 variants fail 01.03: + starts on (47, 23): stopped in 01.03 above_the_mine: 01.03 sim_mismatch: above_the_mine: ended at (46, 58) (Oreburgh City (46, 58)), not on OreburghCity (46, 57) facing south (tile). + starts on (47, 24): stopped in 01.03 above_the_mine: 01.03 sim_mismatch: above_the_mine: ended at (46, 59) (Oreburgh City (46, 59)), not on OreburghCity (46, 39) facing south (tile). + starts on (48, 21): stopped in 01.03 above_the_mine: 01.03 sim_mismatch: above_the_mine: ended at (46, 59) (Oreburgh City (46, 59)), not on OreburghCity (46, 36) facing south (tile). +PokemonBDSP::AutoStory - Fault sweep: 01.03, wild battles on every grass pass: passed + Fault sweep 01.03 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.04, battle opening at step start: passed + Fault sweep 01.04 battle opening at step start: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.04, scene end pose: passed + Fault sweep 01.04 scene end pose: 7 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.04, scene starts during the walk before it: passed + Fault sweep 01.04 scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.04, slow fade-in after every warp: passed + Fault sweep 01.04 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.04, start off its declared tile: passed + Fault sweep 01.04 start off its declared tile: 8 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.04, wild battles on every grass pass: passed + Fault sweep 01.04 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.05, battle opening at step start: passed + Fault sweep 01.05 battle opening at step start: 4 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.05, scene end pose: passed + Fault sweep 01.05 scene end pose: 8 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.05, scene starts during the walk before it: passed + Fault sweep 01.05 scene starts during the walk before it: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.05, slow fade-in after every warp: passed + Fault sweep 01.05 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.05, start off its declared tile: passed + Fault sweep 01.05 start off its declared tile: 9 variants, 6 fail. + | 01.05 | | start off its declared tile | starts on (4, 4) | stopped in 01.05 out_of_the_gym: 01.05 no_banner: no fade and no OreburghCity banner in 22 taps south | + | 01.05 | | start off its declared tile | starts on (3, 4) | stopped in 01.05 out_of_the_gym: 01.05 no_banner: no fade and no OreburghCity banner in 22 taps south | + | 01.05 | | start off its declared tile | starts on (2, 4) | stopped in 01.05 out_of_the_gym: 01.05 no_banner: no fade and no OreburghCity banner in 22 taps south | + | 01.05 | | start off its declared tile | starts on (6, 4) | stopped in 01.05 out_of_the_gym: 01.05 no_banner: no fade and no OreburghCity banner in 22 taps south | + | 01.05 | | start off its declared tile | starts on (7, 4) | stopped in 01.05 out_of_the_gym: 01.05 no_banner: no fade and no OreburghCity banner in 22 taps south | + | 01.05 | | start off its declared tile | starts on (8, 4) | stopped in 01.05 out_of_the_gym: 01.05 no_banner: no fade and no OreburghCity banner in 22 taps south | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 6 of 9 variants fail 01.05: + starts on (4, 4): stopped in 01.05 out_of_the_gym: 01.05 no_banner: no fade and no OreburghCity banner in 22 taps south + starts on (3, 4): stopped in 01.05 out_of_the_gym: 01.05 no_banner: no fade and no OreburghCity banner in 22 taps south + starts on (2, 4): stopped in 01.05 out_of_the_gym: 01.05 no_banner: no fade and no OreburghCity banner in 22 taps south + starts on (6, 4): stopped in 01.05 out_of_the_gym: 01.05 no_banner: no fade and no OreburghCity banner in 22 taps south + starts on (7, 4): stopped in 01.05 out_of_the_gym: 01.05 no_banner: no fade and no OreburghCity banner in 22 taps south + starts on (8, 4): stopped in 01.05 out_of_the_gym: 01.05 no_banner: no fade and no OreburghCity banner in 22 taps south +PokemonBDSP::AutoStory - Fault sweep: 01.05, wild battles on every grass pass: passed + Fault sweep 01.05 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.06, battle opening at step start: passed + Fault sweep 01.06 battle opening at step start: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.06, scene end pose: passed + Fault sweep 01.06 scene end pose: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.06, scene starts during the walk before it: passed + Fault sweep 01.06 scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.06, slow fade-in after every warp: passed + Fault sweep 01.06 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.06, start off its declared tile: passed + Fault sweep 01.06 start off its declared tile: 10 variants, 3 fail. + | 01.06 | | start off its declared tile | starts on (55, 11) | stopped in 01.06 up_jubilifes_road: 01.06 sim_failure: up jubilifes road: west 11 (to wall): still moving after 32 tiles, past the wall 11 tiles away at most: position unknown. | + | 01.06 | | start off its declared tile | starts on (55, 12) | stopped in 01.06 up_jubilifes_road: 01.06 sim_failure: up jubilifes road: too many plans. | + | 01.06 | | start off its declared tile | starts on (56, 9) | stopped in 01.06 up_jubilifes_road: 01.06 sim_failure: up jubilifes road: too many plans. | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 3 of 10 variants fail 01.06: + starts on (55, 11): stopped in 01.06 up_jubilifes_road: 01.06 sim_failure: up jubilifes road: west 11 (to wall): still moving after 32 tiles, past the wall 11 tiles away at most: position unknown. + starts on (55, 12): stopped in 01.06 up_jubilifes_road: 01.06 sim_failure: up jubilifes road: too many plans. + starts on (56, 9): stopped in 01.06 up_jubilifes_road: 01.06 sim_failure: up jubilifes road: too many plans. +PokemonBDSP::AutoStory - Fault sweep: 01.06, wild battles on every grass pass: passed + Fault sweep 01.06 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.07, battle opening at step start: passed + Fault sweep 01.07 battle opening at step start: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.07, scene end pose: passed + Fault sweep 01.07 scene end pose: 10 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.07, scene starts during the walk before it: passed + Fault sweep 01.07 scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.07, slow fade-in after every warp: passed + Fault sweep 01.07 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.07, start off its declared tile: passed + Fault sweep 01.07 start off its declared tile: 9 variants, 9 fail. + | 01.07 | | start off its declared tile | starts on (47, 7) | stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (47, 6) (Jubilife City (47, 6)), not on JubilifeCity (47, 7) facing north (tile). | + | 01.07 | | start off its declared tile | starts on (47, 6) | stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (47, 5) (Jubilife City (47, 5)), not on JubilifeCity (47, 7) facing north (tile). | + | 01.07 | | start off its declared tile | starts on (47, 5) | stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (47, 4) (Jubilife City (47, 4)), not on JubilifeCity (47, 7) facing north (tile). | + | 01.07 | | start off its declared tile | starts on (47, 9) | stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (47, 8) (Jubilife City (47, 8)), not on JubilifeCity (47, 7) facing north (tile). | + | 01.07 | | start off its declared tile | starts on (47, 10) | stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (47, 9) (Jubilife City (47, 9)), not on JubilifeCity (47, 7) facing north (tile). | + | 01.07 | | start off its declared tile | starts on (47, 11) | stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (47, 10) (Jubilife City (47, 10)), not on JubilifeCity (47, 7) facing north (tile). | + | 01.07 | | start off its declared tile | starts on (46, 8) | stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (46, 7) (Jubilife City (46, 7)), not on JubilifeCity (47, 7) facing north (tile). | + | 01.07 | | start off its declared tile | starts on (45, 8) | stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (45, 7) (Jubilife City (45, 7)), not on JubilifeCity (47, 7) facing north (tile). | + | 01.07 | | start off its declared tile | starts on (44, 8) | stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (44, 8) (Jubilife City (44, 8)), not on JubilifeCity (47, 7) facing north (tile). | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 9 of 9 variants fail 01.07: + starts on (47, 7): stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (47, 6) (Jubilife City (47, 6)), not on JubilifeCity (47, 7) facing north (tile). + starts on (47, 6): stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (47, 5) (Jubilife City (47, 5)), not on JubilifeCity (47, 7) facing north (tile). + starts on (47, 5): stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (47, 4) (Jubilife City (47, 4)), not on JubilifeCity (47, 7) facing north (tile). + starts on (47, 9): stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (47, 8) (Jubilife City (47, 8)), not on JubilifeCity (47, 7) facing north (tile). + starts on (47, 10): stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (47, 9) (Jubilife City (47, 9)), not on JubilifeCity (47, 7) facing north (tile). + starts on (47, 11): stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (47, 10) (Jubilife City (47, 10)), not on JubilifeCity (47, 7) facing north (tile). + starts on (46, 8): stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (46, 7) (Jubilife City (46, 7)), not on JubilifeCity (47, 7) facing north (tile). + starts on (45, 8): stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (45, 7) (Jubilife City (45, 7)), not on JubilifeCity (47, 7) facing north (tile). + starts on (44, 8): stopped in 01.07 rowans_trigger: 01.07 sim_mismatch: rowans_trigger: ended at (44, 8) (Jubilife City (44, 8)), not on JubilifeCity (47, 7) facing north (tile). +PokemonBDSP::AutoStory - Fault sweep: 01.07, wild battles on every grass pass: passed + Fault sweep 01.07 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.08, battle opening at step start: passed + Fault sweep 01.08 battle opening at step start: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.08, scene end pose: passed + Fault sweep 01.08 scene end pose: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.08, scene starts during the walk before it: passed + Fault sweep 01.08 scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.08, slow fade-in after every warp: passed + Fault sweep 01.08 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.08, start off its declared tile: passed + Fault sweep 01.08 start off its declared tile: 11 variants, 6 fail. + | 01.08 | | start off its declared tile | starts on (46, 4) | stopped in 01.08 west_to_the_wall: 01.08 sim_mismatch: west_to_the_wall: ended at (44, 4) (Jubilife City (44, 4)), not on JubilifeCity (44, 5) facing west (tile). | + | 01.08 | | start off its declared tile | starts on (46, 3) | stopped in 01.08 west_to_the_wall: 01.08 sim_mismatch: west_to_the_wall: ended at (44, 3) (Jubilife City (44, 3)), not on JubilifeCity (44, 5) facing west (tile). | + | 01.08 | | start off its declared tile | starts on (46, 2) | stopped in 01.08 west_to_the_wall: 01.08 sim_mismatch: west_to_the_wall: ended at (44, 2) (Jubilife City (44, 2)), not on JubilifeCity (44, 5) facing west (tile). | + | 01.08 | | start off its declared tile | starts on (46, 6) | stopped in 01.08 west_to_the_wall: 01.08 sim_mismatch: west_to_the_wall: ended at (44, 6) (Jubilife City (44, 6)), not on JubilifeCity (44, 5) facing west (tile). | + | 01.08 | | start off its declared tile | starts on (46, 7) | stopped in 01.08 west_to_the_wall: 01.08 sim_mismatch: west_to_the_wall: ended at (45, 7) (Jubilife City (45, 7)), not on JubilifeCity (44, 5) facing west (tile). | + | 01.08 | | start off its declared tile | starts on (46, 8) | stopped in 01.08 west_to_the_wall: 01.08 sim_mismatch: west_to_the_wall: ended at (41, 8) (Jubilife City (41, 8)), not on JubilifeCity (44, 5) facing west (tile). | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 6 of 11 variants fail 01.08: + starts on (46, 4): stopped in 01.08 west_to_the_wall: 01.08 sim_mismatch: west_to_the_wall: ended at (44, 4) (Jubilife City (44, 4)), not on JubilifeCity (44, 5) facing west (tile). + starts on (46, 3): stopped in 01.08 west_to_the_wall: 01.08 sim_mismatch: west_to_the_wall: ended at (44, 3) (Jubilife City (44, 3)), not on JubilifeCity (44, 5) facing west (tile). + starts on (46, 2): stopped in 01.08 west_to_the_wall: 01.08 sim_mismatch: west_to_the_wall: ended at (44, 2) (Jubilife City (44, 2)), not on JubilifeCity (44, 5) facing west (tile). + starts on (46, 6): stopped in 01.08 west_to_the_wall: 01.08 sim_mismatch: west_to_the_wall: ended at (44, 6) (Jubilife City (44, 6)), not on JubilifeCity (44, 5) facing west (tile). + starts on (46, 7): stopped in 01.08 west_to_the_wall: 01.08 sim_mismatch: west_to_the_wall: ended at (45, 7) (Jubilife City (45, 7)), not on JubilifeCity (44, 5) facing west (tile). + starts on (46, 8): stopped in 01.08 west_to_the_wall: 01.08 sim_mismatch: west_to_the_wall: ended at (41, 8) (Jubilife City (41, 8)), not on JubilifeCity (44, 5) facing west (tile). +PokemonBDSP::AutoStory - Fault sweep: 01.08, wild battles on every grass pass: passed + Fault sweep 01.08 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.09, battle opening at step start: passed + Fault sweep 01.09 battle opening at step start: 2 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.09, scene end pose: passed + Fault sweep 01.09 scene end pose: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.09, scene starts during the walk before it: passed + Fault sweep 01.09 scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.09, slow fade-in after every warp: passed + Fault sweep 01.09 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.09, start off its declared tile: passed + Fault sweep 01.09 start off its declared tile: 6 variants, 4 fail. + | 01.09 | | start off its declared tile | starts on (19, 48) | stopped in 01.09 west_of_the_rock: 01.09 sim_mismatch: west_of_the_rock: ended at (21, 42) (RavagedPath (21, 42)), not on RavagedPath (21, 43) facing east (tile). | + | 01.09 | | start off its declared tile | starts on (19, 47) | stopped in 01.09 west_of_the_rock: 01.09 sim_mismatch: west_of_the_rock: ended at (20, 41) (RavagedPath (20, 41)), not on RavagedPath (21, 43) facing east (tile). | + | 01.09 | | start off its declared tile | starts on (18, 50) | stopped in 01.09 west_of_the_rock: 01.09 sim_mismatch: west_of_the_rock: ended at (20, 43) (RavagedPath (20, 43)), not on RavagedPath (21, 43) facing east (tile). | + | 01.09 | | start off its declared tile | starts on (20, 50) | stopped in 01.09 west_of_the_rock: 01.09 sim_mismatch: west_of_the_rock: ended at (22, 43) (RavagedPath (22, 43)), not on RavagedPath (21, 43) facing east (tile). | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 4 of 6 variants fail 01.09: + starts on (19, 48): stopped in 01.09 west_of_the_rock: 01.09 sim_mismatch: west_of_the_rock: ended at (21, 42) (RavagedPath (21, 42)), not on RavagedPath (21, 43) facing east (tile). + starts on (19, 47): stopped in 01.09 west_of_the_rock: 01.09 sim_mismatch: west_of_the_rock: ended at (20, 41) (RavagedPath (20, 41)), not on RavagedPath (21, 43) facing east (tile). + starts on (18, 50): stopped in 01.09 west_of_the_rock: 01.09 sim_mismatch: west_of_the_rock: ended at (20, 43) (RavagedPath (20, 43)), not on RavagedPath (21, 43) facing east (tile). + starts on (20, 50): stopped in 01.09 west_of_the_rock: 01.09 sim_mismatch: west_of_the_rock: ended at (22, 43) (RavagedPath (22, 43)), not on RavagedPath (21, 43) facing east (tile). +PokemonBDSP::AutoStory - Fault sweep: 01.09, wild battles on every grass pass: passed + Fault sweep 01.09 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.10, battle opening at step start: passed + Fault sweep 01.10 battle opening at step start: 6 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.10, scene end pose: passed + Fault sweep 01.10 scene end pose: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.10, scene starts during the walk before it: passed + Fault sweep 01.10 scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.10, slow fade-in after every warp: passed + Fault sweep 01.10 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.10, start off its declared tile: passed + Fault sweep 01.10 start off its declared tile: 3 variants, 1 fail. + | 01.10 | | start off its declared tile | starts on (20, 29) | stopped in 01.10 line_1: 01.10 sim_failure: line 1: too many plans. | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 1 of 3 variants fail 01.10: + starts on (20, 29): stopped in 01.10 line_1: 01.10 sim_failure: line 1: too many plans. +PokemonBDSP::AutoStory - Fault sweep: 01.10, wild battles on every grass pass: passed + Fault sweep 01.10 wild battles on every grass pass: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.11, battle opening at step start: passed + Fault sweep 01.11 battle opening at step start: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.11, scene end pose: passed + Fault sweep 01.11 scene end pose: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.11, scene starts during the walk before it: passed + Fault sweep 01.11 scene starts during the walk before it: 0 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.11, slow fade-in after every warp: passed + Fault sweep 01.11 slow fade-in after every warp: 1 variants, 0 fail. +PokemonBDSP::AutoStory - Fault sweep: 01.11, start off its declared tile: passed + Fault sweep 01.11 start off its declared tile: 9 variants, 1 fail. + | 01.11 | | start off its declared tile | starts on (11, 30) | stopped in 01.11 west_to_the_field_edge: 01.11 sim_mismatch: west_to_the_field_edge: ended at (10, 30) (Floaroma Town (10, 30)), not on FloaromaTown (0, 27) (0, 28) (0, 29) facing west (set). | + Known failing until a first leg to a wall or funnel that pins the start (as 00.05's walk to the Center): 1 of 9 variants fail 01.11: + starts on (11, 30): stopped in 01.11 west_to_the_field_edge: 01.11 sim_mismatch: west_to_the_field_edge: ended at (10, 30) (Floaroma Town (10, 30)), not on FloaromaTown (0, 27) (0, 28) (0, 29) facing west (set). +PokemonBDSP::AutoStory - Fault sweep: 01.11, wild battles on every grass pass: passed + Fault sweep 01.11 wild battles on every grass pass: 1 variants, 0 fail. diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/sim_golden_rows.txt b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/sim_golden_rows.txt new file mode 100644 index 0000000000..6ef081f401 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/sim_golden_rows.txt @@ -0,0 +1,1412 @@ +# BDSP AutoStory rows on the story simulation, clean (PokemonBDSP_AutoStory_SimGolden_Tests.cpp) +00.00: completed + ends on PlayerHouse2F (4, 6) + stubbed intro + stubbed settings + looked for 0 fades, 0 banners, 0 doors, 0 tap steps +00.01: completed + ends on Verity Lakefront (17, 14) + stubbed save + stubbed azure_flute_if_there + looked for 6 fades, 0 banners, 6 doors, 0 tap steps + | below the flute: 2 legs planned + | [Route] below the flute: plan from PlayerHouse2F (4, 6): north 1 (to wall) to PlayerHouse2F (4, 5); east 3 (open) to PlayerHouse2F (7, 5) + | Leg 1/2: north 1 (to wall) to PlayerHouse2F (4, 5) + | [Sim] below the flute: north 1 (to wall): held north to blocked at (4, 5). + | [Route] below the flute: north 1 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] walk north: 1 tiles in 1290 ms to the wall. + | [Route] below the flute: north 1 (to wall): ended at PlayerHouse2F (4, 5) (walked). + | [Leg] {"checkpoint":"00.01","chunks":1,"dir":"north","end":[["PlayerHouse2F",4,5]],"end_kind":"wall","event":"below_the_flute","interrupts":[],"known":"wall","leg":1,"ms":1290,"planned_end":[["PlayerHouse2F",4,5]],"tiles":1} + | Leg 2/2: east 3 (open) to PlayerHouse2F (7, 5) + | [Route] Turning east. + | [Sim] below the flute: east 3 (open): 3 taps east, 3 moved, limit at (7, 5). + | [Route] below the flute: east 3 (open): ended at PlayerHouse2F (7, 5) (walked). + | [Leg] {"checkpoint":"00.01","chunks":3,"dir":"east","end":[["PlayerHouse2F",7,5]],"end_kind":"open","event":"below_the_flute","interrupts":[],"known":"dead_reckoned","leg":2,"moved":3,"ms":2400,"planned_end":[["PlayerHouse2F",7,5]],"tiles":3} + | [Route] below the flute: arrived at PlayerHouse2F (7, 5). + | [Route] Turning north. + | [Sim] onto_the_flute_tile: 1 taps north, 1 moved, limit at (7, 4). + | [00.01] onto_the_flute_tile: taps north moved 1 of 1 tiles. + | [Leg] {"checkpoint":"00.01","chunks":1,"dir":"north","end":[["PlayerHouse2F",7,4]],"end_kind":"tile","event":"onto_the_flute_tile","interrupts":[],"known":"counted","leg":1,"moved":1,"ms":800,"planned_end":[["PlayerHouse2F",7,4]],"tiles":1} + | [Route] Turning east. + | [Sim] onto_the_flute_tile: 1 taps east, 1 moved, limit at (8, 4). + | [00.01] onto_the_flute_tile: taps east moved 1 of 1 tiles. + | [Leg] {"checkpoint":"00.01","chunks":1,"dir":"east","end":[["PlayerHouse2F",8,4]],"end_kind":"tile","event":"onto_the_flute_tile","interrupts":[],"known":"counted","leg":2,"moved":1,"ms":800,"planned_end":[["PlayerHouse2F",8,4]],"tiles":1} + | [00.01] down_the_stairs: east through the door (timeout 4500 ms, dark from 348 ms): black fade. + | mom calls: no line within 15 s; the step before played it. + | above the door: 3 legs planned + | [Route] above the door: plan from PlayerHouse1F (10, 3), PlayerHouse1F (10, 4): south 7 (to wall) to PlayerHouse1F (10, 10); north 1 (open) to PlayerHouse1F (10, 9); west 4 (open) to PlayerHouse1F (6, 9) + | Leg 1/3: south 7 (to wall) to PlayerHouse1F (10, 10) + | [Sim] above the door: south 7 (to wall): held south to blocked at (10, 10). + | [Route] above the door: south 7 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] walk south: 6 tiles in 2730 ms to the wall. + | [Route] above the door: south 7 (to wall): ended at PlayerHouse1F (10, 10) (walked). + | [Leg] {"checkpoint":"00.01","chunks":7,"dir":"south","end":[["PlayerHouse1F",10,10]],"end_kind":"wall","event":"above_the_door","interrupts":[],"known":"wall","leg":1,"ms":2730,"planned_end":[["PlayerHouse1F",10,10]],"tiles":7} + | Leg 2/3: north 1 (open) to PlayerHouse1F (10, 9) + | [Route] Turning north. + | [Sim] above the door: north 1 (open): 1 taps north, 1 moved, limit at (10, 9). + | [Route] above the door: north 1 (open): ended at PlayerHouse1F (10, 9) (walked). + | [Leg] {"checkpoint":"00.01","chunks":1,"dir":"north","end":[["PlayerHouse1F",10,9]],"end_kind":"open","event":"above_the_door","interrupts":[],"known":"dead_reckoned","leg":2,"moved":1,"ms":800,"planned_end":[["PlayerHouse1F",10,9]],"tiles":1} + | Leg 3/3: west 4 (open) to PlayerHouse1F (6, 9) + | [Route] Turning west. + | [Sim] above the door: west 4 (open): 4 taps west, 4 moved, limit at (6, 9). + | [Route] above the door: west 4 (open): ended at PlayerHouse1F (6, 9) (walked). + | [Leg] {"checkpoint":"00.01","chunks":4,"dir":"west","end":[["PlayerHouse1F",6,9]],"end_kind":"open","event":"above_the_door","interrupts":[],"known":"dead_reckoned","leg":3,"moved":4,"ms":3200,"planned_end":[["PlayerHouse1F",6,9]],"tiles":4} + | [Route] above the door: arrived at PlayerHouse1F (6, 9). + | [00.01] out_of_the_house: south through the door (timeout 4500 ms, dark from 416 ms): black fade. + | short of barrys door: 3 legs planned + | [Route] short of barrys door: plan from Twinleaf Town (20, 22): west 7 (open) to Twinleaf Town (13, 22); north 10 (to wall) to Twinleaf Town (13, 12); west 3 (open) to Twinleaf Town (10, 12) + | Leg 1/3: west 7 (open) to Twinleaf Town (13, 22) + | [Route] Turning west. + | [Sim] short of barrys door: west 7 (open): 7 taps west, 7 moved, limit at (45, 86). + | [Route] short of barrys door: west 7 (open): ended at Twinleaf Town (13, 22) (walked). + | [Leg] {"checkpoint":"00.01","chunks":7,"dir":"west","end":[["Twinleaf Town",13,22]],"end_kind":"open","event":"short_of_barrys_door","interrupts":[],"known":"dead_reckoned","leg":1,"moved":7,"ms":5600,"planned_end":[["Twinleaf Town",13,22]],"tiles":7} + | Leg 2/3: north 10 (to wall) to Twinleaf Town (13, 12) + | [Route] Turning north. + | [Sim] short of barrys door: north 10 (to wall): held north to blocked at (45, 76). + | [Speed] walk north: 10 tiles in 3450 ms to the wall. + | [Route] short of barrys door: north 10 (to wall): ended at Twinleaf Town (13, 12) (walked). + | [Leg] {"checkpoint":"00.01","chunks":10,"dir":"north","end":[["Twinleaf Town",13,12]],"end_kind":"wall","event":"short_of_barrys_door","interrupts":[],"known":"wall","leg":2,"ms":3450,"planned_end":[["Twinleaf Town",13,12]],"tiles":10} + | Leg 3/3: west 3 (open) to Twinleaf Town (10, 12) + | [Route] Turning west. + | [Sim] short of barrys door: west 3 (open): 3 taps west, 3 moved, limit at (42, 76). + | [Route] short of barrys door: west 3 (open): ended at Twinleaf Town (10, 12) (walked). + | [Leg] {"checkpoint":"00.01","chunks":3,"dir":"west","end":[["Twinleaf Town",10,12]],"end_kind":"open","event":"short_of_barrys_door","interrupts":[],"known":"dead_reckoned","leg":3,"moved":3,"ms":2400,"planned_end":[["Twinleaf Town",10,12]],"tiles":3} + | [Route] short of barrys door: arrived at Twinleaf Town (10, 12). + | [Route] Turning west. + | [Sim] barrys_door: 1 taps west, 1 moved, dialog at (41, 76). + | [00.01] barrys_door: a step west, dialog. + | barry goes home: no line within 15 s; the step before played it. + | [00.01] into_barrys_house: north through the door (timeout 4500 ms, dark from 620 ms): black fade. + | [Route] Turning north. + | [Sim] off_barrys_mat: 1 taps north, 1 moved, limit at (6, 9). + | [00.01] off_barrys_mat: taps north moved 1 of 1 tiles. + | [Leg] {"checkpoint":"00.01","chunks":1,"dir":"north","end":[["RivalHouse1F",6,9]],"end_kind":"tile","event":"off_barrys_mat","interrupts":[],"known":"counted","leg":1,"moved":1,"ms":800,"planned_end":[["RivalHouse1F",6,9]],"tiles":1} + | below barrys stairs: 2 legs planned + | [Route] below barrys stairs: plan from RivalHouse1F (6, 9): west 4 (to wall) to RivalHouse1F (2, 9); north 6 (to wall) to RivalHouse1F (2, 3) + | Leg 1/2: west 4 (to wall) to RivalHouse1F (2, 9) + | [Sim] below barrys stairs: west 4 (to wall): held west to blocked at (2, 9). + | [Route] below barrys stairs: west 4 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] walk west: 4 tiles in 1850 ms to the wall. + | [Route] below barrys stairs: west 4 (to wall): ended at RivalHouse1F (2, 9) (walked). + | [Leg] {"checkpoint":"00.01","chunks":4,"dir":"west","end":[["RivalHouse1F",2,9]],"end_kind":"wall","event":"below_barrys_stairs","interrupts":[],"known":"wall","leg":1,"ms":1850,"planned_end":[["RivalHouse1F",2,9]],"tiles":4} + | Leg 2/2: north 6 (to wall) to RivalHouse1F (2, 3) + | [Route] Turning north. + | [Sim] below barrys stairs: north 6 (to wall): held north to blocked at (2, 3). + | [Speed] walk north: 6 tiles in 2490 ms to the wall. + | [Route] below barrys stairs: north 6 (to wall): ended at RivalHouse1F (2, 3) (walked). + | [Leg] {"checkpoint":"00.01","chunks":6,"dir":"north","end":[["RivalHouse1F",2,3]],"end_kind":"wall","event":"below_barrys_stairs","interrupts":[],"known":"wall","leg":2,"ms":2490,"planned_end":[["RivalHouse1F",2,3]],"tiles":6} + | [Route] below barrys stairs: arrived at RivalHouse1F (2, 3). + | [00.01] up_barrys_stairs: east through the door (timeout 4500 ms, dark from 348 ms): black fade. + | barry runs to the lake: no line within 15 s; the step before played it. + | [Route] Turning east. + | [Sim] off_barrys_west_wall: 1 taps east, 1 moved, limit at (4, 5). + | [00.01] off_barrys_west_wall: taps east moved 1 of 1 tiles. + | [Leg] {"checkpoint":"00.01","chunks":1,"dir":"east","end":[["RivalHouse2F",4,5]],"end_kind":"tile","event":"off_barrys_west_wall","interrupts":[],"known":"counted","leg":1,"moved":1,"ms":800,"planned_end":[["RivalHouse2F",4,5]],"tiles":1} + | [Leg] {"checkpoint":"00.01","chunks":0,"dir":"north","end":[],"end_kind":"wall","event":"up_to_barrys_back_wall","interrupts":[],"known":"wall","leg":1,"ms":0,"planned_end":[],"tiles":3} + | [00.01] down_barrys_stairs: west through the door (timeout 4500 ms, dark from 348 ms): black fade. + | above barrys door: 3 legs planned + | [Route] above barrys door: plan from RivalHouse1F (2, 3): south 7 (to wall) to RivalHouse1F (2, 10); north 1 (open) to RivalHouse1F (2, 9); east 4 (open) to RivalHouse1F (6, 9) + | Leg 1/3: south 7 (to wall) to RivalHouse1F (2, 10) + | [Sim] above barrys door: south 7 (to wall): held south to blocked at (2, 10). + | [Route] above barrys door: south 7 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] walk south: 7 tiles in 2730 ms to the wall. + | [Route] above barrys door: south 7 (to wall): ended at RivalHouse1F (2, 10) (walked). + | [Leg] {"checkpoint":"00.01","chunks":7,"dir":"south","end":[["RivalHouse1F",2,10]],"end_kind":"wall","event":"above_barrys_door","interrupts":[],"known":"wall","leg":1,"ms":2730,"planned_end":[["RivalHouse1F",2,10]],"tiles":7} + | Leg 2/3: north 1 (open) to RivalHouse1F (2, 9) + | [Route] Turning north. + | [Sim] above barrys door: north 1 (open): 1 taps north, 1 moved, limit at (2, 9). + | [Route] above barrys door: north 1 (open): ended at RivalHouse1F (2, 9) (walked). + | [Leg] {"checkpoint":"00.01","chunks":1,"dir":"north","end":[["RivalHouse1F",2,9]],"end_kind":"open","event":"above_barrys_door","interrupts":[],"known":"dead_reckoned","leg":2,"moved":1,"ms":800,"planned_end":[["RivalHouse1F",2,9]],"tiles":1} + | Leg 3/3: east 4 (open) to RivalHouse1F (6, 9) + | [Route] Turning east. + | [Sim] above barrys door: east 4 (open): 4 taps east, 4 moved, limit at (6, 9). + | [Route] above barrys door: east 4 (open): ended at RivalHouse1F (6, 9) (walked). + | [Leg] {"checkpoint":"00.01","chunks":4,"dir":"east","end":[["RivalHouse1F",6,9]],"end_kind":"open","event":"above_barrys_door","interrupts":[],"known":"dead_reckoned","leg":3,"moved":4,"ms":3200,"planned_end":[["RivalHouse1F",6,9]],"tiles":4} + | [Route] above barrys door: arrived at RivalHouse1F (6, 9). + | [00.01] out_of_barrys_house: south through the door (timeout 4500 ms, dark from 416 ms): black fade. + | [Route] Turning east. + | [Sim] below_barrys_warning: 6 taps east, 6 moved, limit at (47, 76). + | [00.01] below_barrys_warning: taps east moved 6 of 6 tiles. + | [Leg] {"checkpoint":"00.01","chunks":6,"dir":"east","end":[["Twinleaf Town",15,12]],"end_kind":"tile","event":"below_barrys_warning","interrupts":[],"known":"counted","leg":1,"moved":6,"ms":4800,"planned_end":[["Twinleaf Town",15,12]],"tiles":6} + | [Route] Turning north. + | [Sim] below_barrys_warning: 18 taps north, 18 moved, limit at (47, 58). + | [00.01] below_barrys_warning: taps north moved 18 of 18 tiles. + | [Leg] {"checkpoint":"00.01","chunks":18,"dir":"north","end":[["Route 201",15,19]],"end_kind":"tile","event":"below_barrys_warning","interrupts":[],"known":"counted","leg":2,"moved":18,"ms":14400,"planned_end":[["Route 201",15,19]],"tiles":18} + | [Route] Turning north. + | [Sim] barrys_warning: 1 taps north, 1 moved, dialog at (47, 57). + | [00.01] barrys_warning: a step north, dialog. + | [Route] Turning west. + | [Sim] away_from_barry: 1 taps west, 1 moved, limit at (46, 57). + | [00.01] away_from_barry: taps west moved 1 of 1 tiles. + | [Leg] {"checkpoint":"00.01","chunks":1,"dir":"west","end":[["Route 201",14,18]],"end_kind":"tile","event":"away_from_barry","interrupts":[],"known":"counted","leg":1,"moved":1,"ms":800,"planned_end":[["Route 201",14,18]],"tiles":1} + | [Route] Turning north. + | [Sim] away_from_barry: 2 taps north, 2 moved, limit at (46, 55). + | [00.01] away_from_barry: taps north moved 2 of 2 tiles. + | [Leg] {"checkpoint":"00.01","chunks":2,"dir":"north","end":[["Route 201",14,16]],"end_kind":"tile","event":"away_from_barry","interrupts":[],"known":"counted","leg":2,"moved":2,"ms":1600,"planned_end":[["Route 201",14,16]],"tiles":2} + | below the lake entrance: 3 legs planned + | [Route] below the lake entrance: plan from Route 201 (14, 16): west 28 (to wall) to Verity Lakefront (18, 23); north 9 (to wall) to Verity Lakefront (18, 14); west 1 (open) to Verity Lakefront (17, 14) + | Leg 1/3: west 28 (to wall) to Verity Lakefront (18, 23) + | [Sim] below the lake entrance: west 28 (to wall): held west to blocked at (18, 55). + | [Route] below the lake entrance: west 28 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] walk west: 28 tiles in 6650 ms to the wall. + | [Route] below the lake entrance: west 28 (to wall): no banner read for Verity Lakefront; going on. + | [Route] below the lake entrance: west 28 (to wall): ended at Verity Lakefront (18, 23) (walked). + | [Leg] {"checkpoint":"00.01","chunks":28,"dir":"west","end":[["Verity Lakefront",18,23]],"end_kind":"wall","event":"below_the_lake_entrance","interrupts":[],"known":"wall","leg":1,"ms":6650,"planned_end":[["Verity Lakefront",18,23]],"tiles":28} + | Leg 2/3: north 9 (to wall) to Verity Lakefront (18, 14) + | [Route] Turning north. + | [Sim] below the lake entrance: north 9 (to wall): held north to blocked at (18, 46). + | [Speed] walk north: 9 tiles in 3210 ms to the wall. + | [Route] below the lake entrance: north 9 (to wall): ended at Verity Lakefront (18, 14) (walked). + | [Leg] {"checkpoint":"00.01","chunks":9,"dir":"north","end":[["Verity Lakefront",18,14]],"end_kind":"wall","event":"below_the_lake_entrance","interrupts":[],"known":"wall","leg":2,"ms":3210,"planned_end":[["Verity Lakefront",18,14]],"tiles":9} + | Leg 3/3: west 1 (open) to Verity Lakefront (17, 14) + | [Route] Turning west. + | [Sim] below the lake entrance: west 1 (open): 1 taps west, 1 moved, limit at (17, 46). + | [Route] below the lake entrance: west 1 (open): ended at Verity Lakefront (17, 14) (walked). + | [Leg] {"checkpoint":"00.01","chunks":1,"dir":"west","end":[["Verity Lakefront",17,14]],"end_kind":"open","event":"below_the_lake_entrance","interrupts":[],"known":"dead_reckoned","leg":3,"moved":1,"ms":800,"planned_end":[["Verity Lakefront",17,14]],"tiles":1} + | [Route] below the lake entrance: no banner read for Verity Lakefront; going on. + | [Route] below the lake entrance: arrived at Verity Lakefront (17, 14). +00.02: completed + ends on Verity Lakefront (17, 14) + stubbed save + stubbed starter_briefcase + stubbed choose_starter + stubbed starly + looked for 0 fades, 0 banners, 0 doors, 0 tap steps + | to the lake entrance: 1 legs planned + | [Route] to the lake entrance: plan from Verity Lakefront (17, 14): north 1 (open) to Verity Lakefront (17, 13) + | Leg 1/1: north 1 (open) to Verity Lakefront (17, 13) + | [Route] Turning north. + | [Sim] to the lake entrance: north 1 (open): 1 taps north, 1 moved, limit at (17, 45). + | [Route] to the lake entrance: north 1 (open): ended at Verity Lakefront (17, 13) (walked). + | [Leg] {"checkpoint":"00.02","chunks":1,"dir":"north","end":[["Verity Lakefront",17,13]],"end_kind":"open","event":"to_the_lake_entrance","interrupts":[],"known":"dead_reckoned","leg":1,"moved":1,"ms":800,"planned_end":[["Verity Lakefront",17,13]],"tiles":1} + | [Route] to the lake entrance: arrived at Verity Lakefront (17, 13). + | [Route] Turning north. + | [Sim] lake_entrance: 1 taps north, 1 moved, dialog at (17, 44). + | [00.02] lake_entrance: a step north, dialog. + | after starly: no line within 15 s; the step before played it. +00.03: completed + ends on RowansLab (7, 6) + stubbed save + no end to check after 00.03 into_rowans_scene + no end to check after 00.03 into_dawns_scene + looked for 1 fades, 0 banners, 1 doors, 0 tap steps + | into rowans scene: 1 legs planned + | [Route] into rowans scene: plan from Verity Lakefront (17, 14), Verity Lakefront (17, 15): south 7 (to wall) to Verity Lakefront (17, 21) + | Leg 1/1: south 7 (to wall) to Verity Lakefront (17, 21) + | [Sim] into rowans scene: south 7 (to wall): held south to blocked at (17, 53). + | [Route] into rowans scene: south 7 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] walk south: 6 tiles in 2730 ms to the wall. + | [Route] into rowans scene: south 7 (to wall): ended at Verity Lakefront (17, 21) (walked). + | [Leg] {"checkpoint":"00.03","chunks":7,"dir":"south","end":[["Verity Lakefront",17,21]],"end_kind":"wall","event":"into_rowans_scene","interrupts":[],"known":"wall","leg":1,"ms":2730,"planned_end":[["Verity Lakefront",17,21]],"tiles":7} + | [Route] into rowans scene: arrived at Verity Lakefront (17, 21). + | [Sim] into rowans scene: held east to dialog at (37, 53). + | [00.03] into_rowans_scene: ran east to a dialogue: 20 moved chunks, 22 tiles at most, dialog, 0 wild battle(s). + | [Leg] {"checkpoint":"00.03","chunks":20,"dir":"east","end":[],"end_kind":"open","event":"into_rowans_scene","interrupts":[],"known":"dialogue","leg":2,"ms":4250,"planned_end":[],"tiles":22} + | [00.03] out_of_the_house_again: south through the door (timeout 4500 ms, dark from 467 ms): black fade. + | into dawns scene: 7 legs planned + | [Route] into dawns scene: plan from Twinleaf Town (20, 22): west 3 (open) to Twinleaf Town (17, 22); north 34 (to wall) to Route 201 (17, 13); east 40 (to wall) to Route 201 (57, 13); west 7 (open) to Route 201 (50, 13); north 10 (to wall) to Route 201 (50, 3); east 13 (to wall) to Route 201 (63, 3); south 2 (open) to Route 201 (63, 5) + | Leg 1/7: west 3 (open) to Twinleaf Town (17, 22) + | [Route] Turning west. + | [Sim] into dawns scene: west 3 (open): 3 taps west, 3 moved, limit at (49, 86). + | [Route] into dawns scene: west 3 (open): ended at Twinleaf Town (17, 22) (walked). + | [Leg] {"checkpoint":"00.03","chunks":3,"dir":"west","end":[["Twinleaf Town",17,22]],"end_kind":"open","event":"into_dawns_scene","interrupts":[],"known":"dead_reckoned","leg":1,"moved":3,"ms":2400,"planned_end":[["Twinleaf Town",17,22]],"tiles":3} + | Leg 2/7: north 34 (to wall) to Route 201 (17, 13) + | [Route] Turning north. + | [Sim] into dawns scene: north 34 (to wall): held north to blocked at (49, 52). + | [Speed] run north: 34 tiles in 6150 ms to the wall. + | [Route] into dawns scene: north 34 (to wall): no banner read for Route 201; going on. + | [Route] into dawns scene: north 34 (to wall): ended at Route 201 (17, 13) (walked). + | [Leg] {"checkpoint":"00.03","chunks":34,"dir":"north","end":[["Route 201",17,13]],"end_kind":"wall","event":"into_dawns_scene","interrupts":[],"known":"wall","leg":2,"ms":6150,"planned_end":[["Route 201",17,13]],"tiles":34} + | Leg 3/7: east 40 (to wall) to Route 201 (57, 13) + | [Route] Turning east. + | [Sim] into dawns scene: east 40 (to wall): held east to blocked at (89, 52). + | [Speed] run east: 40 tiles in 5050 ms to the wall. + | [Route] into dawns scene: east 40 (to wall): ended at Route 201 (57, 13) (walked). + | [Leg] {"checkpoint":"00.03","chunks":40,"dir":"east","end":[["Route 201",57,13]],"end_kind":"wall","event":"into_dawns_scene","interrupts":[],"known":"wall","leg":3,"ms":5050,"planned_end":[["Route 201",57,13]],"tiles":40} + | Leg 4/7: west 7 (open) to Route 201 (50, 13) + | [Route] Turning west. + | [Sim] into dawns scene: west 7 (open): 7 taps west, 7 moved, limit at (82, 52). + | [Route] into dawns scene: west 7 (open): ended at Route 201 (50, 13) (walked). + | [Leg] {"checkpoint":"00.03","chunks":7,"dir":"west","end":[["Route 201",50,13]],"end_kind":"open","event":"into_dawns_scene","interrupts":[],"known":"dead_reckoned","leg":4,"moved":7,"ms":5600,"planned_end":[["Route 201",50,13]],"tiles":7} + | Leg 5/7: north 10 (to wall) to Route 201 (50, 3) + | [Route] Turning north. + | [Sim] into dawns scene: north 10 (to wall): held north to blocked at (82, 42). + | [Speed] run north: 10 tiles in 2550 ms to the wall. + | [Route] into dawns scene: north 10 (to wall): ended at Route 201 (50, 3) (walked). + | [Leg] {"checkpoint":"00.03","chunks":10,"dir":"north","end":[["Route 201",50,3]],"end_kind":"wall","event":"into_dawns_scene","interrupts":[],"known":"wall","leg":5,"ms":2550,"planned_end":[["Route 201",50,3]],"tiles":10} + | Leg 6/7: east 13 (to wall) to Route 201 (63, 3) + | [Route] Turning east. + | [Sim] into dawns scene: east 13 (to wall): held east to blocked at (95, 42). + | [Speed] run east: 13 tiles in 2350 ms to the wall. + | [Route] into dawns scene: east 13 (to wall): ended at Route 201 (63, 3) (walked). + | [Leg] {"checkpoint":"00.03","chunks":13,"dir":"east","end":[["Route 201",63,3]],"end_kind":"wall","event":"into_dawns_scene","interrupts":[],"known":"wall","leg":6,"ms":2350,"planned_end":[["Route 201",63,3]],"tiles":13} + | Leg 7/7: south 2 (open) to Route 201 (63, 5) + | [Route] Turning south. + | [Sim] into dawns scene: south 2 (open): 2 taps south, 2 moved, limit at (95, 44). + | [Route] into dawns scene: south 2 (open): ended at Route 201 (63, 5) (walked). + | [Leg] {"checkpoint":"00.03","chunks":2,"dir":"south","end":[["Route 201",63,5]],"end_kind":"open","event":"into_dawns_scene","interrupts":[],"known":"dead_reckoned","leg":7,"moved":2,"ms":1600,"planned_end":[["Route 201",63,5]],"tiles":2} + | [Route] into dawns scene: no banner read for Route 201; going on. + | [Route] into dawns scene: arrived at Route 201 (63, 5). + | [Sim] into dawns scene: held east to dialog at (100, 44). + | [00.03] into_dawns_scene: ran east to a dialogue: 5 moved chunks, 8 tiles at most, dialog, 0 wild battle(s). + | [Leg] {"checkpoint":"00.03","chunks":5,"dir":"east","end":[],"end_kind":"open","event":"into_dawns_scene","interrupts":[],"known":"dialogue","leg":8,"ms":750,"planned_end":[],"tiles":8} +00.04: completed + ends on Route 202 (21, 27) + stubbed save + stubbed catch_tutorial + stubbed catch_pokemon + looked for 2 fades, 1 banners, 2 doors, 0 tap steps + | [00.04] out_of_the_lab: south through the door (timeout 4500 ms, dark from 1360 ms): black fade. + | onto the path: 3 legs planned + | [Route] onto the path: plan from Sandgem Town (26, 11), Sandgem Town (27, 11), Sandgem Town (28, 11), Sandgem Town (26, 12), Sandgem Town (27, 12), Sandgem Town (28, 12): east 3 (to wall) to Sandgem Town (29, 11), Sandgem Town (29, 12); north 1 (to wall) to Sandgem Town (29, 11); south 1 (open) to Sandgem Town (29, 12) + | Leg 1/3: east 3 (to wall) to Sandgem Town (29, 11), Sandgem Town (29, 12) + | [Sim] onto the path: east 3 (to wall): held east to blocked at (125, 43). + | [Route] onto the path: east 3 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run east: 1 tiles in 1350 ms to the wall. + | [Route] onto the path: east 3 (to wall): ended at Sandgem Town (29, 11), Sandgem Town (29, 12) (walked). + | [Leg] {"checkpoint":"00.04","chunks":3,"dir":"east","end":[["Sandgem Town",29,11],["Sandgem Town",29,12]],"end_kind":"wall","event":"onto_the_path","interrupts":[],"known":"wall","leg":1,"ms":1350,"planned_end":[["Sandgem Town",29,11],["Sandgem Town",29,12]],"tiles":3} + | Leg 2/3: north 1 (to wall) to Sandgem Town (29, 11) + | [Route] Turning north. + | [Sim] onto the path: north 1 (to wall): held north to blocked at (125, 43). + | [Speed] run north: 0 tiles in 1050 ms to the wall. + | [Route] onto the path: north 1 (to wall): ended at Sandgem Town (29, 11) (walked). + | [Leg] {"checkpoint":"00.04","chunks":0,"dir":"north","end":[["Sandgem Town",29,11]],"end_kind":"wall","event":"onto_the_path","interrupts":[],"known":"wall","leg":2,"ms":1050,"planned_end":[["Sandgem Town",29,11]],"tiles":1} + | Leg 3/3: south 1 (open) to Sandgem Town (29, 12) + | [Route] Turning south. + | [Sim] onto the path: south 1 (open): 1 taps south, 1 moved, limit at (125, 44). + | [Route] onto the path: south 1 (open): ended at Sandgem Town (29, 12) (walked). + | [Leg] {"checkpoint":"00.04","chunks":1,"dir":"south","end":[["Sandgem Town",29,12]],"end_kind":"open","event":"onto_the_path","interrupts":[],"known":"dead_reckoned","leg":3,"moved":1,"ms":800,"planned_end":[["Sandgem Town",29,12]],"tiles":1} + | [Route] onto the path: arrived at Sandgem Town (29, 12). + | [Route] Turning west. + | [Route] Turning north. + | [Sim] to_the_signs_row: 1 taps north, 1 moved, limit at (92, 43). + | [00.04] to_the_signs_row: taps north moved 1 of 1 tiles. + | [Leg] {"checkpoint":"00.04","chunks":1,"dir":"north","end":[["Route 201",57,4],["Route 201",58,4],["Route 201",59,4],["Route 201",60,4],["Route 201",61,4],["Route 201",62,4],["Route 201",63,4]],"end_kind":"tile","event":"to_the_signs_row","interrupts":[],"known":"counted","leg":1,"moved":1,"ms":800,"planned_end":[["Route 201",57,4],["Route 201",58,4],["Route 201",59,4],["Route 201",60,4],["Route 201",61,4],["Route 201",62,4],["Route 201",63,4]],"tiles":1} + | to ledge column: 3 legs planned + | [Route] to ledge column: plan from Route 201 (57, 4), Route 201 (58, 4), Route 201 (59, 4), Route 201 (60, 4), Route 201 (61, 4), Route 201 (62, 4), Route 201 (63, 4): west 7 (to wall) to Route 201 (56, 4); south 1 (open) to Route 201 (56, 5); west 1 (open) to Route 201 (55, 5) + | Leg 1/3: west 7 (to wall) to Route 201 (56, 4) + | [Sim] to ledge column: west 7 (to wall): held west to blocked at (88, 43). + | [Route] to ledge column: west 7 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run west: 1 tiles in 1450 ms to the wall. + | [Route] to ledge column: west 7 (to wall): ended at Route 201 (56, 4) (walked). + | [Leg] {"checkpoint":"00.04","chunks":4,"dir":"west","end":[["Route 201",56,4]],"end_kind":"wall","event":"to_ledge_column","interrupts":[],"known":"wall","leg":1,"ms":1450,"planned_end":[["Route 201",56,4]],"tiles":7} + | Leg 2/3: south 1 (open) to Route 201 (56, 5) + | [Route] Turning south. + | [Sim] to ledge column: south 1 (open): 1 taps south, 1 moved, limit at (88, 44). + | [Route] to ledge column: south 1 (open): ended at Route 201 (56, 5) (walked). + | [Leg] {"checkpoint":"00.04","chunks":1,"dir":"south","end":[["Route 201",56,5]],"end_kind":"open","event":"to_ledge_column","interrupts":[],"known":"dead_reckoned","leg":2,"moved":1,"ms":800,"planned_end":[["Route 201",56,5]],"tiles":1} + | Leg 3/3: west 1 (open) to Route 201 (55, 5) + | [Route] Turning west. + | [Sim] to ledge column: west 1 (open): 1 taps west, 1 moved, limit at (87, 44). + | [Route] to ledge column: west 1 (open): ended at Route 201 (55, 5) (walked). + | [Leg] {"checkpoint":"00.04","chunks":1,"dir":"west","end":[["Route 201",55,5]],"end_kind":"open","event":"to_ledge_column","interrupts":[],"known":"dead_reckoned","leg":3,"moved":1,"ms":800,"planned_end":[["Route 201",55,5]],"tiles":1} + | [Route] to ledge column: arrived at Route 201 (55, 5). + | [Route] Turning south. + | [Sim] over_the_ledge: 8 taps south, 8 moved, limit at (87, 53). + | [00.04] over_the_ledge: taps south moved 8 of 8 tiles. + | [Leg] {"checkpoint":"00.04","chunks":8,"dir":"south","end":[["Route 201",55,13]],"end_kind":"tile","event":"over_the_ledge","interrupts":[],"known":"counted","leg":1,"moved":8,"ms":6400,"planned_end":[["Route 201",55,13]],"tiles":8} + | along route 201 road: 4 legs planned + | [Route] along route 201 road: plan from Route 201 (55, 14): west 16 (open) to Route 201 (39, 14); north 3 (open) to Route 201 (39, 11); west 24 (open) to Route 201 (15, 11); south 2 (open) to Route 201 (15, 14) + | Leg 1/4: west 16 (open) to Route 201 (39, 14) + | [Route] Turning west. + | [Sim] along route 201 road: west 16 (open): 16 taps west, 16 moved, limit at (71, 53). + | [Route] along route 201 road: west 16 (open): ended at Route 201 (39, 14) (walked). + | [Leg] {"checkpoint":"00.04","chunks":16,"dir":"west","end":[["Route 201",39,14]],"end_kind":"open","event":"along_route_201_road","interrupts":[],"known":"dead_reckoned","leg":1,"moved":16,"ms":12800,"planned_end":[["Route 201",39,14]],"tiles":16} + | Leg 2/4: north 3 (open) to Route 201 (39, 11) + | [Route] Turning north. + | [Sim] along route 201 road: north 3 (open): 3 taps north, 3 moved, limit at (71, 50). + | [Route] along route 201 road: north 3 (open): ended at Route 201 (39, 11) (walked). + | [Leg] {"checkpoint":"00.04","chunks":3,"dir":"north","end":[["Route 201",39,11]],"end_kind":"open","event":"along_route_201_road","interrupts":[],"known":"dead_reckoned","leg":2,"moved":3,"ms":2400,"planned_end":[["Route 201",39,11]],"tiles":3} + | Leg 3/4: west 24 (open) to Route 201 (15, 11) + | [Route] Turning west. + | [Sim] along route 201 road: west 24 (open): 24 taps west, 24 moved, limit at (47, 50). + | [Route] along route 201 road: west 24 (open): ended at Route 201 (15, 11) (walked). + | [Leg] {"checkpoint":"00.04","chunks":24,"dir":"west","end":[["Route 201",15,11]],"end_kind":"open","event":"along_route_201_road","interrupts":[],"known":"dead_reckoned","leg":3,"moved":24,"ms":19200,"planned_end":[["Route 201",15,11]],"tiles":24} + | Leg 4/4: south 2 (open) to Route 201 (15, 14) + | [Route] Turning south. + | [Sim] along route 201 road: south 2 (open): 2 taps south, 2 moved, limit at (47, 53). + | [Route] along route 201 road: south 2 (open): ended at Route 201 (15, 14) (walked). + | [Leg] {"checkpoint":"00.04","chunks":2,"dir":"south","end":[["Route 201",15,14]],"end_kind":"open","event":"along_route_201_road","interrupts":[],"known":"dead_reckoned","leg":4,"moved":2,"ms":1600,"planned_end":[["Route 201",15,14]],"tiles":2} + | [Route] along route 201 road: arrived at Route 201 (15, 14). + | into twinleaf: 2 legs planned + | [Route] into twinleaf: plan from Route 201 (15, 14): south 37 (to wall) to Twinleaf Town (15, 26); north 4 (open) to Twinleaf Town (15, 22) + | Leg 1/2: south 37 (to wall) to Twinleaf Town (15, 26) + | [Sim] into twinleaf: south 37 (to wall): held south to blocked at (47, 90). + | [Route] into twinleaf: south 37 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run south: 37 tiles in 6600 ms to the wall. + | [Route] into twinleaf: south 37 (to wall): no banner read for Twinleaf Town; going on. + | [Route] into twinleaf: south 37 (to wall): ended at Twinleaf Town (15, 26) (walked). + | [Leg] {"checkpoint":"00.04","chunks":37,"dir":"south","end":[["Twinleaf Town",15,26]],"end_kind":"wall","event":"into_twinleaf","interrupts":[],"known":"wall","leg":1,"ms":6600,"planned_end":[["Twinleaf Town",15,26]],"tiles":37} + | Leg 2/2: north 4 (open) to Twinleaf Town (15, 22) + | [Route] Turning north. + | [Sim] into twinleaf: north 4 (open): 4 taps north, 4 moved, limit at (47, 86). + | [Route] into twinleaf: north 4 (open): ended at Twinleaf Town (15, 22) (walked). + | [Leg] {"checkpoint":"00.04","chunks":4,"dir":"north","end":[["Twinleaf Town",15,22]],"end_kind":"open","event":"into_twinleaf","interrupts":[],"known":"dead_reckoned","leg":2,"moved":4,"ms":3200,"planned_end":[["Twinleaf Town",15,22]],"tiles":4} + | [Route] into twinleaf: no banner read for Twinleaf Town; going on. + | [Route] into twinleaf: arrived at Twinleaf Town (15, 22). + | to moms doorstep: 1 legs planned + | [Route] to moms doorstep: plan from Twinleaf Town (15, 22): east 5 (open) to Twinleaf Town (20, 22) + | Leg 1/1: east 5 (open) to Twinleaf Town (20, 22) + | [Route] Turning east. + | [Sim] to moms doorstep: east 5 (open): 5 taps east, 5 moved, limit at (52, 86). + | [Route] to moms doorstep: east 5 (open): ended at Twinleaf Town (20, 22) (walked). + | [Leg] {"checkpoint":"00.04","chunks":5,"dir":"east","end":[["Twinleaf Town",20,22]],"end_kind":"open","event":"to_moms_doorstep","interrupts":[],"known":"dead_reckoned","leg":1,"moved":5,"ms":4000,"planned_end":[["Twinleaf Town",20,22]],"tiles":5} + | [Route] to moms doorstep: arrived at Twinleaf Town (20, 22). + | [00.04] into_the_house: north through the door (timeout 4500 ms, dark from 340 ms): black fade. + | beside mom: 1 legs planned + | [Route] beside mom: plan from PlayerHouse1F (6, 9): north 1 (open) to PlayerHouse1F (6, 8) + | Leg 1/1: north 1 (open) to PlayerHouse1F (6, 8) + | [Route] Turning north. + | [Sim] beside mom: north 1 (open): 1 taps north, 1 moved, limit at (6, 8). + | [Route] beside mom: north 1 (open): ended at PlayerHouse1F (6, 8) (walked). + | [Leg] {"checkpoint":"00.04","chunks":1,"dir":"north","end":[["PlayerHouse1F",6,8]],"end_kind":"open","event":"beside_mom","interrupts":[],"known":"dead_reckoned","leg":1,"moved":1,"ms":800,"planned_end":[["PlayerHouse1F",6,8]],"tiles":1} + | [Route] beside mom: arrived at PlayerHouse1F (6, 8). + | [Route] Turning east. + | [Leg] {"checkpoint":"00.04","chunks":0,"dir":"north","end":[],"end_kind":"wall","event":"into_the_east_corner","interrupts":[],"known":"wall","leg":1,"ms":0,"planned_end":[],"tiles":4} + | [Leg] {"checkpoint":"00.04","chunks":0,"dir":"east","end":[],"end_kind":"wall","event":"into_the_east_corner","interrupts":[],"known":"wall","leg":2,"ms":0,"planned_end":[],"tiles":6} + | [Leg] {"checkpoint":"00.04","chunks":0,"dir":"south","end":[],"end_kind":"wall","event":"into_the_east_corner","interrupts":[],"known":"wall","leg":3,"ms":0,"planned_end":[],"tiles":4} + | into moms call: 3 legs planned + | [Route] into moms call: plan from PlayerHouse1F (11, 8): west 1 (open) to PlayerHouse1F (10, 8); south 1 (open) to PlayerHouse1F (10, 9); west 4 (to wall) to PlayerHouse1F (6, 9) + | Leg 1/3: west 1 (open) to PlayerHouse1F (10, 8) + | [Route] Turning west. + | [Sim] into moms call: west 1 (open): 1 taps west, 1 moved, limit at (10, 8). + | [Route] into moms call: west 1 (open): ended at PlayerHouse1F (10, 8) (walked). + | [Leg] {"checkpoint":"00.04","chunks":1,"dir":"west","end":[["PlayerHouse1F",10,8]],"end_kind":"open","event":"into_moms_call","interrupts":[],"known":"dead_reckoned","leg":1,"moved":1,"ms":800,"planned_end":[["PlayerHouse1F",10,8]],"tiles":1} + | Leg 2/3: south 1 (open) to PlayerHouse1F (10, 9) + | [Route] Turning south. + | [Sim] into moms call: south 1 (open): 1 taps south, 1 moved, limit at (10, 9). + | [Route] into moms call: south 1 (open): ended at PlayerHouse1F (10, 9) (walked). + | [Leg] {"checkpoint":"00.04","chunks":1,"dir":"south","end":[["PlayerHouse1F",10,9]],"end_kind":"open","event":"into_moms_call","interrupts":[],"known":"dead_reckoned","leg":2,"moved":1,"ms":800,"planned_end":[["PlayerHouse1F",10,9]],"tiles":1} + | Leg 3/3: west 4 (to wall) to PlayerHouse1F (6, 9) + | [Route] Turning west. + | [Sim] into moms call: west 4 (to wall): held west to dialog at (6, 9). + | into moms call: west 4 (to wall): the next step's scene started on the way; handing it over. + | [Leg] {"checkpoint":"00.04","chunks":4,"dir":"west","end":[],"end_kind":"wall","event":"into_moms_call","interrupts":["scene"],"known":"dialogue","leg":3,"ms":650,"note":"scene","planned_end":[["PlayerHouse1F",6,9]],"tiles":4} + | [Leg] {"checkpoint":"00.04","chunks":0,"dir":"west","end":[],"end_kind":"wall","event":"to_twinleafs_west_wall","interrupts":[],"known":"wall","leg":1,"ms":0,"planned_end":[],"tiles":16} + | short of the catch tutorial: 12 legs planned + | [Route] short of the catch tutorial: plan from Twinleaf Town (6, 22), Twinleaf Town (6, 23): north 19 (to wall) to Twinleaf Town (6, 4); east 8 (open) to Twinleaf Town (14, 4); north 16 (to wall) to Route 201 (14, 13); east 43 (to wall) to Route 201 (57, 13); west 7 (open) to Route 201 (50, 13); north 7 (open) to Route 201 (50, 6); east 43 (to wall) to Sandgem Town (29, 13); north 2 (to wall) to Sandgem Town (29, 11); west 5 (open) to Sandgem Town (24, 11); north 19 (to wall) to Route 202 (25, 24); west 3 (to wall) to Route 202 (22, 24); south 3 (open) to Route 202 (22, 27) + | Leg 1/12: north 19 (to wall) to Twinleaf Town (6, 4) + | [Sim] short of the catch tutorial: north 19 (to wall): held north to blocked at (38, 68). + | [Route] short of the catch tutorial: north 19 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run north: 18 tiles in 3750 ms to the wall. + | [Route] short of the catch tutorial: north 19 (to wall): ended at Twinleaf Town (6, 4) (walked). + | [Leg] {"checkpoint":"00.04","chunks":18,"dir":"north","end":[["Twinleaf Town",6,4]],"end_kind":"wall","event":"short_of_the_catch_tutorial","interrupts":[],"known":"wall","leg":1,"ms":3750,"planned_end":[["Twinleaf Town",6,4]],"tiles":19} + | Leg 2/12: east 8 (open) to Twinleaf Town (14, 4) + | [Route] Turning east. + | [Sim] short of the catch tutorial: east 8 (open): 8 taps east, 8 moved, limit at (46, 68). + | [Route] short of the catch tutorial: east 8 (open): ended at Twinleaf Town (14, 4) (walked). + | [Leg] {"checkpoint":"00.04","chunks":8,"dir":"east","end":[["Twinleaf Town",14,4]],"end_kind":"open","event":"short_of_the_catch_tutorial","interrupts":[],"known":"dead_reckoned","leg":2,"moved":8,"ms":6400,"planned_end":[["Twinleaf Town",14,4]],"tiles":8} + | Leg 3/12: north 16 (to wall) to Route 201 (14, 13) + | [Route] Turning north. + | [Sim] short of the catch tutorial: north 16 (to wall): held north to blocked at (46, 52). + | [Speed] run north: 16 tiles in 3450 ms to the wall. + | [Route] short of the catch tutorial: north 16 (to wall): no banner read for Route 201; going on. + | [Route] short of the catch tutorial: north 16 (to wall): ended at Route 201 (14, 13) (walked). + | [Leg] {"checkpoint":"00.04","chunks":16,"dir":"north","end":[["Route 201",14,13]],"end_kind":"wall","event":"short_of_the_catch_tutorial","interrupts":[],"known":"wall","leg":3,"ms":3450,"planned_end":[["Route 201",14,13]],"tiles":16} + | Leg 4/12: east 43 (to wall) to Route 201 (57, 13) + | [Route] Turning east. + | [Sim] short of the catch tutorial: east 43 (to wall): held east to blocked at (89, 52). + | [Speed] run east: 43 tiles in 5350 ms to the wall. + | [Route] short of the catch tutorial: east 43 (to wall): ended at Route 201 (57, 13) (walked). + | [Leg] {"checkpoint":"00.04","chunks":43,"dir":"east","end":[["Route 201",57,13]],"end_kind":"wall","event":"short_of_the_catch_tutorial","interrupts":[],"known":"wall","leg":4,"ms":5350,"planned_end":[["Route 201",57,13]],"tiles":43} + | Leg 5/12: west 7 (open) to Route 201 (50, 13) + | [Route] Turning west. + | [Sim] short of the catch tutorial: west 7 (open): 7 taps west, 7 moved, limit at (82, 52). + | [Route] short of the catch tutorial: west 7 (open): ended at Route 201 (50, 13) (walked). + | [Leg] {"checkpoint":"00.04","chunks":7,"dir":"west","end":[["Route 201",50,13]],"end_kind":"open","event":"short_of_the_catch_tutorial","interrupts":[],"known":"dead_reckoned","leg":5,"moved":7,"ms":5600,"planned_end":[["Route 201",50,13]],"tiles":7} + | Leg 6/12: north 7 (open) to Route 201 (50, 6) + | [Route] Turning north. + | [Sim] short of the catch tutorial: north 7 (open): 7 taps north, 7 moved, limit at (82, 45). + | [Route] short of the catch tutorial: north 7 (open): ended at Route 201 (50, 6) (walked). + | [Leg] {"checkpoint":"00.04","chunks":7,"dir":"north","end":[["Route 201",50,6]],"end_kind":"open","event":"short_of_the_catch_tutorial","interrupts":[],"known":"dead_reckoned","leg":6,"moved":7,"ms":5600,"planned_end":[["Route 201",50,6]],"tiles":7} + | Leg 7/12: east 43 (to wall) to Sandgem Town (29, 13) + | [Route] Turning east. + | [Sim] short of the catch tutorial: east 43 (to wall): held east to blocked at (125, 45). + | [Speed] run east: 43 tiles in 5350 ms to the wall. + | [Route] short of the catch tutorial: east 43 (to wall): no banner read for Sandgem Town; going on. + | [Route] short of the catch tutorial: east 43 (to wall): ended at Sandgem Town (29, 13) (walked). + | [Leg] {"checkpoint":"00.04","chunks":43,"dir":"east","end":[["Sandgem Town",29,13]],"end_kind":"wall","event":"short_of_the_catch_tutorial","interrupts":[],"known":"wall","leg":7,"ms":5350,"planned_end":[["Sandgem Town",29,13]],"tiles":43} + | Leg 8/12: north 2 (to wall) to Sandgem Town (29, 11) + | [Route] Turning north. + | [Sim] short of the catch tutorial: north 2 (to wall): held north to blocked at (125, 43). + | [Speed] run north: 2 tiles in 1350 ms to the wall. + | [Route] short of the catch tutorial: north 2 (to wall): ended at Sandgem Town (29, 11) (walked). + | [Leg] {"checkpoint":"00.04","chunks":2,"dir":"north","end":[["Sandgem Town",29,11]],"end_kind":"wall","event":"short_of_the_catch_tutorial","interrupts":[],"known":"wall","leg":8,"ms":1350,"planned_end":[["Sandgem Town",29,11]],"tiles":2} + | Leg 9/12: west 5 (open) to Sandgem Town (24, 11) + | [Route] Turning west. + | [Sim] short of the catch tutorial: west 5 (open): 5 taps west, 5 moved, limit at (120, 43). + | [Route] short of the catch tutorial: west 5 (open): ended at Sandgem Town (24, 11) (walked). + | [Leg] {"checkpoint":"00.04","chunks":5,"dir":"west","end":[["Sandgem Town",24,11]],"end_kind":"open","event":"short_of_the_catch_tutorial","interrupts":[],"known":"dead_reckoned","leg":9,"moved":5,"ms":4000,"planned_end":[["Sandgem Town",24,11]],"tiles":5} + | Leg 10/12: north 19 (to wall) to Route 202 (25, 24) + | [Route] Turning north. + | [Sim] short of the catch tutorial: north 19 (to wall): held north to blocked at (120, 24). + | [Speed] run north: 19 tiles in 3900 ms to the wall. + | [Route] short of the catch tutorial: north 19 (to wall): no banner read for Route 202; going on. + | [Route] short of the catch tutorial: north 19 (to wall): ended at Route 202 (25, 24) (walked). + | [Leg] {"checkpoint":"00.04","chunks":19,"dir":"north","end":[["Route 202",25,24]],"end_kind":"wall","event":"short_of_the_catch_tutorial","interrupts":[],"known":"wall","leg":10,"ms":3900,"planned_end":[["Route 202",25,24]],"tiles":19} + | Leg 11/12: west 3 (to wall) to Route 202 (22, 24) + | [Route] Turning west. + | [Sim] short of the catch tutorial: west 3 (to wall): held west to blocked at (117, 24). + | [Speed] run west: 3 tiles in 1350 ms to the wall. + | [Route] short of the catch tutorial: west 3 (to wall): ended at Route 202 (22, 24) (walked). + | [Leg] {"checkpoint":"00.04","chunks":3,"dir":"west","end":[["Route 202",22,24]],"end_kind":"wall","event":"short_of_the_catch_tutorial","interrupts":[],"known":"wall","leg":11,"ms":1350,"planned_end":[["Route 202",22,24]],"tiles":3} + | Leg 12/12: south 3 (open) to Route 202 (22, 27) + | [Route] Turning south. + | [Sim] short of the catch tutorial: south 3 (open): 3 taps south, 3 moved, limit at (117, 27). + | [Route] short of the catch tutorial: south 3 (open): ended at Route 202 (22, 27) (walked). + | [Leg] {"checkpoint":"00.04","chunks":3,"dir":"south","end":[["Route 202",22,27]],"end_kind":"open","event":"short_of_the_catch_tutorial","interrupts":[],"known":"dead_reckoned","leg":12,"moved":3,"ms":2400,"planned_end":[["Route 202",22,27]],"tiles":3} + | [Route] short of the catch tutorial: no banner read for Route 202; going on. + | [Route] short of the catch tutorial: arrived at Route 202 (22, 27). + | [Route] Turning west. + | [Sim] catch_tutorial_trigger: 1 taps west, 1 moved, dialog at (116, 27). + | [00.04] catch_tutorial_trigger: a step west, dialog. +00.04b: completed + ends on Sandgem Town (16, 11) + stubbed save + stubbed train + looked for 1 fades, 0 banners, 1 doors, 0 tap steps + | to catch grass: 3 legs planned + | [Route] to catch grass: plan from Route 202 (15, 25), Route 202 (16, 25), Route 202 (17, 25), Route 202 (18, 25), Route 202 (19, 25), Route 202 (20, 25), Route 202 (21, 25), Route 202 (15, 26), Route 202 (16, 26), Route 202 (17, 26), Route 202 (18, 26), Route 202 (19, 26), Route 202 (20, 26), Route 202 (21, 26), Route 202 (15, 27), Route 202 (16, 27), Route 202 (17, 27), Route 202 (18, 27), Route 202 (19, 27), Route 202 (20, 27), Route 202 (21, 27), Route 202 (21, 28), Route 202 (21, 29): north 4 (to wall) to Route 202 (15, 25), Route 202 (16, 25), Route 202 (17, 25), Route 202 (18, 25), Route 202 (19, 25), Route 202 (20, 25), Route 202 (21, 25); east 8 (to wall) to Route 202 (23, 25); west 3 (open) to Route 202 (20, 25) + | Leg 1/3: north 4 (to wall) to Route 202 (15, 25), Route 202 (16, 25), Route 202 (17, 25), Route 202 (18, 25), Route 202 (19, 25), Route 202 (20, 25), Route 202 (21, 25) + | [Sim] to catch grass: north 4 (to wall): held north to blocked at (110, 25). + | [Speed] run north: 0 tiles in 1050 ms to the wall. + | [Route] to catch grass: north 4 (to wall): ended at Route 202 (15, 25), Route 202 (16, 25), Route 202 (17, 25), Route 202 (18, 25), Route 202 (19, 25), Route 202 (20, 25), Route 202 (21, 25) (walked). + | [Leg] {"checkpoint":"00.04b","chunks":0,"dir":"north","end":[["Route 202",15,25],["Route 202",16,25],["Route 202",17,25],["Route 202",18,25],["Route 202",19,25],["Route 202",20,25],["Route 202",21,25]],"end_kind":"wall","event":"to_catch_grass","interrupts":[],"known":"wall","leg":1,"ms":1050,"planned_end":[["Route 202",15,25],["Route 202",16,25],["Route 202",17,25],["Route 202",18,25],["Route 202",19,25],["Route 202",20,25],["Route 202",21,25]],"tiles":4} + | Leg 2/3: east 8 (to wall) to Route 202 (23, 25) + | [Route] Turning east. + | [Sim] to catch grass: east 8 (to wall): held east to blocked at (118, 25). + | [Speed] run east: 2 tiles in 1850 ms to the wall. + | [Route] to catch grass: east 8 (to wall): ended at Route 202 (23, 25) (walked). + | [Leg] {"checkpoint":"00.04b","chunks":8,"dir":"east","end":[["Route 202",23,25]],"end_kind":"wall","event":"to_catch_grass","interrupts":[],"known":"wall","leg":2,"ms":1850,"planned_end":[["Route 202",23,25]],"tiles":8} + | Leg 3/3: west 3 (open) to Route 202 (20, 25) + | [Route] Turning west. + | [Sim] to catch grass: west 3 (open): 3 taps west, 3 moved, limit at (115, 25). + | [Route] to catch grass: west 3 (open): ended at Route 202 (20, 25) (walked). + | [Leg] {"checkpoint":"00.04b","chunks":3,"dir":"west","end":[["Route 202",20,25]],"end_kind":"open","event":"to_catch_grass","interrupts":[],"known":"dead_reckoned","leg":3,"moved":3,"ms":2400,"planned_end":[["Route 202",20,25]],"tiles":3} + | [Route] to catch grass: arrived at Route 202 (20, 25). + | into sandgem: 3 legs planned + | [Route] into sandgem: plan from Route 202 (18, 25), Route 202 (19, 25), Route 202 (20, 25), Route 202 (18, 26), Route 202 (19, 26), Route 202 (20, 26), Route 202 (18, 27), Route 202 (19, 27), Route 202 (20, 27): south 2 (to wall) to Route 202 (18, 27), Route 202 (19, 27), Route 202 (20, 27); east 12 (to wall) to Route 202 (30, 27); south 10 (to wall) to Sandgem Town (29, 5) + | Leg 1/3: south 2 (to wall) to Route 202 (18, 27), Route 202 (19, 27), Route 202 (20, 27) + | [Sim] into sandgem: south 2 (to wall): held south to blocked at (115, 27). + | [Route] into sandgem: south 2 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run south: 0 tiles in 1350 ms to the wall. + | [Route] into sandgem: south 2 (to wall): ended at Route 202 (18, 27), Route 202 (19, 27), Route 202 (20, 27) (walked). + | [Leg] {"checkpoint":"00.04b","chunks":2,"dir":"south","end":[["Route 202",18,27],["Route 202",19,27],["Route 202",20,27]],"end_kind":"wall","event":"into_sandgem","interrupts":[],"known":"wall","leg":1,"ms":1350,"planned_end":[["Route 202",18,27],["Route 202",19,27],["Route 202",20,27]],"tiles":2} + | Leg 2/3: east 12 (to wall) to Route 202 (30, 27) + | [Route] Turning east. + | [Sim] into sandgem: east 12 (to wall): held east to blocked at (125, 27). + | [Speed] run east: 10 tiles in 2050 ms to the wall. + | [Route] into sandgem: east 12 (to wall): ended at Route 202 (30, 27) (walked). + | [Leg] {"checkpoint":"00.04b","chunks":10,"dir":"east","end":[["Route 202",30,27]],"end_kind":"wall","event":"into_sandgem","interrupts":[],"known":"wall","leg":2,"ms":2050,"planned_end":[["Route 202",30,27]],"tiles":12} + | Leg 3/3: south 10 (to wall) to Sandgem Town (29, 5) + | [Route] Turning south. + | [Sim] into sandgem: south 10 (to wall): held south to blocked at (125, 37). + | [Speed] run south: 10 tiles in 2550 ms to the wall. + | [Route] into sandgem: south 10 (to wall): no banner read for Sandgem Town; going on. + | [Route] into sandgem: south 10 (to wall): ended at Sandgem Town (29, 5) (walked). + | [Leg] {"checkpoint":"00.04b","chunks":10,"dir":"south","end":[["Sandgem Town",29,5]],"end_kind":"wall","event":"into_sandgem","interrupts":[],"known":"wall","leg":3,"ms":2550,"planned_end":[["Sandgem Town",29,5]],"tiles":10} + | [Route] into sandgem: no banner read for Sandgem Town; going on. + | [Route] into sandgem: arrived at Sandgem Town (29, 5). + | [Leg] {"checkpoint":"00.04b","chunks":0,"dir":"west","end":[],"end_kind":"wall","event":"above_center_sign","interrupts":[],"known":"wall","leg":1,"ms":0,"planned_end":[],"tiles":12} + | [Leg] {"checkpoint":"00.04b","chunks":0,"dir":"south","end":[],"end_kind":"wall","event":"above_center_sign","interrupts":[],"known":"wall","leg":2,"ms":0,"planned_end":[],"tiles":6} + | [Route] Turning east. + | [Sim] below_center_door: 1 taps east, 1 moved, limit at (117, 41). + | [00.04b] below_center_door: taps east moved 1 of 1 tiles. + | [Leg] {"checkpoint":"00.04b","chunks":1,"dir":"east","end":[["Sandgem Town",21,9]],"end_kind":"tile","event":"below_center_door","interrupts":[],"known":"counted","leg":1,"moved":1,"ms":800,"planned_end":[["Sandgem Town",21,9]],"tiles":1} + | [Route] Turning south. + | [Sim] below_center_door: 2 taps south, 2 moved, limit at (117, 43). + | [00.04b] below_center_door: taps south moved 2 of 2 tiles. + | [Leg] {"checkpoint":"00.04b","chunks":2,"dir":"south","end":[["Sandgem Town",21,11]],"end_kind":"tile","event":"below_center_door","interrupts":[],"known":"counted","leg":2,"moved":2,"ms":1600,"planned_end":[["Sandgem Town",21,11]],"tiles":2} + | [Route] Turning west. + | [Sim] below_center_door: 4 taps west, 4 moved, limit at (113, 43). + | [00.04b] below_center_door: taps west moved 4 of 4 tiles. + | [Leg] {"checkpoint":"00.04b","chunks":4,"dir":"west","end":[["Sandgem Town",17,11]],"end_kind":"tile","event":"below_center_door","interrupts":[],"known":"counted","leg":3,"moved":4,"ms":3200,"planned_end":[["Sandgem Town",17,11]],"tiles":4} +00.04c: completed + ends on Route 202 (30, 24) + stubbed save + stubbed potions + looked for 0 fades, 0 banners, 0 doors, 0 tap steps +00.04d: completed + ends on Jubilife City (46, 58) + stubbed save + stubbed jubilife_stairs + looked for 0 fades, 0 banners, 0 doors, 0 tap steps + | north to jubilife: 12 legs planned + | [Route] north to jubilife: plan from Route 202 (30, 24): south 2 (open) to Route 202 (30, 26); west 27 (to wall) to Route 202 (3, 26); north 12 (to wall) to Route 202 (3, 14); east 14 (to wall) to Route 202 (17, 14); south 8 (to wall) to Route 202 (17, 22); east 13 (to wall) to Route 202 (30, 22); north 18 (to wall) to Route 202 (30, 4); south 1 (open) to Route 202 (30, 5); west 5 (open) to Route 202 (25, 5); north 1 (to wall) to Route 202 (25, 4); west 7 (to wall) to Route 202 (18, 4); north 1 (open) to Route 202 (18, 3) + | Leg 1/12: south 2 (open) to Route 202 (30, 26) + | [Route] Turning south. + | [Sim] north to jubilife: south 2 (open): 2 taps south, 2 moved, limit at (125, 26). + | [Route] north to jubilife: south 2 (open): ended at Route 202 (30, 26) (walked). + | [Leg] {"checkpoint":"00.04d","chunks":2,"dir":"south","end":[["Route 202",30,26]],"end_kind":"open","event":"north_to_jubilife","interrupts":[],"known":"dead_reckoned","leg":1,"moved":2,"ms":1600,"planned_end":[["Route 202",30,26]],"tiles":2} + | Leg 2/12: west 27 (to wall) to Route 202 (3, 26) + | [Route] Turning west. + | [Sim] north to jubilife: west 27 (to wall): held west to blocked at (98, 26). + | [Speed] run west: 27 tiles in 3750 ms to the wall. + | [Route] north to jubilife: west 27 (to wall): ended at Route 202 (3, 26) (walked). + | [Leg] {"checkpoint":"00.04d","chunks":27,"dir":"west","end":[["Route 202",3,26]],"end_kind":"wall","event":"north_to_jubilife","interrupts":[],"known":"wall","leg":2,"ms":3750,"planned_end":[["Route 202",3,26]],"tiles":27} + | Leg 3/12: north 12 (to wall) to Route 202 (3, 14) + | [Route] Turning north. + | [Sim] north to jubilife: north 12 (to wall): held north to blocked at (98, 14). + | [Speed] run north: 12 tiles in 2850 ms to the wall. + | [Route] north to jubilife: north 12 (to wall): ended at Route 202 (3, 14) (walked). + | [Leg] {"checkpoint":"00.04d","chunks":12,"dir":"north","end":[["Route 202",3,14]],"end_kind":"wall","event":"north_to_jubilife","interrupts":[],"known":"wall","leg":3,"ms":2850,"planned_end":[["Route 202",3,14]],"tiles":12} + | Leg 4/12: east 14 (to wall) to Route 202 (17, 14) + | [Route] Turning east. + | [Sim] north to jubilife: east 14 (to wall): held east to dialog at (102, 14). + | [Route] north to jubilife: tristan stopped us about Route 202 (7, 14). + | Fighting tristan. + | [Route] north to jubilife: east 14 (to wall): on to the wall: on to the wall after the battle. + | [Sim] north to jubilife: east 14 (to wall): on to the wall: held east to blocked at (112, 14). + | [Route] north to jubilife: east 14 (to wall): on to the wall: facing unknown; the first moved chunk may be the turn, not counted. + | [Route] north to jubilife: east 14 (to wall): ended at Route 202 (17, 14) (walked). + | [Leg] {"checkpoint":"00.04d","chunks":14,"dir":"east","end":[["Route 202",17,14]],"end_kind":"wall","event":"north_to_jubilife","interrupts":["trainer"],"known":"wall","leg":4,"ms":2700,"planned_end":[["Route 202",17,14]],"tiles":14} + | Leg 5/12: south 8 (to wall) to Route 202 (17, 22) + | [Route] Turning south. + | [Sim] north to jubilife: south 8 (to wall): held south to blocked at (112, 22). + | [Speed] run south: 8 tiles in 2250 ms to the wall. + | [Route] north to jubilife: south 8 (to wall): ended at Route 202 (17, 22) (walked). + | [Leg] {"checkpoint":"00.04d","chunks":8,"dir":"south","end":[["Route 202",17,22]],"end_kind":"wall","event":"north_to_jubilife","interrupts":[],"known":"wall","leg":5,"ms":2250,"planned_end":[["Route 202",17,22]],"tiles":8} + | Leg 6/12: east 13 (to wall) to Route 202 (30, 22) + | [Route] Turning east. + | [Sim] north to jubilife: east 13 (to wall): held east to dialog at (117, 22). + | [Route] north to jubilife: natalie stopped us about Route 202 (22, 22). + | Fighting natalie. + | [Route] north to jubilife: east 13 (to wall): on to the wall: on to the wall after the battle. + | [Sim] north to jubilife: east 13 (to wall): on to the wall: held east to blocked at (125, 22). + | [Route] north to jubilife: east 13 (to wall): on to the wall: facing unknown; the first moved chunk may be the turn, not counted. + | [Route] north to jubilife: east 13 (to wall): ended at Route 202 (30, 22) (walked). + | [Leg] {"checkpoint":"00.04d","chunks":13,"dir":"east","end":[["Route 202",30,22]],"end_kind":"wall","event":"north_to_jubilife","interrupts":["trainer"],"known":"wall","leg":6,"ms":2600,"planned_end":[["Route 202",30,22]],"tiles":13} + | Leg 7/12: north 18 (to wall) to Route 202 (30, 4) + | [Route] Turning north. + | [Sim] north to jubilife: north 18 (to wall): held north to blocked at (125, 4). + | [Speed] run north: 18 tiles in 3750 ms to the wall. + | [Route] north to jubilife: north 18 (to wall): ended at Route 202 (30, 4) (walked). + | [Leg] {"checkpoint":"00.04d","chunks":18,"dir":"north","end":[["Route 202",30,4]],"end_kind":"wall","event":"north_to_jubilife","interrupts":[],"known":"wall","leg":7,"ms":3750,"planned_end":[["Route 202",30,4]],"tiles":18} + | Leg 8/12: south 1 (open) to Route 202 (30, 5) + | [Route] Turning south. + | [Sim] north to jubilife: south 1 (open): 1 taps south, 1 moved, limit at (125, 5). + | [Route] north to jubilife: south 1 (open): ended at Route 202 (30, 5) (walked). + | [Leg] {"checkpoint":"00.04d","chunks":1,"dir":"south","end":[["Route 202",30,5]],"end_kind":"open","event":"north_to_jubilife","interrupts":[],"known":"dead_reckoned","leg":8,"moved":1,"ms":800,"planned_end":[["Route 202",30,5]],"tiles":1} + | Leg 9/12: west 5 (open) to Route 202 (25, 5) + | [Route] Turning west. + | [Sim] north to jubilife: west 5 (open): 5 taps west, 4 moved, dialog at (121, 5). + | [Route] north to jubilife: logan stopped us about Route 202 (26, 5). + | Fighting logan. + | [Route] north to jubilife: west 5 (open): 4 taps before the battle, or where they saw us, at Route 202 (26, 5); planning again. + | [Leg] {"checkpoint":"00.04d","chunks":4,"dir":"west","end":[["Route 202",26,5]],"end_kind":"open","event":"north_to_jubilife","interrupts":["trainer"],"known":"seen","leg":9,"moved":4,"ms":3200,"note":"replan","planned_end":[["Route 202",25,5]],"tiles":5} + | north to jubilife: 4 legs planned + | [Route] north to jubilife: plan from Route 202 (26, 5): west 1 (open) to Route 202 (25, 5); north 1 (to wall) to Route 202 (25, 4); west 7 (to wall) to Route 202 (18, 4); north 1 (open) to Route 202 (18, 3) + | Leg 1/4: west 1 (open) to Route 202 (25, 5) + | [Sim] north to jubilife: west 1 (open): 1 taps west, 1 moved, limit at (120, 5). + | [Route] north to jubilife: west 1 (open): ended at Route 202 (25, 5) (walked). + | [Leg] {"checkpoint":"00.04d","chunks":1,"dir":"west","end":[["Route 202",25,5]],"end_kind":"open","event":"north_to_jubilife","interrupts":[],"known":"dead_reckoned","leg":10,"moved":1,"ms":800,"planned_end":[["Route 202",25,5]],"tiles":1} + | Leg 2/4: north 1 (to wall) to Route 202 (25, 4) + | [Route] Turning north. + | [Sim] north to jubilife: north 1 (to wall): held north to blocked at (120, 4). + | [Speed] run north: 1 tiles in 1200 ms to the wall. + | [Route] north to jubilife: north 1 (to wall): ended at Route 202 (25, 4) (walked). + | [Leg] {"checkpoint":"00.04d","chunks":1,"dir":"north","end":[["Route 202",25,4]],"end_kind":"wall","event":"north_to_jubilife","interrupts":[],"known":"wall","leg":11,"ms":1200,"planned_end":[["Route 202",25,4]],"tiles":1} + | Leg 3/4: west 7 (to wall) to Route 202 (18, 4) + | [Route] Turning west. + | [Sim] north to jubilife: west 7 (to wall): held west to blocked at (113, 4). + | [Speed] run west: 7 tiles in 1750 ms to the wall. + | [Route] north to jubilife: west 7 (to wall): ended at Route 202 (18, 4) (walked). + | [Leg] {"checkpoint":"00.04d","chunks":7,"dir":"west","end":[["Route 202",18,4]],"end_kind":"wall","event":"north_to_jubilife","interrupts":[],"known":"wall","leg":12,"ms":1750,"planned_end":[["Route 202",18,4]],"tiles":7} + | Leg 4/4: north 1 (open) to Route 202 (18, 3) + | [Route] Turning north. + | [Sim] north to jubilife: north 1 (open): 1 taps north, 1 moved, limit at (113, 3). + | [Route] north to jubilife: north 1 (open): ended at Route 202 (18, 3) (walked). + | [Leg] {"checkpoint":"00.04d","chunks":1,"dir":"north","end":[["Route 202",18,3]],"end_kind":"open","event":"north_to_jubilife","interrupts":[],"known":"dead_reckoned","leg":13,"moved":1,"ms":800,"planned_end":[["Route 202",18,3]],"tiles":1} + | [Route] north to jubilife: arrived at Route 202 (18, 3). + | dawn scene: no line within 15 s; the step before played it. +00.05: completed + ends on Jubilife City (40, 41) + stubbed save + no end to check after 00.05 into_the_school + looked for 2 fades, 0 banners, 2 doors, 0 tap steps + | [Route] Turning north. + | [Sim] north_onto_the_plaza: 4 taps north, 4 moved, limit at (46, 54). + | [00.05] north_onto_the_plaza: taps north moved 4 of 4 tiles. + | [Leg] {"checkpoint":"00.05","chunks":4,"dir":"north","end":[["Jubilife City",46,54]],"end_kind":"tile","event":"north_onto_the_plaza","interrupts":[],"known":"counted","leg":1,"moved":4,"ms":3200,"planned_end":[["Jubilife City",46,54]],"tiles":4} + | [Leg] {"checkpoint":"00.05","chunks":0,"dir":"east","end":[],"end_kind":"wall","event":"east_to_the_wall","interrupts":[],"known":"wall","leg":1,"ms":0,"planned_end":[],"tiles":10} + | [Route] Turning west. + | [Sim] off_the_wall: 1 taps west, 1 moved, limit at (51, 54). + | [00.05] off_the_wall: taps west moved 1 of 1 tiles. + | [Leg] {"checkpoint":"00.05","chunks":1,"dir":"west","end":[["Jubilife City",51,51],["Jubilife City",51,52],["Jubilife City",51,53],["Jubilife City",51,54],["Jubilife City",51,55],["Jubilife City",51,56],["Jubilife City",51,57]],"end_kind":"tile","event":"off_the_wall","interrupts":[],"known":"counted","leg":1,"moved":1,"ms":800,"planned_end":[["Jubilife City",51,51],["Jubilife City",51,52],["Jubilife City",51,53],["Jubilife City",51,54],["Jubilife City",51,55],["Jubilife City",51,56],["Jubilife City",51,57]],"tiles":1} + | [Leg] {"checkpoint":"00.05","chunks":0,"dir":"north","end":[],"end_kind":"wall","event":"north_to_the_center","interrupts":[],"known":"wall","leg":1,"ms":0,"planned_end":[],"tiles":20} + | [Route] Turning east. + | [Sim] below_the_centers_door: 1 taps east, 1 moved, limit at (52, 41). + | [00.05] below_the_centers_door: taps east moved 1 of 1 tiles. + | [Leg] {"checkpoint":"00.05","chunks":1,"dir":"east","end":[["Jubilife City",52,41]],"end_kind":"tile","event":"below_the_centers_door","interrupts":[],"known":"counted","leg":1,"moved":1,"ms":800,"planned_end":[["Jubilife City",52,41]],"tiles":1} + | to the school: 1 legs planned + | [Route] to the school: plan from Jubilife City (52, 41): west 12 (open) to Jubilife City (40, 41) + | Leg 1/1: west 12 (open) to Jubilife City (40, 41) + | [Route] Turning west. + | [Sim] to the school: west 12 (open): 12 taps west, 12 moved, limit at (40, 41). + | [Route] to the school: west 12 (open): ended at Jubilife City (40, 41) (walked). + | [Leg] {"checkpoint":"00.05","chunks":12,"dir":"west","end":[["Jubilife City",40,41]],"end_kind":"open","event":"to_the_school","interrupts":[],"known":"dead_reckoned","leg":1,"moved":12,"ms":9600,"planned_end":[["Jubilife City",40,41]],"tiles":12} + | [Route] to the school: arrived at Jubilife City (40, 41). + | [00.05] into_the_school: north through the door (timeout 4500 ms, dark from 340 ms): black fade. + | barry town map: no line within 15 s; the step before played it. +00.05b: completed + ends on Jubilife City (14, 19) + stubbed save + looked for 0 fades, 0 banners, 0 doors, 0 tap steps + | below the presidents trigger: 1 legs planned + | [Route] below the presidents trigger: plan from Jubilife City (40, 41): east 6 (open) to Jubilife City (46, 41) + | Leg 1/1: east 6 (open) to Jubilife City (46, 41) + | [Route] Turning east. + | [Sim] below the presidents trigger: east 6 (open): 6 taps east, 6 moved, limit at (46, 41). + | [Route] below the presidents trigger: east 6 (open): ended at Jubilife City (46, 41) (walked). + | [Leg] {"checkpoint":"00.05b","chunks":6,"dir":"east","end":[["Jubilife City",46,41]],"end_kind":"open","event":"below_the_presidents_trigger","interrupts":[],"known":"dead_reckoned","leg":1,"moved":6,"ms":4800,"planned_end":[["Jubilife City",46,41]],"tiles":6} + | [Route] below the presidents trigger: arrived at Jubilife City (46, 41). + | [Route] Turning north. + | [Sim] presidents_trigger: 1 taps north, 1 moved, dialog at (46, 40). + | [00.05b] presidents_trigger: a step north, dialog. + | past the president: 1 legs planned + | [Route] past the president: plan from Jubilife City (46, 40): east 2 (open) to Jubilife City (48, 40) + | Leg 1/1: east 2 (open) to Jubilife City (48, 40) + | [Route] Turning east. + | [Sim] past the president: east 2 (open): 2 taps east, 2 moved, limit at (48, 40). + | [Route] past the president: east 2 (open): ended at Jubilife City (48, 40) (walked). + | [Leg] {"checkpoint":"00.05b","chunks":2,"dir":"east","end":[["Jubilife City",48,40]],"end_kind":"open","event":"past_the_president","interrupts":[],"known":"dead_reckoned","leg":1,"moved":2,"ms":1600,"planned_end":[["Jubilife City",48,40]],"tiles":2} + | [Route] past the president: arrived at Jubilife City (48, 40). + | below the mart clown: 2 legs planned + | [Route] below the mart clown: plan from Jubilife City (48, 40): north 4 (open) to Jubilife City (48, 36); east 8 (to wall) to Jubilife City (56, 36) + | Leg 1/2: north 4 (open) to Jubilife City (48, 36) + | [Route] Turning north. + | [Sim] below the mart clown: north 4 (open): 4 taps north, 4 moved, limit at (48, 36). + | [Route] below the mart clown: north 4 (open): ended at Jubilife City (48, 36) (walked). + | [Leg] {"checkpoint":"00.05b","chunks":4,"dir":"north","end":[["Jubilife City",48,36]],"end_kind":"open","event":"below_the_mart_clown","interrupts":[],"known":"dead_reckoned","leg":1,"moved":4,"ms":3200,"planned_end":[["Jubilife City",48,36]],"tiles":4} + | Leg 2/2: east 8 (to wall) to Jubilife City (56, 36) + | [Route] Turning east. + | [Sim] below the mart clown: east 8 (to wall): held east to blocked at (56, 36). + | [Speed] run east: 8 tiles in 1850 ms to the wall. + | [Route] below the mart clown: east 8 (to wall): ended at Jubilife City (56, 36) (walked). + | [Leg] {"checkpoint":"00.05b","chunks":8,"dir":"east","end":[["Jubilife City",56,36]],"end_kind":"wall","event":"below_the_mart_clown","interrupts":[],"known":"wall","leg":2,"ms":1850,"planned_end":[["Jubilife City",56,36]],"tiles":8} + | [Route] below the mart clown: arrived at Jubilife City (56, 36). + | below the tv clown: 4 legs planned + | [Route] below the tv clown: plan from Jubilife City (56, 31): west 8 (open) to Jubilife City (48, 31); north 7 (open) to Jubilife City (48, 24); west 12 (open) to Jubilife City (36, 24); north 7 (to wall) to Jubilife City (36, 17) + | Leg 1/4: west 8 (open) to Jubilife City (48, 31) + | [Route] Turning west. + | [Sim] below the tv clown: west 8 (open): 8 taps west, 8 moved, limit at (48, 31). + | [Route] below the tv clown: west 8 (open): ended at Jubilife City (48, 31) (walked). + | [Leg] {"checkpoint":"00.05b","chunks":8,"dir":"west","end":[["Jubilife City",48,31]],"end_kind":"open","event":"below_the_tv_clown","interrupts":[],"known":"dead_reckoned","leg":1,"moved":8,"ms":6400,"planned_end":[["Jubilife City",48,31]],"tiles":8} + | Leg 2/4: north 7 (open) to Jubilife City (48, 24) + | [Route] Turning north. + | [Sim] below the tv clown: north 7 (open): 7 taps north, 7 moved, limit at (48, 24). + | [Route] below the tv clown: north 7 (open): ended at Jubilife City (48, 24) (walked). + | [Leg] {"checkpoint":"00.05b","chunks":7,"dir":"north","end":[["Jubilife City",48,24]],"end_kind":"open","event":"below_the_tv_clown","interrupts":[],"known":"dead_reckoned","leg":2,"moved":7,"ms":5600,"planned_end":[["Jubilife City",48,24]],"tiles":7} + | Leg 3/4: west 12 (open) to Jubilife City (36, 24) + | [Route] Turning west. + | [Sim] below the tv clown: west 12 (open): 12 taps west, 12 moved, limit at (36, 24). + | [Route] below the tv clown: west 12 (open): ended at Jubilife City (36, 24) (walked). + | [Leg] {"checkpoint":"00.05b","chunks":12,"dir":"west","end":[["Jubilife City",36,24]],"end_kind":"open","event":"below_the_tv_clown","interrupts":[],"known":"dead_reckoned","leg":3,"moved":12,"ms":9600,"planned_end":[["Jubilife City",36,24]],"tiles":12} + | Leg 4/4: north 7 (to wall) to Jubilife City (36, 17) + | [Route] Turning north. + | [Sim] below the tv clown: north 7 (to wall): held north to blocked at (36, 17). + | [Speed] run north: 7 tiles in 2100 ms to the wall. + | [Route] below the tv clown: north 7 (to wall): ended at Jubilife City (36, 17) (walked). + | [Leg] {"checkpoint":"00.05b","chunks":7,"dir":"north","end":[["Jubilife City",36,17]],"end_kind":"wall","event":"below_the_tv_clown","interrupts":[],"known":"wall","leg":4,"ms":2100,"planned_end":[["Jubilife City",36,17]],"tiles":7} + | [Route] below the tv clown: arrived at Jubilife City (36, 17). + | [Route] Turning north. + | below the company clown: 3 legs planned + | [Route] below the company clown: plan from Jubilife City (36, 17): south 4 (open) to Jubilife City (36, 21); west 21 (open) to Jubilife City (15, 21); north 2 (open) to Jubilife City (15, 19) + | Leg 1/3: south 4 (open) to Jubilife City (36, 21) + | [Route] Turning south. + | [Sim] below the company clown: south 4 (open): 4 taps south, 4 moved, limit at (36, 21). + | [Route] below the company clown: south 4 (open): ended at Jubilife City (36, 21) (walked). + | [Leg] {"checkpoint":"00.05b","chunks":4,"dir":"south","end":[["Jubilife City",36,21]],"end_kind":"open","event":"below_the_company_clown","interrupts":[],"known":"dead_reckoned","leg":1,"moved":4,"ms":3200,"planned_end":[["Jubilife City",36,21]],"tiles":4} + | Leg 2/3: west 21 (open) to Jubilife City (15, 21) + | [Route] Turning west. + | [Sim] below the company clown: west 21 (open): 21 taps west, 21 moved, limit at (15, 21). + | [Route] below the company clown: west 21 (open): ended at Jubilife City (15, 21) (walked). + | [Leg] {"checkpoint":"00.05b","chunks":21,"dir":"west","end":[["Jubilife City",15,21]],"end_kind":"open","event":"below_the_company_clown","interrupts":[],"known":"dead_reckoned","leg":2,"moved":21,"ms":16800,"planned_end":[["Jubilife City",15,21]],"tiles":21} + | Leg 3/3: north 2 (open) to Jubilife City (15, 19) + | [Route] Turning north. + | [Sim] below the company clown: north 2 (open): 2 taps north, 2 moved, limit at (15, 19). + | [Route] below the company clown: north 2 (open): ended at Jubilife City (15, 19) (walked). + | [Leg] {"checkpoint":"00.05b","chunks":2,"dir":"north","end":[["Jubilife City",15,19]],"end_kind":"open","event":"below_the_company_clown","interrupts":[],"known":"dead_reckoned","leg":3,"moved":2,"ms":1600,"planned_end":[["Jubilife City",15,19]],"tiles":2} + | [Route] below the company clown: arrived at Jubilife City (15, 19). + | beside the company sign: 0 legs planned + | [Route] beside the company sign: plan from Jubilife City (14, 19): + | [Route] beside the company sign: arrived at Jubilife City (14, 19). +00.05c: completed + ends on Jubilife City (59, 21) + stubbed save + stubbed where_we_start + looked for 0 fades, 0 banners, 0 doors, 0 tap steps + | beside the president: 4 legs planned + | [Route] beside the president: plan from Jubilife City (14, 19): south 4 (open) to Jubilife City (14, 23); east 18 (open) to Jubilife City (32, 23); south 12 (open) to Jubilife City (32, 35); east 13 (to wall) to Jubilife City (45, 35) + | Leg 1/4: south 4 (open) to Jubilife City (14, 23) + | [Route] Turning south. + | [Sim] beside the president: south 4 (open): 4 taps south, 4 moved, limit at (14, 23). + | [Route] beside the president: south 4 (open): ended at Jubilife City (14, 23) (walked). + | [Leg] {"checkpoint":"00.05c","chunks":4,"dir":"south","end":[["Jubilife City",14,23]],"end_kind":"open","event":"beside_the_president","interrupts":[],"known":"dead_reckoned","leg":1,"moved":4,"ms":3200,"planned_end":[["Jubilife City",14,23]],"tiles":4} + | Leg 2/4: east 18 (open) to Jubilife City (32, 23) + | [Route] Turning east. + | [Sim] beside the president: east 18 (open): 18 taps east, 18 moved, limit at (32, 23). + | [Route] beside the president: east 18 (open): ended at Jubilife City (32, 23) (walked). + | [Leg] {"checkpoint":"00.05c","chunks":18,"dir":"east","end":[["Jubilife City",32,23]],"end_kind":"open","event":"beside_the_president","interrupts":[],"known":"dead_reckoned","leg":2,"moved":18,"ms":14400,"planned_end":[["Jubilife City",32,23]],"tiles":18} + | Leg 3/4: south 12 (open) to Jubilife City (32, 35) + | [Route] Turning south. + | [Sim] beside the president: south 12 (open): 12 taps south, 12 moved, limit at (32, 35). + | [Route] beside the president: south 12 (open): ended at Jubilife City (32, 35) (walked). + | [Leg] {"checkpoint":"00.05c","chunks":12,"dir":"south","end":[["Jubilife City",32,35]],"end_kind":"open","event":"beside_the_president","interrupts":[],"known":"dead_reckoned","leg":3,"moved":12,"ms":9600,"planned_end":[["Jubilife City",32,35]],"tiles":12} + | Leg 4/4: east 13 (to wall) to Jubilife City (45, 35) + | [Route] Turning east. + | [Sim] beside the president: east 13 (to wall): held east to blocked at (45, 35). + | [Speed] run east: 13 tiles in 2350 ms to the wall. + | [Route] beside the president: east 13 (to wall): ended at Jubilife City (45, 35) (walked). + | [Leg] {"checkpoint":"00.05c","chunks":13,"dir":"east","end":[["Jubilife City",45,35]],"end_kind":"wall","event":"beside_the_president","interrupts":[],"known":"wall","leg":4,"ms":2350,"planned_end":[["Jubilife City",45,35]],"tiles":13} + | [Route] beside the president: arrived at Jubilife City (45, 35). + | [Route] Turning east. + | below the east exit sign: 3 legs planned + | [Route] below the east exit sign: plan from Jubilife City (45, 35): north 9 (open) to Jubilife City (45, 26); east 14 (to wall) to Jubilife City (59, 26); north 5 (to wall) to Jubilife City (59, 21) + | Leg 1/3: north 9 (open) to Jubilife City (45, 26) + | [Route] Turning north. + | [Sim] below the east exit sign: north 9 (open): 9 taps north, 9 moved, limit at (45, 26). + | [Route] below the east exit sign: north 9 (open): ended at Jubilife City (45, 26) (walked). + | [Leg] {"checkpoint":"00.05c","chunks":9,"dir":"north","end":[["Jubilife City",45,26]],"end_kind":"open","event":"below_the_east_exit_sign","interrupts":[],"known":"dead_reckoned","leg":1,"moved":9,"ms":7200,"planned_end":[["Jubilife City",45,26]],"tiles":9} + | Leg 2/3: east 14 (to wall) to Jubilife City (59, 26) + | [Route] Turning east. + | [Sim] below the east exit sign: east 14 (to wall): held east to blocked at (59, 26). + | [Speed] run east: 14 tiles in 2450 ms to the wall. + | [Route] below the east exit sign: east 14 (to wall): ended at Jubilife City (59, 26) (walked). + | [Leg] {"checkpoint":"00.05c","chunks":14,"dir":"east","end":[["Jubilife City",59,26]],"end_kind":"wall","event":"below_the_east_exit_sign","interrupts":[],"known":"wall","leg":2,"ms":2450,"planned_end":[["Jubilife City",59,26]],"tiles":14} + | Leg 3/3: north 5 (to wall) to Jubilife City (59, 21) + | [Route] Turning north. + | [Sim] below the east exit sign: north 5 (to wall): held north to blocked at (59, 21). + | [Speed] run north: 5 tiles in 1800 ms to the wall. + | [Route] below the east exit sign: north 5 (to wall): ended at Jubilife City (59, 21) (walked). + | [Leg] {"checkpoint":"00.05c","chunks":5,"dir":"north","end":[["Jubilife City",59,21]],"end_kind":"wall","event":"below_the_east_exit_sign","interrupts":[],"known":"wall","leg":3,"ms":1800,"planned_end":[["Jubilife City",59,21]],"tiles":5} + | [Route] below the east exit sign: arrived at Jubilife City (59, 21). +01.01: completed + ends on Route 203 (5, 18) + stubbed save + stubbed barry + looked for 0 fades, 0 banners, 0 doors, 0 tap steps + | west of barrys trigger: 2 legs planned + | [Route] west of barrys trigger: plan from Jubilife City (59, 21): south 1 (open) to Jubilife City (59, 22); east 8 (open) to Route 203 (4, 18) + | Leg 1/2: south 1 (open) to Jubilife City (59, 22) + | [Route] Turning south. + | [Sim] west of barrys trigger: south 1 (open): 1 taps south, 1 moved, limit at (59, 22). + | [Route] west of barrys trigger: south 1 (open): ended at Jubilife City (59, 22) (walked). + | [Leg] {"checkpoint":"01.01","chunks":1,"dir":"south","end":[["Jubilife City",59,22]],"end_kind":"open","event":"west_of_barrys_trigger","interrupts":[],"known":"dead_reckoned","leg":1,"moved":1,"ms":800,"planned_end":[["Jubilife City",59,22]],"tiles":1} + | Leg 2/2: east 8 (open) to Route 203 (4, 18) + | [Route] Turning east. + | [Sim] west of barrys trigger: east 8 (open): 8 taps east, 8 moved, limit at (67, 22). + | [Route] west of barrys trigger: east 8 (open): no banner read for Route 203; going on. + | [Route] west of barrys trigger: east 8 (open): ended at Route 203 (4, 18) (walked). + | [Leg] {"checkpoint":"01.01","chunks":8,"dir":"east","end":[["Route 203",4,18]],"end_kind":"open","event":"west_of_barrys_trigger","interrupts":[],"known":"dead_reckoned","leg":2,"moved":8,"ms":6400,"planned_end":[["Route 203",4,18]],"tiles":8} + | [Route] west of barrys trigger: no banner read for Route 203; going on. + | [Route] west of barrys trigger: arrived at Route 203 (4, 18). + | [Route] Turning east. + | [Sim] barrys_trigger: 1 taps east, 1 moved, dialog at (68, 22). + | [01.01] barrys_trigger: a step east, dialog. +01.02: completed + ends on Oreburgh City (23, 23) + stubbed save + no end to check after 01.02 into_the_hikers_scene + no end to check after 01.02 into_the_welcome_scene + looked for 2 fades, 2 banners, 0 doors, 2 tap steps + | south to the cliff: 1 legs planned + | [Route] south to the cliff: plan from Route 203 (5, 17), Route 203 (5, 18), Route 203 (5, 19), Route 203 (5, 20): south 3 (to wall) to Route 203 (5, 20) + | Leg 1/1: south 3 (to wall) to Route 203 (5, 20) + | [Sim] south to the cliff: south 3 (to wall): held south to blocked at (68, 24). + | [Route] south to the cliff: south 3 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run south: 0 tiles in 1500 ms to the wall. + | [Route] south to the cliff: south 3 (to wall): ended at Route 203 (5, 20) (walked). + | [Leg] {"checkpoint":"01.02","chunks":3,"dir":"south","end":[["Route 203",5,20]],"end_kind":"wall","event":"south_to_the_cliff","interrupts":[],"known":"wall","leg":1,"ms":1500,"planned_end":[["Route 203",5,20]],"tiles":3} + | [Route] south to the cliff: arrived at Route 203 (5, 20). + | by the gate: 4 legs planned + | [Route] by the gate: plan from Route 203 (5, 20): north 2 (open) to Route 203 (5, 18); east 50 (to wall) to Route 203 (55, 18); north 12 (to wall) to Route 203 (55, 6); south 3 (open) to Route 203 (55, 9) + | Leg 1/4: north 2 (open) to Route 203 (5, 18) + | [Route] Turning north. + | [Sim] by the gate: north 2 (open): 2 taps north, 2 moved, limit at (68, 22). + | [Route] by the gate: north 2 (open): ended at Route 203 (5, 18) (walked). + | [Leg] {"checkpoint":"01.02","chunks":2,"dir":"north","end":[["Route 203",5,18]],"end_kind":"open","event":"by_the_gate","interrupts":[],"known":"dead_reckoned","leg":1,"moved":2,"ms":1600,"planned_end":[["Route 203",5,18]],"tiles":2} + | Leg 2/4: east 50 (to wall) to Route 203 (55, 18) + | [Route] Turning east. + | [Sim] by the gate: east 50 (to wall): held east to dialog at (94, 22). + | [Route] by the gate: Youngster (above row 18) stopped us about Route 203 (31, 18). + | Fighting Youngster (above row 18). + | [Route] by the gate: east 50 (to wall): on to the wall: on to the wall after the battle. + | [Sim] by the gate: east 50 (to wall): on to the wall: held east to blocked at (118, 22). + | [Route] by the gate: east 50 (to wall): on to the wall: facing unknown; the first moved chunk may be the turn, not counted. + | [Route] by the gate: east 50 (to wall): ended at Route 203 (55, 18) (walked). + | [Leg] {"checkpoint":"01.02","chunks":50,"dir":"east","end":[["Route 203",55,18]],"end_kind":"wall","event":"by_the_gate","interrupts":["trainer"],"known":"wall","leg":2,"ms":6300,"planned_end":[["Route 203",55,18]],"tiles":50} + | Leg 3/4: north 12 (to wall) to Route 203 (55, 6) + | [Route] Turning north. + | [Sim] by the gate: north 12 (to wall): held north to blocked at (118, 10). + | [Speed] run north: 12 tiles in 2850 ms to the wall. + | [Route] by the gate: north 12 (to wall): ended at Route 203 (55, 6) (walked). + | [Leg] {"checkpoint":"01.02","chunks":12,"dir":"north","end":[["Route 203",55,6]],"end_kind":"wall","event":"by_the_gate","interrupts":[],"known":"wall","leg":3,"ms":2850,"planned_end":[["Route 203",55,6]],"tiles":12} + | Leg 4/4: south 3 (open) to Route 203 (55, 9) + | [Route] Turning south. + | [Sim] by the gate: south 3 (open): 3 taps south, 3 moved, limit at (118, 13). + | [Route] by the gate: south 3 (open): ended at Route 203 (55, 9) (walked). + | [Leg] {"checkpoint":"01.02","chunks":3,"dir":"south","end":[["Route 203",55,9]],"end_kind":"open","event":"by_the_gate","interrupts":[],"known":"dead_reckoned","leg":4,"moved":3,"ms":2400,"planned_end":[["Route 203",55,9]],"tiles":3} + | [Route] by the gate: arrived at Route 203 (55, 9). + | [Route] Turning east. + | [01.02] into_oreburgh_gate: through to OreburghGate after 1 taps east. + | into the hikers scene: 0 legs planned + | [Route] into the hikers scene: plan from OreburghGate (4, 22), OreburghGate (5, 22): + | [Route] into the hikers scene: arrived at OreburghGate (4, 22), OreburghGate (5, 22). + | [Sim] into the hikers scene: held east to dialog at (7, 22). + | [01.02] into_the_hikers_scene: ran east to a dialogue: 3 moved chunks, 6 tiles at most, dialog, 0 wild battle(s). + | [Leg] {"checkpoint":"01.02","chunks":3,"dir":"east","end":[],"end_kind":"open","event":"into_the_hikers_scene","interrupts":[],"known":"dialogue","leg":1,"ms":550,"planned_end":[],"tiles":6} + | past curtis: 1 legs planned + | [Route] past curtis: plan from OreburghGate (7, 22): east 13 (open) to OreburghGate (20, 22) + | Leg 1/1: east 13 (open) to OreburghGate (20, 22) + | [Route] Turning east. + | [Sim] past curtis: east 13 (open): 13 taps east, 13 moved, limit at (20, 22). + | [Route] past curtis: east 13 (open): ended at OreburghGate (20, 22) (walked). + | [Leg] {"checkpoint":"01.02","chunks":13,"dir":"east","end":[["OreburghGate",20,22]],"end_kind":"open","event":"past_curtis","interrupts":[],"known":"dead_reckoned","leg":1,"moved":13,"ms":10400,"planned_end":[["OreburghGate",20,22]],"tiles":13} + | [Route] past curtis: arrived at OreburghGate (20, 22). + | by the east mouth: 1 legs planned + | [Route] by the east mouth: plan from OreburghGate (20, 22): east 6 (open) to OreburghGate (26, 22) + | Leg 1/1: east 6 (open) to OreburghGate (26, 22) + | [Route] Turning east. + | [Sim] by the east mouth: east 6 (open): 6 taps east, 6 moved, limit at (26, 22). + | [Route] by the east mouth: east 6 (open): ended at OreburghGate (26, 22) (walked). + | [Leg] {"checkpoint":"01.02","chunks":6,"dir":"east","end":[["OreburghGate",26,22]],"end_kind":"open","event":"by_the_east_mouth","interrupts":[],"known":"dead_reckoned","leg":1,"moved":6,"ms":4800,"planned_end":[["OreburghGate",26,22]],"tiles":6} + | [Route] by the east mouth: arrived at OreburghGate (26, 22). + | [Route] Turning east. + | [01.02] into_oreburgh: through to OreburghCity after 2 taps east. + | into the welcome scene: 0 legs planned + | [Route] into the welcome scene: plan from Oreburgh City (2, 13), Oreburgh City (3, 13): + | [Route] into the welcome scene: arrived at Oreburgh City (2, 13), Oreburgh City (3, 13). + | [Sim] into the welcome scene: held east to dialog at (10, 13). + | [01.02] into_the_welcome_scene: ran east to a dialogue: 8 moved chunks, 12 tiles at most, dialog, 0 wild battle(s). + | [Leg] {"checkpoint":"01.02","chunks":8,"dir":"east","end":[],"end_kind":"open","event":"into_the_welcome_scene","interrupts":[],"known":"dialogue","leg":1,"ms":1050,"planned_end":[],"tiles":12} +01.02b: completed + ends on Oreburgh City (47, 21) + stubbed save + looked for 1 fades, 0 banners, 1 doors, 0 tap steps + | [Route] Turning south. + | [Sim] below_barry: 1 taps south, 1 moved, limit at (23, 24). + | [01.02b] below_barry: taps south moved 1 of 1 tiles. + | [Leg] {"checkpoint":"01.02b","chunks":1,"dir":"south","end":[["Oreburgh City",23,24]],"end_kind":"tile","event":"below_barry","interrupts":[],"known":"counted","leg":1,"moved":1,"ms":800,"planned_end":[["Oreburgh City",23,24]],"tiles":1} + | [Route] Turning east. + | [Sim] below_barry: 3 taps east, 3 moved, limit at (26, 24). + | [01.02b] below_barry: taps east moved 3 of 3 tiles. + | [Leg] {"checkpoint":"01.02b","chunks":3,"dir":"east","end":[["Oreburgh City",26,24]],"end_kind":"tile","event":"below_barry","interrupts":[],"known":"counted","leg":2,"moved":3,"ms":2400,"planned_end":[["Oreburgh City",26,24]],"tiles":3} + | [Route] Turning north. + | [Sim] below_barry: 2 taps north, 2 moved, limit at (26, 22). + | [01.02b] below_barry: taps north moved 2 of 2 tiles. + | [Leg] {"checkpoint":"01.02b","chunks":2,"dir":"north","end":[["Oreburgh City",26,22]],"end_kind":"tile","event":"below_barry","interrupts":[],"known":"counted","leg":3,"moved":2,"ms":1600,"planned_end":[["Oreburgh City",26,22]],"tiles":2} + | [Route] Turning north. + | below the centers door: 3 legs planned + | [Route] below the centers door: plan from Oreburgh City (26, 22): east 22 (to wall) to Oreburgh City (48, 22); north 1 (to wall) to Oreburgh City (48, 21); west 1 (open) to Oreburgh City (47, 21) + | Leg 1/3: east 22 (to wall) to Oreburgh City (48, 22) + | [Sim] below the centers door: east 22 (to wall): held east to blocked at (48, 22). + | [Route] below the centers door: east 22 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run east: 22 tiles in 3250 ms to the wall. + | [Route] below the centers door: east 22 (to wall): ended at Oreburgh City (48, 22) (walked). + | [Leg] {"checkpoint":"01.02b","chunks":22,"dir":"east","end":[["Oreburgh City",48,22]],"end_kind":"wall","event":"below_the_centers_door","interrupts":[],"known":"wall","leg":1,"ms":3250,"planned_end":[["Oreburgh City",48,22]],"tiles":22} + | Leg 2/3: north 1 (to wall) to Oreburgh City (48, 21) + | [Route] Turning north. + | [Sim] below the centers door: north 1 (to wall): held north to blocked at (48, 21). + | [Speed] run north: 1 tiles in 1200 ms to the wall. + | [Route] below the centers door: north 1 (to wall): ended at Oreburgh City (48, 21) (walked). + | [Leg] {"checkpoint":"01.02b","chunks":1,"dir":"north","end":[["Oreburgh City",48,21]],"end_kind":"wall","event":"below_the_centers_door","interrupts":[],"known":"wall","leg":2,"ms":1200,"planned_end":[["Oreburgh City",48,21]],"tiles":1} + | Leg 3/3: west 1 (open) to Oreburgh City (47, 21) + | [Route] Turning west. + | [Sim] below the centers door: west 1 (open): 1 taps west, 1 moved, limit at (47, 21). + | [Route] below the centers door: west 1 (open): ended at Oreburgh City (47, 21) (walked). + | [Leg] {"checkpoint":"01.02b","chunks":1,"dir":"west","end":[["Oreburgh City",47,21]],"end_kind":"open","event":"below_the_centers_door","interrupts":[],"known":"dead_reckoned","leg":3,"moved":1,"ms":800,"planned_end":[["Oreburgh City",47,21]],"tiles":1} + | [Route] below the centers door: arrived at Oreburgh City (47, 21). +01.03: completed + ends on Oreburgh City (47, 21) + stubbed save + looked for 5 fades, 0 banners, 5 doors, 0 tap steps + | above the mine: 6 legs planned + | [Route] above the mine: plan from Oreburgh City (47, 21), Oreburgh City (46, 21): east 2 (to wall) to Oreburgh City (48, 21); west 4 (open) to Oreburgh City (44, 21); south 20 (to wall) to Oreburgh City (44, 41); west 1 (open) to Oreburgh City (43, 41); south 16 (to wall) to Oreburgh City (43, 57); east 3 (open) to Oreburgh City (46, 57) + | Leg 1/6: east 2 (to wall) to Oreburgh City (48, 21) + | [Sim] above the mine: east 2 (to wall): held east to blocked at (48, 21). + | [Route] above the mine: east 2 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run east: 1 tiles in 1150 ms to the wall. + | [Route] above the mine: east 2 (to wall): ended at Oreburgh City (48, 21) (walked). + | [Leg] {"checkpoint":"01.03","chunks":1,"dir":"east","end":[["Oreburgh City",48,21]],"end_kind":"wall","event":"above_the_mine","interrupts":[],"known":"wall","leg":1,"ms":1150,"planned_end":[["Oreburgh City",48,21]],"tiles":2} + | Leg 2/6: west 4 (open) to Oreburgh City (44, 21) + | [Route] Turning west. + | [Sim] above the mine: west 4 (open): 4 taps west, 4 moved, limit at (44, 21). + | [Route] above the mine: west 4 (open): ended at Oreburgh City (44, 21) (walked). + | [Leg] {"checkpoint":"01.03","chunks":4,"dir":"west","end":[["Oreburgh City",44,21]],"end_kind":"open","event":"above_the_mine","interrupts":[],"known":"dead_reckoned","leg":2,"moved":4,"ms":3200,"planned_end":[["Oreburgh City",44,21]],"tiles":4} + | Leg 3/6: south 20 (to wall) to Oreburgh City (44, 41) + | [Route] Turning south. + | [Sim] above the mine: south 20 (to wall): held south to blocked at (44, 41). + | [Speed] run south: 20 tiles in 4050 ms to the wall. + | [Route] above the mine: south 20 (to wall): ended at Oreburgh City (44, 41) (walked). + | [Leg] {"checkpoint":"01.03","chunks":20,"dir":"south","end":[["Oreburgh City",44,41]],"end_kind":"wall","event":"above_the_mine","interrupts":[],"known":"wall","leg":3,"ms":4050,"planned_end":[["Oreburgh City",44,41]],"tiles":20} + | Leg 4/6: west 1 (open) to Oreburgh City (43, 41) + | [Route] Turning west. + | [Sim] above the mine: west 1 (open): 1 taps west, 1 moved, limit at (43, 41). + | [Route] above the mine: west 1 (open): ended at Oreburgh City (43, 41) (walked). + | [Leg] {"checkpoint":"01.03","chunks":1,"dir":"west","end":[["Oreburgh City",43,41]],"end_kind":"open","event":"above_the_mine","interrupts":[],"known":"dead_reckoned","leg":4,"moved":1,"ms":800,"planned_end":[["Oreburgh City",43,41]],"tiles":1} + | Leg 5/6: south 16 (to wall) to Oreburgh City (43, 57) + | [Route] Turning south. + | [Sim] above the mine: south 16 (to wall): held south to blocked at (43, 57). + | [Speed] run south: 16 tiles in 3450 ms to the wall. + | [Route] above the mine: south 16 (to wall): ended at Oreburgh City (43, 57) (walked). + | [Leg] {"checkpoint":"01.03","chunks":16,"dir":"south","end":[["Oreburgh City",43,57]],"end_kind":"wall","event":"above_the_mine","interrupts":[],"known":"wall","leg":5,"ms":3450,"planned_end":[["Oreburgh City",43,57]],"tiles":16} + | Leg 6/6: east 3 (open) to Oreburgh City (46, 57) + | [Route] Turning east. + | [Sim] above the mine: east 3 (open): 3 taps east, 3 moved, limit at (46, 57). + | [Route] above the mine: east 3 (open): ended at Oreburgh City (46, 57) (walked). + | [Leg] {"checkpoint":"01.03","chunks":3,"dir":"east","end":[["Oreburgh City",46,57]],"end_kind":"open","event":"above_the_mine","interrupts":[],"known":"dead_reckoned","leg":6,"moved":3,"ms":2400,"planned_end":[["Oreburgh City",46,57]],"tiles":3} + | [Route] above the mine: arrived at Oreburgh City (46, 57). + | [01.03] into_the_mine: south through the door (timeout 4500 ms, dark from 467 ms): black fade. + | [01.03] into_the_coal_room: south through the door (timeout 4500 ms, dark from 2762 ms): black fade. + | [Leg] {"checkpoint":"01.03","chunks":0,"dir":"south","end":[],"end_kind":"wall","event":"south_to_the_rock","interrupts":[],"known":"wall","leg":1,"ms":0,"planned_end":[],"tiles":8} + | [Route] Turning east. + | [Sim] to_roarks_corner: 1 taps east, 1 moved, limit at (16, 9). + | [01.03] to_roarks_corner: taps east moved 1 of 1 tiles. + | [Leg] {"checkpoint":"01.03","chunks":1,"dir":"east","end":[["OreburghMine",16,9]],"end_kind":"tile","event":"to_roarks_corner","interrupts":[],"known":"counted","leg":1,"moved":1,"ms":800,"planned_end":[["OreburghMine",16,9]],"tiles":1} + | [Route] Turning south. + | [Sim] to_roarks_corner: 2 taps south, 2 moved, limit at (16, 11). + | [01.03] to_roarks_corner: taps south moved 2 of 2 tiles. + | [Leg] {"checkpoint":"01.03","chunks":2,"dir":"south","end":[["OreburghMine",16,11]],"end_kind":"tile","event":"to_roarks_corner","interrupts":[],"known":"counted","leg":2,"moved":2,"ms":1600,"planned_end":[["OreburghMine",16,11]],"tiles":2} + | [Route] Turning west. + | [Sim] to_roarks_corner: 1 taps west, 1 moved, limit at (15, 11). + | [01.03] to_roarks_corner: taps west moved 1 of 1 tiles. + | [Leg] {"checkpoint":"01.03","chunks":1,"dir":"west","end":[["OreburghMine",15,11]],"end_kind":"tile","event":"to_roarks_corner","interrupts":[],"known":"counted","leg":3,"moved":1,"ms":800,"planned_end":[["OreburghMine",15,11]],"tiles":1} + | [Route] Turning south. + | [Sim] to_roarks_corner: 5 taps south, 5 moved, limit at (15, 16). + | [01.03] to_roarks_corner: taps south moved 5 of 5 tiles. + | [Leg] {"checkpoint":"01.03","chunks":5,"dir":"south","end":[["OreburghMine",15,16]],"end_kind":"tile","event":"to_roarks_corner","interrupts":[],"known":"counted","leg":4,"moved":5,"ms":4000,"planned_end":[["OreburghMine",15,16]],"tiles":5} + | [Route] Turning east. + | [Sim] to_roarks_corner: 14 taps east, 14 moved, limit at (29, 16). + | [01.03] to_roarks_corner: taps east moved 14 of 14 tiles. + | [Leg] {"checkpoint":"01.03","chunks":14,"dir":"east","end":[["OreburghMine",29,16]],"end_kind":"tile","event":"to_roarks_corner","interrupts":[],"known":"counted","leg":5,"moved":14,"ms":11200,"planned_end":[["OreburghMine",29,16]],"tiles":14} + | [Route] Turning south. + | [Sim] to_roarks_corner: 10 taps south, 10 moved, limit at (29, 26). + | [01.03] to_roarks_corner: taps south moved 10 of 10 tiles. + | [Leg] {"checkpoint":"01.03","chunks":10,"dir":"south","end":[["OreburghMine",29,26]],"end_kind":"tile","event":"to_roarks_corner","interrupts":[],"known":"counted","leg":6,"moved":10,"ms":8000,"planned_end":[["OreburghMine",29,26]],"tiles":10} + | [Route] Turning west. + | [Sim] to_roarks_corner: 2 taps west, 2 moved, limit at (27, 26). + | [01.03] to_roarks_corner: taps west moved 2 of 2 tiles. + | [Leg] {"checkpoint":"01.03","chunks":2,"dir":"west","end":[["OreburghMine",27,26]],"end_kind":"tile","event":"to_roarks_corner","interrupts":[],"known":"counted","leg":7,"moved":2,"ms":1600,"planned_end":[["OreburghMine",27,26]],"tiles":2} + | [Route] Turning south. + | [Sim] to_roarks_corner: 2 taps south, 2 moved, limit at (27, 28). + | [01.03] to_roarks_corner: taps south moved 2 of 2 tiles. + | [Leg] {"checkpoint":"01.03","chunks":2,"dir":"south","end":[["OreburghMine",27,28]],"end_kind":"tile","event":"to_roarks_corner","interrupts":[],"known":"counted","leg":8,"moved":2,"ms":1600,"planned_end":[["OreburghMine",27,28]],"tiles":2} + | [Route] Turning west. + | [Sim] to_roarks_corner: 7 taps west, 7 moved, limit at (20, 28). + | [01.03] to_roarks_corner: taps west moved 7 of 7 tiles. + | [Leg] {"checkpoint":"01.03","chunks":7,"dir":"west","end":[["OreburghMine",20,28]],"end_kind":"tile","event":"to_roarks_corner","interrupts":[],"known":"counted","leg":9,"moved":7,"ms":5600,"planned_end":[["OreburghMine",20,28]],"tiles":7} + | [Leg] {"checkpoint":"01.03","chunks":0,"dir":"south","end":[],"end_kind":"wall","event":"beside_roarks_rock","interrupts":[],"known":"wall","leg":1,"ms":0,"planned_end":[],"tiles":1} + | [Route] Turning west. + | [Sim] below_roark: 2 taps west, 2 moved, limit at (18, 29). + | [01.03] below_roark: taps west moved 2 of 2 tiles. + | [Leg] {"checkpoint":"01.03","chunks":2,"dir":"west","end":[["OreburghMine",18,29]],"end_kind":"tile","event":"below_roark","interrupts":[],"known":"counted","leg":1,"moved":2,"ms":1600,"planned_end":[["OreburghMine",18,29]],"tiles":2} + | [Route] Turning north. + | [Route] Turning east. + | [Sim] below_the_coal_rooms_warp: 9 taps east, 9 moved, limit at (27, 29). + | [01.03] below_the_coal_rooms_warp: taps east moved 9 of 9 tiles. + | [Leg] {"checkpoint":"01.03","chunks":9,"dir":"east","end":[["OreburghMine",27,29]],"end_kind":"tile","event":"below_the_coal_rooms_warp","interrupts":[],"known":"counted","leg":1,"moved":9,"ms":7200,"planned_end":[["OreburghMine",27,29]],"tiles":9} + | [Route] Turning north. + | [Sim] below_the_coal_rooms_warp: 3 taps north, 3 moved, limit at (27, 26). + | [01.03] below_the_coal_rooms_warp: taps north moved 3 of 3 tiles. + | [Leg] {"checkpoint":"01.03","chunks":3,"dir":"north","end":[["OreburghMine",27,26]],"end_kind":"tile","event":"below_the_coal_rooms_warp","interrupts":[],"known":"counted","leg":2,"moved":3,"ms":2400,"planned_end":[["OreburghMine",27,26]],"tiles":3} + | [Route] Turning east. + | [Sim] below_the_coal_rooms_warp: 2 taps east, 2 moved, limit at (29, 26). + | [01.03] below_the_coal_rooms_warp: taps east moved 2 of 2 tiles. + | [Leg] {"checkpoint":"01.03","chunks":2,"dir":"east","end":[["OreburghMine",29,26]],"end_kind":"tile","event":"below_the_coal_rooms_warp","interrupts":[],"known":"counted","leg":3,"moved":2,"ms":1600,"planned_end":[["OreburghMine",29,26]],"tiles":2} + | [Route] Turning north. + | [Sim] below_the_coal_rooms_warp: 10 taps north, 10 moved, limit at (29, 16). + | [01.03] below_the_coal_rooms_warp: taps north moved 10 of 10 tiles. + | [Leg] {"checkpoint":"01.03","chunks":10,"dir":"north","end":[["OreburghMine",29,16]],"end_kind":"tile","event":"below_the_coal_rooms_warp","interrupts":[],"known":"counted","leg":4,"moved":10,"ms":8000,"planned_end":[["OreburghMine",29,16]],"tiles":10} + | [Route] Turning west. + | [Sim] below_the_coal_rooms_warp: 14 taps west, 14 moved, limit at (15, 16). + | [01.03] below_the_coal_rooms_warp: taps west moved 14 of 14 tiles. + | [Leg] {"checkpoint":"01.03","chunks":14,"dir":"west","end":[["OreburghMine",15,16]],"end_kind":"tile","event":"below_the_coal_rooms_warp","interrupts":[],"known":"counted","leg":5,"moved":14,"ms":11200,"planned_end":[["OreburghMine",15,16]],"tiles":14} + | [Route] Turning north. + | [Sim] below_the_coal_rooms_warp: 5 taps north, 5 moved, limit at (15, 11). + | [01.03] below_the_coal_rooms_warp: taps north moved 5 of 5 tiles. + | [Leg] {"checkpoint":"01.03","chunks":5,"dir":"north","end":[["OreburghMine",15,11]],"end_kind":"tile","event":"below_the_coal_rooms_warp","interrupts":[],"known":"counted","leg":6,"moved":5,"ms":4000,"planned_end":[["OreburghMine",15,11]],"tiles":5} + | [Route] Turning east. + | [Sim] below_the_coal_rooms_warp: 1 taps east, 1 moved, limit at (16, 11). + | [01.03] below_the_coal_rooms_warp: taps east moved 1 of 1 tiles. + | [Leg] {"checkpoint":"01.03","chunks":1,"dir":"east","end":[["OreburghMine",16,11]],"end_kind":"tile","event":"below_the_coal_rooms_warp","interrupts":[],"known":"counted","leg":7,"moved":1,"ms":800,"planned_end":[["OreburghMine",16,11]],"tiles":1} + | [Route] Turning north. + | [Sim] below_the_coal_rooms_warp: 2 taps north, 2 moved, limit at (16, 9). + | [01.03] below_the_coal_rooms_warp: taps north moved 2 of 2 tiles. + | [Leg] {"checkpoint":"01.03","chunks":2,"dir":"north","end":[["OreburghMine",16,9]],"end_kind":"tile","event":"below_the_coal_rooms_warp","interrupts":[],"known":"counted","leg":8,"moved":2,"ms":1600,"planned_end":[["OreburghMine",16,9]],"tiles":2} + | [Route] Turning west. + | [Sim] below_the_coal_rooms_warp: 1 taps west, 1 moved, limit at (15, 9). + | [01.03] below_the_coal_rooms_warp: taps west moved 1 of 1 tiles. + | [Leg] {"checkpoint":"01.03","chunks":1,"dir":"west","end":[["OreburghMine",15,9]],"end_kind":"tile","event":"below_the_coal_rooms_warp","interrupts":[],"known":"counted","leg":9,"moved":1,"ms":800,"planned_end":[["OreburghMine",15,9]],"tiles":1} + | [Route] Turning north. + | [Sim] below_the_coal_rooms_warp: 7 taps north, 7 moved, limit at (15, 2). + | [01.03] below_the_coal_rooms_warp: taps north moved 7 of 7 tiles. + | [Leg] {"checkpoint":"01.03","chunks":7,"dir":"north","end":[["OreburghMine",15,2]],"end_kind":"tile","event":"below_the_coal_rooms_warp","interrupts":[],"known":"counted","leg":10,"moved":7,"ms":5600,"planned_end":[["OreburghMine",15,2]],"tiles":7} + | [01.03] up_to_the_hall: north through the door (timeout 4500 ms, dark from 340 ms): black fade. + | [01.03] out_of_the_mine: north through the door (timeout 4500 ms, dark from 2762 ms): black fade. + | [Route] Turning north. + | [Sim] north to the centers wall: held north to blocked at (46, 21). + | [Route] north to the centers wall: about 38 tiles to the wall; the map has 37 to 38. + | [Leg] {"checkpoint":"01.03","chunks":38,"dir":"north","end":[],"end_kind":"wall","event":"north_to_the_centers_wall","interrupts":[],"known":"wall","leg":1,"ms":6750,"planned_end":[],"tiles":37} + | [Route] Turning east. + | [Sim] east_below_the_centers_door: 1 taps east, 1 moved, limit at (47, 21). + | [01.03] east_below_the_centers_door: taps east moved 1 of 1 tiles. + | [Leg] {"checkpoint":"01.03","chunks":1,"dir":"east","end":[["Oreburgh City",47,21]],"end_kind":"tile","event":"east_below_the_centers_door","interrupts":[],"known":"counted","leg":1,"moved":1,"ms":800,"planned_end":[["Oreburgh City",47,21]],"tiles":1} +01.04: completed + ends on OreburghGym (5, 4) + stubbed save + stubbed gym_until_roark_beaten + looked for 0 fades, 0 banners, 0 doors, 0 tap steps +01.05: completed + ends on Route 203 (55, 9) + stubbed save + looked for 3 fades, 2 banners, 1 doors, 2 tap steps + | [Route] Turning south. + | [01.05] out_of_the_gym: through to OreburghCity after 20 taps south. + | east of barrys trigger: 5 legs planned + | [Route] east of barrys trigger: plan from Oreburgh City (26, 21), Oreburgh City (26, 22): south 5 (to wall) to Oreburgh City (26, 26); north 1 (open) to Oreburgh City (26, 25); west 14 (to wall) to Oreburgh City (12, 25); north 12 (open) to Oreburgh City (12, 13); west 5 (open) to Oreburgh City (7, 13) + | Leg 1/5: south 5 (to wall) to Oreburgh City (26, 26) + | [Sim] east of barrys trigger: south 5 (to wall): held south to blocked at (26, 26). + | [Route] east of barrys trigger: south 5 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run south: 4 tiles in 1800 ms to the wall. + | [Route] east of barrys trigger: south 5 (to wall): ended at Oreburgh City (26, 26) (walked). + | [Leg] {"checkpoint":"01.05","chunks":5,"dir":"south","end":[["Oreburgh City",26,26]],"end_kind":"wall","event":"east_of_barrys_trigger","interrupts":[],"known":"wall","leg":1,"ms":1800,"planned_end":[["Oreburgh City",26,26]],"tiles":5} + | Leg 2/5: north 1 (open) to Oreburgh City (26, 25) + | [Route] Turning north. + | [Sim] east of barrys trigger: north 1 (open): 1 taps north, 1 moved, limit at (26, 25). + | [Route] east of barrys trigger: north 1 (open): ended at Oreburgh City (26, 25) (walked). + | [Leg] {"checkpoint":"01.05","chunks":1,"dir":"north","end":[["Oreburgh City",26,25]],"end_kind":"open","event":"east_of_barrys_trigger","interrupts":[],"known":"dead_reckoned","leg":2,"moved":1,"ms":800,"planned_end":[["Oreburgh City",26,25]],"tiles":1} + | Leg 3/5: west 14 (to wall) to Oreburgh City (12, 25) + | [Route] Turning west. + | [Sim] east of barrys trigger: west 14 (to wall): held west to blocked at (12, 25). + | [Speed] run west: 14 tiles in 2450 ms to the wall. + | [Route] east of barrys trigger: west 14 (to wall): ended at Oreburgh City (12, 25) (walked). + | [Leg] {"checkpoint":"01.05","chunks":14,"dir":"west","end":[["Oreburgh City",12,25]],"end_kind":"wall","event":"east_of_barrys_trigger","interrupts":[],"known":"wall","leg":3,"ms":2450,"planned_end":[["Oreburgh City",12,25]],"tiles":14} + | Leg 4/5: north 12 (open) to Oreburgh City (12, 13) + | [Route] Turning north. + | [Sim] east of barrys trigger: north 12 (open): 12 taps north, 12 moved, limit at (12, 13). + | [Route] east of barrys trigger: north 12 (open): ended at Oreburgh City (12, 13) (walked). + | [Leg] {"checkpoint":"01.05","chunks":12,"dir":"north","end":[["Oreburgh City",12,13]],"end_kind":"open","event":"east_of_barrys_trigger","interrupts":[],"known":"dead_reckoned","leg":4,"moved":12,"ms":9600,"planned_end":[["Oreburgh City",12,13]],"tiles":12} + | Leg 5/5: west 5 (open) to Oreburgh City (7, 13) + | [Route] Turning west. + | [Sim] east of barrys trigger: west 5 (open): 5 taps west, 5 moved, limit at (7, 13). + | [Route] east of barrys trigger: west 5 (open): ended at Oreburgh City (7, 13) (walked). + | [Leg] {"checkpoint":"01.05","chunks":5,"dir":"west","end":[["Oreburgh City",7,13]],"end_kind":"open","event":"east_of_barrys_trigger","interrupts":[],"known":"dead_reckoned","leg":5,"moved":5,"ms":4000,"planned_end":[["Oreburgh City",7,13]],"tiles":5} + | [Route] east of barrys trigger: arrived at Oreburgh City (7, 13). + | [Route] Turning west. + | [Sim] barrys_trigger: 1 taps west, 1 moved, dialog at (6, 13). + | [01.05] barrys_trigger: a step west, dialog. + | [Leg] {"checkpoint":"01.05","chunks":0,"dir":"south","end":[],"end_kind":"wall","event":"below_the_gates_mouth","interrupts":[],"known":"wall","leg":1,"ms":0,"planned_end":[],"tiles":6} + | [Leg] {"checkpoint":"01.05","chunks":0,"dir":"west","end":[],"end_kind":"wall","event":"below_the_gates_mouth","interrupts":[],"known":"wall","leg":2,"ms":0,"planned_end":[],"tiles":6} + | [Route] Turning north. + | [Sim] to_the_gates_row: 4 taps north, 4 moved, limit at (2, 13). + | [01.05] to_the_gates_row: taps north moved 4 of 4 tiles. + | [Leg] {"checkpoint":"01.05","chunks":4,"dir":"north","end":[["Oreburgh City",2,13]],"end_kind":"tile","event":"to_the_gates_row","interrupts":[],"known":"counted","leg":1,"moved":4,"ms":3200,"planned_end":[["Oreburgh City",2,13]],"tiles":4} + | [01.05] into_oreburgh_gate: west through the door (timeout 4500 ms, dark from 297 ms): black fade. + | through the gate: 6 legs planned + | [Route] through the gate: plan from OreburghGate (27, 22), OreburghGate (26, 22): north 2 (to wall) to OreburghGate (27, 20), OreburghGate (26, 21); east 1 (to wall) to OreburghGate (27, 20), OreburghGate (27, 21); south 3 (to wall) to OreburghGate (27, 23); west 19 (to wall) to OreburghGate (8, 23); north 1 (to wall) to OreburghGate (8, 22); west 3 (open) to OreburghGate (5, 22) + | Leg 1/6: north 2 (to wall) to OreburghGate (27, 20), OreburghGate (26, 21) + | [Sim] through the gate: north 2 (to wall): held north to blocked at (27, 20). + | [Route] through the gate: north 2 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run north: 1 tiles in 1350 ms to the wall. + | [Route] through the gate: north 2 (to wall): ended at OreburghGate (27, 20), OreburghGate (26, 21) (walked). + | [Leg] {"checkpoint":"01.05","chunks":2,"dir":"north","end":[["OreburghGate",27,20],["OreburghGate",26,21]],"end_kind":"wall","event":"through_the_gate","interrupts":[],"known":"wall","leg":1,"ms":1350,"planned_end":[["OreburghGate",27,20],["OreburghGate",26,21]],"tiles":2} + | Leg 2/6: east 1 (to wall) to OreburghGate (27, 20), OreburghGate (27, 21) + | [Route] Turning east. + | [Sim] through the gate: east 1 (to wall): held east to blocked at (27, 20). + | [Speed] run east: 0 tiles in 1050 ms to the wall. + | [Route] through the gate: east 1 (to wall): ended at OreburghGate (27, 20), OreburghGate (27, 21) (walked). + | [Leg] {"checkpoint":"01.05","chunks":0,"dir":"east","end":[["OreburghGate",27,20],["OreburghGate",27,21]],"end_kind":"wall","event":"through_the_gate","interrupts":[],"known":"wall","leg":2,"ms":1050,"planned_end":[["OreburghGate",27,20],["OreburghGate",27,21]],"tiles":1} + | Leg 3/6: south 3 (to wall) to OreburghGate (27, 23) + | [Route] Turning south. + | [Sim] through the gate: south 3 (to wall): held south to blocked at (27, 23). + | [Speed] run south: 2 tiles in 1500 ms to the wall. + | [Route] through the gate: south 3 (to wall): ended at OreburghGate (27, 23) (walked). + | [Leg] {"checkpoint":"01.05","chunks":3,"dir":"south","end":[["OreburghGate",27,23]],"end_kind":"wall","event":"through_the_gate","interrupts":[],"known":"wall","leg":3,"ms":1500,"planned_end":[["OreburghGate",27,23]],"tiles":3} + | Leg 4/6: west 19 (to wall) to OreburghGate (8, 23) + | [Route] Turning west. + | [Sim] through the gate: west 19 (to wall): held west to blocked at (8, 23). + | [Speed] run west: 19 tiles in 2950 ms to the wall. + | [Route] through the gate: west 19 (to wall): ended at OreburghGate (8, 23) (walked). + | [Leg] {"checkpoint":"01.05","chunks":19,"dir":"west","end":[["OreburghGate",8,23]],"end_kind":"wall","event":"through_the_gate","interrupts":[],"known":"wall","leg":4,"ms":2950,"planned_end":[["OreburghGate",8,23]],"tiles":19} + | Leg 5/6: north 1 (to wall) to OreburghGate (8, 22) + | [Route] Turning north. + | [Sim] through the gate: north 1 (to wall): held north to blocked at (8, 22). + | [Speed] run north: 1 tiles in 1200 ms to the wall. + | [Route] through the gate: north 1 (to wall): ended at OreburghGate (8, 22) (walked). + | [Leg] {"checkpoint":"01.05","chunks":1,"dir":"north","end":[["OreburghGate",8,22]],"end_kind":"wall","event":"through_the_gate","interrupts":[],"known":"wall","leg":5,"ms":1200,"planned_end":[["OreburghGate",8,22]],"tiles":1} + | Leg 6/6: west 3 (open) to OreburghGate (5, 22) + | [Route] Turning west. + | [Sim] through the gate: west 3 (open): 3 taps west, 3 moved, limit at (5, 22). + | [Route] through the gate: west 3 (open): ended at OreburghGate (5, 22) (walked). + | [Leg] {"checkpoint":"01.05","chunks":3,"dir":"west","end":[["OreburghGate",5,22]],"end_kind":"open","event":"through_the_gate","interrupts":[],"known":"dead_reckoned","leg":6,"moved":3,"ms":2400,"planned_end":[["OreburghGate",5,22]],"tiles":3} + | [Route] through the gate: arrived at OreburghGate (5, 22). + | [Route] Turning west. + | [01.05] out_of_oreburgh_gate: through to Route203 after 2 taps west. +01.06: completed + ends on Jubilife City (47, 8) + stubbed save + looked for 0 fades, 0 banners, 0 doors, 0 tap steps + | up jubilifes road: 5 legs planned + | [Route] up jubilifes road: plan from Route 203 (55, 9): south 10 (to wall) to Route 203 (55, 19); west 17 (to wall) to Route 203 (38, 19); north 1 (open) to Route 203 (38, 18); west 60 (open) to Jubilife City (41, 22); north 14 (to wall) to Jubilife City (41, 8) + | Leg 1/5: south 10 (to wall) to Route 203 (55, 19) + | [Sim] up jubilifes road: south 10 (to wall): held south to blocked at (118, 23). + | [Route] up jubilifes road: south 10 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run south: 10 tiles in 2550 ms to the wall. + | [Route] up jubilifes road: south 10 (to wall): ended at Route 203 (55, 19) (walked). + | [Leg] {"checkpoint":"01.06","chunks":10,"dir":"south","end":[["Route 203",55,19]],"end_kind":"wall","event":"up_jubilifes_road","interrupts":[],"known":"wall","leg":1,"ms":2550,"planned_end":[["Route 203",55,19]],"tiles":10} + | Leg 2/5: west 17 (to wall) to Route 203 (38, 19) + | [Route] Turning west. + | [Sim] up jubilifes road: west 17 (to wall): held west to blocked at (101, 23). + | [Speed] run west: 17 tiles in 2750 ms to the wall. + | [Route] up jubilifes road: west 17 (to wall): ended at Route 203 (38, 19) (walked). + | [Leg] {"checkpoint":"01.06","chunks":17,"dir":"west","end":[["Route 203",38,19]],"end_kind":"wall","event":"up_jubilifes_road","interrupts":[],"known":"wall","leg":2,"ms":2750,"planned_end":[["Route 203",38,19]],"tiles":17} + | Leg 3/5: north 1 (open) to Route 203 (38, 18) + | [Route] Turning north. + | [Sim] up jubilifes road: north 1 (open): 1 taps north, 1 moved, limit at (101, 22). + | [Route] up jubilifes road: north 1 (open): ended at Route 203 (38, 18) (walked). + | [Leg] {"checkpoint":"01.06","chunks":1,"dir":"north","end":[["Route 203",38,18]],"end_kind":"open","event":"up_jubilifes_road","interrupts":[],"known":"dead_reckoned","leg":3,"moved":1,"ms":800,"planned_end":[["Route 203",38,18]],"tiles":1} + | Leg 4/5: west 60 (open) to Jubilife City (41, 22) + | [Route] Turning west. + | [Sim] up jubilifes road: west 60 (open): 60 taps west, 60 moved, limit at (41, 22). + | [Route] up jubilifes road: west 60 (open): no banner read for Jubilife City; going on. + | [Route] up jubilifes road: west 60 (open): ended at Jubilife City (41, 22) (walked). + | [Leg] {"checkpoint":"01.06","chunks":60,"dir":"west","end":[["Jubilife City",41,22]],"end_kind":"open","event":"up_jubilifes_road","interrupts":[],"known":"dead_reckoned","leg":4,"moved":60,"ms":48000,"planned_end":[["Jubilife City",41,22]],"tiles":60} + | Leg 5/5: north 14 (to wall) to Jubilife City (41, 8) + | [Route] Turning north. + | [Sim] up jubilifes road: north 14 (to wall): held north to blocked at (41, 8). + | [Speed] run north: 14 tiles in 3150 ms to the wall. + | [Route] up jubilifes road: north 14 (to wall): ended at Jubilife City (41, 8) (walked). + | [Leg] {"checkpoint":"01.06","chunks":14,"dir":"north","end":[["Jubilife City",41,8]],"end_kind":"wall","event":"up_jubilifes_road","interrupts":[],"known":"wall","leg":5,"ms":3150,"planned_end":[["Jubilife City",41,8]],"tiles":14} + | [Route] up jubilifes road: no banner read for Jubilife City; going on. + | [Route] up jubilifes road: arrived at Jubilife City (41, 8). + | below rowans trigger: 1 legs planned + | [Route] below rowans trigger: plan from Jubilife City (41, 8): east 6 (to wall) to Jubilife City (47, 8) + | Leg 1/1: east 6 (to wall) to Jubilife City (47, 8) + | [Sim] below rowans trigger: east 6 (to wall): held east to blocked at (47, 8). + | [Route] below rowans trigger: east 6 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run east: 6 tiles in 1650 ms to the wall. + | [Route] below rowans trigger: east 6 (to wall): ended at Jubilife City (47, 8) (walked). + | [Leg] {"checkpoint":"01.06","chunks":6,"dir":"east","end":[["Jubilife City",47,8]],"end_kind":"wall","event":"below_rowans_trigger","interrupts":[],"known":"wall","leg":1,"ms":1650,"planned_end":[["Jubilife City",47,8]],"tiles":6} + | [Route] below rowans trigger: arrived at Jubilife City (47, 8). +01.07: completed + ends on Jubilife City (46, 5) + stubbed save + stubbed galactic_grunts + looked for 0 fades, 0 banners, 0 doors, 0 tap steps + | [Route] Turning north. + | [Sim] rowans_trigger: 1 taps north, 1 moved, dialog at (47, 7). + | [01.07] rowans_trigger: a step north, dialog. + | rowan and dawn leave: no line within 15 s; the step before played it. +01.08: completed + ends on RavagedPath (19, 50) + stubbed save + looked for 1 fades, 1 banners, 0 doors, 1 tap steps + | west to the wall: 1 legs planned + | [Route] west to the wall: plan from Jubilife City (46, 5), Jubilife City (47, 5): west 3 (to wall) to Jubilife City (44, 5) + | Leg 1/1: west 3 (to wall) to Jubilife City (44, 5) + | [Sim] west to the wall: west 3 (to wall): held west to blocked at (44, 5). + | [Route] west to the wall: west 3 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run west: 2 tiles in 1250 ms to the wall. + | [Route] west to the wall: west 3 (to wall): ended at Jubilife City (44, 5) (walked). + | [Leg] {"checkpoint":"01.08","chunks":2,"dir":"west","end":[["Jubilife City",44,5]],"end_kind":"wall","event":"west_to_the_wall","interrupts":[],"known":"wall","leg":1,"ms":1250,"planned_end":[["Jubilife City",44,5]],"tiles":3} + | [Route] west to the wall: arrived at Jubilife City (44, 5). + | below the ravaged path: 5 legs planned + | [Route] below the ravaged path: plan from Jubilife City (44, 5): east 2 (open) to Jubilife City (46, 5); north 19 (to wall) to Route 204 (14, 18); west 4 (open) to Route 204 (10, 18); north 15 (to wall) to Route 204 (10, 3); east 1 (open) to Route 204 (11, 3) + | Leg 1/5: east 2 (open) to Jubilife City (46, 5) + | [Route] Turning east. + | [Sim] below the ravaged path: east 2 (open): 2 taps east, 2 moved, limit at (46, 37). + | [Route] below the ravaged path: east 2 (open): ended at Jubilife City (46, 5) (walked). + | [Leg] {"checkpoint":"01.08","chunks":2,"dir":"east","end":[["Jubilife City",46,5]],"end_kind":"open","event":"below_the_ravaged_path","interrupts":[],"known":"dead_reckoned","leg":1,"moved":2,"ms":1600,"planned_end":[["Jubilife City",46,5]],"tiles":2} + | Leg 2/5: north 19 (to wall) to Route 204 (14, 18) + | [Route] Turning north. + | [Sim] below the ravaged path: north 19 (to wall): held north to dialog at (46, 21). + | [Route] below the ravaged path: north 19 (to wall): no banner read for Route 204; going on. + | [Route] below the ravaged path: Lass Sarah stopped us about Route 204 (14, 21). + | Fighting Lass Sarah. + | [Route] below the ravaged path: north 19 (to wall): on to the wall: on to the wall after the battle. + | [Sim] below the ravaged path: north 19 (to wall): on to the wall: held north to blocked at (46, 18). + | [Route] below the ravaged path: north 19 (to wall): on to the wall: facing unknown; the first moved chunk may be the turn, not counted. + | [Route] below the ravaged path: north 19 (to wall): ended at Route 204 (14, 18) (walked). + | [Leg] {"checkpoint":"01.08","chunks":19,"dir":"north","end":[["Route 204",14,18]],"end_kind":"wall","event":"below_the_ravaged_path","interrupts":["trainer"],"known":"wall","leg":2,"ms":4150,"planned_end":[["Route 204",14,18]],"tiles":19} + | Leg 3/5: west 4 (open) to Route 204 (10, 18) + | [Route] Turning west. + | [Sim] below the ravaged path: west 4 (open): 4 taps west, 3 moved, dialog at (43, 18). + | [Route] below the ravaged path: Lass Sarah stopped us about Route 204 (12, 18). + | Fighting Lass Sarah. + | [Route] below the ravaged path: west 4 (open): 3 taps before the battle, or where they saw us, at Route 204 (11, 18), Route 204 (12, 18); planning again. + | [Leg] {"checkpoint":"01.08","chunks":3,"dir":"west","end":[["Route 204",11,18],["Route 204",12,18]],"end_kind":"open","event":"below_the_ravaged_path","interrupts":["trainer"],"known":"seen","leg":3,"moved":3,"ms":2400,"note":"replan","planned_end":[["Route 204",10,18]],"tiles":4} + | below the ravaged path: 4 legs planned + | [Route] below the ravaged path: plan from Route 204 (11, 18), Route 204 (12, 18): west 4 (to wall) to Route 204 (8, 18); east 2 (open) to Route 204 (10, 18); north 15 (to wall) to Route 204 (10, 3); east 1 (open) to Route 204 (11, 3) + | Leg 1/4: west 4 (to wall) to Route 204 (8, 18) + | [Sim] below the ravaged path: west 4 (to wall): held west to blocked at (40, 18). + | [Speed] run west: 3 tiles in 1350 ms to the wall. + | [Route] below the ravaged path: west 4 (to wall): ended at Route 204 (8, 18) (walked). + | [Leg] {"checkpoint":"01.08","chunks":3,"dir":"west","end":[["Route 204",8,18]],"end_kind":"wall","event":"below_the_ravaged_path","interrupts":[],"known":"wall","leg":4,"ms":1350,"planned_end":[["Route 204",8,18]],"tiles":4} + | Leg 2/4: east 2 (open) to Route 204 (10, 18) + | [Route] Turning east. + | [Sim] below the ravaged path: east 2 (open): 2 taps east, 2 moved, limit at (42, 18). + | [Route] below the ravaged path: east 2 (open): ended at Route 204 (10, 18) (walked). + | [Leg] {"checkpoint":"01.08","chunks":2,"dir":"east","end":[["Route 204",10,18]],"end_kind":"open","event":"below_the_ravaged_path","interrupts":[],"known":"dead_reckoned","leg":5,"moved":2,"ms":1600,"planned_end":[["Route 204",10,18]],"tiles":2} + | Leg 3/4: north 15 (to wall) to Route 204 (10, 3) + | [Route] Turning north. + | [Sim] below the ravaged path: north 15 (to wall): held north to blocked at (42, 3). + | [Speed] run north: 15 tiles in 3300 ms to the wall. + | [Route] below the ravaged path: north 15 (to wall): ended at Route 204 (10, 3) (walked). + | [Leg] {"checkpoint":"01.08","chunks":15,"dir":"north","end":[["Route 204",10,3]],"end_kind":"wall","event":"below_the_ravaged_path","interrupts":[],"known":"wall","leg":6,"ms":3300,"planned_end":[["Route 204",10,3]],"tiles":15} + | Leg 4/4: east 1 (open) to Route 204 (11, 3) + | [Route] Turning east. + | [Sim] below the ravaged path: east 1 (open): 1 taps east, 1 moved, limit at (43, 3). + | [Route] below the ravaged path: east 1 (open): ended at Route 204 (11, 3) (walked). + | [Leg] {"checkpoint":"01.08","chunks":1,"dir":"east","end":[["Route 204",11,3]],"end_kind":"open","event":"below_the_ravaged_path","interrupts":[],"known":"dead_reckoned","leg":7,"moved":1,"ms":800,"planned_end":[["Route 204",11,3]],"tiles":1} + | [Route] below the ravaged path: no banner read for Route 204; going on. + | [Route] below the ravaged path: arrived at Route 204 (11, 3). + | [Route] Turning north. + | [01.08] into_the_ravaged_path: through to RavagedPath after 2 taps north. +01.09: completed + ends on Route 204 (20, 26) + stubbed save + stubbed smash_the_rock + looked for 1 fades, 1 banners, 0 doors, 1 tap steps + | west of the rock: 3 legs planned + | [Route] west of the rock: plan from RavagedPath (19, 50): north 10 (to wall) to RavagedPath (19, 40); south 3 (open) to RavagedPath (19, 43); east 2 (open) to RavagedPath (21, 43) + | Leg 1/3: north 10 (to wall) to RavagedPath (19, 40) + | [Sim] west of the rock: north 10 (to wall): held north to blocked at (19, 40). + | [Route] west of the rock: north 10 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run north: 10 tiles in 2550 ms to the wall. + | [Route] west of the rock: north 10 (to wall): ended at RavagedPath (19, 40) (walked). + | [Leg] {"checkpoint":"01.09","chunks":10,"dir":"north","end":[["RavagedPath",19,40]],"end_kind":"wall","event":"west_of_the_rock","interrupts":[],"known":"wall","leg":1,"ms":2550,"planned_end":[["RavagedPath",19,40]],"tiles":10} + | Leg 2/3: south 3 (open) to RavagedPath (19, 43) + | [Route] Turning south. + | [Sim] west of the rock: south 3 (open): 3 taps south, 3 moved, limit at (19, 43). + | [Route] west of the rock: south 3 (open): ended at RavagedPath (19, 43) (walked). + | [Leg] {"checkpoint":"01.09","chunks":3,"dir":"south","end":[["RavagedPath",19,43]],"end_kind":"open","event":"west_of_the_rock","interrupts":[],"known":"dead_reckoned","leg":2,"moved":3,"ms":2400,"planned_end":[["RavagedPath",19,43]],"tiles":3} + | Leg 3/3: east 2 (open) to RavagedPath (21, 43) + | [Route] Turning east. + | [Sim] west of the rock: east 2 (open): 2 taps east, 2 moved, limit at (21, 43). + | [Route] west of the rock: east 2 (open): ended at RavagedPath (21, 43) (walked). + | [Leg] {"checkpoint":"01.09","chunks":2,"dir":"east","end":[["RavagedPath",21,43]],"end_kind":"open","event":"west_of_the_rock","interrupts":[],"known":"dead_reckoned","leg":3,"moved":2,"ms":1600,"planned_end":[["RavagedPath",21,43]],"tiles":2} + | [Route] west of the rock: arrived at RavagedPath (21, 43). + | above the way out: 3 legs planned + | [Route] above the way out: plan from RavagedPath (21, 43): east 8 (to wall) to RavagedPath (29, 43); south 1 (to wall) to RavagedPath (29, 44); west 1 (open) to RavagedPath (28, 44) + | Leg 1/3: east 8 (to wall) to RavagedPath (29, 43) + | [Sim] above the way out: east 8 (to wall): held east to blocked at (29, 43). + | [Route] above the way out: east 8 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run east: 8 tiles in 1850 ms to the wall. + | [Route] above the way out: east 8 (to wall): ended at RavagedPath (29, 43) (walked). + | [Leg] {"checkpoint":"01.09","chunks":8,"dir":"east","end":[["RavagedPath",29,43]],"end_kind":"wall","event":"above_the_way_out","interrupts":[],"known":"wall","leg":1,"ms":1850,"planned_end":[["RavagedPath",29,43]],"tiles":8} + | Leg 2/3: south 1 (to wall) to RavagedPath (29, 44) + | [Route] Turning south. + | [Sim] above the way out: south 1 (to wall): held south to blocked at (29, 44). + | [Speed] run south: 1 tiles in 1200 ms to the wall. + | [Route] above the way out: south 1 (to wall): ended at RavagedPath (29, 44) (walked). + | [Leg] {"checkpoint":"01.09","chunks":1,"dir":"south","end":[["RavagedPath",29,44]],"end_kind":"wall","event":"above_the_way_out","interrupts":[],"known":"wall","leg":2,"ms":1200,"planned_end":[["RavagedPath",29,44]],"tiles":1} + | Leg 3/3: west 1 (open) to RavagedPath (28, 44) + | [Route] Turning west. + | [Sim] above the way out: west 1 (open): 1 taps west, 1 moved, limit at (28, 44). + | [Route] above the way out: west 1 (open): ended at RavagedPath (28, 44) (walked). + | [Leg] {"checkpoint":"01.09","chunks":1,"dir":"west","end":[["RavagedPath",28,44]],"end_kind":"open","event":"above_the_way_out","interrupts":[],"known":"dead_reckoned","leg":3,"moved":1,"ms":800,"planned_end":[["RavagedPath",28,44]],"tiles":1} + | [Route] above the way out: arrived at RavagedPath (28, 44). + | [Route] Turning south. + | [01.09] out_of_the_ravaged_path: through to Route204North after 1 taps south. +01.10: completed + ends on Floaroma Town (11, 28) + stubbed save + stubbed save_here + looked for 0 fades, 1 banners, 0 doors, 0 tap steps + | line 1: 1 legs planned + | [Route] line 1: plan from Route 204 (20, 26), Route 204 (20, 27): south 4 (to wall) to Route 204 (20, 30) + | Leg 1/1: south 4 (to wall) to Route 204 (20, 30) + | [Sim] line 1: south 4 (to wall): held south to blocked at (20, 62). + | [Route] line 1: south 4 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run south: 3 tiles in 1650 ms to the wall. + | [Route] line 1: south 4 (to wall): ended at Route 204 (20, 30) (walked). + | [Leg] {"checkpoint":"01.10","chunks":4,"dir":"south","end":[["Route 204",20,30]],"end_kind":"wall","event":"line_1","interrupts":[],"known":"wall","leg":1,"ms":1650,"planned_end":[["Route 204",20,30]],"tiles":4} + | [Route] line 1: arrived at Route 204 (20, 30). + | line 2: 2 legs planned + | [Route] line 2: plan from Route 204 (20, 30): north 3 (open) to Route 204 (20, 27); west 9 (open) to Route 204 (11, 27) + | Leg 1/2: north 3 (open) to Route 204 (20, 27) + | [Route] Turning north. + | [Sim] line 2: north 3 (open): 3 taps north, 3 moved, limit at (20, 59). + | [Route] line 2: north 3 (open): ended at Route 204 (20, 27) (walked). + | [Leg] {"checkpoint":"01.10","chunks":3,"dir":"north","end":[["Route 204",20,27]],"end_kind":"open","event":"line_2","interrupts":[],"known":"dead_reckoned","leg":1,"moved":3,"ms":2400,"planned_end":[["Route 204",20,27]],"tiles":3} + | Leg 2/2: west 9 (open) to Route 204 (11, 27) + | [Route] Turning west. + | [Sim] line 2: west 9 (open): 9 taps west, 9 moved, limit at (11, 59). + | [Route] line 2: west 9 (open): ended at Route 204 (11, 27) (walked). + | [Leg] {"checkpoint":"01.10","chunks":9,"dir":"west","end":[["Route 204",11,27]],"end_kind":"open","event":"line_2","interrupts":[],"known":"dead_reckoned","leg":2,"moved":9,"ms":7200,"planned_end":[["Route 204",11,27]],"tiles":9} + | [Route] line 2: arrived at Route 204 (11, 27). + | line 3: 1 legs planned + | [Route] line 3: plan from Route 204 (11, 27): north 5 (open) to Route 204 (11, 22) + | Leg 1/1: north 5 (open) to Route 204 (11, 22) + | [Route] Turning north. + | [Sim] line 3: north 5 (open): 5 taps north, 5 moved, limit at (11, 54). + | [Route] line 3: north 5 (open): ended at Route 204 (11, 22) (walked). + | [Leg] {"checkpoint":"01.10","chunks":5,"dir":"north","end":[["Route 204",11,22]],"end_kind":"open","event":"line_3","interrupts":[],"known":"dead_reckoned","leg":1,"moved":5,"ms":4000,"planned_end":[["Route 204",11,22]],"tiles":5} + | [Route] line 3: arrived at Route 204 (11, 22). + | line 4: 2 legs planned + | [Route] line 4: plan from Route 204 (11, 22): east 10 (to wall) to Route 204 (21, 22); west 2 (open) to Route 204 (19, 22) + | Leg 1/2: east 10 (to wall) to Route 204 (21, 22) + | [Sim] line 4: east 10 (to wall): held east to dialog at (17, 54). + | [Route] line 4: Aroma Lady Taylor stopped us about Route 204 (17, 22). + | Fighting Aroma Lady Taylor. + | [Route] line 4: east 10 (to wall): on to the wall: on to the wall after the battle. + | [Sim] line 4: east 10 (to wall): on to the wall: held east to blocked at (21, 54). + | [Route] line 4: east 10 (to wall): on to the wall: facing unknown; the first moved chunk may be the turn, not counted. + | [Route] line 4: east 10 (to wall): ended at Route 204 (21, 22) (walked). + | [Leg] {"checkpoint":"01.10","chunks":10,"dir":"east","end":[["Route 204",21,22]],"end_kind":"wall","event":"line_4","interrupts":["trainer"],"known":"wall","leg":1,"ms":2300,"planned_end":[["Route 204",21,22]],"tiles":10} + | Leg 2/2: west 2 (open) to Route 204 (19, 22) + | [Route] Turning west. + | [Sim] line 4: west 2 (open): 2 taps west, 2 moved, limit at (19, 54). + | [Route] line 4: west 2 (open): ended at Route 204 (19, 22) (walked). + | [Leg] {"checkpoint":"01.10","chunks":2,"dir":"west","end":[["Route 204",19,22]],"end_kind":"open","event":"line_4","interrupts":[],"known":"dead_reckoned","leg":2,"moved":2,"ms":1600,"planned_end":[["Route 204",19,22]],"tiles":2} + | [Route] line 4: arrived at Route 204 (19, 22). + | line 5: 2 legs planned + | [Route] line 5: plan from Route 204 (19, 22): north 15 (to wall) to Route 204 (19, 7); south 5 (open) to Route 204 (19, 12) + | Leg 1/2: north 15 (to wall) to Route 204 (19, 7) + | [Sim] line 5: north 15 (to wall): held north to dialog at (19, 44). + | [Route] line 5: Aroma Lady Taylor stopped us about Route 204 (19, 20). + | Fighting Aroma Lady Taylor. + | [Route] line 5: north 15 (to wall): on to the wall: on to the wall after the battle. + | [Sim] line 5: north 15 (to wall): on to the wall: held north to blocked at (19, 39). + | [Route] line 5: north 15 (to wall): on to the wall: facing unknown; the first moved chunk may be the turn, not counted. + | [Route] line 5: north 15 (to wall): ended at Route 204 (19, 7) (walked). + | [Leg] {"checkpoint":"01.10","chunks":15,"dir":"north","end":[["Route 204",19,7]],"end_kind":"wall","event":"line_5","interrupts":["trainer"],"known":"wall","leg":1,"ms":3550,"planned_end":[["Route 204",19,7]],"tiles":15} + | Leg 2/2: south 5 (open) to Route 204 (19, 12) + | [Route] Turning south. + | [Sim] line 5: south 5 (open): 5 taps south, 5 moved, limit at (19, 44). + | [Route] line 5: south 5 (open): ended at Route 204 (19, 12) (walked). + | [Leg] {"checkpoint":"01.10","chunks":5,"dir":"south","end":[["Route 204",19,12]],"end_kind":"open","event":"line_5","interrupts":[],"known":"dead_reckoned","leg":2,"moved":5,"ms":4000,"planned_end":[["Route 204",19,12]],"tiles":5} + | [Route] line 5: arrived at Route 204 (19, 12). + | line 6: 2 legs planned + | [Route] line 6: plan from Route 204 (19, 12): west 9 (to wall) to Route 204 (10, 12); east 1 (open) to Route 204 (11, 12) + | Leg 1/2: west 9 (to wall) to Route 204 (10, 12) + | [Sim] line 6: west 9 (to wall): held west to blocked at (10, 44). + | [Route] line 6: west 9 (to wall): facing unknown; the first moved chunk may be the turn, not counted. + | [Speed] run west: 9 tiles in 1950 ms to the wall. + | [Route] line 6: west 9 (to wall): ended at Route 204 (10, 12) (walked). + | [Leg] {"checkpoint":"01.10","chunks":9,"dir":"west","end":[["Route 204",10,12]],"end_kind":"wall","event":"line_6","interrupts":[],"known":"wall","leg":1,"ms":1950,"planned_end":[["Route 204",10,12]],"tiles":9} + | Leg 2/2: east 1 (open) to Route 204 (11, 12) + | [Route] Turning east. + | [Sim] line 6: east 1 (open): 1 taps east, 1 moved, limit at (11, 44). + | [Route] line 6: east 1 (open): ended at Route 204 (11, 12) (walked). + | [Leg] {"checkpoint":"01.10","chunks":1,"dir":"east","end":[["Route 204",11,12]],"end_kind":"open","event":"line_6","interrupts":[],"known":"dead_reckoned","leg":2,"moved":1,"ms":800,"planned_end":[["Route 204",11,12]],"tiles":1} + | [Route] line 6: arrived at Route 204 (11, 12). + | [Route] Turning north. +01.11: completed + ends on Floaroma Town (3, 26) + stubbed save + stubbed save_here + looked for 0 fades, 0 banners, 0 doors, 0 tap steps + | [Leg] {"checkpoint":"01.11","chunks":0,"dir":"west","end":[],"end_kind":"wall","event":"west_to_the_field_edge","interrupts":[],"known":"wall","leg":1,"ms":0,"planned_end":[],"tiles":13} + | [Route] Turning east. + | [Sim] below_her_column: 4 taps east, 4 moved, limit at (4, 27). + | [01.11] below_her_column: taps east moved 4 of 4 tiles. + | [Leg] {"checkpoint":"01.11","chunks":4,"dir":"east","end":[["Floaroma Town",4,27],["Floaroma Town",4,28],["Floaroma Town",4,29]],"end_kind":"tile","event":"below_her_column","interrupts":[],"known":"counted","leg":1,"moved":4,"ms":3200,"planned_end":[["Floaroma Town",4,27],["Floaroma Town",4,28],["Floaroma Town",4,29]],"tiles":4} + | [Leg] {"checkpoint":"01.11","chunks":0,"dir":"north","end":[],"end_kind":"wall","event":"up_to_the_old_woman","interrupts":[],"known":"wall","leg":1,"ms":0,"planned_end":[],"tiles":5} + | [Route] Turning north. + | [Route] Turning west. + | [Sim] below_the_old_man: 1 taps west, 1 moved, limit at (3, 26). + | [01.11] below_the_old_man: taps west moved 1 of 1 tiles. + | [Leg] {"checkpoint":"01.11","chunks":1,"dir":"west","end":[["Floaroma Town",3,26]],"end_kind":"tile","event":"below_the_old_man","interrupts":[],"known":"counted","leg":1,"moved":1,"ms":800,"planned_end":[["Floaroma Town",3,26]],"tiles":1} + | [Route] Turning north. diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.01.plan.json b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.01.plan.json new file mode 100644 index 0000000000..eeff5f14ab --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.01.plan.json @@ -0,0 +1,90 @@ +{ + "checkpoint": { + "events": [ + { + "action": "check_poketch", + "id": "poketch_before_the_gate", + "kind": "game_action", + "why": "Jubilife's east-exit guard (the coord event on (60, 21..24)) asks about the Poketch campaign and turns back anyone without one (lab-B 2026-11-11): fail here, not in a walk that takes him for a trainer" + }, + { + "action": "town", + "args": { + "fight_wild": false, + "target": { + "facing": "east", + "map": "Route203", + "tiles": [ + [ + 4, + 18 + ] + ] + } + }, + "id": "west_of_barrys_trigger", + "kind": "route", + "why": "east along the street onto Route 203" + }, + { + "args": { + "direction": "east" + }, + "id": "barrys_trigger", + "kind": "step", + "why": "the trigger (5, 17..20): Barry walks over" + }, + { + "args": { + "may_lose": true + }, + "declared_after": { + "facing": "east", + "map": "Route203", + "tiles": [ + [ + 5, + 17 + ], + [ + 5, + 18 + ], + [ + 5, + 19 + ], + [ + 5, + 20 + ] + ] + }, + "id": "barry", + "kind": "battle", + "why": "Barry's battle; a loss goes on, as it did on the console" + } + ], + "id": "01.01", + "start": { + "facing": "north", + "map": "JubilifeCity", + "tiles": [ + [ + 59, + 21 + ] + ] + }, + "title": "Jubilife to Barry" + }, + "execution": { + "on_failure": "reload_and_retry", + "saves_in": "Jubilife City" + }, + "format": "pokesim-authored-checkpoint/1", + "game": "bdsp", + "metadata": { + "phase": "reproduction" + } +} diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.02.plan.json b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.02.plan.json new file mode 100644 index 0000000000..735635e39f --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.02.plan.json @@ -0,0 +1,259 @@ +{ + "checkpoint": { + "events": [ + { + "args": { + "fight_wild": false, + "target": { + "facing": "south", + "map": "Route203", + "tiles": [ + [ + 5, + 20 + ] + ] + } + }, + "declared_after": { + "facing": "south", + "map": "Route203", + "tiles": [ + [ + 5, + 20 + ] + ] + }, + "id": "south_to_the_cliff", + "kind": "route", + "why": "down the trigger's column to the cliff" + }, + { + "args": { + "fight_wild": false, + "target": { + "facing": "east", + "map": "Route203", + "tiles": [ + [ + 55, + 9 + ] + ] + } + }, + "id": "by_the_gate", + "kind": "route", + "why": "east along Route 203 to the Gate's warp tile (55, 9)" + }, + { + "action": "to_banner", + "args": { + "direction": "east" + }, + "declared_after": { + "facing": "east", + "map": "OreburghGate", + "tiles": [ + [ + 4, + 22 + ], + [ + 5, + 22 + ] + ] + }, + "id": "into_oreburgh_gate", + "kind": "step", + "why": "the Gate's west mouth (56, 9)" + }, + { + "action": "into_scene", + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "east", + "tiles": 6 + } + ], + "target": { + "facing": "east", + "map": "OreburghGate", + "tiles": [ + [ + 4, + 22 + ], + [ + 5, + 22 + ] + ] + } + }, + "id": "into_the_hikers_scene", + "kind": "route", + "why": "east along row 22 until the hikers' scene starts (trigger (7, 22))" + }, + { + "declared_after": { + "facing": "east", + "map": "OreburghGate", + "tiles": [ + [ + 7, + 22 + ] + ] + }, + "id": "the_hiker", + "kind": "scene", + "why": "HM Rock Smash, then the Hidden Moves card" + }, + { + "action": "exit", + "args": { + "fight_wild": false, + "leave": "east", + "target": { + "facing": "east", + "map": "OreburghGate", + "tiles": [ + [ + 20, + 22 + ] + ] + } + }, + "id": "past_curtis", + "kind": "route", + "why": "east along row 22 past Camper Curtis's column (17), fighting him" + }, + { + "action": "exit", + "args": { + "fight_wild": false, + "leave": "east", + "target": { + "facing": "east", + "map": "OreburghGate", + "tiles": [ + [ + 26, + 22 + ] + ] + } + }, + "id": "by_the_east_mouth", + "kind": "route", + "why": "east past Picnicker Diana's column (24), fighting her, to two short of the mouth" + }, + { + "action": "to_banner", + "args": { + "direction": "east" + }, + "declared_after": { + "facing": "east", + "map": "OreburghCity", + "tiles": [ + [ + 2, + 13 + ], + [ + 3, + 13 + ] + ] + }, + "id": "into_oreburgh", + "kind": "step", + "why": "the Gate's east mouth (28, 22)" + }, + { + "action": "into_scene", + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "east", + "tiles": 12 + } + ], + "target": { + "facing": "east", + "map": "OreburghCity", + "tiles": [ + [ + 2, + 13 + ], + [ + 3, + 13 + ] + ] + } + }, + "id": "into_the_welcome_scene", + "kind": "route", + "why": "east along row 13 until the welcome guide's scene starts (trigger (10, 12..15))" + }, + { + "declared_after": { + "facing": "east", + "map": "OreburghCity", + "tiles": [ + [ + 23, + 23 + ] + ] + }, + "id": "oreburgh_welcome", + "kind": "scene", + "why": "the man's lines, the walk to the Gym, and Barry's" + } + ], + "id": "01.02", + "start": { + "facing": "east", + "map": "Route203", + "tiles": [ + [ + 5, + 17 + ], + [ + 5, + 18 + ], + [ + 5, + 19 + ], + [ + 5, + 20 + ] + ] + }, + "title": "Route 203 to Oreburgh" + }, + "execution": { + "on_failure": "reload_and_retry", + "saves_in": "Route 203" + }, + "format": "pokesim-authored-checkpoint/1", + "game": "bdsp", + "metadata": { + "phase": "reproduction" + } +} diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.02b.plan.json b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.02b.plan.json new file mode 100644 index 0000000000..b3589df130 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.02b.plan.json @@ -0,0 +1,117 @@ +{ + "format": "pokesim-authored-checkpoint/1", + "game": "bdsp", + "checkpoint": { + "id": "01.02b", + "title": "Oreburgh Center heal", + "start": { + "map": "OreburghCity", + "facing": "east", + "tiles": [ + [ + 23, + 23 + ] + ] + }, + "events": [ + { + "id": "below_barry", + "kind": "legs", + "args": { + "legs": [ + { + "direction": "south", + "tiles": 1 + }, + { + "direction": "east", + "tiles": 3 + }, + { + "direction": "north", + "tiles": 2 + } + ], + "fight_wild": false + }, + "declared_after": { + "map": "OreburghCity", + "facing": "north", + "tiles": [ + [ + 26, + 22 + ] + ] + }, + "why": "south 1 around the guide, east 3 to Barry's column, north 2 to below Barry" + }, + { + "id": "barry", + "kind": "talk", + "why": "Barry in the Gym's door" + }, + { + "id": "barrys_lines", + "kind": "scene", + "declared_after": { + "map": "OreburghCity", + "facing": "north", + "tiles": [ + [ + 26, + 22 + ] + ] + }, + "why": "Roark has gone to the mine" + }, + { + "id": "below_the_centers_door", + "kind": "route", + "action": "town", + "args": { + "target": { + "map": "OreburghCity", + "facing": "north", + "tiles": [ + [ + 47, + 21 + ] + ] + }, + "fight_wild": false + }, + "why": "east along the street to below the Center's door" + }, + { + "id": "heal_oreburgh_first", + "kind": "heal", + "declared_after": { + "map": "OreburghCity", + "facing": "south", + "tiles": [ + [ + 47, + 21 + ], + [ + 46, + 21 + ] + ] + }, + "why": "the nurse; out onto the doorstep, where 01.03 starts" + } + ] + }, + "execution": { + "on_failure": "reload_and_retry", + "saves_in": "Oreburgh City" + }, + "metadata": { + "phase": "reproduction" + } +} diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.04.plan.json b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.04.plan.json new file mode 100644 index 0000000000..45345a431b --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.04.plan.json @@ -0,0 +1,47 @@ +{ + "checkpoint": { + "events": [ + { + "action": "gym_until_roark_beaten", + "declared_after": { + "facing": "north", + "map": "OreburghGym", + "tiles": [ + [ + 5, + 4 + ] + ] + }, + "id": "gym_until_roark_beaten", + "kind": "game_action", + "why": "west into the gym, up it to Roark; again from the Center after a loss" + } + ], + "id": "01.04", + "start": { + "facing": "south", + "map": "OreburghCity", + "tiles": [ + [ + 47, + 21 + ], + [ + 46, + 21 + ] + ] + }, + "title": "Oreburgh Gym" + }, + "execution": { + "on_failure": "reload_and_retry", + "saves_in": "Oreburgh City" + }, + "format": "pokesim-authored-checkpoint/1", + "game": "bdsp", + "metadata": { + "phase": "testing" + } +} diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.05.plan.json b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.05.plan.json new file mode 100644 index 0000000000..2cecfbb005 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.05.plan.json @@ -0,0 +1,194 @@ +{ + "checkpoint": { + "events": [ + { + "action": "to_banner", + "args": { + "direction": "south" + }, + "declared_after": { + "facing": "south", + "map": "OreburghCity", + "tiles": [ + [ + 26, + 21 + ], + [ + 26, + 22 + ] + ] + }, + "id": "out_of_the_gym", + "kind": "step", + "why": "down the middle column (5, 4..23) and out of the door (5, 24)" + }, + { + "action": "town", + "args": { + "fight_wild": false, + "target": { + "facing": "west", + "map": "OreburghCity", + "tiles": [ + [ + 7, + 13 + ] + ] + } + }, + "id": "east_of_barrys_trigger", + "kind": "route", + "why": "west along the street, north up the stairs west of the houses, west along the Gate's row" + }, + { + "args": { + "direction": "west" + }, + "id": "barrys_trigger", + "kind": "step", + "why": "the trigger (6, 12..15)" + }, + { + "declared_after": { + "facing": "east", + "map": "OreburghCity", + "tiles": [ + [ + 5, + 13 + ] + ] + }, + "id": "barry_bumps_into_us", + "kind": "scene", + "why": "Barry runs into us, talks of Eterna, and leaves (assumed: the push)" + }, + { + "action": "to_wall", + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "south", + "tiles": 6 + }, + { + "direction": "west", + "tiles": 6 + } + ] + }, + "declared_after": { + "facing": "west", + "map": "OreburghCity", + "tiles": [ + [ + 2, + 17 + ] + ] + }, + "id": "below_the_gates_mouth", + "kind": "legs", + "why": "south to row 17's wall, then west to column 2's" + }, + { + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "north", + "tiles": 4 + } + ] + }, + "id": "to_the_gates_row", + "kind": "legs", + "why": "taps up column 2 to the mouth's row 13" + }, + { + "args": { + "direction": "west" + }, + "declared_after": { + "facing": "west", + "map": "OreburghGate", + "tiles": [ + [ + 27, + 22 + ], + [ + 26, + 22 + ] + ] + }, + "id": "into_oreburgh_gate", + "kind": "step", + "why": "the Gate's mouth (1, 13)" + }, + { + "args": { + "fight_wild": false, + "target": { + "facing": "west", + "map": "OreburghGate", + "tiles": [ + [ + 5, + 22 + ] + ] + } + }, + "id": "through_the_gate", + "kind": "route", + "why": "west along row 22 to two tiles short of the west mouth's warp (3, 22)" + }, + { + "action": "to_banner", + "args": { + "direction": "west" + }, + "declared_after": { + "facing": "west", + "map": "Route203", + "tiles": [ + [ + 55, + 9 + ] + ] + }, + "id": "out_of_oreburgh_gate", + "kind": "step", + "why": "the west mouth (3, 22)" + } + ], + "id": "01.05", + "start": { + "facing": "north", + "map": "OreburghGym", + "tiles": [ + [ + 5, + 4 + ] + ] + }, + "title": "Oreburgh to Route 203" + }, + "execution": { + "on_failure": "reload_and_retry", + "saves_in": "Oreburgh City" + }, + "format": "pokesim-authored-checkpoint/1", + "game": "bdsp", + "metadata": { + "phase": "testing" + } +} diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.06.plan.json b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.06.plan.json new file mode 100644 index 0000000000..84772dbd9d --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.06.plan.json @@ -0,0 +1,65 @@ +{ + "checkpoint": { + "events": [ + { + "action": "town", + "args": { + "fight_wild": false, + "target": { + "facing": "north", + "map": "JubilifeCity", + "tiles": [ + [ + 41, + 8 + ] + ] + } + }, + "id": "up_jubilifes_road", + "kind": "route", + "why": "down Route 203 (its ledges only south), west along it into Jubilife's street, north up the road's west column" + }, + { + "action": "town", + "args": { + "fight_wild": false, + "target": { + "facing": "north", + "map": "JubilifeCity", + "tiles": [ + [ + 47, + 8 + ] + ] + } + }, + "id": "below_rowans_trigger", + "kind": "route", + "why": "east along row 8 to the sign's wall" + } + ], + "id": "01.06", + "start": { + "facing": "west", + "map": "Route203", + "tiles": [ + [ + 55, + 9 + ] + ] + }, + "title": "Route 203 to Jubilife" + }, + "execution": { + "on_failure": "reload_and_retry", + "saves_in": "Route 203" + }, + "format": "pokesim-authored-checkpoint/1", + "game": "bdsp", + "metadata": { + "phase": "testing" + } +} diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.07.plan.json b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.07.plan.json new file mode 100644 index 0000000000..87a11f994a --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.07.plan.json @@ -0,0 +1,62 @@ +{ + "checkpoint": { + "events": [ + { + "args": { + "direction": "north" + }, + "id": "rowans_trigger", + "kind": "step", + "why": "the trigger (45..47, 7): the game walks us up to Rowan" + }, + { + "action": "doubles", + "args": { + "may_lose": false + }, + "id": "galactic_grunts", + "kind": "battle", + "why": "the lines, then the tag battle with Dawn" + }, + { + "declared_after": { + "map": "JubilifeCity", + "tiles": [ + [ + 46, + 5 + ], + [ + 47, + 5 + ] + ] + }, + "id": "rowan_and_dawn_leave", + "kind": "scene", + "why": "Rowan's and Dawn's lines, then Bebe walks over with hers (r80 saved over her lines)" + } + ], + "id": "01.07", + "start": { + "facing": "north", + "map": "JubilifeCity", + "tiles": [ + [ + 47, + 8 + ] + ] + }, + "title": "Jubilife: Rowan, Dawn and the Galactic grunts" + }, + "execution": { + "on_failure": "reload_and_retry", + "saves_in": "Jubilife City" + }, + "format": "pokesim-authored-checkpoint/1", + "game": "bdsp", + "metadata": { + "phase": "testing" + } +} diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.08.plan.json b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.08.plan.json new file mode 100644 index 0000000000..49909bfaff --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.08.plan.json @@ -0,0 +1,96 @@ +{ + "checkpoint": { + "events": [ + { + "args": { + "fight_wild": false, + "target": { + "facing": "west", + "map": "JubilifeCity", + "tiles": [ + [ + 44, + 5 + ] + ] + } + }, + "declared_after": { + "facing": "west", + "map": "JubilifeCity", + "tiles": [ + [ + 44, + 5 + ] + ] + }, + "id": "west_to_the_wall", + "kind": "route", + "why": "west along row 5 to the wall" + }, + { + "action": "town", + "args": { + "fight_wild": false, + "target": { + "facing": "north", + "map": "Route204South", + "tiles": [ + [ + 11, + 3 + ] + ] + } + }, + "id": "below_the_ravaged_path", + "kind": "route", + "why": "north out of Jubilife, up Route 204's street and grass to (11, 3), two tiles below the door (11, 1), clear of the youngster on row 2" + }, + { + "action": "to_banner", + "args": { + "direction": "north" + }, + "declared_after": { + "facing": "north", + "map": "RavagedPath", + "tiles": [ + [ + 19, + 50 + ] + ] + }, + "id": "into_the_ravaged_path", + "kind": "step", + "why": "north up column 11 through the door (11, 1): the walk's last leg goes into the door, not to a tile before it" + } + ], + "id": "01.08", + "start": { + "map": "JubilifeCity", + "tiles": [ + [ + 46, + 5 + ], + [ + 47, + 5 + ] + ] + }, + "title": "Jubilife to the Ravaged Path" + }, + "execution": { + "on_failure": "reload_and_retry", + "saves_in": "Jubilife City" + }, + "format": "pokesim-authored-checkpoint/1", + "game": "bdsp", + "metadata": { + "phase": "testing" + } +} diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.09.plan.json b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.09.plan.json new file mode 100644 index 0000000000..3f1605b806 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.09.plan.json @@ -0,0 +1,102 @@ +{ + "checkpoint": { + "events": [ + { + "args": { + "fight_wild": false, + "target": { + "facing": "east", + "map": "RavagedPath", + "tiles": [ + [ + 21, + 43 + ] + ] + } + }, + "id": "west_of_the_rock", + "kind": "route", + "why": "up the stairs and along the corridor" + }, + { + "action": "smash_the_rock", + "declared_after": { + "facing": "east", + "map": "RavagedPath", + "tiles": [ + [ + 21, + 43 + ] + ] + }, + "id": "smash_the_rock", + "kind": "game_action", + "why": "Rock Smash on the rock east of us" + }, + { + "args": { + "fight_wild": false, + "target": { + "facing": "south", + "map": "RavagedPath", + "tiles": [ + [ + 28, + 44 + ] + ] + } + }, + "id": "above_the_way_out", + "kind": "route", + "why": "east through the rock's tile" + }, + { + "action": "to_banner", + "args": { + "direction": "south" + }, + "declared_after": { + "facing": "south", + "map": "Route204North", + "tiles": [ + [ + 20, + 26 + ], + [ + 20, + 27 + ] + ] + }, + "id": "out_of_the_ravaged_path", + "kind": "step", + "why": "the way out (28, 45)" + } + ], + "id": "01.09", + "start": { + "facing": "north", + "map": "RavagedPath", + "tiles": [ + [ + 19, + 50 + ] + ] + }, + "title": "Ravaged Path" + }, + "execution": { + "on_failure": "reload_and_retry", + "saves_in": "Ravaged Path" + }, + "format": "pokesim-authored-checkpoint/1", + "game": "bdsp", + "metadata": { + "phase": "testing" + } +} diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.10.plan.json b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.10.plan.json new file mode 100644 index 0000000000..7d58600adc --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.10.plan.json @@ -0,0 +1,177 @@ +{ + "checkpoint": { + "events": [ + { + "action": "line", + "args": { + "fight_wild": false, + "target": { + "map": "Route204North", + "tiles": [ + [ + 20, + 30 + ] + ] + } + }, + "id": "line_1", + "kind": "route", + "why": "south to the wall below the cave: the cave may leave us on row 26 or 27 (lab-B 2026-11-13 02:35), and a leg north could walk back into it" + }, + { + "action": "line", + "args": { + "fight_wild": false, + "target": { + "map": "Route204North", + "tiles": [ + [ + 11, + 27 + ] + ] + } + }, + "id": "line_2", + "kind": "route", + "why": "a corner of the human's line" + }, + { + "action": "line", + "args": { + "fight_wild": false, + "target": { + "map": "Route204North", + "tiles": [ + [ + 11, + 22 + ] + ] + } + }, + "id": "line_3", + "kind": "route", + "why": "a corner of the human's line" + }, + { + "action": "line", + "args": { + "fight_wild": false, + "target": { + "map": "Route204North", + "tiles": [ + [ + 19, + 22 + ] + ] + } + }, + "id": "line_4", + "kind": "route", + "why": "a corner of the human's line" + }, + { + "action": "line", + "args": { + "fight_wild": false, + "target": { + "map": "Route204North", + "tiles": [ + [ + 19, + 12 + ] + ] + } + }, + "id": "line_5", + "kind": "route", + "why": "a corner of the human's line" + }, + { + "action": "line", + "args": { + "fight_wild": false, + "target": { + "map": "Route204North", + "tiles": [ + [ + 11, + 12 + ] + ] + } + }, + "id": "line_6", + "kind": "route", + "why": "a corner of the human's line" + }, + { + "action": "to_map", + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "north", + "tiles": 17 + } + ] + }, + "declared_after": { + "facing": "north", + "map": "FloaromaTown", + "tiles": [ + [ + 11, + 27 + ], + [ + 11, + 28 + ], + [ + 11, + 29 + ] + ] + }, + "id": "into_floaroma", + "kind": "legs", + "why": "run north until Floaroma's banner; on after a wild battle" + }, + { + "id": "save_here", + "kind": "save", + "why": "the next checkpoint starts here" + } + ], + "id": "01.10", + "start": { + "facing": "south", + "map": "Route204North", + "tiles": [ + [ + 20, + 26 + ], + [ + 20, + 27 + ] + ] + }, + "title": "Route 204 to Floaroma" + }, + "execution": { + "on_failure": "reload_and_retry", + "saves_in": "Route 204" + }, + "format": "pokesim-authored-checkpoint/1", + "game": "bdsp", + "metadata": { + "phase": "testing" + } +} diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.11.plan.json b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.11.plan.json new file mode 100644 index 0000000000..422787dd0f --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-01.11.plan.json @@ -0,0 +1,176 @@ +{ + "checkpoint": { + "events": [ + { + "action": "to_wall", + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "west", + "tiles": 13 + } + ] + }, + "declared_after": { + "facing": "west", + "map": "FloaromaTown", + "tiles": [ + [ + 0, + 27 + ], + [ + 0, + 28 + ], + [ + 0, + 29 + ] + ] + }, + "id": "west_to_the_field_edge", + "kind": "legs", + "why": "until the field's edge stops us" + }, + { + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "east", + "tiles": 4 + } + ] + }, + "id": "below_her_column", + "kind": "legs", + "why": "4 taps east to her column (westedge batch 2026-11-08)" + }, + { + "action": "to_wall", + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "north", + "tiles": 5 + } + ] + }, + "declared_after": { + "facing": "north", + "map": "FloaromaTown", + "tiles": [ + [ + 4, + 26 + ] + ] + }, + "id": "up_to_the_old_woman", + "kind": "legs", + "why": "north until she stops us" + }, + { + "id": "old_woman", + "kind": "talk", + "why": "she gives Mew when a Let's Go save is on the console" + }, + { + "declared_after": { + "facing": "north", + "map": "FloaromaTown", + "tiles": [ + [ + 4, + 26 + ] + ] + }, + "id": "old_woman_talks", + "kind": "scene", + "why": "her lines" + }, + { + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "west", + "tiles": 1 + } + ] + }, + "declared_after": { + "facing": "north", + "map": "FloaromaTown", + "tiles": [ + [ + 3, + 26 + ] + ] + }, + "id": "below_the_old_man", + "kind": "legs", + "why": "a tile west" + }, + { + "id": "old_man", + "kind": "talk", + "why": "he gives Jirachi with a Sword/Shield save" + }, + { + "declared_after": { + "facing": "north", + "map": "FloaromaTown", + "tiles": [ + [ + 3, + 26 + ] + ] + }, + "id": "old_man_talks", + "kind": "scene", + "why": "his lines" + }, + { + "id": "save_here", + "kind": "save", + "why": "the next checkpoint starts here" + } + ], + "id": "01.11", + "start": { + "facing": "north", + "map": "FloaromaTown", + "tiles": [ + [ + 11, + 27 + ], + [ + 11, + 28 + ], + [ + 11, + 29 + ] + ] + }, + "title": "Floaroma's old couple" + }, + "execution": { + "on_failure": "reload_and_retry", + "saves_in": "Floaroma Town" + }, + "format": "pokesim-authored-checkpoint/1", + "game": "bdsp", + "metadata": { + "phase": "testing" + } +} diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-mine-01.03.md b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-mine-01.03.md new file mode 100644 index 0000000000..9237f7a965 --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-mine-01.03.md @@ -0,0 +1,41 @@ +# Mine/Roark checkpoint: route evidence + +This sidecar preserves the reasoning that previously accompanied the C++ row. The JSON defines current actions; these observations explain why they were chosen. They are historical evidence, not new console verification. Entry assumes the preceding Barry conversation and Center heal have completed. + +## Entry and Center alignment + +The Center door is `(47,20)`, so its approach is `(47,21)` facing north. The published `pokemon_center_doorstep` is `(46,21)`: a route there hit the wall west of the door and healing found no door (lab-B, 2026-11-07 20:18). Both `(47,21)` and `(46,21)` facing south remain exit alternatives. Earlier Gym alignment runs r217d/r218d inferred column 46 from twenty west taps; they did not independently establish where those taps began. + +`above_the_mine` goes to `(46,57)` facing south, two tiles short of the warp row so an open walk cannot slide onto it (01.05, lab-B 2026-11-08). The city's five warp tiles `(44..48,59)` map into the hall at `(11,1),(11,1),(12,1),(13,1),(13,1)`. Thus column 46 enters B1F at `(12,1)`. The mine hall is Diamond's B1F; the coal room below is the room with Roark. Diamond zone-event sources were narc_0044/narc_0197; Platinum's event files provide the corresponding warp layout, used as evidence for BDSP's retained DP layout. + +## Into the coal room + +`into_the_mine` and `into_the_coal_room` cross the cave mouths. Hall movement uses counted taps rather than an open hold toward a fade: a wild battle on a hold can be mistaken for the transition. Warp entry itself is expected on the subsequent step. These are executor assumptions that still need detector/interruption coverage. + +The hall's coal-room mouth is `(11..13,21)`; column 12 enters the coal room at `(15,2)`. `south_to_the_rock` clips the corridor rock before the grouped inbound legs. The script's anchor is `(15,9)` facing south; the rock was described at `(15,11)`. + +## Roark approach and talk + +`to_roarks_corner` groups all nine inbound legs through `(20,28)` facing west, rather than ending recovery at an open intermediate tile. Lab-B, 2026-11-08 11:55: recovery replanned only to `(15,16)`, a subsequent south-five leg overshot a row, and later taps ran under Roark's rocks. Grouping through a corner allows a replanned path to finish with wall clips. The offline interrupted-leg case deliberately stops with uncertainty; it does not prove live recovery/rejoin. + +`beside_roarks_rock` clips the room's south wall to `(20,29)`, then `below_roark` moves west two to `(18,29)` facing north. Lab-B, 2026-11-07: an open counted south-three leg moved only two, motivating the wall anchor. Roark's map point is `(18,28)`; native tests check the authored below-Roark pose against that map point. + +`roark` initiates the conversation. Barry's earlier message that Roark went to the mine is a prerequisite: Roark ignored A without it in r101/r104. `roark_smashes_the_rock` represents the lines, Rock Smash east of him, and his departure east, consistent with Platinum's mine B2F script. The declared return pose is an executor fallback, not an observed receipt proving the scene completed. + +## Back through the hall + +`below_the_coal_rooms_warp` contains the ten outbound legs: east around the crate, north along column 29, west across row 17, then up the corridor to `(15,2)` facing north. Entering `(15,1)` returns to the hall at `(12,21)`, not `(11,21)`. + +`up_to_the_hall` and `out_of_the_mine` continue up column 12. The hall's `(12,1)` exit leads to city `(46,59)`. The city belief also permits `(46,58)` if movement continued past the fade. Lab-B, 2026-11-08 09:46, 10:39 and 12:03: the exit was east of the sign `(45,56)` and northward movement did not stop there. At 13:50, a north tap and east wall hold matched the map only from column 46. + +## Return to the nurse + +`north_to_the_centers_wall` clips the wall at `(46,20)` from either exit tile: 37 tiles from row 58 or 38 from row 59. The Hiker wanders through columns 46..48 and rows 25..27; the live walker must wait or recover safely, and the offline model uses an explicit synthetic clearance window. + +This column avoids the street east of the mine. At 13:50, an east hold from `(48,57)` moved zero although the map showed `(49,57)` open; later movement went astray. That discrepancy remains unresolved and is not grounds to change terrain silently. + +`east_below_the_centers_door` moves one tile east to `(47,21)` facing north. `heal_oreburgh` enters, heals and exits to the two-tile doorstep belief. The next Gym checkpoint starts there. The checkpoint keeps save-at-start/reload-and-retry guarded by the Oreburgh City save card. + +## Updating this route + +Edit the authoritative JSON, update relevant native/scenario expectations, and preserve new run evidence here. A changed map pin requires anchor review. A claimed transition or recovery fix needs an independent observation/regression case; do not turn `declared_after` into proof of success. The initial migration was checked against the pre-migration row and the reported successful lab-B sequence of 2026-11-08 14:17–14:23; later changes must record their own evidence. diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-mine-01.03.plan.json b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-mine-01.03.plan.json new file mode 100644 index 0000000000..cbe042f50b --- /dev/null +++ b/SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/StoryData/bdsp-mine-01.03.plan.json @@ -0,0 +1,408 @@ +{ + "format": "pokesim-authored-checkpoint/1", + "game": "bdsp", + "checkpoint": { + "id": "01.03", + "title": "Oreburgh Mine to Roark", + "start": { + "facing": "south", + "map": "OreburghCity", + "tiles": [ + [ + 47, + 21 + ], + [ + 46, + 21 + ] + ] + }, + "events": [ + { + "action": "town", + "args": { + "fight_wild": false, + "target": { + "facing": "south", + "map": "OreburghCity", + "tiles": [ + [ + 46, + 57 + ] + ] + } + }, + "id": "above_the_mine", + "kind": "route", + "why": "down the door's column to two above the mine's warp tiles (44..48, 59)" + }, + { + "action": "door", + "args": { + "direction": "south" + }, + "declared_after": { + "facing": "south", + "map": "OreburghMineB1F", + "tiles": [ + [ + 12, + 1 + ] + ] + }, + "id": "into_the_mine", + "kind": "step", + "why": "the warp tile (46, 59)" + }, + { + "action": "door", + "args": { + "direction": "south" + }, + "declared_after": { + "facing": "south", + "map": "OreburghMine", + "tiles": [ + [ + 15, + 2 + ] + ] + }, + "id": "into_the_coal_room", + "kind": "step", + "why": "down the entrance hall through the cave mouth" + }, + { + "action": "to_wall", + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "south", + "tiles": 8 + } + ] + }, + "declared_after": { + "facing": "south", + "map": "OreburghMine", + "tiles": [ + [ + 15, + 9 + ] + ] + }, + "id": "south_to_the_rock", + "kind": "legs", + "why": "south against the corridor rock (15, 11)" + }, + { + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "east", + "tiles": 1 + }, + { + "direction": "south", + "tiles": 2 + }, + { + "direction": "west", + "tiles": 1 + }, + { + "direction": "south", + "tiles": 5 + }, + { + "direction": "east", + "tiles": 14 + }, + { + "direction": "south", + "tiles": 10 + }, + { + "direction": "west", + "tiles": 2 + }, + { + "direction": "south", + "tiles": 2 + }, + { + "direction": "west", + "tiles": 7 + } + ] + }, + "declared_after": { + "facing": "west", + "map": "OreburghMine", + "tiles": [ + [ + 20, + 28 + ] + ] + }, + "id": "to_roarks_corner", + "kind": "legs", + "why": "east around the rock, across the room, down column 29, west to Roark's rock" + }, + { + "action": "to_wall", + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "south", + "tiles": 1 + } + ] + }, + "declared_after": { + "facing": "south", + "map": "OreburghMine", + "tiles": [ + [ + 20, + 29 + ] + ] + }, + "id": "beside_roarks_rock", + "kind": "legs", + "why": "south against the room's wall" + }, + { + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "west", + "tiles": 2 + } + ] + }, + "declared_after": { + "facing": "north", + "map": "OreburghMine", + "tiles": [ + [ + 18, + 29 + ] + ] + }, + "id": "below_roark", + "kind": "legs", + "why": "west 2 to below Roark" + }, + { + "id": "roark", + "kind": "talk", + "why": "Roark, north of us between his rocks" + }, + { + "declared_after": { + "facing": "north", + "map": "OreburghMine", + "tiles": [ + [ + 18, + 29 + ] + ] + }, + "id": "roark_smashes_the_rock", + "kind": "scene", + "why": "his lines, Rock Smash on the rock east of him, and he walks off" + }, + { + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "east", + "tiles": 9 + }, + { + "direction": "north", + "tiles": 3 + }, + { + "direction": "east", + "tiles": 2 + }, + { + "direction": "north", + "tiles": 10 + }, + { + "direction": "west", + "tiles": 14 + }, + { + "direction": "north", + "tiles": 5 + }, + { + "direction": "east", + "tiles": 1 + }, + { + "direction": "north", + "tiles": 2 + }, + { + "direction": "west", + "tiles": 1 + }, + { + "direction": "north", + "tiles": 7 + } + ] + }, + "declared_after": { + "facing": "north", + "map": "OreburghMine", + "tiles": [ + [ + 15, + 2 + ] + ] + }, + "id": "below_the_coal_rooms_warp", + "kind": "legs", + "why": "east around crate, up column 29, west across row 17, and up corridor to warp doorstep" + }, + { + "action": "door", + "args": { + "direction": "north" + }, + "declared_after": { + "facing": "north", + "map": "OreburghMineB1F", + "tiles": [ + [ + 12, + 21 + ] + ] + }, + "id": "up_to_the_hall", + "kind": "step", + "why": "the warp tile (15, 1)" + }, + { + "action": "door", + "args": { + "direction": "north" + }, + "declared_after": { + "facing": "north", + "map": "OreburghCity", + "tiles": [ + [ + 46, + 59 + ], + [ + 46, + 58 + ] + ] + }, + "id": "out_of_the_mine", + "kind": "step", + "why": "up the entrance hall and out to the city" + }, + { + "action": "counted_wall", + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "north", + "tiles": 37 + } + ] + }, + "declared_after": { + "facing": "north", + "map": "OreburghCity", + "tiles": [ + [ + 46, + 21 + ] + ] + }, + "id": "north_to_the_centers_wall", + "kind": "legs", + "why": "north up column 46 to the wall west of the Center's door" + }, + { + "args": { + "fight_wild": false, + "legs": [ + { + "direction": "east", + "tiles": 1 + } + ] + }, + "declared_after": { + "facing": "north", + "map": "OreburghCity", + "tiles": [ + [ + 47, + 21 + ] + ] + }, + "id": "east_below_the_centers_door", + "kind": "legs", + "why": "a tap east below the door" + }, + { + "declared_after": { + "facing": "south", + "map": "OreburghCity", + "tiles": [ + [ + 47, + 21 + ], + [ + 46, + 21 + ] + ] + }, + "id": "heal_oreburgh", + "kind": "heal", + "why": "the nurse; out onto the doorstep, where 01.04 starts" + } + ] + }, + "execution": { + "on_failure": "reload_and_retry", + "saves_in": "Oreburgh City" + }, + "metadata": { + "phase": "reproduction" + } +} diff --git a/SerialPrograms/cmake/SourceFiles.cmake b/SerialPrograms/cmake/SourceFiles.cmake index 9f325bca8c..1e20fe50e0 100644 --- a/SerialPrograms/cmake/SourceFiles.cmake +++ b/SerialPrograms/cmake/SourceFiles.cmake @@ -1873,6 +1873,8 @@ file(GLOB LIBRARY_SOURCES Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_PlannedRoute_Tests.cpp Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_PlanGolden.h Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_PlannedRoute_Tests.h + Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_RecoveryWalk_Tests.cpp + Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_RecoveryWalk_Tests.h Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_Resources.cpp Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_Resources.h Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_Resources_Tests.cpp @@ -1914,23 +1916,37 @@ file(GLOB LIBRARY_SOURCES Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_Walk_Tests.h Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_Walks.cpp Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_Walks.h + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_FaultSweep_Tests.cpp + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_FaultSweep_Tests.h Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_GridSim.cpp Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_GridSim.h Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_FrozenTrainer_Tests.cpp Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_FrozenTrainer_Tests.h + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_GridSim_Tests.cpp + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_GridSim_Tests.h Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_LegTrace_Tests.cpp Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_LegTrace_Tests.h Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_OldStorySteps.cpp Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_OldStorySteps.h Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimDisturbance.cpp Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimDisturbance.h + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimFailureCases_Tests.cpp + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimFailureCases_Tests.h + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimGolden_Tests.cpp + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimGolden_Tests.h Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimTriggers.cpp Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimWanderWait.cpp Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimWanderWait.h Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StoryActions_Tests.cpp Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StoryActions_Tests.h + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StoryMonteCarlo_Tests.cpp + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StoryMonteCarlo_Tests.h Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim.cpp Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim.h + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim_Tests.cpp + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim_Tests.h + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySimulation_Tests.cpp + Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySimulation_Tests.h Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_WallBattleSim_Tests.cpp Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_WallBattleSim_Tests.h Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_WanderWait_Tests.cpp