From 10ef3e83483c08cc5f62a1f7f0469aafdfa4f7b8 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Tue, 28 Mar 2023 10:58:44 -0400 Subject: [PATCH] style fixes --- src/battle_ai_util.c | 5 ++--- src/battle_main.c | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 93586626e2..51f4ef0467 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -1238,9 +1238,8 @@ s32 AI_GetAbility(u32 battlerId) if (knownAbility == ABILITY_NONE) return knownAbility; - if (AI_PARTY->mons[GetBattlerSide(battlerId)][gBattlerPartyIndexes[battlerId]].ability != ABILITY_NONE) { + if (AI_PARTY->mons[GetBattlerSide(battlerId)][gBattlerPartyIndexes[battlerId]].ability != ABILITY_NONE) return AI_PARTY->mons[GetBattlerSide(battlerId)][gBattlerPartyIndexes[battlerId]].ability; - } // Abilities that prevent fleeing - treat as always known if (knownAbility == ABILITY_SHADOW_TAG || knownAbility == ABILITY_MAGNET_PULL || knownAbility == ABILITY_ARENA_TRAP) @@ -1269,7 +1268,7 @@ u16 AI_GetHoldEffect(u32 battlerId) holdEffect = AI_PARTY->mons[GetBattlerSide(battlerId)][gBattlerPartyIndexes[battlerId]].heldEffect; else holdEffect = GetBattlerHoldEffect(battlerId, FALSE); - + if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_NEGATE_UNAWARE) return holdEffect; diff --git a/src/battle_main.c b/src/battle_main.c index 8e0dc6d878..8175528525 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4096,7 +4096,8 @@ static void HandleTurnActionSelectionState(void) // Do AI score computations here so we can use them in AI_TrySwitchOrUseItem if ((gBattleTypeFlags & BATTLE_TYPE_HAS_AI || IsWildMonSmart()) - && (BattlerHasAi(gActiveBattler) && !(gBattleTypeFlags & BATTLE_TYPE_PALACE))) { + && (BattlerHasAi(gActiveBattler) && !(gBattleTypeFlags & BATTLE_TYPE_PALACE))) + { gBattleStruct->aiMoveOrAction[gActiveBattler] = ComputeBattleAiScores(gActiveBattler); } break;