전투 이벤트 갱신

This commit is contained in:
2019-06-05 01:36:57 +09:00
parent 4fdcc0221d
commit 22b57f39ef
11 changed files with 214 additions and 4 deletions
@@ -0,0 +1,33 @@
<?php
namespace sammo\WarUnitTrigger;
use sammo\BaseWarUnitTrigger;
use sammo\WarUnitGeneral;
use sammo\WarUnitCity;
use sammo\WarUnit;
use sammo\GameUnitDetail;
use sammo\ObjectTrigger;
class che_필살시도 extends BaseWarUnitTrigger{
static protected $priority = ObjectTrigger::PRIORITY_PRE + 100;
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
if(!($self instanceof WarUnitGeneral)){
return true;
}
if($self->hasActivatedSkill('특수')){
return true;
}
if($self->hasActivatedSkill('필살불가')){
return true;
}
if(!Util::randBool($self->getComputedCriticalRatio())){
return true;
}
$this->activateSkill('특수', '필살시도', '필살');
return true;
}
}