diff --git a/hwe/sammo/WarUnit.php b/hwe/sammo/WarUnit.php index 8a53cd71..5730910f 100644 --- a/hwe/sammo/WarUnit.php +++ b/hwe/sammo/WarUnit.php @@ -273,19 +273,16 @@ class WarUnit{ } function addWin(){ - throw new NotInheritedMethodException(); } function addLose(){ - throw new NotInheritedMethodException(); } function finishBattle(){ throw new NotInheritedMethodException(); } - function getCharacter(){ - //TODO: 나머지에 구현 + function getCharacter():int{ return 0; } @@ -356,7 +353,9 @@ class WarUnit{ } function calcDamage():int{ - return $this->getWarPower(); + $warPower = $this->getWarPower(); + $warPower *= Util::randRange(0.9, 1.1); + return Util::round($warPower); } function tryWound():bool{ diff --git a/hwe/sammo/WarUnitCity.php b/hwe/sammo/WarUnitCity.php index f62b6211..f9f6654f 100644 --- a/hwe/sammo/WarUnitCity.php +++ b/hwe/sammo/WarUnitCity.php @@ -41,12 +41,6 @@ class WarUnitCity extends WarUnit{ return $this->raw[$key]; } - function calcDamage():int{ - $warPower = $this->getWarPower(); - $warPower *= Util::randRange(0.9, 1.1); - return Util::round($warPower); - } - function increaseKilled(int $damage):int{ $this->killed += $damage; return $this->killed; @@ -84,13 +78,6 @@ class WarUnitCity extends WarUnit{ return true; } - function addWin(){ - } - - function addLose(){ - //NOTE: 도시 정복은 외부에서 처리함 - } - function heavyDecreseWealth(){ $this->multiplyVar('agri', 0.5); $this->multiplyVar('comm', 0.5); diff --git a/hwe/sammo/WarUnitGeneral.php b/hwe/sammo/WarUnitGeneral.php index a0682b44..c693386e 100644 --- a/hwe/sammo/WarUnitGeneral.php +++ b/hwe/sammo/WarUnitGeneral.php @@ -74,6 +74,10 @@ class WarUnitGeneral extends WarUnit{ return $this->getVar('special2'); } + function getCharacter():int{ + return $this->getVar('personal'); + } + function getItem():int{ return $this->getVar('item'); } @@ -102,10 +106,10 @@ class WarUnitGeneral extends WarUnit{ } function getComputedAtmos(){ - $train = $this->getVar('atmos'); - $train += $this->trainBonus; + $atmos = $this->getVar('atmos'); + $atmos += $this->atmosBonus; - return $train; + return $atmos; } function getComputedCriticalRatio():float{ @@ -491,6 +495,17 @@ class WarUnitGeneral extends WarUnit{ } } + if( + $specialWar == 63 && + $this->getPhase() == 0 && + $this->getHP() >= 1000 && + $this->getComputedAtmos() >= 90 && + $this->getComputedTrain() >= 90 + ){ + $this->activateSkill('위압'); + $activated = true; + } + return $activated; } @@ -618,17 +633,6 @@ class WarUnitGeneral extends WarUnit{ } } - if( - $specialWar == 63 && - $this->getPhase() == 0 && - $this->getHP() >= 1000 && - $this->getComputedAtmos() >= 90 && - $this->getComputedTrain() >= 90 - ){ - $this->activateSkill('위압'); - $activated = true; - } - if( ($item == 23 || $item == 24) && !$this->hasActivatedSkill('치료') &&