• 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.

[Spell] Mana Draining Aura

Status
Not open for further replies.
Level 17
Joined
Nov 11, 2010
Messages
1,974
How would I create an aura that drains the enemies mana?
If there is triggering involved, please post it.
I prefer GUI/MUI.
Thanks for your time.
 
GUI MUI -> best here will be Bride's Unit Indexer found here.

  • init
    • Events
      • Unit - A unit gains new ability
    • Conditions
      • (Hero skill learned) Equal to DrainManaAura
    • Actions
      • Set key = (Custom value of (Triggering unit))
      • Set i = (Level of DrainManaAura) for (Triggering unit)
      • Set BaseDrain = 3.00
      • Set AoE[key] = 900.00
      • Set Drain[key] = (BaseDrain + (i x 3)
      • Unit Group - Add (Triggering unit) to AuraGroup
      • Trigger - Turn of loop <gen>
  • loop
    • Events
      • Time - Every 0.05 seconds of game
    • Conditions
    • Actions
      • Unit Group - Pick every unit in AuraGroup and do Actions
        • Loop - Actions
          • If (All conditions are true) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked unit) is Alive Equal to True
            • Then - Actions
              • Set tempunit = (Picked unit)
              • Set key = (Custom value of tempunit)
              • Set tempp = (Position of tempunit)
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units in AoE[key] of tempp matching ((Matching unit) is an enemy to (Owner of tempunit)) and ((Matching unit) is alive Equal to True) and ((Matching unit) is Building Equal to False) and <other conditions if needed>)
                • Loop - Actions
                  • If (All conditions are true) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Picked unit) Not equal to No unit
                    • Then - Actions
                      • Unit - Set Mana of (Picked unit) to (Mana of (Picked unit) - (Drain[key]/200)
                    • Else - Actions
              • Custom script: call RemoveLocation(udg_tempp)
            • Else - Actions
      • If (All conditions are true) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (AuraGroup is empty) Equal to True
        • Then - Actions
          • Trigger - Trun off (this trigger)
        • Else - Actions
Customize formula and area of effect, those are just egzamples.
 
Status
Not open for further replies.
Top