Merge branch 'master' into fix-eventobj
This commit is contained in:
@@ -1701,7 +1701,7 @@ void CopyFrontierTrainerText(u8 whichText, u16 trainerId)
|
||||
FrontierSpeechToString(gSaveBlock2Ptr->frontier.ereaderTrainer.greeting);
|
||||
else if (trainerId == TRAINER_FRONTIER_BRAIN)
|
||||
CopyFrontierBrainText(FALSE);
|
||||
else if (trainerId < TRAINER_RECORD_MIXING_FRIEND)
|
||||
else if (trainerId < FRONTIER_TRAINERS_COUNT)
|
||||
FrontierSpeechToString(gFacilityTrainers[trainerId].speechBefore);
|
||||
else if (trainerId < TRAINER_RECORD_MIXING_APPRENTICE)
|
||||
FrontierSpeechToString(gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].greeting);
|
||||
@@ -1717,7 +1717,7 @@ void CopyFrontierTrainerText(u8 whichText, u16 trainerId)
|
||||
{
|
||||
CopyFrontierBrainText(FALSE);
|
||||
}
|
||||
else if (trainerId < TRAINER_RECORD_MIXING_FRIEND)
|
||||
else if (trainerId < FRONTIER_TRAINERS_COUNT)
|
||||
{
|
||||
FrontierSpeechToString(gFacilityTrainers[trainerId].speechWin);
|
||||
}
|
||||
@@ -1745,7 +1745,7 @@ void CopyFrontierTrainerText(u8 whichText, u16 trainerId)
|
||||
{
|
||||
CopyFrontierBrainText(TRUE);
|
||||
}
|
||||
else if (trainerId < TRAINER_RECORD_MIXING_FRIEND)
|
||||
else if (trainerId < FRONTIER_TRAINERS_COUNT)
|
||||
{
|
||||
FrontierSpeechToString(gFacilityTrainers[trainerId].speechLose);
|
||||
}
|
||||
@@ -2490,7 +2490,7 @@ void SetFrontierBrainObjEventGfx_2(void)
|
||||
void CreateFrontierBrainPokemon(void)
|
||||
{
|
||||
s32 i, j;
|
||||
s32 monCountInBits;
|
||||
s32 selectedMonBits;
|
||||
s32 monPartyId;
|
||||
s32 monLevel = 0;
|
||||
u8 friendship;
|
||||
@@ -2498,16 +2498,16 @@ void CreateFrontierBrainPokemon(void)
|
||||
s32 symbol = GetFronterBrainSymbol();
|
||||
|
||||
if (facility == FRONTIER_FACILITY_DOME)
|
||||
monCountInBits = GetDomeTrainerMonCountInBits(TrainerIdToDomeTournamentId(TRAINER_FRONTIER_BRAIN));
|
||||
selectedMonBits = GetDomeTrainerSelectedMons(TrainerIdToDomeTournamentId(TRAINER_FRONTIER_BRAIN));
|
||||
else
|
||||
monCountInBits = 7;
|
||||
selectedMonBits = (1 << FRONTIER_PARTY_SIZE) - 1; // all 3 mons selected
|
||||
|
||||
ZeroEnemyPartyMons();
|
||||
monPartyId = 0;
|
||||
monLevel = SetFacilityPtrsGetLevel();
|
||||
for (i = 0; i < 3; monCountInBits >>= 1, i++)
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; selectedMonBits >>= 1, i++)
|
||||
{
|
||||
if (!(monCountInBits & 1))
|
||||
if (!(selectedMonBits & 1))
|
||||
continue;
|
||||
|
||||
do
|
||||
@@ -2523,7 +2523,7 @@ void CreateFrontierBrainPokemon(void)
|
||||
SetMonData(&gEnemyParty[monPartyId], MON_DATA_HELD_ITEM, &sFrontierBrainsMons[facility][symbol][i].heldItem);
|
||||
for (j = 0; j < NUM_STATS; j++)
|
||||
SetMonData(&gEnemyParty[monPartyId], MON_DATA_HP_EV + j, &sFrontierBrainsMons[facility][symbol][i].evs[j]);
|
||||
friendship = 0xFF;
|
||||
friendship = MAX_FRIENDSHIP;
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
SetMonMoveSlot(&gEnemyParty[monPartyId], sFrontierBrainsMons[facility][symbol][i].moves[j], j);
|
||||
@@ -2560,7 +2560,7 @@ void CreateFrontierBrainPokemon(void)
|
||||
bl TrainerIdToDomeTournamentId\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r0, 16\n\
|
||||
bl GetDomeTrainerMonCountInBits\n\
|
||||
bl GetDomeTrainerSelectedMons\n\
|
||||
adds r4, r0, 0\n\
|
||||
b _081A4E46\n\
|
||||
.pool\n\
|
||||
|
||||
Reference in New Issue
Block a user