diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index dd1d3bb2ce..71e756af4c 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8151,21 +8151,19 @@ static bool32 IsAbilityRodAffected(void) static bool32 IsAbilityMotorAffected(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_MOTOR_DRIVE) { - return TRUE; - } - else { - return FALSE; - } + if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_MOTOR_DRIVE) + return TRUE; + else + return FALSE; } static bool32 IsAbilityAbsorbAffected(void)