mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-26 02:39:38 -05:00
Fervent Impersonation: Fix HP bug
This commit is contained in:
parent
309b6131c5
commit
35c0270a09
|
|
@ -2843,7 +2843,7 @@ export const Rulesets: {[k: string]: FormatData} = {
|
|||
2 * pokemon.species.baseStats['hp'] + pokemon.set.ivs['hp'] + Math.floor(pokemon.set.evs['hp'] / 4) + 100
|
||||
) * pokemon.level / 100 + 10);
|
||||
const newMaxHP = pokemon.volatiles['dynamax'] ? (2 * pokemon.baseMaxhp) : pokemon.baseMaxhp;
|
||||
pokemon.hp = newMaxHP - (pokemon.maxhp - pokemon.hp);
|
||||
pokemon.hp = this.clampIntRange(newMaxHP - (pokemon.maxhp - pokemon.hp), 1, newMaxHP);
|
||||
pokemon.maxhp = newMaxHP;
|
||||
this.add('-heal', pokemon, pokemon.getHealth, '[silent]');
|
||||
const oldAbilityKey: string = Object.keys(oldPokemon.abilities).find(x => (
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user