Post by Erich von Manstein on Aug 26, 2018 11:55:45 GMT
Credit to wangchengxy .
The damage will be an integer randomly selected between maxDamage * attackFloatingCoefficient and maxDamage
maxDamage = rounddown(round((stat atk)*100/(100+stat Def)*surprise attack coefficient *weapon to armor coefficient*(crit coefficient + crit medal) * city atk bonus * unit skill coefficient * (1 - fort reduction) * (1 - alert) * (1 - cover) * firing range tech coefficient * princess atk bonus coefficient * princess def bonus coefficient + plain damage, 0) * city def coefficient * unit spilling coefficient, 0)
Stat atk=rounddown((unit base atk+tech bonus+lvl bonus+aura bonus)*(1+rounddown(general battle ability/400),2)+rounddown(general unit ability/400),2)+morale bonus*terrain bonus*country tech bonus)*HP coefficient,0)
Stat def=rounddown((unit base def+tech bonus+skill bonus+aura bonus)*(1+general defense bonus+country tech bonus),0)
Krupp cannon has a chance of regarding enemy stat def as 0 when attacking
.
HP=rounddown((unit base HP+tech bonus+lvl bonus)*(1+ general HP bonus+country tech bonus),0)
Attack floating coefficient: infantry 0.8, cavalry 0.7 artillery 0.6, navy 0.65, fort 0.7, special infantry and cavalry units have 0.05 bonus based on their originals, special artillery and navy units have 0.1.
Crit coefficient: 1.35
city atk bonus for cites lvl 4+ only: against troops: 1+(0.05*(city lvl-3)) against city: 1+(0.02*(city lvl-3))
unit skill coefficient: Grenadier& Old Guards& Horse Grenadier Guard against forts 2.5 Old Guard getting attacked 0.75 Highlander counterattacking cavalry 1.5
Unit spilling coefficient: rocket spilling 0.4 Redshirts second attack& Cossack piercing& Death’s Head Hussar spilling 0.5
firing range tech coefficient: 1 when normal, 0.75 when has additional range
City def coefficient: 0.5 to units with city defense, 1 when the city defense is cracked
; 0.7 for cities with garrison, 1 for cities without
City stat defense: 25+(5*city lvl)
Morale bonus for atk: 1.1 when rising, 0.85 when lowering, 0.7 when double-lowering and below
Morale bonus for def: 0.9 when double-lowering and below
HP coefficient: 50-100%HP: 1 33.33-50% HP: 0.6 0-33.33% HP: 0.4
Lvl bonus(infantry)
Atk bonus every lvl:
1-1-3-5-8
Def bonus every lvl:
1-2-3-5-7
HP bonus every lvl:
3-7-12-18-25
Lvl bonus(cavalry)
Atk bonus every lvl:
1-2-4-6-9
Def bonus every lvl:
2-4-6-8-10
HP bonus every lvl:
3-7-11-15-20
Lvl bonus(artillery)
Atk bonus every lvl:
1-3-6-10-15
Def bonus every lvl:
1-2-3-4-5
HP bonus every lvl:
4-7-10-12-15
Lvl bonus(navy)
Atk bonus every lvl:
2-4-6-9-12
Def bonus every lvl:
1-2-4-6-9
HP bonus every lvl:
3-7-11-15-20
Surprise attack coefficient:
Lvl bonus without moving:
1.01-1.02-1.04-1.06-1.08
Moved hex = 1: +0.04
Moved hex = 2-5: +0.02(moved hex+1)
Moved hex = 5+: +0.12
The damage will be an integer randomly selected between maxDamage * attackFloatingCoefficient and maxDamage
maxDamage = rounddown(round((stat atk)*100/(100+stat Def)*surprise attack coefficient *weapon to armor coefficient*(crit coefficient + crit medal) * city atk bonus * unit skill coefficient * (1 - fort reduction) * (1 - alert) * (1 - cover) * firing range tech coefficient * princess atk bonus coefficient * princess def bonus coefficient + plain damage, 0) * city def coefficient * unit spilling coefficient, 0)
Stat atk=rounddown((unit base atk+tech bonus+lvl bonus+aura bonus)*(1+rounddown(general battle ability/400),2)+rounddown(general unit ability/400),2)+morale bonus*terrain bonus*country tech bonus)*HP coefficient,0)
Stat def=rounddown((unit base def+tech bonus+skill bonus+aura bonus)*(1+general defense bonus+country tech bonus),0)
Krupp cannon has a chance of regarding enemy stat def as 0 when attacking
.
HP=rounddown((unit base HP+tech bonus+lvl bonus)*(1+ general HP bonus+country tech bonus),0)
Attack floating coefficient: infantry 0.8, cavalry 0.7 artillery 0.6, navy 0.65, fort 0.7, special infantry and cavalry units have 0.05 bonus based on their originals, special artillery and navy units have 0.1.
Crit coefficient: 1.35
city atk bonus for cites lvl 4+ only: against troops: 1+(0.05*(city lvl-3)) against city: 1+(0.02*(city lvl-3))
unit skill coefficient: Grenadier& Old Guards& Horse Grenadier Guard against forts 2.5 Old Guard getting attacked 0.75 Highlander counterattacking cavalry 1.5
Unit spilling coefficient: rocket spilling 0.4 Redshirts second attack& Cossack piercing& Death’s Head Hussar spilling 0.5
firing range tech coefficient: 1 when normal, 0.75 when has additional range
City def coefficient: 0.5 to units with city defense, 1 when the city defense is cracked
; 0.7 for cities with garrison, 1 for cities without
City stat defense: 25+(5*city lvl)
Morale bonus for atk: 1.1 when rising, 0.85 when lowering, 0.7 when double-lowering and below
Morale bonus for def: 0.9 when double-lowering and below
HP coefficient: 50-100%HP: 1 33.33-50% HP: 0.6 0-33.33% HP: 0.4
Lvl bonus(infantry)
Atk bonus every lvl:
1-1-3-5-8
Def bonus every lvl:
1-2-3-5-7
HP bonus every lvl:
3-7-12-18-25
Lvl bonus(cavalry)
Atk bonus every lvl:
1-2-4-6-9
Def bonus every lvl:
2-4-6-8-10
HP bonus every lvl:
3-7-11-15-20
Lvl bonus(artillery)
Atk bonus every lvl:
1-3-6-10-15
Def bonus every lvl:
1-2-3-4-5
HP bonus every lvl:
4-7-10-12-15
Lvl bonus(navy)
Atk bonus every lvl:
2-4-6-9-12
Def bonus every lvl:
1-2-4-6-9
HP bonus every lvl:
3-7-11-15-20
Surprise attack coefficient:
Lvl bonus without moving:
1.01-1.02-1.04-1.06-1.08
Moved hex = 1: +0.04
Moved hex = 2-5: +0.02(moved hex+1)
Moved hex = 5+: +0.12