From 44b9ba96c38c5bb6598437a3da7b5dc8986a3f61 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 5 Jun 2019 01:36:57 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=84=ED=88=AC=20=EC=9D=B4=EB=B2=A4?= =?UTF-8?q?=ED=8A=B8=20=EA=B0=B1=EC=8B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/WarUnitTrigger/che_격노발동.php | 33 +++++++++++++++++++ hwe/sammo/WarUnitTrigger/che_계략시도.php | 2 +- hwe/sammo/WarUnitTrigger/che_계략실패.php | 2 +- hwe/sammo/WarUnitTrigger/che_반계발동.php | 33 +++++++++++++++++++ hwe/sammo/WarUnitTrigger/che_반계시도.php | 29 ++++++++++++++++ hwe/sammo/WarUnitTrigger/che_위압발동.php | 25 ++++++++++++++ hwe/sammo/WarUnitTrigger/che_전투치료발동.php | 2 +- hwe/sammo/WarUnitTrigger/che_전투치료시도.php | 2 +- hwe/sammo/WarUnitTrigger/che_필살발동.php | 31 +++++++++++++++++ hwe/sammo/WarUnitTrigger/che_필살시도.php | 33 +++++++++++++++++++ hwe/sammo/WarUnitTrigger/che_회피발동.php | 26 +++++++++++++++ 11 files changed, 214 insertions(+), 4 deletions(-) create mode 100644 hwe/sammo/WarUnitTrigger/che_격노발동.php create mode 100644 hwe/sammo/WarUnitTrigger/che_반계발동.php create mode 100644 hwe/sammo/WarUnitTrigger/che_반계시도.php create mode 100644 hwe/sammo/WarUnitTrigger/che_위압발동.php create mode 100644 hwe/sammo/WarUnitTrigger/che_필살발동.php create mode 100644 hwe/sammo/WarUnitTrigger/che_필살시도.php create mode 100644 hwe/sammo/WarUnitTrigger/che_회피발동.php diff --git a/hwe/sammo/WarUnitTrigger/che_격노발동.php b/hwe/sammo/WarUnitTrigger/che_격노발동.php new file mode 100644 index 00000000..269560fe --- /dev/null +++ b/hwe/sammo/WarUnitTrigger/che_격노발동.php @@ -0,0 +1,33 @@ +hasActivatedSkill('격노') && !$self->hasActivatedSkill('진노')){ + return true; + } + + $targetAct = $oppose->hasActivatedSkill('필살')?'필살 공격':'회피 시도'; + $is진노 = $self->hasActivatedSkill('진노'); + $reaction = $is진노?'진노':'격노'; + + $self->getLogger()->pushGeneralBattleDetailLog("상대의 {$targetAct}에 {$reaction}했다!", ActionLogger::PLAIN); + $oppose->getLogger()->pushGeneralBattleDetailLog("{$targetAct}에 상대가 {$reaction}했다!", ActionLogger::PLAIN); + + if($is진노){ + $self->bonusPhase += 1; + } + $self->multiplyWarPowerMultiply($self->criticalDamage()); + + return true; + } +} \ No newline at end of file diff --git a/hwe/sammo/WarUnitTrigger/che_계략시도.php b/hwe/sammo/WarUnitTrigger/che_계략시도.php index 5fec9b26..cf7357ae 100644 --- a/hwe/sammo/WarUnitTrigger/che_계략시도.php +++ b/hwe/sammo/WarUnitTrigger/che_계략시도.php @@ -8,7 +8,7 @@ use sammo\GameUnitDetail; use sammo\ObjectTrigger; class che_계략시도 extends BaseWarUnitTrigger{ - static protected $priority = ObjectTrigger::PRIORITY_PRE + 300; //최 우선 순위 + static protected $priority = ObjectTrigger::PRIORITY_PRE + 300; static protected $tableToGeneral = [ '위보'=>[1.2, 1.1], diff --git a/hwe/sammo/WarUnitTrigger/che_계략실패.php b/hwe/sammo/WarUnitTrigger/che_계략실패.php index 506e6e62..f33dab8b 100644 --- a/hwe/sammo/WarUnitTrigger/che_계략실패.php +++ b/hwe/sammo/WarUnitTrigger/che_계략실패.php @@ -9,7 +9,7 @@ use sammo\Util; use sammo\ObjectTrigger; class che_계략실패 extends BaseWarUnitTrigger{ - static protected $priority = ObjectTrigger::PRIORITY_POST + 300; + static protected $priority = ObjectTrigger::PRIORITY_POST + 200; protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{ if(!$self->hasActivatedSkill('계략실패')){ diff --git a/hwe/sammo/WarUnitTrigger/che_반계발동.php b/hwe/sammo/WarUnitTrigger/che_반계발동.php new file mode 100644 index 00000000..598ad724 --- /dev/null +++ b/hwe/sammo/WarUnitTrigger/che_반계발동.php @@ -0,0 +1,33 @@ +hasActivatedSkill('반계')){ + return true; + } + + $general = $self->getGeneral(); + + [$opposeMagic, $damage] = $opposeEnv['magic'][0]; + + + $josaUl = \sammo\JosaUtil::pick($opposeMagic, '을'); + + $general->pushGeneralBattleDetailLog("반계로 상대의 {$opposeMagic}{$josaUl} 되돌렸다!", ActionLogger::PLAIN); + $oppose->getLogger()->pushGeneralBattleDetailLog("{$opposeMagic}{$josaUl} 역으로 당했다!", ActionLogger::PLAIN); + + $self->multiplyWarPowerMultiply($damage); + + return true; + } +} \ No newline at end of file diff --git a/hwe/sammo/WarUnitTrigger/che_반계시도.php b/hwe/sammo/WarUnitTrigger/che_반계시도.php new file mode 100644 index 00000000..afc0e5e0 --- /dev/null +++ b/hwe/sammo/WarUnitTrigger/che_반계시도.php @@ -0,0 +1,29 @@ +hasActivatedSkill('계략')){ + return true; + } + + if(!Util::randBool(0.4)){ + return true; + } + + assert(key_exists('magic', $opposeEnv)); + + $self->activateSkill('반계'); + $oppose->deactivateSkill('계략'); + + return true; + } +} \ No newline at end of file diff --git a/hwe/sammo/WarUnitTrigger/che_위압발동.php b/hwe/sammo/WarUnitTrigger/che_위압발동.php new file mode 100644 index 00000000..54397176 --- /dev/null +++ b/hwe/sammo/WarUnitTrigger/che_위압발동.php @@ -0,0 +1,25 @@ +hasActivatedSkill('위압')){ + return true; + } + + $oppose->getLogger()->pushGeneralBattleDetailLog('상대에게 위압받았다!', ActionLogger::PLAIN); + $self->getLogger()->pushGeneralBattleDetailLog('상대에게 위압을 줬다!', ActionLogger::PLAIN); + $oppose->setWarPowerMultiply(0); + + return true; + } +} \ No newline at end of file diff --git a/hwe/sammo/WarUnitTrigger/che_전투치료발동.php b/hwe/sammo/WarUnitTrigger/che_전투치료발동.php index afd77138..662f2592 100644 --- a/hwe/sammo/WarUnitTrigger/che_전투치료발동.php +++ b/hwe/sammo/WarUnitTrigger/che_전투치료발동.php @@ -9,7 +9,7 @@ use sammo\Util; use sammo\ObjectTrigger; class che_전투치료발동 extends BaseWarUnitTrigger{ - static protected $priority = ObjectTrigger::PRIORITY_POST + 200; + static protected $priority = ObjectTrigger::PRIORITY_POST + 300; protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{ if(!$self->hasActivatedSkill('치료')){ diff --git a/hwe/sammo/WarUnitTrigger/che_전투치료시도.php b/hwe/sammo/WarUnitTrigger/che_전투치료시도.php index 81a83f70..b0b469ca 100644 --- a/hwe/sammo/WarUnitTrigger/che_전투치료시도.php +++ b/hwe/sammo/WarUnitTrigger/che_전투치료시도.php @@ -8,7 +8,7 @@ use sammo\GameUnitDetail; use sammo\ObjectTrigger; class che_전투치료시도 extends BaseWarUnitTrigger{ - static protected $priority = ObjectTrigger::PRIORITY_PRE + 200; + static protected $priority = ObjectTrigger::PRIORITY_PRE + 300; protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{ assert($self instanceof WarUnitGeneral, 'General만 발동 가능'); diff --git a/hwe/sammo/WarUnitTrigger/che_필살발동.php b/hwe/sammo/WarUnitTrigger/che_필살발동.php new file mode 100644 index 00000000..94fe0f60 --- /dev/null +++ b/hwe/sammo/WarUnitTrigger/che_필살발동.php @@ -0,0 +1,31 @@ +hasActivatedSkill('필살')){ + return true; + } + + if($selfEnv['필살발동']??false){ + return true; + } + $selfEnv['필살발동'] = true; + + $oppose->getLogger()->pushGeneralBattleDetailLog("상대의 필살공격!", ActionLogger::PLAIN); + $self->getLogger()->pushGeneralBattleDetailLog("필살공격!", ActionLogger::PLAIN); + + $self->multiplyWarPowerMultiply($self->criticalDamage()); + + return true; + } +} \ No newline at end of file diff --git a/hwe/sammo/WarUnitTrigger/che_필살시도.php b/hwe/sammo/WarUnitTrigger/che_필살시도.php new file mode 100644 index 00000000..ebc67754 --- /dev/null +++ b/hwe/sammo/WarUnitTrigger/che_필살시도.php @@ -0,0 +1,33 @@ +hasActivatedSkill('특수')){ + return true; + } + if($self->hasActivatedSkill('필살불가')){ + return true; + } + + if(!Util::randBool($self->getComputedCriticalRatio())){ + return true; + } + + $this->activateSkill('특수', '필살시도', '필살'); + + + return true; + } +} \ No newline at end of file diff --git a/hwe/sammo/WarUnitTrigger/che_회피발동.php b/hwe/sammo/WarUnitTrigger/che_회피발동.php new file mode 100644 index 00000000..fc36721d --- /dev/null +++ b/hwe/sammo/WarUnitTrigger/che_회피발동.php @@ -0,0 +1,26 @@ +hasActivatedSkill('회피')){ + return true; + } + + $oppose->getLogger()->pushGeneralBattleDetailLog("상대가 회피했다!", ActionLogger::PLAIN); + $self->getLogger()->pushGeneralBattleDetailLog("회피했다!", ActionLogger::PLAIN); + + $oppose->multiplyWarPowerMultiply(0.2); + + return true; + } +} \ No newline at end of file