| @@ -11,6 +11,13 @@ Easy to use editing interface. | |||
| * 可以简单的修改显示语言,手机上也可以轻松使用。 | |||
| Easy to change language and use on your phone。 | |||
|  | |||
| ## 目前支持的语言 | Languages that are now supported | |||
| 1. 中文(简体) | |||
| 1. 中文(繁體) | |||
| 1. English | |||
| 1. 日本語 (by google translate) | |||
| 1. 한국어 (by google translate) | |||
| # 如何使用 | HOW TO USE | |||
| ## 在哪里打开 | Where to open | |||
| * 快速使用在线版 | Fast Start | |||
| @@ -19,26 +26,16 @@ Easy to change language and use on your phone。 | |||
| * [示例 \| Sample](http://mapaler.github.io/paddashformation/?data={%22title%22%3A%22%E6%88%91%E7%9A%84%E6%9C%A8%E8%BD%A6%E9%98%9F%7CMy%20wood%20Dash%20Formation%22%2C%22detail%22%3A%22%E6%88%91%E5%B9%B3%E6%97%B6%E7%9A%84%E6%9C%A8%E8%BD%A6%E9%98%9F\n%E5%BC%80%E8%BD%A6%E4%BA%86%EF%BC%8C%E6%BB%B4%E6%BB%B4%22%2C%22team%22%3A[[[{%22id%22%3A4813%2C%22level%22%3A110%2C%22awoken%22%3A9%2C%22plus%22%3A[99%2C99%2C99]%2C%22latent%22%3A[20%2C20%2C20]}%2C{%22id%22%3A2948%2C%22level%22%3A99%2C%22awoken%22%3A6%2C%22plus%22%3A[99%2C99%2C99]%2C%22latent%22%3A[]}%2C{%22id%22%3A2948%2C%22level%22%3A99%2C%22awoken%22%3A6%2C%22plus%22%3A[99%2C99%2C99]%2C%22latent%22%3A[]}%2C{%22id%22%3A2948%2C%22level%22%3A99%2C%22awoken%22%3A6%2C%22plus%22%3A[99%2C99%2C99]%2C%22latent%22%3A[]}%2C{%22id%22%3A5323%2C%22level%22%3A99%2C%22awoken%22%3A9%2C%22plus%22%3A[99%2C99%2C99]%2C%22latent%22%3A[]}]%2C[{%22id%22%3A5267%2C%22level%22%3A99%2C%22awoken%22%3A5%2C%22plus%22%3A[0%2C0%2C0]}%2C{%22id%22%3A-1}%2C{%22id%22%3A4986%2C%22level%22%3A99%2C%22awoken%22%3A4%2C%22plus%22%3A[0%2C0%2C0]}%2C{%22id%22%3A0}%2C{%22id%22%3A0}]]%2C[[{%22id%22%3A2948%2C%22level%22%3A99%2C%22awoken%22%3A6%2C%22plus%22%3A[99%2C99%2C99]%2C%22latent%22%3A[]}%2C{%22id%22%3A2948%2C%22level%22%3A99%2C%22awoken%22%3A6%2C%22plus%22%3A[99%2C99%2C99]%2C%22latent%22%3A[]}%2C{%22id%22%3A2948%2C%22level%22%3A99%2C%22awoken%22%3A6%2C%22plus%22%3A[99%2C99%2C99]%2C%22latent%22%3A[]}%2C{%22id%22%3A5042%2C%22level%22%3A110%2C%22awoken%22%3A9%2C%22plus%22%3A[99%2C99%2C99]%2C%22latent%22%3A[]}%2C{%22id%22%3A4813%2C%22level%22%3A110%2C%22awoken%22%3A9%2C%22plus%22%3A[99%2C99%2C99]%2C%22latent%22%3A[24%2C24%2C11%2C11]}]%2C[{%22id%22%3A-1}%2C{%22id%22%3A0}%2C{%22id%22%3A4986%2C%22level%22%3A99%2C%22awoken%22%3A4%2C%22plus%22%3A[0%2C0%2C0]}%2C{%22id%22%3A-1}%2C{%22id%22%3A5267%2C%22level%22%3A99%2C%22awoken%22%3A5%2C%22plus%22%3A[0%2C0%2C0]}]]]}) | |||
| * 或下载压缩包后使用火狐浏览器打开`index.html`。 | |||
| Or download ZIP, and open the `index.html` by Firefox. | |||
| ### 示例|Sample | |||
| ## 有哪些功能 | Features | |||
| * 支持桌面与手机 | |||
| Support desktop and mobile phone | |||
| ## 小提示 | Tips | |||
| * 直接复制网址即可分享组队 | |||
| Copy the URL directly to share the Formation | |||
| * 使用后退即可撤销上一次修改 | |||
| Use back to undo the last edit | |||
| * 支持多语言 | |||
| Support for multiple languages | |||
| * 点击编辑界面的怪物头像可以跳转到攻略网站 | |||
| Click on the monster avatar in the editing interface to jump to the Guide. | |||
| # 翻译我 | TRANSLATE ME | |||
| ## 目前支持的语言 | Languages that are now supported | |||
| 1. 中文(简体) | |||
| 1. 中文(繁體) | |||
| 1. English | |||
| 1. 日本語 (by google translate) | |||
| 1. 한국어 (by google translate) | |||
| ## How to **Pull requests** | |||
| 1. Click **Fork** In the page top right corner. Fork your own copy of this repository to your account. | |||
| 1. Use Git to clone/pull repository locally for modification(How to modify please see below). | |||
| @@ -317,6 +317,18 @@ | |||
| </li> | |||
| </ul> | |||
| </div> | |||
| <div class="awoken-total-box"> | |||
| <!--怪物觉醒--> | |||
| <ul class="m-awoken-ul"> | |||
| <li class="awoken-count a-c-21 display-none"><span class="awoken-icon awoken-21"></span><span class="count"></span></li><!--SB--> | |||
| <li class="awoken-count a-c-28 display-none"><span class="awoken-icon awoken-28"></span><span class="count"></span></li><!--SX--> | |||
| <li class="awoken-count a-c-11 display-none"><span class="awoken-icon awoken-11"></span><span class="count"></span></li><!--防暗--> | |||
| <li class="awoken-count a-c-12 display-none"><span class="awoken-icon awoken-12"></span><span class="count"></span></li><!--防废--> | |||
| <li class="awoken-count a-c-13 display-none"><span class="awoken-icon awoken-13"></span><span class="count"></span></li><!--防毒--> | |||
| <li class="awoken-count a-c-54 display-none"><span class="awoken-icon awoken-54"></span><span class="count"></span></li><!--防云--> | |||
| <li class="awoken-count a-c-55 display-none"><span class="awoken-icon awoken-55"></span><span class="count"></span></li><!--防封条--> | |||
| </ul> | |||
| </div> | |||
| </div> | |||
| <div class="detail-box"><textarea class="detail" placeholder="输入说明"></textarea></div> | |||
| </div> | |||
| @@ -90,6 +90,9 @@ | |||
| .edit-box .button-box .button-done.cant-assist::after{ | |||
| content: "Can't be Assist"; | |||
| } | |||
| .awoken-total-box::before{ | |||
| content: "Awoken Total:"; | |||
| } | |||
| .type-name-4::after{ | |||
| content: "Dragon"; | |||
| } | |||
| @@ -83,6 +83,9 @@ | |||
| .edit-box .button-box .button-done.cant-assist::after{ | |||
| content: "継承できない"; | |||
| } | |||
| .awoken-total-box::before{ | |||
| content: "覚醒合計:"; | |||
| } | |||
| .type-name-4::after{ | |||
| content: "ドラゴン"; | |||
| } | |||
| @@ -83,6 +83,9 @@ | |||
| .edit-box .button-box .button-done.cant-assist::after{ | |||
| content: "협조 할 수 없음"; | |||
| } | |||
| .awoken-total-box::before{ | |||
| content: "총 각성:"; | |||
| } | |||
| .type-name-4::after{ | |||
| content: "드래곤"; | |||
| } | |||
| @@ -83,6 +83,9 @@ | |||
| .edit-box .button-box .button-done.cant-assist::after{ | |||
| content: "不能輔助"; | |||
| } | |||
| .awoken-total-box::before{ | |||
| content: "覺醒總計:"; | |||
| } | |||
| .type-name-4::after{ | |||
| content: "龍"; | |||
| } | |||
| @@ -83,6 +83,9 @@ | |||
| .edit-box .button-box .button-done.cant-assist::after{ | |||
| content: "不能辅助"; | |||
| } | |||
| .awoken-total-box::before{ | |||
| content: "觉醒总计:"; | |||
| } | |||
| .type-name-4::after{ | |||
| content: "龍"; | |||
| } | |||
| @@ -410,6 +410,7 @@ function changeid(mon,monDom,latentDom) | |||
| awokenIcon.classList.remove("allowable-assist"); | |||
| } | |||
| } | |||
| refreshAwokenCount(formation.team); | |||
| } | |||
| if (mon.plus) //如果提供了加值 | |||
| { | |||
| @@ -600,7 +601,7 @@ function editBoxChangeMonId(id) | |||
| editBox.latent.length = 0; | |||
| editBox.refreshLatent(editBox.latent); | |||
| } | |||
| //刷新整个队伍 | |||
| function refreshAll(fmt){ | |||
| var txtTitle = document.querySelector(".title-box .title"); | |||
| var txtDetail = document.querySelector(".detail-box .detail"); | |||
| @@ -624,4 +625,24 @@ function refreshAll(fmt){ | |||
| changeid(fmt.team[1][0][ti],fBTeam[ti],fBLatents[ti]); | |||
| changeid(fmt.team[1][1][ti],fBAssist[ti]); | |||
| } | |||
| refreshAwokenCount(fmt.team); | |||
| } | |||
| //刷新觉醒总计 | |||
| function refreshAwokenCount(team){ | |||
| var awokenUL = document.querySelector(".awoken-total-box .m-awoken-ul"); | |||
| function setCount(idx,number){ | |||
| var ali = awokenUL.querySelector(".a-c-" + idx); | |||
| ali.querySelector(".count").innerHTML = number; | |||
| if (number) | |||
| ali.classList.remove("display-none"); | |||
| else | |||
| ali.classList.add("display-none"); | |||
| } | |||
| setCount(21,awokenCountInTeam(team,21)+awokenCountInTeam(team,56)*2); //SB+大SB | |||
| setCount(28,awokenCountInTeam(team,28)); //SX | |||
| setCount(11,awokenCountInTeam(team,11)); //防暗 | |||
| setCount(12,awokenCountInTeam(team,12)); //防废 | |||
| setCount(13,awokenCountInTeam(team,13)); //防毒 | |||
| setCount(54,awokenCountInTeam(team,54)); //防云 | |||
| setCount(55,awokenCountInTeam(team,55)); //防封条 | |||
| } | |||
| @@ -557,6 +557,28 @@ ul{ | |||
| .edit-box .button-box .button-done.cant-assist::after{ | |||
| content: "不能辅助"; | |||
| }*/ | |||
| .awoken-total-box::before{ | |||
| font-size: 20px; | |||
| /*content: "觉醒总计:";*/ | |||
| } | |||
| .detail-box{ | |||
| margin-top:5px; | |||
| } | |||
| .awoken-total-box .m-awoken-ul .awoken-count{ | |||
| font-size: 20px; | |||
| line-height: 32px; | |||
| font-family: 'FOT-KurokaneStd-EB'; | |||
| display: inline-block; | |||
| margin-right: 5px; | |||
| } | |||
| .awoken-total-box .m-awoken-ul .count{ | |||
| height: 32px; | |||
| vertical-align: middle; | |||
| } | |||
| .awoken-total-box .m-awoken-ul .count::before{ | |||
| content: "×"; | |||
| } | |||
| .control-box{ | |||
| margin-bottom: 10px; | |||
| } | |||
| @@ -66,4 +66,38 @@ function uniq(array){ | |||
| temp.push(array[i]); | |||
| } | |||
| return temp; | |||
| } | |||
| //计算用了多少潜觉格子 | |||
| function usedHole(latent) | |||
| { | |||
| return latent.reduce(function(previous,current){ | |||
| return previous + (current>= 12?2:1); | |||
| },0); | |||
| } | |||
| //计算用了多少潜觉格子 | |||
| function awokenCountInTeam(formationTeam,ak) | |||
| { | |||
| var allAwokenCount = formationTeam.reduce(function(fc,fm){ | |||
| var formationAwokenCount = fm.reduce(function(tc,tm,isAssist){ | |||
| var teamAwokenCount = tm.reduce(function(c,m){ | |||
| if (m.id<=0) | |||
| { //如果是特殊情况的 | |||
| return c; | |||
| } | |||
| var mdAwoken = ms[m.id].awoken; //这个怪物的觉醒数据 | |||
| if (!mdAwoken || (isAssist && mdAwoken[0] != 49)) | |||
| { //如果没有觉醒 || (如果是辅助队 &&第一个不是武器觉醒) | |||
| return c; | |||
| } | |||
| //启用的觉醒数 | |||
| var enableAwoken = mdAwoken.slice(0,m.awoken); | |||
| //相同的觉醒数 | |||
| var hasAwoken = enableAwoken.filter(function(a){return a == ak;}).length; | |||
| return c + hasAwoken; | |||
| },0); | |||
| return tc + teamAwokenCount; | |||
| },0) | |||
| return fc + formationAwokenCount; | |||
| },0) | |||
| return allAwokenCount; | |||
| } | |||