From 32d7a3b322c1d7b3e05a7ee2cda4c8fa619ecd2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Sat, 24 Apr 2021 02:48:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AD=A5=EF=BC=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BA=A4=E6=8D=A2=E9=98=9F=E9=95=BF=E7=9A=84=E5=9B=BE?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/icon-switch-leader.png | Bin 0 -> 655 bytes multi.html | 20 +++++++++++++++++++ script.js | 18 ++++++++++++++--- solo.html | 36 ++++++++++++++++++++++------------ style.css | 21 ++++++++++++++++---- triple.html | 36 ++++++++++++++++++++++++++++++++++ 6 files changed, 112 insertions(+), 19 deletions(-) create mode 100644 images/icon-switch-leader.png diff --git a/images/icon-switch-leader.png b/images/icon-switch-leader.png new file mode 100644 index 0000000000000000000000000000000000000000..ce9ea3b330d6749e35721c275376023647ec02d8 GIT binary patch literal 655 zcmV;A0&x9_P)X1^@s6+90*i00004b3#c}2nYxW zdD0v4zQkdT!SB!C2vF!u)`O=w!!b9T;2 zNn!HN*P9twMFS3yH){l1|9q$CJYJBa1HWBv11C@S9R$3$QH9-+(Ki1}bAvK-;#6$XopwTN`kF%JV~50s;#3O|wD?{|9A0zc90 z1URsx5TLa_1$YF$;x0>|9Y9%@l%%nryQj}$0jcXcP5L~`XiUg?ooTUW!~mj|%C^|i z7_n(F%d^1ARH}^$T#u!`-9$aWJ5H1%j4|cIb|9lM*}>4%b!@<~_PA^s?B;EDDruE9 zFwb**Q@6Ge>fUZ2lpklgG3P+K7Y0N`thI3zTMJo1D-Yl@pw>qNNU2n|2B8*dsve%7 pSo1G*+icEXfNqTF4vd7H{|6LTA literal 0 HcmV?d00001 diff --git a/multi.html b/multi.html index 6c8c0229..d44de0d3 100644 --- a/multi.html +++ b/multi.html @@ -165,6 +165,7 @@ var formation = new Formation(teamsCount,5);
+
  • @@ -176,6 +177,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -187,6 +189,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -198,6 +201,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -209,6 +213,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -285,6 +290,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -297,6 +303,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -309,6 +316,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -321,6 +329,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -333,6 +342,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -353,6 +363,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -365,6 +376,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -377,6 +389,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -389,6 +402,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -401,6 +415,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -476,6 +491,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -487,6 +503,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -498,6 +515,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -509,6 +527,7 @@ var formation = new Formation(teamsCount,5);
    +
  • @@ -520,6 +539,7 @@ var formation = new Formation(teamsCount,5);
    +
  • diff --git a/script.js b/script.js index 9f28d5ab..1ea7daff 100644 --- a/script.js +++ b/script.js @@ -2545,7 +2545,7 @@ function changeid(mon, monDom, latentDom) { } } - const skillCdDom = monDom.querySelector(".skill"); + const skillCdDom = monDom.querySelector(".skill-cd"); if (skillCdDom) //如果存在技能CD DOM { //const skill = Skills[card.activeSkillId]; @@ -2556,6 +2556,18 @@ function changeid(mon, monDom, latentDom) { } } + const switchLeaderDom = monDom.querySelector(".switch-leader"); + if (switchLeaderDom) //如果存在队长交换 DOM + { + const skills = getCardActiveSkills(card, [93]); //更换队长的技能 + + if (skills.length > 0) { + switchLeaderDom.classList.remove(className_displayNone); + } else { + switchLeaderDom.classList.add(className_displayNone); + } + } + parentNode.appendChild(fragment); } //刷新潜觉 @@ -3490,8 +3502,8 @@ function refreshMemberSkillCD(teamDom, team, idx) { const assistCard = Cards[assist.id] || Cards[0]; const assistSkill = Skills[assistCard.activeSkillId]; - const memberSkillCdDom = memberMonDom.querySelector(".skill"); - const assistSkillCdDom = assistMonDom.querySelector(".skill"); + const memberSkillCdDom = memberMonDom.querySelector(".skill-cd"); + const assistSkillCdDom = assistMonDom.querySelector(".skill-cd"); const memberSkillCd = memberSkill ? (memberSkill.initialCooldown - (member.skilllevel || memberSkill.maxLevel) + 1) : 0; const assistSkillCd = assistSkill ? (assistSkill.initialCooldown - (assist.skilllevel || assistSkill.maxLevel) + 1) : 0; diff --git a/solo.html b/solo.html index 2499b41f..a92bf2e1 100644 --- a/solo.html +++ b/solo.html @@ -110,7 +110,8 @@ var formation = new Formation(teamsCount,6);
    -
    +
    +
  • @@ -121,7 +122,8 @@ var formation = new Formation(teamsCount,6);
    -
    +
    +
  • @@ -132,7 +134,8 @@ var formation = new Formation(teamsCount,6);
    -
    +
    +
  • @@ -143,7 +146,8 @@ var formation = new Formation(teamsCount,6);
    -
    +
    +
  • @@ -154,7 +158,8 @@ var formation = new Formation(teamsCount,6);
    -
    +
    +
  • @@ -165,7 +170,8 @@ var formation = new Formation(teamsCount,6);
    -
    +
    +
  • @@ -253,7 +259,8 @@ var formation = new Formation(teamsCount,6);
    -
    +
    +
  • @@ -265,7 +272,8 @@ var formation = new Formation(teamsCount,6);
    -
    +
    +
  • @@ -277,7 +285,8 @@ var formation = new Formation(teamsCount,6);
    -
    +
    +
  • @@ -289,7 +298,8 @@ var formation = new Formation(teamsCount,6);
    -
    +
    +
  • @@ -301,7 +311,8 @@ var formation = new Formation(teamsCount,6);
    -
    +
    +
  • @@ -313,7 +324,8 @@ var formation = new Formation(teamsCount,6);
    -
    +
    +
  • diff --git a/style.css b/style.css index bb1bd8a5..4da19766 100644 --- a/style.css +++ b/style.css @@ -506,11 +506,11 @@ ul{ /*.monster .id::before{ content: "No."; }*/ -.monster .skill::before{ +.monster .skill-cd::before{ content:"CD"; font-size: 10px; } -.monster .skill{ +.monster .skill-cd{ font-size: 13px; line-height: 13px; color:white; @@ -519,12 +519,25 @@ ul{ right:0; bottom:0; } -.monster .skill.max-skill{ +.monster .skill-cd.max-skill{ display: none; } -.show-mon-skill-cd .monster .skill.max-skill{ +.show-mon-skill-cd .monster .skill-cd.max-skill{ display: block; } +/*交换队长技的图标*/ +.monster .switch-leader +{ + position: absolute; + right: 0px; + bottom: 17px; + width: 23px; + height: 25px; + background-image: url(images/icon-switch-leader.png); + background-position: center; + background-repeat: no-repeat; +} + .not-show-awoken-count .formation-box .team-total-info, /*单个队伍血量统计*/ .not-show-awoken-count .formation-box .team-ability, /*单个队伍三维*/ .not-show-awoken-count .formation-box .team-awoken, /*单个队伍觉醒统计*/ diff --git a/triple.html b/triple.html index 7b700129..55e9449d 100644 --- a/triple.html +++ b/triple.html @@ -126,6 +126,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -137,6 +138,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -148,6 +150,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -159,6 +162,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -170,6 +174,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -181,6 +186,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -269,6 +275,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -281,6 +288,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -293,6 +301,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -305,6 +314,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -317,6 +327,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -329,6 +340,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -547,6 +559,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -558,6 +571,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -569,6 +583,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -580,6 +595,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -591,6 +607,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -602,6 +619,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -690,6 +708,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -702,6 +721,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -714,6 +734,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -726,6 +747,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -738,6 +760,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -750,6 +773,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -968,6 +992,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -979,6 +1004,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -990,6 +1016,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -1001,6 +1028,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -1012,6 +1040,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -1023,6 +1052,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -1111,6 +1141,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -1123,6 +1154,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -1135,6 +1167,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -1147,6 +1180,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -1159,6 +1193,7 @@ var formation = new Formation(teamsCount,6);
    +
  • @@ -1171,6 +1206,7 @@ var formation = new Formation(teamsCount,6);
    +