Merge pull request #1296 from GriffinRichards/bugfix-typo
Add missing braces to bugfix in CalculateMonStats
This commit is contained in:
@@ -2859,13 +2859,14 @@ void CalculateMonStats(struct Pokemon *mon)
|
|||||||
{
|
{
|
||||||
if (currentHP == 0 && oldMaxHP == 0)
|
if (currentHP == 0 && oldMaxHP == 0)
|
||||||
currentHP = newMaxHP;
|
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.
|
// BUG: currentHP is unintentionally able to become <= 0 after the instruction below. This causes the pomeg berry glitch.
|
||||||
currentHP += newMaxHP - oldMaxHP;
|
currentHP += newMaxHP - oldMaxHP;
|
||||||
#ifdef BUGFIX
|
#ifdef BUGFIX
|
||||||
if (currentHP <= 0)
|
if (currentHP <= 0)
|
||||||
currentHP = 1;
|
currentHP = 1;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user