feat(scenario): CHE 0기 여명 시나리오를 추가한다
일반 공백지 규칙을 유지하면서 가동 전 M장 50명과 유니크 획득 계수 2배를 적용한다. 시나리오 합성, 실제 M장 생성, Gateway 카탈로그와 Chromium 선택지를 회귀 검증한다.
This commit is contained in:
@@ -151,6 +151,25 @@ const buildHarness = (
|
||||
};
|
||||
|
||||
describe('CreateManyNPC monthly action', () => {
|
||||
it('creates exactly 50 ordinary M generals without fill-count expansion', async () => {
|
||||
const { world, reservedTurns, handler, environment } = buildHarness();
|
||||
|
||||
await handler([50, 0], environment, {
|
||||
id: 1,
|
||||
targetCode: 'month',
|
||||
priority: 1,
|
||||
condition: true,
|
||||
action: [],
|
||||
meta: {},
|
||||
});
|
||||
|
||||
const created = world.peekDirtyState().createdGenerals;
|
||||
expect(created).toHaveLength(50);
|
||||
expect(created.every((general) => general.npcState === 3 && general.name.startsWith('ⓜ'))).toBe(true);
|
||||
expect(reservedTurns.peekDirtyState().generalInitializationIds).toHaveLength(50);
|
||||
expect(world.peekDirtyState().logs.map((log) => log.text)).toContain('장수 <C>50</>명이 <S>등장</>하였습니다.');
|
||||
});
|
||||
|
||||
it('uses and consumes an available U30 candidate without random-name or random-stat fallback', async () => {
|
||||
const info = {
|
||||
generalName: '풀장수',
|
||||
|
||||
@@ -52,10 +52,38 @@ describe('tracked scenario resources', () => {
|
||||
|
||||
expect(scenarioIds).toContain(914);
|
||||
expect(scenarioIds).toContain(915);
|
||||
expect(scenarioIds).toContain(916);
|
||||
const scenarios = await Promise.all(scenarioIds.map((scenarioId) => loadScenarioDefinitionById(scenarioId)));
|
||||
expect(scenarios.every((scenario) => scenario.title.length > 0)).toBe(true);
|
||||
});
|
||||
|
||||
it('keeps scenario 916 equal to ordinary blank land except for its launch modifiers', async () => {
|
||||
const [ordinaryBlank, dawn] = await Promise.all(
|
||||
[0, 916].map((scenarioId) => loadScenarioDefinitionById(scenarioId))
|
||||
);
|
||||
const { uniqueTrialCoef, ...dawnConst } = dawn.config.const;
|
||||
|
||||
expect(dawn.title).toBe('【공백지】 여명');
|
||||
expect(uniqueTrialCoef).toBe(2);
|
||||
expect({ ...dawn.config, const: dawnConst }).toEqual(ordinaryBlank.config);
|
||||
expect(dawn.history).toEqual(ordinaryBlank.history);
|
||||
expect(dawn.events[0]).toEqual([
|
||||
'month',
|
||||
1000,
|
||||
['or', ['Date', '==', null, 12], ['Date', '==', null, 6]],
|
||||
['CreateManyNPC', 50, 0],
|
||||
['DeleteEvent'],
|
||||
]);
|
||||
expect(dawn.events.slice(1)).toEqual(ordinaryBlank.events.slice(1));
|
||||
|
||||
expect({
|
||||
...dawn,
|
||||
title: ordinaryBlank.title,
|
||||
events: ordinaryBlank.events,
|
||||
config: ordinaryBlank.config,
|
||||
}).toEqual(ordinaryBlank);
|
||||
});
|
||||
|
||||
refSourceIt('preserves the Ref scenario 915 S100 pool and event order exactly', async () => {
|
||||
const referencePath = path.join(resolveRefSourceRoot(), 'hwe', 'scenario', 'scenario_915.json');
|
||||
const [scenario, referenceSource] = await Promise.all([
|
||||
|
||||
Reference in New Issue
Block a user