From 36406c800143accd252f9aff7c6d7a5860ed0209 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sun, 30 Apr 2023 00:15:41 +0900 Subject: [PATCH] =?UTF-8?q?game:=20=EB=AC=BC=EC=9E=90=EC=A1=B0=EB=8B=AC?= =?UTF-8?q?=EB=8F=84=20=EC=A0=84=EB=B0=A9=20=EB=82=B4=EC=A0=95=20=EA=B0=90?= =?UTF-8?q?=EC=86=8C=EA=B0=80=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/Command/General/che_물자조달.php | 28 ++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/hwe/sammo/Command/General/che_물자조달.php b/hwe/sammo/Command/General/che_물자조달.php index 182bb300..37d4479b 100644 --- a/hwe/sammo/Command/General/che_물자조달.php +++ b/hwe/sammo/Command/General/che_물자조달.php @@ -21,6 +21,7 @@ use \sammo\Constraint\ConstraintHelper; class che_물자조달 extends Command\GeneralCommand{ static protected $actionName = '물자조달'; + static protected $debuffFront = 0.5; protected function argTest():bool{ $this->arg = null; @@ -95,10 +96,32 @@ class che_물자조달 extends Command\GeneralCommand{ $score = $general->onCalcDomestic('조달', 'score', $score); $score = Util::round($score); - $scoreText = number_format($score, 0); + + $exp = $score * 0.7 / 3; + $ded = $score * 1.0 / 3; $logger = $general->getLogger(); + if(in_array($this->city['front'], [1, 3])){ + $debuffFront = static::$debuffFront; + + if($this->nation['capital'] == $this->city['city']){ + $gameStor = \sammo\KVStorage::getStorage($db, 'game_env'); + [$year, $startYear] = $gameStor->getValuesAsArray(['year', 'startyear']); + $relYear = $year - $startYear; + + if($relYear < 25){ + $debuffScale = Util::clamp($relYear - 5, 0, 20) * 0.05; + $debuffFront = ($debuffScale * $debuffFront) + (1 - $debuffScale); + } + } + + $score *= $debuffFront; + } + + $scoreText = number_format($score, 0); + + if($pick == 'fail'){ $logger->pushGeneralActionLog("조달을 실패하여 {$resName}을 $scoreText 조달했습니다. <1>$date"); } @@ -109,9 +132,6 @@ class che_물자조달 extends Command\GeneralCommand{ $logger->pushGeneralActionLog("{$resName}을 $scoreText 조달했습니다. <1>$date"); } - $exp = $score * 0.7 / 3; - $ded = $score * 1.0 / 3; - $incStat = $rng->choiceUsingWeight([ 'leadership_exp'=>$general->getLeadership(false, false, false, false), 'strength_exp'=>$general->getStrength(false, false, false, false),