From e3ca217d6412b4eccd325006904ca88a2f3a631c Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Mon, 10 Apr 2023 11:36:17 -0400 Subject: [PATCH] rename IsBattlerAIControlled --- include/battle_ai_util.h | 2 +- src/battle_ai_main.c | 2 +- src/battle_ai_util.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/battle_ai_util.h b/include/battle_ai_util.h index 68c0dbd993..d1319f0ca7 100644 --- a/include/battle_ai_util.h +++ b/include/battle_ai_util.h @@ -10,7 +10,7 @@ bool32 AI_RandLessThan(u8 val); void RecordLastUsedMoveByTarget(void); bool32 BattlerHasAi(u32 battlerId); -bool32 IsBattlerAIControlled(u32 battlerId); +bool32 IsAiBattlerAware(u32 battlerId); void ClearBattlerMoveHistory(u8 battlerId); void RecordLastUsedMoveBy(u32 battlerId, u32 move); void RecordKnownMove(u8 battlerId, u32 move); diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 95e85ab894..2fb9c2640d 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -367,7 +367,7 @@ void GetAiLogicData(void) for (battlerAtk = 0; battlerAtk < gBattlersCount; battlerAtk++) { if (!IsBattlerAlive(battlerAtk) - || !IsBattlerAIControlled(battlerAtk)) { + || !IsAiBattlerAware(battlerAtk)) { continue; } diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 22c7bb633c..05e7aec58f 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -473,7 +473,7 @@ bool32 BattlerHasAi(u32 battlerId) } } -bool32 IsBattlerAIControlled(u32 battlerId) +bool32 IsAiBattlerAware(u32 battlerId) { if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_OMNISCIENT) return TRUE; @@ -1231,7 +1231,7 @@ s32 AI_GetAbility(u32 battlerId) return gBattleStruct->overwrittenAbilities[battlerId]; // The AI knows its own ability. - if (IsBattlerAIControlled(battlerId)) + if (IsAiBattlerAware(battlerId)) return knownAbility; // Check neutralizing gas, gastro acid @@ -1264,7 +1264,7 @@ u16 AI_GetHoldEffect(u32 battlerId) { u32 holdEffect; - if (!IsBattlerAIControlled(battlerId)) + if (!IsAiBattlerAware(battlerId)) holdEffect = AI_PARTY->mons[GetBattlerSide(battlerId)][gBattlerPartyIndexes[battlerId]].heldEffect; else holdEffect = GetBattlerHoldEffect(battlerId, FALSE); @@ -1889,7 +1889,7 @@ bool32 CanIndexMoveFaintTarget(u8 battlerAtk, u8 battlerDef, u8 index, u8 numHit u16 *GetMovesArray(u32 battler) { - if (IsBattlerAIControlled(battler) || IsBattlerAIControlled(BATTLE_PARTNER(battler))) + if (IsAiBattlerAware(battler) || IsAiBattlerAware(BATTLE_PARTNER(battler))) return gBattleMons[battler].moves; else return gBattleResources->battleHistory->usedMoves[battler]; @@ -3144,7 +3144,7 @@ u16 GetAllyChosenMove(u8 battlerId) { u8 partnerBattler = BATTLE_PARTNER(battlerId); - if (!IsBattlerAlive(partnerBattler) || !IsBattlerAIControlled(partnerBattler)) + if (!IsBattlerAlive(partnerBattler) || !IsAiBattlerAware(partnerBattler)) return MOVE_NONE; else if (partnerBattler > battlerId) // Battler with the lower id chooses the move first. return gLastMoves[partnerBattler];