Fixed if statement for stat recalculation

Thanks to Syreldar.
This commit is contained in:
LOuroboros 2021-09-01 02:54:44 -03:00
parent d2bcc2ad5b
commit 9990bda7a4

View file

@ -3964,7 +3964,14 @@ static void Cmd_getexp(void)
#if B_RECALCULATE_STATS >= GEN_5
// Recalculate the stats of every party member before the end
for (i = 0; i < PARTY_SIZE; i++)
CalculateMonStats(&gPlayerParty[i]);
{
if (GetMonData(&gPlayerParty[i], MON_DATA_HP) != 0
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG))
{
CalculateMonStats(&gPlayerParty[i]);
}
}
#endif
// not sure why gf clears the item and ability here