koishi-plugin-ggcevo-game 1.4.47 → 1.4.48

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.
Files changed (2) hide show
  1. package/lib/index.js +27 -14
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -2584,7 +2584,7 @@ var BattleEffectProcessor = {
2584
2584
  if (!targetBoss.skills.includes("灵能构造炉")) {
2585
2585
  return null;
2586
2586
  }
2587
- const baseProbability = 0.01;
2587
+ const baseProbability = 0.05;
2588
2588
  if (Math.random() >= baseProbability) {
2589
2589
  return null;
2590
2590
  }
@@ -3347,7 +3347,7 @@ var passiveConfig = {
3347
3347
  },
3348
3348
  "灵能构造炉": {
3349
3349
  type: "状态获得(技能获得)",
3350
- description: "受击时1%概率随机获得以下技能之一:天启超载护盾/塌缩脉冲/地毯式轰炸/轰炸引导"
3350
+ description: "受击时5%概率随机获得以下技能之一:天启超载护盾/塌缩脉冲/地毯式轰炸/轰炸引导"
3351
3351
  },
3352
3352
  "天启超载护盾": {
3353
3353
  type: "生存强化(生命回复)",
@@ -7501,7 +7501,7 @@ ${validTypes.join("、")}`;
7501
7501
  cleanerRewardBroadcast
7502
7502
  );
7503
7503
  });
7504
- ctx.command("ggcevo/攻击假人").option("tags", "-t <tags:string> 添加BOSS标签(逗号分隔)").option("passives", "-p <passives:string> 添加被动技能(逗号分隔)").option("hp", "-l <hp:number> 模拟假人血量").option("energy", "-e <energy:number> 模拟假人能量").action(async (argv) => {
7504
+ ctx.command("ggcevo/攻击假人").option("tags", "-t <tags:string> 添加BOSS标签(逗号分隔)").option("passives", "-p <passives:string> 添加被动技能(逗号分隔)").option("hp", "-l <hp:number> 模拟假人血量").option("energy", "-e <energy:number> 模拟假人能量").option("skillStacks", "-s <stacks:number> 技能层数").option("radiation", "-r <rad:number> 辐射层数").option("cold", "-c <cold:number> 寒冷层数").option("status", "-a <status:number> 状态层数").action(async (argv) => {
7505
7505
  const session = argv.session;
7506
7506
  const { options } = argv;
7507
7507
  let hp = 1e4;
@@ -7512,6 +7512,11 @@ ${validTypes.join("、")}`;
7512
7512
  if (typeof options.energy === "number") {
7513
7513
  energy = Math.max(0, Math.min(options.energy, 1e3));
7514
7514
  }
7515
+ const clampLayer = /* @__PURE__ */ __name((value, max = 100) => typeof value === "number" ? Math.max(0, Math.min(value, max)) : 0, "clampLayer");
7516
+ const skillStacks = clampLayer(options.skillStacks);
7517
+ const radiationLayers = clampLayer(options.radiation);
7518
+ const coldLayers = clampLayer(options.cold);
7519
+ const statusLayers = clampLayer(options.status);
7515
7520
  const parseList = /* @__PURE__ */ __name((str) => str ? str.split(",").map((s) => s.trim()).filter(Boolean) : [], "parseList");
7516
7521
  const tags = parseList(options.tags);
7517
7522
  const passives = parseList(options.passives);
@@ -7528,18 +7533,20 @@ ${validTypes.join("、")}`;
7528
7533
  const dummyBoss = {
7529
7534
  name: "测试假人",
7530
7535
  HP: hp,
7531
- // 使用处理后的血量值
7532
7536
  type: "主宰",
7533
7537
  groupId: 0,
7534
7538
  tags: tags || [],
7535
7539
  skills: passives || [],
7536
- skillStacks: 0,
7537
- radiationLayers: 0,
7538
- coldLayers: 0,
7540
+ skillStacks,
7541
+ // 使用自定义技能层数
7542
+ radiationLayers,
7543
+ // 使用自定义辐射层数
7544
+ coldLayers,
7545
+ // 使用自定义寒冷层数
7539
7546
  energy,
7540
- // 使用处理后的能量值
7541
7547
  isActive: true,
7542
- statusLayers: 0,
7548
+ statusLayers,
7549
+ // 使用自定义状态层数
7543
7550
  lastWeaponName: ""
7544
7551
  };
7545
7552
  const activeBosses = [dummyBoss];
@@ -7553,18 +7560,23 @@ ${validTypes.join("、")}`;
7553
7560
  config,
7554
7561
  equippedWeapon,
7555
7562
  dummyBoss,
7556
- // 目标BOSS
7557
7563
  activeBosses,
7558
- // 活跃BOSS列表
7559
7564
  weaponName
7560
- // 武器名称
7561
7565
  );
7566
+ const layerInfo = [];
7567
+ if (skillStacks > 0) layerInfo.push(`技能层数: ${skillStacks}`);
7568
+ if (radiationLayers > 0) layerInfo.push(`辐射层数: ${radiationLayers}`);
7569
+ if (coldLayers > 0) layerInfo.push(`寒冷层数: ${coldLayers}`);
7570
+ if (statusLayers > 0) layerInfo.push(`状态层数: ${statusLayers}`);
7571
+ const layerDisplay = layerInfo.length > 0 ? `📊 层数状态: ${layerInfo.join(" | ")}` : "";
7562
7572
  return [
7563
7573
  `🎯 使用武器 ${weaponName} 攻击 ${dummyBoss.name}`,
7564
7574
  `❤️ 假人血量:${dummyBoss.HP}`,
7565
7575
  `⚡ 假人能量:${dummyBoss.energy}`,
7566
7576
  options.tags?.length && `🏷️ 模拟标签:${tags.join(", ")}`,
7567
7577
  options.passives?.length && `✨ 模拟被动:${passives.join(", ")}`,
7578
+ layerDisplay,
7579
+ // 添加层数显示
7568
7580
  ...testResult.effectMessage.length > 0 ? [
7569
7581
  `⚡ 攻击效果:
7570
7582
  ${testResult.effectMessage.map((m) => `▸ ${m}`).join("\n")}`
@@ -7578,8 +7590,9 @@ ${testResult.ignoreMessage.map((m) => `▸ ${m}`).join("\n")}`
7578
7590
  ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
7579
7591
  ] : [],
7580
7592
  `📊 理论伤害值:${testResult.initialDamage}${testResult.hasCrit ? "(✨ 暴击)" : ""}`,
7581
- "💡 提示:可添加标签(-t)、被动(-p)、血量(-l)或能量(-e)",
7582
- `ℹ️ 测试假人最大血量:10000 | 最大能量:1000(超限值将自动调整)`
7593
+ "💡 提示:可添加标签(-t)、被动(-p)、血量(-l)、能量(-e)",
7594
+ "💡 层数选项:技能层数(-s)、辐射层数(-r)、寒冷层数(-c)、状态层数(-a)",
7595
+ `ℹ️ 测试假人最大血量:10000 | 最大能量:1000 | 最大层数:100`
7583
7596
  ].filter((line) => line).join("\n");
7584
7597
  } finally {
7585
7598
  Object.keys("测试假人").forEach((key) => delete battleStatsMap[key]);
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.4.47",
4
+ "version": "1.4.48",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [