• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Specifying Siphon Mana Target

Status
Not open for further replies.
This probably sounds easy, but somehow I failed to specify the targeted unit to set it into a unit variable.

What I want:
- Hero drains mana from an enemy.
- When the Hero stops draining mana (either end of spell duration or stunned or walked away), deals damage to the enemy unit.
- Damage = Amount of mana missing.
- Damage is to be dealt as one lump sum, not over time.

Here's my trigger:

  • Mana Break
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Siphon Mana
    • Actions
      • Set ManaBreak_User = (Triggering unit)
      • Set ManaBreak_Target = (Target unit of ability being cast)
      • Set ManaBreak_Damage = ((Max mana of ManaBreak_Target) - (Mana of ManaBreak_Target))
      • Unit - Cause ManaBreak_User to damage ManaBreak_Target, dealing ManaBreak_Damage damage of attack type Spells and damage type Normal


Please ignore MUI for the time being.

Can anyone suggest a better way to specify the (Target unit of ability being cast)?

Ask me for more details if needed.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
If you're ignoring MUI-ness at this time, the trigger would be definitely much more easy.
A test map is attached.
Drains 10 MP/sec, lasts for 10 seconds or until interrupted.
 

Attachments

  • Mana Absorb.w3x
    14.1 KB · Views: 44
Status
Not open for further replies.
Top