Merge branch 'master' into skillParser
# Conflicts: # languages/en.css # languages/ko.css # script-universal_function.js # script.js # style.css
16
README.md
|
@ -56,14 +56,16 @@ Chrome browser need start with the additional argument `--allow-file-access-from
|
|||
This is an Object for a language list item.
|
||||
```js
|
||||
{
|
||||
name:"English",
|
||||
i18n:"en",
|
||||
searchlist:["en","ja"],
|
||||
guideURL:id=>`http://www.puzzledragonx.com/en/monster.asp?n=${id}`
|
||||
name: "English",
|
||||
i18n: "en",
|
||||
i18n_RegExp: /^en/i,
|
||||
searchlist: ["en","ja"],
|
||||
guideURL: id=>`http://www.puzzledragonx.com/en/monster.asp?n=${id}`
|
||||
}
|
||||
```
|
||||
* `name` is the name shown in the list.
|
||||
* `i18n` is the language-tag for your language.
|
||||
* `name` is the showed name in the list.
|
||||
* `i18n` is the language-tag for your language. You need to make sure that the file names are the same.
|
||||
* `i18n_RegExp` is a *Regular Expressions* to match multiple `navigator.language` (like `/^en/i` can match `en-US`, `en-CA` and `en-AU`).
|
||||
* `searchlist` is the search candidate list string order when you search monster in edit window.
|
||||
Currently only `ja`,`en`,`ko`,`cht`,`chs` languages.(See [monsters-info](monsters-info))
|
||||
* `guideURL` is a **Function(cardId,cardName)** to return game guide URL for your language.
|
||||
|
@ -101,7 +103,9 @@ Please refer to existing files.
|
|||
# 使用开源软件 | Open source software used
|
||||
* [Puzzle-and-Dragons-Texture-Tool](//github.com/codywatts/Puzzle-and-Dragons-Texture-Tool) //Extract Images
|
||||
* [pad-rikuu](//github.com/kiootic/pad-rikuu) //Parse data
|
||||
* [zxing-js](//github.com/zxing-js/library) //Read, Write QR Code
|
||||
* [html2canvas](//github.com/niklasvh/html2canvas) //Capture Image
|
||||
* [aaa](//github.com/jy4340132/aaa) //Play voice(ADPCM wav)
|
||||
* [Font Awesome Free](https://github.com/FortAwesome/Font-Awesome) //Font Icon
|
||||
* [Zpix (最像素)](//github.com/SolidZORO/zpix-pixel-font) //Pixel Font
|
||||
* [font-spider](//github.com/aui/font-spider) //Compression Font file
|
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 898 KiB |
17
help.md
|
@ -5,7 +5,22 @@ Copy the URL directly to share the Formation, or add a Bookmark to archives. You
|
|||

|
||||
你也可以使用浏览器扩展生成二维码来分享网址。
|
||||
You can also share the URL in QR code by browser extensions.
|
||||

|
||||
* 可以使用摄像头读取队伍二维码
|
||||
You can use the camera to read the Formation QR code
|
||||

|
||||
读取到的队伍会显示为链接
|
||||
The read Formation appears as a link
|
||||

|
||||
目前可以读取 | Currently can read:
|
||||
1. 本程序格式的二维码
|
||||
This program format QR code
|
||||

|
||||
1. 使用浏览器扩展生成本程序组队网址链接的二维码
|
||||
QR code of this program Formation URL which generated by browser extension.
|
||||

|
||||
1. PDC 的二维码
|
||||
PDC format QR code
|
||||

|
||||
* 使用后退即可撤销上一次修改。
|
||||
Use back to undo the last edit.
|
||||

|
||||
|
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 156 KiB |
Before Width: | Height: | Size: 704 KiB After Width: | Height: | Size: 725 KiB |
Before Width: | Height: | Size: 950 KiB After Width: | Height: | Size: 970 KiB |
Before Width: | Height: | Size: 508 KiB After Width: | Height: | Size: 774 KiB |
Before Width: | Height: | Size: 219 KiB After Width: | Height: | Size: 320 KiB |
Before Width: | Height: | Size: 689 KiB After Width: | Height: | Size: 904 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 323 KiB |
Before Width: | Height: | Size: 711 KiB After Width: | Height: | Size: 732 KiB |
Before Width: | Height: | Size: 950 KiB After Width: | Height: | Size: 970 KiB |
Before Width: | Height: | Size: 508 KiB After Width: | Height: | Size: 774 KiB |
Before Width: | Height: | Size: 219 KiB After Width: | Height: | Size: 320 KiB |
Before Width: | Height: | Size: 374 KiB After Width: | Height: | Size: 376 KiB |
|
@ -0,0 +1 @@
|
|||
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="qrcode" class="svg-inline--fa fa-qrcode fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" width="14" height="14"><path fill="currentColor" d="M0 224h192V32H0v192zM64 96h64v64H64V96zm192-64v192h192V32H256zm128 128h-64V96h64v64zM0 480h192V288H0v192zm64-128h64v64H64v-64zm352-64h32v128h-96v-32h-32v96h-64V288h96v32h64v-32zm0 160h32v32h-32v-32zm-64 0h32v32h-32v-32z"></path></svg>
|
After Width: | Height: | Size: 474 B |
|
@ -507,4 +507,50 @@
|
|||
}
|
||||
.icon-skill[data-icon-type="resolve"] {
|
||||
background-position-x: calc(-36px * 1);
|
||||
}
|
||||
.control-box .btn-qrcode::before{
|
||||
content: "\f029 QR Code";
|
||||
}
|
||||
|
||||
.read-qr-box::before
|
||||
{
|
||||
content: "Read QR code:";
|
||||
}
|
||||
.save-qr-box::before
|
||||
{
|
||||
content: "Generate QR code:";
|
||||
}
|
||||
|
||||
.formation-from-qrcode::before
|
||||
{
|
||||
content: "A formation link read from a QR code";
|
||||
}
|
||||
label[for="sourceSelect"]::before
|
||||
{
|
||||
content: "Video source selection:";
|
||||
}
|
||||
#qr-code-frame .save-qr-img::before
|
||||
{
|
||||
content: "\f0c7 Save QR code image";
|
||||
}
|
||||
#qr-code-frame .read-qr-camera::before
|
||||
{
|
||||
content: "\f030 Scan with the camera";
|
||||
}
|
||||
#qr-code-frame .read-qr-camera.running::before
|
||||
{
|
||||
content: "\f28d Stop using the camera";
|
||||
}
|
||||
#qr-code-frame .read-qr-file::before
|
||||
{
|
||||
content: "\f1c5 Read the image file";
|
||||
}
|
||||
|
||||
label[for="qr-data-type-pdf"]::before
|
||||
{
|
||||
content: "P&D Formation Maker";
|
||||
}
|
||||
label[for="qr-data-type-pdc"]::before
|
||||
{
|
||||
content: "P&D Damage Caculater (PDC)";
|
||||
}
|
|
@ -470,4 +470,51 @@
|
|||
.henshin-loop .evo-type::after
|
||||
{
|
||||
content: "ループ変身";
|
||||
}
|
||||
|
||||
.control-box .btn-qrcode::before{
|
||||
content: "\f029 QRコード";
|
||||
}
|
||||
|
||||
.read-qr-box::before
|
||||
{
|
||||
content: "QRコードを読み取る:";
|
||||
}
|
||||
.save-qr-box::before
|
||||
{
|
||||
content: "QRコードを生成します:";
|
||||
}
|
||||
|
||||
.formation-from-qrcode::before
|
||||
{
|
||||
content: "QRコードから読み取られたフォーメーションリンク";
|
||||
}
|
||||
label[for="sourceSelect"]::before
|
||||
{
|
||||
content: "ビデオ ソースの選択:";
|
||||
}
|
||||
#qr-code-frame .save-qr-img::before
|
||||
{
|
||||
content: "\f0c7 QRコードイメージを保存";
|
||||
}
|
||||
#qr-code-frame .read-qr-camera::before
|
||||
{
|
||||
content: "\f030 カメラでスキャンする";
|
||||
}
|
||||
#qr-code-frame .read-qr-camera.running::before
|
||||
{
|
||||
content: "\f28d カメラの使用を停止します";
|
||||
}
|
||||
#qr-code-frame .read-qr-file::before
|
||||
{
|
||||
content: "\f1c5 画像ファイルを読み取る";
|
||||
}
|
||||
|
||||
label[for="qr-data-type-pdf"]::before
|
||||
{
|
||||
content: "パズドラチーム図作成ツール";
|
||||
}
|
||||
label[for="qr-data-type-pdc"]::before
|
||||
{
|
||||
content: "パズドラダメージ計算 (PDC)";
|
||||
}
|
|
@ -464,4 +464,51 @@
|
|||
}
|
||||
.icon-skill[data-icon-type="resolve"] {
|
||||
background-position-x: calc(-36px * 2);
|
||||
}
|
||||
|
||||
.control-box .btn-qrcode::before{
|
||||
content: "\f029 QR 코드";
|
||||
}
|
||||
|
||||
.read-qr-box::before
|
||||
{
|
||||
content: "QR 코드 읽기:";
|
||||
}
|
||||
.save-qr-box::before
|
||||
{
|
||||
content: "QR 코드 생성:";
|
||||
}
|
||||
|
||||
.formation-from-qrcode::before
|
||||
{
|
||||
content: "QR 코드에서 읽은 형성 링크";
|
||||
}
|
||||
label[for="sourceSelect"]::before
|
||||
{
|
||||
content: "비디오 소스 선택:";
|
||||
}
|
||||
#qr-code-frame .save-qr-img::before
|
||||
{
|
||||
content: "\f0c7 QR 코드 이미지 저장";
|
||||
}
|
||||
#qr-code-frame .read-qr-camera::before
|
||||
{
|
||||
content: "\f030 카메라로 스캔";
|
||||
}
|
||||
#qr-code-frame .read-qr-camera.running::before
|
||||
{
|
||||
content: "\f28d 카메라 사용을 중지합니다";
|
||||
}
|
||||
#qr-code-frame .read-qr-file::before
|
||||
{
|
||||
content: "\f1c5 이미지 파일 읽기";
|
||||
}
|
||||
|
||||
label[for="qr-data-type-pdf"]::before
|
||||
{
|
||||
content: "퍼즐앤드래곤 팀 다이어그램 생성 도구";
|
||||
}
|
||||
label[for="qr-data-type-pdc"]::before
|
||||
{
|
||||
content: "퍼즐앤드래곤 데미지 카큐라터 (PDC)";
|
||||
}
|
|
@ -1,20 +1,19 @@
|
|||
var languageList = [
|
||||
const languageList = [
|
||||
{
|
||||
name:"English",i18n:"en",searchlist:["en","ja"],
|
||||
guideURL:id=>`http://www.puzzledragonx.com/en/monster.asp?n=${id}` //or (id,name)=>`http://www.puzzledragonx.com/en/search.asp?q=${name}`
|
||||
},
|
||||
{
|
||||
name:"中文(繁體)",i18n:"zh-TW",searchlist:["cht","ja"],
|
||||
guideURL:id=>`http://pad.skyozora.com/pets/${id}`
|
||||
name:"中文(繁體)",i18n:"zh-TW",i18n_RegExp:/^zh-(?:hant-)?TW/i,searchlist:["cht","ja"],
|
||||
guideURL:id=>`https://pad.skyozora.com/pets/${id}`
|
||||
},
|
||||
{
|
||||
name:"中文(简体)技能解析",i18n:"zh-CN",searchlist:["chs","ja"],
|
||||
guideURL:id=>`http://pad.skyozora.com/pets/${id}`
|
||||
//guideURL:id=>{const url = new URL(location);url.search = '';url.searchParams.set("guide",1);url.searchParams.set("id",id); return url;}
|
||||
name:"中文(简体)技能解析",i18n:"zh-CN",i18n_RegExp:/^zh-(?:hans-)?/i,searchlist:["chs","ja"],
|
||||
guideURL:id=>`https://pad.skyozora.com/pets/${id}`
|
||||
},
|
||||
{
|
||||
name:"中文(简体)原版技能",i18n:"zh",searchlist:["chs","ja"],
|
||||
guideURL:id=>`http://pad.skyozora.com/pets/${id}`
|
||||
guideURL:id=>`https://pad.skyozora.com/pets/${id}`
|
||||
},
|
||||
{
|
||||
name:"日本語",i18n:"ja",searchlist:["ja"],
|
||||
|
|
|
@ -808,7 +808,7 @@ function parseSkillDescription(skill) {
|
|||
return fragment;
|
||||
break;
|
||||
case 126:
|
||||
str = `${sk[1]}${sk[1] != sk[2]?`~${sk[2]}`:""}回合内,${nb(sk[0], attrsName).join("、")}宝珠的掉落率提高${sk[3]}%`;
|
||||
str = `${sk[1]}${sk[1] != sk[2]?`~${sk[2]}`:""}回合内,${nb(sk[0], attrsName).join("、")}宝珠的掉落率提高到${sk[3]}%`;
|
||||
break;
|
||||
case 127: //生成竖列
|
||||
strArr = [];
|
||||
|
@ -1544,6 +1544,9 @@ function parseSkillDescription(skill) {
|
|||
case 223:
|
||||
str = `${sk[0]}连击以上时,追加${sk[1].bigNumberToString()}点固定伤害`;
|
||||
break;
|
||||
case 224:
|
||||
str = `${sk[0]}回合内,敌人全体变为${attrN(sk[1])}属性。(不受防护盾的影响)`;
|
||||
break;
|
||||
default:
|
||||
str = `未知的技能类型${type}(No.${id})`;
|
||||
//开发部分
|
||||
|
@ -3603,37 +3606,62 @@ function parseSkillDescription(skill) {
|
|||
b_s.params.map(id=>Skills[id]).find(subskill => subskill.type == searchType).params[0];
|
||||
return a_pC - b_pC;
|
||||
})},
|
||||
{name:"改变敌人属性(按属性排序)",function:cards=>cards.filter(card=>{
|
||||
const searchType = 153;
|
||||
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);
|
||||
{name:"改变敌人属性(按属性排序)",
|
||||
function:cards=>{
|
||||
//获取属性变化
|
||||
function getAttrChange(ls)
|
||||
{
|
||||
if (!ls) return null;
|
||||
const sk = ls.params;
|
||||
switch (ls.type)
|
||||
{
|
||||
case 153: //永久变色
|
||||
return sk[0];
|
||||
case 224: //回合变色
|
||||
return sk[1] || 0;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
const searchTypeArray = [153, 224];
|
||||
return cards.filter(card=>{
|
||||
const skill = getCardActiveSkill(card, searchTypeArray);
|
||||
return getAttrChange(skill) != null;
|
||||
}).sort((a,b)=>{
|
||||
const a_s = getCardActiveSkill(a, searchTypeArray), b_s = getCardActiveSkill(b, searchTypeArray);
|
||||
let a_pC = getAttrChange(a_s),b_pC = getAttrChange(b_s);
|
||||
return a_pC - b_pC;
|
||||
})
|
||||
},
|
||||
addition:card=>{
|
||||
//获取属性变化
|
||||
function getAttrChange(ls)
|
||||
{
|
||||
if (!ls) return null;
|
||||
const sk = ls.params;
|
||||
switch (ls.type)
|
||||
{
|
||||
case 153: //永久变色
|
||||
return sk[0];
|
||||
case 224: //回合变色
|
||||
return sk[1] || 0;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
const searchTypeArray = [153, 224];
|
||||
const skill = getCardActiveSkill(card, searchTypeArray);
|
||||
const sk = skill.params;
|
||||
|
||||
const colors = [getAttrChange(skill)];
|
||||
const fragment = document.createDocumentFragment();
|
||||
if (skill.type == 224)
|
||||
fragment.appendChild(document.createTextNode(`${sk[0]}T,`));
|
||||
fragment.appendChild(document.createTextNode(`敌→`));
|
||||
fragment.appendChild(createOrbsList(colors));
|
||||
return fragment;
|
||||
}
|
||||
}).sort((a,b)=>{
|
||||
const searchType = 153;
|
||||
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 = [153];
|
||||
const skill = getCardSkill(card, searchTypeArray);
|
||||
const sk = skill.params;
|
||||
|
||||
const colors = [sk[0]];
|
||||
const fragment = document.createDocumentFragment();
|
||||
fragment.appendChild(document.createTextNode(`敌→`));
|
||||
fragment.appendChild(createOrbsList(colors));
|
||||
return fragment;
|
||||
}},
|
||||
},
|
||||
{name:"受伤反击 buff",function:cards=>cards.filter(card=>{
|
||||
const searchType = 60;
|
||||
const skill = Skills[card.activeSkillId];
|
||||
|
|
|
@ -463,4 +463,51 @@
|
|||
.henshin-loop .evo-type::after
|
||||
{
|
||||
content: "循環變身";
|
||||
}
|
||||
|
||||
.control-box .btn-qrcode::before{
|
||||
content: "\f029 二維碼";
|
||||
}
|
||||
|
||||
.read-qr-box::before
|
||||
{
|
||||
content: "讀取二維碼:";
|
||||
}
|
||||
.save-qr-box::before
|
||||
{
|
||||
content: "生成二維碼:";
|
||||
}
|
||||
|
||||
.formation-from-qrcode::before
|
||||
{
|
||||
content: "從二維碼中讀取的隊伍連結";
|
||||
}
|
||||
label[for="sourceSelect"]::before
|
||||
{
|
||||
content: "視頻源選擇:";
|
||||
}
|
||||
#qr-code-frame .save-qr-img::before
|
||||
{
|
||||
content: "\f0c7 保存二維碼圖片";
|
||||
}
|
||||
#qr-code-frame .read-qr-camera::before
|
||||
{
|
||||
content: "\f030 使用相機掃描";
|
||||
}
|
||||
#qr-code-frame .read-qr-camera.running::before
|
||||
{
|
||||
content: "\f28d 停止使用相機";
|
||||
}
|
||||
#qr-code-frame .read-qr-file::before
|
||||
{
|
||||
content: "\f1c5 讀取二維碼圖片";
|
||||
}
|
||||
|
||||
label[for="qr-data-type-pdf"]::before
|
||||
{
|
||||
content: "龍族拼圖隊伍圖製作工具";
|
||||
}
|
||||
label[for="qr-data-type-pdc"]::before
|
||||
{
|
||||
content: "智龙迷城傷害計算器 (PDC)";
|
||||
}
|
|
@ -234,6 +234,7 @@
|
|||
.control-box .btn-capture::before{
|
||||
content: "📷截图";
|
||||
}
|
||||
|
||||
.control-box .btn-swap-AB-team::before{
|
||||
content: "🔄交换AB队";
|
||||
}
|
||||
|
@ -462,4 +463,51 @@
|
|||
.henshin-loop .evo-type::after
|
||||
{
|
||||
content: "循環変身";
|
||||
}
|
||||
|
||||
.control-box .btn-qrcode::before{
|
||||
content: "\f029 二维码";
|
||||
}
|
||||
|
||||
.read-qr-box::before
|
||||
{
|
||||
content: "读取二维码:";
|
||||
}
|
||||
.save-qr-box::before
|
||||
{
|
||||
content: "生成二维码:";
|
||||
}
|
||||
|
||||
.formation-from-qrcode::before
|
||||
{
|
||||
content: "从二维码中读取的队伍链接";
|
||||
}
|
||||
label[for="sourceSelect"]::before
|
||||
{
|
||||
content: "视频源选择:";
|
||||
}
|
||||
#qr-code-frame .save-qr-img::before
|
||||
{
|
||||
content: "\f0c7 保存二维码图片";
|
||||
}
|
||||
#qr-code-frame .read-qr-camera::before
|
||||
{
|
||||
content: "\f030 使用相机扫描";
|
||||
}
|
||||
#qr-code-frame .read-qr-camera.running::before
|
||||
{
|
||||
content: "\f28d 停止使用相机";
|
||||
}
|
||||
#qr-code-frame .read-qr-file::before
|
||||
{
|
||||
content: "\f1c5 读取二维码图片";
|
||||
}
|
||||
|
||||
label[for="qr-data-type-pdf"]::before
|
||||
{
|
||||
content: "智龙迷城队伍图制作工具";
|
||||
}
|
||||
label[for="qr-data-type-pdc"]::before
|
||||
{
|
||||
content: "智龙迷城伤害计算器(PDC)";
|
||||
}
|
|
@ -1 +1 @@
|
|||
[{"code":"ja","ckey":{"card":"d0a44e4f4a6ac30454d5f2e39a5cc718","skill":"24cc7521c9973e5b5ae2d0909614de15"},"updateTime":1622180465888},{"code":"en","ckey":{"card":"b5341eecf21fac29395b459adf19be84","skill":"56135d3695cf89fef75d3561a5c4fc3a"},"updateTime":1622180465888},{"code":"ko","ckey":{"card":"aa64f926dfb2f7c4e4a5d61c607ba471","skill":"568c69fa8779d12f175d68135ab49a29"},"updateTime":1622180465888}]
|
||||
[{"code":"ja","ckey":{"card":"349663b3b9ea313f4e0d22f417e100cf","skill":"24ecdf1bc637b4f50b024d90aa215d20"},"updateTime":1624018972296},{"code":"en","ckey":{"card":"d319d706397dc21a08788aa61d733692","skill":"c0a598c2008ec8de8ea94b32c4c02046"},"updateTime":1624018972296},{"code":"ko","ckey":{"card":"918aa14ff6595d5e83f1d8349615d483","skill":"d38ac2d5ce2ad97612cedc6792833b22"},"updateTime":1624018972296}]
|
|
@ -33,6 +33,13 @@ class monInfo
|
|||
this.tags = [];
|
||||
}
|
||||
}
|
||||
const chsTranDiff = [
|
||||
{reg:"铁甲奇侠",chs:"钢铁侠"},
|
||||
{reg:"变形侠医",chs:"绿巨人"},
|
||||
{reg:"毒魔",chs:"毒液"},
|
||||
{reg:"魁隆",chs:"灭霸"},
|
||||
{reg:"福瑞",chs:"弗瑞"},
|
||||
];
|
||||
|
||||
//根据文件路径读取文件,返回文件列表
|
||||
fs.readdir(sourceFolder,function(err,files){
|
||||
|
@ -104,6 +111,7 @@ fs.readdir(sourceFolder,function(err,files){
|
|||
{
|
||||
const m = new monInfo(m_cht.id);
|
||||
m.name = converter.convertSync(m_cht.name);
|
||||
chsTranDiff.forEach(o=>m.name = m.name.replace(new RegExp(o.reg,"ig"),o.chs));
|
||||
m_cht.tags.forEach(tag=> m.tags.push(converter.convertSync(tag)) );
|
||||
monArr_chs.push(m);
|
||||
}
|
||||
|
|
53
multi.html
|
@ -18,6 +18,7 @@ const teamsCount = 2;
|
|||
<script type="text/javascript" src="script-skill-parser.js"></script>
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="library/html2canvas.min.js"></script>
|
||||
<script type="text/javascript" src="library/zxing.umd.min.js"></script>
|
||||
<!--▼ADPCM播放相关-->
|
||||
<script type="text/javascript" src="library/jy4340132-aaa/std.js"></script>
|
||||
<script type="text/javascript" src="library/jy4340132-aaa/pcm_player.js"></script>
|
||||
|
@ -59,6 +60,7 @@ var formation = new Formation(teamsCount,5);
|
|||
<div>
|
||||
<button class="btn-clear-data" onclick="clearData();"></button>
|
||||
<button class="btn-capture" onclick="capture();"></button>
|
||||
<button class="btn-qrcode"></button>
|
||||
<a class="down-capture display-none" target="_blank"></a>
|
||||
<button class="btn-solo-link" onclick="turnPage(1,arguments[0]);"></button>
|
||||
<button class="btn-triple-link" onclick="turnPage(3,arguments[0]);"></button>
|
||||
|
@ -701,14 +703,16 @@ var formation = new Formation(teamsCount,5);
|
|||
</div>
|
||||
<div class="awoken-div"><!--觉醒-->
|
||||
<ul class="awoken-ul all-awokens">
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="49" data-max-count="1"></button><!--武器觉醒--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="21"></button><!--SB--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="52" data-max-count="1"></button><!--大防封--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="43"></button><!--7c--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="61"></button><!--10c--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="58"></button><!--下半血强化--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="48"></button><!--破无效--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="27"></button><!--U--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="21"></button><!--SB--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="49" data-max-count="1"></button><!--武器觉醒--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="52" data-max-count="1"></button><!--大防封--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="60"></button><!--L解锁--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="58"></button><!--下半血强化--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="57"></button><!--上半血强化--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="11" data-max-count="5"></button><!--防暗--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="12" data-max-count="5"></button><!--防废--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="13" data-max-count="5"></button><!--防毒--></li>
|
||||
|
@ -717,7 +721,6 @@ var formation = new Formation(teamsCount,5);
|
|||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="45" data-max-count="1"></button><!--心追--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="50"></button><!--方块心追--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="19"></button><!--手指--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="60"></button><!--L解锁--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="1"></button><!--HP+--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="2"></button><!--攻击+--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="3"></button><!--回复+--></li>
|
||||
|
@ -760,7 +763,6 @@ var formation = new Formation(teamsCount,5);
|
|||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="51"></button><!--5色溜--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="53"></button><!--大手指--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="56"></button><!--大SB--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="57"></button><!--满血强化--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="59"></button><!--L盾--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="62"></button><!--c珠--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="63" data-max-count="1"></button><!--语音--></li>
|
||||
|
@ -784,13 +786,15 @@ var formation = new Formation(teamsCount,5);
|
|||
<div class="sawoken-div"><!--超觉醒-->
|
||||
<button class="sawoken-clear brown-button" ></button>
|
||||
<ul class="sawoken-ul">
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="43" id="search-awoken-43" /><label class="awoken-icon" data-awoken-icon="43" for="search-awoken-43"></label><!--7c--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="61" id="search-awoken-61" /><label class="awoken-icon" data-awoken-icon="61" for="search-awoken-61"></label><!--10c--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="58" id="search-awoken-58" /><label class="awoken-icon" data-awoken-icon="58" for="search-awoken-58"></label><!--下半血强化--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="48" id="search-awoken-48" /><label class="awoken-icon" data-awoken-icon="48" for="search-awoken-48"></label><!--破无效--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="27" id="search-awoken-27" /><label class="awoken-icon" data-awoken-icon="27" for="search-awoken-27"></label><!--U--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="21" id="search-awoken-21" /><label class="awoken-icon" data-awoken-icon="21" for="search-awoken-21"></label><!--SB--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="52" id="search-awoken-52" /><label class="awoken-icon" data-awoken-icon="52" for="search-awoken-52"></label><!--大防封--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="43" id="search-awoken-43" /><label class="awoken-icon" data-awoken-icon="43" for="search-awoken-43"></label><!--7c--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="61" id="search-awoken-61" /><label class="awoken-icon" data-awoken-icon="61" for="search-awoken-61"></label><!--10c--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="48" id="search-awoken-48" /><label class="awoken-icon" data-awoken-icon="48" for="search-awoken-48"></label><!--破无效--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="27" id="search-awoken-27" /><label class="awoken-icon" data-awoken-icon="27" for="search-awoken-27"></label><!--U--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="60" id="search-awoken-60" /><label class="awoken-icon" data-awoken-icon="60" for="search-awoken-60"></label><!--L解锁--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="58" id="search-awoken-58" /><label class="awoken-icon" data-awoken-icon="58" for="search-awoken-58"></label><!--下半血强化--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="57" id="search-awoken-57" /><label class="awoken-icon" data-awoken-icon="57" for="search-awoken-57"></label><!--上半血强化--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="68" id="search-awoken-68" /><label class="awoken-icon" data-awoken-icon="68" for="search-awoken-68"></label><!--大防暗--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="69" id="search-awoken-69" /><label class="awoken-icon" data-awoken-icon="69" for="search-awoken-69"></label><!--大防废--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="70" id="search-awoken-70" /><label class="awoken-icon" data-awoken-icon="70" for="search-awoken-70"></label><!--大防毒--></li>
|
||||
|
@ -799,7 +803,6 @@ var formation = new Formation(teamsCount,5);
|
|||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="45" id="search-awoken-45" /><label class="awoken-icon" data-awoken-icon="45" for="search-awoken-45"></label><!--心追--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="50" id="search-awoken-50" /><label class="awoken-icon" data-awoken-icon="50" for="search-awoken-50"></label><!--方块心追--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="19" id="search-awoken-19" /><label class="awoken-icon" data-awoken-icon="19" for="search-awoken-19"></label><!--手指--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="60" id="search-awoken-60" /><label class="awoken-icon" data-awoken-icon="60" for="search-awoken-60"></label><!--L解锁--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="1" id="search-awoken-1" /><label class="awoken-icon" data-awoken-icon="1" for="search-awoken-1"></label><!--HP+--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="2" id="search-awoken-2" /><label class="awoken-icon" data-awoken-icon="2" for="search-awoken-2"></label><!--攻击+--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="3" id="search-awoken-3" /><label class="awoken-icon" data-awoken-icon="3" for="search-awoken-3"></label><!--回复+--></li>
|
||||
|
@ -846,7 +849,6 @@ var formation = new Formation(teamsCount,5);
|
|||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="51" id="search-awoken-51" /><label class="awoken-icon" data-awoken-icon="51" for="search-awoken-51"></label><!--5色溜--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="53" id="search-awoken-53" /><label class="awoken-icon" data-awoken-icon="53" for="search-awoken-53"></label><!--大手指--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="56" id="search-awoken-56" /><label class="awoken-icon" data-awoken-icon="56" for="search-awoken-56"></label><!--大SB--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="57" id="search-awoken-57" /><label class="awoken-icon" data-awoken-icon="57" for="search-awoken-57"></label><!--满血强化--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="59" id="search-awoken-59" /><label class="awoken-icon" data-awoken-icon="59" for="search-awoken-59"></label><!--L盾--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="62" id="search-awoken-62" /><label class="awoken-icon" data-awoken-icon="62" for="search-awoken-62"></label><!--c珠--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="63" id="search-awoken-63" /><label class="awoken-icon" data-awoken-icon="63" for="search-awoken-63"></label><!--语音--></li>
|
||||
|
@ -1094,5 +1096,30 @@ var formation = new Formation(teamsCount,5);
|
|||
<line />
|
||||
</g>
|
||||
</svg>
|
||||
<div id="qr-code-frame" class="mask display-none">
|
||||
<button class="mask-close brown-button"></button>
|
||||
<div class="mask-content">
|
||||
<div class="read-qr-box">
|
||||
<div class="action-button-box">
|
||||
<button class="read-qr-camera brown-button"><!--相机扫--></button>
|
||||
<button class="read-qr-file brown-button"><!--读文件--></button>
|
||||
<input type="file" accept="image/*" class="file-select display-none">
|
||||
</div>
|
||||
<div class="info"></div>
|
||||
<div class="video-box display-none">
|
||||
<div><label for="sourceSelect"><!--视频源选择--></label><select id="sourceSelect"></select></div>
|
||||
<video id="video" width="500" height="500"></video>
|
||||
</div>
|
||||
</div>
|
||||
<div class="save-qr-box">
|
||||
<ul class="qr-data-type-ul">
|
||||
<li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdf" id="qr-data-type-pdf" checked/><label for="qr-data-type-pdf"></label></li><!--本程序
|
||||
--><li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdc" id="qr-data-type-pdc" /><label for="qr-data-type-pdc"></label></li><!--PDC-->
|
||||
</ul>
|
||||
<div class="qr-box"><img class="qr-code-image" /></div>
|
||||
<a download="" class="save-qr-img brown-button"><!--保存QR 图片--></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -69,6 +69,77 @@ const official_awoken_sorting = [
|
|||
1, 2, 3, 46, 47, 39, 40, 41, 42,
|
||||
65, 66, 67, 9, 71, 72, 30, 64, 63,
|
||||
73, 74, 75, 76, 77, 78];
|
||||
|
||||
//pdc的徽章对应数字
|
||||
const pdcBadgeMap = [
|
||||
{pdf:0,pdc:10}, //无限cost
|
||||
{pdf:1,pdc:12}, //小手指
|
||||
{pdf:2,pdc:9}, //全体攻击
|
||||
{pdf:3,pdc:5}, //小回复
|
||||
{pdf:4,pdc:1}, //小血量
|
||||
{pdf:5,pdc:3}, //小攻击
|
||||
{pdf:6,pdc:8}, //SB
|
||||
{pdf:7,pdc:18}, //队长防封
|
||||
{pdf:8,pdc:19}, //SX
|
||||
{pdf:9,pdc:7}, //无天降
|
||||
{pdf:10,pdc:6}, //大回复
|
||||
{pdf:11,pdc:2}, //大血量
|
||||
{pdf:12,pdc:4}, //大攻击
|
||||
{pdf:13,pdc:13}, //大手指
|
||||
{pdf:14,pdc:11}, //加经验
|
||||
{pdf:15,pdc:15}, //墨镜
|
||||
{pdf:16,pdc:17}, //防废
|
||||
{pdf:17,pdc:16}, //防毒
|
||||
{pdf:18,pdc:14}, //月卡
|
||||
];
|
||||
//pdc的潜觉对应数字
|
||||
const pdcLatentMap = [
|
||||
{pdf:1,pdc:1}, //HP
|
||||
{pdf:2,pdc:0}, //攻击
|
||||
{pdf:3,pdc:2}, //回复
|
||||
{pdf:4,pdc:19}, //手指
|
||||
{pdf:5,pdc:13}, //自回
|
||||
{pdf:6,pdc:14}, //火盾
|
||||
{pdf:7,pdc:15}, //水盾
|
||||
{pdf:8,pdc:16}, //木盾
|
||||
{pdf:9,pdc:17}, //光盾
|
||||
{pdf:10,pdc:18}, //暗盾
|
||||
{pdf:11,pdc:12}, //防坐
|
||||
{pdf:12,pdc:3}, //三维
|
||||
{pdf:13,pdc:35}, //不被换队长
|
||||
{pdf:14,pdc:37}, //不掉废
|
||||
{pdf:15,pdc:36}, //不掉毒
|
||||
{pdf:16,pdc:24}, //进化杀
|
||||
{pdf:17,pdc:25}, //觉醒杀
|
||||
{pdf:18,pdc:26}, //强化杀
|
||||
{pdf:19,pdc:27}, //卖钱杀
|
||||
{pdf:20,pdc:4}, //神杀
|
||||
{pdf:21,pdc:5}, //龙杀
|
||||
{pdf:22,pdc:6}, //恶魔杀
|
||||
{pdf:23,pdc:7}, //机械杀
|
||||
{pdf:24,pdc:8}, //平衡杀
|
||||
{pdf:25,pdc:9}, //攻击杀
|
||||
{pdf:26,pdc:10}, //体力杀
|
||||
{pdf:27,pdc:11}, //回复杀
|
||||
{pdf:28,pdc:20}, //大HP
|
||||
{pdf:29,pdc:21}, //大攻击
|
||||
{pdf:30,pdc:22}, //大回复
|
||||
{pdf:31,pdc:23}, //大手指
|
||||
{pdf:32,pdc:28}, //大火盾
|
||||
{pdf:33,pdc:29}, //大水盾
|
||||
{pdf:34,pdc:30}, //大木盾
|
||||
{pdf:35,pdc:31}, //大光盾
|
||||
{pdf:36,pdc:32}, //大暗盾
|
||||
{pdf:37,pdc:33}, //6色破无效
|
||||
{pdf:38,pdc:34}, //3色破属吸
|
||||
{pdf:39,pdc:40}, //C珠破吸
|
||||
{pdf:40,pdc:39}, //心横解转转
|
||||
{pdf:41,pdc:38}, //U解禁消
|
||||
{pdf:42,pdc:41}, //伤害上限解除
|
||||
{pdf:43,pdc:42}, //HP++
|
||||
{pdf:44,pdc:43}, //攻击++
|
||||
{pdf:45,pdc:44}, //回复++
|
||||
];
|
||||
//排序程序列表
|
||||
const sort_function_list = [
|
||||
{tag:"sort_none",name:"无",function:()=>0},
|
||||
|
|
|
@ -30,27 +30,32 @@ const GM_xmlhttpRequest = function(GM_param) {
|
|||
|
||||
//获取URL参数
|
||||
function getQueryString(name, url) {
|
||||
if (!!(window.URL && window.URLSearchParams)) { //浏览器原生支持的API
|
||||
const urlObj = new URL(url || document.location);
|
||||
return urlObj.searchParams.get(name);
|
||||
} else {
|
||||
const reg = new RegExp(`(?:^|&)${name}=([^&]*)(?:&|$)`, "i");
|
||||
const searchStr = url || location.search.substr(1);
|
||||
const r = searchStr.match(reg);
|
||||
if (r != null) {
|
||||
return decodeURIComponent(r[1]);
|
||||
} else {
|
||||
return null;
|
||||
const urlObj = new URL(url || document.location);
|
||||
if (!Array.isArray(name)) name = [name];
|
||||
let n_e = name.entries(), n;
|
||||
let value;
|
||||
do
|
||||
{
|
||||
n = n_e.next();
|
||||
if (!n.done)
|
||||
{
|
||||
value = urlObj.searchParams.get(n.value[1]);
|
||||
}
|
||||
}
|
||||
}while(!n.done && value == undefined)
|
||||
return value;
|
||||
}
|
||||
|
||||
//数字补前导0
|
||||
Number.prototype.prefixInteger = function(length, useGrouping = false) {
|
||||
return this.toLocaleString(undefined, {
|
||||
useGrouping: useGrouping,
|
||||
minimumIntegerDigits: length
|
||||
});
|
||||
return this.toLocaleString(undefined, {
|
||||
useGrouping: useGrouping,
|
||||
minimumIntegerDigits: length
|
||||
});
|
||||
}
|
||||
//数字补前导0
|
||||
String.prototype.prefix = function(length = 2, prefix = '0') {
|
||||
let needAddLength = Math.max(length - this.length, 0);
|
||||
return new Array(needAddLength).fill(prefix).join('') + this;
|
||||
}
|
||||
//大数字缩短长度,默认返回本地定义字符串
|
||||
Number.prototype.bigNumberToString = function() {
|
||||
|
@ -135,6 +140,25 @@ fetch("library/jy4340132-aaa/adpcm.wasm").then((response) => response.arrayBuffe
|
|||
}*/
|
||||
});
|
||||
//▲ADPCM播放相关
|
||||
|
||||
// 加载 image
|
||||
function loadImage(url) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var image = new Image();
|
||||
|
||||
image.src = url;
|
||||
image.type = "svg"
|
||||
image.crossOrigin = 'Anonymous';
|
||||
image.onload = function() {
|
||||
resolve(this);
|
||||
};
|
||||
|
||||
image.onerror = function(err) {
|
||||
reject(err);
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function latentUseHole(latentId) {
|
||||
switch (true) {
|
||||
case (latentId === 12):
|
||||
|
|
597
script.js
|
@ -12,8 +12,12 @@ let statusLine; //储存状态栏
|
|||
let formationBox; //储存整个formationBox
|
||||
let editBox; //储存整个editBox
|
||||
let showSearch; //整个程序都可以用的显示搜索函数
|
||||
let qrcodeReader; //二维码读取
|
||||
let qrcodeWriter; //二维码输出
|
||||
let selectedDeviceId; //视频源id
|
||||
|
||||
const dataStructure = 3; //阵型输出数据的结构版本
|
||||
const cfgPrefix = "PADDF-"; //设置名称的前缀
|
||||
const className_displayNone = "display-none";
|
||||
const dataAttrName = "data-value"; //用于储存默认数据的属性名
|
||||
const isGuideMod = Boolean(Number(getQueryString("guide"))); //是否以图鉴模式启动
|
||||
|
@ -25,15 +29,24 @@ if (location.search.includes('&')) {
|
|||
//一开始就加载当前语言
|
||||
if (currentLanguage == undefined)
|
||||
{
|
||||
const parameter_i18n = getQueryString("l") || getQueryString("lang"); //获取参数指定的语言
|
||||
const browser_i18n = (navigator.language || navigator.userLanguage); //获取浏览器语言
|
||||
currentLanguage = languageList.find(lang => { //筛选出符合的语言
|
||||
if (parameter_i18n) //如果已指定就用指定的语言
|
||||
return parameter_i18n.includes(lang.i18n);
|
||||
else //否则筛选浏览器默认语言
|
||||
return browser_i18n.includes(lang.i18n);
|
||||
}) ||
|
||||
languageList[0]; //没有找到指定语言的情况下,自动用第一个语言(英语)
|
||||
const parameter_i18n = getQueryString(["l","lang"]); //获取参数指定的语言
|
||||
const browser_i18n = navigator.language; //获取浏览器语言
|
||||
if (parameter_i18n) //有指定语言的话,只找i18n完全相同的
|
||||
{
|
||||
currentLanguage = languageList.find(lang => lang.i18n == parameter_i18n) || languageList[0];
|
||||
}
|
||||
if (!currentLanguage) //如果还没有就直接搜索浏览器语言
|
||||
{
|
||||
currentLanguage = languageList.find(lang => { //筛选出符合的语言
|
||||
if (lang.i18n_RegExp)
|
||||
{
|
||||
return lang.i18n_RegExp.test(browser_i18n); //匹配正则表达式
|
||||
}else
|
||||
{
|
||||
return browser_i18n.includes(lang.i18n); //文字上的搜索包含
|
||||
}
|
||||
}) || languageList[0]; //没有找到指定语言的情况下,自动用第一个语言(英语)
|
||||
}
|
||||
//因为Script在Head里面,所以可以这里head已经加载好可以使用
|
||||
document.head.querySelector("#language-css").href = `languages/${currentLanguage.i18n}.css`;
|
||||
}
|
||||
|
@ -42,13 +55,11 @@ if (currentLanguage == undefined)
|
|||
if (currentDataSource == undefined)
|
||||
{
|
||||
const parameter_dsCode = getQueryString("s"); //获取参数指定的数据来源
|
||||
currentDataSource = parameter_dsCode ?
|
||||
(dataSourceList.find(ds => ds.code == parameter_dsCode) || dataSourceList[0]) : //筛选出符合的数据源
|
||||
dataSourceList[0]; //没有指定,直接使用日服
|
||||
currentDataSource = dataSourceList.find(ds => ds.code == parameter_dsCode) || dataSourceList[0]; //筛选出符合的数据源
|
||||
}
|
||||
|
||||
const dbName = "PADDF";
|
||||
var db = null;
|
||||
let db = null;
|
||||
const DBOpenRequest = indexedDB.open(dbName,2);
|
||||
|
||||
DBOpenRequest.onsuccess = function(event) {
|
||||
|
@ -170,10 +181,10 @@ Member.prototype.loadObj = function(m, dataVersion) {
|
|||
} else {
|
||||
this.plus = m.plus;
|
||||
}
|
||||
if (!(Array.isArray(this.plus))) this.plus = [0, 0, 0]; //如果加值不是数组,则改变
|
||||
if (!Array.isArray(this.plus)) this.plus = [0, 0, 0]; //如果加值不是数组,则改变
|
||||
this.latent = dataVersion > 1 ? m[4] : m.latent;
|
||||
if (Array.isArray(this.latent) && dataVersion <= 2) this.latent = this.latent.map(l => l >= 13 ? l + 3 : l); //修复以前自己编的潜觉编号为官方编号
|
||||
if (!(Array.isArray(this.latent))) this.latent = []; //如果潜觉不是数组,则改变
|
||||
if (!Array.isArray(this.latent)) this.latent = []; //如果潜觉不是数组,则改变
|
||||
this.sawoken = dataVersion > 1 ? m[5] : m.sawoken;
|
||||
this.skilllevel = m[6] || null;
|
||||
};
|
||||
|
@ -314,6 +325,99 @@ Formation.prototype.loadObj = function(f) {
|
|||
if (f.b)
|
||||
this.teams[0][2] = f.b; //原来模式的徽章
|
||||
};
|
||||
Formation.prototype.getPdfQrObj = function(keepSource = true)
|
||||
{
|
||||
let qrObj = {
|
||||
d:this.outObj()
|
||||
};
|
||||
if (keepSource) qrObj.s = currentDataSource.code;
|
||||
return qrObj;
|
||||
}
|
||||
Formation.prototype.getPdcQrStr = function()
|
||||
{
|
||||
function genMemberMap(m, a, position = 0)
|
||||
{
|
||||
const o = new Map();
|
||||
o.set(0, m.id);
|
||||
if (m.latent.length)
|
||||
o.set(2, m.latent.map(pdfLtent=>pdcLatentMap.find(latent=>latent.pdf === pdfLtent).pdc.toString(36).prefix(2)).join('')); //潜觉
|
||||
o.set(3, m.level);
|
||||
o.set(4, m.plus[0]);
|
||||
o.set(5, m.plus[1]);
|
||||
o.set(6, m.plus[2]);
|
||||
o.set(7, (m.awoken != null && m.awoken >= Cards[m.id].awakenings.length) ? -1 : m.awoken);
|
||||
o.set(8, (m.sawoken != null && m.sawoken >= 0) ? Cards[m.id].superAwakenings[m.sawoken] : 0);
|
||||
if (a.id != 0)
|
||||
{
|
||||
o.set(9, a.id);
|
||||
o.set(10, a.level);
|
||||
o.set(11, a.plus[0]);
|
||||
o.set(12, a.plus[1]);
|
||||
o.set(13, a.plus[2]);
|
||||
o.set(14, (a.awoken != null && a.awoken >= Cards[a.id].awakenings.length) ? -1 : a.awoken);
|
||||
}
|
||||
o.set(15, position);
|
||||
return o;
|
||||
}
|
||||
let outArr = [
|
||||
[1,this.teams.length - 1]
|
||||
];
|
||||
|
||||
if (this.teams.length == 2)
|
||||
{
|
||||
const team1 = this.teams[0];
|
||||
const team2 = this.teams[1];
|
||||
team1[0].push(team2[0].shift());
|
||||
team1[1].push(team2[1].shift());
|
||||
}
|
||||
|
||||
let pdcTeamsStr = this.teams.map((t,idx,arr)=>{
|
||||
let teamArr = [
|
||||
pdcBadgeMap.find(badge=>badge.pdf === t[2]).pdc //徽章
|
||||
];
|
||||
const membersArr = t[0];
|
||||
const assistArr = t[1];
|
||||
for (let i=0;i<membersArr.length;i++)
|
||||
{
|
||||
if (membersArr[i].id > 0 || assistArr[i].id > 0)
|
||||
{
|
||||
let pdcMemberArr = Array.from(genMemberMap(membersArr[i], assistArr[i], (arr.length == 2 && idx == 1) ? i+1 : i)); //2人协力时,队伍2编号0是空的
|
||||
pdcMemberStr = pdcMemberArr.map(item => {
|
||||
if (item[1] == undefined)
|
||||
{
|
||||
console.log(item[0])
|
||||
}
|
||||
return [
|
||||
item[0].toString(36).prefix(2),
|
||||
item[1].toString(36).prefix(2)
|
||||
].join('')}).join(',');
|
||||
teamArr.push(pdcMemberStr);
|
||||
}
|
||||
}
|
||||
return teamArr.join('}');
|
||||
});
|
||||
|
||||
if (this.teams.length == 2)
|
||||
{
|
||||
const team1 = this.teams[0];
|
||||
const team2 = this.teams[1];
|
||||
team2[0].splice(0,0,team1[0].pop());
|
||||
team2[1].splice(0,0,team1[1].pop());
|
||||
}
|
||||
|
||||
outArr = outArr.concat(pdcTeamsStr);
|
||||
return outArr.join(']');
|
||||
}
|
||||
Formation.prototype.getQrStr = function(type)
|
||||
{
|
||||
if (type == 'pdf' || type == 0)
|
||||
{
|
||||
return JSON.stringify(this.getPdfQrObj());
|
||||
}else
|
||||
{
|
||||
return this.getPdcQrStr();
|
||||
}
|
||||
}
|
||||
|
||||
//进化树
|
||||
class EvoTree
|
||||
|
@ -569,6 +673,9 @@ window.onload = function(event) {
|
|||
alert("请更新您的浏览器。\nPlease update your browser.");
|
||||
}
|
||||
|
||||
qrcodeReader = new ZXing.BrowserQRCodeReader(); //二维码读取
|
||||
qrcodeWriter = new ZXing.BrowserQRCodeSvgWriter(); //二维码生成
|
||||
|
||||
controlBox = document.body.querySelector(".control-box");
|
||||
statusLine = controlBox.querySelector(".status"); //显示当前状态的
|
||||
formationBox = document.body.querySelector(".formation-box");
|
||||
|
@ -610,20 +717,20 @@ window.onload = function(event) {
|
|||
//记录显示CD开关的状态
|
||||
const showMonSkillCd_id = "show-mon-skill-cd";
|
||||
const btnShowMonSkillCd = controlBox.querySelector(`#btn-${showMonSkillCd_id}`);
|
||||
btnShowMonSkillCd.checked = Boolean(Number(localStorage.getItem("PADDF-" + showMonSkillCd_id)));
|
||||
btnShowMonSkillCd.checked = Boolean(Number(localStorage.getItem(cfgPrefix + showMonSkillCd_id)));
|
||||
btnShowMonSkillCd.onclick = function(){
|
||||
toggleDomClassName(this, showMonSkillCd_id);
|
||||
localStorage.setItem("PADDF-" + showMonSkillCd_id, Number(this.checked));
|
||||
localStorage.setItem(cfgPrefix + showMonSkillCd_id, Number(this.checked));
|
||||
};
|
||||
btnShowMonSkillCd.onclick();
|
||||
|
||||
//记录显示觉醒开关的状态
|
||||
const showMonAwoken_id = "show-mon-awoken";
|
||||
const btnShowMonAwoken = controlBox.querySelector(`#btn-${showMonAwoken_id}`);
|
||||
btnShowMonAwoken.checked = Boolean(Number(localStorage.getItem("PADDF-" + showMonAwoken_id)));
|
||||
btnShowMonAwoken.checked = Boolean(Number(localStorage.getItem(cfgPrefix + showMonAwoken_id)));
|
||||
btnShowMonAwoken.onclick = function(){
|
||||
toggleDomClassName(this, showMonAwoken_id);
|
||||
localStorage.setItem("PADDF-" + showMonAwoken_id, Number(this.checked));
|
||||
localStorage.setItem(cfgPrefix + showMonAwoken_id, Number(this.checked));
|
||||
};
|
||||
btnShowMonAwoken.onclick();
|
||||
|
||||
|
@ -673,7 +780,7 @@ function loadData(force = false)
|
|||
lastCkeys = localStorage.getItem("PADDF-ckey"); //读取本地储存的原来的ckey
|
||||
try {
|
||||
lastCkeys = JSON.parse(lastCkeys);
|
||||
if (lastCkeys == null || !(Array.isArray(lastCkeys)))
|
||||
if (lastCkeys == null || !Array.isArray(lastCkeys))
|
||||
lastCkeys = [];
|
||||
} catch (e) {
|
||||
console.error("旧的 Ckey 数据 JSON 解码出错。", e);
|
||||
|
@ -882,7 +989,7 @@ function reloadFormationData(event) {
|
|||
}else
|
||||
{
|
||||
try {
|
||||
const parameterDataString = getQueryString("d") || getQueryString("data");
|
||||
const parameterDataString = getQueryString(["d","data"]);
|
||||
formationData = JSON.parse(parameterDataString);
|
||||
//console.log("从URL读取",formationData);
|
||||
|
||||
|
@ -922,7 +1029,7 @@ window.addEventListener('popstate',reloadFormationData); //前进后退时修改
|
|||
function creatNewUrl(arg) {
|
||||
if (arg == undefined) arg = {};
|
||||
if (!!(window.history && history.pushState)) { // 支持History API
|
||||
const language_i18n = arg.language || getQueryString("l") || getQueryString("lang"); //获取参数指定的语言
|
||||
const language_i18n = arg.language || getQueryString(["l","lang"]); //获取参数指定的语言
|
||||
const datasource = arg.datasource || getQueryString("s");
|
||||
const outObj = formation.outObj();
|
||||
|
||||
|
@ -946,6 +1053,186 @@ function creatNewUrl(arg) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//解析从QR图里获取的字符串
|
||||
function inputFromQrString(string)
|
||||
{
|
||||
const re = {code: 0, message: null};
|
||||
function ObjToUrl(obj)
|
||||
{
|
||||
let fileName;
|
||||
switch (obj.d.f.length)
|
||||
{
|
||||
case 1:{
|
||||
fileName = "solo.html";
|
||||
break;
|
||||
}
|
||||
case 2:{
|
||||
fileName = "multi.html";
|
||||
break;
|
||||
}
|
||||
case 3:{
|
||||
fileName = "triple.html";
|
||||
break;
|
||||
}
|
||||
}
|
||||
const newUrl = new URL(fileName, location);
|
||||
newUrl.searchParams.set("d",JSON.stringify(obj.d));
|
||||
if (!obj.s || obj.s == "ja")
|
||||
{
|
||||
newUrl.searchParams.delete("s");
|
||||
}else
|
||||
{
|
||||
newUrl.searchParams.set("s", obj.s);
|
||||
}
|
||||
let l = getQueryString("l");
|
||||
if (l)
|
||||
{
|
||||
newUrl.searchParams.set("l", l);
|
||||
}
|
||||
return newUrl;
|
||||
}
|
||||
//code 1~99 为各种编码
|
||||
if (string.substr(0,1) == "{" && string.substr(-1,1) == "}")
|
||||
{
|
||||
try{
|
||||
let jo = JSON.parse(string);
|
||||
if (jo.d && typeof jo.d == "object")
|
||||
{
|
||||
re.code = 1;
|
||||
re.message = "发现队伍数据 | Formation data founded";
|
||||
re.url = ObjToUrl(jo);
|
||||
}else
|
||||
{
|
||||
re.code = 100;
|
||||
re.message = "无队伍数据 | No formation data";
|
||||
}
|
||||
}catch(e)
|
||||
{
|
||||
re.code = 111;
|
||||
re.message = "错误的 JSON 格式 | The illegal JSON format";
|
||||
}
|
||||
}
|
||||
else if (/^http/i.test(string))
|
||||
{
|
||||
try{
|
||||
let url = new URL(string);
|
||||
if (url.searchParams.get('d'))
|
||||
{
|
||||
re.code = 1;
|
||||
re.message = "发现队伍数据 | Formation data founded";
|
||||
let jo = {
|
||||
d: JSON.parse(url.searchParams.get('d')),
|
||||
s: url.searchParams.get('s'),
|
||||
}
|
||||
re.url = ObjToUrl(jo);
|
||||
}else
|
||||
{
|
||||
re.code = 100;
|
||||
re.message = "无队伍数据 | No formation data";
|
||||
}
|
||||
}catch(e)
|
||||
{
|
||||
re.code = 112;
|
||||
re.message = "错误的 网址 格式 | The illegal URL format";
|
||||
}
|
||||
}
|
||||
else if(/^\d[\d\-\w,\]}]+}/.test(string))
|
||||
{ //PDC
|
||||
re.code = 2;
|
||||
re.message = "发现 PDC 二维码 | PDC QR code found";
|
||||
const pdcFotmation = readPDC(string);
|
||||
const newFotmation = pdcFotmationToPdfFotmation(pdcFotmation);
|
||||
re.url = ObjToUrl(newFotmation.getPdfQrObj(false));
|
||||
}
|
||||
else
|
||||
{
|
||||
re.code = 110;
|
||||
re.message = "不是 JSON 格式 | Not JSON format";
|
||||
}
|
||||
return re;
|
||||
}
|
||||
//解析PDC的数据
|
||||
function readPDC(string)
|
||||
{
|
||||
let teamsStr = string.split("]");
|
||||
let baseInfo = teamsStr.shift().split(",");
|
||||
let teamsArr = teamsStr.map(teamStr=>
|
||||
{
|
||||
let membersStr = teamStr.split("}").filter(Boolean);
|
||||
const team = {
|
||||
badge: parseInt(membersStr.shift(),10) //徽章是10进制
|
||||
}
|
||||
team.members = membersStr.map(memberStr=>{
|
||||
let memberArr = memberStr.split(",").map(valueStr=>{
|
||||
let idx = parseInt(valueStr.substr(0,2),36);
|
||||
let value = valueStr.substr(2);
|
||||
if (idx !== 2)
|
||||
{
|
||||
value = parseInt(value,36);
|
||||
}else
|
||||
{
|
||||
value = value.split(/(\w{2})/).filter(Boolean).map(v=>parseInt(v,36));
|
||||
}
|
||||
return [idx, value];
|
||||
});
|
||||
return new Map(memberArr);
|
||||
});
|
||||
return team;
|
||||
}
|
||||
);
|
||||
let pdcFotmation = {
|
||||
version: parseInt(baseInfo[0],10),
|
||||
teamCount: parseInt(baseInfo[1],10)+1,
|
||||
teams: teamsArr
|
||||
}
|
||||
return pdcFotmation;
|
||||
}
|
||||
function pdcFotmationToPdfFotmation(pdcFotmation)
|
||||
{
|
||||
const f = new Formation(pdcFotmation.teamCount, pdcFotmation.teamCount == 2 ? 5 : 6);
|
||||
if (pdcFotmation.teamCount == 2)
|
||||
{
|
||||
const team1 = pdcFotmation.teams[0].members;
|
||||
const team2 = pdcFotmation.teams[1].members;
|
||||
let team2Leader = team1.find(member=>member.get(15) == 5);
|
||||
if (team2Leader)
|
||||
{
|
||||
team2Leader.set(15,0);
|
||||
team2.splice(0,0,team2Leader);
|
||||
team1.splice(team1.indexOf(team2Leader),1);
|
||||
}
|
||||
}
|
||||
pdcFotmation.teams.forEach((pdcTeam,ti)=>{
|
||||
const t = f.teams[ti];
|
||||
const membersArr = t[0];
|
||||
const assistArr = t[1];
|
||||
//队伍徽章
|
||||
t[2] = pdcTeam.badge === 0 ? 0 : pdcBadgeMap.find(badge=>badge.pdc === pdcTeam.badge).pdf;
|
||||
pdcTeam.members.forEach((member)=>{
|
||||
const m = membersArr[member.get(15) || 0];
|
||||
const a = assistArr[member.get(15) || 0];
|
||||
m.id = member.get(0) || 0;
|
||||
a.id = member.get(9) || 0; //延迟是-1刚好一样
|
||||
if (member.get(2))
|
||||
{
|
||||
m.latent = member.get(2).map(pdcLatent=>pdcLatentMap.find(latent=>latent.pdc === pdcLatent).pdf);
|
||||
}
|
||||
m.level = member.get(3) || 1;
|
||||
a.level = member.get(10) || 1;
|
||||
m.plus[0] = member.get(4) || 0;
|
||||
m.plus[1] = member.get(5) || 0;
|
||||
m.plus[2] = member.get(6) || 0;
|
||||
a.plus[0] = member.get(11) || 0;
|
||||
a.plus[1] = member.get(12) || 0;
|
||||
a.plus[2] = member.get(13) || 0;
|
||||
m.awoken = member.get(7) >= 0 ? member.get(7) : Cards[m.id].awakenings.length;
|
||||
a.awoken = member.get(14) >= 0 ? member.get(14) : Cards[a.id].awakenings.length;
|
||||
m.sawoken = member.get(8) ? Cards[m.id].superAwakenings.indexOf(member.get(8)) : null;
|
||||
});
|
||||
});
|
||||
return f;
|
||||
}
|
||||
//截图
|
||||
function capture() {
|
||||
statusLine.classList.add("prepare-cauture");
|
||||
|
@ -991,6 +1278,248 @@ function initialize() {
|
|||
line.setAttribute("y2", p2.y);
|
||||
};
|
||||
|
||||
const qrCodeFrame = document.body.querySelector("#qr-code-frame");
|
||||
const btnQrCode = controlBox.querySelector(`.btn-qrcode`);
|
||||
btnQrCode.onclick = function(){
|
||||
qrCodeFrame.show();
|
||||
};
|
||||
qrCodeFrame.show = function(){
|
||||
const saveBox = this.content.saveBox;
|
||||
const readBox = this.content.readBox;
|
||||
readBox.info.textContent = "";
|
||||
|
||||
readBox.videoBox.classList.add(className_displayNone);
|
||||
this.classList.remove(className_displayNone);
|
||||
|
||||
this.refreshQrCode(formation.getQrStr(saveBox.qrDataType.find(radio=>radio.checked).value));
|
||||
};
|
||||
qrCodeFrame.hide = function(){
|
||||
qrcodeReader.reset();
|
||||
this.classList.add(className_displayNone);
|
||||
};
|
||||
qrCodeFrame.close = qrCodeFrame.querySelector(".mask-close");
|
||||
qrCodeFrame.close.onclick = function(){qrCodeFrame.hide()};
|
||||
|
||||
const qrContent = qrCodeFrame.content = qrCodeFrame.querySelector(".mask-content");
|
||||
const qrReadBox = qrContent.readBox = qrContent.querySelector(".read-qr-box");
|
||||
const qrSaveBox = qrContent.saveBox = qrContent.querySelector(".save-qr-box");
|
||||
qrReadBox.readQrCamera = qrReadBox.querySelector(".read-qr-camera");
|
||||
qrReadBox.readQrFile = qrReadBox.querySelector(".read-qr-file");
|
||||
qrReadBox.filePicker = qrReadBox.querySelector(".file-select");
|
||||
qrReadBox.info = qrReadBox.querySelector(".info");
|
||||
qrReadBox.video = qrReadBox.querySelector("#video");
|
||||
qrReadBox.videoBox = qrReadBox.querySelector(".video-box");
|
||||
qrReadBox.sourceSelect = qrReadBox.querySelector("#sourceSelect");
|
||||
|
||||
qrSaveBox.qrImage = qrSaveBox.querySelector(".qr-code-image");
|
||||
qrSaveBox.qrDataType = Array.from(qrSaveBox.querySelectorAll(".qr-data-type-radio"));
|
||||
qrSaveBox.qrDataType.forEach(radio=>radio.onclick = function(){
|
||||
qrCodeFrame.refreshQrCode(formation.getQrStr(this.value));
|
||||
});
|
||||
qrSaveBox.saveQrImg = qrSaveBox.querySelector(".save-qr-img");
|
||||
|
||||
qrCodeFrame.ondragenter = ()=>false;
|
||||
qrCodeFrame.ondragover = ()=>false;
|
||||
qrCodeFrame.ondrop = function(e)
|
||||
{
|
||||
imagesSelected(e.dataTransfer.files);
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
qrCodeFrame.refreshQrCode = function(string)
|
||||
{
|
||||
const qrImg = this.content.saveBox.qrImage;
|
||||
URL.revokeObjectURL(qrImg.src);
|
||||
|
||||
const EncodeHintType = ZXing.EncodeHintType;
|
||||
const hints = new Map();
|
||||
hints.set(EncodeHintType.MARGIN, 0);
|
||||
//hints.set(EncodeHintType.CHARACTER_SET, "UTF8");
|
||||
const qrWidth = 500,qrHeight = 500;
|
||||
let svgElement = qrcodeWriter.write(string, qrWidth, qrHeight, hints);
|
||||
let svgData = new XMLSerializer().serializeToString(svgElement);
|
||||
let blob = new Blob([svgData], {type : 'image/svg+xml'});
|
||||
let svgUrl = URL.createObjectURL(blob);
|
||||
qrImg.src = svgUrl;
|
||||
|
||||
|
||||
loadImage(svgUrl).then(function(img) {
|
||||
let cavansWidth = qrWidth * 2, cavansHeight = qrHeight * 2;
|
||||
let cavans = document.createElement("canvas");
|
||||
cavans.width = cavansWidth;
|
||||
cavans.height = cavansHeight;
|
||||
let ctx = cavans.getContext('2d');
|
||||
|
||||
ctx.fillStyle="white";
|
||||
ctx.fillRect(0, 0, cavansWidth, cavansHeight)
|
||||
ctx.drawImage(img, 0, 0, cavansWidth, cavansHeight);
|
||||
|
||||
cavans.toBlob(function(blob) {
|
||||
const saveQrImg = qrSaveBox.saveQrImg;
|
||||
URL.revokeObjectURL(saveQrImg.href);
|
||||
const downLink = URL.createObjectURL(blob);
|
||||
saveQrImg.download = formation.title || "PAD Dash Formation QR";
|
||||
saveQrImg.href = downLink;
|
||||
});
|
||||
|
||||
svgElement = null;
|
||||
svgData = null;
|
||||
blob = null;
|
||||
img = null;
|
||||
cavans = null;
|
||||
ctx = null;
|
||||
}, function(err) {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
}
|
||||
qrReadBox.readQrFile.onclick = function()
|
||||
{
|
||||
qrReadBox.filePicker.click();
|
||||
}
|
||||
qrReadBox.filePicker.onchange = function()
|
||||
{
|
||||
imagesSelected(this.files);
|
||||
}
|
||||
function imagesSelected(myFiles) {
|
||||
if (myFiles.length < 1) return;
|
||||
const file = myFiles[0];
|
||||
loadImage(URL.createObjectURL(file)).then(function(img) {
|
||||
qrcodeReader.decodeFromImage(img).then((result) => {
|
||||
console.log('Found QR code!', result);
|
||||
let inputResult = inputFromQrString(result.text);
|
||||
|
||||
qrReadBox.info.textContent = 'Code ' + inputResult.code + ':' + inputResult.message;
|
||||
if (inputResult.code < 100)
|
||||
{
|
||||
const newLink = document.createElement("a");
|
||||
newLink.className = "formation-from-qrcode";
|
||||
newLink.href = inputResult.url;
|
||||
newLink.target = "_blank";
|
||||
qrReadBox.info.appendChild(newLink);
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.error(err);
|
||||
if (err) {
|
||||
if (err instanceof ZXing.NotFoundException) {
|
||||
qrReadBox.info.textContent = 'No QR code found.';
|
||||
}
|
||||
|
||||
if (err instanceof ZXing.ChecksumException) {
|
||||
qrReadBox.info.textContent = 'A code was found, but it\'s read value was not valid.';
|
||||
}
|
||||
|
||||
if (err instanceof ZXing.FormatException) {
|
||||
qrReadBox.info.textContent = 'A code was found, but it was in a invalid format.';
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(`Started decode for image from ${img.src}`)
|
||||
}, function(err) {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
if (location.protocol == "http:" && location.host != "localhost" && location.host != "127.0.0.1")
|
||||
{ //http不支持攝像頭
|
||||
//qrReadBox.readQrCamera.classList.add(className_displayNone);
|
||||
qrReadBox.readQrCamera.onclick = function()
|
||||
{
|
||||
if(confirm("需要 https 环境下才支持调用摄像头,是否跳转?\nCalling the camera is required in an https environment, do you want to jump?"))
|
||||
location.protocol = "https:" //跳到https
|
||||
}
|
||||
}else
|
||||
{
|
||||
|
||||
function scanContinuously()
|
||||
{
|
||||
qrcodeReader.decodeFromInputVideoDeviceContinuously(selectedDeviceId, 'video', (result, err) => {
|
||||
if (result) {
|
||||
// properly decoded qr code
|
||||
console.log('Found QR code!', result);
|
||||
let inputResult = inputFromQrString(result.text);
|
||||
|
||||
if (inputResult.code < 100)
|
||||
{ //成功后就关闭
|
||||
qrReadBox.readQrCamera.onclick();
|
||||
qrReadBox.info.textContent = 'Code ' + inputResult.code + ':' + inputResult.message;
|
||||
const newLink = document.createElement("a");
|
||||
newLink.className = "formation-from-qrcode";
|
||||
newLink.href = inputResult.url;
|
||||
newLink.target = "_blank";
|
||||
qrReadBox.info.appendChild(newLink);
|
||||
}else
|
||||
{
|
||||
qrReadBox.info.textContent = 'Code ' + inputResult.code + ':' + inputResult.message;
|
||||
}
|
||||
}
|
||||
|
||||
if (err) {
|
||||
if (err instanceof ZXing.NotFoundException) {
|
||||
console.log('No QR code found.')
|
||||
}
|
||||
|
||||
if (err instanceof ZXing.ChecksumException) {
|
||||
console.log('A code was found, but it\'s read value was not valid.')
|
||||
}
|
||||
|
||||
if (err instanceof ZXing.FormatException) {
|
||||
console.log('A code was found, but it was in a invalid format.')
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
qrcodeReader.getVideoInputDevices()
|
||||
.then((videoInputDevices) => {
|
||||
const sourceSelect_id = "selected-device-id";
|
||||
selectedDeviceId = localStorage.getItem(cfgPrefix + sourceSelect_id);
|
||||
if (videoInputDevices.every(device=>device.deviceId != selectedDeviceId))
|
||||
{
|
||||
selectedDeviceId = videoInputDevices[0].deviceId;
|
||||
}
|
||||
if (videoInputDevices.length >= 1) {
|
||||
videoInputDevices.forEach((element) => {
|
||||
const sourceOption = document.createElement('option');
|
||||
sourceOption.text = element.label
|
||||
sourceOption.value = element.deviceId
|
||||
qrReadBox.sourceSelect.appendChild(sourceOption)
|
||||
});
|
||||
qrReadBox.sourceSelect.selectedIndex = videoInputDevices.findIndex(device=>device.deviceId == selectedDeviceId);
|
||||
|
||||
qrReadBox.sourceSelect.onchange = function() {
|
||||
selectedDeviceId = this.value;
|
||||
localStorage.setItem(cfgPrefix + sourceSelect_id, this.value);
|
||||
if (qrReadBox.readQrCamera.classList.contains("running"))
|
||||
{
|
||||
qrcodeReader.reset();
|
||||
scanContinuously();
|
||||
}
|
||||
};
|
||||
}
|
||||
qrReadBox.readQrCamera.onclick = function()
|
||||
{
|
||||
if (this.classList.contains("running"))
|
||||
{
|
||||
qrcodeReader.reset();
|
||||
qrReadBox.videoBox.classList.add(className_displayNone);
|
||||
qrReadBox.info.textContent = "";
|
||||
|
||||
}else
|
||||
{
|
||||
qrReadBox.videoBox.classList.remove(className_displayNone);
|
||||
scanContinuously();
|
||||
}
|
||||
this.classList.toggle("running");
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//标题和介绍文本框
|
||||
const titleBox = formationBox.querySelector(".title-box");
|
||||
const detailBox = formationBox.querySelector(".detail-box");
|
||||
|
@ -1590,12 +2119,12 @@ function initialize() {
|
|||
maskContent.appendChild(fragment);
|
||||
this.classList.remove(className_displayNone);
|
||||
}
|
||||
evolutionaryTreeMask.close = function()
|
||||
evolutionaryTreeMask.hide = function()
|
||||
{
|
||||
this.classList.add(className_displayNone);
|
||||
}
|
||||
const evolutionaryTreeMask_Close = evolutionaryTreeMask.querySelector(".mask-close");
|
||||
evolutionaryTreeMask_Close.onclick = function(){evolutionaryTreeMask.close();};
|
||||
evolutionaryTreeMask_Close.onclick = function(){evolutionaryTreeMask.hide();};
|
||||
const openEvolutionaryTree = settingBox.querySelector(".row-mon-id .open-evolutionary-tree");
|
||||
openEvolutionaryTree.onclick = function() {evolutionaryTreeMask.show(editBox.mid)};
|
||||
|
||||
|
@ -1718,7 +2247,7 @@ function initialize() {
|
|||
const officialSortingClassName = 'show-official-awoken-sorting';
|
||||
const s_showOfficialAwokenSorting = searchBox.querySelector(`#${officialSortingClassName}`); //显示官方排序的觉醒
|
||||
s_showOfficialAwokenSorting.onchange = function(){
|
||||
localStorage.setItem("PADDF-" + officialSortingClassName, Number(this.checked));
|
||||
localStorage.setItem(cfgPrefix + officialSortingClassName, Number(this.checked));
|
||||
let fragmentAwoken = document.createDocumentFragment();
|
||||
let fragmentSawoken = document.createDocumentFragment();
|
||||
const awokenSorting = this.checked ? official_awoken_sorting : s_awokensUl.originalSorting;
|
||||
|
@ -1743,7 +2272,7 @@ function initialize() {
|
|||
s_awokensUl.appendChild(fragmentAwoken);
|
||||
s_sawokensUl.appendChild(fragmentSawoken);
|
||||
};
|
||||
s_showOfficialAwokenSorting.checked = Boolean(Number(localStorage.getItem("PADDF-" + officialSortingClassName)));
|
||||
s_showOfficialAwokenSorting.checked = Boolean(Number(localStorage.getItem(cfgPrefix + officialSortingClassName)));
|
||||
s_showOfficialAwokenSorting.onchange();
|
||||
|
||||
const s_selectedAwokensUl = searchBox.querySelector(".selected-awokens");
|
||||
|
@ -1815,7 +2344,7 @@ function initialize() {
|
|||
const searchResultCount = searchBox.querySelector(".search-list-length");
|
||||
showSearch = function(searchArr, customAdditionalFunction)
|
||||
{
|
||||
if (!(Array.isArray(searchArr)))
|
||||
if (!Array.isArray(searchArr))
|
||||
{ //如果不是数组就直接取消下一步
|
||||
return;
|
||||
}
|
||||
|
@ -2030,9 +2559,9 @@ function initialize() {
|
|||
const s_realTimeChangeCard = settingBox.querySelector(`#${realTimeClassName}`);
|
||||
s_realTimeChangeCard.onchange = function() {
|
||||
monstersID.oninput = this.checked ? idChange : null;
|
||||
localStorage.setItem("PADDF-" + realTimeClassName, Number(this.checked));
|
||||
localStorage.setItem(cfgPrefix + realTimeClassName, Number(this.checked));
|
||||
}
|
||||
s_realTimeChangeCard.checked = Boolean(Number(localStorage.getItem("PADDF-" + realTimeClassName)));
|
||||
s_realTimeChangeCard.checked = Boolean(Number(localStorage.getItem(cfgPrefix + realTimeClassName)));
|
||||
s_realTimeChangeCard.onchange();
|
||||
|
||||
//字符串搜索
|
||||
|
@ -2170,9 +2699,9 @@ function initialize() {
|
|||
const s_hideLessUseLetent = settingBox.querySelector(`#${hideClassName}`);
|
||||
s_hideLessUseLetent.onchange = function() {
|
||||
toggleDomClassName(this, hideClassName, true, monEditLatentAllowableUl);
|
||||
localStorage.setItem("PADDF-" + hideClassName, Number(this.checked));
|
||||
localStorage.setItem(cfgPrefix + hideClassName, Number(this.checked));
|
||||
}
|
||||
s_hideLessUseLetent.checked = Boolean(Number(localStorage.getItem("PADDF-" + hideClassName)));
|
||||
s_hideLessUseLetent.checked = Boolean(Number(localStorage.getItem(cfgPrefix + hideClassName)));
|
||||
s_hideLessUseLetent.onchange();
|
||||
|
||||
const rowSkill = settingBox.querySelector(".row-mon-skill");
|
||||
|
@ -2301,8 +2830,7 @@ function initialize() {
|
|||
mon.plus[1] = parseInt(monEditAddAtk.value) || 0;
|
||||
mon.plus[2] = parseInt(monEditAddRcv.value) || 0;
|
||||
if (!editBox.isAssist) { //如果不是辅助,则可以设定潜觉
|
||||
mon.latent = editBox.latent.concat()
|
||||
.sort((a, b) => latentUseHole(b) - latentUseHole(a)); //并排序
|
||||
mon.latent = editBox.latent.concat();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2609,6 +3137,7 @@ function changeid(mon, monDom, latentDom) {
|
|||
//刷新潜觉
|
||||
function refreshLatent(latent, monid, iconArr) {
|
||||
const maxLatentCount = getMaxLatentCount(monid); //最大潜觉数量
|
||||
latent = latent.concat().sort((a, b) => latentUseHole(b) - latentUseHole(a));
|
||||
let latentIndex = 0,
|
||||
usedHoleN = 0;
|
||||
for (let ai = 0; ai < iconArr.length; ai++) {
|
||||
|
@ -2622,6 +3151,7 @@ function refreshLatent(latent, monid, iconArr) {
|
|||
} else if (ai < usedHoleN) //多格潜觉后方隐藏
|
||||
{
|
||||
icon.classList.add(className_displayNone);
|
||||
icon.removeAttribute("data-latent-icon");
|
||||
} else if (ai < maxLatentCount) //没有使用的空格觉醒
|
||||
{
|
||||
icon.removeAttribute("data-latent-icon");
|
||||
|
@ -2629,6 +3159,7 @@ function refreshLatent(latent, monid, iconArr) {
|
|||
} else //不需要显示的部分
|
||||
{
|
||||
icon.classList.add(className_displayNone);
|
||||
icon.removeAttribute("data-latent-icon");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
53
solo.html
|
@ -18,6 +18,7 @@ const teamsCount = 1;
|
|||
<script type="text/javascript" src="script-skill-parser.js"></script>
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="library/html2canvas.min.js"></script>
|
||||
<script type="text/javascript" src="library/zxing.umd.min.js"></script>
|
||||
<!--▼ADPCM播放相关-->
|
||||
<script type="text/javascript" src="library/jy4340132-aaa/std.js"></script>
|
||||
<script type="text/javascript" src="library/jy4340132-aaa/pcm_player.js"></script>
|
||||
|
@ -38,6 +39,7 @@ var formation = new Formation(teamsCount,6);
|
|||
<div>
|
||||
<button class="btn-clear-data" onclick="clearData();"></button>
|
||||
<button class="btn-capture" onclick="capture();"></button>
|
||||
<button class="btn-qrcode"></button>
|
||||
<a class="down-capture display-none" target="_blank"></a>
|
||||
<button class="btn-multi-link" onclick="turnPage(2,arguments[0]);"></button>
|
||||
<button class="btn-triple-link" onclick="turnPage(3,arguments[0]);"></button>
|
||||
|
@ -573,14 +575,16 @@ var formation = new Formation(teamsCount,6);
|
|||
</div>
|
||||
<div class="awoken-div"><!--觉醒-->
|
||||
<ul class="awoken-ul all-awokens">
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="49" data-max-count="1"></button><!--武器觉醒--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="21"></button><!--SB--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="52" data-max-count="1"></button><!--大防封--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="43"></button><!--7c--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="61"></button><!--10c--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="58"></button><!--下半血强化--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="48"></button><!--破无效--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="27"></button><!--U--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="21"></button><!--SB--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="49" data-max-count="1"></button><!--武器觉醒--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="52" data-max-count="1"></button><!--大防封--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="60"></button><!--L解锁--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="58"></button><!--下半血强化--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="57"></button><!--上半血强化--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="11" data-max-count="5"></button><!--防暗--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="12" data-max-count="5"></button><!--防废--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="13" data-max-count="5"></button><!--防毒--></li>
|
||||
|
@ -589,7 +593,6 @@ var formation = new Formation(teamsCount,6);
|
|||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="45" data-max-count="1"></button><!--心追--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="50"></button><!--方块心追--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="19"></button><!--手指--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="60"></button><!--L解锁--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="1"></button><!--HP+--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="2"></button><!--攻击+--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="3"></button><!--回复+--></li>
|
||||
|
@ -632,7 +635,6 @@ var formation = new Formation(teamsCount,6);
|
|||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="51"></button><!--5色溜--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="53"></button><!--大手指--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="56"></button><!--大SB--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="57"></button><!--满血强化--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="59"></button><!--L盾--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="62"></button><!--c珠--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="63" data-max-count="1"></button><!--语音--></li>
|
||||
|
@ -656,13 +658,15 @@ var formation = new Formation(teamsCount,6);
|
|||
<div class="sawoken-div"><!--超觉醒-->
|
||||
<button class="sawoken-clear brown-button" ></button>
|
||||
<ul class="sawoken-ul">
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="43" id="search-awoken-43" /><label class="awoken-icon" data-awoken-icon="43" for="search-awoken-43"></label><!--7c--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="61" id="search-awoken-61" /><label class="awoken-icon" data-awoken-icon="61" for="search-awoken-61"></label><!--10c--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="58" id="search-awoken-58" /><label class="awoken-icon" data-awoken-icon="58" for="search-awoken-58"></label><!--下半血强化--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="48" id="search-awoken-48" /><label class="awoken-icon" data-awoken-icon="48" for="search-awoken-48"></label><!--破无效--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="27" id="search-awoken-27" /><label class="awoken-icon" data-awoken-icon="27" for="search-awoken-27"></label><!--U--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="21" id="search-awoken-21" /><label class="awoken-icon" data-awoken-icon="21" for="search-awoken-21"></label><!--SB--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="52" id="search-awoken-52" /><label class="awoken-icon" data-awoken-icon="52" for="search-awoken-52"></label><!--大防封--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="43" id="search-awoken-43" /><label class="awoken-icon" data-awoken-icon="43" for="search-awoken-43"></label><!--7c--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="61" id="search-awoken-61" /><label class="awoken-icon" data-awoken-icon="61" for="search-awoken-61"></label><!--10c--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="48" id="search-awoken-48" /><label class="awoken-icon" data-awoken-icon="48" for="search-awoken-48"></label><!--破无效--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="27" id="search-awoken-27" /><label class="awoken-icon" data-awoken-icon="27" for="search-awoken-27"></label><!--U--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="60" id="search-awoken-60" /><label class="awoken-icon" data-awoken-icon="60" for="search-awoken-60"></label><!--L解锁--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="58" id="search-awoken-58" /><label class="awoken-icon" data-awoken-icon="58" for="search-awoken-58"></label><!--下半血强化--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="57" id="search-awoken-57" /><label class="awoken-icon" data-awoken-icon="57" for="search-awoken-57"></label><!--上半血强化--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="68" id="search-awoken-68" /><label class="awoken-icon" data-awoken-icon="68" for="search-awoken-68"></label><!--大防暗--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="69" id="search-awoken-69" /><label class="awoken-icon" data-awoken-icon="69" for="search-awoken-69"></label><!--大防废--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="70" id="search-awoken-70" /><label class="awoken-icon" data-awoken-icon="70" for="search-awoken-70"></label><!--大防毒--></li>
|
||||
|
@ -671,7 +675,6 @@ var formation = new Formation(teamsCount,6);
|
|||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="45" id="search-awoken-45" /><label class="awoken-icon" data-awoken-icon="45" for="search-awoken-45"></label><!--心追--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="50" id="search-awoken-50" /><label class="awoken-icon" data-awoken-icon="50" for="search-awoken-50"></label><!--方块心追--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="19" id="search-awoken-19" /><label class="awoken-icon" data-awoken-icon="19" for="search-awoken-19"></label><!--手指--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="60" id="search-awoken-60" /><label class="awoken-icon" data-awoken-icon="60" for="search-awoken-60"></label><!--L解锁--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="1" id="search-awoken-1" /><label class="awoken-icon" data-awoken-icon="1" for="search-awoken-1"></label><!--HP+--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="2" id="search-awoken-2" /><label class="awoken-icon" data-awoken-icon="2" for="search-awoken-2"></label><!--攻击+--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="3" id="search-awoken-3" /><label class="awoken-icon" data-awoken-icon="3" for="search-awoken-3"></label><!--回复+--></li>
|
||||
|
@ -718,7 +721,6 @@ var formation = new Formation(teamsCount,6);
|
|||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="51" id="search-awoken-51" /><label class="awoken-icon" data-awoken-icon="51" for="search-awoken-51"></label><!--5色溜--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="53" id="search-awoken-53" /><label class="awoken-icon" data-awoken-icon="53" for="search-awoken-53"></label><!--大手指--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="56" id="search-awoken-56" /><label class="awoken-icon" data-awoken-icon="56" for="search-awoken-56"></label><!--大SB--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="57" id="search-awoken-57" /><label class="awoken-icon" data-awoken-icon="57" for="search-awoken-57"></label><!--满血强化--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="59" id="search-awoken-59" /><label class="awoken-icon" data-awoken-icon="59" for="search-awoken-59"></label><!--L盾--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="62" id="search-awoken-62" /><label class="awoken-icon" data-awoken-icon="62" for="search-awoken-62"></label><!--c珠--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="63" id="search-awoken-63" /><label class="awoken-icon" data-awoken-icon="63" for="search-awoken-63"></label><!--语音--></li>
|
||||
|
@ -966,5 +968,30 @@ var formation = new Formation(teamsCount,6);
|
|||
<line />
|
||||
</g>
|
||||
</svg>
|
||||
<div id="qr-code-frame" class="mask display-none">
|
||||
<button class="mask-close brown-button"></button>
|
||||
<div class="mask-content">
|
||||
<div class="read-qr-box">
|
||||
<div class="action-button-box">
|
||||
<button class="read-qr-camera brown-button"><!--相机扫--></button>
|
||||
<button class="read-qr-file brown-button"><!--读文件--></button>
|
||||
<input type="file" accept="image/*" class="file-select display-none">
|
||||
</div>
|
||||
<div class="info"></div>
|
||||
<div class="video-box display-none">
|
||||
<div><label for="sourceSelect"><!--视频源选择--></label><select id="sourceSelect"></select></div>
|
||||
<video id="video" width="500" height="500"></video>
|
||||
</div>
|
||||
</div>
|
||||
<div class="save-qr-box">
|
||||
<ul class="qr-data-type-ul">
|
||||
<li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdf" id="qr-data-type-pdf" checked/><label for="qr-data-type-pdf"></label></li><!--本程序
|
||||
--><li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdc" id="qr-data-type-pdc" /><label for="qr-data-type-pdc"></label></li><!--PDC-->
|
||||
</ul>
|
||||
<div class="qr-box"><img class="qr-code-image" /></div>
|
||||
<a download="" class="save-qr-img brown-button"><!--保存QR 图片--></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
112
style.css
|
@ -3,23 +3,37 @@
|
|||
font-family: 'FOT-KurokaneStd-EB';
|
||||
font-style: normal;
|
||||
/*font-weight: 400;*/
|
||||
src: url("fonts/FOT-KurokaneStd-EB.woff2") format('woff2'),
|
||||
url("fonts/FOT-KurokaneStd-EB.woff") format('woff'),
|
||||
url("fonts/FOT-KurokaneStd-EB.ttf") format('truetype'),
|
||||
url("fonts/FOT-KurokaneStd-EB.eot") format('embedded-opentype'),
|
||||
url("fonts/FOT-KurokaneStd-EB.svg") format('svg');
|
||||
src:
|
||||
url("fonts/FOT-KurokaneStd-EB.woff2") format('woff2'),
|
||||
url("fonts/FOT-KurokaneStd-EB.woff") format('woff'),
|
||||
url("fonts/FOT-KurokaneStd-EB.ttf") format('truetype'),
|
||||
url("fonts/FOT-KurokaneStd-EB.eot") format('embedded-opentype'),
|
||||
url("fonts/FOT-KurokaneStd-EB.svg") format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'zpix';
|
||||
src:
|
||||
url("fonts/zpix.woff2") format('woff2'),
|
||||
url("fonts/zpix.woff") format('woff'),
|
||||
url("fonts/zpix.ttf") format('truetype'),
|
||||
url("fonts/zpix.eot?#font-spider") format('embedded-opentype'),
|
||||
url("fonts/zpix.svg") format('svg');
|
||||
url("fonts/zpix.woff2") format('woff2'),
|
||||
url("fonts/zpix.woff") format('woff'),
|
||||
url("fonts/zpix.ttf") format('truetype'),
|
||||
url("fonts/zpix.eot?#font-spider") format('embedded-opentype'),
|
||||
url("fonts/zpix.svg") format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
font-display: block;
|
||||
src: url("fonts/fa-solid-900.eot");
|
||||
src:
|
||||
url("fonts/fa-solid-900.eot?#iefix") format("embedded-opentype"),
|
||||
url("fonts/fa-solid-900.woff2") format("woff2"),
|
||||
url("fonts/fa-solid-900.woff") format("woff"),
|
||||
url("fonts/fa-solid-900.ttf") format("truetype"),
|
||||
url("fonts/fa-solid-900.svg#fontawesome") format("svg");
|
||||
}
|
||||
@keyframes rotate-animate{
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
|
@ -1420,19 +1434,29 @@ icon.inflicts::after
|
|||
.attrs-div .attr-list{
|
||||
font-size:0;
|
||||
}
|
||||
.attrs-div .attr-list>li{
|
||||
.attrs-div .attr-list>li,
|
||||
.qr-data-type-ul>li
|
||||
{
|
||||
border: 1px solid white;
|
||||
border-left: none;
|
||||
background: #947244;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
}
|
||||
.attrs-div .attr-list>li:hover{
|
||||
.attrs-div .attr-list>li:hover,
|
||||
.qr-data-type-ul>li:hover
|
||||
{
|
||||
background: #E9CB9E;
|
||||
}
|
||||
.attrs-div .attr-list>li:first-of-type{
|
||||
.attrs-div .attr-list>li:first-of-type,
|
||||
.qr-data-type-ul>li:first-of-type
|
||||
{
|
||||
border-radius: 8px 0 0 8px;
|
||||
border-left: 1px solid white;
|
||||
}
|
||||
.attrs-div .attr-list>li:last-of-type{
|
||||
.attrs-div .attr-list>li:last-of-type,
|
||||
.qr-data-type-ul>li:last-of-type
|
||||
{
|
||||
border-radius: 0 8px 8px 0;
|
||||
}
|
||||
.attrs-div .attr-list>li>label
|
||||
|
@ -1443,7 +1467,9 @@ icon.inflicts::after
|
|||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.attrs-div .attr-list input:checked+label{
|
||||
.attrs-div .attr-list input:checked+label,
|
||||
.qr-data-type-ul>li input:checked+label
|
||||
{
|
||||
background-color:#8C4242;
|
||||
box-shadow: inset black 0 0 5px;
|
||||
cursor: auto;
|
||||
|
@ -2661,7 +2687,7 @@ table .orb-icon
|
|||
content: "⛓️进化链";
|
||||
}*/
|
||||
|
||||
.mask-evolutionary-tree
|
||||
.mask
|
||||
{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
|
@ -2840,6 +2866,58 @@ table .orb-icon
|
|||
-webkit-text-stroke: 3px black;
|
||||
}
|
||||
|
||||
.control-box .btn-qrcode::before{
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
font-weight: normal;
|
||||
}
|
||||
#qr-code-frame
|
||||
{
|
||||
color: white;
|
||||
}
|
||||
#qr-code-frame .brown-button::before
|
||||
{
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
font-weight: normal;
|
||||
width: unset;
|
||||
}
|
||||
#qr-code-frame a
|
||||
{
|
||||
color: white;
|
||||
}
|
||||
.read-qr-box::before,
|
||||
.save-qr-box::before
|
||||
{
|
||||
display: block;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.qr-data-type-ul .qr-data-type-radio
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
.qr-data-type-ul>li label
|
||||
{
|
||||
font-size: 20px;
|
||||
padding: 5px;
|
||||
}
|
||||
.formation-from-qrcode
|
||||
{
|
||||
font-size: 1.5em;
|
||||
display: block;
|
||||
}
|
||||
.qr-code-image
|
||||
{
|
||||
background-color: white;
|
||||
}
|
||||
.qr-data-type-ul .qr-data-type-radio
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
.qr-data-type-ul>li label
|
||||
{
|
||||
font-size: 20px;
|
||||
padding: 5px;
|
||||
}
|
||||
/*.base .evo-type::before,
|
||||
.base .evo-type::after
|
||||
{
|
||||
|
|
53
triple.html
|
@ -18,6 +18,7 @@ const teamsCount = 3;
|
|||
<script type="text/javascript" src="script-skill-parser.js"></script>
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="library/html2canvas.min.js"></script>
|
||||
<script type="text/javascript" src="library/zxing.umd.min.js"></script>
|
||||
<!--▼ADPCM播放相关-->
|
||||
<script type="text/javascript" src="library/jy4340132-aaa/std.js"></script>
|
||||
<script type="text/javascript" src="library/jy4340132-aaa/pcm_player.js"></script>
|
||||
|
@ -51,6 +52,7 @@ var formation = new Formation(teamsCount,6);
|
|||
<div>
|
||||
<button class="btn-clear-data" onclick="clearData();"></button>
|
||||
<button class="btn-capture" onclick="capture();"></button>
|
||||
<button class="btn-qrcode"></button>
|
||||
<a class="down-capture display-none" target="_blank"></a>
|
||||
<button class="btn-solo-link" onclick="turnPage(1,arguments[0]);"></button>
|
||||
<button class="btn-multi-link" onclick="turnPage(2,arguments[0]);"></button>
|
||||
|
@ -1454,14 +1456,16 @@ var formation = new Formation(teamsCount,6);
|
|||
</div>
|
||||
<div class="awoken-div"><!--觉醒-->
|
||||
<ul class="awoken-ul all-awokens">
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="49" data-max-count="1"></button><!--武器觉醒--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="21"></button><!--SB--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="52" data-max-count="1"></button><!--大防封--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="43"></button><!--7c--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="61"></button><!--10c--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="58"></button><!--下半血强化--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="48"></button><!--破无效--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="27"></button><!--U--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="21"></button><!--SB--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="49" data-max-count="1"></button><!--武器觉醒--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="52" data-max-count="1"></button><!--大防封--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="60"></button><!--L解锁--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="58"></button><!--下半血强化--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="57"></button><!--上半血强化--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="11" data-max-count="5"></button><!--防暗--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="12" data-max-count="5"></button><!--防废--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="13" data-max-count="5"></button><!--防毒--></li>
|
||||
|
@ -1470,7 +1474,6 @@ var formation = new Formation(teamsCount,6);
|
|||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="45" data-max-count="1"></button><!--心追--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="50"></button><!--方块心追--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="19"></button><!--手指--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="60"></button><!--L解锁--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="1"></button><!--HP+--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="2"></button><!--攻击+--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="3"></button><!--回复+--></li>
|
||||
|
@ -1513,7 +1516,6 @@ var formation = new Formation(teamsCount,6);
|
|||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="51"></button><!--5色溜--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="53"></button><!--大手指--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="56"></button><!--大SB--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="57"></button><!--满血强化--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="59"></button><!--L盾--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="62"></button><!--c珠--></li>
|
||||
<li class="awoken-count"><button class="awoken-icon" data-awoken-icon="63" data-max-count="1"></button><!--语音--></li>
|
||||
|
@ -1537,13 +1539,15 @@ var formation = new Formation(teamsCount,6);
|
|||
<div class="sawoken-div"><!--超觉醒-->
|
||||
<button class="sawoken-clear brown-button" ></button>
|
||||
<ul class="sawoken-ul">
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="43" id="search-awoken-43" /><label class="awoken-icon" data-awoken-icon="43" for="search-awoken-43"></label><!--7c--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="61" id="search-awoken-61" /><label class="awoken-icon" data-awoken-icon="61" for="search-awoken-61"></label><!--10c--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="58" id="search-awoken-58" /><label class="awoken-icon" data-awoken-icon="58" for="search-awoken-58"></label><!--下半血强化--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="48" id="search-awoken-48" /><label class="awoken-icon" data-awoken-icon="48" for="search-awoken-48"></label><!--破无效--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="27" id="search-awoken-27" /><label class="awoken-icon" data-awoken-icon="27" for="search-awoken-27"></label><!--U--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="21" id="search-awoken-21" /><label class="awoken-icon" data-awoken-icon="21" for="search-awoken-21"></label><!--SB--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="52" id="search-awoken-52" /><label class="awoken-icon" data-awoken-icon="52" for="search-awoken-52"></label><!--大防封--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="43" id="search-awoken-43" /><label class="awoken-icon" data-awoken-icon="43" for="search-awoken-43"></label><!--7c--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="61" id="search-awoken-61" /><label class="awoken-icon" data-awoken-icon="61" for="search-awoken-61"></label><!--10c--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="48" id="search-awoken-48" /><label class="awoken-icon" data-awoken-icon="48" for="search-awoken-48"></label><!--破无效--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="27" id="search-awoken-27" /><label class="awoken-icon" data-awoken-icon="27" for="search-awoken-27"></label><!--U--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="60" id="search-awoken-60" /><label class="awoken-icon" data-awoken-icon="60" for="search-awoken-60"></label><!--L解锁--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="58" id="search-awoken-58" /><label class="awoken-icon" data-awoken-icon="58" for="search-awoken-58"></label><!--下半血强化--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="57" id="search-awoken-57" /><label class="awoken-icon" data-awoken-icon="57" for="search-awoken-57"></label><!--上半血强化--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="68" id="search-awoken-68" /><label class="awoken-icon" data-awoken-icon="68" for="search-awoken-68"></label><!--大防暗--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="69" id="search-awoken-69" /><label class="awoken-icon" data-awoken-icon="69" for="search-awoken-69"></label><!--大防废--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="70" id="search-awoken-70" /><label class="awoken-icon" data-awoken-icon="70" for="search-awoken-70"></label><!--大防毒--></li>
|
||||
|
@ -1552,7 +1556,6 @@ var formation = new Formation(teamsCount,6);
|
|||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="45" id="search-awoken-45" /><label class="awoken-icon" data-awoken-icon="45" for="search-awoken-45"></label><!--心追--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="50" id="search-awoken-50" /><label class="awoken-icon" data-awoken-icon="50" for="search-awoken-50"></label><!--方块心追--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="19" id="search-awoken-19" /><label class="awoken-icon" data-awoken-icon="19" for="search-awoken-19"></label><!--手指--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="60" id="search-awoken-60" /><label class="awoken-icon" data-awoken-icon="60" for="search-awoken-60"></label><!--L解锁--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="1" id="search-awoken-1" /><label class="awoken-icon" data-awoken-icon="1" for="search-awoken-1"></label><!--HP+--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="2" id="search-awoken-2" /><label class="awoken-icon" data-awoken-icon="2" for="search-awoken-2"></label><!--攻击+--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="3" id="search-awoken-3" /><label class="awoken-icon" data-awoken-icon="3" for="search-awoken-3"></label><!--回复+--></li>
|
||||
|
@ -1599,7 +1602,6 @@ var formation = new Formation(teamsCount,6);
|
|||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="51" id="search-awoken-51" /><label class="awoken-icon" data-awoken-icon="51" for="search-awoken-51"></label><!--5色溜--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="53" id="search-awoken-53" /><label class="awoken-icon" data-awoken-icon="53" for="search-awoken-53"></label><!--大手指--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="56" id="search-awoken-56" /><label class="awoken-icon" data-awoken-icon="56" for="search-awoken-56"></label><!--大SB--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="57" id="search-awoken-57" /><label class="awoken-icon" data-awoken-icon="57" for="search-awoken-57"></label><!--满血强化--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="59" id="search-awoken-59" /><label class="awoken-icon" data-awoken-icon="59" for="search-awoken-59"></label><!--L盾--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="62" id="search-awoken-62" /><label class="awoken-icon" data-awoken-icon="62" for="search-awoken-62"></label><!--c珠--></li>
|
||||
<li class="awoken-count"><input type="checkbox" class="sawoken-check" name="types" value="63" id="search-awoken-63" /><label class="awoken-icon" data-awoken-icon="63" for="search-awoken-63"></label><!--语音--></li>
|
||||
|
@ -1847,5 +1849,30 @@ var formation = new Formation(teamsCount,6);
|
|||
<line />
|
||||
</g>
|
||||
</svg>
|
||||
<div id="qr-code-frame" class="mask display-none">
|
||||
<button class="mask-close brown-button"></button>
|
||||
<div class="mask-content">
|
||||
<div class="read-qr-box">
|
||||
<div class="action-button-box">
|
||||
<button class="read-qr-camera brown-button"><!--相机扫--></button>
|
||||
<button class="read-qr-file brown-button"><!--读文件--></button>
|
||||
<input type="file" accept="image/*" class="file-select display-none">
|
||||
</div>
|
||||
<div class="info"></div>
|
||||
<div class="video-box display-none">
|
||||
<div><label for="sourceSelect"><!--视频源选择--></label><select id="sourceSelect"></select></div>
|
||||
<video id="video" width="500" height="500"></video>
|
||||
</div>
|
||||
</div>
|
||||
<div class="save-qr-box">
|
||||
<ul class="qr-data-type-ul">
|
||||
<li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdf" id="qr-data-type-pdf" checked/><label for="qr-data-type-pdf"></label></li><!--本程序
|
||||
--><li><input type="radio" name="qr-data-type" class="qr-data-type-radio" value="pdc" id="qr-data-type-pdc" /><label for="qr-data-type-pdc"></label></li><!--PDC-->
|
||||
</ul>
|
||||
<div class="qr-box"><img class="qr-code-image" /></div>
|
||||
<a download="" class="save-qr-img brown-button"><!--保存QR 图片--></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|