Saturday, 13 February 2016

From Mace to Face...

I've recoverd this from the Way Back Machine and am posting for posterity and reference..... it's not by me but by I guy called Rok. It's how damage in WAR was calculated, in 2009 at least. I am going to make an online calculator and will use this as reference.



Meet Tanky
Meet Tanky. Tanky doesn’t like to be hit with things and protects himself as much as possible. Let’s see what happens when we attack him.


Step 1: Did Tanky Block?
Tanky likes to carry around a shield that he tries to put between himself and harm’s way. If he manages to do so he Blocks and the attack is stopped. This shield has a Block Rating and the higher it is the better his chance to Block. However the stronger the attack the lower Tanky’s chance to block. If you’re attacking with a melee weapon, spell or ranged weapon you will be using your Strength, Intelligence or Ballistic Skill respectively to overcome the shields Block Rating. Any other bonuses or penalties are added after that’s worked out, for example some gear helps you block better and two-handed melee attacks reduce Tanky's chance to Block by 10%.

[defenders block rating] / [attackers damage stat] * 40 + [defenders '+ block' bonuses] - [attackers 'reduced chance to be blocked'] = Block %


Step 2: Did Tanky Parry/Dodge/Disrupt?
Tanky’s a clever fellow and has discovered that he can avoid getting hurt be getting out of the way of things. He’s learned to deflect melee attacks with his weapon (Parry) which comes from his Weapon Skill, jump out of the way of arrows (Dodge, sometimes called Evade) thanks to Initiative and shrug off magical attacks (Disrupt) due to his Willpower. If he manages to do this, the attack is stopped. As with Blocking, Tank’s chance to Parry, Dodge or Disrupt is reduced by your Strength, Ballistic Skill or Intelligence. Any other bonuses or penalties are added after that’s worked out, for example dual-weilding would give Tanky a 10% bonus to Parry and two-handed melee attacks reduce Tanky's chance to Parry by 10%.

[defenders weapon skill] / [attackers strength] * 15 + [defenders '+ parry' bonuses] - [attackers 'reduced chance to be parried'] = Parry %
[defenders willpower] / [attackers intelligence] * 15 + [defenders '+ disrupt' bonuses] - [attackers 'reduced chance to be disrupted'] = Disrupt %
[defenders initiative] / [attackers ballistic skill] * 15 + [defenders '+ dodge' bonuses] - [attackers 'reduced chance to be evaded'] = Dodge %


Step 3: What did you hit with?
If you’ve come this far then you’ve hit Tanky! How much damage you’re going to do depends on what you hit him with. Your attack has an initial damage shown on its tooltip. It will also do additional damage if you’re attacking with a Ranged or Melee weapon based on that Weapons DPS. Each attack has a unique coefficient for your weapons damage bonus, and while it is often the same as the cast time of the attack (or 1.5 for instant casts) this is not always the case. The Weapons DPS is increased by this coefficient.
Sometimes you’ll just be attacking automatically with your weapon, this is called auto-attack. Auto-attack has no tooltip damage and its coefficient is always your weapons speed.

[attacks tooltip damage] + [attackers weapon DPS] x [attacks weapon coefficient] = Base Damage


Step 4: So you’ve got two weapons hu?
So you thought you were clever did you, bring two swords to a knife fight? Well if you’ve attacked Tanky with an ability both weapons will add damage, however the off-hand weapon won’t add as much.

[attacks tooltip damage] + ([attackers main-hand weapon DPS] +[attackers off-hand weapon DPS] x 0.45 ) x [attacks weapon coefficient] = Base Damage

If you’re auto-attacking you will only hit with the main-hand weapon but every time that happens you have a 50% chance to hit with the off-hand weapon too. In this case the off-hand weapon deals its damage separately.

([attackers main-hand weapon speed] - [attackers off-hand weapon speed]) x [attackers off-hand weapon DPS] + [attackers off-hand weapon DPS] x [attackers off-hand weapon speed] x 0.9 = Off-Hand Base Damage


Step 5: How hard did you hit?
Tanky is Tough but you’re no slouch either. If you’re stronger, smarter or a better shot than Tanky is tough you’re going to do extra damage…but if he’s tougher then you’re going to do less damage. Luckily, no matter how tough Tanky is your attack’s Base Damage can’t be reduced below half by that toughness. So this time it’s your Strength (for melee), Intelligence (for spells) and Ballistic Skill (for ranged weapons) reduced by Toughness. You can also get bonus melee, magic or ranged damage on some items. These bonuses are all modified by the abilities stat coefficient which, like the attacks weapon coefficient is often the same as the cast time but with many exceptions. Again, auto-attack damage uses the weapons speed as it’s stat coefficient.

[attacks stat coefficient] x ([attackers strength, intelligence or ballistic skill] + [attackers bonus melee, magic or ranged damage] - [defenders toughness]) = Stat Bonus

[base damage] + [stat bonus] / 5 = Raw Damage (for abilities)
[base damage] + [stat bonus] / 10 = Raw Damage (for auto-attack or main-hand auto-attack)
[base damage] + [stat bonus] / 20 = Raw Damage (for off-hand auto-attacks)
Total Damage cannot be lower than half Base Damage


Step 6: How about % bonuses?
The damage you deal to Tanky is sometimes affected by % modifiers. Maybe someone is Guarding Tanky (-50%) or maybe you have a tactic like Divine Fury (+25%). These bonuses always add together before being applied.

[total damage] x (1 + [% penalties] + [% bonuses]) = Modified Damage


Step 7: Did you hit him where it hurts?
Sometimes when you attack Tanky you will hit him where it really hurts, which means you’ll do around half again more damage. This is called a crit. Your chance to crit Tanky is based on his Initiative. The more he has the less chance you have of critting. You can also get crit bonuses that add on top of that chance and he can get -crit to counter you.

([attackers level] x 7.5 + 50) / [defenders initiative] x 10 = % Crit Chance


Step 8: How much more did that crit hurt?
Ooomf! Right in the jibblies!
If you’ve crit Tanky you’re going to do more damage. The exact amount is randomised between 40% and 60% extra damage so we like to average it out to 50%. You can also get bonuses that increase your crit damage. These are added on top of that 50%.

[modified damage] x (1.5 + [attackers % crit damage bonus]) = Crit Damage


Step 9: Hang on, what’s this bubble about?
A sneaky goblin has put a bubble around Tanky and now you can’t hurt him! Luckily the bubble can only take so much, prick it enough and it will pop so keep attacking.
Damage absorb spells like this can only absorb a flat amount of damage which is listed on the tooltip. After this they are used up.

If [modified damage] or [crit damage] is less than [ spell’s absorb amount] then:
[spell’s absorb amount] - [damage] = Spell’s New Absorb Amount, no damage dealt.
Otherwise:
[damage] - [spell’s absorb amount] = Post-Absorb Damage, and the damage absorb spell is gone.


Step 10: What about all that stuff he’s wearing?
You hit Tanky and hit him good! Unfortunately he’s wearing slabs of metal from a military scrap yard. Clang!
Tanky has Armor and Resistances and they reduce the damage you do by a percentage. Armor stops physical attacks while Resistance stops magical attacks. There are three kinds of resistance: Spirit, Elemental and Corporeal. If your ability is one of these three it will say which kind on the tooltip, otherwise it’s a physical attack.
If you’re attacking with a physical attack your Weapon Skill lets you find the weak points in Tanky’s armor, this is called Armor Penetration. Tanky can also get bonuses that reduce your armor penetration. If you’re casting a spell on Tanky there is no stat to reduce his resistances. Neither Armor or Resistance can go above 75% (after all modifiers are applied) and both can be reduced by certain spells and effects. Resistances are further soft capped: After 40% they are less effective per point of resistance.

For Armor:
[defenders armor] / [attackers level] / 110 = Armor Mitigation %
[attackers weapon skill] / ([defenders level] x 30 + 200) = Armor Penetration %
[defenders armor mitigation] x (1 - [attackers armor penetration] + [defenders anti-armor penetration]) can’t be greater than 0.75

[post-absorb damage] x (1 - ([defenders armor mitigation] x (1 - [attackers armor penetration] + [defenders anti-armor penetration]))) = Final Damage

For Resistance:
If [defenders resistance] / [attackers level] is equal to or less than 16.8 then:
[defenders resistance] / [attackers level] / 42 = Resistance Mitigation %
Otherwise:
([defenders resistance] - [attackers level] x 16.8) / [attackers level] / 126 + 0.4 = Resistance Mitigation %
[resistance mitigation] can’t be greater than 0.75 (75%)

[post-absorb damage] x (1 - [defenders resistance mitigation]) = Final Damage


Step 11: Take that Tanky!
You did it! Tanky’s health bar is reduced by the damage you dealt. Lucky for Tanky he’s got plenty of health due to his high wounds.

[wounds] x 10 = Health Total
[defenders health total] - [final damage] = Defenders new health total



So there you have it, easy as that