sabotagelimit을 strategic_cmd_limit로 변경

This commit is contained in:
2018-11-18 03:57:22 +09:00
parent 5de9859a1e
commit 979d7e3662
13 changed files with 104 additions and 143 deletions
+1 -1
View File
@@ -117,7 +117,7 @@ class che_거병 extends Command\GeneralCommand{
'rice'=>GameConst::$baserice,
'rate'=>20,
'bill'=>100,
'sabotagelimit'=>12,
'strategic_cmd_limit'=>12,
'surlimit'=>72,
'type'=>0,
'gennum'=>1
@@ -0,0 +1,32 @@
<?php
namespace sammo\Constraint;
class AllowWar extends Constraint{
const REQ_VALUES = Constraint::REQ_NATION;
public function checkInputValues(bool $throwExeception=true){
if(!parent::checkInputValues($throwExeception) && !$throwException){
return false;
}
if(!key_exists('war', $this->nation)){
if(!$throwExeception){return false; }
throw new \InvalidArgumentException("require war in nation");
}
return true;
}
public function test():bool{
$this->checkInputValues();
$this->tested = true;
if($this->nation['war'] == 0){
return true;
}
$this->reason = "현재 전쟁 금지입니다.";
return false;
}
}
+1 -1
View File
@@ -93,7 +93,7 @@ class Nation{
'rate'=>15,
'scout'=>0,
'war'=>0,
'sabotagelimit'=>24,
'strategic_cmd_limit'=>24,
'surlimit'=>72,
'scoutmsg'=>$this->infoText,
'tech'=>$this->tech,