Toxic thread uses light screen's scoring.... (#7674)

This commit is contained in:
surskitty 2025-09-05 16:41:40 -04:00 committed by GitHub
parent 6e18c2f06e
commit c5fff74ec4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1702,7 +1702,9 @@ static s32 AI_CheckBadMove(u32 battlerAtk, u32 battlerDef, u32 move, s32 score)
case EFFECT_TOXIC_THREAD:
if (!CanLowerStat(battlerAtk, battlerDef, aiData, STAT_SPEED))
ADJUST_SCORE(-1); // may still want to just poison
//fallthrough
if (!AI_CanPoison(battlerAtk, battlerDef, aiData->abilities[battlerDef], move, aiData->partnerMove))
ADJUST_SCORE(-10);
break;
case EFFECT_LIGHT_SCREEN:
if (gSideStatuses[GetBattlerSide(battlerAtk)] & (SIDE_STATUS_LIGHTSCREEN | SIDE_STATUS_AURORA_VEIL)
|| (HasPartner(battlerAtk) && AreMovesEquivalent(battlerAtk, BATTLE_PARTNER(battlerAtk), move, aiData->partnerMove)))