내정장 포상금 설정

This commit is contained in:
2020-04-25 07:35:04 +09:00
parent b516b704bb
commit bf651ecad2
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -127,7 +127,7 @@ class AutorunNationPolicy {
public $reqHumanDevelRice = 10000; public $reqHumanDevelRice = 10000;
public $reqNPCWarGold = 0; public $reqNPCWarGold = 0;
public $reqNPCWarRice = 0; public $reqNPCWarRice = 0;
public $reqNPCDevelGold = 1000; public $reqNPCDevelGold = 0;
public $reqNPCDevelRice = 500; public $reqNPCDevelRice = 500;
public $minimumResourceActionAmount = 1000; public $minimumResourceActionAmount = 1000;
@@ -141,7 +141,7 @@ class AutorunNationPolicy {
public $properWarTrainAtmos = 90; 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){ foreach($serverPolicy as $policy=>$value){
if(!property_exists($this, $policy)){ 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){ if($this->reqNPCWarGold === 0 || $this->reqNPCWarRice === 0){
$defaultCrewType = GameUnitConst::byID(GameUnitConst::DEFAULT_CREWTYPE); $defaultCrewType = GameUnitConst::byID(GameUnitConst::DEFAULT_CREWTYPE);
+1 -1
View File
@@ -113,7 +113,7 @@ class GeneralAI
$serverPolicy = KVStorage::getStorage($db, 'autorun_nation_policy_0'); $serverPolicy = KVStorage::getStorage($db, 'autorun_nation_policy_0');
$nationPolicy = KVStorage::getStorage($db, "autorun_nation_policy_{$this->nation['nation']}"); $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->generalPolicy = new AutorunGeneralPolicy($general, $this->env['autorun_user']['options']??[]);
$this->nation['aux'] = Json::decode($this->nation['aux']??'{}'); $this->nation['aux'] = Json::decode($this->nation['aux']??'{}');