diff --git a/images/latent.png b/images/latent.png index 26dd9297..ba42300e 100644 Binary files a/images/latent.png and b/images/latent.png differ diff --git a/images/project file/latent.fw.png b/images/project file/latent.fw.png index 6f045cd8..6f107201 100644 Binary files a/images/project file/latent.fw.png and b/images/project file/latent.fw.png differ diff --git a/languages/en.css b/languages/en.css index a8255713..209d19d5 100644 --- a/languages/en.css +++ b/languages/en.css @@ -324,7 +324,7 @@ background-position-x: -32px; } .latent-icon[data-latent-icon='17']::before, -.latent-icon[data-latent-icon='37']::before +.latent-icon[data-latent-icon='38']::before { background-position-x: -252px; } diff --git a/languages/ko.css b/languages/ko.css index aa2d1fa9..703e54b7 100644 --- a/languages/ko.css +++ b/languages/ko.css @@ -316,7 +316,7 @@ background-position-x: -32px; } .latent-icon[data-latent-icon='17']::before, -.latent-icon[data-latent-icon='37']::before +.latent-icon[data-latent-icon='38']::before { background-position-x: -252px; } diff --git a/multi.html b/multi.html index 65b1d08e..5b54549d 100644 --- a/multi.html +++ b/multi.html @@ -801,7 +801,11 @@ var formation = new Formation(teamsCount,5);
  • -
  • +
  • +
  • +
  • +
  • +
  • diff --git a/script-universal_function.js b/script-universal_function.js index 2dff18e7..484a9db0 100644 --- a/script-universal_function.js +++ b/script-universal_function.js @@ -156,13 +156,15 @@ fetch("library/jy4340132-aaa/adpcm.wasm").then((response) => response.arrayBuffe }*/ }); //▲ADPCM播放相关 - +function latentUseHole(latentId) +{ + //12号以后都是2格的潜觉,37号后是6格的潜觉 + return latentId >= 37 ? 6 : (latentId>= 12 ? 2 : 1); +} //计算用了多少潜觉格子 function usedHole(latents) { - return latents.reduce((usedHole, latentId) => usedHole + - (latentId == 37 ? 6 : (latentId>= 12 ? 2 : 1)) //12号以后都是2格的潜觉 - , 0); + return latents.reduce((usedHole, latentId) => usedHole + latentUseHole(latentId), 0); } //计算所有队伍中有多少个该觉醒 function awokenCountInFormation(formationTeams,awokenIndex,solo,teamsCount) diff --git a/script.js b/script.js index 76417e32..432f8850 100644 --- a/script.js +++ b/script.js @@ -1215,13 +1215,15 @@ function initialize() function addLatent(){ if (this.classList.contains("unselected-latent")) return; //不能选的觉醒直接退出 const lIdx = parseInt(this.getAttribute("data-latent-icon"),10); //潜觉的序号 - const usedHoleN = usedHole(editBox.latent); //使用了的格子 const maxLatentCount = getMaxLatentCount(editBox.mid); //最大潜觉数量 - if (lIdx == 37 && usedHoleN<=(maxLatentCount-6) || //如果能添加6格的觉醒 - lIdx >= 12 && lIdx <37 && usedHoleN<=(maxLatentCount-2) || //如果能添加2格的觉醒 - lIdx < 12 && usedHoleN<=(maxLatentCount-1)) //如果能添加1格的觉醒 - {editBox.latent.push(lIdx);} - else {return;} + const usedHoleN = usedHole(editBox.latent); //已经使用了的格子 + const enabledHole = maxLatentCount - usedHoleN; //还剩余的格子 + + if (latentUseHole(lIdx) <= enabledHole) + editBox.latent.push(lIdx); + else + return; + editBox.reCalculateAbility(); editBox.refreshLatent(editBox.latent,editBox.mid); } @@ -1739,7 +1741,7 @@ function refreshLatent(latent,monid,iconArr) //刷新潜觉 { icon.setAttribute("data-latent-icon", latent[latentIndex]); icon.classList.remove(className_displayNone); - usedHoleN += latent[latentIndex] == 37 ? 6 : (latent[latentIndex]>= 12 ? 2 : 1); + usedHoleN += latentUseHole(latent[latentIndex]); latentIndex++; } else if(ai < usedHoleN) //多格潜觉后方隐藏 diff --git a/solo.html b/solo.html index 026e8fc0..ac1f8ed9 100644 --- a/solo.html +++ b/solo.html @@ -753,7 +753,11 @@ var formation = new Formation(teamsCount,6);
  • -
  • +
  • +
  • +
  • +
  • +
  • diff --git a/style-monsterimages.css b/style-monsterimages.css index 09c98968..d7dabb48 100644 --- a/style-monsterimages.css +++ b/style-monsterimages.css @@ -698,6 +698,14 @@ { width: 76px; } +.latent-icon[data-latent-icon='37']::before, +.latent-icon[data-latent-icon='38']::before, +.latent-icon[data-latent-icon='39']::before, +.latent-icon[data-latent-icon='40']::before, +.latent-icon[data-latent-icon='41']::before +{ + width: 252px; +} .latent-icon[data-latent-icon='1']::before{ /*HP*/ background-position-y: calc(-32px * 1); } @@ -808,10 +816,21 @@ .latent-icon[data-latent-icon='36']::before{ /*大暗盾*/ background-position-y: calc(-32px * 36); } -.latent-icon[data-latent-icon='37']::before{ /*6色破无效*/ - width: 252px; +.latent-icon[data-latent-icon='37']::before{ /*6色破属吸*/ background-position-y: calc(-32px * 37); } +.latent-icon[data-latent-icon='38']::before{ /*6色破无效*/ + background-position-y: calc(-32px * 38); +} +.latent-icon[data-latent-icon='39']::before{ /*不掉毒*/ + background-position-y: calc(-32px * 39); +} +.latent-icon[data-latent-icon='40']::before{ /*不掉废*/ + background-position-y: calc(-32px * 40); +} +.latent-icon[data-latent-icon='41']::before{ /*不被换队长*/ + background-position-y: calc(-32px * 41); +} /* 徽章背景 */ .badge{ diff --git a/style.css b/style.css index 90c11c01..f2f35140 100644 --- a/style.css +++ b/style.css @@ -594,14 +594,22 @@ ul{ .team-latents .latent-icon[data-latent-icon='34'], .team-latents .latent-icon[data-latent-icon='35'], .team-latents .latent-icon[data-latent-icon='36'], -.team-latents .latent-icon[data-latent-icon='37'] +.team-latents .latent-icon[data-latent-icon='37'], +.team-latents .latent-icon[data-latent-icon='38'], +.team-latents .latent-icon[data-latent-icon='39'], +.team-latents .latent-icon[data-latent-icon='40'], +.team-latents .latent-icon[data-latent-icon='41'] { margin-left: 0; margin-right: 0; } -.team-latents .latent-ul .latent-icon[data-latent-icon='37']::before{ /*6色破无效*/ +.team-latents .latent-ul .latent-icon[data-latent-icon='37']::before, +.team-latents .latent-ul .latent-icon[data-latent-icon='38']::before, +.team-latents .latent-ul .latent-icon[data-latent-icon='39']::before, +.team-latents .latent-ul .latent-icon[data-latent-icon='40']::before, +.team-latents .latent-ul .latent-icon[data-latent-icon='41']::before +{ /*6格的潜觉*/ width: 152px; - background-position-y: calc(-32px * 37 - 3px); margin-left: -50px; margin-right: 47px; } diff --git a/triple.html b/triple.html index 35661072..e56d394b 100644 --- a/triple.html +++ b/triple.html @@ -1448,7 +1448,11 @@ var formation = new Formation(teamsCount,6);
  • -
  • +
  • +
  • +
  • +
  • +