koishi-plugin-ggcevo-game 1.6.73 → 1.6.75

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.
@@ -56,7 +56,7 @@ export declare function testAttackFunction(ctx: Context, session: any, handle: s
56
56
  ignoreMessage: any[];
57
57
  }>;
58
58
  export declare function createNestlingBosses(ctx: any, nestlingNames: string | string[]): Promise<any[]>;
59
- export declare function verifyFinalBlow(ctx: any, session: any, bossName: string, targetBoss: any): Promise<{
59
+ export declare function verifyFinalBlow(ctx: any, session: any, bossName: string, targetBoss: any, activeBosses: any): Promise<{
60
60
  success: boolean;
61
61
  updatedBoss?: any;
62
62
  verificationPassed?: boolean;
package/lib/index.js CHANGED
@@ -4918,7 +4918,7 @@ var passiveConfig = {
4918
4918
  derivedSkills: []
4919
4919
  },
4920
4920
  "能量黑洞": {
4921
- description: "存在能量黑洞时,受到的伤害降低20%",
4921
+ description: "亚电主宰者释放了能量黑洞,所有存活异形受到的伤害降低20%",
4922
4922
  belong: ["亚电主宰者", "亚电能者"],
4923
4923
  derivedSkills: []
4924
4924
  },
@@ -5584,6 +5584,15 @@ var ggcevoUpdates = [
5584
5584
  content: `
5585
5585
  - 修改铝热炸弹限制条件为只能在进入斩杀阶段之前使用
5586
5586
  `.trim()
5587
+ },
5588
+ {
5589
+ version: "1.6.75",
5590
+ time: "2025-08-19",
5591
+ content: `
5592
+ - 修改铝热炸弹使用限制,现在只能在目标血量≥1000时使用
5593
+ - 修改斩杀阶段,现在当主宰血量≤2000,且没有复活类技能,且无子代存活的情况下,才会进入斩杀阶段
5594
+ - 新增“异形刷新权重”指令,可查询主宰刷新权重
5595
+ `.trim()
5587
5596
  }
5588
5597
  ];
5589
5598
  function compareVersions(a, b) {
@@ -5992,10 +6001,10 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
5992
6001
  message: `至少攻击一次后才能使用该物品。`
5993
6002
  };
5994
6003
  }
5995
- if (targetBoss.HP <= 2e3) {
6004
+ if (targetBoss.HP <= 1e3) {
5996
6005
  return {
5997
6006
  success: false,
5998
- message: `目标「${target}」血量已进入斩杀阶段,无法使用${itemName}。`
6007
+ message: `目标「${target}」血量已低于1000,无法使用${itemName}。`
5999
6008
  };
6000
6009
  }
6001
6010
  let baseDamage = 100;
@@ -7353,14 +7362,16 @@ async function createNestlingBosses(ctx, nestlingNames) {
7353
7362
  return createdBosses;
7354
7363
  }
7355
7364
  __name(createNestlingBosses, "createNestlingBosses");
7356
- async function verifyFinalBlow(ctx, session, bossName, targetBoss) {
7365
+ async function verifyFinalBlow(ctx, session, bossName, targetBoss, activeBosses) {
7357
7366
  const isDominationBoss = targetBoss.type === "主宰";
7358
7367
  const isLowHealth = targetBoss.HP < 2e3;
7359
7368
  const forbiddenSkills = ["求生本能I", "求生本能II", "复苏"];
7360
7369
  const hasResurrectionSkill = forbiddenSkills.some(
7361
7370
  (skill) => targetBoss.skills.includes(skill)
7362
7371
  );
7363
- if (!(isDominationBoss && isLowHealth && !hasResurrectionSkill)) {
7372
+ const isIsolated = activeBosses.length === 1 && // 活跃Boss仅1个
7373
+ activeBosses[0].name === targetBoss.name;
7374
+ if (!(isDominationBoss && isLowHealth && !hasResurrectionSkill && isIsolated)) {
7364
7375
  return {
7365
7376
  success: true,
7366
7377
  updatedBoss: targetBoss,
@@ -9039,12 +9050,24 @@ ${items.join("、")}
9039
9050
  });
9040
9051
  ctx.command("ggcevo/拉黑 [user]", "黑名单管理", { authority: 3 }).action(async (argv, user) => {
9041
9052
  const session = argv.session;
9053
+ const formatChinaTime = /* @__PURE__ */ __name((date) => {
9054
+ return new Date(date).toLocaleString("zh-CN", {
9055
+ timeZone: "Asia/Shanghai",
9056
+ year: "numeric",
9057
+ month: "2-digit",
9058
+ day: "2-digit",
9059
+ hour: "2-digit",
9060
+ minute: "2-digit",
9061
+ second: "2-digit",
9062
+ hour12: false
9063
+ }).replace(",", "");
9064
+ }, "formatChinaTime");
9042
9065
  if (!user) {
9043
9066
  const blacklist = await ctx.database.get("ggcevo_blacklist", {}, { fields: ["handle", "name", "createdAt"] });
9044
9067
  if (blacklist.length === 0) return "当前黑名单为空。";
9045
9068
  let message = "📋 黑名单列表:\n";
9046
9069
  for (const entry of blacklist.slice(0, 10)) {
9047
- const time = new Date(entry.createdAt).toLocaleString();
9070
+ const time = formatChinaTime(entry.createdAt);
9048
9071
  message += `▫️ ${entry.name} (${entry.handle}) - 添加时间: ${time}
9049
9072
  `;
9050
9073
  }
@@ -10291,8 +10314,9 @@ ${discountDetails.join("\n")}`;
10291
10314
  ctx,
10292
10315
  session,
10293
10316
  bossName,
10294
- targetBoss
10317
+ targetBoss,
10295
10318
  // 当前目标BOSS
10319
+ activeBosses
10296
10320
  );
10297
10321
  if (!verification.success) {
10298
10322
  return "攻击已取消";
@@ -12975,6 +12999,50 @@ ${validBossNames.join("、")}`;
12975
12999
  return "⚠️ 兑换过程中出错,请稍后再试";
12976
13000
  }
12977
13001
  });
13002
+ ctx.command("异形刷新权重", "查询当前主宰刷新权重").alias("yx刷新权重").action(async ({ session }) => {
13003
+ try {
13004
+ const weights = await ctx.database.select("ggcevo_boss_weights", {}).execute();
13005
+ if (!weights || weights.length === 0) {
13006
+ return "当前没有配置BOSS刷新权重数据";
13007
+ }
13008
+ const sortedList = weights.map((w) => {
13009
+ const boss = bossPool.find((b) => b.id === w.bossId);
13010
+ return {
13011
+ id: w.bossId,
13012
+ name: boss?.main?.name || `未知BOSS(${w.bossId})`,
13013
+ weight: w.weight,
13014
+ lastSpawn: w.lastSpawn
13015
+ };
13016
+ }).sort((a, b) => b.weight - a.weight);
13017
+ const dateFormat = /* @__PURE__ */ __name((timestamp) => {
13018
+ return new Date(timestamp).toLocaleString("zh-CN", {
13019
+ timeZone: "Asia/Shanghai",
13020
+ year: "numeric",
13021
+ month: "2-digit",
13022
+ day: "2-digit",
13023
+ hour: "2-digit",
13024
+ minute: "2-digit",
13025
+ second: "2-digit",
13026
+ hour12: false
13027
+ }).replace(",", "");
13028
+ }, "dateFormat");
13029
+ let reply = "当前BOSS刷新权重(按权重从高到低):\n";
13030
+ reply += "===========================\n";
13031
+ sortedList.forEach((boss) => {
13032
+ reply += `【${boss.name}】
13033
+ `;
13034
+ reply += `▸ 权重:${boss.weight}
13035
+ `;
13036
+ reply += `▸ 上次刷新:${dateFormat(boss.lastSpawn)}
13037
+ `;
13038
+ reply += "---------------------------\n";
13039
+ });
13040
+ return reply;
13041
+ } catch (err) {
13042
+ ctx.logger.error("BOSS权重查询失败", err);
13043
+ return "查询BOSS权重时发生错误,请检查服务器日志";
13044
+ }
13045
+ });
12978
13046
  ctx.command("ggcevo/签到奖励").action(({}) => {
12979
13047
  return `
12980
13048
  签到金币奖励:
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.73",
4
+ "version": "1.6.75",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [