From 849b0b2a270df8759e5a01d5bbca2f15939d40b1 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 19 Sep 2018 02:09:08 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B9=98=EC=95=88=EC=97=90=20=EB=94=B0?= =?UTF-8?q?=EB=A5=B8=20=EC=9E=AC=EB=82=9C=20=ED=99=95=EB=A5=A0=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_time_event.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hwe/func_time_event.php b/hwe/func_time_event.php index 8c8f745d..2f9bc0c2 100644 --- a/hwe/func_time_event.php +++ b/hwe/func_time_event.php @@ -596,12 +596,12 @@ function disaster() { $city = MYDB_fetch_array($cityresult); //호황 발생 도시 선택 ( 기본 3% 이므로 약 3개 도시 ) //재해 발생 도시 선택 ( 기본 6% 이므로 약 6개 도시 ) - if($isgood == 1) { $ratio = 3 + Util::round(1.0*$city['secu']/$city['secu2']*3); } // 3 ~ 6% - else { $ratio = 6 - Util::round(1.0*$city['secu']/$city['secu2']*3); } // 3 ~ 6% + if($isgood == 1) { $ratio = 2 + Util::round($city['secu']/$city['secu2']*5); } // 2 ~ 7% + else { $ratio = 6 - Util::round($city['secu']/$city['secu2']*5); } // 1 ~ 6% if(rand()%100+1 < $ratio) { $disastercity[] = $city['city']; - $disasterratio[] = 1.0 * $city['secu'] / $city['secu2']; + $disasterratio[] = Util::valueFit($city['secu'] / 0.8 / $city['secu2'], 0, 1); $disastername[] = $city['name']; } }