summaryrefslogtreecommitdiff
path: root/src/battle/battle_ai.c
diff options
context:
space:
mode:
authorcamthesaxman <cameronghall@cox.net>2018-01-15 20:41:55 -0600
committercamthesaxman <cameronghall@cox.net>2018-01-15 20:41:55 -0600
commit5d923c4d5f3d0786715663b3ad83bc9f3e778164 (patch)
tree99e35c489871918c95493c74ae753a9e3eb60357 /src/battle/battle_ai.c
parented152b1566fa5c39ee72ca190c49fbfe30708036 (diff)
import some battle_4.c code from emerald and get atk23_getexp matching
Diffstat (limited to 'src/battle/battle_ai.c')
-rw-r--r--src/battle/battle_ai.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/battle/battle_ai.c b/src/battle/battle_ai.c
index 80848d2fd..2ac9df2b9 100644
--- a/src/battle/battle_ai.c
+++ b/src/battle/battle_ai.c
@@ -1422,8 +1422,8 @@ static void BattleAICmd_get_highest_possible_damage(void)
s32 i;
gDynamicBasePower = 0;
- BATTLE_STRUCT->dynamicMoveType = 0;
- BATTLE_STRUCT->dmgMultiplier = 1;
+ gBattleStruct->dynamicMoveType = 0;
+ gBattleStruct->dmgMultiplier = 1;
gBattleMoveFlags = 0;
gCritMultiplier = 1;
AI_THINKING_STRUCT->funcResult = 0;
@@ -1462,8 +1462,8 @@ static void BattleAICmd_if_damage_bonus(void)
u8 damageVar;
gDynamicBasePower = 0;
- BATTLE_STRUCT->dynamicMoveType = 0;
- BATTLE_STRUCT->dmgMultiplier = 1;
+ gBattleStruct->dynamicMoveType = 0;
+ gBattleStruct->dmgMultiplier = 1;
gBattleMoveFlags = 0;
gCritMultiplier = 1;
@@ -1669,8 +1669,8 @@ static void BattleAICmd_if_can_faint(void)
}
gDynamicBasePower = 0;
- BATTLE_STRUCT->dynamicMoveType = 0;
- BATTLE_STRUCT->dmgMultiplier = 1;
+ gBattleStruct->dynamicMoveType = 0;
+ gBattleStruct->dmgMultiplier = 1;
gBattleMoveFlags = 0;
gCritMultiplier = 1;
gCurrentMove = AI_THINKING_STRUCT->moveConsidered;
@@ -1698,8 +1698,8 @@ static void BattleAICmd_if_cant_faint(void)
}
gDynamicBasePower = 0;
- BATTLE_STRUCT->dynamicMoveType = 0;
- BATTLE_STRUCT->dmgMultiplier = 1;
+ gBattleStruct->dynamicMoveType = 0;
+ gBattleStruct->dmgMultiplier = 1;
gBattleMoveFlags = 0;
gCritMultiplier = 1;
gCurrentMove = AI_THINKING_STRUCT->moveConsidered;
@@ -1907,7 +1907,7 @@ static void BattleAICmd_flee(void)
static void BattleAICmd_if_random_100(void)
{
- u8 safariFleeRate = BATTLE_STRUCT->safariFleeRate * 5; // safari flee rate, from 0-20
+ u8 safariFleeRate = gBattleStruct->safariFleeRate * 5; // safari flee rate, from 0-20
if ((u8)(Random() % 100) < safariFleeRate)
gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);