将协力攻击排序,修改为计算觉醒的排序
This commit is contained in:
parent
f648ff3bfb
commit
4484316961
|
@ -12,12 +12,12 @@
|
|||
sort_cost: "Cost",
|
||||
sort_skillLv1: "Maximum Skill Turn",
|
||||
sort_skillLvMax: "Minimum Skill Turn",
|
||||
sort_hpMax110: "Max HP (Lv110)",
|
||||
sort_atkMax110: "Max ATK (Lv110)",
|
||||
sort_rcvMax110: "Max RCV (Lv110)",
|
||||
sort_hpMax110_Multi: "Max Multi HP (Lv110)",
|
||||
sort_atkMax110_Multi: "Max Multi ATK (Lv110)",
|
||||
sort_rcvMax110_Multi: "Max Multi RCV (Lv110)",
|
||||
sort_hpMax110: "Max HP",
|
||||
sort_atkMax110: "Max ATK",
|
||||
sort_rcvMax110: "Max RCV",
|
||||
sort_hpMax110_awoken: "Max HP (+Awoken)",
|
||||
sort_atkMax110_awoken: "Max ATK (+Awoken)",
|
||||
sort_rcvMax110_awoken: "Max RCV (+Awoken)",
|
||||
},
|
||||
force_reload_data: "Force refresh data",
|
||||
}
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
sort_cost: "コスト",
|
||||
sort_skillLv1: "最大スキルターン",
|
||||
sort_skillLvMax: "最小スキルターン",
|
||||
sort_hpMax110: "最大 HP (Lv110)",
|
||||
sort_atkMax110: "最大攻撃 (Lv110)",
|
||||
sort_rcvMax110: "最大回復 (Lv110)",
|
||||
sort_hpMax110_Multi: "最大協力 HP (Lv110)",
|
||||
sort_atkMax110_Multi: "最大協力攻撃 (Lv110)",
|
||||
sort_rcvMax110_Multi: "最大協力回復 (Lv110)",
|
||||
sort_hpMax110: "最大 HP",
|
||||
sort_atkMax110: "最大攻撃",
|
||||
sort_rcvMax110: "最大回復",
|
||||
sort_hpMax110_awoken: "最大 HP (+覚醒)",
|
||||
sort_atkMax110_awoken: "最大攻撃 (+覚醒)",
|
||||
sort_rcvMax110_awoken: "最大回復 (+覚醒)",
|
||||
},
|
||||
force_reload_data: "データの強制更新",
|
||||
}
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
sort_cost: "비용",
|
||||
sort_skillLv1: "최대 스킬 턴",
|
||||
sort_skillLvMax: "최소 스킬 턴",
|
||||
sort_hpMax110: "최대 HP (Lv110)",
|
||||
sort_atkMax110: "최대 공격 (Lv110)",
|
||||
sort_rcvMax110: "최대 회복 (Lv110)",
|
||||
sort_hpMax110_Multi: "최대 멀티 HP (Lv110)",
|
||||
sort_atkMax110_Multi: "최대 멀티 공격 (Lv110)",
|
||||
sort_rcvMax110_Multi: "최대 멀티 회복 (Lv110)",
|
||||
sort_hpMax110: "최대 HP",
|
||||
sort_atkMax110: "최대 공격",
|
||||
sort_rcvMax110: "최대 회복",
|
||||
sort_hpMax110_awoken: "최대 HP (+각성)",
|
||||
sort_atkMax110_awoken: "최대 공격 (+각성)",
|
||||
sort_rcvMax110_awoken: "최대 회복 (+각성)",
|
||||
},
|
||||
force_reload_data: "데이터 강제 새로 고침",
|
||||
}
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
sort_cost: "消耗",
|
||||
sort_skillLv1: "技能最大冷卻時間",
|
||||
sort_skillLvMax: "技能最小冷卻時間",
|
||||
sort_hpMax110: "最大 HP(Lv110)",
|
||||
sort_atkMax110: "最大攻擊(Lv110)",
|
||||
sort_rcvMax110: "最大回復(Lv110)",
|
||||
sort_hpMax110_Multi: "最大協力 HP(Lv110)",
|
||||
sort_atkMax110_Multi: "最大協力攻擊(Lv110)",
|
||||
sort_rcvMax110_Multi: "最大協力回復(Lv110)",
|
||||
sort_hpMax110: "最大 HP",
|
||||
sort_atkMax110: "最大攻擊",
|
||||
sort_rcvMax110: "最大回復",
|
||||
sort_hpMax110_awoken: "最大 HP(+覺醒)",
|
||||
sort_atkMax110_awoken: "最大攻擊(+覺醒)",
|
||||
sort_rcvMax110_awoken: "最大回復(+覺醒)",
|
||||
},
|
||||
force_reload_data: "強制刷新數據",
|
||||
}
|
||||
|
|
|
@ -74,22 +74,32 @@ const sort_function_list = [
|
|||
{tag:"sort_hpMax110",name:"最大HP(Lv110)",function:(a,b)=>a.hp.max * (1 + a.limitBreakIncr/100) - b.hp.max * (1 + b.limitBreakIncr/100)},
|
||||
{tag:"sort_atkMax110",name:"最大攻击(Lv110)",function:(a,b)=>a.atk.max * (1 + a.limitBreakIncr/100) - b.atk.max * (1 + b.limitBreakIncr/100)},
|
||||
{tag:"sort_rcvMax110",name:"最大回复(Lv110)",function:(a,b)=>a.rcv.max * (1 + a.limitBreakIncr/100) - b.rcv.max * (1 + b.limitBreakIncr/100)},
|
||||
];
|
||||
if (!solo)
|
||||
{
|
||||
const multiSort = [
|
||||
{tag:"sort_hpMax110_Multi",name:"最大协力攻击(Lv110+297)",function:(a,b)=>
|
||||
(a.atk.max * (1 + a.limitBreakIncr/100) + ((a.overlay || a.types[0] == 15 && a.types[1] == -1) ? 0 : 495)) * Math.pow(1.5, a.awakenings.filter(ak=>ak===30).length) -
|
||||
(b.atk.max * (1 + b.limitBreakIncr/100) + ((b.overlay || b.types[0] == 15 && b.types[1] == -1) ? 0 : 495)) * Math.pow(1.5, b.awakenings.filter(ak=>ak===30).length)
|
||||
},
|
||||
{tag:"sort_hpMax110_Multi",name:"最大协力HP(Lv110+297)",function:(a,b)=>
|
||||
(a.hp.max * (1 + a.limitBreakIncr/100) + ((a.overlay || a.types[0] == 15 && a.types[1] == -1) ? 0 : 990)) * Math.pow(1.5, a.awakenings.filter(ak=>ak===30).length) -
|
||||
(b.hp.max * (1 + b.limitBreakIncr/100) + ((b.overlay || b.types[0] == 15 && b.types[1] == -1) ? 0 : 990)) * Math.pow(1.5, b.awakenings.filter(ak=>ak===30).length)
|
||||
},
|
||||
{tag:"sort_hpMax110_Multi",name:"最大协力回复(Lv110+297)",function:(a,b)=>
|
||||
(a.rcv.max * (1 + a.limitBreakIncr/100) + ((a.overlay || a.types[0] == 15 && a.types[1] == -1) ? 0 : 297)) * Math.pow(1.5, a.awakenings.filter(ak=>ak===30).length) -
|
||||
(b.rcv.max * (1 + b.limitBreakIncr/100) + ((b.overlay || b.types[0] == 15 && b.types[1] == -1) ? 0 : 297)) * Math.pow(1.5, b.awakenings.filter(ak=>ak===30).length)
|
||||
},
|
||||
];
|
||||
sort_function_list.push(...multiSort);
|
||||
}
|
||||
|
||||
{tag:"sort_hpMax110_awoken",name:"最大攻击(Lv110+觉醒)",function:(a,b)=>
|
||||
{
|
||||
const abilities_2statusA = calculateAbility_max(a.id, solo, teamsCount),
|
||||
abilities_2statusB = calculateAbility_max(b.id, solo, teamsCount);
|
||||
const abA = abilities_2statusA ? abilities_2statusA.withAwoken.atk : 0,
|
||||
abB = abilities_2statusB ? abilities_2statusB.withAwoken.atk : 0;
|
||||
return abA - abB;
|
||||
}
|
||||
},
|
||||
{tag:"sort_hpMax110_awoken",name:"最大HP(Lv110+觉醒)",function:(a,b)=>
|
||||
{
|
||||
const abilities_2statusA = calculateAbility_max(a.id, solo, teamsCount),
|
||||
abilities_2statusB = calculateAbility_max(b.id, solo, teamsCount);
|
||||
const abA = abilities_2statusA ? abilities_2statusA.withAwoken.hp : 0,
|
||||
abB = abilities_2statusB ? abilities_2statusB.withAwoken.hp : 0;
|
||||
return abA - abB;
|
||||
}
|
||||
},
|
||||
{tag:"sort_hpMax110_awoken",name:"最大回复(Lv110+觉醒)",function:(a,b)=>
|
||||
{
|
||||
const abilities_2statusA = calculateAbility_max(a.id, solo, teamsCount),
|
||||
abilities_2statusB = calculateAbility_max(b.id, solo, teamsCount);
|
||||
const abA = abilities_2statusA ? abilities_2statusA.withAwoken.rcv : 0,
|
||||
abB = abilities_2statusB ? abilities_2statusB.withAwoken.rcv : 0;
|
||||
return abA - abB;
|
||||
}
|
||||
},
|
||||
];
|
|
@ -333,6 +333,35 @@ function calculateAbility(member, assist = null, solo = true, teamsCount = 1)
|
|||
});
|
||||
return abilitys;
|
||||
}
|
||||
function calculateAbility_max(id,solo, teamsCount)
|
||||
{
|
||||
const card = Cards[id];
|
||||
const tempMon = {
|
||||
id: id,
|
||||
level: card.maxLevel + (card.limitBreakIncr ? 11 : 0),
|
||||
plus: [99,99,99],
|
||||
awoken: card.awakenings.length,
|
||||
};
|
||||
const abilities = calculateAbility(tempMon, null, solo, teamsCount);
|
||||
if (abilities)
|
||||
{
|
||||
return {
|
||||
noAwoken:{
|
||||
hp:abilities[0][1],
|
||||
atk:abilities[1][1],
|
||||
rcv:abilities[2][1],
|
||||
},
|
||||
withAwoken:{
|
||||
hp:abilities[0][0],
|
||||
atk:abilities[1][0],
|
||||
rcv:abilities[2][0],
|
||||
},
|
||||
};
|
||||
}else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
//搜索卡片用
|
||||
function searchCards(cards,attr1,attr2,fixMainColor,types,typeAndOr,awokens,sawokens,equalAk,incSawoken)
|
||||
{
|
||||
|
@ -653,11 +682,11 @@ function countMoveTime(team, leader1id, leader2id, teamIdx)
|
|||
}
|
||||
|
||||
//徽章部分
|
||||
if (team[2] == 1 && (solo || teamsCount === 3)) {
|
||||
moveTime.duration += 1;
|
||||
} else if (team[2] == 13 && (solo || teamsCount === 3)) {
|
||||
moveTime.duration += 2;
|
||||
}
|
||||
if (team[2] == 1 && (solo || teamsCount === 3)) {
|
||||
moveTime.duration += 1;
|
||||
} else if (team[2] == 13 && (solo || teamsCount === 3)) {
|
||||
moveTime.duration += 2;
|
||||
}
|
||||
|
||||
//觉醒
|
||||
const awokenMoveTime = [
|
||||
|
|
50
script.js
50
script.js
|
@ -978,42 +978,36 @@ function initialize() {
|
|||
}
|
||||
if (options.showAbilities || options.showAbilitiesWithAwoken)
|
||||
{
|
||||
const tempMon = {
|
||||
id: id,
|
||||
level: card.maxLevel + (card.limitBreakIncr ? 11 : 0),
|
||||
plus: [99,99,99],
|
||||
awoken: card.awakenings.length,
|
||||
};
|
||||
const abilities = calculateAbility(tempMon, null, solo, teamsCount);
|
||||
if (options.showAbilities && abilities)
|
||||
const abilities_2status = calculateAbility_max(id, solo, teamsCount);
|
||||
if (options.showAbilities && abilities_2status)
|
||||
{
|
||||
const abilitiesPreview1 = cli.appendChild(document.createElement("ul"));
|
||||
abilitiesPreview1.className = "abilities-preview";
|
||||
const abilities1 = abilities.map(ab=>ab[1]);
|
||||
const hpDom = abilitiesPreview1.appendChild(document.createElement("li"));
|
||||
const abilitiesPreview = cli.appendChild(document.createElement("ul"));
|
||||
abilitiesPreview.className = "abilities-preview";
|
||||
const abilities = abilities_2status.noAwoken;
|
||||
const hpDom = abilitiesPreview.appendChild(document.createElement("li"));
|
||||
hpDom.className = "hp-preview";
|
||||
hpDom.textContent = abilities1[0];
|
||||
const atkDom = abilitiesPreview1.appendChild(document.createElement("li"));
|
||||
hpDom.textContent = abilities.hp;
|
||||
const atkDom = abilitiesPreview.appendChild(document.createElement("li"));
|
||||
atkDom.className = "atk-preview";
|
||||
atkDom.textContent = abilities1[1];
|
||||
const rcvDom = abilitiesPreview1.appendChild(document.createElement("li"));
|
||||
atkDom.textContent = abilities.atk;
|
||||
const rcvDom = abilitiesPreview.appendChild(document.createElement("li"));
|
||||
rcvDom.className = "rcv-preview";
|
||||
rcvDom.textContent = abilities1[2];
|
||||
}
|
||||
if (options.showAbilitiesWithAwoken && abilities)
|
||||
rcvDom.textContent = abilities.rcv;
|
||||
}
|
||||
if (options.showAbilitiesWithAwoken && abilities_2status)
|
||||
{
|
||||
const abilitiesPreview2 = cli.appendChild(document.createElement("ul"));
|
||||
abilitiesPreview2.className = "abilities-with-awoken-preview";
|
||||
const abilities2 = abilities.map(ab=>ab[0]);
|
||||
const hpDom = abilitiesPreview2.appendChild(document.createElement("li"));
|
||||
const abilitiesPreview = cli.appendChild(document.createElement("ul"));
|
||||
abilitiesPreview.className = "abilities-with-awoken-preview";
|
||||
const abilities = abilities_2status.withAwoken;
|
||||
const hpDom = abilitiesPreview.appendChild(document.createElement("li"));
|
||||
hpDom.className = "hp-preview";
|
||||
hpDom.textContent = abilities2[0];
|
||||
const atkDom = abilitiesPreview2.appendChild(document.createElement("li"));
|
||||
hpDom.textContent = abilities.hp;
|
||||
const atkDom = abilitiesPreview.appendChild(document.createElement("li"));
|
||||
atkDom.className = "atk-preview";
|
||||
atkDom.textContent = abilities2[1];
|
||||
const rcvDom = abilitiesPreview2.appendChild(document.createElement("li"));
|
||||
atkDom.textContent = abilities.atk;
|
||||
const rcvDom = abilitiesPreview.appendChild(document.createElement("li"));
|
||||
rcvDom.className = "rcv-preview";
|
||||
rcvDom.textContent = abilities2[2];
|
||||
rcvDom.textContent = abilities.rcv;
|
||||
}
|
||||
}
|
||||
if (options.showAwoken)
|
||||
|
|
Loading…
Reference in New Issue