mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-25 01:32:21 +02:00
Apply Kev's suggestions
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
cc4f02d939
commit
f1e0bae2fd
@ -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 {
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user