diff options
author | Cameron Hall <camthesaxman@users.noreply.github.com> | 2018-01-15 21:39:07 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-15 21:39:07 -0600 |
commit | e1fd501e16deefe643c4572efaa07a59372616e4 (patch) | |
tree | 9993a2ad6e2c7609763f5649d5417aa4f784b9a3 /src/battle/battle_ai.c | |
parent | ed152b1566fa5c39ee72ca190c49fbfe30708036 (diff) | |
parent | 15cffaecf34d93c99aa635586ad24fa9978a70a0 (diff) |
Merge pull request #540 from camthesaxman/emerald_port
port some fixed battle code from pokeemerald
Diffstat (limited to 'src/battle/battle_ai.c')
-rw-r--r-- | src/battle/battle_ai.c | 18 |
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); |