From a95385c70bc00f93374fda9c4ae7d62b5d6841ab Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 19 Feb 2018 00:57:55 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=84=ED=88=AC=EC=8B=9C=20=EB=AC=B4/?= =?UTF-8?q?=EC=A7=80=EB=A5=BC=20=EA=B0=81=EA=B0=81=201/4=EC=94=A9=20?= =?UTF-8?q?=EB=B0=98=EC=98=81=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- che_close/process_war.php | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/che_close/process_war.php b/che_close/process_war.php index 7c842fa..66917f9 100644 --- a/che_close/process_war.php +++ b/che_close/process_war.php @@ -171,7 +171,7 @@ function processWar($connect, $general, $city) { $avoid = 1; // 병종간 특성 if(floor($general[crewtype]/10) == 3) { // 귀병 - $int = round($general[intel] * (100-$general[injury])/100) + getBookEff($general[book]); + $int = round(getGeneralIntel($general, true, true, true, false)); if($general[crewtype] == 30) { $ratio2 = $int * 5; // 0~500 즉 50% } elseif($general[crewtype] == 31) { @@ -273,7 +273,7 @@ function processWar($connect, $general, $city) { //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio3($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), $general['crewtype']); + $ratio = CriticalRatio3($general); // 특기보정 : 무쌍, 필살 if($general[special2] == 61) { $ratio += 10; } if($general[special2] == 71) { $ratio += 20; } @@ -622,7 +622,7 @@ function processWar($connect, $general, $city) { $opAvoid = 1; // 병종간 특성 if(floor($general[crewtype]/10) == 3) { // 귀병 - $int = round($general[intel] * (100-$general[injury])/100) + getBookEff($general[book]); + $int = round(getGeneralIntel($general, true, true, true, false)); if($general[crewtype] == 30) { $ratio2 = $int * 5; // 0~500 즉 50% } elseif($general[crewtype] == 31) { @@ -763,7 +763,7 @@ function processWar($connect, $general, $city) { // 상대 장수 병종간 특성 if(floor($oppose[crewtype]/10) == 3) { // 귀병 - $int = round($oppose[intel] * (100-$oppose[injury])/100) + getBookEff($oppose[book]); + $int = round(getGeneralIntel($oppose, true, true, true, false)); if($oppose[crewtype] == 30) { $ratio2 = $int * 5; // 0~500 즉 50% } elseif($oppose[crewtype] == 31) { @@ -1030,7 +1030,7 @@ function processWar($connect, $general, $city) { //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio3($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), $general['crewtype']); + $ratio = CriticalRatio3($general); // 특기보정 : 무쌍, 필살 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 = CriticalRatio3($oppose[leader]+getHorseEff($oppose[horse])+$opplbonus, $oppose[power]+getWeapEff($oppose[weap]), $oppose[intel]+getBookEff($oppose[book]), $oppose['crewtype']); + $ratio = CriticalRatio3($oppose); // 특기보정 : 필살 if($oppose[special2] == 71) { $ratio += 20; } if($ratio >= $rd && $opAvoid == 1) { @@ -1450,21 +1450,21 @@ function CriticalRatio2($leader, $power, $intel) { return $ratio; } -function CriticalRatio3($leader, $power, $intel, $crewtype) { +function CriticalRatio3($general) { // 무장 무력 : 65 5%, 70 10%, 75 15%, 80 20% // 지장 지력 : 65 5%, 70 8%, 75 10%, 80 13% //충차장 통솔: 65 5%, 70 8%, 75 10%, 80 13% - $crewtype = floor($crwtype/10); + $crewtype = floor($general['crewtype']/10); if($crewtype == 3){ //지장 - $mainstat = $intel; + $mainstat = getGeneralIntel($general, false, true, true, false); } else if($crewtype == 4){ //병기 - $mainstat = $leader; + $mainstat = getGeneralLeadership($general, false, true, true, false); } else{ //무장 - $mainstat = $power; + $mainstat = getGeneralPower($general, false, true, true, false); } $ratio = max($mainstat - 65, 0); @@ -1509,12 +1509,14 @@ function getCrewtypeRice($game, $crewtype, $tech) { function getAtt($game, $general, $tech, $lbonus) { $att = getRate($game, $general[crewtype], "att") + getTechAbil($tech); + $general['lbonus'] = $lbonus; + if(floor($general[crewtype]/10) == 3) { // 귀병 지100% - $ratio = (floor($general[intel]*(100-$general[injury])/100)+getBookEff($general[book]))*2 - 40; + $ratio = getGeneralIntel($general, true, true, true)*2 - 40; } elseif(floor($general[crewtype]/10) == 4) { // 차병 통100% - $ratio = (floor($general[leader]*(100-$general[injury])/100)+getHorseEff($general[horse])+$lbonus)*2 - 40; + $ratio = getGeneralLeadership($general, true, true, true)*2 - 40; } else { - $ratio = (floor($general[power]*(100-$general[injury])/100)+getWeapEff($general[weap]))*2 - 40; //10일때 -20, 70일때 100, 100일때 160 + $ratio = getGeneralPower($general, true, true, true)*2 - 40; //10일때 -20, 70일때 100, 100일때 160 } if($ratio < 10) { $ratio = 10; } if($ratio > 100) { $ratio = 50 + $ratio/2; } // 100보다 큰 경우는 상승률 1/2