From a231adbfddb08f888149264249d09706af34d512 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 11 Nov 2018 19:44:14 +0900 Subject: [PATCH] =?UTF-8?q?=EB=9E=9C=EB=8D=A4=20=EC=9E=84=EA=B4=80?= =?UTF-8?q?=EC=8B=9C=20=EC=A0=9C=EA=B3=B1=EA=B7=BC=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=84=A0=ED=98=95=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/Command/General/che_랜덤임관.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hwe/sammo/Command/General/che_랜덤임관.php b/hwe/sammo/Command/General/che_랜덤임관.php index 1cfd97bd..86019b5c 100644 --- a/hwe/sammo/Command/General/che_랜덤임관.php +++ b/hwe/sammo/Command/General/che_랜덤임관.php @@ -137,12 +137,10 @@ class che_랜덤임관 extends Command\GeneralCommand{ $notIn ); - $allGen = Util::arraySum($nations, 'gennum'); - $randVals = []; foreach($nations as $testNation){ $nationID = $nations['nation']; - $randVals[] = [$testNation, sqrt($allGen/$testNation['gennum'])]; + $randVals[] = [$testNation, 1/$testNation['gennum']]; } $destNation = Util::choiceRandomUsingWeightPair($randVals);