From 6a187a95df58a2014fa4f844de1ac71e13d0ef7e Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Sat, 26 Apr 2025 21:13:03 -0700 Subject: [PATCH] Generate new IV array using min value instead of using `Math.max()` --- src/field/pokemon.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 15bf8b653d6..f6810ad38e1 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -7028,9 +7028,12 @@ export class EnemyPokemon extends Pokemon { } if (this.hasTrainer() && globalScene.currentBattle) { - for (const index in this.ivs) { - this.ivs[index] = Math.max(this.ivs[index], Math.floor(globalScene.currentBattle.waveIndex / 10)); + const { waveIndex } = globalScene.currentBattle; + const ivs: number[] = []; + while (ivs.length < 6) { + ivs.push(this.randSeedIntRange(Math.floor(waveIndex / 10), 31)); } + this.ivs = ivs; } }