fix: 성벽 전투 반영

This commit is contained in:
2023-05-20 03:37:09 +09:00
parent 7f9ad8b7d5
commit 5554ac3003
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -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();
+4 -3
View File
@@ -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;