• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Condition: Unit has Spell Immunity or Invulnerable

Status
Not open for further replies.
Level 16
Joined
Mar 25, 2016
Messages
1,327
Hello guys, is it possible to make a condition if Unit has Spell Immunity?
  • ((Triggering unit) is Magic Immune) Equal to True
Boolean condition, it's the same as "is a Structure", but you have to change it to Magic Immune.
is it possible to make a condition if is Invulnerable?
I don't think there is one condition to do so. However you can check for abilities (Invulnerable, ...), buffs (Invulnerable, Divine Shield, ...).
You could also use a dummy unit and try if you can order it to cast a spell on a unit. The spell can target everything but vulnerable units (use Channel as base ability). Using JASS the function returns whether the order was succesful.
This would also consider transported units as invulnerable, because they cannot be targeted.
 
Status
Not open for further replies.
Top