> For the complete documentation index, see [llms.txt](https://unicorn-fight-club.gitbook.io/unicorn-fight-club/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unicorn-fight-club.gitbook.io/unicorn-fight-club/game-mechanics/battle-mechanic-formulas.md).

# Battle Mechanic Formulas

The formulas for the entire battle calculations are created from a value from the Stat Tier from each individual unicorn plus a variable factor for each formula. This will allow us for create tuning updates and metagame changes as frequent as we'd like.

The formulas are as follows:

`physical damage = attacker's attack tier * attack damage factor`

`hit chance = hit chance base + attacker's accuracy tier * hit chance factor`

`physical damage reduction = defense tier * defense factor`

`health = base health + vitality tier * health modifier`

`evade chance = base evade + movement speed tier * evade factor`

`critical chance = attacker's attack speed tier * critical chance factor`

`critical damage bonus = attacker's attack speed tier * critical damage factor`

`magic damage = attacker's magic tier * magic damage factor`

`magic damage reduction = resistance tier * resistance factor`

`net physical damage = (physical damage - physical damage reduction) + critical damage bonus`

`net magic damage = (magic damage - magic damage reduction) + critical damage bonus`

(Note damage reduction does not impact the critical damage. If the damage reduction is greater than the attack itself, it will not further reduce the critical damage. Upon a successful hit + critical chance, the attacker will always deal at least the critical damage bonus amount regardless of how powerful the shield is).
