koishi-plugin-ggcevo-game 1.5.23 → 1.5.25

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 +11 -14
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -10926,10 +10926,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
10926
10926
  return "⛔ 您已被列入黑名单。";
10927
10927
  }
10928
10928
  const [career] = await ctx.database.get("ggcevo_careers", { handle });
10929
- if (!career) return "🚫 需要阵营为【人类联盟】或【辛迪加海盗】";
10930
10929
  const allowedGroups = ["人类联盟", "辛迪加海盗"];
10931
10930
  if (!allowedGroups.includes(career.group)) {
10932
- return `🚫 需要阵营为【人类联盟】或【辛迪加海盗】,您当前是${career.group}`;
10933
10931
  }
10934
10932
  const [tech] = await ctx.database.get("ggcevo_tech", { handle, techId: 1 });
10935
10933
  const techLevel = tech?.level || 0;
@@ -11431,10 +11429,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11431
11429
  return "⛔ 您已被列入黑名单。";
11432
11430
  }
11433
11431
  const [career] = await ctx.database.get("ggcevo_careers", { handle });
11434
- if (!career) return "🚫 需要阵营为【人类联盟】或【辛迪加海盗】";
11435
11432
  const allowedGroups = ["人类联盟", "辛迪加海盗"];
11436
11433
  if (!allowedGroups.includes(career.group)) {
11437
- return `🚫 需要阵营为【人类联盟】或【辛迪加海盗】,您当前是${career.group}`;
11438
11434
  }
11439
11435
  const careerName = career.career;
11440
11436
  const careerCoinBonus = careerName === "总工程师" ? 50 : 0;
@@ -11779,8 +11775,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11779
11775
  return [
11780
11776
  `🚀 飞船名称:${shipName}`,
11781
11777
  `📝 描述:${ship.description}`,
11782
- `🔭 探索加成:+${ship.explorebonus}%成功率`,
11783
- `⛏️ 采矿加成:+${ship.miningbonus}%效率`,
11778
+ `🔭 探索加成:+${ship.explorebonus}%金币`,
11779
+ `⛏️ 采矿加成:+${ship.miningbonus}%金币`,
11784
11780
  `💡 特殊效果:${ship.effect || "无"}`,
11785
11781
  `🛒 购买价格:${ship.price}金币`,
11786
11782
  `📅 获得时间:${shipRecord.createTime.toLocaleString("zh-CN", { hour12: false })}`,
@@ -11850,8 +11846,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11850
11846
  });
11851
11847
  return [
11852
11848
  `🎉 成功购买 ${shipName}!`,
11853
- `🔭 探索加成:+${ship.explorebonus}%成功率`,
11854
- `⛏️ 采矿加成:+${ship.miningbonus}%效率`,
11849
+ `🔭 探索加成:+${ship.explorebonus}%金币`,
11850
+ `⛏️ 采矿加成:+${ship.miningbonus}%金币`,
11855
11851
  `💡 特殊效果:${ship.effect || "无"}`,
11856
11852
  `📅 购买时间:${now.toLocaleString("zh-CN", { hour12: false })}`,
11857
11853
  `💰 剩余金币:${newCoins}`,
@@ -11860,14 +11856,15 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11860
11856
  // 新增的提示
11861
11857
  ].join("\n");
11862
11858
  });
11863
- ctx.command("ggcevo/升级物品 [itemName]", "升级辛迪加海盗物品").userFields(["id"]).action(async ({ session }, itemName) => {
11864
- const handle = session.userId;
11859
+ ctx.command("ggcevo/升级物品 [itemName]", "升级辛迪加海盗物品").action(async ({ session }, itemName) => {
11860
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11861
+ if (!profile) return "🔒 需要先绑定游戏句柄。";
11862
+ const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
11865
11863
  if (!itemName) return "请输入要升级的物品名称,例如:升级物品 自动采掘机器人";
11866
- const careers = await ctx.database.get("ggcevo_careers", { handle });
11867
- if (!careers || careers.length === 0) return "🚫 未查询到您的阵营信息";
11868
- const career = careers[0];
11864
+ const [career] = await ctx.database.get("ggcevo_careers", { handle });
11865
+ if (!career) return "🚫 未查询到您的阵营信息";
11869
11866
  if (career.group !== "辛迪加海盗") {
11870
- return `🚫 仅限辛迪加海盗阵营使用,您当前是${career.group}`;
11867
+ return `🚫 仅限辛迪加海盗阵营使用`;
11871
11868
  }
11872
11869
  const itemConfig2 = SyndicatedItems[itemName];
11873
11870
  if (!itemConfig2) return `🚫 未找到物品【${itemName}】的配置信息`;
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.5.23",
4
+ "version": "1.5.25",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [