mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-29 18:26:09 +00:00
Fix bug with summoning fainted Pokemon in double battles
This commit is contained in:
parent
4f91c47168
commit
49a2231245
@ -711,8 +711,9 @@ export default class BattleScene extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lastBattle && this.currentBattle.battleType !== BattleType.TRAINER) {
|
if (lastBattle && this.currentBattle.battleType !== BattleType.TRAINER) {
|
||||||
|
const availablePartyMembers = this.getParty().filter(p => !p.isFainted()).length;
|
||||||
this.pushPhase(new CheckSwitchPhase(this, 0, newDouble));
|
this.pushPhase(new CheckSwitchPhase(this, 0, newDouble));
|
||||||
if (newDouble)
|
if (newDouble && availablePartyMembers > 1)
|
||||||
this.pushPhase(new CheckSwitchPhase(this, 1, newDouble));
|
this.pushPhase(new CheckSwitchPhase(this, 1, newDouble));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user