Combat Calculations

Combat Calculations are used to determine the damage effects of Statuses and Skills while fighting.

Skill Use
Spell Skills, Melee Attack Skills, and Throwing Attack Skills are affected by Cast Speed, Melee Attack Speed, and Throwing Attack Speed respectively which increase the rate at which these abilities can be used, both by reducing the duration of their animations and by reducing the time between successive uses.

$$Attack/Cast Rate = Base Animation Speed * (1+Cast Speed/Melee Attack Speed/Throwing Attack Speed)$$

Targeted skills from Non-Player Characters affected by Blind have a chance to fire in a random direction away from their target.

Damage conversion
Damage conversion only applies to base damage. For example you have the following attributes


 * 100% increased physical damage (passive tree)
 * 50% increased fire damage (passive tree)
 * +10 base physical damage (skill modifier)
 * All damage is converted to fire damage (skill modifier)

A simplified calculation for a skill that does 40 physical damage would be:

$$(40+10) * (1+ 0.50) = 75$$ fire damage

Hits
Hits can only be made by skills, Damage Over Time cannot be a hit. Once a hostile skill Area of Effect lands in a Characters hit box the game goes through the following calculations in order to determine if and how much damage a character receives:


 * 1) Dodge chance is rolled to determine if the hit lands. If the hit is dodged no further calculations are made. If the dodge is unsuccessful, the rest of the calculations occur. Any "On Hit" effects are triggered.
 * 2)  are used to determine the types and amount of damage dealt.
 * 3)  are used to determine how much damage is mitigated, and thus the damage left over is taken.
 * 4)  will deal damage to characters and determines if they are killed, resulting in 'on kill' and 'on death' effects.

Damage From Other Sources
Damage can be given from sources other than a hit, usually from Statuses or Damage over Time Skills.


 * 1)  are used excluding Critical Strike Chance
 * 2)  are used excluding Block Chance, Chance to Recieve a Glancing Blow
 * 3)  used the same as for hits

Offensive Calculations
Damage dealt from a hit, Damage Over Time effect, or other direct damage source is calculated separately for each of the Damage Types dealt.

$$Damage Dealt = Damage Type A + \ldots + Damage Type N$$

Total Base Damage
Damage from each damage type is further modified first by changes to the base damage including:


 * On a hit, the Critical Strike Chance or Melee Critical Strike Chance is rolled to determine if the hit is critical or not. If the hit is critical it increases the base damage by the Critical Strike Multiplier.

$$Base Damage on Critical = Critical Strike Multiplier * Base Damage$$


 * All other base damage multipliers for the given Damage types and Skill Type are multiplied by the base damage.

$$Modified Base Damage = Base Damage * Base Damage Multiplier$$


 * Added damage is multiplied by added damage effectiveness multipliers and added to the base damage
 * Flat added damage on skill trees (e.g. 6 fire damage for sacrifice) is added base damage. It'll affect the damage split of any adaptive spell damage applied to sacrifice.
 * For adaptive spell damage, if a skill has 7 base fire damage and 3 base lightning damage, then 70% of the adaptive spell damage will be fire damage and 30% of it will be lightning damage. )

$$Modified Base Damage = Base Damage + (Added Damage * Added Damage Effectiveness) $$

The resulting Total Base Damage is given by the following calculation:

$$Total Base Damage = (Base Damage * Base Damage Multiplier * Critical Strike Multiplier) + (Added Damage * Added Damage Effectiveness) $$

Damage Modifiers
Modifiers which Increase or reduce a damage type are additive within two different categories:
 * 1) Global Increase/Reduction modifiers which include those gained from Passives, Equipment, Statuses, increases from stats (e.g. 4% damage per point of strength for swipe) and skill nodes which grant Global Increased Damage.
 * 2) Local Increase/Reduction modifiers which include only those gained from nodes on the specific skill that is dealing damage.

$$Modified Damage Dealt = (1 + Local Increase Modifiers - Local Reduce Modifiers) * (1 + Global Increase Modifiers - Local Reduce Modifiers) * Total Base Damage$$

Modifiers which give more or less of a Damage Type are multiplicative. Each modifier is multiplied separately alongside the base damage. $$Modified Damage Dealt = More Modifier * Less Modifier * Base Damage$$

Finally all damage is scaled randomly between -25% and +25%.

$$Randomized Damage = Damage Dealt * (1-[{-.25}\cdots{.25}])$$

All together the modifiers result in the following calculation for each damage type:

$$Total Damage Dealt = (1-[{-.25}\cdots{.25}]) * (1 + Local Increase Modifiers - Local Reduce Modifiers) * (1 + Global Increase Modifiers - Local Reduce Modifiers) * (Total Base Damage) * (More Modifier) * (Less Modifier)$$

Defensive Calculations
Once damage is received Block Chance is rolled to determine if Block Armor and Block Protection are added to the base Protections. On a successful block roll "On Block" effects are triggered.

For each type of damage received it is mitigated by the Protections for each damage type.

For unblocked damage:

$$Damage Mitigated = Damage Dealt * \frac{Protection Amount - Penetration Amount}{Max Health + Current Ward + \left | Protection Amount - Penetration Amount \right |}$$

For blocked non-physical damage:

$$Damage Mitigated on Block = Damage Dealt * \frac{Protection Amount + Block Protection - Penetration Amount}{Max Health + Current Ward + \left | Protection Amount + Block Protection - Penetration Amount \right |}$$

For blocked physical damage:

$$Damage Mitigated on Physical Hit Block = Damage Dealt * \frac{Protection Amount + Block Protection - Penetration Amount}{Max Health + Current Ward + \left | Protection Amount + Block Protection + Block Armor - Penetration Amount \right |}$$

Additionally Chance to Receive a Glancing Blow reduces damage taken by 50% on a successful roll.

Reduced Damage Taken will further scale damage multiplicatively with each source.

$$Damage Taken= (Damage Received - Damage Mitigated) * (.5 if Glancing) * Reduced Damage Taken * Reduced Damage Taken $$

Damage Taken Calculations
Once damage is taken the amount is subtracted from If the characters health drops to 0 or lower they are killed.
 * 1) The characters Ward
 * 2) Percent dealt to mana equal to the Damage Dealt to Mana Before Health modifier
 * 3) The characters Health