fix: PokemonBaseStatTotalModifier.apply having a [1] left

This commit is contained in:
flx-sta 2024-09-17 09:08:57 -07:00
parent b35a33ca08
commit d2a59f4b7c

View File

@ -982,7 +982,7 @@ export class PokemonBaseStatTotalModifier extends PokemonHeldItemModifier {
baseStats.forEach((v, i) => { baseStats.forEach((v, i) => {
// HP is affected by half as much as other stats // HP is affected by half as much as other stats
const newVal = i === 0 ? Math.floor(v + this.statModifier / 2) : Math.floor(v + this.statModifier); const newVal = i === 0 ? Math.floor(v + this.statModifier / 2) : Math.floor(v + this.statModifier);
baseStats[1][i] = Math.min(Math.max(newVal, 1), 999999); baseStats[i] = Math.min(Math.max(newVal, 1), 999999);
}); });
return true; return true;