koishi-plugin-ggcevo-game 1.3.12 → 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 +20 -16
  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
  // 伽马枪辐射层数处理(攻击后触发)
@@ -1674,7 +1678,7 @@ function apply(ctx, config) {
1674
1678
  return {
1675
1679
  damage: amplifiedDamage,
1676
1680
  messages: radiationLayers > 0 ? [
1677
- `☢️ 【辐射】生效:当前${radiationLayers}层辐射,本次攻击受到伤害+${radiationLayers}%`
1681
+ `☢️ 【辐射】效果触发:当前${radiationLayers}层辐射,本次攻击受到伤害+${radiationLayers}%`
1678
1682
  ] : []
1679
1683
  };
1680
1684
  }, "calculateRadiationDamage"),
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.12",
4
+ "version": "1.3.13",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [