feat: 여러 커맨드 로그 메시지 개선 및 불필요한 항목 제거

This commit is contained in:
2026-02-04 19:03:54 +00:00
parent 113e269a2c
commit 702f385612
6 changed files with 25 additions and 28 deletions
-15
View File
@@ -21,9 +21,6 @@ PHP only: <Y>${}</>에게 등용 권유 서신을 보내지 못했습니다. ${}
- [ ] General/che_상업투자
PHP only: ${}${} <span class='ev_failed'>실패</span>하여 <C>${}</> 상승했습니다. | ${}${} <S>성공</>하여 <C>${}</> 상승했습니다. | ${}${} 하여 <C>${}</> 상승했습니다.
TS only: ${}
- [ ] General/che_선동
PHP only: <G>${}</>에 ${}${} 성공했습니다.
TS only: <G>${}</>에 선동${} 성공했습니다. | 치안이 ${}, 민심이 ${} 만큼 감소했습니다.
- [ ] General/che_소집해제
PHP only: 병사들을 <R>소집해제</>하였습니다.
TS only: 병사들을 소집해제하여 인구가 ${} 증가했습니다.
@@ -53,18 +50,6 @@ PHP only: <G>${}</>의 정보를 많이 얻었습니다. | 【<G>${}</>】주민
TS only: <G>${}</>의 정보를 ${} 얻었습니다. | 주민:${}, 민심:${}, ...
- [ ] General/che_출병
TS only: 경로에 도달할 방법이 없습니다. | <G>${}</>${} 가는 도중 <G>${}</>을 거치기로 합니다.
- [ ] General/che_탈취
PHP only: <G>${}</>에 ${}${} 성공했습니다.
TS only: <G>${}</>에 탈취${} 성공했습니다. | 금 ${}, 쌀 ${} 을 획득했습니다.
- [ ] General/che_파괴
PHP only: <G>${}</>에 ${}${} 성공했습니다.
TS only: <G>${}</>에 파괴${} 성공했습니다. | 수비가 ${}, 성벽이 ${} 만큼 감소했습니다.
- [ ] General/che_하야
PHP only: <D>${}</>에서 하야했습니다.
TS only: 하야하여 재야로 돌아갑니다.
- [ ] General/che_화계
PHP only: <G>${}</>에 ${}${} 성공했습니다. | <G>${}</>에 ${}${} 실패했습니다.
TS only: <G>${}</>에 화계 실패했습니다. | <G>${}</>에 화계 성공했습니다.
- [ ] Nation/che_국호변경
PHP only: 이미 같은 국호를 가진 곳이 있습니다. ${} 실패 | 국호를 <D>${}</>${} 변경합니다.
TS only: 국호를 <D>${}</>로 변경하였습니다.
@@ -71,14 +71,15 @@ export class ActionResolver<
const actualTrustDmg = currentTrust - newTrust;
// Log
const commandName = ACTION_NAME;
const destCityName = destCity.name;
ctx.addLog(`<G>${destCityName}</>에 ${ACTION_NAME}${JosaUtil.pick(ACTION_NAME, '이')} 성공했습니다.`, {
ctx.addLog(`<G><b>${destCityName}</b></>에 ${commandName}${JosaUtil.pick(commandName, '이')} 성공했습니다.`, {
category: LogCategory.ACTION,
format: LogFormat.MONTH,
});
ctx.addLog(`치안이 ${actualSecuDmg}, 민심이 ${actualTrustDmg.toFixed(1)} 만큼 감소했습니다.`, {
category: LogCategory.ACTION,
format: LogFormat.MONTH,
format: LogFormat.PLAIN,
});
// City Update
@@ -152,14 +152,15 @@ export class ActionResolver<
);
}
const commandName = ACTION_NAME;
const destCityName = destCity.name;
ctx.addLog(`<G>${destCityName}</>에 ${ACTION_NAME}${JosaUtil.pick(ACTION_NAME, '이')} 성공했습니다.`, {
ctx.addLog(`<G><b>${destCityName}</b></>에 ${commandName}${JosaUtil.pick(commandName, '이')} 성공했습니다.`, {
category: LogCategory.ACTION,
format: LogFormat.MONTH,
});
ctx.addLog(` ${stolenGold}, 쌀 ${stolenRice} 을 획득했습니다.`, {
ctx.addLog(`<C>${stolenGold}</> 쌀<C>${stolenRice}</>을 획득했습니다.`, {
category: LogCategory.ACTION,
format: LogFormat.MONTH,
format: LogFormat.PLAIN,
});
effects.push(
@@ -71,14 +71,15 @@ export class ActionResolver<
const actualWallDmg = destCity.wall - newWall;
// Log
const commandName = ACTION_NAME;
const destCityName = destCity.name;
ctx.addLog(`<G>${destCityName}</>에 ${ACTION_NAME}${JosaUtil.pick(ACTION_NAME, '이')} 성공했습니다.`, {
ctx.addLog(`<G><b>${destCityName}</b></>에 ${commandName}${JosaUtil.pick(commandName, '이')} 성공했습니다.`, {
category: LogCategory.ACTION,
format: LogFormat.MONTH,
});
ctx.addLog(`수비가 ${actualDefDmg}, 성벽이 ${actualWallDmg} 만큼 감소했습니다.`, {
category: LogCategory.ACTION,
format: LogFormat.MONTH,
format: LogFormat.PLAIN,
});
// City Update
@@ -62,7 +62,7 @@ export class ActionResolver<
const nextExp = Math.floor(general.experience * (1 - penaltyRatio));
const nextDed = Math.floor(general.dedication * (1 - penaltyRatio));
context.addLog(`하야하여 재야로 돌아갑니다.`, {
context.addLog(`<D><b>${nation.name}</b></>에서 하야했습니다.`, {
category: LogCategory.ACTION,
format: LogFormat.MONTH,
});
@@ -30,6 +30,7 @@ import type {
} from '@sammo-ts/logic/actions/engine.js';
import { createCityPatchEffect, createGeneralPatchEffect } from '@sammo-ts/logic/actions/engine.js';
import { LogCategory, LogFormat, LogScope } from '@sammo-ts/logic/logging/types.js';
import { JosaUtil } from '@sammo-ts/common';
import { z } from 'zod';
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
@@ -296,10 +297,15 @@ export class ActionResolver<
general.dedication = nextDedication;
general.meta = metaUpdated;
const commandName = ACTION_NAME;
if (!result.success) {
context.addLog(`<G><b>${context.destCity.name}</b></>에 ${ACTION_NAME} 실패했습니다.`, {
format: LogFormat.MONTH,
});
context.addLog(
`<G><b>${context.destCity.name}</b></>에 ${commandName}${JosaUtil.pick(commandName, '이')} 실패했습니다.`,
{
format: LogFormat.MONTH,
}
);
return { effects: [] };
}
@@ -325,9 +331,12 @@ export class ActionResolver<
category: LogCategory.SUMMARY,
format: LogFormat.MONTH,
});
context.addLog(`<G><b>${context.destCity.name}</b></>에 ${ACTION_NAME} 성공했습니다.`, {
context.addLog(
`<G><b>${context.destCity.name}</b></>에 ${commandName}${JosaUtil.pick(commandName, '이')} 성공했습니다.`,
{
format: LogFormat.MONTH,
});
}
);
context.addLog(
`도시의 농업이 <C>${result.agriDamage}</>, 상업이 <C>${result.commDamage}</>만큼 감소하고, 장수 <C>${result.injuryCount}</>명이 부상 당했습니다.`,
{