Use precalculated speedStats for AI speed comparison

title.
This commit is contained in:
Alex 2026-03-20 22:12:20 +01:00 committed by GitHub
parent e563c57a27
commit 06a781a4d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1490,8 +1490,8 @@ s32 AI_WhoStrikesFirst(enum BattlerId battlerAI, enum BattlerId battler, enum Mo
return AI_IS_SLOWER;
}
speedBattlerAI = GetBattlerTotalSpeedStat(battlerAI, abilityAI, holdEffectAI);
speedBattler = GetBattlerTotalSpeedStat(battler, abilityPlayer, holdEffectPlayer);
speedBattlerAI = gAiLogicData->speedStats[battlerAI];
speedBattler = gAiLogicData->speedStats[battler];
if (holdEffectAI == HOLD_EFFECT_LAGGING_TAIL && holdEffectPlayer != HOLD_EFFECT_LAGGING_TAIL)
return AI_IS_SLOWER;