game: NPC 요양 기준 설정 가능

This commit is contained in:
2022-07-11 20:23:55 +09:00
parent d9beabbbbc
commit 88fcc64537
4 changed files with 17 additions and 1 deletions
+4
View File
@@ -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)
+1 -1
View File
@@ -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;