potential fix for trap effects (#9396)

Co-authored-by: Meister-anon <user@DESKTOP-TQ65PS9>
This commit is contained in:
Meister-anon 2026-03-05 23:57:45 -05:00 committed by GitHub
parent 1aa594d00e
commit f2af06983a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -497,10 +497,10 @@ bool32 IsBattlerTrapped(enum BattlerId battlerAtk, enum BattlerId battlerDef)
&& (B_SHADOW_TAG_ESCAPE >= GEN_4 && gAiLogicData->abilities[battlerDef] != ABILITY_SHADOW_TAG))
return TRUE;
if (AI_IsAbilityOnSide(battlerAtk, ABILITY_ARENA_TRAP)
&& AI_IsBattlerGrounded(battlerAtk))
&& AI_IsBattlerGrounded(battlerDef))
return TRUE;
if (AI_IsAbilityOnSide(battlerAtk, ABILITY_MAGNET_PULL)
&& IS_BATTLER_OF_TYPE(battlerAtk, TYPE_STEEL))
&& IS_BATTLER_OF_TYPE(battlerDef, TYPE_STEEL))
return TRUE;
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && CountUsablePartyMons(battlerDef) == 0)