Use BUGFIX for some inline fixes

This commit is contained in:
GriffinR
2020-12-12 23:28:01 -05:00
parent ba3021db64
commit 81d95b9325
22 changed files with 157 additions and 46 deletions
+4 -1
View File
@@ -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;
}