Fix boss faint dialogue showing on party member faint

pull/14/head
Flashfyre 2024-01-29 22:07:34 -05:00
parent 5ab628039d
commit 9633897a27
1 changed files with 6 additions and 4 deletions

View File

@ -2554,10 +2554,12 @@ export class FaintPhase extends PokemonPhase {
tryOverrideForBattleSpec(): boolean { tryOverrideForBattleSpec(): boolean {
switch (this.scene.currentBattle.battleSpec) { switch (this.scene.currentBattle.battleSpec) {
case BattleSpec.FINAL_BOSS: case BattleSpec.FINAL_BOSS:
const enemy = this.getPokemon(); if (!this.player) {
if (enemy.formIndex) { const enemy = this.getPokemon();
this.scene.ui.showDialogue(battleSpecDialogue[BattleSpec.FINAL_BOSS].secondStageWin, enemy.name, null, () => this.doFaint(), null, true); if (enemy.formIndex) {
return true; this.scene.ui.showDialogue(battleSpecDialogue[BattleSpec.FINAL_BOSS].secondStageWin, enemy.name, null, () => this.doFaint(), null, true);
return true;
}
} }
} }