건국 조건 설정

This commit is contained in:
2018-10-29 03:14:03 +09:00
parent 13fab5ebe4
commit 12d0ec2cf6
5 changed files with 160 additions and 5 deletions
+12 -5
View File
@@ -37,7 +37,7 @@ class che_건국 extends Command\GeneralCommand{
return false;
}
if(mb_strwidth($nationName) > 18){
if(mb_strwidth($nationName) > 18 || $nationName == ''){
return false;
}
@@ -62,6 +62,10 @@ class che_건국 extends Command\GeneralCommand{
$general = $this->generalObj;
$env = $this->env;
$nationName = $this->arg['nationName'];
$nationType = $this->arg['nationType'];
$colorType = $this->arg['colorType'];
$this->setCity();
$this->setNation();
@@ -78,10 +82,13 @@ class che_건국 extends Command\GeneralCommand{
$relYear = $env['year'] - $env['startyear'];
$this->runnableConstraints=[
['BeNeutral'],
['ExistsDestNation'],
['AllowJoinDestNation', $relYear],
['AllowJoinAction']
['ReqNationValue', 'gennum', '수하 장수', '>=', 2],
['BeOpeningPart'],
['WanderingNation'],
['CheckNationNameDuplicate', $nationName],
['BeLord'],
['AllowJoinAction'],
['ConstructableCity']
];
}