From 7375bb94fd4e9c13314b77e7d40d55398d002cf5 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 31 Jan 2018 23:31:44 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=EC=88=98=EB=B9=84,=20=EC=84=B1=EB=B2=BD=20?= =?UTF-8?q?=EA=B0=95=ED=99=94=EC=9D=98=20=EC=84=B1=EA=B3=B5=EC=9D=84=20?= =?UTF-8?q?=EB=AC=B4=EB=A0=A5=20=EA=B8=B0=EC=A4=80=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=98=AC=EB=B0=94=EB=A5=B4=EA=B2=8C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- che_close/func_process.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/che_close/func_process.php b/che_close/func_process.php index 9aa9bab..4b1a0f6 100644 --- a/che_close/func_process.php +++ b/che_close/func_process.php @@ -386,7 +386,7 @@ function process_5($connect, &$general, $type) { if($general[level] == 4 && $general[no] == $city[gen1]) { $score *= 1.05; } $rd = rand() % 100; // 현재 20% - $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); + $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 1); // 특기보정 : 수비, 축성 if($type == 1 && $general[special] == 11) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } if($type == 2 && $general[special] == 10) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } From 5a8b6470454333c306310faea96d21b51bf09756 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 31 Jan 2018 23:59:10 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=ED=95=84=EC=82=B4=20=ED=99=95=EB=A5=A0?= =?UTF-8?q?=EC=9D=84=20=EC=A3=BC=20=EB=8A=A5=EB=A0=A5=EC=B9=98=EB=A7=8C=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=98=EB=8F=84=EB=A1=9D=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 --- che_close/_simul.php | 6 +++--- che_close/process_war.php | 38 +++++++++++++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/che_close/_simul.php b/che_close/_simul.php index 033e05e..389aefc 100644 --- a/che_close/_simul.php +++ b/che_close/_simul.php @@ -197,7 +197,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general[leader], $general[power], $general[intel]); + $ratio = CriticalRatio3($general[leader], $general[power], $general[intel], $general['crewtype']); if($ratio >= $rd && $avoid == 1) { $msg .= "필살공격!
"; $cityCrew = CriticalScore2($cityCrew); @@ -553,7 +553,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general[leader], $general[power], $general[intel]); + $ratio = CriticalRatio3($general[leader], $general[power], $general[intel], $general['crewtype']); if($ratio >= $rd && $myAvoid == 1) { $msg .= "필살공격!
"; $opCrew = CriticalScore2($opCrew); @@ -561,7 +561,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 } //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($oppose[leader], $oppose[power], $oppose[intel]); + $ratio = CriticalRatio3($oppose[leader], $oppose[power], $oppose[intel], $oppose['crewtype']); if($ratio >= $rd && $opAvoid == 1) { $msg .= "●상대의 필살공격!
"; $myCrew = CriticalScore2($myCrew); diff --git a/che_close/process_war.php b/che_close/process_war.php index 884ad13..79f6f63 100644 --- a/che_close/process_war.php +++ b/che_close/process_war.php @@ -273,7 +273,7 @@ function processWar($connect, $general, $city) { //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book])); + $ratio = CriticalRatio3($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), $general['crewtype']); // 특기보정 : 무쌍, 필살 if($general[special2] == 61) { $ratio += 10; } if($general[special2] == 71) { $ratio += 20; } @@ -1030,7 +1030,7 @@ function processWar($connect, $general, $city) { //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book])); + $ratio = CriticalRatio3($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), $general['crewtype']); // 특기보정 : 무쌍, 필살 if($general[special2] == 61) { $ratio += 10; } if($general[special2] == 71) { $ratio += 20; } @@ -1052,7 +1052,7 @@ function processWar($connect, $general, $city) { } //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($oppose[leader]+getHorseEff($oppose[horse])+$opplbonus, $oppose[power]+getWeapEff($oppose[weap]), $oppose[intel]+getBookEff($oppose[book])); + $ratio = CriticalRatio3($oppose[leader]+getHorseEff($oppose[horse])+$opplbonus, $oppose[power]+getWeapEff($oppose[weap]), $oppose[intel]+getBookEff($oppose[book]), $oppose['crewtype']); // 특기보정 : 필살 if($oppose[special2] == 71) { $ratio += 20; } if($ratio >= $rd && $opAvoid == 1) { @@ -1450,6 +1450,38 @@ function CriticalRatio2($leader, $power, $intel) { return $ratio; } +function CriticalRatio3($leader, $power, $intel, $crewtype) { + // 무장 무력 : 65 5%, 70 10%, 75 15%, 80 20% + // 지장 지력 : 65 5%, 70 8%, 75 10%, 80 13% + //충차장 통솔: 65 5%, 70 10%, 75 15%, 80 20% + + $crewtype = floor($crwtype/10); + + if($crewtype == 3){ //지장 + $mainstat = $intel; + } + else if($crewtype == 4){ //병기 + $mainstat = $leader; + } + else{ + $mainstat = $power; + } + $mainstat = 0; + + $ratio = max($mainstat - 65, 0); + + if (floor($crewtype/10) == 3) { + $ratio / 2; + } + + $ratio += 5; + $ratio = round($ratio); + + if($ratio > 50) $ratio = 50; + + return $ratio; +} + function CriticalScore2($score) { $score = round($score * (rand()%8 + 13)/10); // 1.3~2.0 return $score; From b5d69674ce3ee37870d6690db247bc410f8a7a31 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 1 Feb 2018 00:00:55 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=ED=81=AC=EB=A6=AC=ED=8B=B0=EC=BB=AC=20?= =?UTF-8?q?=ED=99=95=EB=A5=A0=20=ED=95=A8=EC=88=98=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- che_close/process_war.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/che_close/process_war.php b/che_close/process_war.php index 79f6f63..986e764 100644 --- a/che_close/process_war.php +++ b/che_close/process_war.php @@ -1453,7 +1453,7 @@ function CriticalRatio2($leader, $power, $intel) { function CriticalRatio3($leader, $power, $intel, $crewtype) { // 무장 무력 : 65 5%, 70 10%, 75 15%, 80 20% // 지장 지력 : 65 5%, 70 8%, 75 10%, 80 13% - //충차장 통솔: 65 5%, 70 10%, 75 15%, 80 20% + //충차장 통솔: 65 5%, 70 8%, 75 10%, 80 13% $crewtype = floor($crwtype/10); @@ -1463,19 +1463,18 @@ function CriticalRatio3($leader, $power, $intel, $crewtype) { else if($crewtype == 4){ //병기 $mainstat = $leader; } - else{ + else{ //무장 $mainstat = $power; } - $mainstat = 0; $ratio = max($mainstat - 65, 0); - if (floor($crewtype/10) == 3) { - $ratio / 2; + if ($crewtype >= 3) { + $ratio /= 2; } + $ratio = round($ratio); $ratio += 5; - $ratio = round($ratio); if($ratio > 50) $ratio = 50; From 82635727c4d665ad5078e9eae550ea49171007aa Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 1 Feb 2018 00:01:10 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=ED=95=84=EC=82=B4=20=ED=99=95=EB=A5=A0=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- che_close/process_war.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/che_close/process_war.php b/che_close/process_war.php index 986e764..7c842fa 100644 --- a/che_close/process_war.php +++ b/che_close/process_war.php @@ -1472,8 +1472,8 @@ function CriticalRatio3($leader, $power, $intel, $crewtype) { if ($crewtype >= 3) { $ratio /= 2; } - $ratio = round($ratio); + $ratio = round($ratio); $ratio += 5; if($ratio > 50) $ratio = 50; From 9680659e83c6fccb42802fd229d5b1e6e7ada028 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 1 Feb 2018 00:08:46 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=EC=9E=84=EA=B4=80,=20=EC=A0=84=EC=9F=81=20?= =?UTF-8?q?=EC=BC=AC/=EB=81=94=20=EB=AC=B4=EC=A0=9C=ED=95=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- che_close/b_dipcenter.php | 34 ++++++++++++++++------------------ che_close/c_dipcenter.php | 8 ++++---- che_close/func.php | 3 +-- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/che_close/b_dipcenter.php b/che_close/b_dipcenter.php index 375e214..4f0af49 100644 --- a/che_close/b_dipcenter.php +++ b/che_close/b_dipcenter.php @@ -172,7 +172,7 @@ echo " "; -$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,myset,scoutmsg,secretlimit from nation where nation='$me[nation]'"; +$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,scoutmsg,secretlimit from nation where nation='$me[nation]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -259,27 +259,25 @@ echo " 기밀 권한 (1 ~ 99년)    name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>년 name=btn value=기밀권한> 임관&전쟁 변경 가능 - 회 + 무제한 0) { - if($nation[scout] == 0) { - echo " - "; - } else { - echo " - "; - } - - if($nation[war] == 0) { - echo " - "; - } else { - echo " - "; - } +if($nation[scout] == 0) { + echo " + "; +} else { + echo " + "; +} + +if($nation[war] == 0) { + echo " + "; +} else { + echo " + "; } ?> diff --git a/che_close/c_dipcenter.php b/che_close/c_dipcenter.php index 278ea4e..1ef35f5 100644 --- a/che_close/c_dipcenter.php +++ b/che_close/c_dipcenter.php @@ -43,16 +43,16 @@ if($btn == "국가방침") { $query = "update nation set secretlimit='$secretlimit' where nation='$me[nation]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "임관 금지") { - $query = "update nation set myset=myset-1,scout='1' where nation='$me[nation]' and myset>0"; + $query = "update nation set scout='1' where nation='$me[nation]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "임관 허가") { - $query = "update nation set myset=myset-1,scout='0' where nation='$me[nation]' and myset>0"; + $query = "update nation set scout='0' where nation='$me[nation]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "전쟁 금지") { - $query = "update nation set myset=myset-1,war='1' where nation='$me[nation]' and myset>0"; + $query = "update nation set war='1' where nation='$me[nation]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "전쟁 허가") { - $query = "update nation set myset=myset-1,war='0' where nation='$me[nation]' and myset>0"; + $query = "update nation set war='0' where nation='$me[nation]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/che_close/func.php b/che_close/func.php index 62f8015..9cd0cb1 100644 --- a/che_close/func.php +++ b/che_close/func.php @@ -5100,8 +5100,7 @@ function updateNationState($connect) { $gennum = $gencount; if($gencount < 10) $gencount = 10; //기술 및 변경횟수 업데이트 - $myset = $nation[level] + 1; - $query = "update nation set tech=totaltech/'$gencount',gennum='$gennum',myset='$myset' where nation='$nation[nation]'"; + $query = "update nation set tech=totaltech/'$gencount',gennum='$gennum' where nation='$nation[nation]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } pushHistory($connect, $history);