# Combat and the triangle

> How a battle is decided: attack power against defense power, the class triangle, the Wall, heroes, losses and the battle report.

Military · https://jds-game.com.br/portal/wiki/guia/combate-e-triangulo?lang=en

Every battle is resolved **in one go**, when the march reaches its target. The game compares both sides' power and works out the losses. There are no rounds and troop health doesn't factor in, which is why unit pages don't show HP.

# The two numbers of a battle

- **Attack power**: the sum of the attack of every troop that marched, adjusted by the triangle against the defender's composition and multiplied by your race's attack modifier. If a hero comes along, the hero's attack is added in.
- **Defense power**: the sum of the defense of every defending troop, multiplied by the defender's race defense modifier, plus the defender hero. Against a player's village, the **home advantage** (+25%, even without a Wall) and the [Wall](https://jds-game.com.br/portal/wiki/construcoes/muralha?lang=en) (+4% per level) are added on top. Neutral map targets have no race and no Wall.

Each race's modifiers are on [Humans](https://jds-game.com.br/portal/wiki/povos/humanos?lang=en), [Orcs](https://jds-game.com.br/portal/wiki/povos/orcs?lang=en) and [Chaos](https://jds-game.com.br/portal/wiki/povos/chaos?lang=en).

Whoever has more power wins, with no luck in the outcome. Each side loses a share of its troops in proportion to the other side's strength, and only the size of those losses has a small random swing. That is why even a comfortable win costs some troops, and a narrow defeat still hurts the winner.

# The class triangle

- **Cavalry** beats **archers**.
- **Archers** beat **infantry**.
- **Infantry** beats **cavalry**.

With the class advantage, an attacking troop gets +25%. At a disadvantage, its attack is divided by the same factor. Troops of the same class get no edge. The effect is measured against the defender's actual composition: if they have half cavalry and half archers, your attack is an average of both matchups, weighted by each stack's defense.

## Specialized defense

Some units have a **defense against cavalry** or **defense against archers** that differs from their regular defense, and the unit page shows all three numbers. An anti-cavalry troop like the [Royal Guard](https://jds-game.com.br/portal/wiki/unidades/guarda-real?lang=en) cuts the output of the cavalry attacking it. A low specialized defense does the opposite and widens the attacker's edge.

Specialization can **cancel** the attacker's class advantage, but never **reverse** it: cavalry never drops below its normal output against archers, however well prepared they are. Each unit page shows which class it is strong or weak against, measured on the game's own combat engine.

## Neutral units

Scouts, rams, catapults, settlers and transports sit **outside the triangle**: they neither give nor take class bonuses. Their attack counts when they march, and their defense counts when they are home.

# Losses

Each side's losses are spread across its stacks according to their size, falling harder on whoever fought at a disadvantage. Units with the edge tend to die less. Against players there are specific loss rules for the attacker and for the defender, covered in [Attacking players](https://jds-game.com.br/portal/wiki/guia/atacando-jogadores?lang=en) and [Defending your village](https://jds-game.com.br/portal/wiki/guia/defesa-da-aldeia?lang=en).

# Heroes in battle

- A hero adds their attack to your side. Critical hits raise that attack, and penetration ignores part of the enemy defense.
- A hero loses health according to their side's losses. A hero with no health doesn't fight.
- On defense, part of the hero's attack and their health both count, and all of it is multiplied by the home advantage and the Wall.

# The battle report

After every fight a report arrives in **Reports**. It shows both sides' power, losses per unit, the hero's health before and after, the plunder and the triangle's effect on each troop. On a defeat the **fog of war** applies: you see your own side and how many losses you caused, but not the enemy's composition.

To simulate an attack on another player before marching, use the **Combat Calculator** in the More menu. It runs the same math as real combat and shows the winner and the range of losses.
