summaryrefslogtreecommitdiff
path: root/src/pokemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pokemon.c')
-rw-r--r--src/pokemon.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pokemon.c b/src/pokemon.c
index 3621284d6..7c546fcd5 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -2861,8 +2861,11 @@ void CalculateMonStats(struct Pokemon *mon)
currentHP = newMaxHP;
else if (currentHP != 0)
// BUG: currentHP is unintentionally able to become <= 0 after the instruction below. This causes the pomeg berry glitch.
- // To fix that set currentHP = 1 if currentHP <= 0.
currentHP += newMaxHP - oldMaxHP;
+ #ifdef BUGFIX
+ if (currentHP <= 0)
+ currentHP = 1;
+ #endif
else
return;
}