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]; }