From f0591864947762b32889c042dad816fad6a1df85 Mon Sep 17 00:00:00 2001 From: hide_d Date: Fri, 12 Jun 2020 22:08:56 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B5=AC=EC=B6=9C=20=EB=B0=9C=EB=A0=B9=20?= =?UTF-8?q?=ED=99=9C=EC=84=B1=ED=99=94=20=EC=95=88=EB=90=9C=20=EB=B2=84?= =?UTF-8?q?=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, 17 insertions(+), 1 deletion(-) diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 7597b579..52da7ed3 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -705,9 +705,22 @@ class GeneralAI //고립 도시 장수 발령 $args = []; foreach ($this->lostGenerals as $lostGeneral) { + LogText('구출준비', "{$lostGeneral->getName()}"); if ($lostGeneral->getNPCType() >= 2) { continue; } + LogText('구출준비1', "{$lostGeneral->getName()}"); + + if( + $lostGeneral->getVar('crew') >= $this->nationPolicy->minWarCrew && + $lostGeneral->getVar('train') >= $lostGeneral->getVar('defence_train') && + $lostGeneral->getVar('atmos') >= $lostGeneral->getVar('defence_train') + ){ + //수비도 가능한데, 일부러 가 있는 것으로 보임 + continue; + } + + LogText('구출준비2', "{$lostGeneral->getName()}"); $troopID = $lostGeneral->getVar('troop'); if($troopID && key_exists($troopID, $this->troopLeaders)){ @@ -721,6 +734,7 @@ class GeneralAI continue; } } + LogText('구출준비3', "{$lostGeneral->getName()}"); if (in_array($this->dipState, [self::d직전, self::d전쟁]) && count($this->frontCities) > 2) { $selCity = Util::choiceRandom($this->frontCities); @@ -736,11 +750,13 @@ class GeneralAI if(!$args){ return null; } + LogText('구출준비5', count($args)); $cmd = buildNationCommandClass('che_발령', $this->general, $this->env, $lastTurn, Util::choiceRandom($args)); if(!$cmd->hasFullConditionMet()){ + LogText('구출준비5', count($args)); return null; } - return null; + return $cmd; } protected function do유저장전방발령(LastTurn $lastTurn): ?NationCommand