From 4c2b484c2bdafadbcccfe39db9bacad7c0a0ea85 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 2 Sep 2018 22:19:38 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=84=EB=9E=B5=20=ED=99=95=EB=A5=A0,=20?= =?UTF-8?q?=EC=A0=84=EB=9E=B5=ED=84=B4,=20=EA=B8=B0=EC=88=A0=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/DefaultActionTrigger.php | 4 ++++ hwe/sammo/TriggerNationType/che_도가.php | 9 ++++++++- hwe/sammo/TriggerNationType/che_도적.php | 4 ++++ hwe/sammo/TriggerNationType/che_명가.php | 9 +++++++++ hwe/sammo/TriggerNationType/che_묵가.php | 9 ++++++++- hwe/sammo/TriggerNationType/che_병가.php | 9 ++++++++- hwe/sammo/TriggerNationType/che_오두미도.php | 4 ++++ hwe/sammo/TriggerNationType/che_음양가.php | 8 ++++++++ hwe/sammo/TriggerNationType/che_종횡가.php | 4 ++++ hwe/sammo/TriggerNationType/che_태평도.php | 9 ++++++++- hwe/sammo/iActionTrigger.php | 1 + 11 files changed, 66 insertions(+), 4 deletions(-) diff --git a/hwe/sammo/DefaultActionTrigger.php b/hwe/sammo/DefaultActionTrigger.php index 14c31684..66cd3d07 100644 --- a/hwe/sammo/DefaultActionTrigger.php +++ b/hwe/sammo/DefaultActionTrigger.php @@ -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; } diff --git a/hwe/sammo/TriggerNationType/che_도가.php b/hwe/sammo/TriggerNationType/che_도가.php index f5dd34e8..3865edde 100644 --- a/hwe/sammo/TriggerNationType/che_도가.php +++ b/hwe/sammo/TriggerNationType/che_도가.php @@ -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]; + } } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_도적.php b/hwe/sammo/TriggerNationType/che_도적.php index fc52de3d..6ae7b6ed 100644 --- a/hwe/sammo/TriggerNationType/che_도적.php +++ b/hwe/sammo/TriggerNationType/che_도적.php @@ -18,4 +18,8 @@ class che_도적 implements iActionTrigger{ return $amount; } + + public function onCalcSabotageProp(float $successRate):float{ + return $successRate + 0.1; + } } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_명가.php b/hwe/sammo/TriggerNationType/che_명가.php index 12f03a0d..f4444eab 100644 --- a/hwe/sammo/TriggerNationType/che_명가.php +++ b/hwe/sammo/TriggerNationType/che_명가.php @@ -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]; + } } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_묵가.php b/hwe/sammo/TriggerNationType/che_묵가.php index 486f4ca6..10a716ed 100644 --- a/hwe/sammo/TriggerNationType/che_묵가.php +++ b/hwe/sammo/TriggerNationType/che_묵가.php @@ -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]; + } } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_병가.php b/hwe/sammo/TriggerNationType/che_병가.php index f1f394d3..54f30875 100644 --- a/hwe/sammo/TriggerNationType/che_병가.php +++ b/hwe/sammo/TriggerNationType/che_병가.php @@ -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]; + } } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_오두미도.php b/hwe/sammo/TriggerNationType/che_오두미도.php index 2bc212ae..5bedc444 100644 --- a/hwe/sammo/TriggerNationType/che_오두미도.php +++ b/hwe/sammo/TriggerNationType/che_오두미도.php @@ -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]; } diff --git a/hwe/sammo/TriggerNationType/che_음양가.php b/hwe/sammo/TriggerNationType/che_음양가.php index 978d2be0..0e82ad7e 100644 --- a/hwe/sammo/TriggerNationType/che_음양가.php +++ b/hwe/sammo/TriggerNationType/che_음양가.php @@ -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; + } } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_종횡가.php b/hwe/sammo/TriggerNationType/che_종횡가.php index fb3f9821..fb75b445 100644 --- a/hwe/sammo/TriggerNationType/che_종횡가.php +++ b/hwe/sammo/TriggerNationType/che_종횡가.php @@ -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); + } } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_태평도.php b/hwe/sammo/TriggerNationType/che_태평도.php index f9539741..3ff38421 100644 --- a/hwe/sammo/TriggerNationType/che_태평도.php +++ b/hwe/sammo/TriggerNationType/che_태평도.php @@ -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]; + } } \ No newline at end of file diff --git a/hwe/sammo/iActionTrigger.php b/hwe/sammo/iActionTrigger.php index 6816dd90..155e2216 100644 --- a/hwe/sammo/iActionTrigger.php +++ b/hwe/sammo/iActionTrigger.php @@ -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);