mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Merge branch 'pr/289'
This commit is contained in:
commit
2a604a6733
@ -899,7 +899,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);
|
||||
|
@ -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';
|
||||
@ -586,7 +586,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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user