vue: NPCControl(WIP)
This commit is contained in:
@@ -32,7 +32,7 @@ class AutorunNationPolicy {
|
|||||||
static $선전포고 = '선전포고';
|
static $선전포고 = '선전포고';
|
||||||
static $천도 = '천도';
|
static $천도 = '천도';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//실제 행동
|
//실제 행동
|
||||||
static public $defaultPriority = [
|
static public $defaultPriority = [
|
||||||
@@ -141,7 +141,6 @@ class AutorunNationPolicy {
|
|||||||
public $minNPCWarLeadership = 40;
|
public $minNPCWarLeadership = 40;
|
||||||
public $minWarCrew = 1500;
|
public $minWarCrew = 1500;
|
||||||
|
|
||||||
public $allowNpcAttackCity = true;
|
|
||||||
public $minNPCRecruitCityPopulation = 50000;
|
public $minNPCRecruitCityPopulation = 50000;
|
||||||
public $safeRecruitCityPopulationRatio = 0.5;
|
public $safeRecruitCityPopulationRatio = 0.5;
|
||||||
public $properWarTrainAtmos = 90;
|
public $properWarTrainAtmos = 90;
|
||||||
@@ -163,13 +162,12 @@ class AutorunNationPolicy {
|
|||||||
'reqNPCWarRice'=>0,
|
'reqNPCWarRice'=>0,
|
||||||
'reqNPCDevelGold'=>0,
|
'reqNPCDevelGold'=>0,
|
||||||
'reqNPCDevelRice'=>500,
|
'reqNPCDevelRice'=>500,
|
||||||
|
|
||||||
'minimumResourceActionAmount'=>1000,
|
'minimumResourceActionAmount'=>1000,
|
||||||
|
|
||||||
'minNPCWarLeadership'=>40,
|
'minNPCWarLeadership'=>40,
|
||||||
'minWarCrew'=>1500,
|
'minWarCrew'=>1500,
|
||||||
|
|
||||||
'allowNpcAttackCity'=>true,
|
|
||||||
'minNPCRecruitCityPopulation'=>50000,
|
'minNPCRecruitCityPopulation'=>50000,
|
||||||
'safeRecruitCityPopulationRatio'=>0.5,
|
'safeRecruitCityPopulationRatio'=>0.5,
|
||||||
'properWarTrainAtmos'=>90,
|
'properWarTrainAtmos'=>90,
|
||||||
@@ -194,7 +192,7 @@ class AutorunNationPolicy {
|
|||||||
$this->priority = $serverPolicy['priority'];
|
$this->priority = $serverPolicy['priority'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($nationPolicy){
|
if($nationPolicy){
|
||||||
foreach($nationPolicy['values']??[] as $policy=>$value){
|
foreach($nationPolicy['values']??[] as $policy=>$value){
|
||||||
@@ -209,7 +207,7 @@ class AutorunNationPolicy {
|
|||||||
$this->priority = $nationPolicy['priority'];
|
$this->priority = $nationPolicy['priority'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!$this->priority){
|
if(!$this->priority){
|
||||||
$this->priority = $this::$defaultPriority;
|
$this->priority = $this::$defaultPriority;
|
||||||
@@ -259,26 +257,26 @@ class AutorunNationPolicy {
|
|||||||
if(!key_exists('chief', $aiOptions)){
|
if(!key_exists('chief', $aiOptions)){
|
||||||
$this->can부대전방발령 = false;
|
$this->can부대전방발령 = false;
|
||||||
$this->can부대후방발령 = false;
|
$this->can부대후방발령 = false;
|
||||||
|
|
||||||
$this->can부대유저장후방발령 = false;
|
$this->can부대유저장후방발령 = false;
|
||||||
$this->can유저장후방발령 = false;
|
$this->can유저장후방발령 = false;
|
||||||
$this->can유저장전방발령 = false;
|
$this->can유저장전방발령 = false;
|
||||||
$this->can유저장구출발령 = false;
|
$this->can유저장구출발령 = false;
|
||||||
$this->can유저장내정발령 = false;
|
$this->can유저장내정발령 = false;
|
||||||
|
|
||||||
$this->canNPC후방발령 = false;
|
$this->canNPC후방발령 = false;
|
||||||
$this->canNPC전방발령 = false;
|
$this->canNPC전방발령 = false;
|
||||||
$this->canNPC구출발령 = false;
|
$this->canNPC구출발령 = false;
|
||||||
$this->canNPC내정발령 = false;
|
$this->canNPC내정발령 = false;
|
||||||
|
|
||||||
$this->can유저장긴급포상 = false;
|
$this->can유저장긴급포상 = false;
|
||||||
$this->can유저장포상 = false;
|
$this->can유저장포상 = false;
|
||||||
//$this->can유저장몰수 = false;
|
//$this->can유저장몰수 = false;
|
||||||
|
|
||||||
$this->canNPC긴급포상 = false;
|
$this->canNPC긴급포상 = false;
|
||||||
$this->canNPC포상 = false;
|
$this->canNPC포상 = false;
|
||||||
$this->canNPC몰수 = false;
|
$this->canNPC몰수 = false;
|
||||||
|
|
||||||
$this->can선전포고 = false;
|
$this->can선전포고 = false;
|
||||||
$this->can천도 = false;
|
$this->can천도 = false;
|
||||||
}
|
}
|
||||||
|
|||||||
+356
-482
@@ -3,493 +3,281 @@
|
|||||||
<div
|
<div
|
||||||
id="container"
|
id="container"
|
||||||
class="tb_layout bg0"
|
class="tb_layout bg0"
|
||||||
style="width: 1000px; margin: auto; border: solid 1px #888888"
|
:style="{ width: '1000px', margin: 'auto', border: 'solid 1px #888888' }"
|
||||||
>
|
>
|
||||||
<div class="bg1 section_bar">국가 정책</div>
|
<div class="bg1 section_bar">국가 정책</div>
|
||||||
<div class="text-right px-3">
|
<div class="text-right px-3">
|
||||||
<small class="form-text text-muted">
|
<small class="form-text text-muted">
|
||||||
최근 설정:
|
최근 설정:
|
||||||
{{ rawNationPolicy.valueSetter ?? "-없음-" }}
|
{{ nationPolicy.valueSetter ?? "-없음-" }}
|
||||||
({{ rawNationPolicy.valueSetTime ?? "설정 기록 없음" }})
|
({{ nationPolicy.valueSetTime ?? "설정 기록 없음" }})
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="form_list">
|
<div class="form_list">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="row">
|
<NumberInputWithInfo
|
||||||
<label for="reqNationGold" class="col-sm-6 col-form-label"
|
v-model="nationPolicy.reqNationGold"
|
||||||
>국가 권장 금</label
|
:step="100"
|
||||||
>
|
title="국가 권장 금"
|
||||||
<div class="col-sm-6">
|
>이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상
|
||||||
<input
|
제외)</NumberInputWithInfo
|
||||||
type="number"
|
>
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="reqNationGold"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상 제외)</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.reqNationRice"
|
||||||
|
:step="100"
|
||||||
|
title="국가 권장 쌀"
|
||||||
|
>이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상
|
||||||
|
제외)</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.reqHumanWarUrgentGold"
|
||||||
|
:step="100"
|
||||||
|
title="유저전투장 긴급포상 금"
|
||||||
|
>유저장긴급포상시 이보다 금이 적은 장수에게 포상합니다.<br />0이면
|
||||||
|
보병 6회 징병({{ (defaultStatMax * 100).toLocaleString() }} * 6)
|
||||||
|
가능한 금을 기준으로 하며, 그 수치는 현재
|
||||||
|
{{
|
||||||
|
zeroPolicy.reqHumanWarUrgentGold.toLocaleString()
|
||||||
|
}}입니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.reqHumanWarUrgentRice"
|
||||||
|
:step="100"
|
||||||
|
title="유저전투장 긴급포상 금"
|
||||||
|
>유저장긴급포상시 이보다 쌀이 적은 장수에게 포상합니다.<br />0이면
|
||||||
|
기본 병종으로 {{ (defaultStatMax * 100).toLocaleString() }} * 6명
|
||||||
|
사살 가능한 쌀을 기준으로 하며, 그 수치는 현재
|
||||||
|
{{
|
||||||
|
zeroPolicy.reqHumanWarUrgentRice.toLocaleString()
|
||||||
|
}}입니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.reqHumanWarRecommandGold"
|
||||||
|
:step="100"
|
||||||
|
title="유저전투장 권장 금"
|
||||||
|
>유저전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br />
|
||||||
|
0이면 유저전투장 긴급포상 금의 2배를 기준으로 하며, 그 수치는 현재
|
||||||
|
{{
|
||||||
|
(calcPolicyValue("reqHumanWarUrgentGold") * 2).toLocaleString()
|
||||||
|
}}입니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.reqHumanWarRecommandRice"
|
||||||
|
:step="100"
|
||||||
|
title="유저전투장 권장 쌀"
|
||||||
|
>유저전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br />
|
||||||
|
0이면 유저전투장 긴급포상 쌀의 2배를 기준으로 하며, 그 수치는 현재
|
||||||
|
{{
|
||||||
|
(calcPolicyValue("reqHumanWarUrgentRice") * 2).toLocaleString()
|
||||||
|
}}입니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.reqHumanDevelGold"
|
||||||
|
:step="100"
|
||||||
|
title="유저내정장 권장 금"
|
||||||
|
>유저내정장에게 주는 금입니다. 이보다 적으면
|
||||||
|
포상합니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.reqHumanDevelRice"
|
||||||
|
:step="100"
|
||||||
|
title="유저내정장 권장 쌀"
|
||||||
|
>유저내정장에게 주는 쌀입니다. 이보다 적으면
|
||||||
|
포상합니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.reqNPCWarGold"
|
||||||
|
:step="100"
|
||||||
|
title="NPC전투장 권장 금"
|
||||||
|
>NPC전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br />
|
||||||
|
0이면 기본 병종 4회({{ (defaultStatNPCMax * 100).toLocaleString() }}
|
||||||
|
* 4) 징병비를 기준으로 하며, 그 수치는 현재
|
||||||
|
{{
|
||||||
|
zeroPolicy.reqNPCWarGold.toLocaleString()
|
||||||
|
}}입니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.reqNPCWarRice"
|
||||||
|
:step="100"
|
||||||
|
title="NPC전투장 권장 쌀"
|
||||||
|
>NPC전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br />
|
||||||
|
0이면 기본 병종으로
|
||||||
|
{{ (defaultStatNPCMax * 100).toLocaleString() }} * 4명 사살 가능한
|
||||||
|
쌀을 기준으로 하며, 그 수치는 현재
|
||||||
|
{{
|
||||||
|
zeroPolicy.reqNPCWarRice.toLocaleString()
|
||||||
|
}}입니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.reqNPCDevelGold"
|
||||||
|
:step="100"
|
||||||
|
title="NPC내정장 권장 금"
|
||||||
|
>NPC내정장에게 주는 금입니다. 이보다 5배 더 많다면 헌납합니다.<br />0이면
|
||||||
|
30턴 내정 가능한 금을 기준으로 하며, 그 수치는 현재
|
||||||
|
{{ zeroPolicy.reqNPCDevelGold }}입니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.reqNPCDevelRice"
|
||||||
|
:step="100"
|
||||||
|
title="NPC내정장 권장 쌀"
|
||||||
|
>NPC내정장에게 주는 쌀입니다. 이보다 5배 더 많다면
|
||||||
|
헌납합니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.minimumResourceActionAmount"
|
||||||
|
:step="100"
|
||||||
|
title="포상/몰수/헌납/삼/팜 최소 단위"
|
||||||
|
>연산결과가 이 단위보다 적다면 수행하지
|
||||||
|
않습니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.minWarCrew"
|
||||||
|
:step="50"
|
||||||
|
title="최소 전투 가능 병력 수"
|
||||||
|
>이보다 적을 때에는 징병을 시도합니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.minNPCRecruitCityPopulation"
|
||||||
|
:step="100"
|
||||||
|
title="NPC 최소 징병 가능 인구 수"
|
||||||
|
>도시의 인구가 이보다 낮으면 NPC는 도시에서 징병하지 않고 후방
|
||||||
|
워프합니다.<br />NPC의 최대 병력수보다 낮게 설정하면 제자리에서
|
||||||
|
정착장려를 합니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
:modelValue="nationPolicy.safeRecruitCityPopulationRatio * 100"
|
||||||
|
@update:modelValue="
|
||||||
|
nationPolicy.safeRecruitCityPopulationRatio = $event / 100
|
||||||
|
"
|
||||||
|
:step="0.5"
|
||||||
|
:int="false"
|
||||||
|
:min="0"
|
||||||
|
:max="100"
|
||||||
|
title="제자리 징병 허용 인구율(%)"
|
||||||
|
>전쟁 시 후방 발령, 후방 워프의 기준 인구입니다. 이보다 많다면
|
||||||
|
'충분하다'고 판단합니다.<br />NPC의 최대 병력수보다 낮게 설정하면
|
||||||
|
제자리에서 정착장려를 합니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.minNPCWarLeadership"
|
||||||
|
:step="5"
|
||||||
|
title="NPC 전투 참여 통솔 기준"
|
||||||
|
>이 수치보다 같거나 높으면 NPC전투장으로
|
||||||
|
분류됩니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.properWarTrainAtmos"
|
||||||
|
:step="5"
|
||||||
|
:min="20"
|
||||||
|
:max="100"
|
||||||
|
title="훈련/사기진작 목표치"
|
||||||
|
>훈련/사기진작 기준치입니다. 이보다 같거나 높으면
|
||||||
|
출병합니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--allowNpcAttackCity는 현재 게임 내 비활성-->
|
||||||
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqNationRice" class="col-sm-6 col-form-label"
|
|
||||||
>국가 권장 쌀</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="reqNationRice"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상 제외)</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqHumanWarUrgentGold" class="col-sm-6 col-form-label"
|
|
||||||
>유저전투장 긴급포상 금</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="reqHumanWarUrgentGold"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted">
|
|
||||||
유저장긴급포상시 이보다 금이 적은 장수에게 포상합니다.<br />0이면
|
|
||||||
보병 6회 징병({{ defaultStatMax * 100 }} * 6) 가능한 금을 기준으로
|
|
||||||
하며, 그 수치는 현재
|
|
||||||
{{ zeroPolicy.reqHumanWarUrgentGold }}입니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqHumanWarUrgentRice" class="col-sm-6 col-form-label"
|
|
||||||
>유저전투장 긴급포상 쌀</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="reqHumanWarUrgentRice"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>유저장긴급포상시 이보다 쌀이 적은 장수에게 포상합니다.<br />0이면
|
|
||||||
기본 병종으로 {{ defaultStatMax * 100 * 6 }}명 사살 가능한 쌀을
|
|
||||||
기준으로 하며, 그 수치는 현재
|
|
||||||
{{ zeroPolicy.reqHumanWarUrgentRice }}입니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label
|
|
||||||
for="reqHumanWarRecommandGold"
|
|
||||||
class="col-sm-6 col-form-label"
|
|
||||||
>유저전투장 권장 금</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="reqHumanWarRecommandGold"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>유저전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br />
|
|
||||||
0이면 유저전투장 긴급포상 금의 2배를 기준으로 하며, 그 수치는 현재
|
|
||||||
{{ nationPolicy.reqHumanWarRecommandGold }}입니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label
|
|
||||||
for="reqHumanWarRecommandRice"
|
|
||||||
class="col-sm-6 col-form-label"
|
|
||||||
>유저전투장 권장 쌀</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="reqHumanWarRecommandRice"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>유저전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br />
|
|
||||||
0이면 유저전투장 긴급포상 쌀의 2배를 기준으로 하며, 그 수치는 현재
|
|
||||||
{{ nationPolicy.reqHumanWarRecommandRice }}입니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqHumanDevelGold" class="col-sm-6 col-form-label"
|
|
||||||
>유저내정장 권장 금</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="reqHumanDevelGold"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>유저내정장에게 주는 금입니다. 이보다 적으면 포상합니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqHumanDevelRice" class="col-sm-6 col-form-label"
|
|
||||||
>유저내정장 권장 쌀</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="reqHumanDevelRice"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>유저내정장에게 주는 쌀입니다. 이보다 적으면 포상합니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqNPCWarGold" class="col-sm-6 col-form-label"
|
|
||||||
>NPC전투장 권장 금</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="reqNPCWarGold"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>NPC전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br />
|
|
||||||
0이면 기본 병종 4회({{ defaultStatNPCMax * 100 }}
|
|
||||||
* 4) 징병비를 기준으로 하며, 그 수치는 현재
|
|
||||||
{{ nationPolicy.reqNPCWarGold }}입니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqNPCWarRice" class="col-sm-6 col-form-label"
|
|
||||||
>NPC전투장 권장 쌀</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="reqNPCWarRice"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>NPC전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br />
|
|
||||||
0이면 기본 병종으로
|
|
||||||
{{ defaultStatNPCMax * 100 * 4 }}명 사살 가능한 쌀을 기준으로
|
|
||||||
하며, 그 수치는 현재 {{ nationPolicy.reqNPCWarRice }}입니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqNPCDevelGold" class="col-sm-6 col-form-label"
|
|
||||||
>NPC내정장 권장 금</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="reqNPCDevelGold"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>NPC내정장에게 주는 금입니다. 이보다 5배 더 많다면 헌납합니다.<br />0이면
|
|
||||||
30턴 내정 가능한 금을 기준으로 하며, 그 수치는 현재
|
|
||||||
{{ nationPolicy.reqNPCDevelGold }}입니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqNPCDevelRice" class="col-sm-6 col-form-label"
|
|
||||||
>NPC내정장 권장 쌀</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="reqNPCDevelRice"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>NPC내정장에게 주는 쌀입니다. 이보다 5배 더 많다면
|
|
||||||
헌납합니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label
|
|
||||||
for="minimumResourceActionAmount"
|
|
||||||
class="col-sm-6 col-form-label"
|
|
||||||
>포상/몰수/헌납/삼/팜 최소 단위</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="minimumResourceActionAmount"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>연산결과가 이 단위보다 적다면 수행하지 않습니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="minWarCrew" class="col-sm-6 col-form-label"
|
|
||||||
>최소 전투 가능 병력 수</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="minWarCrew"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>이보다 적을 때에는 징병을 시도합니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label
|
|
||||||
for="minNPCRecruitCityPopulation"
|
|
||||||
class="col-sm-6 col-form-label"
|
|
||||||
>NPC 최소 징병 가능 인구 수</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="minNPCRecruitCityPopulation"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>이보다 낮으면 NPC는 도시에서 징병하지 않고 후방
|
|
||||||
워프합니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label
|
|
||||||
for="safeRecruitCityPopulationRatio"
|
|
||||||
class="col-sm-6 col-form-label"
|
|
||||||
>제자리 징병 허용 인구율(%)</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="percent"
|
|
||||||
id="safeRecruitCityPopulationRatio"
|
|
||||||
min="0"
|
|
||||||
max="100"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>전쟁 시 후방 발령, 후방 워프의 기준 인구입니다. 이보다 많다면
|
|
||||||
'충분하다'고 판단합니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="minNPCWarLeadership" class="col-sm-6 col-form-label"
|
|
||||||
>NPC 전투 참여 통솔 기준</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="minNPCWarLeadership"
|
|
||||||
min="0"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>이 수치보다 같거나 높으면 NPC전투장으로 분류됩니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="properWarTrainAtmos" class="col-sm-6 col-form-label"
|
|
||||||
>훈련/사기진작 목표치</label
|
|
||||||
>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
class="form-control"
|
|
||||||
data-type="integer"
|
|
||||||
id="properWarTrainAtmos"
|
|
||||||
min="0"
|
|
||||||
max="100"
|
|
||||||
value="0"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<small class="form-text text-muted"
|
|
||||||
>훈련/사기진작 기준치입니다. 이보다 같거나 높으면
|
|
||||||
출병합니다.</small
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="alert alert-secondary">
|
<div class="alert alert-secondary">
|
||||||
전투 부대는 작업중입니다(json양식:
|
전투 부대는 작업중입니다(json양식:
|
||||||
{부대번호:[시작도시번호(아국),도착도시번호(적군)],...})<br />
|
{부대번호:[시작도시번호(아국),도착도시번호(적군)],...})<br />
|
||||||
후방 징병 부대는 작업중입니다(json양식: [부대번호,...])<br />
|
후방 징병 부대는 작업중입니다(json양식: [부대번호,...])<br />
|
||||||
내정 부대는 작업중입니다(json양식: [부대번호,...])
|
내정 부대는 작업중입니다(json양식: [부대번호,...])
|
||||||
<input type="hidden" value="{}" data-type="json" id="CombatForce" />
|
|
||||||
<input type="hidden" value="[]" data-type="json" id="SupportForce" />
|
|
||||||
<input type="hidden" value="[]" data-type="json" id="DevelopForce" />
|
|
||||||
<input
|
<input
|
||||||
type="hidden"
|
type="hidden"
|
||||||
value="true"
|
:value="JSON.stringify(nationPolicy.CombatForce)"
|
||||||
data-type="json"
|
data-type="json"
|
||||||
id="allowNpcAttackCity"
|
id="CombatForce"
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
type="hidden"
|
||||||
|
:value="JSON.stringify(nationPolicy.SupportForce)"
|
||||||
|
data-type="json"
|
||||||
|
id="SupportForce"
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
type="hidden"
|
||||||
|
:value="JSON.stringify(nationPolicy.DevelopForce)"
|
||||||
|
data-type="json"
|
||||||
|
id="DevelopForce"
|
||||||
/>
|
/>
|
||||||
<!--allowNpcAttackCity는 현재 게임 내 비활성-->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="control_bar" data-type="nationPolicy">
|
</div>
|
||||||
<div class="btn-group" role="group">
|
<div class="control_bar" data-type="nationPolicy">
|
||||||
<button type="button" class="btn btn-dark reset_btn">
|
<div class="btn-group" role="group">
|
||||||
초기값으로
|
<button
|
||||||
</button>
|
type="button"
|
||||||
<button type="button" class="btn btn-secondary revert_btn">
|
@click="resetPolicy"
|
||||||
이전값으로
|
class="btn btn-dark reset_btn"
|
||||||
</button>
|
>
|
||||||
</div>
|
초기값으로
|
||||||
<button type="button" class="btn btn-primary submit_btn">설정</button>
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
@click="rollbackPolicy"
|
||||||
|
class="btn btn-secondary revert_btn"
|
||||||
|
>
|
||||||
|
이전값으로
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
@click="submitPolicy"
|
||||||
|
class="btn btn-primary submit_btn"
|
||||||
|
>
|
||||||
|
설정
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6 half_section_left">
|
<div class="col-sm-6 half_section_left">
|
||||||
@@ -497,8 +285,8 @@
|
|||||||
<div class="float-right px-3">
|
<div class="float-right px-3">
|
||||||
<small class="form-text text-muted">
|
<small class="form-text text-muted">
|
||||||
최근 설정:
|
최근 설정:
|
||||||
{{ rawNationPolicy.prioritySetter ?? "-없음-" }}
|
{{ chiefActionPriority.prioritySetter ?? "-없음-" }}
|
||||||
({{ rawNationPolicy.prioritySetTime ?? "설정 기록 없음" }})
|
({{ chiefActionPriority.prioritySetTime ?? "설정 기록 없음" }})
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-left px-2">
|
<div class="text-left px-2">
|
||||||
@@ -597,7 +385,17 @@
|
|||||||
import { defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
import "../scss/bootstrap5.scss";
|
import "../scss/bootstrap5.scss";
|
||||||
import "../scss/game_bg.scss";
|
import "../scss/game_bg.scss";
|
||||||
import { NationPolicy, NPCChiefActions, NPCGeneralActions } from "./defs";
|
import {
|
||||||
|
InvalidResponse,
|
||||||
|
NationPolicy,
|
||||||
|
NPCChiefActions,
|
||||||
|
NPCGeneralActions,
|
||||||
|
} from "./defs";
|
||||||
|
import NumberInputWithInfo from "./components/NumberInputWithInfo.vue";
|
||||||
|
import { cloneDeep, isEqual, last } from "lodash";
|
||||||
|
import { unwrap } from "./util/unwrap";
|
||||||
|
import { convertFormData } from "./util/convertFormData";
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
declare const nationID: number;
|
declare const nationID: number;
|
||||||
|
|
||||||
@@ -605,6 +403,9 @@ declare const defaultNationPolicy: NationPolicy;
|
|||||||
declare const currentNationPolicy: NationPolicy;
|
declare const currentNationPolicy: NationPolicy;
|
||||||
declare const defaultNationPriority: NationPolicy;
|
declare const defaultNationPriority: NationPolicy;
|
||||||
|
|
||||||
|
declare const zeroPolicy: NationPolicy;
|
||||||
|
declare const autoPolicy: NationPolicy;
|
||||||
|
|
||||||
declare const currentNationPriority: NPCChiefActions[];
|
declare const currentNationPriority: NPCChiefActions[];
|
||||||
declare const availableNationPriorityItems: NPCChiefActions[];
|
declare const availableNationPriorityItems: NPCChiefActions[];
|
||||||
declare const defaultGeneralActionPriority: NPCChiefActions[];
|
declare const defaultGeneralActionPriority: NPCChiefActions[];
|
||||||
@@ -613,24 +414,97 @@ declare const currentGeneralActionPriority: NPCGeneralActions[];
|
|||||||
declare const availableGeneralActionPriorityItems: NPCGeneralActions[];
|
declare const availableGeneralActionPriorityItems: NPCGeneralActions[];
|
||||||
|
|
||||||
declare const defaultStatNPCMax: number;
|
declare const defaultStatNPCMax: number;
|
||||||
|
declare const defaultStatMax: number;
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "NPCControl",
|
name: "NPCControl",
|
||||||
data(){
|
components: {
|
||||||
return {
|
NumberInputWithInfo,
|
||||||
nationID,
|
},
|
||||||
defaultStatNPCMax,
|
methods: {
|
||||||
nationPolicy: currentNationPolicy,
|
resetPolicy() {
|
||||||
|
this.nationPolicy = cloneDeep(defaultNationPolicy);
|
||||||
chiefActionPriority: currentNationPriority,
|
//TODO: toast
|
||||||
//chiefActionUnused: [],
|
},
|
||||||
generalActionPriority: currentGeneralActionPriority,
|
rollbackPolicy() {
|
||||||
//generalActionUnsed: [],
|
if (!confirm("이전 설정으로 되돌릴까요?")) {
|
||||||
|
return;
|
||||||
displayOrder: [
|
|
||||||
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
}
|
let lastPolicy = unwrap(last(this.nationPolicyStack));
|
||||||
|
while (this.nationPolicyStack.length > 1) {
|
||||||
|
if (!isEqual(lastPolicy, this.nationPolicy)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
this.nationPolicyStack.pop();
|
||||||
|
lastPolicy = unwrap(last(this.nationPolicyStack));
|
||||||
|
}
|
||||||
|
this.nationPolicy = cloneDeep(lastPolicy);
|
||||||
|
//TODO: toast
|
||||||
|
},
|
||||||
|
async submitPolicy() {
|
||||||
|
if (!confirm("저장할까요?")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await axios({
|
||||||
|
url: "j_set_npc_control.php",
|
||||||
|
responseType: "json",
|
||||||
|
method: "post",
|
||||||
|
data: convertFormData({
|
||||||
|
type: "nationPolicy",
|
||||||
|
data: JSON.stringify(this.nationPolicy),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
const result: InvalidResponse = response.data;
|
||||||
|
if (!result.result) {
|
||||||
|
throw result.reason;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
//TODO: toast
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO: submit
|
||||||
|
//TODO: toast
|
||||||
|
const lastPolicy = unwrap(last(this.nationPolicyStack));
|
||||||
|
if (!isEqual(lastPolicy, this.nationPolicy)) {
|
||||||
|
const { nationPolicy } = this;
|
||||||
|
this.nationPolicyStack.push(cloneDeep(nationPolicy));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
calcPolicyValue(
|
||||||
|
title: keyof NationPolicy
|
||||||
|
): NationPolicy[keyof NationPolicy] {
|
||||||
|
if (!(title in this.nationPolicy)) {
|
||||||
|
throw `${title}이 NationPolicy key가 아님`;
|
||||||
|
}
|
||||||
|
if (this.nationPolicy[title] == 0) {
|
||||||
|
return this.zeroPolicy[title];
|
||||||
|
}
|
||||||
|
return this.nationPolicy[title];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
reqNationGold: 110,
|
||||||
|
|
||||||
|
nationID,
|
||||||
|
defaultStatMax,
|
||||||
|
defaultStatNPCMax,
|
||||||
|
nationPolicy: cloneDeep(currentNationPolicy),
|
||||||
|
nationPolicyStack: [currentNationPolicy],
|
||||||
|
zeroPolicy,
|
||||||
|
autoPolicy,
|
||||||
|
|
||||||
|
chiefActionPriority: cloneDeep(currentNationPriority),
|
||||||
|
//chiefActionUnused: [],
|
||||||
|
generalActionPriority: cloneDeep(currentGeneralActionPriority),
|
||||||
|
//generalActionUnsed: [],
|
||||||
|
|
||||||
|
displayOrder: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row form-group">
|
<div class="row form-group number-input-with-info">
|
||||||
<label :for="arg" class="col-sm-6 col-form-label">{{ title }}</label>
|
<label class="col-sm-6 col-form-label">{{ title }}</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<input
|
<input
|
||||||
ref="input"
|
ref="input"
|
||||||
:id="arg"
|
|
||||||
type="number"
|
type="number"
|
||||||
:step="step ?? undefined"
|
:step="step ?? undefined"
|
||||||
v-model="rawValue"
|
v-model="rawValue"
|
||||||
@@ -39,10 +38,6 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
arg: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
@@ -50,6 +45,7 @@ export default defineComponent({
|
|||||||
min: {
|
min: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: false,
|
required: false,
|
||||||
|
default: 0,
|
||||||
},
|
},
|
||||||
max: {
|
max: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@@ -64,7 +60,7 @@ export default defineComponent({
|
|||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
emits: ["input"],
|
emits: ["update:modelValue"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editmode: false,
|
editmode: false,
|
||||||
@@ -72,13 +68,19 @@ export default defineComponent({
|
|||||||
printValue: this.modelValue.toLocaleString(),
|
printValue: this.modelValue.toLocaleString(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch:{
|
||||||
|
modelValue: function(newVal:number){
|
||||||
|
this.rawValue = newVal;
|
||||||
|
this.printValue = newVal.toLocaleString();
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
updateValue() {
|
updateValue() {
|
||||||
if (this.int) {
|
if (this.int) {
|
||||||
this.rawValue = Math.floor(this.rawValue);
|
this.rawValue = Math.floor(this.rawValue);
|
||||||
}
|
}
|
||||||
this.printValue = this.rawValue.toLocaleString();
|
this.printValue = this.rawValue.toLocaleString();
|
||||||
this.$emit("input", this.rawValue);
|
this.$emit("update:modelValue", this.rawValue);
|
||||||
},
|
},
|
||||||
onBlurNumber() {
|
onBlurNumber() {
|
||||||
this.editmode = false;
|
this.editmode = false;
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ export type NationPolicy = {
|
|||||||
minimumResourceActionAmount: number,
|
minimumResourceActionAmount: number,
|
||||||
minNPCWarLeadership: number,
|
minNPCWarLeadership: number,
|
||||||
minWarCrew: number,
|
minWarCrew: number,
|
||||||
allowNpcAttackCity: true,
|
|
||||||
minNPCRecruitCityPopulation: number,
|
minNPCRecruitCityPopulation: number,
|
||||||
safeRecruitCityPopulationRatio: number,
|
safeRecruitCityPopulationRatio: number,
|
||||||
properWarTrainAtmos: number,
|
properWarTrainAtmos: number,
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
import { isArray, isString, isNumber, isBoolean } from "lodash";
|
import { isArray, isString, isNumber, isBoolean } from "lodash";
|
||||||
|
|
||||||
export function convertFormData(values: Record<string, null|number[]|string[]|boolean[]|number|string|boolean>): FormData{
|
export function convertFormData(values: Record<string, null | number[] | string[] | boolean[] | number | string | boolean>): FormData {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
|
|
||||||
const simpleConv = (v: unknown, key: string):string=>{
|
const simpleConv = (v: unknown, key: string): string => {
|
||||||
if(isString(v)){
|
if (isString(v)) {
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
if(isNumber(v)){
|
if (isNumber(v)) {
|
||||||
return v.toString();
|
return v.toString();
|
||||||
}
|
}
|
||||||
if(isBoolean(v)){
|
if (isBoolean(v)) {
|
||||||
return v?'true':'false';
|
return v ? 'true' : 'false';
|
||||||
}
|
}
|
||||||
if(v===null){
|
if (v === null) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
throw new TypeError(`지원하지 않는 formData Type: ${key}`);
|
throw new TypeError(`지원하지 않는 formData Type: ${key}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(const [key, value] of Object.entries(values)){
|
for (const [key, value] of Object.entries(values)) {
|
||||||
if(isArray(value)){
|
if (isArray(value)) {
|
||||||
const arrKey = `${key}[]`;
|
const arrKey = `${key}[]`;
|
||||||
for(const subValue of value){
|
for (const subValue of value) {
|
||||||
formData.append(arrKey, simpleConv(subValue, key));
|
formData.append(arrKey, simpleConv(subValue, key));
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import NPCControl from './NPCControl.vue';
|
import NPCControl from './NPCControl.vue';
|
||||||
|
import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest';
|
||||||
|
|
||||||
|
setAxiosXMLHttpRequest();
|
||||||
createApp(NPCControl).mount('#app')
|
createApp(NPCControl).mount('#app')
|
||||||
+22
-295
@@ -76,307 +76,34 @@ $zeroPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['optio
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?= UniqueConst::$serverName ?>: 임시 NPC 정책</title>
|
<title><?= UniqueConst::$serverName ?>: 임시 NPC 정책</title>
|
||||||
<?=WebUtil::printStaticValues([
|
<?= WebUtil::printStaticValues([
|
||||||
'nationID'=>$nationID,
|
'nationID' => $nationID,
|
||||||
'defaultNationPolicy'=>$defaultNationPolicy,
|
'defaultNationPolicy' => $defaultNationPolicy,
|
||||||
'currentNationPolicy'=>$currentNationPolicy,
|
'currentNationPolicy' => $currentNationPolicy,
|
||||||
|
'zeroPolicy' => $zeroPolicy,
|
||||||
|
'autoPolicy' => $autoPolicy,
|
||||||
|
|
||||||
'defaultNationPriority'=>$defaultNationPriority,
|
'defaultNationPriority' => $defaultNationPriority,
|
||||||
'currentNationPriority'=>$currentNationPriority,
|
'currentNationPriority' => $currentNationPriority,
|
||||||
'availableNationPriorityItems'=>AutorunNationPolicy::$defaultPriority,
|
'availableNationPriorityItems' => AutorunNationPolicy::$defaultPriority,
|
||||||
|
|
||||||
'defaultGeneralActionPriority'=>$defaultGeneralActionPriority,
|
'defaultGeneralActionPriority' => $defaultGeneralActionPriority,
|
||||||
'currentGeneralActionPriority'=>$currentGeneralActionPriority,
|
'currentGeneralActionPriority' => $currentGeneralActionPriority,
|
||||||
'availableGeneralActionPriorityItems'=>AutorunGeneralPolicy::$default_priority,
|
'availableGeneralActionPriorityItems' => AutorunGeneralPolicy::$default_priority,
|
||||||
|
|
||||||
'defaultStatNPCMax'=>GameConst::$defaultStatNPCMax,
|
'defaultStatNPCMax' => GameConst::$defaultStatNPCMax,
|
||||||
])?>
|
'defaultStatMax' => GameConst::$defaultStatMax,
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
]) ?>
|
||||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
<?= WebUtil::printCSS('dist_css/common_vue.css') ?>
|
||||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
<?= WebUtil::printCSS('dist_css/v_NPCControl.css') ?>
|
||||||
<?= WebUtil::printJS('../e_lib/jquery_toast/toast.js') ?>
|
<?= WebUtil::printJS('../d_shared/common_path.js', true) ?>
|
||||||
<?= WebUtil::printJS('../e_lib/Sortable.min.js') ?>
|
<?= WebUtil::printJS('dist_js/vendors_vue.js', true) ?>
|
||||||
<?= WebUtil::printJS('../e_lib/jquery-sortable.js') ?>
|
<?= WebUtil::printJS('dist_js/common_vue.js', true) ?>
|
||||||
<?= WebUtil::printJS('js/npc_control.js') ?>
|
<?= WebUtil::printJS('dist_js/v_NPCControl.js', true) ?>
|
||||||
|
|
||||||
<?= WebUtil::printCSS('../e_lib/bootstrap.min.css') ?>
|
|
||||||
<?= WebUtil::printCSS('../e_lib/font_awesome/css/all.min.css') ?>
|
|
||||||
<?= WebUtil::printCSS('../e_lib/jquery_toast/toast.css') ?>
|
|
||||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
|
||||||
<?= WebUtil::printCSS('css/common.css') ?>
|
|
||||||
<?= WebUtil::printCSS('css/npc_control.css') ?>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id='container' class='tb_layout bg0' style='width:1000px;margin:auto;border:solid 1px #888888;'>
|
<div id='app'>
|
||||||
<div class='tb_layout bg0'>임시 NPC 정책<br>
|
|
||||||
<?= backButton() ?></div>
|
|
||||||
|
|
||||||
<div class='bg1 section_bar'>국가 정책</div>
|
|
||||||
<div class="text-right px-3"><small class="form-text text-muted">
|
|
||||||
최근 설정: <?= $rawNationPolicy['valueSetter'] ?? '-없음-' ?> (<?= $rawNationPolicy['valueSetTime'] ?? '설정 기록 없음' ?>)
|
|
||||||
</small></div>
|
|
||||||
<div class="form_list">
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqNationGold" class="col-sm-6 col-form-label">국가 권장 금</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="reqNationGold" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상 제외)</small></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqNationRice" class="col-sm-6 col-form-label">국가 권장 쌀</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="reqNationRice" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">이보다 많으면 포상, 적으면 몰수/헌납합니다.(긴급포상 제외)</small></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqHumanWarUrgentGold" class="col-sm-6 col-form-label">유저전투장 긴급포상 금</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="reqHumanWarUrgentGold" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">
|
|
||||||
유저장긴급포상시 이보다 금이 적은 장수에게 포상합니다.<br>
|
|
||||||
0이면 보병 6회 징병(<?= number_format(GameConst::$defaultStatMax * 100) ?> * 6) 가능한 금을 기준으로 하며, 그 수치는 현재 <?= number_format($zeroPolicy->reqHumanWarUrgentGold) ?>입니다.</small></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqHumanWarUrgentRice" class="col-sm-6 col-form-label">유저전투장 긴급포상 쌀</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="reqHumanWarUrgentRice" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">유저장긴급포상시 이보다 쌀이 적은 장수에게 포상합니다.<br>0이면 기본 병종으로 <?= number_format(GameConst::$defaultStatMax * 100 * 6) ?>명 사살 가능한 쌀을 기준으로 하며, 그 수치는 현재 <?= number_format($zeroPolicy->reqHumanWarUrgentRice) ?>입니다.</small></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqHumanWarRecommandGold" class="col-sm-6 col-form-label">유저전투장 권장 금</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="reqHumanWarRecommandGold" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">유저전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br>
|
|
||||||
0이면 유저전투장 긴급포상 금의 2배를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarRecommandGold) ?>입니다.</small></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqHumanWarRecommandRice" class="col-sm-6 col-form-label">유저전투장 권장 쌀</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="reqHumanWarRecommandRice" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">유저전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br>
|
|
||||||
0이면 유저전투장 긴급포상 쌀의 2배를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarRecommandRice) ?>입니다.</small></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqHumanDevelGold" class="col-sm-6 col-form-label">유저내정장 권장 금</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="reqHumanDevelGold" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">유저내정장에게 주는 금입니다. 이보다 적으면 포상합니다.</small></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqHumanDevelRice" class="col-sm-6 col-form-label">유저내정장 권장 쌀</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="reqHumanDevelRice" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">유저내정장에게 주는 쌀입니다. 이보다 적으면 포상합니다.</small></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqNPCWarGold" class="col-sm-6 col-form-label">NPC전투장 권장 금</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="reqNPCWarGold" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">NPC전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br>
|
|
||||||
0이면 기본 병종 4회(<?= number_format(GameConst::$defaultStatNPCMax * 100) ?> * 4) 징병비를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqNPCWarGold) ?>입니다.</small></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqNPCWarRice" class="col-sm-6 col-form-label">NPC전투장 권장 쌀</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="reqNPCWarRice" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">NPC전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br>
|
|
||||||
0이면 기본 병종으로 <?= number_format(GameConst::$defaultStatNPCMax * 100 * 4) ?>명 사살 가능한 쌀을 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqNPCWarRice) ?>입니다.</small></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqNPCDevelGold" class="col-sm-6 col-form-label">NPC내정장 권장 금</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="reqNPCDevelGold" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">NPC내정장에게 주는 금입니다. 이보다 5배 더 많다면 헌납합니다.<br>0이면 30턴 내정 가능한 금을 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqNPCDevelGold) ?>입니다.</small></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="reqNPCDevelRice" class="col-sm-6 col-form-label">NPC내정장 권장 쌀</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="reqNPCDevelRice" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">NPC내정장에게 주는 쌀입니다. 이보다 5배 더 많다면 헌납합니다.</small></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="minimumResourceActionAmount" class="col-sm-6 col-form-label">포상/몰수/헌납/삼/팜 최소 단위</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="minimumResourceActionAmount" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">연산결과가 이 단위보다 적다면 수행하지 않습니다.</small></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="minWarCrew" class="col-sm-6 col-form-label">최소 전투 가능 병력 수</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="minWarCrew" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">이보다 적을 때에는 징병을 시도합니다.</small></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="minNPCRecruitCityPopulation" class="col-sm-6 col-form-label">NPC 최소 징병 가능 인구 수</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="minNPCRecruitCityPopulation" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">이보다 낮으면 NPC는 도시에서 징병하지 않고 후방 워프합니다.</small></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="safeRecruitCityPopulationRatio" class="col-sm-6 col-form-label">제자리 징병 허용 인구율(%)</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="percent" id="safeRecruitCityPopulationRatio" min="0" max="100" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">전쟁 시 후방 발령, 후방 워프의 기준 인구입니다. 이보다 많다면 '충분하다'고 판단합니다.</small></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="minNPCWarLeadership" class="col-sm-6 col-form-label">NPC 전투 참여 통솔 기준</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="minNPCWarLeadership" min="0" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">이 수치보다 같거나 높으면 NPC전투장으로 분류됩니다.</small></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="row">
|
|
||||||
<label for="properWarTrainAtmos" class="col-sm-6 col-form-label">훈련/사기진작 목표치</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="number" class="form-control" data-type="integer" id="properWarTrainAtmos" min="0" max="100" value="0">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">훈련/사기진작 기준치입니다. 이보다 같거나 높으면 출병합니다.</small></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="alert alert-secondary">
|
|
||||||
전투 부대는 작업중입니다(json양식: {부대번호:[시작도시번호(아국),도착도시번호(적군)],...})<br>
|
|
||||||
후방 징병 부대는 작업중입니다(json양식: [부대번호,...])<br>
|
|
||||||
내정 부대는 작업중입니다(json양식: [부대번호,...])
|
|
||||||
<input type="hidden" value="{}" data-type="json" id="CombatForce">
|
|
||||||
<input type="hidden" value="[]" data-type="json" id="SupportForce">
|
|
||||||
<input type="hidden" value="[]" data-type="json" id="DevelopForce">
|
|
||||||
<input type="hidden" value="true" data-type="json" id="allowNpcAttackCity">
|
|
||||||
<!--allowNpcAttackCity는 현재 게임 내 비활성-->
|
|
||||||
</div>
|
|
||||||
<div class='control_bar' data-type="nationPolicy">
|
|
||||||
<div class="btn-group" role="group">
|
|
||||||
<button type="button" class="btn btn-dark reset_btn">초기값으로</button>
|
|
||||||
<button type="button" class="btn btn-secondary revert_btn">이전값으로</button>
|
|
||||||
</div><button type="button" class="btn btn-primary submit_btn">설정</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6 half_section_left">
|
|
||||||
<div class='bg1 section_bar'>NPC 사령턴 우선순위</div>
|
|
||||||
<div class="float-right px-3"><small class="form-text text-muted">
|
|
||||||
최근 설정: <?= $rawNationPolicy['prioritySetter'] ?? '-없음-' ?> (<?= $rawNationPolicy['prioritySetTime'] ?? '설정 기록 없음' ?>)
|
|
||||||
</small></div>
|
|
||||||
<div class='text-left px-2'><small class="text-muted">예턴이 없거나, 지정되어 있더라도 실패할경우<br>아래 순위에 따라 사령턴을 시도합니다.</small></div>
|
|
||||||
<div class="form_list">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="bg2 sub_bar">비활성</div>
|
|
||||||
<div id="nationPriorityDisabled" class="list-group col" data-type="list">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="bg2 sub_bar">활성</div>
|
|
||||||
<div id="nationPriority" class="list-group col" data-type="list">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class='control_bar' data-type="nationPriority">
|
|
||||||
<div class="btn-group" role="group">
|
|
||||||
<button type="button" class="btn btn-dark reset_btn">초기값으로</button>
|
|
||||||
<button type="button" class="btn btn-secondary revert_btn">이전값으로</button>
|
|
||||||
</div><button type="button" class="btn btn-primary submit_btn">설정</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6 half_section_right">
|
|
||||||
<div class='bg1 section_bar'>NPC 일반턴 우선순위</div>
|
|
||||||
<div class="float-right px-3"><small class="form-text text-muted">
|
|
||||||
최근 설정: <?= $rawNationGeneralPolicy['prioritySetter'] ?? '-없음-' ?> (<?= $rawNationGeneralPolicy['prioritySetTime'] ?? '설정 기록 없음' ?>)
|
|
||||||
</small></div>
|
|
||||||
<div class='text-left px-2'><small class="text-muted">순위가 높은 것부터 시도합니다. <br>아무것도 실행할 수 없으면 물자조달이나 인재탐색을 합니다.</small></div>
|
|
||||||
<div class="form_list">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="bg2 sub_bar">비활성</div>
|
|
||||||
<div id="generalPriorityDisabled" class="list-group col" data-type="list">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="bg2 sub_bar">활성</div>
|
|
||||||
<div id="generalPriority" class="list-group col" data-type="list">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class='control_bar' data-type="generalPriority">
|
|
||||||
<div class="btn-group" role="group">
|
|
||||||
<button type="button" class="btn btn-dark reset_btn">초기값으로</button>
|
|
||||||
<button type="button" class="btn btn-secondary revert_btn">이전값으로</button>
|
|
||||||
</div><button type="button" class="btn btn-primary submit_btn">설정</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ $boardName = $isSecretBoard ? '기밀실' : '회의실';
|
|||||||
<?= WebUtil::printCSS('dist_css/v_board.css') ?>
|
<?= WebUtil::printCSS('dist_css/v_board.css') ?>
|
||||||
<?= WebUtil::printJS('../d_shared/common_path.js', true) ?>
|
<?= WebUtil::printJS('../d_shared/common_path.js', true) ?>
|
||||||
<?= WebUtil::printJS('dist_js/vendors_vue.js', true) ?>
|
<?= WebUtil::printJS('dist_js/vendors_vue.js', true) ?>
|
||||||
|
<?= WebUtil::printJS('dist_js/common_vue.js', true) ?>
|
||||||
<?= WebUtil::printJS('dist_js/v_board.js', true) ?>
|
<?= WebUtil::printJS('dist_js/v_board.js', true) ?>
|
||||||
<?= WebUtil::printStaticValues([
|
<?= WebUtil::printStaticValues([
|
||||||
'isSecretBoard' => $isSecretBoard,
|
'isSecretBoard' => $isSecretBoard,
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ foreach (array_keys(General::INHERITANCE_KEY) as $key) {
|
|||||||
<?= WebUtil::printCSS('dist_css/v_inheritPoint.css') ?>
|
<?= WebUtil::printCSS('dist_css/v_inheritPoint.css') ?>
|
||||||
<?= WebUtil::printJS('../d_shared/common_path.js', true) ?>
|
<?= WebUtil::printJS('../d_shared/common_path.js', true) ?>
|
||||||
<?= WebUtil::printJS('dist_js/vendors_vue.js', true) ?>
|
<?= WebUtil::printJS('dist_js/vendors_vue.js', true) ?>
|
||||||
|
<?= WebUtil::printJS('dist_js/common_vue.js', true) ?>
|
||||||
<?= WebUtil::printJS('dist_js/v_inheritPoint.js', true) ?>
|
<?= WebUtil::printJS('dist_js/v_inheritPoint.js', true) ?>
|
||||||
<?= WebUtil::printStaticValues([
|
<?= WebUtil::printStaticValues([
|
||||||
'items' => $items
|
'items' => $items
|
||||||
|
|||||||
+13
-3
@@ -108,7 +108,11 @@ class WebUtil
|
|||||||
public static function preloadAsset(string $path, string $type){
|
public static function preloadAsset(string $path, string $type){
|
||||||
$upath = \phpUri::parse($path);
|
$upath = \phpUri::parse($path);
|
||||||
$path = $upath->join('');
|
$path = $upath->join('');
|
||||||
if(!$upath->scheme && file_exists($upath->path)){
|
if(!$upath->scheme){
|
||||||
|
if(!file_exists($upath->path)){
|
||||||
|
return "<!-- preload:{$type} '{$path}' -->\n";
|
||||||
|
}
|
||||||
|
|
||||||
$mtime = filemtime($upath->path);
|
$mtime = filemtime($upath->path);
|
||||||
if($upath->query){
|
if($upath->query){
|
||||||
$tail = '&'.$mtime;
|
$tail = '&'.$mtime;
|
||||||
@@ -135,7 +139,10 @@ class WebUtil
|
|||||||
//async 옵션 고려?
|
//async 옵션 고려?
|
||||||
$upath = \phpUri::parse($path);
|
$upath = \phpUri::parse($path);
|
||||||
$path = $upath->join('');
|
$path = $upath->join('');
|
||||||
if(!$upath->scheme && file_exists($upath->path)){
|
if(!$upath->scheme){
|
||||||
|
if(!file_exists($upath->path)){
|
||||||
|
return "<!-- JS '{$path}' -->\n";
|
||||||
|
}
|
||||||
$mtime = filemtime($upath->path);
|
$mtime = filemtime($upath->path);
|
||||||
if($upath->query){
|
if($upath->query){
|
||||||
$tail = '&'.$mtime;
|
$tail = '&'.$mtime;
|
||||||
@@ -155,7 +162,10 @@ class WebUtil
|
|||||||
public static function printCSS(string $path){
|
public static function printCSS(string $path){
|
||||||
$upath = \phpUri::parse($path);
|
$upath = \phpUri::parse($path);
|
||||||
$path = $upath->join('');
|
$path = $upath->join('');
|
||||||
if(!$upath->scheme && file_exists($upath->path)){
|
if(!$upath->scheme){
|
||||||
|
if(!file_exists($upath->path)){
|
||||||
|
return "<!-- CSS '{$path}' -->\n";
|
||||||
|
}
|
||||||
$mtime = filemtime($upath->path);
|
$mtime = filemtime($upath->path);
|
||||||
if($upath->query){
|
if($upath->query){
|
||||||
$tail = '&'.$mtime;
|
$tail = '&'.$mtime;
|
||||||
|
|||||||
Reference in New Issue
Block a user