summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pokemon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pokemon.c b/src/pokemon.c
index 5bccef907..b9264c4c2 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -2859,13 +2859,14 @@ void CalculateMonStats(struct Pokemon *mon)
{
if (currentHP == 0 && oldMaxHP == 0)
currentHP = newMaxHP;
- else if (currentHP != 0)
+ else if (currentHP != 0) {
// BUG: currentHP is unintentionally able to become <= 0 after the instruction below. This causes the pomeg berry glitch.
currentHP += newMaxHP - oldMaxHP;
#ifdef BUGFIX
if (currentHP <= 0)
currentHP = 1;
#endif
+ }
else
return;
}