From d64dc2bbe890f210d653fede84151bd37ca1bc98 Mon Sep 17 00:00:00 2001 From: BuffelSaft Date: Sun, 24 Oct 2021 17:55:37 +1300 Subject: [PATCH] Sleep moves don't check target's type Dark types aren't immune to Hypnosis, Ghost types aren't immune to Yawn or Lovely Kiss, so this check isn't needed. --- src/battle_ai_util.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index fef6e6c6f..0c3bf717a 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -2606,7 +2606,6 @@ bool32 AI_CanSleep(u8 battler, u16 ability) bool32 AI_CanPutToSleep(u8 battlerAtk, u8 battlerDef, u16 defAbility, u16 move, u16 partnerMove) { if (!AI_CanSleep(battlerDef, defAbility) - || AI_GetMoveEffectiveness(move, battlerAtk, battlerDef) == AI_EFFECTIVENESS_x0 || DoesSubstituteBlockMove(battlerAtk, battlerDef, move) || PartnerMoveEffectIsStatusSameTarget(BATTLE_PARTNER(battlerAtk), battlerDef, partnerMove)) // shouldn't try to sleep mon that partner is trying to make sleep return FALSE;