diff options
author | Marcus Huderle <huderlem@gmail.com> | 2017-11-10 12:21:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-10 12:21:05 -0800 |
commit | 9ed1584bab5d2c0676261d6419834cd9d4f7dc3c (patch) | |
tree | b451de240205ca20b9ce52bccb33d0d67adef3d8 /src/battle/battle_ai.c | |
parent | 8832b766facd48c85c1b99ac6dad555f1e2aa1c7 (diff) | |
parent | 0343a1bcd728d813a38fc3486535e962e681c094 (diff) |
Merge pull request #454 from ProjectRevoTPP/ewram
ewram refactor
Diffstat (limited to 'src/battle/battle_ai.c')
-rw-r--r-- | src/battle/battle_ai.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/battle/battle_ai.c b/src/battle/battle_ai.c index 9c6d2bec4..5145d4980 100644 --- a/src/battle/battle_ai.c +++ b/src/battle/battle_ai.c @@ -11,6 +11,7 @@ #include "rom_8077ABC.h" #include "species.h" #include "util.h" +#include "ewram.h" extern u16 gBattleTypeFlags; extern u16 gBattleWeather; @@ -952,8 +953,8 @@ static void BattleAICmd_is_most_powerful_move(void) && sDiscouragedPowerfulMoveEffects[i] == 0xFFFF) { gDynamicBasePower = 0; - ewram[0x1601C] = 0; // why is this a manual array? - ewram[0x1601F] = 1; + eDynamicMoveType = 0; + eDmgMultiplier = 1; gBattleMoveFlags = 0; gCritMultiplier = 1; @@ -1998,8 +1999,7 @@ static void BattleAICmd_get_used_item(void) else index = gBankTarget; - // this hack and a half matches. whatever. i dont care. someone else fix this mess later. PS: still cant fix this. - AI_THINKING_STRUCT->funcResult = ewram[MULTI_DIM_ARR(index, B_16, 0x160CC)]; + AI_THINKING_STRUCT->funcResult = AI_ARRAY_160CC(index); gAIScriptPtr += 2; } |