mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 19:24:16 +01:00
Document gUnknown_03006298
This commit is contained in:
parent
13f37cf974
commit
52ebc4252e
@ -1 +1 @@
|
||||
gUnknown_03006298
|
||||
gFrontierTempParty
|
||||
|
@ -43,7 +43,9 @@ extern const struct BattleFrontierTrainer gBattleFrontierTrainers[];
|
||||
extern const struct FacilityMon gSlateportBattleTentMons[];
|
||||
extern const struct BattleFrontierTrainer gSlateportBattleTentTrainers[];
|
||||
|
||||
extern u16 gUnknown_03006298[];
|
||||
// Temporary storage for monIds of the opponent team
|
||||
// during team generation in battle factory and similar facilities.
|
||||
extern u16 gFrontierTempParty[];
|
||||
|
||||
extern const struct BattleFrontierTrainer *gFacilityTrainers;
|
||||
extern const struct FacilityMon *gFacilityTrainerMons;
|
||||
|
@ -207,7 +207,7 @@ static void InitFactoryChallenge(void)
|
||||
for (i = 0; i < 6; i++)
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].monId = 0xFFFF;
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
gUnknown_03006298[i] = 0xFFFF;
|
||||
gFrontierTempParty[i] = 0xFFFF;
|
||||
|
||||
SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
|
||||
gTrainerBattleOpponent_A = 0;
|
||||
@ -355,7 +355,7 @@ static void GenerateOpponentMons(void)
|
||||
|
||||
species[i] = gFacilityTrainerMons[monId].species;
|
||||
heldItems[i] = gBattleFrontierHeldItems[gFacilityTrainerMons[monId].itemTableId];
|
||||
gUnknown_03006298[i] = monId;
|
||||
gFrontierTempParty[i] = monId;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@ -376,11 +376,11 @@ static void SetRentalsToOpponentParty(void)
|
||||
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId = gUnknown_03006298[i];
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId = gFrontierTempParty[i];
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].ivs = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ATK_IV, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].personality = GetMonData(&gEnemyParty[i], MON_DATA_PERSONALITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityNum = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ABILITY_NUM, NULL);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[gUnknown_03006298[i]].itemTableId]);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[gFrontierTempParty[i]].itemTableId]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -595,7 +595,7 @@ static void GetOpponentMostCommonMonType(void)
|
||||
typesCount[i] = 0;
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
u32 species = gFacilityTrainerMons[gUnknown_03006298[i]].species;
|
||||
u32 species = gFacilityTrainerMons[gFrontierTempParty[i]].species;
|
||||
|
||||
typesCount[gBaseStats[species].type1]++;
|
||||
if (gBaseStats[species].type1 != gBaseStats[species].type2)
|
||||
@ -631,7 +631,7 @@ static void GetOpponentBattleStyle(void)
|
||||
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
u16 monId = gUnknown_03006298[i];
|
||||
u16 monId = gFrontierTempParty[i];
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
u8 battleStyle = GetMoveBattleStyle(gFacilityTrainerMons[monId].moves[j]);
|
||||
|
@ -420,7 +420,7 @@ static void GenerateOpponentMons(void)
|
||||
|
||||
species[i] = gFacilityTrainerMons[sRandMonSetId].species;
|
||||
heldItems[i] = gBattleFrontierHeldItems[gFacilityTrainerMons[sRandMonSetId].itemTableId];
|
||||
gUnknown_03006298[i] = sRandMonSetId;
|
||||
gFrontierTempParty[i] = sRandMonSetId;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ EWRAM_DATA const struct BattleFrontierTrainer *gFacilityTrainers = NULL;
|
||||
EWRAM_DATA const struct FacilityMon *gFacilityTrainerMons = NULL;
|
||||
|
||||
// IWRAM common
|
||||
u16 gUnknown_03006298[MAX_FRONTIER_PARTY_SIZE];
|
||||
u16 gFrontierTempParty[MAX_FRONTIER_PARTY_SIZE];
|
||||
|
||||
// This file's functions.
|
||||
static void InitTowerChallenge(void);
|
||||
@ -1856,7 +1856,7 @@ static void FillFactoryFrontierTrainerParty(u16 trainerId, u8 firstMonId)
|
||||
otID = T1_READ_32(gSaveBlock2Ptr->playerTrainerId);
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
u16 monId = gUnknown_03006298[i];
|
||||
u16 monId = gFrontierTempParty[i];
|
||||
CreateMonWithEVSpreadNatureOTID(&gEnemyParty[firstMonId + i],
|
||||
gFacilityTrainerMons[monId].species,
|
||||
level,
|
||||
@ -1884,7 +1884,7 @@ static void FillFactoryTentTrainerParty(u16 trainerId, u8 firstMonId)
|
||||
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
u16 monId = gUnknown_03006298[i];
|
||||
u16 monId = gFrontierTempParty[i];
|
||||
CreateMonWithEVSpreadNatureOTID(&gEnemyParty[firstMonId + i],
|
||||
gFacilityTrainerMons[monId].species,
|
||||
level,
|
||||
@ -2224,11 +2224,11 @@ static void GetApprenticeMultiPartnerParty(u16 trainerId)
|
||||
}
|
||||
}
|
||||
|
||||
gUnknown_03006298[0] = validSpecies[Random() % count];
|
||||
gFrontierTempParty[0] = validSpecies[Random() % count];
|
||||
do
|
||||
{
|
||||
gUnknown_03006298[1] = validSpecies[Random() % count];
|
||||
} while (gUnknown_03006298[0] == gUnknown_03006298[1]);
|
||||
gFrontierTempParty[1] = validSpecies[Random() % count];
|
||||
} while (gFrontierTempParty[0] == gFrontierTempParty[1]);
|
||||
}
|
||||
|
||||
static void GetRecordMixFriendMultiPartnerParty(u16 trainerId)
|
||||
@ -2252,11 +2252,11 @@ static void GetRecordMixFriendMultiPartnerParty(u16 trainerId)
|
||||
}
|
||||
}
|
||||
|
||||
gUnknown_03006298[2] = validSpecies[Random() % count];
|
||||
gFrontierTempParty[2] = validSpecies[Random() % count];
|
||||
do
|
||||
{
|
||||
gUnknown_03006298[3] = validSpecies[Random() % count];
|
||||
} while (gUnknown_03006298[2] == gUnknown_03006298[3]);
|
||||
gFrontierTempParty[3] = validSpecies[Random() % count];
|
||||
} while (gFrontierTempParty[2] == gFrontierTempParty[3]);
|
||||
}
|
||||
|
||||
static void LoadMultiPartnerCandidatesData(void)
|
||||
@ -2420,15 +2420,15 @@ static void sub_81646BC(u16 trainerId, u16 monId)
|
||||
}
|
||||
else if (trainerId < TRAINER_RECORD_MIXING_APPRENTICE)
|
||||
{
|
||||
move = gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[gUnknown_03006298[gSpecialVar_0x8005 + 1]].moves[0];
|
||||
species = gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[gUnknown_03006298[gSpecialVar_0x8005 + 1]].species;
|
||||
move = gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[gFrontierTempParty[gSpecialVar_0x8005 + 1]].moves[0];
|
||||
species = gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[gFrontierTempParty[gSpecialVar_0x8005 + 1]].species;
|
||||
}
|
||||
else
|
||||
{
|
||||
s32 i;
|
||||
|
||||
move = gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].party[gUnknown_03006298[gSpecialVar_0x8005 - 1]].moves[0];
|
||||
species = gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].party[gUnknown_03006298[gSpecialVar_0x8005 - 1]].species;
|
||||
move = gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].party[gFrontierTempParty[gSpecialVar_0x8005 - 1]].moves[0];
|
||||
species = gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].party[gFrontierTempParty[gSpecialVar_0x8005 - 1]].species;
|
||||
for (i = 0; i < PLAYER_NAME_LENGTH; i++)
|
||||
gStringVar3[i] = gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].playerName[i];
|
||||
gStringVar3[i] = EOS;
|
||||
@ -2497,13 +2497,13 @@ static void ShowPartnerCandidateMessage(void)
|
||||
}
|
||||
else if (trainerId < TRAINER_RECORD_MIXING_APPRENTICE)
|
||||
{
|
||||
gSaveBlock2Ptr->frontier.trainerIds[18] = gUnknown_03006298[2];
|
||||
gSaveBlock2Ptr->frontier.trainerIds[19] = gUnknown_03006298[3];
|
||||
gSaveBlock2Ptr->frontier.trainerIds[18] = gFrontierTempParty[2];
|
||||
gSaveBlock2Ptr->frontier.trainerIds[19] = gFrontierTempParty[3];
|
||||
}
|
||||
else
|
||||
{
|
||||
gSaveBlock2Ptr->frontier.trainerIds[18] = gUnknown_03006298[0];
|
||||
gSaveBlock2Ptr->frontier.trainerIds[19] = gUnknown_03006298[1];
|
||||
gSaveBlock2Ptr->frontier.trainerIds[18] = gFrontierTempParty[0];
|
||||
gSaveBlock2Ptr->frontier.trainerIds[19] = gFrontierTempParty[1];
|
||||
}
|
||||
for (k = 0; k < 14; k++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user