Skip to content

[SwSh MaxLair] Recover the boss from the summary when header read is not a boss - #1894

Merged
Mysticial merged 1 commit into
PokemonAutomation:mainfrom
dayfine:maxlair/recover-boss-upstream
Nov 13, 2026
Merged

Mysticial merged 1 commit into
PokemonAutomation:mainfrom
dayfine:maxlair/recover-boss-upstream

Conversation

@dayfine

@dayfine dayfine commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Prevent an OCR misread from making a non-boss as boss during boss battle

#1851 followup

  • Leave the boss empty in header read if not GlobalState::opponent_fits_stage() in process_header_read
  • Retry the OCR in summary read (this is the new part that makes it more likely to get a valid boss string)
  • accept_opponent() then only records a valid boss
  • boss_if_caught() returns the boss only after the fourth win
  • If the boss is still empty, throws (same as before)

Note: currently boss_ball for BossFinder fails whenever boss_slug is not a boss (given it's not in the table), so either a misread or an empty string fails it.

Prevent an OCR misread from making a non-boss as boss during boss battle.

- Leave the boss empty in header read if not GlobalState::opponent_fits_stage() in process_header_read
- Retry the OCR in summary read, which makes a valid boss string more likely
- accept_opponent() then only records a valid boss
- boss_if_caught() returns the boss only after the fourth win
- If the boss is still empty, throw (same as before)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
@Mysticial
Mysticial merged commit 14cf718 into PokemonAutomation:main Nov 13, 2026
8 checks passed
MajorLOL added a commit to MajorLOL/Arduino-Source that referenced this pull request Nov 13, 2026
72de561 Sockets: add a per-connection id to server socket sends (PokemonAutomation#1910)
8d67694 Home - Detect Selection Hand (PokemonAutomation#1903)
e5b3172 Support different game languages (PokemonAutomation#1904) (the FRLG Box Sorter)
14cf718 Recover the boss from the summary when header read is not a boss (PokemonAutomation#1894)

No conflicts; none of them touches the AutoStory.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFpKyhKsEg9bJNoPWQzjJJ
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.

2 participants