• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

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
 
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%.
 
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.
Back
Top