From 46cacc4a7d3bbdc8d2866ec736cf5bea4cc938ba Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 20 Feb 2022 03:11:02 +0900 Subject: [PATCH] =?UTF-8?q?game,feat:=20=EA=B3=84=EB=9E=B5=20=EC=BB=A4?= =?UTF-8?q?=EB=A7=A8=EB=93=9C=20=EB=B0=A9=EC=96=B4=20=EC=9C=A0=EB=8B=88?= =?UTF-8?q?=ED=81=AC=20-=20=EA=B3=84=EB=9E=B5=20=EB=B0=A9=EC=96=B4=20?= =?UTF-8?q?=ED=99=95=EB=A5=A0=EC=97=90=20=EB=B3=B4=EC=A0=95=20trigger=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/ActionItem/che_농성_위공자병법.php | 27 ++++++++++++++++++++ hwe/sammo/ActionItem/che_농성_주서음부.php | 27 ++++++++++++++++++++ hwe/sammo/Command/General/che_화계.php | 3 +++ 3 files changed, 57 insertions(+) create mode 100644 hwe/sammo/ActionItem/che_농성_위공자병법.php create mode 100644 hwe/sammo/ActionItem/che_농성_주서음부.php diff --git a/hwe/sammo/ActionItem/che_농성_위공자병법.php b/hwe/sammo/ActionItem/che_농성_위공자병법.php new file mode 100644 index 00000000..4b942b9f --- /dev/null +++ b/hwe/sammo/ActionItem/che_농성_위공자병법.php @@ -0,0 +1,27 @@ +[전투] 상대 계략 시도 확률 -10%p, 상대 계략 성공 확률 -10%p'; + protected $cost = 200; + protected $consumable = false; + + public function onCalcStat(General $general, string $statName, $value, $aux=null){ + if($statName === 'sabotageDefence'){ + return $value + 0.3; + } + if($statName === 'warMagicTrialProb'){ + return $value - 0.1; + } + if($statName === 'warMagicSuccessProb'){ + return $value - 0.1; + } + return $value; + } +} diff --git a/hwe/sammo/ActionItem/che_농성_주서음부.php b/hwe/sammo/ActionItem/che_농성_주서음부.php new file mode 100644 index 00000000..76fea855 --- /dev/null +++ b/hwe/sammo/ActionItem/che_농성_주서음부.php @@ -0,0 +1,27 @@ +[전투] 상대 계략 시도 확률 -10%p, 상대 계략 성공 확률 -10%p'; + protected $cost = 200; + protected $consumable = false; + + public function onCalcStat(General $general, string $statName, $value, $aux=null){ + if($statName === 'sabotageDefence'){ + return $value + 0.3; + } + if($statName === 'warMagicTrialProb'){ + return $value - 0.1; + } + if($statName === 'warMagicSuccessProb'){ + return $value - 0.1; + } + return $value; + } +} diff --git a/hwe/sammo/Command/General/che_화계.php b/hwe/sammo/Command/General/che_화계.php index 7053ab04..135dc670 100644 --- a/hwe/sammo/Command/General/che_화계.php +++ b/hwe/sammo/Command/General/che_화계.php @@ -76,6 +76,7 @@ class che_화계 extends Command\GeneralCommand $destNationID = $destNation['nation']; $maxGenScore = 0; + $probCorrection = 0; foreach ($destCityGeneralList as $destGeneral) { /** @var General $destGeneral */ if ($destGeneral->getNationID() != $destNationID) { @@ -92,9 +93,11 @@ class che_화계 extends Command\GeneralCommand throw new \sammo\MustNotBeReachedException(); } $maxGenScore = max($maxGenScore, $genScore); + $probCorrection = $destGeneral->onCalcStat($destGeneral, 'sabotageDefence', $probCorrection); } $prob = $maxGenScore / GameConst::$sabotageProbCoefByStat; + $prob += $probCorrection; $prob += $destCity['secu'] / $destCity['secu_max'] / 5; //최대 20%p $prob += $destCity['supply'] ? 0.1 : 0;