턴 커맨드에 getPreReqTurn, getPostReqTurn 추가

This commit is contained in:
2018-10-03 17:45:47 +09:00
parent 1d0bcd857e
commit a33a7317cc
6 changed files with 70 additions and 10 deletions
+18 -2
View File
@@ -31,14 +31,14 @@ class che_주민선정 extends Command\GeneralCommand{
$this->setCity();
$this->setNation();
$develCost = $this->env['develcost'] * 2;
$reqRice = $general->onCalcDomestic(static::$actionKey, 'cost', $reqGold);
[$reqGold, $reqRice] = $this->getCost();
$this->runnableConstraints=[
['NoNeutral'],
['NoWanderingNation'],
['OccupiedCity'],
['SuppliedCity'],
['ReqGeneralGold', $reqGold],
['ReqGeneralRice', $reqRice],
['RemainCityTrust', static::$actionName]
];
@@ -50,6 +50,22 @@ class che_주민선정 extends Command\GeneralCommand{
return true;
}
public function getCost():array{
$develCost = $this->env['develcost'] * 2;
$reqGold = 0;
$reqRice = $general->onCalcDomestic(static::$actionKey, 'cost', $develCost);
return [$reqGold, $reqRice];
}
public function getPreReqTurn():int{
return 0;
}
public function getPostReqTurn():int{
return 0;
}
protected function calcBaseScore():float{
$general = $this->generalObj;