Skip to content

BBQ Farmer: let the exclusions table reroll quests the farmer cannot do - #1644

Closed
dayfine wants to merge 4 commits into
PokemonAutomation:mainfrom
dayfine:bbq/unsupported-quest-rerolls
Closed

dayfine wants to merge 4 commits into
PokemonAutomation:mainfrom
dayfine:bbq/unsupported-quest-rerolls

Conversation

@dayfine

@dayfine dayfine commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Depends on: #1659, which depends on #1640. Merge those first. Until then this PR also shows their commits; the change here is the last commit only.

The farmer can't do some quests: pickup, and the flying photo and flying catch quests. plan_quests() dropped those before it looked at the exclusions table, so a reroll row for one of them did nothing, and the quest kept blocking its slot. Pickup couldn't be picked in the table at all.

Change

  • The table is applied first. Reroll and skip rows now work for quests the farmer can't do. A run row for one of them is ignored, since there is no route for it.
  • Pickup is listed in the table.
  • Cheaper fallback. When nothing can be done and nothing was rerolled, the farmer rerolls the first quest it can't do that has no table row, which costs one reroll instead of three or four. If there is no such quest, it rerolls every quest, as before.

Rerolls go through #1659, which checks which quest it pays for and that the quest was replaced.

Tests

6 new PokemonSV::BBQuestPlan cases:

  • a reroll row on a quest the farmer can't do
  • a run row on one
  • a skip row on one, so it isn't used for the fallback
  • the one-quest fallback
  • reroll-all when there's no quest to fall back on
  • an undetected quest, which isn't treated as one the farmer can't do

One existing case ("nothing doable rerolls all") now expects the one-quest fallback. All 23 BBQ cases pass.

Earlier, Codex validated the same idea live: rerolling pickup in the third row while other quests stayed runnable, at 10 BP. That version is kept in the local branch backup/unsupported-quest-rerolls-codex.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

dayfine and others added 2 commits October 20, 2026 22:39
… 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.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine
dayfine marked this pull request as ready for review October 21, 2026 18:00
@dayfine
dayfine marked this pull request as draft October 21, 2026 19:06
@dayfine dayfine changed the title Honor unsupported BBQ quest rerolls and verify replacements (M5) BBQ Farmer: honor unsupported quest rerolls and verify replacements Oct 21, 2026
dayfine and others added 2 commits October 21, 2026 13:05
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
plan_quests() dropped quests the farmer cannot do (pickup, flying photo
and catch) before looking at the exclusions table, so a reroll row for
one of them did nothing: the quest stayed on the panel and blocked the
slot. Pickup could not be picked in the table at all.

The table is now applied first. Reroll and skip rows work for quests the
farmer cannot do; a run row for one is ignored, since there is no route
for it. Pickup is listed in the table.

With nothing to do and nothing rerolled, the first quest the farmer cannot
do that has no table row is rerolled instead of every quest, which costs
one reroll instead of three or four. Every quest is still rerolled when
there is no such quest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine
dayfine force-pushed the bbq/unsupported-quest-rerolls branch from 265396e to f7e3ba6 Compare October 21, 2026 20:08
@dayfine dayfine changed the title BBQ Farmer: honor unsupported quest rerolls and verify replacements BBQ Farmer: let the exclusions table reroll quests the farmer cannot do Oct 21, 2026
@dayfine

dayfine commented Oct 22, 2026

Copy link
Copy Markdown
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#9, and I'll reopen it here once its parents merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant