Talk:Gate (Age of Empires II)/@comment-31836517-20170716185442/@comment-27274076-20170716191319

The +20 in brackets mean that all units that have an attack bonus against the building armor class will have that bonus reduced by 20 when attacking Gates. If the attack bonus is lower than 20, it is erased completely. However, this does not affect base damage or other armor classes in any way.

The reason why Villagers deal 6 damage is quite simple:
 * The Villager has 3 melee attack, 6 against stone defense, and 3 against buildings.
 * The Gate has 6 melee armor, 0 stone defense armor, and 20 building armor.
 * So for melee we get 3 attack - 6 armor = -3 -> erased
 * For stone defense we get 6 attack - 0 armor = 6
 * For building we get 3 attack - 20 armor = -17 -> erased
 * The total damage is just a flat additive of the three sums where negative sums are rounded up to zero.
 * So we get a total damage of 0 (rounded up from -3) + 6 + 0 (rounded up from -17) = 6 damage.

In short, the melee and building attack are negated entirely, and the 6 damage result of the attack bonus against stone defense alone.