전특 구현 완료
This commit is contained in:
@@ -5,6 +5,8 @@ use \sammo\General;
|
|||||||
use \sammo\SpecialityConst;
|
use \sammo\SpecialityConst;
|
||||||
use \sammo\WarUnit;
|
use \sammo\WarUnit;
|
||||||
use sammo\WarUnitTriggerCaller;
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
use sammo\WarUnitTrigger\che_격노시도;
|
||||||
|
use sammo\WarUnitTrigger\che_격노발동;
|
||||||
|
|
||||||
class che_격노 implements iAction{
|
class che_격노 implements iAction{
|
||||||
use \sammo\DefaultAction;
|
use \sammo\DefaultAction;
|
||||||
@@ -20,4 +22,11 @@ class che_격노 implements iAction{
|
|||||||
SpecialityConst::STAT_POWER,
|
SpecialityConst::STAT_POWER,
|
||||||
SpecialityConst::STAT_INTEL
|
SpecialityConst::STAT_INTEL
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_격노시도($unit),
|
||||||
|
new che_격노발동($unit)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -27,16 +27,16 @@ class che_의술 implements iAction{
|
|||||||
];
|
];
|
||||||
|
|
||||||
public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{
|
public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{
|
||||||
return new GeneralTriggerCaller([
|
return new GeneralTriggerCaller(
|
||||||
new GeneralTrigger\che_도시치료($general)
|
new GeneralTrigger\che_도시치료($general)
|
||||||
]);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBattlePhaseSkillTriggerList(\sammo\WarUnit $unit): ?WarUnitTriggerCaller
|
public function getBattlePhaseSkillTriggerList(\sammo\WarUnit $unit): ?WarUnitTriggerCaller
|
||||||
{
|
{
|
||||||
return new WarUnitTriggerCaller([
|
return new WarUnitTriggerCaller(
|
||||||
new che_전투치료시도($unit),
|
new che_전투치료시도($unit),
|
||||||
new che_전투치료발동($unit)
|
new che_전투치료발동($unit)
|
||||||
]);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ class che_저격 implements iAction{
|
|||||||
];
|
];
|
||||||
|
|
||||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
return new WarUnitTriggerCaller([
|
return new WarUnitTriggerCaller(
|
||||||
new che_저격시도($unit, che_저격시도::TYPE_NONE, 1/3, 20, 60),
|
new che_저격시도($unit, che_저격시도::TYPE_NONE, 1/3, 20, 60),
|
||||||
new che_저격발동($unit)
|
new che_저격발동($unit)
|
||||||
]);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ class che_격노발동 extends BaseWarUnitTrigger{
|
|||||||
protected $priority = ObjectTrigger::PRIORITY_POST + 600;
|
protected $priority = ObjectTrigger::PRIORITY_POST + 600;
|
||||||
|
|
||||||
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(!$self->hasActivatedSkill('격노') && !$self->hasActivatedSkill('진노')){
|
if(!$self->hasActivatedSkill('격노')){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?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_POST + 300;
|
||||||
|
|
||||||
|
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||||
|
if(!$oppose->hasActivatedSkill('필살') && !$oppose->hasActivatedSkill('회피')){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if($self->hasActivatedSkill('격노불가')){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($self->isAttacker()){
|
||||||
|
if(Util::randBool(1/3)){
|
||||||
|
$self->activateSkill('진노', '격노');
|
||||||
|
}
|
||||||
|
else if(Util::randBool(1/4)){
|
||||||
|
$self->activateSkill('격노');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(Util::randBool(1/2)){
|
||||||
|
$self->activateSkill('격노');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user