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

How to make [Death Pact] to heal you for 33% of your max health?

Status
Not open for further replies.
Level 45
Joined
Feb 27, 2007
Messages
5,578
Do you always want it to restore 33% or should it restore up to 33% based on the life of the unit you sacrifice? I would make Death Pact not restore any life in the OE and then add this trigger:
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to Death Pact
  • Actions
    • Unit - Set life of (Triggering Unit) to ((Life of triggering Unit) + (0.33 x (Max life of (Triggering Unit))))
    • -------- or to base it on sac'd unit life: --------
    • Set LifeMax = (0.33 x (Max life of (Triggering Unit)))
    • Set LifeMax = Maximum(LifeMax, (Life of (Target Unit of Ability Being Cast)))
    • Unit - Set life of (Triggering Unit) to ((Life of triggering Unit) + LifeMax)
 
Status
Not open for further replies.
Top