* 增加 #甘雨伤害 命令,可以查看伤害计算的具体Buff效果。后续会完善计算逻辑

调整部分角色的伤害计算文案
This commit is contained in:
yoimiya-kokomi 2022-04-30 06:35:21 +08:00
parent 1b694f1a08
commit 4f4f1dc9d3
11 changed files with 107 additions and 51 deletions

View File

@ -1,16 +1,16 @@
# 1.2.2
# 1.2.3
* `#角色面板` 增加伤害计算功能
* 目前支持角色:雷神、胡桃、魈、神子、甘雨、宵宫、公子、绫人、绫华
* `#角色面板` 功能升级
* 优化无角色面板数据时的引导
* 优化返回的图像格式及分辨率,平衡响应速度及显示效果
* 优化无角色面板数据时的引导
* 优化返回的图像格式及分辨率,平衡响应速度及显示效果
* 增加 `#甘雨伤害` 命令可以查看伤害计算的具体Buff效果。后续会完善计算逻辑
* 增加 `#圣遗物列表` 命令,对已经获取面板的所有角色圣遗物进行评分,并展示高评分的圣遗物列表
* 增加 `#角色面板列表` 命令,查看已经获取面板的角色列表
* 增加 `#更新胡桃面板` 命令获取单个角色面板数据每天可更新5次
* 更改 `#更新全部面板` 命令获取角色展柜全部8个角色每天可更新3次
# 1.2.0
* `#角色面板` 增加伤害计算功能

View File

@ -68,6 +68,9 @@ export async function character(e, { render, User }) {
if (/(详情|详细|面板|面版)$/.test(msg) && !/更新/.test(msg)) {
mode = 'profile';
name = name.replace(/(详情|详细|面板|面版)/, "").trim();
} else if (/伤害$/.test(msg)) {
mode = 'dmg';
name = name.replace(/伤害/, "").trim();
} else if (/(详情|详细|面板|面版)更新$/.test(msg) || (/更新/.test(msg) && /(详情|详细|面板|面版)$/.test(msg))) {
mode = "refresh";
name = name.replace(/详情|详细|面板|面版|更新/g, "").trim();
@ -80,8 +83,8 @@ export async function character(e, { render, User }) {
}
if (mode === "profile") {
return renderProfile(e, char, render);
if (mode === "profile" || mode === "dmg") {
return renderProfile(e, char, render, mode);
} else if (mode === "refresh") {
e.avatar = char.id;
await getProfile(e);
@ -561,7 +564,7 @@ async function getAvatar(e, char, MysApi) {
}
export async function renderProfile(e, char, render) {
export async function renderProfile(e, char, render, mode = "profile") {
if (['荧', '空', '主角', '旅行者'].includes(char.name)) {
e.reply("暂不支持主角的面板信息查看");
@ -664,7 +667,10 @@ export async function renderProfile(e, char, render) {
ds.avg = Format.comma(ds.avg, 0);
dmgData.push(ds);
})
dmgMsg = dmgCalc.msg;
lodash.forEach(dmgCalc.msg, (msg) => {
msg.replace(":", "");
dmgMsg.push(msg.split(""))
})
}
let base64 = await render("character", "detail", {
@ -688,6 +694,7 @@ export async function renderProfile(e, char, render) {
usefulTitles,
usefulMark,
talentMap: { a: "普攻", e: "战技", q: "爆发" },
mode,
cfgScale: Cfg.scale(1.8)
});
if (base64) {

View File

@ -241,7 +241,7 @@ let Calc = {
}
lodash.forEach(weaponCfg, (ds) => {
ds.title = `${weaponName}${ds.title}`;
ds.title = `${weaponName}效果${ds.title}`;
if (ds.refine) {
ds.data = ds.data || {};
lodash.forEach(ds.refine, (r, key) => {
@ -391,13 +391,18 @@ let Calc = {
}
}
cpctNum = Math.max(0, Math.min(1, cpctNum));
if (cpctNum === 0) {
cdmgNum = 0;
}
// 计算最终伤害
let ret = {
dmg: (atkNum * pctNum * (1 + multiNum) + plusNum) * dmgNum * (1 + cdmgNum) * defNum * kNum * eleNum,
avg: (atkNum * pctNum * (1 + multiNum) + plusNum) * dmgNum * (1 + cpctNum * cdmgNum) * defNum * kNum * eleNum
}
// console.log(attr, { atkNum, pctNum, multiNum, plusNum, dmgNum, cpctNum, cdmgNum, defNum, eleNum, kNum }, ret)
// console.log(attr, { atkNum, pctNum, multiNum, plusNum, dmgNum, cpctNum, cdmgNum, defNum, eleNum, kNum }, ret)
return ret;
};

View File

@ -37,7 +37,7 @@ export {
let rule = {
character: {
reg: "^#(喵喵)?(更新)?(.*)(详情|详细|面板|面版)?(更新)?$",
reg: "^#(喵喵)?(更新)?(.*)(详情|详细|面板|面版|伤害)?(更新)?$",
describe: "【#角色】角色详情",
},
getArtis: {

View File

@ -303,8 +303,7 @@ body {
/*** dmg ***/
.dmg-cont {
.cont {
border-radius: 10px;
background: url("../common/cont/card-bg.png") top left repeat-x;
background-size: auto 100%;
@ -312,12 +311,15 @@ body {
position: relative;
box-shadow: 0 0 1px 0 #ccc, 2px 2px 4px 0 rgba(50, 50, 50, .8);
overflow: hidden;
display: table;
width: calc(100% - 25px);
color: #fff;
font-size: 16px;
}
.dmg-cont {
display: table;
width: calc(100% - 25px);
}
.dmg-cont .tr {
display: table-row;
}
@ -335,11 +337,11 @@ body {
box-shadow: 0 0 1px 0 #fff;
}
.dmg-cont .th {
.dmg-cont .thead {
text-align: center;
}
.dmg-cont .th > div {
.dmg-cont .thead > div {
font-family: YS;
color: #d3bc8e;
background: rgba(0, 0, 0, .4);
@ -348,12 +350,14 @@ body {
}
.dmg-cont .title {
.dmg-cont .title,
.dmg-cont .th {
font-family: YS;
color: #d3bc8e;
padding-right: 15px;
text-align: right;
background: rgba(0, 0, 0, .4);
min-width: 100px;
}
@ -420,7 +424,7 @@ body {
display: block;
}
.artis .item .arti-icon img {
.artis .item .arti-icon img {
width: 60px;
height: 60px;
}
@ -643,6 +647,28 @@ body {
line-height: 40px;
}
.dmg-msg {
font-family: Number, YS;
font-size: 13px;
font-weight: normal;
margin-top: 15px;
}
.dmg-msg .th {
width: 33%;
}
.dmg-msg .tr .td {
padding: 8px 10px;
}
.dmg-msg .info {
font-size: 12px;
text-align: left;
padding-left: 10px;
font-weight: normal;
}
.artis .stat span {
font-size: 13px;

View File

@ -50,7 +50,7 @@
</div>
{{if dmgData.length > 0}}
<div class="dmg-cont cont">
<div class="tr th">
<div class="tr thead">
<div class="title">伤害类型</div>
<div>暴击伤害</div>
<div>平均伤害(计算暴击率)</div>
@ -66,6 +66,7 @@
<div class="dmg-notice">目标为{{enemyLv}}级小宝,如需调整等级可使用 #敌人等级{{enemyLv}} 来进行设置</div>
{{/if}}
{{if mode === "profile"}}
<div class="artis">
<div>
<div class="item weapon">
@ -106,6 +107,24 @@
</div>
{{/each}}
</div>
{{/if}}
{{if mode === "dmg"}}
<div class="dmg-cont dmg-msg cont">
<div class="tr thead">
<div class="title">
Buff列表
</div>
<div class="info">部分Buff的触发条件以及层数可能影响实际伤害结果</div>
</div>
{{each dmgMsg msg}}
<div class="tr">
<div class="th">{{msg[0]}}</div>
<div class="td">{{msg[1]}}</div>
</div>
{{/each}}
</div>
{{/if}}
<div class="copyright">Created By Yunzai-Bot & Miao-Plugin</div>
</div>
</body>

View File

@ -13,7 +13,7 @@ export const details = [{
}];
export const buffs = [{
title: "宵宫E开启后额外提升普通[aMulti]%伤害",
title: "焰硝庭火舞开启E后额外提升普通[aMulti]%伤害",
data: {
aMulti: ({ talent }) => talent.e["炽焰箭伤害"] - 100
}
@ -23,7 +23,7 @@ export const buffs = [{
dmg: ({ params }) => params.num ? params.num * 2 : 20
}
}, {
title: "座2宵宫造成暴击后获得25%火伤加成",
title: "宵宫2宵宫造成暴击后获得25%火伤加成",
cons: 2,
data: {
dmg: ({ params }) => params.num > 1 ? 25 : 0

View File

@ -17,13 +17,13 @@ export const details = [{
export const buffs = [{
cons: 1,
title: "1命效果霜华失命中减少敌人15%冰抗",
title: "甘雨1命霜华失命中减少敌人15%冰抗",
data: {
kx: ({ params }) => params.q ? 0 : 15
}
}, {
cons: 4,
title: "4命效果大招领域内敌人受到的伤害提升25%",
title: "甘雨4命大招领域内敌人受到的伤害提升25%",
data: {
dmg: ({ params }) => params.q ? 25 : 0
}

View File

@ -10,19 +10,18 @@ export const details = [{
}];
export const buffs = [{
title: `被动天赋半血获得33%火伤加成`,
data: {
"dmg": 33
}
}, {
title: "元素精通:蒸发融化伤害提高[zf]%",
mastery: "zf,rh"
}, {
title: "胡桃E获得[atkPlus]点攻击力加成",
title: "蝶引来生开E获得[atkPlus]点攻击力加成",
data: {
atkPlus: ({ talent, attr, calc }) => {
return talent.e['攻击力提高'] * calc(attr.hp) / 100;
}
}
}, {
title: `胡桃被动半血获得33%火伤加成`,
data: {
"dmg": 33
}
}, {
title: "元素精通:蒸发融化伤害提高[zf]%",
mastery: "zf,rh"
}];

View File

@ -28,23 +28,23 @@ export const defParams = {
export const buffs = [
{
title: `E被动:元素爆发伤害提升[qDmg]%`,
title: `恶曜开眼:开E元素爆发伤害提升[qDmg]%`,
data: {
"qDmg": ({ talent }) => talent.e["元素爆发伤害提高"] * 90
}
}, {
check: ({ cons }) => cons >= 2,
title: "2命效果大招无视敌人[qDef]%防御力",
data: {
"qIgnore": 60
}
}, {
title: "Q被动满愿力获得[qPct]%大招倍率加成",
title: "梦想真说Q满愿力获得[qPct]%大招倍率加成",
data: {
"qPct": ({ talent, params }) => talent.q["愿力加成"][params.type || 0] * params.num
}
}, {
title: "基于元素充能获得[dmg]%雷伤加成",
check: ({ cons }) => cons >= 2,
title: "雷神2命大招无视敌人[qDef]%防御力",
data: {
"qIgnore": 60
}
}, {
title: "雷神被动:基于元素充能获得[dmg]%雷伤加成",
data: {
dmg: ({ attr }) => Math.max(attr.recharge.base + attr.recharge.plus - 100, 0) * 0.4
}

View File

@ -1,18 +1,18 @@
export const details = [{
title: "裸E",
title: "风轮两立",
dmg: ({ talent }, dmg) => dmg(talent.e["技能伤害"], "e")
}, {
title: "满层被动E",
params: { e: 1 },
dmg: ({ talent }, dmg) => dmg(talent.e["技能伤害"], "e")
}, {
title: "开Q后首插",
title: "靖妖傩舞·首插",
params: {
layer: 1
},
dmg: ({ talent }, dmg) => dmg(talent.a["低空/高空坠地冲击伤害"][1], "a3")
}, {
title: "开Q后尾插",
title: "靖妖傩舞·尾插",
params: {
layer: 5
},
@ -25,15 +25,15 @@ export const defParams = {
}
export const buffs = [{
title: "靖妖傩舞:下落攻击伤害提升[a3Dmg]%",
data: {
a3Dmg: ({ talent }) => talent.q['普通攻击/重击/下落攻击伤害提升']
}
}, {
title: `魈天赋开Q后每3秒伤害提升5%满层提高25%`,
data: {
dmg: ({ params }) => params.layer * 5
}
}, {
title: "魈大招:下落攻击伤害提升[a3Dmg]%",
data: {
a3Dmg: ({ talent }) => talent.q['普通攻击/重击/下落攻击伤害提升']
}
}, {
title: "魈被动3层E使E的伤害提高45%",
data: {