diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2020-12-14 20:00:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-14 20:00:59 -0500 |
commit | 18a5feb413827ee5641e9a21e8e90ba0e9a90142 (patch) | |
tree | 5b486cd8f42cf734099c0e9a4a3aea37f33c30e6 /src/pokemon.c | |
parent | 6dea3374d2277468828c71ef1fb083d85cdcd2ff (diff) | |
parent | f7a729df3079041d3cc462a44919150f4ebdf19f (diff) |
Merge pull request #1269 from GriffinRichards/bugfix
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; } |