From 0d39add09cdb609e25a228e5941acbe148092727 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 8 Mar 2020 12:03:23 +0900 Subject: [PATCH] =?UTF-8?q?=EC=95=84=EC=9D=B4=ED=85=9C=20=EA=B5=AC?= =?UTF-8?q?=EB=A7=A4=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95,=20?= =?UTF-8?q?=EC=95=84=EC=9D=B4=ED=85=9C=20=ED=98=B8=EC=B9=AD=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 6 ++-- hwe/func_time_event.php | 4 +-- hwe/func_tournament.php | 33 +++++++++--------- 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 | 3 +- 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 | 4 +++ 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/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 | 3 +- 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 | 4 +++ hwe/sammo/BaseItem.php | 5 +++ hwe/sammo/BaseWarUnitTrigger.php | 3 +- hwe/sammo/Command/General/che_군량매매.php | 7 ---- hwe/sammo/Command/General/che_장비매매.php | 37 +++++++++++++++++---- hwe/sammo/Command/General/che_화계.php | 5 +-- hwe/sammo/GeneralTrigger/che_아이템치료.php | 3 +- 35 files changed, 100 insertions(+), 39 deletions(-) diff --git a/hwe/func.php b/hwe/func.php index a694979a..19301732 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1567,8 +1567,10 @@ function tryUniqueItemLottery(General $general, string $acquireType='아이템') $nationName = $general->getStaticNation()['name']; $generalName = $general->getName(); $josaYi = JosaUtil::pick($generalName, '이'); - $itemName = getItemName($itemCode); - $josaUl = JosaUtil::pick($itemName, '을'); + $itemObj = buildItemClass($itemCode); + $itemName = $itemObj->getName(); + $itemRawName = $itemObj->getRawName(); + $josaUl = JosaUtil::pick($itemRawName, '을'); $general->setVar($itemType, $itemCode); diff --git a/hwe/func_time_event.php b/hwe/func_time_event.php index 20a5aae3..b3a0179a 100644 --- a/hwe/func_time_event.php +++ b/hwe/func_time_event.php @@ -85,7 +85,7 @@ function processGoldIncome() { ." // 지급률 : ".tab2((string)round($ratio*100,2),5," ") ." % // 결과금 : ".tab2((string)$nation['gold'],6," "); - $incomeLog = "●이번 수입은 금 $income입니다."; + $incomeLog = "이번 수입은 금 $income입니다."; $db->update('nation', [ 'gold'=>$nation['gold'] @@ -364,7 +364,7 @@ function processRiceIncome() { ." // 지급률 : ".tab2((string)round($ratio*100,2),5," ") ." % // 결과곡 : ".tab2((string)$nation['rice'],6," "); - $incomeLog = "●이번 수입은 쌀 $income입니다."; + $incomeLog = "이번 수입은 쌀 $income입니다."; $db->update('nation', [ 'rice'=>$nation['rice'] diff --git a/hwe/func_tournament.php b/hwe/func_tournament.php index 690d927d..dc114fe4 100644 --- a/hwe/func_tournament.php +++ b/hwe/func_tournament.php @@ -860,56 +860,59 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { //아이템 로그 if(!$horse->isBuyable() && ($tnmt_type == 0 || $tnmt_type == 1)) { $itemName = $horse->getName(); + $itemRawName = $horse->getRawName(); switch(rand()%4) { case 0: - $josaYi = JosaUtil::pick($itemName, '이'); + $josaYi = JosaUtil::pick($itemRawName, '이'); $log[] = "{$gen['name']}의 {$itemName}{$josaYi} 포효합니다!"; break; case 1: - $josaYi = JosaUtil::pick($itemName, '이'); + $josaYi = JosaUtil::pick($itemRawName, '이'); $log[] = "{$gen['name']}의 {$itemName}{$josaYi} 그 위용을 뽐냅니다!"; break; case 2: $josaYi = JosaUtil::pick($gen['name'], '이'); - $josaUl = JosaUtil::pick($itemName, '을'); + $josaUl = JosaUtil::pick($itemRawName, '을'); $log[] = "{$gen['name']}{$josaYi} {$itemName}{$josaUl} 타고 있습니다!"; break; case 3: - $josaYi = JosaUtil::pick($itemName, '이'); + $josaYi = JosaUtil::pick($itemRawName, '이'); $log[] = "{$gen['name']}의 {$itemName}{$josaYi} 갈기를 휘날립니다!"; break; } } if(!$weapon->isBuyable() && ($tnmt_type == 0 || $tnmt_type == 2)) { $itemName = $weapon->getName(); + $itemRawName = $weapon->getRawName(); switch(rand()%4) { case 0: - $josaYi = JosaUtil::pick($itemName, '이'); + $josaYi = JosaUtil::pick($itemRawName, '이'); $log[] = "{$gen['name']}의 {$itemName}{$josaYi} 번뜩입니다!"; break; case 1: - $josaYi = JosaUtil::pick($itemName, '이'); + $josaYi = JosaUtil::pick($itemRawName, '이'); $log[] = "{$gen['name']}의 {$itemName}{$josaYi} 푸르게 빛납니다!"; break; case 2: $log[] = "{$gen['name']}의 {$itemName}에서 살기가 느껴집니다!"; break; case 3: - $josaYi = JosaUtil::pick($itemName, '이'); + $josaYi = JosaUtil::pick($itemRawName, '이'); $log[] = "{$gen['name']}의 손에는 {$itemName}{$josaYi} 쥐어져 있습니다!"; break; } } if(!$book->isBuyable() && ($tnmt_type == 0 || $tnmt_type == 3)) { $itemName = $book->getName(); + $itemRawName = $book->getRawName(); switch(rand()%4) { case 0: $josaYi = JosaUtil::pick($gen['name'], '이'); - $josaUl = JosaUtil::pick(getItemName($gen['b']), '을'); - $log[] = "{$gen['name']}{$josaYi} ".getItemName($gen['b'])."{$josaUl} 펼쳐듭니다!"; break; + $josaUl = JosaUtil::pick($itemRawName, '을'); + $log[] = "{$gen['name']}{$josaYi} {$itemName}{$josaUl} 펼쳐듭니다!"; break; case 1: $josaYi = JosaUtil::pick($gen['name'], '이'); - $josaUl = JosaUtil::pick(getItemName($gen['b']), '을'); - $log[] = "{$gen['name']}{$josaYi} ".getItemName($gen['b'])."{$josaUl} 품에서 꺼냅니다!"; break; + $josaUl = JosaUtil::pick($itemRawName, '을'); + $log[] = "{$gen['name']}{$josaYi} {$itemName}{$josaUl} 품에서 꺼냅니다!"; break; case 2: $josaYi = JosaUtil::pick($gen['name'], '이'); - $josaUl = JosaUtil::pick(getItemName($gen['b']), '을'); - $log[] = "{$gen['name']}{$josaYi} ".getItemName($gen['b'])."{$josaUl} 들고 있습니다!"; break; + $josaUl = JosaUtil::pick($itemRawName, '을'); + $log[] = "{$gen['name']}{$josaYi} {$itemName}{$josaUl} 들고 있습니다!"; break; case 3: - $josaYi = JosaUtil::pick(getItemName($gen['b']), '이'); - $log[] = "{$gen['name']}의 손에는 ".getItemName($gen['b'])."{$josaYi} 쥐어져 있습니다!"; break; + $josaYi = JosaUtil::pick($itemRawName, '이'); + $log[] = "{$gen['name']}의 손에는 {$itemName}{$josaYi} 쥐어져 있습니다!"; break; } } } diff --git a/hwe/sammo/ActionItem/che_계략_삼략.php b/hwe/sammo/ActionItem/che_계략_삼략.php index ec6eb25e..48f03bf7 100644 --- a/hwe/sammo/ActionItem/che_계략_삼략.php +++ b/hwe/sammo/ActionItem/che_계략_삼략.php @@ -6,6 +6,7 @@ use \sammo\General; class che_계략_삼략 extends \sammo\BaseItem{ protected $id = 22; + protected $rawName = '삼략'; protected $name = '삼략(계략)'; protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_계략_육도.php b/hwe/sammo/ActionItem/che_계략_육도.php index a136d50d..cb8fe14c 100644 --- a/hwe/sammo/ActionItem/che_계략_육도.php +++ b/hwe/sammo/ActionItem/che_계략_육도.php @@ -6,6 +6,7 @@ use \sammo\General; class che_계략_육도 extends \sammo\BaseItem{ protected $id = 21; + protected $rawName = '육도'; protected $name = '육도(계략)'; protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_계략_이추.php b/hwe/sammo/ActionItem/che_계략_이추.php index b1f1b75e..b4174bdb 100644 --- a/hwe/sammo/ActionItem/che_계략_이추.php +++ b/hwe/sammo/ActionItem/che_계략_이추.php @@ -6,6 +6,7 @@ use \sammo\General; class che_계략_이추 extends \sammo\BaseItem{ protected $id = 5; + protected $rawName = '이추'; protected $name = '이추(계략)'; protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p'; protected $cost = 1000; diff --git a/hwe/sammo/ActionItem/che_계략_향낭.php b/hwe/sammo/ActionItem/che_계략_향낭.php index 75d08cb6..b0a1b853 100644 --- a/hwe/sammo/ActionItem/che_계략_향낭.php +++ b/hwe/sammo/ActionItem/che_계략_향낭.php @@ -6,6 +6,7 @@ use \sammo\General; class che_계략_향낭 extends \sammo\BaseItem{ protected $id = 5; + protected $rawName = '항냥'; protected $name = '항냥(계략)'; protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p'; protected $cost = 3000; diff --git a/hwe/sammo/ActionItem/che_사기_두강주.php b/hwe/sammo/ActionItem/che_사기_두강주.php index 7aae2941..5038cda1 100644 --- a/hwe/sammo/ActionItem/che_사기_두강주.php +++ b/hwe/sammo/ActionItem/che_사기_두강주.php @@ -3,9 +3,10 @@ namespace sammo\ActionItem; use \sammo\iAction; use \sammo\General; -class che_사기_의적주 extends \sammo\BaseItem{ +class che_사기_두강주 extends \sammo\BaseItem{ protected $id = 15; + protected $rawName = '두강주'; protected $name = '두강주(사기)'; protected $info = '[전투] 사기 보정 +10'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_사기_보령압주.php b/hwe/sammo/ActionItem/che_사기_보령압주.php index ff5be115..7179a02f 100644 --- a/hwe/sammo/ActionItem/che_사기_보령압주.php +++ b/hwe/sammo/ActionItem/che_사기_보령압주.php @@ -6,6 +6,7 @@ use \sammo\General; class che_사기_보령압주 extends \sammo\BaseItem{ protected $id = 16; + protected $rawName = '보령압주'; protected $name = '보령압주(사기)'; protected $info = '[전투] 사기 보정 +10'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_사기_의적주.php b/hwe/sammo/ActionItem/che_사기_의적주.php index 173de55e..43896cc9 100644 --- a/hwe/sammo/ActionItem/che_사기_의적주.php +++ b/hwe/sammo/ActionItem/che_사기_의적주.php @@ -6,6 +6,7 @@ use \sammo\General; class che_사기_의적주 extends \sammo\BaseItem{ protected $id = 14; + protected $rawName = '의적주'; protected $name = '의적주(사기)'; protected $info = '[전투] 사기 보정 +10'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_사기_초선화.php b/hwe/sammo/ActionItem/che_사기_초선화.php index 15d39daa..6cbc604a 100644 --- a/hwe/sammo/ActionItem/che_사기_초선화.php +++ b/hwe/sammo/ActionItem/che_사기_초선화.php @@ -6,6 +6,7 @@ use \sammo\General; class che_사기_초선화 extends \sammo\BaseItem{ protected $id = 20; + protected $rawName = '초선화'; protected $name = '초선화(사기)'; protected $info = '[전투] 사기 보정 +14'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_사기_춘화첩.php b/hwe/sammo/ActionItem/che_사기_춘화첩.php index 1554988a..96357223 100644 --- a/hwe/sammo/ActionItem/che_사기_춘화첩.php +++ b/hwe/sammo/ActionItem/che_사기_춘화첩.php @@ -6,6 +6,7 @@ use \sammo\General; class che_사기_춘화첩 extends \sammo\BaseItem{ protected $id = 19; + protected $rawName = '춘화첩'; protected $name = '춘화첩(사기)'; protected $info = '[전투] 사기 보정 +14'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_사기_탁주.php b/hwe/sammo/ActionItem/che_사기_탁주.php index 685405c0..a15c1c3a 100644 --- a/hwe/sammo/ActionItem/che_사기_탁주.php +++ b/hwe/sammo/ActionItem/che_사기_탁주.php @@ -3,10 +3,14 @@ namespace sammo\ActionItem; use \sammo\iAction; use \sammo\General; use \sammo\BaseWarUnitTrigger; +use \sammo\WarUnit; +use \sammo\WarUnitTriggerCaller; +use \sammo\WarUnitTrigger\능력치변경; class che_사기_탁주 extends \sammo\BaseItem{ protected $id = 3; + protected $rawName = '탁주'; protected $name = '탁주(사기)'; protected $info = '[전투] 사기 +6. 1회용'; protected $cost = 1000; diff --git a/hwe/sammo/ActionItem/che_의술_청낭서.php b/hwe/sammo/ActionItem/che_의술_청낭서.php index 22fc64e9..5d09286e 100644 --- a/hwe/sammo/ActionItem/che_의술_청낭서.php +++ b/hwe/sammo/ActionItem/che_의술_청낭서.php @@ -12,6 +12,7 @@ use sammo\WarUnitTriggerCaller; class che_의술_청낭서 extends \sammo\BaseItem{ protected $id = 23; + protected $rawName = '청낭서'; protected $name = '청낭서(의술)'; protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복
[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_의술_태평청령.php b/hwe/sammo/ActionItem/che_의술_태평청령.php index 2e90c217..16ef926f 100644 --- a/hwe/sammo/ActionItem/che_의술_태평청령.php +++ b/hwe/sammo/ActionItem/che_의술_태평청령.php @@ -12,6 +12,7 @@ use sammo\WarUnitTrigger\che_전투치료시도; class che_의술_태평청령 extends \sammo\BaseItem{ protected $id = 24; + protected $rawName = '태평청령'; protected $name = '태평청령(의술)'; protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복
[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_저격_수극.php b/hwe/sammo/ActionItem/che_저격_수극.php index 9d1c5c00..75c5cb08 100644 --- a/hwe/sammo/ActionItem/che_저격_수극.php +++ b/hwe/sammo/ActionItem/che_저격_수극.php @@ -11,6 +11,7 @@ use \sammo\BaseWarUnitTrigger; class che_저격_수극 extends \sammo\BaseItem{ protected $id = 2; + protected $rawName = '수극'; protected $name = '수극(저격)'; protected $info = '[전투] 전투 개시 전 20% 확률로 저격 시도. 1회용'; protected $cost = 1000; diff --git a/hwe/sammo/ActionItem/che_치료_도소연명.php b/hwe/sammo/ActionItem/che_치료_도소연명.php index 3119c041..dc9138e4 100644 --- a/hwe/sammo/ActionItem/che_치료_도소연명.php +++ b/hwe/sammo/ActionItem/che_치료_도소연명.php @@ -8,6 +8,7 @@ use \sammo\GeneralTriggerCaller; class che_치료_도소연명 extends \sammo\BaseItem{ protected $id = 9; + protected $rawName = '도소연명'; protected $name = '도소연명(치료)'; protected $info = '[군사] 턴 실행 전 부상 회복.'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_치료_무후행군.php b/hwe/sammo/ActionItem/che_치료_무후행군.php index 968a69b1..e5c2f922 100644 --- a/hwe/sammo/ActionItem/che_치료_무후행군.php +++ b/hwe/sammo/ActionItem/che_치료_무후행군.php @@ -8,6 +8,7 @@ use \sammo\GeneralTriggerCaller; class che_치료_무후행군 extends \sammo\BaseItem{ protected $id = 8; + protected $rawName = '무후행군'; protected $name = '무후행군(치료)'; protected $info = '[군사] 턴 실행 전 부상 회복.'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_치료_오석산.php b/hwe/sammo/ActionItem/che_치료_오석산.php index e02e8b4a..561c941b 100644 --- a/hwe/sammo/ActionItem/che_치료_오석산.php +++ b/hwe/sammo/ActionItem/che_치료_오석산.php @@ -8,6 +8,7 @@ use \sammo\GeneralTriggerCaller; class che_치료_오석산 extends \sammo\BaseItem{ protected $id = 7; + protected $rawName = '오석산'; protected $name = '오석산(치료)'; protected $info = '[군사] 턴 실행 전 부상 회복.'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_치료_정력견혈.php b/hwe/sammo/ActionItem/che_치료_정력견혈.php index f8fa9dc1..cb66fe7b 100644 --- a/hwe/sammo/ActionItem/che_치료_정력견혈.php +++ b/hwe/sammo/ActionItem/che_치료_정력견혈.php @@ -8,6 +8,7 @@ use \sammo\GeneralTriggerCaller; class che_치료_정력견혈 extends \sammo\BaseItem{ protected $id = 11; + protected $rawName = '정력견혈'; protected $name = '정력견혈(치료)'; protected $info = '[군사] 턴 실행 전 부상 회복.'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_치료_칠엽청점.php b/hwe/sammo/ActionItem/che_치료_칠엽청점.php index 215212aa..23225735 100644 --- a/hwe/sammo/ActionItem/che_치료_칠엽청점.php +++ b/hwe/sammo/ActionItem/che_치료_칠엽청점.php @@ -8,6 +8,7 @@ use \sammo\GeneralTriggerCaller; class che_치료_칠엽청점 extends \sammo\BaseItem{ protected $id = 10; + protected $rawName = '칠엽청점'; protected $name = '칠엽청점(치료)'; protected $info = '[군사] 턴 실행 전 부상 회복.'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_치료_환약.php b/hwe/sammo/ActionItem/che_치료_환약.php index 1415666a..5856f820 100644 --- a/hwe/sammo/ActionItem/che_치료_환약.php +++ b/hwe/sammo/ActionItem/che_치료_환약.php @@ -8,6 +8,7 @@ use \sammo\GeneralTriggerCaller; class che_치료_환약 extends \sammo\BaseItem{ protected $id = 1; + protected $rawName = '환약'; protected $name = '환약(치료)'; protected $info = '[군사] 턴 실행 전 부상 회복. 1회용'; protected $cost = 100; diff --git a/hwe/sammo/ActionItem/che_회피_둔갑천서.php b/hwe/sammo/ActionItem/che_회피_둔갑천서.php index fc94c76b..e158ee06 100644 --- a/hwe/sammo/ActionItem/che_회피_둔갑천서.php +++ b/hwe/sammo/ActionItem/che_회피_둔갑천서.php @@ -6,6 +6,7 @@ use \sammo\General; class che_회피_둔갑천서 extends \sammo\BaseItem{ protected $id = 26; + protected $rawName = '둔갑천서'; protected $name = '둔갑천서(회피)'; protected $info = '[전투] 회피 확률 +20%p'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_회피_태평요술.php b/hwe/sammo/ActionItem/che_회피_태평요술.php index cf6f3d5e..3a89d06c 100644 --- a/hwe/sammo/ActionItem/che_회피_태평요술.php +++ b/hwe/sammo/ActionItem/che_회피_태평요술.php @@ -6,7 +6,8 @@ use \sammo\General; class che_회피_태평요술 extends \sammo\BaseItem{ protected $id = 25; - protected $name = '둔갑천서(회피)'; + protected $rawName = '태평요술'; + protected $name = '태평요술(회피)'; protected $info = '[전투] 회피 확률 +20%p'; protected $cost = 200; protected $consumable = false; diff --git a/hwe/sammo/ActionItem/che_훈련_과실주.php b/hwe/sammo/ActionItem/che_훈련_과실주.php index 455d33ac..59ee5e36 100644 --- a/hwe/sammo/ActionItem/che_훈련_과실주.php +++ b/hwe/sammo/ActionItem/che_훈련_과실주.php @@ -6,6 +6,7 @@ use \sammo\General; class che_훈련_과실주 extends \sammo\BaseItem{ protected $id = 12; + protected $rawName = '과실주'; protected $name = '과실주(훈련)'; protected $info = '[전투] 훈련 보정 +10'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_훈련_단결도.php b/hwe/sammo/ActionItem/che_훈련_단결도.php index 244b1250..a7f117a1 100644 --- a/hwe/sammo/ActionItem/che_훈련_단결도.php +++ b/hwe/sammo/ActionItem/che_훈련_단결도.php @@ -6,6 +6,7 @@ use \sammo\General; class che_훈련_단결도 extends \sammo\BaseItem{ protected $id = 18; + protected $rawName = '단결도'; protected $name = '단결도(훈련)'; protected $info = '[전투] 훈련 보정 +14'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_훈련_이강주.php b/hwe/sammo/ActionItem/che_훈련_이강주.php index 39aac67c..bc2425f9 100644 --- a/hwe/sammo/ActionItem/che_훈련_이강주.php +++ b/hwe/sammo/ActionItem/che_훈련_이강주.php @@ -6,6 +6,7 @@ use \sammo\General; class che_훈련_이강주 extends \sammo\BaseItem{ protected $id = 13; + protected $rawName = '이강주'; protected $name = '이강주(훈련)'; protected $info = '[전투] 훈련 보정 +10'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_훈련_철벽서.php b/hwe/sammo/ActionItem/che_훈련_철벽서.php index 3ba07947..e2ef2d65 100644 --- a/hwe/sammo/ActionItem/che_훈련_철벽서.php +++ b/hwe/sammo/ActionItem/che_훈련_철벽서.php @@ -6,6 +6,7 @@ use \sammo\General; class che_훈련_철벽서 extends \sammo\BaseItem{ protected $id = 17; + protected $rawName = '철벽서'; protected $name = '철벽서(훈련)'; protected $info = '[전투] 훈련 보정 +14'; protected $cost = 200; diff --git a/hwe/sammo/ActionItem/che_훈련_청주.php b/hwe/sammo/ActionItem/che_훈련_청주.php index d52f591e..f97fb8b4 100644 --- a/hwe/sammo/ActionItem/che_훈련_청주.php +++ b/hwe/sammo/ActionItem/che_훈련_청주.php @@ -3,10 +3,14 @@ namespace sammo\ActionItem; use \sammo\iAction; use \sammo\General; use \sammo\BaseWarUnitTrigger; +use \sammo\WarUnit; +use \sammo\WarUnitTriggerCaller; +use \sammo\WarUnitTrigger\능력치변경; class che_훈련_청주 extends \sammo\BaseItem{ protected $id = 4; + protected $rawName = '청주'; protected $name = '청주(훈련)'; protected $info = '[전투] 훈련 +6. 1회용'; protected $cost = 1000; diff --git a/hwe/sammo/BaseItem.php b/hwe/sammo/BaseItem.php index 95e120b3..f74daef9 100644 --- a/hwe/sammo/BaseItem.php +++ b/hwe/sammo/BaseItem.php @@ -8,6 +8,7 @@ class BaseItem implements iAction{ use \sammo\DefaultAction; protected $id = 0; + protected $rawName = '-'; protected $name = '-'; protected $info = ''; protected $cost = null; @@ -18,6 +19,10 @@ class BaseItem implements iAction{ function getID(){ return $this->id; } + + function getRawName(){ + return $this->rawName; + } function getCost(){ return $this->cost; diff --git a/hwe/sammo/BaseWarUnitTrigger.php b/hwe/sammo/BaseWarUnitTrigger.php index 1803118b..69b5ed66 100644 --- a/hwe/sammo/BaseWarUnitTrigger.php +++ b/hwe/sammo/BaseWarUnitTrigger.php @@ -77,6 +77,7 @@ abstract class BaseWarUnitTrigger extends ObjectTrigger{ $self->activateSkill('아이템사용'); $item = $self->getGeneral()->getItem(); $itemName = $item->getName(); + $itemRawName = $item->getRawName(); $self->activateSkill($itemName); if (!($this->raiseType & static::TYPE_CONSUMABLE_ITEM)) { @@ -88,7 +89,7 @@ abstract class BaseWarUnitTrigger extends ObjectTrigger{ } $self->activateSkill('아이템소모'); - $josaUl = JosaUtil::pick($itemName, '을'); + $josaUl = JosaUtil::pick($itemRawName, '을'); $self->getLogger()->pushGeneralActionLog("{$itemName}{$josaUl} 사용!", ActionLogger::PLAIN); $self->general->deleteItem(); diff --git a/hwe/sammo/Command/General/che_군량매매.php b/hwe/sammo/Command/General/che_군량매매.php index af9da5b6..9be9e791 100644 --- a/hwe/sammo/Command/General/che_군량매매.php +++ b/hwe/sammo/Command/General/che_군량매매.php @@ -25,13 +25,6 @@ class che_군량매매 extends Command\GeneralCommand{ static protected $actionName = '군량매매'; static public $reqArg = true; - static $itemMap = [ - 'horse'=>'명마', - 'weapon'=>'무기', - 'book'=>'서적', - 'item'=>'도구', - ]; - protected function argTest():bool{ if($this->arg === null){ return false; diff --git a/hwe/sammo/Command/General/che_장비매매.php b/hwe/sammo/Command/General/che_장비매매.php index 5d618b31..cc319601 100644 --- a/hwe/sammo/Command/General/che_장비매매.php +++ b/hwe/sammo/Command/General/che_장비매매.php @@ -15,7 +15,6 @@ use \sammo\{ use function \sammo\{ tryUniqueItemLottery, - getItemName, buildItemClass }; @@ -110,6 +109,24 @@ class che_장비매매 extends Command\GeneralCommand{ return 0; } + public function getBrief():string{ + $itemType = $this->arg['itemType']; + $itemCode = $this->arg['itemCode']; + + if($itemCode === 'None'){ + $itemTypeName = static::$itemMap[$itemType]; + $josaUl = JosaUtil::pick($itemTypeName, '을'); + return "{$itemTypeName}{$josaUl} 판매"; + } + + + $itemObj = buildItemClass($itemCode); + $itemName = $itemObj->getName(); + $itemRawName = $itemObj->getRawName(); + $josaUl = JosaUtil::pick($itemRawName, '을'); + return "【{$itemName}】{$josaUl} 구입"; + } + public function run():bool{ if(!$this->isRunnable()){ throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도'); @@ -133,8 +150,9 @@ class che_장비매매 extends Command\GeneralCommand{ $itemObj = buildItemClass($itemCode); $cost = $itemObj->getCost(); $itemName = $itemObj->getName(); + $itemRawName = $itemObj->getRawName(); - $josaUl = JosaUtil::pick($itemName, '을'); + $josaUl = JosaUtil::pick($itemRawName, '을'); $logger = $general->getLogger(); @@ -173,8 +191,14 @@ class che_장비매매 extends Command\GeneralCommand{ ?> 장비를 구입하거나 매각합니다.
@@ -186,7 +210,6 @@ function updateItemType(){ $typeName = static::$itemMap[$itemType]; ?> - //구입 $cnt) : if($cnt > 0){ continue; @@ -199,15 +222,15 @@ function updateItemType(){ $reqSecu = $itemClass->getReqSecu(); $reqGold = $itemClass->getCost(); $css = ''; - if($reqSecu < $citySecu){ + if($reqSecu > $citySecu){ $css = 'color:red;'; } ?> - + - +
getItem(); if($itemObj->isConsumableNow('GeneralCommand', '계략') && $itemObj::$consumable){ - $itemName = $itemObj->name; - $josaUl = JosaUtil::pick($itemName, '을'); + $itemName = $itemObj->getName(); + $itemRawName = $itemObj->getRawName(); + $josaUl = JosaUtil::pick($itemRawName, '을'); $logger->pushGeneralActionLog("{$itemName}{$josaUl} 사용!", ActionLogger::PLAIN); $general->deleteItem(); } diff --git a/hwe/sammo/GeneralTrigger/che_아이템치료.php b/hwe/sammo/GeneralTrigger/che_아이템치료.php index 14107f9a..df679055 100644 --- a/hwe/sammo/GeneralTrigger/che_아이템치료.php +++ b/hwe/sammo/GeneralTrigger/che_아이템치료.php @@ -20,7 +20,8 @@ class che_아이템치료 extends BaseGeneralTrigger{ $general->activateSkill('pre.부상경감', 'pre.치료'); $itemObj = $general->getItem(); $itemName = $itemObj->getName(); - $josaUl = JosaUtil::pick($itemName, '을'); + $itemRawName = $itemObj->getRawName(); + $josaUl = JosaUtil::pick($itemRawName, '을'); $general->getLogger()->pushGeneralActionLog("{$itemName}{$josaUl} 사용하여 치료합니다!", ActionLogger::PLAIN); if($itemObj->isConsumableNow('GeneralTrigger', 'che_아이템치료')){