Fixes the check for speed on electrify (#2819)

This commit is contained in:
Eduardo Quezada D'Ottone 2023-03-09 08:02:00 -03:00 committed by GitHub
commit 73236344ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2447,7 +2447,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
}
break;
case EFFECT_ELECTRIFY:
if (AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_FASTER
if (AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_SLOWER
//|| GetMoveTypeSpecial(battlerDef, predictedMove) == TYPE_ELECTRIC // Move will already be electric type
|| PartnerMoveIsSameAsAttacker(BATTLE_PARTNER(battlerAtk), battlerDef, move, AI_DATA->partnerMove))
score -= 10;