forked from devsam/core
턴 수행 constraint를 상세하게 분리, argTest 추가. 턴 커맨드 실행용 클래스, ajax 파일 준비
This commit is contained in:
@@ -33,7 +33,7 @@ class che_주민선정 extends BaseCommand{
|
||||
$develCost = $this->env['develcost'] * 2;
|
||||
$reqRice = $general->onCalcDomestic(static::$actionKey, 'cost', $reqGold);
|
||||
|
||||
$this->constraints=[
|
||||
$this->runnableConstraints=[
|
||||
['NoNeutral'],
|
||||
['NoWanderingNation'],
|
||||
['OccupiedCity'],
|
||||
@@ -45,6 +45,10 @@ class che_주민선정 extends BaseCommand{
|
||||
$this->reqRice = $reqRice;
|
||||
}
|
||||
|
||||
protected function argTest():bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function calcBaseScore():float{
|
||||
$general = $this->generalObj;
|
||||
|
||||
@@ -64,7 +68,7 @@ class che_주민선정 extends BaseCommand{
|
||||
}
|
||||
|
||||
public function run():bool{
|
||||
if(!$this->isAvailable()){
|
||||
if(!$this->isRunnable()){
|
||||
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user