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.
This commit is contained in:
BuffelSaft 2021-03-07 11:00:52 +13:00
parent e5fa583a08
commit 1f54233953

View File

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