치안, 수성, 민심까지 반영 완료

This commit is contained in:
2018-09-02 22:50:25 +09:00
parent 4c2b484c2b
commit d9ed00ddee
14 changed files with 121 additions and 17 deletions
@@ -11,6 +11,24 @@ class che_덕가 implements iActionTrigger{
static $pros = '치안↑ 인구↑ 민심↑';
static $cons = '쌀수입↓ 수성↓';
public function onCalcDomesticTurnScore(string $turnType, float $score, float $cost, float $successRate, float $failRate):array{
if($turnType == 'secu'){
$score *= 1.1;
$cost *= 0.8;
}
else if($turnType == 'trust' || $turnType == 'pop'){
$score *= 1.1;
$cost *= 0.8;
}
else if($turnType == 'def' || $turnType == 'wall'){
$score *= 0.9;
$cost *= 1.2;
}
return [$score, $cost, $successRate, $failRate];
}
public function onCalcNationalIncome(string $type, int $amount):int{
if($type == 'rice'){
return $amount * 0.9;
@@ -16,6 +16,10 @@ class che_도가 implements iActionTrigger{
$score *= 0.9;
$cost *= 1.2;
}
else if($turnType == 'secu'){
$score *= 0.9;
$cost *= 1.2;
}
return [$score, $cost, $successRate, $failRate];
}
@@ -11,6 +11,19 @@ class che_도적 implements iActionTrigger{
static $pros = '계략↑';
static $cons = '금수입↓ 치안↓ 민심↓';
public function onCalcDomesticTurnScore(string $turnType, float $score, float $cost, float $successRate, float $failRate):array{
if($turnType == 'secu'){
$score *= 0.9;
$cost *= 1.2;
}
else if($turnType == 'trust' || $turnType == 'pop'){
$score *= 0.9;
$cost *= 1.2;
}
return [$score, $cost, $successRate, $failRate];
}
public function onCalcNationalIncome(string $type, int $amount):int{
if($type == 'gold'){
return $amount * 0.9;
+14 -9
View File
@@ -11,6 +11,20 @@ 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;
}
else if($turnType == 'def' || $turnType == 'wall'){
$score *= 0.9;
$cost *= 1.2;
}
return [$score, $cost, $successRate, $failRate];
}
public function onCalcNationalIncome(string $type, int $amount):int{
if($type == 'rice'){
return $amount * 0.9;
@@ -18,13 +32,4 @@ 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];
}
}
+6 -1
View File
@@ -12,7 +12,12 @@ class che_묵가 implements iActionTrigger{
static $cons = '기술↓';
public function onCalcDomesticTurnScore(string $turnType, float $score, float $cost, float $successRate, float $failRate):array{
if($turnType == 'tech'){
if($turnType == 'def' || $turnType == 'wall'){
$score *= 1.1;
$cost *= 0.8;
}
else if($turnType == 'tech'){
$score *= 0.9;
$cost *= 1.2;
}
+15 -1
View File
@@ -11,11 +11,25 @@ class che_법가 implements iActionTrigger{
static $pros = '금수입↑ 치안↑';
static $cons = '인구↓ 민심↓';
public function onCalcDomesticTurnScore(string $turnType, float $score, float $cost, float $successRate, float $failRate):array{
if($turnType == 'secu'){
$score *= 1.1;
$cost *= 0.8;
}
else if($turnType == 'trust' || $turnType == 'pop'){
$score *= 0.9;
$cost *= 1.2;
}
return [$score, $cost, $successRate, $failRate];
}
public function onCalcNationalIncome(string $type, int $amount):int{
if($type == 'gold'){
return $amount * 1.1;
}
return $amount;
}
}
@@ -16,6 +16,15 @@ class che_병가 implements iActionTrigger{
$score *= 1.1;
$cost *= 0.8;
}
else if($turnType == 'def' || $turnType == 'wall'){
$score *= 1.1;
$cost *= 0.8;
}
else if($turnType == 'trust' || $turnType == 'pop'){
$score *= 0.9;
$cost *= 1.2;
}
return [$score, $cost, $successRate, $failRate];
}
@@ -11,6 +11,19 @@ class che_불가 implements iActionTrigger{
static $pros = '민심↑ 수성↑';
static $cons = '금수입↓';
public function onCalcDomesticTurnScore(string $turnType, float $score, float $cost, float $successRate, float $failRate):array{
if($turnType == 'trust' || $turnType == 'pop'){
$score *= 1.1;
$cost *= 0.8;
}
else if($turnType == 'def' || $turnType == 'wall'){
$score *= 1.1;
$cost *= 0.8;
}
return [$score, $cost, $successRate, $failRate];
}
public function onCalcNationalIncome(string $type, int $amount):int{
if($type == 'gold'){
return $amount * 0.9;
@@ -21,6 +21,10 @@ class che_오두미도 implements iActionTrigger{
$score *= 0.9;
$cost *= 1.2;
}
else if($turnType == 'def' || $turnType == 'wall'){
$score *= 0.9;
$cost *= 1.2;
}
return [$score, $cost, $successRate, $failRate];
}
@@ -16,6 +16,10 @@ class che_유가 implements iActionTrigger{
$score *= 1.1;
$cost *= 0.8;
}
else if($turnType == 'trust' || $turnType == 'pop'){
$score *= 1.1;
$cost *= 0.8;
}
return [$score, $cost, $successRate, $failRate];
}
@@ -16,11 +16,12 @@ 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];
}
@@ -12,7 +12,12 @@ class che_종횡가 implements iActionTrigger{
static $cons = '금수입↓ 내정↓';
public function onCalcDomesticTurnScore(string $turnType, float $score, float $cost, float $successRate, float $failRate):array{
if($turnType == 'agri' || $turnType == 'comm'){
if($turnType == 'def' || $turnType == 'wall'){
$score *= 1.1;
$cost *= 0.8;
}
else if($turnType == 'agri' || $turnType == 'comm'){
$score *= 0.9;
$cost *= 1.2;
}
+3 -3
View File
@@ -6,10 +6,10 @@ use \sammo\General;
class che_중립 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $name = '중립';
static $name = '-';
static $info = '';
static $pros = '-';
static $cons = '-';
static $pros = '';
static $cons = '';
}
+10 -1
View File
@@ -12,7 +12,16 @@ class che_태평도 implements iActionTrigger{
static $cons = '기술↓ 수성↓';
public function onCalcDomesticTurnScore(string $turnType, float $score, float $cost, float $successRate, float $failRate):array{
if($turnType == 'tech'){
if($turnType == 'trust' || $turnType == 'pop'){
$score *= 1.1;
$cost *= 0.8;
}
else if($turnType == 'tech'){
$score *= 0.9;
$cost *= 1.2;
}
else if($turnType == 'def' || $turnType == 'wall'){
$score *= 0.9;
$cost *= 1.2;
}