koishi-plugin-ggcevo-game 1.6.25 → 1.6.26

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.
Files changed (2) hide show
  1. package/lib/index.js +23 -11
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -7246,7 +7246,7 @@ async function createNestlingBosses(ctx, nestlingNames) {
7246
7246
  __name(createNestlingBosses, "createNestlingBosses");
7247
7247
  async function verifyFinalBlow(ctx, session, bossName, targetBoss) {
7248
7248
  const isDominationBoss = targetBoss.type === "主宰";
7249
- const isLowHealth = targetBoss.currentHealth < 2e3;
7249
+ const isLowHealth = targetBoss.HP < 2e3;
7250
7250
  const forbiddenSkills = ["求生本能I", "求生本能II", "复苏"];
7251
7251
  const hasResurrectionSkill = forbiddenSkills.some(
7252
7252
  (skill) => targetBoss.skills.includes(skill)
@@ -8443,25 +8443,37 @@ ${ticketMessage}${effectMessage}`;
8443
8443
  );
8444
8444
  const ggcmap = await ctx.database.get("ggcevo_global_stats", {});
8445
8445
  const lastdate = ggcmap[0].updatedAt;
8446
+ const rankDate = ggcmap[0].rankdate;
8447
+ const seasonStart = new Date(rankDate);
8448
+ seasonStart.setDate(seasonStart.getDate() + 1);
8449
+ seasonStart.setHours(0, 0, 0, 0);
8450
+ const seasonEnd = new Date(seasonStart);
8451
+ seasonEnd.setMonth(seasonEnd.getMonth() + 2);
8452
+ seasonEnd.setDate(seasonEnd.getDate() - 1);
8453
+ seasonEnd.setHours(23, 0, 0, 0);
8454
+ const formatDate2 = /* @__PURE__ */ __name((date) => date.toLocaleString("zh-CN", {
8455
+ timeZone: "Asia/Shanghai",
8456
+ year: "numeric",
8457
+ month: "2-digit",
8458
+ day: "2-digit",
8459
+ hour: "2-digit",
8460
+ minute: "2-digit",
8461
+ second: "2-digit",
8462
+ hour12: false
8463
+ }).replace(/(\d{4})\/(\d{2})\/(\d{2})/, "$1年$2月$3日").replace(/:\d{2}$/, ""), "formatDate");
8446
8464
  const rankingText = processedRecords.map(
8447
8465
  (item, index) => `${offset + index + 1}. ${item.displayName} | 积分: ${item.rank} | 胜率: ${item.matches === 0 ? "0.00%" : (item.wins / item.matches * 100).toFixed(2) + "%"}`
8448
8466
  ).join("\n");
8449
8467
  return [
8450
8468
  `🏆 咕咕胜点榜 ${config.rankseason}赛季`,
8451
- `数据最新同步时间: ${lastdate.toLocaleString("zh-CN", {
8452
- timeZone: "Asia/Shanghai",
8453
- year: "numeric",
8454
- month: "2-digit",
8455
- day: "2-digit",
8456
- hour: "2-digit",
8457
- minute: "2-digit",
8458
- hour12: false
8459
- })}`,
8469
+ `⏱️ 赛季时间: ${formatDate2(seasonStart)}~${formatDate2(seasonEnd)}`,
8470
+ // 新增的赛季持续时间
8471
+ `📊 数据最新同步时间: ${formatDate2(lastdate)}`,
8460
8472
  "------------------------------",
8461
8473
  rankingText,
8462
8474
  "------------------------------",
8463
8475
  `第 ${pageNum} 页 / 共 ${totalPages} 页`,
8464
- pageNum < totalPages ? `输入“胜点榜 ${pageNum + 1}”查看下一页` : "已是最后一页"
8476
+ pageNum < totalPages ? `输入"胜点榜 ${pageNum + 1}"查看下一页` : "已是最后一页"
8465
8477
  ].join("\n");
8466
8478
  });
8467
8479
  ctx.command("ggcevo/赛季结算", "进行赛季结算并发放奖励", { authority: 3 }).action(async ({ session }) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ggcevo-game",
3
3
  "description": "《星际争霸2》咕咕虫-evolved地图的专属游戏助手插件,集成天梯排行、抽奖系统、签到福利、兑换商城等丰富功能。",
4
- "version": "1.6.25",
4
+ "version": "1.6.26",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [