koishi-plugin-ggcevo-game 1.2.42 → 1.2.44

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 +16 -16
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -942,7 +942,7 @@ function apply(ctx, config) {
942
942
  const totalBosses = await ctx.database.select("ggcevo_boss").execute((row) => import_koishi.$.count(row.name));
943
943
  if (totalBosses === 0) {
944
944
  await activateNextBossGroup();
945
- await ctx.broadcast(config.groupId, [`🔄 咕咕PVE系统已初始化,首个主宰已登场!`]);
945
+ await ctx.broadcast(config.groupId, `🔄 咕咕PVE系统已初始化,首个主宰已登场!`);
946
946
  return;
947
947
  }
948
948
  const now = /* @__PURE__ */ new Date();
@@ -956,10 +956,7 @@ function apply(ctx, config) {
956
956
  groupId: group.groupId
957
957
  });
958
958
  await activateNextBossGroup(group.groupId);
959
- await ctx.broadcast(
960
- config.groupId,
961
- [`🔄 新的主宰已刷新,快去挑战吧!`]
962
- );
959
+ await ctx.broadcast(config.groupId, `🔄 新的主宰已刷新,快去挑战吧!`);
963
960
  }
964
961
  }, 60 * 1e3);
965
962
  ctx.command("ggcevo/抽奖").action(async (argv) => {
@@ -2513,7 +2510,7 @@ ${achievementList.join("\n")}`;
2513
2510
  pageNum < totalPages ? `输入 pk榜 ${pageNum + 1} 查看下一页` : "已是最后一页"
2514
2511
  ].join("\n");
2515
2512
  });
2516
- ctx.command("ggcevo/切换pk状态", "切换玩家对战状态").alias("切换pk").action(async ({ session }) => {
2513
+ ctx.command("ggcevo/切换pk状态", "切换玩家对战状态").alias("切换pk", "pk状态", "pk开关").action(async ({ session }) => {
2517
2514
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
2518
2515
  if (!profile) return "您暂未绑定句柄。";
2519
2516
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -2559,7 +2556,7 @@ ${achievementList.join("\n")}`;
2559
2556
  day: "2-digit"
2560
2557
  })}`;
2561
2558
  });
2562
- ctx.command("ggcevo/武器库 [type]").usage("输入“武器库”查看类型,或“武器库 类型”查看详细武器信息").action(async ({ session }, type) => {
2559
+ ctx.command("ggcevo/武器库 [type]").alias("武器商店", "武器商城", "武器商场").usage("输入“武器库”查看类型,或“武器库 类型”查看详细武器信息").action(async ({ session }, type) => {
2563
2560
  const typeStats = Object.values(weaponConfig).reduce((stats, weapon) => {
2564
2561
  stats[weapon.type] = (stats[weapon.type] || 0) + 1;
2565
2562
  return stats;
@@ -3018,7 +3015,11 @@ ${validTypes.join("、")}`;
3018
3015
  { name: targetBoss.name },
3019
3016
  { respawnTime }
3020
3017
  );
3021
- const damageRecords = await ctx.database.select("ggcevo_boss_damage").where({ bossGroupId: targetBoss.groupId }).orderBy("totalDamage", "desc").execute();
3018
+ const damageRecords = await ctx.database.select("ggcevo_boss_damage").where({
3019
+ bossGroupId: targetBoss.groupId,
3020
+ totalDamage: { $gt: 0 }
3021
+ // 新增过滤条件
3022
+ }).orderBy("totalDamage", "desc").execute();
3022
3023
  let rewardMessages = [];
3023
3024
  const updatePromises = [];
3024
3025
  const rewardMap = /* @__PURE__ */ new Map();
@@ -3176,7 +3177,9 @@ ${validTypes.join("、")}`;
3176
3177
  type: "子代",
3177
3178
  isActive: true
3178
3179
  });
3179
- const broadcastMessages = [`⚡ ${session.username} 击破了子代 ${targetBoss.name}!`];
3180
+ const broadcastMessages = [
3181
+ `⚡ ${session.username} 击破了子代 ${targetBoss.name}!`
3182
+ ];
3180
3183
  if (remainingMinions.length === 0) {
3181
3184
  const [mainBoss] = await ctx.database.get("ggcevo_boss", {
3182
3185
  groupId,
@@ -3184,12 +3187,9 @@ ${validTypes.join("、")}`;
3184
3187
  isActive: true
3185
3188
  });
3186
3189
  if (mainBoss && !mainBoss.skills.includes("孤立无援")) {
3187
- const updatedSkills = [...mainBoss.skills, "孤立无援"];
3188
- await ctx.database.set(
3189
- "ggcevo_boss",
3190
- { name: mainBoss.name },
3191
- { skills: updatedSkills }
3192
- );
3190
+ await ctx.database.set("ggcevo_boss", { name: mainBoss.name }, {
3191
+ skills: [...mainBoss.skills, "孤立无援"]
3192
+ });
3193
3193
  broadcastMessages.push("💥 所有子代已阵亡,主宰进入【孤立无援】状态,受到的伤害+20%!");
3194
3194
  }
3195
3195
  }
@@ -3234,7 +3234,7 @@ ${validTypes.join("、")}`;
3234
3234
  // 金币奖励显示逻辑优化
3235
3235
  `获得金币:${targetBoss.skills.includes("冰霜进化") && weaponName === "零度之下" ? 0 : initialDamage}`,
3236
3236
  `目标剩余HP:${Math.max(currentHP, 0)}/${maxHP}`,
3237
- isDefeated ? `🎉 成功击败 ${targetBoss.name}!` : ""
3237
+ isDefeated ? `🎉 恭喜,您成功击败 ${targetBoss.name}!` : ""
3238
3238
  ].filter((line) => line).join("\n");
3239
3239
  await session.send(resultMessage);
3240
3240
  if (broadcastMessage) {
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.2.42",
4
+ "version": "1.2.44",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [