Damage

Note: This section contains speculation and 'best guess' estimates since the actual damage formula is not known. This info should not be considered official or final.
Damage calculation is a complex process that takes multiple steps into consideration.
The game does not provide explicit information, and therefore most of the details here are based on observation and as reliable as possible tests coming from the community, and therefore are subject to debate. It should give a pretty good idea on the importance of the various factors influencing damage. 
=Unit Combat=
In order to understand unit damage, one must understand how unit combat works.
* Combat in Era of Chaos has a real-time nature and therefore units independently attack each other. There is no concept for counter-attacks however, so each individual attack and therefore damage instance is always directed from an attacker to a defender.
* Unit Skills having a damage component are also directional from an attacker towards a defender. The damage component is often part of a more complex set of effects and even damage itself can be extremely varied - single or multiple target, immediate or delayed, one-time or multiple-times, etc. 
* Every attack follows a multi-step pipeline that step by step takes into consideration the different unit stats and specific elements.
==Unit Stats==
Let's have a brief look at the unit stats involved in an attack. You can consult the afferent pages for more specific details and how these stats can either be improved or hindered.
Notice that some stats are strictly associated with the attacker (and hence relevant only for the unit =attacking), while others are strictly taken from the defender (and hence matter only when defending).
Component 	Attacker 	Defender
Damage Base 	Unit ATK (ATK) 	-
Defense 	Penetration (DP) 	Unit DEF (DEF)
Emblem Modifier	Emblem ATK (EATK) 	Emblem DEF (EDEF)
Hero Modifier 	Hero ATK (HATK) 	Hero DEF (HDEF)
Damage Modifier	Unit Damage (UDMG) 	Unit Damage Reduction (UDR)
Critical Hits 	Critical Hit (CRH)Critical Damage (CRD)	Tenacity (TEN)
Attack Evasion 	Accuracy (ACC) 	Dodge (D)
True Modifier 	- 	Damage Reduction (DR)
Skills will generally apply an extra modifier to the ATK. The two can be combined to result in a new "ATK" base for the damage calculation.
Note: While we do not mention Attack Speed anywhere, it is obvious that more often a unit attacks, the higher its damage over time will be.
==Attack Steps==
1. The system determines whether the attack hits or is dodged.
This roughly involves a function that subtracts accuracy from dodge, converts into a dodge chance, that then is subject to a die roll to determine a successful dodge (miss). 
In case of miss, the attack ends and no damage is dealt. Otherwise continue to the next step.
2. The system determines whether a Critical Hit occurs.
This involves an unknown function that using tenacity and Critical Hit stats and results in a crit chance. (Tenatatively, experiments suggest every 200 points roughly translates to 10% chance to crit. Exact interaction with tenacity is unknown)
In case of success, critical damage will be considered for the damage calculation.
3. Calculate damage. Let's first have a look at the formula below:
Damage = ATK \cdot \sum Modifiers \cdot (1-DR)
Modifier_{DEF} = (1 - f_{DEF}(DEF - DP)) 
Modifier_{Emblem} = (1 + f_{EMB}(EATK-EDEF))
Modifier_{Hero} = (1 + f_{HER}(HATK-HDEF))
Modifier_{DMG} = (1 + (UDMG - UDR))
Let's take a look at it one term at a time:
* ATK represents the base of the damage. Assuming no other modifiers whatsoever, the two would be equal.
* All the other terms ultimately act as damage % modifiers. If the value is greater than 1 it will behave as a damage increase, otherwise as damage reduction.
* UDMG and UDR act as percentage modifiers.
* DEF is not simply subtracted from ATK - the two are of vastly different magnitudes. It seems to be passed instead through a function that converts it into a "damage reduction" percentage.
* HATK/HDEF and EATK/EDEF work in pairs and since they are of similar magnitude, it seems very likely the two are subtracted and the result passed to some function. (some community experiments suggest that every 100 points of Hero Stats roughly behave as a 10% modifier)
* The maximum UDR is capped at 80% after all bonuses and penalties have been applied. Other caps are not known.
4. In case of a critical hit, multiply the damage calculated above by the CRD percentage. The resulting value is the damage dealt during the attack.
=Spell Effect=
Damage dealt by spells is simpler to calculate because there are not that many stats involved:
Component 	Caster 	Target Unit
Damage Base 	Base Spell Damage (BSD)	-
Hero Modifier 	Hero INT (INT) 	Hero KNW (KNW)
Damage Modifier	Hero Spell Damage (SD) 	Unit Magic Resistance (MR)
True Modifier 	- 	Damage Reduction (DR)
We then adapt the formula above as follows:
Damage = BSD \cdot \sum Modifiers \cdot (1-DR)
Modifier_{Magic} = (1 - (SD - MR))
Modifier_{Hero} = (1 - f_{HERO}(INT - KNW)) 
Modifier_{DMG} = (1 + (UDMG - UDR))
Since MR has usually far smaller values than SD multipliers, it becomes quickly apparent why MR is not such an impressive stat, and while however true Damage Reduction is so potent.
=Percent Damage=
Some spells and unit skills may have a % of unit Max HP damage component. This is similar in both cases:
* The base of the damage (SBD or ATK) is based on the % of the unit's Max HP instead.
* Some effects cap this value based on specific formulas (that may or may not be made explicit in the text - see Solmyr's Ability as an example). In case of a cap, the base of the damage will be adjusted to never exceed this cap.
* The rest of the steps are followed as usual - % HP (after cap) is still subject to Magic Resistance, Damage Reduction etc. 
* If a skill or spell feature both flat and % damage, they are first added up by the system in a single SBD or ATK value, which then goes through the formula as usual.
Category:Units