Skip to content

BBQ Farmer: stop fleeing from catch targets, skip the heal after no-battle attempts (behavior change) - #23

Closed
dayfine wants to merge 7 commits into
bbq/tests-filefrom
bbq/catch-grace-and-heal
Closed

dayfine wants to merge 7 commits into
bbq/tests-filefrom
bbq/catch-grace-and-heal

Conversation

@dayfine

@dayfine dayfine commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Depends on #51 (PokemonAutomation#1754, the BBQ tests file). Base: bbq/tests-file; the diff shows only this change.

Part of PokemonAutomation/ComputerControl#263.

quest_catch() fled from 7 of 22 logged catch battles: when its inner battle-menu wait saw the battle before the outer EncounterWatcher, run_until() returned -1 and return_to_plaza() ran from the target. It now counts that menu as a battle; Catch Any also catches a battle on the way back until the attempt has battled, through the new return_to_plaza_unless_battle() (return_to_plaza() is unchanged); and an attempt with no battle skips the Pokémon Center heal and re-fly, about 28 s each (behavior change). Six PokemonSV::BBQCatchOnReturn tests in PokemonSV_BBQTests.cpp cover when a battle on the way back is caught; the native BBQ runner passes 16 of 16 with the full app built on macOS arm64. Not yet run on a Switch: a live run should see the race case caught and the next central_to_* flight land correctly after a skipped heal.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

dayfine added a commit that referenced this pull request Oct 23, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine and others added 2 commits October 27, 2026 22:59
PokemonSV_Tests.cpp registers every SV test, and each BBQ change adds
its controller tests there, so parallel BBQ changes all conflict in it.
Move the Tera encounter tests unchanged into
Programs/Farming/PokemonSV_BBQTests.cpp, registered through one
add_tests_BBQ() call, following the add_tests_<Module>() pattern the
detectors use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
quest_catch() watches for the battle menu twice: an inner wait_until() and
the outer EncounterWatcher. When the inner one saw the menu first,
run_until() returned -1, the battle was treated as "no battle", and
return_to_plaza() fled from the target. Logs show 7 of 22 catch-quest
battles lost this way; no battle ever started after the 25 s timeout.

- Count the inner watcher's battle menu as a battle.
- Catch Any: catch a battle that starts on the way back to Central Plaza
  until this attempt has battled (return_to_plaza_unless_battle(), opt-in;
  return_to_plaza() is unchanged). Typed catch quests still flee.
- Skip the Pokecenter heal and re-fly after an attempt with no battle: the
  player is still on the Central Plaza fly point (~28 s per attempt).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine
dayfine force-pushed the bbq/catch-grace-and-heal branch from 99377cf to 70cf43c Compare October 28, 2026 08:08
@dayfine
dayfine changed the base branch from main to bbq/tests-file October 28, 2026 08:09
@dayfine
dayfine force-pushed the bbq/tests-file branch 2 times, most recently from bf82b48 to daa1de3 Compare October 28, 2026 20:37
@dayfine dayfine added farmer Farming programs game:sv Scarlet/Violet labels Nov 1, 2026
@dayfine

dayfine commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

Superseded by consolidated Tree 4 PR #275.

@dayfine dayfine closed this Nov 9, 2026
@dayfine
dayfine deleted the bbq/catch-grace-and-heal branch November 13, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

farmer Farming programs game:sv Scarlet/Violet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant