Skip to content

Commit

Permalink
Adds missing AI checks for poltergeist (#5189)
Browse files Browse the repository at this point in the history
Adds missing AI checks for poltergeist
  • Loading branch information
AlexOn1ine committed Aug 17, 2024
1 parent b641c6f commit 3a0c5c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/battle_ai_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ bool32 IsDamageMoveUnusable(u32 move, u32 battlerAtk, u32 battlerDef)
return TRUE;
break;
case EFFECT_POLTERGEIST:
if (AI_DATA->items[battlerDef] == ITEM_NONE)
if (AI_DATA->items[battlerDef] == ITEM_NONE || gFieldStatuses & STATUS_FIELD_MAGIC_ROOM || battlerDefAbility == ABILITY_KLUTZ)
return TRUE;
break;
case EFFECT_FIRST_TURN_ONLY:
Expand Down

0 comments on commit 3a0c5c9

Please sign in to comment.