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
|
@ -6036,16 +6036,12 @@ void RandomlyGivePartyPokerus(struct Pokemon *party)
|
||||||
{
|
{
|
||||||
struct Pokemon *mon;
|
struct Pokemon *mon;
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
rnd = Random() % PARTY_SIZE;
|
rnd = Random() % PARTY_SIZE;
|
||||||
mon = &party[rnd];
|
mon = &party[rnd];
|
||||||
}
|
}
|
||||||
while (!GetMonData(mon, MON_DATA_SPECIES, 0));
|
while (!GetMonData(mon, MON_DATA_SPECIES, 0) || GetMonData(mon, MON_DATA_IS_EGG, 0));
|
||||||
}
|
|
||||||
while (GetMonData(mon, MON_DATA_IS_EGG, 0));
|
|
||||||
|
|
||||||
if (!(CheckPartyHasHadPokerus(party, gBitTable[rnd])))
|
if (!(CheckPartyHasHadPokerus(party, gBitTable[rnd])))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue