diff --git a/hwe/process_war.php b/hwe/process_war.php index fb22ae75..1e8a9ebd 100644 --- a/hwe/process_war.php +++ b/hwe/process_war.php @@ -482,8 +482,8 @@ function processWar_NG( if($city->getDead() || $defender instanceof WarUnitCity){ if($city !== $defender){ - $city->finishBattle(); $city->setSiege(); + $city->finishBattle(); } $newConflict = $city->addConflict(); diff --git a/hwe/sammo/WarUnitCity.php b/hwe/sammo/WarUnitCity.php index ff688e84..bde33d41 100644 --- a/hwe/sammo/WarUnitCity.php +++ b/hwe/sammo/WarUnitCity.php @@ -84,6 +84,7 @@ class WarUnitCity extends WarUnit{ $this->currPhase = 0; $this->prePhase = 0; $this->bonusPhase = 0; + $this->isFinished = false; /** @var DummyGeneral $general */ $general = $this->general; $general->setCrewType(null); @@ -131,15 +132,15 @@ class WarUnitCity extends WarUnit{ } function finishBattle(){ - if($this->isFinished || !$this->onSiege){ - return; - } $this->clearActivatedSkill(); $this->isFinished = true; $this->updateVar('def', Util::round($this->getHP() / 10)); $this->updateVar('wall', Util::round($this->getVar('wall'))); + if($this->isFinished || !$this->onSiege){ + return; + } //NOTE: 전투로 인한 사망자는 여기서 처리하지 않음 $decWealth = $this->getKilled() / 20;