去除非队员目标攻击力强化也显示队员图标的情况

This commit is contained in:
枫谷剑仙 2023-07-22 02:04:31 +08:00
parent 1cbe932d88
commit d126cc8b8a
3 changed files with 13 additions and 8 deletions

View File

@ -215,7 +215,7 @@ const _localTranslating = {
enemy_all: tp`敵方全體`,
enemy_one: tp`敵方1體`,
enemy_attr: tp`${'attr'}敵人`,
the_attr: tp`該組寶珠屬性`,
the_attr: tp`該組寶珠對應屬性`,
},
stats: {
unknown: tp`[ 未知狀態: ${'type'}]`, //type

View File

@ -215,7 +215,7 @@ const _localTranslating = {
enemy_all: tp`敌方全体`,
enemy_one: tp`敌方1体`,
enemy_attr: tp`${'attr'}敌人`,
the_attr: tp`该组宝珠属性`,
the_attr: tp`该组宝珠对应属性`,
},
stats: {
unknown: tp`[ 未知状态: ${'type'}]`, //type

View File

@ -2499,13 +2499,18 @@ function renderSkill(skill, option = {})
if (targets != undefined)
{
targetDict.target = document.createDocumentFragment();
const ul = targetDict.target.appendChild(document.createElement("ul"));
ul.className = "team-flags";
for (let i = 0; i<6; i++) {
const li = ul.appendChild(document.createElement("li"));
li.className = "team-member-icon";
//增加队员伤害的技能的目标,删选出来,其他的目标则不显示
let atkUpTarget = targets.filter(n=>["self","leader-self","leader-helper","sub-members"].includes(n));
if (atkUpTarget.length) {
const ul = targetDict.target.appendChild(document.createElement("ul"));
ul.className = "team-flags";
for (let i = 0; i<6; i++) {
const li = ul.appendChild(document.createElement("li"));
li.className = "team-member-icon";
}
atkUpTarget.forEach(n=>ul.classList.add(n));
}
targets.forEach(n=>ul.classList.add(n));
targetDict.target.appendChild(targets.map(target=>
tsp?.target[target.replaceAll("-","_")]?.())