Fixed brace style inconsistencies

This commit is contained in:
Eduardo Quezada
2024-12-05 12:46:50 -03:00
parent 3f98c78297
commit 5483e05db6
37 changed files with 301 additions and 27 deletions
+14 -1
View File
@@ -2874,8 +2874,11 @@ void CalculateMonStats(struct Pokemon *mon)
else
{
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
@@ -2884,7 +2887,9 @@ void CalculateMonStats(struct Pokemon *mon)
#endif
}
else
{
return;
}
}
SetMonData(mon, MON_DATA_HP, &currentHP);
@@ -6394,11 +6399,17 @@ void ClearBattleMonForms(void)
u16 GetBattleBGM(void)
{
if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE_GROUDON)
{
return MUS_VS_KYOGRE_GROUDON;
}
else if (gBattleTypeFlags & BATTLE_TYPE_REGI)
{
return MUS_VS_REGI;
}
else if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
{
return MUS_VS_TRAINER;
}
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER)
{
u8 trainerClass;
@@ -6445,7 +6456,9 @@ u16 GetBattleBGM(void)
}
}
else
{
return MUS_VS_WILD;
}
}
void PlayBattleBGM(void)