From 38f4da7445cd799fb308ce8f71e70779cb25e7b7 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Wed, 5 Jul 2023 22:33:27 -0400 Subject: [PATCH] Minor changes to double battles for stability --- src/battle-phases.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 6998a0225..0b818a9b5 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -683,9 +683,9 @@ export class ToggleDoublePositionPhase extends BattlePhase { start() { super.start(); - const playerPokemon = this.scene.getPlayerPokemon(); + const playerPokemon = this.scene.getPlayerField().find(p => p.isActive(true)); playerPokemon.setFieldPosition(this.double ? FieldPosition.LEFT : FieldPosition.CENTER, 500).then(() => { - if (!this.double && playerPokemon.getFieldIndex() === 1) { + if (playerPokemon.getFieldIndex() === 1) { const party = this.scene.getParty(); party[1] = party[0]; party[0] = playerPokemon;