koishi-plugin-ggcevo-game 1.3.40 → 1.3.42
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.
- package/lib/index.js +42 -14
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -692,15 +692,15 @@ function apply(ctx, config) {
|
|
|
692
692
|
},
|
|
693
693
|
"能量虹吸": {
|
|
694
694
|
effect: 0,
|
|
695
|
-
description: "
|
|
695
|
+
description: "当血量≥70%的时候,受到的伤害-40%; 当血量≥30%的时候,受到的伤害-20%"
|
|
696
696
|
},
|
|
697
697
|
"能源虹吸": {
|
|
698
698
|
effect: 0,
|
|
699
|
-
description: "
|
|
699
|
+
description: "拥有独特的“能量”机制。当“能量”≥80%的时候,受到的伤害-50%; 当“能量”≥50%的时候,受到的伤害-30%"
|
|
700
700
|
},
|
|
701
701
|
"电能立场": {
|
|
702
702
|
effect: 0,
|
|
703
|
-
description: "
|
|
703
|
+
description: "当“能量”≥10%的时候,每次受到攻击有55%的概率免疫此次伤害(无法免疫寒冷伤害); 每拥有一层“寒冷”则降低5%的概率"
|
|
704
704
|
},
|
|
705
705
|
"电能冲击波": {
|
|
706
706
|
effect: 0,
|
|
@@ -708,7 +708,7 @@ function apply(ctx, config) {
|
|
|
708
708
|
},
|
|
709
709
|
"脉冲": {
|
|
710
710
|
effect: 0,
|
|
711
|
-
description: "
|
|
711
|
+
description: "当“能量”≥80%的时候,每次受到攻击有60%的概率回复所有异形100点HP; 每拥有一层“寒冷”则降低5%的概率"
|
|
712
712
|
},
|
|
713
713
|
"能量黑洞": {
|
|
714
714
|
effect: 0,
|
|
@@ -846,7 +846,7 @@ function apply(ctx, config) {
|
|
|
846
846
|
maxHP: 2e4,
|
|
847
847
|
energy: 1e3,
|
|
848
848
|
tags: asBossTags(["护盾", "灵能", "重型", "异形"]),
|
|
849
|
-
passive: asPassives(["超导体", "
|
|
849
|
+
passive: asPassives(["超导体", "能源虹吸", "电能冲击波", "电能立场", "脉冲", "能量黑洞"])
|
|
850
850
|
},
|
|
851
851
|
minions: [
|
|
852
852
|
{
|
|
@@ -1181,11 +1181,20 @@ function apply(ctx, config) {
|
|
|
1181
1181
|
"成人之美": {
|
|
1182
1182
|
id: 1,
|
|
1183
1183
|
type: "可重复任务",
|
|
1184
|
-
description: "
|
|
1184
|
+
description: "利用【伽马枪】武器对异形目标造成辐射伤害",
|
|
1185
1185
|
target: 2,
|
|
1186
1186
|
price: 50,
|
|
1187
1187
|
redCrystalCost: 0,
|
|
1188
1188
|
condition: "使用伽马枪攻击异形并成功使辐射层数+1"
|
|
1189
|
+
},
|
|
1190
|
+
"零度之下": {
|
|
1191
|
+
id: 2,
|
|
1192
|
+
type: "可重复任务",
|
|
1193
|
+
description: "利用【零度之下】武器对异形目标造成严寒伤害",
|
|
1194
|
+
target: 2,
|
|
1195
|
+
price: 100,
|
|
1196
|
+
redCrystalCost: 0,
|
|
1197
|
+
condition: "使用零度之下攻击异形并成功使寒冷层数+1"
|
|
1189
1198
|
}
|
|
1190
1199
|
};
|
|
1191
1200
|
async function calculateTotalDamage(ctx2, session, equippedWeapon, targetBoss, options) {
|
|
@@ -1918,6 +1927,7 @@ function apply(ctx, config) {
|
|
|
1918
1927
|
if (weaponName !== "零度之下" || !(targetBoss.skills.includes("电能导体") || targetBoss.skills.includes("超导体"))) {
|
|
1919
1928
|
return null;
|
|
1920
1929
|
}
|
|
1930
|
+
let freezing = false;
|
|
1921
1931
|
const currentFreezing = targetBoss.freezing || 0;
|
|
1922
1932
|
if (currentFreezing < 10) {
|
|
1923
1933
|
const newFreezing = currentFreezing + 1;
|
|
@@ -1926,8 +1936,10 @@ function apply(ctx, config) {
|
|
|
1926
1936
|
{ name: targetBoss.name },
|
|
1927
1937
|
{ freezing: newFreezing }
|
|
1928
1938
|
);
|
|
1939
|
+
freezing = true;
|
|
1929
1940
|
return {
|
|
1930
|
-
messages: [`❄️ ${targetBoss.name} 获得一层"寒冷"(当前 ${newFreezing}层)`]
|
|
1941
|
+
messages: [`❄️ ${targetBoss.name} 获得一层"寒冷"(当前 ${newFreezing}层)`],
|
|
1942
|
+
freezing
|
|
1931
1943
|
};
|
|
1932
1944
|
}
|
|
1933
1945
|
return null;
|
|
@@ -1938,7 +1950,7 @@ function apply(ctx, config) {
|
|
|
1938
1950
|
const isBelowThreshold = currentHP <= maxHP * triggerThreshold;
|
|
1939
1951
|
const hasShieldTag = targetBoss.tags.includes("护盾");
|
|
1940
1952
|
const alreadyHeavyArmor = targetBoss.tags.includes("重甲");
|
|
1941
|
-
if (!targetBoss.skills.includes("超导体")
|
|
1953
|
+
if (!targetBoss.skills.includes("超导体") && !targetBoss.skills.includes("电能导体")) return null;
|
|
1942
1954
|
if (isBelowThreshold && hasShieldTag && !alreadyHeavyArmor) {
|
|
1943
1955
|
const newTags = [
|
|
1944
1956
|
...targetBoss.tags.filter((tag) => tag !== "护盾"),
|
|
@@ -1959,9 +1971,9 @@ function apply(ctx, config) {
|
|
|
1959
1971
|
handleEnergySiphon: /* @__PURE__ */ __name((targetBoss, currentHP, maxHP) => {
|
|
1960
1972
|
if (!targetBoss.skills.includes("能量虹吸")) return null;
|
|
1961
1973
|
let reduction = 0;
|
|
1962
|
-
if (currentHP
|
|
1974
|
+
if (currentHP >= maxHP * 0.7) {
|
|
1963
1975
|
reduction = 0.4;
|
|
1964
|
-
} else if (currentHP
|
|
1976
|
+
} else if (currentHP >= maxHP * 0.3) {
|
|
1965
1977
|
reduction = 0.2;
|
|
1966
1978
|
}
|
|
1967
1979
|
if (reduction > 0) {
|
|
@@ -2032,7 +2044,7 @@ function apply(ctx, config) {
|
|
|
2032
2044
|
const currentFreezing = targetBoss.freezing || 0;
|
|
2033
2045
|
let immuneChance = 55 - currentFreezing * 5;
|
|
2034
2046
|
immuneChance = Math.max(immuneChance, 5);
|
|
2035
|
-
if (currentEnergy <
|
|
2047
|
+
if (currentEnergy < 100) {
|
|
2036
2048
|
return null;
|
|
2037
2049
|
}
|
|
2038
2050
|
const roll = Math.random() * 100;
|
|
@@ -2152,6 +2164,7 @@ function apply(ctx, config) {
|
|
|
2152
2164
|
let skillUpdates = [];
|
|
2153
2165
|
let totalMultiplier = 0;
|
|
2154
2166
|
let radiationApplied = false;
|
|
2167
|
+
let freezing = false;
|
|
2155
2168
|
const arcResult = await this.handleArcWelderEffect(ctx2, targetBoss, weaponName);
|
|
2156
2169
|
if (arcResult) {
|
|
2157
2170
|
messages.push(...arcResult.messages);
|
|
@@ -2291,6 +2304,7 @@ function apply(ctx, config) {
|
|
|
2291
2304
|
const freezingStackResult = await this.handleFreezingStack(ctx2, targetBoss, weaponName);
|
|
2292
2305
|
if (freezingStackResult) {
|
|
2293
2306
|
messages.push(...freezingStackResult.messages);
|
|
2307
|
+
freezing = freezingStackResult.freezing;
|
|
2294
2308
|
}
|
|
2295
2309
|
const tagChangeResult = await this.handleConductorTagChange(ctx2, targetBoss, currentHP, maxHP);
|
|
2296
2310
|
if (tagChangeResult) {
|
|
@@ -2311,8 +2325,9 @@ function apply(ctx, config) {
|
|
|
2311
2325
|
messages,
|
|
2312
2326
|
skillUpdates,
|
|
2313
2327
|
initialDamage: finalDamage,
|
|
2314
|
-
radiationApplied
|
|
2328
|
+
radiationApplied,
|
|
2315
2329
|
// 新增返回辐射应用标记
|
|
2330
|
+
freezing
|
|
2316
2331
|
};
|
|
2317
2332
|
}, "handlePassives"),
|
|
2318
2333
|
// 应用技能更新到数据库(优化合并同名boss的更新)
|
|
@@ -5213,6 +5228,7 @@ ${validTypes.join("、")}`;
|
|
|
5213
5228
|
let currentHP = targetBoss.HP - initialDamage;
|
|
5214
5229
|
let passiveMessages = [];
|
|
5215
5230
|
let radiationApplied = false;
|
|
5231
|
+
let freezing = false;
|
|
5216
5232
|
const passiveResult = await PassiveHandler.handlePassives(
|
|
5217
5233
|
ctx,
|
|
5218
5234
|
targetBoss,
|
|
@@ -5228,6 +5244,7 @@ ${validTypes.join("、")}`;
|
|
|
5228
5244
|
initialDamage = passiveResult.initialDamage;
|
|
5229
5245
|
passiveMessages.push(...passiveResult.messages);
|
|
5230
5246
|
radiationApplied = passiveResult.radiationApplied;
|
|
5247
|
+
freezing = passiveResult.freezing;
|
|
5231
5248
|
if (passiveResult.skillUpdates.length > 0) {
|
|
5232
5249
|
await PassiveHandler.applySkillUpdates(ctx, passiveResult.skillUpdates);
|
|
5233
5250
|
}
|
|
@@ -5257,6 +5274,17 @@ ${validTypes.join("、")}`;
|
|
|
5257
5274
|
progress: (RadiationRecord?.progress || 0) + 1
|
|
5258
5275
|
}], ["handle"]);
|
|
5259
5276
|
}
|
|
5277
|
+
if (freezing) {
|
|
5278
|
+
const [freezingRecord] = await ctx.database.get("ggcevo_task", {
|
|
5279
|
+
handle,
|
|
5280
|
+
taskId: 2
|
|
5281
|
+
});
|
|
5282
|
+
await ctx.database.upsert("ggcevo_task", [{
|
|
5283
|
+
handle,
|
|
5284
|
+
taskId: 2,
|
|
5285
|
+
progress: (freezingRecord?.progress || 0) + 1
|
|
5286
|
+
}], ["handle"]);
|
|
5287
|
+
}
|
|
5260
5288
|
if (isDefeated) {
|
|
5261
5289
|
if (targetBoss.type === "主宰") {
|
|
5262
5290
|
await ctx.database.set(
|
|
@@ -5518,7 +5546,7 @@ ${scatterEffectMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
5518
5546
|
`❤️ ${mainBossHpBar} (${mainBoss.HP}/${bossGroup.main.maxHP})`
|
|
5519
5547
|
];
|
|
5520
5548
|
if (bossGroup.main.energy > 0) {
|
|
5521
|
-
result.push(`⚡ 能量:${mainBoss.energy}`);
|
|
5549
|
+
result.push(`⚡ 能量:${mainBoss.energy}/1000`);
|
|
5522
5550
|
}
|
|
5523
5551
|
result.push(
|
|
5524
5552
|
`🏷️ 标签:${mainBoss.tags?.join("、") || "无"}`,
|
|
@@ -5544,7 +5572,7 @@ ${scatterEffectMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
5544
5572
|
`❤️ ${minionHpBar} (${minion.HP}/${minionConfig?.maxHP || "未知"})`
|
|
5545
5573
|
];
|
|
5546
5574
|
if (minionConfig && minionConfig.energy > 0) {
|
|
5547
|
-
minionInfo.push(`⚡ 能量:${minion.energy}`);
|
|
5575
|
+
minionInfo.push(`⚡ 能量:${minion.energy}/1000`);
|
|
5548
5576
|
}
|
|
5549
5577
|
minionInfo.push(
|
|
5550
5578
|
`🏷️ 标签:${minion.tags?.join("、") || "无"}`,
|