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.
- package/lib/index.js +7 -1
- 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,
|