From fceda31c11e8ec3185390f2b67f1dab878ee6302 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 8 Jun 2019 02:56:15 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=84=ED=8A=B9=20=EA=B5=AC=ED=98=84=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/ActionSpecialWar/che_격노.php | 9 ++++++ hwe/sammo/ActionSpecialWar/che_의술.php | 8 ++--- hwe/sammo/ActionSpecialWar/che_저격.php | 4 +-- hwe/sammo/WarUnitTrigger/che_격노발동.php | 2 +- hwe/sammo/WarUnitTrigger/che_격노시도.php | 38 +++++++++++++++++++++++ 5 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 hwe/sammo/WarUnitTrigger/che_격노시도.php diff --git a/hwe/sammo/ActionSpecialWar/che_격노.php b/hwe/sammo/ActionSpecialWar/che_격노.php index 588f23af..1bc0d281 100644 --- a/hwe/sammo/ActionSpecialWar/che_격노.php +++ b/hwe/sammo/ActionSpecialWar/che_격노.php @@ -5,6 +5,8 @@ use \sammo\General; use \sammo\SpecialityConst; use \sammo\WarUnit; use sammo\WarUnitTriggerCaller; +use sammo\WarUnitTrigger\che_격노시도; +use sammo\WarUnitTrigger\che_격노발동; class che_격노 implements iAction{ use \sammo\DefaultAction; @@ -20,4 +22,11 @@ class che_격노 implements iAction{ SpecialityConst::STAT_POWER, SpecialityConst::STAT_INTEL ]; + + public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ + return new WarUnitTriggerCaller( + new che_격노시도($unit), + new che_격노발동($unit) + ); + } } \ No newline at end of file diff --git a/hwe/sammo/ActionSpecialWar/che_의술.php b/hwe/sammo/ActionSpecialWar/che_의술.php index 8f1276a8..f05baf08 100644 --- a/hwe/sammo/ActionSpecialWar/che_의술.php +++ b/hwe/sammo/ActionSpecialWar/che_의술.php @@ -27,16 +27,16 @@ class che_의술 implements iAction{ ]; public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{ - return new GeneralTriggerCaller([ + return new GeneralTriggerCaller( new GeneralTrigger\che_도시치료($general) - ]); + ); } public function getBattlePhaseSkillTriggerList(\sammo\WarUnit $unit): ?WarUnitTriggerCaller { - return new WarUnitTriggerCaller([ + return new WarUnitTriggerCaller( new che_전투치료시도($unit), new che_전투치료발동($unit) - ]); + ); } } diff --git a/hwe/sammo/ActionSpecialWar/che_저격.php b/hwe/sammo/ActionSpecialWar/che_저격.php index b56fd170..21b8d211 100644 --- a/hwe/sammo/ActionSpecialWar/che_저격.php +++ b/hwe/sammo/ActionSpecialWar/che_저격.php @@ -24,9 +24,9 @@ class che_저격 implements iAction{ ]; 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) - ]); + ); } } \ No newline at end of file diff --git a/hwe/sammo/WarUnitTrigger/che_격노발동.php b/hwe/sammo/WarUnitTrigger/che_격노발동.php index faa11e6a..d6cc8129 100644 --- a/hwe/sammo/WarUnitTrigger/che_격노발동.php +++ b/hwe/sammo/WarUnitTrigger/che_격노발동.php @@ -12,7 +12,7 @@ class che_격노발동 extends BaseWarUnitTrigger{ protected $priority = ObjectTrigger::PRIORITY_POST + 600; protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{ - if(!$self->hasActivatedSkill('격노') && !$self->hasActivatedSkill('진노')){ + if(!$self->hasActivatedSkill('격노')){ return true; } diff --git a/hwe/sammo/WarUnitTrigger/che_격노시도.php b/hwe/sammo/WarUnitTrigger/che_격노시도.php new file mode 100644 index 00000000..0236373e --- /dev/null +++ b/hwe/sammo/WarUnitTrigger/che_격노시도.php @@ -0,0 +1,38 @@ +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; + } +} \ No newline at end of file