diff --git a/hwe/process_war.php b/hwe/process_war.php index 23aee66d..993e3d20 100644 --- a/hwe/process_war.php +++ b/hwe/process_war.php @@ -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[] = "●{$year}년 {$month}월:【분쟁협상】{$conquerNationArray['name']}{$josaYi} 영토분쟁에서 우위를 점하여 {$city['name']}{$josaUl} 양도받았습니다."; pushNationHistory($nation, "●{$year}년 {$month}월:{$city['name']}{$josaUl} {$conquerNationArray['name']}양도"); pushNationHistory($conquerNationArray, "●{$year}년 {$month}월:{$nation['name']}에서 {$city['name']}{$josaUl} 양도 받음"); - // 이동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, diff --git a/hwe/sammo/WarUnit.php b/hwe/sammo/WarUnit.php index 5e9f78cf..91d2b422 100644 --- a/hwe/sammo/WarUnit.php +++ b/hwe/sammo/WarUnit.php @@ -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; } diff --git a/hwe/sammo/WarUnitGeneral.php b/hwe/sammo/WarUnitGeneral.php index b39dbcc2..d94540a2 100644 --- a/hwe/sammo/WarUnitGeneral.php +++ b/hwe/sammo/WarUnitGeneral.php @@ -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; }