koishi-plugin-ggcevo-game 1.3.12 → 1.3.14

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 +25 -26
  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"),
@@ -2230,14 +2234,14 @@ function apply(ctx, config) {
2230
2234
  msg += priceInfo;
2231
2235
  let discountDetails = [];
2232
2236
  if (weaponDiscount > 0) {
2233
- discountDetails.push(`武器系统 Lv${techLevel} 折扣:${Math.round(weaponDiscount * 100)}%`);
2237
+ discountDetails.push(`${Math.round(weaponDiscount * 100)}% (武器系统 Lv${techLevel})`);
2234
2238
  }
2235
2239
  if (activeWish) {
2236
- discountDetails.push("灵狐升运折扣:20%");
2240
+ discountDetails.push("20% (灵狐升运祈愿生效)");
2237
2241
  }
2238
2242
  if (discountDetails.length > 0) {
2239
2243
  msg += `
2240
- 🔧 已应用折扣:${discountDetails.join(" + ")}`;
2244
+ 🔧 折扣:${discountDetails.join(" + ")}`;
2241
2245
  }
2242
2246
  msg += `
2243
2247
  💥 伤害:${damage}`;
@@ -2275,25 +2279,20 @@ function apply(ctx, config) {
2275
2279
  const priceDetails = BASE_COST.map((baseCost, index) => {
2276
2280
  const level = `${index}→${index + 1}`;
2277
2281
  let finalPrice = baseCost;
2278
- let discountTips = [];
2279
2282
  if (hasTechDiscount || hasFoxDiscount) {
2280
2283
  let discounted = baseCost;
2281
2284
  if (hasTechDiscount) {
2282
2285
  discounted *= 1 - techDiscountRate / 100;
2283
- discountTips.push(`科技折扣 ${techDiscountRate}%`);
2284
2286
  }
2285
2287
  if (hasFoxDiscount) {
2286
2288
  discounted *= 0.8;
2287
- discountTips.push(`灵狐折扣 20%`);
2288
2289
  }
2289
2290
  finalPrice = Math.floor(discounted);
2290
2291
  }
2291
- const totalDiscount = hasTechDiscount || hasFoxDiscount ? Math.round(100 - finalPrice / baseCost * 100) : 0;
2292
+ const showOriginal = finalPrice < baseCost;
2292
2293
  return [
2293
2294
  `等级 ${level.padEnd(5)}`,
2294
- ...totalDiscount > 0 ? [
2295
- `▸ 价格: ${finalPrice.toString().padStart(4)} (原价 ${baseCost})`
2296
- ] : []
2295
+ `▸ 价格: ${finalPrice.toString().padStart(4)}${showOriginal ? ` (原价 ${baseCost})` : ""}`
2297
2296
  ].join("\n");
2298
2297
  });
2299
2298
  const discountNotice = [];
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.14",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [