Fix bug with summoning fainted Pokemon in double battles

pull/2/head
Flashfyre 2023-11-04 22:08:05 -04:00
parent 4f91c47168
commit 49a2231245
1 changed files with 2 additions and 1 deletions

View File

@ -711,8 +711,9 @@ export default class BattleScene extends Phaser.Scene {
}
if (lastBattle && this.currentBattle.battleType !== BattleType.TRAINER) {
const availablePartyMembers = this.getParty().filter(p => !p.isFainted()).length;
this.pushPhase(new CheckSwitchPhase(this, 0, newDouble));
if (newDouble)
if (newDouble && availablePartyMembers > 1)
this.pushPhase(new CheckSwitchPhase(this, 1, newDouble));
}
}