game: 장수 생성시 종능이 부족하면 경고
This commit is contained in:
+11
-4
@@ -197,7 +197,7 @@
|
|||||||
<small
|
<small
|
||||||
class="text-muted"
|
class="text-muted"
|
||||||
v-html="
|
v-html="
|
||||||
(availableInheritSpecial[args.inheritSpecial] ?? { info: '' })
|
(availableInheritSpecial[args.inheritSpecial??''] ?? { info: '' })
|
||||||
.info
|
.info
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
@@ -263,19 +263,19 @@
|
|||||||
<div class="col">
|
<div class="col">
|
||||||
<NumberInputWithInfo
|
<NumberInputWithInfo
|
||||||
title="통솔"
|
title="통솔"
|
||||||
v-model="args.inheritBonusStat[0]"
|
v-model="(args.inheritBonusStat??[0,0,0])[0]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<NumberInputWithInfo
|
<NumberInputWithInfo
|
||||||
title="무력"
|
title="무력"
|
||||||
v-model="args.inheritBonusStat[1]"
|
v-model="(args.inheritBonusStat??[0,0,0])[1]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<NumberInputWithInfo
|
<NumberInputWithInfo
|
||||||
title="지력"
|
title="지력"
|
||||||
v-model="args.inheritBonusStat[2]"
|
v-model="(args.inheritBonusStat??[0,0,0])[2]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -533,6 +533,13 @@ export default defineComponent({
|
|||||||
async submitForm() {
|
async submitForm() {
|
||||||
//검증은 언제 되어야 하는가?
|
//검증은 언제 되어야 하는가?
|
||||||
const args = clone(this.args);
|
const args = clone(this.args);
|
||||||
|
const totalStat = args.leadership + args.strength + args.intel;
|
||||||
|
|
||||||
|
if(totalStat < stats.total){
|
||||||
|
if(!confirm(`설정한 능력치가 ${totalStat}으로, 실제 최대치인 ${stats.total}보다 적습니다.\r\n그래도 진행할까요?`)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
await SammoAPI.General.Join(args);
|
await SammoAPI.General.Join(args);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user