국가 규모 승급시 아이템 습득 방식 변경

This commit is contained in:
2021-04-29 20:31:32 +09:00
parent c4f6976c42
commit 139fb6b6e0
2 changed files with 8 additions and 5 deletions
-1
View File
@@ -1624,7 +1624,6 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
foreach ($general->getItems() as $item) {
if (!$item->isBuyable()) {
$trialCnt -= 1;
continue;
}
}
+8 -4
View File
@@ -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];
}