Fix substitute follower appearing with dead party (#9028)

This commit is contained in:
FosterProgramming 2026-01-27 14:17:26 +01:00 committed by GitHub
parent 433f55157c
commit c468c9a5f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1971,7 +1971,11 @@ struct Pokemon *GetFirstLiveMon(void)
for (i = 0; i < PARTY_SIZE; i++)
{
struct Pokemon *mon = &gPlayerParty[i];
if ((OW_FOLLOWERS_ALLOWED_SPECIES && GetMonData(mon, MON_DATA_SPECIES_OR_EGG) != VarGet(OW_FOLLOWERS_ALLOWED_SPECIES))
u32 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
if (species == SPECIES_NONE)
continue;
if ((OW_FOLLOWERS_ALLOWED_SPECIES && species != VarGet(OW_FOLLOWERS_ALLOWED_SPECIES))
|| (OW_FOLLOWERS_ALLOWED_MET_LVL && GetMonData(mon, MON_DATA_MET_LEVEL) != VarGet(OW_FOLLOWERS_ALLOWED_MET_LVL))
|| (OW_FOLLOWERS_ALLOWED_MET_LOC && GetMonData(mon, MON_DATA_MET_LOCATION) != VarGet(OW_FOLLOWERS_ALLOWED_MET_LOC)))
continue;