Add Pokemon heal function

This commit is contained in:
Flashfyre committed 2023-10-21 20:52:19 -04:00
1 parent 7dbf3f62da
commit 96a154f5e0
2 files changed
+8 -1

No files matched your search

+1 -1
View File
@@ -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!`);