修正部分角色的伤害计算错误:蒸发、久岐忍治疗

`#角色持有率` 增加提示说明
`#圣遗物列表` 展示个数提升至28
部分页面样式调整及提示优化
This commit is contained in:
yoimiya-kokomi 2022-06-22 06:07:12 +08:00
parent bbab3c9858
commit 1f41823f17
23 changed files with 175 additions and 60 deletions

View File

@ -1,3 +1,10 @@
# 1.7.9
* 修正部分角色的伤害计算错误:蒸发、久岐忍治疗
* `#角色持有率` 增加提示说明
* `#圣遗物列表` 展示个数提升至28
* 部分页面样式调整及提示优化
# 1.7.8
* 增加扩散、感电的计算逻辑,感谢 **@49631073**的逻辑梳理

View File

@ -952,7 +952,7 @@ export async function getArtis(e, { render }) {
}
artis = lodash.sortBy(artis, "_mark");
artis = artis.reverse();
artis = artis.slice(0, 20);
artis = artis.slice(0, 28);
//渲染图像
return await Common.render("character/artis", {
@ -1024,12 +1024,21 @@ export async function getOriginalPicture(e) {
} else {
source = (await e.friend.getChatHistory(e.source.time, 1)).pop();
}
console.log(source)
if (source) {
let imgPath = await redis.get(`miao:original-picture:${source.message_id}`);
if (imgPath) {
e.reply([segment.image(process.cwd() + "/plugins/miao-plugin/resources/" + imgPath)]);
return true;
}
if (source.time) {
let time = new Date();
// 对at错图像的增加嘲讽...
if (time / 1000 - source.time < 3600) {
e.reply([segment.image(process.cwd() + "/plugins/miao-plugin/resources/common/face/what.jpg")]);
return true;
}
}
}
e.reply("消息太过久远了,俺也忘了原图是啥了,下次早点来吧~");
return true;

View File

@ -15,12 +15,12 @@ export async function consStat(e, { render }) {
}
let consData = await HutaoApi.getCons();
if (!consData) {
e.reply("角色持有数据获取失败,请稍后重试~");
return true;
}
let msg = e.msg;
let mode = /持有/.test(msg) ? "char" : "cons";
@ -39,9 +39,16 @@ export async function consStat(e, { render }) {
return true;
}
let data = consData.data;
let Lumine = lodash.filter(data, (ds) => ds.avatar === 10000007)[0] || {},
Aether = lodash.filter(data, (ds) => ds.avatar === 10000005)[0] || {};
Lumine.holdingRate = (1 - Aether.holdingRate) || Lumine.holdingRate;
let ret = [];
lodash.forEach(consData.data, (ds) => {
lodash.forEach(data, (ds) => {
let char = Character.get(ds.avatar);
let data = {

View File

@ -17,7 +17,7 @@ export const Mastery = {
getBasePct(type, element) {
let typeCfg = erType[type];
if (typeCfg) {
return typeCfg.num(element) || 1;
return typeCfg.num({ element }) || 1;
}
return 1;
}

View File

@ -73,4 +73,4 @@ body {
color: #cbc4be;
margin: 5px 0 5px 20px;
}
/*# sourceMappingURL=index.css.map */
/*# sourceMappingURL=index.less.map */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 417 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

View File

@ -71,7 +71,7 @@
</div>
{{each reliquaries ds}}
<div class="item arti">
{{if ds.name && ds.main && ds.main[0] && ds.main[0]!="undefined"}}
{{if ds && ds.name && ds.main && ds.main[0] && ds.main[0]!="undefined"}}
<div class="arti-icon">
<img src="{{_sys_res_path}}/genshin/logo/reliquaries/{{ds.name}}.png"/>
<span>+{{ds.level}}</span>

View File

@ -83,7 +83,6 @@ body {
}
.copyright {
font-size: 16px;
font-family: Number, sans-serif;
text-align: center;
color: #fff;
position: relative;
@ -102,7 +101,6 @@ body {
display: inline-block;
vertical-align: middle;
padding: 0 5px;
font-family: Number, YS;
border-radius: 4px;
}
.cons-0 {
@ -231,7 +229,6 @@ body {
background: rgba(0, 0, 0, 0.4);
box-shadow: 0 0 1px 0 #fff;
color: #d3bc8e;
font-family: Number, YS;
padding: 10px 20px;
text-align: left;
border-radius: 10px 10px 0 0;
@ -240,7 +237,6 @@ body {
font-size: 12px;
color: #aaa;
margin-left: 10px;
font-family: Number, YS;
font-weight: normal;
}
.cont-body {
@ -248,7 +244,6 @@ body {
font-size: 12px;
background: rgba(0, 0, 0, 0.5);
box-shadow: 0 0 1px 0 #fff;
font-family: YS;
font-weight: normal;
}
ul.cont-msg {
@ -266,7 +261,6 @@ ul.cont-msg li strong {
padding: 10px 15px;
font-size: 12px;
background: rgba(0, 0, 0, 0.5);
font-family: YS;
font-weight: normal;
}
.cont-table {
@ -299,7 +293,6 @@ ul.cont-msg li strong {
}
.cont-table .thead > div,
.cont-table .thead > td {
font-family: YS;
color: #d3bc8e;
background: rgba(0, 0, 0, 0.4);
line-height: 40px;
@ -307,7 +300,6 @@ ul.cont-msg li strong {
}
.cont-table .title,
.cont-table .th {
font-family: YS;
color: #d3bc8e;
padding-right: 15px;
text-align: right;

View File

@ -101,7 +101,6 @@ body {
.copyright {
font-size: 16px;
font-family: Number, sans-serif;
text-align: center;
color: #fff;
position: relative;
@ -125,8 +124,6 @@ body {
vertical-align: middle;
padding: 0 5px;
border-radius: 4px;
font-family: Number, YS;
border-radius: 4px;
}
@ -198,7 +195,6 @@ each(@elems, {
background: rgba(0, 0, 0, .4);
box-shadow: 0 0 1px 0 #fff;
color: #d3bc8e;
font-family: Number, YS;
padding: 10px 20px;
text-align: left;
border-radius: 10px 10px 0 0;
@ -208,7 +204,6 @@ each(@elems, {
font-size: 12px;
color: #aaa;
margin-left: 10px;
font-family: Number, YS;
font-weight: normal;
}
@ -217,7 +212,6 @@ each(@elems, {
font-size: 12px;
background: rgba(0, 0, 0, 0.5);
box-shadow: 0 0 1px 0 #fff;
font-family: YS;
font-weight: normal;
}
@ -239,7 +233,6 @@ ul.cont-msg li strong {
padding: 10px 15px;
font-size: 12px;
background: rgba(0, 0, 0, 0.5);
font-family: YS;
font-weight: normal;
}
@ -281,7 +274,6 @@ ul.cont-msg li strong {
.cont-table .thead > div,
.cont-table .thead > td {
font-family: YS;
color: #d3bc8e;
background: rgba(0, 0, 0, .4);
line-height: 40px;
@ -291,7 +283,6 @@ ul.cont-msg li strong {
.cont-table .title,
.cont-table .th {
font-family: YS;
color: #d3bc8e;
padding-right: 15px;
text-align: right;

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -3,45 +3,37 @@ body {
width: 800px;
background: url("../common/theme/bg-01.jpg");
}
.container {
background: url(../common/theme/main-01.png) top left no-repeat;
background-size: 100% auto;
width: 800px;
}
.label {
font-family: Number, "微软雅黑", sans-serif;
}
.head-box {
margin: 60px 0 0 0;
padding-bottom: 0;
}
.head-box .title {
font-size: 50px;
}
.cont-box {
border-radius: 15px;
margin-top: 20px;
margin-bottom: 20px;
padding: 5px 15px;
overflow: hidden;
box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%);
box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15);
position: relative;
background: rgba(43, 52, 61, 0.8);
}
.help-group {
color: #ceb78b;
font-size: 18px;
font-weight: bold;
padding: 8px 0 5px 10px;
}
.help-table {
text-align: center;
border-collapse: collapse;
@ -52,11 +44,9 @@ body {
width: calc(100% + 30px);
color: #fff;
}
.help-table .tr {
display: table-row;
}
.help-table .td,
.help-table .th {
font-size: 14px;
@ -68,47 +58,40 @@ body {
width: 33.33%;
text-align: left;
}
.help-table .tr:nth-child(odd) {
background: rgba(34, 41, 51, .6)
background: rgba(34, 41, 51, 0.6);
}
.help-table .tr:nth-child(even) {
background: rgba(34, 41, 51, .3)
background: rgba(34, 41, 51, 0.3);
}
.help-table .tr:last-child .td {
padding-bottom: 12px;
}
.help-table .th {
background: rgba(34, 41, 51, .5)
background: rgba(34, 41, 51, 0.5);
}
.help-icon {
width: 40px;
height: 40px;
display: block;
position: absolute;
background: url("icon.png") 0 0 no-repeat;
background-size: 500px 500px;
background-size: 500px auto;
border-radius: 5px;
left: 6px;
top: 12px;
transform: scale(0.85);
}
.help-title {
display: block;
color: #d3bc8e;
font-size: 16px;
line-height: 24px;
}
.help-desc {
display: block;
font-size: 13px;
line-height: 18px;
color: #eee;
}
/*# sourceMappingURL=index.css.map */

114
resources/help/index.less Normal file
View File

@ -0,0 +1,114 @@
body {
transform: scale(1);
width: 800px;
background: url("../common/theme/bg-01.jpg");
}
.container {
background: url(../common/theme/main-01.png) top left no-repeat;
background-size: 100% auto;
width: 800px;
}
.label {
font-family: Number, "微软雅黑", sans-serif;
}
.head-box {
margin: 60px 0 0 0;
padding-bottom: 0;
}
.head-box .title {
font-size: 50px;
}
.cont-box {
border-radius: 15px;
margin-top: 20px;
margin-bottom: 20px;
padding: 5px 15px;
overflow: hidden;
box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%);
position: relative;
background: rgba(43, 52, 61, 0.8);
}
.help-group {
color: #ceb78b;
font-size: 18px;
font-weight: bold;
padding: 8px 0 5px 10px;
}
.help-table {
text-align: center;
border-collapse: collapse;
margin: 5px -10px -10px -15px;
border-radius: 0 0 10px 10px;
display: table;
overflow: hidden;
width: calc(100% + 30px);
color: #fff;
}
.help-table .tr {
display: table-row;
}
.help-table .td,
.help-table .th {
font-size: 14px;
display: table-cell;
box-shadow: 0 0 1px 0 #888 inset;
padding: 12px 0 12px 50px;
line-height: 24px;
position: relative;
width: 33.33%;
text-align: left;
}
.help-table .tr:nth-child(odd) {
background: rgba(34, 41, 51, .6)
}
.help-table .tr:nth-child(even) {
background: rgba(34, 41, 51, .3)
}
.help-table .tr:last-child .td {
padding-bottom: 12px;
}
.help-table .th {
background: rgba(34, 41, 51, .5)
}
.help-icon {
width: 40px;
height: 40px;
display: block;
position: absolute;
background: url("icon.png") 0 0 no-repeat;
background-size: 500px auto;
border-radius: 5px;
left: 6px;
top: 12px;
transform: scale(0.85);
}
.help-title {
display: block;
color: #d3bc8e;
font-size: 16px;
line-height: 24px;
}
.help-desc {
display: block;
font-size: 13px;
line-height: 18px;
color: #eee;
}

View File

@ -7,7 +7,6 @@
body {
font-size: 18px;
color: #1e1f20;
font-family: Number, YS2;
transform: scale(1.3);
transform-origin: 0 0;
width: 520px;
@ -32,9 +31,6 @@ body {
.log-cont .cont-title.current-version {
font-size: 20px;
}
.log-cont .cont-body {
font-family: Number, YS2;
}
.log-cont ul {
font-size: 14px;
padding-left: 20px;
@ -46,7 +42,6 @@ body {
margin: 1px 0;
}
.log-cont .cmd {
font-family: Number, YS;
color: #d3bc8e;
display: inline-block;
border-radius: 3px;
@ -55,7 +50,6 @@ body {
margin: 1px 2px;
}
.log-cont .strong {
font-family: Number, YS;
color: #24d5cd;
}
.log-cont .new {

View File

@ -12,7 +12,6 @@
body {
font-size: 18px;
color: #1e1f20;
font-family: Number, YS2;
transform: scale(1.3);
transform-origin: 0 0;
width: 520px;
@ -44,7 +43,6 @@ body {
}
.cont-body {
font-family: Number, YS2;
}
ul {
@ -63,7 +61,6 @@ body {
}
.cmd {
font-family: Number, YS;
color: #d3bc8e;
display: inline-block;
border-radius: 3px;
@ -73,7 +70,6 @@ body {
}
.strong {
font-family: Number, YS;
color: #24d5cd;
}

View File

@ -3,6 +3,7 @@ export const details = [{
dmg: ({ talent }, dmg) => dmg(talent.e['技能伤害'], 'e')
}, {
title: "E每跳治疗",
showDetail: true,
dmg: ({ talent, calc, attr }, { heal }) => {
let ec = talent.e['越祓草轮治疗量2'];
return heal(calc(attr.hp) * ec[0] / 100 + ec[1] * 1 + calc(attr.mastery) * 0.75)
@ -20,9 +21,9 @@ export const buffs = [{
heal: 15
}
}, {
title: "久岐忍被动:基于元素精通提高治疗量[healInc],伤害[ePlus]",
title: "久岐忍被动:基于元素精通提高治疗量[healNum],伤害[ePlus]",
data: {
healInc: ({ attr, calc }) => calc(attr.mastery) * 0.75,
healNum: ({ attr, calc }) => calc(attr.mastery) * 0.75,
ePlus: ({ attr, calc }) => calc(attr.mastery) * 0.25
}
}];

View File

@ -1,5 +1,5 @@
export const details = [{
title: "E提升伤害",
title: "E提升攻击力",
dmg: ({ talent, attr }) => {
return {
avg: talent.e['攻击力加成比例'] * attr.atk.base / 100

View File

@ -11,6 +11,7 @@ return (num * 100).toFixed(2);
{{block 'main'}}
<div class="info_box">
<div class="head-box type{{bgType}}">
{{if mode === "char"}}
@ -24,6 +25,18 @@ return (num * 100).toFixed(2);
<img class="genshin_logo" src="{{_sys_res_path}}/genshin/roleAll/原神.png"/>
</div>
<div class="cont msg-cont">
<div class="cont-title">角色持有率说明</div>
<div class="cont-body">
<ul class="cont-msg">
<li>数据来自<strong>胡桃API</strong>为SnapGenshin用户自主上传的角色池信息感谢SG团队</li>
<li>百分比基于全部上传用户的数据进行统计,能够一定程度上反映角色持有情况,结果供参考</li>
<li>由于是用户自主上传,数据可能有一定滞后。新角色的持有率会在卡池结束后的一段时间逐步稳定</li>
<li>数据最后更新时间:{{lastUpdate}}</li>
</ul>
</div>
</div>
<div class="data-box">
<div class="char-list">
<div class="avatar th">
@ -80,7 +93,6 @@ return (num * 100).toFixed(2);
</div>
{{/each}}
</div>
<p class="notice"> 数据来源DGP-Studio-胡桃API . 最后更新时间:{{lastUpdate}} </p>
</div>
</div>
{{/block}}

View File

@ -40,6 +40,10 @@ body {
.head-box .label {
font-size: 16px;
}
.msg-cont {
margin-left: 0;
margin-right: 0;
}
.notice {
color: #888;
font-size: 12px;

View File

@ -48,6 +48,11 @@ body {
}
}
.msg-cont {
margin-left: 0;
margin-right: 0;
}
.notice {
color: #888;
font-size: 12px;