From 2e2624499284a0268d1b11b4a4fe8865a792b94f Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 20 Feb 2022 15:13:39 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=A0=84=ED=88=AC=EB=A0=A5=EB=B3=B4?= =?UTF-8?q?=EC=A0=95=EC=97=90=20unit=EC=9D=B4=20=EC=A0=9C=EA=B3=B5?= =?UTF-8?q?=EB=90=98=EC=A7=80=20=EC=95=8A=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/ActionItem/che_불굴_상편.php | 2 +- hwe/sammo/ActionItem/che_상성보정_과실주.php | 5 +---- hwe/sammo/WarUnitTrigger/전투력보정.php | 3 ++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/hwe/sammo/ActionItem/che_불굴_상편.php b/hwe/sammo/ActionItem/che_불굴_상편.php index 3be6e233..854553b8 100644 --- a/hwe/sammo/ActionItem/che_불굴_상편.php +++ b/hwe/sammo/ActionItem/che_불굴_상편.php @@ -25,7 +25,7 @@ class che_불굴_상편 extends \sammo\BaseItem $crewRatio = Util::valueFit($crew / ($leadership * 100), 0, 1); return new WarUnitTriggerCaller( - new 전투력보정(1 + 0.5 * (1 - $crewRatio)) + new 전투력보정($unit, 1 + 0.5 * (1 - $crewRatio)) ); } } diff --git a/hwe/sammo/ActionItem/che_상성보정_과실주.php b/hwe/sammo/ActionItem/che_상성보정_과실주.php index da416aad..9ac09829 100644 --- a/hwe/sammo/ActionItem/che_상성보정_과실주.php +++ b/hwe/sammo/ActionItem/che_상성보정_과실주.php @@ -17,15 +17,12 @@ class che_상성보정_과실주 extends \sammo\BaseItem{ public function getBattlePhaseSkillTriggerList(WarUnit $unit): ?WarUnitTriggerCaller { $oppose = $unit->getOppose(); - if($oppose === null){ - return null; - } $attackCoef = $unit->getCrewType()->getAttackCoef($oppose->getCrewType()); if($attackCoef <= 1){ return null; } return new WarUnitTriggerCaller( - new 전투력보정(1.1, 0.9) + new 전투력보정($unit, 1.1, 0.9) ); } } diff --git a/hwe/sammo/WarUnitTrigger/전투력보정.php b/hwe/sammo/WarUnitTrigger/전투력보정.php index b40a85fe..a06931de 100644 --- a/hwe/sammo/WarUnitTrigger/전투력보정.php +++ b/hwe/sammo/WarUnitTrigger/전투력보정.php @@ -10,7 +10,8 @@ use sammo\ObjectTrigger; class 전투력보정 extends BaseWarUnitTrigger{ protected $priority = ObjectTrigger::PRIORITY_BEGIN; - public function __construct(protected int|float $attackerWarPowerMultiplier, protected int|float $defenderWarPowerMultiplier = 1){ + public function __construct(WarUnit $unit, protected int|float $attackerWarPowerMultiplier, protected int|float $defenderWarPowerMultiplier = 1){ + $this->object = $unit; } protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{