diff --git a/hwe/processing.php b/hwe/processing.php index 45e9ab14..3deddf26 100644 --- a/hwe/processing.php +++ b/hwe/processing.php @@ -233,7 +233,7 @@ function command_11($turn, $command, bool $is모병 = false) { } $leader = getGeneralLeadership($me, true, true, true); - $maxCrew = $leader - Util::round($me['crew']/100); + $fullLeader = getGeneralLeadership($me, false, true, true); $abil = getTechAbil($tech); $armTypes = []; @@ -317,10 +317,10 @@ function command_11($turn, $command, bool $is모병 = false) { 'techLevelText'=>getTechCall($tech), 'tech'=>$tech, 'leader'=>$leader, + 'fullLeader'=>$fullLeader, 'crewType'=>GameUnitConst::byId($me['crewtype'])->id, 'crewTypeName'=>GameUnitConst::byId($me['crewtype'])->name, 'crew'=>$me['crew'], - 'maxCrew'=>$maxCrew, 'gold'=>$me['gold'], 'turn'=>$turn, 'armTypes'=>$armTypes, diff --git a/hwe/templates/recruitCrewForm.php b/hwe/templates/recruitCrewForm.php index b2b254ee..4790ea62 100644 --- a/hwe/templates/recruitCrewForm.php +++ b/hwe/templates/recruitCrewForm.php @@ -1,6 +1,94 @@ +병사를 모집합니다. + +훈련과 사기치는 낮지만 가격이 저렴합니다.
+ +훈련과 사기치는 높지만 자금이 많이 듭니다. + +가능한 수보다 많게 입력하면 가능한 최대 병사를 모집합니다.
+이미 병사가 있는 경우 추가되며, 병종이 다를경우는 기존의 병사는 소집해제됩니다.
+현재 가능한 병종은 녹색으로 표시되며,
+현재 가능한 특수병종은 초록색으로 표시됩니다.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
모병은 가격 2배의 자금이 소요됩니다.
+ 현재 기술력 : + 현재 통솔 : + 현재 병종 : + 현재 병사 : + 현재 자금 : +
사진병종공격방어기동회피가격군량병사수행동특징
계열
name?>attack?>defence?>speed?>avoid?>baseCostShort?>baseRiceShort?> +
+ 00명 + 원 + +
info?>
+
+ + + + + + +
-병사를 모집합니다. - -훈련과 사기치는 낮지만 가격이 저렴합니다.
- -훈련과 사기치는 높지만 자금이 많이 듭니다. - -가능한 수보다 많게 입력하면 가능한 최대 병사를 모집합니다.
-이미 병사가 있는 경우 추가되며, 병종이 다를경우는 기존의 병사는 소집해제됩니다.
-현재 가능한 병종은 녹색으로 표시되며,
-현재 가능한 특수병종은 초록색으로 표시됩니다.
+$(function(){ + var $postForm = $('#post_form'); + var $formAmount = $postForm.find('.form_amount'); + var $formCrewtype = $postForm.find('.form_crewtype'); + $('.form_double').on('keyup change',function(e){ + var $this = $(this); + var $parent = $this.parents('.input_form'); + var crewtype = parseInt($parent.data('crewtype')); + calc(crewtype); + $formCrewtype.val(crewtype); + $formAmount.val($this.val()); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
모병은 가격 2배의 자금이 소요됩니다.
- 현재 기술력 : - 현재 통솔 : - 현재 병종 : - 현재 병사 : - 현재 자금 : -
사진병종공격방어기동회피군량가격병사수특징
계열
name?>attack?>defence?>speed?>avoid?>baseRiceShort?>baseCostShort?>
- style=text-align:right;color:white;background-color:black - >00명
- - - - - - - -
info?>
\ No newline at end of file + if(e.which === 13){ + $postForm.submit(); + } + return false; + }); + + $('.btn_half').click(function(){ + var $this = $(this); + var $parent = $this.parents('.input_form'); + var crewtype = parseInt($parent.data('crewtype')); + var $input = $parent.find('.form_double:eq(0)'); + + var fillValue = Math.round(leader / 2); + $formCrewtype.val(crewtype); + $input.val(fillValue).change(); + return false; + }); + + $('.btn_fill').click(function(){ + var $this = $(this); + var $parent = $this.parents('.input_form'); + var crewtype = parseInt($parent.data('crewtype')); + var $input = $parent.find('.form_double:eq(0)'); + + var fillValue = Math.ceil((leader*100 - currentCrew)/100); + if(crewtype != currentCrewType){ + fillValue = leader; + } + $formCrewtype.val(crewtype); + $input.val(fillValue).change(); + return false; + }); + + $('.btn_full').click(function(){ + var $this = $(this); + var $parent = $this.parents('.input_form'); + var crewtype = parseInt($parent.data('crewtype')); + var $input = $parent.find('.form_double:eq(0)'); + + var fillValue = fullLeader + 15; + $formCrewtype.val(crewtype); + $input.val(fillValue).change(); + return false; + }); + + $('.submit_btn').click(function(){ + var $this = $(this); + var $parent = $this.parents('.input_form'); + var crewtype = parseInt($parent.data('crewtype')); + var $input = $parent.find('.form_double:eq(0)'); + + $formCrewtype.val(crewtype); + $formAmount.val($input.val()); + + $postForm.submit(); + }); + + $('.btn_fill').click(); +}); + \ No newline at end of file