更新咒术回战的技能
This commit is contained in:
parent
eca347cc4e
commit
220c9d1d66
Binary file not shown.
Before Width: | Height: | Size: 820 KiB After Width: | Height: | Size: 882 KiB |
Binary file not shown.
Before Width: | Height: | Size: 330 KiB After Width: | Height: | Size: 631 KiB |
Binary file not shown.
After Width: | Height: | Size: 128 KiB |
|
@ -158,31 +158,32 @@ function parseSkillDescription(skill) {
|
|||
let mulArr = null;
|
||||
if (Array.isArray(values)) {
|
||||
mulArr = [
|
||||
1,
|
||||
values[0] / 100,
|
||||
values[1] / 100,
|
||||
100,
|
||||
values[0],
|
||||
values[1],
|
||||
];
|
||||
} else {
|
||||
mulArr = [
|
||||
(values.hp || 100) / 100,
|
||||
(values.atk || 100) / 100,
|
||||
(values.rcv || 100) / 100
|
||||
(values.hp || 100),
|
||||
(values.atk || 100),
|
||||
(values.rcv || 100)
|
||||
];
|
||||
}
|
||||
const hasMul = mulArr.filter(m => m != 1); //不是1的数值
|
||||
let hasMul = new Set(mulArr);
|
||||
hasMul.delete(100);
|
||||
hasMul = Array.from(hasMul);
|
||||
let str = "";
|
||||
if (hasMul.length > 0) {
|
||||
const hasDiff = hasMul.filter(m => m != hasMul[0]).length > 0; //存在不一样的值
|
||||
if (hasDiff) {
|
||||
str += mulArr.map((m, i) => (m > 0 && m != 1) ? (mulName[i] + (scale ? (m >= 1 ? `×${m}倍` : `变为${m*100}%`) : `增加${m*100}%`)) : null).filter(s => s != null).join(",");
|
||||
if (hasMul.length > 1) { //存在不一样的值
|
||||
str += mulArr.map((m, i) => (m > 0 && m != 100) ? (mulName[i] + (scale ? (m >= 1 ? `×${m/100}倍` : `变为${m}%`) : `增加${m}%`)) : null).filter(s => s != null).join(",");
|
||||
} else {
|
||||
let hasMulName = mulName.filter((n, i) => mulArr[i] != 1);
|
||||
let hasMulName = mulName.filter((n, i) => mulArr[i] != 100);
|
||||
if (hasMulName.length >= 3) {
|
||||
str += hasMulName.slice(0, hasMulName.length - 1).join("、") + "和" + hasMulName[hasMulName.length - 1];
|
||||
} else {
|
||||
str += hasMulName.join("和");
|
||||
}
|
||||
str += scale ? (hasMul[0] >= 1 ? `×${hasMul[0]}倍` : `变为${hasMul[0]*100}%`) : `增加${hasMul[0]*100}%`;
|
||||
str += scale ? (hasMul[0] >= 1 ? `×${hasMul[0]/100}倍` : `变为${hasMul[0]}%`) : `增加${hasMul[0]}%`;
|
||||
}
|
||||
} else {
|
||||
str += "能力值没有变化";
|
||||
|
@ -1453,6 +1454,21 @@ function parseSkillDescription(skill) {
|
|||
case 224:
|
||||
str = `${sk[0]}回合内,敌人全体变为${attrN(sk[1])}属性。(不受防护盾的影响)`;
|
||||
break;
|
||||
case 225:{
|
||||
let strArr = [];
|
||||
if (sk[0]) strArr.push(`大于${sk[0]}%`);
|
||||
if (sk[1]) strArr.push(`小于${sk[1]}%`);
|
||||
str = `HP${strArr.join("或")}时才能发动后续效果`;
|
||||
break;
|
||||
}
|
||||
case 226:{
|
||||
str = `${sk[0]}回合内,${sk[1]}%概率掉落带钉宝珠`;
|
||||
break;
|
||||
}
|
||||
case 227:{
|
||||
str = `指使当前队长与最后一位队员交换位置,再次使用此技能则换回来(待测试)。`;
|
||||
break;
|
||||
}
|
||||
case 228:
|
||||
str = `${sk[0]}回合内,队伍中每存在1个${getAttrTypeString(flags(sk[1]), flags(sk[2]))}时,${getFixedHpAtkRcvString({atk:sk[3],rcv:sk[4]}, false)}`;
|
||||
break;
|
||||
|
|
|
@ -1 +1 @@
|
|||
[{"code":"ja","ckey":{"card":"1662af91b3c6c65dcacd7c5f59e3779c","skill":"fbbceb29e8fa54610addce49e5a4c627"},"updateTime":1626437692992},{"code":"en","ckey":{"card":"f968e7c08d9a708a236e956d7050e05a","skill":"fa1024dd36232eb43c030a2499814960"},"updateTime":1626352490457},{"code":"ko","ckey":{"card":"6b1f4e5b5f428ad3303257ac0b118bf2","skill":"17c7e55b774b6fed3eaea6bc5a0c027d"},"updateTime":1626352490457}]
|
||||
[{"code":"ja","ckey":{"card":"0b3318a6521bafadaf7f1ca43dfd200e","skill":"88598cd8a7056f5f932eb73bad2c7a82"},"updateTime":1626870923025},{"code":"en","ckey":{"card":"f968e7c08d9a708a236e956d7050e05a","skill":"fa1024dd36232eb43c030a2499814960"},"updateTime":1626352490457},{"code":"ko","ckey":{"card":"6b1f4e5b5f428ad3303257ac0b118bf2","skill":"17c7e55b774b6fed3eaea6bc5a0c027d"},"updateTime":1626352490457}]
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
45
script.js
45
script.js
|
@ -673,7 +673,12 @@ function turnPage(toPage, e = null) {
|
|||
window.onload = function(event) {
|
||||
if (!Array.prototype.flat)
|
||||
{
|
||||
alert("请更新您的浏览器。\nPlease update your browser.");
|
||||
alert(`请更新您的浏览器。火狐≥62 或 谷歌≥69
|
||||
Please update your browser. Firefox≥62 or Chrome≥69
|
||||
|
||||
你的浏览器:
|
||||
Your browser:
|
||||
${navigator.userAgent}`);
|
||||
}
|
||||
|
||||
qrcodeReader = new ZXing.BrowserQRCodeReader(); //二维码读取
|
||||
|
@ -1706,26 +1711,36 @@ function initialize() {
|
|||
const headDom = this.parentNode;
|
||||
const arr = getMemberArrayIndexFromMonHead(headDom);
|
||||
const team = formation.teams[arr[0]];
|
||||
const member = team[arr[1]][arr[2]];
|
||||
const card = Cards[member.id] || Cards[0];
|
||||
const skills = getCardActiveSkills(card, [93, 227]); //更换队长的技能
|
||||
if (skills.length < 1) return;
|
||||
const skill = skills[0];
|
||||
|
||||
if (team[3] > 0) //如果队伍已经换了队长
|
||||
{
|
||||
if (team[3] == arr[2]) //点的就是换的队长
|
||||
if (skill.type == 227 //固定与右侧换队长
|
||||
|| team[3] == arr[2]) //点的就是换的队长
|
||||
{
|
||||
team[3] = 0; //还原
|
||||
}else
|
||||
{
|
||||
team[3] = arr[2]; //改变成任何能点的换队长
|
||||
}
|
||||
creatNewUrl(); //刷新URL
|
||||
refreshAll(formation); //刷新全部
|
||||
}else //如果队伍没有换队长
|
||||
{
|
||||
if(arr[2] > 0) //如果点的不是原队长
|
||||
if (skill.type == 227) //固定与右侧换队长
|
||||
{
|
||||
let myTeam = team.slice(0,5);
|
||||
team[3] = myTeam.length - 1 - team.slice(0,5).reverse().findIndex(m=>m.id>0);
|
||||
}
|
||||
else if(arr[2] > 0) //如果点的不是原队长
|
||||
{
|
||||
team[3] = arr[2]; //接换成新队长
|
||||
creatNewUrl(); //刷新URL
|
||||
refreshAll(formation); //刷新全部
|
||||
}
|
||||
}
|
||||
creatNewUrl(); //刷新URL
|
||||
refreshAll(formation); //刷新全部
|
||||
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
@ -3142,7 +3157,7 @@ function changeid(mon, monDom, latentDom) {
|
|||
const switchLeaderDom = monDom.querySelector(".switch-leader");
|
||||
if (switchLeaderDom) //如果存在队长交换 DOM
|
||||
{
|
||||
const skills = getCardActiveSkills(card, [93]); //更换队长的技能
|
||||
const skills = getCardActiveSkills(card, [93, 227]); //更换队长的技能
|
||||
|
||||
if (skills.length > 0) {
|
||||
switchLeaderDom.classList.remove(className_displayNone);
|
||||
|
@ -3620,8 +3635,18 @@ function refreshAll(formationData) {
|
|||
//如果换队长技能
|
||||
if (leaderIdx == 0 && (ti == 0 || ti == 5))
|
||||
{
|
||||
member.querySelector(".switch-leader").classList.add(className_displayNone);
|
||||
assist.querySelector(".switch-leader").classList.add(className_displayNone);
|
||||
const card_m = Cards[teamData[0][ti].id] || Cards[0];
|
||||
const card_a = Cards[teamData[1][ti].id] || Cards[0];
|
||||
const skills_m = getCardActiveSkills(card_m, [93, 227]); //更换队长的技能
|
||||
const skills_a = getCardActiveSkills(card_a, [93, 227]); //更换队长的技能
|
||||
if (skills_m.length == 0 || skills_m[0].type != 227)
|
||||
{
|
||||
member.querySelector(".switch-leader").classList.add(className_displayNone);
|
||||
}
|
||||
if (skills_a.length == 0 || skills_a[0].type != 227)
|
||||
{
|
||||
assist.querySelector(".switch-leader").classList.add(className_displayNone);
|
||||
}
|
||||
}
|
||||
refreshMemberSkillCD(teamBox, teamData, ti); //技能CD
|
||||
refreshAbility(teamAbilityDom, teamData, ti); //本人能力值
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue