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

[Trigger] Armor quantity in Triggers?

Status
Not open for further replies.
Level 2
Joined
Aug 22, 2009
Messages
19
Is there any way I can use armor quantity in a trigger? For example, I wanna make ability that deals damage based on units armor (including bonuses ofcourse). Is that in any way possible in GUI?
 
I dont think there is. I used the point-value to represent a unit's armor. For heroes I checked all items that gave armor and added the armor from agility.

you can also add a takes damage event to the unit, create a dummy and let him cause 1 physical damage to the unit, then check how much damage the unit took and calculate the armor based on the damage taken.
 
Level 2
Joined
Aug 22, 2009
Messages
19
you can also add a takes damage event to the unit, create a dummy and let him cause 1 physical damage to the unit, then check how much damage the unit took and calculate the armor based on the damage taken.

Do you or anyone else have the formula by which armor reduces damage depending on armor quantity (without interference of of damage type and armor type)? I could probably calculate it by experiments but it would take me a lot of time.. :)
 
damage taken = unmitigated damage * 1/(1 + 0.06*armor)
solve for armor:
armor = (( unmitigated damage / damage taken ) - 1 ) / 0.06

the value 0.06 is the standard reduction, but this can be changed in the gameplay constants.

Too bad damage reduction from armor is capped at 1 damage being dealt. It can deal less than 1 when you factor in armor type bonus and then abilities.

thats bad.
but you can also let him deal a bit more damage if you add the damage to the units life afterwards. (that is not always possible without complications though, i admit)
 
Status
Not open for further replies.
Top