Fix crash in double battles with target selection

This commit is contained in:
Flashfyre 2023-10-27 19:34:55 -04:00
parent cc435284ec
commit 2a7ebaf89e

View File

@ -1140,7 +1140,7 @@ export class SelectTargetPhase extends PokemonPhase {
this.scene.unshiftPhase(new CommandPhase(this.scene, this.fieldIndex)); this.scene.unshiftPhase(new CommandPhase(this.scene, this.fieldIndex));
} else } else
turnCommand.targets = [ cursor ]; 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.scene.currentBattle.turnCommands[this.fieldIndex - 1].skip = true;
this.end(); this.end();
}); });