diff --git a/CHANGELOG.md b/CHANGELOG.md
index fdf8aeba..d784eaf3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
# 2.3.8
* 面板服务增加由**Snap Hutao**提供的Enka转发代理,可通过`#喵喵设置面板服务4`进行选择
+* 面板详情的圣遗物词条增加词条数展示
* 部分角色资源文件结构调整
# 2.3.1~2.3.7
diff --git a/models/Artifact.js b/models/Artifact.js
index 7d9a9fc5..69be3221 100644
--- a/models/Artifact.js
+++ b/models/Artifact.js
@@ -85,12 +85,14 @@ class Artifact extends Base {
tmp[key] = {
key,
upNum: 0,
+ eff: 0,
value: 0
}
ret.push(tmp[key])
}
tmp[key].value += value * (attrMap[key].format === 'pct' ? 100 : 1)
tmp[key].upNum++
+ tmp[key].eff += value / attrMap[key].value * (attrMap[key].format === 'pct' ? 100 : 1)
})
return ret
}
diff --git a/models/profile/ArtisMark.js b/models/profile/ArtisMark.js
index bd9c34dc..9082c150 100644
--- a/models/profile/ArtisMark.js
+++ b/models/profile/ArtisMark.js
@@ -1,6 +1,6 @@
import lodash from 'lodash'
import { Format } from '#miao'
-import { attrNameMap, mainAttr, subAttr, attrMap ,basicNum,attrPct} from '../../resources/meta/artifact/index.js'
+import { attrNameMap, mainAttr, subAttr, attrMap, basicNum, attrPct } from '../../resources/meta/artifact/index.js'
let ArtisMark = {
// 根据Key获取标题
@@ -116,11 +116,13 @@ let ArtisMark = {
let ret = {
key,
value: val,
- upNum: ds.upNum || 0
+ upNum: ds.upNum || 0,
+ eff: ds.eff || 0
}
if (!isMain && !ret.upNum) {
let incRet = ArtisMark.getIncNum(key, value)
ret.upNum = incRet.num
+ ret.eff = incRet.eff
ret.hasGt = incRet.hasGt
ret.hasLt = incRet.hasLt
ret.isCalcNum = true
@@ -135,6 +137,7 @@ let ArtisMark = {
ret.mark = Format.comma(mark || 0)
ret._mark = mark || 0
}
+ ret.eff = ret.eff ? Format.comma(ret.eff, 1) : '-'
return ret
},
@@ -148,11 +151,12 @@ let ArtisMark = {
let minNum = Math.max(1, Math.ceil((value / cfg.value).toFixed(1) * 1))
// 相等时直接返回
if (maxNum === minNum) {
- return { num: minNum }
+ return { num: minNum, eff: value / cfg.value }
}
let avg = Math.round(value / (cfg.value + cfg.valueMin) * 2)
return {
num: avg,
+ eff: value / cfg.value,
hasGt: maxNum > avg,
hasLt: minNum < avg
}
@@ -195,7 +199,7 @@ let ArtisMark = {
})
return ret * (1 + fixPct) / 2 / posMaxMark[posIdx] * 66
},
-
+
getCritMark (charCfg, posIdx, mainAttr, subAttr, elem = '') {
let ret = 0
let { attrs, posMaxMark } = charCfg
@@ -208,23 +212,23 @@ let ArtisMark = {
if (posIdx >= 4) {
let mainKey = key
if (posIdx === 4 && Format.isElem(key) && key === elem) {
- mainKey = 'dmg'
+ mainKey = 'dmg'
}
fixPct = Math.max(0, Math.min(1, (attrs[mainKey]?.weight || 0) / (posMaxMark['m' + posIdx])))
}
- if(key === 'cpct'|| key === 'cdmg' ){
- ret += 9.41
- }
+ if (key === 'cpct' || key === 'cdmg') {
+ ret += 9.41
+ }
lodash.forEach(subAttr, (ds) => {
- if (ds.key === 'cpct' || ds.key === 'cdmg' ){
- let temp_s = (attrs[ds.key]?.mark || 0) * (ds.value || 0)/85
- ret += temp_s
+ if (ds.key === 'cpct' || ds.key === 'cdmg') {
+ let temp_s = (attrs[ds.key]?.mark || 0) * (ds.value || 0) / 85
+ ret += temp_s
}
})
return ret
},
-
+
getValidMark (charCfg, posIdx, mainAttr, subAttr, elem = '') {
let ret = 0
let { attrs, posMaxMark } = charCfg
@@ -237,14 +241,14 @@ let ArtisMark = {
if (posIdx >= 4) {
let mainKey = key
if (posIdx === 4 && Format.isElem(key) && key === elem) {
- mainKey = 'dmg'
+ mainKey = 'dmg'
}
-
-
+
+
fixPct = Math.max(0, Math.min(1, (attrs[mainKey]?.weight || 0) / (posMaxMark['m' + posIdx])))
}
lodash.forEach(subAttr, (ds) => {
- let temp_s = (attrs[ds.key]?.mark || 0) * (ds.value || 0)/85
+ let temp_s = (attrs[ds.key]?.mark || 0) * (ds.value || 0) / 85
ret += temp_s
})
return ret
diff --git a/resources/character/artis-list.html b/resources/character/artis-list.html
index 92bbd40e..fb94a855 100644
--- a/resources/character/artis-list.html
+++ b/resources/character/artis-list.html
@@ -29,7 +29,7 @@
{{each ds.attrs attr}}
{{if attr && attr.key}}
- {{if attr.upNum}}{{/if}}{{artisKeyTitle[attr.key]}}
+ {{if attr.eff}}{{attr.eff || ''}}{{/if}}{{if attr.upNum}}{{/if}}{{artisKeyTitle[attr.key]}}
+{{attr.value}}
{{/if}}
{{/each}}
diff --git a/resources/character/artis-mark.html b/resources/character/artis-mark.html
index f468fd30..a01c645e 100644
--- a/resources/character/artis-mark.html
+++ b/resources/character/artis-mark.html
@@ -62,7 +62,7 @@
{{each ds.attrs attr}}
{{if attr.key}}
{{artisKeyTitle[attr.key]}} {{if attr.eff}}{{attr.eff || ''}}{{/if}}{{artisKeyTitle[attr.key]}} +{{attr.value}}
{{ ( 46.6 / 6 / 100 * attr._mark ).toFixed(1) }}
diff --git a/resources/character/profile-detail.css b/resources/character/profile-detail.css
index 1bf34ba7..ec141768 100644
--- a/resources/character/profile-detail.css
+++ b/resources/character/profile-detail.css
@@ -562,14 +562,29 @@ body {
}
.artis ul.detail li span.title {
text-align: left;
- padding-left: 10px;
+ padding-left: 30px;
+ font-size: 14px;
+}
+.artis ul.detail li span.title i.eff {
+ position: absolute;
+ display: block;
+ left: 3px;
+ top: 4px;
+ font-size: 12px;
+ font-style: normal;
+ background: rgba(0, 0, 0, 0.5);
+ border-radius: 5px;
+ height: 18px;
+ line-height: 18px;
+ width: 23px;
+ text-align: center;
}
.artis ul.detail li span.title i.up-num {
position: absolute;
display: block;
- left: 80px;
- top: 8px;
- height: 9px;
+ left: 91px;
+ top: 9px;
+ height: 8px;
width: 50px;
background-image: url('./imgs/up-num-icon1.png');
background-position: 0 0;
@@ -577,16 +592,16 @@ body {
background-size: auto 500%;
}
.artis ul.detail li span.title i.up-num.up-5 {
- background-position: 0 -9px;
+ background-position: 0 -8px;
}
.artis ul.detail li span.title i.up-num.up-4 {
- background-position: 0 -18px;
+ background-position: 0 -16px;
}
.artis ul.detail li span.title i.up-num.up-3 {
- background-position: 0 -27px;
+ background-position: 0 -24px;
}
.artis ul.detail li span.title i.up-num.up-2 {
- background-position: 0 -36px;
+ background-position: 0 -32px;
}
.artis ul.detail li span.title i.up-num.up-1 {
background: none !important;
@@ -594,6 +609,7 @@ body {
.artis ul.detail li span.val {
text-align: right;
padding-right: 10px;
+ font-size: 14px;
}
.artis ul.detail li.great span.title {
color: #ffe699;
diff --git a/resources/character/profile-detail.html b/resources/character/profile-detail.html
index 12e183ca..2075d7b3 100644
--- a/resources/character/profile-detail.html
+++ b/resources/character/profile-detail.html
@@ -143,8 +143,9 @@
{{each ds.attrs attr}}
{{if attr && attr.key}}
- {{if attr.upNum}}{{/if}}{{artisKeyTitle[attr.key]}}
+ {{if attr.eff}}{{attr.eff || ''}}{{/if}}{{if attr.upNum}}{{/if}}{{artisKeyTitle[attr.key]}}
+{{attr.value}}
+
{{/if}}
{{/each}}
diff --git a/resources/character/profile-detail.less b/resources/character/profile-detail.less
index a8ceebb1..95f81293 100644
--- a/resources/character/profile-detail.less
+++ b/resources/character/profile-detail.less
@@ -696,14 +696,30 @@ body {
&.title {
text-align: left;
- padding-left: 10px;
+ padding-left: 30px;
+ font-size: 14px;
+
+ i.eff {
+ position: absolute;
+ display: block;
+ left: 3px;
+ top: 4px;
+ font-size: 12px;
+ font-style: normal;
+ background: rgba(0, 0, 0, 0.5);
+ border-radius: 5px;
+ height: 18px;
+ line-height: 18px;
+ width: 23px;
+ text-align: center;
+ }
i.up-num {
position: absolute;
display: block;
- left: 80px;
- top: 8px;
- height: 9px;
+ left: 91px;
+ top: 9px;
+ height: 8px;
width: 50px;
background-image: url('./imgs/up-num-icon1.png');
background-position: 0 0;
@@ -712,19 +728,19 @@ body {
&.up-5 {
- background-position: 0 -9px;
+ background-position: 0 -8px;
}
&.up-4 {
- background-position: 0 -18px;
+ background-position: 0 -16px;
}
&.up-3 {
- background-position: 0 -27px;
+ background-position: 0 -24px;
}
&.up-2 {
- background-position: 0 -36px;
+ background-position: 0 -32px;
}
&.up-1 {
@@ -736,6 +752,7 @@ body {
&.val {
text-align: right;
padding-right: 10px;
+ font-size: 14px;
}
}
diff --git a/resources/meta/character/珐露珊/imgs/face-q.webp b/resources/meta/character/珐露珊/imgs/face-q.webp
index 08c367ab..12817d96 100644
Binary files a/resources/meta/character/珐露珊/imgs/face-q.webp and b/resources/meta/character/珐露珊/imgs/face-q.webp differ