diff --git a/src/battle_util.c b/src/battle_util.c index a3874c68c3d..fbb1d1b26da 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3138,6 +3138,8 @@ static inline bool32 TryFormChangeBeforeMove(void) static inline bool32 TryActivatePowderStatus(u32 move) { u32 partnerMove = gBattleMons[BATTLE_PARTNER(gBattlerAttacker)].moves[gBattleStruct->chosenMovePositions[BATTLE_PARTNER(gBattlerAttacker)]]; + if (!(gBattleMons[gBattlerAttacker].status2 & STATUS2_POWDER)) + return FALSE; if (GetBattleMoveType(move) == TYPE_FIRE && !gBattleStruct->pledgeMove) return TRUE; if (move == MOVE_FIRE_PLEDGE && partnerMove == MOVE_GRASS_PLEDGE) @@ -3616,20 +3618,17 @@ static void CancellerPowderMove(u32 *effect) static void CancellerPowderStatus(u32 *effect) { - if (gBattleMons[gBattlerAttacker].status2 & STATUS2_POWDER) + if (TryActivatePowderStatus(gCurrentMove)) { - if (TryActivatePowderStatus(gCurrentMove)) - { - gProtectStructs[gBattlerAttacker].powderSelfDmg = TRUE; - if (GetBattlerAbility(gBattlerAttacker) != ABILITY_MAGIC_GUARD) - gBattleStruct->moveDamage[gBattlerAttacker] = GetNonDynamaxMaxHP(gBattlerAttacker) / 4; + gProtectStructs[gBattlerAttacker].powderSelfDmg = TRUE; + if (GetBattlerAbility(gBattlerAttacker) != ABILITY_MAGIC_GUARD) + gBattleStruct->moveDamage[gBattlerAttacker] = GetNonDynamaxMaxHP(gBattlerAttacker) / 4; - if (GetActiveGimmick(gBattlerAttacker) != GIMMICK_Z_MOVE - || HasTrainerUsedGimmick(gBattlerAttacker, GIMMICK_Z_MOVE)) - gBattlescriptCurrInstr = BattleScript_MoveUsedPowder; - gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; - *effect = 1; - } + if (GetActiveGimmick(gBattlerAttacker) != GIMMICK_Z_MOVE + || HasTrainerUsedGimmick(gBattlerAttacker, GIMMICK_Z_MOVE)) + gBattlescriptCurrInstr = BattleScript_MoveUsedPowder; + gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; + *effect = 1; } }