Skip to content

FRLG sim: no turn toward a trainer who walks up; 17.03 round Takashi - #553

Draft
dayfine wants to merge 11 commits into
frlg/endpoint-simsfrom
frlg/sim-trainer-turn
Draft

dayfine wants to merge 11 commits into
frlg/endpoint-simsfrom
frlg/sim-trainer-turn

Conversation

@dayfine

@dayfine dayfine commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Depends on #550. Base: frlg/endpoint-sims. It also merges frlg/stage20-league for #548's re-anchor end facing, so until #550 merges that too, the diff shows #548's four files as well.

The overworld sim turned the player toward a trainer who walked up, which pokefirered doesn't do (TrainerSeeFunc_PrepareToEngage, the turn is commented out), so the sim no longer turns them. That turns 10.04, 17.02 and 06.03 green (06.03 also takes 06.02's beaten gym trainers). Warren's and Takashi's battles now set trainer_beaten/trainer_at for the tiles they walk up to, (14, 7) and (10, 4) (TrainerApproachPlayer stops one tile short), so 17.03's route to Giovanni goes round Takashi by the spinners, and 17.04/17.04b start with both flags. The fault sweep carries each step's flags_after and moves trainers as its start flags say. 17.03 and 13.01 ended facing the wrong way because the open-leg check on their last leg re-anchored at walls and the way back had no end facing; #548's fix ends it facing as planned, so both have endpoint cases now and no exemption. 16.03's golden line becomes "walk north 1 (to wall)", as SilphCo_5F (12, 19) is a wall (it failed on the base too). Tested with the headless runner on the endpoint suite, the golden, the Viridian tests and the 13.0x/17.0x fault sweeps.

…s round Takashi

pokefirered's TrainerSeeFunc_PrepareToEngage() does not turn the player
to the trainer (the turn is commented out), so OverworldSim no longer
does. Warren's and Takashi's battles set trainer_beaten and trainer_at
for the tiles they walked up to, (14, 7) and (10, 4), and 17.03 starts
with Warren's; the fault sweep carries each step's flags_after and its
sim maps move the trainers its start flags say. The endpoint cases of
06.03, 10.04, 17.02 and 17.03 replace their exemptions.
…exempt

below_giovanni now plans round Takashi on (10, 4): back down, east and
round by the spinners to (19, 3), the row-2 spinner to (11, 2), then west
and down to (2, 3). On the sim the walk reaches (2, 3) but ends facing
west, so its endpoint case waits.
…Giovanni

Red here: the open-leg check on below_giovanni's last leg, north 3 to
(2, 3), finds the player at walls and its way back ends "west 1", so
the walk ends facing west. The re-anchor's end facing comes with #548.
SilphCo_5F (12, 19) is a wall, so the planner since #514 marks the leg
onto (12, 20) "(to wall)", as 16.02's leg onto the same tile already is.
The golden failed on frlg/endpoint-sims as well.
… where they stopped

The start flags follow from 17.02's and 17.03's battles: both trainers
beaten, standing on (14, 7) and (10, 4), so later plans route round them.
The sim's north facing on (19, 13) was the same re-anchor as 17.03's:
the open-leg check on mansion_holes' last leg, south 10, found the player
at walls and the way back ended "north 1". With #548's end facing it
ends facing south. No endpoint exemption is left for it or 17.03.
…m-trainer-turn

# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryFaultSweep_Tests.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant