수비, 성벽 강화의 성공을 무력 기준으로 올바르게 변경
필살 확률을 주 능력치만 사용하도록 변경 크리티컬 확률 함수 버그 수정. 필살 확률 수정
This commit is contained in:
@@ -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,37 @@ 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 8%, 75 10%, 80 13%
|
||||
|
||||
$crewtype = floor($crwtype/10);
|
||||
|
||||
if($crewtype == 3){ //지장
|
||||
$mainstat = $intel;
|
||||
}
|
||||
else if($crewtype == 4){ //병기
|
||||
$mainstat = $leader;
|
||||
}
|
||||
else{ //무장
|
||||
$mainstat = $power;
|
||||
}
|
||||
|
||||
$ratio = max($mainstat - 65, 0);
|
||||
|
||||
if ($crewtype >= 3) {
|
||||
$ratio /= 2;
|
||||
}
|
||||
|
||||
$ratio = round($ratio);
|
||||
$ratio += 5;
|
||||
|
||||
if($ratio > 50) $ratio = 50;
|
||||
|
||||
return $ratio;
|
||||
}
|
||||
|
||||
function CriticalScore2($score) {
|
||||
$score = round($score * (rand()%8 + 13)/10); // 1.3~2.0
|
||||
return $score;
|
||||
|
||||
Reference in New Issue
Block a user