From e09f881cd46724eee1d817074052a5ba93384331 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sun, 22 Oct 2023 23:31:41 -0400 Subject: [PATCH] Change gym leader and trainer frequency --- src/arena.ts | 2 +- src/battle-scene.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arena.ts b/src/arena.ts index 131c517cb..c2aaa648f 100644 --- a/src/arena.ts +++ b/src/arena.ts @@ -102,7 +102,7 @@ export class Arena { } randomTrainerType(waveIndex: integer): TrainerType { - const isBoss = waveIndex > 10 && waveIndex % 20 === 10 && !!this.trainerPool[BiomePoolTier.BOSS].length + const isBoss = waveIndex > 20 && !(waveIndex % 30) && !!this.trainerPool[BiomePoolTier.BOSS].length && (this.biomeType !== Biome.END || this.scene.gameMode !== GameMode.ENDLESS || waveIndex % 250 === 0); const tierValue = Utils.randSeedInt(!isBoss ? 512 : 64); let tier = !isBoss diff --git a/src/battle-scene.ts b/src/battle-scene.ts index cd575faab..4e33e72c1 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -599,9 +599,9 @@ export default class BattleScene extends Phaser.Scene { this.field.add(newTrainer); } else { if (battleType === undefined) { - if (newWaveIndex > 10 && newWaveIndex % 20 === 10) + if (newWaveIndex > 20 && !(newWaveIndex % 30)) newBattleType = BattleType.TRAINER; - else if (newWaveIndex % 10 !== 1) { + else if (newWaveIndex % 10 !== 1 && newWaveIndex % 10) { const trainerChance = this.arena.getTrainerChance(); newBattleType = trainerChance && !Utils.randSeedInt(trainerChance) ? BattleType.TRAINER : BattleType.WILD; } else