From f7d2e62cccd9e5b27829a31f280aa9b096d34d66 Mon Sep 17 00:00:00 2001 From: kittenchilly Date: Sat, 21 Sep 2024 11:51:08 -0500 Subject: [PATCH] Fix Switcheroo giving score even if the opponent has no held item (#5412) --- src/battle_ai_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 869f5dded3..1483c875ba 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -4065,7 +4065,7 @@ static u32 AI_CalcMoveEffectScore(u32 battlerAtk, u32 battlerDef, u32 move) ADJUST_SCORE(DECENT_EFFECT); // Force 'em out next turn break; default: - if (move != MOVE_BESTOW && aiData->items[battlerAtk] == ITEM_NONE) + if (move != MOVE_BESTOW && aiData->items[battlerAtk] == ITEM_NONE && aiData->items[battlerDef] != ITEM_NONE) { switch (aiData->holdEffects[battlerDef]) {