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.
This commit is contained in:
BuffelSaft 2021-10-24 17:55:37 +13:00
parent abb8a97d21
commit d64dc2bbe8

View file

@ -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;