koishi-plugin-ggcevo-game 1.3.56 → 1.3.58

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 +14 -16
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -4509,16 +4509,16 @@ ${items.join("、")}
4509
4509
  if (targetCareer.group === "人类联盟") {
4510
4510
  let joinDate;
4511
4511
  if (typeof targetCareer.date === "string") {
4512
- joinDate = convertUTCtoChinaTime(new Date(targetCareer.date));
4512
+ joinDate = new Date(targetCareer.date);
4513
4513
  } else if (typeof targetCareer.date === "number") {
4514
- joinDate = convertUTCtoChinaTime(new Date(targetCareer.date));
4514
+ joinDate = new Date(targetCareer.date);
4515
4515
  } else {
4516
- joinDate = convertUTCtoChinaTime(targetCareer.date);
4516
+ joinDate = targetCareer.date;
4517
4517
  }
4518
4518
  if (isNaN(joinDate.getTime())) {
4519
4519
  return "❌ 对方阵营加入阵营日期无效";
4520
4520
  }
4521
- const now2 = convertUTCtoChinaTime(/* @__PURE__ */ new Date());
4521
+ const now2 = /* @__PURE__ */ new Date();
4522
4522
  const timeDiff = now2.getTime() - joinDate.getTime();
4523
4523
  const diffInDays = Math.floor(timeDiff / (1e3 * 60 * 60 * 24));
4524
4524
  if (diffInDays < 30) {
@@ -4553,16 +4553,16 @@ ${items.join("、")}
4553
4553
  });
4554
4554
  if (initiatorCareer.group === "人类联盟" && !initiatorPK.enable) {
4555
4555
  let joinDate;
4556
- if (typeof initiatorCareer.date === "string") joinDate = convertUTCtoChinaTime(new Date(initiatorCareer.date));
4557
- else if (typeof initiatorCareer.date === "number") joinDate = convertUTCtoChinaTime(new Date(initiatorCareer.date));
4558
- else joinDate = convertUTCtoChinaTime(initiatorCareer.date);
4556
+ if (typeof initiatorCareer.date === "string") joinDate = new Date(initiatorCareer.date);
4557
+ else if (typeof initiatorCareer.date === "number") joinDate = new Date(initiatorCareer.date);
4558
+ else joinDate = initiatorCareer.date;
4559
4559
  if (!isNaN(joinDate.getTime())) {
4560
- const now2 = convertUTCtoChinaTime(/* @__PURE__ */ new Date());
4560
+ const now2 = /* @__PURE__ */ new Date();
4561
4561
  const timeDiff = now2.getTime() - joinDate.getTime();
4562
4562
  const remainingDays = 30 - Math.floor(timeDiff / (1e3 * 60 * 60 * 24));
4563
4563
  if (remainingDays > 0) {
4564
4564
  await session.send(`⚠️ 您的人类联盟保护期剩余 ${remainingDays} 天,发起PK将永久失去保护期!请确认是否继续?
4565
- 回复"是"继续PK,或"取消"退出`);
4565
+ 回复"是"继续PK,或""退出`);
4566
4566
  const confirm = await session.prompt(3e4);
4567
4567
  if (confirm !== "是") return "已取消PK操作,保护期仍有效";
4568
4568
  }
@@ -6075,7 +6075,7 @@ ${scatterEffectMessages.map((m) => `▸ ${m}`).join("\n")}`
6075
6075
  const config2 = careerData.group === "辛迪加海盗" ? syndicatePirateConfig : spaceStationCrewConfig;
6076
6076
  const profession = config2.find((p) => p.professionName === careerData.career);
6077
6077
  const effectDisplay = profession?.effect || "暂无特殊效果";
6078
- const joinDate = convertUTCtoChinaTime(new Date(careerData.date));
6078
+ const joinDate = new Date(careerData.date);
6079
6079
  const formattedDate = `${joinDate.getFullYear()}年${joinDate.getMonth() + 1}月${joinDate.getDate()}日`;
6080
6080
  const powerValue = await calculateTotalPower(handle);
6081
6081
  const infoCard = [
@@ -6312,10 +6312,10 @@ ${scatterEffectMessages.map((m) => `▸ ${m}`).join("\n")}`
6312
6312
  const redcrystal = careerData[0]?.redcrystal || 0;
6313
6313
  const message = [`【${handle}的仓库】`];
6314
6314
  message.push(`💰 金币:${totalRewards}`);
6315
- if (redcrystal > 0) {
6315
+ if (careerData[0]?.group === "辛迪加海盗") {
6316
6316
  message.push(`🔴 红晶:${redcrystal}`);
6317
- message.push("――――――――――――――");
6318
6317
  }
6318
+ message.push("――――――――――――――");
6319
6319
  const validItems = items.filter(
6320
6320
  (item) => Object.values(SyndicatedItems).some(
6321
6321
  (specialItem) => specialItem.id === item.itemId
@@ -6432,7 +6432,6 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
6432
6432
  '使用 "升级 科技名称" 进行升级',
6433
6433
  "====================",
6434
6434
  ...techDetails,
6435
- "====================",
6436
6435
  isIntelligenceOfficer && "※ 情报副官享受20%升级折扣"
6437
6436
  // 新增折扣提示
6438
6437
  ].filter(Boolean).join("\n");
@@ -6464,10 +6463,9 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
6464
6463
  return "⛏️ 首次挖矿作业已开始,请至少等待1小时后才可收获。\n提示:基础收益为每半小时6枚金币";
6465
6464
  }
6466
6465
  const nowtime = /* @__PURE__ */ new Date();
6467
- const chinaStart = convertUTCtoChinaTime(record.startTime);
6468
- const chinaNow = convertUTCtoChinaTime(nowtime);
6466
+ const chinaStart = record.startTime;
6469
6467
  const duration = Math.floor(
6470
- (chinaNow.getTime() - chinaStart.getTime()) / 1e3 / 60
6468
+ (nowtime.getTime() - chinaStart.getTime()) / 1e3 / 60
6471
6469
  );
6472
6470
  if (duration < 60) {
6473
6471
  const remaining = 60 - duration;
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.3.56",
4
+ "version": "1.3.58",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [