From 0399b73c7351dd83bf80da66f94f417f95511fc1 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 29 Apr 2021 20:31:32 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B5=AD=EA=B0=80=20=EA=B7=9C=EB=AA=A8=20?= =?UTF-8?q?=EC=8A=B9=EA=B8=89=EC=8B=9C=20=EC=95=84=EC=9D=B4=ED=85=9C=20?= =?UTF-8?q?=EC=8A=B5=EB=93=9D=20=EB=B0=A9=EC=8B=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 1 - hwe/func_gamerule.php | 12 ++++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hwe/func.php b/hwe/func.php index 146c8508..3fdd843c 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1624,7 +1624,6 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템 foreach ($general->getItems() as $item) { if (!$item->isBuyable()) { $trialCnt -= 1; - continue; } } diff --git a/hwe/func_gamerule.php b/hwe/func_gamerule.php index ff35c6ed..10967195 100644 --- a/hwe/func_gamerule.php +++ b/hwe/func_gamerule.php @@ -627,14 +627,15 @@ function updateNationState() $uniqueLotteryWeightList = []; foreach ($nationGenList as $nationGen) { - $hasUnique = false; + $trialCnt = count(GameConst::$allItems); + foreach ($nationGen->getItems() as $item) { if (!$item->isBuyable()) { - $hasUnique = true; - break; + $trialCnt -= 1; } } - if ($hasUnique) { + + if ($trialCnt <= 0) { continue; } @@ -647,6 +648,9 @@ function updateNationState() } else if ($nationGen->getVar('officer_level') > 4) { $score += 35; } + + $score *= $trialCnt; + $uniqueLotteryWeightList[$nationGen->getID()] = [$nationGen, $score]; }