From c5d49d032d98830a50e63d84f7623a33bb432ff0 Mon Sep 17 00:00:00 2001 From: Kokomi <102026640+yoimiya-kokomi@users.noreply.github.com> Date: Thu, 17 Nov 2022 02:39:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=BB=E6=99=B4=E8=B6=85?= =?UTF-8?q?=E6=BF=80=E5=8C=96=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- models/profile-lib/DmgCalc.js | 8 ++++-- models/profile-lib/DmgCalcMeta.js | 33 ++++++++++++++---------- resources/meta/character/刻晴/artis.js | 2 +- resources/meta/character/刻晴/calc.js | 15 ++++++++++- resources/meta/character/夜兰/calc.js | 10 +++++-- 6 files changed, 50 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7252ca98..aef78c1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ * 喵喵设置中增加排名限制门槛,支持限制 有16个角色数据/包含御三家角色 才能参与排名,防止被非群成员uid刷榜 * `#雷神面板`圣遗物支持展示强化次数 * 增加命令`#刷新排名`,获取群成员面板数据,刷新当前排名 **@munnks** -* `#雷神排名` 使用个人作为排行头像展示(首次使用可使用`#刷新排名`以更新uid信息) +* `#雷神排名` 使用个人头像作为排行头像展示(首次使用可使用`#刷新排名`以更新uid信息) # 2.0.1~2.0.8 diff --git a/models/profile-lib/DmgCalc.js b/models/profile-lib/DmgCalc.js index a289ebea..15521b22 100644 --- a/models/profile-lib/DmgCalc.js +++ b/models/profile-lib/DmgCalc.js @@ -1,7 +1,7 @@ /* * 伤害计算 - 计算伤害 * */ -import { eleBaseDmg } from './DmgCalcMeta.js' +import { eleBaseDmg, erTitle } from './DmgCalcMeta.js' import DmgMastery from './DmgMastery.js' let DmgCalc = { @@ -67,7 +67,7 @@ let DmgCalc = { // 抗性区 let kx = attr.kx - if (ele === 'swirl'/* || (ele === 'phy' && (attr.element === '雷' || attr.element === '冰'))*/) { + if (ele === 'swirl') { kx = attr.fykx } kx = 10 - (kx || 0) @@ -148,6 +148,10 @@ let DmgCalc = { let { calc } = ds let dmgFn = function (pctNum = 0, talent = false, ele = false, basicNum = 0, mode = 'talent') { + if (ele) { + ele = erTitle[ele] || ele + } + console.log(ele) return DmgCalc.calcRet({ pctNum, talent, ele, basicNum, mode }, data) } diff --git a/models/profile-lib/DmgCalcMeta.js b/models/profile-lib/DmgCalcMeta.js index 80a6ec72..81b1174a 100644 --- a/models/profile-lib/DmgCalcMeta.js +++ b/models/profile-lib/DmgCalcMeta.js @@ -1,3 +1,5 @@ +import lodash from 'lodash' + export const eleMap = { anemo: '风', cryo: '冰', @@ -10,20 +12,25 @@ export const eleMap = { // 元素反应类型及基数 export const erType = { - vaporize: { type: 'pct', num: ({ element }) => element === '水' ? 2 : 1.5 }, // 蒸发 - melt: { type: 'pct', num: ({ element }) => element === '火' ? 2 : 1.5 }, // 融化 - burning: { type: 'fusion', num: () => 1 }, // 燃烧 - superConduct: { type: 'fusion', num: () => 2 }, // 超导 - swirl: { type: 'fusion', num: () => 2.4 }, // 扩散 - electroCharged: { type: 'fusion', num: () => 4.8 }, // 感电 - shatter: { type: 'fusion', num: () => 6 }, // 碎冰 - overloaded: { type: 'fusion', num: () => 8 }, // 超载 - bloom: { type: 'fusion', num: () => 8 }, // 绽放 - burgeon: { type: 'fusion', num: () => 12 }, // 烈绽放 - hyperBloom: { type: 'fusion', num: () => 12 }, // 超绽放 - aggravate: { type: 'bonus', num: () => 4.6 }, // 超激化 - spread: { type: 'bonus', num: () => 5.0 } // 蔓激化 + vaporize: { type: 'pct', num: ({ element }) => element === '水' ? 2 : 1.5, title: '蒸发' }, + melt: { type: 'pct', num: ({ element }) => element === '火' ? 2 : 1.5, title: '融化' }, + burning: { type: 'fusion', num: () => 1, title: '燃烧' }, + superConduct: { type: 'fusion', num: () => 2, title: '超导' }, + swirl: { type: 'fusion', num: () => 2.4, title: '扩散' }, + electroCharged: { type: 'fusion', num: () => 4.8, title: '感电' }, + shatter: { type: 'fusion', num: () => 6, title: '碎冰' }, + overloaded: { type: 'fusion', num: () => 8, title: '超载' }, + bloom: { type: 'fusion', num: () => 8, title: '绽放' }, + burgeon: { type: 'fusion', num: () => 12, title: '烈绽放' }, + hyperBloom: { type: 'fusion', num: () => 12, title: '超绽放' }, + aggravate: { type: 'bonus', num: () => 4.6, title: '超激化' }, + spread: { type: 'bonus', num: () => 5.0, title: '蔓激化' } } +let erTmp = {} +lodash.forEach(erType, (er, key) => { + erTmp[er.title] = key +}) +export const erTitle = erTmp export const attrMap = { atk: { type: 'pct', val: 5.83, title: '大攻击', text: '5.8%' }, diff --git a/resources/meta/character/刻晴/artis.js b/resources/meta/character/刻晴/artis.js index 1d872db5..e8be9412 100644 --- a/resources/meta/character/刻晴/artis.js +++ b/resources/meta/character/刻晴/artis.js @@ -1,6 +1,6 @@ export default function ({ attr, rule, def }) { // 激化精通璃月雷神,具体数值待定 - if (attr.mastery > 80) { + if (attr.mastery > 40) { return rule('刻晴-精通', { atk: 75, cpct: 100, cdmg: 100, mastery: 75, dmg: 100 }) } return def({ atk: 75, cpct: 100, cdmg: 100, dmg: 100, phy: 100 }) diff --git a/resources/meta/character/刻晴/calc.js b/resources/meta/character/刻晴/calc.js index 4a2a6a40..fcdf95e5 100644 --- a/resources/meta/character/刻晴/calc.js +++ b/resources/meta/character/刻晴/calc.js @@ -8,9 +8,22 @@ export const details = [{ title: 'Q总伤害', params: { q: 1 }, dmg: ({ talent }, dmg) => dmg(talent.q['技能伤害'] + talent.q['连斩伤害'] + talent.q['最后一击伤害'], 'q') +}, { + title: 'Q总伤害·超激化', + params: { q: 1 }, + dmg: ({ talent }, dmg) => { + let t1j = dmg(talent.q['技能伤害'], 'q', '超激化') + let t2j = dmg(talent.q['连斩伤害'] / 8, 'q', '超激化') + let t2 = dmg(talent.q['连斩伤害'] / 8, 'q') + let t3j = dmg(talent.q['最后一击伤害'], 'q', '超激化') + return { + dmg: t1j.dmg + t2j.dmg * 2 + t2.dmg * 6 + t3j.dmg, + avg: t1j.avg + t2j.avg * 2 + t2.avg * 6 + t3j.avg + } + } }] -export const defDmgIdx = 2 +export const defDmgIdx = 3 export const mainAttr = 'atk,cpct,cdmg' export const buffs = [{ diff --git a/resources/meta/character/夜兰/calc.js b/resources/meta/character/夜兰/calc.js index 37ed9142..32eda7e6 100644 --- a/resources/meta/character/夜兰/calc.js +++ b/resources/meta/character/夜兰/calc.js @@ -8,7 +8,7 @@ export const details = [{ }, { title: 'E络命丝蒸发', - dmg: ({ talent, attr, calc }, { basic }) => basic(calc(attr.hp) * talent.e['技能伤害'] / 100, 'e', 'vaporize') + dmg: ({ talent, attr, calc }, { basic }) => basic(calc(attr.hp) * talent.e['技能伤害'] / 100, 'e', '蒸发') }, { title: 'Q协同单段伤害', @@ -16,9 +16,15 @@ export const details = [{ dmg: ({ talent, attr, calc, cons }, { basic }) => { return basic(calc(attr.hp) * (talent.q['玄掷玲珑伤害'] / 3 / 100), 'q') } +}, { + title: 'Q协同单段蒸发', + params: { q: true }, + dmg: ({ talent, attr, calc, cons }, { basic }) => { + return basic(calc(attr.hp) * (talent.q['玄掷玲珑伤害'] / 3 / 100), 'q', '蒸发') + } }] -export const defDmgIdx = 2 +export const defDmgIdx = 4 export const mainAttr = 'hp,cpct,cdmg' export const buffs = [{