Tickets 169–204: barbarians, navy, city combat & trade
June 24, 2026
A big stretch that pushes the prototype past "a map you move units around on"
toward an actual game with opponents, water, fighting cities, and the first
hints of an economy. The headline items: a Barbarian AI that settles and goes
on the offensive, a naval layer with transports, cities that can attack and
whose toughness scales with size, and a brand-new Trade screen anchored by a
market-maker called the Ethereal Banker.
Barbarians — the first opponent
169 Barbarian (CPU) player identity plus an "Enable Barbarians" lobby toggle — hosts can now opt a hostile AI faction into a game.
170 Barbarians join as a real participant, spawn multiple settlers, and render in a distinct black colour.
171 A registry-driven schedule for the free units Barbarians receive over time, so their growth is tunable in one place.
172 The run_cpu_turns resolution hook — Barbarians settle in place and collect their scheduled unit gifts each turn.
173 Barbarian military behaviour: they march toward targets, lay siege to cities, and seize them at 0 HP.
174 Barbarian settlers now avoid spawning too close to human players and bias toward the map interior, so they don't appear in your lap on turn one.
Sharper vision
175 Per-unit vision radius — sight is a property of the unit type now, decoupled from a single global constant, so scouts can see farther than the rest.
176 Trail vision — moving a unit reveals the whole corridor it travels through, not just the tiles around its final stop.
A naval layer
178 Per-unit terrain access plus the first naval unit, the Trireme — the foundation that lets unit types declare which terrain (land, coast, ocean) they can enter.
179 Naval units spawn onto an open Dock tile and have their own un-garrison policy, since they can't pop out onto land like a soldier.
180 A generic transport/cargo model with load and unload on the server — any future ship can carry units, with capacity and eligibility rules.
181 Transport client UX — a Load action, a panel listing loaded units, and unload controls.
182 The Trireme is restricted to coastal water for now, keeping early naval play close to shore.
Combat: standing orders & cities that fight back
177 Persistent attack orders — an attack target now sticks across turns and re-fires every resolution until the unit moves or the order is cleared, instead of needing to be re-issued each turn.
194 City max HP scales with population — bigger cities are meaningfully harder to crack.
196 Cities can attack — a city can now strike a tile in range, turning settlements into active defenders rather than passive HP bags.
197 Garrisoned units boost a city's attack power, so stuffing a city with defenders makes it hit harder.
199 City-attack UI/UX polish — an attack-power readout, no jarring camera pan when arming an attack, and an A hotkey.
198ENGINEERING_MODEL.md reconciliation documenting the new city-combat behaviour.
Smarter settling
195 Settlers now enforce a minimum founding distance from other cities, preventing cramped, overlapping starts.
Production & map readability
183 The production catalog now carries unit display stats for the preview pane (HP, strength, range, costs).
184 Production modal three-pane redesign — tabs plus a dedicated preview pane that shows what a selected item actually does before you queue it.
186 The production modal remembers your last-selected tab across close and reopen.
185 In-progress improvements now show an on-map indicator — a brighter ghost sprite with a turns-remaining number on the target tile.
187 Queued-but-not-started improvements get their own fainter on-map indicator with a build-order badge.
188 The tile-info readout now reads "Terrain - Improvement" instead of raw coordinates, so hovering a tile tells you what's on it at a glance.
New top-level systems: Trade, Diplomacy & Laurels
189 Three new top-row HUD buttons (Trade, Diplomacy, Laurels) and a reusable modal-shell framework — the chrome that future systems plug their content into.
190 The Laurels system backend — a per-player prestige score tracked in extensible category "buckets" (Territory and Wonders to start) that only ever rise. Territory laurels track your peak owned-tile count; Wonders laurels accrue each turn from buildings like the Monument.
191 The Laurels modal — a rankings board showing every player's standing in each category, side by side.
The economy arrives: Markets & the Ethereal Banker
200 The Market tile improvement — the building that unlocks trade for a city.
201 The Trade modal now gates on owning a Market and presents a two-button landing screen.
202 The Ethereal Banker backend — a market-maker with per-resource exchange rates, a buy endpoint, and rates that drift each turn in response to trading.
203 The Ethereal Banker buy screen — the client UI for exchanging resources at the current rates.
204 Fix: the Banker's reserves were being silently dropped before reaching the client because the /state route's allow-list didn't include them.
Housekeeping
192 An archive_done.py helper that moves completed tickets into a done/ folder, keeping the active ticket list focused.
193 Reconciled the ticket template with the house format we've actually settled into.