feat,game: 사전 거병 기능 추가
- 건국은 게임 개시 2턴째부터 가능
This commit is contained in:
@@ -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>,
|
||||
|
||||
@@ -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('휴가 기능을 신청할까요?')) {
|
||||
|
||||
Reference in New Issue
Block a user