summaryrefslogtreecommitdiff
path: root/src/battle_tower.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/battle_tower.c')
-rw-r--r--src/battle_tower.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/battle_tower.c b/src/battle_tower.c
index 7ed15d1e6..b747a3dc0 100644
--- a/src/battle_tower.c
+++ b/src/battle_tower.c
@@ -35,7 +35,6 @@
#include "constants/trainers.h"
#include "constants/event_objects.h"
#include "constants/moves.h"
-#include "constants/easy_chat.h"
extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_MaxieTrainer[];
extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_TabithaTrainer[];
@@ -1007,7 +1006,7 @@ static bool8 ChooseSpecialBattleTowerTrainer(void)
validMons = 0;
for (j = 0; j < MAX_FRONTIER_PARTY_SIZE; j++)
{
- if (gSaveBlock2Ptr->frontier.towerRecords[i].party[j].species != 0
+ if (gSaveBlock2Ptr->frontier.towerRecords[i].party[j].species != SPECIES_NONE
&& gSaveBlock2Ptr->frontier.towerRecords[i].party[j].level <= GetFrontierEnemyMonLevel(lvlMode))
validMons++;
}
@@ -1665,7 +1664,7 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount)
// Record mixed player.
for (j = 0, i = firstMonId; i < firstMonId + monCount; j++, i++)
{
- if (gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j].species != 0
+ if (gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j].species != SPECIES_NONE
&& gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j].level <= level)
{
CreateBattleTowerMon_HandleLevel(&gEnemyParty[i], &gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j], FALSE);
@@ -1707,7 +1706,7 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount)
// Ensure this Pokemon's held item isn't a duplicate.
for (j = 0; j < i + firstMonId; j++)
{
- if (GetMonData(&gEnemyParty[j], MON_DATA_HELD_ITEM, NULL) != 0
+ if (GetMonData(&gEnemyParty[j], MON_DATA_HELD_ITEM, NULL) != ITEM_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_HELD_ITEM, NULL) == gBattleFrontierHeldItems[gFacilityTrainerMons[monId].itemTableId])
break;
}
@@ -2245,7 +2244,7 @@ static void GetRecordMixFriendMultiPartnerParty(u16 trainerId)
if (gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[i].species != species1
&& gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[i].species != species2
&& gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[i].level <= GetFrontierEnemyMonLevel(lvlMode)
- && gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[i].species != 0)
+ && gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[i].species != SPECIES_NONE)
{
validSpecies[count] = i;
count++;
@@ -2384,7 +2383,7 @@ static void LoadMultiPartnerCandidatesData(void)
if (species1 != gSaveBlock2Ptr->frontier.towerRecords[i].party[j].species
&& species2 != gSaveBlock2Ptr->frontier.towerRecords[i].party[j].species
&& gSaveBlock2Ptr->frontier.towerRecords[i].party[j].level <= GetFrontierEnemyMonLevel(lvlMode)
- && gSaveBlock2Ptr->frontier.towerRecords[i].party[j].species != 0)
+ && gSaveBlock2Ptr->frontier.towerRecords[i].party[j].species != SPECIES_NONE)
{
k++;
}
@@ -3411,7 +3410,7 @@ static void FillTentTrainerParty_(u16 trainerId, u8 firstMonId, u8 monCount)
// Ensure this Pokemon's held item isn't a duplicate.
for (j = 0; j < i + firstMonId; j++)
{
- if (GetMonData(&gEnemyParty[j], MON_DATA_HELD_ITEM, NULL) != 0
+ if (GetMonData(&gEnemyParty[j], MON_DATA_HELD_ITEM, NULL) != ITEM_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_HELD_ITEM, NULL) == gBattleFrontierHeldItems[gFacilityTrainerMons[monId].itemTableId])
break;
}