Update src/phases/faint-phase.ts

Co-authored-by: schmidtc1 <62030095+schmidtc1@users.noreply.github.com>
This commit is contained in:
Lylian BALL 2024-09-08 16:50:43 +02:00 committed by GitHub
parent dd29fe0d6a
commit 5d4a6aa0f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,10 +55,10 @@ export class FaintPhase extends PokemonPhase {
// Track total times pokemon have been KO'd for supreme overlord/last respects // Track total times pokemon have been KO'd for supreme overlord/last respects
if (pokemon.isPlayer()) { if (pokemon.isPlayer()) {
this.scene.currentBattle.playerFaints += 1; this.scene.currentBattle.playerFaints += 1;
this.scene.currentBattle.playerFaintsHistory.push({ pokemon, turn: this.scene.currentBattle.turn }); this.scene.currentBattle.playerFaintsHistory.push({ pokemon: pokemon, turn: this.scene.currentBattle.turn });
} else { } else {
this.scene.currentBattle.enemyFaints += 1; this.scene.currentBattle.enemyFaints += 1;
this.scene.currentBattle.enemyFaintsHistory.push({ pokemon, turn: this.scene.currentBattle.turn }); this.scene.currentBattle.enemyFaintsHistory.push({ pokemon: pokemon, turn: this.scene.currentBattle.turn });
} }
this.scene.queueMessage(i18next.t("battle:fainted", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }), null, true); this.scene.queueMessage(i18next.t("battle:fainted", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }), null, true);