@sjtdev/koishi-plugin-dota2tracker 2.5.5 → 2.5.6

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # 更新日志
2
2
 
3
+ ### [2.5.6](https://github.com/sjtdev/koishi-plugin-dota2tracker/compare/v2.5.5...v2.5.6) (2026-03-12)
4
+
5
+ ### 🐛 Bug 修复
6
+
7
+ * **daily:** 修复了对于"LVP(头号战犯)"卡片判定的逻辑错误 ([1797209](https://github.com/sjtdev/koishi-plugin-dota2tracker/commit/17972098102dc0479dd9d3a9a3d33b041919cf1b))
8
+
3
9
  ### [2.5.5](https://github.com/sjtdev/koishi-plugin-dota2tracker/compare/v2.5.4...v2.5.5) (2026-03-08)
4
10
 
5
11
  ### 🐛 Bug 修复
package/lib/index.js CHANGED
@@ -4710,7 +4710,16 @@ var DailyReportService = class _DailyReportService extends import_koishi18.Servi
4710
4710
  this.calculateImpactPercentages(impactData);
4711
4711
  playerStats.sort((a, b) => b.maxMvpScore - a.maxMvpScore || b.avgKda - a.avgKda);
4712
4712
  const mvpStat = playerStats[0];
4713
- const lvpStat = playerStats[playerStats.length - 1];
4713
+ const getWorstMatchScore = /* @__PURE__ */ __name((stat) => {
4714
+ const ext = extensions.find((e) => Number(e.matchId) === stat.worstMatchId);
4715
+ const playerExt = ext?.data?.players?.find((p) => p.steamAccountId === stat.steamId);
4716
+ return playerExt?.mvpScore ?? 0;
4717
+ }, "getWorstMatchScore");
4718
+ const lvpStat = playerStats.reduce((worst, curr) => {
4719
+ const worstScore = getWorstMatchScore(worst);
4720
+ const currScore = getWorstMatchScore(curr);
4721
+ return currScore < worstScore || currScore === worstScore && curr.avgKda < worst.avgKda ? curr : worst;
4722
+ });
4714
4723
  const mvpPlayerData = squadPlayerData.find((p) => p.steamAccount.id === mvpStat.steamId);
4715
4724
  const lvpPlayerData = squadPlayerData.find((p) => p.steamAccount.id === lvpStat.steamId);
4716
4725
  playerRows.sort((a, b) => parseFloat(b.kda.ratio) - parseFloat(a.kda.ratio));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sjtdev/koishi-plugin-dota2tracker",
3
3
  "description": "koishi插件-追踪群友的DOTA2对局 | A Koishi plugin to track Dota 2 matches",
4
- "version": "2.5.5",
4
+ "version": "2.5.6",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [