1.解决技能图标换队长后生肖对象错误的bug。

2.自动恢复血量显示占当前血量比例。
This commit is contained in:
枫谷剑仙 2025-04-20 13:43:48 +08:00
parent e2f952fd70
commit 2d5a39d4e7
4 changed files with 27 additions and 15 deletions

View File

@ -1688,25 +1688,26 @@ function tIf_Effect(leader1id, leader2id, leader1id_original,leader2id_original)
inflicts: [0,0],
};
const card1 = Cards[leader1id], card2 = Cards[leader2id];
{ //计算队伍是否为76
const card1_original = henshinBase(leader1id_original), card2_original = henshinBase(leader2id_original);
{ //计算队伍是否为76判断初始队长+变身前
const searchTypeArray = [162, 186];
effect.board76 = Boolean(getCardLeaderSkills(henshinBase(leader1id_original), searchTypeArray).length) ||
Boolean(getCardLeaderSkills(henshinBase(leader2id_original), searchTypeArray).length);
effect.board76 = Boolean(getCardLeaderSkills(card1_original, searchTypeArray).length) ||
Boolean(getCardLeaderSkills(card2_original, searchTypeArray).length);
}
{ //计算队伍是否为无天降
const searchTypeArray = [163, 177];
effect.noSkyfall = Boolean(getCardLeaderSkills(henshinBase(leader1id_original), searchTypeArray).length) ||
Boolean(getCardLeaderSkills(henshinBase(leader2id_original), searchTypeArray).length);
effect.noSkyfall = Boolean(getCardLeaderSkills(card1, searchTypeArray).length) ||
Boolean(getCardLeaderSkills(card2, searchTypeArray).length);
}
{ //计算队伍是否为毒无效
const searchTypeArray = [197];
effect.poisonNoEffect = Boolean(getCardLeaderSkills(henshinBase(leader1id_original), searchTypeArray).length) ||
Boolean(getCardLeaderSkills(henshinBase(leader2id_original), searchTypeArray).length);
effect.poisonNoEffect = Boolean(getCardLeaderSkills(card1, searchTypeArray).length) ||
Boolean(getCardLeaderSkills(card2, searchTypeArray).length);
}
{ //计算队伍是否有根性
const searchTypeArray = [14];
effect.resolve = Boolean(getCardLeaderSkills(henshinBase(leader1id_original), searchTypeArray).length) ||
Boolean(getCardLeaderSkills(henshinBase(leader2id_original), searchTypeArray).length);
effect.resolve = Boolean(getCardLeaderSkills(card1, searchTypeArray).length) ||
Boolean(getCardLeaderSkills(card2, searchTypeArray).length);
}
{ //计算队伍的+C
effect.addCombo[0] = getSkillAddCombo(card1);

View File

@ -6642,7 +6642,8 @@ function refreshAll(formationData) {
}
const teamTotalInfoDom = teamBigBox.querySelector(".team-total-info"); //队伍能力值合计
if (teamTotalInfoDom) refreshTeamTotalHP(teamTotalInfoDom, teamData, teamNum);
let teamHP = null;
if (teamTotalInfoDom) teamHP = refreshTeamTotalHP(teamTotalInfoDom, teamData, teamNum);
const teamTotalInfoCountDom = teamBigBox.querySelector(".team-total-info-count"); //队伍星级、属性、类型合计
if (teamTotalInfoCountDom) refreshTeamTotalCount(teamTotalInfoCountDom, teamData, teamNum);
@ -6651,7 +6652,7 @@ function refreshAll(formationData) {
if (teamAwokenDom) refreshTeamAwokenCount(teamAwokenDom, teamData);
const teamAwokenEffectDom = teamBigBox.querySelector(".team-awoken-effect"); //队伍觉醒效果计算
if (teamAwokenEffectDom) refreshTeamAwokenEfeect(teamAwokenEffectDom, teamData, teamNum);
if (teamAwokenEffectDom) refreshTeamAwokenEfeect(teamAwokenEffectDom, teamData, teamNum, { teamHP });
});
if (formationTotalInfoDom) refreshFormationTotalHP(formationTotalInfoDom, formation.teams);
@ -6710,7 +6711,7 @@ function refreshAll(formationData) {
}
//刷新队伍觉醒效果计算
function refreshTeamAwokenEfeect(awokenEffectDom, team, ti) {
function refreshTeamAwokenEfeect(awokenEffectDom, team, ti, option) {
const [members, assists, badge, swapId] = team;
let targetIcon;
//解析两个队长技
@ -6780,6 +6781,9 @@ function refreshTeamAwokenEfeect(awokenEffectDom, team, ti) {
}
}
targetValue.setAttribute(dataAttrName, count.bigNumberToString());
if (option.teamHP) {
targetValue.setAttribute("data-percent", (Math.floor(count / option.teamHP.tHP * 1000) / 10));
}
}
//颜色盾
@ -7445,6 +7449,7 @@ function drawHpInfo(hpBarDom, reduceAttrRanges)
function refreshTeamTotalHP(totalDom, team, teamIdx) {
//计算总的生命值
if (!totalDom) return;
const outdata = {};
const tHpDom = totalDom.querySelector(".tIf-total-hp");
const tSBDom = totalDom.querySelector(".tIf-total-skill-boost");
const tMoveDom = totalDom.querySelector(".tIf-total-move");
@ -7564,6 +7569,7 @@ function refreshTeamTotalHP(totalDom, team, teamIdx) {
setTextContentAndAttribute(tHpDom_reduce.querySelector(".reduce-scale"), (totalReduce * 100).toFixed(2));
setTextContentAndAttribute(tHpDom_reduce.querySelector(".general"), tReduceHP.bigNumberToString({sub: true}));
setTextContentAndAttribute(tHpDom_reduce.querySelector(".awoken-bind"), tReduceHPNoAwoken.bigNumberToString({sub: true}));
Object.assign(outdata,{tHP, tHPNoAwoken, totalReduce, tReduceHP, tReduceHPNoAwoken});
}
if (tSBDom) {
@ -7599,6 +7605,7 @@ function refreshTeamTotalHP(totalDom, team, teamIdx) {
if (badge == 22) effect.poisonNoEffect = true;
refreshEffectDom(tEffectDom, effect);
}
return outdata;
}
//刷新队伍能力值合计
function refreshTeamTotalCount(totalCountDom, team, teamIdx) {

View File

@ -47631,11 +47631,11 @@ const cachesMap = new Map([
],
[
"script-universal_function.js",
"d415679261b7c182cd1ecae2adb003a3"
"ecd23293d69eb2add579594e88c92208"
],
[
"script.js",
"23c0f5bf5991b3b5d2f2b0073120567b"
"bebb03c768d5baa9072452e98515a853"
],
[
"solo.html",
@ -47651,7 +47651,7 @@ const cachesMap = new Map([
],
[
"style.css",
"a6033f196d006d83c07fa431eb78d057"
"14b1c8955211c0a5e4ce0dbf30c25ee3"
],
[
"temp.js",

View File

@ -3372,6 +3372,10 @@ a.series-search::before {
{
content: attr(data-value)attr(data-postfix);
}
.team-awoken-effect .count[data-value][data-percent]::after
{
content: attr(data-value)attr(data-postfix)"("attr(data-percent)"%)";
}
.team-awoken-effect .prob[data-value]::before,
.team-awoken-effect .orb-list .prob[data-value]::before
{