[Bug] fix stuck/sprite issue with double battle player pokemon both died same turn then wins battle with one bench pokemon only (#3266)

This commit is contained in:
allen925 2024-08-01 09:35:11 -07:00 committed by GitHub
parent b0f8f0e901
commit c1595bf2b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -3789,11 +3789,10 @@ export class FaintPhase extends PokemonPhase {
const nonFaintedPartyMemberCount = nonFaintedLegalPartyMembers.length;
if (!nonFaintedPartyMemberCount) {
this.scene.unshiftPhase(new GameOverPhase(this.scene));
} else if (nonFaintedPartyMemberCount >= this.scene.currentBattle.getBattlerCount() || (this.scene.currentBattle.double && !nonFaintedLegalPartyMembers[0].isActive(true))) {
this.scene.pushPhase(new SwitchPhase(this.scene, this.fieldIndex, true, false));
}
if (nonFaintedPartyMemberCount === 1 && this.scene.currentBattle.double) {
} else if (nonFaintedPartyMemberCount === 1 && this.scene.currentBattle.double) {
this.scene.unshiftPhase(new ToggleDoublePositionPhase(this.scene, true));
} else if (nonFaintedPartyMemberCount >= this.scene.currentBattle.getBattlerCount()) {
this.scene.pushPhase(new SwitchPhase(this.scene, this.fieldIndex, true, false));
}
} else {
this.scene.unshiftPhase(new VictoryPhase(this.scene, this.battlerIndex));