mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-21 06:49:35 +02: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) {
|
if (damage <= 0) {
|
||||||
console.warn("Healing pokemon with `applyDamageToPokemon` is not recommended! Please use `applyHealToPokemon` instead.");
|
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) {
|
if (pokemon.hp - damage <= 0) {
|
||||||
damage = pokemon.hp - 1;
|
damage = pokemon.hp - 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user