forked from WikiDeck/wikideck
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:
+3
-1
@@ -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>;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"v1.1+item6": { "extends": "v1.1", "keywordParams": {
|
||||
"nostalgic": { "amount": 2, "powerDelta": -1 }, "translated": { "amount": 1, "powerDelta": -1 } } }
|
||||
}
|
||||
Reference in New Issue
Block a user