저격 다시 세팅, 아이템 namespace 버그 수정, 전투치료(의술) 구현
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user