From 19b1d4bfa23f56bf1f15d1333d10c1b7d0a519ae Mon Sep 17 00:00:00 2001 From: Evan Date: Sun, 20 Dec 2020 15:15:33 -0700 Subject: [PATCH] speed stat increases based on current stat stage --- src/battle_ai_util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 381a90c4b..510da52b9 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -3238,7 +3238,12 @@ void IncreaseStatUpScore(u8 battlerAtk, u8 battlerDef, u8 statId, s16 *score) break; case STAT_SPEED: if (IsAiFaster(AI_CHECK_SLOWER)) - *score += 2; + { + if (gBattleMons[battlerAtk].statStages[STAT_SPEED] < STAT_UP_2_STAGE) + *score += 2; + else if (gBattleMons[battlerAtk].statStages[STAT_SPEED] < STAT_UP_STAGE) + *(score)++; + } break; case STAT_SPATK: if (HasMoveWithSplit(battlerAtk, SPLIT_SPECIAL) && GetHealthPercentage(battlerAtk) > 40)