koishi-plugin-ggcevo-game 1.6.68 → 1.6.69

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 +7 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -5963,6 +5963,13 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
5963
5963
  message: "无法对空中目标使用。"
5964
5964
  };
5965
5965
  }
5966
+ const [damageRecords] = await ctx.database.get("ggcevo_boss_damage", { handle });
5967
+ if (!damageRecords) {
5968
+ return {
5969
+ success: false,
5970
+ message: `至少攻击一次后才能使用该物品。`
5971
+ };
5972
+ }
5966
5973
  if (targetBoss.HP === 1) {
5967
5974
  return {
5968
5975
  success: false,
@@ -5989,7 +5996,6 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
5989
5996
  handle,
5990
5997
  totalRewards: (signRecords[0]?.totalRewards || 0) + damage
5991
5998
  }], ["handle"]);
5992
- const [damageRecords] = await ctx.database.get("ggcevo_boss_damage", { handle });
5993
5999
  await ctx.database.upsert("ggcevo_boss_damage", [{
5994
6000
  handle,
5995
6001
  playerName: session.username,
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.6.68",
4
+ "version": "1.6.69",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [