From 87294d5477d0a01ae1a32a14f532f467af252ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A5=98=ED=99=94=EC=98=81?= <> Date: Sat, 1 Jun 2024 07:00:35 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=8F=84=EC=8B=9C=20=EC=A3=BC=EB=91=94?= =?UTF-8?q?=20=EC=9E=A5=EC=88=98=20=EC=A4=91=20=ED=95=B4=EB=8B=B9=20?= =?UTF-8?q?=EA=B5=AD=EA=B0=80=20=EC=86=8C=EC=86=8D=EB=A7=8C=20=EA=B3=84?= =?UTF-8?q?=EB=9E=B5=20=ED=99=95=EB=A5=A0=20=EA=B0=90=EC=86=8C=EC=97=90=20?= =?UTF-8?q?=EC=98=81=ED=96=A5=EC=9D=84=20=EC=A3=BC=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/Command/General/che_화계.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hwe/sammo/Command/General/che_화계.php b/hwe/sammo/Command/General/che_화계.php index b07c77ef..45f13c95 100644 --- a/hwe/sammo/Command/General/che_화계.php +++ b/hwe/sammo/Command/General/che_화계.php @@ -74,12 +74,15 @@ class che_화계 extends Command\GeneralCommand $maxGenScore = 0; $probCorrection = 0; + $affectGeneralCount = 0; foreach ($destCityGeneralList as $destGeneral) { /** @var General $destGeneral */ if ($destGeneral->getNationID() != $destNationID) { continue; } + $affectGeneralCount++; + if ($statType === 'leadership') { $genScore = $destGeneral->getLeadership(); } else if ($statType === 'strength') { @@ -95,7 +98,7 @@ class che_화계 extends Command\GeneralCommand $prob = $maxGenScore / GameConst::$sabotageProbCoefByStat; $prob += $probCorrection; - $prob += (log(count($destCityGeneralList) + 1, 2) - 1.25) * GameConst::$sabotageDefenceCoefByGeneralCnt; + $prob += (log($affectGeneralCount + 1, 2) - 1.25) * GameConst::$sabotageDefenceCoefByGeneralCnt; $prob += $destCity['secu'] / $destCity['secu_max'] / 5; //최대 20%p $prob += $destCity['supply'] ? 0.1 : 0; -- 2.54.0