Two Unique Ways of Making a Spell Not Affect Certain Units?

Goober4473

TH.net Regular
Reaction score
7
I've created a spell that targets only a specific group of units, which I've given a renamed Giant classification to, as well as the Ancient type, which a few need for morphing anyways. The spell actually only targets ancients, since you can't specify Giants only.

Now, I need to make another set of units that cannot be affected by most mana regeneration abilities (but not all). I had planned to make them all Ancients, and edit all mana-adding abilities to target non-ancients, but I don't want the first spell to target them.

So, I need a way to either target Giants only, or to find some other way to make a unit untargetable by specific spells. The AI will be controlling some of the Giant units, and things like Brilliance Aura are passive, so triggering the targeting isn't going to work.
 

Bird

Ultra Cool Member
Reaction score
29
Mechanical would be the next other common spell limitation - hopefully this doesn't conflict with *other* spells you use.
 

Cheddar

This is the way it was meant to be.
Reaction score
126
Checking if level of some inconsequential invisible ability named "THIS UNIT IS A GIANT" is 1 or higher?
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Suicidal/Sapper is one fairly unused category that can be excluded from targets. If you're not planning on having any units with self-destruction/Kaboom! then it could work.
 

Goober4473

TH.net Regular
Reaction score
7
I can, with triggers (custom script/JASS anyways), detect if the unit is a Giant, but the problem is, the unit will still try to cast the spell and then be ordered to stop if controlled by AI, or if the spell were auta-cast, which I'd kind of like. So the unit would sit there trying and failing to cast the spell constantly, rather than say attacking.

I could also do detection stuff for the mana regen, and that probably won't ever be AI controlled, but like I said before, a lot of it is passive auras, which is much harder to stop from affecting a specific unit with triggers.

Mechanical could possibly work, but it also appears in-game under the name, which is weird, healing gets weirded up, and it lets them be repaired. So I think that would mess with too many things. This all needs to be compatible with normal melee races.

Suicidal is another option, since I can target "non-suicidal", but I believe that makes them unable to enter transports, which I need them to do.

[Edit]: If I shift+click the targets allowed field, I can enter text. Does anyone know if it's possible to put in the giant classification this way? Just putting in "giant" doesn't work, nor does "UNIT_TYPE_GIANT".
 

Ashlebede

New Member
Reaction score
43
Tauren classification? I know certain spells can target only taurens... maybe auras, too...
 

Goober4473

TH.net Regular
Reaction score
7
Tauren, like Undead, is a hard coded thing for spell targets. For example, Ancestral Spirit targets only Tauren, and Death Pact targets only Undead, but you can't change that, as it's not part of their targets data field.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top