Add an economy interaction layer: nations can enter trade agreements (both economies grow over time) and impose embargoes (the target's economy decays).
GameState gains trades: [string,string][] and embargoes: {from:string;target:string}[]. On each committed turn, the engine applies: each active trade → a small economy stat increase to both parties (clamped); each active embargo → a small economy decrease to the target.
A war between two trading nations can auto-suspend the trade (or the LLM can declare it).
Ties into per-region stats: trade bonuses can also be applied at the region level for owned regions.
Acceptance
e2e safety (critical): stub returns economy: { trade: [], embargo: [] }, deterministic; additive (legacy games load with empty lists); must not break the UK-in-wwii-1939 e2e (empty frontier, military 80→85, 7-item legend).
Unit tests in server/engine.test.ts (trade growth, embargo decay, war-suspension).
System prompt documents economy; user prompt carries active trades/embargoes. Version bump at PR time.
## What
Add an **economy interaction** layer: nations can enter **trade agreements** (both economies grow over time) and impose **embargoes** (the target's economy decays).
## Mechanism
- `TurnResult` gains `economy: { trade: { a: string; b: string }[]; embargo: { from: string; target: string; lift?: boolean }[] }` — required, default `[]`s.
- `GameState` gains `trades: [string,string][]` and `embargoes: {from:string;target:string}[]`. On each committed turn, the engine applies: each active trade → a small `economy` stat increase to both parties (clamped); each active embargo → a small `economy` decrease to the target.
- A `war` between two trading nations can auto-suspend the trade (or the LLM can declare it).
- Ties into per-region stats: trade bonuses can also be applied at the region level for owned regions.
## Acceptance
- **e2e safety (critical):** stub returns `economy: { trade: [], embargo: [] }`, deterministic; additive (legacy games load with empty lists); must **not** break the UK-in-`wwii-1939` e2e (empty frontier, military 80→85, 7-item legend).
- Unit tests in `server/engine.test.ts` (trade growth, embargo decay, war-suspension).
- System prompt documents `economy`; user prompt carries active trades/embargoes. Version bump at PR time.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
Add an economy interaction layer: nations can enter trade agreements (both economies grow over time) and impose embargoes (the target's economy decays).
Mechanism
TurnResultgainseconomy: { trade: { a: string; b: string }[]; embargo: { from: string; target: string; lift?: boolean }[] }— required, default[]s.GameStategainstrades: [string,string][]andembargoes: {from:string;target:string}[]. On each committed turn, the engine applies: each active trade → a smalleconomystat increase to both parties (clamped); each active embargo → a smalleconomydecrease to the target.warbetween two trading nations can auto-suspend the trade (or the LLM can declare it).Acceptance
economy: { trade: [], embargo: [] }, deterministic; additive (legacy games load with empty lists); must not break the UK-in-wwii-1939e2e (empty frontier, military 80→85, 7-item legend).server/engine.test.ts(trade growth, embargo decay, war-suspension).economy; user prompt carries active trades/embargoes. Version bump at PR time.