mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-29 02:06:07 +00:00
coommrent
This commit is contained in:
parent
a62de05c38
commit
3f6553bcf9
@ -288,6 +288,7 @@ export function applyDamageToPokemon(scene: BattleScene, pokemon: PlayerPokemon,
|
||||
if (damage <= 0) {
|
||||
console.warn("Healing pokemon with `applyDamageToPokemon` is not recommended! Please use `applyHealToPokemon` instead.");
|
||||
}
|
||||
// If a Pokemon would faint from the damage applied, its HP is instead set to 1.
|
||||
if (pokemon.hp - damage <= 0) {
|
||||
damage = pokemon.hp - 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user