【이벤트】>병기로 싸운다! 최고의 충차 지휘관을 가린다"
+ ],
+ "initialEvents":[
+ [
+ true,
+ ["ChangeCity", "free", {
+ "pop":"70%",
+ "agri":"70%",
+ "comm":"70%",
+ "secu":"70%",
+ "rate":80
+ }],
+ ["ChangeCity", "occupied", {
+ "pop":"70%",
+ "agri":"70%",
+ "comm":"70%",
+ "secu":"70%",
+ "rate":80,
+ "def":"70%",
+ "wall":"70%"
+ }]
+ ]
+ ],
+ "events":[
+
+ ]
+}
\ No newline at end of file
diff --git a/hwe/scenario/unit/basic.php b/hwe/scenario/unit/basic.php
new file mode 100644
index 00000000..0f2159e9
--- /dev/null
+++ b/hwe/scenario/unit/basic.php
@@ -0,0 +1,79 @@
+1.2],
+ ['성벽입니다.','생성할 수 없습니다.']
+ ],
+
+ [
+ 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],
+ ['표준적인 보병입니다.','보병은 방어특화이며, 상대가 회피하기 어렵습니다.']
+ ],
+
+ [
+ 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],
+ ['표준적인 궁병입니다.','궁병은 회피특화입니다.']
+ ],
+
+ [
+ 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],
+ ['표준적인 기병입니다.','기병은 공격특화입니다.']
+ ],
+
+ [
+ 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],
+ ['계략을 사용하는 병종입니다.']
+ ],
+ [
+ 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],
+ ['전투를 포기하고 계략에 몰두합니다.']
+ ],
+
+ [
+ 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, 3,
+ [self::T_FOOTMAN=>0.8, self::T_ARCHER=>0.8, self::T_CAVALRY=>0.8, self::T_WIZARD=>0.8, self::T_CASTLE=>2.4],
+ [self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2],
+ ['엄청난 위력으로 성벽을 부수어버립니다.']
+ ]
+ ];
+}
\ No newline at end of file
diff --git a/hwe/scenario/unit/siegetank.php b/hwe/scenario/unit/siegetank.php
new file mode 100644
index 00000000..da191770
--- /dev/null
+++ b/hwe/scenario/unit/siegetank.php
@@ -0,0 +1,94 @@
+1.2],
+ ['성벽입니다.','생성할 수 없습니다.']
+ ],
+ [
+ 0, self::T_FOOTMAN, '보병',
+ 100, 150, 7, 10, 0, 18, 18,
+ 0, null, null, 0,
+ [self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8],
+ [self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2],
+ ['표준적인 보병입니다.','보병은 방어특화이며, 상대가 회피하기 어렵습니다.']
+ ],
+
+ [
+ 10, self::T_ARCHER, '궁병',
+ 100, 100, 7, 20, 0, 20, 20,
+ 0, null, null, 0,
+ [self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8],
+ [self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2],
+ ['표준적인 궁병입니다.','궁병은 회피특화입니다.']
+ ],
+
+ [
+ 20, self::T_CAVALRY, '기병',
+ 150, 100, 7, 5, 0, 22, 22,
+ 0, null, null, 0,
+ [self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8],
+ [self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2],
+ ['표준적인 기병입니다.','기병은 공격특화입니다.']
+ ],
+
+ [
+ 30, self::T_WIZARD, '귀병',
+ 80, 80, 7, 5, 0.5, 18, 18,
+ 0, null, null, 0,
+ [],
+ [],
+ ['계략을 사용하는 병종입니다.']
+ ],
+ [
+ 35, self::T_WIZARD, '남귀병',
+ 60, 60, 7, 10, 0.8, 16, 16,
+ 1000, null, null, 0,
+ [],
+ [],
+ ['전투를 포기하고 계략에 몰두합니다.']
+ ],
+
+ [
+ 40, self::T_SIEGE, '정란',
+ 100, 100, 6, 0, 0, 7, 3,
+ 0, null, null, 0,
+ [self::T_CASTLE=>1.8],
+ [],
+ ['높은 구조물 위에서 공격합니다.']
+ ],
+ [
+ 41, self::T_SIEGE, '충차',
+ 150, 100, 6, 0, 0, 10, 3,
+ 1000, null, null, 3,
+ [self::T_CASTLE=>2.4],
+ [],
+ ['엄청난 위력으로 성벽을 부수어버립니다.']
+ ],
+ [
+ 42, self::T_SIEGE, '벽력거',
+ 200, 100, 6, 0, 0, 20, 4,
+ 3000, ['업'], null, 0,
+ [self::T_CASTLE=>1.8],
+ [],
+ ['상대에게 돌덩이를 날립니다.']
+ ],
+ [
+ 43, self::T_SIEGE, '목우',
+ 50, 200, 5, 0, 0, 15, 3,
+ 3000, ['성도'], null, 0,
+ [],
+ [],
+ ['상대를 저지하는 특수병기입니다.']
+ ]
+ ];
+}
\ No newline at end of file
diff --git a/hwe/select_npc.php b/hwe/select_npc.php
index a3f5cbe6..f79065dc 100644
--- a/hwe/select_npc.php
+++ b/hwe/select_npc.php
@@ -26,7 +26,7 @@ $nationList = $db->query('SELECT nation,`name`,color,scout,scoutmsg FROM nation
=UniqueConst::$serverName?>: NPC빙의
-
+
=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
=WebUtil::printCSS('../d_shared/common.css')?>
=WebUtil::printCSS('../css/config.css')?>
@@ -51,7 +51,16 @@ foreach (SpecialityConst::WAR as $id=>$values) {
$specialAll['-'] = '없음';
echo Json::encode($specialAll);
?>
-;
+;
+var characterInfo =
+[$name, $info]){
+ $characterAll[$name] = $info;
+}
+echo Json::encode($characterAll);
+?>
+;
=WebUtil::printJS('../d_shared/common_path.js')?>
@@ -64,7 +73,7 @@ echo Json::encode($specialAll);
= $maxgeneral) {
+if ($gencount>= $maxgeneral) {
?>
@@ -94,9 +103,38 @@ history.go(-1);
-
-
+
+
+
+
+
+
+ | 얼 굴
+ | 이 름
+ | 연령
+ | 성격
+ | 특기
+ | 레 벨
+ | 국 가
+ | 명 성
+ | 계 급
+ | 관 직
+ | 종능
+ | 통솔
+ | 무력
+ | 지력
+ | 삭턴
+ |
+
+
+
+
+
+ |
+
+
+
=backButton()?>
=banner()?>
diff --git a/hwe/templates/cityGeneral.php b/hwe/templates/cityGeneral.php
index 7aa86c74..2cb6013d 100644
--- a/hwe/templates/cityGeneral.php
+++ b/hwe/templates/cityGeneral.php
@@ -20,7 +20,7 @@
data-general-nation="=$nation?>"
data-general-nation-name="=$nationName?>"
>
- |
+  |
=$nameText?> |
=$leadershipText?>=$leadershipBonusText?> |
=$powerText?> |
diff --git a/hwe/turn.php b/hwe/turn.php
index 4891f4a8..bbb34b47 100644
--- a/hwe/turn.php
+++ b/hwe/turn.php
@@ -25,7 +25,7 @@ $myActionCnt = $db->queryFirstField('SELECT con FROM general WHERE `owner`=%i',
$con = checkLimit($myActionCnt);
if($con >= 2) {
- header('location:commandlist.php');
+ header('location:commandlist.php', true, 303);
exit();
}
@@ -46,4 +46,4 @@ case 2://당기기
break;
}
-header('location:commandlist.php');
+header('location:commandlist.php', true, 303);
diff --git a/hwe/turn_pop_core.php b/hwe/turn_pop_core.php
index aea18ce7..82d9442f 100644
--- a/hwe/turn_pop_core.php
+++ b/hwe/turn_pop_core.php
@@ -14,4 +14,4 @@ if($me['level'] >= 5 && $me['nation'] > 0){
pullNationCommand($me['nation'], $me['level']);
}
-header('location:b_chiefcenter.php');
+header('location:b_chiefcenter.php', true, 303);
diff --git a/hwe/turn_push_core.php b/hwe/turn_push_core.php
index fc11f984..b7294405 100644
--- a/hwe/turn_push_core.php
+++ b/hwe/turn_push_core.php
@@ -14,4 +14,4 @@ if($me['level'] >= 5 && $me['nation'] > 0){
pushNationCommand($me['nation'], $me['level']);
}
-header('location:b_chiefcenter.php');
+header('location:b_chiefcenter.php', true, 303);
diff --git a/i_entrance/entrance.php b/i_entrance/entrance.php
index 32e5ee53..88690181 100644
--- a/i_entrance/entrance.php
+++ b/i_entrance/entrance.php
@@ -30,9 +30,9 @@ $acl = $session->acl;
=WebUtil::printCSS('../css/entrance.css')?>
- =WebUtil::printJS('../js/common.js')?>
=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
+ =WebUtil::printJS('../js/common.js')?>
=WebUtil::printJS('../js/func.js')?>
=WebUtil::printJS('../js/entrance.js')?>
diff --git a/i_entrance/j_server_change_status.php b/i_entrance/j_server_change_status.php
index 6b791b41..5a7f336b 100644
--- a/i_entrance/j_server_change_status.php
+++ b/i_entrance/j_server_change_status.php
@@ -39,7 +39,39 @@ function doServerModeSet($server, $action, &$response, $session){
$serverPath = $settingObj->getBasePath();
$realServerPath = realpath(dirname(__FILE__)).'/'.$serverPath;
- if($action == 'close' && ($userGrade >= 5 || in_array('openClose', $serverAcl))) { //폐쇄
+ if($action == 'close') { //폐쇄
+ $doClose = false;
+ if($userGrade >= 5){
+ $doClose = true;
+ }
+ else if(in_array('openClose', $serverAcl)){
+ $doClose = true;
+ }
+
+ if(!$doClose && in_array('reset', $serverAcl) && file_exists($serverPath.'/d_setting/DB.php')){
+ require($serverPath.'/lib.php');
+ $localGameStorage = KVStorage::getStorage(DB::db(), 'game_env');
+ //천통 이후, 오픈 직후는 닫을 수 있음
+ $localGameStorage->cacheValues(['isunited', 'startyear', 'year']);
+
+ if($localGameStorage->isunited){
+ $doClose = true;
+ }
+ else if($localGameStorage->year < $localGameStorage->startyear + 2){
+ $doClose = true;
+ }
+
+ }
+
+ if(!$doClose){
+ if(in_array('reset', $serverAcl)){
+ $response['msg'] = '서버 시작 직후, 또는 천하통일 이후에만 닫을 수 있습니다.';
+ }
+ else{
+ $response['msg'] = '서버 닫기 권한이 부족합니다.';
+ }
+ return false;
+ }
return $settingObj->closeServer();
} elseif($action == 'reset' && $userGrade >= 6) {//리셋
//FIXME: reset, reset_full 구현
diff --git a/i_entrance/user_info.php b/i_entrance/user_info.php
index 2deb8dcd..0b551792 100644
--- a/i_entrance/user_info.php
+++ b/i_entrance/user_info.php
@@ -18,10 +18,10 @@ require(__dir__.'/../vendor/autoload.php');
=WebUtil::printCSS('../css/user_info.css')?>
- =WebUtil::printJS('../d_shared/common_path.js')?>
- =WebUtil::printJS('../js/common.js')?>
=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('../e_lib/sha512.min.js')?>
=WebUtil::printJS('../e_lib/moment.min.js')?>
=WebUtil::printJS('../js/func.js')?>
diff --git a/j_login.php b/j_login.php
index bed7c852..e83960b4 100644
--- a/j_login.php
+++ b/j_login.php
@@ -76,7 +76,7 @@ function kakaoOAuthCheck(array $userInfo) : ?array {
$refreshTokenValidUntil = TimeUtil::nowAddSeconds($refreshResult['refresh_token_expires_in']);
$oauthInfo['refreshToken'] = $refreshToken;
- $oauthInfo['refresh_token_expires_in'] = $refresh_token_expires_in;
+ $oauthInfo['refresh_token_expires_in'] = $refreshTokenValidUntil;
}
RootDB::db()->update('member', [
diff --git a/js/admin_server.js b/js/admin_server.js
index b623f4ff..41f11202 100644
--- a/js/admin_server.js
+++ b/js/admin_server.js
@@ -131,7 +131,7 @@ function drawServerAdminList(serverList){
if(!server.installed){
return true;
}
- $tr.find('.serv_act_reset').prop('disabled', false);
+ $tr.find('.serv_act_reset, .serv_act_close').prop('disabled', false);
}
});
});
diff --git a/js/common.js b/js/common.js
index 0e7c6e5a..03af655a 100644
--- a/js/common.js
+++ b/js/common.js
@@ -194,4 +194,51 @@ function quickReject(errMsg){
var deferred = $.Deferred();
deferred.reject(errMsg);
return deferred.promise();
-}
\ No newline at end of file
+}
+
+function initTooltip($obj){
+ if($obj === undefined){
+ $obj = $('.obj_tooltip');
+ }
+ else if(!$obj.hasClass('obj_tooltip')){
+ $obj = $obj.find('.obj_tooltip');
+ }
+ console.log($obj);
+
+ $obj.each(function(){
+ $target = $(this);
+
+ if($target.data('installHandler')){
+ return true;
+ }
+ $target.data('installHandler', true);
+
+ $target.mouseover(function(){
+ var $objTooltip = $(this);
+ if($objTooltip.data('setObjTooltip')){
+ return true;
+ }
+
+ var tooltipClassText = $objTooltip.data('tooltip-class');
+ if(!tooltipClassText){
+ tooltipClassText = '';
+ }
+ var template = ''
+ .format(tooltipClassText);
+
+ $objTooltip.tooltip({
+ title:function(){
+ return $.trim($(this).find('.tooltiptext').html());
+ },
+ template:template,
+ html:true
+ }).tooltip('show');
+
+ $objTooltip.data('setObjTooltip', true);
+ });
+ });
+}
+
+jQuery(function($){
+ initTooltip();
+});
\ No newline at end of file
diff --git a/js/entrance.js b/js/entrance.js
index 89a9770d..df4109bf 100644
--- a/js/entrance.js
+++ b/js/entrance.js
@@ -1,8 +1,9 @@
var serverListTemplate = "\
\
- | \
+ | \
<%korName%>섭 \
\
+ \
| \
- 폐 쇄 중 - | \
\
@@ -35,7 +36,7 @@ var serverCreateTemplate = "\
";
var serverLoginTemplate = "\
- | \
+ | \
<%name%> | \
\
\
@@ -96,12 +97,15 @@ function Entrance_drawServerList(serverInfos){
var game= result.game;
//TODO: 서버 폐쇄 방식을 새롭게 변경
$serverHtml.find('.server_down').detach();
+ var serverTime = '%s ~ %s'.format(game.startFrom)
if(game.isUnited == 2){
$serverHtml.find('.n_country').html('§천하통일§');
+ $serverHtml.find('.server_date').html('{0} ~ {1}'.format(game.starttime, game.turntime));
}
else{
$serverHtml.find('.n_country').html('<{0}국 경쟁중>'.format(game.nationCnt));
+ $serverHtml.find('.server_date').html('{0} ~'.format(game.starttime));
}
$serverHtml.append(
@@ -131,7 +135,7 @@ function Entrance_drawServerList(serverInfos){
);
}
-
+ initTooltip($serverHtml);
});
});
}
|