Tickets 148–168: fortify, clearing, resources & military
June 17, 2026
Three weeks of work since the last entry, focused on making the early game
feel less brittle, giving units a way to recover outside combat, and building
out the resource → building → unit chain that the military layer depends on.
Along the way: tile improvement clearing, a reusable tooltip module, and the
first impassable player-built structure.
Onboarding & early game
148 Loading overlay progress bar — map generation now shows live chunk-load progress instead of a static screen.
149 Cities start at 2 population on founding, so a new city can immediately work two tiles.
151ENGINEERING_MODEL.md doc pass for the loading bar and founding-population changes.
Fortify & garrison sustain
150 Fortify unit action — military units can dig in, heal each resolution tick, and show a shield icon on the map until they move.
152 Garrisoned units heal HP each resolution tick, using the same heal formula as fortify.
153 Hotkey F for Fortify (mirrors the existing A attack hotkey pattern).
154 Garrison unit HP display — the city panel shows HP instead of internal unit IDs.
Improvement clearing & production UX
155 Tile improvement clearing — cities can spend production to remove improvements; some clears grant one-time resource bonuses (e.g. chopping a forest yields wood).
156 Re-validate improvement placement and removal at production completion — stale queue items drop cleanly when prerequisites change mid-build.
157 Clear Improvement: single generic production entry plus tile-select targeting, replacing the per-type clear rows from 155.
158 Production picker: buildable-first ordering and resource-aware greying so affordable options surface to the top.
Client UI infrastructure
159 Reusable cursor-tooltip module with an imperative API — extracted from input.js so canvas hover (clear targeting, etc.) can drive dynamic tooltips.
Horses, iron & production costs
160 Horses and Iron state yields — procedural resource markers, buildable improvements, full schema and client wiring (mirrors the stone yield pattern).
163 State-yield enqueue cost loop refactor — unified deduction/refund path for wood, stone, science, horses, and iron across units and improvements.
Buildings, gating & military units
164 Production gating by controlled tile improvement — cities can only build units and improvements when the matching building exists in their territory.
165 Workshop, military buildings (Archery Range, Barracks, Stable), and Monument — first batch of yield-granting buildings that double as production prerequisites.
166 Archer, Spearman, and Horseman units — gated on their respective buildings, with horses_cost and iron_cost production costs.
167 Wired Attack/Fortify actions and attack-range targeting for the new military units; fixed god-mode spawn allowlist.
Terrain control
168 Stone Wall — first player-buildable impassable tile improvement. Adds an explicit impassable flag to the improvement registry; pathfinding treats walled tiles like mountains.