Merge branch 'devel' into battle_simulator
This commit is contained in:
+2
-10
@@ -637,14 +637,11 @@ function ConquerCity($admin, $general, $city, $nation, $destnation) {
|
||||
}
|
||||
}
|
||||
|
||||
$general['atmos'] *= 1.1; //사기 증가
|
||||
if($general['atmos'] > GameConst::$maxAtmosByWar) { $general['atmos'] = GameConst::$maxAtmosByWar; }
|
||||
|
||||
$conquerNation = getConquerNation($city);
|
||||
|
||||
if($conquerNation == $general['nation']) {
|
||||
// 이동 및 사기 변경
|
||||
$query = "update general set city='{$city['city']}',atmos='{$general['atmos']}',killnum=killnum+1 where no='{$general['no']}'";
|
||||
// 이동
|
||||
$query = "update general set city='{$city['city']}' where no='{$general['no']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
if($city['level'] > 3) {
|
||||
// 도시 소속 변경, 태수,군사,시중 초기화
|
||||
@@ -662,17 +659,12 @@ function ConquerCity($admin, $general, $city, $nation, $destnation) {
|
||||
$query = "select name,nation from nation where nation='$conquerNation'";
|
||||
$conquerResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$conquerNationArray = MYDB_fetch_array($conquerResult);
|
||||
|
||||
|
||||
|
||||
$josaUl = JosaUtil::pick($city['name'], '을');
|
||||
$josaYi = JosaUtil::pick($conquerNationArray['name'], '이');
|
||||
$history[] = "<C>●</>{$year}년 {$month}월:<Y><b>【분쟁협상】</b></><D><b>{$conquerNationArray['name']}</b></>{$josaYi} 영토분쟁에서 우위를 점하여 <G><b>{$city['name']}</b></>{$josaUl} 양도받았습니다.";
|
||||
pushNationHistory($nation, "<C>●</>{$year}년 {$month}월:<G><b>{$city['name']}</b></>{$josaUl} <D><b>{$conquerNationArray['name']}</b></>에 <Y>양도</>");
|
||||
pushNationHistory($conquerNationArray, "<C>●</>{$year}년 {$month}월:<D><b>{$nation['name']}</b></>에서 <G><b>{$city['name']}</b></>{$josaUl} <S>양도</> 받음");
|
||||
// 이동X 및 사기 변경
|
||||
$query = "update general set atmos='{$general['atmos']}',killnum=killnum+1 where no='{$general['no']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
$query = [
|
||||
'supply'=>1,
|
||||
|
||||
@@ -269,6 +269,14 @@ class WarUnit{
|
||||
return;
|
||||
}
|
||||
|
||||
function addTrainBonus(int $trainBonus){
|
||||
$this->trainBonus += $trainBonus;
|
||||
}
|
||||
|
||||
function addAtmosBonus(int $atmosBonus){
|
||||
$this->atmosBonus += $atmosBonus;
|
||||
}
|
||||
|
||||
function getComputedTrain(){
|
||||
return GameConst::$maxTrainByCommand;
|
||||
}
|
||||
|
||||
@@ -311,12 +311,12 @@ class WarUnitGeneral extends WarUnit{
|
||||
}
|
||||
else if($item >= 14 && $item <= 16){
|
||||
//의적주, 두강주, 보령압주 사용
|
||||
$this->addAtmos(5);
|
||||
$this->addAtmosBonus(5);
|
||||
$itemActivated = true;
|
||||
}
|
||||
else if($item >= 19 && $item <= 20){
|
||||
//춘화첩, 초선화 사용
|
||||
$this->addAtmos(7);
|
||||
$this->addAtmosBonus(7);
|
||||
$itemActivated = true;
|
||||
}
|
||||
else if($item == 4){
|
||||
@@ -327,12 +327,12 @@ class WarUnitGeneral extends WarUnit{
|
||||
}
|
||||
else if($item >= 12 && $item <= 13){
|
||||
//과실주, 이강주 사용
|
||||
$this->addTrain(5);
|
||||
$this->addTrainBonus(5);
|
||||
$itemActivated = true;
|
||||
}
|
||||
else if($item >= 18 && $item <= 18){
|
||||
//철벽서, 단결도 사용
|
||||
$this->addTrain(7);
|
||||
$this->addTrainBonus(7);
|
||||
$itemActivated = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user