diff --git a/CHANGELOG.md b/CHANGELOG.md index 712f6801..8daa52a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,16 @@ -# 1.7.5 +# 1.7.6 -* `#更新面板`支持B服角色 +* `#角色面板`现在支持B服角色数据获取 * 数据来自喵喵API,部分功能尚未完全稳定,如有问题请反馈给喵喵 - * 由于底层逻辑差异,`#圣遗物列表` 只会展示手工查看过角色的圣遗物 + * 由于底层逻辑差异,`#圣遗物列表` 在B服下只会展示手工查看过角色的圣遗物 * 已知问题:角色天赋的皇冠及命座加成效果显示可能有问题 + * 修正伤害加成字段的数据获取逻辑,有错误的面板重新获取后即可恢复正常 +* `#角色面板`部分功能调整与Bugfix + * 调整部分角色的圣遗物词条权重,部分角色的圣遗物评分可能会有变化 + * ACE档的评分档位由>50降低为>49.5 (理论最高分的75%) +* `#圣遗物列表` 根据新版圣遗物评分规则进行词条高亮 -# 1.7.1 ~ 1.7.4 +# 1.7.1 ~ 1.7.5 * 增加`#原图`命令,可获取喵喵角色卡片原图,感谢 **@牧星长** 提供功能 * 对由`#老婆``#刻晴`发出的角色卡片图回复`#原图`可获取对应图像 diff --git a/apps/character.js b/apps/character.js index 9cf260b1..34e1796b 100644 --- a/apps/character.js +++ b/apps/character.js @@ -675,17 +675,28 @@ async function getTargetUid(e) { return uidRet[0] } let uid = false; - - - let qq = e.user_id; - if (NoteCookie && NoteCookie[qq]) { - let nc = NoteCookie[qq]; - if (nc.uid && uidReg.test(nc.uid)) { - return nc.uid; + let getUid = async function (qq) { + if (NoteCookie && NoteCookie[qq]) { + let nc = NoteCookie[qq]; + if (nc.uid && uidReg.test(nc.uid)) { + return nc.uid; + } + } + uid = await redis.get(`genshin:id-uid:${qq}`) || await redis.get(`genshin:uid:${qq}`); + if (uid && uidReg.test(uid)) { + return uid; } } - uid = await redis.get(`genshin:id-uid:${qq}`) || await redis.get(`genshin:uid:${qq}`); - if (uid && uidReg.test(uid)) { + + if (e.at && e.at != BotConfig.account.qq) { + uid = await getUid(e.at); + if (uid) { + return uid; + } + } + + uid = await getUid(e.user_id); + if (uid) { return uid; } @@ -904,7 +915,16 @@ export async function getArtis(e, { render }) { if (!name || name === "空" || name === "荧") { return; } - let { mark: usefulMark } = Reliquaries.getUseful(name); + + + let usefulMark; + if (isNewScore) { + let charCfg = Reliquaries2.getCharCfg(name); + usefulMark = charCfg.titleWeight; + } else { + let usefulData = Reliquaries.getUseful(name); + usefulMark = usefulData.mark; + } /* 处理圣遗物 */ if (ds.artis) { diff --git a/components/Profile.js b/components/Profile.js index e504d794..1c093eac 100644 --- a/components/Profile.js +++ b/components/Profile.js @@ -119,7 +119,7 @@ let Profile = { async get(uid, charId) { let data = Profile._get(uid, charId); let Serv = getServ(uid); - if (Serv.getCharData) { + if (Serv.getCharData && data && data.id) { return await Serv.getCharData(uid, data, Profile.saveCharData); } return data; diff --git a/components/models/Reliquaries2.js b/components/models/Reliquaries2.js index 0a440199..c75d760f 100644 --- a/components/models/Reliquaries2.js +++ b/components/models/Reliquaries2.js @@ -136,7 +136,7 @@ let Reliquaries = { }, getMarkScore(mark) { let pct = mark; - let scoreMap = [["D", 10], ["C", 16.5], ["B", 23.1], ["A", 29.7], ["S", 36.3], ["SS", 42.9], ["SSS", 50], ["ACE", 56.1], ["ACE²", 66]]; + let scoreMap = [["D", 10], ["C", 16.5], ["B", 23.1], ["A", 29.7], ["S", 36.3], ["SS", 42.9], ["SSS", 49.5], ["ACE", 56.1], ["ACE²", 66]]; for (let idx = 0; idx < scoreMap.length; idx++) { if (pct < scoreMap[idx][1]) { return scoreMap[idx][0]; diff --git a/components/profile/miao.js b/components/profile/miao.js index 7fab9e00..deeb050c 100644 --- a/components/profile/miao.js +++ b/components/profile/miao.js @@ -62,7 +62,7 @@ let Miao = { }, async getCharData(uid, ds, saveCharData) { - if (ds.dataSource === "miao") { + if (ds.dataSource !== "miao-pre" || !ds.id) { return ds; } try { @@ -137,14 +137,13 @@ let Miao = { } ret[key] = val; }) - let maxDmg = 0, dmg = data.addHurt || {}; + let maxDmg = 0, hurt = data.addHurt || {}; lodash.forEach("fire,elec,water,grass,wind,rock,ice".split(","), (key) => { - maxDmg = Math.max(dmg[key] * 100, maxDmg); + maxDmg = Math.max(hurt[key] * 100, maxDmg); }); - ret.dmg = maxDmg; - ret.phy = dmg.physical * 100; + ret.dmgBonus = maxDmg; + ret.phyBonus = hurt.physical * 100; return ret; - }, getWeapon(weapon) { return { diff --git a/resources/character/artis.html b/resources/character/artis.html index 4a302fc7..754dfa96 100644 --- a/resources/character/artis.html +++ b/resources/character/artis.html @@ -27,7 +27,7 @@
  • {{ds.main[0]}}+{{ds.main[1]}}
  • {{each ds.attrs attr}} {{if attr[0]}} -
  • {{attr[0]}}{{attr[0]}}+{{attr[1]}}
  • {{/if}} {{/each}} diff --git a/resources/meta/reliquaries/reliquaries-mark-new.js b/resources/meta/reliquaries/reliquaries-mark-new.js index 6a2a1051..570c526e 100644 --- a/resources/meta/reliquaries/reliquaries-mark-new.js +++ b/resources/meta/reliquaries/reliquaries-mark-new.js @@ -42,56 +42,56 @@ export const mainAttr = { export const subAttr = "atk,def,hp,mastery,recharge,cp,cd".split(",") export const usefulAttr = { - '神里绫人': { hp: 40, atk: 75, def: 0, cp: 100, cd: 100, mastery: 25, dmg: 100, phy: 0, recharge: 20, heal: 0 }, - '八重神子': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 50, dmg: 100, phy: 0, recharge: 50, heal: 0 }, - '申鹤': { hp: 0, atk: 100, def: 0, cp: 75, cd: 75, mastery: 0, dmg: 100, phy: 0, recharge: 70, heal: 0 }, - '云堇': { hp: 0, atk: 25, def: 100, cp: 50, cd: 50, mastery: 0, dmg: 25, phy: 0, recharge: 90, heal: 0 }, - '荒泷一斗': { hp: 0, atk: 50, def: 90, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 30, 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: 0, heal: 0 }, + '申鹤': { hp: 0, atk: 100, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 70, 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: 0, heal: 0 }, '五郎': { hp: 0, atk: 50, def: 100, cp: 50, cd: 50, mastery: 0, dmg: 25, phy: 0, recharge: 90, heal: 0 }, - '班尼特': { hp: 90, atk: 30, def: 0, cp: 50, cd: 50, mastery: 0, dmg: 70, phy: 0, recharge: 80, heal: 100 }, - '枫原万叶': { hp: 0, atk: 60, 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: 20, dmg: 75, phy: 0, recharge: 90, heal: 0 }, - '行秋': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 20, dmg: 100, phy: 0, recharge: 65, heal: 0 }, + '班尼特': { hp: 90, atk: 50, def: 0, cp: 50, cd: 50, mastery: 0, dmg: 70, phy: 0, recharge: 80, 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: 65, heal: 0 }, '钟离': { hp: 80, atk: 70, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 50, recharge: 55, heal: 0 }, - '钟离-血牛': { hp: 100, atk: 50, def: 0, cp: 75, cd: 75, mastery: 0, dmg: 75, phy: 0, recharge: 55, heal: 0 }, - '神里绫华': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 30, dmg: 100, phy: 0, recharge: 20, heal: 0 }, - '香菱': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 75, heal: 0 }, - '胡桃': { hp: 80, atk: 30, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 35, heal: 0 }, - '甘雨': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 40, heal: 0 }, - '甘雨-永冻': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 75, heal: 0 }, - '温迪': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 60, dmg: 100, phy: 0, recharge: 80, heal: 0 }, - '珊瑚宫心海': { hp: 100, atk: 50, def: 0, cp: 0, cd: 0, mastery: 0, dmg: 100, phy: 0, recharge: 65, heal: 100 }, - '莫娜': { hp: 0, atk: 50, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 80, heal: 0 }, - '阿贝多': { hp: 0, atk: 30, def: 80, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 35, heal: 0 }, - '迪奥娜': { hp: 85, atk: 50, def: 0, cp: 75, cd: 75, mastery: 0, dmg: 65, phy: 0, recharge: 55, heal: 100 }, - '优菈': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 40, phy: 100, recharge: 45, heal: 0 }, - '达达利亚': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 50, dmg: 100, phy: 0, recharge: 45, heal: 0 }, - '魈': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 20, heal: 0 }, - '宵宫': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 60, dmg: 100, phy: 0, recharge: 0, 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: 55, heal: 0 }, + '温迪': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 65, heal: 0 }, + '珊瑚宫心海': { hp: 100, atk: 50, def: 0, cp: 0, cd: 0, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 100 }, + '莫娜': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 80, 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: 0, def: 0, cp: 0, cd: 0, mastery: 0, dmg: 65, phy: 0, recharge: 55, heal: 100 }, + '优菈': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 40, phy: 100, recharge: 40, 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: 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: 90, 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: 30, dmg: 100, phy: 60, recharge: 30, heal: 0 }, - '罗莎莉亚': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 70, phy: 80, recharge: 40, heal: 0 }, - '可莉': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 20, dmg: 100, phy: 0, recharge: 40, heal: 0 }, - '凝光': { hp: 0, atk: 80, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 40, heal: 0 }, - '北斗': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 30, dmg: 100, phy: 0, recharge: 50, heal: 0 }, - '刻晴': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 15, dmg: 100, phy: 100, recharge: 30, heal: 0 }, - '托马': { hp: 75, atk: 50, def: 0, cp: 50, cd: 50, mastery: 0, dmg: 75, phy: 0, recharge: 55, heal: 40 }, - '迪卢克': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 50, dmg: 100, phy: 0, recharge: 40, heal: 0 }, - '芭芭拉': { hp: 80, atk: 50, def: 0, cp: 50, cd: 50, mastery: 15, dmg: 80, phy: 0, 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: 80, 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: 0, def: 0, cp: 50, cd: 50, mastery: 0, dmg: 75, 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: 100, atk: 0, def: 0, cp: 0, cd: 0, 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: 75, def: 100, 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: 0, dmg: 100, phy: 0, recharge: 70, heal: 0 }, - '七七': { hp: 0, atk: 100, def: 0, cp: 75, cd: 75, mastery: 0, dmg: 60, phy: 70, recharge: 25, heal: 100 }, - '凯亚': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 40, heal: 10 }, - '烟绯': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 40, dmg: 100, phy: 0, recharge: 40, heal: 0 }, - '早柚': { hp: 0, atk: 60, def: 0, cp: 70, cd: 70, mastery: 100, dmg: 80, phy: 0, recharge: 70, heal: 100 }, - '安柏': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 100, recharge: 35, heal: 0 }, - '丽莎': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 40, dmg: 100, phy: 0, recharge: 45, 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: 0, dmg: 50, phy: 100, recharge: 30, heal: 0 }, - '砂糖': { hp: 0, atk: 60, def: 0, cp: 70, cd: 70, mastery: 100, dmg: 40, phy: 0, recharge: 70, heal: 0 }, - '雷泽': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 50, phy: 100, recharge: 35, heal: 0 }, - '夜兰': { hp: 80, atk: 0, def: 0, cp: 100, cd: 100, mastery: 25, dmg: 100, phy: 0, recharge: 75, heal: 0 }, + '七七': { hp: 0, atk: 100, def: 0, cp: 75, cd: 75, 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: 0, def: 0, cp: 0, cd: 0, 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: 70, 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: 75, heal: 0 }, };