mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-06 07:27:47 +01:00
Moved stat recalculation to HandleEndTurn_FinishBattle
This commit is contained in:
parent
46fb92c4da
commit
3113e4fa12
@ -4880,6 +4880,17 @@ static void HandleEndTurn_FinishBattle(void)
|
|||||||
UndoMegaEvolution(i);
|
UndoMegaEvolution(i);
|
||||||
UndoFormChange(i, B_SIDE_PLAYER, FALSE);
|
UndoFormChange(i, B_SIDE_PLAYER, FALSE);
|
||||||
}
|
}
|
||||||
|
#if B_RECALCULATE_STATS >= GEN_5
|
||||||
|
// 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
|
||||||
|
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG)
|
||||||
|
{
|
||||||
|
CalculateMonStats(&gPlayerParty[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
gBattleMainFunc = FreeResetData_ReturnToOvOrDoEvolutions;
|
gBattleMainFunc = FreeResetData_ReturnToOvOrDoEvolutions;
|
||||||
gCB2_AfterEvolution = BattleMainCB2;
|
gCB2_AfterEvolution = BattleMainCB2;
|
||||||
}
|
}
|
||||||
|
@ -3961,18 +3961,6 @@ static void Cmd_getexp(void)
|
|||||||
case 6: // increment instruction
|
case 6: // increment instruction
|
||||||
if (gBattleControllerExecFlags == 0)
|
if (gBattleControllerExecFlags == 0)
|
||||||
{
|
{
|
||||||
#if B_RECALCULATE_STATS >= GEN_5
|
|
||||||
// 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
|
|
||||||
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG)
|
|
||||||
{
|
|
||||||
CalculateMonStats(&gPlayerParty[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// not sure why gf clears the item and ability here
|
// not sure why gf clears the item and ability here
|
||||||
gBattleMons[gBattlerFainted].item = 0;
|
gBattleMons[gBattlerFainted].item = 0;
|
||||||
gBattleMons[gBattlerFainted].ability = 0;
|
gBattleMons[gBattlerFainted].ability = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user