koishi-plugin-ggcevo-game 1.2.42 → 1.2.43
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 +14 -14
- 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,
|
|
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) => {
|
|
@@ -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({
|
|
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 = [
|
|
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
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
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 ? `🎉
|
|
3237
|
+
isDefeated ? `🎉 恭喜,您成功击败 ${targetBoss.name}!` : ""
|
|
3238
3238
|
].filter((line) => line).join("\n");
|
|
3239
3239
|
await session.send(resultMessage);
|
|
3240
3240
|
if (broadcastMessage) {
|