mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-25 09:27:34 +00:00
#角色面板
伤害计算新增刻晴、阿贝多、香菱
This commit is contained in:
parent
f1557c500d
commit
f8a333eea8
@ -1,3 +1,8 @@
|
||||
# 1.4.1
|
||||
|
||||
* `#角色面板` 伤害计算新增部分角色
|
||||
* 目前支持:雷神、胡桃、魈、神子、甘雨、宵宫、公子、绫人、绫华、心海、钟离、刻晴、阿贝多、香菱
|
||||
|
||||
# 1.4.0
|
||||
|
||||
* 增加 `#深渊配队` 功能
|
||||
|
@ -326,7 +326,7 @@ let Calc = {
|
||||
|
||||
let { calc } = ds;
|
||||
|
||||
let dmgFn = function (pctNum = 0, talent = false, ele = false, mode = "talent") {
|
||||
let dmgFn = function (pctNum = 0, talent = false, ele = false, basicNum = 0, mode = "talent") {
|
||||
let { atk, dmg, cdmg, cpct } = attr;
|
||||
// 攻击区
|
||||
let atkNum = calc(atk);
|
||||
@ -403,8 +403,8 @@ let Calc = {
|
||||
let ret = {};
|
||||
if (mode === "basic") {
|
||||
ret = {
|
||||
dmg: pctNum * dmgNum * (1 + cdmgNum) * defNum * kNum * eleNum,
|
||||
avg: pctNum * dmgNum * (1 + cpctNum * cdmgNum) * defNum * kNum * eleNum
|
||||
dmg: basicNum * dmgNum * (1 + cdmgNum) * defNum * kNum * eleNum,
|
||||
avg: basicNum * dmgNum * (1 + cpctNum * cdmgNum) * defNum * kNum * eleNum
|
||||
}
|
||||
} else {
|
||||
// 计算最终伤害
|
||||
@ -421,8 +421,8 @@ let Calc = {
|
||||
return ret;
|
||||
};
|
||||
|
||||
dmgFn.basic = function (pctNum = 0, talent = false, ele = false) {
|
||||
return dmgFn(pctNum, talent, ele, "basic");
|
||||
dmgFn.basic = function (basicNum = 0, talent = false, ele = false) {
|
||||
return dmgFn(0, talent, ele, basicNum, "basic");
|
||||
}
|
||||
|
||||
dmgFn.heal = function (num) {
|
||||
|
@ -154,10 +154,12 @@ let idSort = {};
|
||||
lodash.forEach(charPosIdx, (chars, pos) => {
|
||||
chars = chars.split(",");
|
||||
lodash.forEach(chars, (name, idx) => {
|
||||
if (global.YunzaiApps) {
|
||||
let id = YunzaiApps.mysInfo['roleIdToName'](name);
|
||||
if (id) {
|
||||
idSort[id] = pos * 100 + idx;
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
44
resources/meta/character/阿贝多/calc.js
Normal file
44
resources/meta/character/阿贝多/calc.js
Normal file
@ -0,0 +1,44 @@
|
||||
export const details = [{
|
||||
title: "E阳华伤害",
|
||||
talent: "e",
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['技能伤害'], 'e')
|
||||
}, {
|
||||
title: "E刹那之花伤害",
|
||||
dmg: ({ talent, attr, calc }, { basic }) => {
|
||||
let ret = talent.e['刹那之花伤害'] * calc(attr.def) / 100 + attr.e.plus;
|
||||
return basic(ret, 'e');
|
||||
}
|
||||
}, {
|
||||
title: "E刹那之花(打半血)",
|
||||
params: {
|
||||
half: true
|
||||
},
|
||||
dmg: ({ talent, attr, calc }, { basic }) => {
|
||||
let ret = talent.e['刹那之花伤害'] * calc(attr.def) / 100 + attr.e.plus;
|
||||
return basic(ret, 'e');
|
||||
}
|
||||
}, {
|
||||
title: "Q总伤害",
|
||||
check: ({ cons }) => cons < 2,
|
||||
params: { buff: 0 },
|
||||
dmg: ({ talent }, dmg) => dmg(talent.q['爆发伤害'] + talent.q['生灭之花伤害'] * 7, 'q')
|
||||
}, {
|
||||
title: "满BuffQ总伤害",
|
||||
cons: 2,
|
||||
dmg: ({ talent }, dmg) => dmg(talent.q['爆发伤害'] + talent.q['生灭之花伤害'] * 7, 'q')
|
||||
}];
|
||||
|
||||
export const mainAttr = "def,atk,cpct,cdmg";
|
||||
|
||||
export const buffs = [{
|
||||
title: "阿贝多被动:刹那之花对生命值低于50%的敌人造成的伤害提高25%",
|
||||
data: {
|
||||
eDmg: ({ params }) => params.half ? 25 : 0
|
||||
}
|
||||
}, {
|
||||
title: "阿贝多2命:4每层Buff提高Q [qPlus]伤害",
|
||||
cons: 2,
|
||||
data: {
|
||||
qPlus: ({ params, attr, calc }) => params.buff === 0 ? 0 : calc(attr.def) * 1.2
|
||||
}
|
||||
}]
|
27
resources/meta/character/香菱/calc.js
Normal file
27
resources/meta/character/香菱/calc.js
Normal file
@ -0,0 +1,27 @@
|
||||
export const details = [{
|
||||
title: "锅巴单口伤害",
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['喷火伤害'], 'e')
|
||||
}, {
|
||||
title: "锅巴单口蒸发",
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['喷火伤害'], 'e', 'zf')
|
||||
}, {
|
||||
title: "旋火轮单次伤害",
|
||||
showDetail: true,
|
||||
dmg: ({ talent, }, dmg) => dmg(talent.q['旋火轮伤害'], 'q')
|
||||
}, {
|
||||
title: "旋火轮单次蒸发",
|
||||
dmg: ({ talent, }, dmg) => dmg(talent.q['旋火轮伤害'], 'q', 'zf')
|
||||
}];
|
||||
|
||||
export const mainAttr = "atk,cpct,cdmg";
|
||||
|
||||
export const buffs = [{
|
||||
cons: 1,
|
||||
title: "香菱1命:锅巴降低敌人火抗15",
|
||||
data: {
|
||||
kx: 15
|
||||
}
|
||||
}, {
|
||||
title: "元素精通:蒸发融化伤害提高[zf]%",
|
||||
mastery: "zf,rh"
|
||||
}]
|
@ -92,12 +92,6 @@ let polearm = {
|
||||
dmg: step(12)
|
||||
}
|
||||
},
|
||||
"天空之脊": {
|
||||
title: "暴击率提升[_cpct]%",
|
||||
refine: {
|
||||
_cpct: step(8)
|
||||
}
|
||||
},
|
||||
"护摩之杖": {
|
||||
title: "角色生命低于50%时额外获得[atkPlus]攻击力",
|
||||
data: {
|
||||
@ -396,12 +390,7 @@ let bow = {
|
||||
a2Dmg: step(8)
|
||||
}
|
||||
}],
|
||||
"天空之翼": {
|
||||
title: "暴击伤害提高20%",
|
||||
refine: {
|
||||
//cdmg: step(20)
|
||||
}
|
||||
},
|
||||
|
||||
"若水": {
|
||||
title: "生命值提高[hpPct]%,伤害提高[dmg]%",
|
||||
refine: {
|
||||
@ -570,11 +559,6 @@ let sword = {
|
||||
}
|
||||
}],
|
||||
"天空之刃": [{
|
||||
title: "暴击率提高[_cpct]%",
|
||||
refine: {
|
||||
_cpct: step(4)
|
||||
}
|
||||
}, {
|
||||
title: "普攻与重击的伤害值提高[aPlus]",
|
||||
data: {
|
||||
aPlus: ({ attr, calc, refine }) => calc(attr.atk) * step(20)[refine] / 100,
|
||||
|
Loading…
Reference in New Issue
Block a user