fix: 내부 전용 예약 명령 실행 경계를 분리한다

This commit is contained in:
2026-08-24 16:02:35 +00:00
parent b5763290d2
commit 9fe1f1878a
11 changed files with 169 additions and 63 deletions
@@ -1,5 +1,9 @@
import { describe, expect, it } from 'vitest';
import { DEFAULT_TURN_COMMAND_PROFILE, type ScenarioConfig } from '@sammo-ts/logic';
import {
DEFAULT_TURN_COMMAND_PROFILE,
INTERNAL_GENERAL_TURN_COMMAND_KEYS,
type ScenarioConfig,
} from '@sammo-ts/logic';
import { buildCommandEnv, buildReservedTurnDefinitions } from '../src/turn/reservedTurnCommands.js';
@@ -54,6 +58,7 @@ describe('Ref active-action inheritance inventory', () => {
env: buildCommandEnv(scenarioConfig),
commandProfile: DEFAULT_TURN_COMMAND_PROFILE,
defaultActionKey: '휴식',
internalGeneralCommandKeys: INTERNAL_GENERAL_TURN_COMMAND_KEYS,
});
const generalWithFixedOrContextAmount = [...general.entries()]
@@ -71,4 +76,14 @@ describe('Ref active-action inheritance inventory', () => {
.sort();
expect(nationWithPoint).toEqual([...nationCommands].sort());
});
it('loads every internal command without adding it to the selectable profile', async () => {
const { general } = await buildReservedTurnDefinitions({
env: buildCommandEnv(scenarioConfig),
commandProfile: { general: ['휴식'], nation: ['휴식'] },
defaultActionKey: '휴식',
});
expect([...general.keys()].sort()).toEqual(['che_NPC능동', 'che_등용수락', 'che_방랑', '휴식'].sort());
});
});