diff --git a/src/pokemon.c b/src/pokemon.c index 6ee052fda576..9e37f45a0e53 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6038,14 +6038,10 @@ void RandomlyGivePartyPokerus(struct Pokemon *party) do { - do - { - rnd = Random() % PARTY_SIZE; - mon = &party[rnd]; - } - while (!GetMonData(mon, MON_DATA_SPECIES, 0)); + rnd = Random() % PARTY_SIZE; + mon = &party[rnd]; } - while (GetMonData(mon, MON_DATA_IS_EGG, 0)); + while (!GetMonData(mon, MON_DATA_SPECIES, SPECIES_NONE) || GetMonData(mon, MON_DATA_IS_EGG, 0)); if (!(CheckPartyHasHadPokerus(party, gBitTable[rnd]))) {