forked from devsam/core
Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46f460c8ad | ||
|
|
af4401d9bb | ||
|
|
2f00aee947 | ||
|
|
dd2b032fa3 | ||
|
|
1b858ae36c
|
||
|
|
69f4d8e2c7 | ||
|
|
f24aea0120 | ||
|
|
f6dc7f49e2 | ||
|
|
c1f105226f
|
||
|
|
cecab2b0cf
|
||
|
|
39f4e89b03
|
||
|
|
83f595a27a
|
||
|
|
b0db11544d
|
||
|
|
8e3551cb11
|
||
|
|
61d99a3043
|
||
|
|
c5ed2d47fc |
@@ -148,63 +148,6 @@ function allButton(bool $seizeNPCMode, array $opts = [])
|
|||||||
], $opts));
|
], $opts));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function commandButton(array $opts = [])
|
|
||||||
{
|
|
||||||
$session = Session::getInstance();
|
|
||||||
$userID = Session::getUserID();
|
|
||||||
if (!$session->isGameLoggedIn()) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$db = DB::db();
|
|
||||||
$me = $db->queryFirstRow("select no,nation,officer_level,belong,permission,penalty from general where owner=%i", $userID);
|
|
||||||
|
|
||||||
$nation = $db->queryFirstRow("select nation,level,color,secretlimit from nation where nation=%i", $me['nation']) ?? [
|
|
||||||
'nation' => 0,
|
|
||||||
'level' => 0,
|
|
||||||
'secretlimit' => 99,
|
|
||||||
'color' => '#000000'
|
|
||||||
];
|
|
||||||
|
|
||||||
$bgColor = $nation['color'] ?? '#000000';
|
|
||||||
$fgColor = newColor($bgColor);
|
|
||||||
|
|
||||||
$templates = new \League\Plates\Engine(__DIR__ . '/templates');
|
|
||||||
$showSecret = false;
|
|
||||||
$permission = checkSecretPermission($me);
|
|
||||||
$btnClassForTournament = $opts['btnClass'];
|
|
||||||
if ($opts['isTournamentApplicationOpen']) {
|
|
||||||
if ($btnClassForTournament != 'dropdown-item') {
|
|
||||||
$btnClassForTournament = 'toolbarButton2';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$btnClassForBetting = $opts['btnClass'];
|
|
||||||
if ($opts['isBettingActive']) {
|
|
||||||
if ($btnClassForTournament != 'dropdown-item') {
|
|
||||||
$btnClassForBetting = 'toolbarButton2';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($permission >= 1) {
|
|
||||||
$showSecret = true;
|
|
||||||
} else if ($me['officer_level'] == 0) {
|
|
||||||
$showSecret = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $templates->render('commandButton', array_merge([
|
|
||||||
'bgColor' => $bgColor,
|
|
||||||
'fgColor' => $fgColor,
|
|
||||||
'meLevel' => $me['officer_level'],
|
|
||||||
'nationLevel' => $nation['level'],
|
|
||||||
'showSecret' => $showSecret,
|
|
||||||
'permission' => $permission,
|
|
||||||
'btnClassForTournament' => $btnClassForTournament,
|
|
||||||
'btnClassForBetting' => $btnClassForBetting,
|
|
||||||
], $opts));
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatWounded(int $value, int $wound): string
|
function formatWounded(int $value, int $wound): string
|
||||||
{
|
{
|
||||||
if ($wound == 0) {
|
if ($wound == 0) {
|
||||||
|
|||||||
@@ -285,19 +285,6 @@ if ($lastVoteID) {
|
|||||||
<div id="general-position"><?php generalInfo($generalObj); ?></div>
|
<div id="general-position"><?php generalInfo($generalObj); ?></div>
|
||||||
<div id="generalCommandButton" class="row gx-0">
|
<div id="generalCommandButton" class="row gx-0">
|
||||||
<div class="buttonPlate bg2">
|
<div class="buttonPlate bg2">
|
||||||
<?= commandButton([
|
|
||||||
'splitBtnBegin' => '<div class="btn-group">',
|
|
||||||
'splitBtnEnd' => '</div>',
|
|
||||||
'splitZoneSign' => '<button type="button" class="btn btn-sammo-nation dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"><span class="visually-hidden">Toggle Dropdown</span></button>',
|
|
||||||
'splitZoneBegin' => '<ul class="dropdown-menu dropdown-menu-end">',
|
|
||||||
'splitZoneEnd' => '</ul>',
|
|
||||||
'splitSubBtnBegin' => '<li>',
|
|
||||||
'splitSubBtnEnd' => '</li>',
|
|
||||||
'btnClass' => 'btn btn-sammo-nation',
|
|
||||||
'btnSplitClass' => 'dropdown-item',
|
|
||||||
'isTournamentApplicationOpen' => $isTournamentApplicationOpen,
|
|
||||||
'isBettingActive' => $isBettingActive
|
|
||||||
])
|
|
||||||
?></div>
|
?></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -398,18 +385,6 @@ if ($lastVoteID) {
|
|||||||
국가 메뉴
|
국가 메뉴
|
||||||
</div>
|
</div>
|
||||||
<ul class="dropdown-menu" aria-labelledby="navbarNation" id="navbarNationItems">
|
<ul class="dropdown-menu" aria-labelledby="navbarNation" id="navbarNationItems">
|
||||||
<?= commandButton([
|
|
||||||
'btnBegin' => '<li>',
|
|
||||||
'btnEnd' => '</li>',
|
|
||||||
'splitMainBegin' => '<div class="d-none">',
|
|
||||||
'splitMainEnd' => '</div>',
|
|
||||||
'splitSubBtnBegin' => '<li>',
|
|
||||||
'splitSubBtnEnd' => '</li>',
|
|
||||||
'btnClass' => 'dropdown-item',
|
|
||||||
'btnSplitClass' => 'dropdown-item',
|
|
||||||
'isTournamentApplicationOpen' => $isTournamentApplicationOpen,
|
|
||||||
'isBettingActive' => $isBettingActive
|
|
||||||
]) ?>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item dropup">
|
<li class="nav-item dropup">
|
||||||
|
|||||||
@@ -90,6 +90,9 @@ class BuildNationCandidate extends \sammo\BaseAPI
|
|||||||
return '거병을 실패했습니다.';
|
return '거병을 실패했습니다.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$general->setVar('killturn', $env['killturn']);
|
||||||
|
$general->applyDB($db);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace sammo\API\InheritAction;
|
|
||||||
|
|
||||||
use DateTimeImmutable;
|
|
||||||
use sammo\Session;
|
|
||||||
use DateTimeInterface;
|
|
||||||
use sammo\DB;
|
|
||||||
use sammo\Enums\APIRecoveryType;
|
|
||||||
use sammo\Enums\RankColumn;
|
|
||||||
use sammo\GameConst;
|
|
||||||
use sammo\General;
|
|
||||||
use sammo\KVStorage;
|
|
||||||
use sammo\LiteHashDRBG;
|
|
||||||
use sammo\RandUtil;
|
|
||||||
use sammo\TimeUtil;
|
|
||||||
use sammo\UniqueConst;
|
|
||||||
use sammo\UserLogger;
|
|
||||||
use sammo\Util;
|
|
||||||
|
|
||||||
class CalcResetTurnTimeRange extends \sammo\BaseAPI
|
|
||||||
{
|
|
||||||
public function validateArgs(): ?string
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getRequiredSessionMode(): int
|
|
||||||
{
|
|
||||||
return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag): null | string | array | APIRecoveryType
|
|
||||||
{
|
|
||||||
$userID = $session->userID;
|
|
||||||
$generalID = $session->generalID;
|
|
||||||
|
|
||||||
$general = General::createObjFromDB($generalID);
|
|
||||||
if ($userID != $general->getVar('owner')) {
|
|
||||||
return '로그인 상태가 이상합니다. 다시 로그인해 주세요.';
|
|
||||||
}
|
|
||||||
|
|
||||||
$db = DB::db();
|
|
||||||
|
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
|
||||||
[$turnTerm, $serverTurnTime] = $gameStor->getValuesAsArray(['turnterm', 'turntime']);
|
|
||||||
|
|
||||||
$currTurnTime = new DateTimeImmutable($general->getTurnTime());
|
|
||||||
$serverTurnTimeObj = new DateTimeImmutable($serverTurnTime);
|
|
||||||
|
|
||||||
$minTurnTime = $currTurnTime->add(TimeUtil::secondsToDateInterval($turnTerm * -30));
|
|
||||||
$maxTurnTime = $currTurnTime->add(TimeUtil::secondsToDateInterval($turnTerm * 30));
|
|
||||||
|
|
||||||
$timeDiff = $serverTurnTimeObj->diff($minTurnTime);
|
|
||||||
$timeDiffSec = TimeUtil::DateIntervalToSeconds($timeDiff);
|
|
||||||
if($timeDiffSec > 0){
|
|
||||||
$minTurnTime = $minTurnTime->add(TimeUtil::secondsToDateInterval($timeDiffSec));
|
|
||||||
$maxTurnTime = $maxTurnTime->add(TimeUtil::secondsToDateInterval($timeDiffSec));
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
|
||||||
'result' => true,
|
|
||||||
'timeDiffSec' => $timeDiffSec,
|
|
||||||
'minTurnTime' => TimeUtil::format($minTurnTime, false),
|
|
||||||
'maxTurnTime' => TimeUtil::format($maxTurnTime, false),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -62,36 +62,25 @@ class ResetTurnTime extends \sammo\BaseAPI
|
|||||||
}
|
}
|
||||||
|
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
[$turnTerm, $serverTurnTime] = $gameStor->getValuesAsArray(['turnterm', 'turntime']);
|
$turnTerm = $gameStor->getValue('turnterm');
|
||||||
|
|
||||||
$currTurnTime = new DateTimeImmutable($general->getTurnTime());
|
$currTurnTime = new DateTimeImmutable($general->getTurnTime());
|
||||||
$serverTurnTimeObj = new DateTimeImmutable($serverTurnTime);
|
|
||||||
|
|
||||||
$rng = new RandUtil(new LiteHashDRBG(Util::simpleSerialize(
|
$rng = new RandUtil(new LiteHashDRBG(Util::simpleSerialize(
|
||||||
UniqueConst::$hiddenSeed,
|
UniqueConst::$hiddenSeed,
|
||||||
'ResetTurnTime',
|
'ResetTurnTime',
|
||||||
$userID,
|
$userID,
|
||||||
$general->getTurnTime()
|
$general->getAuxVar('nextTurnTimeBase') ?? $general->getTurnTime()
|
||||||
)));
|
)));
|
||||||
|
|
||||||
$afterTurn = $rng->nextRange($turnTerm * -60 / 2, $turnTerm * 60 / 2);
|
$afterTurn = $rng->nextFloat1() * $turnTerm * 60;
|
||||||
|
|
||||||
$userLogger = new UserLogger($userID);
|
$userLogger = new UserLogger($userID);
|
||||||
if($afterTurn >= 0){
|
$userLogger->push(sprintf("{$reqPoint} 포인트로 턴 시간을 바꾸어 다다음 턴부터 %02d:%02d 적용", intdiv(Util::toInt($afterTurn), 60), $afterTurn % 60), "inheritPoint");
|
||||||
$userLogger->push(sprintf("{$reqPoint} 포인트로 턴 시간을 바꾼 결과 %02d:%02d 뒤로 밀림", intdiv(Util::toInt($afterTurn), 60), $afterTurn%60), "inheritPoint");
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$userLogger->push(sprintf("{$reqPoint} 포인트로 턴 시간을 바꾼 결과 %02d:%02d 앞으로 당김", intdiv(Util::toInt(-$afterTurn), 60), (-$afterTurn)%60), "inheritPoint");
|
|
||||||
}
|
|
||||||
$userLogger->flush();
|
$userLogger->flush();
|
||||||
|
|
||||||
$turnTime = $currTurnTime->add(TimeUtil::secondsToDateInterval($afterTurn));
|
|
||||||
if ($turnTime <= $serverTurnTimeObj && $serverTurnTimeObj <= $currTurnTime) {
|
|
||||||
$turnTime = $turnTime->add(TimeUtil::secondsToDateInterval($turnTerm * 60));
|
|
||||||
}
|
|
||||||
|
|
||||||
$general->setVar('turntime', TimeUtil::format($turnTime, true));
|
|
||||||
$general->setAuxVar('inheritResetTurnTime', $nextLevel);
|
$general->setAuxVar('inheritResetTurnTime', $nextLevel);
|
||||||
|
$general->setAuxVar('nextTurnTimeBase', $afterTurn);
|
||||||
$inheritStor->setValue('previous', [$previousPoint - $reqPoint, null]);
|
$inheritStor->setValue('previous', [$previousPoint - $reqPoint, null]);
|
||||||
$general->increaseRankVar(RankColumn::inherit_point_spent_dynamic, $reqPoint);
|
$general->increaseRankVar(RankColumn::inherit_point_spent_dynamic, $reqPoint);
|
||||||
$general->applyDB($db);
|
$general->applyDB($db);
|
||||||
|
|||||||
@@ -30,11 +30,8 @@ class che_하야 extends Command\GeneralCommand{
|
|||||||
|
|
||||||
$this->setNation();
|
$this->setNation();
|
||||||
|
|
||||||
$relYear = $env['year'] - $env['startyear'];
|
|
||||||
|
|
||||||
$this->fullConditionConstraints=[
|
$this->fullConditionConstraints=[
|
||||||
ConstraintHelper::NotBeNeutral(),
|
ConstraintHelper::NotBeNeutral(),
|
||||||
ConstraintHelper::NotOpeningPart($relYear),
|
|
||||||
ConstraintHelper::NotLord(),
|
ConstraintHelper::NotLord(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,9 +164,7 @@ class che_이호경식 extends Command\NationCommand
|
|||||||
$nationGeneralLogger->flush();
|
$nationGeneralLogger->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
$josaYiCommand = JosaUtil::pick($commandName, '이');
|
$broadcastMessage = "<D><b>{$nationName}</b></>{$josaYiNation} 아국에 <M>{$commandName}</>{$josaUl} 발동하였습니다.";
|
||||||
|
|
||||||
$broadcastMessage = "아국에 <M>{$commandName}</>{$josaYiCommand} 발동되었습니다.";
|
|
||||||
|
|
||||||
$destNationGeneralList = $db->queryFirstColumn('SELECT no FROM general WHERE nation=%i', $destNationID);
|
$destNationGeneralList = $db->queryFirstColumn('SELECT no FROM general WHERE nation=%i', $destNationID);
|
||||||
foreach ($destNationGeneralList as $destNationGeneralID) {
|
foreach ($destNationGeneralList as $destNationGeneralID) {
|
||||||
|
|||||||
@@ -179,10 +179,13 @@ class che_종전수락 extends Command\NationCommand
|
|||||||
$logger->pushGlobalActionLog("<Y>{$generalName}</>{$josaYiGeneral} <D><b>{$destNationName}</b></>{$josaWa} <M>종전 합의</> 하였습니다.");
|
$logger->pushGlobalActionLog("<Y>{$generalName}</>{$josaYiGeneral} <D><b>{$destNationName}</b></>{$josaWa} <M>종전 합의</> 하였습니다.");
|
||||||
$logger->pushGlobalHistoryLog("<Y><b>【종전】</b></><D><b>{$nationName}</b></>{$josaYiNation} <D><b>{$destNationName}</b></>{$josaWa} <M>종전 합의</> 하였습니다.");
|
$logger->pushGlobalHistoryLog("<Y><b>【종전】</b></><D><b>{$nationName}</b></>{$josaYiNation} <D><b>{$destNationName}</b></>{$josaWa} <M>종전 합의</> 하였습니다.");
|
||||||
|
|
||||||
|
$josaWa = JosaUtil::pick($destNationName, '와');
|
||||||
|
$logger->pushNationalHistoryLog("<D><b>{$destNationName}</b></>{$josaWa} 종전");
|
||||||
|
|
||||||
$josaWa = JosaUtil::pick($nationName, '와');
|
$josaWa = JosaUtil::pick($nationName, '와');
|
||||||
$destLogger->pushGeneralActionLog("<D><b>{$nationName}</b></>{$josaWa} 종전에 성공했습니다.", ActionLogger::PLAIN);
|
$destLogger->pushGeneralActionLog("<D><b>{$nationName}</b></>{$josaWa} 종전에 성공했습니다.", ActionLogger::PLAIN);
|
||||||
$destLogger->pushGeneralHistoryLog("<D><b>{$nationName}</b></>{$josaWa} 종전 성공");
|
$destLogger->pushGeneralHistoryLog("<D><b>{$nationName}</b></>{$josaWa} 종전 성공");
|
||||||
|
$destLogger->pushNationalHistoryLog("<D><b>{$nationName}</b></>{$josaWa} 종전");
|
||||||
|
|
||||||
$general->applyDB($db);
|
$general->applyDB($db);
|
||||||
$destLogger->flush();
|
$destLogger->flush();
|
||||||
|
|||||||
@@ -35,6 +35,12 @@ class HasRouteWithEnemy extends Constraint{
|
|||||||
$allowedNationList[] = $this->general['nation'];
|
$allowedNationList[] = $this->general['nation'];
|
||||||
$allowedNationList[] = 0;
|
$allowedNationList[] = 0;
|
||||||
|
|
||||||
|
$destCityNation = $db->queryFirstField('SELECT nation FROM city WHERE city = %i', $this->destCity['city']);
|
||||||
|
if($destCityNation !== 0 && $destCityNation !== $this->general['nation'] && !in_array($destCityNation, $allowedNationList)){
|
||||||
|
$this->reason = "교전중인 국가가 아닙니다.";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$distanceList = \sammo\searchDistanceListToDest($this->general['city'], $this->destCity['city'], $allowedNationList);
|
$distanceList = \sammo\searchDistanceListToDest($this->general['city'], $this->destCity['city'], $allowedNationList);
|
||||||
if(!$distanceList){
|
if(!$distanceList){
|
||||||
$this->reason = "경로에 도달할 방법이 없습니다.";
|
$this->reason = "경로에 도달할 방법이 없습니다.";
|
||||||
|
|||||||
@@ -365,14 +365,14 @@ class General extends GeneralBase implements iAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->calcCache[$cKey] = $statValue;
|
|
||||||
|
|
||||||
$statValue = Util::clamp($statValue, 0, GameConst::$maxLevel);
|
$statValue = Util::clamp($statValue, 0, GameConst::$maxLevel);
|
||||||
|
|
||||||
if ($useFloor) {
|
if ($useFloor) {
|
||||||
return Util::toInt($statValue);
|
return Util::toInt($statValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->calcCache[$cKey] = $statValue;
|
||||||
|
|
||||||
return $statValue;
|
return $statValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -806,7 +806,7 @@ class General extends GeneralBase implements iAction
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/** @var iAction $iObj */
|
/** @var iAction $iObj */
|
||||||
$value = $iObj->onCalcStat($this, $statName, $value, $aux);
|
$value = $iObj->onCalcStat($general, $statName, $value, $aux);
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
@@ -819,7 +819,7 @@ class General extends GeneralBase implements iAction
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/** @var iAction $iObj */
|
/** @var iAction $iObj */
|
||||||
$value = $iObj->onCalcOpposeStat($this, $statName, $value, $aux);
|
$value = $iObj->onCalcOpposeStat($general, $statName, $value, $aux);
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3439,8 +3439,12 @@ class GeneralAI
|
|||||||
|
|
||||||
$cmd = buildGeneralCommandClass($this->rng->choice($candidate), $this->general, $this->env);
|
$cmd = buildGeneralCommandClass($this->rng->choice($candidate), $this->general, $this->env);
|
||||||
if (!$cmd->hasFullConditionMet()) {
|
if (!$cmd->hasFullConditionMet()) {
|
||||||
return buildGeneralCommandClass('che_물자조달', $this->general, $this->env);
|
$cmd = buildGeneralCommandClass('che_물자조달', $this->general, $this->env);
|
||||||
|
if (!$cmd->hasFullConditionMet()) {
|
||||||
|
$cmd = buildGeneralCommandClass('che_견문', $this->general, $this->env);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $cmd;
|
return $cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -216,6 +216,16 @@ class TurnExecutionHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
$turntime = addTurn($general->getTurnTime(), $gameStor->turnterm);
|
$turntime = addTurn($general->getTurnTime(), $gameStor->turnterm);
|
||||||
|
|
||||||
|
$nextTurnTimeBase = $general->getAuxVar('nextTurnTimeBase');
|
||||||
|
if($nextTurnTimeBase !== null){
|
||||||
|
$turntime = cutTurn($turntime, $gameStor->turnterm);
|
||||||
|
$turntimeObj = new \DateTimeImmutable($turntime);
|
||||||
|
$turntimeObj = $turntimeObj->add(TimeUtil::secondsToDateInterval($nextTurnTimeBase));
|
||||||
|
$turntime = TimeUtil::format($turntimeObj, true);
|
||||||
|
$general->setAuxVar('nextTurnTimeBase', null);
|
||||||
|
}
|
||||||
|
|
||||||
$general->setVar('turntime', $turntime);
|
$general->setVar('turntime', $turntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
<?=$btnBegin??''?><a href='v_board.php' class='commandButton <?=$btnClass??""?> <?= $meLevel >= 1 ? '' : 'disabled' ?>'>회 의 실</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='v_board.php?isSecret=true' class='commandButton <?= $permission >= 2 ? '' : 'disabled' ?> <?=$btnClass??""?>'>기 밀 실</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='v_troop.php' class='commandButton <?= ($meLevel >= 1 && $nationLevel >= 1) ? '' : 'disabled' ?> <?=$btnClass??""?>'>부대 편성</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='t_diplomacy.php' class='commandButton <?= $showSecret ? '' : 'disabled' ?> <?=$btnClass??""?>'>외 교 부</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='b_myBossInfo.php' class='commandButton <?= $meLevel >= 1 ? '' : 'disabled' ?> <?=$btnClass??""?>'>인 사 부</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='v_nationStratFinan.php' class='commandButton <?= $showSecret ? '' : 'disabled' ?> <?=$btnClass??""?>'>내 무 부</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='v_chiefCenter.php' class='commandButton <?= $showSecret ? '' : 'disabled' ?> <?=$btnClass??""?>'>사 령 부</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='v_NPCControl.php' class='commandButton <?= $showSecret ? '' : 'disabled' ?> <?=$btnClass??""?>'>NPC 정책</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='b_genList.php' target='_blank' class='open-window commandButton <?=$btnClass??""?> <?= $showSecret ? '' : 'disabled' ?>'>암 행 부</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='b_tournament.php' target='_blank' class='open-window <?=$btnClassForTournament??""?>'>토 너 먼 트</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='b_myKingdomInfo.php' class='commandButton <?=$btnClass??""?> <?= $meLevel >= 1 ? '' : 'disabled' ?>'>세력 정보</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='b_myCityInfo.php' class='commandButton <?=$btnClass??""?> <?= ($meLevel >= 1 && $nationLevel >= 1) ? '' : 'disabled' ?>'>세력 도시</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='v_nationGeneral.php' class='commandButton <?=$btnClass??""?> <?= $meLevel >= 1 ? '' : 'disabled' ?>'>세력 장수</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='v_globalDiplomacy.php' class='commandButton <?=$btnClass??""?>'>중원 정보</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='b_currentCity.php' class='commandButton <?=$btnClass??""?>'>현재 도시</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='v_battleCenter.php' target='_blank' class='open-window commandButton <?=$btnClass??""?> <?= $showSecret ? '' : 'disabled' ?>'>감 찰 부</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='v_inheritPoint.php' class='commandButton <?=$btnClass??""?>'>유산 관리</a><?=$btnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='b_myPage.php' class='commandButton <?=$btnClass??""?>'>내 정보&설정</a><?=$btnEnd??''?>
|
|
||||||
<?=$splitBtnBegin??''?>
|
|
||||||
<?=$splitMainBegin??''?><a href='v_auction.php' target='_blank' class='open-window commandButton <?=$btnClass??""?>'>경 매 장</a><?=$splitMainEnd??''?>
|
|
||||||
<?=$splitZoneSign??''?>
|
|
||||||
<?=$splitZoneBegin??''?>
|
|
||||||
<?=$splitSubBtnBegin??''?><a href='v_auction.php' target='_blank' class='open-window commandButton <?=$btnSplitClass??''?>'>금/쌀 경매장</a><?=$splitSubBtnEnd??''?>
|
|
||||||
<?=$splitSubBtnBegin??''?><a href='v_auction.php?type=unique' target='_blank' class='open-window commandButton <?=$btnSplitClass??''?>'>유니크 경매장</a><?=$splitSubBtnEnd??''?>
|
|
||||||
<?=$splitZoneEnd??''?>
|
|
||||||
<?=$splitBtnEnd??''?>
|
|
||||||
<?=$btnBegin??''?><a href='b_betting.php' target='_blank' class='open-window <?=$btnClassForBetting??""?>'>베 팅 장</a><?=$btnEnd??''?>
|
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="a-right">
|
<div class="a-right">
|
||||||
<small class="form-text text-muted"
|
<small class="form-text text-muted"
|
||||||
>다음 턴 시간이 앞, 뒤 랜덤하게 바뀝니다. (필요 포인트가 피보나치식으로 증가합니다)<br /><span style="color: white"
|
>다다음턴부터 시간이 랜덤하게 바뀝니다. (필요 포인트가 피보나치식으로 증가합니다)<br /><span style="color: white"
|
||||||
>필요 포인트: {{ inheritActionCost.resetTurnTime }}</span
|
>필요 포인트: {{ inheritActionCost.resetTurnTime }}</span
|
||||||
></small
|
></small
|
||||||
>
|
>
|
||||||
@@ -458,14 +458,7 @@ async function tryResestTurnTime(){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const msg = `${cost} 포인트로 턴을 초기화 하시겠습니까?\n다다음턴부터 무작위 시간으로 초기화 됩니다.`;
|
||||||
const { minTurnTime, maxTurnTime } = await SammoAPI.InheritAction.CalcResetTurnTimeRange();
|
|
||||||
|
|
||||||
//YYYY-MM-DD hh:mm:ss 에서 hh:mm:ss 까지만 보여줄 예정
|
|
||||||
const textMinTurnTime = minTurnTime.substring(11, 19);
|
|
||||||
const textMaxTurnTime = maxTurnTime.substring(11, 19);
|
|
||||||
|
|
||||||
const msg = `${cost} 포인트로 턴을 초기화 하시겠습니까?\n${textMinTurnTime} ~ ${textMaxTurnTime} 사이의 시간으로 초기화 됩니다.`;
|
|
||||||
if (!confirm(msg)) {
|
if (!confirm(msg)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,11 +174,6 @@ const apiRealPath = {
|
|||||||
BuyRandomUnique: PUT as APICallT<undefined>,
|
BuyRandomUnique: PUT as APICallT<undefined>,
|
||||||
ResetSpecialWar: PUT as APICallT<undefined>,
|
ResetSpecialWar: PUT as APICallT<undefined>,
|
||||||
ResetTurnTime: PUT as APICallT<undefined>,
|
ResetTurnTime: PUT as APICallT<undefined>,
|
||||||
CalcResetTurnTimeRange: GET as APICallT<undefined, {
|
|
||||||
result: true,
|
|
||||||
minTurnTime: string,
|
|
||||||
maxTurnTime: string,
|
|
||||||
}>,
|
|
||||||
SetNextSpecialWar: PUT as APICallT<{
|
SetNextSpecialWar: PUT as APICallT<{
|
||||||
type: string;
|
type: string;
|
||||||
}>,
|
}>,
|
||||||
|
|||||||
@@ -551,7 +551,7 @@ $(function () {
|
|||||||
{
|
{
|
||||||
cityInfo.태수.$obj = $this.find('.officer-4-value');
|
cityInfo.태수.$obj = $this.find('.officer-4-value');
|
||||||
cityInfo.군사.$obj = $this.find('.officer-3-value');
|
cityInfo.군사.$obj = $this.find('.officer-3-value');
|
||||||
cityInfo.종사.$obj = $this.find('.officer-2-valuet');
|
cityInfo.종사.$obj = $this.find('.officer-2-value');
|
||||||
}
|
}
|
||||||
|
|
||||||
//기타
|
//기타
|
||||||
|
|||||||
Reference in New Issue
Block a user