Jump to content

Damage types

From Dawn of Embers Wiki

This page explains how damage is worked out when one unit attacks another, and what a unit's damage type does in the current build of Dawn of Embers. It describes only what the game code does today.

Summary

  • Every unit has a damage type: None, Melee, Ranged, Siege, Fire, Water, Earth or Lightning.
  • In the current build, the damage type does not change damage. No unit deals bonus damage to, or takes reduced damage from, any type. The damage type only chooses the attack icon on the unit panel.
  • What decides damage is the attacker's Attack, the target's Defense (armour), a few percentage bonuses, and one building rule: only siege units deal full damage to buildings.

The damage types

Damage type Units
None Villager, Trade Cart, Fishing Ship, Trade Ship, Transport Ship
Melee Swordsman, Spearman, Knight, Lancer, Captain, Warden
Ranged Shortbowman, Longbowman, Crossbowman, Cavalry Archer, War Galley
Siege Battering Ram, Catapult, Trebuchet, Ballista, Cannon Ship
Fire Fire Mage
Water Water Mage
Earth Earth Mage
Lightning Lightning Mage

What the damage type is used for

The unit panel shows an icon beside the Attack number:

  • a siege icon if the unit can siege or its damage type is Siege;
  • otherwise a ranged icon if the unit is ranged, or its damage type is Ranged, Fire, Water, Earth or Lightning (so mages show a ranged icon);
  • otherwise a melee icon.

Nothing else in the game reads the damage type.

How a hit is calculated

A unit attacks once per attack cooldown. The damage is applied on the server at the moment the attack fires. For ranged units, the arrow, bolt or spell that then flies to the target is a visual effect: the damage has already been dealt.

Each attack damages its one target. No area (splash) damage was found in the game code, including for siege engines; this is not yet confirmed in play.

Step 1: the attacker

The attacker's damage starts at its Attack value and is multiplied by:

  1. Combat Offense: the owner's Combat Offense Discipline points, +5% per point in the code default.
  2. Calling bonus, chosen by the unit's role: Infantry and Cavalry use the Calling's melee bonus, Ranged the ranged bonus, Mage the mage bonus. Siege, Support and Villager units get no Calling bonus. See Callings.
  3. Status effects on the attacker, for example Captain's Command (+10% attack near the Captain).
  4. The building rule: if the target is a building and the attacker is not a siege unit, the damage is multiplied by 0.25. A unit counts as siege when its role is Siege or it can siege, except the Ballista, which is treated as anti-unit and takes the 0.25 multiplier. So the Battering Ram, Catapult, Trebuchet and Cannon Ship deal full damage to buildings, and every other unit deals a quarter.

Step 2: the target

The target then reduces the damage. The rule in the game code is:

FinalDamage = max(1, Damage - Defense) x IncomingMultiplier
  • Defense (armour) is subtracted first. A hit always deals at least 1, however high the armour.
  • IncomingMultiplier is then applied:
    • for a unit: the owner's Combat Defense Discipline (5% less damage per point in the code default), never below 0.25;
    • for a building: the owner's Building Defense Discipline (10% per point in the code default) and the Calling's building factor, never below 0.25;
    • times any status effect on the target, for example Captain's Command (10% less damage taken).
  • Buildings have 0 armour: only their hit points and the multipliers above protect them.

No friendly fire

Damage from an ally (or from your own units) never lands. Only attacks between hostile players do damage.

Worked examples

These use the base numbers, with no Disciplines, Calling bonus or status effects.

Attacker Target Working Damage per hit
Swordsman (Attack 14) Spearman (Defense 4) max(1, 14 - 4) 10
Knight (Attack 18) Swordsman (Defense 6) max(1, 18 - 6) 12
Shortbowman (Attack 9) Warden (Defense 12) max(1, 9 - 12) 1
Longbowman (Attack 12) Battering Ram (Defense 10) max(1, 12 - 10) 2
Swordsman (Attack 14) a building (Defense 0) 14 x 0.25 3.5
Battering Ram (Attack 8) a building (Defense 0) 8 (siege: full damage) 8
Ballista (Attack 25) a building (Defense 0) 25 x 0.25 6.25

Because armour is subtracted from every hit, units with a low Attack lose most of their damage against heavily armoured targets, and a unit with a high Attack per hit loses proportionally less.

Planned: a counter system

The game code describes the damage type as meant for a future counter matrix (damage type x armour class, giving a damage multiplier), with every unlisted pair at 1.0 so that the system changes nothing until it is filled in. No such matrix and no armour classes exist in the current build. Until they do, the damage type has no effect on damage.

See also