Minor changes to double battles for stability

pull/2/head
Flashfyre 2023-07-05 22:33:27 -04:00
parent 3afd43375a
commit 38f4da7445
1 changed files with 2 additions and 2 deletions

View File

@ -683,9 +683,9 @@ export class ToggleDoublePositionPhase extends BattlePhase {
start() { start() {
super.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(() => { 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(); const party = this.scene.getParty();
party[1] = party[0]; party[1] = party[0];
party[0] = playerPokemon; party[0] = playerPokemon;