From 554210c5e315e786ddc6eef888e9ff6065ad73f8 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 24 Aug 2021 19:59:32 -0300 Subject: Removed trailing spaces in the most relevant files Command used for the job: egrep -rl ' $' --include *.c --include *.h --include *.s --include *.inc --include *.txt * | xargs sed -i 's/\s\+$//g' Credits to Grant Murphy from Stack Overflow. --- src/battle_script_commands.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/battle_script_commands.c') diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index cea30bb21..2a5b4c112 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -833,9 +833,9 @@ static const u8 sTerrainToType[] = // - ITEM_ULTRA_BALL skips Master Ball and ITEM_NONE static const u8 sBallCatchBonuses[] = { - [ITEM_ULTRA_BALL - ITEM_ULTRA_BALL] = 20, - [ITEM_GREAT_BALL - ITEM_ULTRA_BALL] = 15, - [ITEM_POKE_BALL - ITEM_ULTRA_BALL] = 10, + [ITEM_ULTRA_BALL - ITEM_ULTRA_BALL] = 20, + [ITEM_GREAT_BALL - ITEM_ULTRA_BALL] = 15, + [ITEM_POKE_BALL - ITEM_ULTRA_BALL] = 10, [ITEM_SAFARI_BALL - ITEM_ULTRA_BALL] = 15 }; @@ -3519,7 +3519,7 @@ static void Cmd_unknown_24(void) if (HP_count == 0) gBattleOutcome |= B_OUTCOME_LOST; - + HP_count = 0; for (i = 0; i < PARTY_SIZE; i++) @@ -3544,7 +3544,7 @@ static void Cmd_unknown_24(void) if ((gHitMarker & HITMARKER_FAINTED2(i)) && (!gSpecialStatuses[i].flag40)) foundPlayer++; } - + foundOpponent = 0; for (i = 1; i < gBattlersCount; i += 2) @@ -4610,9 +4610,9 @@ static void Cmd_switchindataupdate(void) SwitchInClearSetData(); - if (gBattleTypeFlags & BATTLE_TYPE_PALACE + if (gBattleTypeFlags & BATTLE_TYPE_PALACE && gBattleMons[gActiveBattler].maxHP / 2 >= gBattleMons[gActiveBattler].hp - && gBattleMons[gActiveBattler].hp != 0 + && gBattleMons[gActiveBattler].hp != 0 && !(gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP)) { gBattleStruct->palaceFlags |= gBitTable[gActiveBattler]; -- cgit v1.2.3