Wrong score for Work Up and Growth

This commit is contained in:
Alex 2023-03-08 17:23:44 +01:00
parent 86144c6a53
commit c3674d6c17

View file

@ -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)