fix: Ref 게임 로직과 시나리오 풀 호환을 보정
월 경계, 전투 기술 상한, 연감과 베팅·설문·경매 정산 순서를 Ref 계약에 맞춘다.\n\n시나리오 일반 풀을 ENGINE mutation과 logical tick 기반으로 직렬화하고 914·915 catalog 및 조건부 100기 pool 실행 경계를 추가한다.\n\n경매 worker는 세대별 durable event만 만들고 ENGINE이 row lock 후 상태 전이와 정산을 단일 transaction으로 소유한다.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import type { City, General, Nation } from '@sammo-ts/logic';
|
||||
import { loadItemModules, type City, type General, type Nation } from '@sammo-ts/logic';
|
||||
import { createRefOrderedActionStack } from '@sammo-ts/logic/actionModules/bundle.js';
|
||||
|
||||
import { GeneralAI, shouldUseNationAi } from '../src/turn/ai/generalAi.js';
|
||||
@@ -712,9 +712,7 @@ describe('legacy NPC user-chief promotion parity', () => {
|
||||
expect(run(2)).toEqual([]);
|
||||
expect(run(3)).toEqual([{ generalId: 2, officerLevel: 11, officerCity: 0, permission: 'ambassador' }]);
|
||||
expect(run(3, 0)).toEqual([]);
|
||||
expect(run(3, 0, 1)).toEqual([
|
||||
{ generalId: 2, officerLevel: 11, officerCity: 0, permission: 'ambassador' },
|
||||
]);
|
||||
expect(run(3, 0, 1)).toEqual([{ generalId: 2, officerLevel: 11, officerCity: 0, permission: 'ambassador' }]);
|
||||
});
|
||||
|
||||
it('keeps user-ruler duties individually disabled until each setting is enabled', () => {
|
||||
@@ -882,6 +880,27 @@ describe('legacy NPC AI final-decision parity', () => {
|
||||
effectiveLeadership: 85,
|
||||
});
|
||||
});
|
||||
|
||||
it('passes scenario time and maximum tech level to year-scaling stat items', async () => {
|
||||
const [leadershipWine] = await loadItemModules(['che_능력치_통솔_보령압주']);
|
||||
expect(leadershipWine).toBeDefined();
|
||||
const modules = singleActionModuleStack(leadershipWine!);
|
||||
const world = {
|
||||
id: 1,
|
||||
currentYear: 200,
|
||||
currentMonth: 1,
|
||||
tickSeconds: 600,
|
||||
lastTurnTime: new Date('0200-01-01T00:00:00Z'),
|
||||
meta: {},
|
||||
};
|
||||
|
||||
expect(
|
||||
resolveLegacyAiStatsWithModules(baseGeneral(), baseNation(), 100, modules, null, world, 180, 15)
|
||||
).toMatchObject({
|
||||
fullLeadership: 80,
|
||||
effectiveLeadership: 80,
|
||||
});
|
||||
});
|
||||
it.each([
|
||||
['Core scenario name', '강유'],
|
||||
['Ref stored name', 'ⓝ강유'],
|
||||
|
||||
Reference in New Issue
Block a user