koishi-plugin-ggcevo-game 1.4.28 → 1.4.30
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/boss.d.ts +2 -2
- package/lib/boss/passive.d.ts +8 -8
- package/lib/boss/passivehandler.d.ts +5 -3
- package/lib/index.js +135 -137
- package/package.json +1 -1
package/lib/boss/boss.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export declare const bossPool: readonly [{
|
|
|
39
39
|
maxHP: number;
|
|
40
40
|
energy: number;
|
|
41
41
|
tags: ("重甲" | "生物" | "惧热" | "异形" | "重型")[];
|
|
42
|
-
passive: ("
|
|
42
|
+
passive: ("冰霜环绕" | "冰霜进化")[];
|
|
43
43
|
};
|
|
44
44
|
minions: {
|
|
45
45
|
name: string;
|
|
@@ -47,7 +47,7 @@ export declare const bossPool: readonly [{
|
|
|
47
47
|
maxHP: number;
|
|
48
48
|
energy: number;
|
|
49
49
|
tags: ("生物" | "惧热" | "异形")[];
|
|
50
|
-
passive: ("
|
|
50
|
+
passive: ("冰霜回复" | "弱化形态" | "冰霜进化")[];
|
|
51
51
|
}[];
|
|
52
52
|
}, {
|
|
53
53
|
main: {
|
package/lib/boss/passive.d.ts
CHANGED
|
@@ -129,11 +129,11 @@ export declare const passiveConfig: {
|
|
|
129
129
|
};
|
|
130
130
|
readonly 腐蚀胆汁: {
|
|
131
131
|
readonly effect: 0;
|
|
132
|
-
readonly description: "当“胆汁”达到10
|
|
132
|
+
readonly description: "当“胆汁”达到10层后,下一次受到攻击将回复所有存活异形1000点血量并清空层数";
|
|
133
133
|
};
|
|
134
134
|
readonly 火焰吐息: {
|
|
135
135
|
readonly effect: 0;
|
|
136
|
-
readonly description: "当“胆汁”达到20
|
|
136
|
+
readonly description: "当“胆汁”达到20层后,下一次攻击将回复所有存活异形50%的最大生命值并清空层数";
|
|
137
137
|
};
|
|
138
138
|
readonly 太阳耀斑: {
|
|
139
139
|
readonly effect: 0;
|
|
@@ -173,11 +173,11 @@ export declare const passiveConfig: {
|
|
|
173
173
|
};
|
|
174
174
|
readonly 宇宙能量: {
|
|
175
175
|
readonly effect: 0;
|
|
176
|
-
readonly description: "受到攻击时回复与该攻击伤害等额的“能量”;
|
|
176
|
+
readonly description: "受到攻击时回复与该攻击伤害等额的“能量”; 若“能量”已满,则回复溢出伤害值的血量";
|
|
177
177
|
};
|
|
178
178
|
readonly 复苏: {
|
|
179
179
|
readonly effect: 0;
|
|
180
|
-
readonly description: "受到致命伤害时,免于死亡,快速回复自身
|
|
180
|
+
readonly description: "受到致命伤害时,免于死亡,快速回复自身50%的最大生命值和100%的“能量”,并且获得“灵能构造炉”技能(触发后移除)";
|
|
181
181
|
};
|
|
182
182
|
readonly 光影之刃: {
|
|
183
183
|
readonly effect: 0;
|
|
@@ -197,11 +197,11 @@ export declare const passiveConfig: {
|
|
|
197
197
|
};
|
|
198
198
|
readonly 灵能构造炉: {
|
|
199
199
|
readonly effect: 0;
|
|
200
|
-
readonly description: "受到攻击后,有
|
|
200
|
+
readonly description: "受到攻击后,有1%的概率会随机获得以下4个技能之一(天启超载护盾,塌缩脉冲,地毯式轰炸,轰炸引导)";
|
|
201
201
|
};
|
|
202
202
|
readonly 天启超载护盾: {
|
|
203
203
|
readonly effect: 0;
|
|
204
|
-
readonly description: "受到伤害后,有
|
|
204
|
+
readonly description: "受到伤害后,有5%的概率回复所有存活异形X点血量(X为“光影之刃”层数 x 10)";
|
|
205
205
|
};
|
|
206
206
|
readonly 塌缩脉冲: {
|
|
207
207
|
readonly effect: 0;
|
|
@@ -209,10 +209,10 @@ export declare const passiveConfig: {
|
|
|
209
209
|
};
|
|
210
210
|
readonly 地毯式轰炸: {
|
|
211
211
|
readonly effect: 0;
|
|
212
|
-
readonly description: "我心中的怒火胜过千万个太阳!移除自身的“孤立无援”,并使受到的伤害-
|
|
212
|
+
readonly description: "我心中的怒火胜过千万个太阳!移除自身的“孤立无援”,并使受到的伤害-100%";
|
|
213
213
|
};
|
|
214
214
|
readonly 轰炸引导: {
|
|
215
215
|
readonly effect: 0;
|
|
216
|
-
readonly description: "受到伤害后,有10%的概率概率回复自身X点“能量”(X为“光影之刃”层数 x
|
|
216
|
+
readonly description: "受到伤害后,有10%的概率概率回复自身X点“能量”(X为“光影之刃”层数 x 50)";
|
|
217
217
|
};
|
|
218
218
|
};
|
|
@@ -38,7 +38,7 @@ export declare const PassiveHandler: {
|
|
|
38
38
|
messages: string[];
|
|
39
39
|
skillUpdates: {
|
|
40
40
|
name: any;
|
|
41
|
-
remove: ("
|
|
41
|
+
remove: ("冰霜环绕" | "寒霜地狱" | "冰霜回复" | "弱化形态" | "异形甲壳" | "孤立无援" | "冰霜进化" | "应激甲壳I" | "应激甲壳II" | "求生本能I" | "求生本能II" | "冷适应" | "感染空间站" | "病毒云" | "霉菌滋生" | "岗哨机枪" | "结构装甲" | "吸血唾液" | "进食" | "嗜血狂暴" | "吐血" | "电能导体" | "超导体" | "能量虹吸" | "能源虹吸" | "电能立场" | "电能冲击波" | "脉冲" | "能量黑洞" | "火焰异形" | "庞兽狂暴" | "灼烧粘液" | "腐蚀胆汁" | "火焰吐息" | "太阳耀斑" | "燃烧潜地" | "炼狱爆弹" | "猎手异形" | "狂暴" | "伪装" | "致命一击" | "星界之风" | "心灵狂热" | "宇宙能量" | "复苏" | "光影之刃" | "远古预兆" | "闪电冲锋" | "超视距穿梭" | "灵能构造炉" | "天启超载护盾" | "塌缩脉冲" | "地毯式轰炸" | "轰炸引导")[];
|
|
42
42
|
}[];
|
|
43
43
|
};
|
|
44
44
|
handleInfectedStation: (ctx: Context, targetBoss: any) => Promise<{
|
|
@@ -182,8 +182,9 @@ export declare const PassiveHandler: {
|
|
|
182
182
|
handlePulseDisruptor: (ctx: Context, targetBoss: any, weaponName: string) => Promise<{
|
|
183
183
|
messages: string[];
|
|
184
184
|
}>;
|
|
185
|
-
handleStellarWind: (ctx: Context, targetBoss: any, initialDamage: number, maxHP: number, activeBosses: any[], bossGroup: BossPoolItem) => Promise<{
|
|
185
|
+
handleStellarWind: (ctx: Context, targetBoss: any, initialDamage: number, currentHP: number, maxHP: number, activeBosses: any[], bossGroup: BossPoolItem) => Promise<{
|
|
186
186
|
messages: string[];
|
|
187
|
+
updatedHP: number;
|
|
187
188
|
}>;
|
|
188
189
|
handlePsychicFrenzy: (targetBoss: any, currentHP: number, maxHP: number) => {
|
|
189
190
|
damageMultiplier: number;
|
|
@@ -212,8 +213,9 @@ export declare const PassiveHandler: {
|
|
|
212
213
|
handleConstructor: (ctx: Context, targetBoss: any) => Promise<{
|
|
213
214
|
messages: string[];
|
|
214
215
|
}>;
|
|
215
|
-
handleTyrsShield: (ctx: Context, targetBoss: any, activeBosses: any[], bossGroup: BossPoolItem) => Promise<{
|
|
216
|
+
handleTyrsShield: (ctx: Context, targetBoss: any, currentHP: number, activeBosses: any[], bossGroup: BossPoolItem) => Promise<{
|
|
216
217
|
messages: string[];
|
|
218
|
+
updatedHP: number;
|
|
217
219
|
}>;
|
|
218
220
|
handleCollapsePulse: (ctx: Context, targetBoss: any) => Promise<{
|
|
219
221
|
messages: string[];
|
package/lib/index.js
CHANGED
|
@@ -237,7 +237,7 @@ var weaponConfig = {
|
|
|
237
237
|
category: "能量武器",
|
|
238
238
|
damage: 32,
|
|
239
239
|
description: "一种原型能量武器,能够发射强大的脉冲",
|
|
240
|
-
specialeffect: "
|
|
240
|
+
specialeffect: "攻击使目标的技能层数减少2层",
|
|
241
241
|
price: 1500,
|
|
242
242
|
redCrystalCost: 15,
|
|
243
243
|
isantiair: true,
|
|
@@ -250,7 +250,7 @@ var weaponConfig = {
|
|
|
250
250
|
damage: 88,
|
|
251
251
|
description: "一件传奇武器",
|
|
252
252
|
specialeffect: "",
|
|
253
|
-
price:
|
|
253
|
+
price: 6400,
|
|
254
254
|
redCrystalCost: 150,
|
|
255
255
|
isantiair: true,
|
|
256
256
|
tagEffects: {
|
|
@@ -266,7 +266,7 @@ var weaponConfig = {
|
|
|
266
266
|
damage: 70,
|
|
267
267
|
description: "一件传奇武器",
|
|
268
268
|
specialeffect: "攻击暴击率+80%",
|
|
269
|
-
price:
|
|
269
|
+
price: 6400,
|
|
270
270
|
redCrystalCost: 150,
|
|
271
271
|
isantiair: true,
|
|
272
272
|
tagEffects: {
|
|
@@ -280,7 +280,7 @@ var weaponConfig = {
|
|
|
280
280
|
damage: 80,
|
|
281
281
|
description: "这是传说中的武器",
|
|
282
282
|
specialeffect: "",
|
|
283
|
-
price:
|
|
283
|
+
price: 6400,
|
|
284
284
|
redCrystalCost: 150,
|
|
285
285
|
isantiair: false,
|
|
286
286
|
tagEffects: {
|
|
@@ -295,7 +295,7 @@ var weaponConfig = {
|
|
|
295
295
|
damage: 120,
|
|
296
296
|
description: "一件传奇武器",
|
|
297
297
|
specialeffect: "",
|
|
298
|
-
price:
|
|
298
|
+
price: 6400,
|
|
299
299
|
redCrystalCost: 150,
|
|
300
300
|
isantiair: true,
|
|
301
301
|
tagEffects: {
|
|
@@ -309,7 +309,7 @@ var weaponConfig = {
|
|
|
309
309
|
damage: 100,
|
|
310
310
|
description: "优雅而独特的武器",
|
|
311
311
|
specialeffect: "无视目标100%的减伤效果",
|
|
312
|
-
price:
|
|
312
|
+
price: 6400,
|
|
313
313
|
redCrystalCost: 150,
|
|
314
314
|
isantiair: false,
|
|
315
315
|
tagEffects: {}
|
|
@@ -321,7 +321,7 @@ var weaponConfig = {
|
|
|
321
321
|
damage: 100,
|
|
322
322
|
description: "一件传奇武器",
|
|
323
323
|
specialeffect: "攻击消耗目标500点能量",
|
|
324
|
-
price:
|
|
324
|
+
price: 6400,
|
|
325
325
|
redCrystalCost: 150,
|
|
326
326
|
isantiair: true,
|
|
327
327
|
tagEffects: {
|
|
@@ -335,7 +335,7 @@ var weaponConfig = {
|
|
|
335
335
|
damage: 60,
|
|
336
336
|
description: "一件传奇武器",
|
|
337
337
|
specialeffect: "攻击无视目标80%的减伤效果",
|
|
338
|
-
price:
|
|
338
|
+
price: 6400,
|
|
339
339
|
redCrystalCost: 150,
|
|
340
340
|
isantiair: true,
|
|
341
341
|
tagEffects: {
|
|
@@ -349,7 +349,7 @@ var weaponConfig = {
|
|
|
349
349
|
damage: 90,
|
|
350
350
|
description: "一件传奇武器",
|
|
351
351
|
specialeffect: "",
|
|
352
|
-
price:
|
|
352
|
+
price: 6400,
|
|
353
353
|
redCrystalCost: 150,
|
|
354
354
|
isantiair: true,
|
|
355
355
|
tagEffects: {
|
|
@@ -553,10 +553,10 @@ var spaceStationCrewConfig = [
|
|
|
553
553
|
},
|
|
554
554
|
{
|
|
555
555
|
professionName: "武器中士",
|
|
556
|
-
effect: "攻击伤害+15%;
|
|
556
|
+
effect: "攻击伤害+15%; 购买武器享有50%的折扣",
|
|
557
557
|
requirements: "当期伤害榜累计造成100及以上伤害",
|
|
558
558
|
Jobtransfer: true,
|
|
559
|
-
costcoins:
|
|
559
|
+
costcoins: 3e3
|
|
560
560
|
},
|
|
561
561
|
{
|
|
562
562
|
professionName: "医疗专家",
|
|
@@ -1387,11 +1387,11 @@ var passiveConfig = {
|
|
|
1387
1387
|
},
|
|
1388
1388
|
"腐蚀胆汁": {
|
|
1389
1389
|
effect: 0,
|
|
1390
|
-
description: "当“胆汁”达到10
|
|
1390
|
+
description: "当“胆汁”达到10层后,下一次受到攻击将回复所有存活异形1000点血量并清空层数"
|
|
1391
1391
|
},
|
|
1392
1392
|
"火焰吐息": {
|
|
1393
1393
|
effect: 0,
|
|
1394
|
-
description: "当“胆汁”达到20
|
|
1394
|
+
description: "当“胆汁”达到20层后,下一次攻击将回复所有存活异形50%的最大生命值并清空层数"
|
|
1395
1395
|
},
|
|
1396
1396
|
"太阳耀斑": {
|
|
1397
1397
|
effect: 0,
|
|
@@ -1431,11 +1431,11 @@ var passiveConfig = {
|
|
|
1431
1431
|
},
|
|
1432
1432
|
"宇宙能量": {
|
|
1433
1433
|
effect: 0,
|
|
1434
|
-
description: "受到攻击时回复与该攻击伤害等额的“能量”;
|
|
1434
|
+
description: "受到攻击时回复与该攻击伤害等额的“能量”; 若“能量”已满,则回复溢出伤害值的血量"
|
|
1435
1435
|
},
|
|
1436
1436
|
"复苏": {
|
|
1437
1437
|
effect: 0,
|
|
1438
|
-
description: "受到致命伤害时,免于死亡,快速回复自身
|
|
1438
|
+
description: "受到致命伤害时,免于死亡,快速回复自身50%的最大生命值和100%的“能量”,并且获得“灵能构造炉”技能(触发后移除)"
|
|
1439
1439
|
},
|
|
1440
1440
|
"光影之刃": {
|
|
1441
1441
|
effect: 0,
|
|
@@ -1455,11 +1455,11 @@ var passiveConfig = {
|
|
|
1455
1455
|
},
|
|
1456
1456
|
"灵能构造炉": {
|
|
1457
1457
|
effect: 0,
|
|
1458
|
-
description: "受到攻击后,有
|
|
1458
|
+
description: "受到攻击后,有1%的概率会随机获得以下4个技能之一(天启超载护盾,塌缩脉冲,地毯式轰炸,轰炸引导)"
|
|
1459
1459
|
},
|
|
1460
1460
|
"天启超载护盾": {
|
|
1461
1461
|
effect: 0,
|
|
1462
|
-
description: "受到伤害后,有
|
|
1462
|
+
description: "受到伤害后,有5%的概率回复所有存活异形X点血量(X为“光影之刃”层数 x 10)"
|
|
1463
1463
|
},
|
|
1464
1464
|
"塌缩脉冲": {
|
|
1465
1465
|
effect: 0,
|
|
@@ -1467,11 +1467,11 @@ var passiveConfig = {
|
|
|
1467
1467
|
},
|
|
1468
1468
|
"地毯式轰炸": {
|
|
1469
1469
|
effect: 0,
|
|
1470
|
-
description: "我心中的怒火胜过千万个太阳!移除自身的“孤立无援”,并使受到的伤害-
|
|
1470
|
+
description: "我心中的怒火胜过千万个太阳!移除自身的“孤立无援”,并使受到的伤害-100%"
|
|
1471
1471
|
},
|
|
1472
1472
|
"轰炸引导": {
|
|
1473
1473
|
effect: 0,
|
|
1474
|
-
description: "受到伤害后,有10%的概率概率回复自身X点“能量”(X为“光影之刃”层数 x
|
|
1474
|
+
description: "受到伤害后,有10%的概率概率回复自身X点“能量”(X为“光影之刃”层数 x 50)"
|
|
1475
1475
|
}
|
|
1476
1476
|
};
|
|
1477
1477
|
|
|
@@ -2019,13 +2019,7 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
2019
2019
|
);
|
|
2020
2020
|
return {
|
|
2021
2021
|
success: true,
|
|
2022
|
-
message: `成功使用${itemName},使${target}
|
|
2023
|
-
};
|
|
2024
|
-
}
|
|
2025
|
-
if (itemConfig2.id === 3 || itemConfig2.id === 5) {
|
|
2026
|
-
return {
|
|
2027
|
-
success: false,
|
|
2028
|
-
message: `此物品无法使用。`
|
|
2022
|
+
message: `成功使用${itemName},使${target}的技能层数减少10层`
|
|
2029
2023
|
};
|
|
2030
2024
|
}
|
|
2031
2025
|
if (itemConfig2.id === 4) {
|
|
@@ -2049,7 +2043,7 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
2049
2043
|
);
|
|
2050
2044
|
return {
|
|
2051
2045
|
success: true,
|
|
2052
|
-
message: `成功使用${itemName},消耗${target}500
|
|
2046
|
+
message: `成功使用${itemName},消耗${target}500点能量`
|
|
2053
2047
|
};
|
|
2054
2048
|
}
|
|
2055
2049
|
return {
|
|
@@ -3072,7 +3066,7 @@ var PassiveHandler = {
|
|
|
3072
3066
|
{ Skillcountpoints: 0 }
|
|
3073
3067
|
);
|
|
3074
3068
|
const messages = [
|
|
3075
|
-
`🟢 【腐蚀胆汁】生效:消耗10层"胆汁"
|
|
3069
|
+
`🟢 【腐蚀胆汁】生效:消耗10层"胆汁",治疗所有存活异形`
|
|
3076
3070
|
];
|
|
3077
3071
|
const updates = [];
|
|
3078
3072
|
let updatedHP = currentHP;
|
|
@@ -3113,7 +3107,7 @@ var PassiveHandler = {
|
|
|
3113
3107
|
{ Skillcountpoints: 0 }
|
|
3114
3108
|
);
|
|
3115
3109
|
const messages = [
|
|
3116
|
-
`🐲 【火焰吐息】生效:消耗20层"胆汁"
|
|
3110
|
+
`🐲 【火焰吐息】生效:消耗20层"胆汁",治疗所有存活异形50%的最大生命值`
|
|
3117
3111
|
];
|
|
3118
3112
|
const updates = [];
|
|
3119
3113
|
let updatedHP = currentHP;
|
|
@@ -3389,7 +3383,7 @@ var PassiveHandler = {
|
|
|
3389
3383
|
};
|
|
3390
3384
|
}, "handlePulseDisruptor"),
|
|
3391
3385
|
// === 星界之风 ===
|
|
3392
|
-
handleStellarWind: /* @__PURE__ */ __name(async (ctx, targetBoss, initialDamage, maxHP, activeBosses, bossGroup) => {
|
|
3386
|
+
handleStellarWind: /* @__PURE__ */ __name(async (ctx, targetBoss, initialDamage, currentHP, maxHP, activeBosses, bossGroup) => {
|
|
3393
3387
|
if (!targetBoss.skills.includes("星界之风") || initialDamage === 0) return null;
|
|
3394
3388
|
let baseChance = 5;
|
|
3395
3389
|
const hasPsychicFrenzy = targetBoss.skills.includes("心灵狂热");
|
|
@@ -3407,12 +3401,16 @@ var PassiveHandler = {
|
|
|
3407
3401
|
(b) => b.groupId === targetBoss.groupId && b.HP > 0
|
|
3408
3402
|
);
|
|
3409
3403
|
const updates = [];
|
|
3410
|
-
const messages = [`🌠
|
|
3404
|
+
const messages = [`🌠 【星界之风】生效:治疗所有存活异形`];
|
|
3405
|
+
let updatedHP = currentHP;
|
|
3411
3406
|
for (const member of groupMembers) {
|
|
3412
|
-
const
|
|
3413
|
-
if (!
|
|
3407
|
+
const memberConfig = PassiveHandler.getMemberConfig(member.name, bossGroup);
|
|
3408
|
+
if (!memberConfig) continue;
|
|
3409
|
+
const maxMemberHP = memberConfig.maxHP;
|
|
3414
3410
|
const healAmount = 200;
|
|
3415
|
-
const
|
|
3411
|
+
const actualHeal = Math.min(healAmount, maxMemberHP - member.HP);
|
|
3412
|
+
if (actualHeal <= 0) continue;
|
|
3413
|
+
const newHP = member.HP + actualHeal;
|
|
3416
3414
|
updates.push(
|
|
3417
3415
|
ctx.database.set(
|
|
3418
3416
|
"ggcevo_boss",
|
|
@@ -3420,12 +3418,16 @@ var PassiveHandler = {
|
|
|
3420
3418
|
{ HP: newHP }
|
|
3421
3419
|
)
|
|
3422
3420
|
);
|
|
3423
|
-
messages.push(`${member.name} +${
|
|
3421
|
+
messages.push(`${member.name} +${actualHeal}HP`);
|
|
3422
|
+
if (member.name === targetBoss.name) {
|
|
3423
|
+
updatedHP = newHP;
|
|
3424
|
+
}
|
|
3424
3425
|
}
|
|
3425
|
-
if (
|
|
3426
|
+
if (updates.length === 0) {
|
|
3427
|
+
return null;
|
|
3426
3428
|
}
|
|
3427
3429
|
await Promise.all(updates);
|
|
3428
|
-
return { messages };
|
|
3430
|
+
return { messages, updatedHP };
|
|
3429
3431
|
}
|
|
3430
3432
|
return null;
|
|
3431
3433
|
}, "handleStellarWind"),
|
|
@@ -3454,7 +3456,7 @@ var PassiveHandler = {
|
|
|
3454
3456
|
let healAmount = 0;
|
|
3455
3457
|
let messages = [];
|
|
3456
3458
|
if (energyToAdd > 0) {
|
|
3457
|
-
messages.push(
|
|
3459
|
+
messages.push(`获得${energyToAdd}点能量`);
|
|
3458
3460
|
}
|
|
3459
3461
|
if (newEnergy >= maxEnergy) {
|
|
3460
3462
|
const overflow = initialDamage - energyToAdd;
|
|
@@ -3462,7 +3464,7 @@ var PassiveHandler = {
|
|
|
3462
3464
|
const maxHP = PassiveHandler.getMemberConfig(targetBoss.name, bossGroup)?.maxHP || 0;
|
|
3463
3465
|
if (maxHP > 0) {
|
|
3464
3466
|
healAmount = Math.min(overflow, maxHP - targetBoss.HP);
|
|
3465
|
-
messages.push(
|
|
3467
|
+
messages.push(`能量溢出回复${healAmount}点生命值`);
|
|
3466
3468
|
}
|
|
3467
3469
|
}
|
|
3468
3470
|
}
|
|
@@ -3527,30 +3529,23 @@ var PassiveHandler = {
|
|
|
3527
3529
|
const lightbladeStacks = targetBoss.Skillcountpoints || 0;
|
|
3528
3530
|
let reduction = 0;
|
|
3529
3531
|
let increase = 0;
|
|
3530
|
-
const
|
|
3531
|
-
if (currentEnergy >= maxEnergy * 0.3) {
|
|
3532
|
-
const baseReduction = lightbladeStacks * 0.05;
|
|
3533
|
-
reduction += baseReduction;
|
|
3534
|
-
effectParts.push(`能量≥30%:减伤${(baseReduction * 100).toFixed(0)}%`);
|
|
3535
|
-
if (currentEnergy >= maxEnergy * 0.6) {
|
|
3536
|
-
const bonusReduction = lightbladeStacks * 0.05;
|
|
3537
|
-
reduction += bonusReduction;
|
|
3538
|
-
effectParts.push(`能量≥60%:额外减伤${(bonusReduction * 100).toFixed(0)}%`);
|
|
3539
|
-
}
|
|
3540
|
-
}
|
|
3532
|
+
const messages = [];
|
|
3541
3533
|
if (currentEnergy <= maxEnergy * 0.1) {
|
|
3542
3534
|
increase = lightbladeStacks * 0.05;
|
|
3543
|
-
|
|
3535
|
+
messages.push(`能量≤10%:受到的伤害+${(increase * 100).toFixed(0)}%`);
|
|
3536
|
+
} else if (currentEnergy >= maxEnergy * 0.6) {
|
|
3537
|
+
reduction = lightbladeStacks * 0.1;
|
|
3538
|
+
messages.push(`能量≥60%:受到的伤害-${(reduction * 100).toFixed(0)}%`);
|
|
3539
|
+
} else if (currentEnergy >= maxEnergy * 0.3) {
|
|
3540
|
+
reduction = lightbladeStacks * 0.05;
|
|
3541
|
+
messages.push(`能量≥30%:受到的伤害-${(reduction * 100).toFixed(0)}%`);
|
|
3544
3542
|
}
|
|
3545
3543
|
if (reduction > 0 || increase > 0) {
|
|
3546
|
-
const effectDescription = effectParts.join(",");
|
|
3547
3544
|
return {
|
|
3548
3545
|
reduction,
|
|
3549
|
-
// 返沪减伤系数(正值)
|
|
3550
3546
|
increase,
|
|
3551
|
-
// 返沪增伤系数(正值)
|
|
3552
3547
|
messages: [
|
|
3553
|
-
`🚀 【超视距穿梭】生效:${
|
|
3548
|
+
`🚀 【超视距穿梭】生效:${messages.join(" | ")} (当前${lightbladeStacks}层光影之刃)`
|
|
3554
3549
|
]
|
|
3555
3550
|
};
|
|
3556
3551
|
}
|
|
@@ -3559,7 +3554,7 @@ var PassiveHandler = {
|
|
|
3559
3554
|
// === 复苏 ===
|
|
3560
3555
|
handleRevival: /* @__PURE__ */ __name(async function(ctx, targetBoss, currentHP, maxHP) {
|
|
3561
3556
|
if (!targetBoss.skills.includes("复苏") || currentHP > 0) return null;
|
|
3562
|
-
const updatedHP = maxHP;
|
|
3557
|
+
const updatedHP = maxHP * 0.5;
|
|
3563
3558
|
const maxEnergy = 1e3;
|
|
3564
3559
|
let newSkills = targetBoss.skills;
|
|
3565
3560
|
if (!newSkills.includes("灵能构造炉")) {
|
|
@@ -3578,7 +3573,7 @@ var PassiveHandler = {
|
|
|
3578
3573
|
return {
|
|
3579
3574
|
updatedHP,
|
|
3580
3575
|
messages: [
|
|
3581
|
-
`🔥 【复苏】生效:免于死亡,回复自身
|
|
3576
|
+
`🔥 【复苏】生效:免于死亡,回复自身50%的最大生命值和100%的“能量”,并且获得新技能【灵能构造炉】`
|
|
3582
3577
|
]
|
|
3583
3578
|
};
|
|
3584
3579
|
}, "handleRevival"),
|
|
@@ -3604,7 +3599,7 @@ var PassiveHandler = {
|
|
|
3604
3599
|
if (targetBoss.skills.includes("闪电冲锋")) {
|
|
3605
3600
|
lightbladeStacks = targetBoss.Skillcountpoints || 0;
|
|
3606
3601
|
}
|
|
3607
|
-
const totalChance =
|
|
3602
|
+
const totalChance = 1 + lightbladeStacks;
|
|
3608
3603
|
if (Math.random() * 100 < totalChance) {
|
|
3609
3604
|
const availableSkills = allSkills.filter(
|
|
3610
3605
|
(skill) => !targetBoss.skills.includes(skill)
|
|
@@ -3626,38 +3621,47 @@ var PassiveHandler = {
|
|
|
3626
3621
|
return null;
|
|
3627
3622
|
}, "handleConstructor"),
|
|
3628
3623
|
// 修改后 - 移除了层数清零操作
|
|
3629
|
-
handleTyrsShield: /* @__PURE__ */ __name(async function(ctx, targetBoss, activeBosses, bossGroup) {
|
|
3624
|
+
handleTyrsShield: /* @__PURE__ */ __name(async function(ctx, targetBoss, currentHP, activeBosses, bossGroup) {
|
|
3630
3625
|
if (!targetBoss.skills.includes("天启超载护盾")) return null;
|
|
3631
3626
|
const lightbladeStacks = targetBoss.Skillcountpoints || 0;
|
|
3632
3627
|
if (lightbladeStacks === 0) return null;
|
|
3633
|
-
const triggerChance =
|
|
3628
|
+
const triggerChance = 5;
|
|
3634
3629
|
if (Math.random() * 100 < triggerChance) {
|
|
3635
3630
|
const groupMembers = activeBosses.filter(
|
|
3636
3631
|
(b) => b.groupId === targetBoss.groupId && b.HP > 0
|
|
3637
3632
|
);
|
|
3638
|
-
const
|
|
3633
|
+
const healPerStack = 10;
|
|
3634
|
+
const totalHeal = lightbladeStacks * healPerStack;
|
|
3639
3635
|
const updates = [];
|
|
3640
3636
|
const messages = [`🛡️ 【天启超载护盾】生效:治疗所有存活异形`];
|
|
3637
|
+
let updatedHP = currentHP;
|
|
3641
3638
|
for (const member of groupMembers) {
|
|
3642
|
-
const
|
|
3643
|
-
if (!
|
|
3644
|
-
const
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
)
|
|
3654
|
-
|
|
3639
|
+
const memberConfig = PassiveHandler.getMemberConfig(member.name, bossGroup);
|
|
3640
|
+
if (!memberConfig) continue;
|
|
3641
|
+
const maxMemberHP = memberConfig.maxHP;
|
|
3642
|
+
const actualHeal = Math.min(totalHeal, maxMemberHP - member.HP);
|
|
3643
|
+
if (actualHeal <= 0) continue;
|
|
3644
|
+
const newHP = member.HP + actualHeal;
|
|
3645
|
+
updates.push(
|
|
3646
|
+
ctx.database.set(
|
|
3647
|
+
"ggcevo_boss",
|
|
3648
|
+
{ name: member.name },
|
|
3649
|
+
{ HP: newHP }
|
|
3650
|
+
)
|
|
3651
|
+
);
|
|
3652
|
+
messages.push(`${member.name} +${actualHeal}HP`);
|
|
3653
|
+
if (member.name === targetBoss.name) {
|
|
3654
|
+
updatedHP = newHP;
|
|
3655
3655
|
}
|
|
3656
3656
|
}
|
|
3657
|
+
if (updates.length === 0) {
|
|
3658
|
+
return null;
|
|
3659
|
+
}
|
|
3657
3660
|
await Promise.all(updates);
|
|
3658
3661
|
return {
|
|
3659
|
-
messages
|
|
3660
|
-
|
|
3662
|
+
messages,
|
|
3663
|
+
updatedHP
|
|
3664
|
+
// 返回当前目标的新HP(如果被治疗)
|
|
3661
3665
|
};
|
|
3662
3666
|
}
|
|
3663
3667
|
return null;
|
|
@@ -3698,8 +3702,8 @@ var PassiveHandler = {
|
|
|
3698
3702
|
messages.push(`🔥 【地毯式轰炸】生效:移除“孤立无援”`);
|
|
3699
3703
|
} else {
|
|
3700
3704
|
}
|
|
3701
|
-
damageMultiplier = -
|
|
3702
|
-
messages.push(`🔥 【地毯式轰炸】生效:我心中的怒火胜过千万个太阳!受到的伤害-
|
|
3705
|
+
damageMultiplier = -1;
|
|
3706
|
+
messages.push(`🔥 【地毯式轰炸】生效:我心中的怒火胜过千万个太阳!受到的伤害-100%`);
|
|
3703
3707
|
}
|
|
3704
3708
|
return {
|
|
3705
3709
|
messages,
|
|
@@ -3713,7 +3717,7 @@ var PassiveHandler = {
|
|
|
3713
3717
|
if (lightbladeStacks === 0) return null;
|
|
3714
3718
|
const triggerChance = 10;
|
|
3715
3719
|
if (Math.random() * 100 < triggerChance) {
|
|
3716
|
-
const energyGain = lightbladeStacks *
|
|
3720
|
+
const energyGain = lightbladeStacks * 50;
|
|
3717
3721
|
const maxEnergy = 1e3;
|
|
3718
3722
|
const currentEnergy = targetBoss.energy || 0;
|
|
3719
3723
|
const newEnergy = Math.min(currentEnergy + energyGain, maxEnergy);
|
|
@@ -4024,12 +4028,14 @@ var PassiveHandler = {
|
|
|
4024
4028
|
}
|
|
4025
4029
|
}
|
|
4026
4030
|
}
|
|
4027
|
-
const stellarWindResult = await this.handleStellarWind(ctx, targetBoss, initialDamage, maxHP, activeBosses, bossGroup);
|
|
4031
|
+
const stellarWindResult = await this.handleStellarWind(ctx, targetBoss, initialDamage, currentHP, maxHP, activeBosses, bossGroup);
|
|
4028
4032
|
if (stellarWindResult) {
|
|
4033
|
+
currentHP = stellarWindResult.updatedHP;
|
|
4029
4034
|
messages.push(...stellarWindResult.messages);
|
|
4030
4035
|
}
|
|
4031
|
-
const shieldResult = await this.handleTyrsShield(ctx, targetBoss, activeBosses, bossGroup);
|
|
4036
|
+
const shieldResult = await this.handleTyrsShield(ctx, targetBoss, currentHP, activeBosses, bossGroup);
|
|
4032
4037
|
if (shieldResult) {
|
|
4038
|
+
currentHP = shieldResult.updatedHP;
|
|
4033
4039
|
messages.push(...shieldResult.messages);
|
|
4034
4040
|
}
|
|
4035
4041
|
const survivalResult = this.handleSurvivalInstinct(targetBoss, currentHP, maxHP);
|
|
@@ -6611,11 +6617,8 @@ ${items.join("、")}
|
|
|
6611
6617
|
const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
|
|
6612
6618
|
const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
|
|
6613
6619
|
const discountDetails = [];
|
|
6614
|
-
let totalDiscount = 0;
|
|
6615
6620
|
if (careerData?.career === "武器中士") {
|
|
6616
|
-
|
|
6617
|
-
totalDiscount += weaponSpecialistDiscount;
|
|
6618
|
-
discountDetails.push(`▸ 🎖️ 武器中士职业:${weaponSpecialistDiscount}%折扣`);
|
|
6621
|
+
discountDetails.push(`▸ 🎖️ 武器中士职业:50%折扣`);
|
|
6619
6622
|
}
|
|
6620
6623
|
const activeWish = await ctx.database.get("ggcevo_Wish_Record", {
|
|
6621
6624
|
handle,
|
|
@@ -6625,11 +6628,8 @@ ${items.join("、")}
|
|
|
6625
6628
|
isused: false
|
|
6626
6629
|
}).then((records) => records[0]);
|
|
6627
6630
|
if (activeWish) {
|
|
6628
|
-
|
|
6629
|
-
totalDiscount += grasshopperDiscount;
|
|
6630
|
-
discountDetails.push(`▸ 🦗 蚱蜢优购祈愿:${grasshopperDiscount}%折扣`);
|
|
6631
|
+
discountDetails.push(`▸ 🦗 蚱蜢优购祈愿:20%折扣`);
|
|
6631
6632
|
}
|
|
6632
|
-
totalDiscount = Math.min(totalDiscount, 100);
|
|
6633
6633
|
const categoryStats = Object.values(weaponConfig).filter((weapon) => weapon.price !== 0).reduce((stats, weapon) => {
|
|
6634
6634
|
stats[weapon.category] = (stats[weapon.category] || 0) + 1;
|
|
6635
6635
|
return stats;
|
|
@@ -6638,8 +6638,8 @@ ${items.join("、")}
|
|
|
6638
6638
|
return [
|
|
6639
6639
|
"🏪 咕咕武器库分类 🏪",
|
|
6640
6640
|
'使用 "武器库 分类名称" 查看详细列表',
|
|
6641
|
-
|
|
6642
|
-
${discountDetails.
|
|
6641
|
+
discountDetails.length > 0 && `💰 折扣明细:
|
|
6642
|
+
${discountDetails.join("\n")}`,
|
|
6643
6643
|
"====================",
|
|
6644
6644
|
...Object.entries(categoryStats).map(([catName, count]) => `▸ ${catName} (${count}种)`),
|
|
6645
6645
|
"===================="
|
|
@@ -6649,12 +6649,19 @@ ${discountDetails.length ? `${discountDetails.join("\n")}` : ""}`,
|
|
|
6649
6649
|
return `无效武器分类,可用分类:
|
|
6650
6650
|
${Object.keys(categoryStats).join("、")}`;
|
|
6651
6651
|
}
|
|
6652
|
-
const isLegendaryCategory = category === "传奇武器";
|
|
6653
6652
|
const items = Object.entries(weaponConfig).filter(([_, config2]) => config2.category === category && config2.price !== 0).map(([name2, config2]) => {
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6653
|
+
let applicableDiscount = 0;
|
|
6654
|
+
if (careerData?.career === "武器中士") {
|
|
6655
|
+
applicableDiscount += 50;
|
|
6656
|
+
}
|
|
6657
|
+
if (config2.category !== "传奇武器" && activeWish) {
|
|
6658
|
+
applicableDiscount += 20;
|
|
6659
|
+
}
|
|
6660
|
+
let priceDisplay = `${config2.price}金币`;
|
|
6661
|
+
if (applicableDiscount > 0) {
|
|
6662
|
+
const discountedPrice = Math.floor(config2.price * (100 - applicableDiscount) / 100);
|
|
6663
|
+
priceDisplay = `${discountedPrice}金币 (原价${config2.price})`;
|
|
6664
|
+
}
|
|
6658
6665
|
let tagEffectsDesc = "▸ 无特殊加成效果";
|
|
6659
6666
|
if (config2.tagEffects && Object.keys(config2.tagEffects).length > 0) {
|
|
6660
6667
|
tagEffectsDesc = Object.entries(config2.tagEffects).map(([tag, multiplier]) => `▸ 对${tag}目标造成${(multiplier * 100).toFixed(0)}%伤害`).join("\n");
|
|
@@ -6672,16 +6679,13 @@ ${Object.keys(categoryStats).join("、")}`;
|
|
|
6672
6679
|
"------------------"
|
|
6673
6680
|
].filter(Boolean).join("\n");
|
|
6674
6681
|
});
|
|
6675
|
-
const permissionNotice =
|
|
6676
|
-
const discountInfo = totalDiscount > 0 && !isLegendaryCategory ? `💰 折扣明细:
|
|
6677
|
-
${discountDetails.length ? `${discountDetails.join("\n")}` : ""}` : null;
|
|
6682
|
+
const permissionNotice = category === "传奇武器" ? "⚠️ 购买传奇武器要求:人类联盟阵营+武器系统5级+情报副官/武器中士职业+传奇武器购买权限" : null;
|
|
6678
6683
|
return [
|
|
6679
6684
|
`🏪 咕咕武器库 - ${category} 🏪`,
|
|
6680
6685
|
'使用"购买 武器名称"指令进行购买',
|
|
6686
|
+
discountDetails.length > 0 ? `💰 折扣明细:
|
|
6687
|
+
${discountDetails.join("\n")}` : "",
|
|
6681
6688
|
permissionNotice,
|
|
6682
|
-
// 新增权限提示
|
|
6683
|
-
discountInfo,
|
|
6684
|
-
// 原有折扣信息
|
|
6685
6689
|
"====================",
|
|
6686
6690
|
...items,
|
|
6687
6691
|
items.length === 0 ? "⚠️ 该分类下暂无可用武器" : ""
|
|
@@ -6777,39 +6781,35 @@ ${validTypes.join("、")}`;
|
|
|
6777
6781
|
let totalDiscount = 0;
|
|
6778
6782
|
let discountDetails = [];
|
|
6779
6783
|
let activeWish = null;
|
|
6780
|
-
if (
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
totalDiscount += specialistDiscount;
|
|
6798
|
-
discountDetails.push(`🎖️ 武器中士职业:${specialistDiscount}%折扣`);
|
|
6784
|
+
if (isWeapon && careerData?.career === "武器中士") {
|
|
6785
|
+
const specialistDiscount = 50;
|
|
6786
|
+
totalDiscount += specialistDiscount;
|
|
6787
|
+
discountDetails.push(`🎖️ 武器中士职业:${specialistDiscount}%折扣`);
|
|
6788
|
+
}
|
|
6789
|
+
if (!isLegendaryWeapon && isWeapon) {
|
|
6790
|
+
activeWish = await ctx.database.get("ggcevo_Wish_Record", {
|
|
6791
|
+
handle,
|
|
6792
|
+
wishname: "蚱蜢优购",
|
|
6793
|
+
startTime: { $lte: /* @__PURE__ */ new Date() },
|
|
6794
|
+
endTime: { $gte: /* @__PURE__ */ new Date() },
|
|
6795
|
+
isused: false
|
|
6796
|
+
}).then((records) => records[0] || null);
|
|
6797
|
+
if (activeWish) {
|
|
6798
|
+
const wishDiscount = 20;
|
|
6799
|
+
totalDiscount += wishDiscount;
|
|
6800
|
+
discountDetails.push(`🦗 蚱蜢优购祈愿:${wishDiscount}%折扣`);
|
|
6799
6801
|
}
|
|
6800
|
-
totalDiscount = Math.min(totalDiscount, 100);
|
|
6801
6802
|
}
|
|
6803
|
+
totalDiscount = Math.min(totalDiscount, 100);
|
|
6802
6804
|
let actualPrice = config2.price;
|
|
6803
|
-
if (
|
|
6805
|
+
if (totalDiscount > 0) {
|
|
6804
6806
|
actualPrice = Math.floor(config2.price * (100 - totalDiscount) / 100);
|
|
6805
6807
|
actualPrice = Math.max(actualPrice, 1);
|
|
6806
6808
|
}
|
|
6807
6809
|
if ((signInfo?.totalRewards || 0) < actualPrice) {
|
|
6808
6810
|
let priceInfo = `需要 ${actualPrice} 金币`;
|
|
6809
6811
|
if (discountDetails.length > 0) {
|
|
6810
|
-
priceInfo += `(原价${config2.price})`;
|
|
6811
|
-
} else if (isLegendaryWeapon) {
|
|
6812
|
-
priceInfo = `需要 ${actualPrice} 金币 (传奇武器无折扣)`;
|
|
6812
|
+
priceInfo += ` (原价${config2.price})`;
|
|
6813
6813
|
}
|
|
6814
6814
|
return `❌ 金币不足,${priceInfo}`;
|
|
6815
6815
|
}
|
|
@@ -6864,20 +6864,18 @@ ${validTypes.join("、")}`;
|
|
|
6864
6864
|
});
|
|
6865
6865
|
let message = `✅ 成功购买${isWeapon ? "武器" : "物品"}「${item}」
|
|
6866
6866
|
`;
|
|
6867
|
-
if (
|
|
6867
|
+
if (discountDetails.length > 0) {
|
|
6868
|
+
message += `花费 ${actualPrice} 金币 (原价${config2.price} 金币)`;
|
|
6869
|
+
message += `
|
|
6870
|
+
💰 折扣明细:
|
|
6871
|
+
▸ ${discountDetails.join("\n▸ ")}`;
|
|
6872
|
+
} else {
|
|
6868
6873
|
message += `花费 ${actualPrice} 金币`;
|
|
6874
|
+
}
|
|
6875
|
+
if (isLegendaryWeapon) {
|
|
6869
6876
|
const [permissions] = await ctx.database.get("ggcevo_purchasepermissions", { handle });
|
|
6870
6877
|
message += `
|
|
6871
6878
|
扣除 1 次传奇武器购买权限,剩余次数:${permissions?.legendarypermissions || 0}`;
|
|
6872
|
-
} else {
|
|
6873
|
-
if (discountDetails.length > 0) {
|
|
6874
|
-
message += `花费 ${actualPrice} 金币 (原价${config2.price} 金币)`;
|
|
6875
|
-
message += `
|
|
6876
|
-
💰 折扣明细:
|
|
6877
|
-
▸ ${discountDetails.join("\n▸ ")}`;
|
|
6878
|
-
} else {
|
|
6879
|
-
message += `花费 ${actualPrice} 金币`;
|
|
6880
|
-
}
|
|
6881
6879
|
}
|
|
6882
6880
|
if (isWeapon) {
|
|
6883
6881
|
if (isAutoEquipped) {
|
|
@@ -7336,7 +7334,7 @@ ${validTypes.join("、")}`;
|
|
|
7336
7334
|
// 这里添加符号
|
|
7337
7335
|
] : [],
|
|
7338
7336
|
`📊 理论伤害值:${damage}${hasCrit ? " (✨ 暴击)" : ""}`,
|
|
7339
|
-
"💡 提示:使用 -t
|
|
7337
|
+
"💡 提示:使用 -t 重甲,生物(标签之间用英文逗号分隔) 添加测试标签"
|
|
7340
7338
|
].filter((line) => line).join("\n");
|
|
7341
7339
|
});
|
|
7342
7340
|
ctx.command("ggcevo/伤害榜 [page]", "查看当前主宰伤害排名").usage("输入 伤害榜 [页码] 查看对应页的排行榜,每页10条").action(async (_, page) => {
|