randBool이 아니라 randF 써서 생기는 버그 수정
This commit is contained in:
+3
-3
@@ -1008,7 +1008,7 @@ function NPCStaffWork($general, $nation, $dipState){
|
|||||||
$isWarUser = true;
|
$isWarUser = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(Util::randF(0.2)){
|
if(Util::randBool(0.2)){
|
||||||
$isWarUser = false;
|
$isWarUser = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1206,7 +1206,7 @@ function NPCStaffWork($general, $nation, $dipState){
|
|||||||
$score *= 4;
|
$score *= 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Util::randF(0.3) && $frontImportantCitiesID){
|
if(Util::randBool(0.3) && $frontImportantCitiesID){
|
||||||
$targetCityID = Util::choiceRandom($frontImportantCitiesID);
|
$targetCityID = Util::choiceRandom($frontImportantCitiesID);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -1262,7 +1262,7 @@ function NPCStaffWork($general, $nation, $dipState){
|
|||||||
if($targetCity['pop'] < 33000 + $nationGeneral['leader']){
|
if($targetCity['pop'] < 33000 + $nationGeneral['leader']){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (Util::randF($targetCity['pop'] / $targetCity['pop2'])) {
|
if (Util::randBool($targetCity['pop'] / $targetCity['pop2'])) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -602,14 +602,14 @@ function processWar($general, $city) {
|
|||||||
//특기보정 : 저격(수극), 활무기저격
|
//특기보정 : 저격(수극), 활무기저격
|
||||||
$snipe = false;
|
$snipe = false;
|
||||||
$snipeItem = false;
|
$snipeItem = false;
|
||||||
if(!$snipe && $general['special2'] == 70 && Util::randF(1/3)){
|
if(!$snipe && $general['special2'] == 70 && Util::randBool(1/3)){
|
||||||
$snipe = true;
|
$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;
|
$snipe = true;
|
||||||
}
|
}
|
||||||
if(!$snipe && $general['item'] == 2){
|
if(!$snipe && $general['item'] == 2){
|
||||||
if(Util::randF(1/5)){
|
if(Util::randBool(1/5)){
|
||||||
$snipe = true;
|
$snipe = true;
|
||||||
$snipeItem = true;
|
$snipeItem = true;
|
||||||
}
|
}
|
||||||
@@ -642,14 +642,14 @@ function processWar($general, $city) {
|
|||||||
//특기보정 : 저격(수극), 활무기저격
|
//특기보정 : 저격(수극), 활무기저격
|
||||||
$snipe = false;
|
$snipe = false;
|
||||||
$snipeItem = false;
|
$snipeItem = false;
|
||||||
if(!$snipe && $oppose['special2'] == 70 && Util::randF(1/3)){
|
if(!$snipe && $oppose['special2'] == 70 && Util::randBool(1/3)){
|
||||||
$snipe = true;
|
$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;
|
$snipe = true;
|
||||||
}
|
}
|
||||||
if(!$snipe && $oppose['item'] == 2){
|
if(!$snipe && $oppose['item'] == 2){
|
||||||
if(Util::randF(1/5)){
|
if(Util::randBool(1/5)){
|
||||||
$snipe = true;
|
$snipe = true;
|
||||||
$snipeItem = true;
|
$snipeItem = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user