diff --git a/app/game-engine/src/turn/reservedTurnHandler.ts b/app/game-engine/src/turn/reservedTurnHandler.ts index c787e0c4..0c6f1a42 100644 --- a/app/game-engine/src/turn/reservedTurnHandler.ts +++ b/app/game-engine/src/turn/reservedTurnHandler.ts @@ -1858,7 +1858,9 @@ export const createReservedTurnHandler = async (options: { currentGeneral.crew = 0; currentGeneral.rice = 0; logs.push( - createGeneralActionLog(currentGeneral.id, '군량이 모자라 병사들이 소집해제되었습니다!') + createGeneralActionLog(currentGeneral.id, '군량이 모자라 병사들이 소집해제되었습니다!', { + format: LogFormat.PLAIN, + }) ); preTurnContext.skill.activate('pre.소집해제'); } diff --git a/app/game-engine/test/generalTurnLegacyCompatibility.test.ts b/app/game-engine/test/generalTurnLegacyCompatibility.test.ts index 81ff443e..f4355368 100644 --- a/app/game-engine/test/generalTurnLegacyCompatibility.test.ts +++ b/app/game-engine/test/generalTurnLegacyCompatibility.test.ts @@ -1,5 +1,6 @@ import { describe, expect, it } from 'vitest'; import { ConstantRNG, RandUtil } from '@sammo-ts/common'; +import { LogFormat } from '@sammo-ts/logic'; import type { TurnSchedule } from '@sammo-ts/logic/turn/calendar.js'; import type { TurnGeneral, TurnWorldSnapshot, TurnWorldState } from '../src/turn/types.js'; import { createTurnTestHarness } from './helpers/turnTestHarness.js'; @@ -358,7 +359,12 @@ describe('legacy general-turn execution contract', () => { expect(updated.crew).toBe(0); expect(updated.rice).toBe(0); expect(harness.world.getCityById(1)!.population).toBe(10_200); - expect(harness.getCollectedLogs().some((log) => log.text.includes('소집해제'))).toBe(true); + expect(harness.getCollectedLogs()).toContainEqual( + expect.objectContaining({ + text: expect.stringContaining('소집해제'), + format: LogFormat.PLAIN, + }) + ); }); it('persists pre-turn stacking and applies the inherited 60-turn cooldown', async () => { diff --git a/packages/logic/src/actions/turn/general/che_장비매매.ts b/packages/logic/src/actions/turn/general/che_장비매매.ts index 979c09e8..1b596fde 100644 --- a/packages/logic/src/actions/turn/general/che_장비매매.ts +++ b/packages/logic/src/actions/turn/general/che_장비매매.ts @@ -238,6 +238,7 @@ export class ActionDefinition< { scope: LogScope.SYSTEM, category: LogCategory.HISTORY, + format: LogFormat.YEAR_MONTH, } ); } diff --git a/packages/logic/test/itemActionEvents.test.ts b/packages/logic/test/itemActionEvents.test.ts index 4c720c76..b29ac120 100644 --- a/packages/logic/test/itemActionEvents.test.ts +++ b/packages/logic/test/itemActionEvents.test.ts @@ -225,6 +225,10 @@ describe('typed item lifecycle events', () => { format: LogFormat.MONTH, }, ]); + expect(logs.at(-1)).toMatchObject({ + message: expect.stringContaining('【판매】'), + format: LogFormat.YEAR_MONTH, + }); expect(outcome.effects).toContainEqual( expect.objectContaining({ type: 'general:patch',