From f19a51eea6c99778338326cb95b31b6bc4963b9e Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 27 Aug 2019 18:54:01 +0200 Subject: [PATCH] More ai tweaks --- src/battle_ai_script_commands.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index 0aa2f3aa91..2b4789cfac 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -1347,7 +1347,15 @@ static bool32 CompareTwoMoves(u32 bestMove, u32 goodMove) // Check recoil if (GetBattlerAbility(sBattler_AI) != ABILITY_ROCK_HEAD) { - if (gBattleMoves[goodMove].effect == EFFECT_RECOIL && gBattleMoves[bestMove].effect != EFFECT_RECOIL) + if (((gBattleMoves[goodMove].effect == EFFECT_RECOIL + || gBattleMoves[goodMove].effect == EFFECT_RECOIL_IF_MISS + || gBattleMoves[goodMove].effect == EFFECT_RECOIL_50 + || gBattleMoves[goodMove].effect == EFFECT_RECOIL_33_STATUS) + && (gBattleMoves[bestMove].effect != EFFECT_RECOIL + && gBattleMoves[bestMove].effect != EFFECT_RECOIL_IF_MISS + && gBattleMoves[bestMove].effect != EFFECT_RECOIL_50 + && gBattleMoves[bestMove].effect != EFFECT_RECOIL_33_STATUS + && gBattleMoves[bestMove].effect != EFFECT_RECHARGE))) return FALSE; } // Check recharge