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

armor and defence

Status
Not open for further replies.
Level 4
Joined
Feb 23, 2006
Messages
63
So, im trying to make armor equal to defence (defence is shown in the game as a percentage of blocked damage)

E.G. hero X level has armor 10........now i would like to have by 10% decreased damage done to hero - simply 10 defence
- 100 armor = 100% - zero damage done to unit by attack

i was looking in object editor and gameplay constants, i found in gameplay constants somethink like multiplicator of decreasing damage because of armor (SORRY- i havent WE in english so this is only free translation).......i set that to 0.01 (1%)....bud then i found problem.....the hero get each level (or each time when armor is increased) less and less defence. It means that hero has 100% defence but armor has to be around 1300

- i would like to do it without triggers (i dont have any problems with triggers but because of other systems that i used in my map)

- sorry if this is the wrong forum for this post
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Wrong section.

It is hardcoded into WC3, each armor reduces damage received by 0.01 (in your case) which means 1 armor will let you take 99% damage, 2 armor will reduce that ammout by 1% of that 99% making you take 98.01% of that damage and so on.

[MOVED]

YOU MUST USE TRIGGERS TO DO IT!!!!
The % displayed downthere will be inaccurate, but the damage will work. Use JASS and the unit is damaged event. Everytime the unit takes damage, reduce it by X%.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Here we go... damage formula for positive armor;

[FONT=arial,helvetica](armor*n)/(1+n*armor)

Calculates how much damage should be reduced. The actual damage works out to be

newDamage = initialDamage - initialDamage*((armor*n)/(1+armor*n))

n defaults to .06, but it can be changed in the Gameplay Constants. Try tweaking it until you get a close approximation.
[/FONT]
 
Status
Not open for further replies.
Top