From ae24ac282af8dde9c14b62cb58a9503557df72e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Mon, 24 Jun 2019 10:59:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=8D=95=E4=BA=BA=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 91 ++++++--- languages/en.css | 6 + languages/en.js | 2 +- languages/ja.css | 6 + languages/ja.js | 2 +- languages/ko.css | 6 + languages/ko.js | 2 +- languages/zh-TW.css | 6 + languages/zh-TW.js | 2 +- languages/zh.css | 6 + languages/zh.js | 2 +- script.js | 89 ++++++--- solo.html | 433 ++++++++++++++++++++++++++++++++++++++++ style-monsterimages.css | 111 +++++++++- style.css | 19 +- universal_function.js | 14 +- 16 files changed, 727 insertions(+), 70 deletions(-) create mode 100644 solo.html diff --git a/index.html b/index.html index 4f4ff0ba..742f343a 100644 --- a/index.html +++ b/index.html @@ -10,11 +10,40 @@ +
- +
@@ -126,6 +155,7 @@
297
+
@@ -135,6 +165,7 @@
297
+
@@ -144,6 +175,7 @@
297
+
@@ -153,6 +185,7 @@
297
+
@@ -162,6 +195,7 @@
297
+
@@ -177,6 +211,7 @@
297
+
@@ -186,6 +221,7 @@
297
+
@@ -195,6 +231,7 @@
297
+
@@ -204,6 +241,7 @@
297
+
@@ -213,6 +251,7 @@
297
+
@@ -317,18 +356,18 @@
-
- - -
+ +
+ +
@@ -406,19 +445,19 @@
  • diff --git a/languages/en.css b/languages/en.css index 5c422661..0a9d8bc0 100644 --- a/languages/en.css +++ b/languages/en.css @@ -131,4 +131,10 @@ } .type-name-15::after{ content: "Redeemable"; +} +.control-box .solo-link::before{ + content: "Jump To Solo Version"; +} +.control-box .multi-link::before{ + content: "Jump To 2-Player Version"; } \ No newline at end of file diff --git a/languages/en.js b/languages/en.js index 57936982..3a10e400 100644 --- a/languages/en.js +++ b/languages/en.js @@ -1,4 +1,4 @@ -document.title = 'P&D Dash Formation Maker'; +document.title = solo?'P&D Solo Formation Maker':'P&D Dash Formation Maker'; var txtTitle = document.querySelector(".title-box .title"); var txtDetail = document.querySelector(".detail-box .detail"); txtTitle.placeholder = "Input Formation Title"; diff --git a/languages/ja.css b/languages/ja.css index 80e481e5..2edb4120 100644 --- a/languages/ja.css +++ b/languages/ja.css @@ -124,4 +124,10 @@ } .type-name-15::after{ content: "売却用"; +} +.control-box .solo-link::before{ + content: "ソロゲームに移動"; +} +.control-box .multi-link::before{ + content: "2人協力のゲームに移動"; } \ No newline at end of file diff --git a/languages/ja.js b/languages/ja.js index 4ca5002d..b88ef48e 100644 --- a/languages/ja.js +++ b/languages/ja.js @@ -1,4 +1,4 @@ -document.title = 'パズル&ドラゴンズ周回チーム制作ツール'; +document.title = solo?'パズル&ドラゴンズソロチーム制作ツール':'パズル&ドラゴンズ協力周回チーム制作ツール'; var txtTitle = document.querySelector(".title-box .title"); var txtDetail = document.querySelector(".detail-box .detail"); txtTitle.placeholder = "入力フォーメーションのタイトル"; diff --git a/languages/ko.css b/languages/ko.css index aafe7db9..91f607fe 100644 --- a/languages/ko.css +++ b/languages/ko.css @@ -125,3 +125,9 @@ .type-name-15::after{ content: "매각용"; } +.control-box .solo-link::before{ + content: "싱글 플레이어 게임으로 이동"; +} +.control-box .multi-link::before{ + content: "2인 게임으로 이동"; +} \ No newline at end of file diff --git a/languages/ko.js b/languages/ko.js index 5fb7cd55..8b2d06e6 100644 --- a/languages/ko.js +++ b/languages/ko.js @@ -1,4 +1,4 @@ -document.title = '퍼즐앤드래곤 팀 생산 도구'; +document.title = solo?'퍼즐앤드래곤 솔로 팀 제작 도구':'퍼즐앤드래곤 멀티 팀 제작 도구'; var txtTitle = document.querySelector(".title-box .title"); var txtDetail = document.querySelector(".detail-box .detail"); txtTitle.placeholder = "편대 칭호 입력"; diff --git a/languages/zh-TW.css b/languages/zh-TW.css index c038c143..4b6e2170 100644 --- a/languages/zh-TW.css +++ b/languages/zh-TW.css @@ -127,4 +127,10 @@ } .control-box .languages-label::before{ content: "語言:"; +} +.control-box .solo-link::before{ + content: "轉到單人遊戲"; +} +.control-box .multi-link::before{ + content: "轉到2人車隊"; } \ No newline at end of file diff --git a/languages/zh-TW.js b/languages/zh-TW.js index 7bc51189..d0303847 100644 --- a/languages/zh-TW.js +++ b/languages/zh-TW.js @@ -1,4 +1,4 @@ -document.title = '龍族拼圖車隊陣型圖製作工具'; +document.title = solo?'龍族拼圖單人陣型圖製作工具':'龍族拼圖車隊陣型圖製作工具'; var txtTitle = document.querySelector(".title-box .title"); var txtDetail = document.querySelector(".detail-box .detail"); txtTitle.placeholder = "輸入陣型標題"; diff --git a/languages/zh.css b/languages/zh.css index e244f990..3dec5030 100644 --- a/languages/zh.css +++ b/languages/zh.css @@ -127,4 +127,10 @@ } .control-box .languages-label::before{ content: "语言:"; +} +.control-box .solo-link::before{ + content: "转到单人游戏"; +} +.control-box .multi-link::before{ + content: "转到2人车队"; } \ No newline at end of file diff --git a/languages/zh.js b/languages/zh.js index 5f282702..4a6b8644 100644 --- a/languages/zh.js +++ b/languages/zh.js @@ -1 +1 @@ - \ No newline at end of file +document.title = solo?'智龙迷城单人阵型图制作工具':'智龙迷城车队阵型图制作工具'; \ No newline at end of file diff --git a/script.js b/script.js index dc34b7b4..83569312 100644 --- a/script.js +++ b/script.js @@ -6,32 +6,6 @@ var memberTeamObj = function(){ var memberAssistObj = function(){ return {id:0,level:0,awoken:0,plus:[0,0,0]}; } -var teamObj = function(){ - return [ - [ - {id:0}, - {id:0}, - {id:0}, - {id:0}, - {id:0}, - ], - [ - {id:0}, - {id:0}, - {id:0}, - {id:0}, - {id:0}, - ], - ]; -} -var formation = { - title:"", - detail:"", - team:[ - new teamObj(),//队伍A - new teamObj(),//队伍B - ] -}; window.onload = function() { //添加语言列表 @@ -346,18 +320,21 @@ function initialize() } changeid(mD,editBox.monsterBox,editBox.latentBox); + refreshAwokenCount(formation.team); creatNewUrl(); editBox.hide(); } btnNull.onclick = function(){ var mD = formation.team[editBox.memberIdx[0]][editBox.memberIdx[1]][editBox.memberIdx[2]] = {id:0}; changeid(mD,editBox.monsterBox,editBox.latentBox); + refreshAwokenCount(formation.team); creatNewUrl(); editBox.hide(); } btnDelay.onclick = function(){ //应对威吓 var mD = formation.team[editBox.memberIdx[0]][editBox.memberIdx[1]][editBox.memberIdx[2]] = {id:-1}; changeid(mD,editBox.monsterBox,editBox.latentBox); + refreshAwokenCount(formation.team); creatNewUrl(); editBox.hide(); } @@ -449,8 +426,26 @@ function changeid(mon,monDom,latentDom) awokenIcon.classList.remove("allowable-assist"); } } + } + var sawoken = monDom.querySelector(".super-awoken"); + if (sawoken && mon.sawoken != undefined) //如果存在超觉醒的DOM且提供了超觉醒 + { + var awokenIcon = sawoken.querySelector(".awoken-icon"); + if (mon.sawoken < 0) //没觉醒 + { + sawoken.classList.add("display-none"); + }else + { + sawoken.classList.remove("display-none"); + awokenIcon.className = "awoken-icon awoken-" + md.sAwoken[mon.sawoken]; + } + } + /* + if (mon.awoken>-1 || mon.sawoken != undefined) //如果提供了觉醒 + { refreshAwokenCount(formation.team); } + */ if (mon.plus) //如果提供了加值 { monDom.querySelector(".plus .hp").innerHTML = mon.plus[0]; @@ -551,11 +546,13 @@ function editMon(AorB,isAssist,tempIdx) editBox.refreshLatent(editBox.latent); btnDelay.classList.add("display-none"); settingBox.querySelector(".row-mon-latent").classList.remove("display-none"); + settingBox.querySelector(".row-mon-super-awoken").classList.remove("display-none"); editBox.querySelector(".edit-box-title").classList.remove("edit-box-title-assist"); }else { btnDelay.classList.remove("display-none"); settingBox.querySelector(".row-mon-latent").classList.add("display-none"); + settingBox.querySelector(".row-mon-super-awoken").classList.add("display-none"); editBox.querySelector(".edit-box-title").classList.add("edit-box-title-assist"); } } @@ -687,15 +684,21 @@ function refreshAll(fmt){ var fATeam = formationA.querySelectorAll(".formation-team .monster"); var fALatents = formationA.querySelectorAll(".formation-latents .latent-ul"); var fAAssist = formationA.querySelectorAll(".formation-assist .monster"); - var fBTeam = formationB.querySelectorAll(".formation-team .monster"); - var fBLatents = formationB.querySelectorAll(".formation-latents .latent-ul"); - var fBAssist = formationB.querySelectorAll(".formation-assist .monster"); - for (var ti=0;ti<5;ti++) + if (formationB) + { + var fBTeam = formationB.querySelectorAll(".formation-team .monster"); + var fBLatents = formationB.querySelectorAll(".formation-latents .latent-ul"); + var fBAssist = formationB.querySelectorAll(".formation-assist .monster"); + } + for (var ti=0;ti<(formationB?5:6);ti++) { changeid(fmt.team[0][0][ti],fATeam[ti],fALatents[ti]); changeid(fmt.team[0][1][ti],fAAssist[ti]); - changeid(fmt.team[1][0][ti],fBTeam[ti],fBLatents[ti]); - changeid(fmt.team[1][1][ti],fBAssist[ti]); + if (formationB) + { + changeid(fmt.team[1][0][ti],fBTeam[ti],fBLatents[ti]); + changeid(fmt.team[1][1][ti],fBAssist[ti]); + } } refreshAwokenCount(fmt.team); } @@ -704,12 +707,33 @@ function refreshAwokenCount(team){ var awokenUL = document.querySelector(".awoken-total-box .awoken-ul"); function setCount(idx,number){ var ali = awokenUL.querySelector(".a-c-" + idx); + if (!ali) return; //没有这个觉醒就撤回 ali.querySelector(".count").innerHTML = number; if (number) ali.classList.remove("display-none"); else ali.classList.add("display-none"); } + for (var ai=1;ai<=67;ai++) + { + if (ai == 10) //防封 + { + setCount(ai,awokenCountInTeam(team,ai,solo)+awokenCountInTeam(team,52,solo)*2); + }else if (ai == 19) //手指 + { + setCount(ai,awokenCountInTeam(team,ai,solo)+awokenCountInTeam(team,53,solo)*2); + }else if (ai == 21) //SB + { + setCount(ai,awokenCountInTeam(team,ai,solo)+awokenCountInTeam(team,56,solo)*2); + }else if (ai == 52 || ai == 53 || ai == 56) //大手指,大SB + { + continue; + }else + { + setCount(ai,awokenCountInTeam(team,ai,solo)); + } + } + /* setCount(21,awokenCountInTeam(team,21)+awokenCountInTeam(team,56)*2); //SB+大SB setCount(28,awokenCountInTeam(team,28)); //SX setCount(11,awokenCountInTeam(team,11)); //防暗 @@ -717,4 +741,5 @@ function refreshAwokenCount(team){ setCount(13,awokenCountInTeam(team,13)); //防毒 setCount(54,awokenCountInTeam(team,54)); //防云 setCount(55,awokenCountInTeam(team,55)); //防封条 + */ } \ No newline at end of file diff --git a/solo.html b/solo.html new file mode 100644 index 00000000..94adf335 --- /dev/null +++ b/solo.html @@ -0,0 +1,433 @@ + + + + +智龙迷城车队阵型图制作工具 + + + + + + + + + + + + +
    + +
    +
    +
    +
    +
    + +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    + +
    +
    +
    + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + + + diff --git a/style-monsterimages.css b/style-monsterimages.css index 18e03d54..a3fe232e 100644 --- a/style-monsterimages.css +++ b/style-monsterimages.css @@ -417,9 +417,42 @@ .latent-icon{ background-image: url(images/latent.png); } +.latent-icon-1{ /*HP*/ + background-position: 0px -32px; +} +.latent-icon-2{ /*攻击*/ + background-position: 0px -64px; +} +.latent-icon-3{ /*回复*/ + background-position: 0px -96px; +} +.latent-icon-4{ /*手指*/ + background-position: 0px -128px; +} +.latent-icon-5{ /*自回*/ + background-position: 0px -160px; +} +.latent-icon-6{ /*火盾*/ + background-position: 0px -192px; +} +.latent-icon-7{ /*水盾*/ + background-position: 0px -224px; +} +.latent-icon-8{ /*木盾*/ + background-position: 0px -256px; +} +.latent-icon-9{ /*光盾*/ + background-position: 0px -288px; +} +.latent-icon-10{ /*暗盾*/ + background-position: 0px -320px; +} .latent-icon-11{ /*防坐*/ background-position: 0px -352px; } +.latent-icon-12{ /*三维*/ + background-position: 0px -384px; +} .latent-icon-13{ /*进化杀*/ background-position: 0px -416px; } @@ -456,6 +489,34 @@ .latent-icon-24{ /*回复杀*/ background-position: 0px -768px; } +.latent-icon-25{ /*大HP*/ + background-position: 0px -800px; +} +.latent-icon-26{ /*大攻击*/ + background-position: 0px -832px; +} +.latent-icon-27{ /*大回复*/ + background-position: 0px -864px; +} +.latent-icon-28{ /*大手指*/ + background-position: 0px -896px; +} +.latent-icon-29{ /*大火盾*/ + background-position: 0px -928px; +} +.latent-icon-30{ /*大水盾*/ + background-position: 0px -960px; +} +.latent-icon-31{ /*大木盾*/ + background-position: 0px -992px; +} +.latent-icon-32{ /*大光盾*/ + background-position: 0px -1024px; +} +.latent-icon-33{ /*大暗盾*/ + background-position: 0px -1056px; +} +.latent-icon-12, .latent-icon-13, .latent-icon-14, .latent-icon-15, @@ -467,6 +528,52 @@ .latent-icon-21, .latent-icon-22, .latent-icon-23, -.latent-icon-24{ +.latent-icon-24, +.latent-icon-25, +.latent-icon-26, +.latent-icon-27, +.latent-icon-28, +.latent-icon-29, +.latent-icon-30, +.latent-icon-31, +.latent-icon-32, +.latent-icon-33{ width: 76px; -} \ No newline at end of file +} +/* +var sawokens = [ + "HP", + "攻击", + "回复", + "手指", + "自回", + "火盾", + "水盾", + "木盾", + "光盾", + "暗盾", + "防坐", + "三维", + "进化杀", + "觉醒杀", + "强化杀", + "卖钱杀", + "神杀", + "龙杀", + "恶魔杀", + "机械杀", + "平衡杀", + "攻击杀", + "体力杀", + "回复杀", + "大HP", + "大攻击", + "大回复", + "大手指", + "大火盾", + "大水盾", + "大木盾", + "大光盾", + "大暗盾", +]; +*/ \ No newline at end of file diff --git a/style.css b/style.css index 91587a91..1dd1573f 100644 --- a/style.css +++ b/style.css @@ -48,7 +48,7 @@ ul{ } /*队伍的整个盒子*/ .formation-box{ - /*width: 648px;*/ + width: 648px; min-width: 648px; } @@ -119,6 +119,12 @@ ul{ position: absolute; left:0; } +/*怪物-超觉醒*/ +.monster .super-awoken{ + position: absolute; + right:0; + bottom: 0; +} .null .plus,.delay .plus, .null .awoken-count,.delay .awoken-count, @@ -591,6 +597,8 @@ ul{ } .awoken-total-box .awoken-ul .count{ height: 32px; + width: 45px; + display: inline-block; vertical-align: middle; } .awoken-total-box .awoken-ul .count::before{ @@ -602,4 +610,13 @@ ul{ } .control-box .languages-label::before{ content: "Lanuage:"; +} +.control-box .solo-link,.control-box .multi-link{ + margin-left: 10px; +} +.control-box .solo-link::before{ + content: "Jump To Solo Version"; +} +.control-box .multi-link::before{ + content: "Jump To 2-Player Version"; } \ No newline at end of file diff --git a/universal_function.js b/universal_function.js index 6f6efa6d..a185d271 100644 --- a/universal_function.js +++ b/universal_function.js @@ -75,7 +75,7 @@ function usedHole(latent) },0); } //计算用了多少潜觉格子 -function awokenCountInTeam(formationTeam,ak) +function awokenCountInTeam(formationTeam,ak,solo) { var allAwokenCount = formationTeam.reduce(function(fc,fm){ var formationAwokenCount = fm.reduce(function(tc,tm,isAssist){ @@ -85,14 +85,20 @@ function awokenCountInTeam(formationTeam,ak) return c; } var mdAwoken = ms[m.id].awoken; //这个怪物的觉醒数据 - if (!mdAwoken || (isAssist && mdAwoken[0] != 49)) - { //如果没有觉醒 || (如果是辅助队 &&第一个不是武器觉醒) + var mdSAwoken = ms[m.id].sAwoken; //这个怪物的超觉醒数据 + if ((!mdAwoken && !mdSAwoken) || (isAssist && mdAwoken[0] != 49)) + { //如果没有觉醒和超觉醒 || (如果是辅助队 &&第一个不是武器觉醒) return c; } - //启用的觉醒数 + //启用的觉醒数组片段 var enableAwoken = mdAwoken.slice(0,m.awoken); //相同的觉醒数 var hasAwoken = enableAwoken.filter(function(a){return a == ak;}).length; + //如果有超觉醒,且超觉醒id和计数的id相同 + if (mdSAwoken && (mdSAwoken[m.sawoken] == ak)) + { + hasAwoken++; + } return c + hasAwoken; },0); return tc + teamAwokenCount;