Skip to content

[BBQ Tree 3] Terarium navigation, Central Plaza arrival check and bounded returns - #274

Draft
dayfine wants to merge 21 commits into
mainfrom
bbq/tree3-navigation
Draft

dayfine wants to merge 21 commits into
mainfrom
bbq/tree3-navigation

Conversation

@dayfine

@dayfine dayfine commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Base: main (Draft PR on fork)

Consolidates the 2 fork PRs in Tree 3:

Supersedes: #24, #30.

dayfine and others added 14 commits October 22, 2026 09:05
return_to_plaza() flies to the closest Pokecenter on the map, and that
search can fall back to any fly point. Nothing checked where the player
landed, so every central_to_*() offset afterwards could be applied from
the wrong place (lab R3, 2026-10-22: landed near Chargestone, then
"Unable to fly to Chargestone Cavern!" ended the program).

(a) After landing, return_to_plaza() OCRs the place-name banner the game
shows ("Central Plaza" / 中心廣場) for up to 8 s. If it doesn't show
Central Plaza, it returns again with the cursor overshoot, up to 3
landings, then throws. Languages without a known name or OCR data skip
the check and log it. The loop runs against an injectable
PlazaReturnActions, unit tested with a scripted fake.

(b) map_move_cursor_fly() now throws TerariumFlyFailedException (an
OperationFailedExceptionWithScreenshot). process_and_do_quest() catches
only that type, returns to Central Plaza (checked), and lets the board
check count the attempt as failed, so the existing retry limit applies.
Other exceptions (shiny ProgramFinishedException, UserSetupError, other
operation failures) pass through as before.

return_to_plaza() takes the game language, so quest_wash_pokemon() now
takes the BBQ options.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Give PlazaReturnCase's `landings` a default member initializer (= {}), so
test cases that leave them out of a designated initializer compile on
the Windows Clang CI job.

That job builds with clang-cl /W4 /WX, which turns on
-Wmissing-designated-field-initializers: a designated initializer that
omits a field without a default member initializer is an error. Apple
clang's -Wextra does not enable that warning, so macOS builds miss it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
fly_toward_plaza() retried until it flew, with no limit: each pass mashed
B back to the overworld and ran fly_to_closest_pokecenter_on_map(), which
itself tries up to 17 times (~13 s each). In bbq-m5 (11:20) the same "no
Pokecenter at max warpable level" failure repeated for minutes. The roadmap (M13)
records one return that took 8m50s.

fly_toward_plaza() now tries once, with at most 3 closest-Pokecenter
tries (fly_to_closest_pokecenter_on_map() takes a try limit; it defaults
to 17, so other callers are unchanged), and returns whether it flew. A
battle on the way also ends the try. return_to_plaza_checked() counts a
fly that didn't happen as one of its 3 attempts, so after 3 the return
fails through the existing path (OperationFailedException) instead of
looping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Give PlazaReturnCase's `fly_results` a default member initializer (= {}), so
test cases that leave them out of a designated initializer compile on
the Windows Clang CI job.

That job builds with clang-cl /W4 /WX, which turns on
-Wmissing-designated-field-initializers: a designated initializer that
omits a field without a default member initializer is an error. Apple
clang's -Wextra does not enable that warning, so macOS builds miss it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine and others added 7 commits November 9, 2026 07:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Conflict in PokemonSV_Tests.cpp's includes: kept main's ItemPrinterJobsDetector include and this branch's TerariumPlazaReturn include.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
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