Fervent Impersonation: Fix HP bug

This commit is contained in:
Kris Johnson 2024-04-13 23:11:26 -06:00
parent 309b6131c5
commit 35c0270a09

View File

@ -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 => (