Files
core/hwe/sammo/WarUnitTrigger/전투력보정.php
T
Hide_D 919c44c727 game,feat: 전투력보정 관련 유니크 도구 추가
- 직접 전투력보정을 위한 WarUnitTrigger 추가
2022-02-20 03:08:24 +09:00

24 lines
769 B
PHP

<?php
namespace sammo\WarUnitTrigger;
use sammo\BaseWarUnitTrigger;
use sammo\WarUnitGeneral;
use sammo\WarUnitCity;
use sammo\WarUnit;
use sammo\GameUnitDetail;
use sammo\ObjectTrigger;
class 전투력보정 extends BaseWarUnitTrigger{
protected $priority = ObjectTrigger::PRIORITY_BEGIN;
public function __construct(protected int|float $attackerWarPowerMultiplier, protected int|float $defenderWarPowerMultiplier = 1){
}
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
$self->multiplyWarPowerMultiply($this->attackerWarPowerMultiplier);
$oppose->multiplyWarPowerMultiply($this->defenderWarPowerMultiplier);
$this->processConsumableItem();
return true;
}
}