diff --git a/js/vec.js b/js/vec.js index fe46380..b2ee80d 100644 --- a/js/vec.js +++ b/js/vec.js @@ -16,7 +16,13 @@ var type_minFire = [ 142,142,140,128,126,124,124 ]; // 살상1 살상2 선봉 격양 var selected_talent = [ 0, 0, 0, 0 ]; -var fairy_talent = [ 12, 15, 8, 10 ]; +//var fairy_talent = [ 12, 15, 8, 10 ]; +var fairy_talent = [[5, 7, 9, 10, 12 ], + [6, 8, 11, 13, 15 ], + [3, 4, 6, 7, 8 ], + [3, 6, 7, 9, 10 ]] ; + +var selected_rare = [ 0, 0, 0, 0, 0 ]; var buff_talent = 0; $(function (){ @@ -78,18 +84,45 @@ function disp_selTalent(){ function btn_selTalent(id){ if(selected_talent[id] == 1){ selected_talent[id] = 0; - buff_talent = 0; + //buff_talent = 0; }else{ for(var i = 0; i < selected_talent.length; i++){ selected_talent[i] = 0; } selected_talent[id] = 1; - buff_talent = fairy_talent[id]; + //buff_talent = fairy_talent[id]; } disp_selTalent(); reCalc(); } +function disp_selRare(){ + for(var i = 0; i < 5; i++){ + if(selected_rare[i] == 1){ + $('#btn-rare-' + i).removeClass('btn-default'); + $('#btn-rare-' + i).addClass('btn-success'); + }else{ + $('#btn-rare-' + i).removeClass('btn-success'); + $('#btn-rare-' + i).addClass('btn-default'); + } + } +} + +function btn_selRare(id){ + if(selected_rare[id] == 1){ + selected_rare[id] = 0; + //buff_talent = 0; + }else{ + for(var i = 0; i < 5; i++){ + selected_rare[i] = 0; + } + selected_rare[id] = 1; + //buff_talent = fairy_talent[id]; + } + disp_selRare(); + reCalc(); +} + function disp_selType(){ for(var i = 0; i < selected_enc.length; i++){ var btn = document.getElementById('btn-type-' + i); @@ -170,6 +203,20 @@ function reCalc(){ $('#buff_fire').val(250); } + var talent_id=-1; + var rare_id=-1; + + for(var i = 0; i < 5; i++){ + if(selected_rare[i]==1) + rare_id=i; + } + for(var i = 0; i < 4; i++){ + if(selected_talent[i]==1) + talent_id=i; + } + + buff_talent= (talent_id != -1 && rare_id != -1) ? (fairy_talent[talent_id][rare_id]) : 0; + var finalFire = Math.ceil(Math.ceil(dollFire * (1 + (fairyFire / 100))) * (1 + (buffFire / 100)) * (1 + (buff_talent / 100))); chkFire(finalFire); @@ -275,6 +322,11 @@ function setLanguage(){ $('#btn-talent-'+(i-1)).text(langPack.talent['t'+ i]); } + $('#text-rare-title').html(langPack.rare.title); + for (let i = 1; i <= 5; i++) { + $('#btn-rare-'+(i-1)).text( "★".repeat(i) ); + } + $('#text-result-title').text(langPack.result.title); $('#help_pic_stat').attr("src", 'img/vec/help_stat_' + selLang + '.png'); diff --git a/js/zas.js b/js/zas.js index 38ec909..0f76c3a 100644 --- a/js/zas.js +++ b/js/zas.js @@ -40,11 +40,23 @@ var dangerZone = 0; // 살상1 살상2 돌격 격양 var selected_talent = [ 0, 0, 0, 0 ]; -var fairy_talent_fire = [ 12, 15, 10, 8 ]; -var fairy_talent_rate = [ 0, 0, 8, 0 ]; +//var fairy_talent_fire = [ 12, 15, 10, 8 ]; +//var fairy_talent_rate = [ 0, 0, 8, 0 ]; var buff_talent_fire = 0; var buff_talent_rate = 0; +var fairy_talent_fire = [[5, 7, 9, 10, 12 ], + [6, 8, 11, 13, 15 ], + [4, 6, 7, 9, 10 ], + [3, 6, 7, 9, 10 ]]; + +var fairy_talent_rate = [[0, 0, 0, 0, 0 ], + [0, 0, 0, 0, 0 ], + [3, 4, 6, 7, 8 ], + [0, 0, 0, 0, 0 ]]; + +var selected_rare = [ 0, 0, 0, 0, 0 ]; + var selLang = 'ko'; var langPack; var langPacks; @@ -110,20 +122,45 @@ function disp_selTalent(){ function btn_selTalent(id){ if(selected_talent[id] == 1){ selected_talent[id] = 0; - buff_talent_fire = 0; - buff_talent_rate = 0; + //buff_talent_fire = 0; + //buff_talent_rate = 0; }else{ for(var i = 0; i < selected_talent.length; i++){ selected_talent[i] = 0; } selected_talent[id] = 1; - buff_talent_fire = fairy_talent_fire[id]; - buff_talent_rate = fairy_talent_rate[id]; + //buff_talent_fire = fairy_talent_fire[id]; + //buff_talent_rate = fairy_talent_rate[id]; } disp_selTalent(); reCalc(); } +function disp_selRare(){ + for(var i = 0; i < 5; i++){ + if(selected_rare[i] == 1){ + $('#btn-rare-' + i).removeClass('btn-default'); + $('#btn-rare-' + i).addClass('btn-success'); + }else{ + $('#btn-rare-' + i).removeClass('btn-success'); + $('#btn-rare-' + i).addClass('btn-default'); + } + } +} + +function btn_selRare(id){ + if(selected_rare[id] == 1){ + selected_rare[id] = 0; + }else{ + for(var i = 0; i < 5; i++){ + selected_rare[i] = 0; + } + selected_rare[id] = 1; + } + disp_selRare(); + reCalc(); +} + function btn_selArea(idx){ switch(idx){ case 81: @@ -217,7 +254,21 @@ function reCalc(){ buffRate = 100; $('#buff_rate').val(100); } + + var talent_id=-1; + var rare_id=-1; + for(var i = 0; i < 5; i++){ + if(selected_rare[i]==1) + rare_id=i; + } + for(var i = 0; i < 4; i++){ + if(selected_talent[i]==1) + talent_id=i; + } + buff_talent_fire=(talent_id != -1 && rare_id != -1) ? (fairy_talent_fire[talent_id][rare_id]) : 0; + buff_talent_rate=(talent_id != -1 && rare_id != -1) ? (fairy_talent_rate[talent_id][rare_id]) : 0; + var finalFire = Math.floor(Math.floor(dollFire * (1 + (fairyFire / 100))) * (1 + (buffFire / 100)) * (1 + (buff_talent_fire / 100)) + 1); // * (0.85) var finalRate = Math.floor(dollRate * (1 + (buffRate / 100)) * (1 + (buff_talent_rate / 100))); @@ -366,6 +417,11 @@ function setLanguage(){ $('#btn-talent-'+(i-1)).text(langPack.talent['t'+ i]); } + $('#text-rare-title').html(langPack.rare.title); + for (let i = 1; i <= 5; i++) { + $('#btn-rare-'+(i-1)).text( "★".repeat(i) ); + } + $('#text-result-title').text(langPack.result.title); $('#help_pic_stat').attr("src", 'img/zas/help_stat_' + selLang + '.png'); diff --git a/lang/lang_vec.js b/lang/lang_vec.js index 5252657..31adf0c 100644 --- a/lang/lang_vec.js +++ b/lang/lang_vec.js @@ -20,12 +20,15 @@ var languagepack_vec = "title":"승객: " }, "talent":{ - "title":"요정 특성: (5성 필수 = 100% 발동)", + "title":"요정 특성: ", "t1":"살상계 I", "t2":"살상계 II", "t3":"선봉계", "t4":"격양계" }, + "rare":{ + "title":"요정 레어도(3.0): " + }, "result":{ "title":"계산 결과: ", "fire":{ @@ -73,6 +76,9 @@ var languagepack_vec = "t3":"先鋒型", "t4":"激昂型" }, + "rare":{ + "title":"妖精ランク(3.0): (★5推薦 = 100% 発動)" + }, "result":{ "title":"計算結果: ", "fire":{ @@ -119,6 +125,9 @@ var languagepack_vec = "t3":"Charge", "t4":"Fervor" }, + "rare":{ + "title":"Fairy Rarity(3.0): (Recommend 5-Star, active rate 100%)" + }, "result":{ "title":"Result: ", "fire":{ diff --git a/lang/lang_zas.js b/lang/lang_zas.js index 8934417..59a14e3 100644 --- a/lang/lang_zas.js +++ b/lang/lang_zas.js @@ -20,12 +20,15 @@ var languagepack_zas = "rate":"사속버프 합계(%) 입력" }, "talent":{ - "title":"요정 특성: (★5 필수 = 100% 발동)", + "title":"요정 특성: ", "t1":"살상계 I", "t2":"살상계 II", "t3":"돌격계", "t4":"격양계" }, + "rare":{ + "title":"요정 레어도(3.0): " + }, "result":{ "title":"계산 결과: ", "fire":{ @@ -86,6 +89,9 @@ var languagepack_zas = "t3":"突撃型", "t4":"激昂型" }, + "rare":{ + "title":"妖精ランク(3.0): (★5推薦 = 100% 発動)" + }, "result":{ "title":"計算結果: ", "fire":{ @@ -140,12 +146,15 @@ var languagepack_zas = "rate":"RoF. Buff (%)" }, "talent":{ - "title":"Fairy Talent: (Recommend ★5 = active rate 100%)", + "title":"Fairy Talent: (Recommend 5-Star, active rate 100%)", "t1":"Damage I", "t2":"Damage II", "t3":"Assualt", "t4":"Fervor" }, + "rare":{ + "title":"Fairy Rarity(3.0): (Recommend 5-Star, active rate 100%)" + }, "result":{ "title":"Result: ", "fire":{ diff --git a/vec.html b/vec.html index 252edce..40d8346 100644 --- a/vec.html +++ b/vec.html @@ -131,6 +131,27 @@ +
+
+
+ +
+
+
+ + + + + +
+
+
+
@@ -245,4 +266,4 @@ - \ No newline at end of file + diff --git a/zas.html b/zas.html index 68eaaba..c5ea612 100644 --- a/zas.html +++ b/zas.html @@ -106,6 +106,27 @@
+
+
+
+ +
+
+
+ + + + + +
+
+
+