diff --git a/hwe/sammo/ActionItem/che_명마_07_기주마.php b/hwe/sammo/ActionItem/che_명마_07_기주마.php
index 7ec6c226..2fc7cdde 100644
--- a/hwe/sammo/ActionItem/che_명마_07_기주마.php
+++ b/hwe/sammo/ActionItem/che_명마_07_기주마.php
@@ -6,4 +6,17 @@ use \sammo\General;
class che_명마_07_기주마 extends \sammo\BaseStatItem{
protected $cost = 200;
protected $buyable = false;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 공격 시 페이즈 +1";
+ }
+
+ public function onCalcStat(General $general, string $statName, $value, $aux=null){
+ if($statName === 'initWarPhase'){
+ return $value + 1;
+ }
+ return $value;
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_명마_07_백마.php b/hwe/sammo/ActionItem/che_명마_07_백마.php
index 94f9ce9c..6464658f 100644
--- a/hwe/sammo/ActionItem/che_명마_07_백마.php
+++ b/hwe/sammo/ActionItem/che_명마_07_백마.php
@@ -1,9 +1,26 @@
info .= "
[전투] 퇴각 시 부상 없음";
+ }
+
+ public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
+ return new WarUnitTriggerCaller(
+ new che_퇴각부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM),
+ );
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_명마_12_사륜거.php b/hwe/sammo/ActionItem/che_명마_12_사륜거.php
index 13896c6e..65d0b8b3 100644
--- a/hwe/sammo/ActionItem/che_명마_12_사륜거.php
+++ b/hwe/sammo/ActionItem/che_명마_12_사륜거.php
@@ -1,9 +1,27 @@
info .= "
[전투] 퇴각 시 부상 없음";
+ }
+
+ public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
+ return new WarUnitTriggerCaller(
+ new che_퇴각부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM),
+ );
+ }
+
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_무기_02_단궁.php b/hwe/sammo/ActionItem/che_무기_02_단궁.php
index 7b0b1ec7..3410fc31 100644
--- a/hwe/sammo/ActionItem/che_무기_02_단궁.php
+++ b/hwe/sammo/ActionItem/che_무기_02_단궁.php
@@ -2,9 +2,26 @@
namespace sammo\ActionItem;
use \sammo\iAction;
use \sammo\General;
+use sammo\WarUnit;
+use sammo\WarUnitTrigger\che_저격발동;
+use sammo\WarUnitTrigger\che_저격시도;
+use sammo\WarUnitTriggerCaller;
class che_무기_02_단궁 extends \sammo\BaseStatItem{
protected $cost = 3000;
protected $buyable = true;
protected $reqSecu = 2000;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 새로운 상대와 전투 시 1% 확률로 저격 발동, 성공 시 사기+10";
+ }
+
+ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
+ return new WarUnitTriggerCaller(
+ new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 102, 0.01, 10, 30),
+ new che_저격발동($unit, che_저격발동::TYPE_ITEM)
+ );
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_무기_07_맥궁.php b/hwe/sammo/ActionItem/che_무기_07_맥궁.php
index 8f4d0591..9bf0a5ad 100644
--- a/hwe/sammo/ActionItem/che_무기_07_맥궁.php
+++ b/hwe/sammo/ActionItem/che_무기_07_맥궁.php
@@ -2,8 +2,25 @@
namespace sammo\ActionItem;
use \sammo\iAction;
use \sammo\General;
+use sammo\WarUnit;
+use sammo\WarUnitTrigger\che_저격발동;
+use sammo\WarUnitTrigger\che_저격시도;
+use sammo\WarUnitTriggerCaller;
class che_무기_07_맥궁 extends \sammo\BaseStatItem{
protected $cost = 200;
protected $buyable = false;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 새로운 상대와 전투 시 20% 확률로 저격 발동, 성공 시 사기+10";
+ }
+
+ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
+ return new WarUnitTriggerCaller(
+ new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 107, 0.2, 20, 40),
+ new che_저격발동($unit, che_저격발동::TYPE_ITEM)
+ );
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_무기_09_동호비궁.php b/hwe/sammo/ActionItem/che_무기_09_동호비궁.php
index d7700da6..09476ca1 100644
--- a/hwe/sammo/ActionItem/che_무기_09_동호비궁.php
+++ b/hwe/sammo/ActionItem/che_무기_09_동호비궁.php
@@ -2,8 +2,25 @@
namespace sammo\ActionItem;
use \sammo\iAction;
use \sammo\General;
+use sammo\WarUnit;
+use sammo\WarUnitTrigger\che_저격발동;
+use sammo\WarUnitTrigger\che_저격시도;
+use sammo\WarUnitTriggerCaller;
class che_무기_09_동호비궁 extends \sammo\BaseStatItem{
protected $cost = 200;
protected $buyable = false;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 새로운 상대와 전투 시 20% 확률로 저격 발동, 성공 시 사기+10";
+ }
+
+ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
+ return new WarUnitTriggerCaller(
+ new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 109, 0.15, 20, 40),
+ new che_저격발동($unit, che_저격발동::TYPE_ITEM)
+ );
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_무기_11_이광궁.php b/hwe/sammo/ActionItem/che_무기_11_이광궁.php
index 95fbf6b2..7bd69012 100644
--- a/hwe/sammo/ActionItem/che_무기_11_이광궁.php
+++ b/hwe/sammo/ActionItem/che_무기_11_이광궁.php
@@ -2,8 +2,25 @@
namespace sammo\ActionItem;
use \sammo\iAction;
use \sammo\General;
+use sammo\WarUnit;
+use sammo\WarUnitTrigger\che_저격발동;
+use sammo\WarUnitTrigger\che_저격시도;
+use sammo\WarUnitTriggerCaller;
class che_무기_11_이광궁 extends \sammo\BaseStatItem{
protected $cost = 200;
protected $buyable = false;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 새로운 상대와 전투 시 10% 확률로 저격 발동, 성공 시 사기+10";
+ }
+
+ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
+ return new WarUnitTriggerCaller(
+ new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 111, 0.10, 20, 40),
+ new che_저격발동($unit, che_저격발동::TYPE_ITEM)
+ );
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_무기_13_양유기궁.php b/hwe/sammo/ActionItem/che_무기_13_양유기궁.php
index 55c6713b..5bad465a 100644
--- a/hwe/sammo/ActionItem/che_무기_13_양유기궁.php
+++ b/hwe/sammo/ActionItem/che_무기_13_양유기궁.php
@@ -2,8 +2,25 @@
namespace sammo\ActionItem;
use \sammo\iAction;
use \sammo\General;
+use sammo\WarUnit;
+use sammo\WarUnitTrigger\che_저격발동;
+use sammo\WarUnitTrigger\che_저격시도;
+use sammo\WarUnitTriggerCaller;
class che_무기_13_양유기궁 extends \sammo\BaseStatItem{
protected $cost = 200;
protected $buyable = false;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 새로운 상대와 전투 시 10% 확률로 저격 발동, 성공 시 사기+10";
+ }
+
+ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
+ return new WarUnitTriggerCaller(
+ new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 113, 0.05, 20, 40),
+ new che_저격발동($unit, che_저격발동::TYPE_ITEM)
+ );
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_서적_01_효경전.php b/hwe/sammo/ActionItem/che_서적_01_효경전.php
index 31a79aab..b5cb2c33 100644
--- a/hwe/sammo/ActionItem/che_서적_01_효경전.php
+++ b/hwe/sammo/ActionItem/che_서적_01_효경전.php
@@ -7,4 +7,17 @@ class che_서적_01_효경전 extends \sammo\BaseStatItem{
protected $cost = 1000;
protected $buyable = true;
protected $reqSecu = 1000;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 계략 시도 확률 +1%p";
+ }
+
+ public function onCalcStat(General $general, string $statName, $value, $aux=null){
+ if($statName === 'warMagicTrialProb'){
+ return $value + 0.01;
+ }
+ return $value;
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_서적_02_회남자.php b/hwe/sammo/ActionItem/che_서적_02_회남자.php
index b66edad2..0d58305b 100644
--- a/hwe/sammo/ActionItem/che_서적_02_회남자.php
+++ b/hwe/sammo/ActionItem/che_서적_02_회남자.php
@@ -7,4 +7,17 @@ class che_서적_02_회남자 extends \sammo\BaseStatItem{
protected $cost = 3000;
protected $buyable = true;
protected $reqSecu = 2000;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 계략 시도 확률 +1%p";
+ }
+
+ public function onCalcStat(General $general, string $statName, $value, $aux=null){
+ if($statName === 'warMagicTrialProb'){
+ return $value + 0.01;
+ }
+ return $value;
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_서적_03_변도론.php b/hwe/sammo/ActionItem/che_서적_03_변도론.php
index 468838a7..e3afa7a3 100644
--- a/hwe/sammo/ActionItem/che_서적_03_변도론.php
+++ b/hwe/sammo/ActionItem/che_서적_03_변도론.php
@@ -7,4 +7,17 @@ class che_서적_03_변도론 extends \sammo\BaseStatItem{
protected $cost = 6000;
protected $buyable = true;
protected $reqSecu = 3000;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 계략 시도 확률 +2%p";
+ }
+
+ public function onCalcStat(General $general, string $statName, $value, $aux=null){
+ if($statName === 'warMagicTrialProb'){
+ return $value + 0.02;
+ }
+ return $value;
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_서적_04_건상역주.php b/hwe/sammo/ActionItem/che_서적_04_건상역주.php
index 33c9cf30..46f99005 100644
--- a/hwe/sammo/ActionItem/che_서적_04_건상역주.php
+++ b/hwe/sammo/ActionItem/che_서적_04_건상역주.php
@@ -7,4 +7,17 @@ class che_서적_04_건상역주 extends \sammo\BaseStatItem{
protected $cost = 10000;
protected $buyable = true;
protected $reqSecu = 4000;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 계략 시도 확률 +2%p";
+ }
+
+ public function onCalcStat(General $general, string $statName, $value, $aux=null){
+ if($statName === 'warMagicTrialProb'){
+ return $value + 0.02;
+ }
+ return $value;
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_서적_05_여씨춘추.php b/hwe/sammo/ActionItem/che_서적_05_여씨춘추.php
index 68208062..ec4314d8 100644
--- a/hwe/sammo/ActionItem/che_서적_05_여씨춘추.php
+++ b/hwe/sammo/ActionItem/che_서적_05_여씨춘추.php
@@ -7,4 +7,17 @@ class che_서적_05_여씨춘추 extends \sammo\BaseStatItem{
protected $cost = 15000;
protected $buyable = true;
protected $reqSecu = 5000;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 계략 시도 확률 +3%p";
+ }
+
+ public function onCalcStat(General $general, string $statName, $value, $aux=null){
+ if($statName === 'warMagicTrialProb'){
+ return $value + 0.03;
+ }
+ return $value;
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_서적_06_사민월령.php b/hwe/sammo/ActionItem/che_서적_06_사민월령.php
index c6a3ad81..a93e869d 100644
--- a/hwe/sammo/ActionItem/che_서적_06_사민월령.php
+++ b/hwe/sammo/ActionItem/che_서적_06_사민월령.php
@@ -7,4 +7,17 @@ class che_서적_06_사민월령 extends \sammo\BaseStatItem{
protected $cost = 21000;
protected $buyable = true;
protected $reqSecu = 6000;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 계략 시도 확률 +3%p";
+ }
+
+ public function onCalcStat(General $general, string $statName, $value, $aux=null){
+ if($statName === 'warMagicTrialProb'){
+ return $value + 0.03;
+ }
+ return $value;
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_서적_07_논어.php b/hwe/sammo/ActionItem/che_서적_07_논어.php
index 7e3024ed..a0448d2e 100644
--- a/hwe/sammo/ActionItem/che_서적_07_논어.php
+++ b/hwe/sammo/ActionItem/che_서적_07_논어.php
@@ -1,9 +1,26 @@
info .= "
[전투] 상대의 계략 성공 확률 -10%p";
+ }
+
+ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
+ return new WarUnitTriggerCaller(
+ new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM, false, '계략약화')
+ );
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_서적_07_사마법.php b/hwe/sammo/ActionItem/che_서적_07_사마법.php
index 33a92211..e4cd5bdb 100644
--- a/hwe/sammo/ActionItem/che_서적_07_사마법.php
+++ b/hwe/sammo/ActionItem/che_서적_07_사마법.php
@@ -1,9 +1,28 @@
info .= "
[전투] 상대의 계략을 20% 확률로 되돌림";
+ }
+
+ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
+ return new WarUnitTriggerCaller(
+ new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM, 0.2),
+ new che_반계발동($unit)
+ );
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_서적_07_위료자.php b/hwe/sammo/ActionItem/che_서적_07_위료자.php
index de1d1d62..ff0cd4d2 100644
--- a/hwe/sammo/ActionItem/che_서적_07_위료자.php
+++ b/hwe/sammo/ActionItem/che_서적_07_위료자.php
@@ -6,4 +6,17 @@ use \sammo\General;
class che_서적_07_위료자 extends \sammo\BaseStatItem{
protected $cost = 200;
protected $buyable = false;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 계략 시도 확률 +20%p";
+ }
+
+ public function onCalcStat(General $general, string $statName, $value, $aux=null){
+ if($statName === 'warMagicTrialProb'){
+ return $value + 0.2;
+ }
+ return $value;
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_서적_08_전론.php b/hwe/sammo/ActionItem/che_서적_08_전론.php
index d4354357..74d78652 100644
--- a/hwe/sammo/ActionItem/che_서적_08_전론.php
+++ b/hwe/sammo/ActionItem/che_서적_08_전론.php
@@ -6,4 +6,17 @@ use \sammo\General;
class che_서적_08_전론 extends \sammo\BaseStatItem{
protected $cost = 200;
protected $buyable = false;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->info .= "
[전투] 계략 성공 시 대미지 +20%";
+ }
+
+ public function onCalcStat(General $general, string $statName, $value, $aux=null){
+ if($statName === 'warMagicSuccessDamage'){
+ return $value * 1.2;
+ }
+ return $value;
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_서적_11_춘추전.php b/hwe/sammo/ActionItem/che_서적_11_춘추전.php
index 90cfa7fd..1180c1cf 100644
--- a/hwe/sammo/ActionItem/che_서적_11_춘추전.php
+++ b/hwe/sammo/ActionItem/che_서적_11_춘추전.php
@@ -1,9 +1,26 @@
info .= "
[전투] 상대의 계략 성공 확률 -10%p";
+ }
+
+ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
+ return new WarUnitTriggerCaller(
+ new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM, false, '계략약화')
+ );
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/ActionItem/che_서적_12_산해경.php b/hwe/sammo/ActionItem/che_서적_12_산해경.php
index 7947e879..2f73acf9 100644
--- a/hwe/sammo/ActionItem/che_서적_12_산해경.php
+++ b/hwe/sammo/ActionItem/che_서적_12_산해경.php
@@ -1,9 +1,28 @@
info .= "
[전투] 상대의 계략을 20% 확률로 되돌림";
+ }
+
+ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
+ return new WarUnitTriggerCaller(
+ new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM, 0.2),
+ new che_반계발동($unit)
+ );
+ }
}
\ No newline at end of file
diff --git a/hwe/sammo/BaseWarUnitTrigger.php b/hwe/sammo/BaseWarUnitTrigger.php
index f9a49f73..eeb80f44 100644
--- a/hwe/sammo/BaseWarUnitTrigger.php
+++ b/hwe/sammo/BaseWarUnitTrigger.php
@@ -7,6 +7,7 @@ abstract class BaseWarUnitTrigger extends ObjectTrigger{
const TYPE_NONE = 0;
const TYPE_ITEM = 1;
const TYPE_CONSUMABLE_ITEM = 1 | 2;
+ const TYPE_DEDUP_TYPE_BASE = 1024;
protected $raiseType = self::TYPE_NONE;
diff --git a/hwe/sammo/WarUnitGeneral.php b/hwe/sammo/WarUnitGeneral.php
index e1b8aed3..a243c536 100644
--- a/hwe/sammo/WarUnitGeneral.php
+++ b/hwe/sammo/WarUnitGeneral.php
@@ -270,6 +270,9 @@ class WarUnitGeneral extends WarUnit{
if($this->hasActivatedSkillOnLog('부상무효')){
return false;
}
+ if($this->hasActivatedSkillOnLog('퇴각부상무효')){
+ return false;
+ }
if(!Util::randBool(0.05)){
return false;
}
diff --git a/hwe/sammo/WarUnitTrigger/che_반계시도.php b/hwe/sammo/WarUnitTrigger/che_반계시도.php
index f94af653..cee031d8 100644
--- a/hwe/sammo/WarUnitTrigger/che_반계시도.php
+++ b/hwe/sammo/WarUnitTrigger/che_반계시도.php
@@ -10,13 +10,19 @@ use sammo\ObjectTrigger;
class che_반계시도 extends BaseWarUnitTrigger{
protected $priority = ObjectTrigger::PRIORITY_BODY + 300;
+ protected $prob;
+
+ public function __construct(WarUnit $unit, int $raiseType = 0, float $prob = 0.4){
+ $this->object = $unit;
+ $this->prob = $prob;
+ }
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
if(!$oppose->hasActivatedSkill('계략')){
return true;
}
- if(!Util::randBool(0.4)){
+ if(!Util::randBool($this->prob)){
return true;
}
diff --git a/hwe/sammo/WarUnitTrigger/che_퇴각부상무효.php b/hwe/sammo/WarUnitTrigger/che_퇴각부상무효.php
new file mode 100644
index 00000000..d82bd63e
--- /dev/null
+++ b/hwe/sammo/WarUnitTrigger/che_퇴각부상무효.php
@@ -0,0 +1,19 @@
+activateSkill('퇴각부상무효');
+
+ return true;
+ }
+}
\ No newline at end of file