revert .skill改弹性布局
This commit is contained in:
parent
7e5419c0af
commit
e891b683ef
|
@ -1935,20 +1935,10 @@ div:not(.handcards)>.card>.info>span,
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
div:has(>div.skill):only-child {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
.skill {
|
||||
left: 0 !important;
|
||||
flex: 0 0 70px !important;
|
||||
word-break: break-word;
|
||||
/* width: 70px !important;
|
||||
white-space: nowrap; */
|
||||
}
|
||||
.skill+div {
|
||||
flex: 1;
|
||||
word-break: break-word;
|
||||
width: 70px !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.skilln {
|
||||
left: 0 !important;
|
||||
|
|
|
@ -3061,143 +3061,106 @@ export class Get extends Uninstantable {
|
|||
skills.add(i);
|
||||
}
|
||||
}
|
||||
skills.forEach(skill => {
|
||||
if (lib.skill[skill] && (lib.skill[skill].nopop || lib.skill[skill].equipSkill)) return;
|
||||
if (!lib.translate[skill + '_info']) return;
|
||||
let translation;
|
||||
if (lib.translate[skill + '_ab']) translation = lib.translate[skill + '_ab'];
|
||||
else {
|
||||
translation = get.translation(skill);
|
||||
if (!lib.skill[skill].nobracket) translation = `【${translation.slice(0, 2)}】`;
|
||||
}
|
||||
|
||||
if (node.forbiddenSkills[skill]) uiintro.add(`
|
||||
<div style="opacity:0.5">
|
||||
<div class="skill">${translation}</div>
|
||||
<div>
|
||||
${node.forbiddenSkills[skill].length ? `(与${get.translation(node.forbiddenSkills[skill])}冲突)` : `(双将禁用)`}<br/>
|
||||
${get.skillInfoTranslation(skill, node)}
|
||||
</div>
|
||||
</div>
|
||||
`);
|
||||
else if (!skills2.contains(skill)) {
|
||||
if (lib.skill[skill].preHidden && get.mode() == 'guozhan') {
|
||||
uiintro.add(`
|
||||
<div>
|
||||
<div class="skill" style="opacity:0.5">${translation}</div>
|
||||
<div>
|
||||
<span style="opacity:0.5">${get.skillInfoTranslation(skill, node)}</span><br/>
|
||||
<div class="underlinenode on gray" style="position:relative;padding-left:0;padding-top:7px">预亮技能</div>
|
||||
</div>
|
||||
</div>
|
||||
`);
|
||||
const underlinenode = uiintro.content.lastChild.querySelector('.underlinenode');
|
||||
if (_status.prehidden_skills.contains(skill)) {
|
||||
underlinenode.classList.remove('on');
|
||||
}
|
||||
underlinenode.link = skill;
|
||||
underlinenode.listen(ui.click.hiddenskill);
|
||||
for (i = 0; i < skills.length; i++) {
|
||||
if (lib.skill[skills[i]] && (lib.skill[skills[i]].nopop || lib.skill[skills[i]].equipSkill)) continue;
|
||||
if (lib.translate[skills[i] + '_info']) {
|
||||
if (lib.translate[skills[i] + '_ab']) translation = lib.translate[skills[i] + '_ab'];
|
||||
else {
|
||||
translation = get.translation(skills[i]);
|
||||
if (!lib.skill[skills[i]].nobracket) translation = `【${translation.slice(0, 2)}】`;
|
||||
}
|
||||
else uiintro.add(`
|
||||
<div style="opacity:0.5">
|
||||
<div class="skill">${translation}</div>
|
||||
<div>${get.skillInfoTranslation(skill, node)}</div>
|
||||
</div>
|
||||
`);
|
||||
}
|
||||
else if (lib.skill[skill].temp || !node.skills.contains(skill) || lib.skill[skill].thundertext) {
|
||||
if (lib.skill[skill].frequent || lib.skill[skill].subfrequent) {
|
||||
uiintro.add(`
|
||||
<div>
|
||||
<div class="skill thundertext thunderauto">${translation}</div>
|
||||
<div class="thundertext thunderauto">
|
||||
${get.skillInfoTranslation(skill, node)}<br/>
|
||||
<div class="underlinenode on gray" style="position:relative;padding-left:0;padding-top:7px">自动发动</div>
|
||||
</div>
|
||||
</div>
|
||||
`);
|
||||
const underlinenode = uiintro.content.lastChild.querySelector('.underlinenode');
|
||||
if (lib.skill[skill].frequent) {
|
||||
if (lib.config.autoskilllist.contains(skill)) {
|
||||
|
||||
if (node.forbiddenSkills[skills[i]]) {
|
||||
var forbidstr = '<div style="opacity:0.5"><div class="skill">' + translation + '</div><div>';
|
||||
if (node.forbiddenSkills[skills[i]].length) {
|
||||
forbidstr += '(与' + get.translation(node.forbiddenSkills[skills[i]]) + '冲突)<br>';
|
||||
}
|
||||
else {
|
||||
forbidstr += '(双将禁用)<br>';
|
||||
}
|
||||
forbidstr += get.skillInfoTranslation(skills[i], node) + '</div></div>'
|
||||
uiintro.add(forbidstr);
|
||||
}
|
||||
else if (!skills2.contains(skills[i])) {
|
||||
if (lib.skill[skills[i]].preHidden && get.mode() == 'guozhan') {
|
||||
uiintro.add('<div><div class="skill" style="opacity:0.5">' + translation + '</div><div><span style="opacity:0.5">' + get.skillInfoTranslation(skills[i], node) + '</span><br><div class="underlinenode on gray" style="position:relative;padding-left:0;padding-top:7px">预亮技能</div></div></div>');
|
||||
var underlinenode = uiintro.content.lastChild.querySelector('.underlinenode');
|
||||
if (_status.prehidden_skills.contains(skills[i])) {
|
||||
underlinenode.classList.remove('on');
|
||||
}
|
||||
underlinenode.link = skills[i];
|
||||
underlinenode.listen(ui.click.hiddenskill);
|
||||
}
|
||||
else uiintro.add('<div style="opacity:0.5"><div class="skill">' + translation + '</div><div>' + get.skillInfoTranslation(skills[i], node) + '</div></div>');
|
||||
}
|
||||
else if (lib.skill[skills[i]].temp || !node.skills.contains(skills[i]) || lib.skill[skills[i]].thundertext) {
|
||||
if (lib.skill[skills[i]].frequent || lib.skill[skills[i]].subfrequent) {
|
||||
uiintro.add('<div><div class="skill thundertext thunderauto">' + translation + '</div><div class="thundertext thunderauto">' + get.skillInfoTranslation(skills[i], node) + '<br><div class="underlinenode on gray" style="position:relative;padding-left:0;padding-top:7px">自动发动</div></div></div>');
|
||||
var underlinenode = uiintro.content.lastChild.querySelector('.underlinenode');
|
||||
if (lib.skill[skills[i]].frequent) {
|
||||
if (lib.config.autoskilllist.contains(skills[i])) {
|
||||
underlinenode.classList.remove('on');
|
||||
}
|
||||
}
|
||||
if (lib.skill[skills[i]].subfrequent) {
|
||||
for (var j = 0; j < lib.skill[skills[i]].subfrequent.length; j++) {
|
||||
if (lib.config.autoskilllist.contains(skills[i] + '_' + lib.skill[skills[i]].subfrequent[j])) {
|
||||
underlinenode.classList.remove('on');
|
||||
}
|
||||
}
|
||||
}
|
||||
if (lib.config.autoskilllist.contains(skills[i])) {
|
||||
underlinenode.classList.remove('on');
|
||||
}
|
||||
underlinenode.link = skills[i];
|
||||
underlinenode.listen(ui.click.autoskill2);
|
||||
}
|
||||
else {
|
||||
uiintro.add('<div><div class="skill thundertext thunderauto">' + translation + '</div><div class="thundertext thunderauto">' + get.skillInfoTranslation(skills[i], node) + '</div></div>');
|
||||
}
|
||||
}
|
||||
else if (lib.skill[skills[i]].frequent || lib.skill[skills[i]].subfrequent) {
|
||||
uiintro.add('<div><div class="skill">' + translation + '</div><div>' + get.skillInfoTranslation(skills[i], node) + '<br><div class="underlinenode on gray" style="position:relative;padding-left:0;padding-top:7px">自动发动</div></div></div>');
|
||||
var underlinenode = uiintro.content.lastChild.querySelector('.underlinenode');
|
||||
if (lib.skill[skills[i]].frequent) {
|
||||
if (lib.config.autoskilllist.contains(skills[i])) {
|
||||
underlinenode.classList.remove('on');
|
||||
}
|
||||
}
|
||||
if (lib.skill[skill].subfrequent) lib.skill[skill].subfrequent.forEach(i => {
|
||||
if (lib.config.autoskilllist.contains(skill + '_' + i)) {
|
||||
underlinenode.classList.remove('on');
|
||||
if (lib.skill[skills[i]].subfrequent) {
|
||||
for (var j = 0; j < lib.skill[skills[i]].subfrequent.length; j++) {
|
||||
if (lib.config.autoskilllist.contains(skills[i] + '_' + lib.skill[skills[i]].subfrequent[j])) {
|
||||
underlinenode.classList.remove('on');
|
||||
}
|
||||
}
|
||||
});
|
||||
if (lib.config.autoskilllist.contains(skill)) {
|
||||
}
|
||||
if (lib.config.autoskilllist.contains(skills[i])) {
|
||||
underlinenode.classList.remove('on');
|
||||
}
|
||||
underlinenode.link = skill;
|
||||
underlinenode.link = skills[i];
|
||||
underlinenode.listen(ui.click.autoskill2);
|
||||
}
|
||||
else uiintro.add(`
|
||||
<div>
|
||||
<div class="skill thundertext thunderauto">${translation}</div>
|
||||
<div class="thundertext thunderauto">${get.skillInfoTranslation(skill, node)}</div>
|
||||
</div>
|
||||
`);
|
||||
}
|
||||
else if (lib.skill[skill].frequent || lib.skill[skill].subfrequent) {
|
||||
uiintro.add(`
|
||||
<div>
|
||||
<div class="skill">${translation}</div>
|
||||
<div>
|
||||
${get.skillInfoTranslation(skill, node)}<br/>
|
||||
<div class="underlinenode on gray" style="position:relative;padding-left:0;padding-top:7px">自动发动</div>
|
||||
</div>
|
||||
</div>
|
||||
`);
|
||||
const underlinenode = uiintro.content.lastChild.querySelector('.underlinenode');
|
||||
if (lib.skill[skill].frequent) {
|
||||
if (lib.config.autoskilllist.contains(skill)) {
|
||||
underlinenode.classList.remove('on');
|
||||
else if (lib.skill[skills[i]].clickable && node.isIn() && node.isUnderControl(true)) {
|
||||
var intronode = uiintro.add('<div><div class="skill">' + translation + '</div><div>' + get.skillInfoTranslation(skills[i], node) + '<br><div class="menubutton skillbutton" style="position:relative;margin-top:5px">点击发动</div></div></div>').querySelector('.skillbutton');
|
||||
if (!_status.gameStarted || (lib.skill[skills[i]].clickableFilter && !lib.skill[skills[i]].clickableFilter(node))) {
|
||||
intronode.classList.add('disabled');
|
||||
intronode.style.opacity = 0.5;
|
||||
}
|
||||
}
|
||||
if (lib.skill[skill].subfrequent) lib.skill[skill].subfrequent.forEach(i => {
|
||||
if (lib.config.autoskilllist.contains(skill + '_' + i)) {
|
||||
underlinenode.classList.remove('on');
|
||||
else {
|
||||
intronode.link = node;
|
||||
intronode.func = lib.skill[skills[i]].clickable;
|
||||
intronode.classList.add('pointerdiv');
|
||||
intronode.listen(ui.click.skillbutton);
|
||||
}
|
||||
});
|
||||
if (lib.config.autoskilllist.contains(skill)) {
|
||||
underlinenode.classList.remove('on');
|
||||
}
|
||||
underlinenode.link = skill;
|
||||
underlinenode.listen(ui.click.autoskill2);
|
||||
}
|
||||
else if (lib.skill[skill].clickable && node.isIn() && node.isUnderControl(true)) {
|
||||
const intronode = uiintro.add(`
|
||||
<div>
|
||||
<div class="skill">${translation}</div>
|
||||
<div>
|
||||
${get.skillInfoTranslation(skill, node)}<br/>
|
||||
<div class="menubutton skillbutton" style="position:relative;margin-top:5px">点击发动</div>
|
||||
</div>
|
||||
</div>
|
||||
`).querySelector('.skillbutton');
|
||||
if (!_status.gameStarted || (lib.skill[skill].clickableFilter && !lib.skill[skill].clickableFilter(node))) {
|
||||
intronode.classList.add('disabled');
|
||||
intronode.style.opacity = 0.5;
|
||||
}
|
||||
else {
|
||||
intronode.link = node;
|
||||
intronode.func = lib.skill[skill].clickable;
|
||||
intronode.classList.add('pointerdiv');
|
||||
intronode.listen(ui.click.skillbutton);
|
||||
uiintro.add('<div><div class="skill">' + translation + '</div><div>' + get.skillInfoTranslation(skills[i], node) + '</div></div>');
|
||||
}
|
||||
if (lib.translate[skills[i] + '_append']) {
|
||||
uiintro._place_text = uiintro.add('<div class="text">' + lib.translate[skills[i] + '_append'] + '</div>')
|
||||
}
|
||||
}
|
||||
else uiintro.add(`
|
||||
<div>
|
||||
<div class="skill">${translation}</div>
|
||||
<div>${get.skillInfoTranslation(skill, node)}</div>
|
||||
</div>
|
||||
`);
|
||||
if (lib.translate[skill + '_append']) {
|
||||
uiintro._place_text = uiintro.add(`<div class="text">${lib.translate[skill + '_append']}</div>`)
|
||||
}
|
||||
});
|
||||
}
|
||||
// if(get.is.phoneLayout()){
|
||||
// var storage=node.storage;
|
||||
// for(i in storage){
|
||||
|
@ -3704,10 +3667,10 @@ export class Get extends Uninstantable {
|
|||
}
|
||||
}
|
||||
let typeinfo = '';
|
||||
if (lib.card[name].unique) {
|
||||
if (lib.card[name] && lib.card[name].unique) {
|
||||
typeinfo += ('特殊' + get.translation(lib.card[name].type) + '牌');
|
||||
}
|
||||
else if (lib.card[name].type && lib.translate[lib.card[name].type]) {
|
||||
else if (lib.card[name] && lib.card[name].type && lib.translate[lib.card[name].type]) {
|
||||
typeinfo += (get.translation(lib.card[name].type) + '牌');
|
||||
}
|
||||
if (get.subtype(name, false)) {
|
||||
|
@ -3884,25 +3847,22 @@ export class Get extends Uninstantable {
|
|||
}
|
||||
else {
|
||||
var infoitem = get.character(character);
|
||||
var skills = infoitem[3]; get.character(character, 3).forEach(skill => {
|
||||
if (!lib.translate[skill + '_info']) return;
|
||||
if (lib.translate[skill + '_ab']) translation = lib.translate[skill + '_ab'];
|
||||
else {
|
||||
translation = get.translation(skill);
|
||||
if (!lib.skill[skill].nobracket) translation = `【${translation.slice(0, 2)}】`;
|
||||
}
|
||||
var skills = infoitem[3];
|
||||
for (i = 0; i < skills.length; i++) {
|
||||
if (lib.translate[skills[i] + '_info']) {
|
||||
if (lib.translate[skills[i] + '_ab']) translation = lib.translate[skills[i] + '_ab'];
|
||||
else {
|
||||
translation = get.translation(skills[i]);
|
||||
if (!lib.skill[skills[i]].nobracket) translation = `【${translation.slice(0, 2)}】`;
|
||||
}
|
||||
|
||||
uiintro.add(`
|
||||
<div>
|
||||
<div class="skill">${translation}</div>
|
||||
<div>${get.skillInfoTranslation(skill)}</div>
|
||||
</div>
|
||||
`);
|
||||
uiintro.add('<div><div class="skill">' + translation + '</div><div>' + get.skillInfoTranslation(skills[i]) + '</div></div>');
|
||||
|
||||
if (lib.translate[skill + '_append']) {
|
||||
uiintro._place_text = uiintro.add(`<div class="text">${lib.translate[skill + '_append']}</div>`)
|
||||
if (lib.translate[skills[i] + '_append']) {
|
||||
uiintro._place_text = uiintro.add('<div class="text">' + lib.translate[skills[i] + '_append'] + '</div>')
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
var modepack = lib.characterPack['mode_' + get.mode()];
|
||||
if (lib.config.show_favourite &&
|
||||
lib.character[node.link] && (!modepack || !modepack[node.link]) && (!simple || get.is.phoneLayout())) {
|
||||
|
|
Loading…
Reference in New Issue