673 posts Sunny Singapore, the lil' red dot joined
#1
bone shield (from diablo2) help
is there anyway to make a spell like the bone shield/armor from diablo 2? it takes a certain amount of damage for you before it dissipates. the anti-magic shell (banshee skill) is also similar but i think it only absorbs magic damage.
Since Defensive Matrixes have already been made, I can tell you that it's possible. You can try my Defensive Matrix but its still buggy and it absorbs 100% damage, not only part of it, such as Bone Armor does. Not that it would be a problem to solve. I can tell you an idea:
-> Shield's life can be stored in the unit's custom value -> Once Shield's life reaches 0 you remove the buff -> You have a trigger which activates when caster x is damaged -> You remove a percentage of that damage and you immediately increase the life of the unit, as it is damaged.
It doesn't matter that its a hero. The thing is that you can have only ONE unit with this ability (not MUI unfortunately). And now, there will be two triggers.
Trigger 1 Event - An Unit Starts The Effect of an Ability Conditions - Ability Being Cast equal to BoneArmor Actions - Set ArmorCast = (Triggering Unit) - Enable Trigger 2 - Set Custom Value of (Triggering Unit) to x //Instead of x put the life of the armor - Disable (Triggering Trigger) //This will prevent another unit to use the ability
And now to explain the Defense Phase (I'm too lazy to write it right now). The thing is to recover the percentage of the Damage Received. BUT at the same time, you must decrease the "life" of the armor through the custom value. Just be careful to assure that the percentage damage isn't more than the armor's life. If it is, just increase the life with the value equal to the custom value and set armor's value to 0.
At the end of the second trigger check if the life of the armor is equal to 0. If it is, remove the buff, deactive the (Triggering Trigger) and Reactivate the first trigger. Voila, this should kinda be all.
You use "Specific unit take damage", eh? From my knowledge, This event cannot be applied on unit variable. It just for specific unit that comes up on map initialization, such as;
Its absurde... I haven't used this function in GUI (or atleast forgot since I did... I use JASS for more than 9 months) but in JASS, you can specify a Variable. If you can't, I'll try to come up with a JASS version but its much more complicated then.