diff --git a/hwe/a_bestGeneral.php b/hwe/a_bestGeneral.php
index 47941618..c28d1b26 100644
--- a/hwe/a_bestGeneral.php
+++ b/hwe/a_bestGeneral.php
@@ -218,7 +218,7 @@ $itemTypes = [
["명 마", 'horse', function($v){return getHorseName($v);}, 7, 26, []],
["명 검", 'weap', function($v){return getWeapName($v);}, 7, 26, []],
["명 서", 'book', function($v){return getBookName($v);}, 7, 26, []],
- ["도 구", 'item', function($v){return getItemName($v);}, 7, 26, []],
+ ["도 구", 'item', function($v){return displayItemInfo($v);}, 7, 26, []],
];
$simpleItemTypes = array_map(function($itemType){return $itemType[1];}, $itemTypes);
diff --git a/hwe/a_genList.php b/hwe/a_genList.php
index 810c7958..1e89d1e9 100644
--- a/hwe/a_genList.php
+++ b/hwe/a_genList.php
@@ -170,7 +170,7 @@ for ($j=0; $j < $gencount; $j++) {
 |
$name |
{$general['age']}세 |
- ".getGenChar($general['personal'])." |
+ ".displayCharInfo($general['personal'])." |
".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])." |
Lv ".getExpLevel($general['experience'])." |
{$nation} |
diff --git a/hwe/a_npcList.php b/hwe/a_npcList.php
index 9544d96c..b9d3645f 100644
--- a/hwe/a_npcList.php
+++ b/hwe/a_npcList.php
@@ -111,7 +111,7 @@ for ($j=0; $j < $gencount; $j++) {
{$general['name2']} |
Lv {$general['explevel']} |
{$nation} |
- ".getGenChar($general['personal'])." |
+ ".displayCharInfo($general['personal'])." |
".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])." |
{$general['sum']} |
{$general['leader']} |
diff --git a/hwe/b_myGenInfo.php b/hwe/b_myGenInfo.php
index 6b54c914..0cd3bcc3 100644
--- a/hwe/b_myGenInfo.php
+++ b/hwe/b_myGenInfo.php
@@ -185,7 +185,7 @@ for($j=0; $j < $gencount; $j++) {
$intel |
{$general['gold']} |
{$general['rice']} |
- ".getGenChar($general['personal'])." |
+ ".displayCharInfo($general['personal'])." |
".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])." |
{$general['belong']} |
{$general['connect']}"; echo " (".getConnect($general['connect']).") |
diff --git a/hwe/func.php b/hwe/func.php
index 4fe0e266..dc9b830f 100644
--- a/hwe/func.php
+++ b/hwe/func.php
@@ -821,7 +821,7 @@ function generalInfo($no) {
$weapname = getWeapName($general['weap']);
$bookname = getBookName($general['book']);
$horsename = getHorseName($general['horse']);
- $itemname = getItemName($general['item']);
+ $itemname = displayItemInfo($general['item']);
if($general['injury'] > 0) {
$leader = intdiv($general['leader'] * (100 - $general['injury']), 100);
$power = intdiv($general['power'] * (100 - $general['injury']), 100);
@@ -913,7 +913,7 @@ function generalInfo($no) {
병사 |
{$general['crew']} |
성격 |
- ".getGenChar($general['personal'])." |
+ ".displayCharInfo($general['personal'])." |
| 훈련 |
diff --git a/hwe/func_converter.php b/hwe/func_converter.php
index b4a9678f..7f348b03 100644
--- a/hwe/func_converter.php
+++ b/hwe/func_converter.php
@@ -135,6 +135,28 @@ function getGenChar($type) {
return $call;
}
+function getCharInfo(?int $type):?string {
+ if($type === null){
+ return null;
+ }
+
+ $infoText = [
+ 10=>['은둔', '명성 -10%, 계급 -10%, 사기 -5, 훈련 -5, 단련 성공률 +10%'],
+ 9=>['안전', '사기 -5, 징·모병 비용 -20%'],
+ 8=>['유지', '훈련 -5, 징·모병 비용 -20%'],
+ 7=>['재간', '명성 -10%, 징·모병 비용 -20%'],
+ 6=>['출세', '명성 +10%, 징·모병 비용 +20%'],
+ 5=>['할거', '명성 -10%, 훈련 +5'],
+ 4=>['정복', '명성 -10%, 사기 +5'],
+ 3=>['패권', '훈련 +5, 징·모병 비용 +20%'],
+ 2=>['의협', '사기 +5, 징·모병 비용 +20%'],
+ 1=>['대의', '명성 +10%, 훈련 -5'],
+ 0=>['왕좌', '명성 +10%, 사기 -5'],
+ ];
+
+ return $infoText[$type][1]??null;
+}
+
function getGenSpecial($type) {
switch($type) {
case 0: $call = '-'; break;
@@ -198,10 +220,10 @@ function getSpecialInfo(?int $type):?string{
20 => ['인덕', '[내정] 주민 선정·정착 장려 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
30 => ['거상', '이것 저것'],
- 31 => ['귀모', '[내정] 화계·탈취·파괴·선동 : 성공률 +20%p'],
+ 31 => ['귀모', '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p'],
40 => ['귀병', '[군사] 귀병 계통 징·모병비 -10%
[전투] 계략 시도 확률 +20%p'],
- 41 => ['신산', '[내정] 화계·탈취·파괴·선동 : 성공률 +10%p
[전투] 계략 시도 확률 +20%p, 계략 성공 확률 +20%p '],
+ 41 => ['신산', '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p
[전투] 계략 시도 확률 +20%p, 계략 성공 확률 +20%p '],
42 => ['환술', '[전투] 계략 시도 확률 +10%p, 계략 성공 시 대미지 +30%'],
43 => ['집중', '[전투] 계략 성공 시 대미지 +50%'],
44 => ['신중', '[전투] 계략 성공 확률 100%'],
@@ -776,7 +798,7 @@ function getHorseEff($horse) : int {
return $horse;
}
-function getItemName($item) : string {
+function getItemName($item) : ?string {
switch($item) {
case 0: $itemname = '-'; break;
case 1: $itemname = '환약(치료)'; break;
@@ -806,10 +828,45 @@ function getItemName($item) : string {
case 24: $itemname = '태평청령(의술)'; break;
case 25: $itemname = '태평요술(회피)'; break;
case 26: $itemname = '둔갑천서(회피)'; break;
+ default: $itemname = null;
}
return $itemname;
}
+function getItemInfo(?int $item):?string{
+ $itemInfo = [
+ 1=>['환약(치료)', '[군사] 턴 실행 전 부상 회복. 1회용'],
+ 2=>['수극(저격)', '[전투] 전투 개시 전 20% 확률로 저격 시도. 1회용'],
+ 3=>['탁주(사기)', '[전투] 사기 보정 +3. 1회용'],
+ 4=>['청주(훈련)', '[전투] 훈련 보정 +3. 1회용'],
+ 5=>['이추(계략)', '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p. 1회용'],
+ 6=>['향낭(계략)', '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p. 1회용'],
+
+ 7=>['오석산(치료)', '[군사] 턴 실행 전 부상 회복.'],
+ 8=>['무후행군(치료)', '[군사] 턴 실행 전 부상 회복.'],
+ 9=>['도소연명(치료)', '[군사] 턴 실행 전 부상 회복.'],
+ 10=>['칠엽청점(치료)', '[군사] 턴 실행 전 부상 회복.'],
+ 11=>['정력견혈(치료)', '[군사] 턴 실행 전 부상 회복.'],
+ 12=>['과실주(훈련)', '[전투] 훈련 보정 +5'],
+ 13=>['이강주(훈련)', '[전투] 훈련 보정 +5'],
+ 14=>['의적주(사기)', '[전투] 사기 보정 +5'],
+ 15=>['두강주(사기)', '[전투] 사기 보정 +5'],
+ 16=>['보령압주(사기)', '[전투] 사기 보정 +5'],
+ 17=>['철벽서(훈련)', '[전투] 훈련 보정 +7'],
+ 18=>['단결도(훈련)', '[전투] 훈련 보정 +7'],
+ 19=>['춘화첩(사기)', '[전투] 사기 보정 +7'],
+ 20=>['초선화(사기)', '[전투] 사기 보정 +7'],
+ 21=>['육도(계략)', '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p'],
+ 22=>['삼략(계략)', '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p'],
+ 23=>['청낭서(의술)', '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복
[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)'],
+ 24=>['태평청령(의술)', '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복
[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)'],
+ 25=>['태평요술(회피)', '[전투] 회피 확률 +20%p'],
+ 26=>['둔갑천서(회피)', '[전투] 회피 확률 +20%p'],
+ ];
+
+ return $itemInfo[$item][1]??null;
+}
+
function getItemCost2($weap) : int {
switch($weap) {
case 0: $weapcost = 0; break;
diff --git a/hwe/func_template.php b/hwe/func_template.php
index 9081d141..70eb11c7 100644
--- a/hwe/func_template.php
+++ b/hwe/func_template.php
@@ -64,6 +64,18 @@ function CoreTurnTable() {
";
}
+function displayCharInfo(?int $type):string{
+ $info = getCharInfo($type);
+ $text = getGenChar($type);
+
+ $templates = new \League\Plates\Engine(__dir__.'/templates');
+
+ return $templates->render('tooltip', [
+ 'text'=>$text,
+ 'info'=>$info,
+ ]);
+}
+
function displaySpecialInfo(?int $type):string{
$info = getSpecialInfo($type);
$text = getGenSpecial($type);
@@ -76,6 +88,19 @@ function displaySpecialInfo(?int $type):string{
]);
}
+function displayItemInfo(?int $type):string{
+ $info = getItemInfo($type);
+ $text = getItemName($type);
+
+ $templates = new \League\Plates\Engine(__dir__.'/templates');
+
+ return $templates->render('tooltip', [
+ 'text'=>$text,
+ 'info'=>$info,
+ ]);
+}
+
+
function allButton() {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
diff --git a/hwe/join.php b/hwe/join.php
index 3022be2f..deb7c57e 100644
--- a/hwe/join.php
+++ b/hwe/join.php
@@ -38,11 +38,24 @@ $connect=$db->get();
var defaultStatTotal = =GameConst::$defaultStatTotal?>;
var defaultStatMin = =GameConst::$defaultStatMin?>;
var defaultStatMax = =GameConst::$defaultStatMax?>;
+
+var charInfoText = ;
+=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
=WebUtil::printCSS('../d_shared/common.css')?>
=WebUtil::printCSS('css/common.css')?>
=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
+=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
=WebUtil::printJS('../d_shared/common_path.js')?>
+=WebUtil::printJS('js/common.js')?>
=WebUtil::printJS('js/join.js')?>
@@ -106,7 +119,7 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
| 성격 |
- |