miao-plugin/resources/meta-sr/character//calc.js

98 lines
3.4 KiB
JavaScript
Raw Normal View History

export const details = [{
title: '普攻伤害',
dmg: ({ talent }, dmg) => dmg(talent.a['技能伤害'], 'a')
}, {
title: '强化普攻(单目标)',
params: { ebuff: true },
dmg: ({ talent, attr, calc }, { basic }) => {
const td1 = talent.a2['技能伤害·攻击倍率']
const td2 = talent.a2['技能伤害·生命倍率']
const atk = calc(attr.atk)
const hp = calc(attr.hp)
return basic(td1 * atk + td2 * hp, 'a')
}
}, {
title: '强化普攻(三目标)',
params: { ebuff: true },
dmg: ({ talent, attr, calc }, { basic }) => {
const td1 = talent.a2['技能伤害·攻击倍率'] + talent.a2['技能伤害·攻击倍率·相邻目标']*2
const td2 = talent.a2['技能伤害·生命倍率'] + talent.a2['技能伤害·生命倍率·相邻目标']*2
const atk = calc(attr.atk)
const hp = calc(attr.hp)
return basic( td1 * atk + td2 * hp, 'a')
}
}, {
title: '追加攻击',
params: { ebuff: true },
dmg: ({ talent, attr, calc }, { basic }) => {
const td1 = talent.t['技能伤害·攻击倍率']
const td2 = talent.t['技能伤害·生命倍率']
const atk = calc(attr.atk)
const hp = calc(attr.hp)
return basic( td1 * atk + td2 * hp, 't')
}
}, {
title: '终结技伤害(单目标)',
params: { ebuff: true },
dmg: ({ talent, attr, calc }, { basic }) => {
const td1 = talent.q['技能伤害·攻击倍率']
const td2 = talent.q['技能伤害·生命倍率']
const td3 = talent.q['技能伤害·已损失生命值倍率']
const atk = calc(attr.atk)
const hp = calc(attr.hp)
return basic( td1 * atk + td2 * hp + td3 * hp * 0.9, 'q')
}
}, {
title: '终结技伤害(三目标)',
params: { ebuff: true },
dmg: ({ talent, attr, calc }, { basic }) => {
const td1 = talent.q['技能伤害·攻击倍率'] + talent.q['技能伤害·攻击倍率·相邻目标']*2
const td2 = talent.q['技能伤害·生命倍率'] + talent.q['技能伤害·生命倍率·相邻目标']*2
const td3 = talent.q['技能伤害·已损失生命值倍率'] + talent.q['技能伤害·已损失生命值倍率·相邻目标']*2
const atk = calc(attr.atk)
const hp = calc(attr.hp)
return basic( td1 * atk + td2 * hp + td3 * hp * 0.9, 'q')
}
}]
export const defDmgIdx = 1
export const mainAttr = 'hp,atk,cpct,cdmg,speed'
export const buffs = [{
check: ({ params }) => params.ebuff === true,
title:'地狱变:造成伤害提高[dmg]%',
data: {
dmg: ({ talent }) => talent.e['伤害提高'] * 100
}
}, {
title: '行迹-坏劫隳亡天赋释放的追加攻击伤害提高20%',
tree: 2,
data: {
tDmg: 20
}
}, {
title:'刃1命终结技对指定敌方单体造成伤害值提高[qPlus]',
cons: 1,
data: {
qPlus: ({ attr, calc }) => 1.5 * calc(attr.hp) * 0.9
}
}, {
check: ({ params }) => params.ebuff === true,
title:'刃2命处于【地狱变】状态时暴击率提高15%',
cons: 2,
data: {
cpct: 15
}
}, {
title:'刃4命生命值降低至小于等于50%时提高生命值上限满Buff下提高40%',
cons: 4,
data: {
hpPct: 40
}
}, {
title:'刃6命追加攻击造成的伤害值额外提高[tPlus]',
cons: 6,
data: {
tPlus: ({ attr, calc }) => calc(attr.hp) * 0.5
}
}]