#雷神面板圣遗物支持展示强化次数

This commit is contained in:
Kokomi 2022-11-14 20:52:16 +08:00
parent fbc52715ee
commit 0649784cf7
10 changed files with 179 additions and 75 deletions

View File

@ -1,4 +1,9 @@
# 2.0.8
# 2.0.9
* 喵喵设置中增加排名限制门槛,支持限制 有16个角色数据/包含御三家角色 才能参与排名防止被非群成员uid刷榜
* `#雷神面板`圣遗物支持展示强化次数
# 2.0.1~2.0.8
* 增加群内排名功能
* 默认关闭,如需启用可通过`#喵喵设置排名开启`进行打开
@ -8,29 +13,21 @@
* 增加`#最强雷神`、`#最高分甘雨`命令,查看当前统计中最高练度/最高圣遗物评分的面板数据
* 增加`#雷神排名`、`#甘雨圣遗物排名`命令,查看当前群中角色的排名数据
* 增加`#重置排名`、`#重置刻晴排名`命令,来重置当前群的排名统计
* 面板及伤害计算升级
* `#面板`会展示角色名命座信息
* 底层元素反应计算逻辑更新 **@冷落**
* 增加纳西妲的伤害计算
* `#喵喵设置` 部分配置项及功能改进
* 删除一些无效或暂不支持的配置项
* 配置存储位置变更为**config/cfg.js**。原设置会自动迁移
* 喵喵设置中增加排名限制门槛,支持限制 有16个角色数据/包含御三家角色 才能参与排名,防止被随意刷榜
# 2.0.1~2.0.7
* `#日历` 页面样式微调,功能升级
* 日历中会展示角色生日
* 日历会展示本日可刷天赋角色列表
* 添加 纳西妲、莱依拉 的天赋及命座数据
* 可通过 `#草神天赋``#草神命座``#草神图鉴`查看
* 支持Enka获取3.1新角色及新武器的数据
* 新角色及新武器暂未支持伤害计算,稍晚会升级
* 优化character的进入判定逻辑防止一些额外的log触发
* 角色相关命令在V3下会联合V3的角色别名一同查询
* 增加妮露的伤害计算及圣遗物权重设置
* `#面板`会展示角色名命座信息
* 适配3.2的enka数据获取
* `#深渊组队`使用新版胡桃API进行组队信息获取
* 增加纳西妲的伤害计算
* 底层元素反应计算逻辑更新 **@冷落**
* 增加3.3角色信息及图片,可通过`#散兵天赋`、`#珐露珊命座`查看
* 一些样式及功能点优化
* 优化character的进入判定逻辑防止一些额外的log触发
* 角色相关命令在V3下会联合V3的角色别名一同查询
* `#深渊组队`使用新版胡桃API进行组队信息获取
# 2.0.0

View File

@ -69,6 +69,9 @@ export default class ProfileRank {
if (!lodash.isNumber(rank)) {
rank = await redis.zRevRank(typeKey, this.uid)
}
if (rank === null) {
rank = 99
}
if (force) {
return {
rank: rank + 1,

View File

@ -1,6 +1,6 @@
import lodash from 'lodash'
import { Format } from '../../components/index.js'
import { attrNameMap, mainAttr, subAttr } from '../../resources/meta/artifact/artis-mark.js'
import { attrNameMap, mainAttr, subAttr, attrMap } from '../../resources/meta/artifact/artis-mark.js'
let ArtisMark = {
formatAttr (ds) {
@ -22,6 +22,13 @@ let ArtisMark = {
}
},
/**
* 格式化圣遗物词条
* @param ds
* @param markCfg
* @param isMain
* @returns {{title: *, value: string}|*[]}
*/
formatArti (ds, markCfg = false, isMain = false) {
if (ds[0] && ds[0].title) {
let ret = []
@ -33,9 +40,10 @@ let ArtisMark = {
let title = ds.title || ds[0]
let key = ''
let val = ds.value || ds[1]
let value = val
let num = ds.value || ds[1]
if (!title || title === 'undefined') {
return []
return {}
}
if (/伤害加成/.test(title) && val < 1) {
val = Format.pct(val * 100)
@ -56,7 +64,13 @@ let ArtisMark = {
key = key || attrNameMap[title]
let ret = { title, value: val }
let ret = {
title,
value: val
}
if (!isMain) {
ret.upNum = ArtisMark.getIncNum(title, value)
}
if (markCfg) {
let mark = markCfg[key] * num
@ -69,6 +83,14 @@ let ArtisMark = {
return ret
},
getIncNum (title, value) {
let cfg = attrMap[attrNameMap[title]]
let min = Math.ceil(value / cfg.value)
let max = Math.floor(value / cfg.valueMin)
let avg = Math.round(value / (cfg.value + cfg.valueMin) * 2)
return Math.max(min, Math.min(max, avg))
},
getMarkClass (mark) {
let pct = mark
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]]

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -492,23 +492,12 @@ body {
.artis ul.detail li {
padding: 0 3px;
font-size: 14px;
position: initial;
position: relative;
width: 100%;
display: table-row;
line-height: 26px;
height: 26px;
}
.artis ul.detail li.great span.title {
color: #ffe699;
}
.artis ul.detail li.nouse span {
color: #888;
}
.artis ul.detail li.arti-main {
font-size: 16px;
padding: 3px 3px;
font-weight: bold;
}
.artis ul.detail li span {
position: initial;
display: table-cell;
@ -518,10 +507,56 @@ body {
text-align: left;
padding-left: 10px;
}
.artis ul.detail li span.title i.up-num {
position: absolute;
display: block;
left: 80px;
top: 8px;
height: 9px;
width: 50px;
background-image: url('./imgs/up-num-icon1.png');
background-position: 0 0;
background-repeat: no-repeat;
background-size: auto 500%;
}
.artis ul.detail li span.title i.up-num.up-5 {
background-position: 0 -9px;
}
.artis ul.detail li span.title i.up-num.up-4 {
background-position: 0 -18px;
}
.artis ul.detail li span.title i.up-num.up-3 {
background-position: 0 -27px;
}
.artis ul.detail li span.title i.up-num.up-2 {
background-position: 0 -36px;
}
.artis ul.detail li span.title i.up-num.up-1 {
background: none !important;
}
.artis ul.detail li span.val {
text-align: right;
padding-right: 10px;
}
.artis ul.detail li.great span.title {
color: #ffe699;
}
.artis ul.detail li.great span.title i.up-num {
background-image: url("./imgs/up-num-icon2.png");
background-size: auto 500%;
}
.artis ul.detail li.nouse span {
color: #888;
}
.artis ul.detail li.nouse span i.up-num {
background-image: url("./imgs/up-num-icon0.png");
background-size: auto 500%;
}
.artis ul.detail li.arti-main {
font-size: 16px;
padding: 3px 3px;
font-weight: bold;
}
.artis .weapon .star {
height: 20px;
width: 100px;

View File

@ -98,9 +98,10 @@
<li class="arti-main"><span class="title">{{ds.main.title}}</span><span class="val">+{{ds.main.value}}</span></li>
{{each ds.attrs attr}}
{{if attr.title}}
<li class="{{usefulMark[attr.title]*1 > 79.9 ?`great`:(usefulMark[attr.title]*1>0 ? `useful`:`nouse`)}}"><span
class="title">{{attr.title}} </span><span
class="val">+{{attr.value}}</span></li>
<li class="{{usefulMark[attr.title]*1 > 79.9 ?`great`:(usefulMark[attr.title]*1>0 ? `useful`:`nouse`)}}">
<span class="title"> {{if attr.upNum}}<i class="up-num up-{{attr.upNum}}"></i>{{/if}}{{attr.title}}</span>
<span class="val">+{{attr.value}}</span>
</li>
{{/if}}
{{/each}}
</ul>

View File

@ -610,42 +610,88 @@ body {
.artis ul.detail li {
padding: 0 3px;
font-size: 14px;
position: initial;
position: relative;
width: 100%;
display: table-row;
line-height: 26px;
height: 26px;
span {
position: initial;
display: table-cell;
color: #fff;
&.title {
text-align: left;
padding-left: 10px;
i.up-num {
position: absolute;
display: block;
left: 80px;
top: 8px;
height: 9px;
width: 50px;
background-image: url('./imgs/up-num-icon1.png');
background-position: 0 0;
background-repeat: no-repeat;
background-size: auto 500%;
&.up-5 {
background-position: 0 -9px;
}
&.up-4 {
background-position: 0 -18px;
}
&.up-3 {
background-position: 0 -27px;
}
&.up-2 {
background-position: 0 -36px;
}
&.up-1 {
background: none !important;
}
}
}
&.val {
text-align: right;
padding-right: 10px;
}
}
&.great span.title {
color: #ffe699;
i.up-num {
background-image: url("./imgs/up-num-icon2.png");
background-size: auto 500%;
}
}
&.nouse span {
color: #888;
i.up-num {
background-image: url("./imgs/up-num-icon0.png");
background-size: auto 500%;
}
}
&.arti-main {
font-size: 16px;
padding: 3px 3px;
font-weight: bold;
}
}
.artis ul.detail li.great span.title {
color: #ffe699;
}
.artis ul.detail li.nouse span {
color: #888;
}
.artis ul.detail li.arti-main {
font-size: 16px;
padding: 3px 3px;
font-weight: bold;
}
.artis ul.detail li span {
position: initial;
display: table-cell;
color: #fff;
}
.artis ul.detail li span.title {
text-align: left;
padding-left: 10px;
}
.artis ul.detail li span.val {
text-align: right;
padding-right: 10px;
}
.artis .weapon .star {
height: 20px;

View File

@ -11,16 +11,16 @@ export const attrValue = {
heal: 4.487
}
export const attrMap = {
atk: { title: '大攻击', format: 'pct', type: 'normal', value: 5.83, text: '5.83%' },
atkPlus: { title: '小攻击', format: 'comma', type: 'plus', base: 'atk', value: 15.56 },
def: { title: '大防御', format: 'pct', type: 'normal', value: 7.29, text: '7.29%' },
defPlus: { title: '小防御', format: 'comma', type: 'plus', base: 'def', value: 18.52 },
hp: { title: '大生命', format: 'pct', type: 'normal', value: 5.83, text: '5.83%' },
hpPlus: { title: '小生命', format: 'comma', type: 'plus', base: 'hp', value: 239.0 },
cpct: { title: '暴击率', format: 'pct', type: 'normal', value: 3.89, text: '3.89%' },
cdmg: { 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: 6.48, text: '6.48%' },
atk: { title: '大攻击', format: 'pct', type: 'normal', value: 5.83, text: '5.83%', valueMin: 4.08 },
atkPlus: { title: '小攻击', format: 'comma', type: 'plus', base: 'atk', value: 19.45, valueMin: 13.62 },
def: { title: '大防御', format: 'pct', type: 'normal', value: 7.29, text: '7.29%', valueMin: 5.1 },
defPlus: { title: '小防御', format: 'comma', type: 'plus', base: 'def', value: 23.15, valueMin: 16.2 },
hp: { title: '大生命', format: 'pct', type: 'normal', value: 5.83, text: '5.83%', valueMin: 4.08 },
hpPlus: { title: '小生命', format: 'comma', type: 'plus', base: 'hp', value: 298.75, valueMin: 209.13 },
cpct: { title: '暴击率', format: 'pct', type: 'normal', value: 3.89, text: '3.89%', valueMin: 2.72 },
cdmg: { title: '暴击伤害', format: 'pct', type: 'normal', value: 7.77, text: '7.77%', valueMin: 5.44 },
mastery: { title: '元素精通', format: 'comma', type: 'normal', value: 23.31, text: '23.31', valueMin: 16.32 },
recharge: { title: '充能效率', format: 'pct', type: 'normal', value: 6.48, text: '6.48%', valueMin: 4.53 },
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%' }