Attack

A unit's attack power is how much damage it can inflict upon an opponent. There are different attack types corresponding to different types of units or buildings.

In Age of Empires III there are three attack types, melee, ranged and siege. All of which are capable of damaging enemy units and buildings if the attack can be used to target that unit or building. Siege attacks ignore all melee and ranged damage resistance on both units and buildings.

Age of Empires
In Age of Empires, all units and buildings with a nonzero attack deal either normal damage (resisted by melee armor) or pierce damage (resisted by pierce armor) except the Catapult Trireme and Juggernaut, which deal damage of a special, unresisted category.

The damage formula is:

$$Damage = \max(1, (\max(0, Attack - Armor) + \max(0, AttBonus - BonusRes)) \times ElevMult)$$

where the elevation multiplier (applied to both cliffs and hills) is 2/3 if a melee unit attacks below its target, 3/2 if a ranged unit attacks above its target or 1 otherwise.

Age of Empires II
Age of Empires II reuses the attack system of its predecessor. Fire Ships mainly deal pierce damage, but they also deal an extra 1 melee damage per flame (hidden).

The damage formula is

$$Damage = \max(1, (\max(0, Attack - Armor) + \max(0, AttBonus - BonusRes)) \times ElevMult)$$

where the elevation multiplier is 5/4 if a unit attacks above its target (hills and cliffs), 3/4 if a unit attacks below its target (hills only) or 1 otherwise. For units which deal several types of damage, only positive results are retained.

Age of Mythology
Age of Mythology uses a brand-new damage system, based around three types of damage: hack damage, pierce damage and crush damage. Generally, infantry (including Throwing Axemen), cavalry and hammer ships deal hack damage; archers, arrow ships and buildings deal pierce damage; siege weapons and siege ships deal crush damage. Myth units deal either hack or pierce damage, sometimes combined with crush damage.

The damage formula (per strike) is

$$Damage_{h/p/c} = \max(1, Attack_{h/p/c} \times (1-Armor_{h/p/c}) \times AttBonus \times ElevMult \times AttInterval)$$

where the elevation multiplier is 5/4 if a unit attack above its target, 3/4 if a unit attacks below its target or 1 otherwise. For units which deal several types of damage, the total damage per strike is the sum of the different damage categories of the attacker.