mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-25 17:35:34 +00:00
修复冰融化、少女4等buff等buff遗漏或错误导致的数据计算问题
This commit is contained in:
parent
5613993879
commit
d0eecaa958
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
* `#角色面板` 伤害计算新增部分角色
|
* `#角色面板` 伤害计算新增部分角色
|
||||||
* 目前支持:雷神、胡桃、魈、神子、甘雨、宵宫、公子、绫人、绫华、心海
|
* 目前支持:雷神、胡桃、魈、神子、甘雨、宵宫、公子、绫人、绫华、心海
|
||||||
|
* `#老婆` 功能支持对jpeg格式的图片格式识别
|
||||||
|
* 修复冰融化、少女4等buff等buff遗漏或错误导致的数据计算问题
|
||||||
|
|
||||||
# 1.3.0
|
# 1.3.0
|
||||||
|
|
||||||
|
@ -76,7 +76,8 @@ let Calc = {
|
|||||||
ret[val] = {
|
ret[val] = {
|
||||||
base: attr[key] * 1 || 0,
|
base: attr[key] * 1 || 0,
|
||||||
plus: 0,
|
plus: 0,
|
||||||
pct: 0
|
pct: 0,
|
||||||
|
inc: 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -228,7 +229,7 @@ let Calc = {
|
|||||||
attr[tRet[1]][tRet[2].toLowerCase()] += val * 1 || 0;
|
attr[tRet[1]][tRet[2].toLowerCase()] += val * 1 || 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let aRet = /^(hp|def|atk|mastery|cpct|cdmg|heal|recharge|dmg|phy)(Plus|Pct)?$/.exec(key);
|
let aRet = /^(hp|def|atk|mastery|cpct|cdmg|heal|recharge|dmg|phy)(Plus|Pct|Inc)?$/.exec(key);
|
||||||
if (aRet) {
|
if (aRet) {
|
||||||
attr[aRet[1]][aRet[2] ? aRet[2].toLowerCase() : "plus"] += val * 1 || 0;
|
attr[aRet[1]][aRet[2] ? aRet[2].toLowerCase() : "plus"] += val * 1 || 0;
|
||||||
return;
|
return;
|
||||||
@ -372,7 +373,13 @@ let Calc = {
|
|||||||
let eleNum = 1;
|
let eleNum = 1;
|
||||||
if (ele) {
|
if (ele) {
|
||||||
// todo 更详细
|
// todo 更详细
|
||||||
eleNum = (attr.element === "水" ? { zf: 2 } : { zf: 1.5, rh: 2 })[ele] || 1;
|
let eleMap = {
|
||||||
|
'水': { zf: 2 },
|
||||||
|
'火': { zf: 1.5, rh: 2 },
|
||||||
|
'冰': { rh: 1.5 }
|
||||||
|
}
|
||||||
|
|
||||||
|
eleNum = (eleMap[attr.element] || {})[ele] || 1;
|
||||||
if (attr[ele]) {
|
if (attr[ele]) {
|
||||||
eleNum = eleNum * (1 + attr[ele] / 100);
|
eleNum = eleNum * (1 + attr[ele] / 100);
|
||||||
}
|
}
|
||||||
@ -446,6 +453,9 @@ let Calc = {
|
|||||||
if (detail.check && !detail.check(Calc.getDs(attr, meta, params))) {
|
if (detail.check && !detail.check(Calc.getDs(attr, meta, params))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (detail.cons && meta.cons * 1 < detail.cons * 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let dmg = Calc.getDmgFn({ attr, avatar, enemyLv }),
|
let dmg = Calc.getDmgFn({ attr, avatar, enemyLv }),
|
||||||
basicDmgRet;
|
basicDmgRet;
|
||||||
let ds = lodash.merge({ talent }, Calc.getDs(attr, meta, params));
|
let ds = lodash.merge({ talent }, Calc.getDs(attr, meta, params));
|
||||||
@ -454,7 +464,7 @@ let Calc = {
|
|||||||
basicDmgRet = detail.dmg ? detail.dmg(ds, dmg) : detail.heal(ds, function (num) {
|
basicDmgRet = detail.dmg ? detail.dmg(ds, dmg) : detail.heal(ds, function (num) {
|
||||||
let { attr, calc } = ds;
|
let { attr, calc } = ds;
|
||||||
return {
|
return {
|
||||||
avg: num * (1 + calc(attr.heal) / 100)
|
avg: num * (1 + calc(attr.heal) / 100) * (1 + attr.heal.inc / 100)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
detail.userIdx = detailMap.length;
|
detail.userIdx = detailMap.length;
|
||||||
@ -503,7 +513,7 @@ let Calc = {
|
|||||||
let dmgCalcRet = detail.dmg ? detail.dmg(ds, dmg) : detail.heal(ds, function (num) {
|
let dmgCalcRet = detail.dmg ? detail.dmg(ds, dmg) : detail.heal(ds, function (num) {
|
||||||
let { attr, calc } = ds;
|
let { attr, calc } = ds;
|
||||||
return {
|
return {
|
||||||
avg: num * (1 + calc(attr.heal) / 100)
|
avg: num * (1 + calc(attr.heal) / 100) * (1 + attr.heal.inc / 100)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
rowData.push({
|
rowData.push({
|
||||||
|
@ -5,7 +5,7 @@ export const details = [{
|
|||||||
title: "水母每跳治疗",
|
title: "水母每跳治疗",
|
||||||
heal: ({ attr, talent, calc }, heal) => {
|
heal: ({ attr, talent, calc }, heal) => {
|
||||||
let t = talent.e['治疗量2'], hp = calc(attr.hp);
|
let t = talent.e['治疗量2'], hp = calc(attr.hp);
|
||||||
return heal(hp * t[0] / 100 + t[1]);
|
return heal(hp * t[0] / 100 + t[1] * 1);
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
cons: 2,
|
cons: 2,
|
||||||
|
@ -184,5 +184,11 @@ export const buffs = {
|
|||||||
data: {
|
data: {
|
||||||
aPlus: ({ attr }) => (attr.atk.base + attr.atk.plus + attr.atk.pct * attr.atk.base / 100) * 0.7
|
aPlus: ({ attr }) => (attr.atk.base + attr.atk.plus + attr.atk.pct * attr.atk.base / 100) * 0.7
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"被怜爱的少女4": {
|
||||||
|
title: "释放E或Q的10秒内,受治疗加成提高20%",
|
||||||
|
data: {
|
||||||
|
healInc: 20
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user