diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index b12d15968f6..02a7affbe9c 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -887,7 +887,7 @@ export class HighestStatBoostTag extends AbilityBattlerTag { stats.map(s => pokemon.getBattleStat(s)).reduce((highestValue: integer, value: integer, i: integer) => { if (value > highestValue) { highestStat = stats[i]; - return highestValue += value; + return highestValue = value; } return highestValue; }, 0); diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 97b228a24ca..2c3c746bfee 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -19,7 +19,7 @@ import { pokemonEvolutions, pokemonPrevolutions, SpeciesFormEvolution, SpeciesEv import { reverseCompatibleTms, tmSpecies } from '../data/tms'; import { DamagePhase, FaintPhase, LearnMovePhase, ObtainStatusEffectPhase, StatChangePhase, SwitchSummonPhase } from '../phases'; import { BattleStat } from '../data/battle-stat'; -import { BattlerTag, BattlerTagLapseType, EncoreTag, HelpingHandTag, TypeBoostTag, getBattlerTag } from '../data/battler-tags'; +import { BattlerTag, BattlerTagLapseType, EncoreTag, HelpingHandTag, HighestStatBoostTag, TypeBoostTag, getBattlerTag } from '../data/battler-tags'; import { BattlerTagType } from "../data/enums/battler-tag-type"; import { Species } from '../data/enums/species'; import { WeatherType } from '../data/weather'; @@ -579,7 +579,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { ret >>= 1; break; } - + + const highestStatBoost = this.findTag(t => t instanceof HighestStatBoostTag && (t as HighestStatBoostTag).stat === stat) as HighestStatBoostTag; + if (highestStatBoost) + ret *= highestStatBoost.multiplier; + return Math.floor(ret); }