From 2a7ebaf89e35353328b60571840cf083f8ab033c Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Fri, 27 Oct 2023 19:34:55 -0400 Subject: [PATCH] Fix crash in double battles with target selection --- src/battle-phases.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle-phases.ts b/src/battle-phases.ts index b49d4661d..8532ad0c1 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -1140,7 +1140,7 @@ export class SelectTargetPhase extends PokemonPhase { this.scene.unshiftPhase(new CommandPhase(this.scene, this.fieldIndex)); } else turnCommand.targets = [ cursor ]; - if (this.scene.currentBattle.turnCommands[this.fieldIndex].command === Command.BALL && this.fieldIndex) + if (turnCommand.command === Command.BALL && this.fieldIndex) this.scene.currentBattle.turnCommands[this.fieldIndex - 1].skip = true; this.end(); });