mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
修正数字精度可能导致的强化次数误判
This commit is contained in:
parent
0649784cf7
commit
98b6c8a2cc
@ -84,11 +84,14 @@ let ArtisMark = {
|
||||
},
|
||||
|
||||
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))
|
||||
let cfg = attrNameMap[title] && attrMap[attrNameMap[title]]
|
||||
if (cfg && cfg.value && cfg.valueMin) {
|
||||
let min = Math.ceil((value / cfg.value).toFixed(1) * 1)
|
||||
let max = Math.floor((value / cfg.valueMin).toFixed(1) * 1)
|
||||
let avg = Math.round(value / (cfg.value + cfg.valueMin) * 2)
|
||||
return Math.max(min, Math.min(max, avg))
|
||||
}
|
||||
return 0
|
||||
},
|
||||
|
||||
getMarkClass (mark) {
|
||||
|
Loading…
Reference in New Issue
Block a user