From f49a486a8ccad34508b7ee75984d6c9dfffcc911 Mon Sep 17 00:00:00 2001 From: BuffelSaft Date: Thu, 23 Sep 2021 16:55:05 +1200 Subject: [PATCH] Replace tabs with spaces --- src/battle_script_commands.c | 58 ++++++++++++++++++------------------ src/battle_util.c | 36 +++++++++++----------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index dac210ff5..b0508b80b 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1729,8 +1729,8 @@ static void Cmd_accuracycheck(void) gBattlescriptCurrInstr += 7; } else if (gSpecialStatuses[gBattlerAttacker].parentalBondOn == 1 - || (gSpecialStatuses[gBattlerAttacker].multiHitOn && (gBattleMoves[move].effect != EFFECT_TRIPLE_KICK - || GetBattlerAbility(gBattlerAttacker) == ABILITY_SKILL_LINK))) + || (gSpecialStatuses[gBattlerAttacker].multiHitOn && (gBattleMoves[move].effect != EFFECT_TRIPLE_KICK + || GetBattlerAbility(gBattlerAttacker) == ABILITY_SKILL_LINK))) { // No acc checks for second hit of Parental Bond or multi hit moves, except Triple Kick/Triple Axel gBattlescriptCurrInstr += 7; @@ -2078,8 +2078,8 @@ static void Cmd_attackanimation(void) { if (gSpecialStatuses[gBattlerAttacker].parentalBondOn == 1) // No animation on second hit { - gBattlescriptCurrInstr++; - return; + gBattlescriptCurrInstr++; + return; } if ((gBattleMoves[gCurrentMove].target & MOVE_TARGET_BOTH @@ -5162,9 +5162,9 @@ static void Cmd_moveend(void) gBattleScripting.multihitString[4]++; if (--gMultiHitCounter == 0) { - BattleScriptPushCursor(); - gBattlescriptCurrInstr = BattleScript_MultiHitPrintStrings; - effect = 1; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_MultiHitPrintStrings; + effect = 1; } else { @@ -5176,7 +5176,7 @@ static void Cmd_moveend(void) if (gBattleMons[gBattlerAttacker].hp && gBattleMons[gBattlerTarget].hp && (gChosenMove == MOVE_SLEEP_TALK || !(gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP)) - && !(gBattleMons[gBattlerAttacker].status1 & STATUS1_FREEZE)) + && !(gBattleMons[gBattlerAttacker].status1 & STATUS1_FREEZE)) { if (gSpecialStatuses[gBattlerAttacker].parentalBondOn) gSpecialStatuses[gBattlerAttacker].parentalBondOn--; @@ -5187,14 +5187,14 @@ static void Cmd_moveend(void) gSpecialStatuses[gBattlerAttacker].multiHitOn = TRUE; MoveValuesCleanUp(); BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]); - gBattlescriptCurrInstr = BattleScript_FlushMessageBox; - return; + gBattlescriptCurrInstr = BattleScript_FlushMessageBox; + return; } else { BattleScriptPushCursor(); - gBattlescriptCurrInstr = BattleScript_MultiHitPrintStrings; - effect = 1; + gBattlescriptCurrInstr = BattleScript_MultiHitPrintStrings; + effect = 1; } } } @@ -13124,24 +13124,24 @@ static bool32 CriticalCapture(u32 odds) bool8 IsMoveAffectedByParentalBond(u16 move, u8 battlerId) { if (gBattleMoves[move].split != SPLIT_STATUS && !(sForbiddenMoves[move] & FORBIDDEN_PARENTAL_BOND)) - { - if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) - { - switch (gBattleMoves[move].target) + { + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + switch (gBattleMoves[move].target) { - case MOVE_TARGET_BOTH: - if (CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) >= 2) // Check for single target - return FALSE; - break; - case MOVE_TARGET_FOES_AND_ALLY: - if (CountAliveMonsInBattle(BATTLE_ALIVE_EXCEPT_ACTIVE) >= 2) // Count mons on both sides; ignore attacker - return FALSE; - break; - } - } + case MOVE_TARGET_BOTH: + if (CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) >= 2) // Check for single target + return FALSE; + break; + case MOVE_TARGET_FOES_AND_ALLY: + if (CountAliveMonsInBattle(BATTLE_ALIVE_EXCEPT_ACTIVE) >= 2) // Count mons on both sides; ignore attacker + return FALSE; + break; + } + } - return TRUE; - } + return TRUE; + } - return FALSE; + return FALSE; } diff --git a/src/battle_util.c b/src/battle_util.c index 36060103b..0c0f51ddc 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3500,7 +3500,7 @@ u8 AtkCanceller_UnableToUseMove(void) else if (IsTwoStrikesMove(gCurrentMove)) { gMultiHitCounter = 2; - PREPARE_BYTE_NUMBER_BUFFER(gBattleScripting.multihitString, 1, 0) + PREPARE_BYTE_NUMBER_BUFFER(gBattleScripting.multihitString, 1, 0) if (gCurrentMove == MOVE_DRAGON_DARTS) { // TODO @@ -3509,7 +3509,7 @@ u8 AtkCanceller_UnableToUseMove(void) else if (gBattleMoves[gCurrentMove].effect == EFFECT_TRIPLE_KICK || gCurrentMove == MOVE_SURGING_STRIKES) { gMultiHitCounter = 3; - PREPARE_BYTE_NUMBER_BUFFER(gBattleScripting.multihitString, 1, 0) + PREPARE_BYTE_NUMBER_BUFFER(gBattleScripting.multihitString, 1, 0) } #if B_BEAT_UP_DMG >= GEN_5 else if (gBattleMoves[gCurrentMove].effect == EFFECT_BEAT_UP) @@ -3523,16 +3523,16 @@ u8 AtkCanceller_UnableToUseMove(void) party = gEnemyParty; for (i = 0; i < PARTY_SIZE; i++) - { - if (GetMonData(&party[i], MON_DATA_HP) - && GetMonData(&party[i], MON_DATA_SPECIES) != SPECIES_NONE - && !GetMonData(&party[i], MON_DATA_IS_EGG) - && !GetMonData(&party[i], MON_DATA_STATUS)) - gMultiHitCounter++; - } + { + if (GetMonData(&party[i], MON_DATA_HP) + && GetMonData(&party[i], MON_DATA_SPECIES) != SPECIES_NONE + && !GetMonData(&party[i], MON_DATA_IS_EGG) + && !GetMonData(&party[i], MON_DATA_STATUS)) + gMultiHitCounter++; + } - gBattleCommunication[0] = 0; // For later - PREPARE_BYTE_NUMBER_BUFFER(gBattleScripting.multihitString, 1, 0) + gBattleCommunication[0] = 0; // For later + PREPARE_BYTE_NUMBER_BUFFER(gBattleScripting.multihitString, 1, 0) } #endif gBattleStruct->atkCancellerTracker++; @@ -8309,13 +8309,13 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move } // Parental Bond Second Strike - if (gSpecialStatuses[gBattlerAttacker].parentalBondOn == 1) - { - if (B_PARENTAL_BOND_DAMAGE < GEN_7) - MulModifier(&finalModifier, UQ_4_12(0.5)); - else - MulModifier(&finalModifier, UQ_4_12(0.25)); - } + if (gSpecialStatuses[gBattlerAttacker].parentalBondOn == 1) + { + if (B_PARENTAL_BOND_DAMAGE < GEN_7) + MulModifier(&finalModifier, UQ_4_12(0.5)); + else + MulModifier(&finalModifier, UQ_4_12(0.25)); + } // attacker's abilities switch (abilityAtk)