summaryrefslogtreecommitdiff
path: root/src/battle_script_commands.c
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2021-07-01 17:54:51 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2021-07-01 17:54:51 -0400
commit4c2dce093c40de73cc9efa6325f9603aebedf2ab (patch)
tree57bd770b8b0ce253e5cbb09c49f59cea0fce2d09 /src/battle_script_commands.c
parentd7018c11494561eecd94c93b98a7980a063d7bf8 (diff)
Unify ChooseMoveStruct; name BattleStruct fields
Diffstat (limited to 'src/battle_script_commands.c')
-rw-r--r--src/battle_script_commands.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c
index 254de3eb3..f1c1726a1 100644
--- a/src/battle_script_commands.c
+++ b/src/battle_script_commands.c
@@ -292,8 +292,6 @@ extern u8 BattleScript_GrudgeTakesPp[];
#define RecordAbilitySetField6(ability, fieldValue) \
(gLastUsedAbility = ability, gBattleCommunication[6] = fieldValue, RecordAbilityBattle(gBattlerTarget, ability))
-#define HP_ON_SWITCHOUT (((u16*)(ewram_addr + 0x160BC)))
-
static void atk00_attackcanceler(void);
static void atk01_accuracycheck(void);
static void atk02_attackstring(void);
@@ -6017,7 +6015,7 @@ static void atk43_jumpifabilitypresent(void)
static void atk44_endselectionscript(void)
{
- gSharedMem[BSTRUCT_OFF(unk16060) + gBattlerAttacker] = 1;
+ gSharedMem[BSTRUCT_OFF(selectionScriptFinished) + gBattlerAttacker] = 1;
}
static void atk45_playanimation(void)
@@ -11524,10 +11522,10 @@ static void atkA5_painsplitdmgcalc(void)
s32 hp_diff = (gBattleMons[gBattlerAttacker].hp + gBattleMons[gBattlerTarget].hp) / 2;
s32 to_store = gBattleMoveDamage = gBattleMons[gBattlerTarget].hp - hp_diff;
- gSharedMem[BSTRUCT_OFF(unk16014) + 0] = sBYTE0_32(to_store);
- gSharedMem[BSTRUCT_OFF(unk16014) + 1] = sBYTE1_32(to_store);
- gSharedMem[BSTRUCT_OFF(unk16014) + 2] = sBYTE2_32(to_store);
- gSharedMem[BSTRUCT_OFF(unk16014) + 3] = sBYTE3_32(to_store);
+ gSharedMem[BSTRUCT_OFF(painSplitHP) + 0] = sBYTE0_32(to_store);
+ gSharedMem[BSTRUCT_OFF(painSplitHP) + 1] = sBYTE1_32(to_store);
+ gSharedMem[BSTRUCT_OFF(painSplitHP) + 2] = sBYTE2_32(to_store);
+ gSharedMem[BSTRUCT_OFF(painSplitHP) + 3] = sBYTE3_32(to_store);
gBattleMoveDamage = gBattleMons[gBattlerAttacker].hp - hp_diff;
gSpecialStatuses[gBattlerTarget].dmg = 0xFFFF;