From 9364e464dc17dea81f0dff9eb2d29d0cdada19dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Fri, 12 Nov 2021 15:46:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=8D=E6=BB=A1297?= =?UTF-8?q?=E6=97=B6=E6=B2=A1=E6=9C=89=E8=B6=85=E8=A7=89=E9=86=92=E7=9A=84?= =?UTF-8?q?=E5=88=A4=E6=96=AD=EF=BC=8C=E5=85=B6=E4=BB=96=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-universal_function.js | 45 +++++++++++++++++++----------------- script.js | 2 +- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/script-universal_function.js b/script-universal_function.js index 891ce50b..9fe372cb 100644 --- a/script-universal_function.js +++ b/script-universal_function.js @@ -395,8 +395,8 @@ function awokenCountInTeam(team, awokenIndex, solo, teamsCount) { const assistCard = Cards[assist.id]; //启用的觉醒数组片段 let enableAwoken = card.awakenings.slice(0, mon.awoken); - //单人、3人时,大于等于100级时增加超觉醒 - if ((solo || teamsCount === 3) && mon.sawoken >= 0 && mon.level >= 100) { + //单人、3人时,大于等于100级且297时增加超觉醒 + if ((solo || teamsCount === 3) && mon.sawoken >= 0 && mon.level >= 100 && mon.plus.every(p=>p>=99)) { const sAwokenT = card.superAwakenings[mon.sawoken]; if (sAwokenT >= 0) enableAwoken = enableAwoken.concat(sAwokenT); @@ -508,31 +508,34 @@ function calculateAbility(member, assist = null, solo = true, teamsCount = 1) { const dge = formation.dungeonEnchance; const dgeRate = [dge.rate.hp, dge.rate.atk, dge.rate.rcv]; const isDge = dge.rarities.includes(memberCard.rarity) || memberCard.attrs.some(attr=>dge.attrs.includes(attr)) || memberCard.types.some(type=>dge.types.includes(type)); + + //储存点亮的觉醒 + let awokenList = memberCard.awakenings.slice(0, member.awoken); + //单人、3人时,大于等于100级且297时增加超觉醒 + if ((solo || teamsCount === 3) && member.sawoken >= 0 && member.level >= 100 && member.plus.every(p=>p>=99)) { + const sAwokenT = memberCard.superAwakenings[member.sawoken]; + if (sAwokenT >= 0) awokenList.push(sAwokenT) + } + //如果有武器还要计算武器的觉醒 + let enableBouns = false; + if (assistCard?.id > 0 && assistCard.enabled) { + const assistAwokenList = assistCard.awakenings.slice(0, assist.awoken); //储存武器点亮的觉醒 + if (assistAwokenList.includes(49)) { //49是武器觉醒,确认已经点亮了武器觉醒 + awokenList.push(...assistAwokenList); + } + enableBouns = memberCard.attrs[0] === assistCard.attrs[0] || memberCard.attrs[0] == 6 || assistCard.attrs[0] == 6; + } + const abilitys = memberCurves.map((ab, idx) => { const n_base = Math.round(curve(ab, member.level, memberCard.maxLevel, memberCard.limitBreakIncr, limitBreakIncr120[idx])); //等级基础三维 const n_plus = member.plus[idx] * plusAdd[idx]; //加值增加量 let n_assist_base = 0, n_assist_plus = 0; //辅助的bonus - let awokenList = memberCard.awakenings.slice(0, member.awoken); //储存点亮的觉醒 - //单人、3人时,大于等于100级时增加超觉醒 - if ((solo || teamsCount === 3) && member.sawoken >= 0 && member.level >= 100) { - const sAwokenT = memberCard.superAwakenings[member.sawoken]; - if (sAwokenT >= 0) - awokenList = awokenList.concat(sAwokenT); - } - //如果有武器还要计算武器的觉醒 - if (assistCard && assistCard.id > 0 && assistCard.enabled) { - const assistAwokenList = assistCard.awakenings.slice(0, assist.awoken); //储存武器点亮的觉醒 - if (assistAwokenList.includes(49)) //49是武器觉醒,确认已经点亮了武器觉醒 - { - awokenList = awokenList.concat(assistAwokenList); - } - if (memberCard.attrs[0] === assistCard.attrs[0] || memberCard.attrs[0] == 6 || assistCard.attrs[0] == 6) { - - n_assist_base = Math.round(curve(assistCurves[idx], assist.level, assistCard.maxLevel, assistCard.limitBreakIncr, limitBreakIncr120[idx])); //辅助等级基础三维 - n_assist_plus = assist.plus[idx] * plusAdd[idx]; //辅助加值增加量 - } + //计算辅助的额外血量 + if (assistCard?.id > 0 && assistCard.enabled && enableBouns) { + n_assist_base = Math.round(curve(assistCurves[idx], assist.level, assistCard.maxLevel, assistCard.limitBreakIncr, limitBreakIncr120[idx])); //辅助等级基础三维 + n_assist_plus = assist.plus[idx] * plusAdd[idx]; //辅助加值增加量 } //用来计算倍率觉醒的最终倍率是多少,reduce用 diff --git a/script.js b/script.js index 9b3c48d5..cf451571 100644 --- a/script.js +++ b/script.js @@ -3725,7 +3725,7 @@ function changeid(mon, monDom, latentDom) { } const sawoken = monDom.querySelector(".super-awoken"); if (sawoken) { //如果存在超觉醒的DOM且提供了超觉醒 - if (mon.sawoken != undefined && mon.sawoken >= 0 && card.superAwakenings.length) { + if (mon.sawoken != null && mon?.sawoken >= 0 && card.superAwakenings.length && mon.level >= 100 && mon.plus.every(p=>p>=99)) { sawoken.classList.remove(className_displayNone); const sawokenIcon = sawoken.querySelector(".awoken-icon"); sawokenIcon.setAttribute("data-awoken-icon", card.superAwakenings[mon.sawoken]);