Battles

* The position of the troop flag is what determines the effective localisation of a troop.

## Charging bonus

When a troop charges in melee another troop, it gets a charge bonus that affects the melee skill and damage of the first round of combat.

* Unit mass increases the charging bonus.
* Large troops get a stronger charging bonus than smaller ones, as the number of units in the troop is a factor of the charge bonus.
* Movement speed increases charging bonus, especially if charging a unit with a slower movement speed. Heavy cavalry gets the strongest bonus as it is massive and fast moving.
* The difference of reach between the 2 troops determines the melee skill bonus/malus during the charge. If a troop with low reach charges one with higher reach (example sword infantry vs spear infantry), it will get a melee skill malus.

## Fortification mechanics

* Range units get a skill bonus (up to +2) and damage bonus (+1 per 5 of height) when firing on targets at a lower elevation. Firing from the top of a cliff or castle walls therefore gives a significant bonus to archers.
* In the same way, range units firing on units on a higher elevation get a skill penalty (up to -5) and a damage penalty (-1 per 5 of height).
* Units on the tile of free standing wall (palisade walls) or on the tile of battlements get a cover bonus. Cover increases armor against ranged attacks. Range units on top of a wall behind battlements can be almost immune to range attacks.
* Build platforms can be plain or hollow (bridge platforms). Units can travel below a bridge platform if its height above ground is of 3 or more. A unit travelling below platforms will pop out on the other side. It can access any tile adjascent to the tunnel network formed by all contiguous bridge platforms.

### Breaching

Troops can break free standing walls (palisade walls) and gates. Breaching speed depends of the melee damage of the troops, their number, and the solidity\*structure points of the wall or gate. High damage units like Axepigs or Elephants are therefore good at breaching defenses.

### Climbing

Units can pass through heights difference of up to 2 without penalties. Above that, the edge is impassable and troops need to scale it in order to pass, which takes a long time proportional to the height difference.

### Embarking

Water of depth of 2 or more is impassable for troops unless they embark on rafts. This is a very slow process leaving the troop immobile and vulnerable for a long time. Once embarked, the troops move slowly over water until they reach a disembarking location. Disembarking happens immediately if the shore is directly accessible. While moving on water, the troops have a significant armor penalty making them much more vulnerable to range attacks.

## Defensive buildings

Some military buildings such as towers or police will spawn additional troops during the battles. These troops are created inside a temporary formation that only appears during the battle.

For a defensive building to spawn its associated troop during battle, the building needs to have workers employed in it: a defensive tower with no guards will therefore be inactive during battle.

Defensive buildings can spawn a troop that is inside the building (example: towers) or outside (example: brutes hut). When it's inside, the troop has no visible unit, cannot move, and is only visible as a banner showing up over the building. When it's outside, the troop units will appear and be in limited engagement mode only moving to attack enemies getting within range of about 8 tiles.

## Water mechanics

* In a battle, troops must cross water of depth 2+ by embarking and then disembarking on the other side. Embarking takes a long time while disembarking is fast.
* While embarked, troops have a severe armor penalty and move very slowly, making them much more vulnerable to range attacks.
* Troops don't need embarkations and can cross water without penalties if the water depth is only of 1.
* Troops will spawn a raft when they need to embark.