From 2ec471708df367088ea52d2028cfed2b8a7d6418 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Mon, 1 Apr 2024 23:10:11 -0400 Subject: [PATCH] Healing tokens can't heal to full HP --- src/modifier/modifier.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index ec8ec6401db..3468b40db0c 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -1915,7 +1915,7 @@ export class EnemyTurnHealModifier extends EnemyPersistentModifier { if (pokemon.getHpRatio() < 1) { const scene = pokemon.scene; scene.unshiftPhase(new PokemonHealPhase(scene, pokemon.getBattlerIndex(), - Math.max(Math.floor(pokemon.getMaxHp() / (100 / this.healPercent)) * this.stackCount, 1), getPokemonMessage(pokemon, `\nrestored some HP!`), true)); + Math.max(Math.min(Math.floor(pokemon.getMaxHp() / (100 / this.healPercent)) * this.stackCount, (pokemon.getMaxHp() - pokemon.hp) - 1), 1), getPokemonMessage(pokemon, `\nrestored some HP!`), true)); return true; }