sim-balance: register engine RULESET_V1_1 when present; item-6 variant

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 00:25:31 -05:00
co-authored by Claude Opus 5.5
parent fc64277b38
commit ed6a59c97f
2 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -14,9 +14,11 @@ export async function loadEngine(name: string): Promise<EngineAdapter<any, any>>
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<string, any>;
const { DEFAULT_RULESET } = game;
const file = process.env.SIM_RULESETS;
const rulesets: Record<string, any> = { base: DEFAULT_RULESET };
if (game.RULESET_V1_1) rulesets['v1.1'] = game.RULESET_V1_1; // engine-provided v1.1 (DESIGN #32)
if (file) {
// { "<id>": { "extends": "base", ...partial Ruleset } } — shallow-merged per top-level key.
const variants = JSON.parse(readFileSync(file, 'utf8')) as Record<string, any>;
+4
View File
@@ -0,0 +1,4 @@
{
"v1.1+item6": { "extends": "v1.1", "keywordParams": {
"nostalgic": { "amount": 2, "powerDelta": -1 }, "translated": { "amount": 1, "powerDelta": -1 } } }
}