From 1f54233953380a73e35f0e24a60faa061545464e Mon Sep 17 00:00:00 2001 From: BuffelSaft Date: Sun, 7 Mar 2021 11:00:52 +1300 Subject: [PATCH] Fix powder immunity for self-targeting moves Example: Because Rage Powder targets the user, this check is needed to allow grass types to use it. --- src/battle_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_util.c b/src/battle_util.c index 22eb02885..8154adc99 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3176,7 +3176,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_POWDER_MOVE: - if (gBattleMoves[gCurrentMove].flags & FLAG_POWDER) + if ((gBattleMoves[gCurrentMove].flags & FLAG_POWDER) && (gBattlerAttacker != gBattlerTarget)) { if ((B_POWDER_GRASS >= GEN_6 && IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_GRASS)) || GetBattlerAbility(gBattlerTarget) == ABILITY_OVERCOAT)