장수 생성 시 종능 부족하면 경고창 띄움

This commit is contained in:
2018-08-23 01:07:25 +09:00
parent 668364e583
commit 888a76eda0
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -163,4 +163,14 @@ jQuery(function($){
$charInfoText.html('');
}
});
$('#join_form').submit(function(){
var currentStatTotal = parseInt($leader.val()) + parseInt($power.val()) + parseInt($leader.val());
if(currentStatTotal < defaultStatTotal){
if(!confirm('현재 능력치 총합은 {0}으로, {1}보다 낮습니다. 장수 생성을 진행할까요?'.format(currentStatTotal, defaultStatTotal))){
return false;
}
}
return true;
});
});