From 88fcc64537b6f0119a094ea1316dcf88f4189591 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Mon, 11 Jul 2022 20:23:55 +0900 Subject: [PATCH] =?UTF-8?q?game:=20NPC=20=EC=9A=94=EC=96=91=20=EA=B8=B0?= =?UTF-8?q?=EC=A4=80=20=EC=84=A4=EC=A0=95=20=EA=B0=80=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/AutorunNationPolicy.php | 4 ++++ hwe/sammo/GeneralAI.php | 2 +- hwe/ts/PageNPCControl.vue | 11 +++++++++++ hwe/ts/defs/index.ts | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/hwe/sammo/AutorunNationPolicy.php b/hwe/sammo/AutorunNationPolicy.php index add789ce..86748efa 100644 --- a/hwe/sammo/AutorunNationPolicy.php +++ b/hwe/sammo/AutorunNationPolicy.php @@ -146,6 +146,8 @@ class AutorunNationPolicy { public $safeRecruitCityPopulationRatio = 0.5; public $properWarTrainAtmos = 90; + public $cureThreshold = 10; + ///이쪽의 값이 실제 초기화 값임 public static $defaultPolicy = [ 'reqNationGold'=>10000, @@ -173,6 +175,8 @@ class AutorunNationPolicy { 'minNPCRecruitCityPopulation'=>50000, 'safeRecruitCityPopulationRatio'=>0.5, 'properWarTrainAtmos'=>90, + + 'cureThreshold'=>10, ]; function __construct(General $general, $aiOptions, ?array $nationPolicy, ?array $serverPolicy, array $nation, array $env) diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 28900599..d6e33cf9 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -3718,7 +3718,7 @@ class GeneralAI return $reservedCommand; } - if ($general->getVar('injury') > 10) { + if ($general->getVar('injury') > $this->nationPolicy->cureThreshold) { $result = buildGeneralCommandClass('che_요양', $general, $this->env); $result->reason = 'do요양'; return $result; diff --git a/hwe/ts/PageNPCControl.vue b/hwe/ts/PageNPCControl.vue index 05cedc13..7e326041 100644 --- a/hwe/ts/PageNPCControl.vue +++ b/hwe/ts/PageNPCControl.vue @@ -163,6 +163,17 @@ 훈련/사기진작 기준치입니다. 이보다 같거나 높으면 출병합니다. +
+ + 요양 기준 %입니다. 이보다 많이 부상을 입으면 요양합니다. + +
diff --git a/hwe/ts/defs/index.ts b/hwe/ts/defs/index.ts index 8c4a9076..16c96be4 100644 --- a/hwe/ts/defs/index.ts +++ b/hwe/ts/defs/index.ts @@ -158,6 +158,7 @@ export type NationPolicy = { minNPCRecruitCityPopulation: number, safeRecruitCityPopulationRatio: number, properWarTrainAtmos: number, + cureThreshold: number, } export type ItemTypeKey = 'horse' | 'weapon' | 'book' | 'item';