From 6f1eb6464982e76cc7d992d62ef70f4e500d79fc Mon Sep 17 00:00:00 2001 From: Kokomi <102026640+yoimiya-kokomi@users.noreply.github.com> Date: Wed, 9 Nov 2022 06:32:20 +0800 Subject: [PATCH] =?UTF-8?q?`#=E6=9C=80=E5=BC=BAxx`=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E5=9C=A8=E8=A7=92=E8=89=B2=E4=B8=8D=E6=94=AF=E6=8C=81=E4=BC=A4?= =?UTF-8?q?=E5=AE=B3=E8=AE=A1=E7=AE=97=E6=97=B6=E8=BF=9B=E8=A1=8C=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 16 ++++++++++------ apps/character/ProfileRank.js | 15 ++++++++++----- apps/profile.js | 2 +- resources/character/profile-list.html | 2 +- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3229539..567028e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,12 @@ -# 2.0.6 +# 2.0.7 -* 增加纳西妲的伤害计算 -* 底层元素反应计算逻辑更新 **@冷落** -* 增加3.3角色信息及图片,可通过`#散兵天赋`、`#珐露珊命座`查看 -* 一些已知问题修复 +* 增加群内排名功能 **暂未完全稳定,稳定后会开放配置开关** + * 统计为bot本地统计,只统计在群内主动查看过的面板数据 + * 统计自本次更新后开始记录,历史数据不会回溯 + * 可通过`#面板`、`#心海面板`、`#更新面板`等命令来触发排名数据更新 +* 增加`#最强雷神`、`#最高分甘雨`命令,查看当前统计中最高练度/最高圣遗物评分的面板数据 -# 2.0.1~2.0.5 +# 2.0.1~2.0.6 * `#日历` 页面样式微调,功能升级 * 日历中会展示角色生日 @@ -20,6 +21,9 @@ * `#面板`会展示角色名命座信息 * 适配3.2的enka数据获取 * `#深渊组队`使用新版胡桃API进行组队信息获取 +* 增加纳西妲的伤害计算 +* 底层元素反应计算逻辑更新 **@冷落** +* 增加3.3角色信息及图片,可通过`#散兵天赋`、`#珐露珊命座`查看 # 2.0.0 diff --git a/apps/character/ProfileRank.js b/apps/character/ProfileRank.js index f592e271..564677b9 100644 --- a/apps/character/ProfileRank.js +++ b/apps/character/ProfileRank.js @@ -1,4 +1,4 @@ -import { Character, ProfileRank } from '../../models/index.js' +import { Character, ProfileRank, ProfileDmg } from '../../models/index.js' import { renderProfile } from './ProfileDetail.js' export async function groupMaxProfile (e) { @@ -7,19 +7,24 @@ export async function groupMaxProfile (e) { return false } let msg = e.original_msg || e.msg - if (!/(最强|最高|最高分|最牛|第一)/.test(msg)) { return false } let mode = /(分|圣遗物|评分|ACE)/.test(msg) ? 'mark' : 'dmg' - let name = msg.replace(/(#|最强|最高分|第一|最高|最牛|圣遗物|评分|群|面板|面版|详情)/g, '') + let name = msg.replace(/(#|最强|最高分|第一|最高|最牛|圣遗物|评分|群内|群|排名|排行|面板|面版|详情)/g, '') let char = Character.get(name) if (!char) { return false } let uid = await ProfileRank.getGroupMaxUid(groupId, char.id, mode) - if (uid) { - e.uid = uid + if (uid && uid[0]) { + e.uid = uid[0] return await renderProfile(e, char) + } else { + if (mode === 'dmg' && !ProfileDmg.dmgRulePath(char.name)) { + e.reply(`${char.name}暂不支持伤害计算..`) + } else { + e.reply('暂无排名信息') + } } } diff --git a/apps/profile.js b/apps/profile.js index 8498d2b1..fb82d3d7 100644 --- a/apps/profile.js +++ b/apps/profile.js @@ -18,7 +18,7 @@ app.reg('profile-detail', profileDetail, { }) app.reg('group-profile', groupMaxProfile, { - rule: /^#?(群|群内)?(最强|最高|最高分|最牛|第一)+.+/, + rule: /^#?(群|群内)?(排名|排行)?(最强|最高|最高分|最牛|第一)+.+/, name: '群内最强' }) diff --git a/resources/character/profile-list.html b/resources/character/profile-list.html index 997fd538..bbd17c07 100644 --- a/resources/character/profile-list.html +++ b/resources/character/profile-list.html @@ -27,7 +27,7 @@ {{if char.groupRank}} {{set gr = char.groupRank}} {{set rank = gr.rank > 9 ? 10:(gr.rank <=3 ? gr.rank : 4)}} -