sabotagelimit을 strategic_cmd_limit로 변경
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user