让组队处的潜觉可以随意排列,不再强求顺序
This commit is contained in:
parent
c029a25ed7
commit
5671cad9e1
|
@ -5885,7 +5885,7 @@ function changeid(mon, monDom, latentDom, assist) {
|
|||
if (latent.length < 1) {
|
||||
latentDom.classList.add(className_displayNone);
|
||||
} else {
|
||||
refreshLatent(latent, mon, latentDom, {sort:true, assist});
|
||||
refreshLatent(latent, mon, latentDom, {sort:false, assist});
|
||||
latentDom.classList.remove(className_displayNone);
|
||||
}
|
||||
latentDom.classList.toggle("level-super-break", level > 110);; //切换潜觉为120级
|
||||
|
@ -5940,13 +5940,14 @@ function changeid(mon, monDom, latentDom, assist) {
|
|||
//parentNode.appendChild(fragment);
|
||||
}
|
||||
//刷新潜觉
|
||||
function refreshLatent(latents, member, latentsNode, option) {
|
||||
function refreshLatent(latents, member, latentsNode, option = {}) {
|
||||
const {sort, assist} = option;
|
||||
const maxLatentCount = getMaxLatentCount(member.id); //最大潜觉数量
|
||||
const iconArr = latentsNode.querySelectorAll('.latent-icon');
|
||||
latentsNode.classList.toggle("block-8", maxLatentCount > 6);
|
||||
if (option?.sort) latents = latents.toSorted((a, b) => latentUseHole(b) - latentUseHole(a));
|
||||
if (sort) latents = latents.toSorted((a, b) => latentUseHole(b) - latentUseHole(a));
|
||||
//如果传入了辅助,才进行有效觉醒的计算,否则算作只有本人的。
|
||||
let effectiveAwokens = new Set(member.effectiveAwokens(option?.assist ?? null));
|
||||
let effectiveAwokens = new Set(member.effectiveAwokens(assist));
|
||||
let latentIndex = 0, usedHoleN = 0;
|
||||
//如果传入了武器,就添加有效觉醒
|
||||
for (let ai = 0; ai < iconArr.length; ai++) {
|
||||
|
|
|
@ -32339,7 +32339,7 @@ const cachesMap = new Map([
|
|||
],
|
||||
[
|
||||
"script.js",
|
||||
"5977ed9c826d121c7080a4d906a0bd67"
|
||||
"7097fe22eb833eb7939a00c0ac49fb76"
|
||||
],
|
||||
[
|
||||
"solo.html",
|
||||
|
@ -32355,7 +32355,7 @@ const cachesMap = new Map([
|
|||
],
|
||||
[
|
||||
"style.css",
|
||||
"153be5e23561327940c522899d8d941d"
|
||||
"ed3a2d3236b764103ab143152b484880"
|
||||
],
|
||||
[
|
||||
"temp.js",
|
||||
|
|
28
style.css
28
style.css
|
@ -1451,23 +1451,27 @@ body:not(.solo) .awoken-icon[data-awoken-icon="64"]::after
|
|||
grid-template: repeat(2, 32px) / repeat(3, 32px);
|
||||
/*grid-template-columns: repeat(3, 32px);
|
||||
grid-template-rows: repeat(2, 32px);*/
|
||||
grid-auto-flow: column;
|
||||
grid-gap: 3px 6px;
|
||||
place-content: start center;
|
||||
grid-auto-flow: column dense; /*这个 dense 让潜觉可以自动填充位置*/
|
||||
}
|
||||
.team-latents .latent-ul.block-8{
|
||||
grid-template-columns: repeat(4, 32px);
|
||||
}
|
||||
.team-latents .latent-icon[data-latent-hole="1"] {
|
||||
grid-column: span 1;
|
||||
grid-area: span 1 / span 1;
|
||||
/* grid-column: span 1;
|
||||
grid-row: span 1; */
|
||||
}
|
||||
.team-latents .latent-icon[data-latent-hole="2"] {
|
||||
grid-column: span 1;
|
||||
grid-row: span 2;
|
||||
grid-area: span 2 / span 1;
|
||||
/*grid-column: span 1;
|
||||
grid-row: span 2;*/
|
||||
}
|
||||
.team-latents .latent-icon[data-latent-hole="6"] {
|
||||
grid-column: span 3;
|
||||
grid-row: span 2;
|
||||
grid-area: span 2 / span 3;
|
||||
/* grid-column: span 3;
|
||||
grid-row: span 2; */
|
||||
}
|
||||
.team-latents .latent-icon[data-latent-hole="6"]::before,
|
||||
.team-latents .latent-icon[data-latent-hole="6"]::after
|
||||
|
@ -2945,13 +2949,19 @@ input[disabled]+.awoken-icon:active,
|
|||
display: none;
|
||||
}
|
||||
.row-mon-latent .latent-icon[data-latent-hole="1"] {
|
||||
grid-column: span 1;
|
||||
grid-area: span 1 / span 1;
|
||||
/* grid-column: span 1;
|
||||
grid-row: span 1; */
|
||||
}
|
||||
.row-mon-latent .latent-icon[data-latent-hole="2"] {
|
||||
grid-column: span 2;
|
||||
grid-area: span 1 / span 2;
|
||||
/*grid-column: span 1;
|
||||
grid-row: span 2;*/
|
||||
}
|
||||
.row-mon-latent .latent-icon[data-latent-hole="6"] {
|
||||
grid-column: span 6;
|
||||
grid-area: span 1 / span 6;
|
||||
/* grid-column: span 3;
|
||||
grid-row: span 2; */
|
||||
}
|
||||
.latent-icon[data-latent-hole="2"]+.latent-icon,
|
||||
.latent-icon[data-latent-hole="6"]+.latent-icon,
|
||||
|
|
Loading…
Reference in New Issue