From 6cdca24c31c0a8f216c176b01b86aeeb5038b535 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 16 Feb 2023 21:58:00 +0100 Subject: [PATCH] use forced switch battler bit --- src/battle_ai_switch_items.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index a8c09c40b..b43927819 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -30,7 +30,7 @@ static bool32 AI_OpponentCanFaintAiWithMod(u32 healAmount); static bool32 IsAceMon(u32 battlerId, u32 monPartyId) { if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON - && !(gBattleStruct->forcedSwitch) + && !(gBattleStruct->forcedSwitch & gBitTable[battlerId]) && monPartyId == CalculateEnemyPartyCount()-1) return TRUE; return FALSE;