Skip to content

fix: skip 2nd Pokemon action on forfeit confirmation in doubles#144

Merged
resetes12 merged 1 commit into
resetes12:masterfrom
aloven:fix/double-forfeit-skip
Jul 12, 2026
Merged

fix: skip 2nd Pokemon action on forfeit confirmation in doubles#144
resetes12 merged 1 commit into
resetes12:masterfrom
aloven:fix/double-forfeit-skip

Conversation

@aloven

@aloven aloven commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description:

Fixes an issue where confirming a forfeit in double battle formats (Frontier/Trainer Hill) would still prompt for the 2nd Pokemon's action instead of ending the battle immediately.

Changes:

  • When forfeit is confirmed via BattleScript_AskIfWantsToForfeitMatch, the partner battler's action is set to RUN and the battle jumps directly to HandleEndTurn_RanFromBattle
  • Bypasses opponent AI computation and turn ordering since they're irrelevant on forfeit
  • Only affects BATTLE_TYPE_FRONTIER and BATTLE_TYPE_TRAINER_HILL double battles (the only formats where the forfeit prompt exists)

Does not affect:

  • Normal trainer battles ("Can't run" message still works)
  • Singles forfeits (already worked correctly)
  • Wild battle running
  • Post-battle evolution/results (handled by HandleEndTurn_FinishBattle which still runs normally)

When forfeiting in a double battle (Frontier/Trainer Hill), the battle
now ends immediately after confirmation instead of asking for the 2nd
Pokemon's action. Sets partner's action to RUN and marks confirmed.
@aloven

aloven commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Resolves #143

@resetes12 resetes12 merged commit 6bc74f1 into resetes12:master Jul 12, 2026
1 check passed
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