• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Max Hp Spell

Status
Not open for further replies.
Level 3
Joined
Aug 28, 2005
Messages
48
Ive been messin round with it, just cant find it i guess... But how would you make a spell that when it hits, it does damage equal to a percent of targets max hp?
 
Level 3
Joined
Mar 2, 2006
Messages
40
Code:
Some Spell
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to "some spell"
    Actions
        Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing ((Max life of (Target unit of ability being cast)) x 0.20) damage of attack type Spells and damage type Normal
Just do the math. 0.20 x Max life is 1/5 of max life, 0.50 is 1/2, 0.10 is 1/10 etc.
 
Status
Not open for further replies.
Top