fix passing hold effect instead of ability (#4789)

This commit is contained in:
sneed 2024-06-13 17:40:53 +03:00 committed by GitHub
parent c2ca22d474
commit f868de066d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3715,7 +3715,7 @@ static u32 AI_CalcMoveEffectScore(u32 battlerAtk, u32 battlerDef, u32 move)
ADJUST_SCORE(GOOD_EFFECT);
break;
case EFFECT_SANDSTORM:
if (ShouldSetSandstorm(battlerAtk, aiData->holdEffects[battlerAtk], aiData->holdEffects[battlerAtk]))
if (ShouldSetSandstorm(battlerAtk, aiData->abilities[battlerAtk], aiData->holdEffects[battlerAtk]))
{
ADJUST_SCORE(DECENT_EFFECT);
if (aiData->holdEffects[battlerAtk] == HOLD_EFFECT_SMOOTH_ROCK)