mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 15:13:42 +01:00
add constants trainers file
This commit is contained in:
parent
54dccc8512
commit
720bd555bc
@ -298,7 +298,6 @@ struct TrainerMonNoItemDefaultMoves
|
||||
u16 species;
|
||||
};
|
||||
|
||||
u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg);
|
||||
u8 GetBankSide(u8 bank);
|
||||
|
||||
struct TrainerMonItemDefaultMoves
|
||||
@ -348,9 +347,6 @@ struct Trainer
|
||||
/*0x24*/ union TrainerMonPtr party;
|
||||
};
|
||||
|
||||
#define PARTY_FLAG_CUSTOM_MOVES 0x1
|
||||
#define PARTY_FLAG_HAS_ITEM 0x2
|
||||
|
||||
extern const struct Trainer gTrainers[];
|
||||
|
||||
#define TRAINER_ENCOUNTER_MUSIC(trainer)((gTrainers[trainer].encounterMusic_gender & 0x7F))
|
||||
|
1129
include/constants/trainers.h
Normal file
1129
include/constants/trainers.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,19 +0,0 @@
|
||||
#ifndef GUARD_TRAINER_H
|
||||
#define GUARD_TRAINER_H
|
||||
|
||||
#define TRAINER_ENCOUNTER_MUSIC_MALE 0 // standard male encounter music
|
||||
#define TRAINER_ENCOUNTER_MUSIC_FEMALE 1 // standard female encounter music
|
||||
#define TRAINER_ENCOUNTER_MUSIC_GIRL 2 // used for male Tubers and Young Couples too
|
||||
#define TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS 3
|
||||
#define TRAINER_ENCOUNTER_MUSIC_INTENSE 4
|
||||
#define TRAINER_ENCOUNTER_MUSIC_COOL 5
|
||||
#define TRAINER_ENCOUNTER_MUSIC_AQUA 6
|
||||
#define TRAINER_ENCOUNTER_MUSIC_MAGMA 7
|
||||
#define TRAINER_ENCOUNTER_MUSIC_SWIMMER 8
|
||||
#define TRAINER_ENCOUNTER_MUSIC_TWINS 9 // used for other trainer classes too
|
||||
#define TRAINER_ENCOUNTER_MUSIC_ELITE_FOUR 10
|
||||
#define TRAINER_ENCOUNTER_MUSIC_HIKER 11 // used for other trainer classes too
|
||||
#define TRAINER_ENCOUNTER_MUSIC_INTERVIEWER 12
|
||||
#define TRAINER_ENCOUNTER_MUSIC_RICH 13 // Rich Boys and Gentlemen
|
||||
|
||||
#endif // GUARD_TRAINER_H
|
@ -1,74 +0,0 @@
|
||||
#ifndef GUARD_TRAINER_CLASSES_H
|
||||
#define GUARD_TRAINER_CLASSES_H
|
||||
|
||||
enum
|
||||
{
|
||||
CLASS_PKMN_TRAINER0, // 0
|
||||
CLASS_PKMN_TRAINER1, // 1
|
||||
CLASS_HIKER, // 2
|
||||
CLASS_TEAM_AQUA, // 3
|
||||
CLASS_PKMN_BREEDER, // 4
|
||||
CLASS_COOLTRAINER, // 5
|
||||
CLASS_BIRDKEEPER, // 6
|
||||
CLASS_COLLECTOR, // 7
|
||||
CLASS_SWIMMER_MALE, // 8
|
||||
CLASS_TEAM_MAGMA, // 9
|
||||
CLASS_EXPERT, // 0xA
|
||||
CLASS_AQUA_ADMIN, // 0xB
|
||||
CLASS_BLACK_BELT, // 0xC
|
||||
CLASS_AQUA_LEADER, // 0xD
|
||||
CLASS_HEX_MANIAC, // 0xE
|
||||
CLASS_AROMA_LADY, // 0xF
|
||||
CLASS_RUIN_MANIAC, // 0x10
|
||||
CLASS_INTERVIEWER, // 0x11
|
||||
CLASS_TUBER_FEMALE, // 0x12
|
||||
CLASS_TUBER_MALE, // 0x13
|
||||
CLASS_LADY, // 0x14
|
||||
CLASS_BEAUTY, // 0x15
|
||||
CLASS_RICH_BOY, // 0x16
|
||||
CLASS_POKEMANIAC, // 0x17
|
||||
CLASS_GUITARIST, // 0x18
|
||||
CLASS_KINDLER, // 0x19
|
||||
CLASS_CAMPER, // 0x1A
|
||||
CLASS_PICKNICKER, // 0x1B
|
||||
CLASS_BUG_MANIAC, // 0x1C
|
||||
CLASS_PSYCHIC, // 0x1D
|
||||
CLASS_GENTLEMAN, // 0x1E
|
||||
CLASS_ELITE_FOUR, // 0x1F
|
||||
CLASS_LEADER, // 0x20
|
||||
CLASS_SCHOOL_KID, // 0x21
|
||||
CLASS_SCHOOL_SR_JR, // 0x22
|
||||
CLASS_WINSTRATE, // 0x23
|
||||
CLASS_POKE_FAN, // 0x24
|
||||
CLASS_YOUNGSTER, // 0x25
|
||||
CLASS_CHAMPION, // 0x26
|
||||
CLASS_FISHERMAN, // 0x27
|
||||
CLASS_TRIATHLETE, // 0x28
|
||||
CLASS_DRAGON_TAMER, // 0x29
|
||||
CLASS_NINJA_BOY, // 0x2A
|
||||
CLASS_BATTLE_GIRL, // 0x2B
|
||||
CLASS_PARASOL_LADY, // 0x2C
|
||||
CLASS_SWIMMER_FEMALE, // 0x2D
|
||||
CLASS_TWINS, // 0x2E
|
||||
CLASS_SAILOR, // 0x2F
|
||||
CLASS_COOLTRAINER_2, // 0x30
|
||||
CLASS_MAGMA_ADMIN, // 0x31
|
||||
CLASS_PKMN_TRAINER_RIVAL, // 0x32
|
||||
CLASS_BUG_CATCHER, // 0x33
|
||||
CLASS_PKMN_RANGER, // 0x34
|
||||
CLASS_MAGMA_LEADER, // 0x35
|
||||
CLASS_LASS, // 0x36
|
||||
CLASS_YOUNG_COUPLE, // 0x37
|
||||
CLASS_OLD_COUPLE, // 0x38
|
||||
CLASS_SIS_AND_BRO, // 0x39
|
||||
CLASS_SALON_MAIDEN, // 0x3A
|
||||
CLASS_DOME_ACE, // 0x3B
|
||||
CLASS_PALACE_MAVEN, // 0x3C
|
||||
CLASS_ARENA_TYCOON, // 0x3D
|
||||
CLASS_FACTORY_HEAD, // 0x3E
|
||||
CLASS_PIKE_QUEEN, // 0x3F
|
||||
CLASS_PYRAMID_KING, // 0x40
|
||||
CLASS_PKMN_TRAINER2, // 0x41
|
||||
};
|
||||
|
||||
#endif // GUARD_TRAINER_CLASSES_H
|
@ -1,101 +0,0 @@
|
||||
#ifndef GUARD_TRAINER_FRONT_SPRITES_H
|
||||
#define GUARD_TRAINER_FRONT_SPRITES_H
|
||||
|
||||
enum
|
||||
{
|
||||
TRAINER_FRONT_PIC_HIKER,
|
||||
TRAINER_FRONT_PIC_AQUA_GRUNT_M,
|
||||
TRAINER_FRONT_PIC_PKMN_BREEDER_F,
|
||||
TRAINER_FRONT_PIC_COOLTRAINER_M,
|
||||
TRAINER_FRONT_PIC_BIRD_KEEPER,
|
||||
TRAINER_FRONT_PIC_COLLECTOR,
|
||||
TRAINER_FRONT_PIC_AQUA_GRUNT_F,
|
||||
TRAINER_FRONT_PIC_SWIMMER_M,
|
||||
TRAINER_FRONT_PIC_MAGMA_GRUNT_M,
|
||||
TRAINER_FRONT_PIC_EXPERT_M,
|
||||
TRAINER_FRONT_PIC_AQUA_ADMIN_M,
|
||||
TRAINER_FRONT_PIC_BLACK_BELT,
|
||||
TRAINER_FRONT_PIC_AQUA_ADMIN_F,
|
||||
TRAINER_FRONT_PIC_AQUA_LEADER,
|
||||
TRAINER_FRONT_PIC_HEX_MANIAC,
|
||||
TRAINER_FRONT_PIC_AROMA_LADY,
|
||||
TRAINER_FRONT_PIC_RUIN_MANIAC,
|
||||
TRAINER_FRONT_PIC_INTERVIEWER,
|
||||
TRAINER_FRONT_PIC_TUBER_F,
|
||||
TRAINER_FRONT_PIC_TUBER_M,
|
||||
TRAINER_FRONT_PIC_COOLTRAINER_F,
|
||||
TRAINER_FRONT_PIC_LADY,
|
||||
TRAINER_FRONT_PIC_BEAUTY,
|
||||
TRAINER_FRONT_PIC_RICH_BOY,
|
||||
TRAINER_FRONT_PIC_EXPERT_F,
|
||||
TRAINER_FRONT_PIC_POKE_MANIAC,
|
||||
TRAINER_FRONT_PIC_MAGMA_GRUNT_F,
|
||||
TRAINER_FRONT_PIC_GUITARIST,
|
||||
TRAINER_FRONT_PIC_KINDLER,
|
||||
TRAINER_FRONT_PIC_CAMPER,
|
||||
TRAINER_FRONT_PIC_PICNICKER,
|
||||
TRAINER_FRONT_PIC_BUG_MANIAC,
|
||||
TRAINER_FRONT_PIC_PKMN_BREEDER_M,
|
||||
TRAINER_FRONT_PIC_PSYCHIC_M,
|
||||
TRAINER_FRONT_PIC_PSYCHIC_F,
|
||||
TRAINER_FRONT_PIC_GENTLEMAN,
|
||||
TRAINER_FRONT_PIC_SIDNEY,
|
||||
TRAINER_FRONT_PIC_PHOEBE,
|
||||
TRAINER_FRONT_PIC_GLACIA,
|
||||
TRAINER_FRONT_PIC_DRAKE,
|
||||
TRAINER_FRONT_PIC_ROXANNE,
|
||||
TRAINER_FRONT_PIC_BRAWLY,
|
||||
TRAINER_FRONT_PIC_WATTSON,
|
||||
TRAINER_FRONT_PIC_FLANNERY,
|
||||
TRAINER_FRONT_PIC_NORMAN,
|
||||
TRAINER_FRONT_PIC_WINONA,
|
||||
TRAINER_FRONT_PIC_TATE_LIZA,
|
||||
TRAINER_FRONT_PIC_JUAN,
|
||||
TRAINER_FRONT_PIC_SCHOOL_KID_M,
|
||||
TRAINER_FRONT_PIC_SCHOOL_KID_F,
|
||||
TRAINER_FRONT_PIC_SR_JR,
|
||||
TRAINER_FRONT_PIC_POKÉFAN_M,
|
||||
TRAINER_FRONT_PIC_POKÉFAN_F,
|
||||
TRAINER_FRONT_PIC_YOUNGSTER,
|
||||
TRAINER_FRONT_PIC_WALLACE,
|
||||
TRAINER_FRONT_PIC_FISHERMAN,
|
||||
TRAINER_FRONT_PIC_TRIATHLETE_BIKER_M,
|
||||
TRAINER_FRONT_PIC_TRIATHLETE_BIKER_F,
|
||||
TRAINER_FRONT_PIC_TRIATHLETE_JOGGER_M,
|
||||
TRAINER_FRONT_PIC_TRIATHLETE_JOGGER_F,
|
||||
TRAINER_FRONT_PIC_TRIATHLETE_SWIMMER_M,
|
||||
TRAINER_FRONT_PIC_TRIATHLETE_SWIMMER_F,
|
||||
TRAINER_FRONT_PIC_DRAGON_TAMER,
|
||||
TRAINER_FRONT_PIC_NINJA_BOY,
|
||||
TRAINER_FRONT_PIC_BATTLE_GIRL,
|
||||
TRAINER_FRONT_PIC_PARASOL_LADY,
|
||||
TRAINER_FRONT_PIC_SWIMMER_F,
|
||||
TRAINER_FRONT_PIC_TWINS,
|
||||
TRAINER_FRONT_PIC_SAILOR,
|
||||
TRAINER_FRONT_PIC_MAGMA_ADMIN_M,
|
||||
TRAINER_FRONT_PIC_WALLY,
|
||||
TRAINER_FRONT_PIC_BRENDAN_E,
|
||||
TRAINER_FRONT_PIC_MAY_E,
|
||||
TRAINER_FRONT_PIC_BUG_CATCHER,
|
||||
TRAINER_FRONT_PIC_PKMN_RANGER_M,
|
||||
TRAINER_FRONT_PIC_PKMN_RANGER_F,
|
||||
TRAINER_FRONT_PIC_MAGMA_LEADER,
|
||||
TRAINER_FRONT_PIC_LASS,
|
||||
TRAINER_FRONT_PIC_YOUNG_COUPLE,
|
||||
TRAINER_FRONT_PIC_OLD_COUPLE,
|
||||
TRAINER_FRONT_PIC_SIS_AND_BRO,
|
||||
TRAINER_FRONT_PIC_STEVEN,
|
||||
TRAINER_FRONT_PIC_ANABEL,
|
||||
TRAINER_FRONT_PIC_TUCKER,
|
||||
TRAINER_FRONT_PIC_SPENSER,
|
||||
TRAINER_FRONT_PIC_GRETA,
|
||||
TRAINER_FRONT_PIC_NOLAND,
|
||||
TRAINER_FRONT_PIC_LUCY,
|
||||
TRAINER_FRONT_PIC_BRANDON,
|
||||
TRAINER_FRONT_PIC_RED,
|
||||
TRAINER_FRONT_PIC_LEAF,
|
||||
TRAINER_FRONT_PIC_BRENDAN_RS,
|
||||
TRAINER_FRONT_PIC_MAY_RS
|
||||
};
|
||||
|
||||
#endif // GUARD_TRAINER_FRONT_SPRITES_H
|
@ -1,12 +0,0 @@
|
||||
#ifndef GUARD_TRAINER_IDS_H
|
||||
#define GUARD_TRAINER_IDS_H
|
||||
|
||||
#define NO_OF_TRAINERS 854
|
||||
|
||||
#define TRAINER_ID_SIDNEY 261
|
||||
#define TRAINER_ID_PHOEBE 262
|
||||
#define TRAINER_ID_GLACIA 263
|
||||
#define TRAINER_ID_DRAKE 264
|
||||
#define TRAINER_ID_STEVEN 804
|
||||
|
||||
#endif // GUARD_TRAINER_IDS_H
|
@ -17,6 +17,7 @@
|
||||
#include "item.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/hold_effects.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "link.h"
|
||||
#include "bg.h"
|
||||
#include "dma3.h"
|
||||
@ -38,7 +39,6 @@
|
||||
#include "pokedex.h"
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/moves.h"
|
||||
#include "trainer_classes.h"
|
||||
#include "evolution_scene.h"
|
||||
#include "roamer.h"
|
||||
#include "tv.h"
|
||||
@ -1718,7 +1718,7 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
|
||||
{
|
||||
const struct TrainerMonNoItemDefaultMoves *partyData = gTrainers[trainerNum].party.NoItemDefaultMoves;
|
||||
|
||||
for (j = 0; gSpeciesNames[partyData[i].species][j] != 0xFF; j++)
|
||||
for (j = 0; gSpeciesNames[partyData[i].species][j] != EOS; j++)
|
||||
nameHash += gSpeciesNames[partyData[i].species][j];
|
||||
|
||||
personalityValue += nameHash << 8;
|
||||
@ -1726,11 +1726,11 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
|
||||
CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0);
|
||||
break;
|
||||
}
|
||||
case PARTY_FLAG_CUSTOM_MOVES:
|
||||
case F_TRAINER_PARTY_CUSTOM_MOVESET:
|
||||
{
|
||||
const struct TrainerMonNoItemCustomMoves *partyData = gTrainers[trainerNum].party.NoItemCustomMoves;
|
||||
|
||||
for (j = 0; gSpeciesNames[partyData[i].species][j] != 0xFF; j++)
|
||||
for (j = 0; gSpeciesNames[partyData[i].species][j] != EOS; j++)
|
||||
nameHash += gSpeciesNames[partyData[i].species][j];
|
||||
|
||||
personalityValue += nameHash << 8;
|
||||
@ -1744,11 +1744,11 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PARTY_FLAG_HAS_ITEM:
|
||||
case F_TRAINER_PARTY_HELD_ITEM:
|
||||
{
|
||||
const struct TrainerMonItemDefaultMoves *partyData = gTrainers[trainerNum].party.ItemDefaultMoves;
|
||||
|
||||
for (j = 0; gSpeciesNames[partyData[i].species][j] != 0xFF; j++)
|
||||
for (j = 0; gSpeciesNames[partyData[i].species][j] != EOS; j++)
|
||||
nameHash += gSpeciesNames[partyData[i].species][j];
|
||||
|
||||
personalityValue += nameHash << 8;
|
||||
@ -1758,11 +1758,11 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
|
||||
SetMonData(&party[i], MON_DATA_HELD_ITEM, &partyData[i].heldItem);
|
||||
break;
|
||||
}
|
||||
case PARTY_FLAG_CUSTOM_MOVES | PARTY_FLAG_HAS_ITEM:
|
||||
case F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM:
|
||||
{
|
||||
const struct TrainerMonItemCustomMoves *partyData = gTrainers[trainerNum].party.ItemCustomMoves;
|
||||
|
||||
for (j = 0; gSpeciesNames[partyData[i].species][j] != 0xFF; j++)
|
||||
for (j = 0; gSpeciesNames[partyData[i].species][j] != EOS; j++)
|
||||
nameHash += gSpeciesNames[partyData[i].species][j];
|
||||
|
||||
personalityValue += nameHash << 8;
|
||||
@ -4749,19 +4749,19 @@ static void HandleEndTurn_BattleWon(void)
|
||||
|
||||
switch (gTrainers[gTrainerBattleOpponent_A].trainerClass)
|
||||
{
|
||||
case CLASS_ELITE_FOUR:
|
||||
case CLASS_CHAMPION:
|
||||
case TRAINER_CLASS_ELITE_FOUR:
|
||||
case TRAINER_CLASS_CHAMPION:
|
||||
PlayBGM(BGM_KACHI5);
|
||||
break;
|
||||
case CLASS_TEAM_AQUA:
|
||||
case CLASS_TEAM_MAGMA:
|
||||
case CLASS_AQUA_ADMIN:
|
||||
case CLASS_AQUA_LEADER:
|
||||
case CLASS_MAGMA_ADMIN:
|
||||
case CLASS_MAGMA_LEADER:
|
||||
case TRAINER_CLASS_TEAM_AQUA:
|
||||
case TRAINER_CLASS_TEAM_MAGMA:
|
||||
case TRAINER_CLASS_AQUA_ADMIN:
|
||||
case TRAINER_CLASS_AQUA_LEADER:
|
||||
case TRAINER_CLASS_MAGMA_ADMIN:
|
||||
case TRAINER_CLASS_MAGMA_LEADER:
|
||||
PlayBGM(BGM_KACHI4);
|
||||
break;
|
||||
case CLASS_LEADER:
|
||||
case TRAINER_CLASS_LEADER:
|
||||
PlayBGM(BGM_KACHI3);
|
||||
break;
|
||||
default:
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "battle_interface.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "text.h"
|
||||
#include "sound.h"
|
||||
#include "pokedex.h"
|
||||
@ -6236,19 +6237,19 @@ static u32 GetTrainerMoneyToGive(u16 trainerId)
|
||||
lastMonLevel = party[gTrainers[trainerId].partySize - 1].lvl;
|
||||
}
|
||||
break;
|
||||
case PARTY_FLAG_CUSTOM_MOVES:
|
||||
case F_TRAINER_PARTY_CUSTOM_MOVESET:
|
||||
{
|
||||
const struct TrainerMonNoItemCustomMoves *party = gTrainers[trainerId].party.NoItemCustomMoves;
|
||||
lastMonLevel = party[gTrainers[trainerId].partySize - 1].lvl;
|
||||
}
|
||||
break;
|
||||
case PARTY_FLAG_HAS_ITEM:
|
||||
case F_TRAINER_PARTY_HELD_ITEM:
|
||||
{
|
||||
const struct TrainerMonItemDefaultMoves *party = gTrainers[trainerId].party.ItemDefaultMoves;
|
||||
lastMonLevel = party[gTrainers[trainerId].partySize - 1].lvl;
|
||||
}
|
||||
break;
|
||||
case PARTY_FLAG_CUSTOM_MOVES | PARTY_FLAG_HAS_ITEM:
|
||||
case F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM:
|
||||
{
|
||||
const struct TrainerMonItemCustomMoves *party = gTrainers[trainerId].party.ItemCustomMoves;
|
||||
lastMonLevel = party[gTrainers[trainerId].partySize - 1].lvl;
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "battle.h"
|
||||
#include "battle_setup.h"
|
||||
#include "battle_transition.h"
|
||||
@ -15,8 +16,6 @@
|
||||
#include "constants/maps.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "fieldmap.h"
|
||||
#include "trainer_classes.h"
|
||||
#include "trainer_ids.h"
|
||||
#include "random.h"
|
||||
#include "starter_choose.h"
|
||||
#include "script_pokemon_80F8.h"
|
||||
@ -27,7 +26,6 @@
|
||||
#include "event_scripts.h"
|
||||
#include "trainer_see.h"
|
||||
#include "field_message_box.h"
|
||||
#include "trainer.h"
|
||||
#include "sound.h"
|
||||
#include "strings.h"
|
||||
#include "secret_base.h"
|
||||
@ -759,7 +757,7 @@ static u8 GetSumOfEnemyPartyLevel(u16 opponentId, u8 numMons)
|
||||
sum += party[i].lvl;
|
||||
}
|
||||
break;
|
||||
case PARTY_FLAG_CUSTOM_MOVES:
|
||||
case F_TRAINER_PARTY_CUSTOM_MOVESET:
|
||||
{
|
||||
const struct TrainerMonNoItemCustomMoves *party;
|
||||
party = gTrainers[opponentId].party.NoItemCustomMoves;
|
||||
@ -767,7 +765,7 @@ static u8 GetSumOfEnemyPartyLevel(u16 opponentId, u8 numMons)
|
||||
sum += party[i].lvl;
|
||||
}
|
||||
break;
|
||||
case PARTY_FLAG_HAS_ITEM:
|
||||
case F_TRAINER_PARTY_HELD_ITEM:
|
||||
{
|
||||
const struct TrainerMonItemDefaultMoves *party;
|
||||
party = gTrainers[opponentId].party.ItemDefaultMoves;
|
||||
@ -775,7 +773,7 @@ static u8 GetSumOfEnemyPartyLevel(u16 opponentId, u8 numMons)
|
||||
sum += party[i].lvl;
|
||||
}
|
||||
break;
|
||||
case PARTY_FLAG_CUSTOM_MOVES | PARTY_FLAG_HAS_ITEM:
|
||||
case F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM:
|
||||
{
|
||||
const struct TrainerMonItemCustomMoves *party;
|
||||
party = gTrainers[opponentId].party.ItemCustomMoves;
|
||||
@ -820,30 +818,30 @@ static u8 GetTrainerBattleTransition(void)
|
||||
if (gTrainerBattleOpponent_A == SECRET_BASE_OPPONENT)
|
||||
return B_TRANSITION_CHAMPION;
|
||||
|
||||
if (gTrainers[gTrainerBattleOpponent_A].trainerClass == CLASS_ELITE_FOUR)
|
||||
if (gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_ELITE_FOUR)
|
||||
{
|
||||
if (gTrainerBattleOpponent_A == TRAINER_ID_SIDNEY)
|
||||
if (gTrainerBattleOpponent_A == TRAINER_SIDNEY)
|
||||
return B_TRANSITION_SYDNEY;
|
||||
if (gTrainerBattleOpponent_A == TRAINER_ID_PHOEBE)
|
||||
if (gTrainerBattleOpponent_A == TRAINER_PHOEBE)
|
||||
return B_TRANSITION_PHOEBE;
|
||||
if (gTrainerBattleOpponent_A == TRAINER_ID_GLACIA)
|
||||
if (gTrainerBattleOpponent_A == TRAINER_GLACIA)
|
||||
return B_TRANSITION_GLACIA;
|
||||
if (gTrainerBattleOpponent_A == TRAINER_ID_DRAKE)
|
||||
if (gTrainerBattleOpponent_A == TRAINER_DRAKE)
|
||||
return B_TRANSITION_DRAKE;
|
||||
return B_TRANSITION_CHAMPION;
|
||||
}
|
||||
|
||||
if (gTrainers[gTrainerBattleOpponent_A].trainerClass == CLASS_CHAMPION)
|
||||
if (gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_CHAMPION)
|
||||
return B_TRANSITION_CHAMPION;
|
||||
|
||||
if (gTrainers[gTrainerBattleOpponent_A].trainerClass == CLASS_TEAM_MAGMA
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == CLASS_MAGMA_LEADER
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == CLASS_MAGMA_ADMIN)
|
||||
if (gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_TEAM_MAGMA
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_MAGMA_LEADER
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_MAGMA_ADMIN)
|
||||
return B_TRANSITION_MAGMA;
|
||||
|
||||
if (gTrainers[gTrainerBattleOpponent_A].trainerClass == CLASS_TEAM_AQUA
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == CLASS_AQUA_LEADER
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == CLASS_AQUA_ADMIN)
|
||||
if (gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_TEAM_AQUA
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_AQUA_LEADER
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_AQUA_ADMIN)
|
||||
return B_TRANSITION_AQUA;
|
||||
|
||||
if (gTrainers[gTrainerBattleOpponent_A].doubleBattle == TRUE)
|
||||
|
@ -11,8 +11,7 @@
|
||||
#include "link.h"
|
||||
#include "constants/hold_effects.h"
|
||||
#include "random.h"
|
||||
#include "trainer_classes.h"
|
||||
#include "trainer_ids.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/songs.h"
|
||||
#include "sound.h"
|
||||
#include "m4a.h"
|
||||
@ -692,9 +691,9 @@ void AdjustFriendship(struct Pokemon *mon, u8 event)
|
||||
if ((event != 5 || !(Random() & 1))
|
||||
&& (event != 3
|
||||
|| ((gBattleTypeFlags & BATTLE_TYPE_TRAINER)
|
||||
&& (gTrainers[gTrainerBattleOpponent_A].trainerClass == CLASS_ELITE_FOUR
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == CLASS_LEADER
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == CLASS_CHAMPION))))
|
||||
&& (gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_ELITE_FOUR
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_LEADER
|
||||
|| gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_CHAMPION))))
|
||||
{
|
||||
s8 mod = gUnknown_08329ECE[event][friendshipLevel];
|
||||
if (mod > 0 && holdEffect == HOLD_EFFECT_HAPPINESS_UP)
|
||||
@ -1146,55 +1145,57 @@ void ClearBattleMonForms(void)
|
||||
u16 GetBattleBGM(void)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE_GROUDON)
|
||||
return 0x1E0;
|
||||
return BGM_BATTLE34;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_REGI)
|
||||
return 0x1DF;
|
||||
return BGM_BATTLE36;
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
return 0x1DC;
|
||||
return BGM_BATTLE20;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER)
|
||||
{
|
||||
u8 trainerClass;
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
trainerClass = GetFrontierOpponentClass(gTrainerBattleOpponent_A);
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
|
||||
trainerClass = CLASS_EXPERT;
|
||||
trainerClass = TRAINER_CLASS_EXPERT;
|
||||
else
|
||||
trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass;
|
||||
|
||||
switch (trainerClass)
|
||||
{
|
||||
case CLASS_AQUA_LEADER:
|
||||
case CLASS_MAGMA_LEADER:
|
||||
return 0x1E3;
|
||||
case CLASS_TEAM_AQUA:
|
||||
case CLASS_TEAM_MAGMA:
|
||||
case CLASS_AQUA_ADMIN:
|
||||
case CLASS_MAGMA_ADMIN:
|
||||
return 0x1DB;
|
||||
case CLASS_LEADER:
|
||||
return 0x1DD;
|
||||
case CLASS_CHAMPION:
|
||||
return 0x1DE;
|
||||
case CLASS_PKMN_TRAINER_RIVAL:
|
||||
case TRAINER_CLASS_AQUA_LEADER:
|
||||
case TRAINER_CLASS_MAGMA_LEADER:
|
||||
return BGM_BATTLE30;
|
||||
case TRAINER_CLASS_TEAM_AQUA:
|
||||
case TRAINER_CLASS_TEAM_MAGMA:
|
||||
case TRAINER_CLASS_AQUA_ADMIN:
|
||||
case TRAINER_CLASS_MAGMA_ADMIN:
|
||||
return BGM_BATTLE31;
|
||||
case TRAINER_CLASS_LEADER:
|
||||
return BGM_BATTLE32;
|
||||
case TRAINER_CLASS_CHAMPION:
|
||||
return BGM_BATTLE33;
|
||||
case TRAINER_CLASS_PKMN_TRAINER_3:
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
return 0x1E1;
|
||||
return BGM_BATTLE35;
|
||||
if (!StringCompare(gTrainers[gTrainerBattleOpponent_A].trainerName, gText_BattleWallyName))
|
||||
return 0x1DC;
|
||||
return 0x1E1;
|
||||
case CLASS_ELITE_FOUR:
|
||||
return 0x1E2;
|
||||
case CLASS_SALON_MAIDEN:
|
||||
case CLASS_DOME_ACE:
|
||||
case CLASS_PALACE_MAVEN:
|
||||
case CLASS_ARENA_TYCOON:
|
||||
case CLASS_FACTORY_HEAD:
|
||||
case CLASS_PIKE_QUEEN:
|
||||
case CLASS_PYRAMID_KING:
|
||||
return 0x1D7;
|
||||
return BGM_BATTLE20;
|
||||
return BGM_BATTLE35;
|
||||
case TRAINER_CLASS_ELITE_FOUR:
|
||||
return BGM_BATTLE38;
|
||||
case TRAINER_CLASS_SALON_MAIDEN:
|
||||
case TRAINER_CLASS_DOME_ACE:
|
||||
case TRAINER_CLASS_PALACE_MAVEN:
|
||||
case TRAINER_CLASS_ARENA_TYCOON:
|
||||
case TRAINER_CLASS_FACTORY_HEAD:
|
||||
case TRAINER_CLASS_PIKE_QUEEN:
|
||||
case TRAINER_CLASS_PYRAMID_KING:
|
||||
return BGM_BATTLE_FRONTIER_BRAIN;
|
||||
default:
|
||||
return 0x1DC;
|
||||
return BGM_BATTLE20;
|
||||
}
|
||||
}
|
||||
return 0x1DA;
|
||||
return BGM_BATTLE27;
|
||||
}
|
||||
|
||||
void PlayBattleBGM(void)
|
||||
@ -1462,12 +1463,14 @@ bool8 IsShinyOtIdPersonality(u32 otId, u32 personality)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
const u8* GetTrainerPartnerName(void)
|
||||
const u8 *GetTrainerPartnerName(void)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER)
|
||||
{
|
||||
if (gPartnerTrainerId == STEVEN_PARTNER_ID)
|
||||
return gTrainers[TRAINER_ID_STEVEN].trainerName;
|
||||
{
|
||||
return gTrainers[TRAINER_STEVEN].trainerName;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetFrontierTrainerName(gStringVar1, gPartnerTrainerId);
|
||||
@ -1682,14 +1685,14 @@ void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality)
|
||||
}
|
||||
}
|
||||
|
||||
const u8* GetTrainerClassNameFromId(u16 trainerId)
|
||||
const u8 *GetTrainerClassNameFromId(u16 trainerId)
|
||||
{
|
||||
if (trainerId > NO_OF_TRAINERS)
|
||||
trainerId = 0;
|
||||
return gTrainerClassNames[gTrainers[trainerId].trainerClass];
|
||||
}
|
||||
|
||||
const u8* GetTrainerNameFromId(u16 trainerId)
|
||||
const u8 *GetTrainerNameFromId(u16 trainerId)
|
||||
{
|
||||
if (trainerId > NO_OF_TRAINERS)
|
||||
trainerId = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user