From bf651ecad21b42812871a82b510dc2ffd3f4bbb4 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 25 Apr 2020 07:35:04 +0900 Subject: [PATCH] =?UTF-8?q?=EB=82=B4=EC=A0=95=EC=9E=A5=20=ED=8F=AC?= =?UTF-8?q?=EC=83=81=EA=B8=88=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/AutorunNationPolicy.php | 8 ++++++-- hwe/sammo/GeneralAI.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hwe/sammo/AutorunNationPolicy.php b/hwe/sammo/AutorunNationPolicy.php index 476145f2..f9bd8bc7 100644 --- a/hwe/sammo/AutorunNationPolicy.php +++ b/hwe/sammo/AutorunNationPolicy.php @@ -127,7 +127,7 @@ class AutorunNationPolicy { public $reqHumanDevelRice = 10000; public $reqNPCWarGold = 0; public $reqNPCWarRice = 0; - public $reqNPCDevelGold = 1000; + public $reqNPCDevelGold = 0; public $reqNPCDevelRice = 500; public $minimumResourceActionAmount = 1000; @@ -141,7 +141,7 @@ class AutorunNationPolicy { public $properWarTrainAtmos = 90; - function __construct(General $general, array $nationPolicy, array $serverPolicy, array $nation) + function __construct(General $general, array $nationPolicy, array $serverPolicy, array $nation, array $env) { foreach($serverPolicy as $policy=>$value){ if(!property_exists($this, $policy)){ @@ -162,6 +162,10 @@ class AutorunNationPolicy { } + if($this->reqNPCDevelGold === 0){ + $this->reqNPCDevelGold = $env['develcost'] * 30; + } + if($this->reqNPCWarGold === 0 || $this->reqNPCWarRice === 0){ $defaultCrewType = GameUnitConst::byID(GameUnitConst::DEFAULT_CREWTYPE); diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 97dfb24d..6d771387 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -113,7 +113,7 @@ class GeneralAI $serverPolicy = KVStorage::getStorage($db, 'autorun_nation_policy_0'); $nationPolicy = KVStorage::getStorage($db, "autorun_nation_policy_{$this->nation['nation']}"); - $this->nationPolicy = new AutorunNationPolicy($general, $nationPolicy->getAll(), $serverPolicy->getAll(), $this->nation); + $this->nationPolicy = new AutorunNationPolicy($general, $nationPolicy->getAll(), $serverPolicy->getAll(), $this->nation, $this->env); $this->generalPolicy = new AutorunGeneralPolicy($general, $this->env['autorun_user']['options']??[]); $this->nation['aux'] = Json::decode($this->nation['aux']??'{}');