From 6ce0e72b339c0b049c8dd939c21ec2ee21f65faa Mon Sep 17 00:00:00 2001 From: hide_d Date: Fri, 15 Mar 2019 15:00:12 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B8=ED=83=90=20=ED=99=95=EB=A5=A0=20?= =?UTF-8?q?=ED=95=AB=ED=94=BD=EC=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_process_personnel.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hwe/func_process_personnel.php b/hwe/func_process_personnel.php index cc8fcead..d760727c 100644 --- a/hwe/func_process_personnel.php +++ b/hwe/func_process_personnel.php @@ -315,9 +315,13 @@ function process_29(&$general) { $gen_cnt = $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc <= 2 AND nation = %i', $general['nation']); $npc_cnt = $db->queryFirstField('SELECT count(`no`) FROM general WHERE 3 <= npc AND npc <= 4 AND nation = %i', $general['nation']); + $nation_cnt = $db->queryFirstField('SELECT count(`nation`) FROM nation WHERE `level` > 0'); + $curr_cnt = Util::toInt($total_gen_cnt + $total_npc_cnt / 2); $remain_slot = $max_gen_cnt - $curr_cnt; + $avg_cnt = $curr_cnt / $nation_cnt; + $found_prop_main = pow($remain_slot / $max_gen_cnt, 6); $found_prop_small = 1 / ($total_npc_cnt / 3 + 1); $found_prop_big = 1 / $max_gen_cnt; @@ -361,7 +365,7 @@ function process_29(&$general) { $name = "{$name}{$count}"; } - $join_prop = 0.3 + 0.7 * (($gen_cnt + $npc_cnt / 2) / $curr_cnt); + $join_prop = 0.7 * $avg_cnt / ($gen_cnt + $npc_cnt / 2); if($nation['scout'] != 0 || !Util::randBool($join_prop)) { $scoutType = "발견";