Repository navigation
Conversation
BBQSoloFarmer::program() runs its quest rounds inline against the console, so the round logic (which quests count, when to stop, when to save) can only be exercised by running the farmer on a Switch. Move the round loop into run_bbq_rounds(), which takes the game actions it depends on as a BBQGameActions interface: read the quests, process them, do a quest, report a completed quest, and end the round (saving if due). BBQSoloFarmer implements these with the calls they replace, in the same order; the date fix, save/reset, stats and notification move together into end_round(). Startup, flying to the plaza and end-of-program handling stay in program(). The commented-out single-quest debug block declares its own egg counter now that the loop locals have moved. process_quest_list() only reads its quest list and egg count, so take them as const& and by value. Add PokemonSV::BBQFarmerRounds, a table of scenarios run against a simulated singleplayer quest panel: 3 blue quests, completed quests are replaced, impossible quests are skipped, and a panel with nothing doable is rerolled. Each scenario checks the number of completed quests and the exact action sequence: finishing the round that reaches the goal, a quest already gone, a failed quest, a panel with nothing doable, saving at exact multiples, and stopping when out of eggs. No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
… 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
process_and_do_quest() gives up on a quest after NUM_RETRIES retries, but the quest stays on the panel, so the next round attempts it again with a fresh set of retries. A quest that cannot be done, such as a sneak-up whose target does not spawn, is retried forever. run_bbq_rounds() now remembers quests that failed all their attempts and leaves them out of later rounds. A quest is forgotten once a read of 4 known quests shows it gone, so it gets its attempts again if it comes back. If only failed quests are doable, the farmer stops instead of spending BP to reroll them. 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. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
reroll_slot() opened the quest panel, pressed DOWN once per slot from where it assumed the cursor was, and pressed A twice. The panel does not always open with the cursor on the top quest: on a Switch it opened where the cursor was left, so the reroll paid for a different quest than planned. Nothing checked the menu opened or the quest changed, so running out of BP went unnoticed and the same quest was rerolled every round. reroll_quest() now does a reroll through injectable BBQRerollActions: open the reroll menu wherever the cursor is, see which quest the menu opened next to from its arrow, move to the planned quest, and only then confirm. Afterwards it reads the panel (up to 3 times, as OCR can miss a read) to check the quest was replaced. Panel or menu not found stops before spending BP; a quest not replaced stops without an error report, as it usually means out of BP. The arrow boxes for the top three slots were checked on a Switch; the fourth uses the same spacing. Reroll-all is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
process_quest_list() takes the panel by const reference since PokemonAutomation#1632, so the rerolls work on a copy.
A quest that fails all its retries is skipped while it stays on the panel. That keeps the farmer going, but the quest blocks its slot, and if every doable quest is one that failed the farmer stops. OUT_OF_RETRIES now chooses what happens: - Skip (default): as before. - Reroll: reroll the failed quest, so its slot gets a new quest. Uses reroll_quest_slot(), which checks which quest it pays for and that it was replaced. - Stop: end the program there, through the normal end of program. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine
force-pushed
the
bbq/exhausted-quest-actions
branch
from
October 21, 2026 20:10
00f5cca to
a1b685f
Compare
Contributor
Author
|
Closing for now to keep the upstream queue to PRs that are ready: this one waits on unmerged parent PRs. It continues on my fork as dayfine#10, and I'll reopen it here once its parents merge. |
Open
2 of 7 tasks
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.
With #1642, a quest that fails all its retries is skipped while it stays on the panel. That keeps the farmer going, but the quest blocks its slot, and once every doable quest is one that failed, the farmer stops.
Change
A new option, Out of Retries, chooses what happens when a quest fails all its retries:
BBQGameActions,reroll_quest(quest). On the console, it reads the panel, finds the quest, and rerolls it withreroll_quest_slot()from BBQ Farmer: check which quest a reroll pays for, and that it was replaced #1659, which checks which quest it pays for and that the quest was replaced.reroll_quest_slot()is the console reroll from BBQ Farmer: check which quest a reroll pays for, and that it was replaced #1659, made public here.run_bbq_rounds()rather than throwing.Tests
2 new
PokemonSV::BBQFarmerRoundscases: Reroll (the failed quest is replaced and its replacement is attempted the next round) and Stop. The existing cases run with the Skip default. All 30 BBQ cases pass.Codex's earlier version of this PR is kept in the local branch
backup/exhausted-quest-actions-codex. Compared with it:🤖 Generated with Claude Code
https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E