feat,game: 사전 거병 기능 추가

- 건국은 게임 개시 2턴째부터 가능
This commit is contained in:
2022-07-05 22:23:23 +09:00
parent 2b483749bc
commit e09fdefa68
6 changed files with 130 additions and 3 deletions
+1
View File
@@ -126,6 +126,7 @@ const apiRealPath = {
itemType: ItemTypeKey;
}>,
DieOnPrestart: POST as APICallT<undefined>,
BuildNationCandidate: POST as APICallT<undefined>,
},
Global: {
GeneralList: GET as APICallT<undefined, GeneralListResponse>,
+20
View File
@@ -150,6 +150,26 @@ $(function ($) {
location.replace('..');
});
$('#buildNationCandidate').on('click', async function (e) {
e.preventDefault();
if(!confirm('거병 이후 장수를 삭제할 수 없게됩니다. 거병하시겠습니까?')){
return false;
}
try {
await SammoAPI.General.BuildNationCandidate();
}
catch (e) {
console.log(e);
alert(`실패했습니다: ${e}`);
location.reload();
return;
}
location.reload();
});
$('#vacation').on('click', async function (e) {
e.preventDefault();
if (!confirm('휴가 기능을 신청할까요?')) {