• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Armor damage reduction per value

Status
Not open for further replies.
Level 13
Joined
Mar 29, 2012
Messages
530
If I have a structure that has 5 armor point value (Fortified type), and a unit that has 20 attack damage point (Hero type), the armor reduction of Hero against Fortified is 0.5.
So the in-game damage result is 7.692.
What is the formula to get the result damage?
 

~El

~El

Level 17
Joined
Jun 13, 2016
Messages
558
upload_2018-12-27_14-46-44.png


The final damage (I think) is:

damageDealt = damageValue * (1 - armorTypeReduction) * (1 - armorValueReduction)

In your case:

damageDealt = 20 * 0.5 * (1 - (5 * 0.06) / (1 + 5 * 0.06)) = 20 * 0.5 * (1 - 0.2307) = 10 * (0.7693) = 0.7693

Sans some rounding error, this is more or less the precise value you're getting.

EDIT: Keep in mind that there are also some other abilities at play here. There's damage block abilities and damage reduce abilities, which can also further reduce damage, and the formula accounting for those gets even more complicated.
 
Level 13
Joined
Mar 29, 2012
Messages
530
20 * 0.5 / (1 + 0.06 * 5) where 20 is your base damage and 5 is armor point, and 0.5 is hero->fortified modifier.
Basic formula is resultDamage = damage / (1 + 0.06 * armor)

Armor modifier (0.06) can be changed in map constants.
View attachment 312544

The final damage (I think) is:

damageDealt = damageValue * (1 - armorTypeReduction) * (1 - armorValueReduction)

In your case:

damageDealt = 20 * 0.5 * (1 - (5 * 0.06) / (1 + 5 * 0.06)) = 20 * 0.5 * (1 - 0.2307) = 10 * (0.7693) = 0.7693

Sans some rounding error, this is more or less the precise value you're getting.

EDIT: Keep in mind that there are also some other abilities at play here. There's damage block abilities and damage reduce abilities, which can also further reduce damage, and the formula accounting for those gets even more complicated.

Thank you both of you for sharing this formula. It worked just like what I planned to make. :)
 
Status
Not open for further replies.
Top