koishi-plugin-ggcevo-game 1.4.96 → 1.5.0

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 CHANGED
@@ -4590,6 +4590,34 @@ var wishConfig = {
4590
4590
  ]
4591
4591
  };
4592
4592
 
4593
+ // src/update.ts
4594
+ var ggcevoUpdates = [
4595
+ {
4596
+ version: "1.5.0",
4597
+ time: "2025-06-27",
4598
+ content: `
4599
+ - 回调“伽马辐射”任务奖励为50金币
4600
+ - 修改武器系统科技
4601
+ - 提高人类联盟情报副官转职门槛
4602
+ - 削弱人类联盟警卫长攻击奖励为+75%
4603
+ - 新增“技能”指令用于查询各异形的技能列表
4604
+ `.trim()
4605
+ }
4606
+ ];
4607
+ function compareVersions(a, b) {
4608
+ const aParts = a.split(".").map(Number);
4609
+ const bParts = b.split(".").map(Number);
4610
+ for (let i = 0; i < Math.max(aParts.length, bParts.length); i++) {
4611
+ const aVal = aParts[i] || 0;
4612
+ const bVal = bParts[i] || 0;
4613
+ if (aVal !== bVal) {
4614
+ return bVal - aVal;
4615
+ }
4616
+ }
4617
+ return 0;
4618
+ }
4619
+ __name(compareVersions, "compareVersions");
4620
+
4593
4621
  // src/utils.ts
4594
4622
  async function gachaWithPity(ctx, handle) {
4595
4623
  const [record] = await ctx.database.get("ggcevo_records", { handle });
@@ -8254,7 +8282,7 @@ ${Object.keys(categoryStats).join("、")}`;
8254
8282
  "------------------"
8255
8283
  ].filter(Boolean).join("\n");
8256
8284
  });
8257
- const permissionNotice = category === "传奇武器" ? "⚠️ 购买传奇武器要求:人类联盟阵营+武器系统5级+情报副官/武器中士职业+传奇武器购买权限" : null;
8285
+ const permissionNotice = category === "传奇武器" ? "⚠️ 购买传奇武器要求:人类联盟阵营+武器系统5级+传奇武器购买权限" : null;
8258
8286
  return [
8259
8287
  `🏪 咕咕武器库 - ${category} 🏪`,
8260
8288
  '使用"购买 武器名称"指令进行购买',
@@ -10485,6 +10513,31 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
10485
10513
  `注:部分技能可触发衍生技能,最多显示二级衍生技能`
10486
10514
  ].join("\n");
10487
10515
  });
10516
+ ctx.command("ggcevo/咕咕更新").action(async ({ session }) => {
10517
+ try {
10518
+ const latestUpdates = [...ggcevoUpdates].sort((a, b) => compareVersions(a.version, b.version)).slice(0, 3);
10519
+ if (latestUpdates.length === 0) {
10520
+ return "🛑 暂无更新记录";
10521
+ }
10522
+ let message = "🕊️ 咕咕之战版本更新内容:\n\n";
10523
+ for (const update of latestUpdates) {
10524
+ message += `🔹【版本 v${update.version} | ${update.time}】
10525
+ `;
10526
+ message += `${update.content}
10527
+
10528
+ `;
10529
+ }
10530
+ const latestVersion = latestUpdates[0].version;
10531
+ message += `✅ 当前最新版本:v${latestVersion}
10532
+ `;
10533
+ message += "输入「ggcevo」查看全部指令\n";
10534
+ message += "输入「ggcevo/武器库」查看可购买武器";
10535
+ return message;
10536
+ } catch (error) {
10537
+ ctx.logger.error("咕咕更新指令出错:", error);
10538
+ return "🛠️ 系统维护中,请稍后再试";
10539
+ }
10540
+ });
10488
10541
  }
10489
10542
  __name(apply, "apply");
10490
10543
  // Annotate the CommonJS export names for ESM import in node:
@@ -0,0 +1,6 @@
1
+ export declare const ggcevoUpdates: {
2
+ version: string;
3
+ time: string;
4
+ content: string;
5
+ }[];
6
+ export declare function compareVersions(a: any, b: any): number;
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.4.96",
4
+ "version": "1.5.0",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [