저격 버그 수정, 필살 강화

This commit is contained in:
2020-04-30 05:07:52 +09:00
parent 15e1ba7c05
commit 46dece1b50
3 changed files with 39 additions and 7 deletions
+11 -1
View File
@@ -4,12 +4,16 @@ use \sammo\iAction;
use \sammo\General; use \sammo\General;
use \sammo\SpecialityHelper; use \sammo\SpecialityHelper;
use \sammo\WarUnit; use \sammo\WarUnit;
use sammo\WarUnitTriggerCaller;
use sammo\WarUnitTrigger\che_필살강화_회피불가;
use function sammo\LogText;
class che_필살 extends \sammo\BaseSpecial{ class che_필살 extends \sammo\BaseSpecial{
protected $id = 71; protected $id = 71;
protected $name = '필살'; protected $name = '필살';
protected $info = '[전투] 필살 확률 +20%p'; protected $info = '[전투] 필살 확률 +20%p, 필살 발동시 대상 회피 불가';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -25,4 +29,10 @@ class che_필살 extends \sammo\BaseSpecial{
} }
return $value; return $value;
} }
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller(
new che_필살강화_회피불가($unit)
);
}
} }
@@ -14,7 +14,7 @@ class che_저격발동 extends BaseWarUnitTrigger{
protected $priority = ObjectTrigger::PRIORITY_POST + 100; protected $priority = ObjectTrigger::PRIORITY_POST + 100;
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{ protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
if(!$oppose->hasActivatedSkill('저격')){ if(!$self->hasActivatedSkill('저격')){
return true; return true;
} }
@@ -25,13 +25,13 @@ class che_저격발동 extends BaseWarUnitTrigger{
$general = $self->getGeneral(); $general = $self->getGeneral();
$oppose->getLogger()->pushGeneralActionLog("상대를 <C>저격</>했다!", ActionLogger::PLAIN); $self->getLogger()->pushGeneralActionLog("상대를 <C>저격</>했다!", ActionLogger::PLAIN);
$oppose->getLogger()->pushGeneralBattleDetailLog("상대를 <C>저격</>했다!", ActionLogger::PLAIN); $self->getLogger()->pushGeneralBattleDetailLog("상대를 <C>저격</>했다!", ActionLogger::PLAIN);
$self->getLogger()->pushGeneralActionLog("상대에게 <R>저격</>당했다!", ActionLogger::PLAIN); $oppose->getLogger()->pushGeneralActionLog("상대에게 <R>저격</>당했다!", ActionLogger::PLAIN);
$self->getLogger()->pushGeneralBattleDetailLog("상대에게 <R>저격</>당했다!", ActionLogger::PLAIN); $oppose->getLogger()->pushGeneralBattleDetailLog("상대에게 <R>저격</>당했다!", ActionLogger::PLAIN);
$general->increaseVarWithLimit('atmos', 10, GameConst::$maxAtmosByWar); $general->increaseVarWithLimit('atmos', 10, GameConst::$maxAtmosByWar);
$general->increaseVarWithLimit('injury', Util::randRangeInt($opposeEnv['woundMin'], $opposeEnv['woundMax']), null, 80); $oppose->getGeneral()->increaseVarWithLimit('injury', Util::randRangeInt($selfEnv['woundMin'], $selfEnv['woundMax']), null, 80);
$this->processConsumableItem(); $this->processConsumableItem();
@@ -0,0 +1,22 @@
<?php
namespace sammo\WarUnitTrigger;
use sammo\BaseWarUnitTrigger;
use sammo\WarUnitGeneral;
use sammo\WarUnitCity;
use sammo\WarUnit;
use sammo\GameUnitDetail;
use sammo\ObjectTrigger;
use sammo\Util;
class che_필살강화_회피불가 extends BaseWarUnitTrigger{
protected $priority = ObjectTrigger::PRIORITY_PRE + 150;
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
if(!$self->hasActivatedSkill('필살')){
return true;
}
$oppose->activateSkill('회피불가');
return true;
}
}