diff --git a/hwe/sammo/ActionItem/che_명마_ 01노기.php b/hwe/sammo/ActionItem/che_명마_ 01노기.php deleted file mode 100644 index ac8b905d..00000000 --- a/hwe/sammo/ActionItem/che_명마_ 01노기.php +++ /dev/null @@ -1,12 +0,0 @@ -'통솔', - 'power'=>'무력', - 'intel'=>'지력' + protected static $buyable = true; + + protected const ITEM_TYPE = [ + '명마'=>['통솔', 'leader'], + '무기'=>['무력', 'power'], + '서적'=>['지력', 'intel'] ]; - function getID(){ - return $this->statValue; - } - function getName(){ - return sprintf('%s(+%d)',$this->rawName, $this->statValue); - } - function getInfo(){ - return sprintf('%s +%d', static::STAT_NICK[$this->statType], $this->statValue); + public function __construct(){ + $nameTokens = explode('_', static::class); + $this->statValue = (int)$nameTokens[-1]; + $this->rawName = $nameTokens[-2]; + [$this->statNick, $this->statType] = static::ITEM_TYPE[$nameTokens[-3]]; + + $this->id = $this->statValue; + $this->name = sprintf('%s(+%d)',$this->rawName, $this->statValue); + $this->info = sprintf('%s +%d', $this->statNick, $this->statValue); } public function onCalcStat(General $general, string $statName, $value, $aux=null){ diff --git a/hwe/sammo/GameConstBase.php b/hwe/sammo/GameConstBase.php index 80de03e2..38bddfa5 100644 --- a/hwe/sammo/GameConstBase.php +++ b/hwe/sammo/GameConstBase.php @@ -150,32 +150,32 @@ class GameConstBase public static $allItems = [ 'horse' => [ - 'che_명마_01노기'=>0, 'che_명마_02조랑'=>0, 'che_명마_03노새'=>0, - 'che_명마_04나귀'=>0, 'che_명마_05갈색마'=>0, 'che_명마_06흑색마'=>0, + 'che_명마_01_노기'=>0, 'che_명마_02_조랑'=>0, 'che_명마_03_노새'=>0, + 'che_명마_04_나귀'=>0, 'che_명마_05_갈색마'=>0, 'che_명마_06_흑색마'=>0, - 'che_명마_07백마'=>2, 'che_명마_07기주마'=>2, - 'che_명마_08양주마'=>2, 'che_명마_09과하마'=>2, - 'che_명마_10대완마'=>2, 'che_명마_11서량마'=>2, - 'che_명마_12사륜거'=>2, 'che_명마_13절영'=>1, 'che_명마_13적로'=>1, - 'che_명마_14적란마'=>1, 'che_명마_14조황비전'=>1, 'che_명마_15한혈마'=>1, 'che_명마_15적토마'=>1, + 'che_명마_07_백마'=>2, 'che_명마_07_기주마'=>2, + 'che_명마_08_양주마'=>2, 'che_명마_09_과하마'=>2, + 'che_명마_10_대완마'=>2, 'che_명마_11_서량마'=>2, + 'che_명마_12_사륜거'=>2, 'che_명마_13_절영'=>1, 'che_명마_13_적로'=>1, + 'che_명마_14_적란마'=>1, 'che_명마_14_조황비전'=>1, 'che_명마_15_한혈마'=>1, 'che_명마_15_적토마'=>1, ], 'weapon' => [ - 'che_무기_01단도'=>0, 'che_무기_02단궁'=>0, 'che_무기_03단극'=>0, - 'che_무기_04목검'=>0, 'che_무기_05죽창'=>0, 'che_무기_06소부'=>0, + 'che_무기_01_단도'=>0, 'che_무기_02_단궁'=>0, 'che_무기_03_단극'=>0, + 'che_무기_04_목검'=>0, 'che_무기_05_죽창'=>0, 'che_무기_06_소부'=>0, - 'che_무기_07동추'=>1, 'che_무기_07철편'=>1, 'che_무기_07철쇄'=>1, 'che_무기_07맥궁'=>1, - 'che_무기_08유성추'=>1, 'che_무기_08철질여골'=>1, 'che_무기_09쌍철극'=>1, 'che_무기_09동호비궁'=>1, 'che_무기_10삼첨도'=>1, 'che_무기_10대부'=>1, 'che_무기_11고정도'=>1, 'che_무기_11이광궁'=>1, 'che_무기_12철척사모'=>1, 'che_무기_12칠성검'=>1, 'che_무기_13사모'=>1, 'che_무기_13양유기궁'=>1, - 'che_무기_14언월도'=>1, 'che_무기_14방천화극'=>1, 'che_무기_15청홍검'=>1, 'che_무기_15의천검'=>1 + 'che_무기_07_동추'=>1, 'che_무기_07_철편'=>1, 'che_무기_07_철쇄'=>1, 'che_무기_07_맥궁'=>1, + 'che_무기_08_유성추'=>1, 'che_무기_08_철질여골'=>1, 'che_무기_09_쌍철극'=>1, 'che_무기_09_동호비궁'=>1, 'che_무기_10_삼첨도'=>1, 'che_무기_10_대부'=>1, 'che_무기_11_고정도'=>1, 'che_무기_11_이광궁'=>1, 'che_무기_12_철척사모'=>1, 'che_무기_12_칠성검'=>1, 'che_무기_13_사모'=>1, 'che_무기_13_양유기궁'=>1, + 'che_무기_14_언월도'=>1, 'che_무기_14_방천화극'=>1, 'che_무기_15_청홍검'=>1, 'che_무기_15_의천검'=>1 ], 'book' => [ - 'che_서적_01효경전'=>0, 'che_서적_02회남자'=>0, 'che_서적_03변도론'=>0, - 'che_서적_04건상역주'=>0, 'che_서적_05여씨춘추'=>0, 'che_서적_06사민월령'=>0, + 'che_서적_01_효경전'=>0, 'che_서적_02_회남자'=>0, 'che_서적_03_변도론'=>0, + 'che_서적_04_건상역주'=>0, 'che_서적_05_여씨춘추'=>0, 'che_서적_06_사민월령'=>0, - 'che_서적_07위료자'=>1, 'che_서적_07사마법'=>1, 'che_서적_07한서'=>1, 'che_서적_07논어'=>1, - 'che_서적_08전론'=>1, 'che_서적_08사기'=>1, 'che_서적_09장자'=>1, 'che_서적_09역경'=>1, - 'che_서적_10시경'=>1, 'che_서적_10구국론'=>1, 'che_서적_11상군서'=>1, 'che_서적_11춘추전'=>1, - 'che_서적_12산해경'=>1, 'che_서적_12맹덕신서'=>1, 'che_서적_13관자'=>1, 'che_서적_13병법24편'=>1, - 'che_서적_14한비자'=>1, 'che_서적_14오자병법'=>1, 'che_서적_15노자'=>1, 'che_서적_15손자병법'=>1, + 'che_서적_07_위료자'=>1, 'che_서적_07_사마법'=>1, 'che_서적_07_한서'=>1, 'che_서적_07_논어'=>1, + 'che_서적_08_전론'=>1, 'che_서적_08_사기'=>1, 'che_서적_09_장자'=>1, 'che_서적_09_역경'=>1, + 'che_서적_10_시경'=>1, 'che_서적_10_구국론'=>1, 'che_서적_11_상군서'=>1, 'che_서적_11_춘추전'=>1, + 'che_서적_12_산해경'=>1, 'che_서적_12_맹덕신서'=>1, 'che_서적_13_관자'=>1, 'che_서적_13_병법24_편'=>1, + 'che_서적_14_한비자'=>1, 'che_서적_14_오자병법'=>1, 'che_서적_15_노자'=>1, 'che_서적_15_손자병법'=>1, ], 'item' => [ 'che_치료_환약'=>0, 'che_저격_수극'=>0, 'che_사기_탁주'=>0,