NPC 판단 절차와 난수 결과의 선택적 감사 관측 기반 추가

This commit is contained in:
Hide_D committed 2026-09-16 07:40:29 +00:00
1 parent 2f5036ea6b
commit 9f31b28297
9 files changed
+311 -20

No files matched your search

@@ -1,3 +1,4 @@
import type { AiDecisionTraceObserver } from './ai/generalAi/trace.js';
import { resolveMessageTargetIcon } from '@sammo-ts/logic';
import type {
ActionContextBase,
@@ -900,6 +901,7 @@ export const createReservedTurnHandler = async (options: {
nation: Nation,
currentMonth: number
) => Nation['meta'] | null;
onDecisionTrace?: AiDecisionTraceObserver;
onActionResolved?: (payload: {
kind: 'nation' | 'general';
generalId: number;
@@ -1934,6 +1936,7 @@ export const createReservedTurnHandler = async (options: {
nationUsedAi = true;
const aiStartedAt = options.onActionProfiled ? process.hrtime.bigint() : 0n;
sharedAi = new GeneralAI({
onDecisionTrace: options.onDecisionTrace,
general: currentGeneral,
city: currentCity,
nation: currentNation,
@@ -2090,6 +2093,7 @@ export const createReservedTurnHandler = async (options: {
const ai =
sharedAi ??
new GeneralAI({
onDecisionTrace: options.onDecisionTrace,
general: currentGeneral,
city: currentCity,
nation: currentNation,