Warcraft III resources & community, 2003–2006 · archived

How do I add % of life/mana to unit stats e.g. damage.

6 posts
#1

How do I add % of life/mana to unit stats e.g. damage.

There is a Hero on Dota called Urza.

One of his abilities is 4% of maximum life is added onto his damage.

How was this done?

I wanted to make an item.

Adds (2% of Maximum armor) to the wearer's armor.

I think I could make a trigger to add the armor. But not sure how to make it keep updating every few seconds. Seomhwo would have to clear the old value and update it again.
#2
I think it is something like converting real into integer or something like that.

-Rui
#3
it's Ursa. don't you ever play standard games or something? and i'm sure you know who Urza in MTG is. anyways, it's something like this.

Events-
Unit is attacked
Conditions-
Attacking Unit has (Buff)
Actions-
Cause (Attacking Unit) to damage (Attacked unit) for ((Max life of (Attacking Unit)/100)x4) using attack type Spell and damage type Normal.

something like that.
#4
Ah That could work with damage. How would I do that with armor?

Also your method doesnt display the additional bonus on the Heroes stats. Im sure he did somehow on DOTA.
#5
No, the bonus damage is not displayed in dota, I think that the trigger of the Ursa is like qwerty spoke. But, to armor, I think that now in the worldeditor has not an action to detect the armor of the unit in GUI, in JASS, I don't know. :lol:
#6
the damage isn't displayed as bonuses. it's hidden, and you got to calculate the amount of bonus yourself. also, fury swipes isn't shown, because it's actually incinerate.

i'm not sure about the armor part, though.