How to Calculate Damage.

6 posts

Flag Post

People keep asking me how to calculate damages. Here’s what i found.

::::::formula::::::

number of units * damage * (1+|atk-def|/30)^SIGN (atk-def) * (1 + class bonus) * (1 + feature bonus) * (1 – resistance) * (1 – Ranged unit’s Penalty)

::::::terms::::::

number of units : number of attacker’s units.

damage : damage of attacker. if attacker’s damage range is 10-14, that means it has 20% chance to deal one of 10,11,12,13 or 14 damage.

atk : attacker’s attack stat

def : defender’s defense stat
| x | : Absolute number of x ( x if x>=0 else -x)

SIGN x : sign of x (1 if x>0, 0 if x=0, -1 if x<0)

class bonus : Look at the diagram in army management screen. Outer arrow gives 15% bonus and inner arrow gives 7%. i.e) Healer deals 15% more dmg against mage, 7% more against defender, no bonus for others

feature bonus : some units have features. i.e)gunners have Heavy Missile, which gives 15% bonus on them against any immortals.

resistance : defender’s resistance for attacker’s attack type. Assassins have physical damage type, and Paladins have 40% physical resistance. so 40% of damage diminishes when assassins attack paladins.

Ranged Unit’s Penalty : Ranged unit deals 50% less damage on the targets out of their range, 30% less for targets next to it.

::::::Example::::::

when 50 druids attack Zombies next to them.(both of them have no items, and aren’t upgraded)

50 * (11~13) * ( 1 + |9(druid attack) – 10(Zombie’s defense)|/30)^SIGN (9-10) * (1 + 7%(Healer’s class bonus on Defender)) * (1+ 15%(druid’s Surge of Power feature bonus)) * (1 – 0%(Zombie’s magical resistance is 0)) * (1-30%(ranged units’ penalty when they attack units next to them))

= 50 * (11~13) * (1+ 0.0333)^-1 * 1.07 * 1.15 * 1 * 0.7
= (11~13) * 41.835
= 460.185~543.855
= 460~544(rounded)

if it crits, it deals 1.5X damage.
so it’s gonna be like..

460 dmg : 31.67%
502 dmg : 31.67%
544 dmg : 31.67%
690 dmg : 1.67%
753 dmg : 1.67%
816 dmg : 1.67%

If you find this formula doesn’t work for you, inform me what you found.
(but you’d better review it several times, since i tested it more than a hundred times. I found some round-up problems, which make around 0.05%~0.1% error. but I’m never gonna try to find out what’s wrong with it. :p )

 
Flag Post

This is really useful, thanks alot for posting it!

 
Flag Post

Very useful. Thx

 
Flag Post

Great stuff. More people should see it.

 
Flag Post

Mother f+ckers!!! XD

The formula is wrong, mistyped. Is not divided by 30 but by 300! Change it or someone will go crazy.

 
Flag Post
Originally posted by Baldurga:

Mother f+ckers!!! XD

The formula is wrong, mistyped. Is not divided by 30 but by 300! Change it or someone will go crazy.

Did you notice the date of the first post? Back then all these attributes had 1 or 2 digits only (for example a champ mail would give +4 defence while now gives +41) . After a patch, a year ago, Nival raised the attributes (added a digit) so as to be more precise. It was with the patch that also raised the upgrades of creatures from 5 to 15.