battle tower, match sth and dumb loop instead of goto

This commit is contained in:
DizzyEggg
2018-10-24 23:14:45 +02:00
parent b330bdba51
commit 549b669f2a
15 changed files with 439 additions and 1026 deletions
+2 -2
View File
@@ -553,7 +553,7 @@ static void sub_81BA040(void)
trainerId = Random() % 30;
for (i = 0; i < gSaveBlock2Ptr->frontier.curChallengeBattleNum; i++)
{
if (gSaveBlock2Ptr->frontier.battledTrainerIds[i] == trainerId)
if (gSaveBlock2Ptr->frontier.field_CB4[i] == trainerId)
break;
}
} while (i != gSaveBlock2Ptr->frontier.curChallengeBattleNum);
@@ -567,7 +567,7 @@ static void sub_81BA040(void)
}
if (gSaveBlock2Ptr->frontier.curChallengeBattleNum < 2)
gSaveBlock2Ptr->frontier.battledTrainerIds[gSaveBlock2Ptr->frontier.curChallengeBattleNum] = gTrainerBattleOpponent_A;
gSaveBlock2Ptr->frontier.field_CB4[gSaveBlock2Ptr->frontier.curChallengeBattleNum] = gTrainerBattleOpponent_A;
monSetsPool = gFacilityTrainers[gTrainerBattleOpponent_A].bfMonPool;
i = 0;