miao-plugin/resources/meta/character/珊瑚宫心海/calc.js
yoimiya-kokomi 48e1588af8 * #角色面板 新增 钟离 的伤害计算
* #角色面板支持对治疗量、护盾量的计算与展示
* #角色面板修复冰融化、少女4等buff等buff遗漏或错误导致的伤害计算偏差
2022-05-03 06:32:36 +08:00

72 lines
2.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import lodash from "lodash";
export const details = [{
check: ({ cons }) => cons < 2,
title: "水母每跳治疗",
dmg: ({ attr, talent, calc }, { heal }) => {
let t = talent.e['治疗量2'], hp = calc(attr.hp);
return heal(hp * t[0] / 100 + t[1] * 1);
}
}, {
cons: 2,
title: "半血水母每跳治疗",
dmg: ({ attr, talent, calc }, { heal }) => {
let t = talent.e['治疗量2'], hp = calc(attr.hp);
return heal(hp * t[0] / 100 + t[1] * 1 + hp * 0.045);
}
}, {
title: "开Q普攻三段伤害",
dmg: ({ attr, talent }, dmg) => dmg(talent.a['三段伤害'], 'a')
}, {
title: "开Q重击伤害",
dmg: ({ attr, talent }, dmg) => dmg(talent.a['重击伤害'], 'a2')
}, {
title: "开Q普攻三段总伤",
dmg: ({ attr, talent, cons, calc }, dmg) => {
let ret = { dmg: 0, avg: 0 };
lodash.forEach('一二三'.split(""), (num) => {
let dmgRet = dmg(talent.a[`${num}段伤害`], 'a');
ret.dmg += dmgRet.dmg;
ret.avg += dmgRet.avg;
});
if (cons > 0) {
let dmgRet = dmg.basic(calc(attr.hp) * 0.3);
ret.dmg += dmgRet.dmg;
ret.avg += dmgRet.avg;
}
return ret;
}
}];
export const defDmgIdx = 2;
export const mainAttr = "hp,atk";
export const buffs = [{
title: "心海被动治疗加成提高25%",
}, {
title: "心海被动开Q后重击伤害基于治疗加成提高[aPlus]",
data: {
aPlus: ({ attr, calc }) => calc(attr.hp) * calc(attr.heal) * 0.15 / 100,
a2Plus: ({ attr, calc }) => calc(attr.hp) * calc(attr.heal) * 0.15 / 100
}
}, {
title: "海人化羽开Q后普攻伤害提高[aPlus]",
data: {
aPlus: ({ attr, talent, calc }) => calc(attr.hp) * talent.q['普通攻击伤害提升'] / 100
}
}, {
title: "海人化羽开Q后重击伤害提高[a2Plus]",
data: {
a2Plus: ({ attr, talent, calc }) => calc(attr.hp) * talent.q['重击伤害提升'] / 100
}
}, {
title: "心海1命开Q后第三段普攻额外释放一只游鱼造成生命值上限30%的水元素伤害",
cons: 1
}, {
title: "心海6命开Q攻击获得治疗后获得40%水伤加成",
cons: 6,
data: {
dmg: 40
}
}];