diff --git a/apps/profile/ProfileChange.js b/apps/profile/ProfileChange.js index eccec22e..e2ef63b5 100644 --- a/apps/profile/ProfileChange.js +++ b/apps/profile/ProfileChange.js @@ -20,7 +20,7 @@ const ProfileChange = { * @param msg * @returns {{}} */ - matchMsg(msg) { + matchMsg (msg) { if (!/(变|改|换)/.test(msg)) { return false } @@ -130,17 +130,17 @@ const ProfileChange = { } // 匹配武器 - let wRet = /^(?:等?级?([1-9][0-9])?级?)?\s*(?:([1-5一二三四五满])?精炼?([1-5一二三四五])?)?\s*(?:等?级?([1-9][0-9])?级?)?\s*(.*)$/.exec(txt) - if (wRet && wRet[5]) { - let weaponName = lodash.trim(wRet[5]) + let wRet = /^(?:等?级?([1-9][0-9])?级?)?\s*(?:([1-5一二三四五满])?(?:(精炼?)|(叠影?))?([1-5一二三四五])?)?\s*(?:等?级?([1-9][0-9])?级?)?\s*(.*)$/.exec(txt) + if (wRet && wRet[7]) { + let weaponName = lodash.trim(wRet[7]) let weapon = Weapon.get(weaponName, game, ret.char.game) if (weapon || weaponName === '武器' || Weapon.isWeaponSet(weaponName)) { - let affix = wRet[2] || wRet[3] + let affix = wRet[2] || wRet[5] affix = { 一: 1, 二: 2, 三: 3, 四: 4, 五: 5, 满: 5 }[affix] || affix * 1 let tmp = { weapon: (Weapon.isWeaponSet(weaponName) ? weaponName : weapon?.name) || '', affix: affix || '', - level: wRet[1] * 1 || wRet[4] * 1 || '' + level: wRet[1] * 1 || wRet[6] * 1 || '' } if (lodash.values(tmp).join('')) { change.weapon = tmp @@ -197,7 +197,7 @@ const ProfileChange = { * @param game * @returns {Avatar|boolean} */ - getProfile(uid, charid, ds, game = 'gs') { + getProfile (uid, charid, ds, game = 'gs') { if (!charid) { return false } diff --git a/apps/profile/ProfileRank.js b/apps/profile/ProfileRank.js index 4bb1dbc6..4de09d1c 100644 --- a/apps/profile/ProfileRank.js +++ b/apps/profile/ProfileRank.js @@ -21,7 +21,7 @@ export async function groupRank(e) { let mode = /(分|圣遗物|遗器|评分|ACE)/.test(msg) ? 'mark' : 'dmg' mode = /(词条)/.test(msg) ? 'valid' : mode mode = /(双爆|双暴)/.test(msg) ? 'crit' : mode - let name = msg.replace(/(#|星铁|最强|最高分|第一|词条|双爆|双暴|极限|最高|最多|最牛|圣遗物|评分|群内|群|排名|排行|面板|面版|详情|榜)/g, '') + let name = msg.replace(/(#|星铁|最强|最高分|第一|词条|双爆|双暴|极限|最高|最多|最牛|圣遗物|遗器|评分|群内|群|排名|排行|面板|面版|详情|榜)/g, '') let game = e.isSr ? 'sr' : 'gs' let char = Character.get(name, game) if (!char) { diff --git a/models/dmg/DmgAttr.js b/models/dmg/DmgAttr.js index 5f6a310a..79fa73d0 100644 --- a/models/dmg/DmgAttr.js +++ b/models/dmg/DmgAttr.js @@ -211,9 +211,8 @@ let DmgAttr = { return } - if (['vaporize', 'melt', 'crystallize', 'burning', 'superConduct', 'swirl', 'electroCharged', 'shatter', 'overloaded', 'bloom', 'burgeon', 'hyperBloom', 'aggravate', 'spread', 'kx', 'fykx'].includes(key)) { + if (['vaporize', 'melt', 'crystallize', 'burning', 'superConduct', 'swirl', 'electroCharged', 'shatter', 'overloaded', 'bloom', 'burgeon', 'hyperBloom', 'aggravate', 'spread', 'kx', 'fykx', 'multi'].includes(key)) { attr[key] += val * 1 || 0 - return } }) msg.push(title) diff --git a/models/dmg/DmgCalc.js b/models/dmg/DmgCalc.js index 1538d7ff..4e5bfadb 100644 --- a/models/dmg/DmgCalc.js +++ b/models/dmg/DmgCalc.js @@ -3,6 +3,7 @@ * */ import { eleBaseDmg, erTitle, breakBaseDmg, cryBaseDmg } from './DmgCalcMeta.js' import DmgMastery from './DmgMastery.js' +import lodash from 'lodash' let DmgCalc = { calcRet (fnArgs = {}, data = {}) { @@ -64,18 +65,22 @@ let DmgCalc = { let plusNum = 0 pctNum = pctNum / 100 - if (talent && attr[talent]) { - let ds = attr[talent] + if (talent) { + lodash.forEach(talent.split(','), (t) => { + if (attr[t]) { + let ds = attr[t] - pctNum += ds.pct / 100 - dmgNum += ds.dmg / 100 - enemydmgNum += game === 'gs' ? 0 : ds.enemydmg / 100 - cpctNum += ds.cpct / 100 - cdmgNum += ds.cdmg / 100 - enemyDef += ds.def / 100 - enemyIgnore += ds.ignore / 100 - multiNum += ds.multi / 100 - plusNum += ds.plus + pctNum += ds.pct / 100 + dmgNum += ds.dmg / 100 + enemydmgNum += game === 'gs' ? 0 : ds.enemydmg / 100 + cpctNum += ds.cpct / 100 + cdmgNum += ds.cdmg / 100 + enemyDef += ds.def / 100 + enemyIgnore += ds.ignore / 100 + multiNum += ds.multi / 100 + plusNum += ds.plus + } + }) } // 防御区 diff --git a/resources/meta-gs/weapon/catalyst/calc.js b/resources/meta-gs/weapon/catalyst/calc.js index 4b70da4b..b8606a64 100644 --- a/resources/meta-gs/weapon/catalyst/calc.js +++ b/resources/meta-gs/weapon/catalyst/calc.js @@ -94,11 +94,6 @@ export default function (step, staticStep) { } }, 尘世之锁: [staticStep('shield', 20), { - title: '护盾强效提升[_shield]%', - refine: { - _shield: step(20) - } - }, { title: '护盾+满层情况下攻击力提高[atkPct]%', buffCount: 10, refine: { @@ -107,11 +102,8 @@ export default function (step, staticStep) { } }], 不灭月华: [staticStep('heal', 10, 2.5), { - title: '治疗加成提高[_heal]%,普攻伤害增加[aPlus]', + title: '普攻伤害增加[aPlus]', sort: 9, - refine: { - _heal: step(10, 2.5) - }, data: { aPlus: ({ attr, calc, refine }) => calc(attr.hp) * step(1, 0.5)[refine] / 100 } @@ -170,11 +162,6 @@ export default function (step, staticStep) { } }], 金流监督: [staticStep('atkPct', 16), { - title: '攻击力提升[_atkPct]%', - refine: { - _atkPct: step(16) - } - }, { title: '满层下,普通攻击造成的伤害提升[aDmg]%,重击造成的伤害提升[a2Dmg]%', refine: { aDmg: step(16 * 3), @@ -189,11 +176,6 @@ export default function (step, staticStep) { } }], 万世流涌大典: [staticStep('hpPct', 16), { - title: '生命值提升[_hpPct]%', - refine: { - _hpPct: step(16) - } - }, { title: '满层下,重击造成的伤害提升[a2Dmg]%', refine: { a2Dmg: [14 * 3, 18 * 3, 22 * 3, 26 * 3, 30 * 3] diff --git a/resources/meta-sr/artifact/alias.js b/resources/meta-sr/artifact/alias.js index 86c7ed76..d9f66069 100644 --- a/resources/meta-sr/artifact/alias.js +++ b/resources/meta-sr/artifact/alias.js @@ -64,7 +64,9 @@ export const artiSetAbbr = { 苍穹战线格拉默: '苍穹', 梦想之地匹诺康尼: '梦想', 死水深潜的先驱: '死水', - 机心戏梦的钟表匠: '机心' + 机心戏梦的钟表匠: '机心', + 无主荒星茨冈尼亚: '荒星', + 出云显世与高天神国: '出云' } export const aliasCfg = { @@ -97,5 +99,7 @@ export const aliasCfg = { 苍穹战线格拉默: '苍穹,战线,苍穹战线', 梦想之地匹诺康尼: '梦想,梦想之地,匹诺康尼', 死水深潜的先驱: '死水,深潜,死水深潜,死水套,深潜套', - 机心戏梦的钟表匠: '机心,钟表匠,机心套,钟表套' + 机心戏梦的钟表匠: '机心,钟表匠,机心套,钟表套', + 无主荒星茨冈尼亚: '荒星,无主荒星,茨冈尼亚', + 出云显世与高天神国: '出云,出云显世,高天神国' } diff --git a/resources/meta-sr/artifact/artis-mark.js b/resources/meta-sr/artifact/artis-mark.js index 67ea865e..226b1be9 100644 --- a/resources/meta-sr/artifact/artis-mark.js +++ b/resources/meta-sr/artifact/artis-mark.js @@ -3,6 +3,9 @@ * 如character/${name}/artis.js下有角色自定义规则优先使用自定义 */ export const usefulAttr = { + 砂金: { hp: 0, atk: 0, def: 100, speed: 100, cpct: 100, cdmg: 100, stance: 0, heal: 0, recharge: 75, effPct: 0, effDef: 50, dmg: 100 }, + 加拉赫: { hp: 75, atk: 0, def: 75, speed: 100, cpct: 0, cdmg: 0, stance: 100, heal: 100, recharge: 75, effPct: 0, effDef: 50, dmg: 0 }, + 黄泉: { hp: 0, atk: 100, def: 0, speed: 75, cpct: 100, cdmg: 100, stance: 0, heal: 0, recharge: 0, effPct: 0, effDef: 0, dmg: 100 }, 米沙: { hp: 0, atk: 75, def: 0, speed: 100, cpct: 100, cdmg: 100, stance: 0, heal: 0, recharge: 75, effPct: 0, effDef: 0, dmg: 100 }, 花火: { hp: 75, atk: 0, def: 75, speed: 100, cpct: 0, cdmg: 100, stance: 0, heal: 0, recharge: 100, effPct: 0, effDef: 50, dmg: 0 }, 黑天鹅: { hp: 0, atk: 100, def: 0, speed: 75, cpct: 0, cdmg: 0, stance: 0, heal: 0, recharge: 50, effPct: 100, effDef: 0, dmg: 100 }, diff --git a/resources/meta-sr/artifact/calc.js b/resources/meta-sr/artifact/calc.js index 49e8b093..9a27ec19 100644 --- a/resources/meta-sr/artifact/calc.js +++ b/resources/meta-sr/artifact/calc.js @@ -253,5 +253,21 @@ export default { stance: 30 } } + }, + 无主荒星茨冈尼亚: { + 2: [attr('cpct', 4), { + title: '敌方目标被消灭提高暴击伤害,至多提高[cdmg]%', + data: { + cdmg: 40 + } + }] + }, + 出云显世与高天神国: { + 2: [attr('atkPct', 12), { + title: '存在一名与装备者命途相同的队友时,暴击率提高[cpct]%', + data: { + cpct: 12 + } + }] } } diff --git a/resources/meta-sr/character/alias.js b/resources/meta-sr/character/alias.js index c6445374..355a2b8d 100644 --- a/resources/meta-sr/character/alias.js +++ b/resources/meta-sr/character/alias.js @@ -22,22 +22,27 @@ export const alias = { 符玄: 'type-c', 玲可: '玲宝', 驭空: '御空', - 刃: '刃刃', + 刃: '刃刃,应星', 虎克: '胡可,虎克大人,漆黑的虎克,漆黑的虎克大人,鼹鼠党,鼹鼠党老大', 银狼: '小鸭鸭,小板鸭,黑客,骇客,骇兔,憨色鸭,憨鸭', 阿兰: '', 青雀: '赌神,赌圣,青鹊,摸鱼', 黑塔: '转圈圈', '丹恒•饮月': '丹恒·饮月,饮月君,饮月,丹恒饮月,龙尊', - '托帕&账账': '托帕,账账,总监,胀胀,帐帐', + '托帕&账账': '托帕,账账,总监,胀胀,帐帐,叶琳娜', 桂乃芬: '小桂子,桂师傅,网红,格尼薇儿,格妮薇儿,桂奶粉,奶粉', 藿藿: '尾巴,藿香,藿去病,霍去病,尾巴小跟班,小怂包,霍霍,嚯嚯', 银枝: '纯美骑士', '阮•梅': '阮梅,软妹,软梅,软媒,朊梅', 雪衣: '下雪大衣', + 寒鸦: '寒冷乌鸦', 真理医生: '义父,拉帝奥,教授,真理', 黑天鹅: '天鹅', - 米沙: '米莎' + 米沙: '米莎', + 花火: '', + 黄泉: '', + 加拉赫: '', + 砂金: '卡卡瓦夏' } export const abbr = { diff --git a/resources/meta-sr/character/加拉赫/calc.js b/resources/meta-sr/character/加拉赫/calc.js new file mode 100644 index 00000000..6af6d525 --- /dev/null +++ b/resources/meta-sr/character/加拉赫/calc.js @@ -0,0 +1,38 @@ +export const details = [{ + title: '普攻伤害', + dmg: ({ talent }, dmg) => dmg(talent.a['技能伤害'], 'a') +}, { + title: '强化普攻伤害', + dmg: ({ talent }, dmg) => dmg(talent.a2['技能伤害'], 'a') +}, { + title: '战技生命回复', + dmg: ({ talent }, { heal }) => heal(talent.e['生命值回复']) +}, { + title: '天赋生命回复', + dmg: ({ talent }, { heal }) => heal(talent.t['生命值回复']) +}] + +export const mainAttr = 'atk,heal,stance' +export const defDmgIdx = 3 + +export const buffs = [{ + title: '行迹-崭新配方:基于自身击破特攻,提高治疗量[heal]%', + tree: 1, + sort: 9, + data: { + heal: ({ attr }) => Math.min(attr.stance * 0.5, 75) + } +}, { + title: '加拉赫1命:效果抵抗提高[effDef]%', + cons: 1, + data: { + effDef: 50 + } +}, { + title: '加拉赫6命:击破特攻提高[stance]%', + data: { + stance: 20 + } +}] + +export const createdBy = 'Aluxes' diff --git a/resources/meta-sr/character/加拉赫/data.json b/resources/meta-sr/character/加拉赫/data.json index c0a1d1dc..65685f28 100644 --- a/resources/meta-sr/character/加拉赫/data.json +++ b/resources/meta-sr/character/加拉赫/data.json @@ -193,7 +193,7 @@ "desc": "对指定敌方单体造成等同于加拉赫$1[i]%攻击力的属性伤害。并使目标攻击力降低$2[f1]%,持续2回合。", "tables": { "1": { - "name": "TODO", + "name": "技能伤害", "isSame": false, "values": [ 1.25, @@ -208,7 +208,7 @@ ] }, "2": { - "name": "TODO", + "name": "攻击力降低", "isSame": false, "values": [ 0.1, diff --git a/resources/meta-sr/character/希儿/calc.js b/resources/meta-sr/character/希儿/calc.js index 75831c9d..d2e7690c 100644 --- a/resources/meta-sr/character/希儿/calc.js +++ b/resources/meta-sr/character/希儿/calc.js @@ -36,7 +36,7 @@ export const buffs = [{ speedPct: 50 } }, { - title: '行迹-夜行:抗性穿透提高20', + title: '行迹-夜行:抗性穿透提高20%', tree: 2, data: { kx: 20 diff --git a/resources/meta-sr/character/砂金/calc.js b/resources/meta-sr/character/砂金/calc.js new file mode 100644 index 00000000..b15db18a --- /dev/null +++ b/resources/meta-sr/character/砂金/calc.js @@ -0,0 +1,68 @@ +export const details = [{ + title: '普攻伤害', + dmg: ({ talent, attr }, { basic }) => basic(talent.a['技能伤害'] * attr.def, 'a') +}, { + title: '战技护盾量', + dmg: ({ talent, attr }, { shield }) => shield(talent.e['防御力百分比'] * attr.def + talent.e['固定值']) +}, { + title: '终结技伤害', + dmg: ({ talent, attr }, { basic }) => basic(talent.q['技能伤害'] * attr.def, 'q') +}, { + title: '追击伤害', + dmg: ({ talent, attr, cons }, { basic }) => { + let count = cons < 4 ? 7 : 10 + let td = talent.t['每段伤害'] * count + return basic(td * attr.def, 't') + } +}, { + title: '追击护盾量', + dmg: ({ attr }, { shield }) => shield(attr.def * 0.07 + 96) +}] + +export const mainAttr = 'cpct,cdmg,def' +export const defDmgIdx = 1 + +export const buffs = [{ + title: '终结技-惊惶:击中【惊惶】状态下的地方目标时,造成的暴击伤害提高[cdmg]%', + data: { + cdmg: ({ talent }) => talent.q['暴击伤害提高'] * 100 + } +}, { + title: '天赋-枪口以右:效果抵抗提高[effDef]%', + data: { + effDef: ({ talent }) => talent.t['效果抵抗提高'] * 100 + } +}, { + title: '行迹-杠杆:基于砂金防御力,提高其自身暴击率[cpct]%', + tree: 2, + sort: 9, + data: { + cpct: ({ attr }) => attr.def <= 1600 ? 0 : Math.min(Math.floor((attr.def - 1600) / 100) * 2, 48) + } +}, { + title: '砂金1命:暴击伤害提高[cdmg]%', + cons: 1, + data: { + cdmg: 20 + } +}, { + title: '砂金2命:目标全属性抗性降低[kx]%', + cons: 2, + data: { + kx: 12 + } +}, { + title: '砂金4命:防御力提高[defPct]%,天赋的追加攻击额外增加3段攻击段数', + cons: 4, + data: { + defPct: 40 + } +}, { + title: '砂金6命:造成的伤害提高[dmg]%', + cons: 6, + data: { + dmg: 150 + } +}] + +export const createdBy = 'Aluxes' diff --git a/resources/meta-sr/character/黄泉/calc.js b/resources/meta-sr/character/黄泉/calc.js new file mode 100644 index 00000000..aed2144e --- /dev/null +++ b/resources/meta-sr/character/黄泉/calc.js @@ -0,0 +1,67 @@ +export const details = [{ + title: '普攻伤害', + dmg: ({ talent, cons }, dmg) => { + return cons < 6 ? dmg(talent.a['技能伤害'], 'a') : dmg(talent.a['技能伤害'], 'a,q') + } +}, { + title: '战技伤害·主目标', + dmg: ({ talent, cons }, dmg) => { + return cons < 6 ? dmg(talent.e['单体伤害'], 'e') : dmg(talent.e['单体伤害'], 'e,q') + } +}, { + title: '战技伤害·副目标', + dmg: ({ talent, cons }, dmg) => { + return cons < 6 ? dmg(talent.e['相邻目标伤害'], 'e') : dmg(talent.e['相邻目标伤害'], 'e,q') + } +}, { + title: '终结技伤害·对单', + params: { q: true }, + dmg: ({ talent }, dmg) => dmg(talent.q['单体伤害'] + 1.5, 'q') +}, { + title: '终结技伤害·对无花目标', + params: { q: true }, + dmg: ({ talent }, dmg) => dmg(talent.q['相邻目标伤害'], 'q') +}] + +export const mainAttr = 'atk,cpct,cdmg,dmg' +export const defDmgIdx = 3 + +export const buffs = [{ + title: '天赋:终结技期间使敌方全属性抗性降低[kx]%', + check: ({ params }) => params.q === true, + data: { + kx: ({ talent }) => talent.t['全属性抗性降低'] * 100 + } +}, { + title: '行迹-奈落:黄泉普攻、战技、终结技造成的伤害为原伤害的160%', + tree: 2, + data: { + multi: 60 + } +}, { + title: '行迹-雷心:黄泉造成的伤害提高[dmg]%,终结技额外造成150%攻击力的伤害(仅在对单时计算)', + tree: 3, + data: { + dmg: 90 + } +}, { + title: '黄泉1命:对处于负面状态敌方造成伤害时暴击率提高[cpct]%', + cons: 1, + data: { + cpct: 18 + } +}, { + title: '黄泉4命:使敌方陷入终结技易伤状态,受到终结技伤害提高[qEnemydmg]%', + cons: 4, + data: { + qEnemydmg: 8 + } +}, { + title: '黄泉6命:造成的终结技伤害全属性抗性穿透提高[kx]%,释放的普攻、战技伤害同时视为终结技伤害', + cons: 6, + data: { + kx: 20 + } +}] + +export const createdBy = 'Aluxes' diff --git a/resources/meta-sr/weapon/alias.js b/resources/meta-sr/weapon/alias.js index 2902e093..7098bfbf 100644 --- a/resources/meta-sr/weapon/alias.js +++ b/resources/meta-sr/weapon/alias.js @@ -10,6 +10,7 @@ export const abbr = { 记一位星神的陨落: '星神的陨落', 铭记于心的约定: '铭记于心', // 存护 + 两个人的演唱会: '两人的演唱会', // 虚无 决心如汗珠般闪耀: '汗珠般闪耀', 新手任务开始前: '新手任务', @@ -84,6 +85,8 @@ export const aliasCfg = { 她已闭上双眼: '眼一直闭,闭上双眼,她已闭眼,闭眼', 记忆的质料: '记忆质料,记忆', 织造命运之线: '织造命运,命运之线', + 命运从未公平: '命运公平', + 两个人的演唱会: '两人的演唱会', // 虚无 幽邃: '', @@ -101,6 +104,7 @@ export const aliasCfg = { 孤独的疗愈: '孤独疗愈,孤独', 重塑时光之忆: '重塑时光', 好戏开演: '', + 行于流逝的岸: '行于流逝,流逝的岸', // 同谐 齐颂: '', diff --git a/resources/meta-sr/weapon/存护/calc.js b/resources/meta-sr/weapon/存护/calc.js index 0c259b8f..d11d7d6f 100644 --- a/resources/meta-sr/weapon/存护/calc.js +++ b/resources/meta-sr/weapon/存护/calc.js @@ -51,6 +51,29 @@ export default function (staticIdx, keyIdx) { } } } + ], + 命运从未公平: [ + staticIdx(1, 'defPct'), + (tables) => { + return { + title: '装备者为我方提供护盾时,暴击伤害提高[cdmg]%。追击命中敌方时,使敌方目标受到伤害提高[enemydmg]%', + data: { + cdmg: tables[2], + enemydmg: tables[4] + } + } + } + ], + 两个人的演唱会: [ + staticIdx(1, 'defPct'), + (tables) => { + return { + title: '基于场上持有护盾的角色数目,提高装备者造成的伤害[dmg]%', + data: { + dmg: tables[2] * 4 + } + } + } ] } } diff --git a/resources/meta-sr/weapon/虚无/calc.js b/resources/meta-sr/weapon/虚无/calc.js index 5919cf29..15bbcad4 100644 --- a/resources/meta-sr/weapon/虚无/calc.js +++ b/resources/meta-sr/weapon/虚无/calc.js @@ -84,6 +84,18 @@ export default function (staticIdx, keyIdx) { } } } + ], + 行于流逝的岸: [ + staticIdx(1, 'cdmg'), + (tables) => { + return { + title: '造成的伤害提高[dmg]%,终结技伤害额外提高[qDmg]%', + data: { + dmg: tables[2], + qDmg: tables[3] + } + } + } ] } }