summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2018-04-06 18:18:35 -0700
committerGitHub <noreply@github.com>2018-04-06 18:18:35 -0700
commitbe66a5cfefe578a0efb42d47fe8ed1a08e7fe30a (patch)
tree137e905d499c0b3cabae75db88df52233604adc0 /include
parent18a6fb5c3fcdc852a8ee805ba02b2807938e1de8 (diff)
parent3571cb1d142090b59a9161a6bada11f0caf53b8c (diff)
Merge pull request #590 from huderlem/battle_9
Decompile battle_9
Diffstat (limited to 'include')
-rw-r--r--include/battle.h104
-rwxr-xr-xinclude/battle_ai_switch_items.h6
-rw-r--r--include/constants/battle_constants.h73
-rw-r--r--include/ewram.h38
-rw-r--r--include/macros/battle_script.inc2
-rw-r--r--include/pokemon.h5
-rw-r--r--include/rom_8077ABC.h26
7 files changed, 152 insertions, 102 deletions
diff --git a/include/battle.h b/include/battle.h
index 6a5a97e90..af0b48013 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -4,29 +4,43 @@
#include "sprite.h"
#include "constants/battle_constants.h"
-/*
- Banks are a name given to what could be called a 'battlerId' or 'monControllerId'.
- Each bank has a value consisting of two bits.
- 0x1 bit is responsible for the side, 0 = player's side, 1 = opponent's side.
- 0x2 bit is responsible for the id of sent out pokemon. 0 means it's the first sent out pokemon, 1 it's the second one. (Triple battle didn't exist at the time yet.)
-*/
-
-#define BATTLE_BANKS_COUNT 4
-
-#define IDENTITY_PLAYER_MON1 0
-#define IDENTITY_OPPONENT_MON1 1
-#define IDENTITY_PLAYER_MON2 2
-#define IDENTITY_OPPONENT_MON2 3
-
-#define SIDE_PLAYER 0x0
-#define SIDE_OPPONENT 0x1
-
-#define BIT_SIDE 0x1
-#define BIT_MON 0x2
-
-#define GET_BANK_IDENTITY(bank)((gBanksByIdentity[bank]))
-#define GET_BANK_SIDE(bank)((GetBankIdentity(bank) & BIT_SIDE))
-#define GET_BANK_SIDE2(bank)((GET_BANK_IDENTITY(bank) & BIT_SIDE))
+#define GET_BATTLER_POSITION(bank)((gBattlerPositions[bank]))
+#define GET_BATTLER_SIDE(bank)((GetBattlerPosition(bank) & BIT_SIDE))
+#define GET_BATTLER_SIDE2(bank)((GET_BATTLER_POSITION(bank) & BIT_SIDE))
+
+// Battle Actions
+// These determine what each battler will do in a turn
+#define B_ACTION_USE_MOVE 0
+#define B_ACTION_USE_ITEM 1
+#define B_ACTION_SWITCH 2
+#define B_ACTION_RUN 3
+#define B_ACTION_SAFARI_WATCH_CAREFULLY 4
+#define B_ACTION_SAFARI_BALL 5
+#define B_ACTION_SAFARI_POKEBLOCK 6
+#define B_ACTION_SAFARI_GO_NEAR 7
+#define B_ACTION_SAFARI_RUN 8
+// The exact purposes of these are unclear
+#define B_ACTION_UNKNOWN9 9
+#define B_ACTION_EXEC_SCRIPT 10 // when executing an action
+#define B_ACTION_CANCEL_PARTNER 12 // when choosing an action
+#define B_ACTION_FINISHED 12 // when executing an action
+#define B_ACTION_NOTHING_FAINTED 13 // when choosing an action
+#define B_ACTION_NONE 0xFF
+
+// defines for the u8 array gTypeEffectiveness
+#define TYPE_EFFECT_ATK_TYPE(i)((gTypeEffectiveness[i + 0]))
+#define TYPE_EFFECT_DEF_TYPE(i)((gTypeEffectiveness[i + 1]))
+#define TYPE_EFFECT_MULTIPLIER(i)((gTypeEffectiveness[i + 2]))
+
+// defines for the gTypeEffectiveness multipliers
+#define TYPE_MUL_NO_EFFECT 0
+#define TYPE_MUL_NOT_EFFECTIVE 5
+#define TYPE_MUL_NORMAL 10
+#define TYPE_MUL_SUPER_EFFECTIVE 20
+
+// special type table Ids
+#define TYPE_FORESIGHT 0xFE
+#define TYPE_ENDTABLE 0xFF
enum
{
@@ -56,13 +70,13 @@ struct Trainer
/*0x24*/ const void *party;
};
-struct UnkBattleStruct1 // AI_Opponent_Info?
+struct BattleHistory
{
- /*0x00*/ u16 movesUsed[2][8]; // 0xFFFF means move not used (confuse self hit, etc)
- /*0x20*/ u8 unk20[2];
- /*0x22*/ u8 unk22[2];
- /*0x24*/ u16 items[4];
- /*0x2C*/ u8 numOfItems;
+ /*0x00*/ u16 usedMoves[2][8]; // 0xFFFF means move not used (confuse self hit, etc)
+ /*0x20*/ u8 abilities[MAX_BATTLERS_COUNT / 2];
+ /*0x22*/ u8 itemEffects[MAX_BATTLERS_COUNT / 2];
+ /*0x24*/ u16 trainerItems[MAX_BATTLERS_COUNT];
+ /*0x2C*/ u8 numItems;
};
struct AI_Stack
@@ -179,7 +193,7 @@ struct BattleStruct /* 0x2000000 */
/*0x1605F*/ u8 sentInPokes;
/*0x16060*/ u8 unk16060[4];
/*0x16064*/ u8 unk16064[4];
- /*0x16068*/ u8 unk16068[4];
+ /*0x16068*/ u8 monToSwitchIntoId[MAX_BATTLERS_COUNT];
/*0x1606C*/ u8 unk1606C[4][3];
/*0x16078*/ u8 unk16078;
/*0x16079*/ u8 caughtNick[11];
@@ -242,8 +256,7 @@ struct BattleStruct /* 0x2000000 */
/*0x160C5*/ u8 unk160C5;
/*0x160C6*/ u8 unk160C6;
/*0x160C7*/ u8 unk160C7;
- /*0x160C8*/ u8 unk160C8;
- /*0x160C9*/ u8 unk160C9;
+ /*0x160C8*/ u8 AI_monToSwitchIntoId[2];
/*0x160CA*/ u8 synchroniseEffect;
/*0x160CB*/ u8 linkPlayerIndex;
/*0x160CC*/ u16 usedHeldItems[4];
@@ -323,7 +336,7 @@ struct BattleStruct /* 0x2000000 */
/*0x1611F*/ u8 unk1611F;
//u8 filler2[0x72E];
- /* 0x16A00 */ struct UnkBattleStruct1 unk_2016A00_2;
+ /* 0x16A00 */ struct BattleHistory unk_2016A00_2;
};
struct StatsArray
@@ -352,8 +365,8 @@ struct DisableStruct
/*0x0D*/ u8 unkD;
/*0x0E*/ u8 encoreTimer1 : 4;
/*0x0E*/ u8 encoreTimer2 : 4;
- /*0x0F*/ u8 perishSong1 : 4;
- /*0x0F*/ u8 perishSong2 : 4;
+ /*0x0F*/ u8 perishSongTimer1 : 4;
+ /*0x0F*/ u8 perishSongTimer2 : 4;
/*0x10*/ u8 furyCutterCounter;
/*0x11*/ u8 rolloutTimer1 : 4;
/*0x11*/ u8 rolloutTimer2 : 4;
@@ -520,21 +533,21 @@ struct sideTimer
struct WishFutureKnock
{
- u8 futureSightCounter[MAX_BANKS_BATTLE];
- u8 futureSightAttacker[MAX_BANKS_BATTLE];
- s32 futureSightDmg[MAX_BANKS_BATTLE];
- u16 futureSightMove[MAX_BANKS_BATTLE];
- u8 wishCounter[MAX_BANKS_BATTLE];
- u8 wishUserID[MAX_BANKS_BATTLE];
+ u8 futureSightCounter[MAX_BATTLERS_COUNT];
+ u8 futureSightAttacker[MAX_BATTLERS_COUNT];
+ s32 futureSightDmg[MAX_BATTLERS_COUNT];
+ u16 futureSightMove[MAX_BATTLERS_COUNT];
+ u8 wishCounter[MAX_BATTLERS_COUNT];
+ u8 wishUserID[MAX_BATTLERS_COUNT];
u8 weatherDuration;
u8 knockedOffPokes[2];
};
-extern struct UnkBattleStruct1 unk_2016A00;
-extern struct DisableStruct gDisableStructs[MAX_BANKS_BATTLE];
+extern struct BattleHistory unk_2016A00;
+extern struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT];
extern struct BattleResults gBattleResults;
-extern struct ProtectStruct gProtectStructs[MAX_BANKS_BATTLE];
-extern struct SpecialStatus gSpecialStatuses[MAX_BANKS_BATTLE];
+extern struct ProtectStruct gProtectStructs[MAX_BATTLERS_COUNT];
+extern struct SpecialStatus gSpecialStatuses[MAX_BATTLERS_COUNT];
extern struct sideTimer gSideTimers[2];
extern struct WishFutureKnock gWishFutureKnock;
extern struct AI_ThinkingStruct gAIThinkingSpace;
@@ -803,7 +816,6 @@ void sub_8032AA8(u8, u8);
void SetBankFuncToOpponentBufferRunCommand(void);
void BattleStopLowHpSound(void);
-// asm/battle_9.o
void SetBankFuncToLinkOpponentBufferRunCommand(void);
#endif // GUARD_BATTLE_H
diff --git a/include/battle_ai_switch_items.h b/include/battle_ai_switch_items.h
new file mode 100755
index 000000000..648cfad74
--- /dev/null
+++ b/include/battle_ai_switch_items.h
@@ -0,0 +1,6 @@
+#ifndef GUARD_BATTLE_AI_SWITCH_ITEMS_H
+#define GUARD_BATTLE_AI_SWITCH_ITEMS_H
+
+u8 GetMostSuitableMonToSwitchInto(void);
+
+#endif
diff --git a/include/constants/battle_constants.h b/include/constants/battle_constants.h
index 49768f33e..65f44d8aa 100644
--- a/include/constants/battle_constants.h
+++ b/include/constants/battle_constants.h
@@ -1,12 +1,47 @@
#ifndef GUARD_CONSTANTS_BATTLE_CONSTANTS_H
#define GUARD_CONSTANTS_BATTLE_CONSTANTS_H
-// Bank sides
-#define SIDE_PLAYER 0x0
-#define SIDE_OPPONENT 0x1
-
-#define BIT_SIDE 0x1
-#define BIT_MON 0x2
+/*
+ * A battler may be in one of four positions on the field. The first bit determines
+ * what side the battler is on, either the player's side or the opponent's side.
+ * The second bit determines what flank the battler is on, either the left or right.
+ * Note that the opponent's flanks are drawn corresponding to their perspective, so
+ * their right mon appears on the left, and their left mon appears on the right.
+ * The battler ID is usually the same as the position, except in the case of link battles.
+ *
+ * + ------------------------- +
+ * | Opponent's side |
+ * | Right Left |
+ * | 3 1 |
+ * | |
+ * | Player's side |
+ * | Left Right |
+ * | 0 2 |
+ * ----------------------------+
+ * | |
+ * | |
+ * +---------------------------+
+ */
+
+#define MAX_BATTLERS_COUNT 4
+
+#define B_POSITION_PLAYER_LEFT 0
+#define B_POSITION_OPPONENT_LEFT 1
+#define B_POSITION_PLAYER_RIGHT 2
+#define B_POSITION_OPPONENT_RIGHT 3
+
+// These macros can be used with either battler ID or positions to get the partner or the opposite mon
+#define BATTLE_OPPOSITE(id) ((id) ^ 1)
+#define BATTLE_PARTNER(id) ((id) ^ 2)
+
+#define B_SIDE_PLAYER 0
+#define B_SIDE_OPPONENT 1
+
+#define B_FLANK_LEFT 0
+#define B_FLANK_RIGHT 1
+
+#define BIT_SIDE 1
+#define BIT_FLANK 2
#define STATUS_SLEEP 0x7
#define STATUS_POISON 0x8
@@ -88,19 +123,16 @@
#define HITMARKER_FAINTED(bank) ((gBitTable[bank] << 0x1C))
#define HITMARKER_UNK(bank) ((0x10000000 << bank))
-#define MOVESTATUS_MISSED (1 << 0)
-#define MOVESTATUS_SUPEREFFECTIVE (1 << 1)
-#define MOVESTATUS_NOTVERYEFFECTIVE (1 << 2)
-#define MOVESTATUS_NOTAFFECTED (1 << 3)
-#define MOVESTATUS_ONEHITKO (1 << 4)
-#define MOVESTATUS_FAILED (1 << 5)
-#define MOVESTATUS_ENDURED (1 << 6)
-#define MOVESTATUS_HUNGON (1 << 7)
-
-#define IDENTITY_PLAYER_MON1 0
-#define IDENTITY_OPPONENT_MON1 1
-#define IDENTITY_PLAYER_MON2 2
-#define IDENTITY_OPPONENT_MON2 3
+// Flags describing move's result
+#define MOVE_RESULT_MISSED (1 << 0)
+#define MOVE_RESULT_SUPER_EFFECTIVE (1 << 1)
+#define MOVE_RESULT_NOT_VERY_EFFECTIVE (1 << 2)
+#define MOVE_RESULT_DOESNT_AFFECT_FOE (1 << 3)
+#define MOVE_RESULT_ONE_HIT_KO (1 << 4)
+#define MOVE_RESULT_FAILED (1 << 5)
+#define MOVE_RESULT_FOE_ENDURED (1 << 6)
+#define MOVE_RESULT_FOE_HUNG_ON (1 << 7)
+#define MOVE_RESULT_NO_EFFECT (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED)
#define BATTLE_TYPE_DOUBLE 0x0001
#define BATTLE_TYPE_LINK 0x0002
@@ -206,11 +238,8 @@
#define WEATHER_HAS_EFFECT ((!AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_AIR_LOCK, 0, 0)))
-#define MOVESTATUS_NOEFFECT ((MOVESTATUS_MISSED | MOVESTATUS_NOTAFFECTED | MOVESTATUS_FAILED))
-
#define MAX_TRAINER_ITEMS 4
#define MAX_MON_MOVES 4
-#define MAX_BANKS_BATTLE 4
#define WEATHER_RAIN_TEMPORARY (1 << 0)
#define WEATHER_RAIN_DOWNPOUR (1 << 1)
diff --git a/include/ewram.h b/include/ewram.h
index f1d9baa78..6b164648b 100644
--- a/include/ewram.h
+++ b/include/ewram.h
@@ -98,13 +98,13 @@ extern u8 gSharedMem[];
#define ewram16001 (gSharedMem[0x16001])
#define ewram16002 (gSharedMem[0x16002])
#define ewram16003 (gSharedMem[0x16003])
-#define ewram16004arr(i, bank) (gSharedMem[0x16004 + i + bank * 2])
+#define ewram16004arr(i, battler) (gSharedMem[0x16004 + i + battler * 2])
#define ewram1600C (gSharedMem[0x1600C])
#define ewram1600E (gSharedMem[0x1600E])
-#define ewram16010arr(bank) (gSharedMem[0x16010 + bank])
+#define ewram16010arr(battler) (gSharedMem[0x16010 + battler])
#define ewram1601B (gSharedMem[0x1601B])
#define eDynamicMoveType (gSharedMem[0x1601C])
-#define eFocusPunchBank (gSharedMem[0x1601D])
+#define eFocusPunchBattler (gSharedMem[0x1601D])
#define eDmgMultiplier (gSharedMem[0x1601F])
#define ewram16020 ((u8 *)(gSharedMem + 0x16020))
#define ewram16020arr(i) (gSharedMem[0x16020 + i])
@@ -112,10 +112,10 @@ extern u8 gSharedMem[];
#define ewram16056 (gSharedMem[0x16056])
#define ewram16058 (gSharedMem[0x16058])
#define ewram16059 (gSharedMem[0x16059])
-#define ewram16060(bank) (gSharedMem[0x16060 + bank])
-#define BATTLE_PARTY_ID(bank) (gSharedMem[0x16064 + bank])
+#define ewram16060(battler) (gSharedMem[0x16060 + battler])
+#define BATTLE_PARTY_ID(battler) (gSharedMem[0x16064 + battler])
#define ewram16064 (&gSharedMem[0x16064])
-#define ewram16064arr(bank) (gSharedMem[0x16064 + bank])
+#define ewram16064arr(battler) (gSharedMem[0x16064 + battler])
#define ewram16068arr(i) (gSharedMem[0x16068 + i])
#define UNK_201606C_ARRAY (gSharedMem + 0x1606C) // lazy define but whatever.
#define ewram1606Carr(i, a) (gSharedMem[0x1606C + i + a * 3])
@@ -132,7 +132,7 @@ extern u8 gSharedMem[];
#define ewram1608A gSharedMem[0x1608A]
#define ewram1608B gSharedMem[0x1608B]
-#define ewram1608Carr(bank) (gSharedMem[0x1608C + bank])
+#define ewram1608Carr(battler) (gSharedMem[0x1608C + battler])
#define EWRAM_1609D (gSharedMem[0x1609D])
#define ewram160A1 (gSharedMem[0x160A1])
#define ewram160A4 (gSharedMem[0x160A4])
@@ -144,31 +144,31 @@ extern u8 gSharedMem[];
#define ewram160AB (gSharedMem[0x160AB])
#define ewram160AC ((u8 *)(gSharedMem + 0x160AC))
#define ewram160ACarr(i) (gSharedMem[0x160AC + i])
-#define ewram160ACarr2(i, bank) (gSharedMem[0x160AC + i + bank * 2])
+#define ewram160ACarr2(i, battler) (gSharedMem[0x160AC + i + battler * 2])
#define ewram160BC ((u16 *)(gSharedMem + 0x160BC)) // hp
-#define ewram160BCarr(bank) (gSharedMem[0x160BC + bank * 2])
+#define ewram160BCarr(battler) (gSharedMem[0x160BC + battler * 2])
#define ewram160C0 (gSharedMem[0x160C0])
#define ewram160C2_Flags ((u16 *)(gSharedMem + 0x160C2))
#define ewram160C4_Callback ((MainCallback *)(gSharedMem + 0x160C4))
#define ewram160C8 (gSharedMem[0x160C8])
-#define ewram160C8arr(bank) (gSharedMem[0x160C8 + (bank / 2)])
+#define ewram160C8arr(battler) (gSharedMem[0x160C8 + (battler / 2)])
#define ewram160C9 (gSharedMem[0x160C9])
#define ewram160CB (gSharedMem[0x160CB])
#define ewram160CC ((u8 *)(gSharedMem + 0x160CC))
#define ewram160CCarr(i) (gSharedMem[0x160CC + i])
-#define USED_HELD_ITEM(bank) ((((u16*)(&gSharedMem[0x160CC + bank * 2]))))
-#define USED_HELD_ITEMS(bank) (*(u16 *)&gSharedMem[0x160CC + 2 * (bank)])
-#define ewram160D4(bank) (gSharedMem[0x160D4 + (bank / 2) * 2])
-#define ewram160D8(bank) (gSharedMem[0x160D8 + (bank / 2)])
-#define ewram160DA(bank) (gSharedMem[0x160DA + (bank / 2)])
+#define USED_HELD_ITEM(battler) ((((u16*)(&gSharedMem[0x160CC + battler * 2]))))
+#define USED_HELD_ITEMS(battler) (*(u16 *)&gSharedMem[0x160CC + 2 * (battler)])
+#define ewram160D4(battler) (gSharedMem[0x160D4 + (battler / 2) * 2])
+#define ewram160D8(battler) (gSharedMem[0x160D8 + (battler / 2)])
+#define ewram160DA(battler) (gSharedMem[0x160DA + (battler / 2)])
#define ewram160DD (gSharedMem[0x160DD])
#define ewram160E0(i) (gSharedMem[0x160E0 + i])
#define ewram160E6 (gSharedMem[0x160E6])
#define ewram160E7 (gSharedMem[0x160E7])
-#define CHOICED_MOVE(bank) (((u16*)(&gSharedMem[0x160E8 + bank * 2])))
+#define CHOICED_MOVE(battler) (((u16*)(&gSharedMem[0x160E8 + battler * 2])))
#define ewram160E8 ((u8 *)(gSharedMem + 0x160E8))
#define ewram160E8arr(i) (gSharedMem[0x160E8 + i])
-#define ewram160E8arr2(i, bank) (gSharedMem[0x160E8 + i + bank * 2])
+#define ewram160E8arr2(i, battler) (gSharedMem[0x160E8 + i + battler * 2])
#define ewram160F0 ((u8 *)(gSharedMem + 0x160F0))
#define ewram160F0arr(i) (gSharedMem[0x160F0 + i])
#define ewram160F8 (gSharedMem[0x160F8])
@@ -177,7 +177,7 @@ extern u8 gSharedMem[];
#define ewram160FB (gSharedMem[0x160FB])
#define ewram16100 ((u8 *)(gSharedMem + 0x16100))
#define ewram16100arr(i) (gSharedMem[0x16100 + i])
-#define ewram16100arr2(i, bank) (gSharedMem[0x16100 + i + bank * 4])
+#define ewram16100arr2(i, battler) (gSharedMem[0x16100 + i + battler * 4])
#define ewram16108 ((u8 *)(gSharedMem + 0x16108))
#define ewram16108arr(i) (gSharedMem[0x16108 + i])
#define ewram16110 (gSharedMem[0x16110])
@@ -186,7 +186,7 @@ extern u8 gSharedMem[];
#define ewram16113 (gSharedMem[0x16113])
#define ewram16400 (gSharedMem + 0x16400)
#define AI_THINKING_STRUCT ((struct AI_ThinkingStruct *)(gSharedMem + 0x16800))
-#define UNK_2016A00_STRUCT ((struct UnkBattleStruct1 *) (gSharedMem + 0x16A00))
+#define AI_BATTLE_HISTORY ((struct BattleHistory *) (gSharedMem + 0x16A00))
#define AI_STACK ((struct AI_Stack *) (gSharedMem + 0x16C00))
#define AI_ARRAY_160CC(i) (gSharedMem[0x160CC + i * 2])
#define ewram16800 (&gSharedMem[0x16800])
diff --git a/include/macros/battle_script.inc b/include/macros/battle_script.inc
index e4fa0c454..d92e28934 100644
--- a/include/macros/battle_script.inc
+++ b/include/macros/battle_script.inc
@@ -1402,7 +1402,7 @@
.endm
.macro jumpifmovehadnoeffect jumpptr
- jumpifbyte COMMON_BITS, gBattleMoveFlags, MOVESTATUS_MISSED | MOVESTATUS_NOTAFFECTED | MOVESTATUS_FAILED, \jumpptr
+ jumpifbyte COMMON_BITS, gMoveResultFlags, MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED, \jumpptr
.endm
.macro jumpifbattletype flags, jumpptr
diff --git a/include/pokemon.h b/include/pokemon.h
index 842833542..8864aee8a 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -312,6 +312,8 @@ struct UnknownPokemonStruct
/*0x2B*/u8 friendship;
};
+#define BATTLE_STATS_NO 8
+
struct BattlePokemon
{
/*0x00*/ u16 species;
@@ -329,7 +331,7 @@ struct BattlePokemon
/*0x17*/ u32 spDefenseIV:5;
/*0x17*/ u32 isEgg:1;
/*0x17*/ u32 altAbility:1;
- /*0x18*/ s8 statStages[8];
+ /*0x18*/ s8 statStages[BATTLE_STATS_NO];
/*0x20*/ u8 ability;
/*0x21*/ u8 type1;
/*0x22*/ u8 type2;
@@ -630,6 +632,7 @@ struct Sprite *sub_80F7920(u16, u16, const u16 *);
void BoxMonRestorePP(struct BoxPokemon *);
bool8 HealStatusConditions(struct Pokemon *mon, u32 unused, u32 healMask, u8 battleId);
+u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit);
#if DEBUG
void Nakamura_NakaGenderTest_RecalcStats(struct Pokemon *);
diff --git a/include/rom_8077ABC.h b/include/rom_8077ABC.h
index 1910b7cb2..7215e7fb3 100644
--- a/include/rom_8077ABC.h
+++ b/include/rom_8077ABC.h
@@ -10,24 +10,24 @@ struct Struct_sub_8078914 {
u8 field_8;
};
-u8 GetBankPosition(u8, u8);
+u8 GetBattlerSpriteCoord(u8, u8);
u8 sub_8077E44(u8 slot, u16 species, u8 a3);
-u8 GetAnimBankSpriteId(u8 bank);
+u8 GetAnimBattlerSpriteId(u8 bank);
void StoreSpriteCallbackInData(struct Sprite *sprite, void(*callback)(struct Sprite *));
void sub_8078314(struct Sprite *sprite);
void TranslateSpriteOverDuration(struct Sprite *sprite);
void TranslateMonBGUntil(struct Sprite *sprite);
void TranslateMonBGSubPixelUntil(struct Sprite *sprite);
-u8 GetBankSide(u8);
-u8 GetBankSide(u8);
-u8 GetBankSide(u8 side);
-u8 GetBankSide(u8 slot);
-u8 GetBankSide(u8);
-u8 GetBankIdentity(u8);
-u8 GetBankIdentity(u8 slot);
-u8 GetBankByIdentity(u8);
-u8 GetBankByIdentity(u8);
-u8 GetBankByIdentity(u8 state);
+u8 GetBattlerSide(u8);
+u8 GetBattlerSide(u8);
+u8 GetBattlerSide(u8 side);
+u8 GetBattlerSide(u8 slot);
+u8 GetBattlerSide(u8);
+u8 GetBattlerPosition(u8);
+u8 GetBattlerPosition(u8 slot);
+u8 GetBattlerAtPosition(u8);
+u8 GetBattlerAtPosition(u8);
+u8 GetBattlerAtPosition(u8 state);
bool8 IsBankSpritePresent(u8);
bool8 IsDoubleBattle();
u8 IsDoubleBattle(void);
@@ -58,7 +58,7 @@ void sub_8079C08(struct Task *task, u8 a2, s16 a3, s16 a4, s16 a5, s16 a6, u16 a
u8 sub_8079C74(struct Task *task);
void sub_8079E24();
u8 sub_8079E90(u8 slot);
-u8 GetBankIdentity_permutated(u8 slot);
+u8 GetBattlerPosition_permutated(u8 slot);
void sub_807A784(u8 taskId);
void sub_807A850(struct Task *task, u8 taskId);
void sub_807A8D4(struct Sprite *sprite);