From c8be84dc604c8381d82ff2339ec933529177504a Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Fri, 6 Sep 2024 04:06:53 -0700 Subject: [PATCH] Use default values --- src/battle.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/battle.ts b/src/battle.ts index d5c1a50d935..53dd5533df8 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -74,8 +74,8 @@ export default class Battle { public playerFaints: number = 0; /** The number of times a Pokemon on the enemy's side has fainted this battle */ public enemyFaints: number = 0; - public playerFaintsHistory: FaintLogEntry[]; - public enemyFaintsHistory: FaintLogEntry[]; + public playerFaintsHistory: FaintLogEntry[] = []; + public enemyFaintsHistory: FaintLogEntry[] = []; private rngCounter: number = 0; @@ -89,8 +89,6 @@ export default class Battle { ? new Array(double ? 2 : 1).fill(null).map(() => this.getLevelForWave()) : trainer?.getPartyLevels(this.waveIndex); this.double = double ?? false; - this.playerFaintsHistory = []; - this.enemyFaintsHistory = []; } private initBattleSpec(): void {