From e2ec3ef532951c8c9f7e4bfbf83e82921650bbb2 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 30 Apr 2020 03:16:16 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=9C=EB=8F=84=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/Command/Nation/che_감축.php | 2 +- hwe/sammo/Command/Nation/che_증축.php | 2 +- hwe/sammo/Command/Nation/che_천도.php | 4 ++-- hwe/sammo/GeneralAI.php | 14 ++++++++++---- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/hwe/sammo/Command/Nation/che_감축.php b/hwe/sammo/Command/Nation/che_감축.php index a35707c4..b1a49727 100644 --- a/hwe/sammo/Command/Nation/che_감축.php +++ b/hwe/sammo/Command/Nation/che_감축.php @@ -74,7 +74,7 @@ class che_감축 extends Command\NationCommand{ [$reqGold, $reqRice] = array_map('number_format', $this->getCost()); $amount = number_format($this->env['develcost'] * 5); - $reqTurn = $this->getPostReqTurn()+1; + $reqTurn = $this->getPreReqTurn()+1; return "{$name}/{$reqTurn}턴(금 {$reqGold}, 쌀 {$reqRice} 회수)"; } diff --git a/hwe/sammo/Command/Nation/che_증축.php b/hwe/sammo/Command/Nation/che_증축.php index 9f6812d7..82973e9e 100644 --- a/hwe/sammo/Command/Nation/che_증축.php +++ b/hwe/sammo/Command/Nation/che_증축.php @@ -73,7 +73,7 @@ class che_증축 extends Command\NationCommand{ [$reqGold, $reqRice] = array_map('number_format', $this->getCost()); $amount = number_format($this->env['develcost'] * 5); - $reqTurn = $this->getPostReqTurn()+1; + $reqTurn = $this->getPreReqTurn()+1; return "{$name}/{$reqTurn}턴(금 {$reqGold}, 쌀 {$reqRice})"; } diff --git a/hwe/sammo/Command/Nation/che_천도.php b/hwe/sammo/Command/Nation/che_천도.php index a2479150..94dd23a9 100644 --- a/hwe/sammo/Command/Nation/che_천도.php +++ b/hwe/sammo/Command/Nation/che_천도.php @@ -75,7 +75,7 @@ class che_천도 extends Command\NationCommand{ ConstraintHelper::BeChief(), ConstraintHelper::SuppliedCity(), ConstraintHelper::SuppliedDestCity(), - ConstraintHelper::NotSameDestCity(), + ConstraintHelper::ReqNationValue('capital', '수도', '!=', $this->destCity['city'], '이미 수도입니다.'), ConstraintHelper::ReqNationGold(GameConst::$basegold+$reqGold), ConstraintHelper::ReqNationRice(GameConst::$baserice+$reqRice), ]; @@ -110,7 +110,7 @@ class che_천도 extends Command\NationCommand{ } public function getPreReqTurn():int{ - return 1 + $this->getDistance()*2; + return $this->getDistance()*2; } public function getPostReqTurn():int{ diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index b497fbb9..c71cb367 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -101,7 +101,7 @@ class GeneralAI 'nation' => 0, 'level' => 0, 'capital' => 0, - 'capset' => false, + 'capset' => 0, 'gennum' => 0, 'tech' => 0, 'gold' => 0, @@ -3089,9 +3089,15 @@ class GeneralAI } } - if(!($reservedCommand instanceof Command\Nation\휴식) && $reservedCommand->isRunnable()){ - $reservedCommand->reason = 'reserved'; - return $reservedCommand; + if(!($reservedCommand instanceof Command\Nation\휴식)){ + if($reservedCommand->isRunnable()){ + $reservedCommand->reason = 'reserved'; + return $reservedCommand; + } + $date = $general->getTurnTime($general::TURNTIME_HM); + $failString = $reservedCommand->getFailString(); + $text = "{$failString} <1>{$date}"; + $general->getLogger()->pushGeneralActionLog($text); } foreach($this->nationPolicy->priority as $actionName){