From eead9639a274a0c391a8044fe4d4b1ca60339dd1 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 23 Aug 2018 16:10:49 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EB=8F=84=EC=8B=9C=20=EC=A0=90=EB=A0=B9?= =?UTF-8?q?=EC=8B=9C,=20=EC=8A=B9=EC=88=98,=20=EC=82=AC=EA=B8=B0=EA=B0=80?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=EB=A1=9C=20=EC=98=A4=EB=A5=B4=EB=8A=94=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/process_war.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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, From f9d5d190d5f1e34af6bc790bf2da526daeba8ee2 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 23 Aug 2018 16:21:18 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=EC=9C=A0=EB=8B=88=ED=81=AC=20=ED=9B=88?= =?UTF-8?q?=EB=A0=A8,=EC=82=AC=EA=B8=B0=20=ED=85=9C=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=ED=9B=88=EB=A0=A8,=20=EC=82=AC=EA=B8=B0=EA=B0=80=20=EC=98=81?= =?UTF-8?q?=EA=B5=AC=EC=A0=81=EC=9C=BC=EB=A1=9C=20=EC=98=A4=EB=A5=B4?= =?UTF-8?q?=EB=8A=94=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/WarUnit.php | 8 ++++++++ hwe/sammo/WarUnitGeneral.php | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) 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; }