- presets/templates/: 3 light era templates (ww2/present/near-future) + index.json manifest (id, name, year, eraDescription, suggestedPowers, tensions). - server/templates.ts: createTemplateStore (mirror of createPresetStore). - shared/scenario.ts: dependency-free contract for the dynamic scenario path — SuggestedPower / EraTemplate / TemplateMeta / WorldNation / ScenarioEvent / WorldDraft / Checkpoint types, relationFromScore, validateWorldDraft (pure, defensive, never throws), worldDraftToGameState (region-key territory via the injected expand resolver, regionStats seeded, clean turn-1 state). - tests: server/templates.test.ts (manifest order + file shape), server/scenario-shared.test.ts (15 cases: validation/clamp/dedup/null + transform). Fixes #52
18 lines
889 B
JSON
18 lines
889 B
JSON
{
|
|
"id": "near-future",
|
|
"name": "Near Future",
|
|
"year": 2035,
|
|
"eraDescription": "A near-future world: autonomous fleets, orbital assets, and climate-hamstrung coastlines. Old alliances strain under new technologies and old grievances as the great powers reach for the next horizon.",
|
|
"suggestedPowers": [
|
|
{ "name": "North American Union", "region": "USA", "note": "The industrial-technological core of the West." },
|
|
{ "name": "Chinese Federation", "region": "CHN", "note": "The integrated superpower of the Pacific." },
|
|
{ "name": "European Confederation", "region": "FRA", "note": "The united European bloc." },
|
|
{ "name": "Russian Union", "region": "RUS", "note": "The resource frontier state." }
|
|
],
|
|
"tensions": [
|
|
"Autonomous weapons and the new arms race",
|
|
"Climate migration and resource wars",
|
|
"The contest for space and orbital dominance"
|
|
]
|
|
}
|