랜임모드시 임관출력 버그 수정

This commit is contained in:
2020-05-04 07:26:53 +09:00
parent d0771e3392
commit dbba6fa942
3 changed files with 19 additions and 1 deletions
+9
View File
@@ -94,6 +94,10 @@ class che_임관 extends Command\GeneralCommand{
$relYear = $env['year'] - $env['startyear']; $relYear = $env['year'] - $env['startyear'];
$this->reservableConstraints=[
ConstraintHelper::ReqEnvValue('join_mode', '!=', 'onlyRandom', '랜덤 임관만 가능합니다')
];
$this->runnableConstraints=[ $this->runnableConstraints=[
ConstraintHelper::ReqEnvValue('join_mode', '!=', 'onlyRandom', '랜덤 임관만 가능합니다'), ConstraintHelper::ReqEnvValue('join_mode', '!=', 'onlyRandom', '랜덤 임관만 가능합니다'),
ConstraintHelper::BeNeutral(), ConstraintHelper::BeNeutral(),
@@ -103,6 +107,11 @@ class che_임관 extends Command\GeneralCommand{
]; ];
} }
public function canDisplay(): bool
{
return ($this->env['join_mode']??'') != 'onlyRandom';
}
public function getCost():array{ public function getCost():array{
return [0, 0]; return [0, 0];
} }
+9 -1
View File
@@ -79,13 +79,21 @@ class che_초토화 extends Command\NationCommand{
} }
public function getPreReqTurn():int{ public function getPreReqTurn():int{
return 0; return 2;
} }
public function getPostReqTurn():int{ public function getPostReqTurn():int{
return 24; return 24;
} }
public function getCommandDetailTitle():string{
$name = $this->getName();
$reqTurn = $this->getPreReqTurn()+1;
return "{$name}/{$reqTurn}턴(공백지 화, 금쌀 회수)";
}
public function getBrief():string{ public function getBrief():string{
$commandName = $this->getName(); $commandName = $this->getName();
$destCityName = CityConst::byID($this->arg['destCityID'])->name; $destCityName = CityConst::byID($this->arg['destCityID'])->name;
+1
View File
@@ -109,6 +109,7 @@ class RaiseInvader extends \sammo\Event\Action{
//TODO:외교를 설정한다. //TODO:외교를 설정한다.
//TODO: 시나리오 구현 후 마무리. //TODO: 시나리오 구현 후 마무리.
//TODO: 임관 모드가 '랜임모드'인 경우 오랑캐와 충돌하므로 해제해야함.
return [__CLASS__, 'NYI']; return [__CLASS__, 'NYI'];
} }