## The Formula[]

The damage is calculated in many steps. And in the end the game puts together the pieces and outputs your damage. For this formulas we use the following syntax:

- [x] = indicates a round down on x. [1.99] = 1
- MIN(x, y) = the smaller value. MIN(1, 10) = 1
- x% = percent values are used as real values. 20% haste = 0.2
- SPEC = WEAPON_SPEC + RR_BONUS + ITEM_BONUS
- RANDOM(x) = generates a random integer number 0 to x but is never equal to x. RANDOM(3) = 0, 1 or 2

### Damage Modifier[]

There are 3 different type of weapons out there. Each has it's own **STATS** calculation.

Strength weapons: (Slash, Crush, ...)

STATS = [STRENGTH / 2]

Dexterity weapons: (Staff, Crossbow, ...)

STATS = [DEXTERITY / 2]

Strength + Dexterity weapons: (Thrust, Flexible, ...)

STATS = [([STRENGTH / 2] + [DEXTERITY / 2]) / 2]

Your enemies armor piece that is going to be hit.

ENEMY_ARMOR = (20 + (ITEM_USEABLE_AF + (ENEMY_SPEC_AF_BONUS / 5) + (ENEMY_TOA_AF_BONUS / 5)) * ITEM_QUALITY * ITEM_CONDITION) / (1 - ITEM_ABSORB)

And finally:

DAMAGE_MODIFIER = LEVEL * DAMAGE_TABLE / 10 * (1 + 0.01 * STATS) * (0.9 + 0.1 * MAX(1, STRENGTH_RELIC_COUNT)) * (0.75 + 0.5 * MIN(ENEMY_LEVEL + 1, SPEC - 1) / (ENEMY_LEVEL + 1) + 0.01 * RANDOM(50)) / ENEMY_ARMOR * (1 - ENEMY_BUFFED_ABSORB) * (1 - ENEMY_RESISTANCE)

If DAMAGE_MODIFIER is greater then 3 it's caped down to 3.

RANDOM(50) can be 0, 1, 2, ... , 49 it is randomly selected with each swing.

### DPS[]

TWOHANDBONUS = 1.10 + 0.005 * SPEC or = 1.00 if it's no two handed weapon at all.

DPS = [[[[[WEAPON_DPS * WEAPON_SPEED * 10] * (0.94 + WEAPON_SPEED * 0.03)] * (1 + 0.01 * MYTHICALDPS)] * TWOHANDBONUS] * (1 + 0.01 * TOA_MELEE_DAMAGE] / 10

Banespike will increase the DPS * 1.15.

### Swing Speed[]

SWING_SPEED = [[[WEAPON_SPEED * 100 * (1 – (MIN(250, QUICKNESS) – 50) / 500)] * (1 – HASTE – CELERITY)] * (1 – TOA_MELEE_SPEED)] / 100

If SWING_SPEED smaller then 1.5 then it's caped to 1.5.

### Base Damage[]

equals to unstyled damage

BASE_DAMAGE = DAMAGE_MODIFIER * DPS

### Style Damage[]

STYLE_DAMAGE = (STYLE_BASE + (SPEC - STYLE_LEVEL) * STYLE_GROWTH) * SWING_SPEED * DAMAGE_MODIFIER / 10 + BASE_DAMAGE * TOA_STYLE_BONUS

Where STYLE_BASE, STYLE_LEVEL and STYLE_GROWTH are taken from the style.

### Total Damage[]

TOTAL_DAMAGE = BASE_DAMAGE + STYLE_DAMAGE

## Other Formulas[]

### Chance To Hit Armor Piece[]

40% Body 25% Legs 15% Arms 10% Head 5% Feet 5% Hand

### Displayed Armor Factor[]

ARMOR_LEVEL = USEABLE_ITEM_LEVEL_BODY * CHANCE_TO_HIT_BODY + USEABLE_ITEM_LEVEL_LEGS * CHANCE_TO_HIT_LEGS + USEABLE_ITEM_LEVEL_ARMS * CHANCE_TO_HIT_ARMS + USEABLE_ITEM_LEVEL_HEAD * CHANCE_TO_HIT_HEAD + USEABLE_ITEM_LEVEL_FEET * CHANCE_TO_HIT_FEET + USEABLE_ITEM_LEVEL_HAND * CHANCE_TO_HIT_HAND

ARMOR_ABSORB = ITEM_ABSORB_BODY * CHANCE_TO_HIT_BODY + ITEM_ABSORB_LEGS * CHANCE_TO_HIT_LEGS + ITEM_ABSORB_ARMS * CHANCE_TO_HIT_ARMS + ITEM_ABSORB_HEAD * CHANCE_TO_HIT_HEAD + ITEM_ABSORB_FEET * CHANCE_TO_HIT_FEET + ITEM_ABSORB_HAND * CHANCE_TO_HIT_HAND

ARMOR_FACT = 10 * ARMOR_LEVEL * (1 + ARMOR_ABSORB)

## Results of this Formulas[]

### Mythical Item Select[]

There is a big difference between how mythical DPS and Strength are granting you extra damage. DPS is giving you this damage bonus on unstyled damage in any case, while Strength will only give you this bonus if you do not already hit for cap damage!

If you use styles, things are getting a bit more complicated. That is because mythical DPS and Strength are applied to different parts of the damage calculation that have a different impact on style damage.

**Mythical DPS:** Is only increasing the style damage obtained by "TOA Style Damage" bonus.

**Mythical Strength:** Is increasing both the style damage gained by growth rate and "TOA Style Damage". However this only happens if you do not already hit for cap damage!

Weapon Speed (of the weapon you use) |
+2 DPS Mythical (equipped Myth.) |
Strength (With Buffs and Equip) |
+8 Strength Mythical (equipped Myth.) | |
---|---|---|---|---|

1.5 | 8.20% | 50 | 3.20% | |

1.6 | 7.67% | 60 | 3.08% | |

1.7 | 7.19% | 70 | 2.96% | |

1.8 | 6.77% | 80 | 2.86% | |

1.9 | 6.40% | 90 | 2.76% | |

2.0 | 6.06% | 100 | 2.67% | |

2.1 | 5.75% | 110 | 2.58% | |

2.2 | 5.48% | 120 | 2.50% | |

2.3 | 5.22% | 130 | 2.42% | |

2.4 | 4.99% | 140 | 2.35% | |

2.5 | 4.78% | 150 | 2.29% | |

2.6 | 4.58% | 160 | 2.22% | |

2.7 | 4.40% | 170 | 2.16% | |

2.8 | 4.23% | 180 | 2.11% | |

2.9 | 4.07% | 190 | 2.05% | |

3.0 | 3.92% | 200 | 2.00% | |

3.1 | 3.79% | 210 | 1.95% | |

3.2 | 3.66% | 220 | 1.90% | |

3.3 | 3.54% | 230 | 1.86% | |

3.4 | 3.42% | 240 | 1.82% | |

3.5 | 3.31% | 250 | 1.78% | |

3.6 | 3.21% | 260 | 1.74% | |

3.7 | 3.12% | 270 | 1.70% | |

3.8 | 3.03% | 280 | 1.67% | |

3.9 | 2.94% | 290 | 1.63% | |

4.0 | 2.86% | 300 | 1.60% | |

4.1 | 2.78% | 310 | 1.57% | |

4.2 | 2.71% | 320 | 1.54% | |

4.3 | 2.64% | 330 | 1.51% | |

4.4 | 2.57% | 340 | 1.48% | |

4.5 | 2.51% | 350 | 1.45% | |

4.6 | 2.44% | 360 | 1.43% | |

4.7 | 2.39% | 370 | 1.40% | |

4.8 | 2.33% | 380 | 1.38% | |

4.9 | 2.28% | 390 | 1.36% | |

5.0 | 2.22% | 400 | 1.33% | |

5.1 | 2.17% | 410 | 1.31% | |

5.2 | 2.13% | 420 | 1.29% | |

5.3 | 2.08% | 430 | 1.27% | |

5.4 | 2.04% | 440 | 1.25% | |

5.5 | 1.99% | 450 | 1.23% | |

5.6 | 1.95% | 460 | 1.21% | |

5.7 | 1.91% | 470 | 1.19% | |

5.8 | 1.88% | 480 | 1.18% | |

5.9 | 1.84% | 490 | 1.16% | |

6.0 | 1.80% | 500 | 1.14% |

For example, if your character uses a weapon with 4.0 speed and has a strength value (same for dexterity based weapons with dexterity) of 400. Then equipping a +2DPS Myth will grant you 2.86% extra unstyled damage, while equipping a +8 strength Myth will only give you 1.33% extra unstyled damage.

## Questions[]

**Why do this formulas do not match the ingame values exactly?**

There are simply to many ways to do math calculations within computer programs. The round down and float / double values nearly make it impossible to figure them out correctly. An easy example on the float / double stuff: [0.57 * 100] / 100 = 0.56 this looks like an math error, but this is how it's done. And every single multiplication can be infected by such an error. The result is that this formulas only get very close to the real result, but do not match the exact round down and floor / double transformations.

**Sometimes there are very high resistance and or style damage values. Why?**

The game itself does not apply any caps to the display of (+Style Damage) and (-Resistance). It's for example calculating with a weapon that has 1.0 sec swing speed. Same for the Cap of 3 for the DAMAGE_MODIFIER, all caps are only applied to the total damage display.