Skip to content

BBQ Farmer: separate the quest plan from the controller actions - #38

Closed
dayfine wants to merge 7 commits into
bbq/save-milestone-trackerfrom
bbq/quest-planner
Closed

dayfine wants to merge 7 commits into
bbq/save-milestone-trackerfrom
bbq/quest-planner

Conversation

@dayfine

@dayfine dayfine commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Stage 1 ("never stuck"), PR 2 of 9. Based on bbq/save-milestone-tracker (#37), so the diff shows only this change. Parents: #37 → #51 → main.

Part of PokemonAutomation/ComputerControl#263.

Moved from upstream PokemonAutomation#1640, to resend later (at most two open upstream).

Splits process_quest_list() into plan_quests(), which decides what to do with each quest from the options alone, and the part that presses the buttons. The decisions are unchanged and are now covered by unit tests. About half the diff is moved code: git diff --color-moved=dimmed-zebra main...pr-1640. One small difference: the out-of-eggs reroll now targets the egg quest's slot instead of always the top one (the same in practice, since it is a red quest).
Tested on the Switch with the rest of stage 1 in runs S1b and S1c (STAGE_RUNS.md): 15 quests, no stretch over 11 min without a completion, BP check OK. No behavior change here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

dayfine and others added 2 commits October 27, 2026 23:41
… out

process_quest_list() decided what to do with each quest and pressed
the buttons for it in the same loop, so the decisions could only be
checked on a Switch.

plan_quests() now makes the decisions from the options alone: which
quests to do, which panel slots to reroll, and whether to reroll all.
process_quest_list() carries out the plan, and opening the panel is a
shared helper instead of three copies.

All rerolls now move the cursor to the quest's slot. The out-of-eggs
reroll used to reroll the top slot; the egg quest is a red quest and
red quests are listed at the top, so this is the same in practice.
OOEggs::Stop reaching the planner is now an InternalProgramError,
since the farmer stops before that can happen.

Unit tests cover the plan for exclusions, duplicate rows, quests that
are not possible, and eggs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Move the out-of-eggs choice, the exclusions table rows, a single-slot
reroll and the reroll of every slot into file-local helpers, so
plan_quests() and process_quest_list() read as one level of steps.
Explain why the language-selection error is commented out.

open_quest_panel() sits next to read_quests(), which opens the same
panel, and returns whether the panel opened, so later changes can use
it without moving it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine
dayfine force-pushed the bbq/save-milestone-tracker branch from 64c2af9 to 272e7fe Compare October 28, 2026 08:14
# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonSV/Programs/Farming/PokemonSV_BBQTests.cpp
@dayfine dayfine added farmer Farming programs game:sv Scarlet/Violet refactor No behavior change labels Nov 1, 2026
@dayfine

dayfine commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

Superseded by consolidated Tree 1 PR #272.

@dayfine dayfine closed this Nov 9, 2026
@dayfine
dayfine deleted the bbq/quest-planner 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 refactor No behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant