From 6d6326e4151077c455ce0c7d24806f4bf2159dee Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 22 Apr 2020 02:31:53 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/GeneralAI.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index bf7f9541..2fa67e57 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -775,7 +775,7 @@ class GeneralAI /** @var General */ $destGeneral = Util::choiceRandom($generalCandidates); - $srcCity = $this->supplyCities[$destGeneral->getCityID]; + $srcCity = $this->supplyCities[$destGeneral->getCityID()]; $destCity = $this->supplyCities[Util::choiceRandomUsingWeight($cityCandidiates)]; if($srcCity['dev'] <= $destCity['dev']){ @@ -1004,7 +1004,7 @@ class GeneralAI /** @var General */ $destGeneral = Util::choiceRandom($generalCandidates); - $srcCity = $this->supplyCities[$destGeneral->getCityID]; + $srcCity = $this->supplyCities[$destGeneral->getCityID()]; $destCity = $this->supplyCities[Util::choiceRandomUsingWeight($cityCandidiates)]; if($srcCity['dev'] <= $destCity['dev']){ @@ -1068,6 +1068,9 @@ class GeneralAI } //국고와 '충분한 금액'의 기하평균 $payAmount = sqrt(($enoughMoney - $targetUserGeneral->getVar($resName)) * $resVal); + if($payAmount < $this->nationPolicy->minimumResourceActionAmount){ + continue; + } if ($resVal < $payAmount / 2) { continue; @@ -1526,6 +1529,8 @@ class GeneralAI return null; } + + $targetNationID = $this->findWarTarget(); if($targetNationID === null){ return null; @@ -1697,6 +1702,7 @@ class GeneralAI $cmdList = []; + LogText('내정', [$general->getName(), $this->city['name'], $develRate]); if ($genType & self::t통솔장) { if ($develRate['trust'] < 0.95) { $cmd = buildGeneralCommandClass('che_주민선정', $general, $env); @@ -2458,7 +2464,7 @@ class GeneralAI { $city = $this->city; - if(Util::randBool(0.8)){ + if(Util::randBool(0.6)){ return null; } @@ -2483,10 +2489,6 @@ class GeneralAI return null; } - if (!Util::randBool(0.4)) { - return null; - } - $this->categorizeNationCities(); $candidateCities = []; foreach($this->supplyCities as $candidate){ @@ -3174,7 +3176,7 @@ class GeneralAI $nation = $this->nation; $nationID = $nation['nation']; - if(!$this->frontCities){ + if($this->frontCities){ return null; }