• 🏆 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!

[Spell] Item spell "Steal"

Status
Not open for further replies.
Level 5
Joined
Aug 8, 2019
Messages
113
If anyone here is familiar with the spell steal which is under spells>Special>Items, it allows you to steal an enemy units mana, regardless of whether the percentage box says yes or no it will not take a percentage. Now it works fine when you set it to steal mana, however when you try to steal health, it damages both the target unit as well as the casting unit, I was wondering if there was any way around this besides triggers, and even then this would be messy because the caster might not survive casting the ability.
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,016
You can trigger the effect you want yourself:
  • Set ManaSteal = Min((Current Mana of TARGET), (0.35 x (Maximum mana of TARGET))) //gives 35% max mana, not exceeding the current mana of the target
  • Unit - Modify CASTER current mana: add ManaSteal //this is called "unit - set property"
 
Status
Not open for further replies.
Top