mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
Merge pull request #1296 from GriffinRichards/bugfix-typo
Add missing braces to bugfix in CalculateMonStats
This commit is contained in:
commit
e6aebc16da
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user