setReadOnly(); $userID = Session::getUserID(); $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor->cacheValues(['autorun_user', 'develcost']); increaseRefresh("NPC 정책", 1); $me = $db->queryFirstRow('SELECT no, npc, nation, city, officer_level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID); $nationID = $me['nation']; $nation = $db->queryFirstRow('SELECT nation,level,name,color,type,gold,rice,bill,tech,rate,scout,war,secretlimit,capital FROM nation WHERE nation = %i', $nationID); $con = checkLimit($me['con']); if ($con >= 2) { printLimitMsg($me['turntime']); exit(); } $permission = checkSecretPermission($me); if ($permission < 0) { echo '국가에 소속되어있지 않습니다.'; die(); } else if ($permission < 1) { echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다."; die(); } $nationStor = KVStorage::getStorage($db, $nationID, 'nation_env'); $nationStor->cacheValues(['npc_nation_policy', 'npc_general_policy']); $gameStor->cacheAll(); $general = new General($me, null, null, $nation, $gameStor->year, $gameStor->month, false); $rawServerPolicy = $gameStor->getValue('npc_nation_policy') ?? []; $rawNationPolicy = $nationStor->getValue('npc_nation_policy') ?? []; $rawServerGeneralPolicy = $gameStor->getValue('npc_general_policy') ?? []; $rawNationGeneralPolicy = $nationStor->getValue('npc_general_policy') ?? []; $defaultNationPolicy = ($rawServerPolicy['values'] ?? []) + AutorunNationPolicy::$defaultPolicy; $currentNationPolicy = ($rawNationPolicy['values'] ?? []) + $defaultNationPolicy; $defaultNationPriority = $rawServerPolicy['priority'] ?? (AutorunNationPolicy::$defaultPriority); $currentNationPriority = $rawNationPolicy['priority'] ?? $defaultNationPriority; $defaultGeneralActionPriority = $rawServerGeneralPolicy['priority'] ?? (AutorunGeneralPolicy::$default_priority); $currentGeneralActionPriority = $rawNationGeneralPolicy['priority'] ?? $defaultGeneralActionPriority; $autoPolicyVariable = []; if ($currentNationPolicy['reqHumanWarUrgentRice'] ?? 0) { $autoPolicyVariable['reqHumanWarUrgentRice'] = $currentNationPolicy['reqHumanWarUrgentRice']; } if ($currentNationPolicy['reqHumanWarUrgentGold'] ?? 0) { $autoPolicyVariable['reqHumanWarUrgentGold'] = $currentNationPolicy['reqHumanWarUrgentGold']; } $autoPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], ['values' => $autoPolicyVariable], null, $nation, $gameStor->getAll(true)); $zeroPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], null, null, $nation, $gameStor->getAll(true)); ?> <?= UniqueConst::$serverName ?>: 임시 NPC 정책
임시 NPC 정책
국가 정책
최근 설정: ()
이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상 제외)
이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상 제외)
유저장긴급포상시 이보다 금이 적은 장수에게 포상합니다.
0이면 보병 6회 징병( * 6) 가능한 금을 기준으로 하며, 그 수치는 현재 reqHumanWarUrgentGold) ?>입니다.
유저장긴급포상시 이보다 쌀이 적은 장수에게 포상합니다.
0이면 기본 병종으로 명 사살 가능한 쌀을 기준으로 하며, 그 수치는 현재 reqHumanWarUrgentRice) ?>입니다.
유저전투장에게 주는 금입니다. 이보다 적으면 포상합니다.
0이면 유저전투장 긴급포상 금의 2배를 기준으로 하며, 그 수치는 현재 reqHumanWarRecommandGold) ?>입니다.
유저전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다.
0이면 유저전투장 긴급포상 쌀의 2배를 기준으로 하며, 그 수치는 현재 reqHumanWarRecommandRice) ?>입니다.
유저내정장에게 주는 금입니다. 이보다 적으면 포상합니다.
유저내정장에게 주는 쌀입니다. 이보다 적으면 포상합니다.
NPC전투장에게 주는 금입니다. 이보다 적으면 포상합니다.
0이면 기본 병종 4회( * 4) 징병비를 기준으로 하며, 그 수치는 현재 reqNPCWarGold) ?>입니다.
NPC전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다.
0이면 기본 병종으로 명 사살 가능한 쌀을 기준으로 하며, 그 수치는 현재 reqNPCWarRice) ?>입니다.
NPC내정장에게 주는 금입니다. 이보다 5배 더 많다면 헌납합니다.
0이면 30턴 내정 가능한 금을 기준으로 하며, 그 수치는 현재 reqNPCDevelGold) ?>입니다.
NPC내정장에게 주는 쌀입니다. 이보다 5배 더 많다면 헌납합니다.
연산결과가 이 단위보다 적다면 수행하지 않습니다.
이보다 적을 때에는 징병을 시도합니다.
이보다 낮으면 NPC는 도시에서 징병하지 않고 후방 워프합니다.
전쟁 시 후방 발령, 후방 워프의 기준 인구입니다. 이보다 많다면 '충분하다'고 판단합니다.
이 수치보다 같거나 높으면 NPC전투장으로 분류됩니다.
훈련/사기진작 기준치입니다. 이보다 같거나 높으면 출병합니다.
전투 부대는 작업중입니다(json양식: {부대번호:[시작도시번호(아국),도착도시번호(적군)],...})
후방 징병 부대는 작업중입니다(json양식: [부대번호,...])
내정 부대는 작업중입니다(json양식: [부대번호,...])
NPC 사령턴 우선순위
최근 설정: ()
예턴이 없거나, 지정되어 있더라도 실패할경우
아래 순위에 따라 사령턴을 시도합니다.
비활성
활성
NPC 일반턴 우선순위
최근 설정: ()
순위가 높은 것부터 시도합니다.
아무것도 실행할 수 없으면 물자조달이나 인재탐색을 합니다.
비활성
활성