Post by jonblend on Oct 6, 2024 21:37:54 GMT
I found this formula some time ago on discord. All credits go to the author which I can’t remember now. It aligns with some of my observations but I never put in the time and effort to test it thoroughly. Anyways, here we go:
Damage = f(atk) * f(critical) * f(def) * factors * f(valor) * f(agility)
f(atk) = unit_atk * stacks * adaptability + bonus_atk
Each unit has a atk_low and atk_high. A random number between these borders is picked and used for further calculations. In case of a critical hit, the highest atk value is automatically chosen.
Depending on how many units we stack, different multipliers apply: 1/1.2/1.4 for 1/2/3 stacks.
If a general commands the unit, his adaptability regarding the unit is calculated (see below).
bonus_atk is added, for example from weapons or certain skills.
f(critical) = 1 if no critical hit is scored
f(critical) = the sum of all critical damage increments [for example 1.25 if we have ‘critical dmg +25%]
f(def) = 40/(40+def)
factors is a multiplication of all effects from unit perks, terrain and morale effects as well as generals’ skills
f(valor) = (370+valor)/400
If the attacking unit is commanded by a general (who is not wounded)
f(agility) = 500/(500+agility)
If the defending unit is commanded by a general (who is not wounded)
Critical hit chance and Intelligence
When a general commands the unit, the actual critical hit chance (cc_a) is different from the displayed critical hit chance (cc_d) which is shown in the info screen. The skill ‘precise’ also increases critical hit chance (cc_p).
cc_a = cc_d * [ 1+ (50+intelligence)/500) ] + cc_p
Damage = f(atk) * f(critical) * f(def) * factors * f(valor) * f(agility)
f(atk) = unit_atk * stacks * adaptability + bonus_atk
Each unit has a atk_low and atk_high. A random number between these borders is picked and used for further calculations. In case of a critical hit, the highest atk value is automatically chosen.
Depending on how many units we stack, different multipliers apply: 1/1.2/1.4 for 1/2/3 stacks.
If a general commands the unit, his adaptability regarding the unit is calculated (see below).
bonus_atk is added, for example from weapons or certain skills.
f(critical) = 1 if no critical hit is scored
f(critical) = the sum of all critical damage increments [for example 1.25 if we have ‘critical dmg +25%]
If the attacking unit is commanded by a general (who is not wounded)
f(agility) = 500/(500+agility)
If the defending unit is commanded by a general (who is not wounded)
Critical hit chance and Intelligence
When a general commands the unit, the actual critical hit chance (cc_a) is different from the displayed critical hit chance (cc_d) which is shown in the info screen. The skill ‘precise’ also increases critical hit chance (cc_p).
cc_a = cc_d * [ 1+ (50+intelligence)/500) ] + cc_p
Note: When attacking castle walls, intelligence is not considered; castle walls also have no agility and def=0
HP
HP = unit_HP * stacks * (370 + leadership)/400
Hit points or troops depends on the unit_HP, which can be increased by leveling, stacks ( 1/1.7/2.4 for 1/2/3 stacks) and leadership of the commanding general.