fix: 커맨드 차등 생명주기와 로그 그래프를 보강

장수 55종과 수뇌 35종의 상태, 로그, 메시지, 예약 턴 비교를 닫습니다.

실제 시나리오 프로필과 대표 PostgreSQL 수명주기, 즉시 외교와 출병 회귀를 추가하고 발견된 Ref 로그 및 생성 장수 저장 차이를 교정합니다.
This commit is contained in:
2026-08-23 21:48:29 +00:00
parent 85591c68ad
commit c63a49bd07
128 changed files with 8615 additions and 848 deletions
@@ -39,7 +39,11 @@ const buildGeneral = (id: number): TurnGeneral => ({
describe('unique lottery on general commands', () => {
it('awards a unique item for eligible commands', async () => {
const schedule: TurnSchedule = { entries: [{ startMinute: 0, tickMinutes: 10 }] };
const generals = [buildGeneral(1)];
const lotteryGeneral = buildGeneral(1);
lotteryGeneral.experience = 995;
lotteryGeneral.dedication = 899;
lotteryGeneral.meta = { killturn: 24, explevel: 9, dedlevel: 3 };
const generals = [lotteryGeneral];
const snapshot: TurnWorldSnapshot = {
generals: generals as any,
cities: [
@@ -172,6 +176,14 @@ describe('unique lottery on general commands', () => {
expect(result.general?.role.items.weapon).toBe('che_무기_12_칠성검');
const logTexts = (result.logs ?? []).map((entry) => entry.text);
expect(logTexts.some((text) => text.includes('【아이템】'))).toBe(true);
const actionIndex = logTexts.findIndex((text) => text.includes('훈련'));
const levelIndex = logTexts.findIndex((text) => text.includes('레벨업'));
const dedicationIndex = logTexts.findIndex((text) => text.includes('승급'));
const uniqueIndex = logTexts.findIndex((text) => text.includes('습득했습니다'));
expect([actionIndex, levelIndex, dedicationIndex, uniqueIndex].every((index) => index >= 0)).toBe(true);
expect(actionIndex).toBeLessThan(levelIndex);
expect(levelIndex).toBeLessThan(dedicationIndex);
expect(dedicationIndex).toBeLessThan(uniqueIndex);
});
it('does not award a unique item reserved by an active auction', async () => {