From 02401fa812b349c4179dda90175ea7dfd600ab2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Mon, 9 Oct 2023 18:37:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=89=E7=BB=B4=E8=B6=85?= =?UTF-8?q?=E8=A7=89=E9=86=92=E7=9A=84=E6=95=B0=E5=80=BC=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- multi.html | 46 ++++++++++++++++++------------------ script-universal_function.js | 25 +++++++++++--------- script.js | 26 ++++++++++---------- service-worker.js | 12 +++++----- solo.html | 46 ++++++++++++++++++------------------ style.css | 12 +++++++++- triple.html | 46 ++++++++++++++++++------------------ 7 files changed, 113 insertions(+), 100 deletions(-) diff --git a/multi.html b/multi.html index c1246339..84996c98 100644 --- a/multi.html +++ b/multi.html @@ -1072,9 +1072,9 @@ const teamsCount = 2;
  • -
  • -
  • -
  • +
  • +
  • +
  • @@ -1098,7 +1098,7 @@ const teamsCount = 2;
  • -
  • +
  • @@ -1114,17 +1114,17 @@ const teamsCount = 2;
  • -
  • +
  • -
  • +
  • -
  • -
  • -
  • +
  • +
  • +
  • @@ -1132,19 +1132,19 @@ const teamsCount = 2;
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • @@ -1154,7 +1154,7 @@ const teamsCount = 2;
  • -
  • +
  • diff --git a/script-universal_function.js b/script-universal_function.js index 2aff6bac..ca8eec09 100644 --- a/script-universal_function.js +++ b/script-universal_function.js @@ -693,15 +693,15 @@ function calculateAbility(member, assist = null, solo = true, teamsCount = 1) { [{ index: 2, value: 100 }, { index: 66, value: -1000 }], //ATK [{ index: 3, value: 200 }, { index: 67, value: -2000 }] //RCV ]; - const previousAwokenScale = [ //在297之前,对应比例加三维觉醒的序号与倍率值,就是 63 语音觉醒, 127 三维觉醒 - [{ index: 63, scale: 1.1 },{ index: 127, scale: 1.5 }], //HP - [{ index: 63, scale: 1.1 },{ index: 127, scale: 1.5 }], //ATK - [{ index: 63, scale: 1.1 },{ index: 127, scale: 1.5 }] //RCV + const previousAwokenScale = [ //在297之前,对应比例加三维觉醒的序号与倍率值,就是 63 语音觉醒 + [{ index: 63, scale: 1.1 }], //HP + [{ index: 63, scale: 1.1 }], //ATK + [{ index: 63, scale: 1.1 }] //RCV ]; - const latterAwokenScale = [ //在297之后,对应比例加三维觉醒的序号与倍率值 - [], //HP - [], //ATK - [] //RCV + const latterAwokenScale = [ //在297之后,对应比例加三维觉醒的序号与倍率值,30 协力觉醒、127 三维觉醒 + [{ index: 127, scale: 1.5 }], //HP + [{ index: 127, scale: 1.5 }], //ATK + [{ index: 127, scale: 1.5 }] //RCV ]; if (!solo) { //协力时计算协力觉醒 @@ -741,7 +741,6 @@ function calculateAbility(member, assist = null, solo = true, teamsCount = 1) { 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]; //加值增加量 @@ -761,7 +760,6 @@ function calculateAbility(member, assist = null, solo = true, teamsCount = 1) { //倍率类觉醒的比例,直接从1开始乘 const n_awokenScale = previousAwokenScale[idx].reduce(calculateAwokenScale, 1); - //觉醒增加的数值 const n_awoken = awokenList.length > 0 ? Math.round(awokenAdd[idx].reduce((previous, aw) => { @@ -786,7 +784,7 @@ function calculateAbility(member, assist = null, solo = true, teamsCount = 1) { let reValueNoAwoken = Math.round(n_base * n_awokenScale) + n_plus + Math.round((n_assist_base + n_assist_plus) * bonusScale[idx]); //觉醒生效时的协力、语音觉醒等的倍率 - reValue = reValue * latterAwokenScale[idx].reduce(calculateAwokenScale, 1); + reValue = Math.floor(reValue * latterAwokenScale[idx].reduce(calculateAwokenScale, 1)); //都要做四舍五入 if (isDge && dgeRate[idx] !== 1) @@ -821,7 +819,12 @@ function calculateAbility_max(id, solo, teamsCount, maxLevel = 110) { level: card.limitBreakIncr ? maxLevel : card.maxLevel, plus: (card.stacking || card.types[0] == 15 && card.types[1] == -1) ? [0, 0, 0] : [99, 99, 99], //当可以叠加时,不能打297 awoken: card.awakenings.length, + sawoken: 0 }; + /*强制计算超觉醒 + if (card.superAwakenings.includes(127)) { + tempMon.sawoken = 127; + }*/ const abilities = calculateAbility(tempMon, null, solo, teamsCount); if (abilities) { const [[hp,hpNA], [atk,atkNA], [rcv,rcvNA]] = abilities; diff --git a/script.js b/script.js index 98bbdecb..707c3539 100644 --- a/script.js +++ b/script.js @@ -4325,6 +4325,7 @@ function initialize() { const mSAwokenIcon = monEditOuterAwokensRow.querySelector("#current-super-awoken-icon"); mSAwokenIcon.onclick = function(){ this.setAttribute("data-awoken-icon", 0); + reCalculateAbility(); } //3个快速设置this.ipt为自己的value @@ -4509,11 +4510,12 @@ function initialize() { //编辑界面重新计算怪物的能力 function reCalculateAbility() { - const monid = editBox.mid; + const id = editBox.mid; const level = parseInt(monEditLv.value || 0, 10); const mAwokenNumIpt = monEditAwokensRow.querySelector("input[name='awoken-number']:checked"); const awoken = mAwokenNumIpt ? parseInt(mAwokenNumIpt.value, 10) : 0; + const sawoken = mSAwokenIcon ? parseInt(mSAwokenIcon.getAttribute("data-awoken-icon"), 10) : 0; const plus = [ parseInt(monEditAddHp.value || 0, 10), parseInt(monEditAddAtk.value || 0, 10), @@ -4521,11 +4523,12 @@ function initialize() { ]; const latent = editBox.latent; const tempMon = { - id: monid, - level: level, - plus: plus, - awoken: awoken, - latent: latent + id, + level, + plus, + awoken, + sawoken, + latent }; const abilitys = calculateAbility(tempMon, null, solo, teamsCount); @@ -5207,25 +5210,21 @@ function editBoxChangeMonId(id) { const level = settingBox.querySelector(".row-mon-level .m-level"); const plusArr = [...settingBox.querySelectorAll(".row-mon-plus input[type='number']")]; - if (sawoken > 0) - { - let recalFlag = false; + if (sawoken > 0) { //自动100级 if (parseInt(level.value, 10)<100) { console.debug("点亮超觉醒,自动设定100级"); level.value = 100; - recalFlag = true; } //自动打上297 if (plusArr.some(ipt=>parseInt(ipt.value, 10)<99)) { console.debug("点亮超觉醒,自动设定297"); plusArr.forEach(ipt=>ipt.value=99); - recalFlag = true; } - if (recalFlag) editBox.reCalculateAbility(); } + editBox.reCalculateAbility(); } //怪物没有超觉醒时隐藏超觉醒 const monEditCurrentSAwokenRow = monEditOuterAwokensRow.querySelector(".current-super-awoken"); @@ -5616,7 +5615,8 @@ function refreshTeamAwokenEfeect(awokenEffectDom, team, ti) { const thisAwokenNum = awokenCountInTeam(team, equivalentAwoken.small, solo, teamsCount) + awokenCountInTeam(team, equivalentAwoken.big, solo, teamsCount) * equivalentAwoken.times; let prob = thisAwokenNum * 0.2; //普通觉醒20% - orb.setAttribute(dataAttrName,Math.round(Math.min(prob,1)*100)); + orb.setAttribute(dataAttrName,Math.round(prob*100)); + orb.classList.toggle("gt100", prob > 1); } } diff --git a/service-worker.js b/service-worker.js index b558e080..592d1e08 100644 --- a/service-worker.js +++ b/service-worker.js @@ -18467,7 +18467,7 @@ const cachesMap = new Map([ ], [ "multi.html", - "581cda64672bdc1682b14021fa5f0c79" + "7194f8729289ada066cbdf00c20c13a4" ], [ "script-custom_elements.js", @@ -18483,15 +18483,15 @@ const cachesMap = new Map([ ], [ "script-universal_function.js", - "72d6d5d33875281caebcc2c0fc553fc8" + "0d84923652d71fcf7cdcee27618e18d9" ], [ "script.js", - "4521ddf98e358fa411ca892ff55f29d6" + "3f34e0ca7d15e34bcd9814ea5ab0d084" ], [ "solo.html", - "2aad64bf53d7006ede0718deaf7cf623" + "f16e594f429858575c57a56cadec63f4" ], [ "style-monsterimages.css", @@ -18499,7 +18499,7 @@ const cachesMap = new Map([ ], [ "style.css", - "e8d5084cf733149af6601ede79ce2d90" + "f84ddd81c8f40027e9da323fbb117501" ], [ "temp.js", @@ -18507,7 +18507,7 @@ const cachesMap = new Map([ ], [ "triple.html", - "61cf0523c49958d9e545f8351672542f" + "f3c40c6846a8eb80aff4a6ddc1f3c91a" ], [ "languages/en.css", diff --git a/solo.html b/solo.html index 15928182..e888cd66 100644 --- a/solo.html +++ b/solo.html @@ -836,9 +836,9 @@ const teamsCount = 1;
  • -
  • -
  • -
  • +
  • +
  • +
  • @@ -862,7 +862,7 @@ const teamsCount = 1;
  • -
  • +
  • @@ -878,17 +878,17 @@ const teamsCount = 1;
  • -
  • +
  • -
  • +
  • -
  • -
  • -
  • +
  • +
  • +
  • @@ -896,19 +896,19 @@ const teamsCount = 1;
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • @@ -918,7 +918,7 @@ const teamsCount = 1;
  • -
  • +
  • diff --git a/style.css b/style.css index d86b42d5..30b9968c 100644 --- a/style.css +++ b/style.css @@ -1941,6 +1941,11 @@ body:not(.solo) .awoken-icon[data-awoken-icon="64"]::after { animation: icon-active 0.2s; } +.awoken-icon.unallowable-awoken:active, +input[disabled]+.awoken-icon:active, +.latent-icon.unallowable-latent:active { + animation: none; +} .awoken-ul { display: grid; @@ -2577,9 +2582,10 @@ body:not(.solo) .awoken-icon[data-awoken-icon="64"]::after } /*不允许使用的潜觉,不是手指,半透明,灰度*/ .awoken-icon.unallowable-awoken, +input[disabled]+.awoken-icon, .latent-icon.unallowable-latent { - cursor: default; + cursor: default !important; opacity: var(--search-icon-unchecked); filter: grayscale(100%); } @@ -2849,6 +2855,10 @@ body:not(.solo) .awoken-icon[data-awoken-icon="64"]::after color: #28c031; text-shadow: black 1px 1px 1px; } +.team-awoken-effect .prob.gt100 /*大于100*/{ + color: #c7ff2b; + text-shadow: black 1px 1px 1px; +} .team-awoken-effect .count[data-value]::before, .team-awoken-effect .orb-list .orb[data-value]::before { diff --git a/triple.html b/triple.html index 6a11e37b..716bef14 100644 --- a/triple.html +++ b/triple.html @@ -1826,9 +1826,9 @@ const teamsCount = 3;
  • -
  • -
  • -
  • +
  • +
  • +
  • @@ -1852,7 +1852,7 @@ const teamsCount = 3;
  • -
  • +
  • @@ -1868,17 +1868,17 @@ const teamsCount = 3;
  • -
  • +
  • -
  • +
  • -
  • -
  • -
  • +
  • +
  • +
  • @@ -1886,19 +1886,19 @@ const teamsCount = 3;
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • @@ -1908,7 +1908,7 @@ const teamsCount = 3;
  • -
  • +