fix: nextBool 대신 nextFloat1 적은 부분 수정

This commit is contained in:
2022-05-18 00:53:05 +09:00
parent b22987f21b
commit 27811f4891
+3 -3
View File
@@ -2484,7 +2484,7 @@ class GeneralAI
$maxPop = $city['pop_max'] - $this->nationPolicy->minNPCRecruitCityPopulation; $maxPop = $city['pop_max'] - $this->nationPolicy->minNPCRecruitCityPopulation;
if (($city['pop'] / $city['pop_max'] < $this->nationPolicy->safeRecruitCityPopulationRatio) && if (($city['pop'] / $city['pop_max'] < $this->nationPolicy->safeRecruitCityPopulationRatio) &&
($this->rng->nextFloat1($remainPop / $maxPop)) ($this->rng->nextBool($remainPop / $maxPop))
) { ) {
return null; return null;
} }
@@ -3997,10 +3997,10 @@ class GeneralAI
if (!key_exists($chiefLevel, $this->chiefGenerals) && !key_exists($chiefLevel, $nextChiefs)) { if (!key_exists($chiefLevel, $this->chiefGenerals) && !key_exists($chiefLevel, $nextChiefs)) {
$newChiefProb = 1; $newChiefProb = 1;
} else { } else {
$newChiefProb = $this->rng->nextFloat1(0.1); $newChiefProb = $this->rng->nextBool(0.1);
} }
if ($newChiefProb < 1 && !$this->rng->nextFloat1($newChiefProb)) { if ($newChiefProb < 1 && !$this->rng->nextBool($newChiefProb)) {
continue; continue;
} }