From f25f5008f1322ce6c4d8fffd9011eba158064b36 Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 4 May 2020 07:26:53 +0900 Subject: [PATCH] =?UTF-8?q?=EB=9E=9C=EC=9E=84=EB=AA=A8=EB=93=9C=EC=8B=9C?= =?UTF-8?q?=20=EC=9E=84=EA=B4=80=EC=B6=9C=EB=A0=A5=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/General/che_임관.php | 9 +++++++++ hwe/sammo/Command/Nation/che_초토화.php | 10 +++++++++- hwe/sammo/Event/Action/RaiseInvader.php | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/hwe/sammo/Command/General/che_임관.php b/hwe/sammo/Command/General/che_임관.php index 95899f9a..d9934e4b 100644 --- a/hwe/sammo/Command/General/che_임관.php +++ b/hwe/sammo/Command/General/che_임관.php @@ -93,6 +93,10 @@ class che_임관 extends Command\GeneralCommand{ } $relYear = $env['year'] - $env['startyear']; + + $this->reservableConstraints=[ + ConstraintHelper::ReqEnvValue('join_mode', '!=', 'onlyRandom', '랜덤 임관만 가능합니다') + ]; $this->runnableConstraints=[ ConstraintHelper::ReqEnvValue('join_mode', '!=', 'onlyRandom', '랜덤 임관만 가능합니다'), @@ -103,6 +107,11 @@ class che_임관 extends Command\GeneralCommand{ ]; } + public function canDisplay(): bool + { + return ($this->env['join_mode']??'') != 'onlyRandom'; + } + public function getCost():array{ return [0, 0]; } diff --git a/hwe/sammo/Command/Nation/che_초토화.php b/hwe/sammo/Command/Nation/che_초토화.php index aecd75ba..5e874716 100644 --- a/hwe/sammo/Command/Nation/che_초토화.php +++ b/hwe/sammo/Command/Nation/che_초토화.php @@ -79,13 +79,21 @@ class che_초토화 extends Command\NationCommand{ } public function getPreReqTurn():int{ - return 0; + return 2; } public function getPostReqTurn():int{ return 24; } + public function getCommandDetailTitle():string{ + $name = $this->getName(); + + $reqTurn = $this->getPreReqTurn()+1; + + return "{$name}/{$reqTurn}턴(공백지 화, 금쌀 회수)"; + } + public function getBrief():string{ $commandName = $this->getName(); $destCityName = CityConst::byID($this->arg['destCityID'])->name; diff --git a/hwe/sammo/Event/Action/RaiseInvader.php b/hwe/sammo/Event/Action/RaiseInvader.php index 83564965..0231f663 100644 --- a/hwe/sammo/Event/Action/RaiseInvader.php +++ b/hwe/sammo/Event/Action/RaiseInvader.php @@ -109,6 +109,7 @@ class RaiseInvader extends \sammo\Event\Action{ //TODO:외교를 설정한다. //TODO: 시나리오 구현 후 마무리. + //TODO: 임관 모드가 '랜임모드'인 경우 오랑캐와 충돌하므로 해제해야함. return [__CLASS__, 'NYI']; }