mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-06 09:33:22 +01:00
Gen 5+ stat recalculate in the same party loop at the end of battle that changes forms.
This commit is contained in:
parent
8b0a848424
commit
271bff5675
@ -5203,18 +5203,15 @@ static void HandleEndTurn_FinishBattle(void)
|
|||||||
UndoMegaEvolution(i);
|
UndoMegaEvolution(i);
|
||||||
TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BATTLE_END);
|
TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_BATTLE_END);
|
||||||
DoBurmyFormChange(i);
|
DoBurmyFormChange(i);
|
||||||
}
|
#if B_RECALCULATE_STATS >= GEN_5
|
||||||
#if B_RECALCULATE_STATS >= GEN_5
|
// Recalculate the stats of every party member before the end
|
||||||
// Recalculate the stats of every party member before the end
|
|
||||||
for (i = 0; i < PARTY_SIZE; i++)
|
|
||||||
{
|
|
||||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_NONE
|
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_NONE
|
||||||
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG)
|
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG)
|
||||||
{
|
{
|
||||||
CalculateMonStats(&gPlayerParty[i]);
|
CalculateMonStats(&gPlayerParty[i]);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
// Clear battle mon species to avoid a bug on the next battle that causes
|
// Clear battle mon species to avoid a bug on the next battle that causes
|
||||||
// healthboxes loading incorrectly due to it trying to create a Mega Indicator
|
// healthboxes loading incorrectly due to it trying to create a Mega Indicator
|
||||||
// if the previous battler would've had.
|
// if the previous battler would've had.
|
||||||
|
Loading…
Reference in New Issue
Block a user