fertig-classic-games/src
Brian Fertig d920d8e476 feat(combat): freeze colony defense regen and defensive builds while under siege
Add siegeFreezesDefense mechanic (default true) that stops a colony's
passive defenseHp trickle and blocks defensive building completion at the
front of the build queue while a hostile warship fleet is present.

This fixes the recurring "Under Attack" notification loop reported by Brian
where defenseHp would regenerate each turn, re-arming the pendingBattlesFor
gate and triggering fresh popup notices for an already-beaten colony.

Also adds an AI dispatch throttle in manageFleets: idle fleets no longer
open redundant attack orders against colonies the empire already holds orbit
over with defenseHp beaten to 0. Excluded fleets fall through to rally logic
and naturally join the existing siege or find a fresh front.

New helpers: isDefensiveBuildingId, isHostileWarshipFleet, hasHostileWarshipFleet
— shared across processColony, pendingBattlesFor, and VegaAI to ensure a
single definition of "under active siege".

Includes tests (sections 5d, 5e) covering regen freeze, build queue freeze,
siegeFreezesDefense=false toggle, and AI throttle.
2026-08-15 08:00:40 -06:00
..
data feat(master-vega): overhaul bombard/invasion UX, consequences, and battle logic 2026-08-14 23:17:31 -06:00
games feat(combat): freeze colony defense regen and defensive builds while under siege 2026-08-15 08:00:40 -06:00
scenes
services
ui
words
config.js
main.js feat(master-vega): overhaul bombard/invasion UX, consequences, and battle logic 2026-08-14 23:17:31 -06:00