Repository navigation
Conversation
quest_hatch_egg() could pick a hatched Pokemon as the egg: it read the summary panel right after the cursor move, before the panel updated. Now it waits for the panel to settle and needs two fresh snapshots that both show an egg, rechecks the party lead after the swap, and swaps the lead back into its box slot if the hatch step fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
The summary-panel detector only tells eggs apart in the stats or judge view; in the default view every occupied slot reads as an egg (R7 and R8 swapped a Litten in and rode for 10 minutes). BoxEggDetector matches the egg sprite in the grid, so it works in any view, and one frame covers all 30 slots without moving the cursor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
main moved the quest token map, BBQuests_string_to_enum/enum_to_string and CameraAngle out of BlueberryQuests (PokemonAutomation#1631), and the BP crop into read_BP_from_image (PokemonAutomation#1628). Took main's versions and kept only this branch's log_bbq_snapshot() in BlueberryQuests; BlueberryCatchPhoto.cpp now includes BlueberryQuests.h directly, since its header no longer pulls it in. Unknown quests now log as an empty slug (main's enum_to_string) instead of "unknown". 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
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
This was referenced Nov 6, 2026
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
Owner
Author
|
Superseded by consolidated Tree 4 PR #275. |
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.
Part of PokemonAutomation/ComputerControl#263.
Update after lab R8 (2026-10-22): the first diagnosis (stale summary panel) was wrong.
BoxCurrentEggDetectorchecks that a summary-panel row is blank, which only tells eggs apart in the stats/judge view; in the default view every occupied slot reads as an egg, so the two-frame check couldn't help (R8 swapped the Litten in again). The scan now usesBoxEggDetectoron the slot icons, as Egg Hatcher does: works in any view, all 30 slots from one frame, no cursor moves. The lead check after the swap uses the same detector on party slot 1. The failed-hatch recovery was confirmed on the Switch (lead restored, back to the plaza); a stats-view variant of the scan hatched and paid +200 BP in R8. The icon scan itself builds but hasn't run on the Switch yet.Problem (C17)
In the bbq-r7 run (2026-10-22 18:39),
quest_hatch_egg()moved the cursor to box slot (0,0), logged "Cursor moved." at 18:39:36.417 and "Found egg." 15 ms later. The slot actually held a hatched Litten, put back there by the previous hatch. It swapped the Litten into party slot 0, rode for 10 minutes, threw "No more egg hatch after 10 minutes", and stopped with the lead still in the box.Root cause: the scan loop does take a new snapshot after each cursor move, but only after
wait_for_all_requests(). The summary panel had not caught up with the cursor yet, soBoxCurrentEggDetector/SomethingInBoxSlotDetectorread the panel from the previous selection. The egg check made right after the cursor move uses that frame.Fix (all in
quest_hatch_egg())box_cursor_slot_is_egg(), waits 300 ms and needs two snapshots in a row (300 ms apart) that both show an egg. The scan loop uses it. In the worst case (30 slots, no egg) the scan takes about 9 s longer.OperationFailedExceptionfromhatch_eggs_anywhere()(for example the 10-minute timeout) is caught and logged. The usual path then re-enters the box, swaps party slot 0 back into the slot it came from, and returns to the plaza. The quest stays on the list, soprocess_and_do_quest()counts it as a failed attempt (retries up toNUM_RETRIES, then skips it) instead of ending the program. The same applies when the lead check fails.If the hatch fails in a state where
enter_box_system_from_overworld()cannot recover (for example stuck in a dialog), the program still stops there, as it does today.M8a (Codex) covers wider party restoration. This PR is the minimal version for the hatch path only.
Testing
PokemonSV_BlueberryQuests.cppwas compiled, using R6's configure.How to review
There is one function plus one helper, so read the diff top to bottom. The changes:
box_cursor_slot_is_egg()try/catch🤖 Generated with Claude Code
https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E