feat: add JosaUtil for Korean grammatical handling in 의병모집 and 인재탐색 actions

This commit is contained in:
2025-12-30 00:11:25 +00:00
parent 30de11797b
commit a650fc2daa
2 changed files with 11 additions and 4 deletions
@@ -33,6 +33,7 @@ import {
} from '../../engine.js';
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
import { buildRecruitmentGeneral } from './recruitment.js';
import { JosaUtil } from '@sammo-ts/common';
export interface VolunteerRecruitArgs {}
@@ -275,9 +276,12 @@ export class ActionResolver<
);
if (nation?.id) {
const generalName = context.general.name;
const generalJosa = JosaUtil.pick(generalName, '이');
const actionJosa = JosaUtil.pick(ACTION_NAME, '을');
effects.push(
createLogEffect(
`<Y>${context.general.name}</> <M>${ACTION_NAME}</> 발동했습니다.`,
`<Y>${generalName}</>${generalJosa} <M>${ACTION_NAME}</>${actionJosa} 발동했습니다.`,
{
scope: LogScope.NATION,
category: LogCategory.HISTORY,
@@ -31,6 +31,7 @@ import {
} from '../../engine.js';
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
import { buildRecruitmentGeneral } from './recruitment.js';
import { JosaUtil } from '@sammo-ts/common';
export interface TalentScoutArgs {}
@@ -394,22 +395,24 @@ export class ActionResolver<
});
effects.push(createGeneralAddEffect(newGeneral));
const nameObjJosa = JosaUtil.pick(name, '을');
const nameSubjJosa = JosaUtil.pick(name, '이');
effects.push(
createLogEffect(`인재 <Y>${name}</> 발견했습니다.`, {
createLogEffect(`인재 <Y>${name}</>${nameObjJosa} 발견했습니다.`, {
scope: LogScope.GENERAL,
category: LogCategory.ACTION,
format: LogFormat.MONTH,
})
);
effects.push(
createLogEffect(`인재 <Y>${name}</> 등장했습니다.`, {
createLogEffect(`인재 <Y>${name}</>${nameSubjJosa} 등장했습니다.`, {
scope: LogScope.SYSTEM,
category: LogCategory.SUMMARY,
format: LogFormat.MONTH,
})
);
effects.push(
createLogEffect(`인재 <Y>${name}</> 발견했습니다.`, {
createLogEffect(`인재 <Y>${name}</>${nameObjJosa} 발견했습니다.`, {
scope: LogScope.GENERAL,
category: LogCategory.HISTORY,
format: LogFormat.YEAR_MONTH,