diff options
author | ExpoSeed <> | 2021-05-15 15:56:17 -0500 |
---|---|---|
committer | ExpoSeed <> | 2021-05-15 15:56:17 -0500 |
commit | 361fa594b30005edaa8aef5f6b02ac8b15149cba (patch) | |
tree | 24cfa5b11022ac28cccd5634e95bfe1e2ad6040c /src/battle_ai_script_commands.c | |
parent | ab8318cc79de60413085b104125490cbae344169 (diff) |
Various BUGFIXes and UBFIXes
Diffstat (limited to 'src/battle_ai_script_commands.c')
-rw-r--r-- | src/battle_ai_script_commands.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index 9fdd4d0c3..81e7c15cc 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -1877,9 +1877,14 @@ static void Cmd_if_has_move_with_effect(void) case AI_TARGET_PARTNER: for (i = 0; i < MAX_MON_MOVES; i++) { - // UB: checks sBattler_AI instead of gBattlerTarget. + // BUG: checks sBattler_AI instead of gBattlerTarget. + #ifndef BUGFIX if (gBattleMons[sBattler_AI].moves[i] != 0 && gBattleMoves[BATTLE_HISTORY->usedMoves[gBattlerTarget].moves[i]].effect == gAIScriptPtr[2]) break; + #else + if (gBattleMons[gBattlerTarget].moves[i] != 0 && gBattleMoves[BATTLE_HISTORY->usedMoves[gBattlerTarget].moves[i]].effect == gAIScriptPtr[2]) + break; + #endif } if (i == MAX_MON_MOVES) gAIScriptPtr += 7; |