Merge branch 'master' of gitee.com:yoimiya-kokomi/miao-plugin

This commit is contained in:
yoimiya-kokomi 2022-07-31 06:17:12 +08:00
commit cf4451c50a
21 changed files with 567 additions and 520 deletions

104
README.md
View File

@ -2,25 +2,15 @@
Miao-Plugin是一个Yunzai-Bot的升级插件提供包括角色查询等升级功能。
一些实验性的新功能因功能可能不稳定或者Yunzai-Bot存在类似功能会在Miao-Plugin以插件形式提供可按需选用。
部分非重复功能会在逐步稳定之后会合并入Yunzai-Bot。
具体功能可在安装插件后 通过 #喵喵帮助 进行查看。如需进行设置可通过 #喵喵设置 命令进行管理。
## 使用说明
---
Miao-Plugin需要最新版本的Yunzai-Bot请确认Yunzai-Bot已升级至最新版
# 安装与更新
## 关于面板查询
请将miao-plugin放置在Yunzai-Bot的plugins目录下重启Yunzai-Bot后即可使用。
`#面板查询` 及附带的伤害计算、圣遗物列表等功能依赖于面板查询API此API接口目前为内部小范围使用需具备token才可调用。
## 安装与更新
直接将miao-plugin放置在Yunzai-Bot的plugins目录下重启Yunzai-Bot后即可使用。
推荐使用git进行安装以方便后续升级。在BOT根目录夹打开终端运行
推荐使用git进行安装以方便后续升级。在Yunzai根目录夹打开终端运行
```
// 使用gitee
@ -34,20 +24,88 @@ git clone https://github.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugi
如果是手工下载的zip压缩包请将解压后的miao-plugin文件夹请删除压缩自带的-master后缀放置在Yunzai目录下的plugins文件夹内。
## Yunzai版本与支持
### V2-Yunzai
在V3整体稳定前推荐使用V2版Yunzai安装miao-plugin。 由于官方Yunzai已经停止更新可使用喵喵版V2-Yunzai
在Yunzai根目录夹打开终端运行
```
// 使用gitee
git remote set-url origin https://gitee.com/yoimiya-kokomi/Yunzai-Bot
// 使用github
git remote set-url origin https://github.com/yoimiya-kokomi/Yunzai-Bot
```
即可切换Yunzai远程仓库地址运行git pull拉取更新即可使用喵喵版V2-Yunzai版本>2.2.0)
V2-Yunzai在较长一段时间内会维持更新进行一些Bugfix及更新卡池等信息
### V3-Yunzai
目前V3-Yunzai正在重构中具体可参见 [Yunzai-V3](https://github.com/Le-niao/Yunzai-Bot) miao-plugin已经初步支持V3版本Yunzai可直接使用。
由于miao-plugin对V3-Yunzai正在适配中部分功能可能尚未适配或工作不正常如遇问题可通过issue提报
[issue#13](https://github.com/yoimiya-kokomi/miao-plugin/issues/74) : 如启动时报 Cannot find package 'image-size'
的错误直接在yunzai根目录下`npm install image-size --save`即可
---
# 功能说明
## #雷神面板
### #更新面板
`#更新面板` 依赖于面板查询API面板服务由 http://enka.shinshin.moe/ 提供
查询功能经Enka官方授权([issue#63](https://github.com/yoimiya-kokomi/miao-plugin/issues/63#issuecomment-1199348789))感谢Enka提供的面板查询服务
如果可以的话也请在Patreon上支持Enka或提供闲置的原神账户具体可在[Enka官网](http://enka.shinshin.moe/) Discord联系
[issue#63](https://github.com/yoimiya-kokomi/miao-plugin/issues/63#issuecomment-1199734496) :
国内网络如Enka服务访问不稳定可尝试更换 [@MiniGrayGay](https://github.com/MiniGrayGay) 大佬提供的中转服务 复制`config/profile_default.js`
为`config/profile.js`修改其中enkaApi的url配置配置完成后重启Bot即可生效
* 【链接1】https://enka.microgg.cn/
* 【链接2】https://enka.minigg.cn/
### #雷神伤害
喵喵面板附带的伤害计算功能由喵喵本地计算。如计算有偏差 #雷神伤害 查看伤害加成信息如确认伤害计算有误可提供伤害录屏截图及uid进行反馈
### #雷神圣遗物
圣遗物评分为喵喵版评分规则
---
其余文档咕咕咕中
---
# 免责声明
1. 功能仅限内部交流与小范围使用请勿将Yunzai-Bot及Miao-Plugin用于任何以盈利为目的的场景
1. 功能仅限内部交流与小范围使用请勿将Yunzai-Bot及Miao-Plugin用于以盈利为目的的场景
3. 图片与其他素材均来自于网络,仅供交流学习使用,如有侵权请联系,会立即删除
# 其他
* [Yunzai-Bot](https://github.com/Le-niao/Yunzai-Bot)
* [Miao-Plugin](https://github.com/yoimiya-kokomi/miao-plugin) ( [gitee](https://github.com/yoimiya-kokomi/miao-plugin)
/ [github](https://github.com/yoimiya-kokomi/miao-plugin))
* [Snap.Genshin](https://www.snapgenshin.com/home/) : 感谢 DGP Studio 开发的 [胡桃API](https://github.com/DGP-Studio/Snap.HutaoAPI)
* Yunzai-Bot 官方QQ群213938015
* 喵喵Miao-Plugin QQ群607710456 (暂时停止新加入)
* [官方Yunzai-Bot-V3](https://github.com/Le-niao/Yunzai-Bot) : [Gitee](https://gitee.com/Le-niao/Yunzai-Bot)
/ [Github](https://github.com/Le-niao/Yunzai-Bot)
* [喵喵Yunzai-Bot-V2](https://github.com/Le-niao/Yunzai-Bot) : [Gitee](https://gitee.com/yoimiya-kokomi/Yunzai-Bot)
/ [Github](https://github.com/yoimiya-kokomi/Yunzai-Bot)
* [喵喵插件 Miao-Plugin](https://github.com/yoimiya-kokomi/miao-plugin) : [Gitee](https://gitee.com/yoimiya-kokomi/miao-plugin)
/ [Github](https://github.com/yoimiya-kokomi/miao-plugin)
* [Enka](https://enka.network/): 感谢Enka提供的面板服务
* [Snap.Genshin](https://www.snapgenshin.com/home/) : 感谢 DGP Studio
开发的 [胡桃API](https://github.com/DGP-Studio/Snap.HutaoAPI)
* QQ群暂时停止新加入请见谅
* Yunzai-Bot 官方QQ群213938015
* 喵喵Miao-Plugin QQ群607710456
* [爱发电](https://afdian.net/@kokomi) 欢迎老板打赏,喵~

View File

@ -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
}
}

View File

@ -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
}

View File

@ -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 })

View File

@ -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 '是谁':

View File

@ -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
}

View File

@ -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);
}

View File

@ -116,7 +116,6 @@ export async function autoRefresh (e) {
return true
}
}
return true
}
export async function autoGetProfile (e, uid, avatar, callback) {

View File

@ -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;
return true
}

View File

@ -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) {

View File

@ -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 = []

View File

@ -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
}
}];
}]

View File

@ -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

View File

@ -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
}]

View File

@ -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
}
}];
}]

View File

@ -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
}

View File

@ -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 = [];
export const buffs = []

View File

@ -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

View File

@ -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: "苍白42层提高18%攻击力物理伤害额外提高25%",
苍白之火4: {
title: '苍白42层提高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,124 +80,124 @@ 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,

View File

@ -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 }
}

View File

@ -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",
神里绫人: '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'
}