diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2020-12-12 23:28:01 -0500 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2020-12-12 23:30:51 -0500 |
commit | 81d95b9325ed2526ce638744408f453a8169abb4 (patch) | |
tree | e0f7100b6b35156f0868df537b2e3a149061dd52 /src/pokemon.c | |
parent | ba3021db64bd9518f324c1ad89e63e90278f0eb4 (diff) |
Use BUGFIX for some inline fixes
Diffstat (limited to 'src/pokemon.c')
-rw-r--r-- | src/pokemon.c | 5 |
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; } |