Fix Switcheroo giving score even if the opponent has no held item (#5412)

This commit is contained in:
kittenchilly 2024-09-21 11:51:08 -05:00 committed by GitHub
parent 68c51f8412
commit f7d2e62ccc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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])
{