From 28ad275382b1f68b0703bfbe8b7c989071e580a9 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 12 Sep 2021 20:03:25 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20maxPhase=20=EC=97=B0=EC=82=B0=EC=97=90?= =?UTF-8?q?=EC=84=9C=EB=8A=94=20oppose=EA=B0=80=20=EC=97=86=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/DummyGeneral.php | 8 ++++++++ hwe/sammo/WarUnitGeneral.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hwe/sammo/DummyGeneral.php b/hwe/sammo/DummyGeneral.php index be35868c..6f1c0901 100644 --- a/hwe/sammo/DummyGeneral.php +++ b/hwe/sammo/DummyGeneral.php @@ -34,6 +34,14 @@ class DummyGeneral extends General{ return new WarUnitTriggerCaller(); } + public function onCalcStat(General $general, string $statName, $value, $aux=null){ + return $value; + } + + public function onCalcOpposeStat(General $general, string $statName, $value, $aux=null){ + return $value; + } + function applyDB($db):bool{ if($this->logger){ $this->initLogger(1, 1); diff --git a/hwe/sammo/WarUnitGeneral.php b/hwe/sammo/WarUnitGeneral.php index b0e8cc7e..800cce28 100644 --- a/hwe/sammo/WarUnitGeneral.php +++ b/hwe/sammo/WarUnitGeneral.php @@ -67,7 +67,7 @@ class WarUnitGeneral extends WarUnit { $phase = $this->getCrewType()->speed; $phase = $this->general->onCalcStat($this->general, 'initWarPhase', $phase, ['isAttacker' => $this->isAttacker]); - $phase = $this->oppose->general->onCalcOpposeStat($this->general, 'initWarPhase', $phase, ['isAttacker' => $this->isAttacker]); + //maxPhase는 상대가 결정되기 전에 계산되므로 oppose를 호출할 수 없음 return $phase + $this->bonusPhase; }