From 6f88a8011876c5d445fb8e726f16ed2a0ebc784d Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 28 Jun 2018 01:57:41 +0900 Subject: [PATCH] =?UTF-8?q?randBool=EC=9D=B4=20=EC=95=84=EB=8B=88=EB=9D=BC?= =?UTF-8?q?=20randF=20=EC=8D=A8=EC=84=9C=20=EC=83=9D=EA=B8=B0=EB=8A=94=20?= =?UTF-8?q?=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_npc.php | 6 +++--- hwe/process_war.php | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hwe/func_npc.php b/hwe/func_npc.php index 1db6816e..c117f548 100644 --- a/hwe/func_npc.php +++ b/hwe/func_npc.php @@ -1008,7 +1008,7 @@ function NPCStaffWork($general, $nation, $dipState){ $isWarUser = true; break; } - if(Util::randF(0.2)){ + if(Util::randBool(0.2)){ $isWarUser = false; break; } @@ -1206,7 +1206,7 @@ function NPCStaffWork($general, $nation, $dipState){ $score *= 4; } - if(Util::randF(0.3) && $frontImportantCitiesID){ + if(Util::randBool(0.3) && $frontImportantCitiesID){ $targetCityID = Util::choiceRandom($frontImportantCitiesID); } else{ @@ -1262,7 +1262,7 @@ function NPCStaffWork($general, $nation, $dipState){ if($targetCity['pop'] < 33000 + $nationGeneral['leader']){ continue; } - if (Util::randF($targetCity['pop'] / $targetCity['pop2'])) { + if (Util::randBool($targetCity['pop'] / $targetCity['pop2'])) { break; } } diff --git a/hwe/process_war.php b/hwe/process_war.php index d9d9be1f..359c1a06 100644 --- a/hwe/process_war.php +++ b/hwe/process_war.php @@ -602,14 +602,14 @@ function processWar($general, $city) { //특기보정 : 저격(수극), 활무기저격 $snipe = false; $snipeItem = false; - if(!$snipe && $general['special2'] == 70 && Util::randF(1/3)){ + if(!$snipe && $general['special2'] == 70 && Util::randBool(1/3)){ $snipe = true; } - if(!$snipe && in_array($general['weap'], [10, 14, 18, 22]) && Util::randF(1/5)){ + if(!$snipe && in_array($general['weap'], [10, 14, 18, 22]) && Util::randBool(1/5)){ $snipe = true; } if(!$snipe && $general['item'] == 2){ - if(Util::randF(1/5)){ + if(Util::randBool(1/5)){ $snipe = true; $snipeItem = true; } @@ -642,14 +642,14 @@ function processWar($general, $city) { //특기보정 : 저격(수극), 활무기저격 $snipe = false; $snipeItem = false; - if(!$snipe && $oppose['special2'] == 70 && Util::randF(1/3)){ + if(!$snipe && $oppose['special2'] == 70 && Util::randBool(1/3)){ $snipe = true; } - if(!$snipe && in_array($oppose['weap'], [10, 14, 18, 22]) && Util::randF(1/5)){ + if(!$snipe && in_array($oppose['weap'], [10, 14, 18, 22]) && Util::randBool(1/5)){ $snipe = true; } if(!$snipe && $oppose['item'] == 2){ - if(Util::randF(1/5)){ + if(Util::randBool(1/5)){ $snipe = true; $snipeItem = true; }