From ee9f97f9178b9567f17e68337adb57988fe29a48 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 9 Mar 2019 01:05:47 +0900 Subject: [PATCH] =?UTF-8?q?m=EC=9E=A5=20=ED=95=A9=EC=82=B0=20=EB=8A=A5?= =?UTF-8?q?=EB=A0=A5=EC=B9=98=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_process_chief.php | 7 ++++--- hwe/func_process_personnel.php | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hwe/func_process_chief.php b/hwe/func_process_chief.php index 81637e6b..75571d92 100644 --- a/hwe/func_process_chief.php +++ b/hwe/func_process_chief.php @@ -1978,11 +1978,12 @@ function process_76(&$general) { $stat_tier1 = GameConst::$defaultStatMax - 10 + rand()%11; $stat_tier3 = GameConst::$defaultStatMin + rand()%6; $stat_tier2 = GameConst::$defaultStatTotal - $stat_tier1 - $stat_tier3; - switch(Util::choiceRandomUsingWeight([ + $type = Util::choiceRandomUsingWeight([ 'power'=>4, 'intel'=>4, 'neutral'=>2 - ])){ + ]); + switch($type){ case 'power': $leader = $stat_tier1; $power = $stat_tier2; @@ -2030,7 +2031,7 @@ function process_76(&$general) { $intel -= $over3; } // 낮은 능치쪽으로 합산 - if($type == 0) { + if($type == 'power') { $intel = $intel + $over1 + $over2 + $over3; } else { $power = $power + $over1 + $over2 + $over3; diff --git a/hwe/func_process_personnel.php b/hwe/func_process_personnel.php index f714c506..22e579d8 100644 --- a/hwe/func_process_personnel.php +++ b/hwe/func_process_personnel.php @@ -382,11 +382,12 @@ function process_29(&$general) { $stat_tier1 = GameConst::$defaultStatMax - 10 + rand()%11; $stat_tier3 = GameConst::$defaultStatMin + rand()%6; $stat_tier2 = GameConst::$defaultStatTotal - $stat_tier1 - $stat_tier3; - switch(Util::choiceRandomUsingWeight([ + $type = Util::choiceRandomUsingWeight([ 'power'=>4, 'intel'=>4, 'neutral'=>2 - ])){ + ]); + switch($type){ case 'power': $leader = $stat_tier1; $power = $stat_tier2; @@ -435,7 +436,7 @@ function process_29(&$general) { $intel -= $over3; } // 낮은 능치쪽으로 합산 - if($type == 0) { + if($type == 'power') { $intel = $intel + $over1 + $over2 + $over3; } else { $power = $power + $over1 + $over2 + $over3;