koishi-plugin-ggcevo-game 0.3.9 → 0.3.11

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 +9 -7
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -166,7 +166,7 @@ function apply(ctx, config) {
166
166
  async function initDefaultItems() {
167
167
  const defaultItems = [
168
168
  { id: 1, name: "咕咕币", type: "consumable", description: "用于进行抽奖" },
169
- { id: 2, name: "兑换券", type: "material", description: "用于兑换赞助物品,输入 兑换图 查看详情" },
169
+ { id: 2, name: "兑换券", type: "material", description: "用于兑换赞助物品" },
170
170
  { id: 3, name: "扭蛋币", type: "consumable", description: "用于进行宠物扭蛋" },
171
171
  { id: 4, name: "t3级宠物扭蛋", type: "material", description: "用于兑换t3系列宠物" },
172
172
  { id: 5, name: "t2级宠物扭蛋", type: "material", description: "用于兑换t2系列宠物" },
@@ -515,10 +515,12 @@ ${itemDetails.join("\n")}`;
515
515
  }]);
516
516
  return `[管理专属] 成功领取本月津贴!获得 50 枚咕咕币`;
517
517
  });
518
- ctx.command("ggcevo/领取福利 <name>").action(async (argv, name2) => {
518
+ ctx.command("ggcevo/领取福利").alias("领取奖励").action(async (argv) => {
519
519
  const session = argv.session;
520
+ await session.send("请在30秒内输入活动名称:\n(输入 咕咕币活动 以查看活动列表)");
521
+ const name2 = await session.prompt(3e4);
520
522
  if (!name2) {
521
- return "活动名称不能为空,请输入 咕咕币活动 查看进行中的活动";
523
+ return "输入超时,请重新输入指令。";
522
524
  }
523
525
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
524
526
  if (!profile) return "您的 QQ 未绑定句柄。";
@@ -591,7 +593,7 @@ ${itemDetails.join("\n")}`;
591
593
  ID:${activity.id}
592
594
  状态:${status}`;
593
595
  });
594
- ctx.command("ggcevo/咕咕币活动", "查看进行中的活动").action(async () => {
596
+ ctx.command("ggcevo/咕咕币活动", "查看进行中的活动").alias("活动列表").action(async () => {
595
597
  const activities = await ctx.database.get("ggcevo_activity", {
596
598
  status: "进行中"
597
599
  // 完全依赖数据库状态
@@ -758,7 +760,7 @@ ID:${activity.id}
758
760
  return "服务器繁忙,请稍后尝试。";
759
761
  }
760
762
  });
761
- ctx.command("ggcevo/胜点榜 [page]").usage("输入 rank [页码] 查看对应页的排行榜,每页10条").action(async (_, page) => {
763
+ ctx.command("ggcevo/胜点榜 [page]").alias("排行榜").usage("输入 rank [页码] 查看对应页的排行榜,每页10条").action(async (_, page) => {
762
764
  const pageNum = parseInt(page) || 1;
763
765
  if (pageNum < 1) return "请输入有效的页码。";
764
766
  const offset = (pageNum - 1) * 10;
@@ -964,7 +966,7 @@ ${items.join("、")}
964
966
  if (userRecords.length > 0) return "您已经兑换过该物品";
965
967
  if (configname.quantity !== void 0) {
966
968
  const globalRecords = await ctx.database.get("ggcevo_exchange", { item: name2 });
967
- if (globalRecords.length >= configname.quantity) return "该物品已兑尽";
969
+ if (globalRecords.length >= configname.quantity) return "该物品已被兑换尽了";
968
970
  }
969
971
  const qualityMap = { "t3": 4, "t2": 5, "t1": 6, "t0": 7 };
970
972
  const petItems = new Set(
@@ -987,7 +989,7 @@ ${items.join("、")}
987
989
  }
988
990
  const [coupon] = await ctx.database.get("ggcevo_backpack", { handle, itemId });
989
991
  if (!coupon || coupon.quantity < cost) {
990
- const requireMsg = petItems.has(name2) ? `需要 1 个${configname.quality}级扭蛋 或 ${configname.cost}个兑奖券` : `需要 ${configname.cost}个兑奖券`;
992
+ const requireMsg = petItems.has(name2) ? `需要 1 个${configname.quality}级宠物扭蛋 或 ${configname.cost}个兑奖券` : `需要 ${configname.cost}个兑奖券`;
991
993
  return `${requireMsg}
992
994
  当前持有:${coupon?.quantity || 0}个${couponName}`;
993
995
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ggcevo-game",
3
3
  "description": "星际争霸2游戏大厅地图咕咕虫-evo小游戏",
4
- "version": "0.3.9",
4
+ "version": "0.3.11",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [