Skip to content

Combat & Raiding

Send your units to attack another player’s town. After combat resolves, both sides receive a battle report detailing losses and any resources looted.

How a Battle Plays Out

Combat isn’t a single number comparison — it plays out turn by turn on a lane between the two armies. Attackers enter at one end, defenders hold the other; if the defending town has a Wall, it stands one pace in front of the defenders. Ranged units (archers, ballistae, rams, catapults) advance toward the enemy until they’re within range — their range, lengthened by their own town’s Archery research and rounded down to whole paces — then fire every turn from there. Melee units (workers, warriors, scouts, pikemen, swordsmen, cavalry, cataphracts, transporters) march forward and lock in place the instant they meet an enemy melee group — once locked, neither side’s melee can advance past the other, so a fight often stalls at the point of contact until one side breaks.

Every unit type carries four separate attack values — against infantry, cavalry, machines, and buildings — and the one that applies depends on what’s being hit. The pikeman is the roster’s one exception with a per-target specialization: its attack_vs_cavalry (270) shreds cavalry harder than its plain 150 against everything else, including a Wall. Every other unit, catapults included, hits all four target classes exactly as hard — a catapult’s raw 600 attack applies just as hard to a Wall as to anything else. Damage pools on a target group turn after turn and converts into a kill the moment it reaches that unit’s hp + defense, so a stack that looks fine this turn can lose several units the next once the pooled damage tips over.

If the defender has a Wall, it changes the shape of the fight: it blocks melee outright (a melee group that reaches the Wall’s pace attacks the Wall, not the defenders behind it), it softens ranged fire aimed at the defenders while it still stands, and it can be shelled directly by siege units like catapults. What the garrison does behind it is the defender’s choice — their city gates. Closed (every town’s default), the garrison holds the wall line and fights from it, under the Wall’s cover, until the Wall is breached. Open, the garrison sorties the moment the battle starts: every defender group with nothing in reach advances to meet you on the field exactly as your own troops do, so a fight may never reach the Wall at all — but a group that has stepped past the Wall’s pace has left its cover and takes ranged fire at full strength. Siege still shells the Wall and the fortifications still fire either way. You cannot see a target’s gate state; a scout report tells you the garrison, not the orders. Breaching it is permanent — every full level’s worth of damage dealt to the Wall strips one level off the highest-level Wall instance for good (a level is worth wall_hp_per_level, scaled up by the defending town’s Engineering research — the same figure the Wall’s hit points were built from, so a hardened Wall is never stripped faster than it was breached), so a city that survives a heavy siege comes out of it with a weaker Wall than it went in with. There is no overnight repair; the only way back is the normal upgrade path.

If neither side has broken the other by the turn limit, the attacker withdraws — not a win for either side, but not annihilation either: survivors from both sides march home. A withdrawn attacker, like a defeated one, loots nothing.

For the exact turn loop, damage formula, the Wall’s ranged-mitigation math, and a fully worked example, see the Combat Mechanics Reference.

War Horns, Corselets and the War Ensign

Three families of item touch a battle, and all three are read when the march lands, not when it left — a horn blown while your army is in flight counts, and one that expires in flight does not.

ItemWhose town it sits onWhat it does
War Horn (24h), Ivory Horn (7 days)the attacking army’s origin town+20% to that army’s side bonus, added to its research attack bonus and its hero’s Attack, exactly as they add to each other.
Corselet (24h), Ultra Corselet (7 days)the defending town+20% to the defence bonus, alongside the defender’s research and its leading hero.
Penicillin (7 days)the defending town30% of that town’s would-be battle deaths become hospital wounded instead.

They do not cancel each other. A War Horn on your side and a Corselet on theirs both apply and simply offset — the item text these come from calls one “nullified by” the other, but modelling it that way would make the two items a coin flip rather than an arms race.

Two of the same kind on one town do not add up either: the larger magnitude wins, and the second item buys duration (see Timed buffs). A hero under a hero buff leads at its buffed attribute — on both sides.

A fourth item touches a siege without touching a battle: an Adv Tax Policy freezes the defending town’s loyalty while it runs (Tax Policy). Since capture works by grinding loyalty to zero (below), a defender running one is harder to conquer for as long as it lasts — and correspondingly easier once it lapses, because the freeze is prorated to the ticks it covered and nothing holds the loyalty afterwards.

The replay snapshot a battle is recorded with keeps each side’s item share (attacker_item_bonus, defender_item_bonus) beside the combined bonuses the battle was actually fought at, plus the wounded_bonus that priced the hospital split. Those three are kept server-side for audit; the replay itself reproduces the fight from the combined figures, which already include them.

Launch an Attack

POST /api/v1/attacks/

import httpx
response = httpx.post(
"http://localhost:8731/api/v1/attacks/",
headers={
"Authorization": "Bearer your-token-here",
},
json={
"origin_town_id": "your-town-uuid",
"target_town_id": "enemy-town-uuid",
"units": {"swordsman": 10, "archer": 5},
},
)
print(response.json())

Returns 201 Created with the new attack record. The acting player is identified by your realm token — there is no separate player header. On the shipped free and fast realms the request must also carry a hero_id — see Assigning a Hero — and may carry a camp_seconds delay — see Camp time.

Units are deducted immediately from your origin town when the attack is launched — after the origin is settled, so its production and its food upkeep up to that moment are banked at the garrison (and, for a mayor-led march, the mayor’s bonus) it had until then. That settle also applies any desertion a starving origin has accrued since it was last settled, before the troops you asked for are counted: marching a starving army out does not save it, and a town that has run out of food can refuse 400 Insufficient units: need N, have M for troops it still showed a moment ago (see Marching a starving army out does not save it). Travel time is calculated from the Euclidean distance between the two towns divided by the slowest unit’s speed. Combat resolves on arrival (after any camp); surviving attackers (and any loot) then march home, taking the same time as the outbound travel — never the camp.

Travel Time

The exact formula, in order:

speed(unit) = unit.speed × (1 + Σ class-matched research boosts) # Compass / Horseback Riding, per unit
march_speed = min(speed(unit) for every unit in the party) # the slowest ADJUSTED unit sets the pace
raw_seconds = ceil(distance / march_speed / relief_multiplier) # relief_multiplier is 1 for an attack or a scout
travel = scale(raw_seconds, time_scale) # divided by the realm's pace, floored at the resolver tick
arrives_at = now + travel + camp_seconds # camp only on the way out

Base travel time is therefore ceil(distance / slowest_unit_speed) seconds, then divided by the realm’s time_scale (see Realm pace).

Two researched technologies in the origin town raise unit speeds before the slowest unit is determined: Compass multiplies each infantry unit’s speed by 1 + 0.1 × level, and Horseback Riding multiplies each cavalry and siege-machine unit’s speed by 1 + 0.05 × level. The boost is per unit — the march still moves at its slowest adjusted unit’s pace, so a single un-boosted unit gates the whole force, and boosting your slowest class can make a different unit the pace-setter. This applies to attacks, scouts, support, and founding expeditions dispatched from that town, and stacks multiplicatively with the Relief Station multiplier below (which, unlike these technologies, covers only support and trade). Two consequences worth spelling out: a boost on a class that is not your slowest changes nothing (Horseback Riding 10 on a pikeman-and-cavalry column still marches at the pikeman’s pace), and a boost on your slowest class speeds the whole party only until some other unit becomes the slowest.

A completed Relief Station in your origin town speeds up support marches and trade caravans toward your own other towns or a town owned by an allied player — a fellow member of your own alliance, or a member of an alliance with an accepted ALLY relation to yours (see Alliances):

Relief Station level12345678910
Speed multiplier2×2×2×3×4×4×4×5×5×6×

The multiplier is read from the sending town and divides travel time (a 2× multiplier halves it). It applies to exactly two kinds of march: support (reinforcements) and trade caravans (transports). An attack or a scout never gets it — not even a scout aimed at an ally’s town, because neither is a reinforcement (and an attack on an ally is not allowed at all any more — see Who you can attack). It also does not apply against a neutral, at-war, or NPC/barbarian target, and never applies to founding marches (which target an empty map tile, not a town). A town with no completed Relief Station marches at the ordinary baseline speed.

Camp time

camp_seconds (optional, default 0) is a camp at the target: the march travels, then waits this long before the battle resolves, so waves from several towns — or several of your own marches — can be timed to land the same second. It is plain wall-clock seconds, never scaled by the realm’s time_scale, and it is added to the outbound leg only: arrives_at moves later by exactly camp_seconds, the battle is fought at that moment, and the return trip is priced from the travel alone. Everything keyed on arrives_at follows — the defender’s warning window counts down to the real landing time, and the attack cannot resolve early.

The realm publishes its ceiling as camp_time_max_seconds on GET /api/v1/state/: 86340 (23h59m, Evony’s own limit) on the shipped realms, 0 in a realm that disables camping. A value above it returns 400; a negative value 422. The attack record and every attack listing echo camp_seconds back. Only attacks camp — scouts, support and trade caravans have no such delay. Computer-led players never camp.

Who you can attack

Attacks are the one march kind diplomacy restricts. In short: barbarians and neutrals are always fair game, your own alliance and your pact partners are never, and a truce shuts the door in both directions. The complete table is in Alliance Diplomacy; the rejections you can get here are:

400 detailCause
You are under a truce…Your own truce is running — you may still attack barbarian settlements.
That player is under a truce…The target is truced.
You cannot attack a member of your own alliance.Same alliance.
Your alliance has a pact with that alliance…An accepted, unexpired ALLY or NAP relation stands. Declare war first.
War … is not effective yet.A war declaration replaced a pact between the two alliances and its delay has not elapsed. Neither side can strike during that notice period. A declaration between alliances that held no pact blocks nothing — they could already fight.
Target town is under protection…Beginner or post-attack protection.
Cannot attack a valley held by one of your own cities.The target is a valley one of your cities holds.

All of these are decided at dispatch. A march already in the air is never turned back by a pact signed, or a truce applied, after it launched.

A valley target is gated through the player whose city holds it — the same table, applied to the holder — and an unowned valley skips the gate entirely, like a barbarian settlement. Attacking a valley never forfeits your own beginner protection; see Capturing a valley.

Requirements

  • Both towns must be placed on the map.
  • The target must be in your own season — the realm and season your realm token plays. A town, settlement or valley of another realm, or of an ended season, gets exactly the answer an id that does not exist gets: 404 Target town not found.
  • You must own the origin town.
  • You cannot attack your own towns.
  • Diplomacy must allow it — see Who you can attack.
  • You must have enough of your own units of each type in the origin town (reinforcements standing in it are not yours to send).
  • In a realm whose state reports attack_requires_hero: true (the shipped free and fast realms), a hero_id is required — see Assigning a Hero.
  • camp_seconds, if given, must not exceed the realm’s camp_time_max_seconds.
  • The dispatch must not exceed the origin town’s Rally Spot troop cap, and the origin town must not already be at its Rally Spot concurrent-march limit — see Rally Spot Dispatch Caps below.
  • The season must be active.

Rally Spot Dispatch Caps

A town’s Rally Spot governs two things about dispatching an army — an attack, a scouting mission, or support alike:

  • Troops per dispatch — a single dispatch cannot carry more units than the Rally Spot’s level allows.
  • Concurrent marches — how many marches the town can have simultaneously in flight. This is one shared pool across all three dispatch types, not a separate allowance per type: if the limit is 1 and an attack is already outbound, dispatching a scout or a support mission from the same town is rejected too, until that attack (or any one of the marches counted) returns. The pool counts every march out of the town, whoever sent it: the missions a town’s previous owner sent before it was captured still fill its Rally Spot until they come home, as their troops come home to it (spoils of war).
Rally Spot LevelConcurrent MarchesTroops per Dispatch
1110,000
2220,000
3330,000
4440,000
5550,000
6660,000
7770,000
8880,000
9990,000
1010100,000

A town that has not yet built a Rally Spot has neither cap enforced — this is a deliberate compatibility carve-out, not a level-0 allowance, so existing towns and marches are unaffected by this building’s introduction.

Exceeding the troop cap returns 400:

{
"detail": "Dispatch exceeds Rally Spot troop cap: sending 15000, cap is 10000."
}

Exceeding the concurrent-march limit returns 400, naming no numbers (some of the marches it counts may not be yours):

{
"detail": "This town's Rally Spot is full: no more marches can leave until one of those already out comes home."
}

The War Ensign raises the troop cap for one wave

A War Ensign raised in a town lifts that town’s troops-per-dispatch cap by 25% for its next attack march — 10,000 becomes 12,500 at Rally Spot 1, 100,000 becomes 125,000 at level 10 — and is spent by that march whether or not the extra room was needed. It never changes the concurrent-march limit, and a scout or support dispatch neither uses nor spends it. war_ensign_ready on each town in GET /api/v1/state/ says whether one is up.

Assigning a Hero

Pass a hero_id in the request body to send a hero with the attack. On the shipped free and fast realms this is mandatory — Evony’s rule that a hero leads every attack — and a request without one returns 400 An attack must be led by a hero: pass hero_id. before anything leaves the garrison. A realm publishes the rule as attack_requires_hero on GET /api/v1/state/; where it is false the field stays optional. Scouts, support and trade caravans never need a hero, and computer-led players are exempt (they hold none).

{
"origin_town_id": "your-town-uuid",
"target_town_id": "enemy-town-uuid",
"units": {"swordsman": 10},
"hero_id": "hero-uuid"
}

Requirements for hero assignment:

  • The hero must be IDLE (not already on a march or wounded).
  • The hero must be stationed in the origin town.
  • The hero must belong to you, in this realm’s season. A hero_id that names no hero of yours — one that does not exist, another lord’s, or your own hero in another realm — returns the same 404 Hero not found, so the answer never tells you whether someone else’s hero exists.

Effect during combat: The hero’s attack stat (an integer percentage, e.g. 10 = +10% — Evony Age 1’s AttackModifier = 1 + HeroAttack/100 + …) is added to the attacker’s power multiplier alongside the origin town’s completed research bonuses (an army carries the research of the town it marched from). A defending town applies its own research, plus the attack stat of its highest-level idle garrisoned hero.

After battle:

  • The hero gains experience scaled from the units the attack killed: XP = the killed units’ summed raw production cost (1×food + 1×wood + 2×stone + 2.5×iron + 10×gold of each unit’s training cost) divided by 100, rounded down — a fixed game rule, not realm config. Wounded defenders (hospital) grant nothing, and a battle with no kills grants 0 XP. See Levelling Up a Hero.
  • If all attackers are wiped out, the hero status changes to WOUNDED (against an NPC target; it recuperates at the origin town, or at your oldest surviving town if the origin was razed or captured while the march was out) or CAPTURED at loyalty 0 and held at the defender’s town (in PvP). A wounded hero can be healed; a captured one waits on its captor’s persuade-or-release choice.
  • If any attackers survive the return march, the origin town is settled as they arrive (the time away banked at the garrison that stayed home and, for a mayor, at the no-mayor rate — see A mayor’s march pays forward only), and the hero status returns to IDLE on their arrival home (at your oldest surviving town instead, if the origin was razed or captured while the march was out — see spoils of war) — except when the attack’s on_clear was capture and the capture succeeded: nothing marches home in that case, so the hero garrisons the newly captured town instead, becoming IDLE there immediately rather than waiting out a return trip. If the origin town was captured while the march was out, the town it takes goes to the origin’s new owner, with the escort (spoils of war), and the hero, still yours, goes IDLE to your oldest surviving town instead (with no town left, it stays in the town it took). See Capture, Raze, and Plunder Intent below.

The defender’s hero is at risk too (two-sided capture): if the attack wins — the engine only awards a win once every defender is wiped — the hero that led the defence (the target’s highest-level idle garrisoned hero) is CAPTURED and held at the attacker’s origin town; the battle report stamps defender_hero_captured: true for both sides. Only the leading hero is at risk; a winning march whose origin lost its owner mid-flight (a razed colony) has no captor, so that hero is WOUNDED in place instead. See Both commanders are at risk for the full rules, including the no-hall-vacancy divergence from Evony.

Other fields on every attack record:

FieldTypeDescription
camp_secondsintThe camp the attacker set at dispatch, already folded into arrives_at. 0 when none.

Response fields added when a hero leads the attack:

FieldTypeDescription
attacker_hero_idstring | nullUUID of the hero assigned to this attack.
attacker_hero_starsint | nullStar rating of the hero at the time of launch.
hero_capturedbooltrue when the attacking hero was captured on a total loss in PvP.
defender_hero_capturedbooltrue when this battle captured the defender’s leading hero (present on every attack, hero-led or not — the defender’s hero defends regardless).

Capture, Raze, and Plunder Intent

Pass an optional on_clear in the request body to declare what you want to happen if this attack clears its target’s garrison — either a barbarian settlement’s, or (for capture only, as of this release) an ordinary player-owned town’s:

{
"origin_town_id": "your-town-uuid",
"target_town_id": "target-town-uuid",
"units": {"swordsman": 10},
"on_clear": "capture"
}
ValueEffect
plunderDefault. Against a barbarian settlement, loot the share of its pool the realm puts at risk (plunder_fraction; the whole pool, 1.0, on the shipped realms — a settlement has no Warehouse) up to your carry capacity — no change of ownership. Against a player town, an ordinary raid.
captureTake the target as a new town of yours once its garrison clears. Barbarian settlements: always eligible. Player towns: only once the defender’s loyalty is already 0 — see below. Valleys: the origin city takes the valley once its garrison clears, within its Town Hall valley cap — no loyalty, no city slot.
razeBarbarian settlements only. Destroy the settlement once its garrison is cleared, looting the same share of its pool as plunder in the process.
colonizeColonies are founded by dispatching an army to an empty field, not with an attack. Always rejected with 400 Bad Request.

Validation at launch:

  • raze is valid only against barbarian settlements — sending it against a player-owned town (city or colony) returns 400.
  • capture is valid against a barbarian settlement or an ordinary player-owned city. A colony can never be captured — it is destroyed outright once cleared, whatever on_clear you declared (see Colonies Are Razed, Never Captured) — so a capture-intent dispatch against one is rejected at launch with its own 400.
  • capture against a valley is checked against the origin city’s Town Hall valley cap (valleys held plus capture attacks in flight), never the town cap; a plunder against a valley is a plain fight with no loot and no change of hands, and raze is rejected. See Valleys.
  • capture requires no particular unit type in the attacking force — any army can take a town — only that you are below your title-derived town cap (max_towns on game state — the higher of the realm’s flat max_towns_per_player and your title’s city_cap). Your town count and your cap are both checked again when the attack is patched or resolves, since either can change while the attack is in flight (you may found or lose a town, or promote to a higher title). Against a player town, whether the target’s loyalty has actually reached 0 is only checked at resolution, never at launch or patch — see below.

on_clear defaults to plunder if omitted, so existing integrations are unaffected.

The universal capture gate: loyalty must already be zero

capture is gated by loyalty — for a barbarian settlement exactly as much as for a player town, one shared rule with no carve-out either way. Every attack you win against a target grinds its loyalty down a little and raises its grievance, whatever on_clear you declared — see Conquest. A capture-intent attack only actually transfers ownership once that grind (from earlier wins) has already brought loyalty to 0 — this attack’s own grind, applied afterward, never counts toward it. The loyalty checked is the town’s loyalty at the moment the attack lands: a player’s town is settled first, so the drift of its loyalty toward 100 − tax_rate − grievance since it was last settled counts. Concretely: the win that finishes grinding a target to 0 loyalty still only plunders (or razes); the next winning capture-intent attack is the one that takes it. A barbarian settlement is seeded at loyalty 92 and regenerates 3 loyalty every six-minute tick, so it takes a real string of wins to open the gate there too — and they have to land faster than it heals. A settlement is never captured on its first cleared garrison.

A capture-intent attack that wins with loyalty still above 0 degrades to an ordinary plunder automatically: loot flows exactly as it would have under plunder, and the win’s own loyalty grind still applies on top. The battle report’s intent_fallback_reason is set to loyalty_not_zero.

A few consequences worth calling out explicitly:

  • A fresh capture is instantly re-capturable. Loyalty resets to conquest_captured_loyalty (0 in every shipped realm — see below) on every successful capture, and a captured town gets no protection window — so the very next winning capture-intent attack against it, from anyone, transfers it again immediately. This is deliberate, not an oversight: Evony’s real conquest loop is exactly this volatile at loyalty 0. It is also the one number here the source game never pinned, so it is exposed as realm configuration: a realm that wants a re-capture brake raises conquest_captured_loyalty and a captor has to hold the town through a few more winning attacks before anyone else can take it.
  • You can drift yourself down to 0 and become capturable without ever being ground down by an attack. Loyalty tracks 100 − tax_rate − grievance — run tax_rate at 100 (or let grievance pile up) for long enough on a town with no comfort actions, and it drifts to 0 on its own. A capture-intent attack against a town nobody has ever attacked can still transfer it the moment it lands, if self-inflicted loyalty decay already did the grinding.
  • A captured town’s queues, research, and trades all carry over whole, along with its buildings and resources (see below) — the spoils-of-war doctrine (see Raiding) applies to everything already running in the town, not just its stockpile.

Barbarian settlements: what happens when the garrison clears

An attack that does not empty a barbarian settlement’s garrison is an ordinary raid — the settlement’s owner (still nobody), level, and pool are untouched beyond the resources looted (see Raiding). Once an attack does empty the garrison, on_clear takes over:

  • plunder loots calculate_loot against floor(pool × plunder_fraction) of the settlement’s resources (the whole pool on the shipped realms, where plunder_fraction is 1.0; carry capacity is the real limit) and the settlement’s level is unchanged. It stays farmable: its troops and fortifications regrow in an hour and its pool in eight.
  • capture requires loyalty already at 0 (see above), at least one surviving unit in the attacking force, and headroom under your town cap at the moment the attack lands (not just at launch). On success (see A successful capture below for the shared mechanics):
    • The settlement becomes one of your towns.
    • Its buildings are constructed at level clamp(floor(npc_level / capture_building_level_divisor), 1, building_max_level) — a captured level-10 settlement starts with real infrastructure, not an empty lot.
    • No resources are looted — the settlement’s pool becomes the new town’s stockpile as-is.
  • raze marks the settlement as decaying (it loses a level every raze_decay_hours until it becomes an unclaimed ruin) and loots it exactly like plunder in the same resolution. Razing a settlement that is already decaying is a no-op for the clock — it does not restart the countdown.
  • A capture that cannot complete (loyalty not yet 0, nothing survived the battle, your town cap has no room by the time the attack lands, or the dispatching player deleted their player mid-flight) falls back to plunder automatically — the march is never lost. The battle report’s intent_fallback_reason explains why: loyalty_not_zero, no_survivors, town_cap, or owner_gone.

Player towns: capture at zero loyalty

Capturing an ordinary player-owned town works on the same capture-intent mechanic and the same loyalty gate as a barbarian settlement (see above) — the only structural difference is that there is an existing town to transfer rather than a fresh one to found.

  • Loyalty already 0, at least one unit survived, you have room under your town cap, and the defender has another city or colony to fall back to — the town transfers (see A successful capture below for what “transfers” means).
  • A capture that cannot complete — loyalty not yet 0, nothing survived the battle, your town cap has no room at the moment the attack lands (re-checked here even if it had room at launch or patch time), the target is the defender’s only town, or the dispatching player deleted their player mid-flight — falls back to plunder automatically, exactly like the barbarian case. intent_fallback_reason explains why: loyalty_not_zero, no_survivors, town_cap, last_town, or owner_gone.
  • One-city protection: Evony-faithful — “No one can ever conquer you if you have ONE city.” A capture-intent attack against a defender’s only remaining town can never transfer it, no matter how thoroughly the battle was won; it degrades to an ordinary plunder instead, and the march is never lost. This is checked fresh at resolution (not at dispatch), so a defender who loses every other town of theirs mid-flight is protected the moment they are down to their last one, even if they still had two when the attack was launched.
  • A colony counts as a fallback town for this rule. “Only remaining town” means no other settlement of any kind — a defender who still holds one colony is not on their last town, so their city can be captured. This means a player can be fully eliminated: capture their last city while a colony still stands, then raze that colony. This is intentional. Colonies are cheap, deliberately razeable settlements by design — treating one as a permanent, unconquerable refuge would turn the cheapest thing in the game into total immunity from elimination.

A successful capture

Once the gate above is satisfied, a capture — barbarian or player town alike — shares this:

  • Ownership changes to you; the map tile does not move, and (for a player town) the town’s existing buildings, queues, research, and trades all carry over whole, along with its already-settled resources — there is no separate loot deduction on top, spoils-of-war style (see Raiding).
  • Loyalty resets to conquest_captured_loyalty and grievance to conquest_captured_grievance (0 and 100 in every shipped realm) — one shared reset for both capture flows, and realm configuration rather than a fixed rule. The new owner comforts it up from there like any other unhappy town.
  • The whole surviving escort garrisons the town immediately — no unit is consumed; nothing marches home. For a player town specifically, the defeated garrison was already wiped by the win, and any of the defender’s own Hospital patients (pre-existing or from this same battle) do not carry over — nor does any Support an ally had garrisoned there, which is lost with the city (see Support).
  • No beginner protection, and — for a player town — any post-attack truce this same battle would otherwise have granted to the defender is cleared instead. This is the same ruling M1 applied to newly founded towns: you already own at least one other town to have sent the attack, so there is no new player here for the shield to protect, and granting it would let you plant an un-attackable forward base.
  • A hero leading the capture garrisons the town too — IDLE there right away, not on a return march. The exception: if the attacker’s origin town was itself captured while the march was out, the town taken goes to the origin’s new owner, and the hero goes IDLE to its own owner’s oldest surviving town instead (see Assigning a Hero, “After battle”).
  • An order the former owner sends at the moment the town falls — a construction, an upgrade, a speedup, a demolition, a collection, a research, a training order or a rename — gets the same 404 as an order on a town (or building) that was never theirs (Town not found. / Building not found.), and charges nothing, even if it was already being processed when the capture landed. It never lands in the captor’s town.
  • For a player town only: the former owner’s IDLE/WOUNDED heroes stationed there relocate to their oldest surviving town — the same “refuge” rule a razed colony uses for a stranded hero. A CAPTURED hero held there (someone they captured earlier) is untouched. The former owner always has somewhere to relocate to: one-city protection (see above) guarantees a capture can never take a defender’s only remaining town, so this refuge always exists — a player-town capture can no longer eliminate its former owner. That refuge may be a colony, which can itself be razed afterwards; the capture never eliminates anyone, but capture-then-raze can.

Changing Intent Mid-March

PATCH /api/v1/attacks/{attack_id}

{
"on_clear": "raze"
}

Because the world can change between dispatch and arrival, on_clear can be updated on an attack while it is still outbound (before it resolves). The same validation rules as launch apply, checked against the units already committed to the march (the force itself cannot be changed). Returns 404 if the attack does not belong to you, and 400 once the attack has already resolved.

In the browser client, click the settlement you are marching on: any of your attacks still in flight toward it are listed with their current orders and a Change orders control.

Your own outbound attacks carry on_clear in the game state marches list. It is always null on attacks incoming at you — it is the attacker’s amendable order, not intel. What your town’s Watchtower reads of the attacker’s purpose arrives separately, as intel.purpose, from tower level 2 up — see Incoming attacks.

Colonies Are Razed, Never Captured

A colony that loses its entire garrison to an attack is destroyed. This is not an intent you choose — it happens whatever on_clear the attacker declared, and there is no way to capture a colony or to hold one you did not found.

In order: the attackers loot what their survivors can carry; everything left burns; every building is destroyed with its queues; the colony stops belonging to anyone and its slot returns to its owner; the map tile is freed for resettlement. The Town itself is retained only so battle history keeps resolving — nothing about it can be interacted with again.

A colony that keeps even one defender is not razed. It is an ordinary battle: plundered if the attacker won the field, otherwise repelled.

raze remains a barbarian-only intent, and capture is never valid against a colony either, even though it is now valid against an ordinary player-owned city (see Capture, Raze, and Plunder Intent above) — aiming either at a colony is rejected with a 400. So is colonize: colonies are founded by dispatching an army to an empty field, not with an attack.

List Attacks

GET /api/v1/attacks/

import httpx
response = httpx.get(
"http://localhost:8731/api/v1/attacks/",
headers={
"Authorization": "Bearer your-token-here",
},
)
print(response.json())

Returns attacks involving your towns (both outgoing and incoming), ordered by arrival time — except an unresolved incoming attack whose arrival your Watchtower does not reveal yet: those come first, ordered by id (a random identifier), so neither their place in the list nor the page they fall on says when they land or when they set out. A resolved attack is a battle report and belongs to the players who fought it: it is listed to its attacker and its defender as they were when it was fought, never to whoever holds the town now — capturing a town does not bring you the battles fought over it before. The list is built from the towns you hold now, so the battles of a town you have lost leave it; they stay readable by id (GET /api/v1/attacks/{attack_id}) and in your event feed. An attack that has not resolved yet follows the target town’s current owner, who is the one it will be fought against. Arrived attacks are resolved automatically by the server within a few seconds of arrival — you don’t need to call this endpoint to make battles happen.

The response is a paginated envelope: { "count", "limit", "offset", "results" }, where results holds the attacks for the requested page and count is the total number across all pages. Use the limit and offset query parameters to page through results (default limit 50, max 200). More pages remain while offset + len(results) < count.

Incoming attacks: what a defender is told

An incoming attack that has not yet resolved is shown only as far as the target town’s completed Watchtower reads it. Each Watchtower level adds one more piece — the ten-rung ladder Evony’s Beacon Tower had, published per realm as warning_intel_per_level on the building catalog:

WatchtowerRevealsOn the attack record
nonenothing — the attack is not listed at all until it resolves—
1that an attack is comingthe row itself, with target_town_id; intel.revealed: ["attack"]
2its purposeintel.purpose (on_clear stays null)
3its arrival timearrives_at, departed_at, camp_seconds
4the enemy lordintel.attacker_player_id, intel.attacker_username
5where it set out fromorigin_town_id, origin
6which unit types marchintel.unit_types
7roughly how manyintel.unit_bands — the realm’s count-words per unit type
8exactly how manyunits (and intel.unit_bands becomes null — never both)
9the hero leading itintel.attacker_hero_level, attacker_hero_id, attacker_hero_stars
10its military technologyintel.attacker_research — every technology the origin town had researched as the army marched, {tech_id: level}, economic techs included (the same full-map reading a level-8 scout dossier gives; {} = revealed and nothing researched)

Every field the tower has not reached is null (units is {}), and intel.revealed lists exactly the pieces that applied, so “not revealed” and “revealed and empty” never look the same — intel.attacker_hero_level: null with hero in revealed means the march has no hero; intel.attacker_research: null with research revealed means the attack was dispatched before this rule existed. The attacker’s unit losses (units_lost_attacker) are hidden until the attack resolves at every level. Once the attack resolves, full details are visible to both sides, tower or no tower — the two players who fought it, whoever held each town at that moment.

The same ladder redacts the incoming_attacks and marches lists of the game state, and the same window governs both: an unresolved incoming attack is not listed here at all until it is close enough to be seen: between one and two of the target town’s warning windows before it lands, at a point that differs per attack and that you cannot predict — a completed Watchtower’s warning_seconds (6 hours in the shipped realms) is the guaranteed minimum, and there is no window at all without one. Your own outgoing attacks are never withheld or redacted.

In the browser client, the incoming-attack pill lists the revealed pieces and greys each missing one with the Watchtower level that would reveal it.

Battle Reports

After an attack resolves, the response includes battle report fields:

{
"id": "attack-uuid",
"origin_town_id": "attacker-town-uuid",
"target_town_id": "defender-town-uuid",
"units": {"swordsman": 10},
"departed_at": "2026-03-12T11:55:00Z",
"arrives_at": "2026-03-12T12:00:00Z",
"returns_at": "2026-03-12T12:05:00Z",
"resolved_at": "2026-03-12T12:00:00Z",
"attacker_won": true,
"units_lost_attacker": {"swordsman": 1},
"units_lost_defender": {"pikeman": 3},
"resources_looted": {"wood": 200, "stone": 150},
"units_returned": false,
"honor_change_attacker": 10,
"honor_change_defender": -5,
"medals_change_attacker": 2,
"medals_change_defender": 0,
"medals_awarded_attacker": {"cross": 2},
"medals_awarded_defender": {},
"origin": {"x": 10, "y": 20},
"target": {"x": 14, "y": 23},
"target_valley": null
}
FieldTypeDescription
attacker_wonbool | nullnull while in transit; true/false after resolution.
units_lost_attackerdict | nullUnits lost by the attacker. Only includes unit types that took losses.
units_lost_defenderdict | nullUnits lost by the defender. Only includes unit types that took losses.
fortifications_lost_defenderdict | nullThe defender’s wall fortifications lost, by type — spent one-shot stocks and destroyed Archer’s Towers, before the free post-battle repair. {} when none were lost; null on battles resolved before fortifications took part. Shown to both sides.
resources_looteddict | nullResources taken from the defender. Empty {} if attacker lost or defender had nothing.
departed_atdatetime | nullWhen the attack was launched.
returns_atdatetime | nullWhen survivors and loot arrive back at the origin town. null while in transit, or if no attackers survived.
units_returnedbooltrue once survivors and loot have been credited back to the origin town. Set immediately on resolution if nothing survived.
honor_change_attackerint | nullHonor delta applied to the attacker. null for NPC targets; zero when the attacker lost, or won against a much weaker opponent (negative prestige gap exceeds the base).
honor_change_defenderint | nullHonor delta applied to the defender. null for NPC targets; negative when the defender loses.
medals_change_attackerint | nullMedals awarded to the attacker by this battle (a count). Never negative. 0 when the battle earned none; null if the realm awards no medals, or the attack has not resolved.
medals_change_defenderint | nullMedals awarded to the defender for repelling this attack. Never negative, and never reduced by a loss.
medals_awarded_attackerobject | nullWhich named medals those were, medal_id -> count (e.g. {"lion": 1}). {} when the battle earned none; null under the same conditions as the count, and on every report from before named medals.
medals_awarded_defenderobject | nullThe defender’s named medals, same convention.
origin / targetobject | nullMap coordinates (x, y) of the origin and target towns.
target_valleyobject | null{"valley_type": "lake", "valley_level": 6} when the target is a valley — its type and level, frozen at whatever they were when this response was built. null against an ordinary town or barbarian settlement. Never redacted, on every attack response: dispatch, PATCH, list, and this report — lets a client label the march without a round trip to GET /api/v1/valleys/{valley_id}.
attacker_hero_idstring | nullUUID of the hero who led this attack, if any.
attacker_hero_starsint | nullStar rating of that hero.
on_clearstringWhat the attacker declared for a cleared target: plunder, capture, raze, or colonize. Defaults to plunder. Mutable via PATCH while outbound.
intent_fallback_reasonstring | nullSet if arrival validation could not honour on_clear and fell back to plunder. no_survivors — the attacking force was annihilated in the very battle it won, leaving nobody to hold the town. town_cap — completing the capture would exceed your title-derived town cap (max_towns, not the realm’s flat max_towns_per_player). loyalty_not_zero — a player-town capture won but the defender’s loyalty had not yet been ground to 0 by an earlier attack. owner_gone — the dispatching player deleted their player while the march was in flight, so there was nobody left to hand the town to. valley_cap — a valley capture won but the capturing city’s Town Hall cap was full at arrival. already_owned — the valley was already yours by the time the march landed. null otherwise.
colony_razedboolean | nullWhether this battle razed a player colony. false on a battle that razed nothing; null in a realm with no colonies configured.

attacker_won, the loss fields, resources_looted, and honor deltas are all null for attacks still in transit or against NPC targets (honor is PvP-only).

attacker_won: false covers two different fights on the field: the attacker’s force being wiped out (repelled), or the turn limit running out with both sides still standing (withdrawal). The report doesn’t distinguish which — check units_lost_attacker against the force you sent, or watch the replay, to tell them apart.

A defender only earns positive honor (or medals, see below) for repelling an attack if the attacker actually lost at least one unit in the fight. A bloodless withdrawal — the attacker’s force runs out the turn limit without taking a single casualty, typically because it brought nothing that could dent the defenders or the Wall — stamps both honor_change_attacker and honor_change_defender at 0, not the usual defensive-win award. This closes an honor/medals farm two colluding accounts could otherwise run against each other for free.

Medals differ: unlike honor, they are not PvP-only, so in a realm that mints medals medals_change_attacker/_defender are stamped with a real value — 0 or positive — on NPC battles too (clearing a barbarian settlement’s garrison awards the attacker). They stay null only while the attack is still in transit, or in a realm that awards no medals at all.

Medals

Medals are a separate currency from honor, and unlike honor they are only ever gained — a lost raid costs you none, and no defeat ever takes them away. They are named (Cross, Rose, Lion, Honor, Courage, Wisdom, Freedom, Justice, Nation), and three things mint them:

  • Clearing a barbarian settlement’s garrison — or a valley’s — drops one medal, chosen by the target’s level from the realm’s drop tables (a settlement and a valley have separate tables). The garrison has to have been manned when your attack landed — a settlement that is already empty (a ruin, or one cleared earlier and not yet regrown) pays nothing, and neither do the follow-up attacks of a wave whose first attack did the clearing. Whether the clear drops anything is a drop rate that decays as the season ages and rises with your attacking hero’s Intelligence — see Barbarian Settlements; the two PvP awards below always pay in full.
  • Winning a raid against another player — the attacker earns a flat award (2 Cross on the shipped realms).
  • Repelling a raid — the defender earns a flat award (1 Cross), but only if the attacker actually lost units in the fight. A bloodless withdrawal (the attacker’s clock ran out without a single casualty on either side) mints nothing for either player — see Battle Reports above.

Attacking your own town earns nothing, and an attack that never reaches combat earns nothing. Medals do not decay; ranks and titles spend them.

Each realm sets its own medal yields, and a realm may award none at all — in that case both medals_change_* fields (and both medals_awarded_* maps) stay null on every report.

Razing a colony is a player victory, not a barbarian clear: it pays the PvP raid_win award and nothing more. The barbarian-clear faucet only ever fires against barbarian settlements.

Fortune wheel spins

In a realm with a fortune wheel, an attack can also earn the attacker spins:

  • winning a raid against another player — including razing their colony;
  • clearing a barbarian settlement whose garrison was manned when your army landed.

Defending successfully earns medals but not spins: every spin source is something you chose to do. Clearing an already-empty garrison earns nothing either — the same anti-farming rule that guards medals — and once a colony has been razed it has no owner, so attacking the ruin is not a player battle and pays nothing.

Spins are not recorded on the battle report. They arrive as a spin_earned entry in your event log naming the source, and show up on your next game-state poll as player.spins.

Item drops

Clearing a barbarian settlement’s manned garrison can also drop an item into the attacker’s inventory, scaling with the settlement’s level — see Barbarian Settlements for the full tier/chance mechanics. Raiding another player’s town never drops items — a PvP raid pays out looted resources only. Unlike spins, an item drop isn’t logged as an event either; it shows up silently in your inventory (GET /api/v1/items/) once the battle has resolved.

The Return March

Attacks are two-phase. Combat resolves on arrival; surviving attackers and their loot then march home, taking the same time as the outbound travel — a camp at the target is not walked back. They are credited back to your origin town at returns_at, at which point units_returned flips to true.

One Battle by Id

GET /api/v1/attacks/{attack_id}

import httpx
response = httpx.get(
f"http://localhost:8731/api/v1/attacks/{attack_id}",
headers={
"Authorization": "Bearer your-token-here",
},
)
print(response.json())

Returns one resolved battle you took part in, as the attacker or the defender: the same record List Attacks gives for it, so you don’t have to page through the list to find an old report. Anyone else, and an attack that hasn’t resolved yet, gets 404 Not Found (an incoming attack in flight is listed by GET /api/v1/attacks/, as far as your Watchtower reveals it).

Turn-by-Turn Replay

GET /api/v1/attacks/{attack_id}/report

import httpx
response = httpx.get(
f"http://localhost:8731/api/v1/attacks/{attack_id}/report",
headers={
"Authorization": "Bearer your-token-here",
},
)
print(response.json())

The battle report above shows what happened — losses, loot, honor, medals. This endpoint shows how: the full turn-by-turn combat log, recomputed on the fly from the battle’s stored inputs rather than replayed from a saved recording. Available only to the two players involved (attacker and defender); anyone else — and an unresolved attack — gets 404 Not Found.

{
"replay_available": true,
"attacker_won": true,
"battlefield_length": 20,
"max_turns": 50,
"turns": [
{
"turn": 1,
"wall_hp": 1500,
"groups": [
{"side": "attacker", "unit_id": "swordsman", "position": 3, "count": 10},
{"side": "defender", "unit_id": "pikeman", "position": 16, "count": 5}
],
"events": [{"type": "advance", "unit_id": "swordsman", "from": 0, "to": 3}],
"fortifications": [{"fortification_id": "archers_tower", "count": 4}]
}
],
"attack": { "...": "the same AttackResponse fields as elsewhere on this page" }
}
FieldTypeDescription
replay_availableboolfalse when there is no turn-by-turn log to show — see below.
attacker_wonbool | nullMirrors the attack’s own attacker_won.
battlefield_lengthintNumber of positions on the lane, from the realm’s battle config.
max_turnsintTurn cap the engine simulated up to.
turnsarrayOne entry per simulated turn: turn number, wall_hp remaining, each surviving unit group’s side/unit_id/position/count, the turn’s events (attacks, deaths, advances, and the wall fortification events fortification_fired — fortification, count, damage, targets: [{unit, damage}] —, fortification_spent — fortification, count — and fortification_casualties — fortification, destroyed, remaining), and fortifications: the defender’s standing Archer’s Tower stock after the turn as {fortification_id, count} entries (always on the Wall’s pace; empty once they fall, and on every turn of a battle with none — one-shot stocks are never on the field). Empty when replay_available is false.
attackobjectThe same attack fields documented under Battle Reports above.

Why replay_available can be false on a resolved attack: the turn log is not stored — it is recomputed from a compact snapshot of the battle’s inputs (Attack.battle_inputs) taken at resolution time. Two things can make that snapshot unusable, in which case you still get the summary fields (attacker_won, losses, loot) via attack, just no turns:

  • The attack resolved before the turn-based battle engine shipped (battle_inputs was never recorded).
  • The attack resolved under an older, incompatible engine version — the engine is stamped with a BATTLE_ENGINE_VERSION (currently 3), and a snapshot taken under a previous version is never replayed under a newer one.

An unresolved attack (still in transit) always returns 404 here — there is nothing to replay yet.

Reading a Battle Report

In the browser client, open Reports, click an attack that has resolved, and the report sheet includes a Battle Replay panel beneath the loss and loot ledgers. It renders the same turn-by-turn data the API returns as a lane: attacker groups along the top, defender groups (and the Wall, if one is still standing) along the bottom, each positioned exactly where they stood that turn. Step through with the ◀ / ▶ buttons, the scrubber slider, or the left/right arrow keys — the turn counter and the event log below the lane advance together, narrating that turn’s volleys, charges, advances, and the turn the Wall breaks.

Replays exist only for battles fought since the lane engine shipped. A battle from before then — or one whose stored inputs can no longer be replayed (see above) — still shows its full summary in the report sheet (winner, losses, loot, honor, medals); the replay panel just says there’s nothing to step through.

Raiding

Every battle at a player’s town (a city or a colony) settles the town first, win or lose: everything it has produced since it was last settled, its food upkeep, its tax and its heroes’ salary are banked up to the moment the battle resolves, exactly as if its owner had collected then. So a town nobody has touched for a day is raided for what it holds now, not for what it held when its owner last logged in — its production since then included. A scout report’s resources_observed is this same settle, worked out at the moment the scouts arrive — terrain and valley bonuses, upkeep, tax and hero salary included — so it is exactly what a raid landing at that moment would find. The settle also comes before the fight: a garrison that deserted for hunger since the town was last settled is gone before the battle, and the loyalty the capture gate and the win’s grind read is the town’s loyalty as it stands then.

An attacking town is settled too when the battle changes it. A wave that loses units settles its origin at the moment of the battle, before its dead leave the origin’s population (see troop deaths), and a city that captures a valley is settled before the valley’s bonus starts. Like the defender’s settle, both staff the fields from the town’s own people: allied reinforcements standing in your town fight for it and eat its food, but they were never drafted from its population, so they never count as its troops for staffing.

When the attacker wins, surviving units loot resources from the defender’s town:

  1. Warehouse protection — if the defender (a player town; barbarian settlements have no Warehouse) has one or more completed Warehouses, their combined resource_protection_per_level at each Warehouse’s current level — multiplied by 1 + 0.1 × level of the defending town’s researched Stockpile, then by 1 − 0.03 × level of the attacking army’s origin-town Privateering (rounded down once over the product, never below 0) — is shielded from the loot pool entirely before anything else is computed — a single floor shared across Food, Lumber (wood), Stone, and Iron, spread proportionally across whichever of those the defender actually holds. Gold is never protected, and a defender with no Warehouse is unaffected.
  2. Carry capacity — each surviving unit can carry resources equal to its carry_capacity stat. The total loot is capped at the sum of all survivors’ carry capacity, multiplied by 1 + 0.1 × level of the origin town’s researched Logistics (rounded down), applied to whatever remains after Warehouse protection. Both research effects are read from the origin town when the attack resolves, not when it was sent.
  3. Proportional distribution — if the defender has more (unprotected) resources than the attackers can carry, each resource type is looted proportionally to its share of the total. Amounts are rounded down.
  4. Resource transfer — looted resources are deducted from the defender’s town immediately when combat resolves, and added to the attacker’s origin town when the surviving units return home at returns_at.

If the attacker loses — whether repelled outright or withdrawing at the turn limit with survivors — no resources are transferred.

Spoils of war on the return leg: if the origin town itself is captured by someone else while one of its own marches is still away, the survivors and loot still land there on schedule — for whoever owns the town now, not whoever sent the march. The captured city’s whole war effort, mid-swing, changes hands with it, the same way its garrison and any garrisoned Support do. The march’s hero does not change hands: it is still yours, and it goes to your oldest surviving town, the same refuge your heroes at home were moved to when the town fell (if you have no town left, it stays in the captured town). What changes hands is the troops and the goods, never the paperwork: the battle report stays with the players who fought it, and the town’s scouting missions, reinforcements and founding expeditions stay listed to the player who sent them, reports included.

Winning also erodes the defender’s Loyalty and raises their Grievance: 3 loyalty per win above 50, 2 at or below it, with grievance rising point-for-point by the same amount — deterministic, never rolled. See Conquest. This applies to every winning attack, not just plunder, and against any target: a player town, a colony, or a barbarian settlement. A losing attack grinds neither stat — though it still settles a player’s town, so the loyalty drift since its last settle lands then.

Multiple Attacks

When multiple attacks arrive at the same town simultaneously, they resolve in arrival order. The town is settled once, before the first of them; the first attacker loots from that full resource pool, and subsequent attackers loot from whatever remains.