기본 커맨드 입력 가능하도록 구현

This commit is contained in:
2019-10-06 22:39:13 +09:00
parent fb752f6ade
commit 6e80561f32
13 changed files with 183 additions and 55 deletions
-1
View File
@@ -224,7 +224,6 @@ abstract class BaseCommand{
//0 : Neutral
//-1 : Negative
//null : can't calculate
//TODO: 구현
return 0;
}
@@ -84,6 +84,13 @@ class che_상업투자 extends Command\GeneralCommand{
return [$reqGold, $reqRice];
}
public function getCompensationStyle():?int{
$develCost = $this->env['develcost'];
$reqGold = $this->getCost()[0];
return $develCost <=>$reqGold;
}
public function getPreReqTurn():int{
return 0;
@@ -62,6 +62,12 @@ class che_정착장려 extends Command\GeneralCommand{
return [$reqGold, $reqRice];
}
public function getCompensationStyle():?int{
$develCost = $this->env['develcost'] * 2;
$reqGold = $this->getCost()[1];
return $develCost <=>$reqGold;
}
public function getPreReqTurn():int{
return 0;
@@ -62,6 +62,12 @@ class che_주민선정 extends Command\GeneralCommand{
return [$reqGold, $reqRice];
}
public function getCompensationStyle():?int{
$develCost = $this->env['develcost'] * 2;
$reqGold = $this->getCost()[1];
return $develCost <=>$reqGold;
}
public function getPreReqTurn():int{
return 0;
+1 -1
View File
@@ -63,7 +63,7 @@ class che_첩보 extends Command\GeneralCommand{
public function getCost():array{
$env = $this->env;
return [$env['develcost'], 0];
return [$env['develcost'], $env['develcost']];
}
public function getPreReqTurn():int{
+1 -1
View File
@@ -196,7 +196,7 @@ class GameConstBase
]
];
/** @var array[string] 선택 가능한 커맨드 */
/** @var array 선택 가능한 커맨드 */
public static $availableGeneralCommand = [
''=>[
'휴식',