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;