mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
#角色面板 增加刻晴伤害计算
一些Bugfix 及 文案优化
This commit is contained in:
parent
c32579ab63
commit
46dd0f95c2
@ -15,12 +15,11 @@ export async function consStat(e, { render }) {
|
||||
|
||||
let consData = await HutaoApi.getCons();
|
||||
if (!consData) {
|
||||
e.reply("暂时无法查询");
|
||||
e.reply("角色持有数据获取失败,请稍后重试~");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
let msg = e.msg;
|
||||
|
||||
let mode = /持有/.test(msg) ? "char" : "cons";
|
||||
@ -95,7 +94,7 @@ export async function abyssPct(e, { render }) {
|
||||
|
||||
let abyssData = await HutaoApi.getAbyssPct();
|
||||
if (!abyssData) {
|
||||
e.reply("暂时无法查询");
|
||||
e.reply("深渊出场数据获取失败,请稍后重试~");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -207,13 +206,13 @@ export async function abyssTeam(e, { render }) {
|
||||
|
||||
let abyssData = await HutaoApi.getAbyssTeam();
|
||||
if (!abyssData || !abyssData.data) {
|
||||
e.reply("暂时无法查询");
|
||||
e.reply("深渊组队数据获取失败,请稍后重试~");
|
||||
return true;
|
||||
}
|
||||
abyssData = abyssData.data;
|
||||
let talentData = await getTalentData(e);
|
||||
if (!talentData || talentData.length === 0) {
|
||||
e.reply("暂时无法获得角色信息");
|
||||
e.reply("暂时未能获得角色的练度信息,请使用【#练度统计】命令尝试手工获取...");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -167,6 +167,10 @@ let Data = {
|
||||
await Data.asyncPool(10, fileList, cacheFn);
|
||||
return ret;
|
||||
|
||||
},
|
||||
|
||||
sleep(ms) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
|
||||
|
@ -87,6 +87,10 @@ let posIdx = {
|
||||
}
|
||||
};
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
let Data = {
|
||||
getData(uid, data) {
|
||||
let ret = {
|
||||
@ -249,6 +253,9 @@ let Profile = {
|
||||
}
|
||||
await redis.set(`miao:role-all:${uid}`, 'loading', { EX: 20 });
|
||||
e.reply("开始获取数据,可能会需要一定时间~");
|
||||
|
||||
await sleep(1000);
|
||||
|
||||
let api = `${cfg.api}?uid=${uid}&qq=${cfg.qq}&token=${cfg.token}`;
|
||||
if (e.avatar) {
|
||||
api += `&avatar=${e.avatar}`;
|
||||
|
@ -144,7 +144,7 @@ Character.getRandomImg = function (type) {
|
||||
|
||||
|
||||
let charPosIdx = {
|
||||
1: '宵宫,雷神,胡桃,甘雨,优菈,一斗,绫人,魈,可莉,迪卢克,凝光,刻晴,辛焱,烟绯,雷泽',
|
||||
1: '宵宫,雷神,胡桃,甘雨,优菈,一斗,公子,绫人,魈,可莉,迪卢克,凝光,刻晴,辛焱,烟绯,雷泽',
|
||||
2: '夜兰,八重,九条,行秋,香菱,安柏,凯亚,丽莎,北斗,菲谢尔,重云,罗莎莉亚,埃洛伊',
|
||||
3: '申鹤,莫娜,早柚,云堇,久岐忍,五郎,砂糖,万叶,温迪',
|
||||
4: '班尼特,心海,琴,芭芭拉,七七,迪奥娜,托马,空,荧,阿贝多,钟离'
|
||||
|
4
index.js
4
index.js
@ -38,8 +38,8 @@ export {
|
||||
|
||||
let rule = {
|
||||
character: {
|
||||
//reg: "^#(喵喵)?(更新)?(.*)(详情|详细|面板|面版|伤害[1-7]?)?(更新)?$",
|
||||
reg: "noCheck",
|
||||
reg: "^#(喵喵)?(更新)?(.*)(详情|详细|面板|面版|伤害[1-7]?)?(更新)?$",
|
||||
//reg: "noCheck",
|
||||
describe: "【#角色】角色详情",
|
||||
},
|
||||
getArtis: {
|
||||
|
20
resources/meta/character/刻晴/calc.js
Normal file
20
resources/meta/character/刻晴/calc.js
Normal file
@ -0,0 +1,20 @@
|
||||
export const details = [{
|
||||
title: "E后重击伤害",
|
||||
dmg: ({ talent }, dmg) => dmg(talent.a['重击伤害'], 'a2')
|
||||
}, {
|
||||
title: "Q单段伤害",
|
||||
dmg: ({ talent }, dmg) => dmg(talent.q['连斩伤害2'][0], '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 buffs = [{
|
||||
title: "刻晴6命:4层获得24%雷伤加成",
|
||||
data: {
|
||||
dmg: 24
|
||||
}
|
||||
}]
|
Loading…
Reference in New Issue
Block a user