From bd8c00ca34bea28a408bb1715b10ebd8e83697f7 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sat, 24 Jan 2026 18:24:35 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B0=9C=EC=84=A0=EB=90=9C=20NPC=20?= =?UTF-8?q?=EA=B1=B4=EA=B5=AD/=ED=86=B5=EC=9D=BC=20=EC=8B=9C=EB=AE=AC?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=85=98=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EB=B0=8F=20=EB=A1=9C=EA=B7=B8=20=ED=95=84?= =?UTF-8?q?=ED=84=B0=EB=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/npcNationUprisingUnification.test.ts | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/app/game-engine/test/npcNationUprisingUnification.test.ts b/app/game-engine/test/npcNationUprisingUnification.test.ts index 67338a5..46f6df0 100644 --- a/app/game-engine/test/npcNationUprisingUnification.test.ts +++ b/app/game-engine/test/npcNationUprisingUnification.test.ts @@ -263,17 +263,15 @@ describe('NPC 건국/통일 장기 시뮬레이션', () => { }, }); - let occupationLogCount = 0; const dumpMonthlyLogs = (label: string) => { const logs = getAndClearCollectedLogs(); if (logs.length === 0) { return; } - const globalLogs = logs.filter((log) => log.scope === LogScope.SYSTEM); + const globalLogs = logs.filter((log) => log.category === LogCategory.HISTORY); if (globalLogs.length === 0) { return; } - occupationLogCount += globalLogs.filter((log) => log.text.includes('지배')).length; console.log('[DEBUG] month global logs', { label, total: globalLogs.length, @@ -408,7 +406,6 @@ describe('NPC 건국/통일 장기 시뮬레이션', () => { .listNations() .filter((nation) => nation.level > 0 && world.listCities().some((city) => city.nationId === nation.id)) .length; - let minNationCount = prevNationCount; let unifiedAt: { year: number; month: number } | null = null; while (true) { @@ -429,7 +426,6 @@ describe('NPC 건국/통일 장기 시뮬레이션', () => { expect(totalGenerals).toBeGreaterThanOrEqual(2); prevNationCount = activeNationCount; - minNationCount = Math.min(minNationCount, activeNationCount); if (activeNationCount === 1 && !unifiedAt) { const nextMonth = addMonths(world.getState().currentYear, world.getState().currentMonth, 1); @@ -452,15 +448,13 @@ describe('NPC 건국/통일 장기 시뮬레이션', () => { const meta = world.getState().meta as Record; if (!unifiedAt) { dumpWorldStatus(world, '통일 실패'); - expect(minNationCount).toBeLessThanOrEqual(4); - expect(occupationLogCount).toBeGreaterThan(0); - } else { - expect(meta.isUnited).toBe(2); - - const logs = getCollectedLogs(); - const hasUnificationLog = logs.some((log) => log.text.includes('전토를 통일하였습니다.')); - expect(hasUnificationLog).toBe(true); + throw new Error('unification did not occur before 300-01'); } + expect(meta.isUnited).toBe(2); + + const logs = getCollectedLogs(); + const hasUnificationLog = logs.some((log) => log.text.includes('전토를 통일하였습니다.')); + expect(hasUnificationLog).toBe(true); const warStates = world.listDiplomacy().filter((entry) => entry.state === DIPLOMACY_STATE.WAR); if (warStates.length > 0) {