Runs on edgerealm in a throwaway container with its own SQLite world,
so production data is untouched.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The map's coordinates now run from -500 to 499 around 0|0, with DS continent names
counted from the top-left (K55 at 0|0). New villages settle on a frontier whose
radius follows all villages at DS density (0.29 per field), at a random angle in
the direction the player picked; they avoid touching other players, not barbarians.
Each join brings 1.3 barbarian villages on average within a few fields. The
one-time barbarian square around the centre is gone, and game:reset-world wipes a
world back to empty while keeping user accounts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every per-level formula uses level - 1 as its exponent, so a building at level n
costs, makes and scores what it did at level n - 1. The migration shifts stored
levels and queued orders up by one; removing an instance now targets level 0.
Building space: 40 at HQ level 1, plus 20 per level above.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
villages.space becomes the base at HQ level 0 (existing villages 50 -> 40). A queued
HQ demolition counts already, and the HQ can't go below what stands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Starvation::sync() runs after every mutation and event: it keeps food.runs_out at
the moment the stock hits 0, starts the grace timer once the village starves and
stops it when income covers upkeep again. Each desertion wave takes the fewest
soldiers, highest upkeep first, that feed the rest; then the levy ends.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drafted villagers still eat but stop working; recruiting trains only undrafted ones.
A levy.ends event settles the village and sends them back; village.endLevy ends it early.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The package resolves the per-message authtoken for that message only.
Recording socket_<id> and the authed-user map lets the server authenticate
later messages itself and the game:events worker find sockets to push to.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>