Armor and attack classes
I’m assuming you are familiar with how damage is calculated in Age of Empires II. For extra reference, see this page.
Implementing attack and armors is very simple and also allows for a lot of fine tuning. In the units tab you can see two lists, “Attacks” and “Armors”, displaying all the varios armor classes a unit does damage against or has. Appart from those there is the field “Shown Attack”, “Shown Melee Armor” and “Shown Pierce Armor”, for the stats you see in the game. Also note “Base armor”, a default armor for when the game doesn’t find the class in the list on the left; it’s value is very high so that every attack that shouldn’t produce damage, indeed doesn’t.
Among the Attacks and Armors, you will usually find type 3 and 4, which correspond to pierce and melee damage, respectively. Also, all units have zero armor on type 31, which corresponds to the Leitis special armor, and on type 50, which corresponds to the extra damage done by Arambais, see the related document.
Tatar cavalry archers
Now let’s look at the implementation of the Tatar bonus explained in this document. Th