Evony‎ > ‎Calculators‎ > ‎

Combat Formula

The gadget spec URL could not be found
Definitions
These definitions apply to this post only.

Combat Pair - In a single combat round, one type of your units can target only one type of the enemy's units. I will call these 2 unit types a 'Combat Pair'.

The gadget spec URL could not be found
Attacker
- The unit type that will be attacking. When acting as an attacker, units only deal damage and never take damage.

Defender - The unit type that will be attacked. When acting as a defender, units only take damage and never deal damage.

How to apply the equation
This equation applies to a single round of combat between a combat pair. Both sides execute the equation at the same time so it's fair.
  1. If the enemy is within range, calculate the deaths incurred by your side(You are defender, they are attacker)
  2. If your units are within range, calculate the deaths on the enemy's side (You are attacker, they are defender)
  3. Subtract the deaths from their respective sides
  4. End of the round. If there are survivors on both sides, the combat continues.
Note that in real combat with different types of units, combat pairs change as units move closer to each other.

The Equation

Nd = (Na * Ab * R * A * (1 - D/1000)) / Ld)

Where:
Nd - Maximum number of defenders killed
Na - The number of attackers
A - Attack value of attackers
Ab - Attack bonus (see below)
D - Defenders defense value
R - Ranged damage modifier
Ld - Amount of Life of the defender unit type

The attack, defense and life values can be looked up in the game. The Range damage modifier and attack bonus is explained below.

The maximum number of defenders killed is the number of defender that could possibly die in this combat round. Obviously if there are less defenders than the maximum number killed, then all defenders of that unit type are dead at the end of the round.

Decimal values are round up to the nearest integer. If a unit loses even 1 hit point, that unit is counted as dead and removed from combat in future rounds.

Ranged Damage Modifier
Ranged units do half the damage that melee units do. Here are the modifiers:
R= 0.5 for ranged units (Archer, Ballista, Catapult)
R= 1.0 for melee units (All other units)

Attack Bonus
Depending on the unit type being attacked, there may get be bonus to the attacker's attack value. This table obviously applies to the attackers because defenders don't attack, ie don't look up the defender's attack bonus. Lookup the attacking unit type across the top and match it to the defending unit type along the left. (This table is in HTML so enable HTML if you don't see it).

Defender Type
Attacker Type
Worker Warrior Scout Pikeman Swordsman Archer Cavalry Cataphract Transporter Ballista Battering Ram Catapult
Worker* 0.96 0.96 0.96 0.96 0.96 0.96 0.96 0.96 0.96 0.96 0.96 0.96
Warrior, Swordsman, Transporter, Ballista, Battering Ram, Catapult 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
Scout* 0.97 0.97 0.97 0.97 0.97 0.97 0.97 0.97 0.97 0.97 0.97 0.97
Pikeman 1.00 1.00 1.00 1.00 1.10 1.00 1.00 1.00 1.00 1.00 1.00 1.00
Archer 1.00 1.00 1.00 1.00 1.00 1.00 1.20 1.20 1.00 1.00 1.00 1.00
Cavalry 1.00 1.00 1.00 1.80 1.00 2.00 1.00 1.00 1.00 2.00 1.00 2.00
Cataphract 1.00 1.00 1.00 1.80 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00


I've highlighted the positive bonuses in red. For example, all ranged units do double damage to cavalry, pikemen do 80% more damage to mounted units.

*Special Note: Scouts and workers have strange attack bonuses. It seems like the game doesn't like defense values less than 50. If you round up worker and scout defenses to 50, then their modifiers can be set to 1.00

Derivation
This equation was derived from the rally point exercise. I'm fairly sure that tech levels don't apply to the exercise (or it didn't seem to affect the numbers anyway). It was basically formed from trial and error, alot of graphs and extrapolation. I started with this equation,

Total damage taken = Total damage inflicted - Total damage negated

The gadget spec URL could not be found
Comments