Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ad9c1b6
PokemonFRLG: 11.01, Fly to Celadon and run from Route 16's Snorlax
dayfine Nov 12, 2026
262499e
PokemonFRLG: 11.01 flies with the Pidgey by species and walks over th…
dayfine Nov 12, 2026
4bb322f
Merge frlg/stage9-tower into frlg/stage11-snorlax
dayfine Nov 12, 2026
343f575
PokemonFRLG: the Fly user's slot lookup is FlyPlan::party_slot(), seg…
dayfine Nov 12, 2026
9e9cb72
Merge remote-tracking branch 'origin/frlg/stage11-snorlax' into frlg/…
dayfine Nov 12, 2026
b1366cd
Merge remote-tracking branch 'origin/frlg/stage9-tower' into HEAD
dayfine Nov 12, 2026
23eb7d6
Merge frlg/stage9-tower (#405) into frlg/stage11-snorlax
dayfine Nov 12, 2026
1dbdfaf
Merge frlg/stage9-tower: the Mart walks its cursor over the scrolling…
dayfine Nov 12, 2026
fc744e2
Merge frlg/stage9-tower (#405): a warp whose fade went unseen is take…
dayfine Nov 12, 2026
508cece
Merge frlg/stage9-tower (#405): the Cycling Road's gates leave a ride…
dayfine Nov 12, 2026
c0a639d
Merge frlg/stage9-tower (#405): the Pidgey's moves read, the summary …
dayfine Nov 12, 2026
69a9fde
Merge frlg/stage9-tower (#405): the whole Items pocket read; Water Pu…
dayfine Nov 12, 2026
bd76ed0
Merge frlg/stage9-tower (#405): a turn tap is not a step; onto the To…
dayfine Nov 12, 2026
eaedc91
Merge frlg/stage9-tower (#405): planned legs onto side stairs from th…
dayfine Nov 12, 2026
e331852
Merge remote-tracking branch 'origin/frlg/stage9-tower' into HEAD
dayfine Nov 12, 2026
763cde5
Merge branch 'frlg/stage9-tower' into frlg/stage11-snorlax
dayfine Nov 12, 2026
f75e25e
Merge branch 'frlg/stage9-tower' into tmp-417
dayfine Nov 12, 2026
52e27a9
Merge frlg/stage9-tower: facings after trainer battles, approaches to…
dayfine Nov 12, 2026
deda35b
PokemonFRLG AutoStory: 11.01 reaches the Snorlax from a wall
dayfine Nov 12, 2026
3464b58
PokemonFRLG AutoStory: read the Bicycle again before a second SELECT
dayfine Nov 12, 2026
f76051a
PokemonFRLG AutoStory sim: legs on the Bicycle that start off it (red)
dayfine Nov 12, 2026
a1af231
PokemonFRLG AutoStory: get back on the Bicycle when a bike tap finds …
dayfine Nov 12, 2026
523b6cd
Merge frlg/stage9-tower into frlg/stage11-snorlax: upstream #1881 fre…
dayfine Nov 13, 2026
d56c9f7
Merge frlg/stage9-tower into frlg/stage11-snorlax
dayfine Nov 14, 2026
84ec8cc
Merge frlg/stage9-tower into frlg/stage11-snorlax
dayfine Nov 14, 2026
d2295ec
Merge frlg/stage9-tower into frlg/stage11-snorlax
dayfine Nov 14, 2026
7fca53e
Merge frlg/stage9-tower into frlg/stage11-snorlax
dayfine Nov 14, 2026
bf92369
Merge origin/frlg/stage9-tower into frlg/stage11-snorlax
dayfine Nov 14, 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 @@ -61,7 +61,7 @@
: SmallDictionaryMatcher(dictionary())
{}

static JsonObject dictionary(){

Check warning on line 64 in SerialPrograms/Source/VideoGames/PokemonFRLG/Inference/Menus/PokemonFRLG_SaveCardReader.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

PokemonAutomation::NintendoSwitch::PokemonFRLG::PlaceNameMatcher::dictionary(): function_lines=30 (advisory above 25, limit 50)
JsonObject english;
for (const auto& [slug, name] : {
std::pair<std::string_view, std::string_view>{"pallet-town", "Pallet Town"},
Expand All @@ -81,6 +81,7 @@
{"celadon-city", "Celadon City"},
{"rocket-hideout", "Rocket Hideout"},
{"pokemon-tower", "Pokemon Tower"},
{"route-16", "Route 16"},
}){
JsonArray names;
names.push_back(std::string(name));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,17 @@ bool counts_bike_taps(const RouteStep& step, MoveSpeed speed);
bool gets_on_bike(const RouteStep& step, MoveSpeed speed, bool riding);

// The console side of select_onto_bike(): presses SELECT and waits it
// out; reads whether the player rides.
// out; reads whether the player rides; waits before reading again.
struct BikeSelectCalls{
std::function<void()> press_select;
std::function<bool()> riding;
std::function<void()> wait_to_read_again;
};

// Gets on the registered Bicycle with SELECT, checks the player rides,
// and presses again once if not. Returns whether they ride.
// and presses again once if not. A read on foot is read again first: a
// SELECT can show late, and pressed again then it gets the player off
// (11.01, console B, 2026-11-12). Returns whether they ride.
bool select_onto_bike(const BikeSelectCalls& calls);

// Whether the player rides the Bicycle, from the screen: the overworld
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,21 @@ StepOutcome count_bike_taps(const RouteStep& step, const BikeTapCalls& calls){
return StepOutcome{};
}

StepOutcome count_bike_taps_remounting(const RouteStep& step, const BikeTapCalls& calls, const std::function<bool()>& remount){
BikeTapCalls remounting = calls;
bool remounted = false;
remounting.tap = [&](int tap){
const BikeTap result = calls.tap(tap);
if (result.moved || result.interrupt || result.cleared_late || remounted || !remount()){
return result;
}
remounted = true;
calls.log(std::format("Bike: tap {} of {} didn't move, the player on foot: back on with SELECT, tapping again.", tap, step.tiles));
return calls.tap(tap);
};
return count_bike_taps(step, remounting);
}

bool counts_step_taps(const RouteStep& step){
return step.tapped && step.action == RouteAction::WALK && step.tiles > 0
&& !step.surfing && !step.warps && step.connection_steps.empty();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Overworld Bicycle Taps

Check warning on line 1 in SerialPrograms/Source/VideoGames/PokemonFRLG/Overworld/PokemonFRLG_OverworldBikeTaps.h

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

<header>: header_symbols=8 (advisory above 6, limit 8)
*
* From: https://github.com/PokemonAutomation/
*
Expand Down Expand Up @@ -68,6 +68,13 @@
// and one more, which may have moved before its battle showed.
StepOutcome count_bike_taps(const RouteStep& step, const BikeTapCalls& calls);

// count_bike_taps() on the Bicycle, where a tap that doesn't move may
// find the player on foot: `remount` then says whether they were and got
// back on, and the tap is tapped again, once a leg. On foot a bike tap
// only turned the player, each taken as blocked, and the route replanned
// 9 times (11.01, console B, 2026-11-12 05:42).
StepOutcome count_bike_taps_remounting(const RouteStep& step, const BikeTapCalls& calls, const std::function<bool()>& remount);

// Whether `step` is walked on foot a tap at a time (RouteStep::tapped),
// each a tile, by count_bike_taps() with STEP_TAP_TRIES: an open leg or
// one to a wall or onto a spinner, not onto a warp or over a connection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,28 @@ UnitTestResult test_select_onto_bike(){
return true;
}

// A SELECT that shows on the screen a read late: the read right after it
// still has the player on foot. Pressed again then, SELECT got them off
// (11.01 ride_bike, console B, 2026-11-12 05:42: "not riding after
// SELECT", then "riding" on foot, and every bike tap after only turned).
UnitTestResult test_select_onto_bike_shown_late(){
bool on_bike = false;
bool shown = false;
int presses = 0;
BikeSelectCalls calls;
calls.press_select = [&]{ presses++; on_bike = !on_bike; };
calls.riding = [&]{
const bool read = shown;
shown = on_bike;
return read;
};
const bool riding = OverworldWalkSteps::select_onto_bike(calls);
if (!riding || !on_bike || presses != 1){
return std::format("Read riding {}, on the Bicycle {}, after {} press(es).", riding, on_bike, presses);
}
return true;
}

// A door takes the player off the Bicycle: legs after it go on foot,
// until one where the Bicycle may be ridden gets on again.
UnitTestResult test_speed_after_door(){
Expand Down Expand Up @@ -256,12 +278,42 @@ UnitTestResult test_scroll_over_periodic_floor(){
return true;
}

// An open leg of 11 tiles west on the Bicycle from (20, 2), the player
// facing south, found off the Bicycle as it starts (11.01, console B,
// 2026-11-12 05:42: on foot, every bike tap only turned the player,
// "blocked after 0 tiles", and the route replanned 9 times). The tap
// that didn't move finds them on foot, SELECT gets them on, and the leg
// is tapped out from there.
UnitTestResult test_leg_starts_off_bike(){
SimScript script;
script.on_bike = true;
script.bike_registered = true;
script.off_bike_at_legs = {1};
OverworldSim sim(field(), at(20, 2), Direction::SOUTH, script);
SimWalkerRules rules;
rules.speed = MoveSpeed::BIKE;
OverworldSimWalker walker(sim, rules);
const RoutePlanning planning{.maps = &field(), .costs = default_route_costs(), .start = at(20, 2), .label = "Sim"};
const std::string failure = walker.run({open_leg(Direction::WEST, 11, at(9, 2))}, planning);
std::vector<std::string> log = walker.log();
log.insert(log.end(), sim.state().log.begin(), sim.state().log.end());
if (!failure.empty()){
return failure + log_text(log);
}
if (!(sim.state().position == at(9, 2)) || !sim.state().on_bike){
return std::format("Ended on {}, riding {}; expected {}, riding.", to_string(sim.state().position), sim.state().on_bike, to_string(at(9, 2))) + log_text(log);
}
return true;
}

const BikeCase OVERWORLD_BIKE_CASES[] = {
{.input = {"a tap over a floor that repeats every tile", test_scroll_over_periodic_floor}, .expectation = {"scroll seen at the bottom edge; a turn is not"}},
{.input = {"taps a tile each, one in 12 dropped 60ms apart", test_tap_chains}, .expectation = {"23 of 25 tiles at 60ms; 25 at 100 and 120ms"}},
{.input = {"an open leg of 11 from a start 2 off, counted in taps", test_counted_leg_off_start}, .expectation = {"found against the rock and walked back"}},
{.input = {"SELECT onto the registered Bicycle", test_select_onto_bike}, .expectation = {"one press registered; two and off unregistered"}},
{.input = {"SELECT onto the Bicycle shown a read late", test_select_onto_bike_shown_late}, .expectation = {"read again, not pressed off"}},
{.input = {"on foot after a door, on again outdoors", test_speed_after_door}, .expectation = {"gets_on_bike(), on_foot()"}},
{.input = {"a leg on the Bicycle that starts off it", test_leg_starts_off_bike}, .expectation = {"SELECT on at the tap that didn't move, the leg walked"}},
};

} // namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,24 @@ BikeTap console_bike_tap(
// An open leg on the Bicycle, a tap at a time (count_bike_taps()).
StepWalk walk_bike_taps(
ConsoleHandle& console, ProControllerContext& context,
const RouteStep& step, const OverworldInterruptSet& interrupts
const RouteStep& step, const OverworldInterruptSet& interrupts, PlayerGender player
){
StepWalk out{std::nullopt, current_time(), false, false};
const OverworldInterrupts& watched = step.wild ? interrupts.wild : interrupts.other;
BikeTapCalls calls;
calls.tap = [&](int){ return console_bike_tap(console, context, step, watched, BIKE_TAP_TIMING); };
calls.clear = [&](size_t index){ watched[index]->clear(console, context); };
calls.log = [&](const std::string& message){ console.log(message, COLOR_ORANGE); };
const StepOutcome outcome = count_bike_taps(step, calls);
// On foot if the player's standing sprite reads.
const auto remount = [&]{
if (!read_facing(console, context, player)){
return false;
}
console.log("Bike: a tap didn't move and the player is on foot.", COLOR_ORANGE);
get_on_bike(console, context, player);
return true;
};
const StepOutcome outcome = count_bike_taps_remounting(step, calls, remount);
out.stopped = outcome.walked;
out.blocked = outcome.blocked;
return out;
Expand Down Expand Up @@ -308,7 +317,7 @@ StepOutcome walk_and_watch(
if (counts_step_taps(step)){
walked = walk_step_taps(console, context, step, interrupts, player);
}else if (counts_bike_taps(step, speed)){
walked = walk_bike_taps(console, context, step, interrupts);
walked = walk_bike_taps(console, context, step, interrupts, player);
}else{
walked = walk_step(console, context, step, facing, interrupts, speed, player);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ std::optional<SimSeen> OverworldSim::hold(
const Milliseconds start = m_now;
m_holds++;
m_last_tap.reset();
count_bike_leg(direction, duration);
if (m_state.screen != SimScreen::OVERWORLD || m_frozen){
stuck_hold(direction);
}else if (m_state.on_bike && duration <= MovementMechanics::LONGEST_TAP && drops_bike_tap(start)){
Expand All @@ -558,6 +559,7 @@ std::optional<SimSeen> OverworldSim::hold(

void OverworldSim::tap(Direction direction, Milliseconds duration, Milliseconds release){
const Milliseconds start = m_now;
m_bike_leg_direction.reset();
if (m_state.screen != SimScreen::OVERWORLD || m_frozen || start < m_battle_lockout_end){
stuck_hold(direction);
m_last_tap.reset();
Expand Down Expand Up @@ -621,17 +623,6 @@ void OverworldSim::hold_on(Direction direction, Milliseconds end){
press.end = end;
}

bool OverworldSim::reads_step_tap_as_step(const MapPosition& before, int turn_taps_before){
const bool moved = !(m_state.position == before);
m_state.moved_step_taps += moved ? 1 : 0;
const bool misread = moved ? m_script.unseen_step_taps.contains(m_state.moved_step_taps)
: m_state.turn_taps > turn_taps_before && m_script.seen_turn_taps.contains(m_state.turn_taps);
if (misread){
note(moved ? std::format("step tap {} moves the player, read as not moved.", m_state.moved_step_taps) : std::format("turn tap {} only turns the player, read as a step.", m_state.turn_taps));
}
return moved != misread;
}

bool OverworldSim::drops_turn_tap(){
m_state.turn_taps++;
return m_script.dropped_turn_taps.contains(m_state.turn_taps);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ class OverworldSim{
// When the last Bicycle tap started, and how many came too soon.
std::optional<Milliseconds> m_last_bike_tap;
int m_fast_bike_taps = 0;
// A hold of `direction` for `duration`: counts the leg a tap on the
// Bicycle starts (SimState::bike_legs), and takes the player off the
// Bicycle if SimScript::off_bike_at_legs names it.
void count_bike_leg(Direction direction, Milliseconds duration);
// The way of the last Bicycle tap, unless another press came since.
std::optional<Direction> m_bike_leg_direction;
// When the last tap that stepped started.
std::optional<Milliseconds> m_last_step_tap;
// The end of the lockout after the last battle.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ struct SimScript{
// one leaves the player where they were, with no fade, as a wall would
// (the warp no-op fault class, PokemonFRLG_AutoStoryFaultSweep_Tests.cpp).
std::set<std::string> dead_warp_maps;
// Fault injection: legs on the Bicycle counted out a tap at a time
// (SimState::bike_legs), by number from 1, that start with
// the player off the Bicycle: the mount state lost. On 11.01 a second
// SELECT took the player off, and every bike tap after only turned
// them (console B, 2026-11-12 05:42).
std::set<int> off_bike_at_legs;
// The player rides the Bicycle: a tap facing another way takes a step
// too, a hold through a turn loses no tile
// (MovementMechanics::BIKE_TAP_ONLY_TURNS), and no step tap is
Expand Down Expand Up @@ -149,6 +155,10 @@ struct SimState{
int step_taps_ignored = 0;
// Walker step taps that moved the player (SimScript::unseen_step_taps).
int moved_step_taps = 0;
// Legs on the Bicycle counted out a tap at a time: taps on it, each
// a way other than the last's, or after another press
// (SimScript::off_bike_at_legs).
int bike_legs = 0;
std::vector<std::string> trainers_beaten;
// Things the walker did that the game wouldn't let pass: D-pad holds
// under a battle, a trainer's battle fled, a battle fought that wasn't
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ namespace PokemonFRLG{
using namespace MovementMechanics;
using namespace OverworldWalkSteps;

namespace{

// select_onto_bike()'s side on `sim`.
BikeSelectCalls sim_select_calls(OverworldSim& sim){
BikeSelectCalls calls;
calls.press_select = [&sim]{ sim.use_field(SimField::BIKE_SELECT); };
calls.riding = [&sim]{ return sim.state().on_bike; };
return calls;
}

} // namespace


bool OverworldSim::drops_bike_tap(Milliseconds start){
const bool fast = m_last_bike_tap && start - *m_last_bike_tap < MovementMechanics::BIKE_TAP_DROP_PERIOD;
Expand Down Expand Up @@ -53,6 +65,29 @@ bool OverworldSim::press_select(){
return true;
}

bool OverworldSim::reads_step_tap_as_step(const MapPosition& before, int turn_taps_before){
const bool moved = !(m_state.position == before);
m_state.moved_step_taps += moved ? 1 : 0;
const bool misread = moved ? m_script.unseen_step_taps.contains(m_state.moved_step_taps)
: m_state.turn_taps > turn_taps_before && m_script.seen_turn_taps.contains(m_state.turn_taps);
if (misread){
note(moved ? std::format("step tap {} moves the player, read as not moved.", m_state.moved_step_taps) : std::format("turn tap {} only turns the player, read as a step.", m_state.turn_taps));
}
return moved != misread;
}

void OverworldSim::count_bike_leg(Direction direction, Milliseconds duration){
const bool bike_tap = m_state.on_bike && duration <= MovementMechanics::LONGEST_TAP;
if (bike_tap && m_bike_leg_direction != direction){
m_state.bike_legs++;
if (m_script.off_bike_at_legs.contains(m_state.bike_legs)){
m_state.on_bike = false;
note(std::format("bike leg {} starts off the Bicycle.", m_state.bike_legs));
}
}
m_bike_leg_direction = bike_tap ? std::optional<Direction>(direction) : std::nullopt;
}

BikeTap OverworldSimWalker::bike_tap(const RouteStep& step){
const MapPosition before = m_sim.state().position;
const std::vector<Interrupt>& ints = interrupts(step);
Expand All @@ -74,9 +109,16 @@ StepOutcome OverworldSimWalker::walk_bike_taps(const RouteStep& step){
calls.tap = [&](int){ return bike_tap(step); };
calls.clear = [&](size_t index){ clear(ints[index]); };
calls.log = [&](const std::string& message){ m_log.push_back(message); };
const auto remount = [&]{
if (m_sim.state().on_bike){
return false;
}
m_log.push_back("Bike: a tap didn't move and the player is on foot: SELECT onto the Bicycle.");
return select_onto_bike(sim_select_calls(m_sim));
};
m_leg_start = m_sim.state().time;
m_leg_dark = m_sim.state().dark;
return count_bike_taps(step, calls);
return count_bike_taps_remounting(step, calls, remount);
}

BikeTap OverworldSimWalker::step_tap(const RouteStep& step, int tap){
Expand Down Expand Up @@ -112,10 +154,7 @@ StepOutcome OverworldSimWalker::walk_step_taps(const RouteStep& step){
// walk_overworld_route_with_recovery() does.
StepOutcome OverworldSimWalker::walk(const RouteStep& step, std::optional<Direction> facing){
if (m_rules.get_back_on_bike && gets_on_bike(step, m_rules.speed, m_riding)){
BikeSelectCalls select;
select.press_select = [&]{ m_sim.use_field(SimField::BIKE_SELECT); };
select.riding = [&]{ return m_sim.state().on_bike; };
if (!select_onto_bike(select)){
if (!select_onto_bike(sim_select_calls(m_sim))){
fail("get_on_bike(): not on the Bicycle after SELECT twice. Is it registered?");
}
m_riding = true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Overworld Walk

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

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

<file>: file_lines=918 (advisory above 500, limit 1000)
*
* From: https://github.com/PokemonAutomation/
*
Expand Down Expand Up @@ -231,6 +231,12 @@
if (calls.riding()){
return true;
}
if (calls.wait_to_read_again){
calls.wait_to_read_again();
}
if (calls.riding()){
return true;
}
}
return false;
}
Expand All @@ -256,6 +262,9 @@
console.log(riding ? "Bike: riding." : "Bike: not riding after SELECT.", riding ? COLOR_BLACK : COLOR_ORANGE);
return riding;
};
calls.wait_to_read_again = [&]{
pbf_wait(context, BIKE_SELECT_SETTLE);
};
console.log("Bike: SELECT (MINUS) onto the Bicycle.");
if (!select_onto_bike(calls)){
OperationFailedExceptionWithScreenshot::fire(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ static void add_tests_AutoStoryRows(UnitTestDatabase& database){
add_tests_AutoStoryVermilion(database);
add_tests_AutoStoryVermilionGym(database);
add_tests_AutoStoryCeladon(database);
add_tests_AutoStorySnorlax(database);
}

void add_tests(UnitTestDatabase& database){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* AutoStory Events

Check warning on line 1 in SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

<file>: file_lines=979 (advisory above 500, limit 1000)
*
* From: https://github.com/PokemonAutomation/
*
Expand Down Expand Up @@ -245,7 +245,7 @@
return Pokemon::outcome_ok(to_pose(StoryPose{state.pose.map, onto, direction}));
}

Outcome battle(StoryEnv& env, const StoryStep& step){

Check warning on line 248 in SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

PokemonAutomation::NintendoSwitch::PokemonFRLG::battle( StoryEnv & env , const StoryStep & step): function_lines=37 (advisory above 25, limit 50)
env.supplies.trainer = arg<std::string>(step, "trainer");
env.supplies.risk = default_battle_risk(env.supplies.trainer);
env.supplies.foe_out.clear();
Expand All @@ -260,7 +260,8 @@
step.name, env.supplies.trainer, battle_risk_name(env.supplies.risk)
));
}
const BattleEnd end = fight_battle(env.console, env.context, env.supplies, BattleKind::TRAINER, env.checks, env.language);
const BattleKind kind = arg<bool>(step, "run") ? BattleKind::WILD_RUN : BattleKind::TRAINER;
const BattleEnd end = fight_battle(env.console, env.context, env.supplies, kind, env.checks, env.language);
env.supplies.foes.clear();
env.supplies.trainer.clear();
env.supplies.foe_out.clear();
Expand Down Expand Up @@ -324,6 +325,11 @@
// The one ball the story picks up in its way: B2F's MOON STONE
// blocks column 2 of the arrow floor (09.02's moon_stone).
flags.insert("FLAG_HIDE_ROCKET_HIDEOUT_B2F_MOON_STONE");
// Route 16's Snorlax (31, 13), gone once 11.01 has played the POKE
// FLUTE and run: the routes after it go over its tile. None before
// it does (10.01 goes north by the Cut tree), and 11.01 walks up to
// it from the east.
flags.insert("FLAG_HIDE_ROUTE_16_SNORLAX");
return overworld_maps(flags);
}();
return maps;
Expand All @@ -341,7 +347,7 @@
return StoryPose{pose.map, tiles[0], facing_of(pose)};
}

std::string save_card_place(const std::string& map){

Check warning on line 350 in SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

PokemonAutomation::NintendoSwitch::PokemonFRLG::save_card_place( const std :: string & map): function_lines=28 (advisory above 25, limit 50)
// A map of the place, or a building in it ("Route4_PokemonCenter_1F"
// is on Route 4, "Route24" isn't on Route 2).
static const std::pair<std::string, std::string_view> PLACES[] = {
Expand All @@ -360,6 +366,7 @@
{"CeladonCity", "celadon-city"},
{"RocketHideout", "rocket-hideout"},
{"PokemonTower", "pokemon-tower"},
{"Route16", "route-16"},
};
for (const auto& [prefix, place] : PLACES){
if (map == prefix || map.rfind(prefix + "_", 0) == 0){
Expand Down
Loading
Loading