내정 상승 코드 마저 수정

This commit is contained in:
2019-05-03 01:29:24 +09:00
parent b512d57a7f
commit d5e7e85955
3 changed files with 1 additions and 11 deletions
+1 -1
View File
@@ -380,7 +380,7 @@ function preUpdateMonthly() {
$setValues = [];
//인구는 고정
$setValues['pop'] = $db->sqleval('if(pop > pop2, GREATEST(pop2, pop*0.99), pop');
$setValues['pop'] = $db->sqleval('if(pop > pop2, GREATEST(pop2, pop*0.99), pop)');
//농지, 상업
if(in_array($nationType, [2, 12])){
-4
View File
@@ -272,7 +272,6 @@ function process_1(&$general, $type) {
$ded = CharDedication($ded, $general['personal']);
$score += $city["$stype"];
if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; }
// 내정 상승
$query = "update city set {$stype}='$score' where city='{$general['city']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -568,7 +567,6 @@ function process_5(&$general, $type) {
$ded = CharDedication($ded, $general['personal']);
$score += $city["$stype"];
if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; }
// 내정 상승
$query = "update city set {$stype}='$score' where city='{$general['city']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -656,7 +654,6 @@ function process_7(&$general) {
$ded = CharDedication($ded, $general['personal']);
$score = $city['pop'] + ($score * 10);
if($score > $city['pop2']) { $score = $city['pop2']; }
// 민심 상승
$query = "update city set pop='$score' where city='{$general['city']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -754,7 +751,6 @@ function process_8(&$general) {
$ded = CharDedication($ded, $general['personal']);
$score += $city["$stype"];
if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; }
// 내정 상승
$query = "update city set {$stype}='$score' where city='{$general['city']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
-6
View File
@@ -186,13 +186,7 @@ function popIncrease() {
if($cityrate > 100) { $cityrate = 100; }
if($cityrate < 0) { $cityrate = 0; }
}
if($pop > $city['pop2']) { $pop = $city['pop2']; }
if($pop < 0) { $pop = 0; }
if($agri > $city['agri2']) { $agri = $city['agri2']; }
if($comm > $city['comm2']) { $comm = $city['comm2']; }
if($secu > $city['secu2']) { $secu = $city['secu2']; }
if($def > $city['def2']) { $def= $city['def2']; }
if($wall > $city['wall2']) { $wall = $city['wall2']; }
//시세
$query = "update city set pop='$pop',rate='$cityrate',agri='$agri',comm='$comm',secu='$secu',def='$def',wall='$wall' where city='{$city['city']}'";