diff --git a/hwe/sammo/Command/Nation/che_국호변경.php b/hwe/sammo/Command/Nation/che_국호변경.php index f0cfc747..fd7b36de 100644 --- a/hwe/sammo/Command/Nation/che_국호변경.php +++ b/hwe/sammo/Command/Nation/che_국호변경.php @@ -157,23 +157,4 @@ class che_국호변경 extends Command\NationCommand $general->applyDB($db); return true; } - - public function getJSPlugins(): array - { - return [ - 'colorSelect' - ]; - } - - - public function getForm(): string - { - ob_start(); -?> - 나라의 이름을 바꿉니다. 황제가 된 후 1회 가능합니다.
- 국명 :
-
-generalObj; $nationID = $generalObj->getNationID(); $nationList = []; $testTurn = new LastTurn($this->getName(), null, $this->getPreReqTurn()); foreach (getAllNationStaticInfo() as $destNation) { - if ($destNation['nation'] == $nationID) { + /*if ($destNation['nation'] == $nationID) { continue; - } + }*/ $testTurn->setArg(['destNationID' => $destNation['nation']]); $testCommand = new static($generalObj, $this->env, $testTurn, ['destNationID' => $destNation['nation']]); - if ($testCommand->hasFullConditionMet()) { - $destNation['availableCommand'] = true; - } else { - $destNation['availableCommand'] = false; + + $nationTarget = [ + 'id' => $destNation['nation'], + 'name' => $destNation['name'], + 'color' => $destNation['color'], + 'power' => $destNation['power'], + ]; + if (!$testCommand->hasFullConditionMet()) { + $nationTarget['notAvailable'] = true; + } + if ($destNation['nation'] == $nationID) { + $nationTarget['notAvailable'] = true; } - $nationList[] = $destNation; + $nationList[] = $nationTarget; } - - ob_start(); -?> -
- 선택된 국가에 급습을 발동합니다.
- 선포, 전쟁중인 상대국에만 가능합니다.
- 상대 국가를 목록에서 선택하세요.
- 배경색은 현재 급습 불가능 국가는 붉은색으로 표시됩니다.
- - \sammo\getMapTheme(), + 'procRes' => [ + 'nations' => $nationList + ], + ]; } + + + } diff --git a/hwe/sammo/Command/Nation/che_발령.php b/hwe/sammo/Command/Nation/che_발령.php index 6efd3be9..536276df 100644 --- a/hwe/sammo/Command/Nation/che_발령.php +++ b/hwe/sammo/Command/Nation/che_발령.php @@ -187,57 +187,4 @@ class che_발령 extends Command\NationCommand ] ]; } - - public function getJSPlugins(): array - { - return [ - 'defaultSelectCityByMap' - ]; - } - - public function getForm(): string - { - $db = DB::db(); - - $nationID = $this->generalObj->getNationID(); - - $troops = Util::convertArrayToDict($db->query('SELECT * FROM troop WHERE nation=%i', $nationID), 'troop_leader'); - $destRawGenerals = $db->query('SELECT no,name,officer_level,npc,gold,rice,leadership,strength,intel,city,crew,train,atmos,troop FROM general WHERE nation = %i ORDER BY npc,binary(name)', $nationID); - $destGeneralList = []; - foreach ($destRawGenerals as $destGeneral) { - $nameColor = \sammo\getNameColor($destGeneral['npc']); - if ($nameColor) { - $nameColor = " style='color:{$nameColor}'"; - } - - $name = $destGeneral['name']; - if ($destGeneral['officer_level'] >= 5) { - $name = "*{$name}*"; - } - - $destGeneral['name'] = $name; - $destGeneral['color'] = $nameColor; - $destGeneralList[] = $destGeneral; - } - ob_start(); -?> -
- 선택된 도시로 아국 장수를 발령합니다.
- 아국 도시로만 발령이 가능합니다.
- 목록을 선택하거나 도시를 클릭하세요.
- -
-
- -