Fix logic to prevent healing tokens from healing to full

This commit is contained in:
Flashfyre committed 2024-04-02 01:44:38 -04:00
1 parent 91ab0b4b32
commit 68f0692849
2 files changed
+12 -7

No files matched your search

+1 -1
View File
@@ -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.min(Math.floor(pokemon.getMaxHp() / (100 / this.healPercent)) * this.stackCount, (pokemon.getMaxHp() - pokemon.hp) - 1), 1), getPokemonMessage(pokemon, `\nrestored some HP!`), true));
Math.max(Math.floor(pokemon.getMaxHp() / (100 / this.healPercent)) * this.stackCount, 1), getPokemonMessage(pokemon, `\nrestored some HP!`), true, false, false, false, true));
return true;
}