Apply Kev's suggestions

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
Sirz Benjie 2025-02-09 19:26:39 -06:00
parent cc4f02d939
commit f1e0bae2fd
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E
2 changed files with 5 additions and 5 deletions

View File

@ -117,7 +117,7 @@ export default class Battle {
private rngCounter: number = 0;
constructor(gameMode: GameMode, waveIndex: number, battleType: BattleType, trainer?: Trainer, double?: boolean, enemyFaints?: number) {
constructor(gameMode: GameMode, waveIndex: number, battleType: BattleType, trainer?: Trainer, double: boolean = false, enemyFaints: number = 0) {
this.gameMode = gameMode;
this.waveIndex = waveIndex;
this.battleType = battleType;
@ -126,8 +126,8 @@ export default class Battle {
this.enemyLevels = battleType !== BattleType.TRAINER
? new Array(double ? 2 : 1).fill(null).map(() => this.getLevelForWave())
: trainer?.getPartyLevels(this.waveIndex);
this.double = double ?? false;
this.enemyFaints = enemyFaints ?? 0;
this.double = double;
this.enemyFaints = enemyFaints;
}
private initBattleSpec(): void {

View File

@ -57,13 +57,13 @@ export class Arena {
public readonly eventTarget: EventTarget = new EventTarget();
constructor(biome: Biome, bgm: string, playerFaints?: number) {
constructor(biome: Biome, bgm: string, playerFaints: number = 0) {
this.biomeType = biome;
this.tags = [];
this.bgm = bgm;
this.trainerPool = biomeTrainerPools[biome];
this.updatePoolsForTimeOfDay();
this.playerFaints = playerFaints ?? 0;
this.playerFaints = playerFaints;
}
init() {