koishi-plugin-ggcevo-game 1.3.38 → 1.3.40
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 +67 -13
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -417,7 +417,7 @@ function apply(ctx, config) {
|
|
|
417
417
|
type: "能量武器",
|
|
418
418
|
damage: 25,
|
|
419
419
|
description: "一种经过改造的电动工具,可对近距离的目标放出高压电",
|
|
420
|
-
specialeffect: "",
|
|
420
|
+
specialeffect: "攻击拥有能量的目标将会消耗其100点能量",
|
|
421
421
|
price: 750,
|
|
422
422
|
redCrystalCost: 10,
|
|
423
423
|
isantiair: true,
|
|
@@ -457,7 +457,7 @@ function apply(ctx, config) {
|
|
|
457
457
|
type: "能量武器",
|
|
458
458
|
damage: 30,
|
|
459
459
|
description: "面对护盾目标而开发的武器",
|
|
460
|
-
specialeffect: "",
|
|
460
|
+
specialeffect: "攻击护盾目标,无视其50%的减伤效果",
|
|
461
461
|
price: 1050,
|
|
462
462
|
redCrystalCost: 15,
|
|
463
463
|
isantiair: true,
|
|
@@ -499,7 +499,7 @@ function apply(ctx, config) {
|
|
|
499
499
|
description: "电磁脉冲干扰机械目标和灵能目标",
|
|
500
500
|
price: 75,
|
|
501
501
|
redCrystalCost: 0,
|
|
502
|
-
effects: "对目标使用后,消耗其
|
|
502
|
+
effects: "对目标使用后,消耗其500点能量"
|
|
503
503
|
}
|
|
504
504
|
};
|
|
505
505
|
const modConfig = {
|
|
@@ -694,6 +694,10 @@ function apply(ctx, config) {
|
|
|
694
694
|
effect: 0,
|
|
695
695
|
description: "当血量大于70%的时候,受到的伤害-40%; 当血量大于30%的时候,受到的伤害-20%"
|
|
696
696
|
},
|
|
697
|
+
"能源虹吸": {
|
|
698
|
+
effect: 0,
|
|
699
|
+
description: "拥有独特的“能量”机制。当“能量”大于80%的时候,受到的伤害-50%; 当“能量”大于50%的时候,受到的伤害-30%"
|
|
700
|
+
},
|
|
697
701
|
"电能立场": {
|
|
698
702
|
effect: 0,
|
|
699
703
|
description: "当“能量”大于20%的时候,每次受到攻击有55%的概率免疫此次伤害(无法免疫寒冷伤害); 每拥有一层“寒冷”则降低5%的概率"
|
|
@@ -702,10 +706,6 @@ function apply(ctx, config) {
|
|
|
702
706
|
effect: 0,
|
|
703
707
|
description: "每次受到攻击时,自身回复100点“能量”"
|
|
704
708
|
},
|
|
705
|
-
"能源虹吸": {
|
|
706
|
-
effect: 0,
|
|
707
|
-
description: "拥有独特的“能量”机制。当“能量”大于80%的时候,受到的伤害-50%; 当“能量”大于50%的时候,受到的伤害-30%"
|
|
708
|
-
},
|
|
709
709
|
"脉冲": {
|
|
710
710
|
effect: 0,
|
|
711
711
|
description: "当“能量”大于80%的时候,每次受到攻击有60%的概率回复所有异形100点HP; 每拥有一层“寒冷”则降低5%的概率"
|
|
@@ -2106,12 +2106,56 @@ function apply(ctx, config) {
|
|
|
2106
2106
|
}
|
|
2107
2107
|
return null;
|
|
2108
2108
|
}, "handlePulse"),
|
|
2109
|
+
// 处理弧焊枪的能量消耗
|
|
2110
|
+
handleArcWelderEffect: /* @__PURE__ */ __name(async (ctx2, targetBoss, weaponName) => {
|
|
2111
|
+
if (weaponName !== "弧焊枪") return null;
|
|
2112
|
+
const currentEnergy = targetBoss.energy || 0;
|
|
2113
|
+
const messages = [];
|
|
2114
|
+
if (currentEnergy > 0) {
|
|
2115
|
+
const energyDrain = Math.min(100, currentEnergy);
|
|
2116
|
+
const newEnergy = currentEnergy - energyDrain;
|
|
2117
|
+
await ctx2.database.set(
|
|
2118
|
+
"ggcevo_boss",
|
|
2119
|
+
{ name: targetBoss.name },
|
|
2120
|
+
{ energy: newEnergy }
|
|
2121
|
+
);
|
|
2122
|
+
messages.push(`⚡ 【电弧焊接】生效:消耗目标${energyDrain}点能量`);
|
|
2123
|
+
} else {
|
|
2124
|
+
return null;
|
|
2125
|
+
}
|
|
2126
|
+
return { messages };
|
|
2127
|
+
}, "handleArcWelderEffect"),
|
|
2128
|
+
// 处理粒子相位枪的无视减伤效果
|
|
2129
|
+
handleParticlePhaseEffect: /* @__PURE__ */ __name((targetBoss, weaponName, totalMultiplier) => {
|
|
2130
|
+
if (weaponName !== "粒子相位枪" || totalMultiplier >= 0) return null;
|
|
2131
|
+
const messages = [];
|
|
2132
|
+
const hasShieldTag = targetBoss.tags.includes("护盾");
|
|
2133
|
+
if (hasShieldTag) {
|
|
2134
|
+
const originalReduction = Math.abs(totalMultiplier);
|
|
2135
|
+
const effectiveReduction = originalReduction * 0.5;
|
|
2136
|
+
const reducedMultiplier = -effectiveReduction;
|
|
2137
|
+
messages.push(
|
|
2138
|
+
`⚡ 【粒子相位】生效:护盾目标减伤效果减半`,
|
|
2139
|
+
`原减伤:${Math.round(originalReduction * 100)}% → 实际减伤:${Math.round(effectiveReduction * 100)}%`
|
|
2140
|
+
);
|
|
2141
|
+
return {
|
|
2142
|
+
damageMultiplier: reducedMultiplier,
|
|
2143
|
+
messages
|
|
2144
|
+
};
|
|
2145
|
+
} else {
|
|
2146
|
+
return null;
|
|
2147
|
+
}
|
|
2148
|
+
}, "handleParticlePhaseEffect"),
|
|
2109
2149
|
// 统一处理被动技能
|
|
2110
2150
|
handlePassives: /* @__PURE__ */ __name(async function(ctx2, targetBoss, initialDamage, currentHP, maxHP, weaponName, weaponData, activeBosses, bossGroup) {
|
|
2111
2151
|
let messages = [];
|
|
2112
2152
|
let skillUpdates = [];
|
|
2113
2153
|
let totalMultiplier = 0;
|
|
2114
2154
|
let radiationApplied = false;
|
|
2155
|
+
const arcResult = await this.handleArcWelderEffect(ctx2, targetBoss, weaponName);
|
|
2156
|
+
if (arcResult) {
|
|
2157
|
+
messages.push(...arcResult.messages);
|
|
2158
|
+
}
|
|
2115
2159
|
const frostEvoResult = this.handleFrostEvolution(targetBoss, weaponName, initialDamage, maxHP);
|
|
2116
2160
|
if (frostEvoResult) {
|
|
2117
2161
|
return {
|
|
@@ -2185,6 +2229,15 @@ function apply(ctx, config) {
|
|
|
2185
2229
|
totalMultiplier += radiationCalc.damageMultiplier;
|
|
2186
2230
|
messages.push(...radiationCalc.messages);
|
|
2187
2231
|
}
|
|
2232
|
+
const particleResult = this.handleParticlePhaseEffect(
|
|
2233
|
+
targetBoss,
|
|
2234
|
+
weaponName,
|
|
2235
|
+
totalMultiplier
|
|
2236
|
+
);
|
|
2237
|
+
if (particleResult) {
|
|
2238
|
+
totalMultiplier = particleResult.damageMultiplier;
|
|
2239
|
+
messages.push(...particleResult.messages);
|
|
2240
|
+
}
|
|
2188
2241
|
const originalMultiplier = totalMultiplier;
|
|
2189
2242
|
if (originalMultiplier < -1) {
|
|
2190
2243
|
messages.push(`⚠️ 触发伤害保底机制:强制造成1点伤害`);
|
|
@@ -2707,11 +2760,11 @@ function apply(ctx, config) {
|
|
|
2707
2760
|
success: false,
|
|
2708
2761
|
message: "您未选择合适的目标。"
|
|
2709
2762
|
};
|
|
2710
|
-
const targetboss = await ctx.database.get("ggcevo_boss", {
|
|
2763
|
+
const [targetboss] = await ctx.database.get("ggcevo_boss", {
|
|
2711
2764
|
name: target,
|
|
2712
2765
|
isActive: true
|
|
2713
2766
|
});
|
|
2714
|
-
if (!targetboss
|
|
2767
|
+
if (!targetboss || targetboss?.Skillcountpoints === 0 || targetboss?.tags.includes("建筑") || targetboss?.tags.includes("重型")) return {
|
|
2715
2768
|
success: false,
|
|
2716
2769
|
message: "您无法对目标使用。(目标已死亡/目标的技能计数为0/目标拥有“建筑”或“重型”标签)"
|
|
2717
2770
|
};
|
|
@@ -2736,22 +2789,23 @@ function apply(ctx, config) {
|
|
|
2736
2789
|
success: false,
|
|
2737
2790
|
message: "您未选择合适的目标。"
|
|
2738
2791
|
};
|
|
2739
|
-
const targetboss = await ctx.database.get("ggcevo_boss", {
|
|
2792
|
+
const [targetboss] = await ctx.database.get("ggcevo_boss", {
|
|
2740
2793
|
name: target,
|
|
2741
2794
|
isActive: true
|
|
2742
2795
|
});
|
|
2743
|
-
if (!targetboss
|
|
2796
|
+
if (!targetboss || targetboss?.energy === 0) return {
|
|
2744
2797
|
success: false,
|
|
2745
2798
|
message: "您无法对目标使用。(目标的能量为0)"
|
|
2746
2799
|
};
|
|
2747
2800
|
await ctx.database.set(
|
|
2748
2801
|
"ggcevo_boss",
|
|
2749
2802
|
{ name: target },
|
|
2750
|
-
{ energy: targetboss
|
|
2803
|
+
{ energy: Math.max(targetboss.energy - 500, 0) }
|
|
2804
|
+
// 确保不低于0
|
|
2751
2805
|
);
|
|
2752
2806
|
return {
|
|
2753
2807
|
success: true,
|
|
2754
|
-
message: `成功使用 ${itemName},消耗 ${target}
|
|
2808
|
+
message: `成功使用 ${itemName},消耗 ${target} 500点能量`
|
|
2755
2809
|
};
|
|
2756
2810
|
}
|
|
2757
2811
|
return {
|