I am currently creating a spell that only targets on sleep units. Nightmare lv1 350 dmg lv2 450 dmg lv3 550 dmg But i just cant seem to make it target a sleep unit. After it targets, and the unit wakes up, i can still target it again.
I don't know but I think that you could make a trigger. Event obviously a Unit begins casting an ability. Condition, ability being cast equal to Nightmare. And now you put an if condition. If the Target Unit of Ability being cast is sleeping (I hope that this exists... didn't check) then you order the caster to stop and post a Game- Message "|cffffcc00Unit is not sleeping|r" or something to make it as real as possible. Else, you make three Ifs for each level and put no Else for these ifs. At Then condition for these ifs you decrease the life of the target so the life decrease for the main spell should be none. You can also make a spell that is only damaging and put nothing at else. It means that if the target unit is asleep it will not be stopped and will damage it. Hope it works!
Yeah Ravenc,you are right here. SO if it is magical sleep put an OR and put both the conditions (unit is sleeping OR Unit has Sleep Buff). That should work I guess.