koishi-plugin-ggcevo-game 1.3.56 → 1.3.57
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/lib/index.js +12 -13
- 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 =
|
|
4512
|
+
joinDate = new Date(targetCareer.date);
|
|
4513
4513
|
} else if (typeof targetCareer.date === "number") {
|
|
4514
|
-
joinDate =
|
|
4514
|
+
joinDate = new Date(targetCareer.date);
|
|
4515
4515
|
} else {
|
|
4516
|
-
joinDate =
|
|
4516
|
+
joinDate = targetCareer.date;
|
|
4517
4517
|
}
|
|
4518
4518
|
if (isNaN(joinDate.getTime())) {
|
|
4519
4519
|
return "❌ 对方阵营加入阵营日期无效";
|
|
4520
4520
|
}
|
|
4521
|
-
const now2 =
|
|
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 =
|
|
4557
|
-
else if (typeof initiatorCareer.date === "number") joinDate =
|
|
4558
|
-
else joinDate =
|
|
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 =
|
|
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 =
|
|
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 = [
|
|
@@ -6464,10 +6464,9 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
6464
6464
|
return "⛏️ 首次挖矿作业已开始,请至少等待1小时后才可收获。\n提示:基础收益为每半小时6枚金币";
|
|
6465
6465
|
}
|
|
6466
6466
|
const nowtime = /* @__PURE__ */ new Date();
|
|
6467
|
-
const chinaStart =
|
|
6468
|
-
const chinaNow = convertUTCtoChinaTime(nowtime);
|
|
6467
|
+
const chinaStart = record.startTime;
|
|
6469
6468
|
const duration = Math.floor(
|
|
6470
|
-
(
|
|
6469
|
+
(nowtime.getTime() - chinaStart.getTime()) / 1e3 / 60
|
|
6471
6470
|
);
|
|
6472
6471
|
if (duration < 60) {
|
|
6473
6472
|
const remaining = 60 - duration;
|