summaryrefslogtreecommitdiff
path: root/src/pokemon.c
diff options
context:
space:
mode:
authorkiliwily <69381603+kiliwily@users.noreply.github.com>2020-09-12 18:43:20 +0200
committerkiliwily <69381603+kiliwily@users.noreply.github.com>2020-09-12 18:43:20 +0200
commit5c3669e0cd49ccc210d7c57228820685fef11230 (patch)
treee35581dc740febcc9049b442a9059a0e6e38fadb /src/pokemon.c
parent58a2b62bae1406d2c768698ed13efcd6a5ffbeec (diff)
Bug documenting
Diffstat (limited to 'src/pokemon.c')
-rw-r--r--src/pokemon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pokemon.c b/src/pokemon.c
index a0e655d1e..f706e8ef8 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -2861,6 +2861,8 @@ void CalculateMonStats(struct Pokemon *mon)
if (currentHP == 0 && oldMaxHP == 0)
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 this add another if statement after the instruction that desides what happens if currentHP <= 0.
currentHP += newMaxHP - oldMaxHP;
else
return;