feat,game: 사전 거병 기능 추가

- 건국은 게임 개시 2턴째부터 가능
This commit is contained in:
2022-07-05 22:23:23 +09:00
parent 2b483749bc
commit e09fdefa68
6 changed files with 130 additions and 3 deletions
+11 -1
View File
@@ -139,6 +139,16 @@ class che_건국 extends Command\GeneralCommand
$general = $this->generalObj;
$date = $general->getTurnTime($general::TURNTIME_HM);
$generalName = $general->getName();
$logger = $general->getLogger();
$initYearMonth = Util::joinYearMonth($env['init_year'], $env['init_month']);
$yearMonth = Util::joinYearMonth($env['year'], $env['month']);
if($yearMonth <= $initYearMonth){
$logger->pushGeneralActionLog("다음 턴부터 건국할 수 있습니다. <1>$date</>");
$this->alternative = new che_인재탐색($general, $this->env, null);
return false;
}
$josaYi = JosaUtil::pick($generalName, '이');
$nationName = $this->arg['nationName'];
@@ -149,7 +159,7 @@ class che_건국 extends Command\GeneralCommand
$josaUl = JosaUtil::pick($nationName, '을');
$logger = $general->getLogger();
$nationTypeClass = buildNationTypeClass($nationType);
$nationTypeName = $nationTypeClass->getName();