koishi-plugin-ggcevo-game 1.3.63 → 1.3.64

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 +336 -238
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -403,7 +403,7 @@ function apply(ctx, config) {
403
403
  type: "热能武器",
404
404
  damage: 25,
405
405
  description: "喷射稳定的液氮恒流,对长时间接触者造成致命的损伤",
406
- specialeffect: "",
406
+ specialeffect: "攻击使目标叠加“寒冷”层数,每层使其受到的伤害+5%",
407
407
  price: 775,
408
408
  redCrystalCost: 10,
409
409
  isantiair: false,
@@ -688,15 +688,19 @@ function apply(ctx, config) {
688
688
  },
689
689
  "辐射": {
690
690
  effect: 0,
691
- description: "受到伽马枪攻击时会积累辐射层数,每层使受到的伤害增加1%(至多增加100%)"
691
+ description: "受到武器伽马枪攻击时会积累辐射层数,每层使受到的伤害增加1%(至多增加100%)"
692
+ },
693
+ "寒冷": {
694
+ effect: 0,
695
+ description: "受到武器零度之下攻击时会积累寒冷层数,每层使受到的伤害增加5%(至多增加50%)"
692
696
  },
693
697
  "电能导体": {
694
698
  effect: 0,
695
- description: "当血量降低到10%以下时,“护盾”标签变为“重甲”标签; 受到寒冷伤害时,会叠加一层“寒冷”(至多10层)"
699
+ description: "当血量降低到10%以下时,“护盾”标签变为“重甲”标签;"
696
700
  },
697
701
  "超导体": {
698
702
  effect: 0,
699
- description: "当血量降低到5%以下时,“护盾”标签变为“重甲”标签; 受到寒冷伤害时,会叠加一层“寒冷”(至多10层)"
703
+ description: "当血量降低到5%以下时,“护盾”标签变为“重甲”标签;"
700
704
  },
701
705
  "能量虹吸": {
702
706
  effect: 0,
@@ -719,8 +723,8 @@ function apply(ctx, config) {
719
723
  description: "当“能量”≥10%的时候,每次受到攻击有60%的概率回复所有存活的异形100点血量; 每拥有一层“寒冷”则降低5%的概率"
720
724
  },
721
725
  "能量黑洞": {
722
- effect: 0,
723
- description: "存在“能量黑洞”,受到的伤害-10%; 每拥有一层“寒冷”,受到的伤害+5%"
726
+ effect: -0.2,
727
+ description: "存在“能量黑洞”,受到的伤害-20%"
724
728
  },
725
729
  "火焰异形": {
726
730
  effect: 0,
@@ -728,23 +732,23 @@ function apply(ctx, config) {
728
732
  },
729
733
  "庞兽狂暴": {
730
734
  effect: 0,
731
- description: "血量低于50%后,进入狂暴状态,受到的伤害-50%"
735
+ description: "血量低于50%时,进入狂暴状态,受到的伤害-50%"
732
736
  },
733
737
  "灼烧粘液": {
734
738
  effect: 0,
735
- description: "受到伤害后,会获得一层“胆汁”; 若存在“胆汁”层数下受到火焰攻击,将立刻引爆并使受到的伤害+100%,同时层数清零"
739
+ description: "受到伤害后,会获得一层“胆汁”; 若存在“胆汁”层数时受到火焰攻击,将立刻清空层数并回复X点生命值(X为“胆汁”层数 x 10)"
736
740
  },
737
741
  "腐蚀胆汁": {
738
742
  effect: 0,
739
- description: "当“胆汁”达到5层时,发射灼热强酸爆蛋并清空层数,治愈所有存活的异形500点血量"
743
+ description: "当“胆汁”达到10层后,下一次受到攻击将治愈所有存活异形1000点血量并清空层数,"
740
744
  },
741
745
  "火焰吐息": {
742
746
  effect: 0,
743
- description: "当“胆汁”达到10层时,发射灼热强酸爆蛋并清空层数,治愈所有存活的异形20%最大生命值"
747
+ description: "当“胆汁”达到20层后,下一次攻击将治愈所有存活异形50%的最大生命值并清空层数"
744
748
  },
745
749
  "太阳耀斑": {
746
750
  effect: 0,
747
- description: "当所有子代阵亡后,自身移除“惧寒”标签和“孤立无援”并免疫寒冷伤害"
751
+ description: "当所有子代阵亡后,自身将移除“惧寒”标签和“孤立无援”并且免疫寒冷伤害"
748
752
  }
749
753
  };
750
754
  const defineBoss = /* @__PURE__ */ __name((config2) => config2, "defineBoss");
@@ -1248,6 +1252,15 @@ function apply(ctx, config) {
1248
1252
  price: 100,
1249
1253
  redCrystalCost: 0,
1250
1254
  condition: "使用零度之下攻击异形并成功使寒冷层数+1"
1255
+ },
1256
+ "顾全大局": {
1257
+ id: 3,
1258
+ type: "可重复任务",
1259
+ description: "利用【焚烧枪】武器引爆异形目标的胆汁",
1260
+ target: 1,
1261
+ price: 200,
1262
+ redCrystalCost: 0,
1263
+ condition: "使用焚烧枪攻击异形并成功引爆≥10层的胆汁"
1251
1264
  }
1252
1265
  };
1253
1266
  async function calculateTotalDamage(ctx2, session, equippedWeapon, targetBoss, options) {
@@ -1937,7 +1950,7 @@ function apply(ctx, config) {
1937
1950
  const newLayers = hasRadiation ? Math.min(currentLayers + 1, 100) : 1;
1938
1951
  let layerMsg;
1939
1952
  if (!hasRadiation) {
1940
- layerMsg = `☢️ ${targetBoss.name} 获得【辐射】效果(初始层数1)`;
1953
+ layerMsg = `☢️ ${targetBoss.name}获得【辐射】效果(当前1)`;
1941
1954
  skillUpdates.push({
1942
1955
  name: targetBoss.name,
1943
1956
  add: ["辐射"]
@@ -1946,7 +1959,7 @@ function apply(ctx, config) {
1946
1959
  } else if (newLayers === currentLayers) {
1947
1960
  layerMsg = `☢️ 辐射层数已达上限(100层)`;
1948
1961
  } else {
1949
- layerMsg = `☢️ 辐射层数+1`;
1962
+ layerMsg = `☢️ ${targetBoss.name}获得1层“辐射”(当前${newLayers}层)`;
1950
1963
  radiationApplied = true;
1951
1964
  }
1952
1965
  await ctx2.database.set(
@@ -1974,29 +1987,46 @@ function apply(ctx, config) {
1974
1987
  messages: radiationLayers > 0 ? [`☢️ 【辐射】生效:当前${radiationLayers}层辐射,受到的伤害+${radiationLayers}%`] : []
1975
1988
  };
1976
1989
  }, "calculateRadiationDamage"),
1977
- // === 电能相关被动处理 ===
1978
- // 处理寒冷伤害叠加(电能导体/超导体)
1979
- handleFreezingStack: /* @__PURE__ */ __name(async (ctx2, targetBoss, weaponName) => {
1980
- if (weaponName !== "零度之下" || !(targetBoss.skills.includes("电能导体") || targetBoss.skills.includes("超导体"))) {
1990
+ // 新增寒冷层数处理函数(类似辐射处理)
1991
+ handleColdEffect: /* @__PURE__ */ __name(async (ctx2, targetBoss, weaponName) => {
1992
+ if (weaponName !== "零度之下") {
1981
1993
  return null;
1982
1994
  }
1995
+ const messages = [];
1983
1996
  let freezing = false;
1984
1997
  const currentFreezing = targetBoss.freezing || 0;
1985
- if (currentFreezing < 10) {
1986
- const newFreezing = currentFreezing + 1;
1987
- await ctx2.database.set(
1988
- "ggcevo_boss",
1989
- { name: targetBoss.name },
1990
- { freezing: newFreezing }
1991
- );
1998
+ const newFreezing = Math.min(currentFreezing + 1, 10);
1999
+ await ctx2.database.set(
2000
+ "ggcevo_boss",
2001
+ { name: targetBoss.name },
2002
+ { freezing: newFreezing }
2003
+ );
2004
+ if (newFreezing === 10 && currentFreezing < 10) {
2005
+ messages.push(`❄️ 【寒冷】效果达到上限(10层)`);
2006
+ } else {
2007
+ messages.push(`❄️ ${targetBoss.name} 获得1层"寒冷"(当前${newFreezing}层)`);
1992
2008
  freezing = true;
2009
+ }
2010
+ return {
2011
+ messages,
2012
+ freezing
2013
+ };
2014
+ }, "handleColdEffect"),
2015
+ // 寒冷伤害计算(返回增伤系数)
2016
+ calculateColdDamage: /* @__PURE__ */ __name((targetBoss) => {
2017
+ const freezingLayers = targetBoss.freezing || 0;
2018
+ if (freezingLayers > 0) {
1993
2019
  return {
1994
- messages: [`❄️ ${targetBoss.name} 获得一层"寒冷"(当前 ${newFreezing}层)`],
1995
- freezing
2020
+ damageMultiplier: freezingLayers * 0.05,
2021
+ // 每层5%增伤
2022
+ messages: [
2023
+ `❄️ 【寒冷】生效:当前${freezingLayers}层,受到的伤害+${freezingLayers * 5}%`
2024
+ ]
1996
2025
  };
1997
2026
  }
1998
2027
  return null;
1999
- }, "handleFreezingStack"),
2028
+ }, "calculateColdDamage"),
2029
+ // === 电能相关被动处理 ===
2000
2030
  // 处理导体标签变化(血量低时护盾->重甲)
2001
2031
  handleConductorTagChange: /* @__PURE__ */ __name(async (ctx2, targetBoss, currentHP, maxHP) => {
2002
2032
  const triggerThreshold = targetBoss.skills.includes("超导体") ? 0.05 : 0.1;
@@ -2074,23 +2104,6 @@ function apply(ctx, config) {
2074
2104
  }
2075
2105
  return null;
2076
2106
  }, "handlePowerSiphon"),
2077
- // 处理能量黑洞减伤(基础减伤 + 寒冷增伤)
2078
- handleEnergyBlackhole: /* @__PURE__ */ __name((targetBoss) => {
2079
- if (!targetBoss.skills.includes("能量黑洞")) return null;
2080
- const currentFreezing = targetBoss.freezing || 0;
2081
- const baseReduction = 0.1;
2082
- const freezingBonus = currentFreezing * 0.05;
2083
- return {
2084
- damageMultiplier: -baseReduction + freezingBonus,
2085
- messages: [
2086
- `🌀 【能量黑洞】生效:基础减伤10%`,
2087
- currentFreezing > 0 ? (
2088
- // 关键修改:将百分比四舍五入为整数
2089
- `❄️ 寒冷(${currentFreezing}层)使受到的伤害+${Math.round(freezingBonus * 100)}%`
2090
- ) : ""
2091
- ].filter(Boolean)
2092
- };
2093
- }, "handleEnergyBlackhole"),
2094
2107
  // 处理电能立场(概率免疫伤害)
2095
2108
  handleEnergyField: /* @__PURE__ */ __name(async function(ctx2, targetBoss, weaponName, initialDamage) {
2096
2109
  if (!targetBoss.skills.includes("电能立场") || initialDamage === 0 || weaponName === "零度之下") {
@@ -2122,8 +2135,8 @@ function apply(ctx, config) {
2122
2135
  }
2123
2136
  return null;
2124
2137
  }, "getMemberConfig"),
2125
- // 处理脉冲效果(概率治疗全体异形)
2126
- handlePulse: /* @__PURE__ */ __name(async function(ctx2, targetBoss, activeBosses, bossGroup) {
2138
+ // 修改后的脉冲处理函数
2139
+ handlePulse: /* @__PURE__ */ __name(async function(ctx2, targetBoss, activeBosses, bossGroup, currentHP) {
2127
2140
  if (!targetBoss.skills.includes("脉冲")) return null;
2128
2141
  const currentEnergy = targetBoss.energy || 0;
2129
2142
  const currentFreezing = targetBoss.freezing || 0;
@@ -2141,6 +2154,7 @@ function apply(ctx, config) {
2141
2154
  );
2142
2155
  const updates = [];
2143
2156
  const healMessages = [];
2157
+ let updatedHP = currentHP;
2144
2158
  for (const member of groupMembers) {
2145
2159
  const memberConfig = this.getMemberConfig(member.name, bossGroup);
2146
2160
  if (!memberConfig) continue;
@@ -2148,6 +2162,9 @@ function apply(ctx, config) {
2148
2162
  const healAmount = member.type === "主宰" ? 100 : 100;
2149
2163
  const newHP = Math.min(member.HP + healAmount, maxHP);
2150
2164
  const actualHeal = newHP - member.HP;
2165
+ if (member.name === targetBoss.name) {
2166
+ updatedHP = newHP;
2167
+ }
2151
2168
  updates.push(
2152
2169
  ctx2.database.set(
2153
2170
  "ggcevo_boss",
@@ -2156,14 +2173,14 @@ function apply(ctx, config) {
2156
2173
  )
2157
2174
  );
2158
2175
  if (actualHeal > 0) {
2159
- healMessages.push(`${member.name}+${actualHeal}HP(当前${newHP}/${maxHP})`);
2160
- } else {
2161
- healMessages.push(`${member.name}生命值已满`);
2176
+ healMessages.push(`${member.name}+${actualHeal}HP`);
2162
2177
  }
2163
2178
  }
2164
2179
  if (healMessages.length > 0) {
2165
2180
  await Promise.all(updates);
2166
2181
  return {
2182
+ newHP: updatedHP,
2183
+ // 返回当前目标的新HP值
2167
2184
  messages: [
2168
2185
  `❤️ 【脉冲】生效:治疗全体异形`,
2169
2186
  ...healMessages
@@ -2214,114 +2231,124 @@ function apply(ctx, config) {
2214
2231
  return null;
2215
2232
  }
2216
2233
  }, "handleParticlePhaseEffect"),
2217
- // 火焰异形处理(免疫火焰伤害)
2218
- handleFlameCreature: /* @__PURE__ */ __name(function(targetBoss, weaponName, damage, maxHP) {
2219
- if (targetBoss.skills.includes("火焰异形") && weaponName === "焚烧枪") {
2220
- const healAmount = damage;
2221
- return {
2222
- updatedHP: Math.min(targetBoss.HP + healAmount, maxHP),
2223
- initialDamage: 0,
2224
- messages: [`🔥 【火焰异形】生效:免疫火焰伤害,${targetBoss.name}回复${healAmount}生命值`]
2225
- };
2226
- }
2227
- return null;
2228
- }, "handleFlameCreature"),
2229
- // 庞兽狂暴处理(每次攻击时检测血量)
2230
- handleTitanRage: /* @__PURE__ */ __name(function(targetBoss, currentHP, maxHP) {
2234
+ // 庞兽狂暴处理(血量低于50%时减伤)
2235
+ handleGiantRage: /* @__PURE__ */ __name(function(targetBoss, currentHP, maxHP) {
2231
2236
  if (!targetBoss.skills.includes("庞兽狂暴")) return null;
2232
- const hpPercent = currentHP / maxHP;
2233
- const isBelowThreshold = hpPercent < 0.5;
2234
- if (isBelowThreshold) {
2237
+ if (currentHP / maxHP < 0.5) {
2235
2238
  return {
2236
2239
  damageMultiplier: -0.5,
2237
- messages: [`🔥 【庞兽狂暴】生效:进入狂暴状态,受到的伤害-50%`]
2240
+ messages: [`🐗 【庞兽狂暴】生效:进入狂暴状态,受到的伤害-50%`]
2238
2241
  };
2239
2242
  }
2240
2243
  return null;
2241
- }, "handleTitanRage"),
2242
- // 胆汁效果处理(返回伤害调整系数)
2243
- handleBileEffects: /* @__PURE__ */ __name(function(targetBoss, weaponName, initialDamage) {
2244
- if (!targetBoss.skills.includes("灼烧粘液")) return null;
2245
- const bileLayers = targetBoss.Skillcountpoints || 0;
2246
- const messages = [];
2247
- let currentDamage = initialDamage;
2248
- if (weaponName === "焚烧枪" && bileLayers > 0) {
2249
- currentDamage *= 2;
2250
- messages.push(`🔥 【灼烧粘液】引爆:已有${bileLayers}层胆汁,本次伤害+100%`);
2251
- return {
2252
- messages,
2253
- clearBile: true,
2254
- currentDamage
2255
- };
2244
+ }, "handleGiantRage"),
2245
+ // 修改后的灼烧粘液处理
2246
+ handleBileStacking: /* @__PURE__ */ __name(async function(ctx2, targetBoss, skipStack) {
2247
+ if (!targetBoss.skills.includes("灼烧粘液") || skipStack) return null;
2248
+ const currentStacks = targetBoss.Skillcountpoints || 0;
2249
+ const newStacks = Math.min(currentStacks + 1, 20);
2250
+ let messages = [`💧 【灼烧粘液】生效:获得1层"胆汁"(当前${newStacks}层)`];
2251
+ if (currentStacks < 10 && newStacks >= 10) {
2252
+ if (targetBoss.skills.includes("腐蚀胆汁")) {
2253
+ messages.push(`🟢 胆汁达到10层,下次攻击将触发【腐蚀胆汁】`);
2254
+ }
2256
2255
  }
2257
- return null;
2258
- }, "handleBileEffects"),
2259
- // 胆汁叠层和效果触发处理
2260
- handleBileCount: /* @__PURE__ */ __name(async function(ctx2, targetBoss, weaponName, bossGroup) {
2261
- if (!targetBoss.skills.includes("灼烧粘液")) return null;
2262
- const maxBile = targetBoss.type === "主宰" ? 10 : 5;
2263
- const messages = [];
2264
- const updates = [];
2265
- const currentBile = targetBoss.Skillcountpoints || 0;
2266
- if (currentBile >= 5 && targetBoss.skills.includes("腐蚀胆汁")) {
2267
- await this.triggerCorrosiveBile(ctx2, targetBoss, bossGroup);
2268
- updates.push(
2269
- ctx2.database.set(
2270
- "ggcevo_boss",
2271
- { name: targetBoss.name },
2272
- { Skillcountpoints: 0 }
2273
- )
2274
- );
2275
- messages.push(`💚 【腐蚀胆汁】触发:胆汁达到5层,治愈所有存活的异形500点血量`);
2276
- } else if (currentBile >= 10 && targetBoss.skills.includes("火焰吐息")) {
2277
- await this.triggerFlamingBreath(ctx2, targetBoss, bossGroup);
2278
- updates.push(
2279
- ctx2.database.set(
2280
- "ggcevo_boss",
2281
- { name: targetBoss.name },
2282
- { Skillcountpoints: 0 }
2283
- )
2284
- );
2285
- messages.push(`🔥 【火焰吐息】触发:胆汁达到10层,治愈所有存活的异形20%最大生命值`);
2256
+ if (currentStacks < 20 && newStacks >= 20) {
2257
+ if (targetBoss.skills.includes("火焰吐息")) {
2258
+ messages.push(`🐲 胆汁达到20层,下次攻击将触发【火焰吐息】`);
2259
+ }
2286
2260
  }
2287
- if (updates.length > 0) {
2288
- await Promise.all(updates);
2289
- return { messages };
2261
+ await ctx2.database.set(
2262
+ "ggcevo_boss",
2263
+ { name: targetBoss.name },
2264
+ { Skillcountpoints: newStacks }
2265
+ );
2266
+ return { messages };
2267
+ }, "handleBileStacking"),
2268
+ // 修改后的太阳耀斑处理(每次受击检测)
2269
+ handleSolarFlare: /* @__PURE__ */ __name(async function(ctx2, targetBoss, weaponName) {
2270
+ if (!targetBoss.skills.includes("太阳耀斑") || targetBoss.type !== "主宰") {
2271
+ return { immune: false, messages: [] };
2290
2272
  }
2291
- if (weaponName !== "焚烧枪" && currentBile < maxBile) {
2292
- const newBile = currentBile + 1;
2293
- updates.push(
2294
- ctx2.database.set(
2295
- "ggcevo_boss",
2296
- { name: targetBoss.name },
2297
- { Skillcountpoints: newBile }
2298
- )
2299
- );
2300
- messages.push(`🟢 【灼烧粘液】生效:获得1层胆汁(当前${newBile}/${maxBile}层)`);
2301
- if (newBile === 5 && targetBoss.skills.includes("腐蚀胆汁")) {
2302
- messages.push(`💚 层数达到5层,下次受到攻击将触发【腐蚀胆汁】效果`);
2303
- } else if (newBile === 10 && targetBoss.skills.includes("火焰吐息")) {
2304
- messages.push(`🔥 层数达到10层,下次受到攻击将触发【火焰吐息】效果`);
2273
+ const messages = [];
2274
+ let immune = false;
2275
+ const minions = await ctx2.database.get("ggcevo_boss", {
2276
+ groupId: targetBoss.groupId,
2277
+ type: "子代",
2278
+ isActive: true
2279
+ });
2280
+ const aliveMinions = minions.filter((m) => m.HP > 0);
2281
+ if (aliveMinions.length === 0) {
2282
+ const updates = [];
2283
+ if (targetBoss.tags.includes("惧寒")) {
2284
+ const newTags = targetBoss.tags.filter((tag) => tag !== "惧寒");
2285
+ updates.push(
2286
+ ctx2.database.set(
2287
+ "ggcevo_boss",
2288
+ { name: targetBoss.name },
2289
+ { tags: newTags }
2290
+ )
2291
+ );
2292
+ targetBoss.tags = newTags;
2293
+ messages.push(`☀️ 【太阳耀斑】生效:移除"惧寒"标签`);
2294
+ }
2295
+ if (targetBoss.skills.includes("孤立无援")) {
2296
+ const newSkills = targetBoss.skills.filter((skill) => skill !== "孤立无援");
2297
+ updates.push(
2298
+ ctx2.database.set(
2299
+ "ggcevo_boss",
2300
+ { name: targetBoss.name },
2301
+ { skills: newSkills }
2302
+ )
2303
+ );
2304
+ targetBoss.skills = newSkills;
2305
+ messages.push(`☀️ 【太阳耀斑】生效:移除"孤立无援"技能`);
2305
2306
  }
2306
- }
2307
- if (updates.length > 0) {
2308
2307
  await Promise.all(updates);
2309
2308
  }
2310
- return { messages };
2311
- }, "handleBileCount"),
2312
- // 触发腐蚀胆汁效果
2313
- triggerCorrosiveBile: /* @__PURE__ */ __name(async function(ctx2, targetBoss, bossGroup) {
2309
+ if (!targetBoss.tags.includes("惧寒") && weaponName === "零度之下") {
2310
+ immune = true;
2311
+ messages.push(`☀️ 【太阳耀斑】生效:免疫寒冷伤害`);
2312
+ }
2313
+ return { immune, messages };
2314
+ }, "handleSolarFlare"),
2315
+ // 辅助函数:从配置中获取成员的最大生命值
2316
+ getMemberMaxHP: /* @__PURE__ */ __name(function(name2, bossGroup) {
2317
+ if (bossGroup.main.name === name2) return bossGroup.main.maxHP;
2318
+ for (const minion of bossGroup.minions) {
2319
+ if (minion.name === name2) return minion.maxHP;
2320
+ }
2321
+ return null;
2322
+ }, "getMemberMaxHP"),
2323
+ // 修改后的腐蚀胆汁处理函数
2324
+ handleCorrosiveBile: /* @__PURE__ */ __name(async function(ctx2, targetBoss, bossGroup, currentHP) {
2325
+ if (!targetBoss.skills.includes("腐蚀胆汁")) return null;
2326
+ const bileStacks = targetBoss.Skillcountpoints || 0;
2327
+ if (bileStacks < 10) return null;
2328
+ await ctx2.database.set(
2329
+ "ggcevo_boss",
2330
+ { name: targetBoss.name },
2331
+ { Skillcountpoints: 0 }
2332
+ );
2333
+ const messages = [
2334
+ `🟢 【腐蚀胆汁】生效:消耗10层"胆汁",治愈所有存活异形`
2335
+ ];
2314
2336
  const updates = [];
2315
- const activeMembers = await ctx2.database.get("ggcevo_boss", {
2337
+ let updatedHP = currentHP;
2338
+ const groupMembers = await ctx2.database.get("ggcevo_boss", {
2316
2339
  groupId: targetBoss.groupId,
2317
- isActive: true
2340
+ isActive: true,
2341
+ HP: { $gt: 0 }
2318
2342
  });
2319
- for (const member of activeMembers) {
2320
- const memberConfig = this.getMemberConfig(member.name, bossGroup);
2321
- if (!memberConfig) continue;
2322
- const maxHP = memberConfig.maxHP;
2323
- const healAmount = 500;
2343
+ for (const member of groupMembers) {
2344
+ const maxHP = this.getMemberMaxHP(member.name, bossGroup);
2345
+ if (!maxHP) continue;
2346
+ const healAmount = 1e3;
2324
2347
  const newHP = Math.min(member.HP + healAmount, maxHP);
2348
+ const actualHeal = newHP - member.HP;
2349
+ if (member.name === targetBoss.name) {
2350
+ updatedHP = newHP;
2351
+ }
2325
2352
  updates.push(
2326
2353
  ctx2.database.set(
2327
2354
  "ggcevo_boss",
@@ -2329,24 +2356,40 @@ function apply(ctx, config) {
2329
2356
  { HP: newHP }
2330
2357
  )
2331
2358
  );
2359
+ messages.push(`${member.name} 回复${actualHeal}点生命值`);
2332
2360
  }
2333
- if (updates.length > 0) {
2334
- await Promise.all(updates);
2335
- }
2336
- }, "triggerCorrosiveBile"),
2337
- // 触发火焰吐息效果
2338
- triggerFlamingBreath: /* @__PURE__ */ __name(async function(ctx2, targetBoss, bossGroup) {
2361
+ await Promise.all(updates);
2362
+ return { messages, currentHP: updatedHP };
2363
+ }, "handleCorrosiveBile"),
2364
+ // 修改后的火焰吐息处理函数
2365
+ handleFireBreath: /* @__PURE__ */ __name(async function(ctx2, targetBoss, bossGroup, currentHP) {
2366
+ if (!targetBoss.skills.includes("火焰吐息")) return null;
2367
+ const bileStacks = targetBoss.Skillcountpoints || 0;
2368
+ if (bileStacks < 20) return null;
2369
+ await ctx2.database.set(
2370
+ "ggcevo_boss",
2371
+ { name: targetBoss.name },
2372
+ { Skillcountpoints: 0 }
2373
+ );
2374
+ const messages = [
2375
+ `🐲 【火焰吐息】生效:消耗20层"胆汁",治愈所有存活异形50%的最大生命值`
2376
+ ];
2339
2377
  const updates = [];
2340
- const activeMembers = await ctx2.database.get("ggcevo_boss", {
2378
+ let updatedHP = currentHP;
2379
+ const groupMembers = await ctx2.database.get("ggcevo_boss", {
2341
2380
  groupId: targetBoss.groupId,
2342
- isActive: true
2381
+ isActive: true,
2382
+ HP: { $gt: 0 }
2343
2383
  });
2344
- for (const member of activeMembers) {
2345
- const memberConfig = this.getMemberConfig(member.name, bossGroup);
2346
- if (!memberConfig) continue;
2347
- const maxHP = memberConfig.maxHP;
2348
- const healAmount = Math.floor(maxHP * 0.2);
2384
+ for (const member of groupMembers) {
2385
+ const maxHP = this.getMemberMaxHP(member.name, bossGroup);
2386
+ if (!maxHP) continue;
2387
+ const healAmount = Math.floor(maxHP * 0.5);
2349
2388
  const newHP = Math.min(member.HP + healAmount, maxHP);
2389
+ const actualHeal = newHP - member.HP;
2390
+ if (member.name === targetBoss.name) {
2391
+ updatedHP = newHP;
2392
+ }
2350
2393
  updates.push(
2351
2394
  ctx2.database.set(
2352
2395
  "ggcevo_boss",
@@ -2354,44 +2397,59 @@ function apply(ctx, config) {
2354
2397
  { HP: newHP }
2355
2398
  )
2356
2399
  );
2400
+ messages.push(`${member.name} 回复${actualHeal}点生命值`);
2357
2401
  }
2358
- if (updates.length > 0) {
2359
- await Promise.all(updates);
2402
+ await Promise.all(updates);
2403
+ return { messages, currentHP: updatedHP };
2404
+ }, "handleFireBreath"),
2405
+ // 修改后的火焰异形处理
2406
+ handleFireEvolution: /* @__PURE__ */ __name(async function(ctx2, targetBoss, weaponName, initialDamage, bossGroup) {
2407
+ if (targetBoss.skills.includes("火焰异形") && weaponName === "焚烧枪") {
2408
+ const maxHP = this.getMemberMaxHP(targetBoss.name, bossGroup);
2409
+ if (!maxHP) return null;
2410
+ const healAmount = Math.min(initialDamage, maxHP - targetBoss.HP);
2411
+ let updatedHP = Math.min(targetBoss.HP + healAmount, maxHP);
2412
+ const messages = [
2413
+ `🔥 【火焰异形】生效:免疫火焰伤害`,
2414
+ healAmount > 0 ? `${targetBoss.name}回复${healAmount}点生命值` : ""
2415
+ ].filter(Boolean);
2416
+ const bileResult = await this.handleBileIgnition(ctx2, targetBoss, bossGroup, updatedHP);
2417
+ if (bileResult) {
2418
+ updatedHP = bileResult.newHP;
2419
+ messages.push(...bileResult.messages);
2420
+ }
2421
+ return {
2422
+ updatedHP,
2423
+ initialDamage: 0,
2424
+ // 免疫伤害
2425
+ messages,
2426
+ bileStacks: bileResult?.bileStacks || 0
2427
+ };
2360
2428
  }
2361
- }, "triggerFlamingBreath"),
2362
- // 太阳耀斑处理(每次受到攻击时检测)
2363
- handleSolarFlare: /* @__PURE__ */ __name(async function(ctx2, targetBoss, weaponName, activeBosses) {
2364
- if (!targetBoss.skills.includes("太阳耀斑")) return null;
2365
- const minionDead = activeBosses.every(
2366
- (boss) => boss.groupId === targetBoss.groupId && boss.type === "子代" && (!boss.isActive || boss.HP <= 0)
2429
+ return null;
2430
+ }, "handleFireEvolution"),
2431
+ // 修改后的灼烧粘液引爆
2432
+ handleBileIgnition: /* @__PURE__ */ __name(async function(ctx2, targetBoss, bossGroup, updatedHP) {
2433
+ if (!targetBoss.skills.includes("灼烧粘液")) return null;
2434
+ const bileStacks = targetBoss.Skillcountpoints || 0;
2435
+ if (bileStacks < 1) return null;
2436
+ const maxHP = this.getMemberMaxHP(targetBoss.name, bossGroup);
2437
+ if (!maxHP) return null;
2438
+ const healAmount = bileStacks * 10;
2439
+ const newHP = Math.min(updatedHP + healAmount, maxHP);
2440
+ await ctx2.database.set(
2441
+ "ggcevo_boss",
2442
+ { name: targetBoss.name },
2443
+ { Skillcountpoints: 0, HP: newHP }
2367
2444
  );
2368
- if (!minionDead) return null;
2369
- const messages = [];
2370
- let immuneCold = false;
2371
- if (targetBoss.tags.includes("惧寒")) {
2372
- const newTags = targetBoss.tags.filter((tag) => tag !== "惧寒");
2373
- await ctx2.database.set(
2374
- "ggcevo_boss",
2375
- { name: targetBoss.name },
2376
- { tags: newTags }
2377
- );
2378
- messages.push(`☀️ 【太阳耀斑】降临:所有子代阵亡,${targetBoss.name}移除「惧寒」标签`);
2379
- }
2380
- if (targetBoss.skills.includes("孤立无援")) {
2381
- const newSkills = targetBoss.skills.filter((skill) => skill !== "孤立无援");
2382
- await ctx2.database.set(
2383
- "ggcevo_boss",
2384
- { name: targetBoss.name },
2385
- { skills: newSkills }
2386
- );
2387
- messages.push(`${targetBoss.name}移除【孤立无援】效果`);
2388
- }
2389
- if (weaponName === "零度之下" && !targetBoss.tags.includes("惧寒")) {
2390
- immuneCold = true;
2391
- messages.push(`☀️ 【太阳耀斑】生效:免疫寒冷伤害`);
2392
- }
2393
- return { immuneCold, messages };
2394
- }, "handleSolarFlare"),
2445
+ return {
2446
+ messages: [
2447
+ `💥 【灼烧粘液】引爆:消耗${bileStacks}层"胆汁",${targetBoss.name}回复${healAmount}点生命值`
2448
+ ],
2449
+ newHP,
2450
+ bileStacks
2451
+ };
2452
+ }, "handleBileIgnition"),
2395
2453
  // 统一处理被动技能
2396
2454
  handlePassives: /* @__PURE__ */ __name(async function(ctx2, targetBoss, initialDamage, currentHP, maxHP, weaponName, weaponData, activeBosses, bossGroup) {
2397
2455
  let messages = [];
@@ -2399,6 +2457,16 @@ function apply(ctx, config) {
2399
2457
  let totalMultiplier = 0;
2400
2458
  let radiationApplied = false;
2401
2459
  let freezing = false;
2460
+ let bileStacks = 0;
2461
+ const solarFlareResult = await this.handleSolarFlare(ctx2, targetBoss, weaponName);
2462
+ if (solarFlareResult.immune) {
2463
+ return {
2464
+ currentHP: targetBoss.HP,
2465
+ messages: solarFlareResult.messages,
2466
+ skillUpdates: [],
2467
+ initialDamage: 0
2468
+ };
2469
+ }
2402
2470
  const frostEvoResult = this.handleFrostEvolution(targetBoss, weaponName, initialDamage, maxHP);
2403
2471
  if (frostEvoResult) {
2404
2472
  return {
@@ -2429,29 +2497,20 @@ function apply(ctx, config) {
2429
2497
  };
2430
2498
  }
2431
2499
  }
2432
- const solarFlareResult = await this.handleSolarFlare(ctx2, targetBoss, weaponName, activeBosses);
2433
- if (solarFlareResult?.immuneCold && weaponName === "零度之下") {
2434
- messages.push(...solarFlareResult.messages);
2435
- return {
2436
- currentHP,
2437
- messages,
2438
- initialDamage: 0
2439
- };
2440
- }
2441
- const bileDetonationResult = await this.handleBileEffects(targetBoss, weaponName, initialDamage);
2442
- if (bileDetonationResult) {
2443
- messages.push(...bileDetonationResult.messages);
2444
- initialDamage = bileDetonationResult.currentDamage;
2445
- if (bileDetonationResult.clearBile) {
2446
- targetBoss.Skillcountpoints = 0;
2447
- }
2448
- }
2449
- const flameResult = this.handleFlameCreature(targetBoss, weaponName, initialDamage, maxHP);
2450
- if (flameResult) {
2500
+ const fireEvoResult = await this.handleFireEvolution(
2501
+ ctx2,
2502
+ targetBoss,
2503
+ weaponName,
2504
+ initialDamage,
2505
+ bossGroup
2506
+ );
2507
+ if (fireEvoResult) {
2451
2508
  return {
2452
- currentHP: flameResult.updatedHP,
2453
- messages: flameResult.messages,
2454
- initialDamage: 0
2509
+ currentHP: fireEvoResult.updatedHP,
2510
+ messages: fireEvoResult.messages,
2511
+ skillUpdates: [],
2512
+ initialDamage: fireEvoResult.initialDamage,
2513
+ bileStacks: fireEvoResult.bileStacks
2455
2514
  };
2456
2515
  }
2457
2516
  targetBoss.skills.forEach((skill) => {
@@ -2487,21 +2546,21 @@ function apply(ctx, config) {
2487
2546
  totalMultiplier += powerSiphonResult.damageMultiplier;
2488
2547
  messages.push(...powerSiphonResult.messages);
2489
2548
  }
2490
- const blackholeResult = this.handleEnergyBlackhole(targetBoss);
2491
- if (blackholeResult) {
2492
- totalMultiplier += blackholeResult.damageMultiplier;
2493
- messages.push(...blackholeResult.messages);
2494
- }
2495
- const titanRageResult = this.handleTitanRage(targetBoss, currentHP, maxHP);
2496
- if (titanRageResult) {
2497
- totalMultiplier += titanRageResult.damageMultiplier;
2498
- messages.push(...titanRageResult.messages);
2549
+ const giantRageResult = this.handleGiantRage(targetBoss, currentHP, maxHP);
2550
+ if (giantRageResult) {
2551
+ totalMultiplier += giantRageResult.damageMultiplier;
2552
+ messages.push(...giantRageResult.messages);
2499
2553
  }
2500
2554
  const radiationCalc = this.calculateRadiationDamage(targetBoss);
2501
2555
  if (radiationCalc) {
2502
2556
  totalMultiplier += radiationCalc.damageMultiplier;
2503
2557
  messages.push(...radiationCalc.messages);
2504
2558
  }
2559
+ const coldDamageResult = this.calculateColdDamage(targetBoss);
2560
+ if (coldDamageResult) {
2561
+ totalMultiplier += coldDamageResult.damageMultiplier;
2562
+ messages.push(...coldDamageResult.messages);
2563
+ }
2505
2564
  const particleResult = this.handleParticlePhaseEffect(
2506
2565
  targetBoss,
2507
2566
  weaponName,
@@ -2511,6 +2570,9 @@ function apply(ctx, config) {
2511
2570
  totalMultiplier = particleResult.damageMultiplier;
2512
2571
  messages.push(...particleResult.messages);
2513
2572
  }
2573
+ if (solarFlareResult.messages.length > 0) {
2574
+ messages.push(...solarFlareResult.messages);
2575
+ }
2514
2576
  const originalMultiplier = totalMultiplier;
2515
2577
  if (originalMultiplier < -1) {
2516
2578
  messages.push(`⚠️ 触发伤害保底机制:强制造成1点伤害`);
@@ -2551,10 +2613,37 @@ function apply(ctx, config) {
2551
2613
  messages.push(...survivalResult.messages);
2552
2614
  skillUpdates.push(...survivalResult.skillUpdates);
2553
2615
  }
2554
- const pulseResult = await this.handlePulse(ctx2, targetBoss, activeBosses, bossGroup);
2616
+ const pulseResult = await this.handlePulse(
2617
+ ctx2,
2618
+ targetBoss,
2619
+ activeBosses,
2620
+ bossGroup,
2621
+ currentHP
2622
+ // 传入当前HP值
2623
+ );
2555
2624
  if (pulseResult) {
2625
+ currentHP = pulseResult.newHP;
2556
2626
  messages.push(...pulseResult.messages);
2557
2627
  }
2628
+ let skipBileStacking = false;
2629
+ if (weaponName !== "焚烧枪") {
2630
+ if (targetBoss.skills.includes("腐蚀胆汁")) {
2631
+ const bileTriggered = await this.handleCorrosiveBile(ctx2, targetBoss, bossGroup, currentHP);
2632
+ if (bileTriggered) {
2633
+ currentHP = bileTriggered.currentHP;
2634
+ skipBileStacking = true;
2635
+ messages.push(...bileTriggered.messages);
2636
+ }
2637
+ }
2638
+ if (targetBoss.skills.includes("火焰吐息")) {
2639
+ const breathTriggered = await this.handleFireBreath(ctx2, targetBoss, bossGroup, currentHP);
2640
+ if (breathTriggered) {
2641
+ currentHP = breathTriggered.currentHP;
2642
+ skipBileStacking = true;
2643
+ messages.push(...breathTriggered.messages);
2644
+ }
2645
+ }
2646
+ }
2558
2647
  const coldAdaptResult = await this.handleColdAdaptation(ctx2, targetBoss, weaponName);
2559
2648
  if (coldAdaptResult) {
2560
2649
  messages.push(...coldAdaptResult.messages);
@@ -2564,22 +2653,10 @@ function apply(ctx, config) {
2564
2653
  currentHP = bloodCountResult.updatedHP;
2565
2654
  messages.push(...bloodCountResult.messages);
2566
2655
  }
2567
- const bileCountResult = await this.handleBileCount(ctx2, targetBoss, weaponName, bossGroup);
2568
- if (bileCountResult) {
2569
- messages.push(...bileCountResult.messages);
2570
- if (bileCountResult.newBile !== void 0) {
2571
- targetBoss.Skillcountpoints = bileCountResult.newBile;
2572
- }
2573
- }
2574
2656
  const sentryResult = await this.handleSentryGun(ctx2, targetBoss, bossGroup);
2575
2657
  if (sentryResult) {
2576
2658
  messages.push(...sentryResult.messages);
2577
2659
  }
2578
- const freezingStackResult = await this.handleFreezingStack(ctx2, targetBoss, weaponName);
2579
- if (freezingStackResult) {
2580
- messages.push(...freezingStackResult.messages);
2581
- freezing = freezingStackResult.freezing;
2582
- }
2583
2660
  const tagChangeResult = await this.handleConductorTagChange(ctx2, targetBoss, currentHP, maxHP);
2584
2661
  if (tagChangeResult) {
2585
2662
  messages.push(...tagChangeResult.messages);
@@ -2598,6 +2675,15 @@ function apply(ctx, config) {
2598
2675
  skillUpdates.push(...gammaRadResult.skillUpdates);
2599
2676
  radiationApplied = gammaRadResult.radiationApplied;
2600
2677
  }
2678
+ const bileStackResult = await this.handleBileStacking(ctx2, targetBoss, skipBileStacking);
2679
+ if (bileStackResult) {
2680
+ messages.push(...bileStackResult.messages);
2681
+ }
2682
+ const coldEffectResult = await this.handleColdEffect(ctx2, targetBoss, weaponName);
2683
+ if (coldEffectResult) {
2684
+ messages.push(...coldEffectResult.messages);
2685
+ freezing = coldEffectResult.freezing;
2686
+ }
2601
2687
  return {
2602
2688
  currentHP,
2603
2689
  messages,
@@ -5709,6 +5795,7 @@ ${validTypes.join("、")}`;
5709
5795
  let passiveMessages = [];
5710
5796
  let radiationApplied = false;
5711
5797
  let freezing = false;
5798
+ let bileStacks = 0;
5712
5799
  const passiveResult = await PassiveHandler.handlePassives(
5713
5800
  ctx,
5714
5801
  targetBoss,
@@ -5723,8 +5810,9 @@ ${validTypes.join("、")}`;
5723
5810
  currentHP = passiveResult.currentHP;
5724
5811
  initialDamage = passiveResult.initialDamage;
5725
5812
  passiveMessages.push(...passiveResult.messages);
5726
- radiationApplied = passiveResult.radiationApplied;
5727
- freezing = passiveResult.freezing;
5813
+ radiationApplied = passiveResult?.radiationApplied || false;
5814
+ freezing = passiveResult?.freezing || false;
5815
+ bileStacks = passiveResult?.bileStacks || 0;
5728
5816
  if (passiveResult.skillUpdates.length > 0) {
5729
5817
  await PassiveHandler.applySkillUpdates(ctx, passiveResult.skillUpdates);
5730
5818
  }
@@ -5765,6 +5853,17 @@ ${validTypes.join("、")}`;
5765
5853
  progress: (freezingRecord?.progress || 0) + 1
5766
5854
  }], ["handle"]);
5767
5855
  }
5856
+ if (bileStacks >= 10) {
5857
+ const [bileStacksRecord] = await ctx.database.get("ggcevo_task", {
5858
+ handle,
5859
+ taskId: 3
5860
+ });
5861
+ await ctx.database.upsert("ggcevo_task", [{
5862
+ handle,
5863
+ taskId: 3,
5864
+ progress: (bileStacksRecord?.progress || 0) + 1
5865
+ }], ["handle"]);
5866
+ }
5768
5867
  if (isDefeated) {
5769
5868
  if (targetBoss.type === "主宰") {
5770
5869
  await ctx.database.set(
@@ -6067,7 +6166,7 @@ ${scatterMsg}`);
6067
6166
  } else {
6068
6167
  result.push("➤ 无");
6069
6168
  }
6070
- const countingSkill = mainBoss.skills?.find((s) => ["冷适应", "岗哨机枪", "吸血唾液"].includes(s));
6169
+ const countingSkill = mainBoss.skills?.find((s) => ["冷适应", "岗哨机枪", "吸血唾液", "灼烧粘液"].includes(s));
6071
6170
  if (countingSkill) {
6072
6171
  result.push(`📈 ${countingSkill}:${mainBoss.Skillcountpoints}层`);
6073
6172
  }
@@ -6961,8 +7060,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
6961
7060
  "📋 任务列表",
6962
7061
  '使用"任务 任务名称"查看详细任务信息',
6963
7062
  "====================",
6964
- ...taskList,
6965
- "===================="
7063
+ ...taskList
6966
7064
  ].join("\n");
6967
7065
  }
6968
7066
  const task = Object.entries(Tasklist).find(
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.63",
4
+ "version": "1.3.64",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [