From ac0f6c6b6ccf841a6672deb7e8c2e50d278e80ca Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 13 May 2019 03:17:48 +0900 Subject: [PATCH] =?UTF-8?q?=EC=95=84=EC=9D=B4=ED=85=9C=EC=97=90=20consumab?= =?UTF-8?q?le=20=EA=B0=9C=EB=85=90=20=EC=B6=94=EA=B0=80,=20GameConstBase?= =?UTF-8?q?=EC=97=90=20=EC=95=84=EC=9D=B4=ED=85=9C=20=EC=A4=80=EB=B9=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/ActionItem/che_계략_이추.php | 1 + hwe/sammo/ActionItem/che_계략_향낭.php | 1 + hwe/sammo/ActionItem/che_사기_탁주.php | 1 + hwe/sammo/ActionItem/che_저격_수극.php | 1 + hwe/sammo/ActionItem/che_치료_환약.php | 1 + hwe/sammo/ActionItem/che_훈련_청주.php | 1 + hwe/sammo/BaseItem.php | 5 ++++ hwe/sammo/GameConstBase.php | 40 ++++++++++++++++++++++++++ 8 files changed, 51 insertions(+) diff --git a/hwe/sammo/ActionItem/che_계략_이추.php b/hwe/sammo/ActionItem/che_계략_이추.php index 8ca13fa0..d11a57a2 100644 --- a/hwe/sammo/ActionItem/che_계략_이추.php +++ b/hwe/sammo/ActionItem/che_계략_이추.php @@ -10,6 +10,7 @@ class che_계략_이추 extends \sammo\BaseItem{ protected static $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p'; protected static $cost = 1000; protected static $consumable = true; + protected static $buyable = true; public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{ if($turnType == '계략'){ diff --git a/hwe/sammo/ActionItem/che_계략_향낭.php b/hwe/sammo/ActionItem/che_계략_향낭.php index fdbe40b0..a1dd28a1 100644 --- a/hwe/sammo/ActionItem/che_계략_향낭.php +++ b/hwe/sammo/ActionItem/che_계략_향낭.php @@ -10,6 +10,7 @@ class che_계략_향낭 extends \sammo\BaseItem{ protected static $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p'; protected static $cost = 3000; protected static $consumable = true; + protected static $buyable = true; public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{ if($turnType == '계략'){ diff --git a/hwe/sammo/ActionItem/che_사기_탁주.php b/hwe/sammo/ActionItem/che_사기_탁주.php index 304b5c58..a211b2e7 100644 --- a/hwe/sammo/ActionItem/che_사기_탁주.php +++ b/hwe/sammo/ActionItem/che_사기_탁주.php @@ -11,6 +11,7 @@ class che_사기_탁주 extends \sammo\BaseItem{ protected static $info = '[전투] 사기 +3. 1회용'; protected static $cost = 1000; protected static $consumable = true; + protected static $buyable = true; public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ return new WarUnitTriggerCaller([ diff --git a/hwe/sammo/ActionItem/che_저격_수극.php b/hwe/sammo/ActionItem/che_저격_수극.php index 51dccbab..cedced4b 100644 --- a/hwe/sammo/ActionItem/che_저격_수극.php +++ b/hwe/sammo/ActionItem/che_저격_수극.php @@ -15,6 +15,7 @@ class che_저격_수극 extends \sammo\BaseItem{ protected static $info = '[전투] 전투 개시 전 20% 확률로 저격 시도. 1회용'; protected static $cost = 1000; protected static $consumable = true; + protected static $buyable = true; public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ return new WarUnitTriggerCaller([ diff --git a/hwe/sammo/ActionItem/che_치료_환약.php b/hwe/sammo/ActionItem/che_치료_환약.php index f1ea898a..852bfe5e 100644 --- a/hwe/sammo/ActionItem/che_치료_환약.php +++ b/hwe/sammo/ActionItem/che_치료_환약.php @@ -12,6 +12,7 @@ class che_치료_환약 extends \sammo\BaseItem{ protected static $info = '[군사] 턴 실행 전 부상 회복. 1회용'; protected static $cost = 100; protected static $consumable = true; + protected static $buyable = true; public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{ return new GeneralTriggerCaller([ diff --git a/hwe/sammo/ActionItem/che_훈련_청주.php b/hwe/sammo/ActionItem/che_훈련_청주.php index 7d8fe2ab..82350faf 100644 --- a/hwe/sammo/ActionItem/che_훈련_청주.php +++ b/hwe/sammo/ActionItem/che_훈련_청주.php @@ -10,6 +10,7 @@ class che_훈련_청주 extends \sammo\BaseItem{ protected static $info = '[전투] 훈련 +3. 1회용'; protected static $cost = 1000; protected static $consumable = true; + protected static $buyable = true; public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ return new WarUnitTriggerCaller([ diff --git a/hwe/sammo/BaseItem.php b/hwe/sammo/BaseItem.php index 0909c4c3..a7e89c00 100644 --- a/hwe/sammo/BaseItem.php +++ b/hwe/sammo/BaseItem.php @@ -12,6 +12,7 @@ class BaseItem implements iAction{ protected static $info = ''; protected static $cost = null; protected static $consumable = false; + protected static $buyable = false; function getID(){ return $this->id; @@ -29,6 +30,10 @@ class BaseItem implements iAction{ return $this->consumable; } + function isBuyable(){ + return $this->buyable; + } + function isValidTurnItem(string $actionType, string $command):bool{ return false; } diff --git a/hwe/sammo/GameConstBase.php b/hwe/sammo/GameConstBase.php index 3bbb27d7..f7d33fdf 100644 --- a/hwe/sammo/GameConstBase.php +++ b/hwe/sammo/GameConstBase.php @@ -148,6 +148,46 @@ class GameConstBase 'che_패권', 'che_의협', 'che_대의', 'che_왕좌', 'che_은둔', 'None' ]; + public static $allItems = [ + 'horse' => [ + 'che_명마_노기', 'che_명마_조랑', 'che_명마_노새', 'che_명마_나귀', 'che_명마_갈색마', 'che_명마_흑색마', + + 'che_명마_백마a', 'che_명마_백마b', 'che_명마_기주마a', 'che_명마_기주마b', + 'che_명마_양주마a', 'che_명마_양주마b', 'che_명마_과하마a', 'che_명마_과하마b', + 'che_명마_대완마a', 'che_명마_대완마b', 'che_명마_서량마a', 'che_명마_서량마b', + 'che_명마_사륜거a', 'che_명마_사륜거b', 'che_명마_절영', 'che_명마_적로', + 'che_명마_적란마', 'che_명마_조황비전', 'che_명마_한혈마', 'che_명마_적토마', + ], + 'weapon' => [ + 'che_무기_단도', 'che_무기_단궁', 'che_무기_단극', 'che_무기_목검', 'che_무기_죽창', 'che_무기_소부', + + 'che_무기_동추', 'che_무기_철편', 'che_무기_철쇄', 'che_무기_맥궁', + 'che_무기_유성추', 'che_무기_철질여골', 'che_무기_쌍철극', 'che_무기_동호비궁', + 'che_무기_삼첨도', 'che_무기_대부', 'che_무기_고정도', 'che_무기_이광궁', + 'che_무기_철척사모', 'che_무기_칠성검', 'che_무기_사모', 'che_무기_양유기궁', + 'che_무기_언월도', 'che_무기_방천화극', 'che_무기_청홍검', 'che_무기_의천검' + ], + 'book' => [ + 'che_서적_효경전', 'che_서적_회남자', 'che_서적_변도론', 'che_서적_건상역주', 'che_서적_여씨춘추', 'che_서적_사민월령', + + 'che_서적_위료자', 'che_서적_사마법', 'che_서적_한서', 'che_서적_논어', + 'che_서적_전론', 'che_서적_사기', 'che_서적_장자', 'che_서적_역경', + 'che_서적_시경', 'che_서적_구국론', 'che_서적_상군서', 'che_서적_춘추전', + 'che_서적_산해경', 'che_서적_맹덕신서', 'che_서적_관자', 'che_서적_병법24편', + 'che_서적_한비자', 'che_서적_오자병법', 'che_서적_노자', 'che_서적_손자병법', + ], + 'item' => [ + 'che_치료_환약', 'che_저격_수극', 'che_사기_탁주', 'che_훈련_청주', 'che_계략_이추', 'che_계략_향낭', + + 'che_치료_오석산', 'che_치료_무후행군', 'che_치료_도소연명', 'che_치료_칠엽청점', 'che_치료_정력견혈', + 'che_훈련_과실주', 'che_훈련_이강주', 'che_사기_의적주', 'che_사기_두강주', 'che_사기_보령압주', + 'che_훈련_철벽서', 'che_훈련_단결도', 'che_사기_춘화첩', 'che_사기_초선화', + 'che_계략_육도', 'che_계략_삼략', + 'che_의술_청낭서', 'che_의술_태평청령', + 'che_회피_태평요술', 'che_회피_둔갑천서', + ] + ]; + /** @var array[string] 선택 가능한 커맨드 */ public static $availableGeneralCommand = [ ''=>[