webpack: dynamic js build on update

This commit is contained in:
2021-08-25 03:35:51 +09:00
parent 90c696776c
commit 3961ff5185
107 changed files with 288 additions and 419 deletions
+1 -1
View File
@@ -169,7 +169,7 @@ class che_강행 extends Command\GeneralCommand
public function getJSFiles(): array
{
return [
'js/defaultSelectCityByMap.js'
'dist_js/defaultSelectCityByMap.js'
];
}
+4 -4
View File
@@ -199,7 +199,7 @@ class che_건국 extends Command\GeneralCommand
public function getJSFiles(): array
{
return [
'js/colorSelect.js'
'dist_js/colorSelect.js'
];
}
@@ -216,14 +216,14 @@ class che_건국 extends Command\GeneralCommand
foreach(GetNationColors() as $color){
$colorUsed[$color] = 0;
}
foreach(getAllNationStaticInfo() as $nation){
if($nation['level'] <= 0){
continue;
}
$colorUsed[$nation['color']]++;
}
$colorUsedCnt = 0;
foreach($colorUsed as $color=>$used){
if($used){
@@ -231,7 +231,7 @@ class che_건국 extends Command\GeneralCommand
}
$colorUsedCnt += 1;
}
//색깔이 다 쓰였으면 그냥 모두 허용
if($colorUsedCnt === count($colorUsed)){
foreach(array_keys($colorUsed) as $color){
+1 -1
View File
@@ -177,7 +177,7 @@ class che_이동 extends Command\GeneralCommand
public function getJSFiles(): array
{
return [
'js/defaultSelectCityByMap.js'
'dist_js/defaultSelectCityByMap.js'
];
}
+1 -1
View File
@@ -234,7 +234,7 @@ class che_징병 extends Command\GeneralCommand
public function getJSFiles(): array
{
return [
'js/recruitCrewForm.js'
'dist_js/recruitCrewForm.js'
];
}
+1 -1
View File
@@ -225,7 +225,7 @@ class che_첩보 extends Command\GeneralCommand
public function getJSFiles(): array
{
return [
'js/defaultSelectCityByMap.js'
'dist_js/defaultSelectCityByMap.js'
];
}
+3 -3
View File
@@ -60,7 +60,7 @@ class che_출병 extends Command\GeneralCommand
ConstraintHelper::ReqGeneralRice($reqRice),
];
}
protected function initWithArg()
@@ -199,7 +199,7 @@ class che_출병 extends Command\GeneralCommand
else{
$logger->pushGeneralActionLog("가까운 경로에 적군 도시가 없습니다. <G><b>{$defenderCityName}</b></>{$josaRo} 이동합니다. <1>$date</>");
}
$this->alternative = new che_이동($general, $this->env, ['destCityID' => $defenderCityID]);
return false;
}
@@ -239,7 +239,7 @@ class che_출병 extends Command\GeneralCommand
public function getJSFiles(): array
{
return [
'js/defaultSelectCityByMap.js'
'dist_js/defaultSelectCityByMap.js'
];
}
+3 -3
View File
@@ -106,7 +106,7 @@ class che_화계 extends Command\GeneralCommand
$general = $this->generalObj;
$this->setCity();
[$reqGold, $reqRice] = $this->getCost();
@@ -118,7 +118,7 @@ class che_화계 extends Command\GeneralCommand
ConstraintHelper::ReqGeneralRice($reqRice),
];
}
protected function initWithArg()
@@ -335,7 +335,7 @@ class che_화계 extends Command\GeneralCommand
public function getJSFiles(): array
{
return [
'js/defaultSelectCityByMap.js'
'dist_js/defaultSelectCityByMap.js'
];
}
@@ -82,7 +82,7 @@ class che_국기변경 extends Command\NationCommand
public function getCost(): array
{
return [0, 0];
}
@@ -154,7 +154,7 @@ class che_국기변경 extends Command\NationCommand
public function getJSFiles(): array
{
return [
'js/colorSelect.js'
'dist_js/colorSelect.js'
];
}
@@ -81,7 +81,7 @@ class che_국호변경 extends Command\NationCommand
public function getCost(): array
{
return [0, 0];
}
@@ -129,7 +129,7 @@ class che_국호변경 extends Command\NationCommand
return false;
}
$josaRo = JosaUtil::pick($newNationName, '로');
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
@@ -160,7 +160,7 @@ class che_국호변경 extends Command\NationCommand
public function getJSFiles(): array
{
return [
'js/colorSelect.js'
'dist_js/colorSelect.js'
];
}
+1 -1
View File
@@ -199,7 +199,7 @@ class che_급습 extends Command\NationCommand
public function getJSFiles(): array
{
return [
'js/defaultSelectNationByMap.js'
'dist_js/defaultSelectNationByMap.js'
];
}
+18 -18
View File
@@ -102,7 +102,7 @@ class che_물자원조 extends Command\NationCommand{
}
$this->fullConditionConstraints=[
ConstraintHelper::ExistsDestNation(),
ConstraintHelper::ExistsDestNation(),
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::SuppliedCity(),
@@ -112,11 +112,11 @@ class che_물자원조 extends Command\NationCommand{
ConstraintHelper::ReqDestNationValue('surlimit', '외교제한', '==', 0, '상대국이 외교제한중입니다.'),
];
}
public function getCost():array{
return [0, 0];
}
public function getPreReqTurn():int{
return 0;
}
@@ -165,33 +165,33 @@ class che_물자원조 extends Command\NationCommand{
[$goldAmount, $riceAmount] = $this->arg['amountList'];
$goldAmount = Util::valueFit(
$goldAmount,
0,
$goldAmount,
0,
$nation['gold'] - GameConst::$basegold
);
$riceAmount = Util::valueFit(
$riceAmount,
0,
$riceAmount,
0,
$nation['rice'] - GameConst::$baserice
);
$goldAmountText = number_format($goldAmount);
$riceAmountText = number_format($riceAmount);
$logger = $general->getLogger();
$year = $this->env['year'];
$month = $this->env['month'];
$josaRo = JosaUtil::pick($destNationName, '로');
$broadcastMessage = "<D><b>{$destNationName}</b></>{$josaRo} 금<C>{$goldAmountText}</> 쌀<C>{$riceAmountText}</>을 지원했습니다.";
@@ -249,11 +249,11 @@ class che_물자원조 extends Command\NationCommand{
public function getJSFiles(): array
{
return [
'js/defaultSelectNationByMap.js'
'dist_js/defaultSelectNationByMap.js'
];
}
public function getForm(): string
{
$currentNationLevel = getNationStaticInfo($this->generalObj->getNationID())['level'];
@@ -268,8 +268,8 @@ class che_물자원조 extends Command\NationCommand{
원조할 국가를 목록에서 선택하세요.<br>
<select class='formInput' name="destNationID" id="destNationID" size='1' style='color:white;background-color:black;'>
<?php foreach(getAllNationStaticInfo() as $nation): ?>
<option
value='<?=$nation['nation']?>'
<option
value='<?=$nation['nation']?>'
style='color:<?=$nation['color']?>;'
>【<?=$nation['name']?> 】</option>
<?php endforeach; ?>
@@ -278,12 +278,12 @@ class che_물자원조 extends Command\NationCommand{
<?php foreach(Util::range($currentNationLevel+1) as $nationLevel): ?>
<option value='<?=$nationLevel*GameConst::$coefAidAmount?>'><?=$nationLevel*GameConst::$coefAidAmount?></option>
<?php endforeach; ?>
</select>
</select>
병량 <select class='formInput amountList' name="amountList[]" size='1' style='color:white;background-color:black;'>
<?php foreach(Util::range($currentNationLevel+1) as $nationLevel): ?>
<option value='<?=$nationLevel*GameConst::$coefAidAmount?>'><?=$nationLevel*GameConst::$coefAidAmount?></option>
<?php endforeach; ?>
</select>
</select>
<input type=button id="commonSubmit" value="<?=$this->getName()?>"><br>
<br>
<?php
+9 -9
View File
@@ -51,10 +51,10 @@ class che_발령 extends Command\NationCommand{
$this->setCity();
$this->setNation();
$this->minConditionConstraints=[
ConstraintHelper::BeChief(),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::OccupiedCity(),
ConstraintHelper::SuppliedCity(),
];
@@ -63,7 +63,7 @@ class che_발령 extends Command\NationCommand{
protected function initWithArg()
{
$this->setDestCity($this->arg['destCityID']);
$destGeneral = General::createGeneralObjFromDB($this->arg['destGeneralID'], null, 1);
$this->setDestGeneral($destGeneral);
@@ -76,7 +76,7 @@ class che_발령 extends Command\NationCommand{
$this->fullConditionConstraints=[
ConstraintHelper::BeChief(),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::OccupiedCity(),
ConstraintHelper::SuppliedCity(),
ConstraintHelper::ExistsDestGeneral(),
@@ -95,11 +95,11 @@ class che_발령 extends Command\NationCommand{
$destGeneralName = $this->destGeneralObj->getName();
return "{$failReason} <Y>{$destGeneralName}</> {$commandName} 실패.";
}
public function getCost():array{
return [0, 0];
}
public function getPreReqTurn():int{
return 0;
}
@@ -134,7 +134,7 @@ class che_발령 extends Command\NationCommand{
$destGeneral = $this->destGeneralObj;
$destGeneralName = $destGeneral->getName();
$logger = $general->getLogger();
$destGeneral->setVar('city', $destCityID);
@@ -156,11 +156,11 @@ class che_발령 extends Command\NationCommand{
return true;
}
public function getJSFiles(): array
{
return [
'js/defaultSelectCityByMap.js'
'dist_js/defaultSelectCityByMap.js'
];
}
@@ -48,7 +48,7 @@ class che_백성동원 extends Command\NationCommand{
$this->setCity();
$this->setNation(['strategic_cmd_limit']);
$this->minConditionConstraints=[
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
@@ -76,18 +76,18 @@ class che_백성동원 extends Command\NationCommand{
return "{$name}/{$reqTurn}턴(재사용 대기 $postReqTurn)";
}
public function getCost():array{
return [0, 0];
}
public function getPreReqTurn():int{
return 0;
}
public function getPostReqTurn():int{
$genCount = Util::valueFit($this->nation['gennum'], GameConst::$initialNationGenLimit);
$nextTerm = Util::round(sqrt($genCount*4)*10);
$nextTerm = Util::round(sqrt($genCount*4)*10);
$nextTerm = $this->generalObj->onCalcStrategic($this->getName(), 'delay', $nextTerm);
return $nextTerm;
@@ -144,7 +144,7 @@ class che_백성동원 extends Command\NationCommand{
], 'city=%i', $destCityID);
$josaYiNation = JosaUtil::pick($nationName, '이');
$logger->pushGeneralHistoryLog('<M>백성동원</>을 발동');
$logger->pushNationalHistoryLog("<L><b>【전략】</b></><D><b>{$nationName}</b></>{$josaYiNation} <G><b>{$destCityName}</b></>에 <M>백성동원</>을 하였습니다.");
@@ -162,7 +162,7 @@ class che_백성동원 extends Command\NationCommand{
public function getJSFiles(): array
{
return [
'js/defaultSelectCityByMap.js'
'dist_js/defaultSelectCityByMap.js'
];
}
@@ -74,7 +74,7 @@ class che_불가침제의 extends Command\NationCommand
{
$general = $this->generalObj;
$this->setCity();
$this->setNation();
@@ -94,7 +94,7 @@ class che_불가침제의 extends Command\NationCommand
$month = $this->arg['month'];
$env = $this->env;
$relYear = $env['year'] - $env['startyear'];
$currentMonth = $env['year'] * 12 + $env['month'] - 1;
$reqMonth = $year * 12 + $month - 1;
@@ -226,7 +226,7 @@ class che_불가침제의 extends Command\NationCommand
public function getJSFiles(): array
{
return [
'js/defaultSelectNationByMap.js'
'dist_js/defaultSelectNationByMap.js'
];
}
@@ -55,11 +55,11 @@ class che_불가침파기제의 extends Command\NationCommand{
$this->setCity();
$this->setNation();
$this->minConditionConstraints=[
ConstraintHelper::BeChief(),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::OccupiedCity(),
ConstraintHelper::SuppliedCity(),
];
@@ -71,7 +71,7 @@ class che_불가침파기제의 extends Command\NationCommand{
$this->fullConditionConstraints=[
ConstraintHelper::BeChief(),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::OccupiedCity(),
ConstraintHelper::SuppliedCity(),
ConstraintHelper::ExistsDestNation(),
@@ -86,7 +86,7 @@ class che_불가침파기제의 extends Command\NationCommand{
public function getCost():array{
return [0, 0];
}
public function getPreReqTurn():int{
return 0;
}
@@ -129,7 +129,7 @@ class che_불가침파기제의 extends Command\NationCommand{
// 상대에게 발송
$src = new MessageTarget(
$general->getID(),
$general->getID(),
$general->getName(),
$nationID,
$nationName,
@@ -173,7 +173,7 @@ class che_불가침파기제의 extends Command\NationCommand{
public function getJSFiles(): array
{
return [
'js/defaultSelectNationByMap.js'
'dist_js/defaultSelectNationByMap.js'
];
}
@@ -204,7 +204,7 @@ class che_불가침파기제의 extends Command\NationCommand{
$nationList[] = $destNation;
}
ob_start();
ob_start();
?>
<?=\sammo\getMapHtml()?><br>
불가침중인 국가에 조약 파기를 제의합니다.<br>
@@ -213,12 +213,12 @@ class che_불가침파기제의 extends Command\NationCommand{
<br>
<select class='formInput' name="destNationID" id="destNationID" size='1' style='color:white;background-color:black;'>
<?php foreach($nationList as $nation): ?>
<option
value='<?=$nation['nation']?>'
<option
value='<?=$nation['nation']?>'
style='color:<?=$nation['color']?>;<?=$nation['cssBgColor']?>'
>【<?=$nation['name']?> 】</option>
<?php endforeach; ?>
</select>에게
</select>에게
<input type=button id="commonSubmit" value="<?=$this->getName()?>">
<?php
return ob_get_clean();
@@ -195,7 +195,7 @@ class che_선전포고 extends Command\NationCommand
public function getJSFiles(): array
{
return [
'js/defaultSelectNationByMap.js'
'dist_js/defaultSelectNationByMap.js'
];
}
+8 -8
View File
@@ -50,7 +50,7 @@ class che_수몰 extends Command\NationCommand{
$this->setCity();
$this->setNation(['strategic_cmd_limit']);
$this->minConditionConstraints=[
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
@@ -62,7 +62,7 @@ class che_수몰 extends Command\NationCommand{
{
$this->setDestCity($this->arg['destCityID']);
$this->setDestNation($this->destCity['nation']);
$this->fullConditionConstraints=[
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
@@ -80,18 +80,18 @@ class che_수몰 extends Command\NationCommand{
return "{$name}/{$reqTurn}턴(재사용 대기 $postReqTurn)";
}
public function getCost():array{
return [0, 0];
}
public function getPreReqTurn():int{
return 2;
}
public function getPostReqTurn():int{
$genCount = Util::valueFit($this->nation['gennum'], GameConst::$initialNationGenLimit);
$nextTerm = Util::round(sqrt($genCount*4)*10);
$nextTerm = Util::round(sqrt($genCount*4)*10);
$nextTerm = $this->generalObj->onCalcStrategic($this->getName(), 'delay', $nextTerm);
return $nextTerm;
@@ -125,7 +125,7 @@ class che_수몰 extends Command\NationCommand{
$destNationID = $destCity['nation'];
$destNationName = getNationStaticInfo($destNationID)['name'];
$nationID = $general->getNationID();
$nationName = $this->nation['name'];
@@ -166,7 +166,7 @@ class che_수몰 extends Command\NationCommand{
'def' => $db->sqleval('def * 0.2'),
'wall' => $db->sqleval('wall * 0.2'),
], 'city=%i', $destCityID);
$josaYiNation = JosaUtil::pick($nationName, '이');
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>에 <M>수몰</>을 발동");
@@ -185,7 +185,7 @@ class che_수몰 extends Command\NationCommand{
public function getJSFiles(): array
{
return [
'js/defaultSelectCityByMap.js'
'dist_js/defaultSelectCityByMap.js'
];
}
@@ -202,7 +202,7 @@ class che_이호경식 extends Command\NationCommand
public function getJSFiles(): array
{
return [
'js/defaultSelectNationByMap.js'
'dist_js/defaultSelectNationByMap.js'
];
}
+10 -10
View File
@@ -55,10 +55,10 @@ class che_종전제의 extends Command\NationCommand{
$this->setCity();
$this->setNation();
$this->minConditionConstraints=[
ConstraintHelper::BeChief(),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::OccupiedCity(),
ConstraintHelper::SuppliedCity(),
];
@@ -70,7 +70,7 @@ class che_종전제의 extends Command\NationCommand{
$this->fullConditionConstraints=[
ConstraintHelper::BeChief(),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::OccupiedCity(),
ConstraintHelper::SuppliedCity(),
ConstraintHelper::ExistsDestNation(),
@@ -84,7 +84,7 @@ class che_종전제의 extends Command\NationCommand{
public function getCost():array{
return [0, 0];
}
public function getPreReqTurn():int{
return 0;
}
@@ -127,7 +127,7 @@ class che_종전제의 extends Command\NationCommand{
// 상대에게 발송
$src = new MessageTarget(
$general->getID(),
$general->getID(),
$general->getName(),
$nationID,
$nationName,
@@ -171,7 +171,7 @@ class che_종전제의 extends Command\NationCommand{
public function getJSFiles(): array
{
return [
'js/defaultSelectNationByMap.js'
'dist_js/defaultSelectNationByMap.js'
];
}
@@ -202,7 +202,7 @@ class che_종전제의 extends Command\NationCommand{
$nationList[] = $destNation;
}
ob_start();
ob_start();
?>
<?=\sammo\getMapHtml()?><br>
전쟁중인 국가에 종전을 제의합니다.<br>
@@ -211,12 +211,12 @@ class che_종전제의 extends Command\NationCommand{
<br>
<select class='formInput' name="destNationID" id="destNationID" size='1' style='color:white;background-color:black;'>
<?php foreach($nationList as $nation): ?>
<option
value='<?=$nation['nation']?>'
<option
value='<?=$nation['nation']?>'
style='color:<?=$nation['color']?>;<?=$nation['cssBgColor']?>'
>【<?=$nation['name']?> 】</option>
<?php endforeach; ?>
</select>에게
</select>에게
<input type=button id="commonSubmit" value="<?=$this->getName()?>">
<?php
return ob_get_clean();
+2 -2
View File
@@ -134,7 +134,7 @@ class che_천도 extends Command\NationCommand
$general = $this->getGeneral();
$nationID = $general->getNationID();
$nationStor = \sammo\KVStorage::getStorage(DB::db(), $nationID, 'nation_env');
$nationStor->last천도Trial = [$general->getVar('officer_level'), $general->getTurnTime()];
if ($lastTurn->getCommand() != $commandName || $lastTurn->getArg() !== $this->arg) {
@@ -232,7 +232,7 @@ class che_천도 extends Command\NationCommand
public function getJSFiles(): array
{
return [
'js/defaultSelectCityByMap.js'
'dist_js/defaultSelectCityByMap.js'
];
}
+6 -6
View File
@@ -51,7 +51,7 @@ class che_초토화 extends Command\NationCommand{
$this->setCity();
$this->setNation(['surlimit', 'gold', 'rice', 'capital']);
$this->minConditionConstraints=[
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
@@ -63,7 +63,7 @@ class che_초토화 extends Command\NationCommand{
protected function initWithArg()
{
$this->setDestCity($this->arg['destCityID']);
$this->fullConditionConstraints=[
ConstraintHelper::OccupiedCity(),
ConstraintHelper::OccupiedDestCity(),
@@ -77,7 +77,7 @@ class che_초토화 extends Command\NationCommand{
], ),
];
}
public function getCost():array{
return [0, 0];
}
@@ -145,7 +145,7 @@ class che_초토화 extends Command\NationCommand{
$josaUl = JosaUtil::pick($destCityName, '을');
$logger = $general->getLogger();
$general->addExperience(-$general->getVar('experience') * 0.1, false);
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
@@ -183,7 +183,7 @@ class che_초토화 extends Command\NationCommand{
\sammo\refreshNationStaticInfo();
\sammo\SetNationFront($nationID);
$logger->pushGeneralActionLog("<G><b>{$destCityName}</b></>{$josaUl} 초토화했습니다. <1>$date</>");
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>{$josaUl} <M>초토화</> 명령");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>{$josaUl} <M>초토화</> 명령");
@@ -198,7 +198,7 @@ class che_초토화 extends Command\NationCommand{
public function getJSFiles(): array
{
return [
'js/defaultSelectCityByMap.js'
'dist_js/defaultSelectCityByMap.js'
];
}
+18 -18
View File
@@ -49,7 +49,7 @@ class che_피장파장 extends Command\NationCommand{
if(!in_array($commandType, GameConst::$availableChiefCommand['전략'])){
return false;
}
$this->arg = [
'destNationID'=>$destNationID,
@@ -75,7 +75,7 @@ class che_피장파장 extends Command\NationCommand{
protected function initWithArg()
{
$this->setDestNation($this->arg['destNationID'], null);
if($this->getNationID() == 0){
$this->fullConditionConstraints=[
ConstraintHelper::OccupiedCity()
@@ -84,7 +84,7 @@ class che_피장파장 extends Command\NationCommand{
}
$cmd = buildNationCommandClass($this->arg['commandType'], $this->generalObj, $this->env, new LastTurn());
$currYearMonth = Util::joinYearMonth($this->env['year'], $this->env['month']);
$nextAvailableTurn = $cmd->getNextAvailableTurn();
if($currYearMonth < $nextAvailableTurn){
@@ -93,7 +93,7 @@ class che_피장파장 extends Command\NationCommand{
];
return;
}
$this->fullConditionConstraints=[
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
@@ -115,7 +115,7 @@ class che_피장파장 extends Command\NationCommand{
public function getCost():array{
return [0, 0];
}
public function getPreReqTurn():int{
return 1;
}
@@ -126,7 +126,7 @@ class che_피장파장 extends Command\NationCommand{
public function getTargetPostReqTurn():int{
$genCount = Util::valueFit($this->nation['gennum'], GameConst::$initialNationGenLimit);
$nextTerm = Util::round(sqrt($genCount*2)*10);
$nextTerm = Util::round(sqrt($genCount*2)*10);
$nextTerm = $this->generalObj->onCalcStrategic($this->getName(), 'delay', $nextTerm);
return $nextTerm;
@@ -179,7 +179,7 @@ class che_피장파장 extends Command\NationCommand{
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
$broadcastMessage = "<Y>{$generalName}</>{$josaYi} <G><b>{$destNationName}</b></>에 <G><b>{$cmd->getName()}</b></> 전략의 <M>{$commandName}</>{$josaUl} 발동하였습니다.";
$nationGeneralList = $db->queryFirstColumn('SELECT no FROM general WHERE nation=%i AND no != %i', $nationID, $generalID);
@@ -221,7 +221,7 @@ class che_피장파장 extends Command\NationCommand{
public function getJSFiles(): array
{
return [
'js/defaultSelectNationByMap.js'
'dist_js/defaultSelectNationByMap.js'
];
}
@@ -255,14 +255,14 @@ class che_피장파장 extends Command\NationCommand{
$cmdName = $cmd->getName();
$remainTurn = 0;
$nextAvailableTurn = $cmd->getNextAvailableTurn();
if($nextAvailableTurn !== null && $currYearMonth < $nextAvailableTurn){
$remainTurn = $nextAvailableTurn - $currYearMonth;
}
$availableCommandTypeList[$commandType] = [$cmdName, $remainTurn];
}
ob_start();
ob_start();
?>
<?=\sammo\getMapHtml()?><br>
선택된 국가에 피장파장을 발동합니다.<br>
@@ -273,22 +273,22 @@ class che_피장파장 extends Command\NationCommand{
배경색은 현재 피장파장 불가능 국가는 <font color=red>붉은색</font>으로 표시됩니다.<br>
<select class='formInput' name="destNationID" id="destNationID" size='1' style='color:white;background-color:black;'>
<?php foreach($nationList as $nation): ?>
<option
value='<?=$nation['nation']?>'
<option
value='<?=$nation['nation']?>'
style='color:<?=$nation['color']?>;<?=$nation['availableCommand']?'':'background-color:red;'?>'
>【<?=$nation['name']?> 】</option>
<?php endforeach; ?>
</select>에
</select>에
<select class='formInput' name="commandType" id="commandType" size='1' style='color:white;background-color:black;'>
<?php foreach($availableCommandTypeList as $commandType=>[$cmdName, $cmdRemainTurn]):
/** @var \sammo\Command\NationCommand $cmdObj */
<?php foreach($availableCommandTypeList as $commandType=>[$cmdName, $cmdRemainTurn]):
/** @var \sammo\Command\NationCommand $cmdObj */
?>
<option
value='<?=$commandType?>'
<option
value='<?=$commandType?>'
style='color:white;<?=$cmdRemainTurn?'background-color:red;':''?>'
><?=$cmdName?><?=$cmdRemainTurn?"({$cmdRemainTurn}턴 뒤)":''?></option>
<?php endforeach; ?>
</select> 전략을
</select> 전략을
<input type=button id="commonSubmit" value="<?=$this->getName()?>">
<?php
return ob_get_clean();
+2 -2
View File
@@ -55,7 +55,7 @@ class che_허보 extends Command\NationCommand
$this->setCity();
$this->setNation(['strategic_cmd_limit']);
$this->minConditionConstraints = [
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
@@ -208,7 +208,7 @@ class che_허보 extends Command\NationCommand
public function getJSFiles(): array
{
return [
'js/defaultSelectCityByMap.js'
'dist_js/defaultSelectCityByMap.js'
];
}