From 27811f4891590079f4be74a25c4cc4b9dfe45ca7 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Wed, 18 May 2022 00:53:05 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20nextBool=20=EB=8C=80=EC=8B=A0=20nextFloa?= =?UTF-8?q?t1=20=EC=A0=81=EC=9D=80=20=EB=B6=80=EB=B6=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/GeneralAI.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 35415fe0..715e2f42 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -2484,7 +2484,7 @@ class GeneralAI $maxPop = $city['pop_max'] - $this->nationPolicy->minNPCRecruitCityPopulation; if (($city['pop'] / $city['pop_max'] < $this->nationPolicy->safeRecruitCityPopulationRatio) && - ($this->rng->nextFloat1($remainPop / $maxPop)) + ($this->rng->nextBool($remainPop / $maxPop)) ) { return null; } @@ -3997,10 +3997,10 @@ class GeneralAI if (!key_exists($chiefLevel, $this->chiefGenerals) && !key_exists($chiefLevel, $nextChiefs)) { $newChiefProb = 1; } 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; }