Migration & refugees: population flows (refugees after war/disaster; settlers into no-man's-land) #64

Closed
opened 2026-10-15 17:05:42 +02:00 by kamilkrzywda · 0 comments
Owner

What

Add population flows: refugees flee a nation/region after a war or disaster (reducing its population/economy), and settlers move into no-man's-land (re-claiming released regions), both moving population between regions/nations.

Mechanism

  • TurnResult gains migration: { flows: { type: 'refugees'|'settlers'; from: string /* nationRef or regionKey */; to: string /* nationRef or regionKey */; amount?: number }[] } — required, default [].
  • A refugee flow moves population from a source (reducing its population-derived weight/economy) to a host (increasing it); a settler flow re-claims a released/no-man's-land region (ties into the unowned re-claim path and per-region stats).
  • Builds on: no-man's-land (unowned), per-region stats, territory.

Acceptance

  • e2e safety (critical): stub returns migration: { flows: [] }, deterministic; additive; must not break the UK-in-wwii-1939 e2e (empty frontier, military 80→85, 7-item legend).
  • Unit tests in server/engine.test.ts (refugee flow, settler re-claim, per-region stat update).
  • Version bump at PR time.
## What Add **population flows**: **refugees** flee a nation/region after a war or disaster (reducing its population/economy), and **settlers** move into **no-man's-land** (re-claiming released regions), both moving population between regions/nations. ## Mechanism - `TurnResult` gains `migration: { flows: { type: 'refugees'|'settlers'; from: string /* nationRef or regionKey */; to: string /* nationRef or regionKey */; amount?: number }[] }` — required, default `[]`. - A refugee flow moves population from a source (reducing its `population`-derived weight/economy) to a host (increasing it); a settler flow re-claims a released/no-man's-land region (ties into the `unowned` re-claim path and per-region stats). - Builds on: no-man's-land (`unowned`), per-region stats, territory. ## Acceptance - **e2e safety (critical):** stub returns `migration: { flows: [] }`, deterministic; additive; must **not** break the UK-in-`wwii-1939` e2e (empty frontier, military 80→85, 7-item legend). - Unit tests in `server/engine.test.ts` (refugee flow, settler re-claim, per-region stat update). - Version bump at PR time.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/History#64