From 99fbad92e21003c474b608ba8dc47fe3570184e5 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sat, 27 Aug 2022 02:50:55 -0400 Subject: [PATCH] IS_BATTLER_OF_TYPE --- src/battle_ai_switch_items.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 9e314286fc..261349dce1 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -446,9 +446,7 @@ static bool8 ShouldSwitch(void) return FALSE; if (ABILITY_ON_FIELD2(ABILITY_MAGNET_PULL)) { - if (gBattleMons[gActiveBattler].type1 == TYPE_STEEL) - return FALSE; - if (gBattleMons[gActiveBattler].type2 == TYPE_STEEL) + if (IS_BATTLER_OF_TYPE(gActiveBattler, TYPE_STEEL)) return FALSE; } if (gBattleTypeFlags & BATTLE_TYPE_ARENA)