Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5b9b65a
FRLG AutoStory stage 3: Route 3 to Mt. Moon
dayfine Nov 3, 2026
e36b1b5
Merge commit '6096678ac2e425f8aa1eaa6d03e8a903ed48e529' into HEAD
dayfine Nov 5, 2026
80b8aff
Merge remote-tracking branch 'origin/frlg/stage2-rng' into frlg/stage…
dayfine Nov 6, 2026
c377c9b
FRLG AutoStory stage 3: align with PR #231 lint conventions
dayfine Nov 6, 2026
e4a1c4f
Merge origin/frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 6, 2026
6265ada
Merge origin/frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 7, 2026
7a6aac3
Merge remote-tracking branch 'origin/frlg/stage2-rng' into frlg/stage…
dayfine Nov 8, 2026
668d0ce
Merge frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 8, 2026
bbf1725
Merge remote-tracking branch 'origin/frlg/stage2-rng' into HEAD
dayfine Nov 9, 2026
8d43cc2
Merge frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 9, 2026
8e17042
Merge frlg/stage2-rng (story action table) into frlg/stage3-mtmoon
dayfine Nov 9, 2026
c601146
Merge frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 9, 2026
8470c5c
Merge frlg/stage2-rng: check the save stands at the checkpoint's star…
dayfine Nov 9, 2026
751d138
Merge frlg/stage2-rng: add the start pose check to a checkpoint alrea…
dayfine Nov 9, 2026
8eb50d1
Merge frlg/stage2-rng: shorten the start pose sim test
dayfine Nov 9, 2026
af66635
Merge frlg/stage2-rng: time an interrupt's step from its screen events
dayfine Nov 9, 2026
45ebd18
Merge frlg/stage2-rng: check a loaded save's start against a kept frame
dayfine Nov 9, 2026
dafe9b9
Merge frlg/stage2-rng: check a loaded save's start against a kept frame
dayfine Nov 9, 2026
dfcc0e9
Merge frlg/stage2-rng: check a loaded save's start against a kept frame
dayfine Nov 9, 2026
e54251c
Merge dbfce06c2 (#122 via parent) into frlg/stage3-mtmoon
dayfine Nov 9, 2026
9b6d673
Merge FRLG between-step interrupts (994d3a223) into #215
dayfine Nov 9, 2026
44753d7
Merge FRLG between-step interrupts (dc4745639) into #215
dayfine Nov 9, 2026
c229835
Merge FRLG interrupt actions move (bada0105a) into #215
dayfine Nov 9, 2026
8cf80ab
Merge frlg/stage2-rng into frlg/stage3-mtmoon (hold watchers for the …
dayfine Nov 9, 2026
7f66d16
Merge frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 9, 2026
16ac7c0
Merge frlg/stage2-rng into frlg/stage3-mtmoon (wait for a battle's op…
dayfine Nov 9, 2026
51bf32e
Merge frlg/stage2-rng into frlg/stage3-mtmoon (scene ends after its f…
dayfine Nov 9, 2026
35dc611
Merge frlg/stage2-rng into frlg/stage3-mtmoon: a step on the Switch H…
dayfine Nov 9, 2026
d481656
Merge frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 10, 2026
62c65b0
Merge origin/frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 10, 2026
34fecef
Merge frlg/stage2-rng (#331) into frlg/stage3-json: stage 3's rows as…
dayfine Nov 10, 2026
68b113f
FRLG AutoStory: delete stage 3's C++ story rows, parity proven
dayfine Nov 10, 2026
7f7a9cf
Merge pull request #333 from dayfine/frlg/stage3-json
dayfine Nov 10, 2026
4baf5fe
Merge frlg/stage2-rng (maps from pinned Packages resources) into frlg…
dayfine Nov 10, 2026
264eb39
Merge frlg/stage2-rng (battle sim removed, headers split) into frlg/s…
dayfine Nov 10, 2026
a439f72
Merge frlg/stage2-rng (trimmed battle data, plans name their foes) in…
dayfine Nov 10, 2026
e1331f8
Merge branch 'frlg/stage2-rng' into frlg/stage3-mtmoon
dayfine Nov 11, 2026
9577197
Merge branch 'frlg/stage2-rng' into frlg/stage3-mtmoon
dayfine Nov 11, 2026
44c4602
FRLG AutoStory tests: the 2D core's step and segment argument order; …
dayfine Nov 11, 2026
6765a79
Merge origin/frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 12, 2026
0290cab
Merge origin/frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 13, 2026
39daf68
Merge frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 14, 2026
5f482d9
FRLG tests: drop the RNG plan comment the merge duplicated
dayfine Nov 14, 2026
b85a924
Merge frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 14, 2026
88db2c8
Merge frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 14, 2026
de75cf9
Merge frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 14, 2026
9a94489
Merge origin/frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 14, 2026
b9b6111
Merge origin/frlg/stage2-rng into frlg/stage3-mtmoon
dayfine Nov 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*
*/

#include <algorithm>
#include "Common/Cpp/Exceptions.h"
#include "PokemonFRLG_OverworldMap.h"

Expand Down Expand Up @@ -43,8 +44,14 @@ bool is_ledge(const MapData& map, const TilePos& point){
bool is_water(const MapData& map, const TilePos& point){
return tile_at(map, point) == TileKind::WATER;
}


bool is_tall_grass(const MapData& map, const TilePos& point){
return tile_at(map, point) == TileKind::TALL_GRASS;
if (tile_at(map, point) == TileKind::TALL_GRASS){
return true;
}
const auto wild = map.regions.find(std::string(WILD_REGION));
return wild != map.regions.end() && std::find(wild->second.begin(), wild->second.end(), point) != wild->second.end();
}

namespace{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ constexpr std::string_view MAP_NAMES[] = {
"PewterCity_Mart",
"PewterCity_Museum_1F",
"PewterCity_Gym",
// Route 3 to the Magikarp salesman in Route 4's Pokemon Center.
"Route3",
"Route4",
"Route4_PokemonCenter_1F",
// Mt. Moon, from Route 4 west of it to Route 4 east of it.
"MtMoon_1F",
"MtMoon_B1F",
"MtMoon_B2F",
// Cerulean Cave, for Mewtwo.
"CeruleanCity_PokemonCenter_1F",
"CeruleanCity",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
/* Overworld Maps Tests

Check warning on line 1 in SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

<file>: file_lines=596 (advisory above 500, limit 1000)
*
* From: https://github.com/PokemonAutomation/
*
*/

#include <chrono>
#include <format>
#include <functional>
#include <initializer_list>
#include <set>
#include <string>
#include "Common/Cpp/Exceptions.h"
#include "Common/Cpp/TestRunners/UnitTest.h"
#include "PokemonFRLG_OverworldMap.h"
#include "PokemonFRLG_OverworldMaps.h"
#include "PokemonFRLG_OverworldReanchor.h"
#include "PokemonFRLG_OverworldRoute.h"

namespace PokemonAutomation{
Expand Down Expand Up @@ -222,6 +226,159 @@
return true;
}

const MapData* built_in(const std::vector<MapData>& maps, const std::string& name){
for (const MapData& map : maps){
if (map.name == name){
return &map;
}
}
return nullptr;
}

// Route 3, Route 4 and its Pokemon Center load, joined to Pewter City; the
// Center doesn't let the player run, the routes do.
UnitTestResult test_route3_route4_maps(){
const std::vector<MapData> maps = overworld_maps();
for (const std::string& name : std::vector<std::string>{"Route3", "Route4", "Route4_PokemonCenter_1F"}){
if (built_in(maps, name) == nullptr){
return std::string("Missing map ") + name + ".";

Check warning on line 244 in SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

style: build strings with std::format, not + on a literal / std::to_string / std::string (fork AGENTS.md "Strings")
}
}
if (!built_in(maps, "Route3")->allow_running || !built_in(maps, "PewterCity")->allow_running
|| built_in(maps, "Route4_PokemonCenter_1F")->allow_running || built_in(maps, "PewterCity_PokemonCenter_1F")->allow_running
){
return "Expected running on the routes and Pewter City, not in the Pokemon Centers.";
}
const MapPosition nurse{"Route4_PokemonCenter_1F", map_point(maps, "Route4_PokemonCenter_1F", "nurse_front")};
const MapPosition salesman{"Route4_PokemonCenter_1F", map_point(maps, "Route4_PokemonCenter_1F", "salesman_front")};
if (nurse.point != TilePos{7, 4} || salesman.point != TilePos{2, 3}){
return "Unexpected nurse_front or salesman_front.";
}
const MapPosition pewter{"PewterCity", {45, 21}};
if (!plan_overworld_route(maps, pewter, RouteGoal{nurse, Direction::NORTH})){
return "No route from Pewter City over Route 3 to Route 4's Pokemon Center.";
}
return true;
}

// Mt. Moon's three floors load, every floor tile of them with wild
// encounters, and join Route 4's two cave mouths: the way from the west
// mouth (19, 5) to the east one (32, 5) goes down to B2F and back up,
// through the gap the fossils leave once taken, and comes out walked a
// tile south, facing south.
UnitTestResult test_mt_moon_maps(){

Check warning on line 269 in SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

PokemonAutomation::NintendoSwitch::PokemonFRLG::test_mt_moon_maps(): function_lines=33 (advisory above 25, limit 50)
const std::vector<MapData> maps = overworld_maps({"FLAG_HIDE_DOME_FOSSIL", "FLAG_HIDE_HELIX_FOSSIL"});
for (const std::string& name : std::vector<std::string>{"MtMoon_1F", "MtMoon_B1F", "MtMoon_B2F"}){
const MapData* map = built_in(maps, name);
if (map == nullptr){
return std::string("Missing map ") + name + ".";

Check warning on line 274 in SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

style: build strings with std::format, not + on a literal / std::to_string / std::string (fork AGENTS.md "Strings")
}
for (int y = 0; y < map->tiles.height; y++){
for (int x = 0; x < map->tiles.width; x++){
const TilePos tile{x, y};
if (map->tiles.at(tile) == TileKind::OPEN && warp_at(*map, tile) == nullptr){
return std::format("{}: open floor without wild encounters at {}.", name, Pokemon::to_string(tile));
}
}
}
}
const std::optional<std::vector<RouteStep>> route = plan_overworld_route(
maps, MapPosition{"Route4", {19, 6}}, RouteGoal{MapPosition{"Route4", {32, 6}}, Direction::SOUTH}
);
if (!route || route->empty()){
return "No route through Mt. Moon from Route 4's west mouth to its east one.";
}
std::set<std::string> floors;
for (const RouteStep& step : *route){
if (step.warps){
floors.insert(step.end.map);
}
}
if (floors != std::set<std::string>{"MtMoon_1F", "MtMoon_B1F", "MtMoon_B2F", "Route4"} || route->back().facing_after != Direction::SOUTH){
return "Expected the way through to warp onto every floor and out to Route 4 facing south.";
}
return true;
}

// Mt. Moon B2F's floor closed on its north side, along row 14, has wild
// encounters like the cave floor south of it: a leg along it is wild, so the
// walker watches for a battle there.
UnitTestResult test_mt_moon_closed_floor_wild(){
const std::vector<MapData> maps = overworld_maps({"FLAG_HIDE_DOME_FOSSIL", "FLAG_HIDE_HELIX_FOSSIL"});
const MapData* map = built_in(maps, "MtMoon_B2F");
if (map == nullptr){
return "Missing map MtMoon_B2F.";
}
if (map->tiles.at({40, 14}) != TileKind::CLOSED_NORTH || !is_tall_grass(*map, {40, 14})){
return "Expected MtMoon_B2F (40, 14) to be floor closed on the north, with wild encounters.";
}
const std::optional<std::vector<RouteStep>> route = plan_overworld_route(
maps, MapPosition{"MtMoon_B2F", {37, 14}}, RouteGoal{MapPosition{"MtMoon_B2F", {46, 14}}, Direction::EAST}
);
if (!route || route->size() != 1){
return "Expected one leg along MtMoon_B2F's row 14.";
}
const RouteStep& step = route->front();
if (step.direction != Direction::EAST || step.tiles != 9 || !step.wild){
return "Expected a wild leg 9 tiles east along row 14, got " + to_string(step) + ".";

Check warning on line 323 in SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

style: build strings with std::format, not + on a literal / std::to_string / std::string (fork AGENTS.md "Strings")
}
return true;
}

// A planned step walks where its map doesn't let the player run, and only
// there: out of Pewter's Pokemon Center to the Gym.
UnitTestResult test_walk_only_indoors(){

Check warning on line 330 in SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

PokemonAutomation::NintendoSwitch::PokemonFRLG::test_walk_only_indoors(): function_lines=29 (advisory above 25, limit 50)
const std::vector<MapData> maps = overworld_maps();
MapPosition from{"PewterCity_PokemonCenter_1F", map_point(maps, "PewterCity_PokemonCenter_1F", "nurse_front")};
const std::optional<std::vector<RouteStep>> route = plan_overworld_route(
maps, from, RouteGoal{MapPosition{"PewterCity", map_point(maps, "PewterCity", "gym_front")}, Direction::NORTH}
);
if (!route){
return "No route from Pewter's Pokemon Center to the Gym.";
}
bool indoors = false;
bool outdoors = false;
for (const RouteStep& step : *route){
const bool in_center = from.map == "PewterCity_PokemonCenter_1F";
if (step.action == RouteAction::WALK && step.walk_only != in_center){
return "Wrong walk_only on " + to_string(step) + ", from " + to_string(from) + ".";

Check warning on line 344 in SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

style: build strings with std::format, not + on a literal / std::to_string / std::string (fork AGENTS.md "Strings")
}
indoors = indoors || in_center;
outdoors = outdoors || !in_center;
from = step.end;
}
if (!indoors || !outdoors){
return "Expected steps inside the Center and outside.";
}
const std::optional<WallHold> hold = hold_to_wall(maps, {"PewterCity_PokemonCenter_1F", {7, 4}}, false, Direction::WEST);
if (!hold || !hold->walk_only){
return "Expected a hold to a wall in the Center to walk.";
}
return true;
}

// From (7, 6) in Route 4's Pokemon Center to the salesman, no leg holds
// west along row 6: the escalator at (1, 6) rides up to 2F, which isn't
// loaded (console B, 2026-11-02, "west 5 (to wall)").
UnitTestResult test_route4_center_escalator(){
const std::vector<MapData> maps = overworld_maps();
const MapPosition start{"Route4_PokemonCenter_1F", {7, 6}};
const MapPosition salesman{"Route4_PokemonCenter_1F", {2, 3}};
if (hold_to_wall(maps, start, false, Direction::WEST)){
return "Expected no hold west from (7, 6) along the escalator's row.";
}
const std::optional<std::vector<RouteStep>> route = plan_overworld_route(maps, start, RouteGoal{salesman, Direction::WEST});
if (!route || !(follow_overworld_route(maps, start, *route) == salesman)){
return "Expected a route from (7, 6) to the salesman.";
}
for (const RouteStep& step : *route){
if (step.to_wall && step.direction == Direction::WEST && step.end.point == TilePos{2, 6}){
return "Expected no hold west next to the escalator: " + to_string(step);

Check warning on line 376 in SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

style: build strings with std::format, not + on a literal / std::to_string / std::string (fork AGENTS.md "Strings")
}
}
return true;
}

// A hall with an escalator at (1, 2) to a floor that isn't loaded, like
// Route 4's Pokemon Center.
const std::string ESCALATOR_HALL = R"({
Expand Down Expand Up @@ -251,6 +408,111 @@
}


// Whether the player, `walked` tiles into `step` from `at` when stopped,
// is found again and walked back to the leg's end.
UnitTestResult check_found_again(
const std::vector<MapData>& maps, const MapPosition& at, const RouteStep& step, WalkedTiles walked
){
const std::vector<StopCandidate> candidates = stop_candidates(maps, at, step, walked);
const std::optional<Reanchor> anchor = plan_reanchor(maps, candidates, step);
if (!anchor || !(follow_overworld_route(maps, anchor->found, anchor->back) == step.end)){
return std::format(
"Not found again on {} from {}, stopped {} to {} tiles in ({} candidates).",
to_string(step), to_string(at), walked.min, walked.max, candidates.size()
);
}
return true;
}

// Every open leg from `start` to `goal`, stopped wherever the timing may
// put it, walking or running, or anywhere on it: the player is found again.
// A leg to a warp off the grass is held on to its warp instead.
UnitTestResult check_found_again(const std::vector<MapData>& maps, const MapPosition& start, const MapPosition& goal){
const std::optional<std::vector<RouteStep>> route = plan_overworld_route(maps, start, RouteGoal{goal, std::nullopt});
if (!route){
return "No route from " + to_string(start) + ".";

Check warning on line 433 in SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

style: build strings with std::format, not + on a literal / std::to_string / std::string (fork AGENTS.md "Strings")
}
MapPosition at = start;
for (const RouteStep& step : *route){
std::vector<WalkedTiles> stops;
if (step.action == RouteAction::WALK && !step.to_wall && !(step.warps && !step.wild)){
stops.push_back(whole_leg(step));
for (int estimate = 0; estimate <= step.tiles; estimate++){
stops.push_back(walked_near(step, estimate, std::chrono::milliseconds(267)));
stops.push_back(walked_near(step, estimate, std::chrono::milliseconds(133)));
}
}
for (const WalkedTiles& walked : stops){
const UnitTestResult result = check_found_again(maps, at, step, walked);
if (result.result != UnitTestResult::PASSED){
return result;
}
}
at = step.end;
}
return true;
}

// 00.11's way from Pewter into Route 3 and 00.12's over Route 3 and 4.
UnitTestResult test_found_again_route3_route4(){
const std::vector<MapData> maps = overworld_maps();
const UnitTestResult into_route3 = check_found_again(maps, {"PewterCity", {17, 26}}, {"Route3", {13, 8}});
if (into_route3.result != UnitTestResult::PASSED){
return into_route3;
}
return check_found_again(maps, {"Route3", {36, 8}}, {"Route4_PokemonCenter_1F", {7, 4}});
}

// A leg off the grass that crosses one trainer's sight, on the maps the
// story walks: a stop on it is that trainer's, on the tile they see, and
// they stand next to the player afterwards.
UnitTestResult test_trainer_stops(){

Check warning on line 469 in SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldMaps_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

PokemonAutomation::NintendoSwitch::PokemonFRLG::test_trainer_stops(): function_lines=45 (advisory above 25, limit 50)
const std::vector<MapData> maps = overworld_maps();
struct Case{
std::string_view name;
MapPosition start;
Direction direction;
int tiles;
bool to_wall;
MapPosition player;
MapPosition trainer;
};
const Case cases[] = {
{
.name = "Route 3, Lass Robin, east along row 9 (00.12)",
.start = {"Route3", {36, 9}}, .direction = Direction::EAST, .tiles = 11, .to_wall = true,
.player = {"Route3", {40, 9}}, .trainer = {"Route3", {40, 10}},
},
{
.name = "Viridian Forest, the Bug Catcher at (47, 45), north up column 42",
.start = {"ViridianForest", {42, 61}}, .direction = Direction::NORTH, .tiles = 17, .to_wall = false,
.player = {"ViridianForest", {42, 45}}, .trainer = {"ViridianForest", {43, 45}},
},
};
for (const Case& c : cases){
RouteStep step;
step.direction = c.direction;
step.tiles = c.tiles;
step.to_wall = c.to_wall;
step.end = c.start;
step.end.point = TilePos{
c.start.point.x + (c.direction == Direction::EAST ? c.tiles : 0),
c.start.point.y - (c.direction == Direction::NORTH ? c.tiles : 0),
};
const std::vector<StopCandidate> candidates = stop_candidates(maps, c.start, step, whole_leg(step));
if (candidates.size() != 1 || !(candidates[0].player == c.player) || !candidates[0].trainer || !(candidates[0].trainer->at == c.trainer)){
return std::format("{}: expected one stop, at {} with the trainer at {}; got {} candidates.",
c.name, to_string(c.player), to_string(c.trainer), candidates.size());
}
const std::optional<Reanchor> anchor = plan_reanchor(maps, candidates, step);
if (!anchor || !anchor->holds.empty() || !(follow_overworld_route(maps, c.player, anchor->back) == step.end)){
return std::string(c.name) + ": expected a way on from the stop, with no holds.";
}
}
return true;
}


const OverworldMapsTestCase OVERWORLD_MAPS_CASES[] = {
{
.input = {.name = "valid map", .body = test_valid_map},
Expand Down Expand Up @@ -280,6 +542,26 @@
.input = {.name = "not JSON", .body = test_not_json},
.expectation = {.description = "rejects malformed json input string"},
},
{
.input = {.name = "Route 3, Route 4 and its Pokemon Center", .body = test_route3_route4_maps},
.expectation = {.description = "verifies route 3 and 4 map definitions"},
},
{
.input = {.name = "Mt. Moon joins Route 4's cave mouths", .body = test_mt_moon_maps},
.expectation = {.description = "verifies Mt. Moon map connections"},
},
{
.input = {.name = "Mt. Moon's floor closed on one side is wild", .body = test_mt_moon_closed_floor_wild},
.expectation = {.description = "verifies wild encounters on closed floor"},
},
{
.input = {.name = "walks where running isn't allowed", .body = test_walk_only_indoors},
.expectation = {.description = "verifies walking-only constraints indoors"},
},
{
.input = {.name = "Route 4's Pokemon Center escalator", .body = test_route4_center_escalator},
.expectation = {.description = "verifies Route 4 center escalator"},
},
{
.input = {.name = "trainer sight", .body = test_trainer_sight},
.expectation = {.description = "evaluates line of sight for trainer objects"},
Expand All @@ -288,6 +570,14 @@
.input = {.name = "no hold onto an escalator", .body = test_no_hold_onto_escalator},
.expectation = {.description = "prevents holding into an escalator"},
},
{
.input = {.name = "found again on Route 3 and 4", .body = test_found_again_route3_route4},
.expectation = {.description = "verifies player reanchoring on Route 3 and 4"},
},
{
.input = {.name = "trainer stops on the story's maps", .body = test_trainer_stops},
.expectation = {.description = "verifies trainer stops along story routes"},
},
};

} // namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ std::optional<std::pair<std::vector<Hypothesis>, RouteStep>> hold_all(
add_unique(ends, Hypothesis{position.world, wall->end});
hold.tiles = std::max(hold.tiles, wall->tiles);
hold.wild = hold.wild || wall->wild;
hold.walk_only = hold.walk_only || wall->walk_only;
hold.end = wall->end;
}
return std::make_pair(std::move(ends), hold);
Expand Down
Loading
Loading