| @@ -87,15 +87,16 @@ Please refer to existing files. | |||||
| > 本软件灵感来源于[PDC 智龙迷城伤害计算器](//play.google.com/store/apps/details?id=com.corombo13.paddamagecal) | > 本软件灵感来源于[PDC 智龙迷城伤害计算器](//play.google.com/store/apps/details?id=com.corombo13.paddamagecal) | ||||
| > This software is inspired by [PDC パズドラダメージ計算](//play.google.com/store/apps/details?id=com.corombo13.paddamagecal) | > This software is inspired by [PDC パズドラダメージ計算](//play.google.com/store/apps/details?id=com.corombo13.paddamagecal) | ||||
| © GungHo Online Entertainment Inc. All Right Reserved. | |||||
| 所有图片素材版权与怪物信息归属于GungHo在线娱乐有限公司。 | |||||
| パズル&ドラゴンズに関する画像及び情報等の権利はGungHo Online Entertainment Inc.に帰属します。 | |||||
| ## 智龙迷城官网 | Puzzle & Dragons Official Website | |||||
| * [パズル&ドラゴンズ](http://pad.gungho.jp) | |||||
| * [龍族拼圖](https://pad.gungho.jp/hktw/pad/) | |||||
| * [Puzzle & Dragons](https://www.puzzleanddragons.us/) | |||||
| * [퍼즐앤드래곤](https://pad.neocyon.com/W/) | |||||
| > © GungHo Online Entertainment Inc. All Right Reserved. | |||||
| > 所有图片素材版权与怪物信息归属于GungHo在线娱乐有限公司。 | |||||
| > パズル&ドラゴンズに関する画像及び情報等の権利はGungHo Online Entertainment Inc.に帰属します。 | |||||
| > ### 智龙迷城官网 | Puzzle & Dragons Official Website | |||||
| > * [パズル&ドラゴンズ](http://pad.gungho.jp) | |||||
| > * [龍族拼圖](https://pad.gungho.jp/hktw/pad/) | |||||
| > * [Puzzle & Dragons](https://www.puzzleanddragons.us/) | |||||
| > * [퍼즐앤드래곤](https://pad.neocyon.com/W/) | |||||
| > 卡片中文名、中文分类来自于[Puzzle & Dragons 戰友系統及資訊網](https://pad.skyozora.com/) | |||||
| # 使用开源软件 | Open source software used | # 使用开源软件 | Open source software used | ||||
| * [Puzzle-and-Dragons-Texture-Tool](//github.com/codywatts/Puzzle-and-Dragons-Texture-Tool) //Extract Images | * [Puzzle-and-Dragons-Texture-Tool](//github.com/codywatts/Puzzle-and-Dragons-Texture-Tool) //Extract Images | ||||
| @@ -415,6 +415,10 @@ | |||||
| { | { | ||||
| content: "⛓️Evo Search"; | content: "⛓️Evo Search"; | ||||
| } | } | ||||
| .real-time-change-card-label::after | |||||
| { | |||||
| content: "Real-Time change card"; | |||||
| } | |||||
| .base .evo-type::before, | .base .evo-type::before, | ||||
| .base .evo-type::after | .base .evo-type::after | ||||
| { | { | ||||
| @@ -407,6 +407,10 @@ | |||||
| { | { | ||||
| content: "⛓️進化サーチ"; | content: "⛓️進化サーチ"; | ||||
| } | } | ||||
| .real-time-change-card-label::after | |||||
| { | |||||
| content: "カードを即座に更新します"; | |||||
| } | |||||
| .base .evo-type::before, | .base .evo-type::before, | ||||
| .base .evo-type::after | .base .evo-type::after | ||||
| { | { | ||||
| @@ -404,6 +404,10 @@ | |||||
| { | { | ||||
| content: "⛓️진화 계통"; | content: "⛓️진화 계통"; | ||||
| } | } | ||||
| .real-time-change-card-label::after | |||||
| { | |||||
| content: "카드를 즉시 업데이트합니다"; | |||||
| } | |||||
| .base .evo-type::before, | .base .evo-type::before, | ||||
| .base .evo-type::after | .base .evo-type::after | ||||
| { | { | ||||
| @@ -873,7 +873,7 @@ function parseSkillDescription(skill) { | |||||
| str = `回复队伍总回复力×${sk[0]/100}倍的 HP`; | str = `回复队伍总回复力×${sk[0]/100}倍的 HP`; | ||||
| break; | break; | ||||
| case 146: | case 146: | ||||
| str = `自身以外的宠物技能冷却减少${sk[0]}${sk[0]!=sk[1]?`~${sk[1]}`:""}回合`; | |||||
| str = `自身以外的宠物技能冷却减少↑${sk[0]}${sk[0]!=sk[1]?`~${sk[1]}`:""}回合`; | |||||
| break; | break; | ||||
| case 148: | case 148: | ||||
| str = `进入地下城时为队长的话,获得的等级经验值×${sk[0]/100}倍`; | str = `进入地下城时为队长的话,获得的等级经验值×${sk[0]/100}倍`; | ||||
| @@ -1481,6 +1481,9 @@ function parseSkillDescription(skill) { | |||||
| case 214: //封自己的技能 | case 214: //封自己的技能 | ||||
| str = `${sk[0]}回合内,玩家自身队伍无法使用主动技能`; | str = `${sk[0]}回合内,玩家自身队伍无法使用主动技能`; | ||||
| break; | break; | ||||
| case 218: //坐自己 | |||||
| str = `自身以外的宠物技能坐下↓${sk[0]}${sk[0]!=sk[1]?`~${sk[1]}`:""}回合`; | |||||
| break; | |||||
| default: | default: | ||||
| str = `未知的技能类型${type}(No.${id})`; | str = `未知的技能类型${type}(No.${id})`; | ||||
| //开发部分 | //开发部分 | ||||
| @@ -3379,6 +3382,32 @@ function parseSkillDescription(skill) { | |||||
| const sk = skill.params; | const sk = skill.params; | ||||
| return document.createTextNode(`${sk[0]}${sk[0]!=sk[1]?`~${sk[1]}`:""}溜`); | return document.createTextNode(`${sk[0]}${sk[0]!=sk[1]?`~${sk[1]}`:""}溜`); | ||||
| }}, | }}, | ||||
| {name:"增加CD(按坐数排序,有范围的取小)",function:cards=>cards.filter(card=>{ | |||||
| const searchType = 218; | |||||
| const skill = Skills[card.activeSkillId]; | |||||
| if (skill.type == searchType) | |||||
| return true; | |||||
| else if (skill.type == 116 || skill.type == 118){ | |||||
| const subskills = skill.params.map(id=>Skills[id]); | |||||
| return subskills.some(subskill=>subskill.type == searchType); | |||||
| } | |||||
| }).sort((a,b)=>{ | |||||
| const searchType = 218; | |||||
| const a_s = Skills[a.activeSkillId], b_s = Skills[b.activeSkillId]; | |||||
| let a_pC = 0,b_pC = 0; | |||||
| a_pC = (a_s.type == searchType) ? | |||||
| a_s.params[0] : | |||||
| a_s.params.map(id=>Skills[id]).find(subskill => subskill.type == searchType).params[0]; | |||||
| b_pC = (b_s.type == searchType) ? | |||||
| b_s.params[0] : | |||||
| b_s.params.map(id=>Skills[id]).find(subskill => subskill.type == searchType).params[0]; | |||||
| return a_pC - b_pC; | |||||
| }),addition:card=>{ | |||||
| const searchTypeArray = [218]; | |||||
| const skill = getCardSkill(card, searchTypeArray); | |||||
| const sk = skill.params; | |||||
| return document.createTextNode(`坐下${sk[0]}${sk[0]!=sk[1]?`~${sk[1]}`:""}`); | |||||
| }}, | |||||
| {name:"将自身换为队长",function:cards=>cards.filter(card=>{ | {name:"将自身换为队长",function:cards=>cards.filter(card=>{ | ||||
| const searchType = 93; | const searchType = 93; | ||||
| const skill = Skills[card.activeSkillId]; | const skill = Skills[card.activeSkillId]; | ||||
| @@ -410,6 +410,10 @@ | |||||
| { | { | ||||
| content: "⛓️進化鏈"; | content: "⛓️進化鏈"; | ||||
| } | } | ||||
| .real-time-change-card-label::after | |||||
| { | |||||
| content: "即時更新卡片"; | |||||
| } | |||||
| .base .evo-type::before, | .base .evo-type::before, | ||||
| .base .evo-type::after | .base .evo-type::after | ||||
| { | { | ||||
| @@ -409,6 +409,10 @@ | |||||
| { | { | ||||
| content: "⛓️进化链"; | content: "⛓️进化链"; | ||||
| } | } | ||||
| .real-time-change-card-label::after | |||||
| { | |||||
| content: "即时更新卡片"; | |||||
| } | |||||
| .base .evo-type::before, | .base .evo-type::before, | ||||
| .base .evo-type::after | .base .evo-type::after | ||||
| { | { | ||||
| @@ -1,7 +1,7 @@ | |||||
| 如何获取怪物数据 | How to acquire monster data | 如何获取怪物数据 | How to acquire monster data | ||||
| === | === | ||||
| * 目前的获取API为 | |||||
| * 目前的获取 API 为 | |||||
| The current acquisition API is | The current acquisition API is | ||||
| | 语言 | API | | | 语言 | API | | ||||
| @@ -13,13 +13,13 @@ The current acquisition API is | |||||
| * 但是有加密的参数,我不知道如何生成,所以我只能从游戏的下载过程截获。 | * 但是有加密的参数,我不知道如何生成,所以我只能从游戏的下载过程截获。 | ||||
| But there are encrypted parameters that I don't know how to generate. So I intercepted from the game's download process. | But there are encrypted parameters that I don't know how to generate. So I intercepted from the game's download process. | ||||
| * 使用[Fidder](https://www.telerik.com/download/fiddler),执行*HTTPS中间人攻击*从游戏内抓包获得怪物信息。 | |||||
| * 使用 [Fidder](https://www.telerik.com/download/fiddler),执行 *HTTPS 中间人攻击*从游戏内抓包获得怪物信息。 | |||||
| Use [Fidder](https://www.telerik.com/download/fiddler), do *HTTPS man-in-the-middle attack* to capture monster information from in-game capture. | Use [Fidder](https://www.telerik.com/download/fiddler), do *HTTPS man-in-the-middle attack* to capture monster information from in-game capture. | ||||
| * 安卓5可以直接在安卓系统里安装 *CER* 证书,但安卓7开始,系统不再信任用户证书。 | * 安卓5可以直接在安卓系统里安装 *CER* 证书,但安卓7开始,系统不再信任用户证书。 | ||||
| Android 5 can install *CER* certificates directly in Android. Starting with Android 7, the system no longer trusts user certificates. | Android 5 can install *CER* certificates directly in Android. Starting with Android 7, the system no longer trusts user certificates. | ||||
| * 如果你的模拟器需要安卓7才能玩智龙迷城。以[夜神模拟器](https://www.bignox.com/)为例,在安卓7里安装智龙迷城。 | |||||
| * 如果你的模拟器需要安卓 7 才能玩智龙迷城。以[夜神模拟器](https://www.bignox.com/)为例,在安卓 7 里安装智龙迷城。 | |||||
| If your simulator needs Android 7 to play PAD. Take the [Nox Player](https://www.bignox.com/) for example. Install PAD in Android 7. | If your simulator needs Android 7 to play PAD. Take the [Nox Player](https://www.bignox.com/) for example. Install PAD in Android 7. | ||||
| 1. 将 Fidder 根证书导出到桌面 | 1. 将 Fidder 根证书导出到桌面 | ||||
| @@ -49,8 +49,8 @@ If your simulator needs Android 7 to play PAD. Take the [Nox Player](https://www | |||||
| * 将安卓模拟器内的 WiFi 代理设置到 Fidder 上 | * 将安卓模拟器内的 WiFi 代理设置到 Fidder 上 | ||||
| Set up the WiFi proxy in the Android emulator to Fidder | Set up the WiFi proxy in the Android emulator to Fidder | ||||
| * 打开 Fidder 的 HTTPS 解密,和 GZIP 解码 | |||||
| Turn on Fidder's HTTPS decrypt and GZIP decode | |||||
| * 打开 Fidder 的 允许远程计算机连接、HTTPS 解密、流式传输,和 GZIP 解码 | |||||
| Turn on Fidder's "Allow remote computers to connet", "HTTPS decrypt", "Stream" and "Decode" | |||||
| * 现在你运行模拟器内的游戏,Fidder 就能够截获和解密智龙迷城的数据了。将返回的 JSON 数据保存为文件。 | * 现在你运行模拟器内的游戏,Fidder 就能够截获和解密智龙迷城的数据了。将返回的 JSON 数据保存为文件。 | ||||
| Now that you're running the game inside the simulator, Fidder will be able to intercept and decrypt the data from the PAD. Save the response JSON data as a file. | Now that you're running the game inside the simulator, Fidder will be able to intercept and decrypt the data from the PAD. Save the response JSON data as a file. | ||||
| @@ -120,5 +120,5 @@ Each language's information is extracted into a file, and monster names and tag | |||||
| `CHT.json`与`CHS.json`的中文信息来源于战友网,见子项目 https://github.com/Mapaler/Download-pad.skyozora.com | `CHT.json`与`CHS.json`的中文信息来源于战友网,见子项目 https://github.com/Mapaler/Download-pad.skyozora.com | ||||
| 运行`提取中文数据.bat`,将战友网页面内容抽出,再使用Win64版 [OpenCC](https://github.com/BYVoid/OpenCC) 来繁转简。 | |||||
| 运行`提取中文数据.bat`,将战友网页面内容抽出,抽出过程使用 [OpenCC](https://github.com/BYVoid/OpenCC) 的 NodeJs 模块来繁转简。 | |||||
| 然后再运行一遍 `提取整合怪物信息.bat` 把中文插进去。 | 然后再运行一遍 `提取整合怪物信息.bat` 把中文插进去。 | ||||
| @@ -1 +1 @@ | |||||
| [{"code":"ja","ckey":{"card":"bb6f3e6c6a3d16b4803cde98d69942c3","skill":"f1a5fcfc55bd450ddac0ebab81e00830"},"updateTime":1616595572486},{"code":"en","ckey":{"card":"4bf8ff961d602073d8997362c6b97de8","skill":"3b0f8ca7a9c84d0c71a84a9da71a9ee7"},"updateTime":1616581350642},{"code":"ko","ckey":{"card":"5cd2809bf948e3f809c0148fbba35148","skill":"1f35542f1c5ecc31436b044a13681ddd"},"updateTime":1616581350642}] | |||||
| [{"code":"ja","ckey":{"card":"a442ae9a64910478cb9ab1951a1626c4","skill":"0430113377aa1261574116935ad402dd"},"updateTime":1617964794910},{"code":"en","ckey":{"card":"8838dee4c0e07f12b8d6cd55fdd0f959","skill":"6c1a77e57ad68aa12347a0ec798c68e9"},"updateTime":1617883383834},{"code":"ko","ckey":{"card":"3898af2e88068048513d4d8f865853f1","skill":"0670e1555e1e5a332f9d41dd0bf5db16"},"updateTime":1617883383834}] | |||||
| @@ -673,7 +673,7 @@ var formation = new Formation(teamsCount,5); | |||||
| </div> | </div> | ||||
| <div class="awoken-option"> | <div class="awoken-option"> | ||||
| <input type="checkbox" class="config-checkbox-ipt" name="consider-equivalent-awoken" id="consider-equivalent-awoken" checked><label class="config-checkbox-lbl consider-equivalent-awoken-label" for="consider-equivalent-awoken"><div class="config-checkbox-lbl-cicle"></div></label> | <input type="checkbox" class="config-checkbox-ipt" name="consider-equivalent-awoken" id="consider-equivalent-awoken" checked><label class="config-checkbox-lbl consider-equivalent-awoken-label" for="consider-equivalent-awoken"><div class="config-checkbox-lbl-cicle"></div></label> | ||||
| <input type="checkbox" class="config-checkbox-ipt" name="include-super-awoken" id="include-super-awoken"><label class="config-checkbox-lbl include-super-awoken-label" for="include-super-awoken"><div class="config-checkbox-lbl-cicle"></div></label> | |||||
| <input type="checkbox" class="config-checkbox-ipt" name="include-super-awoken" id="include-super-awoken"><label class="config-checkbox-lbl include-super-awoken-label" for="include-super-awoken"><div class="config-checkbox-lbl-cicle"></div></label> | |||||
| <input type="checkbox" class="config-checkbox-ipt" name="show-official-awoken-sorting" id="show-official-awoken-sorting"><label class="config-checkbox-lbl show-official-awoken-sorting-label" for="show-official-awoken-sorting"><div class="config-checkbox-lbl-cicle"></div></label> | <input type="checkbox" class="config-checkbox-ipt" name="show-official-awoken-sorting" id="show-official-awoken-sorting"><label class="config-checkbox-lbl show-official-awoken-sorting-label" for="show-official-awoken-sorting"><div class="config-checkbox-lbl-cicle"></div></label> | ||||
| <ul class="awoken-ul selected-awokens"> | <ul class="awoken-ul selected-awokens"> | ||||
| </ul> | </ul> | ||||
| @@ -893,6 +893,7 @@ var formation = new Formation(teamsCount,5); | |||||
| </div> | </div> | ||||
| <div class="setting-box"> | <div class="setting-box"> | ||||
| <div class="setting-row row-mon-id"> | <div class="setting-row row-mon-id"> | ||||
| <input type="checkbox" class="config-checkbox-ipt" name="real-time-change-card" id="real-time-change-card"><label class="config-checkbox-lbl real-time-change-card-label" for="real-time-change-card"><div class="config-checkbox-lbl-cicle"></div></label> | |||||
| <button class="open-evolutionary-tree"></button> | <button class="open-evolutionary-tree"></button> | ||||
| <button class="open-search"></button><!--搜索怪物按钮--> | <button class="open-search"></button><!--搜索怪物按钮--> | ||||
| <input type="search" class="m-id" list="monsters-name-list"/><button class="search-by-string"></button> | <input type="search" class="m-id" list="monsters-name-list"/><button class="search-by-string"></button> | ||||
| @@ -927,7 +928,8 @@ var formation = new Formation(teamsCount,5); | |||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="5" id="sawoken-choice-5" /><label for="sawoken-choice-5" class="awoken-icon"></label><!-- | --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="5" id="sawoken-choice-5" /><label for="sawoken-choice-5" class="awoken-icon"></label><!-- | ||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="6" id="sawoken-choice-6" /><label for="sawoken-choice-6" class="awoken-icon"></label><!-- | --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="6" id="sawoken-choice-6" /><label for="sawoken-choice-6" class="awoken-icon"></label><!-- | ||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="7" id="sawoken-choice-7" /><label for="sawoken-choice-7" class="awoken-icon"></label><!-- | --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="7" id="sawoken-choice-7" /><label for="sawoken-choice-7" class="awoken-icon"></label><!-- | ||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="8" id="sawoken-choice-8" /><label for="sawoken-choice-8" class="awoken-icon"></label> | |||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="8" id="sawoken-choice-8" /><label for="sawoken-choice-8" class="awoken-icon"></label><!-- | |||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="9" id="sawoken-choice-9" /><label for="sawoken-choice-9" class="awoken-icon"></label> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| @@ -483,6 +483,41 @@ function searchCards(cards, attr1, attr2, fixMainColor, types, typeAndOr, rares, | |||||
| cardsRange = cardsRange.filter(card => card.id); //去除Cards[0] | cardsRange = cardsRange.filter(card => card.id); //去除Cards[0] | ||||
| return cardsRange; | return cardsRange; | ||||
| } | } | ||||
| function searchByString(str) | |||||
| { // 考虑了一下onlyInTag被废弃了,因为和游戏内搜索不符 | |||||
| str = str.trim(); | |||||
| if (str.length>0) | |||||
| { | |||||
| return Cards.filter(card => | |||||
| { | |||||
| const names = [card.name]; | |||||
| if (card.otLangName) | |||||
| { | |||||
| names.push(...Object.values(card.otLangName)); | |||||
| } | |||||
| const tags = card.altName.concat(); | |||||
| if (card.otTags) | |||||
| { | |||||
| tags.push(...card.otTags); | |||||
| } | |||||
| return tags.some(astr=>astr.toLowerCase().includes(str.toLowerCase())) || | |||||
| names.some(astr=>astr.toLowerCase().includes(str.toLowerCase())); | |||||
| } | |||||
| ); | |||||
| }else | |||||
| { | |||||
| return []; | |||||
| } | |||||
| } | |||||
| function copyString(input) | |||||
| { | |||||
| input.focus(); //设input为焦点 | |||||
| input.select(); //选择全部 | |||||
| if (document.execCommand('copy')) { | |||||
| document.execCommand('copy'); | |||||
| } | |||||
| //input.blur(); //取消焦点 | |||||
| } | |||||
| //产生一个怪物头像 | //产生一个怪物头像 | ||||
| function createCardA() { | function createCardA() { | ||||
| const cdom = document.createElement("a"); | const cdom = document.createElement("a"); | ||||
| @@ -622,12 +657,12 @@ function countTeamHp(memberArr, leader1id, leader2id, solo, noAwoken = false) { | |||||
| scale = needMonIdArr.every(mid => memberIdArr.includes(mid)) ? sk[5] / 100 : 1; | scale = needMonIdArr.every(mid => memberIdArr.includes(mid)) ? sk[5] / 100 : 1; | ||||
| break; | break; | ||||
| case 136: | case 136: | ||||
| scale = hpMul({ attrs: flags(sk[0]) }, sk[1]) * | |||||
| sk[4] ? hpMul({ attrs: flags(sk[4]) }, sk[5]) : 1; | |||||
| scale = hpMul({ attrs: flags(sk[0]) }, sk[1]); | |||||
| if (sk[4]) scale *= hpMul({ attrs: flags(sk[4]) }, sk[5]); | |||||
| break; | break; | ||||
| case 137: | case 137: | ||||
| scale = hpMul({ types: flags(sk[0]) }, sk[1]) * | |||||
| sk[4] ? hpMul({ types: flags(sk[4]) }, sk[5]) : 1; | |||||
| scale = hpMul({ types: flags(sk[0]) }, sk[1]); | |||||
| if (sk[4]) scale *= hpMul({ types: flags(sk[4]) }, sk[5]); | |||||
| break; | break; | ||||
| case 155: | case 155: | ||||
| scale = solo ? 1 : hpMul({ attrs: flags(sk[0]), types: flags(sk[1]) }, sk[2]); | scale = solo ? 1 : hpMul({ attrs: flags(sk[0]), types: flags(sk[1]) }, sk[2]); | ||||
| @@ -16,7 +16,7 @@ let showSearch; //整个程序都可以用的显示搜索函数 | |||||
| const dataStructure = 3; //阵型输出数据的结构版本 | const dataStructure = 3; //阵型输出数据的结构版本 | ||||
| const className_displayNone = "display-none"; | const className_displayNone = "display-none"; | ||||
| const dataAttrName = "data-value"; //用于储存默认数据的属性名 | const dataAttrName = "data-value"; //用于储存默认数据的属性名 | ||||
| const isGuideMod = Boolean(parseInt(getQueryString("guide"))); //是否以图鉴模式启动 | |||||
| const isGuideMod = Boolean(Number(getQueryString("guide"))); //是否以图鉴模式启动 | |||||
| if (location.search.includes('&')) { | if (location.search.includes('&')) { | ||||
| location.search = location.search.replace(/&/ig, '&'); | location.search = location.search.replace(/&/ig, '&'); | ||||
| @@ -422,7 +422,6 @@ class EvoTree | |||||
| const monName = evotPanel_R.appendChild(document.createElement("div")); | const monName = evotPanel_R.appendChild(document.createElement("div")); | ||||
| monName.className = "monster-name"; | monName.className = "monster-name"; | ||||
| monName.textContent = returnMonsterNameArr(this.card, currentLanguage.searchlist, currentDataSource.code)[0]; | monName.textContent = returnMonsterNameArr(this.card, currentLanguage.searchlist, currentDataSource.code)[0]; | ||||
| console.log(monName.offsetWidth); | |||||
| const evotMaterials = evotPanel_R.appendChild(document.createElement("ul")); | const evotMaterials = evotPanel_R.appendChild(document.createElement("ul")); | ||||
| evotMaterials.className = "evo-materials"; | evotMaterials.className = "evo-materials"; | ||||
| @@ -606,20 +605,20 @@ window.onload = function(event) { | |||||
| //记录显示CD开关的状态 | //记录显示CD开关的状态 | ||||
| const showMonSkillCd_id = "show-mon-skill-cd"; | const showMonSkillCd_id = "show-mon-skill-cd"; | ||||
| const btnShowMonSkillCd = controlBox.querySelector(`#btn-${showMonSkillCd_id}`); | const btnShowMonSkillCd = controlBox.querySelector(`#btn-${showMonSkillCd_id}`); | ||||
| btnShowMonSkillCd.checked = Boolean(parseInt(localStorage.getItem("PADDF-" + showMonSkillCd_id))); | |||||
| btnShowMonSkillCd.checked = Boolean(Number(localStorage.getItem("PADDF-" + showMonSkillCd_id))); | |||||
| btnShowMonSkillCd.onclick = function(){ | btnShowMonSkillCd.onclick = function(){ | ||||
| toggleDomClassName(this, showMonSkillCd_id); | toggleDomClassName(this, showMonSkillCd_id); | ||||
| localStorage.setItem("PADDF-" + showMonSkillCd_id, this.checked ? 1 : 0); | |||||
| localStorage.setItem("PADDF-" + showMonSkillCd_id, Number(this.checked)); | |||||
| }; | }; | ||||
| btnShowMonSkillCd.onclick(); | btnShowMonSkillCd.onclick(); | ||||
| //记录显示觉醒开关的状态 | //记录显示觉醒开关的状态 | ||||
| const showMonAwoken_id = "show-mon-awoken"; | const showMonAwoken_id = "show-mon-awoken"; | ||||
| const btnShowMonAwoken = controlBox.querySelector(`#btn-${showMonAwoken_id}`); | const btnShowMonAwoken = controlBox.querySelector(`#btn-${showMonAwoken_id}`); | ||||
| btnShowMonAwoken.checked = Boolean(parseInt(localStorage.getItem("PADDF-" + showMonAwoken_id))); | |||||
| btnShowMonAwoken.checked = Boolean(Number(localStorage.getItem("PADDF-" + showMonAwoken_id))); | |||||
| btnShowMonAwoken.onclick = function(){ | btnShowMonAwoken.onclick = function(){ | ||||
| toggleDomClassName(this, showMonAwoken_id); | toggleDomClassName(this, showMonAwoken_id); | ||||
| localStorage.setItem("PADDF-" + showMonAwoken_id, this.checked ? 1 : 0); | |||||
| localStorage.setItem("PADDF-" + showMonAwoken_id, Number(this.checked)); | |||||
| }; | }; | ||||
| btnShowMonAwoken.onclick(); | btnShowMonAwoken.onclick(); | ||||
| @@ -1218,7 +1217,7 @@ function initialize() { | |||||
| str = str.trim(); | str = str.trim(); | ||||
| if (str.length>0) | if (str.length>0) | ||||
| { | { | ||||
| showSearch(Cards.filter(card => | |||||
| return Cards.filter(card => | |||||
| { | { | ||||
| const names = [card.name]; | const names = [card.name]; | ||||
| if (card.otLangName) | if (card.otLangName) | ||||
| @@ -1233,7 +1232,10 @@ function initialize() { | |||||
| return tags.some(astr=>astr.toLowerCase().includes(str.toLowerCase())) || | return tags.some(astr=>astr.toLowerCase().includes(str.toLowerCase())) || | ||||
| names.some(astr=>astr.toLowerCase().includes(str.toLowerCase())); | names.some(astr=>astr.toLowerCase().includes(str.toLowerCase())); | ||||
| } | } | ||||
| )); | |||||
| ); | |||||
| }else | |||||
| { | |||||
| return []; | |||||
| } | } | ||||
| } | } | ||||
| function copyString(input) | function copyString(input) | ||||
| @@ -1264,7 +1266,7 @@ function initialize() { | |||||
| copyBtn.onclick = function(){copyString(ipt)}; | copyBtn.onclick = function(){copyString(ipt)}; | ||||
| const searchBtn = li.appendChild(document.createElement("button")); | const searchBtn = li.appendChild(document.createElement("button")); | ||||
| searchBtn.className = "string-search"; | searchBtn.className = "string-search"; | ||||
| searchBtn.onclick = function(){searchByString(ipt.value)}; | |||||
| searchBtn.onclick = function(){showSearch(searchByString(ipt.value))}; | |||||
| }); | }); | ||||
| fragment.appendChild(ul_original); | fragment.appendChild(ul_original); | ||||
| } | } | ||||
| @@ -1280,7 +1282,7 @@ function initialize() { | |||||
| ipt.readOnly = true; | ipt.readOnly = true; | ||||
| const searchBtn = li.appendChild(document.createElement("button")); | const searchBtn = li.appendChild(document.createElement("button")); | ||||
| searchBtn.className = "string-search"; | searchBtn.className = "string-search"; | ||||
| searchBtn.onclick = function(){searchByString(ipt.value)}; | |||||
| searchBtn.onclick = function(){showSearch(searchByString(ipt.value))}; | |||||
| }); | }); | ||||
| fragment.appendChild(ul_additional); | fragment.appendChild(ul_additional); | ||||
| } | } | ||||
| @@ -1556,7 +1558,7 @@ function initialize() { | |||||
| const officialSortingClassName = 'show-official-awoken-sorting'; | const officialSortingClassName = 'show-official-awoken-sorting'; | ||||
| const s_showOfficialAwokenSorting = searchBox.querySelector(`#${officialSortingClassName}`); //显示官方排序的觉醒 | const s_showOfficialAwokenSorting = searchBox.querySelector(`#${officialSortingClassName}`); //显示官方排序的觉醒 | ||||
| s_showOfficialAwokenSorting.onchange = function(){ | s_showOfficialAwokenSorting.onchange = function(){ | ||||
| localStorage.setItem("PADDF-" + officialSortingClassName, this.checked ? 1 : 0); | |||||
| localStorage.setItem("PADDF-" + officialSortingClassName, Number(this.checked)); | |||||
| let fragmentAwoken = document.createDocumentFragment(); | let fragmentAwoken = document.createDocumentFragment(); | ||||
| let fragmentSawoken = document.createDocumentFragment(); | let fragmentSawoken = document.createDocumentFragment(); | ||||
| const awokenSorting = this.checked ? official_awoken_sorting : s_awokensUl.originalSorting; | const awokenSorting = this.checked ? official_awoken_sorting : s_awokensUl.originalSorting; | ||||
| @@ -1581,7 +1583,7 @@ function initialize() { | |||||
| s_awokensUl.appendChild(fragmentAwoken); | s_awokensUl.appendChild(fragmentAwoken); | ||||
| s_sawokensUl.appendChild(fragmentSawoken); | s_sawokensUl.appendChild(fragmentSawoken); | ||||
| }; | }; | ||||
| s_showOfficialAwokenSorting.checked = Boolean(parseInt(localStorage.getItem("PADDF-" + officialSortingClassName))); | |||||
| s_showOfficialAwokenSorting.checked = Boolean(Number(localStorage.getItem("PADDF-" + officialSortingClassName))); | |||||
| s_showOfficialAwokenSorting.onchange(); | s_showOfficialAwokenSorting.onchange(); | ||||
| const s_selectedAwokensUl = searchBox.querySelector(".selected-awokens"); | const s_selectedAwokensUl = searchBox.querySelector(".selected-awokens"); | ||||
| @@ -1824,7 +1826,7 @@ function initialize() { | |||||
| //id搜索 | //id搜索 | ||||
| const monstersID = settingBox.querySelector(".row-mon-id .m-id"); | const monstersID = settingBox.querySelector(".row-mon-id .m-id"); | ||||
| const btnSearchByString = settingBox.querySelector(".row-mon-id .search-by-string"); | const btnSearchByString = settingBox.querySelector(".row-mon-id .search-by-string"); | ||||
| monstersID.onchange = function(e) | |||||
| function idChange(e) | |||||
| { | { | ||||
| if (/^\d+$/.test(this.value)) { | if (/^\d+$/.test(this.value)) { | ||||
| const newId = parseInt(this.value, 10); | const newId = parseInt(this.value, 10); | ||||
| @@ -1855,20 +1857,27 @@ function initialize() { | |||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| monstersID.oninput = monstersID.onchange; | |||||
| monstersID.onchange = idChange; | |||||
| monstersID.onkeydown = function(e) { | monstersID.onkeydown = function(e) { | ||||
| //如果键入回车,则执行字符串搜索 | |||||
| if (e.key == "Enter") | |||||
| //如果键入回车,字符串长度大于0,且不是数字,则执行字符串搜索 | |||||
| if (e.key == "Enter" && this.value.length > 0 && !/^\d+$/.test(this.value)) | |||||
| { | { | ||||
| if (!/^\d+$/.test(this.value) && this.value.length > 0) //如果不是数字,且字符串长度大于0,则进行字符串搜索 | |||||
| { | |||||
| searchByString(monstersID.value); | |||||
| } | |||||
| showSearch(searchByString(this.value)); | |||||
| } | } | ||||
| } | } | ||||
| //输入id数字即时更新的开关 | |||||
| const realTimeClassName = 'real-time-change-card'; | |||||
| const s_realTimeChangeCard = settingBox.querySelector(`#${realTimeClassName}`); | |||||
| s_realTimeChangeCard.onchange = function() { | |||||
| monstersID.oninput = this.checked ? idChange : null; | |||||
| localStorage.setItem("PADDF-" + realTimeClassName, Number(this.checked)); | |||||
| } | |||||
| s_realTimeChangeCard.checked = Boolean(Number(localStorage.getItem("PADDF-" + realTimeClassName))); | |||||
| s_realTimeChangeCard.onchange(); | |||||
| //字符串搜索 | //字符串搜索 | ||||
| btnSearchByString.onclick = function() { | btnSearchByString.onclick = function() { | ||||
| searchByString(monstersID.value); | |||||
| showSearch(searchByString(monstersID.value)); | |||||
| }; | }; | ||||
| //觉醒 | //觉醒 | ||||
| const monEditAwokensRow = settingBox.querySelector(".row-mon-awoken"); | const monEditAwokensRow = settingBox.querySelector(".row-mon-awoken"); | ||||
| @@ -1949,8 +1958,8 @@ function initialize() { | |||||
| id: monid, | id: monid, | ||||
| level: level | level: level | ||||
| }; | }; | ||||
| const needExp = calculateExp(tempMon); | |||||
| monLvExp.textContent = needExp ? needExp.map(exp=>exp.bigNumberToString()).join(" + ") : ""; | |||||
| const needExpArr = calculateExp(tempMon); | |||||
| monLvExp.textContent = needExpArr ? needExpArr.map(exp=>exp.bigNumberToString()).join(" + ") : ""; | |||||
| } | } | ||||
| editBox.reCalculateExp = reCalculateExp; | editBox.reCalculateExp = reCalculateExp; | ||||
| //三维 | //三维 | ||||
| @@ -2001,9 +2010,9 @@ function initialize() { | |||||
| const s_hideLessUseLetent = settingBox.querySelector(`#${hideClassName}`); | const s_hideLessUseLetent = settingBox.querySelector(`#${hideClassName}`); | ||||
| s_hideLessUseLetent.onchange = function() { | s_hideLessUseLetent.onchange = function() { | ||||
| toggleDomClassName(this, hideClassName, true, monEditLatentAllowableUl); | toggleDomClassName(this, hideClassName, true, monEditLatentAllowableUl); | ||||
| localStorage.setItem("PADDF-" + hideClassName, this.checked ? 1 : 0); | |||||
| localStorage.setItem("PADDF-" + hideClassName, Number(this.checked)); | |||||
| } | } | ||||
| s_hideLessUseLetent.checked = Boolean(parseInt(localStorage.getItem("PADDF-" + hideClassName))); | |||||
| s_hideLessUseLetent.checked = Boolean(Number(localStorage.getItem("PADDF-" + hideClassName))); | |||||
| s_hideLessUseLetent.onchange(); | s_hideLessUseLetent.onchange(); | ||||
| const rowSkill = settingBox.querySelector(".row-mon-skill"); | const rowSkill = settingBox.querySelector(".row-mon-skill"); | ||||
| @@ -2700,9 +2709,6 @@ function editBoxChangeMonId(id) { | |||||
| mAltName.classList.add(className_displayNone); | mAltName.classList.add(className_displayNone); | ||||
| } | } | ||||
| const evoCardUl = settingBox.querySelector(".row-mon-id .evo-card-list"); | |||||
| evoCardUl.classList.add(className_displayNone); | |||||
| evoCardUl.innerHTML = ""; //据说直接清空HTML性能更好 | |||||
| const evoLinkCardsIdArray = Cards.filter(m=>m.evoRootId == card.evoRootId).map(m=>m.id); //筛选出相同进化链的 | const evoLinkCardsIdArray = Cards.filter(m=>m.evoRootId == card.evoRootId).map(m=>m.id); //筛选出相同进化链的 | ||||
| @@ -2744,6 +2750,9 @@ function editBoxChangeMonId(id) { | |||||
| evoLinkCardsIdArray.sort((a,b)=>a-b); | evoLinkCardsIdArray.sort((a,b)=>a-b); | ||||
| const createCardHead = editBox.createCardHead; | const createCardHead = editBox.createCardHead; | ||||
| const evoCardUl = settingBox.querySelector(".row-mon-id .evo-card-list"); | |||||
| evoCardUl.classList.add(className_displayNone); | |||||
| evoCardUl.innerHTML = ""; //据说直接清空HTML性能更好 | |||||
| const openEvolutionaryTree = settingBox.querySelector(".row-mon-id .open-evolutionary-tree"); | const openEvolutionaryTree = settingBox.querySelector(".row-mon-id .open-evolutionary-tree"); | ||||
| if (evoLinkCardsIdArray.length > 1) { | if (evoLinkCardsIdArray.length > 1) { | ||||
| fragment = document.createDocumentFragment(); //创建节点用的临时空间 | fragment = document.createDocumentFragment(); //创建节点用的临时空间 | ||||
| @@ -2756,10 +2765,10 @@ function editBoxChangeMonId(id) { | |||||
| }); | }); | ||||
| evoCardUl.appendChild(fragment); | evoCardUl.appendChild(fragment); | ||||
| evoCardUl.classList.remove(className_displayNone); | evoCardUl.classList.remove(className_displayNone); | ||||
| openEvolutionaryTree.classList.remove(className_displayNone); | |||||
| openEvolutionaryTree.classList.remove(className_displayNone); //显示进化树按钮 | |||||
| }else | }else | ||||
| { | { | ||||
| openEvolutionaryTree.classList.add(className_displayNone); | |||||
| openEvolutionaryTree.classList.add(className_displayNone); //隐藏进化树按钮 | |||||
| } | } | ||||
| const mType = monInfoBox.querySelectorAll(".monster-type li"); | const mType = monInfoBox.querySelectorAll(".monster-type li"); | ||||
| @@ -773,6 +773,7 @@ var formation = new Formation(teamsCount,6); | |||||
| </div> | </div> | ||||
| <div class="setting-box"> | <div class="setting-box"> | ||||
| <div class="setting-row row-mon-id"> | <div class="setting-row row-mon-id"> | ||||
| <input type="checkbox" class="config-checkbox-ipt" name="real-time-change-card" id="real-time-change-card"><label class="config-checkbox-lbl real-time-change-card-label" for="real-time-change-card"><div class="config-checkbox-lbl-cicle"></div></label> | |||||
| <button class="open-evolutionary-tree"></button> | <button class="open-evolutionary-tree"></button> | ||||
| <button class="open-search"></button><!--搜索怪物按钮--> | <button class="open-search"></button><!--搜索怪物按钮--> | ||||
| <input type="search" class="m-id" list="monsters-name-list"/><button class="search-by-string"></button> | <input type="search" class="m-id" list="monsters-name-list"/><button class="search-by-string"></button> | ||||
| @@ -807,7 +808,8 @@ var formation = new Formation(teamsCount,6); | |||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="5" id="sawoken-choice-5" /><label for="sawoken-choice-5" class="awoken-icon"></label><!-- | --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="5" id="sawoken-choice-5" /><label for="sawoken-choice-5" class="awoken-icon"></label><!-- | ||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="6" id="sawoken-choice-6" /><label for="sawoken-choice-6" class="awoken-icon"></label><!-- | --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="6" id="sawoken-choice-6" /><label for="sawoken-choice-6" class="awoken-icon"></label><!-- | ||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="7" id="sawoken-choice-7" /><label for="sawoken-choice-7" class="awoken-icon"></label><!-- | --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="7" id="sawoken-choice-7" /><label for="sawoken-choice-7" class="awoken-icon"></label><!-- | ||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="8" id="sawoken-choice-8" /><label for="sawoken-choice-8" class="awoken-icon"></label> | |||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="8" id="sawoken-choice-8" /><label for="sawoken-choice-8" class="awoken-icon"></label><!-- | |||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="9" id="sawoken-choice-9" /><label for="sawoken-choice-9" class="awoken-icon"></label> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| @@ -1766,6 +1766,11 @@ icon.inflicts::after | |||||
| { | { | ||||
| opacity: 1; | opacity: 1; | ||||
| } | } | ||||
| .setting-box .row-mon-id .real-time-change-card-label | |||||
| { | |||||
| margin-right: 0; | |||||
| margin-left: 5px; | |||||
| } | |||||
| .setting-box .row-mon-id .open-search{ | .setting-box .row-mon-id .open-search{ | ||||
| float: right; | float: right; | ||||
| } | } | ||||
| @@ -1630,6 +1630,7 @@ var formation = new Formation(teamsCount,6); | |||||
| </div> | </div> | ||||
| <div class="setting-box"> | <div class="setting-box"> | ||||
| <div class="setting-row row-mon-id"> | <div class="setting-row row-mon-id"> | ||||
| <input type="checkbox" class="config-checkbox-ipt" name="real-time-change-card" id="real-time-change-card"><label class="config-checkbox-lbl real-time-change-card-label" for="real-time-change-card"><div class="config-checkbox-lbl-cicle"></div></label> | |||||
| <button class="open-evolutionary-tree"></button> | <button class="open-evolutionary-tree"></button> | ||||
| <button class="open-search"></button><!--搜索怪物按钮--> | <button class="open-search"></button><!--搜索怪物按钮--> | ||||
| <input type="search" class="m-id" list="monsters-name-list"/><button class="search-by-string"></button> | <input type="search" class="m-id" list="monsters-name-list"/><button class="search-by-string"></button> | ||||
| @@ -1664,7 +1665,8 @@ var formation = new Formation(teamsCount,6); | |||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="5" id="sawoken-choice-5" /><label for="sawoken-choice-5" class="awoken-icon"></label><!-- | --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="5" id="sawoken-choice-5" /><label for="sawoken-choice-5" class="awoken-icon"></label><!-- | ||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="6" id="sawoken-choice-6" /><label for="sawoken-choice-6" class="awoken-icon"></label><!-- | --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="6" id="sawoken-choice-6" /><label for="sawoken-choice-6" class="awoken-icon"></label><!-- | ||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="7" id="sawoken-choice-7" /><label for="sawoken-choice-7" class="awoken-icon"></label><!-- | --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="7" id="sawoken-choice-7" /><label for="sawoken-choice-7" class="awoken-icon"></label><!-- | ||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="8" id="sawoken-choice-8" /><label for="sawoken-choice-8" class="awoken-icon"></label> | |||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="8" id="sawoken-choice-8" /><label for="sawoken-choice-8" class="awoken-icon"></label><!-- | |||||
| --><input type="radio" name="sawoken-choice" class="sawoken-choice" value="9" id="sawoken-choice-9" /><label for="sawoken-choice-9" class="awoken-icon"></label> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||