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

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