summaryrefslogtreecommitdiff
path: root/src/battle_script_commands.c
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2021-06-17 16:56:13 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2021-06-17 16:56:13 -0400
commitf5a444af5d4e7b33706bc051c3e932d3d75d8a24 (patch)
treea7a567d55a07f077903164a4d500c0fb0bb7bf0a /src/battle_script_commands.c
parent42650e1507008d0ad3a710e0b8ec27d8ad97bd26 (diff)
Replace simple ewram access with battle struct, 2
Diffstat (limited to 'src/battle_script_commands.c')
-rw-r--r--src/battle_script_commands.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c
index 2ac0c114f..c9c22ec6f 100644
--- a/src/battle_script_commands.c
+++ b/src/battle_script_commands.c
@@ -4991,7 +4991,7 @@ static void atk15_seteffectwithchance(void)
}
gBattleCommunication[MOVE_EFFECT_BYTE] = 0;
- gBattleStruct->unk16112 = 0;
+ gBattleStruct->multihitMoveEffect = 0;
}
static void atk16_seteffectprimary(void)
@@ -5015,7 +5015,7 @@ static void atk18_clearstatusfromeffect(void)
gBattleCommunication[MOVE_EFFECT_BYTE] = 0;
gBattlescriptCurrInstr += 2;
- gBattleStruct->unk16112 = 0;
+ gBattleStruct->multihitMoveEffect = 0;
}
static void atk19_tryfaintmon(void)
@@ -5057,8 +5057,8 @@ static void atk19_tryfaintmon(void)
if (!(gAbsentBattlerFlags & gBitTable[gActiveBattler])
&& gBattleMons[gActiveBattler].hp == 0)
{
- ewram160ACarr2(0, battlerId) = 0;
- ewram160ACarr2(1, battlerId) = 0;
+ eLastTakenMove_2d(0, battlerId) = 0;
+ eLastTakenMove_2d(1, battlerId) = 0;
ewram16100arr2(0, battlerId) = 0;
ewram16100arr2(1, battlerId) = 0;
ewram16100arr2(2, battlerId) = 0;
@@ -9574,7 +9574,7 @@ static void atk74_hpthresholds2(void)
{
gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
opposing_bank = gActiveBattler ^ 1;
- hp_switchout = ewram160BCarr(GetBattlerSide(opposing_bank)); //gBattleStruct->HP_OnSwitchout[GetBattlerSide(opposing_bank)];
+ hp_switchout = eHpOnSwitchout(GetBattlerSide(opposing_bank)); //gBattleStruct->HP_OnSwitchout[GetBattlerSide(opposing_bank)];
result = (hp_switchout - gBattleMons[opposing_bank].hp) * 100 / hp_switchout;
if (gBattleMons[opposing_bank].hp >= hp_switchout)
@@ -9788,7 +9788,7 @@ static void atk7B_tryhealhalfhealth(void)
static void atk7C_trymirrormove(void)
{
- u16 r7 = ewram160ACarr2(0, gBattlerAttacker) | (ewram160ACarr2(1, gBattlerAttacker) << 8);
+ u16 r7 = eLastTakenMove_2d(0, gBattlerAttacker) | (eLastTakenMove_2d(1, gBattlerAttacker) << 8);
u16 r6 = ewram16100arr2(0, gBattlerAttacker) | (ewram16100arr2(1, gBattlerAttacker) << 8);
u16 r5 = ewram16100arr2(2, gBattlerAttacker) | (ewram16100arr2(3, gBattlerAttacker) << 8);