Use Only One Loop in RandomlyGivePartyPokerus (#1991)
This commit is contained in:
parent
9cfe9b1bdd
commit
5dbd90b917
1 changed files with 3 additions and 7 deletions
|
@ -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, 0) || GetMonData(mon, MON_DATA_IS_EGG, 0));
|
||||
|
||||
if (!(CheckPartyHasHadPokerus(party, gBitTable[rnd])))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue