Repository navigation
Conversation
central_to_*() only work when the player stands at Central Plaza, since they push the map cursor a fixed amount from where it opens. fly_to_terarium_point() anchors the cursor first, the way return_to_plaza() does (top-left corner, back toward the center), snaps it onto the Central Plaza icon, then applies the same central_to_*() offset. Before flying, it OCRs the fly point's name label on the map; a missing or wrong name closes the map and retries, up to 3 times, then returns false with the map closed. Names are known for English and the Chinese (Traditional) plazas; other names are not checked yet. The offsets now live in one table that central_to_*() also reads, with the same values as before. The retry loop runs against an injectable TerariumFlyActions, so it is unit tested with a scripted fake. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Give TerariumFlyScenario's `central_plaza_found`, `labels`, `fly_point_under_cursor`, `expected_log` 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
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Roadmap milestone N1. Also covers PokemonAutomation#263 item 7 (check the fly point before flying).
Problem
central_to_*()push the map cursor a fixed amount from where the map opens, so they only work when the player stands at Central Plaza. Doing two quests in the same area (area batching) needs to fly from anywhere, and to know it reached the right fly point.Change
fly_to_terarium_point(info, stream, context, language, TerariumFlyPoint)(new, nothing calls it yet):return_to_plaza()does: top-left corner one zoom level out, then back toward the center (2000 ms, 2400 ms after a failure).detect_closest_flypoint_and_move_map_cursor_there()), then zoom back out.central_to_*()uses, then zoom out asmap_move_cursor_fly()does.MapFlyPointLabelReader, new). A missing or wrong name closes the map and retries. After 3 failed attempts it returnsfalse, back in the overworld. It doesn't throw.central_to_*()behavior is unchanged. They now read their offsets from the same table, with the same values. A test pins each value to the old literal.TerariumFlyActions, with a console implementation and a scripted fake in the tests.How to review
Read in this order:
Programs/PokemonSV_TerariumFlyPoints.h/.cpp(new): the table, name matching, and the loop.Programs/PokemonSV_Terarium.cpp:TerariumFlyActionsConsole(the game steps) and the routing ofcentral_to_*()through the table.Inference/Map/PokemonSV_MapFlyPointLabelReader.cpp(new): the OCR box.PokemonSV_Tests.cpp.The only moved code is the nine
central_to_*()offset literals, now in the table. They moved with renames (each argument became a named field), so--color-moveddoesn't mark them. Compare them by eye, or rely onTerariumFlyPointMove, which checks every value. Command:Tests
Native, in
PokemonSV_Tests.cpp: 30 cases, all passing locally.TerariumFlyPointMove(10): the table matches the oldcentral_to_*()literals.FlyPointLabelMatch(13): match, mismatch, no label and not checked, in English and Chinese, including OCR spacing and noise.TerariumFly(7): the loop against a scripted fake, covering first-try success, a wrong name then the right one, giving up after 3 attempts, Central Plaza not found, no fly menu, an unknown language, and Central Plaza as the destination.Not yet verified on a Switch (R6):
{0.250, 0.348, 0.500, 0.054}. It was measured from one lab screenshot of the 中心廣場 label at the zoom the map opens with.🤖 Generated with Claude Code
https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E