summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/battle.h10
-rw-r--r--include/battle_arena.h14
-rw-r--r--include/battle_factory.h9
-rw-r--r--include/battle_factory_screen.h7
-rw-r--r--include/battle_pike.h9
-rw-r--r--include/battle_scripts.h2
-rw-r--r--include/battle_tower.h4
-rw-r--r--include/constants/battle_script_commands.h7
-rw-r--r--include/fieldmap.h1
-rw-r--r--include/frontier_util.h1
-rw-r--r--include/global.h8
-rw-r--r--include/pokemon.h2
12 files changed, 62 insertions, 12 deletions
diff --git a/include/battle.h b/include/battle.h
index f34364ea6..90bef24ac 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -498,10 +498,12 @@ struct BattleStruct
struct BattleTv tv;
u8 notSureWhatFieldLol[0x28];
u8 AI_monToSwitchIntoId[MAX_BATTLERS_COUNT];
- u8 field_298[8];
- u8 field_2A0;
- u8 field_2A1;
- u8 field_2A2;
+ s8 arenaMindPoints[2];
+ s8 arenaSkillPoints[2];
+ u16 arenaStartHp[2];
+ u8 arenaLostPlayerMons; // Bits for party member, lost as in referee's decision, not by fainting.
+ u8 arenaLostOpponentMons;
+ u8 alreadyStatusedMoveAttempt; // As bits for battlers; For example when using Thunder Wave on an already paralyzed pokemon.
};
#define GET_MOVE_TYPE(move, typeArg) \
diff --git a/include/battle_arena.h b/include/battle_arena.h
new file mode 100644
index 000000000..bf305ea4e
--- /dev/null
+++ b/include/battle_arena.h
@@ -0,0 +1,14 @@
+#ifndef GUARD_BATTLE_ARENA_H
+#define GUARD_BATTLE_ARENA_H
+
+void CallBattleArenaFunction(void);
+u8 BattleArena_ShowJudgmentWindow(u8 *state);
+void BattleArena_InitPoints(void);
+void BattleArena_AddMindPoints(u8 battler);
+void BattleArena_AddSkillPoints(u8 battler);
+void BattleArena_DeductMindPoints(u8 battler, u16 stringId);
+void sub_81A586C(u8 battler);
+void sub_81A5BF8(void);
+void sub_81A5D44(void);
+
+#endif //GUARD_BATTLE_ARENA_H
diff --git a/include/battle_factory.h b/include/battle_factory.h
index 1b0e44943..2db041b06 100644
--- a/include/battle_factory.h
+++ b/include/battle_factory.h
@@ -1,7 +1,12 @@
#ifndef GUARD_BATTLE_FACTORY_H
#define GUARD_BATTLE_FACTORY_H
-void DoBattleFactorySelectScreen(void);
-void DoBattleFactorySwapScreen(void);
+void CallBattleFactoryFunction(void);
+bool8 sub_81A6BF4(void);
+u8 GetFactoryMonFixedIV(u8 arg0, u8 arg1);
+void FillFactoryBrainParty(void);
+u8 sub_81A6F70(u8 battleMode, u8 lvlMode);
+u32 GetAiScriptsInBattleFactory(void);
+void SetMonMoveAvoidReturn(struct Pokemon *mon, u16 moveArg, u8 moveSlot);
#endif // GUARD_BATTLE_FACTORY_H
diff --git a/include/battle_factory_screen.h b/include/battle_factory_screen.h
new file mode 100644
index 000000000..86d6177f6
--- /dev/null
+++ b/include/battle_factory_screen.h
@@ -0,0 +1,7 @@
+#ifndef GUARD_BATTLE_FACTORY_SCREEN_H
+#define GUARD_BATTLE_FACTORY_SCREEN_H
+
+void DoBattleFactorySelectScreen(void);
+void DoBattleFactorySwapScreen(void);
+
+#endif // GUARD_BATTLE_FACTORY_SCREEN_H
diff --git a/include/battle_pike.h b/include/battle_pike.h
new file mode 100644
index 000000000..ada5b2441
--- /dev/null
+++ b/include/battle_pike.h
@@ -0,0 +1,9 @@
+#ifndef GUARD_BATTLE_PIKE_H
+#define GUARD_BATTLE_PIKE_H
+
+void CallBattlePikeFunction(void);
+u8 GetBattlePikeWildMonHeaderId(void);
+bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate);
+bool8 InBattlePike(void);
+
+#endif // GUARD_BATTLE_PIKE_H
diff --git a/include/battle_scripts.h b/include/battle_scripts.h
index 9c4537363..a23fa6948 100644
--- a/include/battle_scripts.h
+++ b/include/battle_scripts.h
@@ -206,7 +206,7 @@ extern const u8 BattleScript_BerryFocusEnergyEnd2[];
extern const u8 BattleScript_ActionSelectionItemsCantBeUsed[];
extern const u8 BattleScript_ArenaTurnBeginning[];
extern const u8 BattleScript_82DB881[];
-extern const u8 BattleScript_82DB8F3[];
+extern const u8 BattleScript_ArenaDoJudgment[];
extern const u8 BattleScript_82DAA0B[];
extern const u8 BattleScript_AskIfWantsToForfeitMatch[];
extern const u8 BattleScript_PrintPlayerForfeited[];
diff --git a/include/battle_tower.h b/include/battle_tower.h
index 5fe8d1190..90c22c982 100644
--- a/include/battle_tower.h
+++ b/include/battle_tower.h
@@ -21,7 +21,7 @@ struct BattleFrontierTrainer
u16 speechBefore[6];
u16 speechWin[6];
u16 speechLose[6];
- const u16 *bfMonPool;
+ const u16 *monSets;
};
struct FacilityMon
@@ -52,7 +52,7 @@ u8 GetFrontierOpponentClass(u16 trainerId);
void GetFrontierTrainerName(u8 *dst, u16 trainerId);
void FillFrontierTrainerParty(u8 monsCount);
void FillFrontierTrainersParties(u8 monsCount);
-u16 RandomizeFacilityTrainerMonId(u16 trainerId);
+u16 RandomizeFacilityTrainerMonSet(u16 trainerId);
void FrontierSpeechToString(const u16 *words);
void DoSpecialTrainerBattle(void);
void CalcEmeraldBattleTowerChecksum(struct EmeraldBattleTowerRecord *record);
diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h
index dc07fda6e..e8a2980a5 100644
--- a/include/constants/battle_script_commands.h
+++ b/include/constants/battle_script_commands.h
@@ -68,12 +68,19 @@
#define VARIOUS_GET_MOVE_TARGET 3
#define VARIOUS_RESET_INTIMIDATE_TRACE_BITS 5
#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6
+#define VARIOUS_ARENA_JUDGMENT_WINDOW 9
+#define VARIOUS_ARENA_OPPONENT_MON_LOST 10
+#define VARIOUS_ARENA_PLAYER_MON_LOST 11
+#define VARIOUS_ARENA_BOTH_MONS_LOST 12
#define VARIOUS_EMIT_YESNOBOX 13
+#define VARIOUS_ARENA_JUDGMENT_STRING 16
+#define VARIOUS_ARENA_WAIT_STRING 17
#define VARIOUS_WAIT_CRY 18
#define VARIOUS_RETURN_OPPONENT_MON1 19
#define VARIOUS_RETURN_OPPONENT_MON2 20
#define VARIOUS_VOLUME_DOWN 21
#define VARIOUS_VOLUME_UP 22
+#define VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT 23
#define VARIOUS_SET_TELEPORT_OUTCOME 25
#define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26
diff --git a/include/fieldmap.h b/include/fieldmap.h
index 8287229ed..a50c79b43 100644
--- a/include/fieldmap.h
+++ b/include/fieldmap.h
@@ -35,6 +35,7 @@ bool8 sub_8088BF0(u16*, u16, u8);
struct MapConnection *sub_8088950(u8 direction, int x, int y);
bool8 sub_80889A8(u8 direction, int x, int y, struct MapConnection *connection);
bool8 sub_8088A0C(int x, int src_width, int dest_width, int offset);
+void save_serialize_map(void);
void SpriteCB_PokeballGlow(struct Sprite *);
void SpriteCB_PokecenterMonitor(struct Sprite *);
diff --git a/include/frontier_util.h b/include/frontier_util.h
index cfc3a8af4..6b6a2ea39 100644
--- a/include/frontier_util.h
+++ b/include/frontier_util.h
@@ -15,6 +15,7 @@ u8 GetPlayerSymbolCountForFacility(u8 facility);
void ShowRankingHallRecordsWindow(void);
void ScrollRankingHallRecordsWindow(void);
void ClearRankingHallRecords(void);
+void sub_81A4C30(void);
u8 GetFrontierBrainTrainerPicIndex(void);
u8 GetFrontierBrainTrainerClass(void);
void CopyFrontierBrainTrainerName(u8 *dst);
diff --git a/include/global.h b/include/global.h
index c2b139e7a..3fb137425 100644
--- a/include/global.h
+++ b/include/global.h
@@ -424,7 +424,8 @@ struct BattleFrontier
/*0xD1C*/ u16 domeTotalChampionships[2][2];
/*0xD24*/ struct BattleDomeTrainer domeTrainers[DOME_TOURNAMENT_TRAINERS_COUNT];
/*0xD64*/ u16 domeMonIds[DOME_TOURNAMENT_TRAINERS_COUNT][3];
- /*0xD64*/ u16 field_DC4[2];
+ /*0xDC4*/ u16 field_DC4;
+ /*0xDC6*/ u16 field_DC6;
/*0xDC8*/ u16 palaceWinStreaks[2][2];
/*0xDD0*/ u16 palaceRecordWinStreaks[2][2];
/*0xDD8*/ u16 field_DD8;
@@ -438,7 +439,10 @@ struct BattleFrontier
/*0xE04*/ u16 pikeWinStreaks[2];
/*0xE08*/ u16 pikeRecordStreaks[2];
/*0xE0C*/ u16 pikeTotalStreaks[2];
- /*0xE10*/ u16 field_E10[5];
+ /*0xE10*/ u8 field_E10_1:3;
+ /*0xE10*/ u8 field_E10_2:4;
+ /*0xE10*/ u8 field_E10_3:1;
+ /*0xE12*/ u16 field_E12[4];
/*0xE1A*/ u16 pyramidWinStreaks[2];
/*0xE1E*/ u16 pyramidRecordStreaks[2];
/*0xE1E*/ u16 field_E1F[5];
diff --git a/include/pokemon.h b/include/pokemon.h
index 0155f7430..7cf043ba3 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -486,7 +486,7 @@ void CreateMonWithEVSpread(struct Pokemon *mon, u16 species, u8 level, u8 fixedI
void sub_806819C(struct Pokemon *mon, struct UnknownPokemonStruct *src);
void sub_8068338(struct Pokemon *mon, struct UnknownPokemonStruct *src, bool8 lvl50);
void CreateApprenticeMon(struct Pokemon *mon, const struct Apprentice *src, u8 monId);
-void CreateMonWithEVSpreadPersonalityOTID(struct Pokemon *mon, u16 species, u8 level, u8 nature, u8 fixedIV, u8 evSpread, u32 otId);
+void CreateMonWithEVSpreadNatureOTID(struct Pokemon *mon, u16 species, u8 level, u8 nature, u8 fixedIV, u8 evSpread, u32 otId);
void sub_80686FC(struct Pokemon *mon, struct UnknownPokemonStruct *dest);
void CreateObedientMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId);
bool8 sub_80688F8(u8 caseId, u8 battlerId);