增加层数的计算
This commit is contained in:
parent
13ae082984
commit
ca38f01733
|
@ -692,11 +692,19 @@ label[for="qr-data-type-paddb"]::before
|
||||||
}
|
}
|
||||||
.dialog-dungeon-enchance .collab-list::before
|
.dialog-dungeon-enchance .collab-list::before
|
||||||
{
|
{
|
||||||
content: "Collab ID:";
|
content: "Collab ID:";
|
||||||
}
|
}
|
||||||
.dialog-dungeon-enchance .gacha-list::before
|
.dialog-dungeon-enchance .gacha-list::before
|
||||||
{
|
{
|
||||||
content: "Egg Machine ID:";
|
content: "Egg Machine ID:";
|
||||||
|
}
|
||||||
|
.dialog-dungeon-enchance .benefit-list::before
|
||||||
|
{
|
||||||
|
content: "Yin-Yang Protection:";
|
||||||
|
}
|
||||||
|
.dialog-dungeon-enchance .current-stage-list::before
|
||||||
|
{
|
||||||
|
content: "Current Stage:";
|
||||||
}
|
}
|
||||||
.dialog-dungeon-enchance .collab-list::after,
|
.dialog-dungeon-enchance .collab-list::after,
|
||||||
.dialog-dungeon-enchance .gacha-list::after
|
.dialog-dungeon-enchance .gacha-list::after
|
||||||
|
|
|
@ -642,19 +642,27 @@ label[for="qr-data-type-paddb"]::before
|
||||||
}
|
}
|
||||||
.dialog-dungeon-enchance .attr-list::before
|
.dialog-dungeon-enchance .attr-list::before
|
||||||
{
|
{
|
||||||
content: "有効な属性:";
|
content: "有効な属性:";
|
||||||
}
|
}
|
||||||
.dialog-dungeon-enchance .type-list::before
|
.dialog-dungeon-enchance .type-list::before
|
||||||
{
|
{
|
||||||
content: "有効なタイプ:";
|
content: "有効なタイプ:";
|
||||||
}
|
}
|
||||||
.dialog-dungeon-enchance .collab-list::before
|
.dialog-dungeon-enchance .collab-list::before
|
||||||
{
|
{
|
||||||
content: "有効コラボID:";
|
content: "有効コラボID:";
|
||||||
}
|
}
|
||||||
.dialog-dungeon-enchance .gacha-list::before
|
.dialog-dungeon-enchance .gacha-list::before
|
||||||
{
|
{
|
||||||
content: "有効ガチャID:";
|
content: "有効ガチャID:";
|
||||||
|
}
|
||||||
|
.dialog-dungeon-enchance .benefit-list::before
|
||||||
|
{
|
||||||
|
content: "陰と陽の加護:";
|
||||||
|
}
|
||||||
|
.dialog-dungeon-enchance .current-stage-list::before
|
||||||
|
{
|
||||||
|
content: "現在の層数:";
|
||||||
}
|
}
|
||||||
.dialog-dungeon-enchance .collab-list::after,
|
.dialog-dungeon-enchance .collab-list::after,
|
||||||
.dialog-dungeon-enchance .gacha-list::after
|
.dialog-dungeon-enchance .gacha-list::after
|
||||||
|
|
|
@ -630,11 +630,19 @@ label[for="qr-data-type-paddb"]::before
|
||||||
}
|
}
|
||||||
.dialog-dungeon-enchance .collab-list::before
|
.dialog-dungeon-enchance .collab-list::before
|
||||||
{
|
{
|
||||||
content: "유효한 콜라보 ID:";
|
content: "유효한 콜라보 ID:";
|
||||||
}
|
}
|
||||||
.dialog-dungeon-enchance .gacha-list::before
|
.dialog-dungeon-enchance .gacha-list::before
|
||||||
{
|
{
|
||||||
content: "유효한 가챠 ID:";
|
content: "유효한 가챠 ID:";
|
||||||
|
}
|
||||||
|
.dialog-dungeon-enchance .benefit-list::before
|
||||||
|
{
|
||||||
|
content: "음과 양 보호:";
|
||||||
|
}
|
||||||
|
.dialog-dungeon-enchance .current-stage-list::before
|
||||||
|
{
|
||||||
|
content: "현재 단계:";
|
||||||
}
|
}
|
||||||
.dialog-dungeon-enchance .collab-list::after,
|
.dialog-dungeon-enchance .collab-list::after,
|
||||||
.dialog-dungeon-enchance .gacha-list::after
|
.dialog-dungeon-enchance .gacha-list::after
|
||||||
|
|
|
@ -648,6 +648,14 @@ label[for="qr-data-type-paddb"]::before
|
||||||
{
|
{
|
||||||
content: "生效抽蛋ID:";
|
content: "生效抽蛋ID:";
|
||||||
}
|
}
|
||||||
|
.dialog-dungeon-enchance .benefit-list::before
|
||||||
|
{
|
||||||
|
content: "生效陰陽:";
|
||||||
|
}
|
||||||
|
.dialog-dungeon-enchance .current-stage-list::before
|
||||||
|
{
|
||||||
|
content: "当前層数:";
|
||||||
|
}
|
||||||
.dialog-dungeon-enchance .collab-list::after,
|
.dialog-dungeon-enchance .collab-list::after,
|
||||||
.dialog-dungeon-enchance .gacha-list::after
|
.dialog-dungeon-enchance .gacha-list::after
|
||||||
{
|
{
|
||||||
|
|
|
@ -228,6 +228,7 @@ const _localTranslating = {
|
||||||
teamatk: tp`隊伍${'attrs'}總攻擊力`,
|
teamatk: tp`隊伍${'attrs'}總攻擊力`,
|
||||||
teamrcv: tp`隊伍回復力`,
|
teamrcv: tp`隊伍回復力`,
|
||||||
cstage: tp`當前地下城層數`,
|
cstage: tp`當前地下城層數`,
|
||||||
|
state_is: tp`${'state'}:${'num'}`,
|
||||||
},
|
},
|
||||||
unit: {
|
unit: {
|
||||||
orbs: tp`個`,
|
orbs: tp`個`,
|
||||||
|
|
|
@ -651,6 +651,10 @@ label[for="qr-data-type-paddb"]::before
|
||||||
{
|
{
|
||||||
content: "生效陰陽:";
|
content: "生效陰陽:";
|
||||||
}
|
}
|
||||||
|
.dialog-dungeon-enchance .current-stage-list::before
|
||||||
|
{
|
||||||
|
content: "当前層数:";
|
||||||
|
}
|
||||||
.dialog-dungeon-enchance .collab-list::after,
|
.dialog-dungeon-enchance .collab-list::after,
|
||||||
.dialog-dungeon-enchance .gacha-list::after
|
.dialog-dungeon-enchance .gacha-list::after
|
||||||
{
|
{
|
||||||
|
|
|
@ -228,6 +228,7 @@ const _localTranslating = {
|
||||||
teamatk: tp`队伍${'attrs'}总攻击力`,
|
teamatk: tp`队伍${'attrs'}总攻击力`,
|
||||||
teamrcv: tp`队伍回复力`,
|
teamrcv: tp`队伍回复力`,
|
||||||
cstage: tp`当前地下城层数`,
|
cstage: tp`当前地下城层数`,
|
||||||
|
state_is: tp`${'state'}:${'num'}`,
|
||||||
},
|
},
|
||||||
unit: {
|
unit: {
|
||||||
orbs: tp`个`,
|
orbs: tp`个`,
|
||||||
|
|
|
@ -1546,6 +1546,9 @@ const teamsCount = 2;
|
||||||
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="2" id="dungeon-benefit-2" /><label class="awoken-icon" data-awoken-icon="129" for="dungeon-benefit-2"></label></li><!--阴-->
|
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="2" id="dungeon-benefit-2" /><label class="awoken-icon" data-awoken-icon="129" for="dungeon-benefit-2"></label></li><!--阴-->
|
||||||
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="3" id="dungeon-benefit-3" /><label class="awoken-icon yinyang" data-awoken-icon="128" for="dungeon-benefit-3"></label></li><!--阴阳-->
|
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="3" id="dungeon-benefit-3" /><label class="awoken-icon yinyang" data-awoken-icon="128" for="dungeon-benefit-3"></label></li><!--阴阳-->
|
||||||
</ul>
|
</ul>
|
||||||
|
<ul class="current-stage-list"><!--当前层数-->
|
||||||
|
<li><label for="current-stage"></label><input id="current-stage" type="number" min="1" step="1" /></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="dialog-control"><button class="dialog-clear brown-button"></button><button class="dialog-close brown-button"></button><button class="dialog-confirm brown-button"></button></div>
|
<div class="dialog-control"><button class="dialog-clear brown-button"></button><button class="dialog-close brown-button"></button><button class="dialog-confirm brown-button"></button></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -242,6 +242,7 @@ let localTranslating = {
|
||||||
teamatk: tp`Team ${'attrs'} ATK`,
|
teamatk: tp`Team ${'attrs'} ATK`,
|
||||||
teamrcv: tp`Team RCV`,
|
teamrcv: tp`Team RCV`,
|
||||||
cstage: tp`current Stage of Dungeon`,
|
cstage: tp`current Stage of Dungeon`,
|
||||||
|
state_is: tp`${'state'}: ${'num'}`,
|
||||||
},
|
},
|
||||||
unit: {
|
unit: {
|
||||||
orbs: tp``,
|
orbs: tp``,
|
||||||
|
@ -453,8 +454,9 @@ let localTranslating = {
|
||||||
[125]: tp`${'icon'}Enhanced Dark Combos+`,
|
[125]: tp`${'icon'}Enhanced Dark Combos+`,
|
||||||
[126]: tp`${'icon'}[T] Increased Attack`,
|
[126]: tp`${'icon'}[T] Increased Attack`,
|
||||||
[127]: tp`${'icon'}Enhanced Stats`,
|
[127]: tp`${'icon'}Enhanced Stats`,
|
||||||
[128]: tp`${'icon'}Benefits of the Yang`,
|
[128]: tp`${'icon'}Yang Protection`,
|
||||||
[129]: tp`${'icon'}Benefits of the Yin`,
|
[129]: tp`${'icon'}Yin Protection`,
|
||||||
|
[130]: tp`${'icon'}After-Ripening`,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -554,7 +556,7 @@ const official_awoken_sorting = [
|
||||||
121,122,123,124,125, 39, 40, 41, 42,
|
121,122,123,124,125, 39, 40, 41, 42,
|
||||||
91, 92, 93, 94, 95, 65, 66, 67,105,
|
91, 92, 93, 94, 95, 65, 66, 67,105,
|
||||||
84, 83, 85, 86, 87, 88, 89, 90, 64,
|
84, 83, 85, 86, 87, 88, 89, 90, 64,
|
||||||
63,128,129
|
63,128,129,130
|
||||||
];
|
];
|
||||||
const PAD_PASS_BADGE = 1<<7 | 1; //本程序的月卡徽章编号,129
|
const PAD_PASS_BADGE = 1<<7 | 1; //本程序的月卡徽章编号,129
|
||||||
|
|
||||||
|
|
|
@ -2977,12 +2977,18 @@ function renderCondition(cond) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'series':{
|
case 'series':{
|
||||||
|
//搜索并显示合作
|
||||||
|
function searchCollab(event) {
|
||||||
|
const collabId = parseInt(this.getAttribute('data-collabId'), 10);
|
||||||
|
showSearchBySeriesId(collabId, "collab");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
dict.ids = cond.compo.ids.map(cid=>{
|
dict.ids = cond.compo.ids.map(cid=>{
|
||||||
const lnk = document.createElement("a");
|
const lnk = document.createElement("a");
|
||||||
lnk.className ="detail-search monster-collabId";
|
lnk.className ="series-search card-collabId";
|
||||||
lnk.setAttribute("data-collabId",cid);
|
lnk.setAttribute("data-collabId",cid);
|
||||||
lnk.onclick = searchCollab;
|
lnk.onclick = searchCollab;
|
||||||
lnk.textContent = (cid == 10001 ? Cards[5435] : Cards.find(card=>card.collabId == cid))?.altName?.[0] ?? `No.${cid}`;
|
lnk.textContent = cid;
|
||||||
return lnk;
|
return lnk;
|
||||||
}).nodeJoin(tsp.word.slight_pause());
|
}).nodeJoin(tsp.word.slight_pause());
|
||||||
frg.ap(tsp.cond.compo_type_series(dict));
|
frg.ap(tsp.cond.compo_type_series(dict));
|
||||||
|
@ -2991,7 +2997,7 @@ function renderCondition(cond) {
|
||||||
case 'evolution':{
|
case 'evolution':{
|
||||||
dict.ids = cond.compo.ids.map(type=>{
|
dict.ids = cond.compo.ids.map(type=>{
|
||||||
const lnk = document.createElement("a");
|
const lnk = document.createElement("a");
|
||||||
lnk.className ="detail-search";
|
lnk.className ="series-search";
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case "pixel-evo":{ //像素进化
|
case "pixel-evo":{ //像素进化
|
||||||
|
|
|
@ -747,10 +747,21 @@ function calculateAbility(member, assist = null, solo = true, teamsCount = 1) {
|
||||||
if (dge.benefit) { //当存在加护
|
if (dge.benefit) { //当存在加护
|
||||||
const benefitAwokens = [128 , 129]; //0b1是阳,0b10是阴,可以两者都强化
|
const benefitAwokens = [128 , 129]; //0b1是阳,0b10是阴,可以两者都强化
|
||||||
flags(dge.benefit).forEach(idx=>{
|
flags(dge.benefit).forEach(idx=>{
|
||||||
const benefitAwoken = benefitAwokens[idx]; //得到加护觉醒编号
|
const akId = benefitAwokens[idx]; //得到加护觉醒编号
|
||||||
latterAwokenScale[0].push({ index: benefitAwoken, scale: 1.2 }); //HP
|
latterAwokenScale[0].push({ index: akId, scale: 1.2 }); //HP
|
||||||
latterAwokenScale[1].push({ index: benefitAwoken, scale: 5 }); //ATK
|
latterAwokenScale[1].push({ index: akId, scale: 5 }); //ATK
|
||||||
latterAwokenScale[2].push({ index: benefitAwoken, scale: 1.2 }); //RCV
|
latterAwokenScale[2].push({ index: akId, scale: 1.2 }); //RCV
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dge.stage > 1) { //当存在地下城层数
|
||||||
|
let scale = 1;
|
||||||
|
if (dge.stage>=10) scale = 2;
|
||||||
|
else if (dge.stage>=5) scale = 1.5;
|
||||||
|
|
||||||
|
const akId = 130; //130号熟成觉醒
|
||||||
|
latterAwokenScale.forEach(ab => {
|
||||||
|
ab.push({ index: akId, scale: scale });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1040,12 +1051,26 @@ function changeToIdInSkillDetail(event) {
|
||||||
monstersID.onchange();
|
monstersID.onchange();
|
||||||
return false; //取消链接的默认操作
|
return false; //取消链接的默认操作
|
||||||
}
|
}
|
||||||
//搜索并显示合作
|
|
||||||
function searchCollab(event) {
|
function showSearchBySeriesId(sId, sType) {
|
||||||
const collabId = parseInt(this.getAttribute('data-collabId'), 10);
|
showSearch(searchBySeriesId(sId, sType));
|
||||||
showSearch(Cards.filter(card => card.collabId == collabId));
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
function searchBySeriesId(sId, sType) {
|
||||||
|
if (!Number.isInteger(sId)) sId = parseInt(sId, 10);
|
||||||
|
switch (sType) {
|
||||||
|
case "collab": {//合作
|
||||||
|
return Cards.filter(card => card.collabId == sId);
|
||||||
|
}
|
||||||
|
case "gacha": {//桶
|
||||||
|
return Cards.filter(card => card.gachaId == sId);
|
||||||
|
}
|
||||||
|
case "series":
|
||||||
|
default: { //系列
|
||||||
|
return Cards.filter(card => card.seriesId == sId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//创建序号类图标
|
//创建序号类图标
|
||||||
function createIndexedIcon(type, index) {
|
function createIndexedIcon(type, index) {
|
||||||
if (type == 'card') {//卡片头像
|
if (type == 'card') {//卡片头像
|
||||||
|
|
114
script.js
114
script.js
|
@ -352,10 +352,11 @@ Formation.prototype.outObj = function() {
|
||||||
return teamArr;
|
return teamArr;
|
||||||
});
|
});
|
||||||
let dge = this.dungeonEnchance;
|
let dge = this.dungeonEnchance;
|
||||||
if (Object.values(dge.rate).some(rate => rate != 1) || dge.benefit) obj.r = [
|
if (Object.values(dge.rate).some(rate => rate != 1) || dge.benefit || dge.stage>1) obj.r = [
|
||||||
[reflags(dge.types),reflags(dge.attrs),reflags(dge.rarities),dge.collabs.length ? dge.collabs : 0,dge.gachas.length ? dge.gachas : 0].deleteLatter(0), //类型,属性,星级
|
[reflags(dge.types),reflags(dge.attrs),reflags(dge.rarities),dge.collabs.length ? dge.collabs : 0,dge.gachas.length ? dge.gachas : 0].deleteLatter(0), //类型,属性,星级
|
||||||
[dge.rate.hp,dge.rate.atk,dge.rate.rcv].deleteLatter(1),
|
[dge.rate.hp,dge.rate.atk,dge.rate.rcv].deleteLatter(1),
|
||||||
dge.benefit || 0 //地下城阴阳加护
|
dge.benefit || 0, //地下城阴阳加护
|
||||||
|
dge.stage || 1 //地下城层数
|
||||||
];
|
];
|
||||||
obj.v = dataStructure;
|
obj.v = dataStructure;
|
||||||
/*if (obj.f.every(team=>team[0].length == 0 && team[1].length == 0 && team[2] == undefined) &&
|
/*if (obj.f.every(team=>team[0].length == 0 && team[1].length == 0 && team[2] == undefined) &&
|
||||||
|
@ -387,6 +388,7 @@ Formation.prototype.loadObj = function(f) {
|
||||||
dge.rate.atk = 1;
|
dge.rate.atk = 1;
|
||||||
dge.rate.rcv = 1;
|
dge.rate.rcv = 1;
|
||||||
dge.benefit = 0;
|
dge.benefit = 0;
|
||||||
|
dge.stage = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const dataVeision = f?.v ?? (f.f ? 2 : 1); //是第几版格式
|
const dataVeision = f?.v ?? (f.f ? 2 : 1); //是第几版格式
|
||||||
|
@ -441,7 +443,7 @@ Formation.prototype.loadObj = function(f) {
|
||||||
if (f.r)
|
if (f.r)
|
||||||
{
|
{
|
||||||
if (Array.isArray(f.r[0])) {
|
if (Array.isArray(f.r[0])) {
|
||||||
const [[types, attrs, rarities, collabs, gachas] = [], [hp , atk, rcv] = [], benefit] = f.r;
|
const [[types, attrs, rarities, collabs, gachas] = [], [hp , atk, rcv] = [], benefit, stage] = f.r;
|
||||||
|
|
||||||
dge.types = flags(types ?? 0);
|
dge.types = flags(types ?? 0);
|
||||||
dge.attrs = flags(attrs ?? 0);
|
dge.attrs = flags(attrs ?? 0);
|
||||||
|
@ -454,6 +456,7 @@ Formation.prototype.loadObj = function(f) {
|
||||||
dge.rate.rcv = rcv ?? 1;
|
dge.rate.rcv = rcv ?? 1;
|
||||||
|
|
||||||
dge.benefit = benefit || 0;
|
dge.benefit = benefit || 0;
|
||||||
|
dge.stage = stage || 1;
|
||||||
} else {
|
} else {
|
||||||
dge.attrs = flags(f.r[0] ?? 0);
|
dge.attrs = flags(f.r[0] ?? 0);
|
||||||
dge.types = flags(f.r[1] ?? 0);
|
dge.types = flags(f.r[1] ?? 0);
|
||||||
|
@ -3221,6 +3224,7 @@ function initialize() {
|
||||||
const gachaIdIpt = dialogContent.querySelector("#dungeon-gacha-id");
|
const gachaIdIpt = dialogContent.querySelector("#dungeon-gacha-id");
|
||||||
const benefitDoms = Array.from(dialogContent.querySelectorAll(".benefit-list .benefit-check"));
|
const benefitDoms = Array.from(dialogContent.querySelectorAll(".benefit-list .benefit-check"));
|
||||||
const benefit0 = benefitDoms.find(dom=>parseInt(dom.value, 10) == 0);
|
const benefit0 = benefitDoms.find(dom=>parseInt(dom.value, 10) == 0);
|
||||||
|
const currentStageIpt = dialogContent.querySelector("#current-stage");
|
||||||
/*const benefitNot0 = benefitDoms.filter(dom=>dom != benefit0);
|
/*const benefitNot0 = benefitDoms.filter(dom=>dom != benefit0);
|
||||||
const notChecked = function(e){
|
const notChecked = function(e){
|
||||||
console.log(this.checked,e);
|
console.log(this.checked,e);
|
||||||
|
@ -3236,8 +3240,6 @@ function initialize() {
|
||||||
attrDoms.forEach(runCheck,dge.attrs);
|
attrDoms.forEach(runCheck,dge.attrs);
|
||||||
typeDoms.forEach(runCheck,dge.types);
|
typeDoms.forEach(runCheck,dge.types);
|
||||||
gachaIdIpt.value = dge.gachas.join();
|
gachaIdIpt.value = dge.gachas.join();
|
||||||
const benefit = dge.benefit || 0;
|
|
||||||
benefitDoms.find(dom=>parseInt(dom.value, 10) == benefit).checked = true;
|
|
||||||
collabIdIpt.value = dge.collabs.join();
|
collabIdIpt.value = dge.collabs.join();
|
||||||
|
|
||||||
const {hp, atk, rcv} = dge.rate;
|
const {hp, atk, rcv} = dge.rate;
|
||||||
|
@ -3245,6 +3247,10 @@ function initialize() {
|
||||||
dialogContent.querySelector("#dungeon-atk").value = atk;
|
dialogContent.querySelector("#dungeon-atk").value = atk;
|
||||||
dialogContent.querySelector("#dungeon-rcv").value = rcv;
|
dialogContent.querySelector("#dungeon-rcv").value = rcv;
|
||||||
|
|
||||||
|
const benefit = dge.benefit || 0;
|
||||||
|
benefitDoms.find(dom=>parseInt(dom.value, 10) == benefit).checked = true;
|
||||||
|
currentStageIpt.value = dge.stage || 1;
|
||||||
|
|
||||||
this.classList.remove(className_displayNone);
|
this.classList.remove(className_displayNone);
|
||||||
}
|
}
|
||||||
//初始化Dialog
|
//初始化Dialog
|
||||||
|
@ -3266,6 +3272,7 @@ function initialize() {
|
||||||
dge.collabs = collabIdIpt.value.split(',').map(str=>parseInt(str,10)).filter(Boolean);
|
dge.collabs = collabIdIpt.value.split(',').map(str=>parseInt(str,10)).filter(Boolean);
|
||||||
dge.gachas = gachaIdIpt.value.split(',').map(str=>parseInt(str,10)).filter(Boolean);
|
dge.gachas = gachaIdIpt.value.split(',').map(str=>parseInt(str,10)).filter(Boolean);
|
||||||
dge.benefit = benefit;
|
dge.benefit = benefit;
|
||||||
|
dge.stage = parseInt(currentStageIpt.value, 10);
|
||||||
|
|
||||||
dungeonEnchanceDialog.close();
|
dungeonEnchanceDialog.close();
|
||||||
createNewUrl();
|
createNewUrl();
|
||||||
|
@ -3285,6 +3292,7 @@ function initialize() {
|
||||||
dialogContent.querySelector("#dungeon-hp").value = 1;
|
dialogContent.querySelector("#dungeon-hp").value = 1;
|
||||||
dialogContent.querySelector("#dungeon-atk").value = 1;
|
dialogContent.querySelector("#dungeon-atk").value = 1;
|
||||||
dialogContent.querySelector("#dungeon-rcv").value = 1;
|
dialogContent.querySelector("#dungeon-rcv").value = 1;
|
||||||
|
currentStageIpt.value = 1;
|
||||||
};
|
};
|
||||||
const dungeonEnchanceDialogOpen = controlBox.querySelector("#btn-set-dungeon-enchance");
|
const dungeonEnchanceDialogOpen = controlBox.querySelector("#btn-set-dungeon-enchance");
|
||||||
dungeonEnchanceDialogOpen.onclick = function(){
|
dungeonEnchanceDialogOpen.onclick = function(){
|
||||||
|
@ -3323,23 +3331,23 @@ function initialize() {
|
||||||
|
|
||||||
const mSeriesId = monInfoBox.querySelector(".monster-seriesId");
|
const mSeriesId = monInfoBox.querySelector(".monster-seriesId");
|
||||||
mSeriesId.onclick = function() { //搜索系列
|
mSeriesId.onclick = function() { //搜索系列
|
||||||
const seriesId = parseInt(this.getAttribute(dataAttrName), 10);
|
const sid = parseInt(this.getAttribute(dataAttrName), 10);
|
||||||
if (seriesId > 0) {
|
if (sid > 0) {
|
||||||
showSearch(Cards.filter(card => card.seriesId == seriesId));
|
showSearchBySeriesId(sid, "series");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const mCollabId = monInfoBox.querySelector(".monster-collabId");
|
const mCollabId = monInfoBox.querySelector(".monster-collabId");
|
||||||
mCollabId.onclick = function() { //搜索合作
|
mCollabId.onclick = function() { //搜索合作
|
||||||
const collabId = parseInt(this.getAttribute(dataAttrName), 10);
|
const sid = parseInt(this.getAttribute(dataAttrName), 10);
|
||||||
if (collabId > 0); {
|
if (sid > 0) {
|
||||||
showSearch(Cards.filter(card => card.collabId == collabId));
|
showSearchBySeriesId(sid, "collab");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const mGachaId = monInfoBox.querySelector(".monster-gachaId");
|
const mGachaId = monInfoBox.querySelector(".monster-gachaId");
|
||||||
mGachaId.onclick = function() { //搜索合作
|
mGachaId.onclick = function() { //搜索桶
|
||||||
const gachaId = parseInt(this.getAttribute(dataAttrName), 10);
|
const sid = parseInt(this.getAttribute(dataAttrName), 10);
|
||||||
if (gachaId > 0); {
|
if (sid > 0) {
|
||||||
showSearch(Cards.filter(card => card.gachaId == gachaId));
|
showSearchBySeriesId(sid, "gacha");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//以字符串搜索窗口
|
//以字符串搜索窗口
|
||||||
|
@ -5411,10 +5419,10 @@ function refreshAll(formationData) {
|
||||||
|
|
||||||
//地下城强化的显示,稀有度没有现成的,所以这里来循环生成
|
//地下城强化的显示,稀有度没有现成的,所以这里来循环生成
|
||||||
const dge = formationData.dungeonEnchance;
|
const dge = formationData.dungeonEnchance;
|
||||||
if (Object.values(dge.rate).some(rate => rate != 1) || dge?.benefit) //如果有任何一个属性的比率不为1,才产生强化图标
|
dungeonEnchanceDom.classList.add(className_displayNone);
|
||||||
|
dungeonEnchanceDom.innerHTML = '';
|
||||||
|
if (Object.values(dge.rate).some(rate => rate != 1)) //如果有任何一个属性的比率不为1,才产生强化图标
|
||||||
{
|
{
|
||||||
dungeonEnchanceDom.innerHTML = '';
|
|
||||||
|
|
||||||
if (dge.rarities.length > 0) {
|
if (dge.rarities.length > 0) {
|
||||||
dge.rarities.forEach(rarity=>{
|
dge.rarities.forEach(rarity=>{
|
||||||
const icon = dungeonEnchanceDom.appendChild(document.createElement("icon"));
|
const icon = dungeonEnchanceDom.appendChild(document.createElement("icon"));
|
||||||
|
@ -5423,30 +5431,66 @@ function refreshAll(formationData) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const seriesFragment = [];
|
||||||
if (dge?.collabs?.length) { //添加合作的ID名称
|
if (dge?.collabs?.length) { //添加合作的ID名称
|
||||||
dungeonEnchanceDom.appendChild(localTranslating?.skill_parse?.target?.collab_id({id:dge.collabs.join()}));
|
//搜索并显示合作
|
||||||
|
function searchCollab(event) {
|
||||||
|
const collabId = parseInt(this.getAttribute(dataAttrName), 10);
|
||||||
|
showSearchBySeriesId(collabId, "collab");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const fragment = dge.collabs.map(id=>{
|
||||||
|
const lnk = document.createElement("a");
|
||||||
|
lnk.className ="series-search card-collabId";
|
||||||
|
lnk.setAttribute(dataAttrName, id);
|
||||||
|
lnk.onclick = searchCollab;
|
||||||
|
lnk.textContent = id;
|
||||||
|
return lnk;
|
||||||
|
}).nodeJoin(localTranslating?.skill_parse?.word?.slight_pause());
|
||||||
|
|
||||||
|
seriesFragment.push(localTranslating?.skill_parse?.target?.collab_id({id:fragment}));
|
||||||
}
|
}
|
||||||
if (dge?.gachas?.length) { //添加抽蛋的ID名称
|
if (dge?.gachas?.length) { //添加抽蛋的ID名称
|
||||||
dungeonEnchanceDom.appendChild(localTranslating?.skill_parse?.target?.gacha_id({id:dge.gachas.join()}));
|
//搜索并显示抽蛋
|
||||||
}
|
function searchGacha(event) {
|
||||||
|
const collabId = parseInt(this.getAttribute(dataAttrName), 10);
|
||||||
let skill = powerUp(dge.attrs, dge.types, p.mul({hp: dge.rate.hp * 100, atk: dge.rate.atk * 100, rcv: dge.rate.rcv * 100}));
|
showSearchBySeriesId(collabId, "gacha");
|
||||||
dungeonEnchanceDom.appendChild(renderSkill(skill));
|
return false;
|
||||||
|
}
|
||||||
|
const fragment = dge.gachas.map(id=>{
|
||||||
|
const lnk = document.createElement("a");
|
||||||
|
lnk.className ="series-search card-gachaId";
|
||||||
|
lnk.setAttribute(dataAttrName, id);
|
||||||
|
lnk.onclick = searchGacha;
|
||||||
|
lnk.textContent = id;
|
||||||
|
return lnk;
|
||||||
|
}).nodeJoin(localTranslating?.skill_parse?.word?.slight_pause());
|
||||||
|
|
||||||
if (dge?.benefit) { //添加阴阳
|
seriesFragment.push(localTranslating?.skill_parse?.target?.gacha_id({id:fragment}));
|
||||||
const benefitAwoken = (dge.benefit & 0b1) ? 128 : 129;
|
|
||||||
const icon = document.createElement("icon");
|
|
||||||
icon.className ="awoken-icon";
|
|
||||||
icon.setAttribute("data-awoken-icon", benefitAwoken);
|
|
||||||
if (dge.benefit & 0b10) icon.classList.add("yinyang")
|
|
||||||
dungeonEnchanceDom.appendChild(icon);
|
|
||||||
}
|
}
|
||||||
|
const skill = powerUp(dge.attrs, dge.types, p.mul({hp: dge.rate.hp * 100, atk: dge.rate.atk * 100, rcv: dge.rate.rcv * 100}));
|
||||||
|
seriesFragment.push(renderSkill(skill));
|
||||||
|
|
||||||
dungeonEnchanceDom.classList.remove(className_displayNone);
|
dungeonEnchanceDom.appendChild(seriesFragment.nodeJoin(localTranslating?.skill_parse?.word?.comma()));
|
||||||
}else
|
|
||||||
{
|
|
||||||
dungeonEnchanceDom.classList.add(className_displayNone);
|
|
||||||
}
|
}
|
||||||
|
if (dge?.benefit) { //添加阴阳
|
||||||
|
const benefitAwoken = (dge.benefit & 0b1) ? 128 : 129;
|
||||||
|
const icon = document.createElement("icon");
|
||||||
|
icon.className ="awoken-icon";
|
||||||
|
icon.setAttribute("data-awoken-icon", benefitAwoken);
|
||||||
|
if (dge.benefit & 0b10) icon.classList.add("yinyang")
|
||||||
|
dungeonEnchanceDom.appendChild(icon);
|
||||||
|
}
|
||||||
|
if (dge?.stage > 1) { //添加层数
|
||||||
|
const states = localTranslating?.skill_parse?.stats;
|
||||||
|
const dict = {
|
||||||
|
state:states?.cstage(),
|
||||||
|
num: dge?.stage
|
||||||
|
};
|
||||||
|
dungeonEnchanceDom.appendChild(states?.state_is(dict));
|
||||||
|
}
|
||||||
|
dungeonEnchanceDom.classList.remove(className_displayNone);
|
||||||
|
|
||||||
|
|
||||||
teamBigBoxs.forEach((teamBigBox, teamNum) => {
|
teamBigBoxs.forEach((teamBigBox, teamNum) => {
|
||||||
const teamBox = teamBigBox.querySelector(".team-box");
|
const teamBox = teamBigBox.querySelector(".team-box");
|
||||||
|
|
|
@ -1310,6 +1310,9 @@ const teamsCount = 1;
|
||||||
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="2" id="dungeon-benefit-2" /><label class="awoken-icon" data-awoken-icon="129" for="dungeon-benefit-2"></label></li><!--阴-->
|
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="2" id="dungeon-benefit-2" /><label class="awoken-icon" data-awoken-icon="129" for="dungeon-benefit-2"></label></li><!--阴-->
|
||||||
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="3" id="dungeon-benefit-3" /><label class="awoken-icon yinyang" data-awoken-icon="128" for="dungeon-benefit-3"></label></li><!--阴阳-->
|
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="3" id="dungeon-benefit-3" /><label class="awoken-icon yinyang" data-awoken-icon="128" for="dungeon-benefit-3"></label></li><!--阴阳-->
|
||||||
</ul>
|
</ul>
|
||||||
|
<ul class="current-stage-list"><!--当前层数-->
|
||||||
|
<li><label for="current-stage"></label><input id="current-stage" type="number" min="1" step="1" /></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="dialog-control"><button class="dialog-clear brown-button"></button><button class="dialog-close brown-button"></button><button class="dialog-confirm brown-button"></button></div>
|
<div class="dialog-control"><button class="dialog-clear brown-button"></button><button class="dialog-close brown-button"></button><button class="dialog-confirm brown-button"></button></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
21
style.css
21
style.css
|
@ -2755,9 +2755,18 @@ input[disabled]+.awoken-icon,
|
||||||
font-family: var(--game-font-family);
|
font-family: var(--game-font-family);
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
.skill-datail-parsed .detail-search::before{
|
a.series-search {
|
||||||
|
cursor: pointer;
|
||||||
|
color: brown;
|
||||||
|
}
|
||||||
|
a.series-search:hover {
|
||||||
|
background: rgba(150,110,10,0.5);
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
a.series-search::before {
|
||||||
content: "🔍";
|
content: "🔍";
|
||||||
}
|
}
|
||||||
|
|
||||||
.random-active-skill,
|
.random-active-skill,
|
||||||
.evolved-active-skill
|
.evolved-active-skill
|
||||||
{
|
{
|
||||||
|
@ -4103,16 +4112,6 @@ body.external-link-support #external-support{
|
||||||
transform: scale(0.5);
|
transform: scale(0.5);
|
||||||
margin: -10px;
|
margin: -10px;
|
||||||
}
|
}
|
||||||
.skill-datail-parsed a.detail-search
|
|
||||||
{
|
|
||||||
cursor: pointer;
|
|
||||||
color: brown;
|
|
||||||
}
|
|
||||||
.skill-datail-parsed a.detail-search:hover
|
|
||||||
{
|
|
||||||
background: rgba(150,110,10,0.5);
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skill-datail-parsed .merge-board
|
.skill-datail-parsed .merge-board
|
||||||
{
|
{
|
||||||
|
|
|
@ -2300,6 +2300,9 @@ const teamsCount = 3;
|
||||||
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="2" id="dungeon-benefit-2" /><label class="awoken-icon" data-awoken-icon="129" for="dungeon-benefit-2"></label></li><!--阴-->
|
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="2" id="dungeon-benefit-2" /><label class="awoken-icon" data-awoken-icon="129" for="dungeon-benefit-2"></label></li><!--阴-->
|
||||||
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="3" id="dungeon-benefit-3" /><label class="awoken-icon yinyang" data-awoken-icon="128" for="dungeon-benefit-3"></label></li><!--阴阳-->
|
<li><input type="radio" class="benefit-check" name="dungeon-benefit" value="3" id="dungeon-benefit-3" /><label class="awoken-icon yinyang" data-awoken-icon="128" for="dungeon-benefit-3"></label></li><!--阴阳-->
|
||||||
</ul>
|
</ul>
|
||||||
|
<ul class="current-stage-list"><!--当前层数-->
|
||||||
|
<li><label for="current-stage"></label><input id="current-stage" type="number" min="1" step="1" /></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="dialog-control"><button class="dialog-clear brown-button"></button><button class="dialog-close brown-button"></button><button class="dialog-confirm brown-button"></button></div>
|
<div class="dialog-control"><button class="dialog-clear brown-button"></button><button class="dialog-close brown-button"></button><button class="dialog-confirm brown-button"></button></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue