저격 다시 세팅, 아이템 namespace 버그 수정, 전투치료(의술) 구현

This commit is contained in:
2019-05-12 21:03:21 +09:00
parent 3386d2f637
commit 08373b76a2
28 changed files with 237 additions and 92 deletions
@@ -0,0 +1,30 @@
<?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 + 200;
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
if($self->hasActivatedSkill('치료')){
return true;
}
if($self->hasActivatedSkill('치료불가')){
return true;
}
if(!Util::randBool(1/5)){
return true;
}
$this->activateSkill('치료');
return true;
}
}