koishi-plugin-ggcevo-game 1.2.24 → 1.2.26
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 +34 -37
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -305,22 +305,21 @@ function apply(ctx, config) {
|
|
|
305
305
|
"护盾": 0.5
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
|
-
"
|
|
308
|
+
"等离子切割机": {
|
|
309
309
|
id: 5,
|
|
310
310
|
type: "实弹武器",
|
|
311
|
-
damage:
|
|
312
|
-
description: "
|
|
313
|
-
price:
|
|
311
|
+
damage: 12,
|
|
312
|
+
description: "一种改造后的采矿切割机,有效对抗重甲目标",
|
|
313
|
+
price: 150,
|
|
314
314
|
tagEffects: {
|
|
315
|
-
"
|
|
316
|
-
"
|
|
317
|
-
"重甲": 0.2
|
|
315
|
+
"重甲": 1.5,
|
|
316
|
+
"机械": 1.2
|
|
318
317
|
}
|
|
319
318
|
},
|
|
320
319
|
"霰弹枪": {
|
|
321
320
|
id: 6,
|
|
322
321
|
type: "实弹武器",
|
|
323
|
-
damage:
|
|
322
|
+
damage: 28,
|
|
324
323
|
description: "近距离攻击武器,专为遭遇战设计使用",
|
|
325
324
|
price: 325,
|
|
326
325
|
tagEffects: {
|
|
@@ -328,15 +327,16 @@ function apply(ctx, config) {
|
|
|
328
327
|
"重甲": 0.5
|
|
329
328
|
}
|
|
330
329
|
},
|
|
331
|
-
"
|
|
330
|
+
"狙击步枪": {
|
|
332
331
|
id: 7,
|
|
333
332
|
type: "实弹武器",
|
|
334
|
-
damage:
|
|
335
|
-
description: "
|
|
336
|
-
price:
|
|
333
|
+
damage: 50,
|
|
334
|
+
description: "用于隐秘射击的最佳武器,但是无法穿透护甲",
|
|
335
|
+
price: 550,
|
|
337
336
|
tagEffects: {
|
|
338
|
-
"
|
|
339
|
-
"
|
|
337
|
+
"生物": 1.5,
|
|
338
|
+
"轻甲": 0.8,
|
|
339
|
+
"重甲": 0.2
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
};
|
|
@@ -739,6 +739,12 @@ function apply(ctx, config) {
|
|
|
739
739
|
}
|
|
740
740
|
__name(activateNextBossGroup, "activateNextBossGroup");
|
|
741
741
|
ctx.setInterval(async () => {
|
|
742
|
+
const totalBosses = await ctx.database.select("ggcevo_boss").execute((row) => import_koishi.$.count(row.name));
|
|
743
|
+
if (totalBosses === 0) {
|
|
744
|
+
await activateNextBossGroup();
|
|
745
|
+
ctx.broadcast(config.groupId, `🔄 BOSS系统已初始化,首个主宰已登场!`);
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
742
748
|
const now = /* @__PURE__ */ new Date();
|
|
743
749
|
const expiredGroups = await ctx.database.select("ggcevo_boss").where({
|
|
744
750
|
type: "主宰",
|
|
@@ -896,9 +902,9 @@ function apply(ctx, config) {
|
|
|
896
902
|
const entry = Object.entries(initDefaultItems).find(
|
|
897
903
|
([, item]) => item.id === userItem.itemId
|
|
898
904
|
);
|
|
899
|
-
if (!entry) return `未知物品
|
|
905
|
+
if (!entry) return `未知物品 x ${userItem.quantity}:数据异常,请联系管理员`;
|
|
900
906
|
const [itemName, itemData] = entry;
|
|
901
|
-
return itemData.description ? `${itemName}
|
|
907
|
+
return itemData.description ? `${itemName} x ${userItem.quantity}:${itemData.description}` : `${itemName} x ${userItem.quantity}`;
|
|
902
908
|
});
|
|
903
909
|
return `【${handle}的背包】
|
|
904
910
|
${itemDetails.join("\n")}`;
|
|
@@ -998,8 +1004,8 @@ ${itemDetails.join("\n")}`;
|
|
|
998
1004
|
quantity: (backpack?.quantity || 0) + tickets
|
|
999
1005
|
}]);
|
|
1000
1006
|
return `签到成功!本月累计签到${monthlyDays}天,获得:
|
|
1001
|
-
💰
|
|
1002
|
-
🪙 咕咕币
|
|
1007
|
+
💰 枚金币 x ${points}
|
|
1008
|
+
🪙 咕咕币 x ${tickets}` + effectMessage;
|
|
1003
1009
|
} catch (error) {
|
|
1004
1010
|
console.error("签到命令时发生错误:", error);
|
|
1005
1011
|
return "服务器繁忙,请稍后尝试。";
|
|
@@ -1214,7 +1220,7 @@ ${itemDetails.join("\n")}`;
|
|
|
1214
1220
|
status,
|
|
1215
1221
|
creator: session.userId
|
|
1216
1222
|
});
|
|
1217
|
-
return `活动【${activityName}】创建成功!奖励内容:${itemName}
|
|
1223
|
+
return `活动【${activityName}】创建成功!奖励内容:${itemName} x${quantity}。`;
|
|
1218
1224
|
});
|
|
1219
1225
|
ctx.command("ggcevo/活动列表").action(async () => {
|
|
1220
1226
|
const activities = await ctx.database.get(
|
|
@@ -1378,7 +1384,7 @@ ${itemDetails.join("\n")}`;
|
|
|
1378
1384
|
return "服务器繁忙,请稍后尝试。";
|
|
1379
1385
|
}
|
|
1380
1386
|
});
|
|
1381
|
-
ctx.command("ggcevo/胜点榜 [page]").
|
|
1387
|
+
ctx.command("ggcevo/胜点榜 [page]").usage("输入 胜点榜 [页码] 查看对应页的排行榜,每页10条").action(async (_, page) => {
|
|
1382
1388
|
const pageNum = parseInt(page) || 1;
|
|
1383
1389
|
if (pageNum < 1) return "请输入有效的页码。";
|
|
1384
1390
|
const offset = (pageNum - 1) * 10;
|
|
@@ -1841,7 +1847,7 @@ ${output}`;
|
|
|
1841
1847
|
return `${regionId}-S2-${realmId}-${profileId} 已获得的成就:
|
|
1842
1848
|
${achievementList.join("\n")}`;
|
|
1843
1849
|
});
|
|
1844
|
-
ctx.command("ggcevo
|
|
1850
|
+
ctx.command("ggcevo/个人信息").action(async (argv) => {
|
|
1845
1851
|
const session = argv.session;
|
|
1846
1852
|
const output = [];
|
|
1847
1853
|
const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
|
|
@@ -2756,20 +2762,11 @@ ${validTypes.join("、")}`;
|
|
|
2756
2762
|
}
|
|
2757
2763
|
return;
|
|
2758
2764
|
});
|
|
2759
|
-
ctx.command("ggcevo
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
const mainBoss = activeBosses.find((b) => b.type === "主宰");
|
|
2765
|
-
if (!mainBoss) {
|
|
2766
|
-
return "主宰初始化失败,请联系开发者检查系统";
|
|
2767
|
-
}
|
|
2768
|
-
return `✅ 主宰系统已成功初始化!当前主宰: ${mainBoss.name}`;
|
|
2769
|
-
} catch (error) {
|
|
2770
|
-
console.error("主宰初始化失败:", error);
|
|
2771
|
-
return "❌ 主宰初始化失败,请稍后重试";
|
|
2772
|
-
}
|
|
2765
|
+
ctx.command("ggcevo/测试 [user]", { authority: 3 }).action(async (_, user) => {
|
|
2766
|
+
const parsedUser = import_koishi.h.parse(user)[0];
|
|
2767
|
+
const targetUserId = parsedUser.attrs.id;
|
|
2768
|
+
let targetUsername = parsedUser.attrs.name || targetUserId;
|
|
2769
|
+
return parsedUser;
|
|
2773
2770
|
});
|
|
2774
2771
|
ctx.command("ggcevo/伤害榜 [page]", "查看当前主宰伤害排名").usage("输入 伤害榜 [页码] 查看对应页的排行榜,每页10条").action(async (_, page) => {
|
|
2775
2772
|
const pageNum = parseInt(page) || 1;
|
|
@@ -2856,7 +2853,7 @@ ${validTypes.join("、")}`;
|
|
|
2856
2853
|
const existingEntries = await ctx.database.get("ggcevo_blacklist", { handle });
|
|
2857
2854
|
if (existingEntries.length > 0) return "❌ 拒绝访问,您已被列入黑名单。";
|
|
2858
2855
|
const [sign] = await ctx.database.get("ggcevo_sign", { handle });
|
|
2859
|
-
if (!sign || sign.totalRewards < 50) return "需要50
|
|
2856
|
+
if (!sign || sign.totalRewards < 50) return "需要50金币进行祈愿,您的金币不足。";
|
|
2860
2857
|
const now = /* @__PURE__ */ new Date();
|
|
2861
2858
|
const [latestWish] = await ctx.database.get("ggcevo_Wish_Record", { handle }, {
|
|
2862
2859
|
sort: { endTime: "desc" },
|
|
@@ -2919,7 +2916,7 @@ ${validTypes.join("、")}`;
|
|
|
2919
2916
|
hour: "2-digit",
|
|
2920
2917
|
minute: "2-digit"
|
|
2921
2918
|
});
|
|
2922
|
-
return `✨
|
|
2919
|
+
return `✨ 祈愿成功!花费50枚金币获得【${effect.name}】效果:${effect.effect}
|
|
2923
2920
|
⏳ 效果持续至 ${formattedEndTime}`;
|
|
2924
2921
|
});
|
|
2925
2922
|
}
|