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
8386de213f
commit
f9911c872f
@ -567,7 +567,7 @@ export async function renderProfile(e, char, render) {
|
|||||||
cDmg: p(a.cDmg),
|
cDmg: p(a.cDmg),
|
||||||
mastery: c(a.mastery),
|
mastery: c(a.mastery),
|
||||||
recharge: p(a.recharge),
|
recharge: p(a.recharge),
|
||||||
dmgBonus: p(a.dmgBonus)
|
dmgBonus: p(Math.max(a.dmgBonus * 1 || 0, a.phyBonus * 1 || 0))
|
||||||
};
|
};
|
||||||
|
|
||||||
let avatar = await getAvatar(e, char, MysApi);
|
let avatar = await getAvatar(e, char, MysApi);
|
||||||
@ -595,7 +595,6 @@ export async function renderProfile(e, char, render) {
|
|||||||
attr,
|
attr,
|
||||||
avatar,
|
avatar,
|
||||||
talent,
|
talent,
|
||||||
key: char.key,
|
|
||||||
cons: char.cons,
|
cons: char.cons,
|
||||||
name: char.name,
|
name: char.name,
|
||||||
elem: char.elem,
|
elem: char.elem,
|
||||||
@ -603,7 +602,7 @@ export async function renderProfile(e, char, render) {
|
|||||||
totalMark,
|
totalMark,
|
||||||
weapon: avatar.weapon,
|
weapon: avatar.weapon,
|
||||||
talentMap: { a: "普攻", e: "战技", q: "爆发" },
|
talentMap: { a: "普攻", e: "战技", q: "爆发" },
|
||||||
cfgScale: Cfg.scale(1.25)
|
cfgScale: Cfg.scale(1.5)
|
||||||
}, "png");
|
}, "png");
|
||||||
if (base64) {
|
if (base64) {
|
||||||
e.reply(segment.image(`base64://${base64}`));
|
e.reply(segment.image(`base64://${base64}`));
|
||||||
|
@ -2,6 +2,7 @@ import fs from "fs";
|
|||||||
import fetch from "node-fetch";
|
import fetch from "node-fetch";
|
||||||
import lodash from "lodash";
|
import lodash from "lodash";
|
||||||
import Format from "./Format.js";
|
import Format from "./Format.js";
|
||||||
|
import Character from "./models/Character.js";
|
||||||
|
|
||||||
const _path = process.cwd();
|
const _path = process.cwd();
|
||||||
const cfgPath = `${_path}/plugins/miao-plugin/components/setting.json`;
|
const cfgPath = `${_path}/plugins/miao-plugin/components/setting.json`;
|
||||||
@ -87,8 +88,10 @@ let Data = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
getAvatar(data) {
|
getAvatar(data) {
|
||||||
|
let char = Character.get(data["英雄Id"]);
|
||||||
return {
|
return {
|
||||||
id: data["英雄Id"],
|
id: data["英雄Id"],
|
||||||
|
name: char ? char.name : "",
|
||||||
lv: data['等级'],
|
lv: data['等级'],
|
||||||
attr: Data.getAttr(data),
|
attr: Data.getAttr(data),
|
||||||
weapon: Data.getWeapon(data),
|
weapon: Data.getWeapon(data),
|
||||||
@ -139,6 +142,7 @@ let Data = {
|
|||||||
maxDmg = Math.max(data[`属性${key}元素伤害加成`] * 1, maxDmg);
|
maxDmg = Math.max(data[`属性${key}元素伤害加成`] * 1, maxDmg);
|
||||||
});
|
});
|
||||||
ret.dmgBonus = (maxDmg * 100).toFixed(2);
|
ret.dmgBonus = (maxDmg * 100).toFixed(2);
|
||||||
|
ret.phyBonus = (data[`属性物理伤害加成`] * 100).toFixed(2);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
},
|
},
|
||||||
|
@ -509,4 +509,9 @@ body {
|
|||||||
.artis .weapon .affix-5 {
|
.artis .weapon .affix-5 {
|
||||||
box-shadow: 0 0 4px 0 #deaf39 inset;
|
box-shadow: 0 0 4px 0 #deaf39 inset;
|
||||||
background: #fff6dd;
|
background: #fff6dd;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.char-优菈 .main-pic {
|
||||||
|
margin-left: -175px;
|
||||||
}
|
}
|
@ -6,7 +6,7 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}/common/common.css"/>
|
<link rel="stylesheet" type="text/css" href="{{_res_path}}/common/common.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}/character/detail.css"/>
|
<link rel="stylesheet" type="text/css" href="{{_res_path}}/character/detail.css"/>
|
||||||
</head>
|
</head>
|
||||||
<body {{cfgScale}} class="elem_{{elem}} char-{{key}}">
|
<body {{cfgScale}} class="elem_{{elem}} char-{{name}}">
|
||||||
<div class="container" id="container">
|
<div class="container" id="container">
|
||||||
<div class="basic">
|
<div class="basic">
|
||||||
<div class="main-pic"
|
<div class="main-pic"
|
||||||
@ -34,7 +34,7 @@
|
|||||||
<li><i class="i-cr"></i>暴击率<strong>{{attr.cRate}}</strong></li>
|
<li><i class="i-cr"></i>暴击率<strong>{{attr.cRate}}</strong></li>
|
||||||
<li><i class="i-cd"></i>暴击伤害<strong>{{attr.cDmg}}</strong></li>
|
<li><i class="i-cd"></i>暴击伤害<strong>{{attr.cDmg}}</strong></li>
|
||||||
<li><i class="i-re"></i>元素充能<strong>{{attr.recharge}}</strong></li>
|
<li><i class="i-re"></i>元素充能<strong>{{attr.recharge}}</strong></li>
|
||||||
<li><i class="i-dmg"></i>元素伤害<strong>{{attr.dmgBonus}}</strong></li>
|
<li><i class="i-dmg"></i>伤害加成<strong>{{attr.dmgBonus}}</strong></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="char-cons">
|
<div class="char-cons">
|
||||||
|
Loading…
Reference in New Issue
Block a user