diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 6d943d8b2..d57e15587 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -2485,7 +2485,7 @@ export class PokemonHealPhase extends CommonAnimPhase { const hpRestoreMultiplier = new Utils.IntegerHolder(1); if (!this.revive) this.scene.applyModifiers(HealingBoosterModifier, this.player, hpRestoreMultiplier); - pokemon.hp = Math.min(pokemon.hp + this.hpHealed * hpRestoreMultiplier.value, pokemon.getMaxHp()); + pokemon.heal(this.hpHealed * hpRestoreMultiplier.value); pokemon.updateInfo().then(() => super.end()); } else if (this.showFullHpMessage) this.message = getPokemonMessage(pokemon, `'s\nHP is full!`); diff --git a/src/pokemon.ts b/src/pokemon.ts index de07c2e53..3e04b289e 100644 --- a/src/pokemon.ts +++ b/src/pokemon.ts @@ -759,6 +759,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } } + heal(amount: integer): void { + if (this.isFainted()) + return; + + this.hp = Math.min(this.hp + amount, this.getMaxHp()); + } + addTag(tagType: BattlerTagType, turnCount?: integer, sourceMove?: Moves, sourceId?: integer): boolean { const existingTag = this.getTag(tagType); if (existingTag) {