Death Pact or Dark Ritual on non-Undead (used by AI)

Goober4473

TH.net Regular
Reaction score
7
I'm creating a custom ability based on Death Pact, which checks a unit classification and gives health or mana depending on the type. This is pretty easy and already coded up, but I've hit a problem. Death Pact works only on undead units, and there doesn't seem to be a way to change that.

This wouldn't be a problem at all, since I could just use a dummy ability and add one command in my trigger to kill the target, but I need the AI to use this ability in a melee game.

So, is there another spell that will be cast on an ally when health/mana is low that I can base this on, besides of course Dark Ritual, which also targets only undead? Or some other way around this?
 

born_to_be

New Member
Reaction score
0
You could try setting the base spell to a human spell, Heal for example, and change the model, icon, and abilities. However, I am not sure if that will give you the same properties as Death Pact, but experiment with it if you haven't already.
 

Bogrim

y hello thar
Reaction score
154
The only alternative I can think of is the Destroyer's Absorb Mana, which will take the mana from a friendly unit. However, I'm not sure how well the AI actually uses the ability, let alone to restore health.
 

Goober4473

TH.net Regular
Reaction score
7
Unfortunately, Absorb Mana requires the target to have mana. I could give all of this race's units 1 mana if they have none, but I'd rather just make them all count as undead if I were going to do something like that.
 

Bogrim

y hello thar
Reaction score
154
Unfortunately, Absorb Mana requires the target to have mana. I could give all of this race's units 1 mana if they have none, but I'd rather just make them all count as undead if I were going to do something like that.
Know that you can change the text of the classification so that it doesn't actually spell "Undead" and you wouldn't notice the difference, unless you use Plague, Death Coil and Holy Light as well (though those are much easier to trigger).
 

Goober4473

TH.net Regular
Reaction score
7
I could change it, but I use it elsewhere, including the entire normal undead race.

I think I'll just let them count as undead anyways.
 
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