How an attack's damage is computed, straight from the game code
(InfoHelpers.getAttackDamage, Unit.attackUnitStrength /
defendUnitStrength) with every constant from
globalsInt.xml. The full per-unit results are on
Unit Damage & Counters.
The formula
ATK = attacker's strength after all modifiers;
DEF = defender's. When ATK > DEF the result rounds
up; otherwise it rounds down. An even fight deals exactly
6 — three attacks to kill a 20 HP unit. The in-game UI shows
strength to one decimal, but the unrounded value is what's used.
| DEF →ATK ↓ | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3 | 6 | 4 | 3 | 3 | 2 | 2 | 2 | 1 | 1 | 1 | 1 | 1 | 1 |
| 4 | 8 | 6 | 4 | 4 | 3 | 3 | 2 | 2 | 2 | 2 | 1 | 1 | 1 |
| 5 | 10 | 8 | 6 | 5 | 4 | 3 | 3 | 3 | 2 | 2 | 2 | 2 | 2 |
| 6 | 12 | 9 | 8 | 6 | 5 | 4 | 4 | 3 | 3 | 3 | 2 | 2 | 2 |
| 7 | 14 | 11 | 9 | 7 | 6 | 5 | 4 | 4 | 3 | 3 | 3 | 3 | 2 |
| 8 | 16 | 12 | 10 | 8 | 7 | 6 | 5 | 4 | 4 | 4 | 3 | 3 | 3 |
| 9 | 18 | 14 | 11 | 9 | 8 | 7 | 6 | 5 | 4 | 4 | 4 | 3 | 3 |
| 10 | 20 | 15 | 12 | 10 | 9 | 8 | 7 | 6 | 5 | 5 | 4 | 4 | 4 |
| 11 | 22 | 17 | 14 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 5 | 4 | 4 |
| 12 | 24 | 18 | 15 | 12 | 11 | 9 | 8 | 8 | 7 | 6 | 5 | 5 | 4 |
| 13 | 26 | 20 | 16 | 13 | 12 | 10 | 9 | 8 | 8 | 7 | 6 | 5 | 5 |
| 14 | 28 | 21 | 17 | 14 | 12 | 11 | 10 | 9 | 8 | 7 | 7 | 6 | 5 |
| 15 | 30 | 23 | 18 | 15 | 13 | 12 | 10 | 9 | 9 | 8 | 7 | 7 | 6 |
Effective strengths land between these integers all the time — a Hoplite attacking a Horseman in melee is ATK 9 (6 × 1.5 anti-mounted) vs DEF 6 → 9 damage.
Effective strength
Modifiers are additive percentages, gathered separately for the attacking and defending side (all values from the game's XML / source):
- Anti-trait bonuses — the unit's own effects vs the opponent's traits: e.g. Pikeman +100% vs Mounted (melee), Crossbowman +50% vs Melee, Ballista +100% attacking Infantry. These are the counters on the Unit Counters page.
- Promotions & general ratings — each promotion's strength/attack/defense percentages (see Promotions); a general adds rating-driven bonuses.
- Terrain & position — melee attacking across a river −50%; land↔water attacks −50%; per-unit urban/vegetation attack & defense modifiers; fighting in own family territory +10%.
- State — siege that moved this turn (unlimbered) defends at −25%; attacking from hiding +10%; some units gain bonuses vs damaged or general-led targets.
Current HP does not scale strength — a 1 HP Pikeman hits as hard as a fresh one (some attackers carry an explicit vs-damaged bonus instead).
Worked example: Hoplite attacks Horseman
| Hoplite base strength | 6 |
| + Anti-Mounted II (melee, vs Mounted) | +50% |
| Hoplite effective attack | 9 |
| Horseman defense (no modifiers) | 6 |
| Damage: 6 × 9 / 6, rounded up | 9 HP |
The Horseman drops from 20 to 11 HP. Reversed, the Horseman attacking the Hoplite is 6 vs 9 (the anti-mounted bonus also defends in melee): 6 × 6 / 9 = 4 damage — which is why "spear beats horse" is such a hard rule.
Striking back
- Ranged attacks draw no return damage at all.
- Melee defenders deal a flat 1 counter damage per attack (not proportional) — plus 1 more against routed attackers.
- Tactician generals upgrade that to a full counterattack: 100% of the unit's own attack damage.
- Cities defend at
8 + 0.5 × citizens(CITY_STRENGTH_BASE/PER) and units capture at 50% HP.
Attack patterns (Pierce, Cleave, Splash, Circle)
Some units carry an attack pattern on top of the main hit. These are additional small attacks that resolve against adjacent / linear / surrounding tiles. They use the same damage formula but with a reduced effective strength, and the attacker doesn't take return damage from those secondary hits.
- Pierce — Spearman / Pikeman line. Hits the primary target plus the tile behind it.
- Cleave — Axeman / Maceman line. Hits the primary plus the two flanking tiles.
- Splash — Catapult / Trebuchet. Hits a 7-tile cluster.
- Circle — Macedonian Companion / certain elephants. Hits all 6 adjacent tiles.
Per the game data, the secondary-hit strength is the unit's base multiplied by a small percentage (e.g. Pierce I = +25% Pierce damage on top of a flat +1 to the pattern's value).
Rout and routed units
A unit at 0 HP doesn't disappear — it routs, retreats one tile, and becomes unable to attack until rallied. The standard damage formula caps at HP remaining; the killing blow only does enough damage to bring it to 0.
- Units that can't retreat (surrounded, water, ZoC) are destroyed instead.
- A routed unit at 0 HP heals at the active-heal rate next turn (5 HP/turn) once safe.
Constants pulled from XML
These come straight from globalsInt.xml and apply to combat
math globally. Some are display-friendly multipliers; most are integers.
| Constant | Value | Meaning |
|---|---|---|
STRENGTH_MULTIPLIER | 10 | Game-internal strength is 10× the display value. |
ACTIVE_HEAL | 5 | HP healed per turn when not moving / attacking. |
IDLE_HEAL | 1 | HP healed per turn after moving but not attacking. |
UNIT_HEAL_COST | 1 | Cost per HP healed (in Training or Civics, depending). |
COUNTER_CITY_DAMAGE | 1 | Damage delivered to a city per attack against its garrison. |
COUNTER_ROUT_DAMAGE | 1 | Damage applied to a routed unit if attacked again. |
CITY_STRENGTH_BASE | 80 | Base garrison strength for an undamaged city. |
CITY_STRENGTH_PER | 5 | Bonus strength per city level. |
CITY_HEAL_PERCENT_PER_TURN | 5% | City HP healed per turn (peacetime). |
CITY_CAPTURE_DAMAGE_PERCENT | 50% | City damage taken on capture. |
What to read next
- Unit Damage & Counters — full stat cards for every combat unit, including each unit's anti-trait modifiers.
- Unit Counters at-a-glance — the rock-paper-scissors matrix that summarises this page in one grid.
- Promotions — every numeric modifier you can stack onto effective strength.