feat: 사용자 군주 자율행동 업무를 개별 설정한다

NPC 군주의 기존 국가 운영은 유지하고 사용자 군주는 외교, 수뇌 임명, 재정 조정, 천도를 기본 비활성화한다.

내 정보 설정과 인증 API, 엔진 gate를 연결하고 자율행동 기간 및 국가턴 master를 함께 검증한다.
This commit is contained in:
2026-08-22 08:28:04 +00:00
parent 957445b0e0
commit 9c588dbd67
14 changed files with 309 additions and 28 deletions
+5 -2
View File
@@ -18,7 +18,8 @@ import {
import type { TurnCalendarContext, TurnCalendarHandler, InMemoryTurnWorld } from './inMemoryWorld.js';
import { readNumber } from './ai/aiUtils.js';
import { AutorunNationPolicy } from './ai/policies.js';
import { shouldUseNationAi } from './ai/generalAi.js';
import { AutorunNationPolicy, canUseRulerAutomation } from './ai/policies.js';
const calcNationDevelopedRate = (cities: City[]): { pop: number; all: number } => {
if (cities.length === 0) {
@@ -108,7 +109,9 @@ const resolveNpcMonarch = (nation: Nation, world: InMemoryTurnWorld) => {
: world
.listGenerals()
.find((general) => general.nationId === nation.id && general.officerLevel === 12) ?? null;
return chief && chief.npcState >= 2 ? chief : null;
return chief && canUseRulerAutomation(chief, 'finance') && shouldUseNationAi(chief, world.getState())
? chief
: null;
};
type NpcFinanceOptions = {