Changing the max mana of a unit, remove all abilities of a unit?

Sajberhippie

New Member
Reaction score
30
So, I want the highest-tier spell for my shamans to be a passive called "Possession". Whenever the shaman dies, it's spirit has a chance of possessing a random nearby creature, inheriting the physical properties of that creature but the mental abilities of the shaman. Most of the things seems easy enough. The trigger will probably look something like this:

Trigger:
  • Event
    • Unit - A unit dies
    • Condition
      • Integer Comparision - If level of (Possession [Passive]) for (Triggering unit) is equal to 1
      • Integer Comparision - If (random number between 1 and 3) equal to 1
    • Event
      • Variable - Set TempPoint (Position of Triggering Unit)
      • Variable - Set TempGroup (Units within 500 of (TempPoint matching (Unit is mechanical equal to false) and (Unit is a hero equal to false)))
      • Variable - Set TempUnit (Random unit from TempGroup)
      • Variable - Set TempAbility[1] (Assisting Spirits)
      • Variable - Set TempAbility[2] (Exploding Runes)
      • Variable - Set TempAbility[3] (Possession [Passive])
      • Unit - Create 1 dummy and add Charm, order last created to charm TempUnit and add exp. timer to last created unit
      • Unit - Add abilities (Assisting Spirits), (Exploding Runes), (Possession [Passive]) to TempUnit
      • Variable - Destroy all variables

(Sorry for freehand, not at the editor right now)
Now, there's two things I wonder about that I can't remember ever seeing in the trigger editor or anywhere else. I want to set the max mana of the unit to excactly the mana of the Shaman. I know the amount of mana I want to set it to (25), so that part is no problem. However, how do I set it? Can I use an ability that gives -999 to mana (no way that any creature in my map has more mana than that), then add a +mana ability?
The other problem is, how do I remove the old abilities of the creature? I don't have to remove every single possible ability via a "Remove Ability" trigger, do I? If I want to keep some abilities (like basic game function abilities, or certain physical abilities such as damage reduction), is that possible?

Thankful for any answers // Sajber/Emil
 
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