From 4d751b88379f79d533e551d33a72fe57f608c3e9 Mon Sep 17 00:00:00 2001 From: yoimiya-kokomi <592981798@qq.com> Date: Sun, 31 Jul 2022 05:06:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3V3=E4=BA=91=E5=B4=BD=E4=B8=8B?= =?UTF-8?q?=E5=B8=AE=E5=8A=A9=E8=A2=AB=E9=87=8D=E5=A4=8D=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adapter/index.js | 7 +- apps/character.js | 2 +- apps/character/avatar-card.js | 2 +- apps/character/avatar-wife.js | 5 +- apps/character/character-img-upload.js | 158 ++++++++-------- apps/character/profile-artis.js | 145 +++++++-------- apps/character/profile-common.js | 1 - apps/character/utils.js | 54 +++--- components/Common.js | 6 +- resources/meta/character/七七/calc.js | 16 +- resources/meta/character/久岐忍/calc.js | 18 +- resources/meta/character/九条裟罗/calc.js | 16 +- resources/meta/character/优菈/calc.js | 36 ++-- resources/meta/character/八重神子/calc.js | 28 +-- resources/meta/character/凝光/calc.js | 12 +- resources/meta/character/凯亚/calc.js | 10 +- resources/meta/character/刻晴/calc.js | 12 +- resources/meta/reliquaries/calc.js | 132 +++++++------- .../meta/reliquaries/reliquaries-mark-new.js | 154 ++++++++-------- .../meta/reliquaries/reliquaries-mark.js | 169 +++++++++--------- 20 files changed, 486 insertions(+), 497 deletions(-) diff --git a/adapter/index.js b/adapter/index.js index e63cdc52..96e463a6 100644 --- a/adapter/index.js +++ b/adapter/index.js @@ -17,8 +17,12 @@ export class miao extends plugin { }) } + accept () { + this.e.original_msg = this.e.msg + } + async dispatch (e) { - let msg = e.raw_message + let msg = e.original_msg e.checkAuth = async function (cfg) { return await checkAuth(e, cfg) } @@ -33,7 +37,6 @@ export class miao extends plugin { render }) if (ret === true) { - console.log('ret true') return true } } diff --git a/apps/character.js b/apps/character.js index 4a6ae352..7109cdb1 100644 --- a/apps/character.js +++ b/apps/character.js @@ -22,7 +22,7 @@ export { wife, pokeWife, wifeReg } from './character/avatar-wife.js' // 查看当前角色 export async function character (e, { render }) { - let msg = isV3 ? e.raw_message : e.msg + let msg = e.original_msg || e.msg if (!msg) { return } diff --git a/apps/character/avatar-card.js b/apps/character/avatar-card.js index 96a4ed0a..45d84bb2 100644 --- a/apps/character/avatar-card.js +++ b/apps/character/avatar-card.js @@ -79,7 +79,7 @@ async function renderCard (e, avatar, render, renderType = 'card') { custom: char.isCustom, ...getCharacterData(avatar), ds: char.getData('name,id,title,desc') - }, { e, render, scale: 1.6 }) + }, { e, render, scale: 1.6, retMsgId: true }) if (msgRes && msgRes.message_id) { // 如果消息发送成功,就将message_id和图片路径存起来,1小时过期 await redis.set(`miao:original-picture:${msgRes.message_id}`, bg.img, { EX: 3600 }) diff --git a/apps/character/avatar-wife.js b/apps/character/avatar-wife.js index 504e0b81..c6120df2 100644 --- a/apps/character/avatar-wife.js +++ b/apps/character/avatar-wife.js @@ -66,8 +66,8 @@ export async function wife (e, { render, User }) { }) if (!targetCfg && !e.isPoke) return true - let avatarList = []; - let avatar = {}; + let avatarList = [] + let avatar = {} let wifeList = [] let MysApi = await e.getMysApi({ @@ -165,7 +165,6 @@ export async function wife (e, { render, User }) { await selfUser.setCfg(`wife.${targetCfg.key}`, addRet) e.reply(`${targetCfg.keyword[0]}已经设置:${addRet.join(',')}`) return true - break case '列表': case '是': case '是谁': diff --git a/apps/character/character-img-upload.js b/apps/character/character-img-upload.js index 9ef2c5bb..9fdefa07 100644 --- a/apps/character/character-img-upload.js +++ b/apps/character/character-img-upload.js @@ -1,142 +1,140 @@ -import fs from "fs"; -import { promisify } from "util"; -import { pipeline } from "stream"; -import { segment } from "oicq"; -import MD5 from "md5"; -import fetch from "node-fetch"; -import lodash from "lodash"; -import Data from "../../components/Data.js"; -import { Character } from "../../components/models.js"; +import fs from 'fs' +import { promisify } from 'util' +import { pipeline } from 'stream' +import { segment } from 'oicq' +import MD5 from 'md5' +import fetch from 'node-fetch' +import lodash from 'lodash' +import Data from '../../components/Data.js' +import { Character } from '../../components/models.js' - -const _res_path = process.cwd() + "/plugins/miao-plugin/resources/"; -let regex = /^#?\s*(?:喵喵)?(?:上传|添加)(.+)(?:照片|写真|图片|图像)\s*$/; +const resPath = process.cwd() + '/plugins/miao-plugin/resources/' +let regex = /^#?\s*(?:喵喵)?(?:上传|添加)(.+)(?:照片|写真|图片|图像)\s*$/ export const rule = { uploadCharacterImage: { hashMark: true, - reg: "^#*喵喵(上传|添加)(.+)写真.*$", - describe: "喵喵上传角色写真", - }, -}; + reg: '^#*喵喵(上传|添加)(.+)写真.*$', + describe: '喵喵上传角色写真' + } +} -export async function uploadCharacterImg(e) { - let promise = await isAllowedToUploadCharacterImage(e); +export async function uploadCharacterImg (e) { + let promise = await isAllowedToUploadCharacterImage(e) if (!promise) { - return; + return } - let imageMessages = []; - let msg = e.msg; - let regRet = regex.exec(msg); - //通过解析正则获取消息中的角色名 + let imageMessages = [] + let msg = e.msg + let regRet = regex.exec(msg) + // 通过解析正则获取消息中的角色名 if (!regRet || !regRet[1]) { - return; + return } - let char = Character.get(regRet[1]); + let char = Character.get(regRet[1]) if (!char || !char.name) { - return; + return } - let name = char.name; + let name = char.name for (let val of e.message) { - if ("image" === val.type) { - imageMessages.push(val); + if (val.type === 'image') { + imageMessages.push(val) } } if (imageMessages.length <= 0) { // TODO 支持at图片添加,以及支持后发送 - e.reply("消息中未找到图片,请将要发送的图片与消息一同发送.."); - return true; + e.reply('消息中未找到图片,请将要发送的图片与消息一同发送..') + return true } - await saveImages(e, name, imageMessages); - return true; + await saveImages(e, name, imageMessages) + return true } -async function saveImages(e, name, imageMessages) { - let imgMaxSize = e.groupConfig.imgMaxSize || 1; - let pathSuffix = `character-img/${name}/upload`; - let path = _res_path + pathSuffix; +async function saveImages (e, name, imageMessages) { + let imgMaxSize = e.groupConfig.imgMaxSize || 1 + let pathSuffix = `character-img/${name}/upload` + let path = resPath + pathSuffix if (!fs.existsSync(path)) { - Data.createDir(_res_path, pathSuffix); + Data.createDir(resPath, pathSuffix) } - let senderName = lodash.truncate(e.sender.card, { length: 8 }); - let imgCount = 0; + let senderName = lodash.truncate(e.sender.card, { length: 8 }) + let imgCount = 0 for (let val of imageMessages) { - const response = await fetch(val.url); + const response = await fetch(val.url) if (!response.ok) { - e.reply("图片下载失败。"); - return true; + e.reply('图片下载失败。') + return true } - if (response.headers.get("size") > 1024 * 1024 * imgMaxSize) { - e.reply([segment.at(e.user_id, senderName), "添加失败:图片太大了。"]); - return true; + if (response.headers.get('size') > 1024 * 1024 * imgMaxSize) { + e.reply([segment.at(e.user_id, senderName), '添加失败:图片太大了。']) + return true } - let fileName = val.file.substring(0, val.file.lastIndexOf(".")); - let fileType = val.file.substring(val.file.lastIndexOf(".") + 1); - if (response.headers.get("content-type") === "image/gif") { - fileType = "gif"; + let fileName = val.file.substring(0, val.file.lastIndexOf('.')) + let fileType = val.file.substring(val.file.lastIndexOf('.') + 1) + if (response.headers.get('content-type') === 'image/gif') { + fileType = 'gif' } - let imgPath = `${path}/${fileName}.${fileType}`; - const streamPipeline = promisify(pipeline); - await streamPipeline(response.body, fs.createWriteStream(imgPath)); + let imgPath = `${path}/${fileName}.${fileType}` + const streamPipeline = promisify(pipeline) + await streamPipeline(response.body, fs.createWriteStream(imgPath)) // 使用md5作为文件名 - let buffers = fs.readFileSync(imgPath); - let base64 = new Buffer.from(buffers, 'base64').toString(); - let md5 = MD5(base64); + let buffers = fs.readFileSync(imgPath) + let base64 = Buffer.from(buffers, 'base64').toString() + let md5 = MD5(base64) let newImgPath = `${path}/${md5}.${fileType}` if (fs.existsSync(newImgPath)) { fs.unlink(newImgPath, (err) => { - console.log('unlink', err); - }); + console.log('unlink', err) + }) } fs.rename(imgPath, newImgPath, (err) => { - console.log('rename', err); + console.log('rename', err) }) - imgCount++; - Bot.logger.mark(`添加成功: ${path}/${fileName}`); + imgCount++ + Bot.logger.mark(`添加成功: ${path}/${fileName}`) } - e.reply([segment.at(e.user_id, senderName), `\n成功添加${imgCount}张${name}图片。`]); - return true; + e.reply([segment.at(e.user_id, senderName), `\n成功添加${imgCount}张${name}图片。`]) + return true } -async function isAllowedToUploadCharacterImage(e) { +async function isAllowedToUploadCharacterImage (e) { if (!e.message) { - return false; + return false } if (!e.msg) { - return false; + return false } if (!e.isMaster) { - return false; + return false } // 由于添加角色图是全局,暂时屏蔽非管理员的添加 if (e.isPrivate) { if (!e.isMaster) { - e.reply(`只有主人才能添加。`); - return false; + e.reply('只有主人才能添加。') + return false } - return true; + return true } - let group_id = e.group_id; - if (!group_id) { - return false; + let groupId = e.group_id + if (!groupId) { + return false } if (e.groupConfig.imgAddLimit === 2) { if (!e.isMaster) { - e.reply(`只有主人才能添加。`); - return false; + e.reply('只有主人才能添加。') + return false } } if (e.groupConfig.imgAddLimit === 1 && !e.isMaster) { - if (!(e.sender.role === "owner" || e.sender.role === "admin")) { - e.reply(`只有管理员才能添加。`); - return false; + if (!(e.sender.role === 'owner' || e.sender.role === 'admin')) { + e.reply('只有管理员才能添加。') + return false } } - return true; + return true } - diff --git a/apps/character/profile-artis.js b/apps/character/profile-artis.js index ab0991d6..b3655575 100644 --- a/apps/character/profile-artis.js +++ b/apps/character/profile-artis.js @@ -2,37 +2,37 @@ * 角色圣遗物评分详情 * * */ -import lodash from "lodash"; -import { Profile, Common, Models, Format } from "../../components/index.js"; -import { autoRefresh, getTargetUid, profileHelp, autoGetProfile } from "./profile-common.js"; -import { Character, Artifact } from "../../components/models.js"; +import lodash from 'lodash' +import { Profile, Common, Format } from '../../components/index.js' +import { getTargetUid, profileHelp, autoGetProfile } from './profile-common.js' +import { Artifact } from '../../components/models.js' /* * 角色圣遗物面板 * */ -export async function profileArtis(e, { render }) { - let { uid, avatar } = e; +export async function profileArtis (e, { render }) { + let { uid, avatar } = e let { profile, char, err } = await autoGetProfile(e, uid, avatar, async () => { - await profileArtis(e, { render }); - }); + await profileArtis(e, { render }) + }) if (err) { - return; + return } - let charCfg = Artifact.getCharCfg(profile.name); - let { artis, totalMark, totalMarkClass, usefulMark } = getArtis(profile.name, profile.artis); + let charCfg = Artifact.getCharCfg(profile.name) + let { artis, totalMark, totalMarkClass, usefulMark } = getArtis(profile.name, profile.artis) if (!profile.artis || profile.artis.length === 0) { - e.reply("未能获得圣遗物详情,请重新获取面板信息后查看") - return true; + e.reply('未能获得圣遗物详情,请重新获取面板信息后查看') + return true } - let { attrMap } = Artifact.getMeta(); + let { attrMap } = Artifact.getMeta() - //渲染图像 - return await Common.render("character/artis-mark", { + // 渲染图像 + return await Common.render('character/artis-mark', { uid, elem: char.elem, data: profile, @@ -42,99 +42,96 @@ export async function profileArtis(e, { render }) { usefulMark, attrMap, charCfg - }, { e, render, scale: 1.3 }); + }, { e, render, scale: 1.3 }) } /* * 圣遗物列表 * */ -export async function profileArtisList(e, { render }) { - - let uid = await getTargetUid(e); +export async function profileArtisList (e, { render }) { + let uid = await getTargetUid(e) if (!uid) { - return true; + return true } - let artis = [], - profiles = Profile.getAll(uid) || {}; + let artis = [] + let profiles = Profile.getAll(uid) || {} if (!profiles || profiles.length === 0) { - e.reply("暂无角色圣遗物详情"); - return true; + e.reply('暂无角色圣遗物详情') + return true } lodash.forEach(profiles || [], (ds) => { - let name = ds.name; - if (!name || name === "空" || name === "荧") { - return; + let name = ds.name + if (!name || name === '空' || name === '荧') { + return } - let usefulMark; + let usefulMark - let charCfg = Artifact.getCharCfg(name); - usefulMark = charCfg.titleWeight; + let charCfg = Artifact.getCharCfg(name) + usefulMark = charCfg.titleWeight /* 处理圣遗物 */ if (ds.artis) { - let newScore = Artifact.getArtisMark(name, ds.artis); + let newScore = Artifact.getArtisMark(name, ds.artis) lodash.forEach(ds.artis, (arti, idx) => { if (!arti.name) { - return; + return } - idx = idx.replace("arti", ""); - let mark = newScore[idx]; - let maxMark = Artifact.getMaxMark(name, arti.main[0] || ""); - arti.mark = Format.comma(mark, 1); - arti._mark = mark; - arti.markClass = Artifact.getMarkClass(mark); - arti.main = Artifact.formatArti(arti.main); - arti.attrs = Artifact.formatArti(arti.attrs); - arti.usefulMark = usefulMark; - arti.avatar = name; - artis.push(arti); + idx = idx.replace('arti', '') + let mark = newScore[idx] + arti.mark = Format.comma(mark, 1) + arti._mark = mark + arti.markClass = Artifact.getMarkClass(mark) + arti.main = Artifact.formatArti(arti.main) + arti.attrs = Artifact.formatArti(arti.attrs) + arti.usefulMark = usefulMark + arti.avatar = name + artis.push(arti) }) } - }); + }) if (artis.length === 0) { - e.reply("请先获取角色面板数据后再查看圣遗物列表..."); - await profileHelp(e); - return true; + e.reply('请先获取角色面板数据后再查看圣遗物列表...') + await profileHelp(e) + return true } - artis = lodash.sortBy(artis, "_mark"); - artis = artis.reverse(); - artis = artis.slice(0, 28); + artis = lodash.sortBy(artis, '_mark') + artis = artis.reverse() + artis = artis.slice(0, 28) - //渲染图像 - return await Common.render("character/artis", { + // 渲染图像 + return await Common.render('character/artis', { save_id: uid, - uid: uid, - artis, - }, { e, render, scale: 1.4 }); + uid, + artis + }, { e, render, scale: 1.4 }) } - /* * 获取圣遗物评分及详情 * */ -export function getArtis(char, artisData) { - let charCfg = Artifact.getCharCfg(char); - let newScore = Artifact.getArtisMark(char, artisData); - let totalMark = 0; - let artis = []; +export function getArtis (char, artisData) { + let charCfg = Artifact.getCharCfg(char) + let newScore = Artifact.getArtisMark(char, artisData) + let totalMark = 0 + let artis = [] lodash.forEach(artisData, (arti, idx) => { - idx = idx.replace("arti", ""); - let ds = arti; - let mark = newScore[idx]; - totalMark += mark; - ds.mark = Format.comma(mark, 1); - ds.markClass = Artifact.getMarkClass(mark); - ds.main = Artifact.formatArti(arti.main, charCfg.mark, true); - ds.attrs = Artifact.formatArti(arti.attrs, charCfg.mark, false); - artis[idx * 1 - 1] = ds; - }); + idx = idx.replace('arti', '') + let ds = arti + let mark = newScore[idx] + totalMark += mark + ds.mark = Format.comma(mark, 1) + ds.markClass = Artifact.getMarkClass(mark) + ds.main = Artifact.formatArti(arti.main, charCfg.mark, true) + ds.attrs = Artifact.formatArti(arti.attrs, charCfg.mark, false) + artis[idx * 1 - 1] = ds + }) return { artis, @@ -143,7 +140,3 @@ export function getArtis(char, artisData) { usefulMark: charCfg.titleWeight } } - -function formatArti(ds) { - let ret = Profile.formatArti(ds); -} diff --git a/apps/character/profile-common.js b/apps/character/profile-common.js index 1ca1f2f5..8cfcf5fe 100644 --- a/apps/character/profile-common.js +++ b/apps/character/profile-common.js @@ -116,7 +116,6 @@ export async function autoRefresh (e) { return true } } - return true } export async function autoGetProfile (e, uid, avatar, callback) { diff --git a/apps/character/utils.js b/apps/character/utils.js index 9a304e9a..e42cb7e8 100644 --- a/apps/character/utils.js +++ b/apps/character/utils.js @@ -1,59 +1,59 @@ -import { segment } from "oicq"; +import { segment } from 'oicq' /** 获取角色卡片的原图 */ -export async function getOriginalPicture(e) { +export async function getOriginalPicture (e) { if (!e.hasReply) { - return; + return } // 引用的消息不是自己的消息 if (e.source.user_id !== e.self_id) { - return; + return } // 引用的消息不是纯图片 if (!/^\[图片]$/.test(e.source.message)) { - return; + return } // 获取原消息 - let source; + let source if (e.isGroup) { - source = (await e.group.getChatHistory(e.source.seq, 1)).pop(); + source = (await e.group.getChatHistory(e.source.seq, 1)).pop() } else { - source = (await e.friend.getChatHistory(e.source.time, 1)).pop(); + source = (await e.friend.getChatHistory(e.source.time, 1)).pop() } if (source) { - let imgPath = await redis.get(`miao:original-picture:${source.message_id}`); + let imgPath = await redis.get(`miao:original-picture:${source.message_id}`) if (imgPath) { - e.reply([segment.image(process.cwd() + "/plugins/miao-plugin/resources/" + imgPath)]); - return true; + e.reply([segment.image(process.cwd() + '/plugins/miao-plugin/resources/' + imgPath)]) + return true } if (source.time) { - let time = new Date(); + let time = new Date() // 对at错图像的增加嘲讽... if (time / 1000 - source.time < 3600) { - e.reply([segment.image(process.cwd() + "/plugins/miao-plugin/resources/common/face/what.jpg")]); - return true; + e.reply([segment.image(process.cwd() + '/plugins/miao-plugin/resources/common/face/what.jpg')]) + return true } } } - e.reply("消息太过久远了,俺也忘了原图是啥了,下次早点来吧~"); - return true; + e.reply('消息太过久远了,俺也忘了原图是啥了,下次早点来吧~') + return true } /* #敌人等级 */ -export async function enemyLv(e) { +export async function enemyLv (e) { let selfUser = await e.checkAuth({ - auth: "self" + auth: 'self' }) if (!selfUser || !e.msg) { - return true; + return true } - let ret = /(敌人|怪物)等级\s*(\d{1,3})\s*$/.exec(e.msg); + let ret = /(敌人|怪物)等级\s*(\d{1,3})\s*$/.exec(e.msg) if (ret && ret[2]) { - let lv = ret[2] * 1; - await selfUser.setCfg("char.enemyLv", lv); - lv = await selfUser.getCfg("char.enemyLv", 91); - e.reply(`敌人等级已经设置为${lv}`); - return true; + let lv = ret[2] * 1 + await selfUser.setCfg('char.enemyLv', lv) + lv = await selfUser.getCfg('char.enemyLv', 91) + e.reply(`敌人等级已经设置为${lv}`) + return true } - return true; -} \ No newline at end of file + return true +} diff --git a/components/Common.js b/components/Common.js index f3a423ea..7cae0336 100644 --- a/components/Common.js +++ b/components/Common.js @@ -17,11 +17,11 @@ export const render = async function (path, params, cfg) { } }) + let ret = true if (base64) { - return isV3 ? await e.reply(base64) : await e.reply(segment.image(`base64://${base64}`)) + ret = isV3 ? await e.reply(base64) : await e.reply(segment.image(`base64://${base64}`)) } - - return true + return cfg.retMsgId ? ret : true } export const todoV3 = function (e) { diff --git a/resources/meta/character/七七/calc.js b/resources/meta/character/七七/calc.js index d6d2341f..12810679 100644 --- a/resources/meta/character/七七/calc.js +++ b/resources/meta/character/七七/calc.js @@ -1,15 +1,15 @@ export const details = [{ - title: "E每跳治疗", + title: 'E每跳治疗', dmg: ({ - talent, - attr, - calc - }, { heal }) => heal(talent.e['持续治疗量2'][0] * calc(attr.atk) / 100 + talent.e['持续治疗量2'][1] * 1) + talent, + attr, + calc + }, { heal }) => heal(talent.e['持续治疗量2'][0] * calc(attr.atk) / 100 + talent.e['持续治疗量2'][1] * 1) }, { - title: "度厄真符每次治疗", + title: '度厄真符每次治疗', dmg: ({ talent, attr, calc }, { heal }) => heal(talent.q['治疗量2'][0] * calc(attr.atk) / 100 + talent.q['治疗量2'][1] * 1) -}]; +}] -export const mainAttr = "atk,cpct,cdmg"; +export const mainAttr = 'atk,cpct,cdmg' export const buffs = [] diff --git a/resources/meta/character/久岐忍/calc.js b/resources/meta/character/久岐忍/calc.js index 208ed738..d04d8eef 100644 --- a/resources/meta/character/久岐忍/calc.js +++ b/resources/meta/character/久岐忍/calc.js @@ -1,29 +1,29 @@ export const details = [{ - title: "E释放伤害", + title: 'E释放伤害', dmg: ({ talent }, dmg) => dmg(talent.e['技能伤害'], 'e') }, { - title: "E每跳治疗", + title: 'E每跳治疗', showDetail: true, dmg: ({ talent, calc, attr }, { heal }) => { - let ec = talent.e['越祓草轮治疗量2']; + let ec = talent.e['越祓草轮治疗量2'] return heal(calc(attr.hp) * ec[0] / 100 + ec[1] * 1 + calc(attr.mastery) * 0.75) } }, { - title: "Q每跳伤害", + title: 'Q每跳伤害', dmg: ({ talent, calc, attr }, { basic }) => basic(talent.q['单次伤害'] * calc(attr.hp) / 100, 'q') -}]; +}] -export const mainAttr = "hp,atk,cpct,cdmg,mastery"; +export const mainAttr = 'hp,atk,cpct,cdmg,mastery' export const buffs = [{ - title: "久岐忍被动:生命低于50%时提高治疗加成15%", + title: '久岐忍被动:生命低于50%时提高治疗加成15%', data: { heal: 15 } }, { - title: "久岐忍被动:基于元素精通提高治疗量[healNum],伤害[ePlus]", + title: '久岐忍被动:基于元素精通提高治疗量[healNum],伤害[ePlus]', data: { healNum: ({ attr, calc }) => calc(attr.mastery) * 0.75, ePlus: ({ attr, calc }) => calc(attr.mastery) * 0.25 } -}]; \ No newline at end of file +}] diff --git a/resources/meta/character/九条裟罗/calc.js b/resources/meta/character/九条裟罗/calc.js index b9931aea..7b2cbc3c 100644 --- a/resources/meta/character/九条裟罗/calc.js +++ b/resources/meta/character/九条裟罗/calc.js @@ -1,28 +1,28 @@ export const details = [{ - title: "E提升攻击力", + title: 'E提升攻击力', dmg: ({ talent, attr }) => { return { avg: talent.e['攻击力加成比例'] * attr.atk.base / 100 } } }, { - title: "E后Q首段伤害", + title: 'E后Q首段伤害', dmg: ({ talent }, dmg) => dmg(talent.q['天狗咒雷·金刚坏 伤害'], 'q') }, { - title: "E后Q每段", + title: 'E后Q每段', dmg: ({ talent }, dmg) => dmg(talent.q['天狗咒雷·雷砾 伤害'], 'q') -}]; +}] -export const defDmgIdx = 1; -export const mainAttr = "atk,cpct,cdmg"; +export const defDmgIdx = 1 +export const mainAttr = 'atk,cpct,cdmg' export const buffs = [{ - title: "九条E技能:提升攻击力[atkPlus]", + title: '九条E技能:提升攻击力[atkPlus]', data: { atkPlus: ({ attr, talent }) => talent.e['攻击力加成比例'] * attr.atk.base / 100 } }, { - title: "九条6命:提升60%雷元素爆伤", + title: '九条6命:提升60%雷元素爆伤', cons: 6, data: { cdmg: 60 diff --git a/resources/meta/character/优菈/calc.js b/resources/meta/character/优菈/calc.js index 2a07f860..e4dce22f 100644 --- a/resources/meta/character/优菈/calc.js +++ b/resources/meta/character/优菈/calc.js @@ -1,21 +1,21 @@ -let tmpDmg = false; +let tmpDmg = false export const details = [{ - title: "普攻尾段2次伤害", + title: '普攻尾段2次伤害', params: { e: false }, dmg: ({ talent }, dmg) => dmg(talent.a['五段伤害'], 'a', 'phy') }, { - title: "E0层长按伤害", + title: 'E0层长按伤害', params: { gj: false }, dmg: ({ talent }, dmg) => { tmpDmg = dmg(talent.e['长按伤害'], 'e') - return tmpDmg; + return tmpDmg } }, { - title: "E2层长按伤害", + title: 'E2层长按伤害', params: { gj: true }, dmg: ({ talent }, dmg) => { - let e = tmpDmg; + let e = tmpDmg let g = dmg(talent.e['冰涡之剑伤害'], 'e') let j = dmg(talent.q['光降之剑基础伤害'], 'e', 'phy') return { @@ -24,45 +24,45 @@ export const details = [{ } } }, ({ cons, weapon }) => { - let buffCount = 12; - if (weapon.name === "松籁响起之时") { - buffCount = 13; + let buffCount = 12 + if (weapon.name === '松籁响起之时') { + buffCount = 13 if (weapon.affix_level >= 4) { - buffCount = 14; + buffCount = 14 } } if (cons === 6) { - buffCount = buffCount + 11; + buffCount = buffCount + 11 } return { title: `光降之剑${buffCount}层伤害`, params: { gj: true }, dmg: ({ talent }, dmg) => dmg(talent.q['光降之剑基础伤害'] + talent.q['每层能量伤害'] * buffCount, 'q', 'phy') } -}]; +}] -export const mainAttr = "atk,cpct,cdmg"; -export const enemyName = "魔偶/女士/雷神"; +export const mainAttr = 'atk,cpct,cdmg' +export const enemyName = '魔偶/女士/雷神' export const buffs = [{ - title: "优菈天赋:E消耗冰涡之剑后降低抗性[kx]%", + title: '优菈天赋:E消耗冰涡之剑后降低抗性[kx]%', check: ({ params }) => params.gj !== false, data: { kx: ({ talent }) => talent.e['冰元素抗性降低'] } }, { - title: "优菈一命:消耗冷酷之心后物理伤害提高30%", + title: '优菈一命:消耗冷酷之心后物理伤害提高30%', cons: 1, data: { phy: ({ params }) => params.gj ? 30 : 0 } }, { - title: "优菈四命:对生命值低于50%的敌人,光降之剑造成的伤害提高25%", + title: '优菈四命:对生命值低于50%的敌人,光降之剑造成的伤害提高25%', cons: 4, data: { qDmg: 25 } }, { - title: "优菈6命:光降之剑额外获得5层Buff,普攻/E有50%概率额外获得1层", + title: '优菈6命:光降之剑额外获得5层Buff,普攻/E有50%概率额外获得1层', cons: 6 }] diff --git a/resources/meta/character/八重神子/calc.js b/resources/meta/character/八重神子/calc.js index 8d46c5e6..c28efa68 100644 --- a/resources/meta/character/八重神子/calc.js +++ b/resources/meta/character/八重神子/calc.js @@ -1,36 +1,36 @@ export const details = [{ check: ({ cons }) => cons < 2, - title: "叄阶杀生樱伤害", - dmg: ({ talent, attr }, dmg) => dmg(talent.e["杀生樱伤害·叁阶"], "e") + title: '叄阶杀生樱伤害', + dmg: ({ talent, attr }, dmg) => dmg(talent.e['杀生樱伤害·叁阶'], 'e') }, { check: ({ cons }) => cons >= 2, - title: "肆阶杀生樱伤害", - dmg: ({ talent, attr }, dmg) => dmg(talent.e["杀生樱伤害·肆阶"], "e") + title: '肆阶杀生樱伤害', + dmg: ({ talent, attr }, dmg) => dmg(talent.e['杀生樱伤害·肆阶'], 'e') }, { - title: "Q天狐霆雷伤害", - dmg: ({ talent }, dmg) => dmg(talent.q['天狐霆雷伤害'], "q") + title: 'Q天狐霆雷伤害', + dmg: ({ talent }, dmg) => dmg(talent.q['天狐霆雷伤害'], 'q') }, { - title: "四段Q总伤害", + title: '四段Q总伤害', dmg: ({ talent }, dmg) => dmg(talent.q['技能伤害'] + talent.q['天狐霆雷伤害'] * 3, 'q') -}]; +}] -export const mainAttr = "atk,cpct,cdmg,mastery"; +export const mainAttr = 'atk,cpct,cdmg,mastery' export const buffs = [{ - title: `被动天赋:基于元素精通提高杀生樱伤害[eDmg]%`, + title: '被动天赋:基于元素精通提高杀生樱伤害[eDmg]%', data: { - "eDmg": ({ attr, calc }) => calc(attr.mastery) * 0.15 + eDmg: ({ attr, calc }) => calc(attr.mastery) * 0.15 } }, { check: ({ cons }) => cons >= 4, - title: "4命效果:杀生樱命中敌人后提高雷伤[dmg]%", + title: '4命效果:杀生樱命中敌人后提高雷伤[dmg]%', data: { dmg: 20 } }, { cons: 6, - title: "6命效果:杀生樱无视敌人[eDef]%防御", + title: '6命效果:杀生樱无视敌人[eDef]%防御', data: { eDef: 60 } -}]; \ No newline at end of file +}] diff --git a/resources/meta/character/凝光/calc.js b/resources/meta/character/凝光/calc.js index 190ce84a..323c0344 100644 --- a/resources/meta/character/凝光/calc.js +++ b/resources/meta/character/凝光/calc.js @@ -1,18 +1,18 @@ export const details = [{ - title: "重击伤害", + title: '重击伤害', dmg: ({ talent }, dmg) => dmg(talent.a['重击伤害'], 'a2') }, { - title: "璇玑屏伤害", + title: '璇玑屏伤害', dmg: ({ talent }, dmg) => dmg(talent.e['技能伤害'], 'e') }, { - title: "Q单颗宝石伤害", + title: 'Q单颗宝石伤害', dmg: ({ talent }, dmg) => dmg(talent.q['宝石伤害'], 'q') -}]; +}] -export const mainAttr = "atk,cpct,cdmg"; +export const mainAttr = 'atk,cpct,cdmg' export const buffs = [{ - title: "凝光被动:穿过璇玑屏获得12%岩伤加成", + title: '凝光被动:穿过璇玑屏获得12%岩伤加成', data: { dmg: 12 } diff --git a/resources/meta/character/凯亚/calc.js b/resources/meta/character/凯亚/calc.js index b5f6b4f5..5976760f 100644 --- a/resources/meta/character/凯亚/calc.js +++ b/resources/meta/character/凯亚/calc.js @@ -1,11 +1,11 @@ export const details = [{ - title: "霜袭E伤害", + title: '霜袭E伤害', dmg: ({ talent }, dmg) => dmg(talent.e['技能伤害'], 'e') }, { - title: "Q单段伤害", + title: 'Q单段伤害', dmg: ({ talent }, dmg) => dmg(talent.q['技能伤害'], 'q') -}]; +}] -export const mainAttr = "atk,cpct,cdmg"; +export const mainAttr = 'atk,cpct,cdmg' -export const buffs = []; \ No newline at end of file +export const buffs = [] diff --git a/resources/meta/character/刻晴/calc.js b/resources/meta/character/刻晴/calc.js index 914c1b31..987f149e 100644 --- a/resources/meta/character/刻晴/calc.js +++ b/resources/meta/character/刻晴/calc.js @@ -1,19 +1,19 @@ export const details = [{ - title: "E后重击伤害", + title: 'E后重击伤害', dmg: ({ talent }, dmg) => dmg(talent.a['重击伤害'], 'a2') }, { - title: "Q单段伤害", + title: 'Q单段伤害', dmg: ({ talent }, dmg) => dmg(talent.q['连斩伤害2'][0], 'q') }, { - title: "Q总伤害", + title: 'Q总伤害', params: { q: 1 }, dmg: ({ talent }, dmg) => dmg(talent.q['技能伤害'] + talent.q['连斩伤害'] + talent.q['最后一击伤害'], 'q') -}]; +}] -export const mainAttr = "atk,cpct,cdmg"; +export const mainAttr = 'atk,cpct,cdmg' export const buffs = [{ - title: "刻晴6命:4层获得24%雷伤加成", + title: '刻晴6命:4层获得24%雷伤加成', cons: 6, data: { dmg: 24 diff --git a/resources/meta/reliquaries/calc.js b/resources/meta/reliquaries/calc.js index 2985e053..07648659 100644 --- a/resources/meta/reliquaries/calc.js +++ b/resources/meta/reliquaries/calc.js @@ -1,78 +1,78 @@ export const buffs = { - "行者之心4": { - title: "行者4:重击的暴击率提高30%", + 行者之心4: { + title: '行者4:重击的暴击率提高30%', data: { a2Cpct: 30 } }, - "勇士之心4": { - title: "勇士4:对生命值高于50%的敌人,造成的伤害增加30%", + 勇士之心4: { + title: '勇士4:对生命值高于50%的敌人,造成的伤害增加30%', data: { dmg: 30 } }, - "武人2": { - title: "武人2: 普攻与重击造成的伤害提高15%", + 武人2: { + title: '武人2: 普攻与重击造成的伤害提高15%', data: { aDmg: 15, a2Dmg: 15 } }, - "武人4": { - title: "武人4:施放元素战技后的8秒内,普攻和重击伤害提升25%", + 武人4: { + title: '武人4:施放元素战技后的8秒内,普攻和重击伤害提升25%', data: { aDmg: 25, a2Dmg: 25 } }, - "战狂4": { - title: "战狂4:生命值低于70%时,暴击率提升24%", + 战狂4: { + title: '战狂4:生命值低于70%时,暴击率提升24%', data: { cpct: 24 } }, - "染血的骑士道4": { - title: "染血4:击败敌人后的10秒内,重击造成的伤害提升50%", + 染血的骑士道4: { + title: '染血4:击败敌人后的10秒内,重击造成的伤害提升50%', data: { a2Dmg: 50 } }, - "角斗士的终幕礼4": { + 角斗士的终幕礼4: { check: ({ weaponType }) => ['单手剑', '双手剑', '长柄武器'].includes(weaponType), - title: "角斗4:角色普通攻击造成的伤害提高35%", + title: '角斗4:角色普通攻击造成的伤害提高35%', data: { aDmg: 35 } }, - "流浪大地的乐团4": { + 流浪大地的乐团4: { check: ({ weaponType }) => ['法器', '弓'].includes(weaponType), - title: "乐团4:角色重击造成的伤害提高35%", + title: '乐团4:角色重击造成的伤害提高35%', data: { a2Dmg: 35 } }, - "苍白之火4": { - title: "苍白4:2层提高18%攻击力,物理伤害额外提高25%", + 苍白之火4: { + title: '苍白4:2层提高18%攻击力,物理伤害额外提高25%', data: { atkPct: 18, phy: 25 } }, - "赌徒2": { - title: "赌徒2:元素战技造成的伤害提升20%", + 赌徒2: { + title: '赌徒2:元素战技造成的伤害提升20%', data: { eDmg: 20 } }, - "悠古的磐岩4": { - title: "磐岩4:获得元素反应晶片,对应元素伤害提高35%", + 悠古的磐岩4: { + title: '磐岩4:获得元素反应晶片,对应元素伤害提高35%', data: { dmg: 35 } }, - "炽烈的炎之魔女4": { - check: ({ element }) => element === "火", - title: "魔女4:蒸发、融化伤害提高15%,[buffCount]层额外提高[dmg]%火元素伤害加成", + 炽烈的炎之魔女4: { + check: ({ element }) => element === '火', + title: '魔女4:蒸发、融化伤害提高15%,[buffCount]层额外提高[dmg]%火元素伤害加成', data: { zf: 15, rh: 15, @@ -80,128 +80,128 @@ export const buffs = { buffCount: ({ params }) => params.monv || 1 } }, - "昔日宗室之仪2": { - title: "宗室2:元素爆发造成的伤害提升20%", + 昔日宗室之仪2: { + title: '宗室2:元素爆发造成的伤害提升20%', data: { qDmg: 20 } }, - "昔日宗室之仪4": { - title: "宗室4:施放元素爆发后,攻击力提升20%", - check: ({ currentTalent }) => !currentTalent || currentTalent === "q", + 昔日宗室之仪4: { + title: '宗室4:施放元素爆发后,攻击力提升20%', + check: ({ currentTalent }) => !currentTalent || currentTalent === 'q', data: { atkPct: 20 } }, - "冰风迷途的勇士4": { - check: ({ element }) => element === "冰", - title: "冰套4:攻击处于冰元素影响下的敌人时,暴击率提高20%", + 冰风迷途的勇士4: { + check: ({ element }) => element === '冰', + title: '冰套4:攻击处于冰元素影响下的敌人时,暴击率提高20%', data: { cpct: 20 } }, - "沉沦之心4": { - title: "水套4:施放元素战技后,普攻与重击伤害提高30%", + 沉沦之心4: { + title: '水套4:施放元素战技后,普攻与重击伤害提高30%', data: { aDmg: 30, a2Dmg: 30 } }, - "冰之川与雪之砂4": { - title: "冰雪4:融化加成提高15%,释放元素爆发后,冰伤提高30%", + 冰之川与雪之砂4: { + title: '冰雪4:融化加成提高15%,释放元素爆发后,冰伤提高30%', data: { rh: 15, dmg: 30 } }, - "追忆之注连4": { - title: "追忆4:施放元素战技后,普通攻击、重击、下落攻击造成的伤害提高50%", + 追忆之注连4: { + title: '追忆4:施放元素战技后,普通攻击、重击、下落攻击造成的伤害提高50%', data: { aDmg: 50, a2Dmg: 50, a3Dmg: 50 } }, - "逆飞的流星4": { - title: "逆飞4:处于护盾庇护下时,获得40%普攻和重击伤害加成", + 逆飞的流星4: { + title: '逆飞4:处于护盾庇护下时,获得40%普攻和重击伤害加成', data: { aDmg: 40, a2Dmg: 40 } }, - "平息鸣雷的尊者4": { - check: ({ element }) => element === "雷", - title: "平雷4:对处于雷元素影响下的敌人造成的伤害提升35%", + 平息鸣雷的尊者4: { + check: ({ element }) => element === '雷', + title: '平雷4:对处于雷元素影响下的敌人造成的伤害提升35%', data: { dmg: 35 } }, - "渡过烈火的贤人4": { - check: ({ element }) => element === "火", - title: "渡火4:对处于火元素影响下的敌人造成的伤害提升35%", + 渡过烈火的贤人4: { + check: ({ element }) => element === '火', + title: '渡火4:对处于火元素影响下的敌人造成的伤害提升35%', data: { dmg: 35 } }, - "教官4": { - title: "教官4:触发元素反应后,队伍中所有角色的元素精通提高120点", + 教官4: { + title: '教官4:触发元素反应后,队伍中所有角色的元素精通提高120点', data: { mastery: 120 } }, - "千岩牢固4": { - title: "千岩4:元素战技命中敌人后,攻击力提升20%", + 千岩牢固4: { + title: '千岩4:元素战技命中敌人后,攻击力提升20%', data: { atkPct: 20 } }, - "绝缘之旗印4": { - title: "绝缘4:基于元素充能效率提高元素爆发[qDmg]%伤害", + 绝缘之旗印4: { + title: '绝缘4:基于元素充能效率提高元素爆发[qDmg]%伤害', data: { qDmg: ({ attr }) => Math.min(75, (attr.recharge.base + attr.recharge.plus) * 0.25) } }, - "华馆梦醒形骸记4": { - title: "华馆4:满层获得24%防御及24%岩伤加成", + 华馆梦醒形骸记4: { + title: '华馆4:满层获得24%防御及24%岩伤加成', sort: 0, data: { defPct: 24, dmg: 24 } }, - "辰砂往生录4": { - title: "辰砂4:满层提高48%攻击力", + 辰砂往生录4: { + title: '辰砂4:满层提高48%攻击力', data: { atkPct: 48 } }, - "来歆余响4": { - title: "余响4:触发提高普攻[aPlus]伤害", + 来歆余响4: { + title: '余响4:触发提高普攻[aPlus]伤害', data: { aPlus: ({ attr }) => (attr.atk.base + attr.atk.plus + attr.atk.pct * attr.atk.base / 100) * 0.7 } }, - "被怜爱的少女4": { - title: "少女4:施放元素战技或元素爆发后,受治疗效果加成提高20%", + 被怜爱的少女4: { + title: '少女4:施放元素战技或元素爆发后,受治疗效果加成提高20%', data: { healInc: 20 } }, - "翠绿之影4": { - title: "翠绿4:扩散反应造成的伤害提升60%,降低对应元素抗性40%", + 翠绿之影4: { + title: '翠绿4:扩散反应造成的伤害提升60%,降低对应元素抗性40%', sort: 5, data: { ks: 60, fykx: 40 } }, - "如雷的盛怒4": { - title: "如雷4:超载、感电、超导反应造成的伤害提升40%", + 如雷的盛怒4: { + title: '如雷4:超载、感电、超导反应造成的伤害提升40%', data: { cz: 40, gd: 40, cd: 40 } } -} \ No newline at end of file +} diff --git a/resources/meta/reliquaries/reliquaries-mark-new.js b/resources/meta/reliquaries/reliquaries-mark-new.js index 50c390cd..2eb5f3e2 100644 --- a/resources/meta/reliquaries/reliquaries-mark-new.js +++ b/resources/meta/reliquaries/reliquaries-mark-new.js @@ -9,93 +9,91 @@ export const attrValue = { dmg: 5.825, phy: 7.288, heal: 4.487 -}; +} export const attrMap = { - atk: { title: "大攻击", format: "pct", type: "normal", value: 5.83, text: "5.83%" }, - atkPlus: { title: "小攻击", format: "comma", type: "plus", }, - def: { title: "大防御", format: "pct", type: "normal", value: 7.29, text: "7.29%" }, - defPlus: { title: "小防御", format: "comma", type: "plus" }, - hp: { title: "大生命", format: "pct", type: "normal", value: 5.83, text: "5.83%" }, - hpPlus: { title: "小生命", format: "comma", type: "plus" }, - cp: { title: "暴击率", format: "pct", type: "normal", value: 3.89, text: "3.89%" }, - cd: { title: "暴击伤害", format: "pct", type: "normal", value: 7.77, text: "7.77%" }, - mastery: { title: "元素精通", format: "comma", type: "normal", value: 23.31, text: "23.31" }, - recharge: { title: "充能效率", format: "pct", type: "normal", value: 23.31, text: "23.31" }, - dmg: { title: "元素伤害", format: "pct", type: "normal", value: 5.825, text: "5.83%" }, - phy: { title: "物伤加成", format: "pct", type: "normal", value: 7.288, text: "7.29%" }, - heal: { title: "治疗加成", format: "pct", type: "normal", value: 4.487, text: "4.49%" }, -}; - - -let anMap = {}; -for (let attr in attrMap) { - anMap[attrMap[attr].title] = attr; + atk: { title: '大攻击', format: 'pct', type: 'normal', value: 5.83, text: '5.83%' }, + atkPlus: { title: '小攻击', format: 'comma', type: 'plus' }, + def: { title: '大防御', format: 'pct', type: 'normal', value: 7.29, text: '7.29%' }, + defPlus: { title: '小防御', format: 'comma', type: 'plus' }, + hp: { title: '大生命', format: 'pct', type: 'normal', value: 5.83, text: '5.83%' }, + hpPlus: { title: '小生命', format: 'comma', type: 'plus' }, + cp: { title: '暴击率', format: 'pct', type: 'normal', value: 3.89, text: '3.89%' }, + cd: { title: '暴击伤害', format: 'pct', type: 'normal', value: 7.77, text: '7.77%' }, + mastery: { title: '元素精通', format: 'comma', type: 'normal', value: 23.31, text: '23.31' }, + recharge: { title: '充能效率', format: 'pct', type: 'normal', value: 23.31, text: '23.31' }, + dmg: { title: '元素伤害', format: 'pct', type: 'normal', value: 5.825, text: '5.83%' }, + phy: { title: '物伤加成', format: 'pct', type: 'normal', value: 7.288, text: '7.29%' }, + heal: { title: '治疗加成', format: 'pct', type: 'normal', value: 4.487, text: '4.49%' } } -export const attrNameMap = anMap; +let anMap = {} +for (let attr in attrMap) { + anMap[attrMap[attr].title] = attr +} +export const attrNameMap = anMap export const mainAttr = { - 3: "atk,def,hp,mastery,recharge".split(","), - 4: "atk,def,hp,mastery,dmg,phy".split(","), - 5: "atk,def,hp,mastery,recharge,heal,cp,cd".split(",") -}; + 3: 'atk,def,hp,mastery,recharge'.split(','), + 4: 'atk,def,hp,mastery,dmg,phy'.split(','), + 5: 'atk,def,hp,mastery,recharge,heal,cp,cd'.split(',') +} -export const subAttr = "atk,def,hp,mastery,recharge,cp,cd".split(",") +export const subAttr = 'atk,def,hp,mastery,recharge,cp,cd'.split(',') export const usefulAttr = { - '神里绫人': { hp: 50, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 }, - '八重神子': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 }, - '申鹤': { hp: 0, atk: 100, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 }, - '云堇': { hp: 0, atk: 0, def: 100, cp: 50, cd: 50, mastery: 0, dmg: 25, phy: 0, recharge: 90, heal: 0 }, - '荒泷一斗': { hp: 0, atk: 50, def: 100, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 30, heal: 0 }, - '五郎': { hp: 0, atk: 50, def: 100, cp: 50, cd: 50, mastery: 0, dmg: 25, phy: 0, recharge: 90, heal: 0 }, - '班尼特': { hp: 100, atk: 50, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 70, phy: 0, recharge: 55, heal: 100 }, - '枫原万叶': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 100, dmg: 100, phy: 0, recharge: 55, heal: 0 }, - '雷电将军': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 75, phy: 0, recharge: 90, heal: 0 }, - '行秋': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 75, heal: 0 }, - '钟离': { hp: 80, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 50, recharge: 55, heal: 0 }, + 神里绫人: { hp: 50, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 }, + 八重神子: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 }, + 申鹤: { hp: 0, atk: 100, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 }, + 云堇: { hp: 0, atk: 0, def: 100, cp: 50, cd: 50, mastery: 0, dmg: 25, phy: 0, recharge: 90, heal: 0 }, + 荒泷一斗: { hp: 0, atk: 50, def: 100, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 30, heal: 0 }, + 五郎: { hp: 0, atk: 50, def: 100, cp: 50, cd: 50, mastery: 0, dmg: 25, phy: 0, recharge: 90, heal: 0 }, + 班尼特: { hp: 100, atk: 50, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 70, phy: 0, recharge: 55, heal: 100 }, + 枫原万叶: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 100, dmg: 100, phy: 0, recharge: 55, heal: 0 }, + 雷电将军: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 75, phy: 0, recharge: 90, heal: 0 }, + 行秋: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 75, heal: 0 }, + 钟离: { hp: 80, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 50, recharge: 55, heal: 0 }, '钟离-血牛': { hp: 100, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 75, phy: 0, recharge: 55, heal: 0 }, - '神里绫华': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 }, - '香菱': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 }, - '胡桃': { hp: 80, atk: 50, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, - '甘雨': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, + 神里绫华: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 }, + 香菱: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 }, + 胡桃: { hp: 80, atk: 50, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, + 甘雨: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, '甘雨-永冻': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 }, - '温迪': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 }, - '珊瑚宫心海': { hp: 100, atk: 50, def: 0, cp: 0, cd: 0, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 100 }, - '莫娜': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 75, heal: 0 }, - '阿贝多': { hp: 0, atk: 0, def: 100, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 }, - '迪奥娜': { hp: 100, atk: 50, def: 0, cp: 50, cd: 50, mastery: 0, dmg: 100, phy: 0, recharge: 90, heal: 100 }, - '优菈': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 40, phy: 100, recharge: 55, heal: 0 }, - '达达利亚': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, - '魈': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 }, - '宵宫': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, - '九条裟罗': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 }, - '琴': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 55, heal: 100 }, - '菲谢尔': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 60, recharge: 0, heal: 0 }, - '罗莎莉亚': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 70, phy: 80, recharge: 0, heal: 0 }, - '可莉': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, - '凝光': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 }, - '北斗': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 }, - '刻晴': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 0, heal: 0 }, - '托马': { hp: 100, atk: 50, def: 0, cp: 50, cd: 50, mastery: 0, dmg: 75, phy: 0, recharge: 90, heal: 0 }, - '迪卢克': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, - '芭芭拉': { hp: 100, atk: 50, def: 0, cp: 50, cd: 50, mastery: 0, dmg: 80, phy: 0, recharge: 55, heal: 100 }, + 温迪: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 }, + 珊瑚宫心海: { hp: 100, atk: 50, def: 0, cp: 0, cd: 0, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 100 }, + 莫娜: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 75, heal: 0 }, + 阿贝多: { hp: 0, atk: 0, def: 100, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 }, + 迪奥娜: { hp: 100, atk: 50, def: 0, cp: 50, cd: 50, mastery: 0, dmg: 100, phy: 0, recharge: 90, heal: 100 }, + 优菈: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 40, phy: 100, recharge: 55, heal: 0 }, + 达达利亚: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, + 魈: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 }, + 宵宫: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, + 九条裟罗: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 }, + 琴: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 55, heal: 100 }, + 菲谢尔: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 60, recharge: 0, heal: 0 }, + 罗莎莉亚: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 70, phy: 80, recharge: 0, heal: 0 }, + 可莉: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, + 凝光: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 }, + 北斗: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 }, + 刻晴: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 0, heal: 0 }, + 托马: { hp: 100, atk: 50, def: 0, cp: 50, cd: 50, mastery: 0, dmg: 75, phy: 0, recharge: 90, heal: 0 }, + 迪卢克: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, + 芭芭拉: { hp: 100, atk: 50, def: 0, cp: 50, cd: 50, mastery: 0, dmg: 80, phy: 0, recharge: 55, heal: 100 }, '芭芭拉-暴力': { hp: 50, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 50 }, - '诺艾尔': { hp: 0, atk: 50, def: 90, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 70, heal: 0 }, - '旅行者': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 }, - '重云': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 }, - '七七': { hp: 0, atk: 100, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 60, phy: 70, recharge: 55, heal: 100 }, - '凯亚': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 0, heal: 0 }, - '烟绯': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, - '早柚': { hp: 0, atk: 50, def: 0, cp: 50, cd: 50, mastery: 100, dmg: 80, phy: 0, recharge: 55, heal: 100 }, - '安柏': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 100, recharge: 0, heal: 0 }, - '丽莎': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, - '埃洛伊': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 }, - '辛焱': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 50, phy: 100, recharge: 0, heal: 0 }, - '砂糖': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 100, dmg: 40, phy: 0, recharge: 55, heal: 0 }, - '雷泽': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 50, phy: 100, recharge: 0, heal: 0 }, - '夜兰': { hp: 80, atk: 0, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 }, - '久岐忍': { hp: 100, atk: 50, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 100 }, - '鹿野院平藏': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, -}; + 诺艾尔: { hp: 0, atk: 50, def: 90, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 70, heal: 0 }, + 旅行者: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 }, + 重云: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 }, + 七七: { hp: 0, atk: 100, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 60, phy: 70, recharge: 55, heal: 100 }, + 凯亚: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 0, heal: 0 }, + 烟绯: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, + 早柚: { hp: 0, atk: 50, def: 0, cp: 50, cd: 50, mastery: 100, dmg: 80, phy: 0, recharge: 55, heal: 100 }, + 安柏: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 100, recharge: 0, heal: 0 }, + 丽莎: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 }, + 埃洛伊: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 }, + 辛焱: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 50, phy: 100, recharge: 0, heal: 0 }, + 砂糖: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 100, dmg: 40, phy: 0, recharge: 55, heal: 0 }, + 雷泽: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 50, phy: 100, recharge: 0, heal: 0 }, + 夜兰: { hp: 80, atk: 0, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 }, + 久岐忍: { hp: 100, atk: 50, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 100 }, + 鹿野院平藏: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 } +} diff --git a/resources/meta/reliquaries/reliquaries-mark.js b/resources/meta/reliquaries/reliquaries-mark.js index 06efef80..dfa6389d 100644 --- a/resources/meta/reliquaries/reliquaries-mark.js +++ b/resources/meta/reliquaries/reliquaries-mark.js @@ -1,109 +1,108 @@ export const attrMark = { - "暴击率": 2, - "暴击伤害": 1, - "元素精通": 0.25, - "大攻击": 1, - "大生命": 0.86, - "大防御": 0.7, - "小攻击": 0.12, - "小生命": 0.014, - "小防御": 0.18, - "充能效率": 0.65 + 暴击率: 2, + 暴击伤害: 1, + 元素精通: 0.25, + 大攻击: 1, + 大生命: 0.86, + 大防御: 0.7, + 小攻击: 0.12, + 小生命: 0.014, + 小防御: 0.18, + 充能效率: 0.65 } export const maxMark = { - "暴击率": 46.6, - "暴击伤害": 46.6, - "元素精通": 35, - "大攻击": 35, - "大生命": 30.1, - "大防御": 30.59, - "小攻击": 14.04, - "小生命": 25.1, - "小防御": 25.02, - "充能效率": 25.2 + 暴击率: 46.6, + 暴击伤害: 46.6, + 元素精通: 35, + 大攻击: 35, + 大生命: 30.1, + 大防御: 30.59, + 小攻击: 14.04, + 小生命: 25.1, + 小防御: 25.02, + 充能效率: 25.2 } - export const attrMap = { atk: { - title: "攻击力", - attr: "小攻击,大攻击" + title: '攻击力', + attr: '小攻击,大攻击' }, def: { - title: "防御力", - attr: "小防御,大防御" + title: '防御力', + attr: '小防御,大防御' }, hp: { - title: "生命值", - attr: "小生命,大生命" + title: '生命值', + attr: '小生命,大生命' }, cRate: { - title: "暴击率", - attr: "暴击率" + title: '暴击率', + attr: '暴击率' }, cDmg: { - title: "暴击伤害", - attr: "暴击伤害" + title: '暴击伤害', + attr: '暴击伤害' }, mastery: { - title: "元素精通", - attr: "元素精通" + title: '元素精通', + attr: '元素精通' }, recharge: { - title: "充能效率", - attr: "充能效率" + title: '充能效率', + attr: '充能效率' } } export const usefulAttr = { - "神里绫人": "hp,atk,cRate,cDmg,mastery", - "八重神子": "atk,cRate,cDmg,mastery,", - "申鹤": "atk,recharge", - "云堇": "def,recharge", - "荒泷一斗": "def,cRate,cDmg", - "五郎": "def,recharge", - "班尼特": "hp,atk,cRate,cDmg,recharge", - "枫原万叶": "mastery,cRate,cDmg,recharge", - "雷电将军": "atk,cRate,cDmg,recharge", - "行秋": "atk,cRate,cDmg,recharge", - "钟离": "hp,atk,cRate,cDmg,recharge", - "神里绫华": "atk,cRate,cDmg", - "香菱": "atk,cRate,cDmg,recharge,mastery", - "胡桃": "hp,cRate,cDmg,mastery", - "甘雨": "atk,cRate,cDmg,mastery", - "温迪": "mastery,cRate,cDmg,recharge", - "珊瑚宫心海": "hp,recharge", - "莫娜": "mastery,cRate,cDmg,recharge", - "阿贝多": "def,cRate,cDmg", - "迪奥娜": "hp,recharge", - "优菈": "atk,cRate,cDmg", - "达达利亚": "atk,cRate,cDmg,mastery", - "魈": "atk,cRate,cDmg", - "宵宫": "atk,cRate,cDmg,mastery", - "九条裟罗": "atk,cRate,cDmg,recharge", - "琴": "atk,cRate,cDmg,recharge", - "菲谢尔": "atk,cRate,cDmg", - "罗莎莉亚": "atk,cRate,cDmg", - "可莉": "atk,cRate,cDmg", - "凝光": "atk,cRate,cDmg", - "北斗": "atk,cRate,cDmg", - "刻晴": "atk,cRate,cDmg", - "托马": "hp,recharge", - "迪卢克": "atk,cRate,cDmg,mastery", - "芭芭拉": "hp,recharge", - "诺艾尔": "def,cRate,cDmg", - "旅行者": "atk,cRate,cDmg", - "重云": "atk,cRate,cDmg", - "七七": "atk,cRate,cDmg,recharge", - "凯亚": "atk,cRate,cDmg", - "烟绯": "atk,cRate,cDmg,mastery", - "早柚": "mastery,recharge", - "安柏": "atk,cRate,cDmg,mastery", - "丽莎": "atk,cRate,cDmg", - "埃洛伊": "atk,cRate,cDmg", - "辛焱": "atk,cRate,cDmg", - "砂糖": "mastery,recharge", - "雷泽": "atk,cRate,cDmg", - "夜兰": "hp,cRate,cDmg,recharge", -} \ No newline at end of file + 神里绫人: 'hp,atk,cRate,cDmg,mastery', + 八重神子: 'atk,cRate,cDmg,mastery,', + 申鹤: 'atk,recharge', + 云堇: 'def,recharge', + 荒泷一斗: 'def,cRate,cDmg', + 五郎: 'def,recharge', + 班尼特: 'hp,atk,cRate,cDmg,recharge', + 枫原万叶: 'mastery,cRate,cDmg,recharge', + 雷电将军: 'atk,cRate,cDmg,recharge', + 行秋: 'atk,cRate,cDmg,recharge', + 钟离: 'hp,atk,cRate,cDmg,recharge', + 神里绫华: 'atk,cRate,cDmg', + 香菱: 'atk,cRate,cDmg,recharge,mastery', + 胡桃: 'hp,cRate,cDmg,mastery', + 甘雨: 'atk,cRate,cDmg,mastery', + 温迪: 'mastery,cRate,cDmg,recharge', + 珊瑚宫心海: 'hp,recharge', + 莫娜: 'mastery,cRate,cDmg,recharge', + 阿贝多: 'def,cRate,cDmg', + 迪奥娜: 'hp,recharge', + 优菈: 'atk,cRate,cDmg', + 达达利亚: 'atk,cRate,cDmg,mastery', + 魈: 'atk,cRate,cDmg', + 宵宫: 'atk,cRate,cDmg,mastery', + 九条裟罗: 'atk,cRate,cDmg,recharge', + 琴: 'atk,cRate,cDmg,recharge', + 菲谢尔: 'atk,cRate,cDmg', + 罗莎莉亚: 'atk,cRate,cDmg', + 可莉: 'atk,cRate,cDmg', + 凝光: 'atk,cRate,cDmg', + 北斗: 'atk,cRate,cDmg', + 刻晴: 'atk,cRate,cDmg', + 托马: 'hp,recharge', + 迪卢克: 'atk,cRate,cDmg,mastery', + 芭芭拉: 'hp,recharge', + 诺艾尔: 'def,cRate,cDmg', + 旅行者: 'atk,cRate,cDmg', + 重云: 'atk,cRate,cDmg', + 七七: 'atk,cRate,cDmg,recharge', + 凯亚: 'atk,cRate,cDmg', + 烟绯: 'atk,cRate,cDmg,mastery', + 早柚: 'mastery,recharge', + 安柏: 'atk,cRate,cDmg,mastery', + 丽莎: 'atk,cRate,cDmg', + 埃洛伊: 'atk,cRate,cDmg', + 辛焱: 'atk,cRate,cDmg', + 砂糖: 'mastery,recharge', + 雷泽: 'atk,cRate,cDmg', + 夜兰: 'hp,cRate,cDmg,recharge' +}