koishi-plugin-ggcevo-game 1.4.71 → 1.4.73
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/boss/BattleEffectProcessor.d.ts +10 -7
- package/lib/index.js +56 -28
- package/package.json +1 -1
|
@@ -493,8 +493,13 @@ export declare const BattleEffectProcessor: {
|
|
|
493
493
|
} | null;
|
|
494
494
|
} | null;
|
|
495
495
|
handleHiveMind: (targetBoss: any, activeBosses: any[], nestlingNames?: string[]) => {
|
|
496
|
+
buffMultiplier: number;
|
|
497
|
+
messages: string[];
|
|
498
|
+
nerfMultiplier?: undefined;
|
|
499
|
+
} | {
|
|
496
500
|
nerfMultiplier: number;
|
|
497
501
|
messages: string[];
|
|
502
|
+
buffMultiplier?: undefined;
|
|
498
503
|
};
|
|
499
504
|
handleBurrowAmbush: (targetBoss: any, nestlingNames?: string[]) => {
|
|
500
505
|
messages: string[];
|
|
@@ -508,16 +513,14 @@ export declare const BattleEffectProcessor: {
|
|
|
508
513
|
handleHealingSwarm: (targetBoss: any, activeBosses: any[]) => {
|
|
509
514
|
messages: string[];
|
|
510
515
|
targetUpdates: {
|
|
511
|
-
name:
|
|
512
|
-
updates:
|
|
513
|
-
hpChange: number;
|
|
514
|
-
};
|
|
516
|
+
name: string;
|
|
517
|
+
updates: Partial<BattleStatistics>;
|
|
515
518
|
};
|
|
516
|
-
otherUpdates: {
|
|
519
|
+
otherUpdates: Array<{
|
|
517
520
|
name: string;
|
|
518
521
|
updates: Partial<BattleStatistics>;
|
|
519
|
-
}
|
|
520
|
-
};
|
|
522
|
+
}>;
|
|
523
|
+
} | null;
|
|
521
524
|
handleReleasePheromones: (targetBoss: any) => {
|
|
522
525
|
messages: string[];
|
|
523
526
|
nerfMultiplier: number;
|
package/lib/index.js
CHANGED
|
@@ -3413,6 +3413,12 @@ var BattleEffectProcessor = {
|
|
|
3413
3413
|
}, "handleToxicAssault"),
|
|
3414
3414
|
// 虫巢思维 - 每有一只巢穴子代,减伤20%
|
|
3415
3415
|
handleHiveMind: /* @__PURE__ */ __name(function(targetBoss, activeBosses, nestlingNames = ["巢穴雷兽", "巢穴战士", "巢穴甲虫"]) {
|
|
3416
|
+
if (targetBoss.name.includes("巢穴雷兽") || targetBoss.name.includes("巢穴战士") || targetBoss.name.includes("巢穴甲虫")) {
|
|
3417
|
+
return {
|
|
3418
|
+
buffMultiplier: 0.2,
|
|
3419
|
+
messages: [`🐛 【虫巢思维】生效:受到的伤害+20%`]
|
|
3420
|
+
};
|
|
3421
|
+
}
|
|
3416
3422
|
if (!targetBoss.skills.includes("虫巢思维")) return null;
|
|
3417
3423
|
const livingNestlings = activeBosses.filter(
|
|
3418
3424
|
(boss) => boss.isActive && nestlingNames.includes(boss.name)
|
|
@@ -3461,39 +3467,52 @@ var BattleEffectProcessor = {
|
|
|
3461
3467
|
}
|
|
3462
3468
|
return effect;
|
|
3463
3469
|
}, "handleWeakeningSpit"),
|
|
3464
|
-
// 治愈虫群 - 血量低于30%时,自身回复40%生命值,所有异形回复10%生命值
|
|
3465
3470
|
handleHealingSwarm: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
3466
|
-
if (!targetBoss.skills.includes("治愈虫群"))
|
|
3471
|
+
if (!targetBoss.skills.includes("治愈虫群")) {
|
|
3472
|
+
return null;
|
|
3473
|
+
}
|
|
3467
3474
|
const maxHP = getMaxHPByName(targetBoss.name);
|
|
3468
|
-
const
|
|
3469
|
-
|
|
3470
|
-
if (hpPercent
|
|
3471
|
-
|
|
3472
|
-
|
|
3475
|
+
const currentHP = targetBoss.HP;
|
|
3476
|
+
const hpPercent = currentHP / maxHP;
|
|
3477
|
+
if (hpPercent > 0.3) {
|
|
3478
|
+
return null;
|
|
3479
|
+
}
|
|
3480
|
+
const messages = [];
|
|
3473
3481
|
const otherUpdates = [];
|
|
3474
|
-
const
|
|
3475
|
-
|
|
3476
|
-
|
|
3482
|
+
const selfHealAmount = Math.round(maxHP * 0.4);
|
|
3483
|
+
messages.push(`💫 【治愈虫群】触发:生命值≤30%,自身回复${selfHealAmount}点生命值`);
|
|
3484
|
+
messages.push(`💫 【治愈虫群】技能移除`);
|
|
3485
|
+
const targetUpdates = {
|
|
3486
|
+
name: targetBoss.name,
|
|
3487
|
+
updates: {
|
|
3488
|
+
hpChange: selfHealAmount,
|
|
3489
|
+
skillsRemoved: ["治愈虫群"]
|
|
3490
|
+
// 移除技能
|
|
3491
|
+
}
|
|
3492
|
+
};
|
|
3493
|
+
const otherSurvivingBosses = activeBosses.filter(
|
|
3494
|
+
(boss) => boss.isActive && boss.name !== targetBoss.name
|
|
3495
|
+
);
|
|
3496
|
+
otherSurvivingBosses.forEach((otherBoss) => {
|
|
3497
|
+
const otherMaxHP = getMaxHPByName(otherBoss.name);
|
|
3498
|
+
const healAmount = Math.round(otherMaxHP * 0.1);
|
|
3477
3499
|
if (healAmount > 0) {
|
|
3478
3500
|
otherUpdates.push({
|
|
3479
|
-
name:
|
|
3501
|
+
name: otherBoss.name,
|
|
3480
3502
|
updates: { hpChange: healAmount }
|
|
3481
3503
|
});
|
|
3482
|
-
messages.push(`💫 「${
|
|
3504
|
+
messages.push(`💫 「${otherBoss.name}」回复${healAmount}点生命值`);
|
|
3483
3505
|
}
|
|
3484
3506
|
});
|
|
3485
3507
|
return {
|
|
3486
3508
|
messages,
|
|
3487
|
-
targetUpdates
|
|
3488
|
-
name: targetBoss.name,
|
|
3489
|
-
updates: { hpChange: selfHealAmount }
|
|
3490
|
-
},
|
|
3509
|
+
targetUpdates,
|
|
3491
3510
|
otherUpdates
|
|
3492
3511
|
};
|
|
3493
3512
|
}, "handleHealingSwarm"),
|
|
3494
3513
|
// 释放信息素 - 所有存活巢穴子代减伤20%
|
|
3495
3514
|
handleReleasePheromones: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3496
|
-
if (!targetBoss.name.includes("巢穴雷兽") && !targetBoss.name.includes("巢穴战士") && !targetBoss.name.includes("巢穴甲虫")) return null;
|
|
3515
|
+
if (!targetBoss.name.includes("巢穴雷兽") && !targetBoss.name.includes("巢穴战士") && !targetBoss.name.includes("巢穴甲虫") && !targetBoss.name.includes("孵化场")) return null;
|
|
3497
3516
|
const messages = [`🌬️ 【释放信息素】生效:所有巢穴子代受到的伤害-20%`];
|
|
3498
3517
|
const nerfMultiplier = 0.2;
|
|
3499
3518
|
return { messages, nerfMultiplier };
|
|
@@ -3585,6 +3604,7 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
|
|
|
3585
3604
|
let layerReduced = false;
|
|
3586
3605
|
let bileDetonationTrigger = false;
|
|
3587
3606
|
let spawnNewBossMarks = [];
|
|
3607
|
+
let armor = 0;
|
|
3588
3608
|
const weaponData = weaponConfig[weaponName] || { type: "" };
|
|
3589
3609
|
let doubleAstralWind = false;
|
|
3590
3610
|
let isolatedImmunityMark = false;
|
|
@@ -3862,7 +3882,11 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
|
|
|
3862
3882
|
if (careerData?.career === "猩红杀手" && weaponName === "侦察步枪") {
|
|
3863
3883
|
armorDamageReduction = 1;
|
|
3864
3884
|
}
|
|
3865
|
-
|
|
3885
|
+
armor = getArmorByName(targetBoss.name);
|
|
3886
|
+
if (targetBoss.name === "测试假人") {
|
|
3887
|
+
armor = targetBoss.armor;
|
|
3888
|
+
}
|
|
3889
|
+
const armorReduction = armorDamageReduction * armor;
|
|
3866
3890
|
finalDamage = Math.max(Math.round(finalDamage - armorReduction), 1);
|
|
3867
3891
|
const frostEvolutionResult = BattleEffectProcessor.handleFrostEvolution(
|
|
3868
3892
|
targetBoss,
|
|
@@ -4179,7 +4203,7 @@ var passiveConfig = {
|
|
|
4179
4203
|
},
|
|
4180
4204
|
"虫巢思维": {
|
|
4181
4205
|
type: "",
|
|
4182
|
-
description: "每有一只巢穴子代,则受到的伤害降低20%"
|
|
4206
|
+
description: "每有一只巢穴子代,则受到的伤害降低20%;巢穴子代受到的伤害提高20%"
|
|
4183
4207
|
},
|
|
4184
4208
|
"爆虫伏击": {
|
|
4185
4209
|
type: "",
|
|
@@ -4187,15 +4211,15 @@ var passiveConfig = {
|
|
|
4187
4211
|
},
|
|
4188
4212
|
"虚弱喷吐": {
|
|
4189
4213
|
type: "",
|
|
4190
|
-
description: "
|
|
4214
|
+
description: "当孵化场存活时,受到的伤害降低80%;孵化场死亡时,受到的伤害提高20%"
|
|
4191
4215
|
},
|
|
4192
4216
|
"治愈虫群": {
|
|
4193
4217
|
type: "",
|
|
4194
|
-
description: "血量低于30%时,立即回复自身40%点生命值,同时回复所有存活异形10
|
|
4218
|
+
description: "血量低于30%时,立即回复自身40%点生命值,同时回复所有存活异形10%点生命值(生效后移除)"
|
|
4195
4219
|
},
|
|
4196
4220
|
"释放信息素": {
|
|
4197
4221
|
type: "",
|
|
4198
|
-
description: "
|
|
4222
|
+
description: "所有存活的其他异形受到的伤害降低20%"
|
|
4199
4223
|
},
|
|
4200
4224
|
"恐吓尖啸": {
|
|
4201
4225
|
type: "",
|
|
@@ -5123,13 +5147,17 @@ __name(calculateRankAdditive, "calculateRankAdditive");
|
|
|
5123
5147
|
async function getCleanerRewardBroadcast(ctx, boss, killerHandle, killerName) {
|
|
5124
5148
|
const bossType = boss.type;
|
|
5125
5149
|
const bossName = boss.name;
|
|
5126
|
-
|
|
5150
|
+
let baseReward = 0;
|
|
5151
|
+
if (["巢穴雷兽", "巢穴战士", "巢穴甲虫"].includes(bossName)) {
|
|
5152
|
+
baseReward = 2;
|
|
5153
|
+
} else {
|
|
5154
|
+
baseReward = bossType === "主宰" ? 10 : 5;
|
|
5155
|
+
}
|
|
5127
5156
|
const allCleaners = await ctx.database.get("ggcevo_careers", {
|
|
5128
5157
|
career: "清洁工"
|
|
5129
5158
|
});
|
|
5130
5159
|
if (!allCleaners.length) return [];
|
|
5131
5160
|
let killerBonus = false;
|
|
5132
|
-
let killerBonusMessage = "";
|
|
5133
5161
|
for (const cleaner of allCleaners) {
|
|
5134
5162
|
let rewardAmount = baseReward;
|
|
5135
5163
|
if (cleaner.handle === killerHandle) {
|
|
@@ -5141,7 +5169,7 @@ async function getCleanerRewardBroadcast(ctx, boss, killerHandle, killerName) {
|
|
|
5141
5169
|
redcrystal: (cleaner.redcrystal || 0) + rewardAmount
|
|
5142
5170
|
}], ["handle"]);
|
|
5143
5171
|
}
|
|
5144
|
-
const rewardMessage = `🧹 清洁工职业因清理 ${bossName} 获得 ${baseReward} 红晶${killerBonus ? ` (
|
|
5172
|
+
const rewardMessage = `🧹 清洁工职业因清理 ${bossName} 获得 ${baseReward} 红晶${killerBonus ? ` (击杀者 ${killerName} 获得双倍)` : ""}`;
|
|
5145
5173
|
return [rewardMessage];
|
|
5146
5174
|
}
|
|
5147
5175
|
__name(getCleanerRewardBroadcast, "getCleanerRewardBroadcast");
|
|
@@ -8502,7 +8530,7 @@ ${testResult.ignoreMessage.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
8502
8530
|
${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
8503
8531
|
] : [],
|
|
8504
8532
|
`📊 理论伤害值:${testResult.initialDamage}${testResult.hasCrit ? "(✨ 暴击)" : ""}`,
|
|
8505
|
-
"💡 参数添加:可添加标签(-t)、被动(-p)、血量(-l)、能量(-e)",
|
|
8533
|
+
"💡 参数添加:可添加标签(-t)、被动(-p)、血量(-l)、能量(-e)、护甲(-d)",
|
|
8506
8534
|
"💡 层数选项:技能层数(-s)、辐射层数(-r)、寒冷层数(-c)、状态层数(-a)"
|
|
8507
8535
|
].filter((line) => line).join("\n");
|
|
8508
8536
|
} finally {
|
|
@@ -8643,10 +8671,10 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
8643
8671
|
minionInfo.push(`☠️ 剧毒突袭:${minion.statusLayers}层`);
|
|
8644
8672
|
}
|
|
8645
8673
|
if (minion.skills.includes("恐吓尖啸")) {
|
|
8646
|
-
minionInfo.push(`😱 恐吓尖啸:${
|
|
8674
|
+
minionInfo.push(`😱 恐吓尖啸:${minion.statusLayers}层`);
|
|
8647
8675
|
}
|
|
8648
8676
|
if (minion.skills.includes("孵化")) {
|
|
8649
|
-
minionInfo.push(`🥚 孵化:${
|
|
8677
|
+
minionInfo.push(`🥚 孵化:${minion.statusLayers}层`);
|
|
8650
8678
|
}
|
|
8651
8679
|
if (minion.skills.includes("酸蚀池")) {
|
|
8652
8680
|
let acidText;
|