From c3674d6c1725caa65f5a36343293eaae5f4f483e Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 8 Mar 2023 17:23:44 +0100 Subject: [PATCH] Wrong score for Work Up and Growth --- src/battle_ai_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 2d4d075282..0badf92ddf 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -1117,10 +1117,11 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; case EFFECT_GROWTH: case EFFECT_ATTACK_SPATK_UP: // work up - if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_ATK) || !HasMoveWithSplit(battlerAtk, SPLIT_PHYSICAL)) + if ((!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_ATK) && !BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPATK)) + || (!HasMoveWithSplit(battlerAtk, SPLIT_PHYSICAL) && !HasMoveWithSplit(battlerAtk, SPLIT_SPECIAL))) score -= 10; - else if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPATK) || !HasMoveWithSplit(battlerAtk, SPLIT_SPECIAL)) - score -= 8; + // else if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPATK) || !HasMoveWithSplit(battlerAtk, SPLIT_SPECIAL)) + // score -= 8; break; case EFFECT_ROTOTILLER: if (isDoubleBattle)