diff options
author | GriffinR <griffin.richards@comcast.net> | 2019-09-26 15:02:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-26 15:02:38 -0400 |
commit | 1016b239186097361ea20f2f91adf3932026f40c (patch) | |
tree | 840a0f28046d3c66fcaf1c2bb8ab3228386a3a8a /src/battle_ai_script_commands.c | |
parent | bb236b490d99fef02ed172e7ca86f6c70ef09527 (diff) | |
parent | 208e1c968959c781562f0b94c03368385ce7012c (diff) |
Merge branch 'master' into rename-tablecmds
Diffstat (limited to 'src/battle_ai_script_commands.c')
-rw-r--r-- | src/battle_ai_script_commands.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index 6e438878b..c9a6a6606 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -298,7 +298,7 @@ void BattleAI_HandleItemUseBeforeAISetup(u8 defaultScoreMoves) ) ) { - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_TRAINER_ITEMS; i++) { if (gTrainers[gTrainerBattleOpponent_A].items[i] != 0) { @@ -397,8 +397,8 @@ u8 BattleAI_ChooseMoveOrAction(void) static u8 ChooseMoveOrAction_Singles(void) { - u8 currentMoveArray[4]; - u8 consideredMoveArray[4]; + u8 currentMoveArray[MAX_MON_MOVES]; + u8 consideredMoveArray[MAX_MON_MOVES]; u8 numOfBestMoves; s32 i; @@ -452,11 +452,11 @@ static u8 ChooseMoveOrAction_Doubles(void) s32 i; s32 j; s32 scriptsToRun; - s16 bestMovePointsForTarget[4]; - s8 mostViableTargetsArray[4]; - u8 actionOrMoveIndex[4]; - u8 mostViableMovesScores[4]; - u8 mostViableMovesIndices[4]; + s16 bestMovePointsForTarget[MAX_BATTLERS_COUNT]; + s8 mostViableTargetsArray[MAX_BATTLERS_COUNT]; + u8 actionOrMoveIndex[MAX_BATTLERS_COUNT]; + u8 mostViableMovesScores[MAX_MON_MOVES]; + u8 mostViableMovesIndices[MAX_MON_MOVES]; s32 mostViableTargetsNo; s32 mostViableMovesNo; s16 mostMovePoints; @@ -543,7 +543,7 @@ static u8 ChooseMoveOrAction_Doubles(void) mostViableTargetsArray[0] = 0; mostViableTargetsNo = 1; - for (i = 1; i < MAX_MON_MOVES; i++) + for (i = 1; i < MAX_BATTLERS_COUNT; i++) { if (mostMovePoints == bestMovePointsForTarget[i]) { @@ -1167,7 +1167,7 @@ static void Cmd_get_considered_move_power(void) static void Cmd_get_how_powerful_move_is(void) { s32 i, checkedMove; - s32 moveDmgs[4]; + s32 moveDmgs[MAX_MON_MOVES]; for (i = 0; sDiscouragedPowerfulMoveEffects[i] != 0xFFFF; i++) { |