fix: 장수 명령의 Ref 로그 형식을 복원한다
This commit is contained in:
@@ -1858,7 +1858,9 @@ export const createReservedTurnHandler = async (options: {
|
|||||||
currentGeneral.crew = 0;
|
currentGeneral.crew = 0;
|
||||||
currentGeneral.rice = 0;
|
currentGeneral.rice = 0;
|
||||||
logs.push(
|
logs.push(
|
||||||
createGeneralActionLog(currentGeneral.id, '군량이 모자라 병사들이 <R>소집해제</>되었습니다!')
|
createGeneralActionLog(currentGeneral.id, '군량이 모자라 병사들이 <R>소집해제</>되었습니다!', {
|
||||||
|
format: LogFormat.PLAIN,
|
||||||
|
})
|
||||||
);
|
);
|
||||||
preTurnContext.skill.activate('pre.소집해제');
|
preTurnContext.skill.activate('pre.소집해제');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { describe, expect, it } from 'vitest';
|
import { describe, expect, it } from 'vitest';
|
||||||
import { ConstantRNG, RandUtil } from '@sammo-ts/common';
|
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 { TurnSchedule } from '@sammo-ts/logic/turn/calendar.js';
|
||||||
import type { TurnGeneral, TurnWorldSnapshot, TurnWorldState } from '../src/turn/types.js';
|
import type { TurnGeneral, TurnWorldSnapshot, TurnWorldState } from '../src/turn/types.js';
|
||||||
import { createTurnTestHarness } from './helpers/turnTestHarness.js';
|
import { createTurnTestHarness } from './helpers/turnTestHarness.js';
|
||||||
@@ -358,7 +359,12 @@ describe('legacy general-turn execution contract', () => {
|
|||||||
expect(updated.crew).toBe(0);
|
expect(updated.crew).toBe(0);
|
||||||
expect(updated.rice).toBe(0);
|
expect(updated.rice).toBe(0);
|
||||||
expect(harness.world.getCityById(1)!.population).toBe(10_200);
|
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 () => {
|
it('persists pre-turn stacking and applies the inherited 60-turn cooldown', async () => {
|
||||||
|
|||||||
@@ -238,6 +238,7 @@ export class ActionDefinition<
|
|||||||
{
|
{
|
||||||
scope: LogScope.SYSTEM,
|
scope: LogScope.SYSTEM,
|
||||||
category: LogCategory.HISTORY,
|
category: LogCategory.HISTORY,
|
||||||
|
format: LogFormat.YEAR_MONTH,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,6 +225,10 @@ describe('typed item lifecycle events', () => {
|
|||||||
format: LogFormat.MONTH,
|
format: LogFormat.MONTH,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
expect(logs.at(-1)).toMatchObject({
|
||||||
|
message: expect.stringContaining('【판매】'),
|
||||||
|
format: LogFormat.YEAR_MONTH,
|
||||||
|
});
|
||||||
expect(outcome.effects).toContainEqual(
|
expect(outcome.effects).toContainEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
type: 'general:patch',
|
type: 'general:patch',
|
||||||
|
|||||||
Reference in New Issue
Block a user