#喵喵深渊 不会覆盖#上期深渊以及#深渊12层具体楼层的命令

部分角色的圣遗物评分增加充能的词条评分权重
This commit is contained in:
yoimiya-kokomi 2022-08-04 01:51:48 +08:00
parent 7108726c56
commit 644eac7d80
6 changed files with 28 additions and 20 deletions

View File

@ -3,7 +3,9 @@
* `#上传深渊`使用图片渲染深渊结果,同时可被`#喵喵深渊`触发
* 可展示本期深渊的全部角色信息,包括组队、天赋及圣遗物
* 数据会上传至胡桃Api进行伤害排名并展示在页面内
* 可在`#喵喵设置`中启用`#喵喵深渊`作为默认深渊功能,默认关闭
* 可在`#喵喵设置`中启用`#喵喵深渊`作为默认`#深渊`,默认关闭
* 启用后不会覆盖`#上期深渊`以及`#深渊12层`具体楼层的命令
* 部分角色的圣遗物评分增加充能的词条评分权重
# 1.9.1 ~ 1.9.3

View File

@ -105,7 +105,7 @@ let rule = {
describe: '【#日历】 活动日历'
},
uploadData: {
reg: '^#*[喵喵|上传|本期]*(深渊|深境|深境螺旋)[上期|往期|本期]*[第]*(9|10|11|12|九|十|十一|十二)?层?[ |0-9]*(数据)?$'
reg: '^#*(喵喵|上传|本期)*(深渊|深境|深境螺旋)[ |0-9]*(数据)?$'
},
...adminRule
}

View File

@ -402,17 +402,19 @@ export async function uploadData (e, { render }) {
let MysApi = await e.getMysApi({
auth: 'cookie',
targetType: 'self',
cookieType: 'self',
action: '获取信息'
cookieType: 'all',
action: '获取深渊信息'
})
if (!MysApi) return true
if (!MysApi || !MysApi.isSelfCookie) return true
let ret = {}
let uid = e.selfUser.uid
let resDetail, resAbyss
try {
resDetail = await MysApi.getCharacter()
resAbyss = await MysApi.getSpiralAbyss(1)
// Data.writeJson('/test-data', 'abyss.json', resAbyss);
if (resAbyss.floors.length > 0 && !await Avatars.hasTalentCache(uid)) {
e.reply('正在获取用户信息,请稍候...')
}
resDetail = await MysApi.getCharacter()
if (!resDetail || !resAbyss || !resDetail.avatars || resDetail.avatars.length <= 3) {
e.reply('角色信息获取失败')
return true

View File

@ -138,3 +138,7 @@ export default class Avatars extends Base {
return talent
}
}
Avatars.hasTalentCache = async function (uid) {
return !!await redis.get(`genshin:avatar-talent:${uid}`)
}

View File

@ -23,7 +23,7 @@ export const miaoApi = {
}
export const enkaApi = {
url: 'https://enka.shinshin.moe/',
url: 'https://enka.network/',
userAgent: 'Miao-Plugin/3.0',
listApi: ({ url, uid }) => {
return `${url}u/${uid}/__data.json`

View File

@ -42,19 +42,19 @@ export const mainAttr = {
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: 50, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 30, 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: 0, def: 100, cp: 50, cd: 50, mastery: 0, dmg: 40, 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: 100, atk: 50, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 80, 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: 0, dmg: 100, phy: 0, recharge: 30, 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 },
@ -65,15 +65,15 @@ export const usefulAttr = {
阿贝多: { 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: 75, dmg: 100, phy: 0, recharge: 30, 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: 0, dmg: 70, phy: 80, recharge: 30, heal: 0 },
可莉: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 30, heal: 0 },
凝光: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 30, 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 },
@ -84,16 +84,16 @@ export const usefulAttr = {
旅行者: { 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: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 30, heal: 0 },
烟绯: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 30, 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: 100, dmg: 50, 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: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 30, heal: 0 }
}