fix: nextBool 대신 nextFloat1 적은 부분 수정
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user