koishi-plugin-ggcevo-game 1.3.11 → 1.3.13

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 +26 -25
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -613,7 +613,7 @@ function apply(ctx, config) {
613
613
  },
614
614
  "进食": {
615
615
  effect: 0,
616
- description: "当“吸血”层数达到10层时,自身将会消耗所有层数回复20%的最大生命值"
616
+ description: "当“吸血”层数达到10层后,下一次受到攻击,将会消耗所有层数回复自身20%的最大生命值"
617
617
  },
618
618
  "嗜血狂暴": {
619
619
  effect: 0,
@@ -1611,40 +1611,44 @@ function apply(ctx, config) {
1611
1611
  let totalReduction = 0;
1612
1612
  if (targetBoss.skills.includes("吸血唾液")) {
1613
1613
  totalReduction += bloodStacks * 0.05;
1614
+ if (bloodStacks > 0) {
1615
+ messages.push(`🩸 【吸血唾液】技能生效:本次攻击减伤${bloodStacks * 5}%`);
1616
+ }
1614
1617
  }
1615
1618
  if (targetBoss.skills.includes("嗜血狂暴") && currentHP / maxHP < 0.5) {
1616
1619
  totalReduction += 0.2;
1620
+ messages.push(`🔥 【嗜血狂暴】技能生效:血量低于50%,本次攻击额外减伤20%`);
1617
1621
  }
1618
1622
  if (totalReduction > 0) {
1619
1623
  newDamage = Math.floor(initialDamage * (1 - totalReduction));
1620
- messages.push(
1621
- `🩸 【吸血唾液】生效:当前层数${bloodStacks},下次受到伤害减伤${bloodStacks * 5}%` + (targetBoss.skills.includes("嗜血狂暴") && currentHP / maxHP < 0.5 ? `🔥 【嗜血狂暴】生效:血量低于50%触发20%减伤` : "")
1622
- );
1623
1624
  }
1624
1625
  if (targetBoss.skills.includes("吐血") && bloodStacks < 1) {
1625
1626
  newDamage = Math.floor(newDamage * 1.1);
1626
- messages.push(`💔 【吐血】生效:无“吸血”层数受到伤害+10%`);
1627
+ messages.push(`💔 【吐血】技能生效:无“吸血”层数受到伤害+10%`);
1627
1628
  }
1628
1629
  return newDamage !== initialDamage ? { initialDamage: newDamage, messages } : null;
1629
1630
  }, "handleBloodEffects"),
1630
- // 处理吸血层数叠加和进食触发
1631
1631
  handleBloodCount: /* @__PURE__ */ __name(async function(ctx2, targetBoss, currentHP, maxHP) {
1632
1632
  let messages = [];
1633
1633
  let updatedHP = currentHP;
1634
- let newStacks = targetBoss.Skillcountpoints || 0;
1635
- newStacks += 1;
1634
+ const oldStacks = targetBoss.Skillcountpoints || 0;
1635
+ if (oldStacks >= 10 && targetBoss.skills.includes("进食")) {
1636
+ const heal = Math.floor(maxHP * 0.2);
1637
+ updatedHP = Math.min(currentHP + heal, maxHP);
1638
+ await ctx2.database.set("ggcevo_boss", { name: targetBoss.name }, { Skillcountpoints: 0 });
1639
+ messages.push(`🍽️ 【进食】技能生效:回复20%最大生命值(+${heal}HP),层数清零`);
1640
+ return { updatedHP, messages };
1641
+ }
1642
+ let newStacks = oldStacks + 1;
1636
1643
  if (targetBoss.skills.includes("嗜血狂暴") && currentHP / maxHP < 0.5) {
1637
1644
  newStacks += 1;
1638
- messages.push(`🔥 【嗜血狂暴】生效:额外叠加1层吸血,当前层数${newStacks}`);
1645
+ messages.push(`🔥 【嗜血狂暴】技能生效:额外叠加1层“吸血”`);
1639
1646
  }
1640
1647
  newStacks = Math.min(newStacks, 10);
1641
- await ctx2.database.set("ggcevo_boss", { name: targetBoss.name }, { Skillcountpoints: newStacks });
1642
- if (newStacks >= 10 && targetBoss.skills.includes("进食")) {
1643
- const heal = Math.floor(maxHP * 0.2);
1644
- updatedHP = Math.min(currentHP + heal, maxHP);
1645
- await ctx2.database.set("ggcevo_boss", { name: targetBoss.name }, { Skillcountpoints: 0 });
1646
- messages.push(`🍽️ 【进食】生效:回复20%最大生命值(+${heal}HP),层数清零`);
1648
+ if (oldStacks < 10 && newStacks >= 10) {
1649
+ messages.push(`🩸 吸血层数达到${newStacks},下次攻击将触发【进食】!`);
1647
1650
  }
1651
+ await ctx2.database.set("ggcevo_boss", { name: targetBoss.name }, { Skillcountpoints: newStacks });
1648
1652
  return { updatedHP, messages };
1649
1653
  }, "handleBloodCount"),
1650
1654
  // 伽马枪辐射层数处理(攻击后触发)
@@ -1656,8 +1660,7 @@ function apply(ctx, config) {
1656
1660
  skills: isNewRadiation ? [...targetBoss.skills, "辐射"] : targetBoss.skills,
1657
1661
  Vulnerability: isNewRadiation ? 1 : targetBoss.Vulnerability + 1
1658
1662
  });
1659
- const [updatedBoss] = await ctx2.database.get("ggcevo_boss", { name: targetBoss.name });
1660
- const layerMsg = isNewRadiation ? `☢️ 获得【辐射】效果(当前层数1)` : `☢️ 辐射层数+1`;
1663
+ const layerMsg = isNewRadiation ? `☢️ 获得【辐射】效果` : `☢️ 辐射层数+1`;
1661
1664
  messages.push(`${targetBoss.name} ${layerMsg}`);
1662
1665
  return { messages };
1663
1666
  }, "handleGammaRadiation"),
@@ -1675,7 +1678,7 @@ function apply(ctx, config) {
1675
1678
  return {
1676
1679
  damage: amplifiedDamage,
1677
1680
  messages: radiationLayers > 0 ? [
1678
- `☢️ 【辐射】生效:当前${radiationLayers}层辐射,本次攻击受到伤害+${radiationLayers}%`
1681
+ `☢️ 【辐射】效果触发:当前${radiationLayers}层辐射,本次攻击受到伤害+${radiationLayers}%`
1679
1682
  ] : []
1680
1683
  };
1681
1684
  }, "calculateRadiationDamage"),
@@ -1686,12 +1689,10 @@ function apply(ctx, config) {
1686
1689
  if (currentHP <= 0 && !targetBoss.skills.includes("求生本能I") && !targetBoss.skills.includes("求生本能II")) {
1687
1690
  return { currentHP, messages: [], skillUpdates: [], initialDamage };
1688
1691
  }
1689
- if (weaponName === "伽马枪" && targetBoss.tags.includes("生物") && !targetBoss.tags.includes("机械")) {
1690
- const radiationCalc = this.calculateRadiationDamage(targetBoss, initialDamage);
1691
- if (radiationCalc.messages.length > 0) {
1692
- messages.push(...radiationCalc.messages);
1693
- initialDamage = radiationCalc.damage;
1694
- }
1692
+ const radiationCalc = this.calculateRadiationDamage(targetBoss, initialDamage);
1693
+ if (radiationCalc.messages.length > 0) {
1694
+ messages.push(...radiationCalc.messages);
1695
+ initialDamage = radiationCalc.damage;
1695
1696
  }
1696
1697
  const bloodEffectResult = this.handleBloodEffects(targetBoss, initialDamage, currentHP, maxHP);
1697
1698
  if (bloodEffectResult) {
@@ -3982,7 +3983,7 @@ ${achievementList.join("\n")}`;
3982
3983
  pageNum < totalPages ? `输入 pk榜 ${pageNum + 1} 查看下一页` : "已是最后一页"
3983
3984
  ].join("\n");
3984
3985
  });
3985
- ctx.command("ggcevo/切换pk", "切换玩家对战状态").action(async ({ session }) => {
3986
+ ctx.command("ggcevo/切换pk", "切换玩家对战状态").alias("切换pk状态").action(async ({ session }) => {
3986
3987
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
3987
3988
  if (!profile) return "您暂未绑定句柄。";
3988
3989
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
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.3.11",
4
+ "version": "1.3.13",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [