From 6c261fe41667363ad477ad7b09419906c18a143d Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Mon, 18 Aug 2025 15:09:09 -0400 Subject: [PATCH] Fixed compile issue in gcc 11 (#7579) --- src/battle_ai_util.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 2712c4499f..84d247a617 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -2107,10 +2107,12 @@ u32 IncreaseStatDownScore(u32 battlerAtk, u32 battlerDef, u32 stat) tempScore += DECENT_EFFECT; break; case STAT_SPEED: + { u32 predictedMoveSpeedCheck = GetIncomingMoveSpeedCheck(battlerAtk, battlerDef, gAiLogicData); if (AI_IsSlower(battlerAtk, battlerDef, gAiThinkingStruct->moveConsidered, predictedMoveSpeedCheck, DONT_CONSIDER_PRIORITY)) tempScore += DECENT_EFFECT; break; + } case STAT_SPATK: if (HasMoveWithCategory(battlerDef, DAMAGE_CATEGORY_SPECIAL)) tempScore += DECENT_EFFECT; @@ -3632,7 +3634,7 @@ bool32 HasChoiceEffect(u32 battler) if (ability == ABILITY_KLUTZ) return FALSE; - + enum ItemHoldEffect holdEffect = gAiLogicData->holdEffects[battler]; switch (holdEffect) { @@ -3881,7 +3883,7 @@ bool32 AreMovesEquivalent(u32 battlerAtk, u32 battlerAtkPartner, u32 move, u32 p return FALSE; u32 battlerDef = gBattleStruct->moveTarget[battlerAtk]; - + // We don't care the effect is basically the same; we would use this move anyway. if (GetBestDmgMoveFromBattler(battlerAtk, battlerDef, AI_ATTACKING) == move) return FALSE;