Use default values

This commit is contained in:
NightKev 2024-09-06 04:06:53 -07:00 committed by GitHub
parent d41dcd4fc1
commit c8be84dc60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,8 +74,8 @@ export default class Battle {
public playerFaints: number = 0; public playerFaints: number = 0;
/** The number of times a Pokemon on the enemy's side has fainted this battle */ /** The number of times a Pokemon on the enemy's side has fainted this battle */
public enemyFaints: number = 0; public enemyFaints: number = 0;
public playerFaintsHistory: FaintLogEntry[]; public playerFaintsHistory: FaintLogEntry[] = [];
public enemyFaintsHistory: FaintLogEntry[]; public enemyFaintsHistory: FaintLogEntry[] = [];
private rngCounter: number = 0; private rngCounter: number = 0;
@ -89,8 +89,6 @@ export default class Battle {
? new Array(double ? 2 : 1).fill(null).map(() => this.getLevelForWave()) ? new Array(double ? 2 : 1).fill(null).map(() => this.getLevelForWave())
: trainer?.getPartyLevels(this.waveIndex); : trainer?.getPartyLevels(this.waveIndex);
this.double = double ?? false; this.double = double ?? false;
this.playerFaintsHistory = [];
this.enemyFaintsHistory = [];
} }
private initBattleSpec(): void { private initBattleSpec(): void {