koishi-plugin-ggcevo-game 1.3.24 → 1.3.26
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 +208 -25
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -291,8 +291,9 @@ function apply(ctx, config) {
|
|
|
291
291
|
type: "实弹武器",
|
|
292
292
|
damage: 10,
|
|
293
293
|
description: "标准配置武器,中距离作战利器",
|
|
294
|
+
specialeffect: "",
|
|
294
295
|
price: 100,
|
|
295
|
-
redCrystalCost:
|
|
296
|
+
redCrystalCost: 5,
|
|
296
297
|
isantiair: true,
|
|
297
298
|
tagEffects: {
|
|
298
299
|
"轻甲": 1.5
|
|
@@ -304,6 +305,7 @@ function apply(ctx, config) {
|
|
|
304
305
|
type: "能量武器",
|
|
305
306
|
damage: 23,
|
|
306
307
|
description: "先进激光武器,远距离精准打击",
|
|
308
|
+
specialeffect: "",
|
|
307
309
|
price: 300,
|
|
308
310
|
redCrystalCost: 5,
|
|
309
311
|
isantiair: true,
|
|
@@ -318,6 +320,7 @@ function apply(ctx, config) {
|
|
|
318
320
|
type: "热能武器",
|
|
319
321
|
damage: 20,
|
|
320
322
|
description: "基于热能的强大武器,烧烬一切",
|
|
323
|
+
specialeffect: "",
|
|
321
324
|
price: 450,
|
|
322
325
|
redCrystalCost: 5,
|
|
323
326
|
isantiair: false,
|
|
@@ -332,8 +335,9 @@ function apply(ctx, config) {
|
|
|
332
335
|
type: "能量武器",
|
|
333
336
|
damage: 28,
|
|
334
337
|
description: "由激光步枪改良而来,高效的对重甲武器",
|
|
338
|
+
specialeffect: "",
|
|
335
339
|
price: 850,
|
|
336
|
-
redCrystalCost:
|
|
340
|
+
redCrystalCost: 10,
|
|
337
341
|
isantiair: true,
|
|
338
342
|
tagEffects: {
|
|
339
343
|
"重甲": 2,
|
|
@@ -346,8 +350,9 @@ function apply(ctx, config) {
|
|
|
346
350
|
type: "实弹武器",
|
|
347
351
|
damage: 12,
|
|
348
352
|
description: "一种改造后的采矿切割机,有效对抗重甲目标",
|
|
353
|
+
specialeffect: "",
|
|
349
354
|
price: 150,
|
|
350
|
-
redCrystalCost:
|
|
355
|
+
redCrystalCost: 5,
|
|
351
356
|
isantiair: true,
|
|
352
357
|
tagEffects: {
|
|
353
358
|
"重甲": 1.5,
|
|
@@ -360,6 +365,7 @@ function apply(ctx, config) {
|
|
|
360
365
|
type: "实弹武器",
|
|
361
366
|
damage: 28,
|
|
362
367
|
description: "近距离攻击武器,专为遭遇战设计使用",
|
|
368
|
+
specialeffect: "",
|
|
363
369
|
price: 325,
|
|
364
370
|
redCrystalCost: 5,
|
|
365
371
|
isantiair: false,
|
|
@@ -373,6 +379,7 @@ function apply(ctx, config) {
|
|
|
373
379
|
type: "实弹武器",
|
|
374
380
|
damage: 50,
|
|
375
381
|
description: "用于隐秘射击的最佳武器,但是无法穿透护甲",
|
|
382
|
+
specialeffect: "",
|
|
376
383
|
price: 550,
|
|
377
384
|
redCrystalCost: 10,
|
|
378
385
|
isantiair: true,
|
|
@@ -386,6 +393,7 @@ function apply(ctx, config) {
|
|
|
386
393
|
type: "热能武器",
|
|
387
394
|
damage: 25,
|
|
388
395
|
description: "喷射稳定的液氮恒流,对长时间接触者造成致命的损伤",
|
|
396
|
+
specialeffect: "",
|
|
389
397
|
price: 775,
|
|
390
398
|
redCrystalCost: 10,
|
|
391
399
|
isantiair: false,
|
|
@@ -399,6 +407,7 @@ function apply(ctx, config) {
|
|
|
399
407
|
type: "能量武器",
|
|
400
408
|
damage: 25,
|
|
401
409
|
description: "一种经过改造的电动工具,可对近距离的目标放出高压电",
|
|
410
|
+
specialeffect: "",
|
|
402
411
|
price: 750,
|
|
403
412
|
redCrystalCost: 10,
|
|
404
413
|
isantiair: true,
|
|
@@ -411,13 +420,27 @@ function apply(ctx, config) {
|
|
|
411
420
|
id: 10,
|
|
412
421
|
type: "热能武器",
|
|
413
422
|
damage: 24,
|
|
414
|
-
description: "
|
|
423
|
+
description: "一种高度危险性的武器,设计用辐射照射并伤害敌人",
|
|
424
|
+
specialeffect: "攻击使生物目标(无机械标签)叠加“辐射”层数,每层使其受到的伤害+1%",
|
|
415
425
|
price: 825,
|
|
416
|
-
redCrystalCost:
|
|
426
|
+
redCrystalCost: 10,
|
|
417
427
|
isantiair: true,
|
|
418
428
|
tagEffects: {
|
|
419
429
|
"生物": 1.2
|
|
420
430
|
}
|
|
431
|
+
},
|
|
432
|
+
"中子步枪": {
|
|
433
|
+
id: 11,
|
|
434
|
+
type: "能量武器",
|
|
435
|
+
damage: 30,
|
|
436
|
+
description: "激光步枪的变种,采用折射技术升级",
|
|
437
|
+
specialeffect: "",
|
|
438
|
+
price: 1450,
|
|
439
|
+
redCrystalCost: 15,
|
|
440
|
+
isantiair: true,
|
|
441
|
+
tagEffects: {
|
|
442
|
+
"灵能": 1.5
|
|
443
|
+
}
|
|
421
444
|
}
|
|
422
445
|
};
|
|
423
446
|
const SyndicatedItems = {
|
|
@@ -476,9 +499,15 @@ function apply(ctx, config) {
|
|
|
476
499
|
},
|
|
477
500
|
"助燃核心": {
|
|
478
501
|
cost: 2550,
|
|
479
|
-
effect: "对惧热目标改为造成
|
|
502
|
+
effect: "对惧热目标改为造成300%伤害; 对生物目标改为造成200%伤害",
|
|
480
503
|
exclusiveTo: "焚烧枪",
|
|
481
504
|
isExclusive: true
|
|
505
|
+
},
|
|
506
|
+
"光束曲射晶片": {
|
|
507
|
+
cost: 2250,
|
|
508
|
+
effect: "攻击目标后,若有存活的其他异形,则对其造成50%的武器基础伤害",
|
|
509
|
+
exclusiveTo: "碎骨步枪",
|
|
510
|
+
isExclusive: true
|
|
482
511
|
}
|
|
483
512
|
};
|
|
484
513
|
const wishConfig = {
|
|
@@ -1029,7 +1058,11 @@ function apply(ctx, config) {
|
|
|
1029
1058
|
totalAdditive += wishAdditive.value;
|
|
1030
1059
|
if (wishAdditive.message) effectMessage.push(wishAdditive.message);
|
|
1031
1060
|
const [rankRecord] = await ctx2.database.get("ggcevo_rank", { handle, rankseason: config.rankseason });
|
|
1032
|
-
|
|
1061
|
+
const rankAddResult = calculateRankAdditive(rankRecord);
|
|
1062
|
+
totalAdditive += rankAddResult.value;
|
|
1063
|
+
if (rankAddResult.message) {
|
|
1064
|
+
effectMessage.push(rankAddResult.message);
|
|
1065
|
+
}
|
|
1033
1066
|
let finalDamage = baseDamage * (1 + totalAdditive);
|
|
1034
1067
|
const minDamage = baseDamage * 0.01;
|
|
1035
1068
|
if (finalDamage < minDamage) {
|
|
@@ -1056,7 +1089,8 @@ function apply(ctx, config) {
|
|
|
1056
1089
|
async function calculateTagMultiplier(weaponData, tags, equippedWeapon) {
|
|
1057
1090
|
const MOD_EFFECTS = [
|
|
1058
1091
|
{ mod: "裂甲核心", tag: "重甲", value: 1.2 },
|
|
1059
|
-
{ mod: "助燃核心", tag: "惧热", value:
|
|
1092
|
+
{ mod: "助燃核心", tag: "惧热", value: 3 },
|
|
1093
|
+
{ mod: "助燃核心", tag: "生物", value: 2 }
|
|
1060
1094
|
];
|
|
1061
1095
|
let totalAdditive = 0;
|
|
1062
1096
|
for (const tag of tags) {
|
|
@@ -1177,8 +1211,16 @@ function apply(ctx, config) {
|
|
|
1177
1211
|
}
|
|
1178
1212
|
__name(calculateWishAdditive, "calculateWishAdditive");
|
|
1179
1213
|
function calculateRankAdditive(rankRecord) {
|
|
1180
|
-
if (!rankRecord || rankRecord.rank <= 0) return 0;
|
|
1181
|
-
|
|
1214
|
+
if (!rankRecord || rankRecord.rank <= 0) return { value: 0, message: "" };
|
|
1215
|
+
const value = Math.floor(rankRecord.rank / 400) * 0.01;
|
|
1216
|
+
if (value > 0) {
|
|
1217
|
+
const percentage = Math.round(value * 100);
|
|
1218
|
+
return {
|
|
1219
|
+
value,
|
|
1220
|
+
message: `🏆 排名加成:攻击伤害+${percentage}%`
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
return { value: 0, message: "" };
|
|
1182
1224
|
}
|
|
1183
1225
|
__name(calculateRankAdditive, "calculateRankAdditive");
|
|
1184
1226
|
const initDefaultItems = {
|
|
@@ -1612,7 +1654,7 @@ function apply(ctx, config) {
|
|
|
1612
1654
|
}, "handleStructuralArmor"),
|
|
1613
1655
|
// 吸血效果处理(返回综合系数)
|
|
1614
1656
|
handleBloodEffects: /* @__PURE__ */ __name(function(targetBoss, currentHP, maxHP) {
|
|
1615
|
-
if (!targetBoss.skills.includes("吸血唾液") || !targetBoss.skills.includes("
|
|
1657
|
+
if (!targetBoss.skills.includes("吸血唾液") || !targetBoss.skills.includes("吐血")) return null;
|
|
1616
1658
|
const bloodStacks = targetBoss.Skillcountpoints || 0;
|
|
1617
1659
|
let damageMultiplier = 0;
|
|
1618
1660
|
const messages = [];
|
|
@@ -1634,7 +1676,7 @@ function apply(ctx, config) {
|
|
|
1634
1676
|
return { damageMultiplier, messages };
|
|
1635
1677
|
}, "handleBloodEffects"),
|
|
1636
1678
|
handleBloodCount: /* @__PURE__ */ __name(async function(ctx2, targetBoss, currentHP, maxHP) {
|
|
1637
|
-
if (!targetBoss.skills.includes("吸血唾液") || !targetBoss.skills.includes("进食")
|
|
1679
|
+
if (!targetBoss.skills.includes("吸血唾液") || !targetBoss.skills.includes("进食")) {
|
|
1638
1680
|
return null;
|
|
1639
1681
|
}
|
|
1640
1682
|
let messages = [];
|
|
@@ -2371,6 +2413,20 @@ ${discountDetails.join("\n▸ ")}`;
|
|
|
2371
2413
|
return total;
|
|
2372
2414
|
}
|
|
2373
2415
|
__name(calculateTotalPower, "calculateTotalPower");
|
|
2416
|
+
function getBossMaxHP(bossName) {
|
|
2417
|
+
for (const bossGroup of bossPool) {
|
|
2418
|
+
if (bossGroup.main.name === bossName) {
|
|
2419
|
+
return bossGroup.main.maxHP;
|
|
2420
|
+
}
|
|
2421
|
+
for (const minion of bossGroup.minions) {
|
|
2422
|
+
if (minion.name === bossName) {
|
|
2423
|
+
return minion.maxHP;
|
|
2424
|
+
}
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
return 0;
|
|
2428
|
+
}
|
|
2429
|
+
__name(getBossMaxHP, "getBossMaxHP");
|
|
2374
2430
|
ctx.command("ggcevo/抽奖").action(async (argv) => {
|
|
2375
2431
|
const session = argv.session;
|
|
2376
2432
|
let winCount = 0;
|
|
@@ -2650,9 +2706,7 @@ ${itemDetails.join("\n")}`;
|
|
|
2650
2706
|
⚡ 加成效果:
|
|
2651
2707
|
▸ ${messages.join("\n▸ ")}`;
|
|
2652
2708
|
}
|
|
2653
|
-
return
|
|
2654
|
-
💰 金币 x ${finalPoints}(基础值 ${basePoints})
|
|
2655
|
-
🪙 咕咕币 x ${tickets}${effectMessage}`;
|
|
2709
|
+
return "签到成功!本月累计签到" + monthlyDays + "天,获得:\n💰 金币 x " + finalPoints + (totalBonus > 0 ? " (基础值 " + basePoints + ")" : "") + "\n🪙 咕咕币 x " + tickets + effectMessage;
|
|
2656
2710
|
} catch (error) {
|
|
2657
2711
|
console.error("签到命令时发生错误:", error);
|
|
2658
2712
|
return "服务器繁忙,请稍后尝试。";
|
|
@@ -4031,6 +4085,8 @@ ${Object.keys(typeStats).join("、")}`;
|
|
|
4031
4085
|
const items = Object.entries(weaponConfig).filter(([_, config2]) => config2.type === type && config2.price !== 0).map(([name2, config2]) => {
|
|
4032
4086
|
const actualPrice = Math.floor(config2.price * (100 - totalDiscount) / 100);
|
|
4033
4087
|
const tagEffectsDesc = config2.tagEffects ? Object.entries(config2.tagEffects).map(([tag, multiplier]) => `▸ 对${tag}目标造成${(multiplier * 100).toFixed(0)}%伤害`).join("\n") : "▸ 无特殊加成效果";
|
|
4088
|
+
const specialEffect = config2.specialeffect ? `
|
|
4089
|
+
特殊效果:${config2.specialeffect}` : "";
|
|
4034
4090
|
return [
|
|
4035
4091
|
`【${name2}】`,
|
|
4036
4092
|
`类型:${config2.type}`,
|
|
@@ -4038,8 +4094,10 @@ ${Object.keys(typeStats).join("、")}`;
|
|
|
4038
4094
|
`价格:${actualPrice}金币${totalDiscount > 0 ? ` (原价${config2.price})` : ""}`,
|
|
4039
4095
|
"特性:",
|
|
4040
4096
|
tagEffectsDesc,
|
|
4097
|
+
specialEffect,
|
|
4098
|
+
// 新增特殊效果显示
|
|
4041
4099
|
`描述:${config2.description}`
|
|
4042
|
-
].join("\n");
|
|
4100
|
+
].filter(Boolean).join("\n");
|
|
4043
4101
|
});
|
|
4044
4102
|
return [
|
|
4045
4103
|
`🏪 咕咕武器库 - ${type} 🏪`,
|
|
@@ -4405,7 +4463,8 @@ ${validTypes.join("、")}`;
|
|
|
4405
4463
|
const universalMods = Object.entries(modConfig).filter(([_, m]) => !m.isExclusive).map(([name2, cfg]) => formatMod(name2, cfg));
|
|
4406
4464
|
return [
|
|
4407
4465
|
"🛠️ 通用武器模块 🛠️",
|
|
4408
|
-
"使用「改装 武器名称
|
|
4466
|
+
"使用「改装 武器名称 模块名称」安装通用模块",
|
|
4467
|
+
"输入「改装 武器名称」查询武器的专属模块",
|
|
4409
4468
|
universalDiscountRate > 0 && `🔧 当前通用模块折扣:${universalDiscountRate}% (武器升级平台 Lv${techLevel})`,
|
|
4410
4469
|
"====================",
|
|
4411
4470
|
universalMods.join("\n\n")
|
|
@@ -4474,6 +4533,120 @@ ${validTypes.join("、")}`;
|
|
|
4474
4533
|
if (!bossGroup) return "无法获取异形组配置。";
|
|
4475
4534
|
const maxHP = targetBoss.type === "主宰" ? bossGroup.main.maxHP : bossGroup.minions.find((m) => m.name === targetBoss.name)?.maxHP || 0;
|
|
4476
4535
|
const { damage, hasCrit, effectMessage } = await calculateTotalDamage(ctx, session, equippedWeapon, targetBoss);
|
|
4536
|
+
const extraDamages = [];
|
|
4537
|
+
const actuallyDead = [];
|
|
4538
|
+
let scatterBroadcast = null;
|
|
4539
|
+
if (equippedWeapon.installedMods?.includes("光束曲射晶片") && weaponName === "碎骨步枪") {
|
|
4540
|
+
const activeBosses2 = await ctx.database.get("ggcevo_boss", {
|
|
4541
|
+
isActive: true,
|
|
4542
|
+
name: { $ne: targetBoss.name }
|
|
4543
|
+
// 排除当前目标
|
|
4544
|
+
});
|
|
4545
|
+
if (activeBosses2.length > 0) {
|
|
4546
|
+
effectMessage.push("🔆 【光束曲射晶片】触发!");
|
|
4547
|
+
const baseDamage = weaponData.damage * (1 + 0.1 * equippedWeapon.level);
|
|
4548
|
+
const secondaryDamage = Math.round(baseDamage * 0.5);
|
|
4549
|
+
for (const secondaryTarget of activeBosses2) {
|
|
4550
|
+
const secondaryMaxHP = getBossMaxHP(secondaryTarget.name);
|
|
4551
|
+
let currentDamage = secondaryDamage;
|
|
4552
|
+
const passiveResult2 = await PassiveHandler.handlePassives(
|
|
4553
|
+
ctx,
|
|
4554
|
+
secondaryTarget,
|
|
4555
|
+
currentDamage,
|
|
4556
|
+
secondaryTarget.HP - currentDamage,
|
|
4557
|
+
secondaryMaxHP,
|
|
4558
|
+
weaponName,
|
|
4559
|
+
weaponData,
|
|
4560
|
+
activeBosses2,
|
|
4561
|
+
bossGroup
|
|
4562
|
+
);
|
|
4563
|
+
const finalDamage = passiveResult2.initialDamage;
|
|
4564
|
+
const actualDamage = Math.min(finalDamage, secondaryTarget.HP);
|
|
4565
|
+
extraDamages.push({
|
|
4566
|
+
name: secondaryTarget.name,
|
|
4567
|
+
damage: actualDamage
|
|
4568
|
+
});
|
|
4569
|
+
const newHP = passiveResult2.currentHP;
|
|
4570
|
+
if (passiveResult2.skillUpdates.length > 0) {
|
|
4571
|
+
await PassiveHandler.applySkillUpdates(ctx, passiveResult2.skillUpdates);
|
|
4572
|
+
}
|
|
4573
|
+
const isDead = newHP <= 0;
|
|
4574
|
+
await ctx.database.set(
|
|
4575
|
+
"ggcevo_boss",
|
|
4576
|
+
{ name: secondaryTarget.name },
|
|
4577
|
+
{
|
|
4578
|
+
HP: Math.max(newHP, 0),
|
|
4579
|
+
isActive: !isDead
|
|
4580
|
+
}
|
|
4581
|
+
);
|
|
4582
|
+
effectMessage.push(...passiveResult2.messages.map((m) => `+ 对 ${secondaryTarget.name} ${m}`));
|
|
4583
|
+
if (isDead) {
|
|
4584
|
+
actuallyDead.push(secondaryTarget.name);
|
|
4585
|
+
if (secondaryTarget.type === "子代") {
|
|
4586
|
+
if (secondaryTarget.name === "机械感染虫") {
|
|
4587
|
+
const [mainBoss] = await ctx.database.get("ggcevo_boss", {
|
|
4588
|
+
groupId: secondaryTarget.groupId,
|
|
4589
|
+
type: "主宰",
|
|
4590
|
+
isActive: true
|
|
4591
|
+
});
|
|
4592
|
+
if (mainBoss && !mainBoss.skills.includes("孤立无援")) {
|
|
4593
|
+
await ctx.database.set("ggcevo_boss", { name: mainBoss.name }, {
|
|
4594
|
+
skills: [...mainBoss.skills, "孤立无援"]
|
|
4595
|
+
});
|
|
4596
|
+
broadcastMessage = "💥 机械感染虫已阵亡,空间站感染虫进入【孤立无援】状态,受到的伤害+20%!";
|
|
4597
|
+
}
|
|
4598
|
+
} else {
|
|
4599
|
+
const remainingMinions = await ctx.database.get("ggcevo_boss", {
|
|
4600
|
+
groupId: secondaryTarget.groupId,
|
|
4601
|
+
type: "子代",
|
|
4602
|
+
isActive: true
|
|
4603
|
+
});
|
|
4604
|
+
if (remainingMinions.length === 0) {
|
|
4605
|
+
const [mainBoss] = await ctx.database.get("ggcevo_boss", {
|
|
4606
|
+
groupId: secondaryTarget.groupId,
|
|
4607
|
+
type: "主宰",
|
|
4608
|
+
isActive: true
|
|
4609
|
+
});
|
|
4610
|
+
if (mainBoss && !mainBoss.skills.includes("孤立无援")) {
|
|
4611
|
+
await ctx.database.set("ggcevo_boss", { name: mainBoss.name }, {
|
|
4612
|
+
skills: [...mainBoss.skills, "孤立无援"]
|
|
4613
|
+
});
|
|
4614
|
+
broadcastMessage = `💥 所有子代已阵亡,${mainBoss.name}进入【孤立无援】状态,受到的伤害+20%!`;
|
|
4615
|
+
}
|
|
4616
|
+
}
|
|
4617
|
+
}
|
|
4618
|
+
} else if (secondaryTarget.type === "主宰") {
|
|
4619
|
+
await ctx.database.set(
|
|
4620
|
+
"ggcevo_boss",
|
|
4621
|
+
{ groupId: secondaryTarget.groupId },
|
|
4622
|
+
{
|
|
4623
|
+
isActive: false,
|
|
4624
|
+
HP: 0
|
|
4625
|
+
}
|
|
4626
|
+
);
|
|
4627
|
+
const respawnTime = /* @__PURE__ */ new Date();
|
|
4628
|
+
respawnTime.setSeconds(respawnTime.getSeconds() + 3600);
|
|
4629
|
+
await ctx.database.set(
|
|
4630
|
+
"ggcevo_boss",
|
|
4631
|
+
{ name: secondaryTarget.name },
|
|
4632
|
+
{ respawnTime }
|
|
4633
|
+
);
|
|
4634
|
+
const { rewardMessages } = await handleBossDefeatRewards(ctx, secondaryTarget);
|
|
4635
|
+
await ctx.database.remove("ggcevo_boss_damage", {
|
|
4636
|
+
bossGroupId: secondaryTarget.groupId
|
|
4637
|
+
});
|
|
4638
|
+
scatterBroadcast = [
|
|
4639
|
+
`🎯 主宰 ${secondaryTarget.name} 已被 ${session.username} 的散射伤害击败!`,
|
|
4640
|
+
`所有子代已消失,下一个主宰将在1小时后重生`,
|
|
4641
|
+
"",
|
|
4642
|
+
"🏆 伤害排行榜奖励:",
|
|
4643
|
+
...rewardMessages
|
|
4644
|
+
].join("\n");
|
|
4645
|
+
}
|
|
4646
|
+
}
|
|
4647
|
+
}
|
|
4648
|
+
}
|
|
4649
|
+
}
|
|
4477
4650
|
let initialDamage = Math.min(damage, targetBoss.HP);
|
|
4478
4651
|
let currentHP = targetBoss.HP - initialDamage;
|
|
4479
4652
|
let passiveMessages = [];
|
|
@@ -4499,11 +4672,12 @@ ${validTypes.join("、")}`;
|
|
|
4499
4672
|
handle,
|
|
4500
4673
|
bossGroupId: targetBoss.groupId
|
|
4501
4674
|
});
|
|
4675
|
+
const totalDamage = initialDamage + extraDamages.reduce((sum, d) => sum + d.damage, 0);
|
|
4502
4676
|
await ctx.database.upsert("ggcevo_boss_damage", [{
|
|
4503
4677
|
handle,
|
|
4504
4678
|
bossGroupId: targetBoss.groupId,
|
|
4505
4679
|
playerName: session.username,
|
|
4506
|
-
totalDamage: (existingRecord?.totalDamage || 0) +
|
|
4680
|
+
totalDamage: (existingRecord?.totalDamage || 0) + totalDamage,
|
|
4507
4681
|
// 改为实际伤害
|
|
4508
4682
|
attackCount: (existingRecord?.attackCount || 0) + 1,
|
|
4509
4683
|
lastattackDate: /* @__PURE__ */ new Date()
|
|
@@ -4610,7 +4784,7 @@ ${validTypes.join("、")}`;
|
|
|
4610
4784
|
}], ["handle"]);
|
|
4611
4785
|
redcrystalMessage = "🔴 清洁工职业加成:获得1枚红晶";
|
|
4612
4786
|
}
|
|
4613
|
-
const finalReward = Math.round(
|
|
4787
|
+
const finalReward = Math.round(totalDamage * careerMultiplier);
|
|
4614
4788
|
const [existingSign] = await ctx.database.get("ggcevo_sign", { handle });
|
|
4615
4789
|
await ctx.database.upsert("ggcevo_sign", [{
|
|
4616
4790
|
handle,
|
|
@@ -4629,16 +4803,25 @@ ${effectMessage.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
4629
4803
|
${passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
4630
4804
|
] : [],
|
|
4631
4805
|
`造成伤害:${initialDamage}${hasCrit ? "(✨ 暴击)" : ""}`,
|
|
4806
|
+
...extraDamages.length > 0 ? [
|
|
4807
|
+
`散射伤害:`,
|
|
4808
|
+
...extraDamages.map((d) => `▸ 对 ${d.name} 造成 ${d.damage} 伤害`)
|
|
4809
|
+
] : [],
|
|
4632
4810
|
`获得金币:${finalReward}${careerMessage}`,
|
|
4633
4811
|
redcrystalMessage,
|
|
4634
4812
|
`目标剩余HP:${Math.max(currentHP, 0)}/${maxHP}`,
|
|
4813
|
+
...actuallyDead.length > 0 ? [
|
|
4814
|
+
`💀 散射击杀:${actuallyDead.join(", ")}`
|
|
4815
|
+
] : [],
|
|
4635
4816
|
isDefeated ? `🎉 恭喜,已成功击败 ${targetBoss.name}!` : ""
|
|
4636
4817
|
].filter((line) => line).join("\n");
|
|
4637
4818
|
await session.send(resultMessage);
|
|
4638
|
-
if (
|
|
4639
|
-
const
|
|
4819
|
+
if (scatterBroadcast) {
|
|
4820
|
+
const groupId = [...config2.groupId];
|
|
4821
|
+
await ctx.broadcast(groupId, Array.isArray(scatterBroadcast) ? scatterBroadcast.join("\n") : scatterBroadcast);
|
|
4822
|
+
} else if (broadcastMessage) {
|
|
4640
4823
|
const groupId = [...config2.groupId];
|
|
4641
|
-
await ctx.broadcast(groupId,
|
|
4824
|
+
await ctx.broadcast(groupId, Array.isArray(broadcastMessage) ? broadcastMessage.join("\n") : broadcastMessage);
|
|
4642
4825
|
}
|
|
4643
4826
|
});
|
|
4644
4827
|
ctx.command("ggcevo/攻击假人").option("tags", "-t <tags:string> 添加BOSS标签(逗号分隔)").action(async (argv) => {
|
|
@@ -4694,7 +4877,7 @@ ${passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
4694
4877
|
const pageNum = parseInt(page) || 1;
|
|
4695
4878
|
if (pageNum < 1) return "请输入有效的页码。";
|
|
4696
4879
|
const activeBosses = await ctx.database.get("ggcevo_boss", { isActive: true });
|
|
4697
|
-
if (!activeBosses.length) return "
|
|
4880
|
+
if (!activeBosses.length) return "当前没有存活的异形,请等待下次刷新。";
|
|
4698
4881
|
const mainBoss = activeBosses.find((b) => b.type === "主宰");
|
|
4699
4882
|
if (!mainBoss) return "当前数据异常,请联系管理员";
|
|
4700
4883
|
const offset = (pageNum - 1) * 10;
|
|
@@ -4721,7 +4904,7 @@ ${passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
4721
4904
|
});
|
|
4722
4905
|
ctx.command("ggcevo/异形信息", "查看当前主宰信息").alias("yx信息").action(async () => {
|
|
4723
4906
|
const activeBosses = await ctx.database.get("ggcevo_boss", { isActive: true });
|
|
4724
|
-
if (!activeBosses.length) return "
|
|
4907
|
+
if (!activeBosses.length) return "当前没有存活的异形,请等待下次刷新。";
|
|
4725
4908
|
const mainBoss = activeBosses.find((b) => b.type === "主宰");
|
|
4726
4909
|
const minions = activeBosses.filter((b) => b.type === "子代");
|
|
4727
4910
|
if (!mainBoss) return "当前数据异常,请联系管理员";
|
|
@@ -5322,7 +5505,7 @@ ${passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
5322
5505
|
// 移除数量显示在标题
|
|
5323
5506
|
`类型:${itemData.type} | 持有数量:${warehouseItem.quantity}`,
|
|
5324
5507
|
// 从warehouse表读取实际数量
|
|
5325
|
-
|
|
5508
|
+
`效果:${itemData.effects}`,
|
|
5326
5509
|
`描述:${itemData.description}`,
|
|
5327
5510
|
"――――――――――――――"
|
|
5328
5511
|
].join("\n");
|
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.
|
|
4
|
+
"version": "1.3.26",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@koishijs/plugin-proxy-agent": "^0.3.3",
|
|
21
21
|
"koishi": "^4.18.7",
|
|
22
|
-
"koishi-plugin-sc2arcade-search": "^1.1.
|
|
22
|
+
"koishi-plugin-sc2arcade-search": "^1.1.17"
|
|
23
23
|
},
|
|
24
24
|
"koishi": {
|
|
25
25
|
"service": {
|