koishi-plugin-ggcevo-game 1.6.81 → 1.6.82
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 +2 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -6457,13 +6457,12 @@ async function updateWeights(ctx, selectedId) {
|
|
|
6457
6457
|
const allWeights = await ctx.database.get("ggcevo_boss_weights", {});
|
|
6458
6458
|
for (const weight of allWeights) {
|
|
6459
6459
|
if (weight.bossId === selectedId) {
|
|
6460
|
-
const newWeight = Math.max(50, Math.floor(weight.weight / 2));
|
|
6461
6460
|
await ctx.database.set("ggcevo_boss_weights", { bossId: weight.bossId }, {
|
|
6462
|
-
weight:
|
|
6461
|
+
weight: 50,
|
|
6463
6462
|
lastSpawn: /* @__PURE__ */ new Date()
|
|
6464
6463
|
});
|
|
6465
6464
|
} else {
|
|
6466
|
-
const newWeight = Math.min(
|
|
6465
|
+
const newWeight = Math.min(500, Math.floor(weight.weight * 1.2));
|
|
6467
6466
|
await ctx.database.set("ggcevo_boss_weights", { bossId: weight.bossId }, {
|
|
6468
6467
|
weight: newWeight,
|
|
6469
6468
|
lastSpawn: weight.lastSpawn
|