전투 스킬 세팅 중

This commit is contained in:
2019-05-31 02:28:08 +09:00
parent 17654633dc
commit 7fd8bfbe4e
14 changed files with 280 additions and 0 deletions
@@ -0,0 +1,34 @@
<?php
namespace sammo\WarUnitTrigger;
use sammo\BaseWarUnitTrigger;
use sammo\WarUnitGeneral;
use sammo\WarUnitCity;
use sammo\WarUnit;
use sammo\GameUnitDetail;
use sammo\Util;
use sammo\ObjectTrigger;
class WarActivateSkills extends BaseWarUnitTrigger{
static protected $priority = ObjectTrigger::PRIORITY_INIT;
protected $isSelf;
protected $activeSkills;
public function __construct(WarUnit $unit, int $raiseType, bool $isSelf, string ...$activeSkills){
$this->object = $unit;
$this->raiseType = $raiseType;
$this->isSelf = $isSelf;
$this->activeSkills = $activeSkills;
}
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
if($this->isSelf){
$self->activateSkill(...$this->activeSkills);
}
else{
$oppose->activateSkill(...$this->activeSkills);
}
return true;
}
}