전투 공식을 새로 ㅈ가성한 GameUnitConst와 GameUnitDetail을 따르도록 수정
This commit is contained in:
+6
-6
@@ -16,7 +16,7 @@ function processWar($connect, $general, $city) {
|
|||||||
$deadAmount['att'] = 0;
|
$deadAmount['att'] = 0;
|
||||||
$deadAmount['def'] = 0;
|
$deadAmount['def'] = 0;
|
||||||
|
|
||||||
$warphase = getRate($game, $general['crewtype'], "spd"); //병종간 페이즈 수 얻기
|
$warphase = GameConst::byID($general['crewtype'])->speed; //병종간 페이즈 수 얻기
|
||||||
|
|
||||||
// 특기보정 : 돌격
|
// 특기보정 : 돌격
|
||||||
if($general['special2'] == 60) { $warphase += 1; }
|
if($general['special2'] == 60) { $warphase += 1; }
|
||||||
@@ -291,7 +291,7 @@ function processWar($connect, $general, $city) {
|
|||||||
}
|
}
|
||||||
//회피
|
//회피
|
||||||
$ratio = rand() % 100; // 0 ~ 99
|
$ratio = rand() % 100; // 0 ~ 99
|
||||||
$ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율
|
$ratio2 = GameConst::byID($general['crewtype'])->avoid; //회피율
|
||||||
//특기보정 : 궁병
|
//특기보정 : 궁병
|
||||||
if($general['special2'] == 51) { $ratio2 += 20; }
|
if($general['special2'] == 51) { $ratio2 += 20; }
|
||||||
//도구 보정 : 둔갑천서, 태평요술
|
//도구 보정 : 둔갑천서, 태평요술
|
||||||
@@ -1115,7 +1115,7 @@ function processWar($connect, $general, $city) {
|
|||||||
|
|
||||||
//회피
|
//회피
|
||||||
$ratio = rand() % 100; // 0 ~ 99
|
$ratio = rand() % 100; // 0 ~ 99
|
||||||
$ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율
|
$ratio2 = GameConst::byID($general['crewtype'])->avoid; //회피율
|
||||||
//특기보정 : 돌격, 궁병
|
//특기보정 : 돌격, 궁병
|
||||||
if($oppose['special2'] == 60) { $ratio2 -= 100; }
|
if($oppose['special2'] == 60) { $ratio2 -= 100; }
|
||||||
if($general['special2'] == 51) { $ratio2 += 20; }
|
if($general['special2'] == 51) { $ratio2 += 20; }
|
||||||
@@ -1137,7 +1137,7 @@ function processWar($connect, $general, $city) {
|
|||||||
}
|
}
|
||||||
//회피
|
//회피
|
||||||
$ratio = rand() % 100; // 0 ~ 99
|
$ratio = rand() % 100; // 0 ~ 99
|
||||||
$ratio2 = getRate($game, $oppose['crewtype'], "avd"); //회피율
|
$ratio2 = GameConst::byID($oppose['crewtype'])->defence; //회피율
|
||||||
// 특기보정 : 돌격, 궁병
|
// 특기보정 : 돌격, 궁병
|
||||||
if($general['special2'] == 60) { $ratio2 -= 100; }
|
if($general['special2'] == 60) { $ratio2 -= 100; }
|
||||||
if($oppose['special2'] == 51) { $ratio2 += 20; }
|
if($oppose['special2'] == 51) { $ratio2 += 20; }
|
||||||
@@ -1545,7 +1545,7 @@ function getCrewtypeRice($game, $crewtype, $tech) {
|
|||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
function getAtt($game, $general, $tech, $lbonus) {
|
function getAtt($game, $general, $tech, $lbonus) {
|
||||||
$att = getRate($game, $general['crewtype'], "att") + getTechAbil($tech);
|
$att = GameConst::byID($general['crewtype'])->attack + getTechAbil($tech);
|
||||||
|
|
||||||
$general['lbonus'] = $lbonus;
|
$general['lbonus'] = $lbonus;
|
||||||
|
|
||||||
@@ -1564,7 +1564,7 @@ function getAtt($game, $general, $tech, $lbonus) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getDef($game, $general, $tech) {
|
function getDef($game, $general, $tech) {
|
||||||
$def = getRate($game, $general['crewtype'], "def") + getTechAbil($tech);
|
$def = GameConst::byID($general['crewtype'])->defence + getTechAbil($tech);
|
||||||
|
|
||||||
$crew = ($general['crew'] / (7000 / 30)) + 70; // 5000명일때 91점 7000명일때 100점 10000명일때 113점
|
$crew = ($general['crew'] / (7000 / 30)) + 70; // 5000명일때 91점 7000명일때 100점 10000명일때 113점
|
||||||
$def = $def * $crew / 100;
|
$def = $def * $crew / 100;
|
||||||
|
|||||||
+16
-16
@@ -388,10 +388,10 @@ function calc(cost, formnum) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$name = $this->name;
|
$name = $this->name;
|
||||||
$att = $this->attack + $abil;
|
$attack = $this->attack + $abil;
|
||||||
$def = $this->defence + $abil;
|
$defence = $this->defence + $abil;
|
||||||
$spd = $this->speed;
|
$speed = $this->speed;
|
||||||
$avd = $this->avoid;
|
$avoid = $this->avoid;
|
||||||
$weapImage = "{$images}/weap{$i}.jpg";
|
$weapImage = "{$images}/weap{$i}.jpg";
|
||||||
if($admin['show_img_level'] < 2) { $weapImage = "{$image}/default.jpg"; }
|
if($admin['show_img_level'] < 2) { $weapImage = "{$image}/default.jpg"; }
|
||||||
|
|
||||||
@@ -404,10 +404,10 @@ function calc(cost, formnum) {
|
|||||||
<tr height=64 bgcolor=$l>
|
<tr height=64 bgcolor=$l>
|
||||||
<td background={$weapImage} align=center></td>
|
<td background={$weapImage} align=center></td>
|
||||||
<td align=center>{$name}</td>
|
<td align=center>{$name}</td>
|
||||||
<td align=center>{$att}</td>
|
<td align=center>{$attack}</td>
|
||||||
<td align=center>{$def}</td>
|
<td align=center>{$defence}</td>
|
||||||
<td align=center>{$spd}</td>
|
<td align=center>{$speed}</td>
|
||||||
<td align=center>{$avd}</td>
|
<td align=center>{$avoid}</td>
|
||||||
<td align=center>{$baseRiceShort}</td>
|
<td align=center>{$baseRiceShort}</td>
|
||||||
<td align=center>{$baseCostShort}</td>
|
<td align=center>{$baseCostShort}</td>
|
||||||
<form name=form{$i} action=c_double.php>
|
<form name=form{$i} action=c_double.php>
|
||||||
@@ -595,10 +595,10 @@ function calc(cost, formnum) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$name = $this->name;
|
$name = $this->name;
|
||||||
$att = $this->attack + $abil;
|
$attack = $this->attack + $abil;
|
||||||
$def = $this->defence + $abil;
|
$defence = $this->defence + $abil;
|
||||||
$spd = $this->speed;
|
$speed = $this->speed;
|
||||||
$avd = $this->avoid;
|
$avoid = $this->avoid;
|
||||||
$weapImage = "{$images}/weap{$i}.jpg";
|
$weapImage = "{$images}/weap{$i}.jpg";
|
||||||
if($admin['show_img_level'] < 2) { $weapImage = "{$image}/default.jpg"; }
|
if($admin['show_img_level'] < 2) { $weapImage = "{$image}/default.jpg"; }
|
||||||
|
|
||||||
@@ -611,10 +611,10 @@ function calc(cost, formnum) {
|
|||||||
<tr height=64 bgcolor=$l>
|
<tr height=64 bgcolor=$l>
|
||||||
<td background={$weapImage} align=center></td>
|
<td background={$weapImage} align=center></td>
|
||||||
<td align=center>{$name}</td>
|
<td align=center>{$name}</td>
|
||||||
<td align=center>{$att}</td>
|
<td align=center>{$attack}</td>
|
||||||
<td align=center>{$def}</td>
|
<td align=center>{$defence}</td>
|
||||||
<td align=center>{$spd}</td>
|
<td align=center>{$speed}</td>
|
||||||
<td align=center>{$avd}</td>
|
<td align=center>{$avoid}</td>
|
||||||
<td align=center>{$baseRiceShort}</td>
|
<td align=center>{$baseRiceShort}</td>
|
||||||
<td align=center>{$baseCostShort}</td>
|
<td align=center>{$baseCostShort}</td>
|
||||||
<form name=form{$i} action=c_double.php>
|
<form name=form{$i} action=c_double.php>
|
||||||
|
|||||||
Reference in New Issue
Block a user