This commit is contained in:
2018-09-11 21:40:07 +09:00
35 changed files with 686 additions and 125 deletions
-3
View File
@@ -54,9 +54,6 @@ if ($showCurrentNation) {
<tr>
<td style="background-color:#333333;" align=center colspan=8>
<font size=5>현재 (<?=$year?>年 <?=$month?>月)</font>
<a href="a_emperior_detail.php"><button>자세히</button></a>
<a href="a_history.php"><button>역사 보기</button></a>
</td>
</tr>
+2 -2
View File
@@ -37,7 +37,7 @@ $serverID = $emperior['server_id']??($emperior['serverID']??null);
<body>
<table align=center width=1000 class="tb_layout bg0">
<tr><td><?=$emperior?'역 대 왕 조':'현 재 왕 조'?><br>
<tr><td>역 대 왕 조<br>
<button onclick=window.close()>창 닫기</button>
<div style="float:right;"><a href="a_emperior.php"><button>전체보기</button></a><div>
</td></tr>
@@ -160,7 +160,7 @@ if($emperior):
<?php
endif;
$showServers = $serverID || (!$emperior);
$showServers = $emperior;
if(!$serverID){
$serverID = UniqueConst::$serverID;
+6 -1
View File
@@ -11,6 +11,7 @@ extractMissingPostToGlobals();
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$userGrade = Session::getUserGrade();
$db = DB::db();
$connect=$db->get();
@@ -168,7 +169,7 @@ echo "
unset($city);
// 첩보된 도시까지만 허용
if($valid == 0 && $session->userGrade < 5) {
if($valid == 0 && $userGrade < 5) {
$citylist = $me['city'];
}
@@ -212,6 +213,10 @@ for($j=0; $j < $gencount; $j++) {
$ourGeneral = false;
}
if($userGrade == 6){
$ourGeneral = true;
}
$isNPC = $general['npc']>1;
$wounded = $general['injury'];
+1 -1
View File
@@ -111,7 +111,7 @@ function myCommandList() {
echo "
<tr height=28>
<td width=24 align=center height=24 id=bg0><b>$j</b></td>
<td width=71 align=center height=24 id=bg1><b>{$year}年 {$month}月</b></td>
<td width=71 align=center height=24 id=bg1 style='overflow:hidden;'><b>{$year}年 {$month}月</b></td>
<td width=42 align=center bgcolor=black><b>$turndate</b></td>
<td width=150 align=center height=24 style=table-layout:fixed;>$turn[$i]</td>
</tr>";
+3 -2
View File
@@ -416,7 +416,7 @@ function addCommand($typename, $value, $valid = 1, $color=0) {
}
} else {
echo "
<option style=color:white;background-color:red; value={$value}>{$typename}</option>";
<option style=color:white;background-color:red; value={$value}>{$typename}(불가)</option>";
}
}
@@ -1244,6 +1244,7 @@ function increaseRefresh($type="", $cnt=1) {
$session = Session::getInstance();
$userID = $session->userID;
$generalID = $session->generalID;
$userGrade = $session->userGrade;
$date = date('Y-m-d H:i:s');
@@ -1251,7 +1252,7 @@ function increaseRefresh($type="", $cnt=1) {
$gameStor = KVStorage::getStorage($db, 'game_env');
$gameStor->refresh = $gameStor->refresh+$cnt; //TODO: +로 증가하는 값은 별도로 분리
if($generalID) {
if($generalID && $userGrade < 6) {
$db->update('general', [
'lastrefresh'=>$date,
'con'=>$db->sqleval('con + %i', $cnt),
+2 -2
View File
@@ -232,10 +232,10 @@ else if($session->userGrade == 4){
</table>
<table class="tb_layout bg0" style="width:1000px;">
<tr>
<td width=698 height=520 colspan=2>
<td style='width:700px;height:520px;' colspan=2>
<?=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>
<td style='width:300px;' rowspan=4><iframe seamless="seamless" name=commandlist src='commandlist.php' style='width:300px;height:700px;' frameborder=0 marginwidth=0 marginheight=0 topmargin=0 scrolling=no></iframe></td>
</tr>
<form name=form2 action=preprocessing.php method=post target=commandlist>
<tr>
+3 -1
View File
@@ -153,6 +153,8 @@ jQuery(function($){
var customCSS = localStorage.getItem('sam_customCSS');
if(customCSS){
$('<style type="text/css">\n'+customCSS+'\n</style>').appendTo($('head'));
var $style = $('<style type="text/css"></style>');
$style.text(customCSS);
$style.appendTo($('head'));
}
});
+5 -5
View File
@@ -1624,13 +1624,13 @@ function command_53($turn, $command) {
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
$count = MYDB_num_rows($result);
$cond1 = round((-0.25 * $stdNation['power']) + $avgNation['power'], 2);
$cond2 = round((-0.67 * $stdNation['gennum']) + $avgNation['gennum'], 2);
$cond1 = (-0.25 * $stdNation['power']) + $avgNation['power'];
$cond2 = (-0.67 * $stdNation['gennum']) + $avgNation['gennum'];
for($i=1; $i <= $count; $i++) {
$nation = MYDB_fetch_array($result);
if($myNation['power']+$nation['power'] > $cond1 || $myNation['gennum']+$nation['gennum'] > $cond2 || !isNeighbor($me['nation'], $nation['nation'])) {
if(($myNation['power']+$nation['power'])/2 > $cond1 || ($myNation['gennum']+$nation['gennum'])/2 > $cond2 || !isNeighbor($me['nation'], $nation['nation'])) {
echo "<option style=color:{$nation['color']};background-color:red; value={$nation['nation']}>【 {$nation['name']} 】</option>";
} else {
echo "<option style=color:{$nation['color']} value={$nation['nation']}>【 {$nation['name']} 】</option>";
@@ -1652,8 +1652,8 @@ function command_53($turn, $command) {
제한 조건<br>
- 인접 국가<br>
- 양국 모두 외교제한 없음<br>
- 두 국가의 국력 평균이 상위 60%(현재 {$cond1}) 이하.<br>
- 두 국가의 장수수 평균이 상위 75%(현재 {$cond2} 이하.<br>
- 두 국가의 국력 평균이 상위 60%(현재 ".round($cond1,2).") 이하.<br>
- 두 국가의 장수수 평균이 상위 75%(현재 ".round($cond2,1).") 이하.<br>
";
ender(1);
}
+2 -2
View File
@@ -181,7 +181,7 @@ class DiplomaticMessage extends Message{
$josaWa = JosaUtil::pick($this->src->nationName, '와');
pushGeneralHistory(
['no'=>$this->dest->generalID],
["<C>●</>{$helper->year}{$helper->month}월:<D><b>{$this->src->nationName}</b></>{$josaWa} 통합 시도"]
"<C>●</>{$helper->year}{$helper->month}월:<D><b>{$this->src->nationName}</b></>{$josaWa} 통합 시도"
);
pushGenLog(
['no'=>$this->dest->generalID],
@@ -200,7 +200,7 @@ class DiplomaticMessage extends Message{
$josaWa = JosaUtil::pick($this->dest->nationName, '와');
pushGeneralHistory(
['no'=>$this->src->generalID],
["<C>●</>{$helper->year}{$helper->month}월:<D><b>{$this->dest->nationName}</b></>{$josaWa} 통합 시도"]
"<C>●</>{$helper->year}{$helper->month}월:<D><b>{$this->dest->nationName}</b></>{$josaWa} 통합 시도"
);
$josaYi = JosaUtil::pick($this->dest->nationName, '이');
pushGenLog(
+2 -2
View File
@@ -29,12 +29,12 @@ class Diplomacy{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$srcNation = $db->queryFirstRow(
'SELECT nation, `name`, `power`, capital, gold, rice, surlimit, color, `level` FROM nation WHERE nation=%i',
'SELECT nation, `name`, `power`, capital, gold, rice, gennum, surlimit, color, `level` FROM nation WHERE nation=%i',
$srcNationID
);
$destNation = $db->queryFirstRow(
'SELECT nation, `name`, `power`, capital, gold, rice, surlimit, color, `level` FROM nation WHERE nation=%i',
'SELECT nation, `name`, `power`, capital, gold, rice, gennum, surlimit, color, `level` FROM nation WHERE nation=%i',
$destNationID
);
+2 -2
View File
@@ -592,7 +592,7 @@ class WarUnitGeneral extends WarUnit{
}
if($oppose instanceof WarUnitCity){
$magic = Util::choiceRandom(['급습', '위보',' 혼란']);
$magic = Util::choiceRandom(['급습', '위보', '혼란']);
}
else{
$magic = Util::choiceRandom(['위보', '매복', '반목', '화계', '혼란']);
@@ -784,7 +784,7 @@ class WarUnitGeneral extends WarUnit{
foreach($table as $skillKey => $skillMultiply){
if($oppose->hasActivatedSkill($skillKey)){
$josaUl = \sammo\JosaUtil::pick($skillKey, '을');
$thisLogger->pushGeneralBattleDetailLog("<C>●</><C>반계</>로 상대의 <D>{$skillKey}</>{$josaUl} 되돌렸다!");
$thisLogger->pushGeneralBattleDetailLog("<C>반계</>로 상대의 <D>{$skillKey}</>{$josaUl} 되돌렸다!");
$opposeLogger->pushGeneralBattleDetailLog("<D>{$skillKey}</>{$josaUl} <R>역으로</> 당했다!");
$this->multiplyWarPowerMultiply($skillMultiply);