From ff31e41fec93d55a55b9362fe8a12ff52b8140b2 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 2 Sep 2018 22:04:08 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B8=88=EC=88=98=EC=9E=85,=20=EC=82=B4?= =?UTF-8?q?=EC=88=98=EC=9E=85=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/DefaultActionTrigger.php | 2 +- hwe/sammo/TriggerNationType/che_덕가.php | 8 +++++++- hwe/sammo/TriggerNationType/che_도적.php | 8 +++++++- hwe/sammo/TriggerNationType/che_명가.php | 8 +++++++- hwe/sammo/TriggerNationType/che_법가.php | 8 +++++++- hwe/sammo/TriggerNationType/che_불가.php | 8 +++++++- hwe/sammo/TriggerNationType/che_오두미도.php | 8 ++++++++ hwe/sammo/TriggerNationType/che_유가.php | 8 ++++++++ hwe/sammo/TriggerNationType/che_종횡가.php | 8 ++++++++ hwe/sammo/iActionTrigger.php | 2 +- 10 files changed, 61 insertions(+), 7 deletions(-) diff --git a/hwe/sammo/DefaultActionTrigger.php b/hwe/sammo/DefaultActionTrigger.php index a5c7a6b2..14c31684 100644 --- a/hwe/sammo/DefaultActionTrigger.php +++ b/hwe/sammo/DefaultActionTrigger.php @@ -17,7 +17,7 @@ trait DefaultActionTrigger{ return $turn; } - public function onCalcNationalIncome(array $nation, string $type, int $amount):int{ + public function onCalcNationalIncome(string $type, int $amount):int{ return $amount; } diff --git a/hwe/sammo/TriggerNationType/che_덕가.php b/hwe/sammo/TriggerNationType/che_덕가.php index 4aba8d3e..966c54f1 100644 --- a/hwe/sammo/TriggerNationType/che_덕가.php +++ b/hwe/sammo/TriggerNationType/che_덕가.php @@ -11,5 +11,11 @@ class che_덕가 implements iActionTrigger{ static $pros = '치안↑ 인구↑ 민심↑'; static $cons = '쌀수입↓ 수성↓'; - + public function onCalcNationalIncome(string $type, int $amount):int{ + if($type == 'rice'){ + return $amount * 0.9; + } + + return $amount; + } } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_도적.php b/hwe/sammo/TriggerNationType/che_도적.php index 25b7d5c7..fc52de3d 100644 --- a/hwe/sammo/TriggerNationType/che_도적.php +++ b/hwe/sammo/TriggerNationType/che_도적.php @@ -11,5 +11,11 @@ class che_도적 implements iActionTrigger{ static $pros = '계략↑'; static $cons = '금수입↓ 치안↓ 민심↓'; - + public function onCalcNationalIncome(string $type, int $amount):int{ + if($type == 'gold'){ + return $amount * 0.9; + } + + return $amount; + } } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_명가.php b/hwe/sammo/TriggerNationType/che_명가.php index e12b6c05..12f03a0d 100644 --- a/hwe/sammo/TriggerNationType/che_명가.php +++ b/hwe/sammo/TriggerNationType/che_명가.php @@ -11,5 +11,11 @@ class che_명가 implements iActionTrigger{ static $pros = '기술↑ 인구↑'; static $cons = '쌀수입↓ 수성↓'; - + public function onCalcNationalIncome(string $type, int $amount):int{ + if($type == 'rice'){ + return $amount * 0.9; + } + + return $amount; + } } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_법가.php b/hwe/sammo/TriggerNationType/che_법가.php index 9acdcfa3..0aacc0a5 100644 --- a/hwe/sammo/TriggerNationType/che_법가.php +++ b/hwe/sammo/TriggerNationType/che_법가.php @@ -11,5 +11,11 @@ class che_법가 implements iActionTrigger{ static $pros = '금수입↑ 치안↑'; static $cons = '인구↓ 민심↓'; - + public function onCalcNationalIncome(string $type, int $amount):int{ + if($type == 'gold'){ + return $amount * 1.1; + } + + return $amount; + } } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_불가.php b/hwe/sammo/TriggerNationType/che_불가.php index 05b8f2b4..73f8eaf1 100644 --- a/hwe/sammo/TriggerNationType/che_불가.php +++ b/hwe/sammo/TriggerNationType/che_불가.php @@ -11,5 +11,11 @@ class che_불가 implements iActionTrigger{ static $pros = '민심↑ 수성↑'; static $cons = '금수입↓'; - + public function onCalcNationalIncome(string $type, int $amount):int{ + if($type == 'gold'){ + return $amount * 0.9; + } + + return $amount; + } } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_오두미도.php b/hwe/sammo/TriggerNationType/che_오두미도.php index bfbf43a3..2bc212ae 100644 --- a/hwe/sammo/TriggerNationType/che_오두미도.php +++ b/hwe/sammo/TriggerNationType/che_오두미도.php @@ -21,4 +21,12 @@ class che_오두미도 implements iActionTrigger{ return [$score, $cost, $successRate, $failRate]; } + public function onCalcNationalIncome(string $type, int $amount):int{ + if($type == 'rice'){ + return $amount * 1.1; + } + + return $amount; + } + } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_유가.php b/hwe/sammo/TriggerNationType/che_유가.php index 6efc8e72..60020591 100644 --- a/hwe/sammo/TriggerNationType/che_유가.php +++ b/hwe/sammo/TriggerNationType/che_유가.php @@ -19,4 +19,12 @@ class che_유가 implements iActionTrigger{ return [$score, $cost, $successRate, $failRate]; } + + public function onCalcNationalIncome(string $type, int $amount):int{ + if($type == 'rice'){ + return $amount * 0.9; + } + + return $amount; + } } \ No newline at end of file diff --git a/hwe/sammo/TriggerNationType/che_종횡가.php b/hwe/sammo/TriggerNationType/che_종횡가.php index dbf7a1d2..fb3f9821 100644 --- a/hwe/sammo/TriggerNationType/che_종횡가.php +++ b/hwe/sammo/TriggerNationType/che_종횡가.php @@ -19,4 +19,12 @@ class che_종횡가 implements iActionTrigger{ return [$score, $cost, $successRate, $failRate]; } + + public function onCalcNationalIncome(string $type, int $amount):int{ + if($type == 'gold'){ + return $amount * 0.9; + } + + return $amount; + } } \ No newline at end of file diff --git a/hwe/sammo/iActionTrigger.php b/hwe/sammo/iActionTrigger.php index 1a511cf2..6816dd90 100644 --- a/hwe/sammo/iActionTrigger.php +++ b/hwe/sammo/iActionTrigger.php @@ -16,7 +16,7 @@ interface iActionTrigger{ public function onPreGeneralStatUpdate(General $general, string $statName, $value); public function onCalcStragicDelay(array $nation, int $commandType, int $turn):int; - public function onCalcNationalIncome(array $nation, string $type, int $amount):int; + public function onCalcNationalIncome(string $type, int $amount):int; public function getWarPowerMultiplier(WarUnit $unit):array; public function getBattleInitSkillTriggerList(WarUnit $unit):array;