수극을 통한 저격 예시

This commit is contained in:
2019-04-29 02:04:45 +09:00
parent 17a59cbdd5
commit 00a6e9798f
8 changed files with 172 additions and 34 deletions
@@ -0,0 +1,32 @@
<?php
namespace sammo\WarInitTrigger;
use sammo\BaseWarUnitTrigger;
use sammo\WarUnitGeneral;
use sammo\WarUnitCity;
use sammo\WarUnit;
use sammo\GameUnitDetail;
use sammo\Util;
class che_저격발동 extends BaseWarUnitTrigger{
static protected $priority = 20000;
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):void{
if(!$oppose->hasActivatedSkill('저격')){
return;
}
if($selfEnv['저격발동']){
return;
}
$selfEnv['저격발동'] = true;
$general = $self->general;
$oppose->getLogger()->pushGeneralActionLog("상대를 <C>저격</>했다!", ActionLogger::PLAIN);
$oppose->getLogger()->pushGeneralBattleDetailLog("상대를 <C>저격</>했다!", ActionLogger::PLAIN);
$self->getLogger()->pushGeneralActionLog("상대에게 <R>저격</>당했다!", ActionLogger::PLAIN);
$self->getLogger()->pushGeneralBattleDetailLog("상대에게 <R>저격</>당했다!", ActionLogger::PLAIN);
$general->increaseVarWithLimit('injury', Util::randRangeInt($opposeEnv['woundMin'], $opposeEnv['woundMax']), null, 80);
}
}