턴 수행 constraint를 상세하게 분리, argTest 추가. 턴 커맨드 실행용 클래스, ajax 파일 준비

This commit is contained in:
2018-09-16 22:16:08 +09:00
parent 0dfd010685
commit f919e6eb43
14 changed files with 164 additions and 38 deletions
+6 -2
View File
@@ -32,7 +32,7 @@ class che_기술연구 extends che_상업투자{
$develCost = $this->env['develcost'];
$reqGold = $general->onCalcDomestic(static::$actionKey, 'cost', $reqGold);
$this->constraints=[
$this->runnableConstraints=[
['NoNeutral'],
['NoWanderingNation'],
['OccupiedCity'],
@@ -43,8 +43,12 @@ class che_기술연구 extends che_상업투자{
$this->reqGold = $reqGold;
}
protected function argTest():bool{
return true;
}
public function run():bool{
if(!$this->isAvailable()){
if(!$this->isRunnable()){
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
}