From 63ffe603be46adf201a8bfc20e24438a8f5903d8 Mon Sep 17 00:00:00 2001 From: Pawkkie Date: Thu, 8 May 2025 14:04:27 -0400 Subject: [PATCH] merge fixes --- src/battle_ai_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index d086f5c67f..f31dfae6bd 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -324,8 +324,13 @@ void SetupAIPredictionData(u32 battler, enum SwitchType switchType) AI_DATA->predictingSwitch = RandomPercentage(RNG_AI_PREDICT_SWITCH, PREDICT_SWITCH_CHANCE); } - // TODO Move prediction - // ModifySwitchAfterMoveScoring(opposingBattler); + // Move prediction + if (AI_THINKING_STRUCT->aiFlags[battler] & AI_FLAG_PREDICT_MOVES) + { + AI_DATA->predictedMove[opposingBattler] = gBattleMons[opposingBattler].moves[BattleAI_PredictMove(battler, opposingBattler)]; + DebugPrintf("Predicted move: %d", AI_DATA->predictedMove[opposingBattler]); + ModifySwitchAfterMoveScoring(opposingBattler); + } } void ComputeBattlerDecisions(u32 battler)