diff --git a/hwe/func_command.php b/hwe/func_command.php index 02ad584e..4bd39859 100644 --- a/hwe/func_command.php +++ b/hwe/func_command.php @@ -103,21 +103,30 @@ function getTurn(array $general, $type, $font=1) { $str[$i] = "【{$general['name']}】{$josaUl} 등용"; break; case 25: //임관 + $third = $command[2]; $double = $command[1]; - if($double == 98){ - $nationName = '건국된 임의 국가'; + if($third == 98){ + $str[$i] = "【건국된 임의 국가】로 임관"; } - else if($double == 99){ - $nationName = '임의의 국가'; + else if($third == 99){ + $str[$i] = "【임의의 국가】로 임관"; + } + else if($third == 1){ + $generalName = $db->queryFirstField('SELECT name FROM general WHERE no=%i', $double)??'?!?!'; + $josaUl = JosaUtil::pick($generalName, '을'); + $str[$i] = "【{$generalName}】{$josaUl} 따라 임관"; + } + else if($third == 0){ + $nationName = getNationStaticInfo($double)['name']??'?!?!'; + + $josaRo = JosaUtil::pick($nationName, '로'); + $str[$i] = "【{$nationName}】{$josaRo} 임관"; } else{ - $nationName = getNationStaticInfo($double)['name']??'?!?!'; + $str[$i] = "????"; } - - $josaRo = JosaUtil::pick($nationName, '로'); - $str[$i] = "【{$nationName}】{$josaRo} 임관"; break; case 26: //집합 $str[$i] = "집합"; diff --git a/hwe/func_npc.php b/hwe/func_npc.php index 7abe8c36..fd46eec0 100644 --- a/hwe/func_npc.php +++ b/hwe/func_npc.php @@ -399,7 +399,7 @@ function processAI($no) { } else{ //랜임 커맨드 입력. - $command = EncodeCommand(0, 0, 99, 25); //임관 + $command = EncodeCommand(0, 99, 0, 25); //임관 } break; case 1: //거병이나 견문 40% diff --git a/hwe/func_process_personnel.php b/hwe/func_process_personnel.php index 0eade9c9..368ade4a 100644 --- a/hwe/func_process_personnel.php +++ b/hwe/func_process_personnel.php @@ -80,10 +80,11 @@ function process_25(&$general) { $city = MYDB_fetch_array($result); $command = DecodeCommand($general['turn0']); + $type = $command[2]; $where = $command[1]; - if($admin['join_mode'] == 'onlyRandom' && $where < 98){ - $where = 99; + if($admin['join_mode'] == 'onlyRandom' && $type < 98){ + $type = 99; } $nation = null; @@ -91,7 +92,7 @@ function process_25(&$general) { $joinedNations = Json::decode($general['nations']); // 랜덤임관인 경우 - if($general['npc'] >= 2 && $where >= 98 && !$admin['fiction'] && 1000 <= $admin['scenario'] && $admin['scenario'] < 2000){ + if($general['npc'] >= 2 && $type >= 98 && !$admin['fiction'] && 1000 <= $admin['scenario'] && $admin['scenario'] < 2000){ //'사실' 모드에서는 '성향'에 우선을 두되, 장수수, 랜덤에 비중을 둠 $nations = $db->query( 'SELECT nation.`name` as `name`,nation.nation as nation,scout,nation.`level` as `level`,gennum,`affinity` FROM nation join general on general.nation = nation.nation and general.level = 12 WHERE nation.nation not in %li and gennum < %i and scout = 0', @@ -124,7 +125,7 @@ function process_25(&$general) { } } - else if($where >= 98) { + else if($type >= 98) { //랜임 $generals = []; foreach($db->queryAllLists('SELECT count(no), nation FROM general WHERE npc <= 2 AND nation > 0 GROUP BY nation') as list($cnt, $nation)){ @@ -161,7 +162,7 @@ function process_25(&$general) { $randVals = []; foreach($nations as $idx=>$testNation){ // 임관금지없음 국가, 방랑군 제외 - if($where == 98 && $testNation['level'] == 0){ + if($type == 98 && $testNation['level'] == 0){ continue; } @@ -181,7 +182,10 @@ function process_25(&$general) { $nation = null; } - } else { + } else if($type == 0) { + $nation = $db->queryFirstRow('SELECT `name`,nation,scout,`level` FROM nation WHERE nation=%i', $where); + } else if($type == 1){ + $where = $db->queryFirstField('SELECT nation FROM general WHERE no=%i', $where)??0; $nation = $db->queryFirstRow('SELECT `name`,nation,scout,`level` FROM nation WHERE nation=%i', $where); } diff --git a/hwe/processing.php b/hwe/processing.php index a1862638..444fe712 100644 --- a/hwe/processing.php +++ b/hwe/processing.php @@ -717,6 +717,8 @@ function command_25($turn, $command) { } } unset($nation); + + $generalList = $db->query('SELECT no,name,nation,npc FROM general WHERE owner!=%i ORDER BY name ASC', $userID); ?> 국가에 임관합니다.
@@ -727,22 +729,31 @@ function command_25($turn, $command) { 임관할 국가를 목록에서 선택하세요.
-!!!는 방랑군을 포함한 랜덤임관입니다. 유니크를 기대하신다면!
-???는 방랑군을 제외한 랜덤임관입니다. 유니크 혜택은 없습니다.
+임의의 국가로 임관할 경우 유니크 아이템을 얻을 기회가 높습니다. 임관 금지이거나 초기 제한중인 국가는 붉은색 배경으로 표시됩니다.
870px x 200px를 넘어서는 내용은 표시되지 않습니다.
- + + @@ -751,6 +762,29 @@ function command_25($turn, $command) { >
+