mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
#角色面板 伤害计算增加甘雨
完善了一些计算逻辑
This commit is contained in:
parent
9290346ce3
commit
a86698c563
@ -1,6 +1,6 @@
|
|||||||
#1.2.0
|
#1.2.0
|
||||||
* `#角色面板` 增加伤害计算功能
|
* `#角色面板` 增加伤害计算功能
|
||||||
* 目前支持角色:雷神、胡桃、魈
|
* 目前支持角色:雷神、胡桃、魈、神子、甘雨
|
||||||
* 可通过 `#怪物等级85` 命令设定怪物等级,以获得更准确的计算结果
|
* 可通过 `#怪物等级85` 命令设定怪物等级,以获得更准确的计算结果
|
||||||
* 计算伤害为满Buff情况,后续会出更详细的Buff及计算展示
|
* 计算伤害为满Buff情况,后续会出更详细的Buff及计算展示
|
||||||
* `#获取游戏角色详情`命令在服务侧增加基于UID的天频度限制
|
* `#获取游戏角色详情`命令在服务侧增加基于UID的天频度限制
|
||||||
|
@ -185,7 +185,7 @@ export async function updateMiaoPlugin(e) {
|
|||||||
exec(command, function (error, stdout, stderr) {
|
exec(command, function (error, stdout, stderr) {
|
||||||
if (error) {
|
if (error) {
|
||||||
if (/Yunzai not found/.test(error)) {
|
if (/Yunzai not found/.test(error)) {
|
||||||
e.reply("自动重启失败,请使用 npm run start 命令启动Yunzai-Bot");
|
e.reply("自动重启失败,请手动重启以应用新版喵喵。请使用 npm run start 命令启动Yunzai-Bot");
|
||||||
} else {
|
} else {
|
||||||
e.reply("重启失败!\nError code: " + error.code + "\n" + error.stack + "\n 请稍后重试。");
|
e.reply("重启失败!\nError code: " + error.code + "\n" + error.stack + "\n 请稍后重试。");
|
||||||
}
|
}
|
||||||
@ -195,5 +195,5 @@ export async function updateMiaoPlugin(e) {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
return true;
|
||||||
}
|
}
|
@ -359,14 +359,18 @@ let Calc = {
|
|||||||
let defNum = (lv + 100) / ((lv + 100) + (enemyLv + 100) * (1 - enemyDef) * (1 - enemyIgnore));
|
let defNum = (lv + 100) / ((lv + 100) + (enemyLv + 100) * (1 - enemyDef) * (1 - enemyIgnore));
|
||||||
|
|
||||||
// 抗性区
|
// 抗性区
|
||||||
|
let kx = 10 - (attr.kx || 0);
|
||||||
let kNum = 0.9;
|
let kNum = 0.9;
|
||||||
|
if (kx >= 0) {
|
||||||
|
kNum = (100 - kx) / 100;
|
||||||
|
} else {
|
||||||
|
kNum = 1 - kx / 200
|
||||||
|
}
|
||||||
|
|
||||||
// 反应区
|
// 反应区
|
||||||
let eleNum = 1;
|
let eleNum = 1;
|
||||||
if (ele) {
|
if (ele) {
|
||||||
eleNum = { zf: 1.5, rh: 2 }[ele] || 1;
|
eleNum = { zf: 1.5, rh: 2 }[ele] || 1;
|
||||||
|
|
||||||
|
|
||||||
if (attr[ele]) {
|
if (attr[ele]) {
|
||||||
eleNum = eleNum * (1 + attr[ele] / 100);
|
eleNum = eleNum * (1 + attr[ele] / 100);
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,30 @@
|
|||||||
export const details = [];
|
export const details = [{
|
||||||
|
title: "霜华绽发伤害",
|
||||||
|
dmg: ({ talent }, dmg) => dmg(talent.a['霜华矢·霜华绽发伤害'], 'a2')
|
||||||
|
}, {
|
||||||
|
title: "霜华矢两段总伤害",
|
||||||
|
dmg: ({ talent }, dmg) => dmg(talent.a['霜华矢·霜华绽发伤害'] + talent.a['霜华矢命中伤害'], 'a2')
|
||||||
|
}, {
|
||||||
|
title: "霜华矢两段+融化",
|
||||||
|
dmg: ({ talent }, dmg) => dmg(talent.a['霜华矢·霜华绽发伤害'] + talent.a['霜华矢命中伤害'], 'a2', 'rh')
|
||||||
|
}, {
|
||||||
|
title: "Q单个冰凌伤害",
|
||||||
|
params: {
|
||||||
|
q: 1
|
||||||
|
},
|
||||||
|
dmg: ({ talent }, dmg) => dmg(talent.q['冰棱伤害'], 'q')
|
||||||
|
}];
|
||||||
|
|
||||||
export const defParams = {
|
|
||||||
|
|
||||||
};
|
|
||||||
export const buffs = [{
|
export const buffs = [{
|
||||||
cons: 1,
|
cons: 1,
|
||||||
title: "1命效果:霜华失命中减少敌人15%冰抗",
|
title: "1命效果:霜华失命中减少敌人15%冰抗",
|
||||||
data: {
|
data: {
|
||||||
kx: 15
|
kx: ({ params }) => params.q ? 0 : 15
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
cons: 4,
|
cons: 4,
|
||||||
title: "4命效果:大招领域内敌人受到的伤害提升25%",
|
title: "4命效果:大招领域内敌人受到的伤害提升25%",
|
||||||
data: {
|
data: {
|
||||||
dmg: 25
|
dmg: ({ params }) => params.q ? 25 : 0
|
||||||
}
|
}
|
||||||
}];
|
}];
|
@ -45,7 +45,7 @@ export const buffs = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"流浪大地的乐团4": {
|
"流浪大地的乐团4": {
|
||||||
check: ({ weaponType }) => ['法器', '弓'].includes(weaponType),
|
check: ({ weaponType }) => ['法器', '弓'].includes(weaponType),
|
||||||
title: "乐团4:角色重击造成的伤害提高35%",
|
title: "乐团4:角色重击造成的伤害提高35%",
|
||||||
data: {
|
data: {
|
||||||
a2Dmg: 35
|
a2Dmg: 35
|
||||||
@ -71,12 +71,12 @@ export const buffs = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"炽烈的炎之魔女4": {
|
"炽烈的炎之魔女4": {
|
||||||
check:({element})=>element === "火",
|
check: ({ element }) => element === "火",
|
||||||
title: "魔女4:蒸发、融化伤害提高15%,2层获得15%火元素伤害加成",
|
title: "魔女4:蒸发、融化伤害提高15%,1层额外提高7.5%火元素伤害加成",
|
||||||
data: {
|
data: {
|
||||||
zf: 15,
|
zf: 15,
|
||||||
rh: 15,
|
rh: 15,
|
||||||
dmg: 15
|
dmg: ({ params }) => (params.mn || 1) * 7.5
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"昔日宗室之仪2": {
|
"昔日宗室之仪2": {
|
||||||
@ -92,14 +92,14 @@ export const buffs = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"冰风迷途的勇士4": {
|
"冰风迷途的勇士4": {
|
||||||
check:({element})=>element === "冰",
|
check: ({ element }) => element === "冰",
|
||||||
title: "冰套4:攻击处于冰元素影响下的敌人时,暴击率提高20%",
|
title: "冰套4:攻击处于冰元素影响下的敌人时,暴击率提高20%",
|
||||||
data: {
|
data: {
|
||||||
cpct: 20
|
cpct: 20
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"沉沦之心4": {
|
"沉沦之心4": {
|
||||||
check:({element})=>element === "水",
|
check: ({ element }) => element === "水",
|
||||||
title: "水套4:施放元素战技后,普攻与重击伤害提高30%",
|
title: "水套4:施放元素战技后,普攻与重击伤害提高30%",
|
||||||
data: {
|
data: {
|
||||||
aDmg: 30,
|
aDmg: 30,
|
||||||
@ -129,14 +129,14 @@ export const buffs = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"平息鸣雷的尊者4": {
|
"平息鸣雷的尊者4": {
|
||||||
check:({element})=>element === "雷",
|
check: ({ element }) => element === "雷",
|
||||||
title: "平雷4:对处于雷元素影响下的敌人造成的伤害提升35%",
|
title: "平雷4:对处于雷元素影响下的敌人造成的伤害提升35%",
|
||||||
data: {
|
data: {
|
||||||
dmg: 35
|
dmg: 35
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"渡过烈火的贤人4": {
|
"渡过烈火的贤人4": {
|
||||||
check:({element})=>element === "火",
|
check: ({ element }) => element === "火",
|
||||||
title: "渡火4:对处于火元素影响下的敌人造成的伤害提升35%",
|
title: "渡火4:对处于火元素影响下的敌人造成的伤害提升35%",
|
||||||
data: {
|
data: {
|
||||||
dmg: 35
|
dmg: 35
|
||||||
|
@ -16,6 +16,7 @@ let polearm = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"匣里灭辰": {
|
"匣里灭辰": {
|
||||||
|
check: ({ element }) => ['水', '火'].includes(element),
|
||||||
title: "对于水或或元素影响的敌人造成伤害提高[dmg]%",
|
title: "对于水或或元素影响的敌人造成伤害提高[dmg]%",
|
||||||
refine: {
|
refine: {
|
||||||
dmg: [20, 24, 28, 32, 36]
|
dmg: [20, 24, 28, 32, 36]
|
||||||
@ -83,9 +84,8 @@ let polearm = {
|
|||||||
"护摩之杖": {
|
"护摩之杖": {
|
||||||
title: "角色生命低于50%时额外获得[atkPlus]攻击力",
|
title: "角色生命低于50%时额外获得[atkPlus]攻击力",
|
||||||
data: {
|
data: {
|
||||||
atkPlus: ({ attr, refine }) => {
|
atkPlus: ({ attr, refine,calc }) => {
|
||||||
let { hp } = attr,
|
let totalHp = calc(attr.hp);
|
||||||
totalHp = hp.base + hp.plus + hp.pct * hp.base / 100;
|
|
||||||
return totalHp * ([0.8, 1, 1.2, 1.4, 1.6][refine] + [1, 1.2, 1.4, 1.6, 1.8][refine]) / 100
|
return totalHp * ([0.8, 1, 1.2, 1.4, 1.6][refine] + [1, 1.2, 1.4, 1.6, 1.8][refine]) / 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user