• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

armor and magic resist help (coding)

Status
Not open for further replies.
Level 3
Joined
Feb 9, 2010
Messages
36
I have set the armor and magic resist to 0% and this is what I want to happen

here is for armor

Damage multiplier = 100 / (100 + Armor) if Armor ≥ 0
Damage multiplier = 2 − 100 / (100 − Armor) if Armor ≤ 0
Examples:
25 armor → ×0.8 incoming physical damage (20% reduction).
100 armor → ×0.5 incoming physical damage (50% reduction).
−25 armor → ×1.20 incoming physical damage (20% increase).

and for magic resist will be the int value

Damage multiplier = 100 / (100 + int) if int≥ 0
Damage multiplier = 2 − 100 / (100 − int) if int≤ 0
Examples:
25 int → ×0.8 incoming magic damage (20% reduction).
100 int → ×0.5 incoming magic damage (50% reduction).
−25 int → ×1.2 incoming magic damage (20% increase).

hope someone can help me on this one

I forgot to add armor gain per level each hero has their own armor gain table
 
Status
Not open for further replies.
Top