계략 확률, 전략턴, 기술 반영

This commit is contained in:
2018-09-02 22:19:38 +09:00
parent ff31e41fec
commit 4c2b484c2b
11 changed files with 66 additions and 4 deletions
+4
View File
@@ -9,6 +9,10 @@ trait DefaultActionTrigger{
return [$score, $cost, $successRate, $failRate];
}
public function onCalcSabotageProp(float $successRate):float{
return $successRate;
}
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
return $value;
}
+8 -1
View File
@@ -11,5 +11,12 @@ class che_도가 implements iActionTrigger{
static $pros = '인구↑';
static $cons = '기술↓ 치안↓';
public function onCalcDomesticTurnScore(string $turnType, float $score, float $cost, float $successRate, float $failRate):array{
if($turnType == 'tech'){
$score *= 0.9;
$cost *= 1.2;
}
return [$score, $cost, $successRate, $failRate];
}
}
@@ -18,4 +18,8 @@ class che_도적 implements iActionTrigger{
return $amount;
}
public function onCalcSabotageProp(float $successRate):float{
return $successRate + 0.1;
}
}
@@ -18,4 +18,13 @@ class che_명가 implements iActionTrigger{
return $amount;
}
public function onCalcDomesticTurnScore(string $turnType, float $score, float $cost, float $successRate, float $failRate):array{
if($turnType == 'tech'){
$score *= 1.1;
$cost *= 0.8;
}
return [$score, $cost, $successRate, $failRate];
}
}
+8 -1
View File
@@ -11,5 +11,12 @@ class che_묵가 implements iActionTrigger{
static $pros = '수성↑';
static $cons = '기술↓';
public function onCalcDomesticTurnScore(string $turnType, float $score, float $cost, float $successRate, float $failRate):array{
if($turnType == 'tech'){
$score *= 0.9;
$cost *= 1.2;
}
return [$score, $cost, $successRate, $failRate];
}
}
+8 -1
View File
@@ -11,5 +11,12 @@ class che_병가 implements iActionTrigger{
static $pros = '기술↑ 수성↑';
static $cons = '인구↓ 민심↓';
public function onCalcDomesticTurnScore(string $turnType, float $score, float $cost, float $successRate, float $failRate):array{
if($turnType == 'tech'){
$score *= 1.1;
$cost *= 0.8;
}
return [$score, $cost, $successRate, $failRate];
}
}
@@ -17,6 +17,10 @@ class che_오두미도 implements iActionTrigger{
$score *= 0.9;
$cost *= 1.2;
}
else if($turnType == 'tech'){
$score *= 0.9;
$cost *= 1.2;
}
return [$score, $cost, $successRate, $failRate];
}
@@ -16,7 +16,15 @@ class che_음양가 implements iActionTrigger{
$score *= 1.1;
$cost *= 0.8;
}
else if($turnType == 'tech'){
$score *= 0.9;
$cost *= 1.2;
}
return [$score, $cost, $successRate, $failRate];
}
public function onCalcStragicDelay(array $nation, int $commandType, int $turn):int{
return $turn * 2;
}
}
@@ -27,4 +27,8 @@ class che_종횡가 implements iActionTrigger{
return $amount;
}
public function onCalcStragicDelay(array $nation, int $commandType, int $turn):int{
return Util::round($turn / 2);
}
}
@@ -11,5 +11,12 @@ class che_태평도 implements iActionTrigger{
static $pros = '인구↑ 민심↑';
static $cons = '기술↓ 수성↓';
public function onCalcDomesticTurnScore(string $turnType, float $score, float $cost, float $successRate, float $failRate):array{
if($turnType == 'tech'){
$score *= 0.9;
$cost *= 1.2;
}
return [$score, $cost, $successRate, $failRate];
}
}
+1
View File
@@ -12,6 +12,7 @@ interface iActionTrigger{
//TODO: 능력치는?
public function onPreTurnExecute(General $general, ?array $nation):array;
public function onCalcDomesticTurnScore(string $turnType, float $score, float $cost, float $successRate, float $failRate):array;
public function onCalcSabotageProp(float $successRate):float;
public function onPreGeneralStatUpdate(General $general, string $statName, $value);