2017-09-30 23:12:42 +00:00
|
|
|
#ifndef GUARD_BATTLE_SETUP_H
|
|
|
|
#define GUARD_BATTLE_SETUP_H
|
|
|
|
|
2019-04-02 07:22:07 +00:00
|
|
|
#include "gym_leader_rematch.h"
|
|
|
|
|
2017-12-01 20:25:13 +00:00
|
|
|
#define REMATCHES_COUNT 5
|
2019-04-02 07:22:07 +00:00
|
|
|
#define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY
|
2017-12-01 20:25:13 +00:00
|
|
|
|
|
|
|
struct RematchTrainer
|
|
|
|
{
|
|
|
|
u16 trainerIds[REMATCHES_COUNT];
|
|
|
|
u16 mapGroup;
|
|
|
|
u16 mapNum;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern const struct RematchTrainer gRematchTable[REMATCH_TABLE_ENTRIES];
|
|
|
|
|
|
|
|
extern u16 gTrainerBattleOpponent_A;
|
|
|
|
extern u16 gTrainerBattleOpponent_B;
|
|
|
|
extern u16 gPartnerTrainerId;
|
|
|
|
|
2017-11-17 16:50:07 +00:00
|
|
|
void BattleSetup_StartWildBattle(void);
|
2017-12-01 20:25:13 +00:00
|
|
|
void BattleSetup_StartBattlePikeWildBattle(void);
|
2017-11-17 16:50:07 +00:00
|
|
|
void BattleSetup_StartRoamerBattle(void);
|
2017-12-01 20:25:13 +00:00
|
|
|
void StartWallyTutorialBattle(void);
|
|
|
|
void BattleSetup_StartScriptedWildBattle(void);
|
|
|
|
void BattleSetup_StartLatiBattle(void);
|
|
|
|
void BattleSetup_StartLegendaryBattle(void);
|
|
|
|
void StartGroudonKyogreBattle(void);
|
|
|
|
void StartRegiBattle(void);
|
|
|
|
u8 BattleSetup_GetTerrainId(void);
|
|
|
|
u8 sub_80B100C(s32 arg0);
|
|
|
|
void ChooseStarter(void);
|
|
|
|
void ResetTrainerOpponentIds(void);
|
|
|
|
void SetMapVarsToTrainer(void);
|
|
|
|
const u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data);
|
2018-06-12 00:11:48 +00:00
|
|
|
void ConfigureAndSetUpOneTrainerBattle(u8 trainerEventObjId, const u8 *trainerScript);
|
|
|
|
void ConfigureTwoTrainersBattle(u8 trainerEventObjId, const u8 *trainerScript);
|
2017-12-01 20:25:13 +00:00
|
|
|
void SetUpTwoTrainersBattle(void);
|
|
|
|
bool32 GetTrainerFlagFromScriptPointer(const u8 *data);
|
2018-12-07 22:50:56 +00:00
|
|
|
void SetUpTrainerMovement(void);
|
2017-12-01 20:25:13 +00:00
|
|
|
u8 GetTrainerBattleMode(void);
|
|
|
|
bool8 GetTrainerFlag(void);
|
|
|
|
bool8 HasTrainerBeenFought(u16 trainerId);
|
|
|
|
void SetTrainerFlag(u16 trainerId);
|
|
|
|
void ClearTrainerFlag(u16 trainerId);
|
2017-10-12 07:06:19 +00:00
|
|
|
void BattleSetup_StartTrainerBattle(void);
|
2017-12-01 20:25:13 +00:00
|
|
|
void BattleSetup_StartRematchBattle(void);
|
|
|
|
void ShowTrainerIntroSpeech(void);
|
|
|
|
const u8 *BattleSetup_GetScriptAddrAfterBattle(void);
|
|
|
|
const u8 *BattleSetup_GetTrainerPostBattleScript(void);
|
|
|
|
void ShowTrainerCantBattleSpeech(void);
|
|
|
|
void SetUpTrainerEncounterMusic(void);
|
|
|
|
const u8 *GetTrainerALoseText(void);
|
|
|
|
const u8 *GetTrainerBLoseText(void);
|
|
|
|
const u8 *GetTrainerWonSpeech(void);
|
|
|
|
void UpdateRematchIfDefeated(s32 rematchTableId);
|
|
|
|
void IncrementRematchStepCounter(void);
|
|
|
|
void TryUpdateRandomTrainerRematches(u16 mapGroup, u16 mapNum);
|
|
|
|
bool32 DoesSomeoneWantRematchIn(u16 mapGroup, u16 mapNum);
|
|
|
|
bool32 IsRematchTrainerIn(u16 mapGroup, u16 mapNum);
|
|
|
|
u16 GetLastBeatenRematchTrainerId(u16 trainerId);
|
|
|
|
bool8 ShouldTryRematchBattle(void);
|
|
|
|
bool8 IsTrainerReadyForRematch(void);
|
|
|
|
void ShouldTryGetTrainerScript(void);
|
|
|
|
u16 CountBattledRematchTeams(u16 trainerId);
|
2017-09-30 23:12:42 +00:00
|
|
|
|
|
|
|
#endif // GUARD_BATTLE_SETUP_H
|