Document remaining symbols in pokemon.c

This commit is contained in:
GriffinR 2021-10-02 23:48:12 -04:00
parent 739e7d3c31
commit 6e62c057f5
16 changed files with 287 additions and 229 deletions

View File

@ -28,6 +28,8 @@
#define ABILITYEFFECT_COUNT_BATTLER_SIDE 0x11
#define ABILITYEFFECT_COUNT_ON_FIELD 0x12
#define ABILITYEFFECT_CHECK_ON_FIELD 0x13
#define ABILITYEFFECT_MUD_SPORT 0xFD
#define ABILITYEFFECT_WATER_SPORT 0xFE
#define ABILITYEFFECT_SWITCH_IN_WEATHER 0xFF
#define ABILITY_ON_OPPOSING_FIELD(battlerId, abilityId)(AbilityBattleEffects(ABILITYEFFECT_CHECK_OTHER_SIDE, battlerId, abilityId, 0, 0))

View File

@ -339,4 +339,10 @@
#define MON_PIC_SIZE (64 * 64 / 2)
#define BATTLE_ALIVE_EXCEPT_ACTIVE 0
#define BATTLE_ALIVE_ATK_SIDE 1
#define BATTLE_ALIVE_DEF_SIDE 2
#define SKIP_FRONT_ANIM (1 << 7)
#endif // GUARD_CONSTANTS_POKEMON_H

View File

@ -110,6 +110,7 @@
#define TRAINER_PIC_RS_BRENDAN 91
#define TRAINER_PIC_RS_MAY 92
// The player back pics are assumed to alternate according to the gender values (MALE/FEMALE)
#define TRAINER_BACK_PIC_BRENDAN 0
#define TRAINER_BACK_PIC_MAY 1
#define TRAINER_BACK_PIC_RED 2
@ -334,7 +335,7 @@
#define TRAINER_CLASS_SAILOR 0x2f
#define TRAINER_CLASS_COOLTRAINER_2 0x30 // Used for only one trainer.
#define TRAINER_CLASS_MAGMA_ADMIN 0x31
#define TRAINER_CLASS_PKMN_TRAINER_3 0x32
#define TRAINER_CLASS_RIVAL 0x32
#define TRAINER_CLASS_BUG_CATCHER 0x33
#define TRAINER_CLASS_PKMN_RANGER 0x34
#define TRAINER_CLASS_MAGMA_LEADER 0x35

View File

@ -259,6 +259,8 @@ struct Evolution
| (((personality) & 0x00000003) >> 0) \
) % NUM_UNOWN_FORMS)
#define GET_SHINY_VALUE(otId, personality)HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality)
extern u8 gPlayerPartyCount;
extern struct Pokemon gPlayerParty[PARTY_SIZE];
extern u8 gEnemyPartyCount;
@ -273,8 +275,8 @@ extern const u8 *const gItemEffectTable[];
extern const u32 gExperienceTables[][MAX_LEVEL + 1];
extern const u16 *const gLevelUpLearnsets[];
extern const u8 gPPUpGetMask[];
extern const u8 gPPUpSetMask[];
extern const u8 gPPUpAddMask[];
extern const u8 gPPUpClearMask[];
extern const u8 gPPUpAddValues[];
extern const u8 gStatStageRatios[MAX_STAT_STAGE + 1][2];
extern const u16 gLinkPlayerFacilityClasses[];
extern const struct SpriteTemplate gBattlerSpriteTemplates[];
@ -293,7 +295,7 @@ void CreateMonWithIVsPersonality(struct Pokemon *mon, u16 species, u8 level, u32
void CreateMonWithIVsOTID(struct Pokemon *mon, u16 species, u8 level, u8 *ivs, u32 otId);
void CreateMonWithEVSpread(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 evSpread);
void CreateBattleTowerMon(struct Pokemon *mon, struct BattleTowerPokemon *src);
void CreateBattleTowerMon2(struct Pokemon *mon, struct BattleTowerPokemon *src, bool8 lvl50);
void CreateBattleTowerMon_HandleLevel(struct Pokemon *mon, struct BattleTowerPokemon *src, bool8 lvl50);
void CreateApprenticeMon(struct Pokemon *mon, const struct Apprentice *src, u8 monId);
void CreateMonWithEVSpreadNatureOTID(struct Pokemon *mon, u16 species, u8 level, u8 nature, u8 fixedIV, u8 evSpread, u32 otId);
void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerPokemon *dest);
@ -317,12 +319,7 @@ u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove);
void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move);
void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move);
s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *defender, u32 move, u16 sideStatus, u16 powerOverride, u8 typeOverride, u8 bankAtk, u8 bankDef);
u8 CountAliveMonsInBattle(u8 caseId);
#define BATTLE_ALIVE_EXCEPT_ACTIVE 0
#define BATTLE_ALIVE_ATK_SIDE 1
#define BATTLE_ALIVE_DEF_SIDE 2
u8 GetDefaultMoveTarget(u8 battlerId);
u8 GetMonGender(struct Pokemon *mon);
u8 GetBoxMonGender(struct BoxPokemon *boxMon);
@ -342,7 +339,6 @@ void SetMonData(struct Pokemon *mon, s32 field, const void *dataArg);
void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg);
void CopyMon(void *dest, void *src, size_t size);
u8 GiveMonToPlayer(struct Pokemon *mon);
u8 SendMonToPC(struct Pokemon* mon);
u8 CalculatePlayerPartyCount(void);
u8 CalculateEnemyPartyCount(void);
u8 GetMonsStateToDoubles(void);
@ -374,7 +370,6 @@ u16 SpeciesToNationalPokedexNum(u16 species);
u16 SpeciesToHoennPokedexNum(u16 species);
u16 HoennToNationalOrder(u16 hoennNum);
u16 SpeciesToCryId(u16 species);
void sub_806D544(u16 species, u32 personality, u8 *dest);
void DrawSpindaSpots(u16 species, u32 personality, u8 *dest, u8 a4);
void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies);
u8 GetPlayerFlankId(void);
@ -425,9 +420,7 @@ void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry,
void PokemonSummaryDoMonAnimation(struct Sprite* sprite, u16 species, bool8 oneFrame);
void StopPokemonAnimationDelayTask(void);
void BattleAnimateBackSprite(struct Sprite* sprite, u16 species);
u8 sub_806EF08(u8 arg0);
u8 sub_806EF84(u8 arg0, u8 arg1);
u16 sub_806EFF0(u16 arg0);
u8 GetOpposingLinkMultiBattlerId(bool8 rightSide, u8 multiplayerId);
u16 FacilityClassToPicIndex(u16 facilityClass);
u16 PlayerGenderToFrontTrainerPicId(u8 playerGender);
void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality);

View File

@ -2227,7 +2227,7 @@ void TryShinyAnimation(u8 battler, struct Pokemon *mon)
if (IsBattlerSpriteVisible(battler))
{
shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality);
shinyValue = GET_SHINY_VALUE(otId, personality);
if (shinyValue < SHINY_ODDS)
isShiny = TRUE;

View File

@ -501,7 +501,7 @@ const struct TrainerMoney gTrainerMoneyTable[] =
{TRAINER_CLASS_TWINS, 3},
{TRAINER_CLASS_SAILOR, 8},
{TRAINER_CLASS_COLLECTOR, 15},
{TRAINER_CLASS_PKMN_TRAINER_3, 15},
{TRAINER_CLASS_RIVAL, 15},
{TRAINER_CLASS_PKMN_BREEDER, 10},
{TRAINER_CLASS_PKMN_RANGER, 12},
{TRAINER_CLASS_TEAM_MAGMA, 5},

View File

@ -449,7 +449,7 @@ static const struct PyramidTrainerEncounterMusic sTrainerClassEncounterMusic[54]
{TRAINER_CLASS_PKMN_BREEDER, TRAINER_ENCOUNTER_MUSIC_FEMALE},
{TRAINER_CLASS_COLLECTOR, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS},
{TRAINER_CLASS_PKMN_RANGER, TRAINER_ENCOUNTER_MUSIC_COOL},
{TRAINER_CLASS_PKMN_TRAINER_3, TRAINER_ENCOUNTER_MUSIC_MALE},
{TRAINER_CLASS_RIVAL, TRAINER_ENCOUNTER_MUSIC_MALE},
{TRAINER_CLASS_YOUNG_COUPLE, TRAINER_ENCOUNTER_MUSIC_GIRL},
{TRAINER_CLASS_PSYCHIC, TRAINER_ENCOUNTER_MUSIC_INTENSE},
{TRAINER_CLASS_SR_AND_JR, TRAINER_ENCOUNTER_MUSIC_TWINS},

View File

@ -1668,7 +1668,7 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount)
if (gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j].species != 0
&& gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j].level <= level)
{
CreateBattleTowerMon2(&gEnemyParty[i], &gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j], FALSE);
CreateBattleTowerMon_HandleLevel(&gEnemyParty[i], &gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j], FALSE);
}
}
return;
@ -3042,7 +3042,7 @@ static void FillPartnerParty(u16 trainerId)
if (monData.nickname[0] == EXT_CTRL_CODE_BEGIN && monData.nickname[1] == EXT_CTRL_CODE_JPN)
trainerName[5] = EOS;
}
CreateBattleTowerMon2(&gPlayerParty[MULTI_PARTY_SIZE + i], &monData, TRUE);
CreateBattleTowerMon_HandleLevel(&gPlayerParty[MULTI_PARTY_SIZE + i], &monData, TRUE);
SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_OT_NAME, trainerName);
j = IsFrontierTrainerFemale(trainerId + TRAINER_RECORD_MIXING_FRIEND);
SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_OT_GENDER, &j);

View File

@ -1130,11 +1130,11 @@ void TryPutLinkBattleTvShowOnAir(void)
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
{
if ((playerBestMonId < 3 && !GetLinkTrainerFlankId(gBattleScripting.multiplayerId))
|| (playerBestMonId >= 3 && GetLinkTrainerFlankId(gBattleScripting.multiplayerId)))
if ((playerBestMonId < MULTI_PARTY_SIZE && !GetLinkTrainerFlankId(gBattleScripting.multiplayerId))
|| (playerBestMonId >= MULTI_PARTY_SIZE && GetLinkTrainerFlankId(gBattleScripting.multiplayerId)))
{
j = (opponentBestMonId < 3) ? 0 : 1;
PutBattleUpdateOnTheAir(sub_806EF84(j, gBattleScripting.multiplayerId), moveId, playerBestSpecies, opponentBestSpecies);
j = (opponentBestMonId < MULTI_PARTY_SIZE) ? FALSE : TRUE;
PutBattleUpdateOnTheAir(GetOpposingLinkMultiBattlerId(j, gBattleScripting.multiplayerId), moveId, playerBestSpecies, opponentBestSpecies);
}
}
else

View File

@ -3095,14 +3095,14 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
case ABILITYEFFECT_FIELD_SPORT: // 14
switch (gLastUsedAbility)
{
case 0xFD:
case ABILITYEFFECT_MUD_SPORT:
for (i = 0; i < gBattlersCount; i++)
{
if (gStatuses3[i] & STATUS3_MUDSPORT)
effect = i + 1;
}
break;
case 0xFE:
case ABILITYEFFECT_WATER_SPORT:
for (i = 0; i < gBattlersCount; i++)
{
if (gStatuses3[i] & STATUS3_WATERSPORT)

View File

@ -145,13 +145,13 @@ const u8 gFacilityClassToTrainerClass[] =
[FACILITY_CLASS_SWIMMER_F] = TRAINER_CLASS_SWIMMER_F,
[FACILITY_CLASS_TWINS] = TRAINER_CLASS_TWINS,
[FACILITY_CLASS_SAILOR] = TRAINER_CLASS_SAILOR,
[FACILITY_CLASS_WALLY] = TRAINER_CLASS_PKMN_TRAINER_3,
[FACILITY_CLASS_BRENDAN] = TRAINER_CLASS_PKMN_TRAINER_3,
[FACILITY_CLASS_BRENDAN_2] = TRAINER_CLASS_PKMN_TRAINER_3,
[FACILITY_CLASS_BRENDAN_3] = TRAINER_CLASS_PKMN_TRAINER_3,
[FACILITY_CLASS_MAY] = TRAINER_CLASS_PKMN_TRAINER_3,
[FACILITY_CLASS_MAY_2] = TRAINER_CLASS_PKMN_TRAINER_3,
[FACILITY_CLASS_MAY_3] = TRAINER_CLASS_PKMN_TRAINER_3,
[FACILITY_CLASS_WALLY] = TRAINER_CLASS_RIVAL,
[FACILITY_CLASS_BRENDAN] = TRAINER_CLASS_RIVAL,
[FACILITY_CLASS_BRENDAN_2] = TRAINER_CLASS_RIVAL,
[FACILITY_CLASS_BRENDAN_3] = TRAINER_CLASS_RIVAL,
[FACILITY_CLASS_MAY] = TRAINER_CLASS_RIVAL,
[FACILITY_CLASS_MAY_2] = TRAINER_CLASS_RIVAL,
[FACILITY_CLASS_MAY_3] = TRAINER_CLASS_RIVAL,
[FACILITY_CLASS_PKMN_BREEDER_M] = TRAINER_CLASS_PKMN_BREEDER,
[FACILITY_CLASS_BUG_CATCHER] = TRAINER_CLASS_BUG_CATCHER,
[FACILITY_CLASS_PKMN_RANGER_M] = TRAINER_CLASS_PKMN_RANGER,
@ -161,11 +161,11 @@ const u8 gFacilityClassToTrainerClass[] =
[FACILITY_CLASS_YOUNG_COUPLE] = TRAINER_CLASS_YOUNG_COUPLE,
[FACILITY_CLASS_OLD_COUPLE] = TRAINER_CLASS_OLD_COUPLE,
[FACILITY_CLASS_SIS_AND_BRO] = TRAINER_CLASS_SIS_AND_BRO,
[FACILITY_CLASS_STEVEN] = TRAINER_CLASS_PKMN_TRAINER_3,
[FACILITY_CLASS_STEVEN] = TRAINER_CLASS_RIVAL,
[FACILITY_CLASS_SALON_MAIDEN_ANABEL] = TRAINER_CLASS_SALON_MAIDEN,
[FACILITY_CLASS_DOME_ACE_TUCKER] = TRAINER_CLASS_DOME_ACE,
[FACILITY_CLASS_RED] = TRAINER_CLASS_PKMN_TRAINER_3,
[FACILITY_CLASS_LEAF] = TRAINER_CLASS_PKMN_TRAINER_3,
[FACILITY_CLASS_RED] = TRAINER_CLASS_RIVAL,
[FACILITY_CLASS_LEAF] = TRAINER_CLASS_RIVAL,
[FACILITY_CLASS_RS_BRENDAN] = TRAINER_CLASS_RS_PROTAG,
[FACILITY_CLASS_RS_MAY] = TRAINER_CLASS_RS_PROTAG,
};

View File

@ -49,7 +49,7 @@ const u8 gTrainerClassNames[][13] = {
[TRAINER_CLASS_SAILOR] = _("SAILOR"),
[TRAINER_CLASS_COOLTRAINER_2] = _("COOLTRAINER"),
[TRAINER_CLASS_MAGMA_ADMIN] = _("MAGMA ADMIN"),
[TRAINER_CLASS_PKMN_TRAINER_3] = _("{PKMN} TRAINER"),
[TRAINER_CLASS_RIVAL] = _("{PKMN} TRAINER"),
[TRAINER_CLASS_BUG_CATCHER] = _("BUG CATCHER"),
[TRAINER_CLASS_PKMN_RANGER] = _("{PKMN} RANGER"),
[TRAINER_CLASS_MAGMA_LEADER] = _("MAGMA LEADER"),

View File

@ -7268,7 +7268,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_WALLY_VR_1] =
{
.partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_WALLY,
.trainerName = _("WALLY"),
@ -7282,7 +7282,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_ROUTE_103_MUDKIP] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -7296,7 +7296,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_ROUTE_110_MUDKIP] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -7310,7 +7310,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_ROUTE_119_MUDKIP] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -7324,7 +7324,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_ROUTE_103_TREECKO] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -7338,7 +7338,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_ROUTE_110_TREECKO] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -7352,7 +7352,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_ROUTE_119_TREECKO] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -7366,7 +7366,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_ROUTE_103_TORCHIC] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -7380,7 +7380,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_ROUTE_110_TORCHIC] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -7394,7 +7394,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_ROUTE_119_TORCHIC] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -7408,7 +7408,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_ROUTE_103_MUDKIP] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -7422,7 +7422,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_ROUTE_110_MUDKIP] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -7436,7 +7436,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_ROUTE_119_MUDKIP] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -7450,7 +7450,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_ROUTE_103_TREECKO] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -7464,7 +7464,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_ROUTE_110_TREECKO] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -7478,7 +7478,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_ROUTE_119_TREECKO] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -7492,7 +7492,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_ROUTE_103_TORCHIC] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -7506,7 +7506,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_ROUTE_110_TORCHIC] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -7520,7 +7520,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_ROUTE_119_TORCHIC] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -8290,7 +8290,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_RUSTBORO_TREECKO] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -8304,7 +8304,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_RUSTBORO_MUDKIP] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -8388,7 +8388,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_RUSTBORO_TORCHIC] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -8402,7 +8402,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_RUSTBORO_MUDKIP] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -9186,7 +9186,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_WALLY_MAUVILLE] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_WALLY,
.trainerName = _("WALLY"),
@ -9200,7 +9200,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_WALLY_VR_2] =
{
.partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_WALLY,
.trainerName = _("WALLY"),
@ -9214,7 +9214,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_WALLY_VR_3] =
{
.partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_WALLY,
.trainerName = _("WALLY"),
@ -9228,7 +9228,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_WALLY_VR_4] =
{
.partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_WALLY,
.trainerName = _("WALLY"),
@ -9242,7 +9242,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_WALLY_VR_5] =
{
.partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_WALLY,
.trainerName = _("WALLY"),
@ -9256,7 +9256,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_LILYCOVE_MUDKIP] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -9270,7 +9270,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_LILYCOVE_TREECKO] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -9284,7 +9284,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_BRENDAN_LILYCOVE_TORCHIC] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_BRENDAN,
.trainerName = _("BRENDAN"),
@ -9298,7 +9298,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_LILYCOVE_MUDKIP] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -9312,7 +9312,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_LILYCOVE_TREECKO] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -9326,7 +9326,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_LILYCOVE_TORCHIC] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -10754,7 +10754,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_RUSTBORO_TREECKO] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -10768,7 +10768,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_MAY_RUSTBORO_TORCHIC] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE,
.trainerPic = TRAINER_PIC_MAY,
.trainerName = _("MAY"),
@ -11258,7 +11258,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_STEVEN] =
{
.partyFlags = F_TRAINER_PARTY_HELD_ITEM | F_TRAINER_PARTY_CUSTOM_MOVESET,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_STEVEN,
.trainerName = _("STEVEN"),
@ -11916,7 +11916,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_RED] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_RED,
.trainerName = _("RED"),
@ -11930,7 +11930,7 @@ const struct Trainer gTrainers[] = {
[TRAINER_LEAF] =
{
.partyFlags = 0,
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_3,
.trainerClass = TRAINER_CLASS_RIVAL,
.encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_MALE,
.trainerPic = TRAINER_PIC_LEAF,
.trainerName = _("LEAF"),

File diff suppressed because it is too large Load Diff

View File

@ -65,17 +65,18 @@ u8 ScriptGiveMon(u16 species, u8 level, u16 item, u32 unused1, u32 unused2, u8 u
u8 heldItem[2];
struct Pokemon mon;
CreateMon(&mon, species, level, USE_RANDOM_IVS, 0, 0, OT_ID_PLAYER_ID, 0);
CreateMon(&mon, species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0);
heldItem[0] = item;
heldItem[1] = item >> 8;
SetMonData(&mon, MON_DATA_HELD_ITEM, heldItem);
sentToPc = GiveMonToPlayer(&mon);
nationalDexNum = SpeciesToNationalPokedexNum(species);
// Don't set Pokédex flag for MON_CANT_GIVE
switch(sentToPc)
{
case 0:
case 1:
case MON_GIVEN_TO_PARTY:
case MON_GIVEN_TO_PC:
GetSetPokedexFlag(nationalDexNum, FLAG_SET_SEEN);
GetSetPokedexFlag(nationalDexNum, FLAG_SET_CAUGHT);
break;

View File

@ -126,7 +126,7 @@ struct
{TRAINER_CLASS_PKMN_BREEDER, TRAINER_ENCOUNTER_MUSIC_FEMALE},
{TRAINER_CLASS_COLLECTOR, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS},
{TRAINER_CLASS_PKMN_RANGER, TRAINER_ENCOUNTER_MUSIC_COOL},
{TRAINER_CLASS_PKMN_TRAINER_3, TRAINER_ENCOUNTER_MUSIC_MALE},
{TRAINER_CLASS_RIVAL, TRAINER_ENCOUNTER_MUSIC_MALE},
{TRAINER_CLASS_YOUNG_COUPLE, TRAINER_ENCOUNTER_MUSIC_GIRL},
{TRAINER_CLASS_PSYCHIC, TRAINER_ENCOUNTER_MUSIC_INTENSE},
{TRAINER_CLASS_SR_AND_JR, TRAINER_ENCOUNTER_MUSIC_TWINS},