miao-plugin/components/calc/mastery.js
yoimiya-kokomi 1f41823f17 修正部分角色的伤害计算错误:蒸发、久岐忍治疗
`#角色持有率` 增加提示说明
`#圣遗物列表` 展示个数提升至28
部分页面样式调整及提示优化
2022-06-22 06:07:12 +08:00

24 lines
527 B
JavaScript

import { erType } from "./calc-meta.js";
export const Mastery = {
getType() {
},
getMultiple(type = 'zf', mastery = 0) {
let typeCfg = erType[type];
if (typeCfg.type === "pct") {
return 2.78 * mastery / (mastery + 1400) * 100;
} else if (typeCfg.type === "fusion") {
return (1 + mastery * 16) / (mastery + 2000) * 100;
}
return 0;
},
getBasePct(type, element) {
let typeCfg = erType[type];
if (typeCfg) {
return typeCfg.num({ element }) || 1;
}
return 1;
}
}