Compare commits

...
63 Commits
Author SHA1 Message Date
Hide_D 30c219716d 오타 수정 2018-07-18 09:08:20 +09:00
Hide_D 5dd47cb89b 오타수정 2018-07-18 09:05:36 +09:00
Hide_D abe856bd3f 버그 수정. 오타 수정 2018-07-18 08:24:09 +09:00
Hide_D 6ecb009466 오타 수정 2018-07-18 04:51:19 +09:00
Hide_D 3b4b2383a8 $me 버그 2018-07-18 04:50:17 +09:00
Hide_D 4ddd46c4a2 모병코드 2018-07-18 04:49:30 +09:00
Hide_D 69ec2469b4 쌀 검사 코드 2018-07-18 04:47:28 +09:00
Hide_D 5789af801a 징모병창 코스트 2018-07-18 04:44:12 +09:00
Hide_D 7171b6302b formattext 2018-07-18 04:41:08 +09:00
Hide_D 51d4818b1e gameStor 값 버그 2018-07-18 04:40:18 +09:00
Hide_D 1c2875e7fc 모병창 수정 2018-07-18 04:37:00 +09:00
Hide_D 5048a88310 징병창 우선 부활 2018-07-18 04:30:54 +09:00
Hide_D aef37f4362 징모병창 변수명 에러 2018-07-18 04:18:15 +09:00
Hide_D d04641041b 아이템 return 값 수정 2018-07-18 04:15:28 +09:00
Hide_D 67b2ccea86 급한대로 도시명 띄움 2018-07-18 04:10:07 +09:00
Hide_D 5ff9ca3c99 miniche가 최신 버전이 아닌 버그 수정 2018-07-18 03:44:32 +09:00
Hide_D fe55df8b2f 버그 체크 2018-07-18 03:41:45 +09:00
Hide_D 457f605898 버그 수정 2018-07-18 03:32:47 +09:00
Hide_D 0f2625133f 미니체 basemap 2018-07-18 03:05:36 +09:00
Hide_D fa34dbdf6f 초기 버그 수정 2018-07-18 03:04:59 +09:00
Hide_D 050913b0b4 영난 1c 2018-07-18 02:58:56 +09:00
Hide_D a47e47d42c 도시 정보 업데이트 2018-07-18 02:57:08 +09:00
Hide_D 43d994b59a credit 링크 추가 2018-07-18 02:31:15 +09:00
Hide_D e8204d46ce 커스텀 맵 준비 2018-07-18 00:25:51 +09:00
Hide_D fece659cfb 변수명 통일 2018-07-16 02:56:52 +09:00
Hide_D 695265b299 병종 코드를 GameUnitConst, GameUnitDetail에 기반하도록 변경 2018-07-16 02:54:47 +09:00
Hide_D b652ed0b33 병종 테이블에 상성 값 확장 2018-07-16 01:43:11 +09:00
Hide_D 9a641552e4 전투 코드 반영 중 2018-07-15 01:46:29 +09:00
Hide_D 3d18aeb5bc 징병, 모병 form 수정 2018-07-15 01:01:36 +09:00
Hide_D b545afce50 모병, 징병 코드 재 구현. 능력치 상승/감소 코드 재구현 2018-07-14 22:41:10 +09:00
Hide_D 8fca98c0c9 ActionLogger rollback 추가 2018-07-14 18:23:31 +09:00
Hide_D 0a98c71dfe 현재까지 작업물 보강, 모.징병 페이지 개선 중 2018-07-14 18:17:37 +09:00
Hide_D ed75f39094 ActionLogger 보강 2018-07-14 18:17:18 +09:00
Hide_D 456245f23a ActionLogger 추가 2018-07-14 17:53:08 +09:00
Hide_D b4529c9338 병종값 변경 2018-07-13 00:41:56 +09:00
Hide_D 0ca7a8ab8a 병종 테이블에 '병종 타입' 지정, 턴 커맨드를 json array로 변경 2018-07-13 00:12:12 +09:00
Hide_D 02f2209e8f GameConst에 mapName과 unitSet추가 2018-07-12 01:59:32 +09:00
Hide_D fb72d02912 d_setting 디렉도리 보관 방식 변경 2018-07-12 01:56:46 +09:00
Hide_D 665fb25fc1 기본 파일 추가 2018-07-12 01:02:28 +09:00
Hide_D 742c3c7156 맵 규격 재 정의 2018-07-12 01:00:24 +09:00
Hide_D 637dbbba0d 새 지도 준비를 위해 커밋 2018-07-12 00:20:43 +09:00
Hide_D f2a3bc4626 메시지함 높이 고정을 최소 높이로 변경 2018-07-11 23:49:57 +09:00
Hide_D e8ffa44544 메시지함 사라지는 버그 수정? 2018-07-11 23:04:38 +09:00
Hide_D bc09287666 도움 주신 분 임시 삭제. 나중에 Credit으로 되살리기로 2018-07-11 22:37:36 +09:00
Hide_D 392d9055fe td tr 되돌려놓음 2018-07-11 22:18:08 +09:00
Hide_D 0ee833d7ae list 일부 수정. tfoot 안에 tr td없는거 수정 2018-07-11 22:17:03 +09:00
Hide_D 3074bc00d7 지도 표기에서 box 표기 문제로 일부 수정 2018-07-11 22:04:20 +09:00
Hide_D cb6fb590c4 귀병, 환술 설명 수정 2018-07-11 21:53:13 +09:00
Hide_D a7270b2cd2 장수 성격, 아이템 설명 툴팁 추가 2018-07-11 21:50:01 +09:00
Hide_D 0d925af065 tooltip html trim 추가 2018-07-11 20:52:46 +09:00
Hide_D 7c7991e8ae 특기 없을 때 텍스트 수정 2018-07-11 20:51:13 +09:00
Hide_D 54461b6ea4 특기가 없는 경우에도 tooltip 띄우도록 2018-07-11 17:03:47 +09:00
Hide_D 6a17497fbd 빙의 시에도 전특 표기 2018-07-11 03:27:27 +09:00
Hide_D 84f18aa4b6 특기 전 페이지에 반영 2018-07-11 03:03:52 +09:00
Hide_D 73ab38563f 특기 마우스 오버 1차 적용 2018-07-11 02:47:31 +09:00
Hide_D 1f2b40e4d4 message form box sizing 변경. 메인 페이지에 bootstrap css 적용 2018-07-11 01:31:59 +09:00
Hide_D 1d920c5935 darkly 적용 2018-07-11 01:19:24 +09:00
Hide_D 037a1e9c0c 툴팁 준비 2018-07-11 01:15:22 +09:00
Hide_D 87e324d4d9 bootstrap 최신 버전으로 2018-07-11 01:15:02 +09:00
Hide_D d1e9b489e3 공성 전특 버그 수정. 전특 설명을 위한 텍스트 추가 2018-07-11 00:53:10 +09:00
Hide_D 34f1d538d1 세력도시에서 n장, m장 임명이 불가능한 버그 수정 2018-07-07 05:13:22 +09:00
Hide_D fb8d2a2e01 구버전 첩보 마이그레이션시 지도 표기 버그 수정 2018-07-07 04:58:19 +09:00
Hide_D 837db5183e 첩보를 join '|' 에서 json dict로 변경 2018-07-07 04:39:44 +09:00
118 changed files with 3429 additions and 1925 deletions
+2 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3 -3
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-4
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -15,6 +15,7 @@ require(__dir__.'/../vendor/autoload.php');
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
<?=WebUtil::printJS('../js/common.js')?>
<?=WebUtil::printJS('../js/install.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../css/install.css')?>
+34 -8
View File
@@ -41,18 +41,44 @@
url('_tK_gameImagePath_/winter.gif') no-repeat right;
}
.map_spring .map_body{
background: url('_tK_gameImagePath_/map1.jpg') no-repeat;
/*체 지도*/
.map_theme_che.map_spring .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
}
.map_summer .map_body{
background: url('_tK_gameImagePath_/map2.jpg') no-repeat;
.map_theme_che.map_summer .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
}
.map_fall .map_body{
background: url('_tK_gameImagePath_/map3.jpg') no-repeat;
.map_theme_che.map_fall .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
}
.map_winter .map_body{
background: url('_tK_gameImagePath_/map4.jpg') no-repeat;
.map_theme_che.map_winter .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
}
.map_theme_che .map_bgroad{
background: url('_tK_gameImagePath_/map/che/che_road.png') no-repeat;
}
/*미니체 지도*/
.map_theme_miniche.map_spring .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
}
.map_theme_miniche.map_summer .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
}
.map_theme_miniche.map_fall .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
}
.map_theme_miniche.map_winter .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
}
.map_theme_miniche .map_bgroad{
background: url('_tK_gameImagePath_/map/che/miniche_road.png') no-repeat;
}
+1 -1
View File
@@ -30,7 +30,7 @@ $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
list($turntime, $tnmt_time) = $gameStor->getValuesAsArray(['turntime','tnmt_time']);
[$turntime, $tnmt_time] = $gameStor->getValuesAsArray(['turntime','tnmt_time']);
$query = "select plock from plock";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+2 -2
View File
@@ -58,7 +58,7 @@ $db = DB::db();
<?php
echo "
<select name=genlist[] size=20 multiple style=color:white;background-color:black;font-size:13>";
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:13px'>";
$generalList = $db->query('SELECT `no`, `name`, npc, `block` FROM general ORDER BY npc, binary(`name`)');
foreach($generalList as $general){
@@ -76,7 +76,7 @@ echo "
</td>
<td width=100 align=center>아이템 지급</td>
<td width=504>
<select name=weap size=1 style=color:white;background-color:black;font-size:13>";
<select name=weap size=1 style='color:white;background-color:black;font-size:13px'>";
for($i=0; $i < 27; $i++) {
echo "
<option value={$i}>{$i}</option>";
+5 -5
View File
@@ -93,13 +93,13 @@ switch($btn) {
case "강제 사망":
$date = date('Y-m-d H:i:s');
$db->update('general', [
'turn0'=>0,
'turn0'=>EncodeCommand(0, 0, 0, 0),
'killturn'=>0,
'turntime'=>$date,
], '`no` IN %li', $genlist);
break;
case "특기 부여":
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
$text = "특기 부여!";
foreach($db->query("SELECT `no`,leader,power,intel,dex0,dex10,dex20,dex30,dex40 FROM general WHERE `no` IN %li", $genlist) as $general){
@@ -314,13 +314,13 @@ switch($btn) {
break;
case "하야입력":
$db->update('general', [
'turn0'=>'00000000000045'
'turn0'=>EncodeCommand(0, 0, 0, 45)
], '`no` IN %li', $genlist);
break;
case "방랑해산":
$db->update('general', [
'turn0'=>'00000000000047',
'turn1'=>'00000000000056'
'turn0'=>EncodeCommand(0, 0, 0, 47),
'turn1'=>EncodeCommand(0, 0, 0, 56)
], '`no` IN %li', $genlist);
break;
case "NPC설정":
+1 -1
View File
@@ -55,7 +55,7 @@ $conlimit = $gameStor->conlimit;
<?php
echo "
<select name=genlist[] size=20 multiple style=color:white;background-color:black;font-size:13>";
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:13px'>";
foreach($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general){
$style = "style=;";
+1 -1
View File
@@ -52,7 +52,7 @@ switch($btn) {
break;
case "강제 사망":
$date = date('Y-m-d H:i:s');
DB::db()->query('update general set turn0=0,killturn=0,turntime=%s where no IN %li',$date, $genlist);
DB::db()->query('update general set turn0=%s,killturn=0,turntime=%s where no IN %li',EncodeCommand(0, 0, 0, 0),$date, $genlist);
break;
case "메세지 전달":
//TODO:새 갠메 시스템으로 변경
+6 -1
View File
@@ -26,9 +26,14 @@ increaseRefresh("명장일람", 1);
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1136" />
<title><?=UniqueConst::$serverName?>: 명장일람</title>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/hallOfFame.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
</head>
<body>
@@ -213,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);
+5 -2
View File
@@ -41,10 +41,13 @@ if ($type <= 0 || $type > 15) {
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 장수일람</title>
<?=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')?>
</head>
@@ -167,8 +170,8 @@ for ($j=0; $j < $gencount; $j++) {
<td align=center><img width='64' height='64' src={$imageTemp}/{$general['picture']}></img></td>
<td align=center>$name</td>
<td align=center>{$general['age']}세</td>
<td align=center>".getGenChar($general['personal'])."</td>
<td align=center>".getGenSpecial($general['special'])." / ".getGenSpecial($general['special2'])."</td>
<td align=center>".displayCharInfo($general['personal'])."</td>
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
<td align=center>Lv ".getExpLevel($general['experience'])."</td>
<td align=center>{$nation}</td>
<td align=center>".getHonor($general['experience'])."</td>
+4
View File
@@ -36,11 +36,15 @@ else{
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1136" />
<title><?=UniqueConst::$serverName?>: 명예의 전당</title>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/hallOfFame.css')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJs('js/hallOfFame.js')?>
</head>
+10 -3
View File
@@ -25,7 +25,7 @@ if($serverID === UniqueConst::$serverID){
increaseRefresh("연감", 1);
}
$admin = $gameStor->getValues(['startyear','year','month']);
$admin = $gameStor->getValues(['startyear','year','month','map_theme']);
$query = "select con,turntime from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
@@ -45,6 +45,13 @@ $s = $s_year * 12 + $s_month;
[$e_year, $e_month] = $db->queryFirstList('SELECT year, month FROM history WHERE server_id = %s ORDER BY year DESC, month DESC LIMIT 1', $serverID);
$e = $e_year * 12 + $e_month;
if($serverID !== UniqueConst::$serverID){
$mapTheme = $db->queryFirstColumn('SELECT map FROM ng_games WHERE server_id=%s', $serverID)??'che';
}
else{
$mapTheme = $admin['map_theme']??'che';
}
//FIXME: $yearmonth가 올바르지 않을 경우에 처리가 필요.
if($serverID !== UniqueConst::$serverID && !$yearmonth){
$year = $s_year;
@@ -91,7 +98,7 @@ if ($month <= 0) {
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/base_map.js')?>
<?=WebUtil::printJS("js/map/theme_{$mapTheme}.js")?>
<?=WebUtil::printJS('js/map.js')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
@@ -133,7 +140,7 @@ $history = $db->queryFirstRow('SELECT log,genlog,nation,power,gen,city FROM hist
<tr><td colspan=5 align=center id=bg1>중 원 지 도</td></tr>
<tr height=520>
<td width=698>
<?=getMapHtml();?>
<?=getMapHtml($mapTheme);?>
<td width=139 valign=top><div style='background-color:#cccccc;color:black;text-align:center'>국명</div><?=$history['nation']?></td>
<td width=70 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>국력</div><?=$history['power']?></td>
+7 -2
View File
@@ -29,9 +29,14 @@ $sel[$type] = "selected";
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 빙의일람</title>
<?=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('js/common.js')?>
</head>
<body>
@@ -106,8 +111,8 @@ for ($j=0; $j < $gencount; $j++) {
<td align=center>{$general['name2']}</td>
<td align=center>Lv {$general['explevel']}</td>
<td align=center>{$nation}</td>
<td align=center>".getGenChar($general['personal'])."</td>
<td align=center>".getGenSpecial($general['special'])." / ".getGenSpecial($general['special2'])."</td>
<td align=center>".displayCharInfo($general['personal'])."</td>
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
<td align=center>{$general['sum']}</td>
<td align=center>{$general['leader']}</td>
<td align=center>{$general['power']}</td>
+4 -2
View File
@@ -14,6 +14,8 @@ $connect=$db->get();
increaseRefresh("세력도", 2);
checkTurn();
$mapTheme = $gameStor->map_theme??'che';
$query = "select con,turntime from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
@@ -31,7 +33,7 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/base_map.js')?>
<?=WebUtil::printJS('d_shared/base_map.js')?>
<?=WebUtil::printJS('js/map.js')?>
<script>
$(function(){
@@ -60,7 +62,7 @@ $(function(){
<?=getGeneralPublicRecordRecent(34)?>
</td>
<td width=698>
<?=getMapHtml()?>
<?=getMapHtml($mapTheme)?>
</td>
</tr>
<tr>
+26 -21
View File
@@ -21,9 +21,7 @@ $query = "select no,nation,level,city from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$query = "select nation,level,spy from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$myNation = MYDB_fetch_array($result);
$myNation = $db->queryFirstRow('SELECT nation,level,spy FROM nation WHERE nation=%i', $me['nation']);
$templates = new \League\Plates\Engine('templates');
@@ -121,27 +119,34 @@ if($me['level'] == 0) {
if($myNation['level'] > 0) {
// 첩보도시도 목록에 추가
$where = 'city=0';
$cities = array_map('intval',explode("|", $myNation['spy']));
foreach($cities as $citySpy) {
$city = intdiv($citySpy, 10);
$where .= " or city='{$city}'";
$rawSpy = $myNation['spy'];
if($rawSpy == ''){
$spyCities = [];
}
else if(strpos($rawSpy, '|') !== false || is_numeric($rawSpy)){
//TODO: 0.8 버전 이후에는 삭제할 것. 이후 버전은 json으로 변경됨.
$spyCities = array_map(function($val){
$val = intval($val);
return intdiv($val, 10);
}, 'intval',explode('|', $myNation['spy']));
}
else{
$spyCities = array_keys(Json::decode($rawSpy));
}
$query = "select city,name,nation from city where {$where}";
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$citycount = MYDB_num_rows($cityresult);
for($i=0; $i < $citycount; $i++) {
$city = MYDB_fetch_array($cityresult);
echo "
<option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
echo ">==================================================【".StringUtil::padString($city['name'], 4, '_')."】";
if($city['nation'] == 0) echo "공백지";
elseif($me['nation'] == $city['nation']) echo "국==";
else echo "타국==";
echo "============================================</option>";
if($spyCities){
foreach ($db->query('SELECT city,name,nation FROM city WHERE city in %li', $spyCities) as $city) {
echo "<option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
echo ">==================================================【".StringUtil::padString($city['name'], 4, '_')."】";
if($city['nation'] == 0) echo "공백지";
elseif($me['nation'] == $city['nation']) echo "본국==";
else echo "국==";
echo "============================================</option>";
}
}
}
+4
View File
@@ -48,6 +48,10 @@ if ($me['level'] >= 5) {
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 내무부</title>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
+6 -4
View File
@@ -13,6 +13,8 @@ $connect=$db->get();
increaseRefresh("중원정보", 1);
$mapTheme = $gameStor->map_theme??'che';
$query = "select no,nation from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
@@ -45,11 +47,11 @@ for($i=0; $i < $nationcount; $i++) {
}
$realConflict = [];
foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE conflict!=%s', '{}') as list(
foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE conflict!=%s', '{}') as [
$cityID,
$cityName,
$rawConflict
))
])
{
$conflict = Json::decode($rawConflict);
if (count($conflict)<2) {
@@ -80,7 +82,7 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/base_map.js')?>
<?=WebUtil::printJS('d_shared/base_map.js')?>
<?=WebUtil::printJS('js/map.js')?>
<script>
$(function(){
@@ -214,7 +216,7 @@ for($i=0; $i < $nationcount; $i++) {
</tr>
<tr>
<td width=698 height=420>
<?=getMapHtml()?>
<?=getMapHtml($mapTheme)?>
</td>
<td width=139 valign=top><div style='background-color:#cccccc;color:black;text-align:center'>국명</div><?=$nationStr?></td>
<td width=70 valign=top style='text-align:center'><div style='background-color:#cccccc;color:black;'>국력</div><?=$powerStr?></td>
+3
View File
@@ -54,9 +54,12 @@ $sel[$type] = "selected";
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 암행부</title>
<?=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('js/common.js')?>
</head>
<body>
+6 -2
View File
@@ -40,8 +40,12 @@ $sel = [$type => "selected"];
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 세력장수</title>
<?=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('js/common.js')?>
</head>
@@ -181,8 +185,8 @@ for($j=0; $j < $gencount; $j++) {
<td align=center>$intel</td>
<td align=center>{$general['gold']}</td>
<td align=center>{$general['rice']}</td>
<td align=center>".getGenChar($general['personal'])."</td>
<td align=center>".getGenSpecial($general['special'])." / ".getGenSpecial($general['special2'])."</td>
<td align=center>".displayCharInfo($general['personal'])."</td>
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
<td align=center>{$general['belong']}</td>
<td align=center>{$general['connect']}"; echo "<br>(".getConnect($general['connect']).")</td>
</tr>";
+2 -2
View File
@@ -126,11 +126,11 @@ for($i=0; $i < $troopcount; $i++) {
</td>
</tr>
<tr><td align=center><font size=2>【턴】".substr($turntime, 14)."</font></td><td align=center><font size=1>$name</font></td></tr>
<tr><td colspan=5>";
<tr><td colspan=5></td></tr>";
}
}
echo "</tbody>
<tfoot>";
<tfoot><tr><td>";
if ($troopcount == 0) {
}
else if($me['troop'] == 0) {
+1 -1
View File
@@ -163,7 +163,7 @@ if($btn == "추방") {
$query = "update city set gen3='0' where gen3='{$general['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
if($general['npc'] >= 2 && ($admin['scenario'] == 0 || rand()%100 == 0)) {
if($general['npc'] >= 2 && ($admin['scenario'] < 100 || rand()%100 == 0)) {
switch(rand()%5) {
case 0: $str = "날 버리다니... 곧 전장에서 복수해주겠다..."; break;
case 1: $str = "추방이라... 내가 무얼 잘못했단 말인가..."; break;
+4 -32
View File
@@ -188,38 +188,10 @@ div.bar_out div.bar_in{
}
.tooltip{
position: relative;
font-size:12px;
font-family: '맑은 고딕';
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: #555;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -60px;
opacity: 0;
transition: opacity 0.3s;
.tooltiptext {
display: none;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #555 transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
+37 -2
View File
@@ -27,6 +27,30 @@
position:relative;
}
.map_body .map_bglayer1{
width:100%;
height:100%;
position:absolute;
left:0;
top:0;
}
.map_body .map_bglayer2{
width:100%;
height:100%;
position:absolute;
left:0;
top:0;
}
.map_body .map_bgroad{
width:100%;
height:100%;
position:absolute;
left:0;
top:0;
}
.world_map .city_tooltip{
position: absolute;
z-index:6;
@@ -63,13 +87,22 @@
.world_map.map_detail .city_filler{
position:absolute;
width:100%;
height:100%;
width:calc(100% + 2px);
height:calc(100% + 2px);
left:-1px;
top:-1px;
background:transparent;
}
.world_map .city_detail_name{
background-color:rgba(0,0,0,0.5);
font-size:10px;
position:absolute;
white-space:nowrap;
left:70%;
bottom:-10px;
color:white;
}
.city_base{
position:absolute;
@@ -314,6 +347,8 @@
/* Basic */
.world_map.map_basic .city_filler{
position:absolute;
width:100%;
+13 -11
View File
@@ -17,15 +17,14 @@
#message_board section{
overflow-y:auto;
overflow-x:hidden;
max-width:498px;
}
.msg_plate{
width:100%;
border-bottom:solid 1px gray;
border-left:solid 1px gray;
border-right:solid 1px gray;
height:64px;
outline-style:solid;
outline-width:1px;
outline-color: gray;
min-height:64px;
font-size:12px;
word-break:break-all;
color:white;
@@ -96,7 +95,8 @@
font-size:12px;
width:715px;
margin:0 2px;
height:15px;
height:20px;
border:solid 1px gray;
}
#msg_submit{
@@ -116,17 +116,19 @@
.board_header{
color:white;
border:solid 1px gray;
outline-style:solid;
outline-width:1px;
outline-color: gray;
}
.board_side{
position:absolute;
height:1370px;
width:498px;
width:50%;
overflow-y: hidden;
border-left:solid 1px;
border-right:solid 1px;
border-bottom:solid 1px;
outline-style:solid;
outline-width:1px;
outline-color: gray;
}
.msg_body{
+7
View File
@@ -0,0 +1,7 @@
<?php
namespace sammo;
class CityConst extends CityConstBase{
}
+6
View File
@@ -0,0 +1,6 @@
<?php
namespace sammo;
class GameConst extends GameConstBase
{
}
-12
View File
@@ -1,12 +0,0 @@
<?php
namespace sammo;
class GameCustomConst
{
/** @var int 유저 스탯 총합 */
public static $defaultStatTotal = _tK_statTotal_;
public static $defaultStatMin = _tK_statMin_;
public static $defaultStatMax = _tK_statMax_;
public static $defaultStatNPCMax = _tK_statNPCMax_;
public static $chiefStatMin = _tK_statChiefMin_;
}
+6
View File
@@ -0,0 +1,6 @@
<?php
namespace sammo;
class GameUnitConst extends GameUnitConstBase
{
}
+1
View File
@@ -0,0 +1 @@
Deny from all
+75 -12
View File
@@ -490,7 +490,7 @@ function commandTable() {
$develcostE = Util::round($develcostE);
echo "
<select name=commandtype size=1 style=width:260px;color:white;background-color:black;font-size:12px;>";
<select name=commandtype size=1 style='height:20px;width:260px;color:white;background-color:black;font-size:12px;'>";
addCommand("휴 식", 0);
addCommand("요 양", 50);
commandGroup("========= 내 정 ==========");
@@ -699,7 +699,7 @@ function CoreCommandTable() {
if($city['supply'] == 0) { $valid = 0; }
echo "
<select name=commandtype size=1 style=color:white;background-color:black;font-size:13>";
<select name=commandtype size=1 style='height:20px;color:white;background-color:black;font-size:13px;>";
addCommand("휴 식", 99);
commandGroup("", 1);
commandGroup("====== 인 사 ======");
@@ -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);
@@ -847,8 +847,8 @@ function generalInfo($no) {
else { $general['age'] = "<font color=red>{$general['age']} 세</font>"; }
$general['connect'] = Util::round($general['connect'] / 10) * 10;
$special = $general['special'] == 0 ? "{$general['specage']}" : "<font color=limegreen>".getGenSpecial($general['special'])."</font>";
$special2 = $general['special2'] == 0 ? "{$general['specage2']}" : "<font color=limegreen>".getGenSpecial($general['special2'])."</font>";
$special = $general['special'] == 0 ? "{$general['specage']}" : "<font color=limegreen>".displaySpecialInfo($general['special'])."</font>";
$special2 = $general['special2'] == 0 ? "{$general['specage2']}" : "<font color=limegreen>".displaySpecialInfo($general['special2'])."</font>";
switch($general['personal']) {
case 2: case 4:
@@ -913,7 +913,7 @@ function generalInfo($no) {
<td style='text-align:center;' class='bg1'><b>병사</b></td>
<td style='text-align:center;' colspan=2>{$general['crew']}</td>
<td style='text-align:center;' class='bg1'><b>성격</b></td>
<td style='text-align:center;' colspan=2>".getGenChar($general['personal'])."</td>
<td style='text-align:center;' colspan=2>".displayCharInfo($general['personal'])."</td>
</tr>
<tr>
<td style='text-align:center;' class='bg1'><b>훈련</b></td>
@@ -1128,7 +1128,7 @@ function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) {
$db = DB::db();
$connect=$db->get();
$message = explode("|", $msg);
$message = explode('|', $msg);
$count = (count($message) - 2)/2;
$message[0] = Tag2Code($message[0]);
$message[1] = Tag2Code($message[1]);
@@ -1180,11 +1180,10 @@ function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) {
function banner() {
return sprintf(
'<font size=2>%s %s / %s <br> %s</font>',
'<font size=2>%s %s / %s</font>',
GameConst::$title,
VersionGit::$version,
GameConst::$banner,
GameConst::$helper);
GameConst::$banner);
}
function addTurn($date, int $turnterm, int $turn=1) {
@@ -1871,7 +1870,7 @@ function PreprocessCommand($no) {
$josaUl = JosaUtil::pick($general['item'], '을');
$log[0] = "<C>●</><C>".getItemName($general['item'])."</>{$josaUl} 사용하여 치료합니다!";
pushGenLog($general, $log);
} elseif($general['injury'] > 10 && $general['item'] == 1 && $general['turn0'] != EncodeCommand(0, 0, 0, 50)) {
} elseif($general['injury'] > 10 && $general['item'] == 1 && DecodeCommand($general['turn0'])[0] != 50) {
//환약 사용
$query = "update general set injury=0,item=0 where no='$no'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -2167,6 +2166,7 @@ function CheckHall($no) {
function uniqueItem($general, $log, $vote=0) {
//TODO: uniqueItem 재 구현
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
@@ -2184,7 +2184,7 @@ function uniqueItem($general, $log, $vote=0) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$gen = MYDB_fetch_array($result);
if($admin['scenario'] == 0) { $prob = $gen['cnt'] * 5; } // 5~6개월에 하나씩 등장
if($admin['scenario'] < 100) { $prob = $gen['cnt'] * 5; } // 5~6개월에 하나씩 등장
else { $prob = $gen['cnt']; } // 1~2개월에 하나씩 등장
if($vote == 1) { $prob = Util::round($gen['cnt'] * 0.7 / 3); } // 투표율 70%, 투표 한번에 2~3개 등장
@@ -2295,6 +2295,69 @@ function uniqueItem($general, $log, $vote=0) {
return $log;
}
function checkAbilityEx(int $generalID, ActionLogger $actLog){
$db = DB::db();
$general = $db->queryFirstRow('SELECT leader,leader2,power,power2,intel,intel2 FROM general WHERE no = %i',$generalID);
if(!$general){
return;
}
if($general['leader2'] < 0){
$db->update('general',[
'leader2'=>$db->sqleval('leader2 + %i', GameConst::$upgradeLimit),
'leader'=>$db->sqleval('leader - 1')
], 'no=%i', $generalID);
$actLog->pushGeneralActionLog('<R>통솔</>이 <C>1</> 떨어졌습니다!', ActionLogger::PLAIN);
return;
}
if($general['power2'] < 0){
$db->update('general',[
'power2'=>$db->sqleval('power2 + %i', GameConst::$upgradeLimit),
'power'=>$db->sqleval('power - 1')
], 'no=%i', $generalID);
$actLog->pushGeneralActionLog('<R>무력</>이 <C>1</> 떨어졌습니다!', ActionLogger::PLAIN);
return;
}
if($general['intel2'] < 0){
$db->update('general',[
'intel2'=>$db->sqleval('intel2 + %i', GameConst::$upgradeLimit),
'intel'=>$db->sqleval('intel - 1')
], 'no=%i', $generalID);
$actLog->pushGeneralActionLog('<R>지력</>이 <C>1</> 떨어졌습니다!', ActionLogger::PLAIN);
return;
}
if($general['leader2'] >= GameConst::$upgradeLimit){
$db->update('general',[
'leader2'=>$db->sqleval('leader2 - %i', GameConst::$upgradeLimit),
'leader'=>$db->sqleval('leader + 1')
], 'no=%i', $generalID);
$actLog->pushGeneralActionLog('<R>통솔</>이 <C>1</> 올랐습니다!', ActionLogger::PLAIN);
return;
}
if($general['power2'] >= GameConst::$upgradeLimit){
$db->update('general',[
'power2'=>$db->sqleval('power2 - %i', GameConst::$upgradeLimit),
'power'=>$db->sqleval('power + 1')
], 'no=%i', $generalID);
$actLog->pushGeneralActionLog('<R>무력</>이 <C>1</> 올랐습니다!', ActionLogger::PLAIN);
return;
}
if($general['intel2'] >= GameConst::$upgradeLimit){
$db->update('general',[
'intel2'=>$db->sqleval('intel2 - %i', GameConst::$upgradeLimit),
'intel'=>$db->sqleval('intel + 1')
], 'no=%i', $generalID);
$actLog->pushGeneralActionLog('<R>지력</>이 <C>1</> 올랐습니다!', ActionLogger::PLAIN);
return;
}
}
function checkAbility($general, $log) {
$db = DB::db();
$connect=$db->get();
+6 -15
View File
@@ -628,7 +628,7 @@ function updateCommand($no, $type=0) {
update general set
turn0=turn1,turn1=turn2,turn2=turn3,turn3=turn4,turn4=turn5,turn5=turn6,turn6=turn7,turn7=turn8,turn8=turn9,
turn9=turn10,turn10=turn11,turn11=turn12,turn12=turn13,turn13=turn14,turn14=turn15,turn15=turn16,turn16=turn17,
turn17=turn18,turn18=turn19,turn19=turn20,turn20=turn21,turn21=turn22,turn22=turn23,turn23='00000000000000'
turn17=turn18,turn18=turn19,turn19=turn20,turn20=turn21,turn21=turn22,turn22=turn23,turn23='".EncodeCommand(0, 0, 0, 0)."'
where no='{$general['no']}'
";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -642,7 +642,7 @@ update nation set
{$turn}4={$turn}5,{$turn}5={$turn}6,
{$turn}6={$turn}7,{$turn}7={$turn}8,
{$turn}8={$turn}9,{$turn}9={$turn}10,
{$turn}10={$turn}11,{$turn}11='00000000000099'
{$turn}10={$turn}11,{$turn}11='".EncodeCommand(0, 0, 0, 99)."'
where nation='{$general['nation']}'
";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -672,7 +672,7 @@ turn9=turn8,turn8=turn7,
turn7=turn6,turn6=turn5,
turn5=turn4,turn4=turn3,
turn3=turn2,turn2=turn1,
turn1=turn0,turn0='00000000000000'
turn1=turn0,turn0='".EncodeCommand(0, 0, 0, 0)."'
where no='$no'
";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -685,7 +685,7 @@ update nation set
{$turn}7={$turn}6,{$turn}6={$turn}5,
{$turn}5={$turn}4,{$turn}4={$turn}3,
{$turn}3={$turn}2,{$turn}2={$turn}1,
{$turn}1={$turn}0,{$turn}0='00000000000099'
{$turn}1={$turn}0,{$turn}0='".EncodeCommand(0, 0, 0, 99)."'
where nation='{$general['nation']}'
";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
@@ -772,19 +772,10 @@ parent.moveProcessing(<?=$commandtype?>, <?=Json::encode($turn)?>);
function EncodeCommand($fourth, $third, $double, $command) {
$str = StringUtil::padStringAlignRight((string)$fourth, 4, "0");
$str .= StringUtil::padStringAlignRight((string)$third, 4, "0");
$str .= StringUtil::padStringAlignRight((string)$double, 4, "0");
$str .= StringUtil::padStringAlignRight((string)$command, 2, "0");
return $str;
return Json::encode([$command, $double, $third, $fourth]);
}
function DecodeCommand($str) {
$command = [];
$command[3] = (int)(substr($str, 0, 4));
$command[2] = (int)(substr($str, 4, 4));
$command[1] = (int)(substr($str, 8, 4));
$command[0] = (int)(substr($str, 12, 2));
return $command;
return Json::decode($str);
}
+113 -7
View File
@@ -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;
@@ -179,6 +201,55 @@ function getGenSpecial($type) {
return $call;
}
function getSpecialInfo(?int $type):?string{
if($type === null){
return null;
}
//앞칸은 '설명을 위해' '그냥' 적어둠
$infoText = [
0 => ['-', null],
1 => ['경작', '[내정] 농지 개간 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
2 => ['상재', '[내정] 상업 투자 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
3 => ['발명', '[내정] 기술 연구 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
10 => ['축성', '[내정] 성벽 보수 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
11 => ['수비', '[내정] 수비 강화 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
12 => ['통찰', '[내정] 치안 강화 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
20 => ['인덕', '[내정] 주민 선정·정착 장려 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
30 => ['거상', '이것 저것'],
31 => ['귀모', '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p'],
40 => ['귀병', '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p'],
41 => ['신산', '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p<br>[전투] 계략 시도 확률 +20%p, 계략 성공 확률 +20%p '],
42 => ['환술', '[전투] 계략 성공 확률 +10%p, 계략 성공 시 대미지 +30%'],
43 => ['집중', '[전투] 계략 성공 시 대미지 +50%'],
44 => ['신중', '[전투] 계략 성공 확률 100%'],
45 => ['반계', '[전투] 상대의 계략을 30% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +100%)'],
50 => ['보병', '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%'],
51 => ['궁병', '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p'],
52 => ['기병', '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%'],
53 => ['공성', '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%'],
60 => ['돌격', '[전투] 상대 회피 불가, 공격 시 전투 페이즈 +1, 공격 시 대미지 +10%'],
61 => ['무쌍', '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p'],
62 => ['견고', '[전투] 수비 시 대미지 +10%, 공격 시 아군 피해 -10%'],
63 => ['위압', '[전투] 훈련/사기≥90, 병력≥1,000 일 때 첫 페이즈 위압 발동(적 공격 불가)'],
70 => ['저격', '[전투] 전투 개시 시 1/3 확률로 저격 발동'],
71 => ['필살', '[전투] 필살 확률 +20%p'],
72 => ['징병', '[군사] 징·모병비 -50%'],
73 => ['의술', '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)'],
74 => ['격노', '[전투] 상대방 필살 및 회피 시도시 일정 확률로 격노(필살) 발동, 공격 시 일정 확률로 진노(1페이즈 추가)'],
75 => ['척사', '[전투] 지역·도시 병종 상대로 대미지 +10%, 아군 피해 -10%']
];
return $infoText[$type][1]??null;
}
function getNationType($type) {
switch($type) {
case 13: $call = '명 가'; break;
@@ -544,7 +615,7 @@ function getDexLog($dex1, $dex2) {
}
function getWeapName($weap) : string {
function getWeapName($weap) : ?string {
switch($weap) {
case 0: $weapname = '-'; break;
case 1: $weapname = '단도(+1)'; break;
@@ -578,7 +649,7 @@ function getWeapName($weap) : string {
return $weapname;
}
function getWeapEff($weap) : int{
function getWeapEff($weap) : ?int{
switch($weap) {
case 7: $weap = 7; break;
case 8: $weap = 7; break;
@@ -605,7 +676,7 @@ function getWeapEff($weap) : int{
return $weap;
}
function getBookName($book) : string {
function getBookName($book) : ?string {
switch($book) {
case 0: $bookname = '-'; break;
case 1: $bookname = '효경전(+1)'; break;
@@ -639,7 +710,7 @@ function getBookName($book) : string {
return $bookname;
}
function getBookEff($book) : int {
function getBookEff($book) : ?int {
switch($book) {
case 7: $book = 7; break;
case 8: $book = 7; break;
@@ -666,7 +737,7 @@ function getBookEff($book) : int {
return $book;
}
function getHorseName($horse) : string {
function getHorseName($horse) : ?string {
switch($horse) {
case 0: $horsename = '-'; break;
case 1: $horsename = '노기(+1)'; break;
@@ -700,7 +771,7 @@ function getHorseName($horse) : string {
return $horsename;
}
function getHorseEff($horse) : int {
function getHorseEff($horse) : ?int {
switch($horse) {
case 7: $horse = 7; break;
case 8: $horse = 7; break;
@@ -727,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;
@@ -757,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%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)'],
24=>['태평청령(의술)', '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 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;
+51 -26
View File
@@ -115,22 +115,33 @@ function getSpecial2($leader, $power, $intel, $nodex=1, $dex0=0, $dex10=0, $dex2
}
function getGenDex($general, $type) {
$type = intdiv($type, 10) * 10;
return $general["dex{$type}"];
//XXX: 지금은 동작하지만.. 병종 구성이 보궁기귀차 에서 바뀌면...
$ntype = GameUnitConst::byId($type)->armType * 10;
return $general["dex{$ntype}"]??0;
}
function addGenDex($no, $atmos, $train, $type, $exp) {
//XXX: 지금은 동작하지만.. 병종 구성이 보궁기귀차 에서 바뀌면...
$db = DB::db();
$connect=$db->get();
$type = intdiv($type, 10) * 10;
$dexType = "dex{$type}";
if($type == 30) { $exp = Util::round($exp * 0.90); } //귀병은 90%효율
elseif($type == 40) { $exp = Util::round($exp * 0.90); } //차병은 90%효율
$exp = Util::round($exp * ($atmos+$train) / 200); // 사기 + 훈련 / 200
$armType = GameUnitConst::byId($type)->armType;
if($armType < 0){
return;
}
$ntype = $armType*10;
$dexType = "dex{$ntype}";
if($armType == GameUnitConst::T_WIZARD) {
$exp = Util::round($exp * 0.90);
}
else if($armType == GameUnitConst::T_SIEGE) {
$exp = Util::round($exp * 0.90);
}
$exp = Util::round($exp * ($atmos + $train) / 200); // 사기 + 훈련 / 200
$query = "update general set {$dexType}={$dexType}+{$exp} where no='$no'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$db->update('general', [
$dexType=>$db->sqleval('%b + %i', $dexType, $exp)
], 'no=%i', $no);
}
@@ -395,23 +406,33 @@ function preUpdateMonthly() {
}
//첩보-1
$query = "select nation,spy from nation where spy!=''";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nationCount = MYDB_num_rows($result);
for($i=0; $i < $nationCount; $i++) {
$nation = MYDB_fetch_array($result);
$spy = ""; $k = 0;
$cities = [];
if($nation['spy'] != "") { $cities = explode("|", (string)$nation['spy']); }
while(count($cities)) {
$cities[$k]--;
if($cities[$k]%10 != 0) { $spy .= (string)$cities[$k]; }
$k++;
if($k >= count($cities)) { break; }
if($cities[$k-1]%10 != 0) { $spy .= "|"; }
foreach($db->queryAllLists("SELECT nation, spy FROM nation WHERE spy!='' AND spy!='{}'") as [$nationNo, $rawSpy]){
if (strpos($rawSpy, '|') !== false || is_numeric($rawSpy)) {
//TODO: 0.8 버전 이후에는 삭제할 것. 이후 버전은 json으로 변경됨.
$spyInfo = [];
foreach(explode('|', $rawSpy) as $value){
$value = intval($value);
$cityNo = intdiv($value, 10);
$remainMonth = $value % 10;
$spyInfo[$cityNo] = $remainMonth;
}
}
$query = "update nation set spy='$spy' where nation='{$nation['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
else{
$spyInfo = Json::decode($rawSpy);
}
foreach($spyInfo as $cityNo => $remainMonth){
if($remainMonth <= 1){
unset($spyInfo[$cityNo]);
}
else{
$spyInfo[$cityNo] -= 1;
}
}
$db->update('nation', [
'spy'=>Json::encode($spyInfo, Json::EMPTY_ARRAY_IS_DICT)
], 'nation=%i', $nationNo);
}
return true;
@@ -1381,6 +1402,10 @@ function checkEmperior() {
$serverCnt = $db->queryFirstField('SELECT count(*) FROM ng_games');
$serverName = UniqueConst::$serverName;
$db->update('ng_games', [
'winner_nation'=>$nation['nation']
], 'server_id=%s', UniqueConst::$serverID);
$db->insert('emperior', [
'phase'=>$serverName.$serverCnt.'기',
'server_id'=>UniqueConst::$serverID,
+1 -1
View File
@@ -31,7 +31,7 @@ function bar($per, $h=7) {
$per = round($per, 1);
$str = "<div class='bar_out' style='height:{$h2}px;'>
$str = "<div class='bar_out' style='height:{$h}px;'>
<div class='bar_in' style='background:url(".ServConfig::$gameImagePath."/pr{$h2}.gif)'></div>
<div style='width:{$per}%;background:url(".ServConfig::$gameImagePath."/pb{$h2}.gif)'></div>
</div>";
+19 -9
View File
@@ -94,19 +94,29 @@ function getWorldMap($req){
$myNation = null;
}
$spyInfo = (object)null;
if($myNation){
$spyList = $db->queryFirstField('select `spy` from `nation` where `nation`=%i',
$rawSpy = $db->queryFirstField('select `spy` from `nation` where `nation`=%i',
$myNation);
if($spyList){
$spyList = array_map('\sammo\Util::toInt', explode("|", $spyList));
if(strpos($rawSpy, '|') !== false || is_numeric($rawSpy)){
//NOTE: 0.8 이전 데이터가 남아있으므로, 0.8버전으로 마이그레이션 이후에도 이곳은 삭제하면 안됨
$spyInfo = [];
foreach(explode('|', $rawSpy) as $value){
$value = intval($value);
$cityNo = intdiv($value, 10);
$remainMonth = $value % 10;
$spyInfo[$cityNo] = $remainMonth;
}
}
else{
$spyList = [];
else if($rawSpy != ''){
$spyInfo = Json::decode($rawSpy);
}
}
else{
$spyList = [];
if(!$spyInfo){
$spyInfo = (object)null;
}
$nationList = [];
@@ -142,7 +152,7 @@ function getWorldMap($req){
'month' => $month,
'cityList' => $cityList,
'nationList' => $nationList,
'spyList' => $spyList,
'spyList' => $spyInfo,
'shownByGeneralList' => $shownByGeneralList,
'myCity' => $myCity,
'myNation' => $myNation,
+9 -7
View File
@@ -107,6 +107,8 @@ function SetCrew($no, $personal, $gold, $leader, $genType, $tech, $region, $city
}
}
switch($sel) {
case 0:
$type = 0; //보병
@@ -181,7 +183,7 @@ function processAI($no) {
$general = MYDB_fetch_array($result);
// 입력된 턴이 있으면 그것 실행
if($general['turn0'] != "00000000000000") {
if(DecodeCommand($general['turn0'])[0] != 0) {
return;
}
@@ -361,7 +363,7 @@ function processAI($no) {
}
break;
case 2: //이동 20%
$paths = explode("|", $city['path']);
$paths = explode('|', $city['path']);
$command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21);
break;
default:
@@ -429,7 +431,7 @@ function processAI($no) {
return;
} elseif(rand()%4 > 0) {
//이동
$paths = explode("|", $city['path']);
$paths = explode('|', $city['path']);
$command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21);
$query = "update general set turn0='$command' where no='{$general['no']}'";
MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),"");
@@ -600,7 +602,7 @@ function processAI($no) {
//현도시가 전방이면 공격 가능성 체크
if($city['front'] > 0) {
//주변도시 체크
$paths = explode("|", $city['path']);
$paths = explode('|', $city['path']);
for($i=0; $i < count($paths); $i++) {
$query = "select city,nation from city where city='$paths[$i]'";
$result = MYDB_query($query, $connect) or Error("processAI20 ".MYDB_error($connect),"");
@@ -766,7 +768,7 @@ function processAI($no) {
$command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); // 준비는 됐으나 아직 선포중이면 내정, 조달
} else {
//공격 & 내정
$paths = explode("|", $city['path']);
$paths = explode('|', $city['path']);
for($i=0; $i < count($paths); $i++) {
$query = "select city,nation from city where city='$paths[$i]'";
$result = MYDB_query($query, $connect) or Error("processAI21 ".MYDB_error($connect),"");
@@ -824,10 +826,10 @@ function processAI($no) {
}
switch($command) {
case "00000000000001": //내정
case EncodeCommand(0, 0, 0, 1): //내정
SetDevelop($genType, $general['no'], $general['city'], $nation['tech']);
return;
case "00000000000011": //징병
case EncodeCommand(0, 0, 0, 11): //징병
$query = "select region from city where nation='{$general['nation']}' order by rand() limit 0,1";
$result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),"");
$selRegion = MYDB_fetch_array($result);
+172 -203
View File
@@ -852,188 +852,172 @@ function process_9(&$general) {
}
function process_11(&$general, $type) {
if($type == 1){
$type = '징병';
}
else{
$type = '모병';
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$log = [];
$alllog = [];
$history = [];
$date = substr($general['turntime'],11,5);
if($type == 1) { $defaultatmos = GameConst::$defaultAtmosLow; $defaulttrain = GameConst::$defaultTrainLow; }
else { $defaultatmos = GameConst::$defaultAtmosHigh; $defaulttrain = GameConst::$defaultTrainHigh; }
if($type === '징병') {
$defaultatmos = GameConst::$defaultAtmosLow;
$defaulttrain = GameConst::$defaultTrainLow;
}
else {
$defaultatmos = GameConst::$defaultAtmosHigh;
$defaulttrain = GameConst::$defaultTrainHigh;
}
$admin = $gameStor->getValues(['startyear', 'year', 'month']);
[$startyear, $year, $month] = $gameStor->getValuesAsArray(['startyear', 'year', 'month']);
$query = "select level,tech from nation where nation='{$general['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nation = MYDB_fetch_array($result);
$lbonus = setLeadershipBonus($general, $nation['level']);
$query = "select * from city where city='{$general['city']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$city = MYDB_fetch_array($result);
$actLog = new ActionLogger($general['no'], $general['nation'], $year, $month);
$command = DecodeCommand($general['turn0']);
$armtype = $command[2];
$crew = $command[1];
$crewType = $command[2];
$rawCrew = $command[1];
if($armtype != $general['crewtype']) { $general['crew'] = 0; $general['train'] = $defaulttrain; $general['atmos'] = $defaultatmos; }
if($crew*100 + $general['crew'] > getGeneralLeadership($general, true, true, true)*100) {
$crew = Util::round(getGeneralLeadership($general, true, true, true) - $general['crew']/100);
if($crewType != $general['crewtype']) {
$general['crew'] = 0;
$general['train'] = $defaulttrain;
$general['atmos'] = $defaultatmos;
}
if($crew < 0) { $crew = 0; }
$cost = $crew * getCost($armtype);
//기술로 가격
$cost *= getTechCost($nation['tech']);
if($general['crew'] != 0) {
$dtype = "추가".$type;
}
else {
$dtype = $type;
}
if(!$general['nation']){
$actLog->pushGeneralActionLog("재야입니다. $dtype 실패. <1>$date</>");
return;
}
$city = $db->queryFirstRow('SELECT * FROM city WHERE city = %i', $general['city']);
if($city['nation'] != $general['nation']){
$actLog->pushGeneralActionLog("아국이 아닙니다. $dtype 실패. <1>$date</>");
return;
}
$crewTypeObj = GameUnitConst::byID($crewType);
if($crewTypeObj === null){
$actLog->pushGeneralActionLog("병종 코드 에러. $type 실패. <1>$date</>");
return;
}
[$nationLevel, $tech] = $db->queryFirstList('SELECT `level`,tech FROM nation WHERE nation=%i', $general['nation']);
$lbonus = setLeadershipBonus($general, $nationLevel);
//NOTE: 입력 변수는 100명 단위임
$crew = $rawCrew * 100;
if($crew + $general['crew'] > getGeneralLeadership($general, true, true, true)*100) {
$crew = max(0, getGeneralLeadership($general, true, true, true) * 100 - $general['crew']);
}
if($crew <= 0) {
$actLog->pushGeneralActionLog("더이상 $dtype 할 수 없습니다. $dtype 실패. <1>$date</>");
return;
}
$cost = $crewTypeObj->costWithTech($tech, $crew);
//성격 보정
$cost = CharCost($cost, $general['personal']);
$cost = Util::round($cost);
$cost = Util::round(CharCost($cost, $general['personal']));
//특기 보정 : 보병, 궁병, 기병, 귀병, 공성, 징병
if(intdiv($armtype, 10) == 0 && $general['special2'] == 50) { $cost *= 0.9; }
if(intdiv($armtype, 10) == 1 && $general['special2'] == 51) { $cost *= 0.9; }
if(intdiv($armtype, 10) == 2 && $general['special2'] == 52) { $cost *= 0.9; }
if(intdiv($armtype, 10) == 3 && $general['special2'] == 40) { $cost *= 0.9; }
if(intdiv($armtype, 10) == 4 && $general['special2'] == 43) { $cost *= 0.9; }
//특기 보정 : 징병, 보병, 궁병, 기병, 귀병, 공성
if($general['special2'] == 72) { $cost *= 0.5; }
if($type == 1) { $dtype = "징병"; }
elseif($type == 2) { $dtype = "모병"; $cost *= 2; }
if($general['crew'] != 0) { $dtype = "추가".$dtype; }
//현재 가능한지 검사
switch($armtype) {
case 0: case 10: case 20: case 30: case 35: // 보병 궁병 기병 귀병 남귀병
$sel = 0; break;
case 1: $sel = 1; $rg = 2; break; // 청주병(중원)
case 2: $sel = 1; $rg = 7; break; // 수병(오월)
case 3: $sel = 2; $ct = 64; break; // 자객병(저)
case 4: $sel = 2; $ct = 3; break; // 근위병(낙양)
case 5: $sel = 1; $rg = 5; break; // 등갑병(남중)
case 11: $sel = 1; $rg = 8; break; // 궁기병(동이)
case 12: $sel = 1; $rg = 4; break; // 연노병(서촉)
case 13: $sel = 2; $ct = 6; break; // 강궁병(양양)
case 14: $sel = 2; $ct = 7; break; // 석궁병(건업)
case 21: $sel = 1; $rg = 1; break; // 백마병(하북)
case 22: $sel = 1; $rg = 3; break; // 중장기병(서북)
case 23: $sel = 2; $ct = 65; break; // 돌격기병(흉노)
case 24: $sel = 2; $ct = 63; break; // 철기병(강)
case 25: $sel = 2; $ct = 67; break; // 수렵기병(산월)
case 26: $sel = 2; $ct = 66; break; // 맹수병(남만)
case 27: $sel = 2; $ct = 2; break; // 호표기병(허창)
case 31: $sel = 1; $rg = 6; break; // 신귀병(초)
case 32: $sel = 2; $ct = 68; break; // 백귀병(오환)
case 33: $sel = 2; $ct = 69; break; // 흑귀병(왜)
case 34: $sel = 2; $ct = 4; break; // 악귀병(장안)
case 36: $sel = 2; $ct = 3; break; // 황귀병(낙양)
case 37: $sel = 2; $ct = 5; break; // 천귀병(성도)
case 38: $sel = 2; $ct = 1; break; // 마귀병(업)
case 40: $sel = 0; break; // 정란
case 41: $sel = 0; break; // 충차
case 42: $sel = 2; $ct = 1; break; // 벽력거(업)
case 43: $sel = 2; $ct = 5; break; // 목우(성도)
default: $sel = 0; $armtype = 0; break;
}
if($sel == 0) {
// 남귀병은 기술1등급부터
// 충차는 기술1등급부터
if($armtype == 35 && $nation['tech'] < 1000) {
$cnt = 0;
} elseif($armtype == 41 && $nation['tech'] < 1000) {
$cnt = 0;
} else {
$cnt = 1;
}
} elseif($sel == 1) {
$query = "select city,level from city where nation='{$general['nation']}' and region='$rg'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$cnt = MYDB_num_rows($result);
$rgcity = MYDB_fetch_array($result);
// 기술 1000 이상부터 지역병
if($cnt > 0 && $nation['tech'] < 1000) {
$cnt = 0;
}
} else {
$query = "select city,level from city where nation='{$general['nation']}' and city='$ct'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$cnt = MYDB_num_rows($result);
$ctcity = MYDB_fetch_array($result);
// 기술 2000 이상부터 이민족병
if($cnt > 0 && $ctcity['level'] == 4 && $nation['tech'] < 2000) {
$cnt = 0;
}
// 기술 3000 이상부터 특수병
if($cnt > 0 && $ctcity['level'] == 8 && $nation['tech'] < 3000) {
$cnt = 0;
}
}
if($cnt > 0) { $valid = 1; }
else { $valid = 0; }
// 초반 제한중 차병 불가
if($admin['year'] < $admin['startyear']+3 && intdiv($armtype, 10) == 4) {
$valid = 0;
else if($general['special2'] == 50 && $crewTypeObj->armType == GameUnitConstBase::T_FOOTMAN) { $cost *= 0.9; }
else if($general['special2'] == 51 && $crewTypeObj->armType == GameUnitConstBase::T_ARCHER) { $cost *= 0.9; }
else if($general['special2'] == 52 && $crewTypeObj->armType == GameUnitConstBase::T_CAVALRY) { $cost *= 0.9; }
else if($general['special2'] == 40 && $crewTypeObj->armType == GameUnitConstBase::T_WIZARD) { $cost *= 0.9; }
else if($general['special2'] == 53 && $crewTypeObj->armType == GameUnitConstBase::T_SIEGE) { $cost *= 0.9; }
if($general['gold'] < $cost){
$actLog->pushGeneralActionLog("자금이 모자랍니다. $dtype 실패. <1>$date</>");
return;
}
if($general['level'] == 0) {
$log[] = "<C>●</>{$admin['month']}월:재야입니다. $dtype 실패. <1>$date</>";
} elseif($city['nation'] != $general['nation']) {
$log[] = "<C>●</>{$admin['month']}월:아국이 아닙니다. $dtype 실패. <1>$date</>";
// } elseif($city['supply'] == 0) {
// $log[] = "<C>●</>{$admin['month']}월:고립된 도시입니다. $dtype 실패. <1>$date</>";
} elseif($crew <= 0) {
$log[] = "<C>●</>{$admin['month']}월:더이상 $dtype 할 수 없습니다. $dtype 실패. <1>$date</>";
} elseif($general['gold'] < $cost) {
$log[] = "<C>●</>{$admin['month']}월:자금이 모자랍니다. $dtype 실패. <1>$date</>";
} elseif($general['rice'] < $crew) {
$log[] = "<C>●</>{$admin['month']}월:군량이 모자랍니다. $dtype 실패. <1>$date</>";
} elseif($valid == 0) {
$log[] = "<C>●</>{$admin['month']}월:현재 $dtype 할 수 없는 병종입니다. $dtype 실패. <1>$date</>";
} elseif($city['pop']-30000 < $crew*100) { // 주민 30000명 이상만 가능
$log[] = "<C>●</>{$admin['month']}월:주민이 모자랍니다. $dtype 실패. <1>$date</>";
} elseif($city['rate'] < 20) {
$log[] = "<C>●</>{$admin['month']}월:민심이 낮아 주민들이 도망갑니다. $dtype 실패. <1>$date</>";
} else {
$log[] = "<C>●</>{$admin['month']}월:".GameUnitConst::byId($armtype)->name."을(를) <C>{$crew}00</>명 {$dtype}했습니다. <1>$date</>";
$exp = $crew;
$ded = $crew;
// 숙련도 증가
addGenDex($general['no'], GameConst::$maxAtmosByCommand, GameConst::$maxTrainByCommand, $armtype, $crew);
// 성격 보정
$exp = CharExperience($exp, $general['personal']);
$ded = CharDedication($ded, $general['personal']);
$atmos = Util::round(($general['atmos'] * $general['crew'] + $defaultatmos * $crew*100) / ($general['crew'] + $crew*100));
$train = Util::round(($general['train'] * $general['crew'] + $defaulttrain * $crew*100) / ($general['crew'] + $crew*100));
$general['crew'] += $crew*100;
$general['gold'] -= $cost;
// 주민수 감소 // 민심 김소
if($type == 1) { $city['rate'] = $city['rate'] - Util::round(($crew*100 / $city['pop'])*100); }
else { $city['rate'] = $city['rate'] - Util::round(($crew*100 / $city['pop'])*50); }
if($city['rate'] < 0) { $city['rate'] = 0; }
$query = "update city set pop=pop-({$crew}*100),rate='{$city['rate']}' where city='{$general['city']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
// 통솔경험, 병종 변경, 병사수 변경, 훈련치 변경, 사기치 변경, 자금 군량 하락, 공헌도, 명성 상승
$general['leader2']++;
$query = "update general set resturn='SUCCESS',leader2='{$general['leader2']}',crewtype='$armtype',crew='{$general['crew']}',train='$train',atmos='$atmos',gold='{$general['gold']}',rice=rice-'$crew',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$log = checkAbility($general, $log);
$log = uniqueItem($general, $log);
if($general['rice'] < $crew / 100) {
$actLog->pushGeneralActionLog("군량이 모자랍니다. $dtype 실패. <1>$date</>");
return;
}
pushGenLog($general, $log);
$ownCities = [];
$ownRegions = [];
foreach($db->queryFirstColumn('SELECT city FROM city WHERE nation = %i', $general['nation']) as $ownCity){
$ownCities[$ownCity] = 1;
$ownRegions[CityConst::byId($ownCity)->region] = 1;
}
$valid = $crewTypeObj->isValid($ownCities, $ownRegions, $year - $startyear, $tech);
if(!$valid) {
$actLog->pushGeneralActionLog("현재 $dtype 할 수 없는 병종입니다. $dtype 실패. <1>$date</>");
return;
}
if($city['pop']-30000 < $crew) { // 주민 30000명 이상만 가능
$actLog->pushGeneralActionLog("주민이 모자랍니다. $dtype 실패. <1>$date</>");
return;
}
if($city['rate'] < 20) {
$actLog->pushGeneralActionLog("민심이 낮아 주민들이 도망갑니다. $dtype 실패. <1>$date</>");
return;
}
$actLog->pushGeneralActionLog($crewTypeObj->name."을(를) <C>{$crew}</>명 {$dtype}했습니다. <1>$date</>");
$exp = Util::round($crew / 100);
$ded = Util::round($crew / 100);
// 숙련도 증가
addGenDex($general['no'], GameConst::$maxAtmosByCommand, GameConst::$maxTrainByCommand, $crewType, $crew);
// 성격 보정
$exp = CharExperience($exp, $general['personal']);
$ded = CharDedication($ded, $general['personal']);
$atmos = Util::round(($general['atmos'] * $general['crew'] + $defaultatmos * $crew) / ($general['crew'] + $crew));
$train = Util::round(($general['train'] * $general['crew'] + $defaulttrain * $crew) / ($general['crew'] + $crew));
$general['crew'] += $crew;
$general['gold'] -= $cost;
// 주민수 감소 // 민심 감소
if($type === '징병') {
$city['rate'] -= Util::round($crew / $city['pop']);
}
else {
$city['rate'] -= Util::round($crew / 2 / $city['pop']);
}
if($city['rate'] < 0) { $city['rate'] = 0; }
$db->update('city', [
'pop'=>$db->sqleval('pop-%i', $crew),
'rate'=>$city['rate']
], 'city = %i',$general['city']);
// 통솔경험, 병종 변경, 병사수 변경, 훈련치 변경, 사기치 변경, 자금 군량 하락, 공헌도, 명성 상승
$general['leader2']++;
$db->update('general', [
'resturn'=>'SUCCESS',
'leader2'=>$general['leader2'],
'crewtype'=>$crewTypeObj->id,
'crew'=>$general['crew'],
'train'=>$train,
'atmos'=>$atmos,
'gold'=>$general['gold'],
'rice'=>$db->sqleval('rice - %i', Util::round($crew/100)),
'dedication'=>$db->sqleval('dedication + %i', $ded),
'experience'=>$db->sqleval('experience + %i', $exp)
], 'no=%i', $general['no']);
checkAbilityEx($general['no'], $actLog);
$log = uniqueItem($general, []);//TODO: uniqueItem 재 구현
$actLog->pushGeneralActionLog($log, ActionLogger::RAWTEXT);
}
function process_13(&$general) {
@@ -1060,14 +1044,10 @@ function process_13(&$general) {
$log[] = "<C>●</>{$admin['month']}월:재야입니다. 훈련 실패. <1>$date</>";
} elseif($city['nation'] != $general['nation']) {
$log[] = "<C>●</>{$admin['month']}월:아국이 아닙니다. 훈련 실패. <1>$date</>";
// } elseif($city['supply'] == 0) {
// $log[] = "<C>●</>{$admin['month']}월:고립된 도시입니다. 훈련 실패. <1>$date</>";
} elseif($general['crew'] == 0) {
$log[] = "<C>●</>{$admin['month']}월:병사가 없습니다. 훈련 실패. <1>$date</>";
} elseif($general['train'] >= GameConst::$maxTrainByCommand) {
$log[] = "<C>●</>{$admin['month']}월:병사들은 이미 정예병사들입니다. <1>$date</>";
// } elseif(intdiv($general['crewtype'], 10) == 4) {
// $log[] = "<C>●</>{$admin['month']}월:병기는 훈련이 불가능합니다. <1>$date</>";
} else {
// 훈련시
$score = Util::round(getGeneralLeadership($general, true, true, true) * 100 / $general['crew'] * GameConst::$trainDelta);
@@ -1128,16 +1108,12 @@ function process_14(&$general) {
$log[] = "<C>●</>{$admin['month']}월:재야입니다. 사기진작 실패. <1>$date</>";
} elseif($city['nation'] != $general['nation']) {
$log[] = "<C>●</>{$admin['month']}월:아국이 아닙니다. 사기진작 실패. <1>$date</>";
// } elseif($city['supply'] == 0) {
// $log[] = "<C>●</>{$admin['month']}월:고립된 도시입니다. 사기진작 실패. <1>$date</>";
} elseif($general['crew'] == 0) {
$log[] = "<C>●</>{$admin['month']}월:병사가 없습니다. 사기진작 실패. <1>$date</>";
} elseif($general['gold'] < $general['crew']/100) {
$log[] = "<C>●</>{$admin['month']}월:자금이 모자랍니다. 사기진작 실패. <1>$date</>";
} elseif($general['atmos'] >= GameConst::$maxAtmosByCommand) {
$log[] = "<C>●</>{$admin['month']}월:이미 사기는 하늘을 찌를듯 합니다. <1>$date</>";
// } elseif(intdiv($general['crewtype'], 10) == 4) {
// $log[] = "<C>●</>{$admin['month']}월:병기는 사기 진작이 불가능합니다. <1>$date</>";
} else {
$score = Util::round(getGeneralLeadership($general, true, true, true)*100 / $general['crew'] * GameConst::$atmosDelta);
$gold = $general['gold'] - Util::round($general['crew']/100);
@@ -1743,32 +1719,32 @@ function process_31(&$general) {
$query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "select spy from nation where nation='{$general['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nation = MYDB_fetch_array($result);
if($nation['spy'] != "")
{
$cities = array_map('intval', explode("|", $nation['spy']));
$rawSpy = $db->queryFirstField('SELECT spy FROM nation WHERE nation = %i', $general['nation']);
if($rawSpy == ''){
$spyInfo = [];
}
else{
$cities = [];
}
$exist = 0;
for($i=0; $i < count($cities); $i++) {
if(intdiv($cities[$i], 10) == $destination) {
$exist = 1;
break;
else if(strpos($rawSpy, '|') !== false || is_numeric($rawSpy)){
//TODO: 0.8 버전 이후에는 삭제할 것. 이후 버전은 json으로 변경됨.
$spyInfo = [];
foreach(explode('|', $rawSpy) as $value){
$value = intval($value);
$cityNo = intdiv($value, 10);
$remainMonth = $value % 10;
$spyInfo[$cityNo] = $remainMonth;
}
}
// 기존 첩보 목록에 없으면 새로 등록, 있으면 갱신
if($exist == 0) {
$cities[] = $destination * 10 + 3;
} else {
$cities[$i] = $destination * 10 + 3;
else{
$spyInfo = Json::decode($rawSpy);
}
$spy = implode("|", $cities);
$query = "update nation set spy='$spy' where nation='{$general['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$spyInfo[$destination] = 3;
$db->update('nation', [
'spy'=>Json::encode($spyInfo, Json::EMPTY_ARRAY_IS_DICT)
], 'nation=%i', $general['nation']);
$log = checkAbility($general, $log);
}
@@ -1812,14 +1788,7 @@ function process_41(&$general) {
} elseif($crewexp == 0) {
$log[] = "<C>●</>{$admin['month']}월:병사가 모자랍니다. 단련 실패. <1>$date</>";
} else {
$type = intdiv($general['crewtype'], 10);
switch($type) {
case 0: $crewstr = '보병'; break;
case 1: $crewstr = '궁병'; break;
case 2: $crewstr = '기병'; break;
case 3: $crewstr = '귀병'; break;
case 4: $crewstr = '차병'; break;
}
$crewstr = GameUnitConst::$typeData[GameUnitConst::byID($general['crewtype']->armType)];
if($ratio < 33) {
// 숙련도 증가
+2 -2
View File
@@ -84,7 +84,7 @@ function process_25(&$general) {
$joinedNations = Json::decode($general['nations']);
// 랜덤임관인 경우
if($general['npc'] > 2 && $where >= 98 && ($admin['scenario'] == 0 || $admin['scenario'] >= 20 || !$admin['fiction'])){
if($general['npc'] > 2 && $where >= 98 && ($admin['scenario'] < 100 || $admin['scenario'] >= 2000 || !$admin['fiction'])){
//'사실' 모드에서는 '성향'에 우선을 두되, 장수수, 랜덤에 비중을 둠
$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',
@@ -339,7 +339,7 @@ function process_29(&$general) {
// 체섭시 무장 20%, 지장 20%, 무지장 60%
// 마이너 무장 40%, 지장 40%, 무지장 20%
$type = rand() % 10;
if($admin['scenario'] == 0) {
if($admin['scenario'] < 100) {
switch($type) {
case 0: case 1:
$leader = GameConst::$defaultStatMax - 10 + rand()%11;
+46 -3
View File
@@ -64,6 +64,42 @@ 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);
$templates = new \League\Plates\Engine(__dir__.'/templates');
return $templates->render('tooltip', [
'text'=>$text,
'info'=>$info,
]);
}
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();
@@ -167,11 +203,18 @@ function formatName(string $name, int $npc): string{
return $name;
}
function getMapHtml(){
//NOTE: 필요한가?
function getMapHtml(?string $mapTheme=null){
$templates = new \League\Plates\Engine(__dir__.'/templates');
return $templates->render('map');
if($mapTheme === null){
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$mapTheme = $gameStor->map_theme??'che';
}
return $templates->render('map', [
'mapTheme'=>$mapTheme
]);
}
function getInvitationList(array $nationList){
+7 -6
View File
@@ -44,7 +44,7 @@ if ($me['newmsg'] == 1 || $me['newvote'] == 1) {
], 'owner=%i', $userID);
}
$admin = $gameStor->getValues(['develcost','online','conlimit','tournament','tnmt_type','turnterm','scenario','scenario_text','extended_general','fiction','npcmode','vote','vote_title']);
$admin = $gameStor->getValues(['develcost','online','conlimit','tournament','tnmt_type','turnterm','scenario','scenario_text','extended_general','fiction','npcmode','vote','vote_title','map_theme']);
$plock = $db->queryFirstField('SELECT plock FROM plock LIMIT 1');
@@ -76,7 +76,7 @@ if ($admin['npcmode'] == 0) {
$valid = 1;
}
$color = "cyan";
$mapTheme = $admin['map_theme'];
?>
<!DOCTYPE html>
<html>
@@ -87,10 +87,11 @@ $color = "cyan";
<meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/main.js')?>
<?=WebUtil::printJS('js/base_map.js')?>
<?=WebUtil::printJS('d_shared/base_map.js')?>
<?=WebUtil::printJS('js/map.js')?>
<?=WebUtil::printJS('js/msg.js')?>
<script>
@@ -104,7 +105,7 @@ $(function(){
}, 10000);
});
</script>
<?=WebUtil::printCSS('css/normalize.css')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/main.css')?>
@@ -229,7 +230,7 @@ else if($session->userGrade == 4){
<table class="tb_layout bg0" style="width:1000px;">
<tr>
<td width=698 height=520 colspan=2>
<?=getMapHtml()?>
<?=getMapHtml($mapTheme)?>
</td>
<td width=298 rowspan=4><iframe seamless="seamless" name=commandlist src='commandlist.php' width=298 height=700 frameborder=0 marginwidth=0 marginheight=0 topmargin=0 scrolling=no></iframe></td>
</tr>
@@ -287,7 +288,7 @@ else if($session->userGrade == 4){
<div class="message_input_form bg0">
<select id="mailbox_list" size="1">
<select name="genlist" size="1" style="color:white;background-color:black;font-size:13">
<select name="genlist" size="1" style="color:white;background-color:black;font-size:13px">
+1
View File
@@ -14,6 +14,7 @@ $defaultPost = [
'showMe' => true
];
$post = Json::decode(Util::getReq('data', 'string', '{}'));
$post += $defaultPost;
if(!$session->isGameLoggedIn()){
$post['neutralView'] = true;
+15 -2
View File
@@ -38,11 +38,24 @@ $connect=$db->get();
var defaultStatTotal = <?=GameConst::$defaultStatTotal?>;
var defaultStatMin = <?=GameConst::$defaultStatMin?>;
var defaultStatMax = <?=GameConst::$defaultStatMax?>;
var charInfoText = <?php
$charInfoText = [];
for($i=0;$i<=9;$i++){
//XXX:하드코딩 금지!
$charInfoText[$i] = getCharInfo($i);
}
echo Json::encode((object)$charInfoText);
?>;
</script>
<?=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')?>
</head>
@@ -106,7 +119,7 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
<tr>
<td width=498 align=right id=bg1>성격</td>
<td colspan=2>
<select name=character size=1 maxlength=15 style=color:white;background-color:black;>
<select id="selChar" name=character size=1 maxlength=15 style=color:white;background-color:black;>
<option selected value=11>????</option>
<!--
<option value=10>은둔</option>
@@ -121,7 +134,7 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
<option value=2>의협</option>
<option value=1>대의</option>
<option value=0>왕좌</option>
</select> ※보정은 도움말 참고
</select> <span id="charInfoText"></span>
</td>
</tr>
<tr>
-100
View File
@@ -1,100 +0,0 @@
function getCityPosition(){
return {
1: ["업", 345, 130],
2: ["허창", 330, 215],
3: ["낙양", 275, 180],
4: ["장안", 145, 165],
5: ["성도", 25, 290],
6: ["양양", 255, 290],
7: ["건업", 505, 305],
8: ["북평", 465, 65],
9: ["남피", 395, 95],
10: ["완", 270, 235],
11: ["수춘", 395, 270],
12: ["서주", 440, 250],
13: ["강릉", 245, 335],
14: ["장사", 255, 375],
15: ["시상", 360, 360],
16: ["위례", 620, 145],
17: ["계", 365, 35],
18: ["복양", 410, 170],
19: ["진류", 365, 185],
20: ["여남", 330, 260],
21: ["하비", 480, 235],
22: ["서량", 25, 50],
23: ["하내", 230, 150],
24: ["한중", 135, 205],
25: ["상용", 185, 225],
26: ["덕양", 85, 275],
27: ["강주", 70, 310],
28: ["건녕", 80, 400],
29: ["남해", 245, 480],
30: ["계양", 230, 400],
31: ["오", 510, 345],
32: ["평양", 590, 100],
33: ["사비", 605, 205],
34: ["계림", 655, 200],
35: ["진양", 295, 60],
36: ["평원", 440, 115],
37: ["북해", 470, 155],
38: ["초", 365, 230],
39: ["패", 430, 220],
40: ["천수", 70, 105],
41: ["안정", 95, 145],
42: ["홍농", 210, 175],
43: ["하변", 45, 190],
44: ["자동", 75, 245],
45: ["영안", 115, 295],
46: ["귀양", 90, 360],
47: ["주시", 30, 345],
48: ["운남", 30, 415],
49: ["남영", 135, 405],
50: ["교지", 130, 480],
51: ["신야", 250, 260],
52: ["강하", 315, 295],
53: ["무릉", 195, 355],
54: ["영릉", 190, 395],
55: ["상동", 210, 435],
56: ["여강", 380, 315],
57: ["회계", 480, 395],
58: ["고창", 350, 405],
59: ["대", 450, 480],
60: ["안평", 530, 80],
61: ["졸본", 570, 65],
62: ["이도", 680, 260],
63: ["강", 95, 35],
64: ["저", 25, 120],
65: ["흉노", 180, 95],
66: ["남만", 80, 455],
67: ["산월", 425, 430],
68: ["오환", 610, 20],
69: ["왜", 680, 320],
70: ["호관", 285, 140],
71: ["호로", 285, 205],
72: ["사곡", 240, 175],
73: ["함곡", 180, 175],
74: ["사수", 310, 185],
75: ["양평", 90, 220],
76: ["가맹", 45, 225],
77: ["역경", 410, 65],
78: ["계교", 405, 135],
79: ["동황", 515, 145],
80: ["관도", 340, 165],
81: ["정도", 400, 210],
82: ["합비", 435, 285],
83: ["광릉", 490, 275],
84: ["적도", 130, 75],
85: ["가정", 40, 160],
86: ["기산", 110, 180],
87: ["면죽", 35, 255],
88: ["이릉", 215, 295],
89: ["장판", 280, 315],
90: ["백랑", 530, 30],
91: ["적벽", 330, 325],
92: ["파양", 430, 350],
93: ["탐라", 605, 260],
94: ["유구", 625, 435],
};
}
+10 -1
View File
@@ -128,4 +128,13 @@ function getIconPath(imgsvr, picture){
else{
return pathConfig.root+'/d_pic/'+picture;
}
}
}
jQuery(function($){
$('.obj_tooltip').tooltip({
title:function(){
return $.trim($(this).find('.tooltiptext').html());
},
html:true
});
});
+1 -1
View File
@@ -564,7 +564,7 @@ $(function() {
var $name = $this.children('.i_name');
$name.addClass('nameplate');
var name = $name.find('.t_name').html();
var name = $name.find('.t_name').text();
var $work = $this.children('.i_action');
+14 -1
View File
@@ -150,4 +150,17 @@ jQuery(function($){
window.abilityLeadpow = abilityLeadpow;
window.abilityLeadint = abilityLeadint;
window.abilityPowint = abilityPowint;
});
var $charInfoText = $('#charInfoText');
var $selChar = $('#selChar');
$selChar.change(function(){
var $this = $(this);
var char = $this.val();
if(char in charInfoText){
$charInfoText.html(charInfoText[char]);
}
else{
$charInfoText.html('');
}
});
});
+6 -13
View File
@@ -119,23 +119,11 @@ function reloadWorldMap(option){
};
}
function convertSpyList(arr){
var result = [];
arr.forEach(function(v){
var cityId = (v / 10) | 0;
var spy = v % 10;
result[cityId] = spy;
});
return result;
}
var cityList = obj.cityList.map(toCityObj);
var nationList = obj.nationList.map(toNationObj);
nationList = convertDictById(nationList); //array of object -> dict
var spyList = convertSpyList(obj.spyList);//Array -> Dict
var spyList = obj.spyList;
var shownByGeneralList = convertSet(obj.shownByGeneralList);//Array -> Set
var myCity = obj.myCity;
@@ -288,6 +276,9 @@ function reloadWorldMap(option){
}
$imgObj.append($flagObj);
}
var $nameObj = $('<span class="city_detail_name">{0}</span>'.format(city.name));
$imgObj.append($nameObj);
$map_body.append($cityObj);
@@ -348,6 +339,8 @@ function reloadWorldMap(option){
$imgObj.append($capitalObj);
}
var $nameObj = $('<span class="city_detail_name">{0}</span>'.format(city.name));
$imgObj.append($nameObj);
$map_body.append($cityObj);
});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -128,7 +128,7 @@ function redrawMsg(deferred){
var $msgs = msgSource.map(function(msg){
var contactTarget = (msg.src.id != myGeneralID) ? msg.src.id : msg.dest.id;
if(needRefreshLastContact && contactTarget != myGeneralID)
if(needRefreshLastContact && contactTarget != myGeneralID && contactTarget in generalList)
{
needRefreshLastContact = false;
$('#last_contact').val(contactTarget).html(generalList[contactTarget].textName).show();
+35 -1
View File
@@ -3,11 +3,19 @@ var templateGeneralCard =
<h4 class="bg1 with_border"><%name%></h4>\
<h4><img src="<%iconPath%>" height=64 width=64></h4>\
<p><%leader%> / <%power%> / <%intel%><br>\
<%special%> / <%special2%></p>\
<%specialText%> / <%special2Text%></p>\
<button type="subject" class="with_skin with_border select_btn" value="<%no%>" name="pick">빙의하기</button>\
<label><input <%keepCnt?"":disabled="disabled"%> type="checkbox" value="<%no%>" name="keep[]" class="keep_select">보관(<%keepCnt%>)</label>\
</div>';
var templateSpecial =
'<span class="obj_tooltip" data-toggle="tooltip" data-placement="top"><%text%>\
<span class="tooltiptext">\
<%info%>\
</span>\
</span>\
';
function pickGeneral(){
$btn = $(this);
@@ -85,12 +93,38 @@ function printGenerals(value){
$.each(pick, function(idx, cardData){
cardData.iconPath = getIconPath(cardData.imgsvr, cardData.picture);
if(cardData.special in specialInfo){
cardData.specialText = TemplateEngine(templateSpecial, {
text:cardData.special,
info:specialInfo[cardData.special]
});
}
else{
cardData.specialText = cardData.special;
}
if(cardData.special2 in specialInfo){
cardData.special2Text = TemplateEngine(templateSpecial, {
text:cardData.special2,
info:specialInfo[cardData.special2]
});
}
else{
cardData.special2Text = cardData.special2;
}
var $card = $(TemplateEngine(templateGeneralCard, cardData));
console.log($card);
$('.card_holder').append($card);
$card.find('.select_btn').click(pickGeneral);
$card.find('.obj_tooltip').tooltip({
title:function(){
return $.trim($(this).find('.tooltiptext').html());
},
html:true
});
});
updatePickMoreTimer();
+1 -1
View File
@@ -1,5 +1,5 @@
<div
class="msg_plate msg_plate_<%msgType%> msg_plate_<%nationType%>""
class="msg_plate msg_plate_<%msgType%> msg_plate_<%nationType%>"
id="msg_<%id%>"
data-id="<%id%>"
>
+2 -2
View File
@@ -57,8 +57,8 @@ switch($commandtype) {
case 8: command_Single($turn, 8); break; //치안 강화
case 9: command_Single($turn, 9); break; //자금 조달
// case 11: command_11( $turn, 11); break; //징병
// case 12: command_12( $turn, 12); break; //모병
// case 11: command_11( $turn, 11, false); break; //징병
// case 12: command_11( $turn, 12, true); break; //모병
case 13: command_Single($turn, 13); break; //훈련
case 14: command_Single($turn, 14); break; //사기진작
case 15: command_Single($turn, 0); break; //전투태세
+86 -275
View File
@@ -34,7 +34,8 @@ function processWar($general, $city) {
'def'=>0
];
$warphase = GameUnitConst::byID($general['crewtype'])->speed; //병종간 페이즈 수 얻기
$generalCrewType = GameUnitConst::byID($general['crewtype']);
$warphase = $generalCrewType->speed; //병종간 페이즈 수 얻기
// 특기보정 : 돌격
if($general['special2'] == 60) { $warphase += 1; }
@@ -84,6 +85,8 @@ function processWar($general, $city) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nation = MYDB_fetch_array($result);
setLeadershipBonus($general, $nation['level']);
$query = "select nation,level,name,rice,capital,tech,type from nation where nation='{$city['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$destnation = MYDB_fetch_array($result) ?: [
@@ -164,10 +167,11 @@ function processWar($general, $city) {
break;
// 장수가 없어서 도시 공격
} elseif($opposecount == 0) {
$josaRo = JosaUtil::pick(GameUnitConst::byId($general['crewtype'])->name, '로');
$opposeCrewType = GameUnitConst::byId(GameUnitConst::T_CASTLE);
$josaRo = JosaUtil::pick($generalCrewType->name, '로');
$josaYi = JosaUtil::pick($general['name'], '이');
$alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>{$josaYi} ".GameUnitConst::byId($general['crewtype'])->name."{$josaRo} 성벽을 공격합니다.";
$log[] = "<C>●</>".GameUnitConst::byId($general['crewtype'])->name."{$josaRo} 성벽을 <M>공격</>합니다.";
$alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>{$josaYi} {$generalCrewType->name}{$josaRo} 성벽을 공격합니다.";
$log[] = "<C>●</>{$generalCrewType->name}{$josaRo} 성벽을 <M>공격</>합니다.";
$general['train'] += 1; //훈련 상승
if($general['train'] > GameConst::$maxTrainByWar) { $general['train'] = GameConst::$maxTrainByWar; }
@@ -178,17 +182,10 @@ function processWar($general, $city) {
while($phase < $warphase) {
$phase++;
if($general['level'] == 12) {
$lbonus = $nation['level'] * 2;
} elseif($general['level'] >= 5) {
$lbonus = $nation['level'];
} else {
$lbonus = 0;
}
$myAtt = getAtt($general, $nation['tech'], $lbonus);
$myDef = getDef($general, $nation['tech']);
$cityAtt = getCityAtt($city);
$cityDef = getCityDef($city);
$myAtt = $generalCrewType->getComputedAttack($general, $nation['tech']);
$myDef = $generalCrewType->getComputedDefence($general, $nation['tech']);
$cityAtt = $opposeCrewType->getComputedAttack($city, $destnation['tech']);
$cityDef = $opposeCrewType->getComputedDefence($city, $destnation['tech']);
// 감소할 병사 수
$cityCrew = GameConst::$armperphase + $myAtt - $cityDef;
@@ -205,35 +202,19 @@ function processWar($general, $city) {
$cityCrew *= getDexLog($genDexAtt, ($admin['city_rate']-60)*7200);
$myCrew *= getDexLog(($admin['city_rate']-60)*7200, $genDexDef);
$cityCrew *= $generalCrewType->getAttackCoef($opposeCrewType);
$myCrew *= $generalCrewType->getDefenceCoef($opposeCrewType);
$avoid = 1;
// 병종간 특성
if(intdiv($general['crewtype'], 10) == 3) { // 귀병
if($generalCrewType->magicCoef) {
$int = Util::round(getGeneralIntel($general, true, true, true, false));
if($general['crewtype'] == 30) {
$ratio2 = $int * 5; // 0~500 즉 50%
} elseif($general['crewtype'] == 31) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 32) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 33) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 34) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 35) {
$ratio2 = $int * 8; // 0~800 즉 80%
} elseif($general['crewtype'] == 36) {
$ratio2 = $int * 8; // 0~800 즉 80%
} elseif($general['crewtype'] == 37) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 38) {
$ratio2 = $int * 6; // 0~600 즉 60%
}
$ratio2 = $int / 100 * $generalCrewType->magicCoef;
// 특기보정 : 신산
if($general['special2'] == 41) { $ratio2 += 200; }
if($general['special2'] == 41) { $ratio2 += 0.2; }
$ratio = rand() % 1000; // 0~999
if($ratio <= $ratio2) {
if(Util::randBool($ratio2)) {
$ratio = rand() % 100; // 0~99
// 특기보정 : 귀병, 신산, 환술, 신중
if($general['special2'] == 40) { $ratio += 20; }
@@ -277,13 +258,8 @@ function processWar($general, $city) {
}
}
}
} elseif($general['crewtype'] == 40) { // 정란
$cityCrew = $cityCrew * 1.8;
} elseif($general['crewtype'] == 41) { // 충차
$cityCrew = $cityCrew * 2.4;
} elseif($general['crewtype'] == 42) { // 벽력거
$cityCrew = $cityCrew * 1.8;
}
//군주 공격 보정 10%
if($general['level'] == 12) {
$cityCrew = $cityCrew * 1.10;
@@ -310,7 +286,7 @@ function processWar($general, $city) {
//크리
$rd = rand() % 100; // 0 ~ 99
$ratio = CriticalRatio3($general);
$ratio = $generalCrewType->getCriticalRatio($general);
// 특기보정 : 무쌍, 필살
if($general['special2'] == 61) { $ratio += 10; }
if($general['special2'] == 71) { $ratio += 20; }
@@ -321,7 +297,7 @@ function processWar($general, $city) {
}
//회피
$ratio = rand() % 100; // 0 ~ 99
$ratio2 = GameUnitConst::byID($general['crewtype'])->avoid; //회피율
$ratio2 = $generalCrewType->avoid; //회피율
$ratio2 = Util::round($ratio2 * $general['train'] / 100); //훈련 반영
//특기보정 : 궁병
if($general['special2'] == 51) { $ratio2 += 20; }
@@ -400,7 +376,7 @@ function processWar($general, $city) {
// 성격 보정
$myRice = CharExperience($myRice, $general['personal']);
// 쌀 소모
$myRice = ($myRice * 5 * getCrewtypeRice($general['crewtype'], $nation['tech']));
$myRice = ($myRice * 5 * getCrewtypeRice($generalCrewType, $nation['tech']));
// 결과 쌀
$myRice = $general['rice'] - $myRice;
@@ -411,7 +387,7 @@ function processWar($general, $city) {
}
$render_attacker = [
'crewtype' => mb_substr(GameUnitConst::byId($general['crewtype'])->name, 0, 2),
'crewtype' => mb_substr($generalCrewType->name, 0, 2),
'name'=> $general['name'],
'remain_crew' => $general['crew'],
'killed_crew' => -$mydeathnum
@@ -440,7 +416,7 @@ function processWar($general, $city) {
// 도시쌀 소모 계산
$opexp = Util::round($opexp / 50 * 0.8);
$rice = Util::round($opexp * 5 * getCrewtypeRice(0, 0) * ($admin['city_rate']/100 - 0.2));
$rice = Util::round($opexp * 5 * getCrewtypeRice($opposeCrewType, 0) * ($admin['city_rate']/100 - 0.2));
$destnation['rice'] -= $rice;
if($destnation['rice'] < 0) { $destnation['rice'] = 0; }
$query = "update nation set rice='{$destnation['rice']}' where nation='{$destnation['nation']}'";
@@ -528,16 +504,16 @@ function processWar($general, $city) {
break;
// 공격 장수 병사 소진시 실패 처리
} elseif($general['crew'] <= 0) {
$josaYi = JosaUtil::pick(GameUnitConst::byId($general['crewtype'])->name, '이');
$alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>의 ".GameUnitConst::byId($general['crewtype'])->name."{$josaYi} 퇴각했습니다.";
$josaYi = JosaUtil::pick($generalCrewType->name, '이');
$alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>의 {$generalCrewType->name}{$josaYi} 퇴각했습니다.";
$log[] = "<C>●</>퇴각했습니다.";
$query = "update general set deathnum=deathnum+1 where no='{$general['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
break;
} elseif($myRice <= Util::round($general['crew']/100)) {
$josaYi = JosaUtil::pick(GameUnitConst::byId($general['crewtype'])->name, '이');
$alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>의 ".GameUnitConst::byId($general['crewtype'])->name."{$josaYi} 퇴각했습니다.";
$josaYi = JosaUtil::pick($generalCrewType->name, '이');
$alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>의 {$generalCrewType->name}{$josaYi} 퇴각했습니다.";
$log[] = "<C>●</>군량 부족으로 퇴각합니다.";
$query = "update general set deathnum=deathnum+1 where no='{$general['no']}'";
@@ -547,14 +523,17 @@ function processWar($general, $city) {
// 장수 대결
} else {
$oppose = MYDB_fetch_array($result);
$josaYi = JosaUtil::pick(GameUnitConst::byId($oppose['crewtype'])->name, '이');
$josaWa = JosaUtil::pick(GameUnitConst::byId($general['crewtype'])->name, '와');
$alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>의 ".GameUnitConst::byId($general['crewtype'])->name."{$josaWa} <Y>{$oppose['name']}</>의 ".GameUnitConst::byId($oppose['crewtype'])->name."{$josaYi} 대결합니다.";
$josaUl = JosaUtil::pick(GameUnitConst::byId($oppose['crewtype'])->name, '');
$josaRo = JosaUtil::pick(GameUnitConst::byId($general['crewtype'])->name, '');
$log[] = "<C>●</>".GameUnitConst::byId($general['crewtype'])->name."{$josaRo} <Y>{$oppose['name']}</>의 ".GameUnitConst::byId($oppose['crewtype'])->name."{$josaUl} <M>공격</>합니다.";
$josaUl = JosaUtil::pick(GameUnitConst::byId($general['crewtype'])->name, '을');
$opplog[] = "<C>●</>".GameUnitConst::byId($oppose['crewtype'])->name."{$josaRo} <Y>{$general['name']}</>의 ".GameUnitConst::byId($general['crewtype'])->name."{$josaUl} <M>수비</>합니다.";
setLeadershipBonus($oppose, $destnation['level']);
$opposeCrewType = GameUnitConst::byId($oppose['crewtype']);
$josaYi = JosaUtil::pick($opposeCrewType->name, '');
$josaWa = JosaUtil::pick($opposeCrewType->name, '');
$alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>의 ".$opposeCrewType->name."{$josaWa} <Y>{$oppose['name']}</>의 ".$opposeCrewType->name."{$josaYi} 대결합니다.";
$josaUl = JosaUtil::pick($opposeCrewType->name, '을');
$josaRo = JosaUtil::pick($opposeCrewType->name, '로');
$log[] = "<C>●</>".$opposeCrewType->name."{$josaRo} <Y>{$oppose['name']}</>의 ".$opposeCrewType->name."{$josaUl} <M>공격</>합니다.";
$josaUl = JosaUtil::pick($opposeCrewType->name, '을');
$opplog[] = "<C>●</>".$opposeCrewType->name."{$josaRo} <Y>{$general['name']}</>의 ".$opposeCrewType->name."{$josaUl} <M>수비</>합니다.";
$oppAtmos = 0;
if($oppose['item'] == 3) {
@@ -683,25 +662,11 @@ function processWar($general, $city) {
while($phase < $warphase) {
$phase++;
if($general['level'] == 12) {
$lbonus = $nation['level'] * 2;
} elseif($general['level'] >= 5) {
$lbonus = $nation['level'];
} else {
$lbonus = 0;
}
$myAtt = getAtt($general, $nation['tech'], $lbonus);
$myDef = getDef($general, $nation['tech']);
$myAtt = $generalCrewType->getComputedAttack($general, $nation['tech']);
$myDef = $generalCrewType->getComputedDefence($general, $nation['tech']);
if($oppose['level'] == 12) {
$opplbonus = $destnation['level'] * 2;
} elseif($oppose['level'] >= 5) {
$opplbonus = $destnation['level'];
} else {
$opplbonus = 0;
}
$opAtt = getAtt($oppose, $destnation['tech'], $opplbonus);
$opDef = getDef($oppose, $destnation['tech']);
$opAtt = $opposeCrewType->getComputedAttack($oppose, $destnation['tech']);
$opDef = $opposeCrewType->getComputedAttack($oppose, $destnation['tech']);
// 감소할 병사 수
$myCrew = GameConst::$armperphase + $opAtt - $myDef;
$opCrew = GameConst::$armperphase + $myAtt - $opDef;
@@ -721,33 +686,14 @@ function processWar($general, $city) {
$myAvoid = 1;
$opAvoid = 1;
// 병종간 특성
if(intdiv($general['crewtype'], 10) == 3) { // 귀병
if($generalCrewType->magicCoef) {
$int = Util::round(getGeneralIntel($general, true, true, true, false));
if($general['crewtype'] == 30) {
$ratio2 = $int * 5; // 0~500 즉 50%
} elseif($general['crewtype'] == 31) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 32) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 33) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 34) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 35) {
$ratio2 = $int * 8; // 0~800 즉 80%
} elseif($general['crewtype'] == 36) {
$ratio2 = $int * 8; // 0~800 즉 80%
} elseif($general['crewtype'] == 37) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($general['crewtype'] == 38) {
$ratio2 = $int * 6; // 0~600 즉 60%
}
$ratio2 = $int / 100 * $generalCrewType->magicCoef;
// 특기보정 : 신산
if($general['special2'] == 41) { $ratio2 += 200; }
if($general['special2'] == 41) { $ratio2 += 0.2; }
$ratio = rand() % 1000; // 0~999
if($ratio <= $ratio2) {
if(Util::randBool($ratio2)) {
$ratio = rand() % 100;
// 특기보정 : 귀병, 신산, 환술, 신중
if($general['special2'] == 40) { $ratio += 20; }
@@ -862,33 +808,14 @@ function processWar($general, $city) {
}
// 상대 장수 병종간 특성
if(intdiv($oppose['crewtype'], 10) == 3) { // 귀병
if($opposeCrewType->magicCoef) {
$int = Util::round(getGeneralIntel($oppose, true, true, true, false));
if($oppose['crewtype'] == 30) {
$ratio2 = $int * 5; // 0~500 즉 50%
} elseif($oppose['crewtype'] == 31) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($oppose['crewtype'] == 32) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($oppose['crewtype'] == 33) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($oppose['crewtype'] == 34) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($oppose['crewtype'] == 35) {
$ratio2 = $int * 8; // 0~800 즉 80%
} elseif($oppose['crewtype'] == 36) {
$ratio2 = $int * 8; // 0~800 즉 80%
} elseif($oppose['crewtype'] == 37) {
$ratio2 = $int * 6; // 0~600 즉 60%
} elseif($oppose['crewtype'] == 38) {
$ratio2 = $int * 6; // 0~600 즉 60%
}
$ratio2 = $int / 100 * $opposeCrewType->magicCoef;
// 특기보정 : 신산
if($oppose['special2'] == 41) { $ratio2 += 200; }
if($oppose['special2'] == 41) { $ratio2 += 0.2; }
$ratio = rand() % 1000; // 0~999
if($ratio <= $ratio2) {
if(Util::randBool($ratio2)) {
$ratio = rand() % 100;
// 특기보정 : 귀병, 신산, 환술, 신중
if($oppose['special2'] == 40) { $ratio += 20; }
@@ -1003,6 +930,7 @@ function processWar($general, $city) {
}
// 특기보정: 돌격
//XXX: 목우!!!!
if($oppose['crewtype'] == 43 && $general['special2'] != 60) { // 목우
$r = 0;
$r += $oppose['atmos'] + $oppAtmos + $oppAtmosBonus;
@@ -1016,49 +944,8 @@ function processWar($general, $city) {
}
}
// my 입장 상성
// 보병계열 > 궁병계열
if(intdiv($general['crewtype'], 10) == 0 && intdiv($oppose['crewtype'], 10) == 1) {
$myCrew *= 0.8;
$opCrew *= 1.2;
}
// 궁병계열 > 기병계열
if(intdiv($general['crewtype'], 10) == 1 && intdiv($oppose['crewtype'], 10) == 2) {
$myCrew *= 0.8;
$opCrew *= 1.2;
}
// 기병계열 > 보병계열
if(intdiv($general['crewtype'], 10) == 2 && intdiv($oppose['crewtype'], 10) == 0) {
$myCrew *= 0.8;
$opCrew *= 1.2;
}
// 차병계열
if(intdiv($general['crewtype'], 10) == 4) {
$myCrew *= 1.2;
$opCrew *= 0.8;
}
// op 입장 상성
// 보병계열 > 궁병계열
if(intdiv($oppose['crewtype'], 10) == 0 && intdiv($general['crewtype'], 10) == 1) {
$opCrew *= 0.8;
$myCrew *= 1.2;
}
// 궁병계열 > 기병계열
if(intdiv($oppose['crewtype'], 10) == 1 && intdiv($general['crewtype'], 10) == 2) {
$opCrew *= 0.8;
$myCrew *= 1.2;
}
// 기병계열 > 보병계열
if(intdiv($oppose['crewtype'], 10) == 2 && intdiv($general['crewtype'], 10) == 0) {
$opCrew *= 0.8;
$myCrew *= 1.2;
}
// 차병계열
if(intdiv($oppose['crewtype'], 10) == 4) {
$opCrew *= 1.2;
$myCrew *= 0.8;
}
$opCrew *= $generalCrewType->getAttackCoef($opposeCrewType);
$myCrew *= $generalCrewType->getDefenceCoef($opposeCrewType);
//군주 공격 보정 10%
if($general['level'] == 12) {
@@ -1096,8 +983,7 @@ function processWar($general, $city) {
if($general['special2'] == 50) { $myCrew *= 0.90; }
if($general['special2'] == 62) { $myCrew *= 0.90; }
if($general['special2'] == 75) {
if($oppose['crewtype'] != 0 && $oppose['crewtype'] != 10 && $oppose['crewtype'] != 20 &&
$oppose['crewtype'] != 30 && $oppose['crewtype'] != 40 && $oppose['crewtype'] != 41)
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions)
{
$opCrew *= 1.1; $myCrew *= 0.9;
}
@@ -1115,8 +1001,7 @@ function processWar($general, $city) {
if($oppose['special2'] == 50) { $opCrew *= 0.80; }
if($oppose['special2'] == 62) { $myCrew *= 1.10; }
if($oppose['special2'] == 75) {
if($general['crewtype'] != 0 && $general['crewtype'] != 10 && $general['crewtype'] != 20 &&
$general['crewtype'] != 30 && $general['crewtype'] != 40 && $general['crewtype'] != 41)
if($generalCrewType->reqCities || $generalCrewType->reqRegions)
{
$myCrew *= 1.1; $opCrew *= 0.9;
}
@@ -1130,7 +1015,7 @@ function processWar($general, $city) {
//크리
$rd = rand() % 100; // 0 ~ 99
$ratio = CriticalRatio3($general);
$ratio = $generalCrewType->getCriticalRatio($general);
// 특기보정 : 무쌍, 필살
if($general['special2'] == 61) { $ratio += 10; }
if($general['special2'] == 71) { $ratio += 20; }
@@ -1152,7 +1037,7 @@ function processWar($general, $city) {
}
//크리
$rd = rand() % 100; // 0 ~ 99
$ratio = CriticalRatio3($oppose);
$ratio = $opposeCrewType->getCriticalRatio($oppose);
// 특기보정 : 필살
if($oppose['special2'] == 71) { $ratio += 20; }
if($ratio >= $rd && $opAvoid == 1) {
@@ -1180,7 +1065,7 @@ function processWar($general, $city) {
//회피
$ratio = rand() % 100; // 0 ~ 99
$ratio2 = GameUnitConst::byID($general['crewtype'])->avoid; //회피율
$ratio2 = $generalCrewType->avoid; //회피율
$ratio2 = Util::round($ratio2 * $general['train'] / 100); //훈련 반영
//특기보정 : 돌격, 궁병
if($oppose['special2'] == 60) { $ratio2 -= 100; }
@@ -1203,7 +1088,7 @@ function processWar($general, $city) {
}
//회피
$ratio = rand() % 100; // 0 ~ 99
$ratio2 = GameUnitConst::byID($oppose['crewtype'])->avoid; //회피율
$ratio2 = $opposeCrewType->avoid; //회피율
$ratio2 = Util::round($ratio2 * $oppose['train'] / 100); //훈련 반영
// 특기보정 : 돌격, 궁병
if($general['special2'] == 60) { $ratio2 -= 100; }
@@ -1303,7 +1188,7 @@ function processWar($general, $city) {
// 성격 보정
$myRice = CharExperience($myRice, $general['personal']);
// 쌀 소모
$myRice = ($myRice * 5 * getCrewtypeRice($general['crewtype'], $nation['tech']));
$myRice = ($myRice * 5 * getCrewtypeRice($generalCrewType, $nation['tech']));
// 결과 쌀
$myRice = $general['rice'] - $myRice;
@@ -1312,7 +1197,7 @@ function processWar($general, $city) {
// 성격 보정
$opRice = CharExperience($opRice, $oppose['personal']);
// 쌀 소모
$opRice = ($opRice * 5 * getCrewtypeRice($oppose['crewtype'], $destnation['tech']));
$opRice = ($opRice * 5 * getCrewtypeRice($opposeCrewType, $destnation['tech']));
// 결과 쌀
$opRice = $oppose['rice'] - $opRice;
@@ -1324,13 +1209,13 @@ function processWar($general, $city) {
}
$render_attacker = [
'crewtype' => mb_substr(GameUnitConst::byId($general['crewtype'])->name, 0, 2),
'crewtype' => mb_substr($generalCrewType->name, 0, 2),
'name'=> $general['name'],
'remain_crew' => $general['crew'],
'killed_crew' => -$mydeathnum
];
$render_defender = [
'crewtype' => mb_substr(GameUnitConst::byId($oppose['crewtype'])->name, 0, 2),
'crewtype' => mb_substr($opposeCrewType->name, 0, 2),
'name'=> $oppose['name'],
'remain_crew' => $oppose['crew'],
'killed_crew' => -$opdeathnum
@@ -1430,14 +1315,14 @@ function processWar($general, $city) {
// 상대 병사 소진이나 쌀 소진시 다음 장수
if($oppose['crew'] <= 0 || ($opRice <= Util::round($oppose['crew']/100) && $general['crew'] > 0)) {
if($opRice <= Util::round($oppose['crew']/100)) {
$josaYi = JosaUtil::pick(GameUnitConst::byId($oppose['crewtype'])->name, '이');
$alllog[] = "<C>●</>{$month}월:<Y>{$oppose['name']}</>의 ".GameUnitConst::byId($oppose['crewtype'])->name."{$josaYi} 패퇴했습니다.";
$log[] = "<C>●</><Y>{$oppose['name']}</>의 ".GameUnitConst::byId($oppose['crewtype'])->name."{$josaYi} 패퇴했습니다.";
$josaYi = JosaUtil::pick($opposeCrewType->name, '이');
$alllog[] = "<C>●</>{$month}월:<Y>{$oppose['name']}</>의 {$opposeCrewType->name}{$josaYi} 패퇴했습니다.";
$log[] = "<C>●</><Y>{$oppose['name']}</>의 {$opposeCrewType->name}{$josaYi} 패퇴했습니다.";
$opplog[] = "<C>●</>군량 부족으로 패퇴합니다.";
} else {
$josaYi = JosaUtil::pick(GameUnitConst::byId($oppose['crewtype'])->name, '이');
$alllog[] = "<C>●</>{$month}월:<Y>{$oppose['name']}</>의 ".GameUnitConst::byId($oppose['crewtype'])->name."{$josaYi} 전멸했습니다.";
$log[] = "<C>●</><Y>{$oppose['name']}</>의 ".GameUnitConst::byId($oppose['crewtype'])->name."{$josaYi} 전멸했습니다.";
$josaYi = JosaUtil::pick($opposeCrewType->name, '이');
$alllog[] = "<C>●</>{$month}월:<Y>{$oppose['name']}</>의 {$opposeCrewType->name}{$josaYi} 전멸했습니다.";
$log[] = "<C>●</><Y>{$oppose['name']}</>의 {$opposeCrewType->name}{$josaYi} 전멸했습니다.";
$opplog[] = "<C>●</>전멸했습니다.";
}
$opposecount--;
@@ -1454,7 +1339,7 @@ function processWar($general, $city) {
// 성격 보정
$opexp = CharExperience($opexp, $oppose['personal']);
// 쌀 소모
$oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($oppose['crewtype'], $destnation['tech']));
$oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($opposeCrewType, $destnation['tech']));
if($oppose['rice'] < 0) { $oppose['rice'] = 0; }
$query = "update general set deathnum=deathnum+1,rice='{$oppose['rice']}',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='{$oppose['no']}'";
@@ -1471,21 +1356,21 @@ function processWar($general, $city) {
// 공격 장수 병사 소진이나 쌀 소진시 실패 처리
} elseif($general['crew'] <= 0 || $myRice <= Util::round($general['crew']/100)) {
if($myRice <= Util::round($general['crew']/100)) {
$josaYi = JosaUtil::pick(GameUnitConst::byId($general['crewtype'])->name, '이');
$alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>의 ".GameUnitConst::byId($general['crewtype'])->name."{$josaYi} 퇴각했습니다.";
$josaYi = JosaUtil::pick($generalCrewType->name, '이');
$alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>의 {$generalCrewType->name}{$josaYi} 퇴각했습니다.";
$log[] = "<C>●</>군량 부족으로 퇴각합니다.";
$opplog[] = "<C>●</><Y>{$general['name']}</>의 ".GameUnitConst::byId($general['crewtype'])->name."{$josaYi} 퇴각했습니다.";
$opplog[] = "<C>●</><Y>{$general['name']}</>의 {$generalCrewType->name}{$josaYi} 퇴각했습니다.";
} else {
$josaYi = JosaUtil::pick(GameUnitConst::byId($general['crewtype'])->name, '이');
$alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>의 ".GameUnitConst::byId($general['crewtype'])->name."{$josaYi} 퇴각했습니다.";
$josaYi = JosaUtil::pick($generalCrewType->name, '이');
$alllog[] = "<C>●</>{$month}월:<Y>{$general['name']}</>의 {$generalCrewType->name}{$josaYi} 퇴각했습니다.";
$log[] = "<C>●</>퇴각했습니다.";
$opplog[] = "<C>●</><Y>{$general['name']}</>의 ".GameUnitConst::byId($general['crewtype'])->name."{$josaYi} 퇴각했습니다.";
$opplog[] = "<C>●</><Y>{$general['name']}</>의 {$generalCrewType->name}{$josaYi} 퇴각했습니다.";
}
// 경험치 상승
if(intdiv($oppose['crewtype'], 10) == 3) { // 귀병
if($opposeCrewType->armType == GameUnitConst::T_WIZARD) { // 귀병
$oppose['intel2']++;
} elseif(intdiv($oppose['crewtype'], 10) == 4) { // 차병
} elseif($opposeCrewType->armType == GameUnitConst::T_SIEGE) { // 차병
$oppose['leader2']++;
} else {
$oppose['power2']++;
@@ -1499,7 +1384,7 @@ function processWar($general, $city) {
// 성격 보정
$opexp = CharExperience($opexp, $oppose['personal']);
// 쌀 소모
$oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($oppose['crewtype'], $destnation['tech']));
$oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($opposeCrewType, $destnation['tech']));
if($oppose['rice'] < 0) { $oppose['rice'] = 0; }
$query = "update general set rice='{$oppose['rice']}',leader2='{$oppose['leader2']}',power2='{$oppose['power2']}',intel2='{$oppose['intel2']}',atmos='{$oppose['atmos']}',experience=experience+'$opexp',dedication=dedication+'$opexp',killnum=killnum+1 where no='{$oppose['no']}'";
@@ -1539,7 +1424,7 @@ function processWar($general, $city) {
// 성격 보정
$opexp = CharExperience($opexp, $oppose['personal']);
// 쌀 소모
$oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($oppose['crewtype'], $destnation['tech']));
$oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($opposeCrewType, $destnation['tech']));
if($oppose['rice'] < 0) { $oppose['rice'] = 0; }
$query = "update general set rice='{$oppose['rice']}',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='{$oppose['no']}'";
@@ -1547,9 +1432,9 @@ function processWar($general, $city) {
}
// 경험치 상승
if(intdiv($general['crewtype'], 10) == 3) { // 귀병
if($generalCrewType->armType == GameUnitConst::T_WIZARD) { // 귀병
$general['intel2'] += $exp2;
} elseif(intdiv($general['crewtype'], 10) == 4) { // 차병
} elseif($generalCrewType->armType == GameUnitConst::T_SIEGE) { // 차병
$general['leader2'] += $exp2;
} else {
$general['power2'] += $exp2;
@@ -1562,7 +1447,7 @@ function processWar($general, $city) {
// 성격 보정
$exp = CharExperience($exp, $general['personal']);
// 쌀 소모
$general['rice'] -= ($exp * 5 * getCrewtypeRice($general['crewtype'], $nation['tech']));
$general['rice'] -= ($exp * 5 * getCrewtypeRice($generalCrewType, $nation['tech']));
if($general['rice'] < 0) { $general['rice'] = 0; }
$query = "update general set rice='{$general['rice']}',dedication=dedication+'$exp',experience=experience+'$exp' where no='{$general['no']}'";
@@ -1578,41 +1463,6 @@ function processWar($general, $city) {
return $deadAmount;
}
function CriticalRatio3($general) {
// 무장 무력 : 65 5%, 70 10%, 75 15%, 80 20%
// 지장 지력 : 65 5%, 70 8%, 75 10%, 80 13%
//충차장 통솔: 65 5%, 70 8%, 75 10%, 80 13%
$crewtype = intdiv($general['crewtype'], 10);
if($crewtype == 3){ //지장
$mainstat = getGeneralIntel($general, false, true, true, false);
}
else if($crewtype == 4){ //병기
$mainstat = getGeneralLeadership($general, false, true, true, false);
}
else{ //무장
$mainstat = getGeneralPower($general, false, true, true, false);
}
$ratio = max($mainstat - 65, 0);
if ($crewtype >= 3) {
$ratio *= 0.4;
}
else{
$ratio *= 0.5;
}
$ratio = round($ratio);
$ratio += 5;
if($ratio > 50) $ratio = 50;
return $ratio;
}
function CriticalScore2($score) {
$score = Util::round($score * (rand()%8 + 13)/10); // 1.3~2.0
return $score;
@@ -1629,8 +1479,7 @@ function getCrew($crew, $youatmos, $mytrain) {
}
function getCrewtypeRice($crewtype, $tech) {
if(!$crewtype) { $crewtype = 0; }
$cost = GameUnitConst::byID($crewtype)->rice / 10;
$cost = $crewtype->rice / 10;
return $cost * getTechCost($tech);
}
@@ -1638,44 +1487,6 @@ function getCrewtypeRice($crewtype, $tech) {
// 표준 공 / 수 반환 수치는 약 0이 되게 (100~550)
//////////////////////////////////////////////////////////////
function getAtt($general, $tech, $lbonus) {
$att = GameUnitConst::byID($general['crewtype'])->attack + getTechAbil($tech);
$general['lbonus'] = $lbonus;
if(intdiv($general['crewtype'], 10) == 3) { // 귀병 지100%
$ratio = getGeneralIntel($general, true, true, true)*2 - 40;
} elseif(intdiv($general['crewtype'], 10) == 4) { // 차병 통100%
$ratio = getGeneralLeadership($general, true, true, true)*2 - 40;
} else {
$ratio = getGeneralPower($general, true, true, true)*2 - 40; //10일때 -20, 70일때 100, 100일때 160
}
if($ratio < 10) { $ratio = 10; }
if($ratio > 100) { $ratio = 50 + $ratio/2; } // 100보다 큰 경우는 상승률 1/2
$att = $att * $ratio / 100;
return $att;
}
function getDef($general, $tech) {
$def = GameUnitConst::byID($general['crewtype'])->defence + getTechAbil($tech);
$crew = ($general['crew'] / (7000 / 30)) + 70; // 5000명일때 91점 7000명일때 100점 10000명일때 113점
$def = $def * $crew / 100;
return $def;
}
function getCityAtt($city) {
$att = ($city['def']*0.1 + $city['wall']*0.9) / 500 + 200; //50000일때 300점 100000일때 400점
return $att;
}
function getCityDef($city) {
$def = ($city['def']*0.1 + $city['wall']*0.9) / 500 + 200;
return $def;
}
function getRate($admin, $type, $dtype) {
$t = "{$dtype}{$type}";
return $admin[$t];
+106 -388
View File
@@ -49,8 +49,8 @@ switch($commandtype) {
case 8: command_Single($turn, 8); break; //치안 강화
case 9: command_Single($turn, 9); break; //자금 조달
case 11: command_11( $turn, 11); break; //징병
case 12: command_12( $turn, 12); break; //모병
case 11: command_11( $turn, 11, false); break; //징병
case 12: command_11( $turn, 12, true); break; //모병
case 13: command_Single($turn, 13); break; //훈련
case 14: command_Single($turn, 14); break; //사기진작
//case 15: command_Single($turn, 0); break; //전투태세
@@ -125,9 +125,10 @@ function starter($name, $type=0) {
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=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/base_map.js')?>
<?=WebUtil::printJS('d_shared/base_map.js')?>
<?=WebUtil::printJS('js/map.js')?>
<script>
$(function(){
@@ -144,7 +145,7 @@ $(function(){
});
});
</script>
<?=WebUtil::printCSS('css/normalize.css')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/main.css')?>
@@ -192,416 +193,133 @@ function command_99($turn) {
header('location:b_chiefcenter.php');
}
function command_11($turn, $command) {
function command_11($turn, $command, bool $is모병 = false) {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$userID = Session::getUserID();
starter("징병");
$me = $db->queryFirstRow(
'SELECT no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold
from general where owner=%i',
$userID
);
$query = "select no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$query = "select level,tech from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error("process53 ".MYDB_error($connect),"");
$nation = MYDB_fetch_array($result);
if($me['level'] == 12) {
$lbonus = $nation['level'] * 2;
} elseif($me['level'] >= 5) {
$lbonus = $nation['level'];
} else {
$lbonus = 0;
[$nationLevel, $tech] = $db->queryFirstList('SELECT level,tech FROM nation WHERE nation=%i', $me['nation']);
if(!$nationLevel){
$nationLevel = 0;
}
if(!$tech){
$tech = 0;
}
$lbonus = setLeadershipBonus($me, $nationLevel);
$ownCities = [];
$ownRegions = [];
$relativeYear = $gameStor->year - $gameStor->startyear;
$tech = $nation['tech'];
[$year, $startyear] = $gameStor->getValuesAsArray(['year','startyear']);
$relativeYear = $year - $startyear;
foreach(DB::db()->query('SELECT city, region from city where nation = %i', $me['nation']) as $city){
$ownCities[$city['city']] = 1;
$ownRegions[$city['region']] = 1;
}
$leader = intdiv($me['leader'] * (100 - $me['injury']), 100) + getHorseEff($me['horse']) + $lbonus;
$crew = $leader - Util::round($me['crew']/100);
$abil = getTechAbil($nation['tech']);
$cost = getTechCost($nation['tech']);
echo "
<font size=2>병사를 모집합니다. 훈련과 사기치는 낮지만 가격이 저렴합니다.<br>
가능한 수보다 많게 입력하면 가능한 최대 병사를 모집합니다.<br>
이미 병사가 있는 경우 추가징병되며, 병종이 다를경우는 기존의 병사는 소집해제됩니다.<br>
현재 징병 가능한 병종은 <font color=green>녹색</font>으로 표시되며,<br>
현재 징병 가능한 특수병종은 <font color=limegreen>초록색</font>으로 표시됩니다.<br>
<script type='text/javascript'>
function calc(cost, formnum) {
switch(formnum) {
case 0: form = document.form0; break;
case 1: form = document.form1; break;
case 2: form = document.form2; break;
case 3: form = document.form3; break;
case 4: form = document.form4; break;
case 5: form = document.form5; break;
case 10: form = document.form10; break;
case 11: form = document.form11; break;
case 12: form = document.form12; break;
case 13: form = document.form13; break;
case 14: form = document.form14; break;
case 20: form = document.form20; break;
case 21: form = document.form21; break;
case 22: form = document.form22; break;
case 23: form = document.form23; break;
case 24: form = document.form24; break;
case 25: form = document.form25; break;
case 26: form = document.form26; break;
case 27: form = document.form27; break;
case 30: form = document.form30; break;
case 31: form = document.form31; break;
case 32: form = document.form32; break;
case 33: form = document.form33; break;
case 34: form = document.form34; break;
case 35: form = document.form35; break;
case 36: form = document.form36; break;
case 37: form = document.form37; break;
case 38: form = document.form38; break;
case 40: form = document.form40; break;
case 41: form = document.form41; break;
case 42: form = document.form42; break;
case 43: form = document.form43; break;
}
crew = form.double.value;
form.cost.value = Math.round(crew * cost);
}
</script>
<table class='tb_layout' style='margin:auto;'>
<tr>
<td colspan=10 align=center id=bg2>
현재 기술력 : <input type=text style=text-align:right;color:white;background-color:black size=5 readonly value=".getTechCall($nation['tech']).">
현재 통솔 : <input type=text style=text-align:right;color:white;background-color:black size=3 readonly value=$leader>
현재 병종 : <input type=text size=8 style=text-align:right;color:white;background-color:black readonly value=".GameUnitConst::byID($me['crewtype'])->name.">
현재 병사 : <input type=text size=5 style=text-align:right;color:white;background-color:black readonly value={$me['crew']}>
현재 자금 : <input type=text size=5 style=text-align:right;color:white;background-color:black readonly value={$me['gold']}>
</td>
</tr>
<tr>
<td width=64 align=center id=bg1>사진</td>
<td width=64 align=center id=bg1>병종</td>
<td width=40 align=center id=bg1>공격</td>
<td width=40 align=center id=bg1>방어</td>
<td width=40 align=center id=bg1>기동</td>
<td width=40 align=center id=bg1>회피</td>
<td width=40 align=center id=bg1>군량</td>
<td width=40 align=center id=bg1>가격</td>
<td width=130 align=center id=bg1>병사수</td>
<td width=300 align=center id=bg1>특징</td>
</tr>";
$leader = getGeneralLeadership($me, true, true, true);
$maxCrew = $leader - Util::round($me['crew']/100);
$abil = getTechAbil($tech);
foreach(GameUnitConst::all() as $i=>$unit) {
if($i == 0){
echo '<tr><td colspan=10>보병 계열</td></tr>';
}
else if($i == 10){
echo '<tr><td colspan=10>궁병 계열</td></tr>';
}
else if($i == 20){
echo '<tr><td colspan=10>기병 계열</td></tr>';
}
else if($i == 30){
echo '<tr><td colspan=10>귀병 계열</td></tr>';
}
else if($i == 40){
echo '<tr><td colspan=10>차병 계열</td></tr>';
}
$armTypes = [];
if(!$unit->isValid($ownCities, $ownRegions, $relativeYear, $tech)){
continue; //TODO: 불가능한 병종도 보여줄 필요가 있음.
}
foreach(GameUnitConst::allType() as $armType => $armName){
$armTypeCrews = [];
if($unit->recruitType == 0){
$l = 'green';
}
else{
$l = 'limegreen';
}
$baseRice = $unit->rice * $cost;
$baseCost = $unit->cost * $cost;
$baseCost = CharCost($baseCost, $me['personal']);
$unitBaseType = intdiv($unit->id, 10);
if($me['special2'] == 50 && $unitBaseType == 0){
$baseCost *= 0.9;
}
else if($me['special2'] == 51 && $unitBaseType == 1){
$baseCost *= 0.9;
}
else if($me['special2'] == 52 && $unitBaseType == 2){
$baseCost *= 0.9;
}
else if($me['special2'] == 53 && $unitBaseType == 3){
$baseCost *= 0.9;
}
else if($me['special2'] == 54 && $unitBaseType == 4){
$baseCost *= 0.9;
}
else if($me['special2'] == 72) {
$baseCost *= 0.5;
}
$name = $unit->name;
$attack = $unit->attack + $abil;
$defence = $unit->defence + $abil;
$speed = $unit->speed;
$avoid = $unit->avoid;
$weapImage = ServConfig::$gameImagePath."/weap{$i}.png";
if($gameStor->show_img_level < 2) { $weapImage = ServConfig::$sharedIconPath."/default.jpg"; }
$baseRiceShort = round($baseRice, 1);
$baseCostShort = round($baseCost, 1);
$info = join('<br>', $unit->info);
echo "
<tr height=64 bgcolor=$l>
<td style='background:no-repeat center url(\"{$weapImage}\");background-size:64px;background-color:#222222;' align=center></td>
<td align=center>{$name}</td>
<td align=center>{$attack}</td>
<td align=center>{$defence}</td>
<td align=center>{$speed}</td>
<td align=center>{$avoid}</td>
<td align=center>{$baseRiceShort}</td>
<td align=center>{$baseCostShort}</td>
<form name=form{$i} action=c_double.php>
<td valign=center>
<input type=text name=double maxlength=3 size=3 value=$crew style=text-align:right;color:white;background-color:black>00<input type=button value=계산 onclick='calc($baseCost, $i)'><br>
<input type=text name=cost maxlength=5 size=5 readonly style=text-align:right;color:white;background-color:black> <input type=submit value=징병>
<input type=hidden name=third value={$i}>
<input type=hidden name=command value=$command>";
for($j=0; $j < count($turn); $j++) {
echo "
<input type=hidden name=turn[] value=$turn[$j]>";
}
echo "
</td>
</form>
<td>$info</td>
</tr>";
}
echo "
</table>";
ender();
}
function command_12($turn, $command) {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$connect=$db->get();
$userID = Session::getUserID();
starter("모병");
$query = "select no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
$query = "select level,tech from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error("process53 ".MYDB_error($connect),"");
$nation = MYDB_fetch_array($result);
if($me['level'] == 12) {
$lbonus = $nation['level'] * 2;
} elseif($me['level'] >= 5) {
$lbonus = $nation['level'];
} else {
$lbonus = 0;
}
$ownCities = [];
$ownRegions = [];
$relativeYear = $gameStor->year - $gameStor->startyear;
$tech = $nation['tech'];
foreach(DB::db()->query('SELECT city, region from city where nation = %i', $me['nation']) as $city){
$ownCities[$city['city']] = 1;
$ownRegions[$city['region']] = 1;
}
$leader = intdiv($me['leader'] * (100 - $me['injury']), 100) + getHorseEff($me['horse']) + $lbonus;
$crew = $leader - round($me['crew']/100);
$abil = getTechAbil($nation['tech']);
$cost = getTechCost($nation['tech']);
echo "
<font size=2>병사를 모집합니다. 훈련과 사기치는 높지만 자금이 많이 듭니다.<br>
가능한 수보다 많게 입력하면 가능한 최대 병사를 모집합니다.<br>
이미 병사가 있는 경우 추가징병되며, 병종이 다를경우는 기존의 병사는 소집해제됩니다.<br>
현재 모병 가능한 병종은 <font color=green>녹색</font>으로 표시되며,<br>
현재 모병 가능한 특수병종은 <font color=limegreen>초록색</font>으로 표시됩니다.<br>
<script type='text/javascript'>
function calc(cost, formnum) {
switch(formnum) {
case 0: form = document.form0; break;
case 1: form = document.form1; break;
case 2: form = document.form2; break;
case 3: form = document.form3; break;
case 4: form = document.form4; break;
case 5: form = document.form5; break;
case 10: form = document.form10; break;
case 11: form = document.form11; break;
case 12: form = document.form12; break;
case 13: form = document.form13; break;
case 14: form = document.form14; break;
case 20: form = document.form20; break;
case 21: form = document.form21; break;
case 22: form = document.form22; break;
case 23: form = document.form23; break;
case 24: form = document.form24; break;
case 25: form = document.form25; break;
case 26: form = document.form26; break;
case 27: form = document.form27; break;
case 30: form = document.form30; break;
case 31: form = document.form31; break;
case 32: form = document.form32; break;
case 33: form = document.form33; break;
case 34: form = document.form34; break;
case 35: form = document.form35; break;
case 36: form = document.form36; break;
case 37: form = document.form37; break;
case 38: form = document.form38; break;
case 40: form = document.form40; break;
case 41: form = document.form41; break;
case 42: form = document.form42; break;
case 43: form = document.form43; break;
}
crew = form.double.value;
form.cost.value = Math.round(crew * cost * 2);
}
</script>
<table class='tb_layout' style='margin:auto;'>
<tr><td align=center colspan=10>모병은 가격 2배의 자금이 소요됩니다.</td></tr>
<tr>
<td colspan=10 align=center id=bg2>
현재 기술력 : <input type=text style=text-align:right;color:white;background-color:black size=5 readonly value=".getTechCall($nation['tech']).">
현재 통솔 : <input type=text style=text-align:right;color:white;background-color:black size=3 readonly value=$leader>
현재 병종 : <input type=text size=8 style=text-align:right;color:white;background-color:black readonly value=".GameUnitConst::byID($me['crewtype'])->name.">
현재 병사 : <input type=text size=5 style=text-align:right;color:white;background-color:black readonly value={$me['crew']}>
현재 자금 : <input type=text size=5 style=text-align:right;color:white;background-color:black readonly value={$me['gold']}>
</td>
</tr>
<tr>
<td width=64 align=center id=bg1>사진</td>
<td width=64 align=center id=bg1>병종</td>
<td width=40 align=center id=bg1>공격</td>
<td width=40 align=center id=bg1>방어</td>
<td width=40 align=center id=bg1>기동</td>
<td width=40 align=center id=bg1>회피</td>
<td width=40 align=center id=bg1>군량</td>
<td width=40 align=center id=bg1>가격</td>
<td width=130 align=center id=bg1>병사수</td>
<td width=300 align=center id=bg1>특징</td>
</tr>";
foreach(GameUnitConst::byType($armType) as $unit){
$crewObj = new \stdClass;
if(!$unit->isValid($ownCities, $ownRegions, $relativeYear, $tech)){
continue; //TODO: 불가능한 병종도 보여줄 필요가 있음.
}
$crewObj->id = $unit->id;
if($unit->reqTech == 0){
$crewObj->bgcolor = 'green';
}
else{
$crewObj->bgcolor = 'limegreen';
}
foreach(GameUnitConst::all() as $i=>$unit) {
if($i == 0){
echo '<tr><td colspan=10>보병 계열</td></tr>';
}
else if($i == 10){
echo '<tr><td colspan=10>궁병 계열</td></tr>';
}
else if($i == 20){
echo '<tr><td colspan=10>기병 계열</td></tr>';
}
else if($i == 30){
echo '<tr><td colspan=10>귀병 계열</td></tr>';
}
else if($i == 40){
echo '<tr><td colspan=10>차병 계열</td></tr>';
}
$crewObj->baseRice = $unit->rice * getTechCost($tech);
$crewObj->baseCost = CharCost($unit->costWithTech($tech), $me['personal']);
if(!$unit->isValid($ownCities, $ownRegions, $relativeYear, $tech)){
continue; //TODO: 불가능한 병종도 보여줄 필요가 있음.
}
if($unit->recruitType == 0){
$l = 'green';
}
else{
$l = 'limegreen';
}
$armType = $unit->armType;
if($me['special2'] == 50 && $armType == GameUnitConst::T_FOOTMAN){
$crewObj->baseCost *= 0.9;
}
else if($me['special2'] == 51 && $armType == GameUnitConst::T_ARCHER){
$crewObj->baseCost *= 0.9;
}
else if($me['special2'] == 52 && $armType == GameUnitConst::T_CAVALRY){
$crewObj->baseCost *= 0.9;
}
else if($me['special2'] == 53 && $armType == GameUnitConst::T_WIZARD){
$crewObj->baseCost *= 0.9;
}
else if($me['special2'] == 54 && $armType == GameUnitConst::T_SIEGE){
$crewObj->baseCost *= 0.9;
}
else if($me['special2'] == 72) {
$crewObj->baseCost *= 0.5;
}
$crewObj->name = $unit->name;
$crewObj->attack = $unit->attack + $abil;
$crewObj->defence = $unit->defence + $abil;
$crewObj->speed = $unit->speed;
$crewObj->avoid = $unit->avoid;
if($gameStor->show_img_level < 2) {
$crewObj->img = ServConfig::$sharedIconPath."/default.jpg";
}
else{
$crewObj->img = ServConfig::$gameImagePath."/weap".$unit->id.".png";
}
$crewObj->baseRiceShort = round($crewObj->baseRice, 1);
$crewObj->baseCostShort = round($crewObj->baseCost, 1);
$crewObj->info = join('<br>', $unit->info);
$baseRice = $unit->rice * $cost;
$baseCost = $unit->cost * $cost;
$baseCost = CharCost($baseCost, $me['personal']);
$unitBaseType = intdiv($unit->id, 10);
if($me['special2'] == 50 && $unitBaseType == 0){
$baseCost *= 0.9;
$armTypeCrews[] = $crewObj;
}
else if($me['special2'] == 51 && $unitBaseType == 1){
$baseCost *= 0.9;
}
else if($me['special2'] == 52 && $unitBaseType == 2){
$baseCost *= 0.9;
}
else if($me['special2'] == 53 && $unitBaseType == 3){
$baseCost *= 0.9;
}
else if($me['special2'] == 54 && $unitBaseType == 4){
$baseCost *= 0.9;
}
else if($me['special2'] == 72) {
$baseCost *= 0.5;
}
$name = $unit->name;
$attack = $unit->attack + $abil;
$defence = $unit->defence + $abil;
$speed = $unit->speed;
$avoid = $unit->avoid;
$weapImage = ServConfig::$gameImagePath."/weap{$i}.png";
if($gameStor->show_img_level < 2) { $weapImage = ServConfig::$sharedIconPath."/default.jpg"; }
$baseRiceShort = round($baseRice, 1);
$baseCostShort = round($baseCost, 1);
$info = join('<br>', $unit->info);
echo "
<tr height=64 bgcolor=$l>
<td style='background:no-repeat center url(\"{$weapImage}\");background-size:64px;background-color:#222222;' align=center></td>
<td align=center>{$name}</td>
<td align=center>{$attack}</td>
<td align=center>{$defence}</td>
<td align=center>{$speed}</td>
<td align=center>{$avoid}</td>
<td align=center>{$baseRiceShort}</td>
<td align=center>{$baseCostShort}</td>
<form name=form{$i} action=c_double.php>
<td valign=center>
<input type=text name=double maxlength=3 size=3 value=$crew style=text-align:right;color:white;background-color:black>00<input type=button value=계산 onclick='calc($baseCost, $i)'><br>
<input type=text name=cost maxlength=5 size=5 readonly style=text-align:right;color:white;background-color:black> <input type=submit value=모병>
<input type=hidden name=third value={$i}>
<input type=hidden name=command value=$command>";
for($j=0; $j < count($turn); $j++) {
echo "
<input type=hidden name=turn[] value=$turn[$j]>";
}
echo "
</td>
</form>
<td>$info</td>
</tr>";
$armTypes[] = [$armName, $armTypeCrews];
}
if($is모병){
$commandName = '모병';
starter("모병");
}
else{
$commandName = '징병';
starter("징병");
}
echo "
</table>";
$templates = new \League\Plates\Engine('templates');
echo $templates->render('recruitCrewForm', [
'command'=>$command,
'commandName'=>$commandName,
'techLevelText'=>getTechCall($tech),
'tech'=>$tech,
'leader'=>$leader,
'crewType'=>GameUnitConst::byId($me['crewtype'])->id,
'crewTypeName'=>GameUnitConst::byId($me['crewtype'])->name,
'crew'=>$me['crew'],
'maxCrew'=>$maxCrew,
'gold'=>$me['gold'],
'turn'=>$turn,
'armTypes'=>$armTypes,
]);
ender();
}
+246
View File
@@ -0,0 +1,246 @@
<?php
namespace sammo;
class ActionLogger{
protected $generalId;
protected $nationId;
protected $autoFlush;
protected $year = null;
protected $month = null;
protected $generalHistoryLog = [];
protected $generalActionLog = [];
protected $generalBattleResultLog = [];
protected $generalBattleDetailLog = [];
protected $nationalHistoryLog = [];
protected $globalHistoryLog = [];
protected $globalActionLog = [];
const RAWTEXT = 0;
const PLAIN = 1;
const YEAR_MONTH = 2;
const YEAR = 3;
const MONTH = 4;
const EVENT_PLAIN = 5;
const EVENT_YEAR_MONTH = 6;
const NOTICE = 7;
const NOTICE_YEAR_MONTH = 8;
public function __construct(int $generalId, int $nationId, int $year, int $month, bool $autoFlush = true){
$this->generalId = $generalId;
$this->nationId = $nationId;
$this->year = $year;
$this->month = $month;
$this->autoFlush = $autoFlush;
}
public function __destruct(){
if($this->autoFlush){
$this->flush();
}
}
public function rollback(){
$this->generalHistoryLog = [];
$this->generalActionLog = [];
$this->generalBattleResultLog = [];
$this->generalBattleDetailLog = [];
$this->nationalHistoryLog = [];
$this->globalHistoryLog = [];
$this->globalActionLog = [];
}
public function flush(){
$db = DB::db();
if($this->generalHistoryLog){
$rawText = join('<br>', $this->generalHistoryLog).'<br>';
$db->update('general', [
'history'=>$db->sqleval('concat(%s, history)', $rawText)
], 'no=%i', $this->generalId);
$this->generalHistoryLog = [];
}
if($this->generalActionLog){
pushGenLog(['no'=>$this->generalId], $this->generalActionLog);
$this->generalActionLog = [];
}
if($this->generalBattleResultLog){
pushGenLog(['no'=>$this->generalId], $this->generalBattleResultLog);
$this->generalBattleResultLog = [];
}
if($this->generalBattleDetailLog){
pushGenLog(['no'=>$this->generalId], $this->generalBattleDetailLog);
$this->generalBattleDetailLog = [];
}
if($this->nationId && $this->nationalHistoryLog){
$rawText = join('<br>', $this->nationalHistoryLog).'<br>';
$db->update('nation', [
'history'=>$db->sqleval('concat(%s, history)', $rawText)
], 'nation=%i', $this->nationId);
$this->nationalHistoryLog = [];
}
if($this->globalHistoryLog){
pushWorldHistory($this->globalHistoryLog, $this->year, $this->month);
$this->globalHistoryLog = [];
}
if($this->globalActionLog){
pushGeneralPublicRecord($this->globalActionLog, $this->year, $this->month);
$this->globalActionLog = [];
}
}
public function pushGeneralHistoryLog($text, int $formatType = self::YEAR_MONTH){
if(!$text){
return;
}
if(is_array($text)){
foreach($text as $textItem){
$this->pushGeneralHistoryLog($textItem);
}
return;
}
$text = $this->formatText($text, $formatType);
$this->generalHistoryLog[] = $text;
}
public function pushGeneralActionLog($text, int $formatType = self::MONTH){
if(!$text){
return;
}
if(is_array($text)){
foreach($text as $textItem){
$this->pushGeneralActionLog($textItem);
}
return;
}
$text = $this->formatText($text, $formatType);
$this->generalActionLog[] = $text;
}
public function pushGeneralBattleResultLog($text, int $formatType = self::RAWTEXT){
if(!$text){
return;
}
if(is_array($text)){
foreach($text as $textItem){
$this->pushGeneralBattleResultLog($textItem);
}
return;
}
$text = $this->formatText($text, $formatType);
$this->generalBattleResultLog[] = $text;
}
public function pushGeneralBattleDetailLog($text, int $formatType = self::RAWTEXT){
if(!$text){
return;
}
if(is_array($text)){
foreach($text as $textItem){
$this->pushGeneralBattleDetailLog($textItem);
}
return;
}
$text = $this->formatText($text, $formatType);
$this->generalBattleDetailLog[] = $text;
}
public function pushNationalHistoryLog($text, int $formatType = self::RAWTEXT){
if(!$text){
return;
}
if(is_array($text)){
foreach($text as $textItem){
$this->pushNationalHistoryLog($textItem);
}
return;
}
$text = $this->formatText($text, $formatType);
$this->nationalHistoryLog[] = $text;
}
public function pushGlobalActionLog($text, int $formatType = self::MONTH){
if(!$text){
return;
}
if(is_array($text)){
foreach($text as $textItem){
$this->pushGlobalActionLog($textItem);
}
return;
}
$text = $this->formatText($text, $formatType);
$this->globalActionLog[] = $text;
}
public function pushGlobalHistoryLog($text, int $formatType = self::YEAR_MONTH){
if(!$text){
return;
}
if(is_array($text)){
foreach($text as $textItem){
$this->pushGlobalHistoryLog($textItem);
}
return;
}
$text = $this->formatText($text, $formatType);
$this->globalHistoryLog[] = $text;
}
public function formatText(string $text, int $formatType):string{
if($formatType === self::RAWTEXT){
return $text;
}
if($formatType === self::PLAIN){
return "<C>●</>{$text}";
}
if($formatType === self::YEAR_MONTH){
return "<C>●</>{$this->year}{$this->month}월:{$text}";
}
if($formatType === self::YEAR){
return "<C>●</>{$this->year}년:{$text}";
}
if($formatType === self::MONTH){
return "<C>●</>{$this->month}월:{$text}";
}
if($formatType === self::EVENT_PLAIN){
return "<S>◆</>{$text}";
}
if($formatType === self::EVENT_YEAR_MONTH){
return "<S>◆</>{$this->year}{$this->month}월:{$text}";
}
if($formatType === self::NOTICE){
return "<R>★</>{$text}";
}
if($formatType === self::NOTICE_YEAR_MONTH){
return "<R>★</>{$this->year}{$this->month}월:{$text}";
}
return $text;
}
}
-357
View File
@@ -1,357 +0,0 @@
<?php
namespace sammo;
class CityConst{
private function __construct(){
}
private static $constID = null;
private static $constName = null;
private static $constRegion = null;
public static $regionMap = [
'하북'=>1,1=>'하북',
'중원'=>2,2=>'중원',
'서북'=>3,3=>'서북',
'서촉'=>4,4=>'서촉',
'남중'=>5,5=>'남중',
'초'=>6,6=>'초',
'오월'=>7,7=>'오월',
'동이'=>8,8=>'동이'
];
public static $levelMap = [
'수'=>1,1=>'수',
'진'=>2,2=>'진',
'관'=>3,3=>'관',
'이'=>4,4=>'이',
'소'=>5,5=>'소',
'중'=>6,6=>'중',
'대'=>7,7=>'대',
'특'=>8,8=>'특'
];
/**
* @return \sammo\CityInitialDetail[]
*/
public static function all(){
static::_generate();
return static::$constID;
}
public static function byID(int $id): CityInitialDetail{
static::_generate();
return static::$constID[$id];
}
public static function byName(string $name): CityInitialDetail{
static::_generate();
return static::$constName[$name];
}
public static function byRegion(int $region): CityInitialDetail{
static::_generate();
return static::$constRegion[$region];
}
private static $initCity = [
//id, 도시, 규모, 인구, 농, 상, 치, 성, 수,(x100) 지역, 연결도시
[ 1, '업', '특', 6205, 125, 113, 100, 117, 122, '하북', ['남피', '복양', '호관', '계교', '관도']],
[ 2, '허창', '특', 5876, 121, 124, 100, 117, 125, '중원', ['완', '진류', '초', '호로', '사수', '관도']],
[ 3, '낙양', '특', 8357, 117, 120, 100, 121, 124, '중원', ['호관', '호로', '사곡', '사수']],
[ 4, '장안', '특', 5923, 116, 123, 100, 120, 118, '서북', ['안정', '함곡', '기산']],
[ 5, '성도', '특', 6525, 123, 125, 100, 125, 123, '서촉', ['덕양', '강주', '면죽']],
[ 6, '양양', '특', 5837, 120, 126, 100, 115, 117, '초', ['신야', '장판']],
[ 7, '건업', '특', 6386, 116, 123, 100, 115, 119, '오월', ['오', '합비', '광릉']],
[ 8, '북평', '대', 4862, 102, 95, 80, 103, 99, '하북', ['역경', '백랑']],
[ 9, '남피', '대', 5032, 99, 101, 80, 101, 105, '하북', ['업', '평원', '역경']],
[10, '완', '대', 4724, 103, 100, 80, 101, 99, '중원', ['허창', '여남', '신야', '호로']],
[11, '수춘', '대', 5143, 99, 96, 80, 99, 95, '중원', ['서주', '여남', '초', '합비']],
[12, '서주', '대', 4853, 101, 98, 80, 102, 97, '중원', ['수춘', '하비', '초', '패']],
[13, '강릉', '대', 4850, 105, 96, 80, 95, 96, '초', ['장사', '무릉', '이릉', '장판']],
[14, '장사', '대', 4710, 97, 99, 80, 100, 105, '초', ['강릉', '시상', '계양', '무릉', '영릉']],
[15, '시상', '대', 5252, 98, 100, 100, 99, 96, '오월', ['장사', '여강', '고창', '적벽', '파양']],
[16, '위례', '대', 4926, 100, 93, 80, 98, 103, '동이', ['평양', '사비', '계림', '안평', '동황']],
[17, '계', '중', 3885, 75, 80, 60, 78, 81, '하북', ['진양', '역경']],
[18, '복양', '중', 4185, 80, 83, 60, 82, 80, '중원', ['업', '진류', '계교', '정도']],
[19, '진류', '중', 3957, 82, 80, 60, 80, 83, '중원', ['허창', '복양', '사수', '관도', '정도']],
[20, '여남', '중', 3831, 77, 81, 60, 84, 77, '중원', ['완', '수춘', '초']],
[21, '하비', '중', 4278, 85, 83, 60, 82, 78, '중원', ['서주', '광릉']],
[22, '서량', '중', 3874, 77, 79, 60, 83, 80, '서북', ['천수', '강', '저']],
[23, '하내', '중', 3736, 77, 81, 60, 81, 80, '서북', ['진양', '홍농', '흉노', '호관']],
[24, '한중', '중', 4027, 77, 84, 60, 80, 85, '서촉', ['상용', '양평', '기산']],
[25, '상용', '중', 3687, 78, 76, 60, 77, 81, '서촉', ['한중', '신야']],
[26, '덕양', '중', 3803, 81, 84, 60, 79, 77, '서촉', ['성도', '강주', '자동', '영안']],
[27, '강주', '중', 4126, 79, 80, 60, 84, 81, '서촉', ['성도', '덕양', '영안', '귀양', '주시']],
[28, '건녕', '중', 3765, 82, 80, 60, 86, 81, '남중', ['귀양', '운남', '남영']],
[29, '남해', '중', 3803, 82, 76, 60, 80, 81, '남중', ['교지', '상동', '대', '산월']],
[30, '계양', '중', 3955, 83, 80, 60, 81, 77, '초', ['장사', '영릉', '상동']],
[31, '오', '중', 4355, 77, 81, 60, 77, 76, '오월', ['건업', '회계', '파양', '탐라']],
[32, '평양', '중', 3982, 78, 80, 60, 83, 78, '동이', ['위례', '졸본']],
[33, '사비', '중', 4157, 77, 79, 60, 78, 80, '동이', ['위례', '계림', '탐라']],
[34, '계림', '중', 3911, 80, 74, 60, 81, 78, '동이', ['위례', '사비', '이도', '탐라']],
[35, '진양', '소', 3074, 56, 59, 40, 64, 59, '하북', ['계', '하내', '호관']],
[36, '평원', '소', 3074, 62, 65, 40, 61, 63, '하북', ['남피', '북해', '계교']],
[37, '북해', '소', 3146, 55, 63, 40, 63, 58, '하북', ['평원', '패', '동황']],
[38, '초', '소', 3286, 60, 62, 40, 62, 57, '중원', ['허창', '수춘', '서주', '여남', '정도']],
[39, '패', '소', 2877, 64, 58, 40, 58, 59, '중원', ['서주', '북해', '정도']],
[40, '천수', '소', 2985, 59, 64, 40, 60, 58, '서북', ['서량', '안정', '저', '적도']],
[41, '안정', '소', 2764, 57, 59, 40, 57, 62, '서북', ['장안', '천수', '가정']],
[42, '홍농', '소', 2748, 57, 63, 40, 58, 63, '서북', ['하내', '사곡', '함곡']],
[43, '하변', '소', 2785, 58, 62, 40, 60, 56, '서촉', ['가맹', '가정']],
[44, '자동', '소', 2870, 57, 55, 40, 60, 58, '서촉', ['덕양', '양평', '가맹', '면죽']],
[45, '영안', '소', 3153, 62, 59, 40, 58, 59, '서촉', ['덕양', '강주', '이릉']],
[46, '귀양', '소', 2746, 58, 61, 40, 61, 58, '남중', ['강주', '건녕', '주시']],
[47, '주시', '소', 2828, 60, 59, 40, 58, 63, '남중', ['강주', '귀양', '운남']],
[48, '운남', '소', 3258, 62, 60, 40, 64, 61, '남중', ['건녕', '주시', '남만']],
[49, '남영', '소', 2853, 59, 62, 40, 58, 57, '남중', ['건녕', '영릉', '남만']],
[50, '교지', '소', 3195, 58, 59, 40, 58, 59, '남중', ['남해', '남만']],
[51, '신야', '소', 2786, 60, 62, 40, 58, 55, '초', ['양양', '완', '상용']],
[52, '강하', '소', 3074, 55, 56, 40, 57, 60, '초', ['장판', '적벽']],
[53, '무릉', '소', 3196, 58, 63, 40, 63, 58, '초', ['강릉', '장사', '영릉']],
[54, '영릉', '소', 2849, 62, 58, 40, 62, 62, '초', ['장사', '계양', '남영', '무릉']],
[55, '상동', '소', 2767, 58, 59, 40, 62, 58, '초', ['남해', '계양', '고창']],
[56, '여강', '소', 2905, 56, 58, 40, 60, 55, '오월', ['시상', '합비', '적벽', '파양']],
[57, '회계', '소', 3005, 64, 59, 40, 62, 64, '오월', ['오', '산월']],
[58, '고창', '소', 2802, 57, 62, 40, 58, 63, '오월', ['시상', '상동', '산월']],
[59, '대', '소', 3256, 60, 62, 40, 57, 60, '오월', ['남해', '산월', '유구']],
[60, '안평', '소', 2937, 63, 59, 40, 59, 63, '동이', ['위례', '졸본', '동황', '백랑']],
[61, '졸본', '소', 2939, 55, 59, 40, 60, 58, '동이', ['평양', '안평', '오환']],
[62, '이도', '소', 3174, 58, 61, 40, 58, 56, '동이', ['계림', '왜', '탐라']],
[63, '강', '이', 2095, 40, 42, 20, 43, 40, '서북', ['서량', '적도']],
[64, '저', '이', 1957, 40, 42, 20, 43, 42, '서북', ['서량', '천수', '가정']],
[65, '흉노', '이', 2064, 40, 41, 20, 40, 38, '서북', ['하내', '적도']],
[66, '남만', '이', 2378, 40, 42, 20, 43, 45, '남중', ['운남', '남영', '교지']],
[67, '산월', '이', 2275, 40, 37, 20, 43, 38, '오월', ['남해', '회계', '고창', '대']],
[68, '오환', '이', 2153, 42, 37, 20, 43, 40, '동이', ['졸본', '백랑']],
[69, '왜', '이', 2065, 39, 37, 20, 43, 41, '동이', ['이도', '유구']],
[70, '호관', '관', 887, 19, 18, 20, 95, 96, '하북', ['업', '낙양', '하내', '진양']],
[71, '호로', '관', 1112, 22, 21, 20, 103, 98, '중원', ['허창', '낙양', '완']],
[72, '사곡', '관', 1008, 21, 19, 20, 99, 101, '서북', ['낙양', '홍농']],
[73, '함곡', '관', 1081, 20, 22, 20, 101, 102, '서북', ['장안', '홍농']],
[74, '사수', '관', 958, 17, 19, 20, 95, 96, '중원', ['허창', '낙양', '진류', '관도']],
[75, '양평', '관', 868, 19, 19, 20, 97, 96, '서촉', ['한중', '자동', '기산']],
[76, '가맹', '관', 855, 17, 18, 20, 96, 95, '서촉', ['하변', '자동']],
[77, '역경', '진', 985, 18, 19, 20, 39, 41, '하북', ['북평', '남피', '계']],
[78, '계교', '진', 1012, 21, 19, 20, 40, 42, '하북', ['업', '복양', '평원']],
[79, '동황', '진', 992, 19, 21, 20, 38, 40, '하북', ['위례', '북해', '안평']],
[80, '관도', '진', 1123, 22, 20, 20, 42, 43, '중원', ['업', '허창', '진류', '사수']],
[81, '정도', '진', 1085, 21, 21, 20, 41, 38, '중원', ['복양', '진류', '초', '패']],
[82, '합비', '진', 998, 20, 19, 20, 39, 41, '중원', ['건업', '수춘', '여강']],
[83, '광릉', '진', 1001, 20, 21, 20, 41, 40, '중원', ['건업', '하비']],
[84, '적도', '진', 952, 18, 17, 20, 38, 37, '서북', ['천수', '강', '흉노']],
[85, '가정', '진', 931, 17, 17, 20, 36, 38, '서북', ['안정', '하변', '저']],
[86, '기산', '진', 1005, 19, 18, 20, 41, 40, '서촉', ['장안', '한중', '양평']],
[87, '면죽', '관', 1093, 22, 21, 20, 108, 99, '서촉', ['성도', '자동']],
[88, '이릉', '진', 968, 18, 19, 20, 39, 41, '초', ['강릉', '영안']],
[89, '장판', '진', 1032, 21, 20, 20, 40, 37, '초', ['양양', '강릉', '강하', '적벽']],
[90, '백랑', '진', 1052, 22, 19, 20, 38, 42, '동이', ['북평', '안평', '오환']],
[91, '적벽', '수', 1117, 23, 21, 20, 42, 41, '오월', ['시상', '강하', '여강', '장판']],
[92, '파양', '수', 1037, 20, 22, 20, 38, 38, '오월', ['시상', '오', '여강']],
[93, '탐라', '수', 1130, 22, 21, 20, 43, 41, '동이', ['오', '사비', '계림', '이도']],
[94, '유구', '수', 921, 17, 18, 20, 37, 37, '동이', ['대', '왜']],
];
private static function _generate(){
if(static::$constID || static::$constName || static::$constRegion){
return;
}
$constID = [];
$constName = [];
$constCity = [];
$constRegion = [];
$nameMap = [];
foreach (static::$initCity as $rawCity) {
$nameMap[$rawCity[1]] = $rawCity[0];
}
foreach (static::$buildInit as $key=>$val){
$key2 = static::$levelMap[$key];
if(key_exists($key2, static::$buildInit)){
continue;//혹시 모를 버그 방지
}
static::$buildInit[$key2] = $val;
}
foreach(static::$initCity as $rawCity){
list(
$id,
$name,
$level,
$population,
$agriculture,
$commerce,
$security,
$defence,
$wall,
$region,
$path
) = $rawCity;
$level = static::$levelMap[$level];
$population *= 100;
$agriculture *= 100;
$commerce *= 100;
$security *= 100;
$defence *= 100;
$wall *= 100;
$region = static::$regionMap[$region];
$newPath = [];
foreach($path as $pathName){
$pathID = $nameMap[$pathName];
$newPath[$pathID] = $pathName;
}
$city = new CityInitialDetail(
$id,
$name,
$level,
$population,
$agriculture,
$commerce,
$security,
$defence,
$wall,
$region,
$newPath
);
$constID[$id] = $city;
$constName[$name] = $city;
if(!key_exists($region, $constRegion)){
$constRegion[$region] = [];
}
$constRegion[$region] = $city;
}
static::$constID = $constID;
static::$constName = $constName;
static::$constRegion = $constRegion;
}
private static $buildInitCommon = [
'rate'=>50,
'trade'=>100,
'gen1'=>0,
'gen2'=>0,
'gen3'=>0
];
private static $buildInit = [
'수'=>[
'pop' => 5000,
'agri'=> 100,
'comm'=> 100,
'secu'=> 100,
'def' => 500,
'wall'=> 500,
],
'진'=>[
'pop' => 5000,
'agri'=> 100,
'comm'=> 100,
'secu'=> 100,
'def' => 500,
'wall'=> 500,
],
'관'=>[
'pop' => 10000,
'agri'=> 100,
'comm'=> 100,
'secu'=> 100,
'def' => 1000,
'wall'=> 1000,
],
'이'=>[
'pop' => 50000,
'agri'=> 1000,
'comm'=> 1000,
'secu'=> 1000,
'def' => 1000,
'wall'=> 1000,
],
'소'=>[
'pop' =>100000,
'agri'=> 1000,
'comm'=> 1000,
'secu'=> 1000,
'def' => 2000,
'wall'=> 2000,
],
'중'=>[
'pop' =>100000,
'agri'=> 1000,
'comm'=> 1000,
'secu'=> 1000,
'def' => 3000,
'wall'=> 3000,
],
'대'=>[
'pop' =>150000,
'agri'=> 1000,
'comm'=> 1000,
'secu'=> 1000,
'def' => 4000,
'wall'=> 4000,
],
'특'=>[
'pop' =>150000,
'agri'=> 1000,
'comm'=> 1000,
'secu'=> 1000,
'def' => 5000,
'wall'=> 5000,
]
];
private static function test(){
static::_generate();
foreach(static::all() as $id=>$city){
foreach($city->path as $connId=>$connCityText){
$connCity = static::byID($connId);
if(!key_exists($id, $connCity->path)){
throw new \RuntimeException(sprintf('도시 연결이 올바르지 않음! %s <=> %s', $city->name, $connCity->name));
}
}
}
}
public static function build(){
static::_generate();
static::test();
$queries = array_map(function(CityInitialDetail $city){
$initValue = static::$buildInit[$city->level];
$path = join('|', array_keys($city->path));
return [
'city'=>$city->id,
'name'=>$city->name,
'level'=>$city->level,
'path'=>$path,
'pop2'=>$city->population,
'agri2'=>$city->agriculture,
'comm2'=>$city->commerce,
'secu2'=>$city->security,
'def2'=>$city->defence,
'wall2'=>$city->wall,
'region'=>$city->region
] + $initValue + static::$buildInitCommon;
}, array_values(static::$constID));
DB::db()->insert('city', $queries);
}
}
+354
View File
@@ -0,0 +1,354 @@
<?php
namespace sammo;
class CityConstBase{
protected function __construct(){
}
protected static $constID = null;
protected static $constName = null;
protected static $constRegion = null;
public static $regionMap = [
'하북'=>1,1=>'하북',
'중원'=>2,2=>'중원',
'서북'=>3,3=>'서북',
'서촉'=>4,4=>'서촉',
'남중'=>5,5=>'남중',
'초'=>6,6=>'초',
'오월'=>7,7=>'오월',
'동이'=>8,8=>'동이'
];
public static $levelMap = [
'수'=>1,1=>'수',
'진'=>2,2=>'진',
'관'=>3,3=>'관',
'이'=>4,4=>'이',
'소'=>5,5=>'소',
'중'=>6,6=>'중',
'대'=>7,7=>'대',
'특'=>8,8=>'특'
];
/**
* @return \sammo\CityInitialDetail[]
*/
public static function all(){
static::_generate();
return static::$constID;
}
public static function byID(int $id): CityInitialDetail{
static::_generate();
return static::$constID[$id];
}
public static function byName(string $name): CityInitialDetail{
static::_generate();
return static::$constName[$name];
}
public static function byRegion(int $region): CityInitialDetail{
static::_generate();
return static::$constRegion[$region];
}
protected static $initCity = [
//id, 도시, 규모, 인구, 농, 상, 치, 성, 수,(x100)지역, x, y, 연결도시
[ 1, '업', '특', 6205,125,113,100,117,122, '하북', 345, 130, ['남피', '복양', '호관', '계교', '관도']],
[ 2, '허창', '특', 5876,121,124,100,117,125, '중원', 330, 215, ['완', '진류', '초', '호로', '사수', '관도']],
[ 3, '낙양', '특', 8357,117,120,100,121,124, '중원', 275, 180, ['호관', '호로', '사곡', '사수']],
[ 4, '장안', '특', 5923,116,123,100,120,118, '서북', 145, 165, ['안정', '함곡', '기산']],
[ 5, '성도', '특', 6525,123,125,100,125,123, '서촉', 25, 290, ['덕양', '강주', '면죽']],
[ 6, '양양', '특', 5837,120,126,100,115,117, '초', 255, 290, ['신야', '장판']],
[ 7, '건업', '특', 6386,116,123,100,115,119, '오월', 505, 305, ['오', '합비', '광릉']],
[ 8, '북평', '대', 4862,102, 95, 80,103, 99, '하북', 465, 65, ['역경', '백랑']],
[ 9, '남피', '대', 5032, 99,101, 80,101,105, '하북', 395, 95, ['업', '평원', '역경']],
[10, '완', '대', 4724,103,100, 80,101, 99, '중원', 270, 235, ['허창', '여남', '신야', '호로']],
[11, '수춘', '대', 5143, 99, 96, 80, 99, 95, '중원', 395, 270, ['서주', '여남', '초', '합비']],
[12, '서주', '대', 4853,101, 98, 80,102, 97, '중원', 440, 250, ['수춘', '하비', '초', '패']],
[13, '강릉', '대', 4850,105, 96, 80, 95, 96, '초', 245, 335, ['장사', '무릉', '이릉', '장판']],
[14, '장사', '대', 4710, 97, 99, 80,100,105, '초', 255, 375, ['강릉', '시상', '계양', '무릉', '영릉']],
[15, '시상', '대', 5252, 98,100,100, 99, 96, '오월', 360, 360, ['장사', '여강', '고창', '적벽', '파양']],
[16, '위례', '대', 4926,100, 93, 80, 98,103, '동이', 620, 145, ['평양', '사비', '계림', '안평', '동황']],
[17, '계', '중', 3885, 75, 80, 60, 78, 81, '하북', 365, 35, ['진양', '역경']],
[18, '복양', '중', 4185, 80, 83, 60, 82, 80, '중원', 410, 170, ['업', '진류', '계교', '정도']],
[19, '진류', '중', 3957, 82, 80, 60, 80, 83, '중원', 365, 185, ['허창', '복양', '사수', '관도', '정도']],
[20, '여남', '중', 3831, 77, 81, 60, 84, 77, '중원', 330, 260, ['완', '수춘', '초']],
[21, '하비', '중', 4278, 85, 83, 60, 82, 78, '중원', 480, 235, ['서주', '광릉']],
[22, '서량', '중', 3874, 77, 79, 60, 83, 80, '서북', 25, 50, ['천수', '강', '저']],
[23, '하내', '중', 3736, 77, 81, 60, 81, 80, '서북', 230, 150, ['진양', '홍농', '흉노', '호관']],
[24, '한중', '중', 4027, 77, 84, 60, 80, 85, '서촉', 135, 205, ['상용', '양평', '기산']],
[25, '상용', '중', 3687, 78, 76, 60, 77, 81, '서촉', 185, 225, ['한중', '신야']],
[26, '덕양', '중', 3803, 81, 84, 60, 79, 77, '서촉', 85, 275, ['성도', '강주', '자동', '영안']],
[27, '강주', '중', 4126, 79, 80, 60, 84, 81, '서촉', 70, 310, ['성도', '덕양', '영안', '귀양', '주시']],
[28, '건녕', '중', 3765, 82, 80, 60, 86, 81, '남중', 80, 400, ['귀양', '운남', '남영']],
[29, '남해', '중', 3803, 82, 76, 60, 80, 81, '남중', 245, 480, ['교지', '상동', '대', '산월']],
[30, '계양', '중', 3955, 83, 80, 60, 81, 77, '초', 230, 400, ['장사', '영릉', '상동']],
[31, '오', '중', 4355, 77, 81, 60, 77, 76, '오월', 510, 345, ['건업', '회계', '파양', '탐라']],
[32, '평양', '중', 3982, 78, 80, 60, 83, 78, '동이', 590, 100, ['위례', '졸본']],
[33, '사비', '중', 4157, 77, 79, 60, 78, 80, '동이', 605, 205, ['위례', '계림', '탐라']],
[34, '계림', '중', 3911, 80, 74, 60, 81, 78, '동이', 655, 200, ['위례', '사비', '이도', '탐라']],
[35, '진양', '소', 3074, 56, 59, 40, 64, 59, '하북', 295, 60, ['계', '하내', '호관']],
[36, '평원', '소', 3074, 62, 65, 40, 61, 63, '하북', 440, 115, ['남피', '북해', '계교']],
[37, '북해', '소', 3146, 55, 63, 40, 63, 58, '하북', 470, 155, ['평원', '패', '동황']],
[38, '초', '소', 3286, 60, 62, 40, 62, 57, '중원', 365, 230, ['허창', '수춘', '서주', '여남', '정도']],
[39, '패', '소', 2877, 64, 58, 40, 58, 59, '중원', 430, 220, ['서주', '북해', '정도']],
[40, '천수', '소', 2985, 59, 64, 40, 60, 58, '서북', 70, 105, ['서량', '안정', '저', '적도']],
[41, '안정', '소', 2764, 57, 59, 40, 57, 62, '서북', 95, 145, ['장안', '천수', '가정']],
[42, '홍농', '소', 2748, 57, 63, 40, 58, 63, '서북', 210, 175, ['하내', '사곡', '함곡']],
[43, '하변', '소', 2785, 58, 62, 40, 60, 56, '서촉', 45, 190, ['가맹', '가정']],
[44, '자동', '소', 2870, 57, 55, 40, 60, 58, '서촉', 75, 245, ['덕양', '양평', '가맹', '면죽']],
[45, '영안', '소', 3153, 62, 59, 40, 58, 59, '서촉', 115, 295, ['덕양', '강주', '이릉']],
[46, '귀양', '소', 2746, 58, 61, 40, 61, 58, '남중', 90, 360, ['강주', '건녕', '주시']],
[47, '주시', '소', 2828, 60, 59, 40, 58, 63, '남중', 30, 345, ['강주', '귀양', '운남']],
[48, '운남', '소', 3258, 62, 60, 40, 64, 61, '남중', 30, 415, ['건녕', '주시', '남만']],
[49, '남영', '소', 2853, 59, 62, 40, 58, 57, '남중', 135, 405, ['건녕', '영릉', '남만']],
[50, '교지', '소', 3195, 58, 59, 40, 58, 59, '남중', 130, 480, ['남해', '남만']],
[51, '신야', '소', 2786, 60, 62, 40, 58, 55, '초', 250, 260, ['양양', '완', '상용']],
[52, '강하', '소', 3074, 55, 56, 40, 57, 60, '초', 315, 295, ['장판', '적벽']],
[53, '무릉', '소', 3196, 58, 63, 40, 63, 58, '초', 195, 355, ['강릉', '장사', '영릉']],
[54, '영릉', '소', 2849, 62, 58, 40, 62, 62, '초', 190, 395, ['장사', '계양', '남영', '무릉']],
[55, '상동', '소', 2767, 58, 59, 40, 62, 58, '초', 210, 435, ['남해', '계양', '고창']],
[56, '여강', '소', 2905, 56, 58, 40, 60, 55, '오월', 380, 315, ['시상', '합비', '적벽', '파양']],
[57, '회계', '소', 3005, 64, 59, 40, 62, 64, '오월', 480, 395, ['오', '산월']],
[58, '고창', '소', 2802, 57, 62, 40, 58, 63, '오월', 350, 405, ['시상', '상동', '산월']],
[59, '대', '소', 3256, 60, 62, 40, 57, 60, '오월', 450, 480, ['남해', '산월', '유구']],
[60, '안평', '소', 2937, 63, 59, 40, 59, 63, '동이', 530, 80, ['위례', '졸본', '동황', '백랑']],
[61, '졸본', '소', 2939, 55, 59, 40, 60, 58, '동이', 570, 65, ['평양', '안평', '오환']],
[62, '이도', '소', 3174, 58, 61, 40, 58, 56, '동이', 680, 260, ['계림', '왜', '탐라']],
[63, '강', '이', 2095, 40, 42, 20, 43, 40, '서북', 95, 35, ['서량', '적도']],
[64, '저', '이', 1957, 40, 42, 20, 43, 42, '서북', 25, 120, ['서량', '천수', '가정']],
[65, '흉노', '이', 2064, 40, 41, 20, 40, 38, '서북', 180, 95, ['하내', '적도']],
[66, '남만', '이', 2378, 40, 42, 20, 43, 45, '남중', 80, 455, ['운남', '남영', '교지']],
[67, '산월', '이', 2275, 40, 37, 20, 43, 38, '오월', 425, 430, ['남해', '회계', '고창', '대']],
[68, '오환', '이', 2153, 42, 37, 20, 43, 40, '동이', 610, 20, ['졸본', '백랑']],
[69, '왜', '이', 2065, 39, 37, 20, 43, 41, '동이', 680, 320, ['이도', '유구']],
[70, '호관', '관', 887, 19, 18, 20, 95, 96, '하북', 285, 140, ['업', '낙양', '하내', '진양']],
[71, '호로', '관', 1112, 22, 21, 20,103, 98, '중원', 285, 205, ['허창', '낙양', '완']],
[72, '사곡', '관', 1008, 21, 19, 20, 99,101, '서북', 240, 175, ['낙양', '홍농']],
[73, '함곡', '관', 1081, 20, 22, 20,101,102, '서북', 180, 175, ['장안', '홍농']],
[74, '사수', '관', 958, 17, 19, 20, 95, 96, '중원', 310, 185, ['허창', '낙양', '진류', '관도']],
[75, '양평', '관', 868, 19, 19, 20, 97, 96, '서촉', 90, 220, ['한중', '자동', '기산']],
[76, '가맹', '관', 855, 17, 18, 20, 96, 95, '서촉', 45, 225, ['하변', '자동']],
[77, '역경', '진', 985, 18, 19, 20, 39, 41, '하북', 410, 65, ['북평', '남피', '계']],
[78, '계교', '진', 1012, 21, 19, 20, 40, 42, '하북', 405, 135, ['업', '복양', '평원']],
[79, '동황', '진', 992, 19, 21, 20, 38, 40, '하북', 515, 145, ['위례', '북해', '안평']],
[80, '관도', '진', 1123, 22, 20, 20, 42, 43, '중원', 340, 165, ['업', '허창', '진류', '사수']],
[81, '정도', '진', 1085, 21, 21, 20, 41, 38, '중원', 400, 210, ['복양', '진류', '초', '패']],
[82, '합비', '진', 998, 20, 19, 20, 39, 41, '중원', 435, 285, ['건업', '수춘', '여강']],
[83, '광릉', '진', 1001, 20, 21, 20, 41, 40, '중원', 490, 275, ['건업', '하비']],
[84, '적도', '진', 952, 18, 17, 20, 38, 37, '서북', 130, 75, ['천수', '강', '흉노']],
[85, '가정', '진', 931, 17, 17, 20, 36, 38, '서북', 40, 160, ['안정', '하변', '저']],
[86, '기산', '진', 1005, 19, 18, 20, 41, 40, '서촉', 110, 180, ['장안', '한중', '양평']],
[87, '면죽', '관', 1093, 22, 21, 20,108, 99, '서촉', 35, 255, ['성도', '자동']],
[88, '이릉', '진', 968, 18, 19, 20, 39, 41, '초', 215, 295, ['강릉', '영안']],
[89, '장판', '진', 1032, 21, 20, 20, 40, 37, '초', 280, 315, ['양양', '강릉', '강하', '적벽']],
[90, '백랑', '진', 1052, 22, 19, 20, 38, 42, '동이', 530, 30, ['북평', '안평', '오환']],
[91, '적벽', '수', 1117, 23, 21, 20, 42, 41, '오월', 330, 325, ['시상', '강하', '여강', '장판']],
[92, '파양', '수', 1037, 20, 22, 20, 38, 38, '오월', 430, 350, ['시상', '오', '여강']],
[93, '탐라', '수', 1130, 22, 21, 20, 43, 41, '동이', 605, 260, ['오', '사비', '계림', '이도']],
[94, '유구', '수', 921, 17, 18, 20, 37, 37, '동이', 625, 435, ['대', '왜']]
];
protected static function _generate(){
if(static::$constID || static::$constName || static::$constRegion){
return;
}
$constID = [];
$constName = [];
$constCity = [];
$constRegion = [];
$nameMap = [];
foreach (static::$initCity as $rawCity) {
$nameMap[$rawCity[1]] = $rawCity[0];
}
foreach (static::$buildInit as $key=>$val){
$key2 = static::$levelMap[$key];
if(key_exists($key2, static::$buildInit)){
continue;//혹시 모를 버그 방지
}
static::$buildInit[$key2] = $val;
}
foreach(static::$initCity as $rawCity){
[
$id,
$name,
$level,
$population,
$agriculture,
$commerce,
$security,
$defence,
$wall,
$region,
$posX,
$posY,
$path
] = $rawCity;
$level = static::$levelMap[$level];
$population *= 100;
$agriculture *= 100;
$commerce *= 100;
$security *= 100;
$defence *= 100;
$wall *= 100;
$region = static::$regionMap[$region];
$newPath = [];
foreach($path as $pathName){
$pathID = $nameMap[$pathName];
$newPath[$pathID] = $pathName;
}
$city = new CityInitialDetail(
$id,
$name,
$level,
$population,
$agriculture,
$commerce,
$security,
$defence,
$wall,
$region,
$posX,
$posY,
$newPath
);
$constID[$id] = $city;
$constName[$name] = $city;
if(!key_exists($region, $constRegion)){
$constRegion[$region] = [];
}
$constRegion[$region] = $city;
}
static::$constID = $constID;
static::$constName = $constName;
static::$constRegion = $constRegion;
}
protected static $buildInitCommon = [
'rate'=>50,
'trade'=>100,
'gen1'=>0,
'gen2'=>0,
'gen3'=>0
];
protected static $buildInit = [
'수'=>[
'pop' => 5000,
'agri'=> 100,
'comm'=> 100,
'secu'=> 100,
'def' => 500,
'wall'=> 500,
],
'진'=>[
'pop' => 5000,
'agri'=> 100,
'comm'=> 100,
'secu'=> 100,
'def' => 500,
'wall'=> 500,
],
'관'=>[
'pop' => 10000,
'agri'=> 100,
'comm'=> 100,
'secu'=> 100,
'def' => 1000,
'wall'=> 1000,
],
'이'=>[
'pop' => 50000,
'agri'=> 1000,
'comm'=> 1000,
'secu'=> 1000,
'def' => 1000,
'wall'=> 1000,
],
'소'=>[
'pop' =>100000,
'agri'=> 1000,
'comm'=> 1000,
'secu'=> 1000,
'def' => 2000,
'wall'=> 2000,
],
'중'=>[
'pop' =>100000,
'agri'=> 1000,
'comm'=> 1000,
'secu'=> 1000,
'def' => 3000,
'wall'=> 3000,
],
'대'=>[
'pop' =>150000,
'agri'=> 1000,
'comm'=> 1000,
'secu'=> 1000,
'def' => 4000,
'wall'=> 4000,
],
'특'=>[
'pop' =>150000,
'agri'=> 1000,
'comm'=> 1000,
'secu'=> 1000,
'def' => 5000,
'wall'=> 5000,
]
];
protected static function test(){
static::_generate();
foreach(static::all() as $id=>$city){
foreach($city->path as $connId=>$connCityText){
$connCity = static::byID($connId);
if(!key_exists($id, $connCity->path)){
throw new \RuntimeException(sprintf('도시 연결이 올바르지 않음! %s <=> %s', $city->name, $connCity->name));
}
}
}
}
public static function build(){
static::_generate();
static::test();
$queries = array_map(function(CityInitialDetail $city){
$initValue = static::$buildInit[$city->level];
$path = join('|', array_keys($city->path));
return [
'city'=>$city->id,
'name'=>$city->name,
'level'=>$city->level,
'path'=>$path,
'pop2'=>$city->population,
'agri2'=>$city->agriculture,
'comm2'=>$city->commerce,
'secu2'=>$city->security,
'def2'=>$city->defence,
'wall2'=>$city->wall,
'region'=>$city->region
] + $initValue + static::$buildInitCommon;
}, array_values(static::$constID));
DB::db()->insert('city', $queries);
}
}
+6
View File
@@ -12,6 +12,8 @@ class CityInitialDetail{
public $defence;
public $wall;
public $region;
public $posX;
public $posY;
public $path;
public function __construct(
@@ -25,6 +27,8 @@ class CityInitialDetail{
int $defence,
int $wall,
int $region,
int $posX,
int $posY,
array $path
){
$this->id = $id;
@@ -37,6 +41,8 @@ class CityInitialDetail{
$this->defence = $defence;
$this->wall = $wall;
$this->region = $region;
$this->posX = $posX;
$this->posY = $posY;
$this->path = $path;
}
+2 -2
View File
@@ -300,7 +300,7 @@ class Diplomacy{
$chk = $this->checkValidNation();
$chk = $this->checkNonAggressionTreaty($chk);
list($result, $reason) = $chk;
[$result, $reason] = $chk;
if($result !== DiplomaticMessage::ACCEPTED){
return $chk;
}
@@ -322,7 +322,7 @@ class Diplomacy{
$chk = $this->checkValidNation();
$chk = $this->checkInWar($chk);
list($result, $reason) = $chk;
[$result, $reason] = $chk;
if($result !== DiplomaticMessage::ACCEPTED){
return $chk;
}
+2 -2
View File
@@ -37,12 +37,12 @@ class Personnel{
$this->nation = $nation;
$this->valid = true;
list(
[
$this->startYear,
$this->year,
$this->month,
$this->killturn
) = $gameStor->getValuesAsArray(['startyear', 'year', 'month', 'killturn']);
] = $gameStor->getValuesAsArray(['startyear', 'year', 'month', 'killturn']);
}
@@ -1,14 +1,16 @@
<?php
namespace sammo;
class GameConst extends GameCustomConst
class GameConstBase
{
/** @var string 버전 */
public static $title = "삼국지 모의전투 PHP HiDCHe";
/** @var string 코드 아래에 붙는 설명 코드 */
public static $banner = "KOEI의 이미지를 사용, 응용하였습니다 / 제작 : HideD(hided62@gmail.com)";
/** @var string 코드 아래에 붙는 설명 코드 */
public static $helper = "도움 주신 분들";
public static $banner = "KOEI의 이미지를 사용, 응용하였습니다 / 제작 : HideD(hided62@gmail.com) / <a href='https://sam.hided.net/wiki/hidche/credit' target='_blank'>Credit</a>";
/** @var string mapName 사용중인 지도명 */
public static $mapName = 'che';
/** @var string unitSet 사용중인 유닛셋 */
public static $unitSet = 'che';
/** @var int 내정시 최하 민심 설정*/
public static $develrate = 50;
/** @var int 능력치 상승 경험치*/
-161
View File
@@ -1,161 +0,0 @@
<?php
namespace sammo;
class GameUnitConst{
private function __construct(){
}
private static $constID = null;
private static $constName = null;
private static $constCity = null;
private static $constRegion = null;
/**
* @return \sammo\GameUnitDetail[]
*/
public static function all(): array{
static::_generate();
return static::$constID;
}
public static function byID(int $id): GameUnitDetail{
static::_generate();
return static::$constID[$id];
}
public static function byName(string $name): GameUnitDetail{
static::_generate();
return static::$constName[$name];
}
public static function byCity(int $city): GameUnitDetail{
static::_generate();
return static::$constCity[$city];
}
public static function byRegion(int $region): GameUnitDetail{
static::_generate();
return static::$constRegion[$region];
}
private static function _generate(){
if(static::$constID || static::$constName || static::$constCity || static::$constRegion){
return;
}
$list = [
[ 0, '보병', 100, 150, 7, 10, 9, 9, 0, 0, true, ['표준적인 보병입니다.','보병은 방어특화입니다.']],
[ 1, '청주병', 100, 200, 7, 10, 10, 11, 1, '중원', true, ['저렴하고 튼튼합니다.']],
[ 2, '수병', 150, 150, 7, 10, 11, 10, 1, '오월', true, ['저렴하고 강력합니다.']],
[ 3, '자객병', 100, 150, 7, 20, 10, 10, 2, '저', true, ['은밀하고 날쌥니다.']],
[ 4, '근위병', 150, 200, 7, 10, 12, 12, 2, '낙양', true, ['최강의 보병입니다.']],
[ 5, '등갑병', 100, 250, 7, 5, 13, 10, 1, '남중', true, ['등갑을 두른 보병입니다.']],
[10, '궁병', 100, 100, 7, 20, 10, 10, 0, 0, true, ['표준적인 궁병입니다.','궁병은 회피특화입니다.']],
[11, '궁기병', 100, 100, 8, 30, 11, 12, 1, '동이', true, ['말을 타고 잘 피합니다.']],
[12, '연노병', 150, 100, 8, 20, 12, 11, 1, '서촉', true, ['화살을 연사합니다.']],
[13, '강궁병', 150, 150, 7, 20, 13, 13, 2, '양양', true, ['강건한 궁병입니다.']],
[14, '석궁병', 200, 100, 7, 20, 13, 13, 2, '건업', true, ['강력한 화살을 쏩니다.']],
[20, '기병', 150, 100, 7, 5, 11, 11, 0, 0, true, ['표준적인 기병입니다.','기병은 공격특화입니다.']],
[21, '백마병', 200, 100, 7, 5, 12, 13, 1, '하북', true, ['백마의 위용을 보여줍니다.']],
[22, '중장기병', 150, 150, 7, 5, 13, 12, 1, '서북', true, ['갑주를 두른 기병입니다.']],
[23, '돌격기병', 200, 100, 8, 5, 13, 11, 2,'흉노', true, ['저돌적으로 공격합니다.']],
[24, '철기병', 100, 200, 7, 5, 11, 13, 2, '강', true, ['철갑을 두른 기병입니다.']],
[25, '수렵기병', 150, 100, 8, 15, 12, 12, 2, '산월', true, ['날쎄고 빠른 기병입니다.']],
[26, '맹수병', 250, 200, 6, 0, 16, 16, 2, '남만', true, ['어느 누구보다 강력합니다.']],
[27, '호표기병', 200, 150, 7, 5, 14, 14, 2, '허창', true, ['정예 기병입니다.']],
[30, '귀병', 80, 80, 7, 5, 9, 9, 0, 0, true, ['계략을 사용하는 병종입니다.']],
[31, '신귀병', 80, 80, 7, 20, 10, 10, 1,'초', true, ['신출귀몰한 귀병입니다.']],
[32, '백귀병', 80, 130, 7, 5, 9, 11, 2, '오환', true, ['저렴하고 튼튼합니다.']],
[33, '흑귀병', 130, 80, 7, 5, 11, 9, 2, '왜', true, ['저렴하고 강력합니다.']],
[34, '악귀병', 130, 130, 7, 0, 12, 12, 2, '장안', true, ['백병전에도 능숙합니다.']],
[35, '남귀병', 60, 60, 7, 10, 8, 8, 0, 1000, false, ['전투를 포기하고 계략에 몰두합니다.']],
[36, '황귀병', 110, 110, 7, 0, 13, 10, 2, '낙양', true, ['고도로 훈련된 귀병입니다.']],
[37, '천귀병', 80, 130, 7, 15, 11, 12, 2, '성도', true, ['갑주를 두른 귀병입니다.']],
[38, '마귀병', 130, 80, 7, 15, 12, 11, 2, '업', true, ['날카로운 무기를 가진 귀병입니다.']],
[40, '정란', 100, 100, 6, 0, 15, 5, 0, 0, false, ['높은 구조물 위에서 공격합니다.']],
[41, '충차', 150, 100, 6, 0, 20, 5, 0, 1000, false, ['엄청난 위력으로 성벽을 부수어버립니다.']],
[42, '벽력거', 200, 100, 6, 0, 25, 5, 2, '업', true, ['상대에게 돌덩이를 날립니다.']],
[43, '목우', 50, 200, 5, 0, 30, 5, 2, '성도', true, ['상대를 저지하는 특수병기입니다.']]
];
$constID = [];
$constName = [];
$constCity = [];
$constRegion = [];
foreach($list as $rawUnit){
list(
$id,
$name,
$attack,
$defence,
$speed,
$avoid,
$cost,
$rice,
$recruitType,
$recruitCondition,
$recruitFirst,
$info
) = $rawUnit;
//0인 경우는 기술치이다.
if(!$recruitFirst){
$info[] = "일정 시간이 지나야 사용 가능";
}
if($recruitType == 1){
$info[] = "{$recruitCondition}지역 소유시 가능";
$recruitCondition = CityConst::$regionMap[$recruitCondition];
}
else if($recruitType == 2){
$info[] = "{$recruitCondition} 소유시 가능";
$recruitCondition = CityConst::byName($recruitCondition)->id;
}
$unit = new GameUnitDetail(
$id,
$name,
$attack,
$defence,
$speed,
$avoid,
$cost,
$rice,
$recruitType,
$recruitCondition,
$recruitFirst,
$info
);
$constID[$id] = $unit;
$constName[$name] = $unit;
if($recruitType == 1){
if(!key_exists($recruitCondition, $constRegion)){
$constRegion[$recruitCondition] = [];
}
$constRegion[$recruitCondition][] = $unit;
}
if($recruitType == 2){
if(!key_exists($recruitCondition, $constCity)){
$constCity[$recruitCondition] = [];
}
$constCity[$recruitCondition][] = $unit;
}
}
static::$constID = $constID;
static::$constName = $constName;
static::$constCity = $constCity;
static::$constRegion = $constRegion;
}
}
+457
View File
@@ -0,0 +1,457 @@
<?php
namespace sammo;
class GameUnitConstBase{
protected function __construct(){
}
const T_CASTLE = -1;
const T_MISC = -2;
const T_FOOTMAN = 0;
const T_ARCHER = 1;
const T_CAVALRY = 2;
const T_WIZARD = 3;
const T_SIEGE = 4;
protected static $constID = null;
protected static $constName = null;
protected static $constCity = null;
protected static $constRegion = null;
protected static $constType = null;
protected static $typeData = [
self::T_FOOTMAN => '보병',
self::T_ARCHER => '궁병',
self::T_CAVALRY => '기병',
self::T_WIZARD => '귀병',
self::T_SIEGE => '차병',
];
protected static $_buildData = [
[
-1, self::T_CASTLE, '성벽',
100, 100, 7, 0, 0, 99, 9,
999999, null, null, 999999,
[],//성벽은 공격할 수 없다.
[],
['성벽입니다.','생성할 수 없습니다.']
],
[
0, self::T_FOOTMAN, '보병',
100, 150, 7, 10, 0, 9, 9,
0, null, null, 0,
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['표준적인 보병입니다.','보병은 방어특화입니다.']
],
[
1, self::T_FOOTMAN, '청주병',
100, 200, 7, 10, 0, 10, 11,
1000, null, ['중원'], 0,
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['저렴하고 튼튼합니다.']
],
[
2, self::T_FOOTMAN, '수병',
150, 150, 7, 10, 0, 11, 10,
1000, null, ['오월'], 0,
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['저렴하고 강력합니다.']
],
[
3, self::T_FOOTMAN, '자객병',
100, 150, 7, 20, 0, 10, 10,
2000, ['저'], null, 0,
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['은밀하고 날쌥니다.']
],
[
4, self::T_FOOTMAN, '근위병',
150, 200, 7, 10, 0, 12, 12,
3000, ['낙양'], null, 0,
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['최강의 보병입니다.']
],
[
5, self::T_FOOTMAN, '등갑병',
100, 250, 7, 5, 0, 13, 10,
1000, null, ['남중'], 0,
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['등갑을 두른 보병입니다.']
],
[
10, self::T_ARCHER, '궁병',
100, 100, 7, 20, 0, 10, 10,
0, null, null, 0,
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
['표준적인 궁병입니다.','궁병은 회피특화입니다.']
],
[
11, self::T_ARCHER, '궁기병',
100, 100, 8, 30, 0, 11, 12,
1000, null, ['동이'], 0,
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
['말을 타고 잘 피합니다.']
],
[
12, self::T_ARCHER, '연노병',
150, 100, 8, 20, 0, 12, 11,
1000, null, ['서촉'], 0,
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
['화살을 연사합니다.']
],
[
13, self::T_ARCHER, '강궁병',
150, 150, 7, 20, 0, 13, 13,
3000, ['양양'], null, 0,
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
['강건한 궁병입니다.']
],
[
14, self::T_ARCHER, '석궁병',
200, 100, 7, 20, 0, 13, 13,
3000, ['건업'], null, 0,
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
['강력한 화살을 쏩니다.']
],
[
20, self::T_CAVALRY, '기병',
150, 100, 7, 5, 0, 11, 11,
0, null, null, 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['표준적인 기병입니다.','기병은 공격특화입니다.']
],
[
21, self::T_CAVALRY, '백마병',
200, 100, 7, 5, 0, 12, 13,
1000, null, ['하북'], 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['백마의 위용을 보여줍니다.']
],
[
22, self::T_CAVALRY, '중장기병',
150, 150, 7, 5, 0, 13, 12,
1000, null, ['서북'], 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['갑주를 두른 기병입니다.']
],
[
23, self::T_CAVALRY, '돌격기병',
200, 100, 8, 5, 0, 13, 11,
2000, ['흉노'], null, 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['저돌적으로 공격합니다.']
],
[
24, self::T_CAVALRY, '철기병',
100, 200, 7, 5, 0, 11, 13,
2000, ['강'], null, 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['철갑을 두른 기병입니다.']],
[
25, self::T_CAVALRY, '수렵기병',
150, 100, 8, 15, 0, 12, 12,
2000, ['산월'], null, 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['날쎄고 빠른 기병입니다.']
],
[
26, self::T_CAVALRY, '맹수병',
250, 200, 6, 0, 0, 16, 16,
2000, ['남만'], null, 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['어느 누구보다 강력합니다.']
],
[
27, self::T_CAVALRY, '호표기병',
200, 150, 7, 5, 0, 14, 14,
3000, ['허창'], null, 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['정예 기병입니다.']
],
[
30, self::T_WIZARD, '귀병',
80, 80, 7, 5, 0.5, 9, 9,
0, null, null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['계략을 사용하는 병종입니다.']
],
[
31, self::T_WIZARD, '신귀병',
80, 80, 7, 20, 0.6, 10, 10,
1000, null, ['초'], 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['신출귀몰한 귀병입니다.']
],
[
32, self::T_WIZARD, '백귀병',
80, 130, 7, 5, 0.6, 9, 11,
2000, ['오환'], null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['저렴하고 튼튼합니다.']
],
[
33, self::T_WIZARD, '흑귀병',
130, 80, 7, 5, 0.6, 11, 9,
2000, ['왜'], null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['저렴하고 강력합니다.']
],
[
34, self::T_WIZARD, '악귀병',
130, 130, 7, 0, 0.6, 12, 12,
3000, ['장안'], null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['백병전에도 능숙합니다.']
],
[
35, self::T_WIZARD, '남귀병',
60, 60, 7, 10, 0.8, 8, 8,
1000, null, null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['전투를 포기하고 계략에 몰두합니다.']
],
[
36, self::T_WIZARD, '황귀병',
110, 110, 7, 0, 0.8, 13, 10,
3000, ['낙양'], null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['고도로 훈련된 귀병입니다.']
],
[
37, self::T_WIZARD, '천귀병',
80, 130, 7, 15, 0.6, 11, 12,
3000, ['성도'], null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['갑주를 두른 귀병입니다.']
],
[
38, self::T_WIZARD, '마귀병',
130, 80, 7, 15, 0.6, 12, 11,
3000, ['업'], null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['날카로운 무기를 가진 귀병입니다.']
],
[
40, self::T_SIEGE, '정란',
100, 100, 6, 0, 0, 15, 5,
0, null, null, 3,
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>0.8, self::T_CAVALRY=>0.8, self::T_WIZARD=>0.8, self::T_CASTLE=>1.8],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2],
['높은 구조물 위에서 공격합니다.']
],
[
41, self::T_SIEGE, '충차',
150, 100, 6, 0, 0, 20, 5,
1000, null, null, 0,
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>0.8, self::T_CAVALRY=>0.8, self::T_WIZARD=>0.8, self::T_CASTLE=>1.8],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2],
['엄청난 위력으로 성벽을 부수어버립니다.']
],
[
42, self::T_SIEGE, '벽력거',
200, 100, 6, 0, 0, 25, 5,
3000, ['업'], null, 0,
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>0.8, self::T_CAVALRY=>0.8, self::T_WIZARD=>0.8, self::T_CASTLE=>1.8],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2],
['상대에게 돌덩이를 날립니다.']
],
[
43, self::T_SIEGE, '목우',
50, 200, 5, 0, 0, 30, 5,
3000, ['성도'], null, 0,
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>0.8, self::T_CAVALRY=>0.8, self::T_WIZARD=>0.8],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2],
['상대를 저지하는 특수병기입니다.']
]
];
/**
* @return \sammo\GameUnitDetail[]
*/
public static function all(): array{
static::_generate();
return static::$constID;
}
public static function allType(): array{
return static::$typeData;
}
public static function byID(int $id): ?GameUnitDetail{
static::_generate();
return static::$constID[$id]??null;
}
public static function byName(string $name): ?GameUnitDetail{
static::_generate();
return static::$constName[$name]??null;
}
public static function byCity(int $city): array{
static::_generate();
return static::$constCity[$city]??[];
}
public static function byRegion(int $region): array{
static::_generate();
return static::$constRegion[$region]??[];
}
public static function byType(int $type): array{
static::_generate();
if(!key_exists($type, static::$constType)){
return [];
}
return static::$constType[$type];
}
protected static function _generate(){
if(static::$constID || static::$constName || static::$constCity || static::$constRegion || static::$constType){
return;
}
$constID = [];
$constName = [];
$constCity = [];
$constRegion = [];
$constType = [];
foreach(static::$_buildData as $rawUnit){
[
$id,
$armType,
$name,
$attack,
$defence,
$speed,
$avoid,
$magicCoef,
$cost,
$rice,
$reqTech,
$reqCities,
$reqRegions,
$reqYear,
$attackCoef,
$defenceCoef,
$info
] = $rawUnit;
if($reqYear > 0){
$info[] = "{$reqYear}년 경과 후 사용 가능";
}
if($reqTech > 0){
$info[] = "기술력 {$reqTech} 이상 필요";
}
if($reqCities !== null){
$reqCities = array_map(function($reqCity) use (&$info){
$info[] = "{$reqCity} 소유시 가능";
return CityConst::byName($reqCity)->id;
}, $reqCities);
}
if($reqRegions !== null){
$reqRegions = array_map(function($reqRegion) use (&$info){
$info[] = "{$reqRegion} 지역 소유시 가능";
return CityConst::$regionMap[$reqRegion];
}, $reqRegions);
}
$unit = new GameUnitDetail(
$id,
$armType,
$name,
$attack,
$defence,
$speed,
$avoid,
$magicCoef,
$cost,
$rice,
$reqTech,
$reqCities,
$reqRegions,
$reqYear,
$attackCoef,
$defenceCoef,
$info
);
$constID[$id] = $unit;
$constName[$name] = $unit;
if(!key_exists($armType, $constType)){
$constType[$armType] = [];
}
$constType[$armType][] = $unit;
if($unit->reqCities){
foreach($unit->reqCities as $reqCity){
if(!key_exists($reqCity, $constCity)){
$constCity[$reqCity] = [];
}
$constCity[$reqCity][] = $unit;
}
}
if($unit->reqRegions){
foreach($unit->reqRegions as $reqRegion){
if(!key_exists($reqRegion, $constRegion)){
$constRegion[$reqRegion] = [];
}
$constRegion[$reqRegion][] = $unit;
}
}
}
static::$constID = $constID;
static::$constName = $constName;
static::$constCity = $constCity;
static::$constRegion = $constRegion;
static::$constType = $constType;
}
}
+144 -34
View File
@@ -3,80 +3,190 @@ namespace sammo;
class GameUnitDetail{
public $id;
public $armType;
public $name;
public $attack;
public $defence;
public $speed;
public $avoid;
public $magicCoef;
public $cost;
public $rice;
public $recruitType;
public $recruitCondition;
public $recruitFirst;
public $reqTech;
public $reqCities;
public $reqRegions;
public $reqYear;
public $attackCoef;
public $defenceCoef;
public $info;
public function __construct(
int $id,
int $armType,
string $name,
int $attack,
int $defence,
int $speed,
int $avoid,
float $magicCoef,
int $cost,
int $rice,
int $recruitType,
int $recruitCondition,
bool $recruitFirst,
int $reqTech,
?array $reqCities,
?array $reqRegions,
int $reqYear,
array $attackCoef,
array $defenceCoef,
array $info
){
$this->id = $id;
$this->name = $name;
$this->armType = $armType;
$this->attack = $attack;
$this->defence = $defence;
$this->speed = $speed;
$this->avoid = $avoid;
$this->magicCoef = $magicCoef;
$this->cost = $cost;
$this->rice = $rice;
$this->recruitType = $recruitType;
$this->recruitCondition = $recruitCondition;
$this->recruitFirst = $recruitFirst;
$this->reqTech = $reqTech;
$this->reqCities = $reqCities;
$this->reqRegions = $reqRegions;
$this->reqYear = $reqYear;
$this->attackCoef = $attackCoef;
$this->defenceCoef = $defenceCoef;
$this->info = $info;
}
public function costWithTech(int $tech, int $crew=100):float{
return $this->cost * getTechCost($tech) * $crew / 100;
}
public function getAttackCoef($armType):float{
if($armType instanceof GameUnitDetail){
$armType = $armType->armType;
}
assert(is_numeric($armType), '$armType should be int or GameUnitDetail');
return $this->attackCoef[$armType]??1;
}
public function getDefenceCoef($armType):float{
if($armType instanceof GameUnitDetail){
$armType = $armType->armType;
}
assert(is_numeric($armType), '$armType should be int or GameUnitDetail');
return $this->defenceCoef[$armType]??1;
}
public function getComputedAttack(array $general, int $tech){
if($this->armType == GameUnitConst::T_CASTLE){
assert(isset($general['def']) && isset($general['wall']), '도시 정보가 입력되어야 함');
return ($general['def']*0.1 + $general['wall']*0.9) / 500 + 200;
}
if($this->armType == GameUnitConst::T_WIZARD){
$ratio = getGeneralIntel($general, true, true, true)*2 - 40;
}
else if($this->armType == GameUnitConst::T_SIEGE){
$ratio = getGeneralLeadership($general, true, true, true)*2 - 40;
}
else if($this->armType == GameUnitConst::T_MISC){
$ratio = getGeneralIntel($general, true, true, true) +
getGeneralLeadership($general, true, true, true) +
getGeneralPower($general, true, true, true);
$ratio = $ratio*2/3 - 40;
}
else{
$ratio = getGeneralPower($general, true, true, true)*2 - 40;
}
if($ratio < 10){
$ratio = 10;
}
if($ratio > 100){
$ratio = 50 + $ratio/2;
}
$att = $this->attack + getTechAbil($tech);
return $att * $ratio / 100;
}
public function getComputedDefence(array $general, int $tech){
if($this->armType == GameUnitConst::T_CASTLE){
assert(isset($general['def']) && isset($general['wall']), '도시 정보가 입력되어야 함');
return ($general['def']*0.1 + $general['wall']*0.9) / 500 + 200;
}
$def = $this->defence + getTechAbil($tech);
$crew = ($general['crew'] / (7000 / 30)) + 70;
return $def * $crew / 100;
}
public function getCriticalRatio(array $general){
if($this->armType == GameUnitConst::T_CASTLE){
//성벽은 필살을 사용하지 않는다.
return 0;
}
// 무장 무력 : 65 5%, 70 10%, 75 15%, 80 20%
// 지장 지력 : 65 5%, 70 8%, 75 10%, 80 13%
//충차장 통솔: 65 5%, 70 8%, 75 10%, 80 13%
if($this->armType == GameUnitConst::T_WIZARD){
$mainstat = getGeneralIntel($general, false, true, true, false);
$coef = 0.4;
}
else if($this->armType == GameUnitConst::T_SIEGE){
$mainstat = getGeneralLeadership($general, false, true, true, false);
$coef = 0.4;
}
else if($this->armType == GameUnitConst::T_MISC){
$mainstat = getGeneralIntel($general, false, true, true, false) +
getGeneralLeadership($general, false, true, true, false) +
getGeneralPower($general, false, true, true, false);
$mainstat /= 3;
$coef = 0.4;
}
else{
$mainstat = getGeneralPower($general, false, true, true, false);
$coef = 0.5;
}
$ratio = max($mainstat - 65, 0);
$ratio *= $coef;
return max(50, $ratio);
}
public function isValid($ownCities, $ownRegions, $relativeYear, $tech){
if($relativeYear < 3 && !$this->recruitFirst){
if($relativeYear < $this->reqYear){
return false;
}
if($this->recruitType == 0){
if($tech < $this->recruitCondition){
if($tech < $this->reqTech){
return false;
}
if($this->reqCities !== null){
$valid = false;
foreach($this->reqCities as $reqCity){
if(\key_exists($reqCity, $ownCities)){
$valid = true;
break;
}
}
if(!$valid){
return false;
}
}
if($this->recruitType == 1){
if(!key_exists($this->recruitCondition, $ownRegions)){
return false;
}
if ($tech < 1000) {
return false;
}
}
if($this->recruitType == 2){
$cityLevel = CityConst::byID($this->recruitCondition)->level;
if(!key_exists($this->recruitCondition, $ownCities)){
return false;
}
if($cityLevel == CityConst::$levelMap['특']){
if ($tech < 3000) {
return false;
if($this->reqRegions !== null){
$valid = false;
foreach($this->reqRegions as $reqRegion){
if(\key_exists($reqRegion, $ownRegions)){
$valid = true;
break;
}
}
else{ //if($cityLevel == '이')
if ($tech < 2000) {
return false;
}
if(!$valid){
return false;
}
}
+17 -1
View File
@@ -143,6 +143,20 @@ class ResetHelper{
]);
CityConst::build();
$cityPositions = [];
foreach(CityConst::all() as $city){
$cityPositions[$city->id] = [
$city->name,
$city->posX,
$city->posY
];
}
Util::generateFileUsingSimpleTemplate(
__dir__.'/../templates/base_map.orig.js',
__dir__.'/../d_shared/base_map.js',
['cityPosition'=>Json::encode($cityPositions)],
true
);
$turntime = date('Y-m-d H:i:s');
@@ -154,7 +168,7 @@ class ResetHelper{
$year = $startyear;
} else {
// 현재 시간과 동기화
list($starttime, $yearPulled, $month) = cutDay($turntime, $turnterm);
[$starttime, $yearPulled, $month] = cutDay($turntime, $turnterm);
if($yearPulled){
$year = $startyear-1;
}
@@ -175,6 +189,7 @@ class ResetHelper{
'startyear'=>$startyear,
'year'=> $year,
'month'=> $month,
'map_theme' => $scenarioObj->getMapTheme(),
'msg'=>'공지사항',//TODO:공지사항
'maxgeneral'=>GameConst::$defaultMaxGeneral,
'maxnation'=>GameConst::$defaultMaxNation,
@@ -212,6 +227,7 @@ class ResetHelper{
'server_id'=>$serverID,
'date'=>$turntime,
'winner_nation'=>null,
'map'=>$scenarioObj->getMapTheme(),
'scenario'=>$scenario,
'scenario_name'=>$scenarioObj->getTitle(),
'env'=>Json::encode($env)
+38 -12
View File
@@ -182,15 +182,20 @@ class Scenario{
$default = Json::decode(file_get_contents($defaultPath));
$stat = [
'statTotal'=>$this->data['stat']['total']??$default['stat']['total'],
'statMin'=>$this->data['stat']['min']??$default['stat']['min'],
'statMax'=>$this->data['stat']['max']??$default['stat']['max'],
'statNPCMax'=>$this->data['stat']['npcMax']??$default['stat']['npcMax'],
'statChiefMin'=>$this->data['stat']['chiefMin']??$default['stat']['chiefMin'],
'defaultStatTotal'=>$this->data['stat']['total']??$default['stat']['total'],
'defaultStatMin'=>$this->data['stat']['min']??$default['stat']['min'],
'defaultStatMax'=>$this->data['stat']['max']??$default['stat']['max'],
'defaultStatNPCMax'=>$this->data['stat']['npcMax']??$default['stat']['npcMax'],
'chiefStatMin'=>$this->data['stat']['chiefMin']??$default['stat']['chiefMin'],
];
$this->gameConf = array_merge($stat);
$this->gameConf = array_merge($stat, $this->data['map']??[], $this->data['const']??[]);
$this->iconPath = $this->data['iconPath']??$default['iconPath'];
$this->gameConf['mapName'] = $this->gameConf['mapName']??'che';
$this->gameConf['unitSet'] = $this->gameConf['unitSet']??'che';
return $this->gameConf;
}
@@ -246,6 +251,14 @@ class Scenario{
$this->initFull();
return $this->nations;
}
public function getMapTheme(){
return $this->gameConf['mapName'];
}
public function getUnitSet(){
return $this->gameConf['unitSet'];
}
public function getScenarioBrief(){
$this->initFull();
@@ -357,12 +370,25 @@ class Scenario{
public function buildConf(){
$path = __dir__.'/../d_setting';
Util::generateFileUsingSimpleTemplate(
$path.'/GameCustomConst.orig.php',
$path.'/GameCustomConst.php',
$this->gameConf,
true
);
$mapPath = __dir__.'/../scenario/map';
$unitPath = __dir__.'/../scenario/unit';
$mapName = $this->gameConf['mapName'];
$unitSet = $this->gameConf['unitSet'];
if(!file_exists("$mapPath/$mapName.php")){
throw new \RuntimeException('맵 파일이 올바르게 지정되지 않음! : '.$mapName);
}
if(!file_exists("$unitPath/$unitSet.php")){
throw new \RuntimeException('유닛 파일이 올바르게 지정되지 않음! : '.$unitSet);
}
Util::generatePHPClassFile($path.'/GameConst.php', $this->gameConf, 'GameConstBase', 'sammo');
copy("$mapPath/$mapName.php", $path.'/CityConst.php');
copy("$unitPath/$unitSet.php", $path.'/GameUnitConst.php');
}
public function build($env=[]){
+7
View File
@@ -0,0 +1,7 @@
<?php
namespace sammo;
class CityConst extends CityConstBase{
}
+87
View File
@@ -0,0 +1,87 @@
<?php
namespace sammo;
class CityConst extends CityConstBase{
protected static $initCity = [
//id, 도시, 규모, 인구, 농, 상, 치, 성, 수,(x100)지역, x, y, 연결도시
[1, '낙양', '특', 8357,117,120,100,121,124, '중원', 279, 176, ['하내', '홍농', '사수']],
[2, '성도', '특', 6525,123,125,100,125,123, '서촉', 28, 288, ['덕양', '강주']],
[3, '건업', '특', 6386,116,123,100,115,119, '오월', 507, 303, ['광릉', '합비', '오']],
[4, '업', '특', 6205,125,113,100,117,122, '하북', 347, 131, ['하내', '거록', '남피', '제남', '진류']],
[5, '장안', '특', 5923,116,123,100,120,118, '서북', 162, 173, ['안정', '오장원', '한중', '홍농']],
[6, '허창', '특', 5876,121,124,100,117,125, '중원', 317, 218, ['사수', '진류', '초', '여남', '완']],
[7, '양양', '특', 5837,120,126,100,115,117, '초', 259, 287, ['신야', '강릉', '강하']],
[8, '시상', '대', 5252, 98,100, 80, 99, 96, '오월', 350, 367, ['적벽', '여강', '단양', '상동', '장사']],
[9, '수춘', '대', 5143, 99, 96, 80, 99, 95, '중원', 381, 270, ['여남', '초', '하비', '합비']],
[10, '한중', '대', 5137, 96,101, 80,102,103, '서촉', 130, 218, ['무도', '오장원', '장안', '상용', '자동']],
[11, '남피', '대', 5032, 99,101, 80,101,105, '하북', 405, 93, ['계', '북평', '평원', '업', '거록']],
[12, '위례', '대', 4926,100, 93, 80, 98,103, '동이', 615, 143, ['평양', '북해', '웅진', '계림']],
[13, '북평', '대', 4862,102, 95, 80,103, 99, '하북', 442, 53, ['계', '요동', '남피']],
[14, '강릉', '대', 4850,105, 96, 80, 95, 96, '초', 243, 336, ['이릉', '양양', '적벽', '장사', '무릉']],
[15, '완', '대', 4724,103,100, 80,101, 99, '중원', 270, 236, ['허창', '여남', '신야']],
[16, '장사', '대', 4710, 97, 99, 80,100,105, '초', 258, 373, ['강릉', '시상', '계양', '무릉']],
[17, '오', '중', 4355, 77, 81, 60, 77, 76, '오월', 512, 345, ['건업', '단양', '회계', '탐라']],
[18, '하비', '중', 4278, 85, 83, 60, 82, 78, '중원', 451, 245, ['패', '북해', '광릉', '수춘']],
[19, '복양', '중', 4185, 80, 83, 60, 82, 80, '중원', 412, 175, ['제남', '진류', '패']],
[20, '웅진', '중', 4157, 77, 79, 60, 78, 80, '동이', 619, 205, ['위례', '계림', '탐라']],
[21, '강주', '중', 4126, 79, 80, 60, 84, 81, '서촉', 73, 311, ['성도', '덕양', '영안', '주제', '월수']],
[22, '무도', '중', 4027, 77, 84, 60, 80, 85, '서촉', 50, 191, ['저', '한중', '자동']],
[23, '국내', '중', 3982, 78, 80, 60, 83, 78, '동이', 596, 48, ['요동', '오환', '평양']],
[24, '진류', '중', 3957, 82, 80, 60, 80, 83, '중원', 365, 178, ['업', '복양', '패', '초', '허창', '사수']],
[25, '계양', '중', 3955, 83, 80, 60, 81, 77, '초', 232, 418, ['영릉', '장사', '상동']],
[26, '계림', '중', 3911, 80, 74, 60, 81, 78, '동이', 656, 198, ['위례', '웅진', '왜']],
[27, '계', '중', 3885, 75, 80, 60, 78, 81, '하북', 386, 55, ['진양', '북평', '남피']],
[28, '무위', '중', 3874, 77, 79, 60, 83, 80, '서북', 53, 81, ['강', '안정', '천수', '저']],
[29, '제남', '중', 3831, 77, 81, 60, 84, 77, '하북', 402, 132, ['업', '평원', '복양']],
[30, '남해', '중', 3803, 82, 76, 60, 80, 81, '오월', 259, 474, ['상동', '산월', '교지']],
[31, '덕양', '중', 3803, 81, 84, 60, 79, 77, '서촉', 73, 276, ['자동', '영안', '강주', '성도']],
[32, '하내', '중', 3736, 77, 81, 60, 81, 80, '하북', 291, 140, ['진양', '업', '낙양', '하동']],
[33, '상용', '중', 3687, 78, 76, 60, 77, 81, '서촉', 188, 226, ['한중', '신야']],
[34, '초', '소', 3286, 60, 62, 40, 62, 57, '중원', 372, 233, ['허창', '진류', '패', '수춘', '여남']],
[35, '운남', '소', 3258, 62, 60, 40, 64, 61, '남중', 33, 413, ['월수', '건녕', '남만']],
[36, '대', '소', 3256, 60, 62, 40, 57, 60, '오월', 446, 472, ['산월', '회계', '왜']],
[37, '하동', '소', 3208, 60, 60, 40, 62, 55, '서북', 231, 140, ['흉노', '진양', '하내', '홍농']],
[38, '무릉', '소', 3196, 58, 63, 40, 63, 58, '초', 200, 357, ['강릉', '장사', '영릉']],
[39, '교지', '소', 3195, 58, 59, 40, 58, 59, '남중', 136, 472, ['남만', '남해']],
[40, '단양', '소', 3183, 62, 64, 40, 58, 57, '오월', 432, 354, ['여강', '오', '건안', '시상']],
[41, '영안', '소', 3153, 62, 59, 40, 58, 59, '서촉', 116, 287, ['덕양', '이릉', '강주']],
[42, '북해', '소', 3146, 55, 63, 40, 63, 58, '하북', 466, 155, ['평원', '위례', '하비']],
[43, '합비', '소', 3144, 60, 59, 40, 62, 56, '중원', 413, 294, ['수춘', '건업', '여강']],
[44, '이릉', '소', 3139, 61, 57, 40, 57, 57, '초', 188, 282, ['영안', '강릉']],
[45, '건녕', '소', 3082, 58, 59, 40, 63, 56, '남중', 75, 396, ['주제', '장가', '운남']],
[46, '강하', '소', 3074, 55, 56, 40, 57, 60, '초', 316, 303, ['양양', '적벽', '여강']],
[47, '진양', '소', 3074, 56, 59, 40, 64, 59, '하북', 310, 79, ['흉노', '하동', '하내', '거록', '계']],
[48, '평원', '소', 3074, 62, 65, 40, 61, 63, '하북', 444, 118, ['남피', '제남', '북해']],
[49, '회계', '소', 3005, 64, 59, 40, 62, 64, '오월', 480, 394, ['오', '건안', '대']],
[50, '천수', '소', 2985, 59, 64, 40, 60, 58, '서북', 76, 145, ['무위', '안정', '오장원', '저']],
[51, '평양', '소', 2939, 55, 59, 40, 60, 58, '동이', 596, 97, ['국내', '위례']],
[52, '요동', '소', 2937, 63, 59, 40, 59, 63, '동이', 543, 26, ['북평', '오환', '국내']],
[53, '거록', '소', 2936, 61, 57, 40, 64, 58, '하북', 355, 100, ['진양', '남피', '업']],
[54, '여강', '소', 2905, 56, 58, 40, 60, 55, '오월', 392, 331, ['합비', '단양', '시상', '강하']],
[55, '패', '소', 2877, 64, 58, 40, 58, 59, '중원', 429, 220, ['진류', '복양', '하비', '초']],
[56, '자동', '소', 2870, 57, 55, 40, 60, 58, '서촉', 62, 245, ['무도', '한중', '덕양']],
[57, '광릉', '소', 2867, 61, 55, 40, 60, 62, '오월', 474, 273, ['하비', '건업']],
[58, '장가', '소', 2853, 59, 62, 40, 58, 57, '남중', 136, 403, ['건녕', '영릉', '남만']],
[59, '영릉', '소', 2849, 62, 58, 40, 62, 62, '초', 192, 394, ['무릉', '계양', '장가']],
[60, '월수', '소', 2828, 60, 59, 40, 58, 63, '남중', 39, 349, ['강주', '주제', '운남']],
[61, '건안', '소', 2802, 57, 62, 40, 58, 63, '오월', 435, 427, ['단양', '회계', '산월']],
[62, '신야', '소', 2786, 60, 62, 40, 58, 55, '초', 240, 262, ['상용', '완', '양양']],
[63, '탐라', '소', 2772, 60, 55, 40, 63, 62, '동이', 614, 264, ['웅진', '왜', '오']],
[64, '상동', '소', 2767, 58, 59, 40, 62, 58, '초', 285, 411, ['계양', '시상', '남해']],
[65, '안정', '소', 2764, 57, 59, 40, 57, 62, '서북', 130, 131, ['강', '무위', '천수', '장안']],
[66, '여남', '소', 2749, 63, 56, 40, 64, 64, '중원', 330, 259, ['완', '허창', '초', '수춘']],
[67, '홍농', '소', 2748, 57, 63, 40, 58, 63, '서북', 213, 175, ['하동', '낙양', '장안']],
[68, '주제', '소', 2746, 58, 61, 40, 61, 58, '남중', 93, 357, ['강주', '월수', '건녕']],
[69, '남만', '이', 2378, 40, 42, 20, 43, 45, '남중', 83, 454, ['운남', '장가', '교지']],
[70, '산월', '이', 2275, 40, 37, 20, 43, 38, '오월', 373, 447, ['건안', '대', '남해']],
[71, '오환', '이', 2153, 42, 37, 20, 43, 40, '동이', 628, 19, ['요동', '국내']],
[72, '강', '이', 2095, 40, 42, 20, 43, 40, '서북', 154, 77, ['무위', '안정']],
[73, '왜', '이', 2065, 39, 37, 20, 43, 41, '동이', 681, 292, ['계림', '탐라', '대']],
[74, '흉노', '이', 2064, 40, 41, 20, 40, 38, '서북', 227, 79, ['진양', '하동']],
[75, '저', '이', 1957, 40, 42, 20, 43, 42, '서북', 21, 123, ['무위', '천수', '무도']],
[76, '사수', '관', 958, 17, 19, 20, 95, 96, '중원', 317, 182, ['낙양', '진류', '허창']],
[77, '오장원','진',1005, 19, 18, 20, 41, 40, '서북', 104, 180, ['천수', '장안', '한중']],
[78, '적벽', '수', 1117, 23, 21, 20, 42, 41, '오월', 329, 335, ['강하', '강릉', '시상']],
];
}
@@ -1,5 +1,5 @@
{
"title":"【가상모드1】 영웅 난무",
"title":"【가상모드1a】 영웅 난무",
"life":1,
"fiction":1,
"nation":[
@@ -1,5 +1,5 @@
{
"title":"【가상모드1.1】 영웅 난무",
"title":"【가상모드1b】 영웅 난무 220",
"life":1,
"fiction":1,
"nation":[
+712
View File
@@ -0,0 +1,712 @@
{
"title":"【가상모드1c】 영웅 난무 220, Mini",
"life":1,
"fiction":1,
"nation":[
],
"diplomacy":[
],
"stat":{
"total":220,
"min":40,
"max":95,
"npcMax":95
},
"map":{
"mapName":"miniche"
},
"general":[
[ 1, "소제1",1001, 0, null, 20, 11, 48, 0, 160, 300, "유지", null],
[ 1, "헌제",1002, 0, null, 17, 13, 61, 0, 160, 300, "안전", null],
[999, "사마휘",1003, 0, null, 71, 11, 96, 0, 160, 300, "은둔", "신산", "좋지, 좋아~"],
[999, "우길",1004, 0, null, 17, 13, 83, 0, 160, 300, "은둔", "신산"],
[999, "화타",1005, 0, null, 53, 25, 70, 0, 160, 300, "은둔", "의술", "아픈 사람들은 모두 내게 오시오. 껄껄껄."],
[999, "길평",1006, 0, null, 27, 15, 72, 0, 160, 300, "은둔", "의술"],
[ 29, "가규",1007, 0, null, 55, 55, 74, 0, 160, 300, "재간", null],
[136, "가범",1008, 0, null, 58, 48, 73, 0, 160, 300, "유지", null],
[ 49, "가비능",1009, 0, null, 58, 83, 32, 0, 160, 300, "정복", null],
[ 31, "가충",1010, 0, null, 50, 25, 87, 0, 160, 300, "출세", null],
[ 20, "가후",1011, 0, null, 69, 30, 94, 0, 160, 300, "할거", "귀병"],
[ 73, "간옹",1012, 0, null, 31, 33, 70, 0, 160, 300, "안전", "경작"],
[129, "감녕",1013, 0, null, 78, 95, 71, 0, 160, 300, "출세", "무쌍"],
[127, "감택",1014, 0, null, 62, 44, 79, 0, 160, 300, "유지", null],
[ 60, "강단",1015, 0, null, 41, 73, 43, 0, 160, 300, "재간", null],
[ 73, "강유",1016, 0, null, 95, 90, 94, 0, 160, 300, "왕좌", "집중", "갈고 닦은 무예와 승상께 배운 책략을 발휘해 보이겠다!"],
[102, "고간",1017, 0, null, 60, 57, 51, 0, 160, 300, "유지", null],
[ 27, "고람",1018, 0, null, 72, 67, 59, 0, 160, 300, "출세", "기병"],
[ 69, "고상",1019, 0, null, 41, 40, 38, 0, 160, 300, "재간", null],
[144, "고순",1020, 0, null, 79, 82, 65, 0, 160, 300, "의협", "기병"],
[ 7, "고승",1021, 0, null, 42, 73, 24, 0, 160, 300, "출세", null],
[120, "고옹",1022, 0, null, 57, 21, 79, 0, 160, 300, "출세", null],
[ 63, "고정",1023, 0, null, 67, 65, 55, 0, 160, 300, "정복", null],
[ 53, "고패",1024, 0, null, 53, 56, 28, 0, 160, 300, "유지", null],
[ 74, "공도",1025, 0, null, 26, 73, 19, 0, 160, 300, "재간", null],
[142, "공손강",1026, 0, null, 64, 72, 61, 0, 160, 300, "정복", null],
[142, "공손공",1027, 0, null, 68, 41, 75, 0, 160, 300, "정복", null],
[142, "공손도",1028, 0, null, 62, 72, 41, 0, 160, 300, "정복", "기병"],
[ 65, "공손범",1029, 0, null, 61, 67, 61, 0, 160, 300, "출세", null],
[ 65, "공손속",1030, 0, null, 60, 76, 41, 0, 160, 300, "정복", null],
[ 10, "공손연",1031, 0, null, 74, 79, 64, 0, 160, 300, "패권", "돌격"],
[ 65, "공손월",1032, 0, null, 47, 63, 46, 0, 160, 300, "정복", null],
[ 65, "공손찬",1033, 0, null, 61, 87, 67, 0, 160, 300, "패권", "기병"],
[ 43, "공융",1034, 0, null, 63, 48, 85, 0, 160, 300, "왕좌", "경작"],
[ 35, "공주",1035, 0, null, 64, 35, 78, 0, 160, 300, "재간", null],
[ 83, "공지",1036, 0, null, 57, 54, 64, 0, 160, 300, "대의", null],
[ 26, "곽가",1037, 0, null, 47, 23, 99, 0, 160, 300, "패권", "귀모"],
[111, "곽도",1038, 0, null, 63, 67, 81, 0, 160, 300, "재간", null],
[ 2, "곽사",1039, 0, null, 58, 67, 31, 0, 160, 300, "패권", null],
[ 80, "곽유지",1040, 0, null, 37, 22, 71, 0, 160, 300, "재간", "상재"],
[ 67, "곽익",1041, 0, null, 67, 60, 67, 0, 160, 300, "재간", null],
[ 67, "곽준",1042, 0, null, 76, 69, 73, 0, 160, 300, "출세", null],
[ 27, "곽혁",1043, 0, null, 40, 29, 80, 0, 160, 300, "안전", null],
[ 20, "곽회",1044, 0, null, 77, 75, 71, 0, 160, 300, "정복", null],
[ 39, "관구검",1045, 0, null, 72, 68, 77, 0, 160, 300, "대의", null],
[ 76, "관색",1046, 0, null, 69, 85, 67, 0, 160, 300, "의협", "징병"],
[ 76, "관우",1047, 0, null, 96, 98, 80, 0, 160, 300, "의협", "위압", "나의 청룡 언월도를 과연 막아낼 수 있겠소?"],
[ 76, "관이",1048, 0, null, 48, 60, 58, 0, 160, 300, "안전", null],
[ 76, "관통",1049, 0, null, 49, 63, 60, 0, 160, 300, "대의", null],
[ 76, "관평",1050, 0, null, 77, 80, 70, 0, 160, 300, "의협", "보병"],
[ 7, "관해",1051, 0, null, 66, 90, 35, 0, 160, 300, "출세", null],
[ 76, "관흥",1052, 0, null, 69, 84, 72, 0, 160, 300, "의협", "돌격"],
[ 40, "괴량",1053, 0, null, 41, 28, 81, 0, 160, 300, "안전", "신중"],
[ 40, "괴월",1054, 0, null, 26, 30, 84, 0, 160, 300, "유지", "귀병"],
[ 98, "교모",1055, 0, null, 59, 58, 61, 0, 160, 300, "안전", null],
[ 98, "교현",1056, 0, null, 50, 18, 60, 0, 160, 300, "재간", null],
[ 6, "구역거",1057, 0, null, 51, 72, 49, 0, 160, 300, "안전", null],
[ 80, "극정",1058, 0, null, 38, 25, 75, 0, 160, 300, "유지", null],
[ 46, "금선",1059, 0, null, 55, 49, 36, 0, 160, 300, "할거", null],
[ 62, "금환삼결",1060, 0, null, 46, 76, 17, 0, 160, 300, "출세", null],
[141, "기령",1061, 0, null, 76, 81, 33, 0, 160, 300, "대의", "무쌍"],
[122, "낙통",1062, 0, null, 57, 44, 69, 0, 160, 300, "유지", null],
[124, "노숙1",1063, 0, null, 90, 42, 94, 0, 160, 300, "왕좌", "상재"],
[ 75, "노식",1064, 0, null, 91, 54, 80, 0, 160, 300, "왕좌", "징병"],
[ 59, "뇌동",1065, 0, null, 70, 77, 45, 0, 160, 300, "출세", "궁병"],
[142, "뇌박",1066, 0, null, 54, 54, 33, 0, 160, 300, "유지", null],
[127, "능조",1067, 0, null, 67, 80, 44, 0, 160, 300, "재간", "공성"],
[127, "능통",1068, 0, null, 71, 78, 58, 0, 160, 300, "의협", "궁병"],
[ 64, "단경",1069, 0, null, 68, 61, 68, 0, 160, 300, "정복", null],
[132, "담웅",1070, 0, null, 52, 77, 19, 0, 160, 300, "출세", null],
[ 99, "답둔",1071, 0, null, 59, 71, 31, 0, 160, 300, "유지", null],
[132, "당자",1072, 0, null, 59, 56, 45, 0, 160, 300, "안전", null],
[ 60, "대래동주",1073, 0, null, 40, 65, 24, 0, 160, 300, "안전", null],
[ 82, "도겸",1074, 0, null, 51, 32, 61, 0, 160, 300, "할거", "인덕"],
[120, "도준",1075, 0, null, 64, 57, 50, 0, 160, 300, "안전", null],
[ 73, "동궐",1076, 0, null, 66, 50, 76, 0, 160, 300, "대의", null],
[ 62, "동다나",1077, 0, null, 51, 71, 27, 0, 160, 300, "유지", null],
[ 2, "동민",1078, 0, null, 52, 65, 49, 0, 160, 300, "안전", null],
[ 21, "동소",1079, 0, null, 46, 46, 62, 0, 160, 300, "패권", null],
[127, "동습",1080, 0, null, 53, 64, 32, 0, 160, 300, "출세", null],
[ 89, "동승",1081, 0, null, 75, 66, 65, 0, 160, 300, "왕좌", null],
[ 78, "동윤",1082, 0, null, 64, 26, 78, 0, 160, 300, "왕좌", null],
[ 2, "동탁",1083, 0, null, 87, 91, 54, 0, 160, 300, "패권", "기병"],
[ 66, "동화",1084, 0, null, 48, 64, 53, 0, 160, 300, "대의", null],
[ 32, "두예",1085, 0, null, 88, 80, 84, 0, 160, 300, "정복", null],
[ 7, "등무",1086, 0, null, 43, 74, 19, 0, 160, 300, "정복", null],
[ 41, "등애",1087, 0, null, 94, 82, 92, 0, 160, 300, "패권", "신산"],
[116, "등윤",1088, 0, null, 34, 42, 68, 0, 160, 300, "안전", null],
[ 73, "등지",1089, 0, null, 74, 51, 80, 0, 160, 300, "할거", "경작"],
[ 41, "등충",1090, 0, null, 60, 82, 55, 0, 160, 300, "출세", null],
[ 54, "등현",1091, 0, null, 65, 59, 61, 0, 160, 300, "출세", null],
[ 29, "마균",1092, 0, null, 33, 38, 80, 0, 160, 300, "안전", null],
[ 71, "마대",1093, 0, null, 77, 79, 49, 0, 160, 300, "대의", "기병"],
[ 70, "마등",1094, 0, null, 80, 87, 56, 0, 160, 300, "왕좌", "기병"],
[ 80, "마속",1095, 0, null, 73, 64, 82, 0, 160, 300, "패권", "집중"],
[ 77, "마량",1096, 0, null, 57, 25, 87, 0, 160, 300, "왕좌", null],
[ 48, "마완",1097, 0, null, 49, 64, 26, 0, 160, 300, "안전", "기병"],
[ 19, "마준",1098, 0, null, 45, 63, 62, 0, 160, 300, "안전", null],
[ 71, "마철",1099, 0, null, 71, 60, 31, 0, 160, 300, "대의", "기병"],
[ 70, "마초",1100, 0, null, 78, 97, 40, 0, 160, 300, "대의", "기병", "금마초 나가신닷!"],
[131, "마충1",1101, 0, null, 67, 62, 51, 0, 160, 300, "재간", null],
[ 69, "마충2",1102, 0, null, 61, 68, 51, 0, 160, 300, "출세", null],
[ 71, "마휴",1103, 0, null, 71, 60, 32, 0, 160, 300, "대의", "기병"],
[116, "만총",1104, 0, null, 79, 40, 78, 0, 160, 300, "할거", "신중"],
[ 51, "망아장",1105, 0, null, 29, 64, 20, 0, 160, 300, "출세", null],
[ 44, "맹달",1106, 0, null, 70, 66, 72, 0, 160, 300, "할거", "귀병"],
[ 60, "맹우",1107, 0, null, 63, 79, 26, 0, 160, 300, "정복", null],
[ 60, "맹획",1108, 0, null, 78, 92, 50, 0, 160, 300, "왕좌", "격노"],
[ 29, "모개",1109, 0, null, 46, 56, 56, 0, 160, 300, "대의", null],
[ 51, "목록대왕",1110, 0, null, 58, 71, 65, 0, 160, 300, "재간", "척사"],
[ 96, "목순",1111, 0, null, 17, 21, 68, 0, 160, 300, "왕좌", null],
[ 43, "무안국",1112, 0, null, 51, 73, 18, 0, 160, 300, "재간", null],
[ 28, "문빙",1113, 0, null, 70, 77, 43, 0, 160, 300, "유지", null],
[ 38, "문앙",1114, 0, null, 71, 91, 46, 0, 160, 300, "대의", null],
[102, "문추",1115, 0, null, 72, 94, 25, 0, 160, 300, "출세", "무쌍"],
[ 38, "문흠",1116, 0, null, 76, 77, 43, 0, 160, 300, "대의", null],
[ 49, "미당대왕",1117, 0, null, 64, 75, 32, 0, 160, 300, "유지", null],
[108, "미방",1118, 0, null, 58, 65, 37, 0, 160, 300, "패권", "징병"],
[ 77, "미축",1119, 0, null, 26, 30, 65, 0, 160, 300, "왕좌", "상재"],
[ 94, "반봉",1120, 0, null, 61, 75, 17, 0, 160, 300, "출세", null],
[ 44, "반준",1121, 0, null, 41, 21, 67, 0, 160, 300, "안전", null],
[ 65, "방덕",1122, 0, null, 76, 90, 67, 0, 160, 300, "의협", "기병"],
[ 73, "방통",1123, 0, null, 86, 41, 97, 0, 160, 300, "패권", "반계"],
[ 65, "방회",1124, 0, null, 25, 33, 59, 0, 160, 300, "안전", null],
[ 68, "배원소",1125, 0, null, 45, 69, 33, 0, 160, 300, "재간", null],
[ 78, "번건",1126, 0, null, 28, 31, 68, 0, 160, 300, "대의", null],
[149, "번주",1127, 0, null, 67, 77, 21, 0, 160, 300, "할거", null],
[ 72, "법정",1128, 0, null, 81, 29, 93, 0, 160, 300, "패권", "신산"],
[ 8, "변희",1129, 0, null, 65, 65, 27, 0, 160, 300, "안전", null],
[121, "보질",1130, 0, null, 58, 28, 77, 0, 160, 300, "유지", null],
[113, "복양흥",1131, 0, null, 58, 51, 71, 0, 160, 300, "유지", null],
[110, "봉기",1132, 0, null, 68, 52, 80, 0, 160, 300, "패권", "집중"],
[ 74, "부동",1133, 0, null, 58, 69, 69, 0, 160, 300, "대의", null],
[108, "부사인",1134, 0, null, 54, 59, 51, 0, 160, 300, "출세", null],
[ 38, "부손",1135, 0, null, 24, 43, 68, 0, 160, 300, "안전", null],
[ 74, "부첨",1136, 0, null, 61, 74, 45, 0, 160, 300, "대의", null],
[ 66, "비시",1137, 0, null, 18, 36, 61, 0, 160, 300, "재간", null],
[141, "비연",1138, 0, null, 66, 65, 53, 0, 160, 300, "출세", null],
[ 77, "비위",1139, 0, null, 72, 26, 73, 0, 160, 300, "대의", null],
[144, "사광",1140, 0, null, 57, 49, 66, 0, 160, 300, "안전", null],
[ 71, "사마가",1141, 0, null, 61, 85, 18, 0, 160, 300, "정복", "돌격"],
[ 20, "사마랑",1142, 0, null, 25, 32, 63, 0, 160, 300, "대의", null],
[ 24, "사마망",1143, 0, null, 71, 61, 65, 0, 160, 300, "정복", null],
[ 24, "사마부",1144, 0, null, 55, 31, 73, 0, 160, 300, "대의", null],
[ 31, "사마사",1145, 0, null, 87, 64, 91, 0, 160, 300, "정복", null],
[ 31, "사마소",1146, 0, null, 93, 63, 84, 0, 160, 300, "정복", null],
[ 31, "사마염",1147, 0, null, 92, 78, 72, 0, 160, 300, "패권", null],
[ 30, "사마유",1148, 0, null, 62, 45, 79, 0, 160, 300, "왕좌", null],
[ 31, "사마의",1149, 0, null, 98, 67, 98, 0, 160, 300, "패권", "반계"],
[139, "사섭",1150, 0, null, 63, 61, 71, 0, 160, 300, "안전", null],
[139, "사일",1151, 0, null, 59, 44, 68, 0, 160, 300, "유지", null],
[132, "사정",1152, 0, null, 67, 71, 20, 0, 160, 300, "안전", null],
[146, "사지",1153, 0, null, 61, 49, 70, 0, 160, 300, "안전", null],
[144, "사휘",1154, 0, null, 67, 71, 61, 0, 160, 300, "유지", null],
[ 35, "서막",1155, 0, null, 56, 41, 72, 0, 160, 300, "유지", null],
[ 76, "서서",1156, 0, null, 90, 70, 96, 0, 160, 300, "의협", "귀병"],
[124, "서성",1157, 0, null, 83, 76, 83, 0, 160, 300, "대의", null],
[142, "서영",1158, 0, null, 47, 63, 33, 0, 160, 300, "안전", null],
[ 23, "서질",1159, 0, null, 55, 73, 34, 0, 160, 300, "재간", null],
[ 23, "서황",1160, 0, null, 79, 89, 68, 0, 160, 300, "의협", "필살"],
[ 32, "석포",1161, 0, null, 71, 63, 59, 0, 160, 300, "정복", null],
[131, "설영",1162, 0, null, 46, 23, 64, 0, 160, 300, "유지", null],
[128, "설종",1163, 0, null, 27, 33, 67, 0, 160, 300, "유지", null],
[ 69, "성의",1164, 0, null, 45, 64, 22, 0, 160, 300, "재간", null],
[129, "소비",1165, 0, null, 67, 63, 49, 0, 160, 300, "대의", null],
[ 76, "손건",1166, 0, null, 42, 33, 73, 0, 160, 300, "대의", "거상"],
[125, "손견",1167, 0, null, 96, 95, 76, 0, 160, 300, "왕좌", "무쌍"],
[126, "손광",1168, 0, null, 63, 54, 58, 0, 160, 300, "유지", null],
[125, "손권",1169, 0, null, 90, 77, 83, 0, 160, 300, "할거", "수비"],
[126, "손랑",1170, 0, null, 27, 54, 28, 0, 160, 300, "안전", null],
[126, "손등",1171, 0, null, 52, 39, 77, 0, 160, 300, "할거", null],
[125, "손량",1172, 0, null, 24, 23, 79, 0, 160, 300, "할거", null],
[ 20, "손례",1173, 0, null, 64, 64, 69, 0, 160, 300, "안전", null],
[124, "손소",1174, 0, null, 76, 80, 68, 0, 160, 300, "정복", null],
[130, "손수",1175, 0, null, 67, 57, 59, 0, 160, 300, "안전", null],
[126, "손유",1176, 0, null, 77, 60, 67, 0, 160, 300, "정복", null],
[122, "손이",1177, 0, null, 57, 62, 57, 0, 160, 300, "안전", null],
[126, "손정",1178, 0, null, 59, 56, 62, 0, 160, 300, "유지", null],
[115, "손준",1179, 0, null, 59, 69, 51, 0, 160, 300, "정복", null],
[ 7, "손중",1180, 0, null, 53, 63, 24, 0, 160, 300, "안전", null],
[125, "손책",1181, 0, null, 96, 96, 78, 0, 160, 300, "패권", "필살", "소패왕 손책이 나가신다! 길을 비켜라!"],
[115, "손침",1182, 0, null, 49, 71, 40, 0, 160, 300, "패권", null],
[114, "손호",1183, 0, null, 20, 78, 67, 0, 160, 300, "패권", null],
[126, "손화",1184, 0, null, 35, 25, 71, 0, 160, 300, "왕좌", null],
[127, "손환",1185, 0, null, 79, 65, 70, 0, 160, 300, "정복", null],
[126, "손휴",1186, 0, null, 63, 43, 64, 0, 160, 300, "정복", null],
[117, "손흠",1187, 0, null, 66, 63, 33, 0, 160, 300, "정복", null],
[147, "송헌",1188, 0, null, 42, 63, 41, 0, 160, 300, "안전", null],
[ 95, "순우경",1189, 0, null, 72, 67, 60, 0, 160, 300, "할거", null],
[ 22, "순욱1",1190, 0, null, 54, 29, 97, 0, 160, 300, "왕좌", "집중"],
[ 22, "순유",1191, 0, null, 73, 41, 90, 0, 160, 300, "대의", "신중"],
[ 29, "신비",1192, 0, null, 47, 28, 74, 0, 160, 300, "재간", null],
[ 37, "신의",1193, 0, null, 55, 61, 51, 0, 160, 300, "출세", null],
[ 37, "신탐",1194, 0, null, 56, 58, 57, 0, 160, 300, "출세", null],
[ 85, "신평",1195, 0, null, 68, 51, 75, 0, 160, 300, "왕좌", null],
[102, "심배",1196, 0, null, 75, 66, 68, 0, 160, 300, "패권", "귀병"],
[126, "심영",1197, 0, null, 53, 72, 51, 0, 160, 300, "재간", null],
[ 47, "아하소과",1198, 0, null, 53, 75, 15, 0, 160, 300, "안전", "척사"],
[ 62, "아회남",1199, 0, null, 50, 74, 30, 0, 160, 300, "출세", "척사"],
[ 23, "악진",1200, 0, null, 73, 67, 56, 0, 160, 300, "대의", "돌격"],
[ 23, "악침",1201, 0, null, 45, 52, 33, 0, 160, 300, "대의", null],
[ 63, "악환",1202, 0, null, 54, 82, 55, 0, 160, 300, "재간", null],
[102, "안량",1203, 0, null, 73, 93, 36, 0, 160, 300, "출세", "위압"],
[ 14, "양백",1204, 0, null, 55, 54, 53, 0, 160, 300, "안전", null],
[ 92, "양봉1",1205, 0, null, 57, 64, 36, 0, 160, 300, "유지", null],
[ 91, "양봉2",1206, 0, null, 62, 78, 61, 0, 160, 300, "정복", null],
[ 13, "양송",1207, 0, null, 15, 35, 34, 0, 160, 300, "안전", null],
[ 43, "양수",1208, 0, null, 18, 31, 91, 0, 160, 300, "재간", "귀병"],
[ 61, "양의",1209, 0, null, 67, 56, 71, 0, 160, 300, "유지", null],
[141, "양조1",1210, 0, null, 68, 54, 60, 0, 160, 300, "출세", null],
[ 9, "양추1",1211, 0, null, 51, 67, 16, 0, 160, 300, "정복", null],
[ 31, "양호",1212, 0, null, 91, 69, 80, 0, 160, 300, "패권", null],
[ 53, "양회",1213, 0, null, 60, 67, 40, 0, 160, 300, "출세", null],
[141, "양흥",1214, 0, null, 52, 68, 17, 0, 160, 300, "안전", null],
[ 6, "어부라",1215, 0, null, 78, 80, 61, 0, 160, 300, "정복", null],
[ 64, "엄강",1216, 0, null, 57, 65, 44, 0, 160, 300, "재간", null],
[ 10, "엄백호",1217, 0, null, 48, 68, 30, 0, 160, 300, "할거", null],
[ 10, "엄여",1218, 0, null, 35, 66, 24, 0, 160, 300, "할거", null],
[ 69, "엄안",1219, 0, null, 72, 84, 67, 0, 160, 300, "왕좌", null],
[ 7, "엄정",1220, 0, null, 31, 68, 49, 0, 160, 300, "출세", null],
[121, "엄준",1221, 0, null, 44, 24, 71, 0, 160, 300, "재간", null],
[ 71, "여개",1222, 0, null, 51, 42, 67, 0, 160, 300, "유지", null],
[ 29, "여건",1223, 0, null, 44, 68, 29, 0, 160, 300, "출세", null],
[107, "여광",1224, 0, null, 60, 67, 27, 0, 160, 300, "유지", null],
[124, "여몽",1225, 0, null, 92, 78, 93, 0, 160, 300, "패권", "궁병"],
[123, "여범",1226, 0, null, 43, 34, 71, 0, 160, 300, "할거", null],
[107, "여상",1227, 0, null, 62, 68, 26, 0, 160, 300, "유지", null],
[105, "여위황",1228, 0, null, 42, 62, 38, 0, 160, 300, "정복", null],
[145, "여포",1229, 0, null, 74,100, 29, 0, 160, 300, "패권", "돌격", "다 죽여버리겠다! 으하하."],
[ 50, "염우",1230, 0, null, 58, 51, 18, 0, 160, 300, "출세", null],
[ 40, "염유",1231, 0, null, 59, 75, 51, 0, 160, 300, "출세", null],
[ 18, "염포",1232, 0, null, 33, 35, 77, 0, 160, 300, "유지", null],
[ 40, "예형",1233, 0, null, 77, 31, 95, 0, 160, 300, "은둔", "통찰"],
[133, "오강",1234, 0, null, 47, 37, 61, 0, 160, 300, "안전", null],
[ 59, "오란",1235, 0, null, 67, 75, 42, 0, 160, 300, "재간", null],
[ 72, "오반",1236, 0, null, 70, 66, 45, 0, 160, 300, "재간", null],
[128, "오언",1237, 0, null, 71, 60, 52, 0, 160, 300, "재간", null],
[126, "오연",1238, 0, null, 36, 70, 31, 0, 160, 300, "정복", null],
[ 69, "오의",1239, 0, null, 75, 72, 74, 0, 160, 300, "유지", null],
[ 19, "오질",1240, 0, null, 43, 37, 69, 0, 160, 300, "출세", null],
[ 51, "올돌골",1241, 0, null, 77, 92, 15, 0, 160, 300, "출세", "척사"],
[ 52, "옹개",1242, 0, null, 58, 67, 51, 0, 160, 300, "안전", null],
[ 20, "왕경",1243, 0, null, 55, 47, 65, 0, 160, 300, "재간", null],
[ 97, "왕광",1244, 0, null, 72, 67, 54, 0, 160, 300, "유지", null],
[ 30, "왕기1",1245, 0, null, 76, 62, 70, 0, 160, 300, "유지", null],
[ 34, "왕랑",1246, 0, null, 49, 29, 51, 0, 160, 300, "할거", null],
[ 57, "왕루",1247, 0, null, 40, 28, 76, 0, 160, 300, "유지", null],
[ 76, "왕보",1248, 0, null, 47, 34, 75, 0, 160, 300, "대의", null],
[ 86, "왕수",1249, 0, null, 34, 34, 67, 0, 160, 300, "재간", null],
[ 26, "왕쌍",1250, 0, null, 58, 89, 15, 0, 160, 300, "정복", "보병"],
[ 46, "왕위",1251, 0, null, 59, 60, 68, 0, 160, 300, "안전", null],
[ 92, "왕윤",1252, 0, null, 16, 18, 77, 0, 160, 300, "왕좌", null],
[ 40, "왕융",1253, 0, null, 62, 41, 77, 0, 160, 300, "재간", null],
[ 32, "왕준",1254, 0, null, 81, 83, 76, 0, 160, 300, "대의", null],
[ 30, "왕찬",1255, 0, null, 28, 28, 78, 0, 160, 300, "안전", null],
[ 33, "왕창",1256, 0, null, 74, 57, 52, 0, 160, 300, "정복", null],
[ 69, "왕평",1257, 0, null, 77, 76, 71, 0, 160, 300, "재간", null],
[ 71, "왕항",1258, 0, null, 51, 43, 60, 0, 160, 300, "대의", null],
[ 33, "왕혼",1259, 0, null, 69, 32, 59, 0, 160, 300, "정복", null],
[ 71, "요립",1260, 0, null, 65, 41, 84, 0, 160, 300, "출세", null],
[ 74, "요화",1261, 0, null, 67, 58, 60, 0, 160, 300, "의협", null],
[ 22, "우금1",1262, 0, null, 80, 74, 71, 0, 160, 300, "정복", null],
[ 27, "우금2",1263, 0, null, 63, 77, 37, 0, 160, 300, "대의", null],
[122, "우번",1264, 0, null, 23, 42, 73, 0, 160, 300, "유지", null],
[126, "우전",1265, 0, null, 63, 55, 41, 0, 160, 300, "안전", null],
[ 86, "원담",1266, 0, null, 67, 59, 55, 0, 160, 300, "왕좌", null],
[101, "원상",1267, 0, null, 54, 72, 68, 0, 160, 300, "패권", null],
[101, "원소",1268, 0, null, 85, 67, 76, 0, 160, 300, "패권", "위압"],
[140, "원술",1269, 0, null, 77, 59, 71, 0, 160, 300, "패권", "축성"],
[140, "원윤",1270, 0, null, 41, 34, 60, 0, 160, 300, "패권", null],
[101, "원희",1271, 0, null, 69, 57, 72, 0, 160, 300, "할거", null],
[131, "위소",1272, 0, null, 39, 24, 82, 0, 160, 300, "재간", null],
[147, "위속",1273, 0, null, 57, 59, 41, 0, 160, 300, "안전", null],
[ 81, "위연",1274, 0, null, 78, 94, 62, 0, 160, 300, "패권", "보병"],
[ 96, "위유",1275, 0, null, 53, 69, 71, 0, 160, 300, "재간", null],
[ 76, "유기",1276, 0, null, 57, 19, 73, 0, 160, 300, "왕좌", null],
[ 36, "유대",1277, 0, null, 61, 57, 62, 0, 160, 300, "재간", null],
[134, "유도",1278, 0, null, 35, 33, 68, 0, 160, 300, "재간", null],
[ 46, "유벽",1279, 0, null, 63, 71, 23, 0, 160, 300, "출세", null],
[ 75, "유봉",1280, 0, null, 60, 65, 62, 0, 160, 300, "출세", null],
[ 75, "유비",1281, 0, null, 85, 75, 70, 0, 160, 300, "왕좌", "인덕"],
[ 75, "유선1",1282, 0, null, 24, 17, 21, 0, 160, 300, "대의", null],
[ 55, "유순",1283, 0, null, 67, 61, 54, 0, 160, 300, "출세", null],
[ 75, "유심",1284, 0, null, 63, 46, 70, 0, 160, 300, "왕좌", null],
[129, "유약",1285, 0, null, 67, 63, 61, 0, 160, 300, "유지", null],
[ 55, "유언",1286, 0, null, 60, 40, 74, 0, 160, 300, "할거", null],
[ 27, "유엽",1287, 0, null, 40, 29, 79, 0, 160, 300, "유지", null],
[ 11, "유요",1288, 0, null, 23, 22, 48, 0, 160, 300, "안전", "발명"],
[ 96, "유우",1289, 0, null, 68, 34, 72, 0, 160, 300, "왕좌", null],
[ 55, "유장",1290, 0, null, 38, 31, 63, 0, 160, 300, "할거", "수비"],
[ 45, "유종",1291, 0, null, 22, 26, 61, 0, 160, 300, "할거", null],
[ 56, "유파",1292, 0, null, 47, 32, 70, 0, 160, 300, "대의", null],
[ 45, "유표1",1293, 0, null, 71, 57, 71, 0, 160, 300, "할거", null],
[ 27, "유표2",1294, 0, null, 76, 55, 71, 0, 160, 300, "안전", null],
[134, "유현",1295, 0, null, 32, 56, 55, 0, 160, 300, "안전", null],
[122, "육개",1296, 0, null, 66, 30, 72, 0, 160, 300, "재간", null],
[122, "육손",1297, 0, null, 98, 68, 98, 0, 160, 300, "왕좌", "귀병"],
[121, "육적",1298, 0, null, 44, 29, 73, 0, 160, 300, "안전", null],
[122, "육항",1299, 0, null, 95, 69, 94, 0, 160, 300, "왕좌", null],
[ 38, "윤대목",1300, 0, null, 62, 49, 69, 0, 160, 300, "재간", null],
[ 80, "윤묵",1301, 0, null, 19, 28, 73, 0, 160, 300, "대의", null],
[ 72, "윤상",1302, 0, null, 30, 32, 42, 0, 160, 300, "대의", null],
[136, "윤직",1303, 0, null, 44, 58, 63, 0, 160, 300, "재간", null],
[ 2, "이각",1304, 0, null, 56, 77, 43, 0, 160, 300, "패권", null],
[146, "이숙",1305, 0, null, 27, 45, 67, 0, 160, 300, "재간", null],
[ 71, "이엄",1306, 0, null, 80, 84, 81, 0, 160, 300, "패권", null],
[ 2, "이유",1307, 0, null, 64, 22, 90, 0, 160, 300, "패권", "귀모"],
[132, "이이",1308, 0, null, 55, 75, 20, 0, 160, 300, "정복", null],
[ 77, "이적",1309, 0, null, 55, 27, 77, 0, 160, 300, "할거", null],
[ 22, "이전",1310, 0, null, 75, 68, 82, 0, 160, 300, "왕좌", null],
[ 71, "이풍1",1311, 0, null, 59, 56, 62, 0, 160, 300, "재간", null],
[ 66, "이회",1312, 0, null, 67, 50, 79, 0, 160, 300, "유지", null],
[114, "잠혼",1313, 0, null, 15, 16, 44, 0, 160, 300, "할거", null],
[ 7, "장각",1314, 0, null, 93, 25, 93, 0, 160, 300, "패권", "환술"],
[ 34, "장간",1315, 0, null, 19, 20, 70, 0, 160, 300, "재간", null],
[ 7, "장개",1316, 0, null, 48, 69, 19, 0, 160, 300, "안전", null],
[122, "장굉",1317, 0, null, 25, 21, 85, 0, 160, 300, "왕좌", null],
[ 7, "장량",1318, 0, null, 68, 81, 68, 0, 160, 300, "정복", "환술"],
[ 15, "장로",1319, 0, null, 76, 44, 80, 0, 160, 300, "유지", "축성"],
[ 23, "장료",1320, 0, null, 89, 93, 83, 0, 160, 300, "의협", "견고"],
[ 7, "장보",1321, 0, null, 78, 81, 76, 0, 160, 300, "패권", "환술"],
[ 76, "장비",1322, 0, null, 79, 99, 48, 0, 160, 300, "의협", "무쌍", "어쭈. 해보자 이거냐?"],
[ 62, "장서",1323, 0, null, 44, 48, 35, 0, 160, 300, "출세", null],
[120, "장소1",1324, 0, null, 42, 24, 91, 0, 160, 300, "안전", null],
[ 78, "장소2",1325, 0, null, 51, 44, 71, 0, 160, 300, "재간", null],
[ 72, "장송",1326, 0, null, 49, 28, 93, 0, 160, 300, "할거", "통찰"],
[148, "장수",1327, 0, null, 71, 72, 69, 0, 160, 300, "할거", null],
[145, "장양1",1328, 0, null, 62, 66, 65, 0, 160, 300, "출세", null],
[ 8, "장연",1329, 0, null, 78, 66, 47, 0, 160, 300, "안전", null],
[ 11, "장영",1330, 0, null, 55, 65, 40, 0, 160, 300, "재간", null],
[118, "장온",1331, 0, null, 21, 30, 69, 0, 160, 300, "할거", null],
[ 78, "장완",1332, 0, null, 70, 55, 86, 0, 160, 300, "할거", "상재"],
[ 15, "장위",1333, 0, null, 65, 70, 29, 0, 160, 300, "대의", null],
[ 36, "장윤",1334, 0, null, 67, 59, 60, 0, 160, 300, "정복", null],
[104, "장의거",1335, 0, null, 68, 59, 34, 0, 160, 300, "대의", null],
[ 68, "장익",1336, 0, null, 75, 68, 63, 0, 160, 300, "유지", null],
[ 56, "장임",1337, 0, null, 83, 82, 74, 0, 160, 300, "대의", "견고"],
[148, "장제1",1338, 0, null, 70, 65, 59, 0, 160, 300, "할거", null],
[ 32, "장제2",1339, 0, null, 30, 33, 84, 0, 160, 300, "유지", null],
[126, "장제3",1340, 0, null, 74, 49, 61, 0, 160, 300, "할거", null],
[ 17, "장패",1341, 0, null, 44, 78, 43, 0, 160, 300, "할거", null],
[ 76, "장포1",1342, 0, null, 69, 85, 49, 0, 160, 300, "재간", "징병"],
[113, "장포2",1343, 0, null, 63, 66, 51, 0, 160, 300, "유지", null],
[ 27, "장합",1344, 0, null, 83, 91, 63, 0, 160, 300, "출세", "궁병"],
[ 23, "장호",1345, 0, null, 56, 62, 54, 0, 160, 300, "정복", null],
[ 31, "장화",1346, 0, null, 49, 24, 86, 0, 160, 300, "유지", null],
[ 48, "장횡",1347, 0, null, 53, 67, 25, 0, 160, 300, "재간", null],
[141, "장훈",1348, 0, null, 67, 61, 60, 0, 160, 300, "안전", null],
[120, "장휴",1349, 0, null, 42, 35, 70, 0, 160, 300, "재간", null],
[126, "장흠",1350, 0, null, 64, 66, 67, 0, 160, 300, "대의", "저격"],
[ 96, "저수",1351, 0, null, 82, 54, 88, 0, 160, 300, "할거", "반계"],
[130, "전단",1352, 0, null, 64, 73, 61, 0, 160, 300, "출세", null],
[ 42, "전속",1353, 0, null, 66, 57, 49, 0, 160, 300, "안전", null],
[ 26, "전위1",1354, 0, null, 61, 96, 34, 0, 160, 300, "의협", "필살"],
[130, "전위2",1355, 0, null, 74, 69, 62, 0, 160, 300, "출세", null],
[128, "전종",1356, 0, null, 79, 77, 74, 0, 160, 300, "패권", null],
[ 42, "전주",1357, 0, null, 69, 67, 51, 0, 160, 300, "의협", null],
[ 96, "전풍",1358, 0, null, 81, 41, 96, 0, 160, 300, "왕좌", null],
[ 24, "정무",1359, 0, null, 54, 38, 74, 0, 160, 300, "출세", null],
[119, "정병",1360, 0, null, 22, 25, 67, 0, 160, 300, "유지", null],
[126, "정보",1361, 0, null, 81, 64, 76, 0, 160, 300, "패권", null],
[123, "정봉1",1362, 0, null, 70, 77, 64, 0, 160, 300, "패권", null],
[ 24, "정욱",1363, 0, null, 80, 39, 90, 0, 160, 300, "패권", "신중"],
[ 88, "정원",1364, 0, null, 64, 77, 58, 0, 160, 300, "왕좌", "기병"],
[ 7, "정원지",1365, 0, null, 41, 74, 38, 0, 160, 300, "출세", null],
[ 69, "정은",1366, 0, null, 53, 62, 26, 0, 160, 300, "재간", null],
[121, "제갈각",1367, 0, null, 61, 53, 92, 0, 160, 300, "왕좌", null],
[ 76, "제갈균",1368, 0, null, 59, 45, 74, 0, 160, 300, "안전", "상재"],
[121, "제갈근",1369, 0, null, 60, 42, 88, 0, 160, 300, "왕좌", "경작"],
[ 76, "제갈량",1370, 0, null, 97, 55,100, 0, 160, 300, "왕좌", "집중", "슬슬 나의 지모를 발휘해 보겠습니다..."],
[ 76, "제갈상",1371, 0, null, 52, 75, 71, 0, 160, 300, "대의", null],
[135, "제갈정",1372, 0, null, 56, 57, 54, 0, 160, 300, "안전", null],
[ 76, "제갈첨",1373, 0, null, 73, 52, 76, 0, 160, 300, "대의", null],
[135, "제갈탄",1374, 0, null, 79, 79, 73, 0, 160, 300, "패권", null],
[ 76, "조광",1375, 0, null, 65, 67, 54, 0, 160, 300, "재간", null],
[ 74, "조루",1376, 0, null, 49, 37, 60, 0, 160, 300, "대의", null],
[ 24, "조모",1377, 0, null, 53, 32, 30, 0, 160, 300, "할거", null],
[127, "조무",1378, 0, null, 71, 68, 71, 0, 160, 300, "의협", null],
[ 26, "조방",1379, 0, null, 50, 20, 31, 0, 160, 300, "정복", null],
[ 83, "조범",1380, 0, null, 58, 40, 63, 0, 160, 300, "유지", null],
[ 26, "조비",1381, 0, null, 72, 69, 75, 0, 160, 300, "패권", "징병"],
[ 19, "조상",1382, 0, null, 68, 62, 31, 0, 160, 300, "패권", null],
[147, "조성",1383, 0, null, 44, 69, 51, 0, 160, 300, "안전", null],
[ 26, "조순",1384, 0, null, 66, 57, 72, 0, 160, 300, "정복", null],
[ 25, "조식",1385, 0, null, 19, 19, 90, 0, 160, 300, "왕좌", "귀모"],
[ 25, "조앙",1386, 0, null, 44, 65, 62, 0, 160, 300, "왕좌", null],
[ 25, "조예",1387, 0, null, 57, 55, 82, 0, 160, 300, "정복", null],
[ 26, "조우",1388, 0, null, 67, 55, 67, 0, 160, 300, "대의", null],
[ 76, "조운",1389, 0, null, 95, 98, 87, 0, 160, 300, "왕좌", "무쌍", "창술의 달인 상산 조자룡 여기 있소!"],
[ 25, "조웅",1390, 0, null, 59, 27, 44, 0, 160, 300, "안전", null],
[ 26, "조인",1391, 0, null, 74, 79, 62, 0, 160, 300, "패권", "보병"],
[ 25, "조조",1392, 0, null,100, 80, 95, 0, 160, 300, "패권", "반계"],
[ 26, "조진",1393, 0, null, 82, 67, 65, 0, 160, 300, "정복", null],
[ 25, "조창",1394, 0, null, 75, 88, 37, 0, 160, 300, "정복", "돌격"],
[ 76, "조통",1395, 0, null, 65, 64, 55, 0, 160, 300, "재간", null],
[ 84, "조표",1396, 0, null, 34, 70, 16, 0, 160, 300, "안전", null],
[ 7, "조홍1",1397, 0, null, 52, 66, 42, 0, 160, 300, "유지", null],
[ 24, "조홍2",1398, 0, null, 72, 69, 44, 0, 160, 300, "패권", null],
[ 26, "조환",1399, 0, null, 34, 24, 42, 0, 160, 300, "정복", null],
[ 19, "조훈",1400, 0, null, 67, 63, 30, 0, 160, 300, "출세", null],
[ 26, "조휴",1401, 0, null, 75, 71, 70, 0, 160, 300, "패권", null],
[ 19, "조희",1402, 0, null, 64, 57, 71, 0, 160, 300, "대의", null],
[ 22, "종요",1403, 0, null, 16, 20, 74, 0, 160, 300, "유지", null],
[ 20, "종회",1404, 0, null, 84, 58, 93, 0, 160, 300, "패권", null],
[128, "주거",1405, 0, null, 73, 71, 72, 0, 160, 300, "유지", null],
[118, "주방",1406, 0, null, 56, 36, 76, 0, 160, 300, "할거", null],
[126, "주연",1407, 0, null, 73, 72, 51, 0, 160, 300, "할거", null],
[126, "주유",1408, 0, null, 97, 73, 97, 0, 160, 300, "패권", "신산"],
[128, "주이",1409, 0, null, 61, 55, 61, 0, 160, 300, "안전", null],
[ 88, "주준",1410, 0, null, 82, 75, 65, 0, 160, 300, "왕좌", null],
[ 32, "주지",1411, 0, null, 52, 77, 47, 0, 160, 300, "안전", null],
[ 76, "주창",1412, 0, null, 42, 79, 30, 0, 160, 300, "의협", "궁병"],
[126, "주치",1413, 0, null, 58, 55, 56, 0, 160, 300, "안전", null],
[ 41, "주태1",1414, 0, null, 62, 55, 61, 0, 160, 300, "안전", null],
[126, "주태2",1415, 0, null, 74, 88, 60, 0, 160, 300, "정복", "필살"],
[128, "주환",1416, 0, null, 84, 86, 74, 0, 160, 300, "정복", null],
[ 29, "진건",1417, 0, null, 62, 70, 62, 0, 160, 300, "정복", null],
[ 29, "진교",1418, 0, null, 21, 25, 67, 0, 160, 300, "유지", null],
[ 28, "진군",1419, 0, null, 60, 38, 87, 0, 160, 300, "대의", null],
[143, "진궁",1420, 0, null, 77, 51, 90, 0, 160, 300, "할거", "신중"],
[ 79, "진규",1421, 0, null, 22, 19, 71, 0, 160, 300, "할거", null],
[ 72, "진도",1422, 0, null, 71, 85, 70, 0, 160, 300, "대의", null],
[ 79, "진등",1423, 0, null, 64, 62, 71, 0, 160, 300, "할거", null],
[ 37, "진림",1424, 0, null, 50, 28, 82, 0, 160, 300, "재간", null],
[124, "진무",1425, 0, null, 62, 74, 59, 0, 160, 300, "재간", null],
[ 66, "진복",1426, 0, null, 36, 27, 76, 0, 160, 300, "재간", null],
[ 50, "진수",1427, 0, null, 25, 29, 83, 0, 160, 300, "대의", null],
[ 81, "진식",1428, 0, null, 47, 68, 52, 0, 160, 300, "출세", null],
[ 79, "진진",1429, 0, null, 58, 38, 64, 0, 160, 300, "재간", null],
[ 28, "진태",1430, 0, null, 79, 76, 70, 0, 160, 300, "대의", null],
[ 11, "진횡",1431, 0, null, 38, 58, 47, 0, 160, 300, "출세", null],
[ 21, "차주",1432, 0, null, 55, 66, 62, 0, 160, 300, "안전", null],
[ 11, "착융",1433, 0, null, 62, 59, 21, 0, 160, 300, "출세", null],
[ 36, "채모",1434, 0, null, 79, 69, 68, 0, 160, 300, "정복", "궁병"],
[ 36, "채중",1435, 0, null, 58, 43, 55, 0, 160, 300, "출세", null],
[ 36, "채화",1436, 0, null, 56, 47, 49, 0, 160, 300, "안전", null],
[ 66, "초주",1437, 0, null, 22, 26, 81, 0, 160, 300, "대의", null],
[ 20, "최염",1438, 0, null, 43, 54, 67, 0, 160, 300, "대의", null],
[ 60, "축융",1439, 0, null, 59, 87, 25, 0, 160, 300, "정복", "척사"],
[ 60, "타사대왕",1440, 0, null, 61, 72, 67, 0, 160, 300, "출세", "척사"],
[124, "태사자",1441, 0, null, 71, 97, 65, 0, 160, 300, "대의", "무쌍"],
[124, "태사향",1442, 0, null, 51, 69, 50, 0, 160, 300, "재간", null],
[ 12, "포륭",1443, 0, null, 53, 74, 20, 0, 160, 300, "안전", null],
[ 74, "풍습",1444, 0, null, 36, 64, 44, 0, 160, 300, "재간", null],
[ 7, "하의",1445, 0, null, 49, 68, 25, 0, 160, 300, "출세", null],
[121, "하제",1446, 0, null, 74, 73, 64, 0, 160, 300, "재간", null],
[ 90, "하진",1447, 0, null, 49, 69, 37, 0, 160, 300, "왕좌", null],
[ 24, "하후덕",1448, 0, null, 67, 64, 39, 0, 160, 300, "출세", null],
[ 26, "하후돈",1449, 0, null, 88, 92, 71, 0, 160, 300, "의협", "돌격", "다 나오거라! 상대해 주마!"],
[ 19, "하후무",1450, 0, null, 38, 33, 37, 0, 160, 300, "안전", null],
[ 24, "하후상",1451, 0, null, 67, 62, 71, 0, 160, 300, "출세", null],
[ 26, "하후연",1452, 0, null, 79, 90, 58, 0, 160, 300, "패권", "궁병", "궁술로 날 당해낼 자가 있을까? 후후."],
[ 26, "하후위",1453, 0, null, 73, 76, 71, 0, 160, 300, "정복", null],
[ 26, "하후은",1454, 0, null, 49, 51, 39, 0, 160, 300, "안전", null],
[ 23, "하후패",1455, 0, null, 78, 88, 69, 0, 160, 300, "대의", null],
[ 20, "하후현",1456, 0, null, 57, 23, 75, 0, 160, 300, "유지", null],
[ 26, "하후혜",1457, 0, null, 76, 66, 78, 0, 160, 300, "정복", null],
[ 26, "하후화",1458, 0, null, 77, 61, 80, 0, 160, 300, "정복", null],
[ 22, "학소",1459, 0, null, 89, 81, 86, 0, 160, 300, "대의", "견고"],
[126, "한당",1460, 0, null, 68, 67, 64, 0, 160, 300, "할거", null],
[ 93, "한복",1461, 0, null, 66, 59, 42, 0, 160, 300, "안전", null],
[ 8, "한섬",1462, 0, null, 39, 62, 35, 0, 160, 300, "출세", null],
[ 48, "한수",1463, 0, null, 66, 76, 77, 0, 160, 300, "대의", "기병"],
[ 40, "한숭",1464, 0, null, 21, 25, 70, 0, 160, 300, "재간", null],
[ 7, "한충",1465, 0, null, 41, 66, 29, 0, 160, 300, "안전", null],
[ 9, "한현",1466, 0, null, 43, 61, 20, 0, 160, 300, "유지", null],
[ 27, "한호",1467, 0, null, 60, 73, 45, 0, 160, 300, "유지", null],
[ 79, "향랑",1468, 0, null, 51, 21, 77, 0, 160, 300, "대의", null],
[ 79, "향총",1469, 0, null, 76, 42, 73, 0, 160, 300, "왕좌", null],
[139, "허공",1470, 0, null, 65, 63, 59, 0, 160, 300, "유지", null],
[ 21, "허유",1471, 0, null, 47, 47, 57, 0, 160, 300, "재간", null],
[ 23, "허의",1472, 0, null, 31, 74, 47, 0, 160, 300, "출세", null],
[ 26, "허저",1473, 0, null, 57, 98, 27, 0, 160, 300, "정복", "무쌍"],
[ 87, "허정",1474, 0, null, 18, 29, 74, 0, 160, 300, "재간", null],
[ 12, "형도영",1475, 0, null, 49, 78, 23, 0, 160, 300, "출세", null],
[148, "호거아",1476, 0, null, 35, 76, 61, 0, 160, 300, "안전", null],
[ 76, "호반",1477, 0, null, 61, 58, 46, 0, 160, 300, "재간", null],
[ 20, "호분",1478, 0, null, 71, 60, 61, 0, 160, 300, "할거", null],
[ 27, "호주천",1479, 0, null, 77, 75, 65, 0, 160, 300, "정복", null],
[ 20, "호준",1480, 0, null, 67, 60, 46, 0, 160, 300, "재간", null],
[ 2, "화웅",1481, 0, null, 68, 88, 24, 0, 160, 300, "출세", "돌격"],
[131, "화핵",1482, 0, null, 37, 27, 75, 0, 160, 300, "안전", null],
[ 10, "화흠",1483, 0, null, 18, 43, 75, 0, 160, 300, "출세", null],
[ 21, "환범",1484, 0, null, 20, 25, 81, 0, 160, 300, "유지", null],
[127, "황개",1485, 0, null, 78, 85, 69, 0, 160, 300, "왕좌", "징병"],
[ 56, "황권",1486, 0, null, 76, 46, 77, 0, 160, 300, "대의", null],
[ 41, "황란",1487, 0, null, 29, 70, 25, 0, 160, 300, "재간", null],
[ 88, "황보숭",1488, 0, null, 83, 63, 73, 0, 160, 300, "왕좌", null],
[ 72, "황충",1489, 0, null, 84, 94, 67, 0, 160, 300, "왕좌", "궁병"],
[ 50, "황호",1490, 0, null, 15, 17, 48, 0, 160, 300, "안전", null],
[147, "후성",1491, 0, null, 56, 62, 33, 0, 160, 300, "정복", null]
],
"general_ex":[
[123, "가화",1492, 0, null, 50, 66, 40, 0, 160, 300, null, null],
[999, "건석",1493, 0, null, 21, 12, 61, 0, 160, 300, null, null],
[999, "견씨",1494, 0, null, 35, 24, 58, 0, 160, 300, null, null],
[ 40, "견홍",1495, 0, null, 76, 72, 66, 0, 160, 300, null, null],
[120, "고담",1496, 0, null, 33, 21, 69, 0, 160, 300, null, null],
[101, "고유",1497, 0, null, 56, 44, 73, 0, 160, 300, null, null],
[132, "곽마",1498, 0, null, 68, 71, 49, 0, 160, 300, null, null],
[ 39, "관구수",1499, 0, null, 58, 63, 35, 0, 160, 300, null, null],
[ 39, "관구전",1500, 0, null, 63, 58, 68, 0, 160, 300, null, null],
[999, "관로",1501, 0, null, 62, 21, 75, 0, 160, 300, null, null],
[ 65, "관정",1502, 0, null, 35, 50, 73, 0, 160, 300, null, null],
[137, "교수",1503, 0, null, 67, 69, 39, 0, 160, 300, null, null],
[ 33, "구건",1504, 0, null, 43, 56, 69, 0, 160, 300, null, null],
[ 41, "구본",1505, 0, null, 52, 41, 70, 0, 160, 300, null, null],
[ 12, "구성",1506, 0, null, 56, 71, 31, 0, 160, 300, null, null],
[ 21, "국연",1507, 0, null, 52, 21, 71, 0, 160, 300, null, null],
[ 99, "국의",1508, 0, null, 83, 79, 50, 0, 160, 300, null, null],
[ 34, "금의",1509, 0, null, 18, 40, 63, 0, 160, 300, null, null],
[ 76, "나헌",1510, 0, null, 86, 67, 75, 0, 160, 300, null, null],
[999, "남두",1511, 0, null, 35, 25, 54, 0, 160, 300, null, null],
[ 54, "냉포",1512, 0, null, 70, 82, 69, 0, 160, 300, null, null],
[124, "노숙2",1513, 0, null, 70, 55, 76, 0, 160, 300, null, null],
[ 42, "누규",1514, 0, null, 54, 19, 88, 0, 160, 300, null, null],
[ 6, "누반",1515, 0, null, 65, 76, 39, 0, 160, 300, null, null],
[130, "누현",1516, 0, null, 23, 20, 68, 0, 160, 300, null, null],
[ 40, "당균",1517, 0, null, 33, 19, 81, 0, 160, 300, null, null],
[ 32, "당빈",1518, 0, null, 70, 74, 62, 0, 160, 300, null, null],
[999, "대교",1519, 0, null, 42, 10, 54, 0, 160, 300, null, null],
[ 28, "대릉",1520, 0, null, 64, 75, 45, 0, 160, 300, null, null],
[129, "동조",1521, 0, null, 16, 15, 51, 0, 160, 300, null, null],
[114, "등수",1522, 0, null, 35, 20, 44, 0, 160, 300, null, null],
[ 50, "마막",1523, 0, null, 22, 17, 5, 0, 160, 300, null, null],
[116, "만욱",1524, 0, null, 20, 18, 66, 0, 160, 300, null, null],
[120, "맹종",1525, 0, null, 48, 48, 67, 0, 160, 300, null, null],
[ 38, "문호",1526, 0, null, 65, 74, 45, 0, 160, 300, null, null],
[999, "미씨",1527, 0, null, 59, 15, 68, 0, 160, 300, null, null],
[ 39, "반림",1528, 0, null, 66, 79, 8, 0, 160, 300, null, null],
[129, "반장",1529, 0, null, 77, 78, 69, 0, 160, 300, null, null],
[ 94, "방열",1530, 0, null, 58, 82, 28, 0, 160, 300, null, null],
[ 55, "방희",1531, 0, null, 59, 38, 69, 0, 160, 300, null, null],
[ 30, "배수",1532, 0, null, 10, 11, 77, 0, 160, 300, null, null],
[ 8, "번능",1533, 0, null, 70, 61, 47, 0, 160, 300, null, null],
[999, "번씨",1534, 0, null, 32, 17, 45, 0, 160, 300, null, null],
[ 49, "보도근",1535, 0, null, 64, 73, 50, 0, 160, 300, null, null],
[129, "보천",1536, 0, null, 68, 60, 72, 0, 160, 300, null, null],
[121, "보협",1537, 0, null, 73, 53, 75, 0, 160, 300, null, null],
[ 28, "부하",1538, 0, null, 44, 36, 85, 0, 160, 300, null, null],
[ 26, "비요",1539, 0, null, 70, 65, 73, 0, 160, 300, null, null],
[ 31, "사마주",1540, 0, null, 63, 53, 62, 0, 160, 300, null, null],
[ 41, "사찬",1541, 0, null, 61, 71, 54, 0, 160, 300, null, null],
[128, "설후",1542, 0, null, 16, 14, 71, 0, 160, 300, null, null],
[ 36, "성공영",1543, 0, null, 73, 58, 80, 0, 160, 300, null, null],
[126, "성만",1544, 0, null, 61, 69, 66, 0, 160, 300, null, null],
[999, "소교",1545, 0, null, 57, 23, 66, 0, 160, 300, null, null],
[ 46, "소유",1546, 0, null, 51, 61, 48, 0, 160, 300, null, null],
[ 31, "소제2",1547, 0, null, 22, 16, 78, 0, 160, 300, null, null],
[126, "손교",1548, 0, null, 77, 60, 69, 0, 160, 300, null, null],
[116, "손기",1549, 0, null, 62, 65, 52, 0, 160, 300, null, null],
[999, "손상향",1550, 0, null, 72, 62, 42, 0, 160, 300, null, null],
[125, "손익",1551, 0, null, 69, 75, 26, 0, 160, 300, null, null],
[125, "손진",1552, 0, null, 64, 71, 48, 0, 160, 300, null, null],
[123, "송겸",1553, 0, null, 61, 48, 44, 0, 160, 300, null, null],
[ 85, "순심",1554, 0, null, 20, 21, 79, 0, 160, 300, null, null],
[ 31, "순욱2",1555, 0, null, 10, 16, 77, 0, 160, 300, null, null],
[ 31, "순의",1556, 0, null, 16, 11, 73, 0, 160, 300, null, null],
[129, "시삭",1557, 0, null, 36, 66, 44, 0, 160, 300, null, null],
[ 29, "신창",1558, 0, null, 51, 29, 46, 0, 160, 300, null, null],
[999, "악신",1559, 0, null, 53, 12, 46, 0, 160, 300, null, null],
[138, "악취",1560, 0, null, 56, 68, 58, 0, 160, 300, null, null],
[138, "양강",1561, 0, null, 62, 70, 42, 0, 160, 300, null, null],
[ 21, "양부",1562, 0, null, 68, 55, 85, 0, 160, 300, null, null],
[ 72, "양서",1563, 0, null, 56, 62, 66, 0, 160, 300, null, null],
[ 34, "양습",1564, 0, null, 67, 49, 73, 0, 160, 300, null, null],
[ 16, "양앙",1565, 0, null, 65, 70, 39, 0, 160, 300, null, null],
[ 17, "양임",1566, 0, null, 71, 78, 56, 0, 160, 300, null, null],
[ 32, "양제",1567, 0, null, 69, 63, 71, 0, 160, 300, null, null],
[ 33, "양조2",1568, 0, null, 65, 61, 67, 0, 160, 300, null, null],
[ 48, "양추2",1569, 0, null, 66, 67, 61, 0, 160, 300, null, null],
[140, "양홍",1570, 0, null, 19, 17, 76, 0, 160, 300, null, null],
[ 31, "양혼",1571, 0, null, 60, 67, 63, 0, 160, 300, null, null],
[123, "여거",1572, 0, null, 71, 58, 69, 0, 160, 300, null, null],
[130, "여대",1573, 0, null, 83, 72, 70, 0, 160, 300, null, null],
[136, "염상",1574, 0, null, 29, 27, 69, 0, 160, 300, null, null],
[ 36, "염행",1575, 0, null, 70, 86, 38, 0, 160, 300, null, null],
[ 73, "영수",1576, 0, null, 69, 70, 74, 0, 160, 300, null, null],
[ 39, "오거",1577, 0, null, 49, 63, 32, 0, 160, 300, null, null],
[126, "오경",1578, 0, null, 73, 60, 57, 0, 160, 300, null, null],
[999, "오국태",1579, 0, null, 31, 11, 60, 0, 160, 300, null, null],
[126, "오찬",1580, 0, null, 69, 41, 78, 0, 160, 300, null, null],
[ 23, "온회",1581, 0, null, 42, 40, 78, 0, 160, 300, null, null],
[ 21, "왕기2",1582, 0, null, 70, 66, 63, 0, 160, 300, null, null],
[ 32, "왕도",1583, 0, null, 48, 44, 70, 0, 160, 300, null, null],
[123, "왕돈",1584, 0, null, 60, 65, 41, 0, 160, 300, null, null],
[ 34, "왕릉",1585, 0, null, 73, 60, 71, 0, 160, 300, null, null],
[ 63, "왕문",1586, 0, null, 64, 67, 32, 0, 160, 300, null, null],
[ 32, "왕상",1587, 0, null, 25, 19, 65, 0, 160, 300, null, null],
[ 34, "왕숙",1588, 0, null, 35, 21, 80, 0, 160, 300, null, null],
[ 33, "왕업",1589, 0, null, 32, 6, 46, 0, 160, 300, null, null],
[ 35, "왕충",1590, 0, null, 42, 58, 21, 0, 160, 300, null, null],
[ 1, "우보",1591, 0, null, 43, 63, 12, 0, 160, 300, null, null],
[122, "우사",1592, 0, null, 70, 33, 79, 0, 160, 300, null, null],
[138, "원요",1593, 0, null, 44, 42, 45, 0, 160, 300, null, null],
[ 95, "원유",1594, 0, null, 57, 38, 73, 0, 160, 300, null, null],
[ 31, "위관",1595, 0, null, 69, 45, 81, 0, 160, 300, null, null],
[129, "위막",1596, 0, null, 58, 62, 60, 0, 160, 300, null, null],
[ 55, "유괴",1597, 0, null, 75, 72, 66, 0, 160, 300, null, null],
[129, "유략",1598, 0, null, 72, 68, 59, 0, 160, 300, null, null],
[ 45, "유반",1599, 0, null, 74, 79, 48, 0, 160, 300, null, null],
[ 29, "유복",1600, 0, null, 54, 50, 73, 0, 160, 300, null, null],
[ 78, "유선2",1601, 0, null, 9, 21, 39, 0, 160, 300, null, null],
[139, "유섭",1602, 0, null, 62, 79, 26, 0, 160, 300, null, null],
[ 28, "유소",1603, 0, null, 66, 51, 73, 0, 160, 300, null, null],
[128, "유승",1604, 0, null, 46, 69, 29, 0, 160, 300, null, null],
[129, "유찬",1605, 0, null, 74, 75, 66, 0, 160, 300, null, null],
[129, "유평",1606, 0, null, 65, 70, 67, 0, 160, 300, null, null],
[138, "유훈",1607, 0, null, 51, 64, 50, 0, 160, 300, null, null],
[ 48, "이감",1608, 0, null, 59, 67, 33, 0, 160, 300, null, null],
[ 19, "이승",1609, 0, null, 13, 26, 32, 0, 160, 300, null, null],
[ 22, "이통",1610, 0, null, 75, 84, 52, 0, 160, 300, null, null],
[138, "이풍2",1611, 0, null, 72, 77, 50, 0, 160, 300, null, null],
[ 20, "이풍3",1612, 0, null, 23, 25, 71, 0, 160, 300, null, null],
[ 29, "장구",1613, 0, null, 69, 71, 47, 0, 160, 300, null, null],
[ 21, "장기",1614, 0, null, 77, 35, 79, 0, 160, 300, null, null],
[ 74, "장남",1615, 0, null, 71, 64, 38, 0, 160, 300, null, null],
[100, "장막",1616, 0, null, 53, 52, 70, 0, 160, 300, null, null],
[ 7, "장만성",1617, 0, null, 73, 83, 47, 0, 160, 300, null, null],
[135, "장반",1618, 0, null, 56, 73, 66, 0, 160, 300, null, null],
[ 78, "장빈",1619, 0, null, 30, 28, 67, 0, 160, 300, null, null],
[124, "장승",1620, 0, null, 75, 68, 75, 0, 160, 300, null, null],
[999, "장양2",1621, 0, null, 58, 50, 47, 0, 160, 300, null, null],
[ 68, "장억",1622, 0, null, 82, 80, 54, 0, 160, 300, null, null],
[ 75, "장준",1623, 0, null, 65, 67, 66, 0, 160, 300, null, null],
[ 20, "장집",1624, 0, null, 31, 27, 74, 0, 160, 300, null, null],
[ 39, "장특",1625, 0, null, 71, 53, 74, 0, 160, 300, null, null],
[ 96, "저곡",1626, 0, null, 57, 53, 67, 0, 160, 300, null, null],
[128, "전기",1627, 0, null, 51, 69, 55, 0, 160, 300, null, null],
[ 23, "전만",1628, 0, null, 52, 74, 38, 0, 160, 300, null, null],
[128, "전상",1629, 0, null, 5, 6, 11, 0, 160, 300, null, null],
[130, "전역",1630, 0, null, 60, 62, 37, 0, 160, 300, null, null],
[ 75, "전예",1631, 0, null, 80, 62, 83, 0, 160, 300, null, null],
[ 64, "전해",1632, 0, null, 71, 63, 57, 0, 160, 300, null, null],
[123, "정봉2",1633, 0, null, 67, 68, 52, 0, 160, 300, null, null],
[ 22, "정의",1634, 0, null, 17, 3, 66, 0, 160, 300, null, null],
[ 81, "제갈교",1635, 0, null, 55, 17, 77, 0, 160, 300, null, null],
[ 40, "제갈서",1636, 0, null, 45, 43, 27, 0, 160, 300, null, null],
[ 25, "조충",1637, 0, null, 14, 7, 80, 0, 160, 300, null, null],
[121, "종리목",1638, 0, null, 84, 68, 75, 0, 160, 300, null, null],
[ 22, "종육",1639, 0, null, 27, 11, 71, 0, 160, 300, null, null],
[122, "좌혁",1640, 0, null, 60, 66, 51, 0, 160, 300, null, null],
[ 36, "주령",1641, 0, null, 77, 70, 69, 0, 160, 300, null, null],
[115, "주앙",1642, 0, null, 75, 64, 64, 0, 160, 300, null, null],
[ 52, "주포",1643, 0, null, 59, 72, 12, 0, 160, 300, null, null],
[ 11, "주흔",1644, 0, null, 67, 53, 77, 0, 160, 300, null, null],
[140, "진기",1645, 0, null, 58, 67, 46, 0, 160, 300, null, null],
[142, "진란",1646, 0, null, 65, 70, 43, 0, 160, 300, null, null],
[ 25, "진랑",1647, 0, null, 57, 70, 38, 0, 160, 300, null, null],
[ 12, "진응",1648, 0, null, 62, 69, 49, 0, 160, 300, null, null],
[124, "진표",1649, 0, null, 62, 49, 74, 0, 160, 300, null, null],
[999, "채염",1650, 0, null, 40, 22, 64, 0, 160, 300, null, null],
[999, "초선",1651, 0, null, 66, 15, 72, 0, 160, 300, null, null],
[135, "초이",1652, 0, null, 54, 65, 55, 0, 160, 300, null, null],
[ 65, "추단",1653, 0, null, 63, 71, 36, 0, 160, 300, null, null],
[999, "추씨",1654, 0, null, 36, 13, 54, 0, 160, 300, null, null],
[ 71, "추정",1655, 0, null, 67, 65, 66, 0, 160, 300, null, null],
[145, "파재",1656, 0, null, 69, 75, 52, 0, 160, 300, null, null],
[ 22, "포신",1657, 0, null, 78, 60, 83, 0, 160, 300, null, null],
[114, "하식",1658, 0, null, 18, 38, 29, 0, 160, 300, null, null],
[ 36, "하안",1659, 0, null, 6, 27, 72, 0, 160, 300, null, null],
[999, "하후씨",1660, 0, null, 29, 16, 47, 0, 160, 300, null, null],
[ 5, "학맹",1661, 0, null, 57, 66, 41, 0, 160, 300, null, null],
[ 98, "한거자",1662, 0, null, 53, 59, 30, 0, 160, 300, null, null],
[ 19, "한덕",1663, 0, null, 62, 79, 24, 0, 160, 300, null, null],
[140, "한윤",1664, 0, null, 27, 24, 68, 0, 160, 300, null, null],
[999, "허소",1665, 0, null, 53, 27, 60, 0, 160, 300, null, null],
[ 30, "호열",1666, 0, null, 77, 69, 76, 0, 160, 300, null, null],
[ 76, "호제",1667, 0, null, 58, 42, 68, 0, 160, 300, null, null],
[149, "호진",1668, 0, null, 65, 77, 13, 0, 160, 300, null, null],
[ 29, "호질",1669, 0, null, 73, 50, 75, 0, 160, 300, null, null],
[ 7, "환계",1670, 0, null, 12, 25, 67, 0, 160, 300, null, null],
[ 56, "황숭",1671, 0, null, 68, 64, 74, 0, 160, 300, null, null],
[999, "황승언",1672, 0, null, 68, 17, 81, 0, 160, 300, null, null],
[999, "황월영",1673, 0, null, 58, 14, 75, 0, 160, 300, null, null],
[ 45, "황조",1674, 0, null, 74, 65, 57, 0, 160, 300, null, null],
[ 48, "후선",1675, 0, null, 56, 66, 35, 0, 160, 300, null, null],
[ 8, "휴고",1676, 0, null, 61, 72, 40, 0, 160, 300, null, null],
[ 98, "휴원진",1677, 0, null, 53, 63, 38, 0, 160, 300, null, null],
[ 22, "희지재",1678, 0, null, 24, 5, 86, 0, 160, 300, null, null]
],
"cities":[
],
"history":[
"<C>●</>180년 1월:<L><b>【이벤트】</b></>당대의 대표 세력들이 등장합니다."
],
"initialEvents":[
],
"events":[
]
}
@@ -1,5 +1,5 @@
{
"title":"【가상모드1】 영웅 집결",
"title":"【가상모드2】 영웅 집결",
"life":1,
"fiction":1,
"nation":[
@@ -1,5 +1,5 @@
{
"title":"【가상모드2】 훼신 집결",
"title":"【가상모드3】 훼신 집결",
"life":1,
"fiction":1,
"nation":[
@@ -1,5 +1,5 @@
{
"title":"【가상모드3】 영웅 시대",
"title":"【가상모드4】 영웅 시대",
"life":1,
"fiction":1,
"nation":[
@@ -1,5 +1,5 @@
{
"title":"【가상모드4】 결사항전",
"title":"【가상모드5】 결사항전",
"life":1,
"fiction":1,
"nation":[
@@ -1,5 +1,5 @@
{
"title":"【가상모드5】 영웅독존",
"title":"【가상모드6】 영웅독존",
"life":1,
"fiction":1,
"nation":[
@@ -1,5 +1,5 @@
{
"title":"【가상모드6】 무풍지대",
"title":"【가상모드7】 무풍지대",
"life":1,
"fiction":1,
"nation":[
@@ -1,5 +1,5 @@
{
"title":"【가상모드7】 가요대잔치",
"title":"【가상모드8】 가요대잔치",
"life":1,
"fiction":1,
"nation":[
@@ -1,5 +1,5 @@
{
"title":"【가상모드8】 확산성 밀리언 아서",
"title":"【가상모드9】 확산성 밀리언 아서",
"life":1,
"fiction":1,
"nation":[
@@ -1,5 +1,5 @@
{
"title":"【가상모드9-a】 천인 강림",
"title":"【가상모드10-a】 천인 강림",
"life":1,
"fiction":1,
"nation":[
@@ -1,5 +1,5 @@
{
"title":"【가상모드9-b】 천인 강림·극",
"title":"【가상모드10-b】 천인 강림·극",
"life":1,
"fiction":1,
"nation":[
@@ -1,5 +1,5 @@
{
"title":"【가상모드11】 삼국지11 영웅 난무",
"title":"【가상모드12】 삼국지11 영웅 난무",
"life":1,
"fiction":1,
"nation":[

Some files were not shown because too many files have changed in this diff Show More