From ed6a59c97f868c6a29c4506d3c4381eb4d019dc1 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 00:25:31 -0500 Subject: [PATCH] sim-balance: register engine RULESET_V1_1 when present; item-6 variant Co-Authored-By: Claude Opus 5.5 --- scripts/sim/run.ts | 4 +++- scripts/sim/variants/v1.1-engine.json | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 scripts/sim/variants/v1.1-engine.json diff --git a/scripts/sim/run.ts b/scripts/sim/run.ts index 1ed1d2b..1274173 100644 --- a/scripts/sim/run.ts +++ b/scripts/sim/run.ts @@ -14,9 +14,11 @@ export async function loadEngine(name: string): Promise> if (name === 'toy') return (await import('./toy-engine.ts')).toyEngine; if (name === 'game') { const { makeGameEngine } = await import('../../shared/bots/game-adapter.ts'); - const { DEFAULT_RULESET } = await import('../../shared/game/index.ts'); + const game = await import('../../shared/game/index.ts') as Record; + const { DEFAULT_RULESET } = game; const file = process.env.SIM_RULESETS; const rulesets: Record = { base: DEFAULT_RULESET }; + if (game.RULESET_V1_1) rulesets['v1.1'] = game.RULESET_V1_1; // engine-provided v1.1 (DESIGN #32) if (file) { // { "": { "extends": "base", ...partial Ruleset } } — shallow-merged per top-level key. const variants = JSON.parse(readFileSync(file, 'utf8')) as Record; diff --git a/scripts/sim/variants/v1.1-engine.json b/scripts/sim/variants/v1.1-engine.json new file mode 100644 index 0000000..80fa66f --- /dev/null +++ b/scripts/sim/variants/v1.1-engine.json @@ -0,0 +1,4 @@ +{ + "v1.1+item6": { "extends": "v1.1", "keywordParams": { + "nostalgic": { "amount": 2, "powerDelta": -1 }, "translated": { "amount": 1, "powerDelta": -1 } } } +}