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

This commit is contained in:
Hide_D committed 2019-05-12 21:03:21 +09:00
1 parent 5c7522fd1f
commit b6e667a291
28 files changed
+237 -92

No files matched your search

@@ -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;
}
}