summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/battle_ai_script_commands.c2
-rw-r--r--src/battle_interface.c4
-rw-r--r--src/battle_main.c4
-rw-r--r--src/battle_script_commands.c6
4 files changed, 8 insertions, 8 deletions
diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c
index 9f0cc406d..0d1a4c351 100644
--- a/src/battle_ai_script_commands.c
+++ b/src/battle_ai_script_commands.c
@@ -1758,7 +1758,7 @@ static void BattleAICmd_get_used_item(void)
else
index = gBattlerTarget;
- AI_THINKING_STRUCT->funcResult = AI_ARRAY_160CC(index);
+ AI_THINKING_STRUCT->funcResult = gSharedMem[offsetof(struct BattleStruct, usedHeldItems) + 2 * index];
gAIScriptPtr += 2;
}
diff --git a/src/battle_interface.c b/src/battle_interface.c
index 3d17bedd8..7b27b3997 100644
--- a/src/battle_interface.c
+++ b/src/battle_interface.c
@@ -1121,8 +1121,8 @@ void sub_8044338(u8 a, struct Pokemon *pkmn)
}
//_08044486
r5 = gSprites[a].data[5];
- ConvertIntToDecimalStringN(str + 6, ewram16089, 1, 2);
- ConvertIntToDecimalStringN(str + 9, ewram16088, 1, 2);
+ ConvertIntToDecimalStringN(str + 6, gBattleStruct->safariCatchFactor, 1, 2);
+ ConvertIntToDecimalStringN(str + 9, gBattleStruct->safariFleeRate, 1, 2);
str[5] = 0;
str[8] = 0xBA;
sub_80034D4(eBattleInterfaceGfxBuffer, str);
diff --git a/src/battle_main.c b/src/battle_main.c
index e8978b01c..4988fe660 100644
--- a/src/battle_main.c
+++ b/src/battle_main.c
@@ -4338,7 +4338,7 @@ void sub_8012324(void)
}
break;
case B_ACTION_SWITCH:
- ewram16064arr(gActiveBattler) = gBattlerPartyIndexes[gActiveBattler];
+ BATTLE_PARTY_ID(gActiveBattler) = gBattlerPartyIndexes[gActiveBattler];
if (gBattleMons[gActiveBattler].status2 & (STATUS2_WRAPPED | STATUS2_ESCAPE_PREVENTION)
|| gStatuses3[gActiveBattler] & STATUS3_ROOTED)
{
@@ -5367,7 +5367,7 @@ void HandleAction_Switch(void)
gActionSelectionCursor[gBattlerAttacker] = 0;
gMoveSelectionCursor[gBattlerAttacker] = 0;
- PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gBattlerAttacker, ewram16064arr(gBattlerAttacker))
+ PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gBattlerAttacker, BATTLE_PARTY_ID(gBattlerAttacker))
gBattleStruct->scriptingActive = gBattlerAttacker;
gBattlescriptCurrInstr = BattleScript_ActionSwitch;
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c
index 270151d17..a41c7678e 100644
--- a/src/battle_script_commands.c
+++ b/src/battle_script_commands.c
@@ -10303,7 +10303,7 @@ static bool8 sub_80264C0(void)
{
if (gBattleMons[gBattlerAttacker].level >= gBattleMons[gBattlerTarget].level)
{
- ewram16064arr(gBattlerTarget) = gBattlerPartyIndexes[gBattlerTarget];
+ BATTLE_PARTY_ID(gBattlerTarget) = gBattlerPartyIndexes[gBattlerTarget];
}
else
{
@@ -10313,7 +10313,7 @@ static bool8 sub_80264C0(void)
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
return 0;
}
- ewram16064arr(gBattlerTarget) = gBattlerPartyIndexes[gBattlerTarget];
+ BATTLE_PARTY_ID(gBattlerTarget) = gBattlerPartyIndexes[gBattlerTarget];
}
gBattlescriptCurrInstr = BattleScript_SuccessForceOut;
return 1;
@@ -13122,7 +13122,7 @@ static void atkE2_switchoutabilities(void)
{
case ABILITY_NATURAL_CURE:
gBattleMons[gActiveBattler].status1 = 0;
- BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, gBitTable[ewram16064arr(gActiveBattler)], 4, &gBattleMons[gActiveBattler].status1);
+ BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, gBitTable[BATTLE_PARTY_ID(gActiveBattler)], 4, &gBattleMons[gActiveBattler].status1);
MarkBattlerForControllerExec(gActiveBattler);
break;
}