Skip to content

Commit

Permalink
Fix Tera Shift not updating HP (#10159)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaWoblefet committed Feb 10, 2024
1 parent 97e5f16 commit a4cd445
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions data/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4873,6 +4873,13 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
if (pokemon.species.forme !== 'Terastal') {
this.add('-activate', pokemon, 'ability: Tera Shift');
pokemon.formeChange('Terapagos-Terastal', this.effect, true);
pokemon.baseMaxhp = Math.floor(Math.floor(
2 * pokemon.species.baseStats['hp'] + pokemon.set.ivs['hp'] + Math.floor(pokemon.set.evs['hp'] / 4) + 100
) * pokemon.level / 100 + 10);
const newMaxHP = pokemon.baseMaxhp;
pokemon.hp = newMaxHP - (pokemon.maxhp - pokemon.hp);
pokemon.maxhp = newMaxHP;
this.add('-heal', pokemon, pokemon.getHealth, '[silent]');
}
},
flags: {failroleplay: 1, noreceiver: 1, noentrain: 1, notrace: 1, failskillswap: 1, cantsuppress: 1, notransform: 1},
Expand Down

0 comments on commit a4cd445

Please sign in to comment.