@sjtdev/koishi-plugin-dota2tracker 1.2.6-pre → 1.2.6-pre2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +4 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/template/hero/hero_1.ejs +46 -7
package/changelog.md
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
##### (因koishi尚未更新发布pre版)
|
|
3
3
|
**改进&修复**:修复了`查询英雄`图片中 技能数值未被正确替换、全才英雄基础攻击力显示错误的问题,并优化了命石描述显示方式
|
|
4
4
|
**改进**:调整比赛战报图片样式:解析失败时显示的“第-手”改为“第?手”
|
|
5
|
-
|
|
5
|
+
**修复**:修复`查询玩家`图片中场次表现评分为0时显示为?的问题
|
|
6
|
+
|
|
7
|
+
#### pre2
|
|
8
|
+
**改进&修复**:彻底完善了`查询英雄`图片中所有由命石、神杖、魔晶提供或改变的数值说明,修复命石说明中技能数值为百分数时未带百分号的问题。
|
|
6
9
|
|
|
7
10
|
### 1.2.5-fix
|
|
8
11
|
**修复**:使用临时替代方案修复由koishi-4.17.9的bug引起的无法主动发送消息(播报战报等),待koishi更新修复后回滚此改动。
|
package/lib/index.js
CHANGED
|
@@ -1516,7 +1516,7 @@ async function apply(ctx, config) {
|
|
|
1516
1516
|
const svs = ab.special_values.filter((sv) => sv.facet_bonus.name === facet.name);
|
|
1517
1517
|
svs.forEach((sv) => {
|
|
1518
1518
|
if (sv.heading_loc) {
|
|
1519
|
-
facet.abilities.find((ability) => ab.id == ability.id)?.attributes.push({ heading_loc: sv.heading_loc, values: [...sv.facet_bonus.values] });
|
|
1519
|
+
facet.abilities.find((ability) => ab.id == ability.id)?.attributes.push({ heading_loc: sv.heading_loc, values: [...sv.facet_bonus.values], is_percentage: sv.is_percentage });
|
|
1520
1520
|
}
|
|
1521
1521
|
});
|
|
1522
1522
|
facet.description_loc = formatHeroDesc(facet.description_loc, svs, "facet" /* Facet */);
|
package/package.json
CHANGED
package/template/hero/hero_1.ejs
CHANGED
|
@@ -421,7 +421,7 @@
|
|
|
421
421
|
padding-left: 0;
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
-
.skill .value{
|
|
424
|
+
.skill .value {
|
|
425
425
|
color: #fff;
|
|
426
426
|
}
|
|
427
427
|
|
|
@@ -458,6 +458,11 @@
|
|
|
458
458
|
background-color: #263945;
|
|
459
459
|
}
|
|
460
460
|
|
|
461
|
+
.skill .attributes {
|
|
462
|
+
line-height: 1.2em;
|
|
463
|
+
margin-bottom: 12px;
|
|
464
|
+
}
|
|
465
|
+
|
|
461
466
|
.skill .attributes .item {
|
|
462
467
|
color: #546780;
|
|
463
468
|
}
|
|
@@ -470,12 +475,30 @@
|
|
|
470
475
|
width: 16px;
|
|
471
476
|
}
|
|
472
477
|
|
|
473
|
-
.skill .attributes {
|
|
474
|
-
|
|
478
|
+
.skill .attributes .facet {
|
|
479
|
+
display: inline-flex;
|
|
480
|
+
font-size: 1em;
|
|
481
|
+
align-items: center;
|
|
482
|
+
line-height: 1.2em;
|
|
483
|
+
position: unset;
|
|
484
|
+
color: #fff;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.skill .attributes .facet span {
|
|
488
|
+
height: auto;
|
|
489
|
+
width: auto;
|
|
490
|
+
position: unset;
|
|
491
|
+
padding: 0 2px;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.skill .attributes .facet img {
|
|
495
|
+
width: auto;
|
|
496
|
+
height: 1em;
|
|
497
|
+
padding-right: 0.2em;
|
|
475
498
|
}
|
|
476
499
|
|
|
477
|
-
.skill .
|
|
478
|
-
padding-
|
|
500
|
+
.skill .cooldown {
|
|
501
|
+
padding-right: 12px;
|
|
479
502
|
}
|
|
480
503
|
|
|
481
504
|
.skill .cooldown::before,
|
|
@@ -635,7 +658,7 @@
|
|
|
635
658
|
${ability.description_ability_loc?`<div class="description">${ability.description_ability_loc}</div>`:""}
|
|
636
659
|
${ability.attributes&&ability.attributes?.length ? ability.attributes.map(attr=>
|
|
637
660
|
`<div class="attributes">
|
|
638
|
-
<p><span class="item">${attr.heading_loc}</span><span class="values">${attr.values.join(" / ")}</span></p>
|
|
661
|
+
<p><span class="item">${attr.heading_loc}</span><span class="values">${attr.values.map(value => value + (attr.is_percentage ? "%" : "")).join(" / ")}</span></p>
|
|
639
662
|
</div>`).join(""):""}
|
|
640
663
|
</div>`).join("")
|
|
641
664
|
:""}
|
|
@@ -710,7 +733,23 @@
|
|
|
710
733
|
<div class="attributes">
|
|
711
734
|
${item.special_values
|
|
712
735
|
.filter(sv => sv.heading_loc)
|
|
713
|
-
.map((sv) =>
|
|
736
|
+
.map((sv) =>
|
|
737
|
+
`<p>
|
|
738
|
+
<span class="item">${sv.heading_loc}</span>
|
|
739
|
+
<span class="values">
|
|
740
|
+
${(!(((sv.values_float.length == 1 && sv.values_float[0] == 0) || sv.values_float.length == 0) && (sv.values_scepter.length || sv.values_shard.length || sv.facet_bonus.name))
|
|
741
|
+
? (sv.values_float.map(value => value + (sv.is_percentage ? "%" : "")).join(" / ")) : "")}
|
|
742
|
+
${sv.values_scepter && sv.values_scepter.length
|
|
743
|
+
? (sv.values_float.length == 0 || (sv.values_float.length == 1 && sv.values_float[0] == 0) ? `<img src="${utils.getImageUrl("scepter")}"/>${sv.values_scepter.map(value => value + (sv.is_percentage ? "%" : "")).join(" / ")}` : ` (<img src="${utils.getImageUrl("scepter")}"/>${sv.values_scepter.map(value => (value > 0 ? "+" : "") + value + (sv.is_percentage ? "%" : "")).join(" / ")})`) : "" }
|
|
744
|
+
${sv.values_shard && sv.values_shard.length
|
|
745
|
+
? (sv.values_float.length == 0 || (sv.values_float.length == 1 && sv.values_float[0] == 0) ? `<img src="${utils.getImageUrl("shard")}"/>${sv.values_shard.map(value => value + (sv.is_percentage ? "%" : "")).join(" / ")}` : ` (<img src="${utils.getImageUrl("shard")}"/>${sv.values_shard.map(value => (value > 0 ? "+" : "") + value + (sv.is_percentage ? "%" : "")).join(" / ")})`) : "" }
|
|
746
|
+
${sv.facet_bonus.name
|
|
747
|
+
? (sv.values_float.length == 0 || (sv.values_float.length == 1 && sv.values_float[0] == 0) ? `<span class="facet"><span class="name_back type_${hero.facets.find(facet=>facet.name==sv.facet_bonus.name).color}"><img src="${utils.getImageUrl(hero.facets.find(facet=>facet.name==sv.facet_bonus.name).icon, ImageType.IconsFacets)}" /><span>${sv.facet_bonus.values.map(value => value + (sv.is_percentage ? "%" : "")).join(" / ")}</span></span></span>` : `(<span class="facet"><span class="name_back type_${hero.facets.find(facet=>facet.name==sv.facet_bonus.name).color}"><img src="${utils.getImageUrl(hero.facets.find(facet=>facet.name==sv.facet_bonus.name).icon, ImageType.IconsFacets)}" /><span>${sv.facet_bonus.values.map(value => (value > 0 ? "+" : "") + value + (sv.is_percentage ? "%" : "")).join(" / ")}</span></span></span>)` ) : ""}
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
${sv.bonuses.map(bonus=>` (<img src="${utils.getImageUrl("talents","icons","svg")}"/>${(bonus.value>0?"+":"")+bonus.value+(sv.is_percentage?"%":"")})`).join(" ")}
|
|
751
|
+
</span>
|
|
752
|
+
</p>`)
|
|
714
753
|
.join("")}
|
|
715
754
|
</div>
|
|
716
755
|
<p>
|