From 6215d4b1b4ddddd179e48c6528b9b324e0f24761 Mon Sep 17 00:00:00 2001 From: SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> Date: Mon, 19 Dec 2022 17:18:05 -0800 Subject: [PATCH] Update src/battle_script_commands.c Co-authored-by: LOuroboros --- src/battle_script_commands.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index b8e1628047..9dc869d276 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8132,19 +8132,19 @@ static bool32 IsRototillerAffected(u32 battlerId) static bool32 IsAbilityRodAffected(void) { - u32 moveType; + u32 moveType; - if (gBattleStruct->dynamicMoveType == 0) - moveType = gBattleMoves[gCurrentMove].type; - else if (!(gBattleStruct->dynamicMoveType & 0x40)) - moveType = gBattleStruct->dynamicMoveType & 0x3F; - else - moveType = gBattleMoves[gCurrentMove].type; + if (gBattleStruct->dynamicMoveType == 0) + moveType = gBattleMoves[gCurrentMove].type; + else if (!(gBattleStruct->dynamicMoveType & 0x40)) + moveType = gBattleStruct->dynamicMoveType & 0x3F; + else + moveType = gBattleMoves[gCurrentMove].type; - if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_LIGHTNING_ROD) - return TRUE; - else - return FALSE; + if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_LIGHTNING_ROD) + return TRUE; + else + return FALSE; } static bool32 IsAbilityMotorAffected(void)