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

[vJASS] Spell making Idea

Status
Not open for further replies.
Level 16
Joined
Mar 3, 2006
Messages
1,564
I thought of a spell named, Glass Shield or just shield where the caster creates a shield around him/her that shield absorbs damage then dissipates when the caster took total amount of X damage.

So I thought of creating a mana shield then do one of the following:


  1. Make the mana shield absorb damage 1 mana per 1 damage then calculate the amount of mana drained then subtract this number from a variable which represents the amount of damage the shield can absorb and in case the unit mana reached 0 then we use the life (but I guess that may interfere with other things)



  2. Use a damage detection system to subtract the amount of damage taken from the amount of the damage the shield can sustain.

So if anyone has better idea for making this spell with another efficient way, just share your thoughts.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
There are systems like Damage Engine (Bribe) that allows manipulating Damage.

You can create X buff and special effect in the unit and store the damage received in a hashtable or an array. When the damage reaches the limit you want, remove the buff, remove the special effect, and dissipate the stored damage.
 
Status
Not open for further replies.
Top