mirror of
https://github.com/pret/pokeruby.git
synced 2025-03-02 18:16:56 +00:00
remove goto in CalculateMonStats
This commit is contained in:
parent
198b4724d7
commit
c46baaf673
@ -444,23 +444,21 @@ void CalculateMonStats(struct Pokemon *mon)
|
||||
if (species == SPECIES_SHEDINJA)
|
||||
{
|
||||
if (currentHP != 0 || oldMaxHP == 0)
|
||||
{
|
||||
currentHP = 1;
|
||||
goto set_hp;
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (currentHP != 0 || oldMaxHP == 0)
|
||||
{
|
||||
if (currentHP != 0)
|
||||
currentHP += newMaxHP - oldMaxHP;
|
||||
else if (oldMaxHP == 0)
|
||||
currentHP = newMaxHP;
|
||||
set_hp:
|
||||
SetMonData(mon, MON_DATA_HP, (u8 *)¤tHP);
|
||||
}
|
||||
if (currentHP == 0 && oldMaxHP == 0)
|
||||
currentHP = newMaxHP;
|
||||
else if (currentHP != 0)
|
||||
currentHP += newMaxHP - oldMaxHP;
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
SetMonData(mon, MON_DATA_HP, (u8 *)¤tHP);
|
||||
}
|
||||
|
||||
void sub_803B4B4(struct Pokemon *src, struct Pokemon *dest)
|
||||
|
Loading…
x
Reference in New Issue
Block a user