koishi-plugin-ggcevo-game 1.4.92 → 1.4.93
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 +1 -1
- package/lib/boss/passive.d.ts +48 -0
- package/lib/index.js +149 -18
- package/lib/weapons.d.ts +12 -0
- package/package.json +1 -1
|
@@ -394,7 +394,7 @@ export declare const BattleEffectProcessor: {
|
|
|
394
394
|
updates: Partial<BattleStatistics>;
|
|
395
395
|
} | null;
|
|
396
396
|
} | null;
|
|
397
|
-
handleRadiationEffect: (targetBoss: any, weaponName: string) => {
|
|
397
|
+
handleRadiationEffect: (targetBoss: any, weaponName: string, equippedWeapon: any) => {
|
|
398
398
|
messages: string[];
|
|
399
399
|
targetUpdates: {
|
|
400
400
|
name: string;
|
package/lib/boss/passive.d.ts
CHANGED
|
@@ -255,4 +255,52 @@ export declare const passiveConfig: {
|
|
|
255
255
|
type: string;
|
|
256
256
|
description: string;
|
|
257
257
|
};
|
|
258
|
+
基因变异: {
|
|
259
|
+
type: string;
|
|
260
|
+
description: string;
|
|
261
|
+
};
|
|
262
|
+
优化冗余片段: {
|
|
263
|
+
type: string;
|
|
264
|
+
description: string;
|
|
265
|
+
};
|
|
266
|
+
开天眼: {
|
|
267
|
+
type: string;
|
|
268
|
+
description: string;
|
|
269
|
+
};
|
|
270
|
+
环境适应: {
|
|
271
|
+
type: string;
|
|
272
|
+
description: string;
|
|
273
|
+
};
|
|
274
|
+
加快分化: {
|
|
275
|
+
type: string;
|
|
276
|
+
description: string;
|
|
277
|
+
};
|
|
278
|
+
耐力强化: {
|
|
279
|
+
type: string;
|
|
280
|
+
description: string;
|
|
281
|
+
};
|
|
282
|
+
稳定DNA: {
|
|
283
|
+
type: string;
|
|
284
|
+
description: string;
|
|
285
|
+
};
|
|
286
|
+
增厚甲壳: {
|
|
287
|
+
type: string;
|
|
288
|
+
description: string;
|
|
289
|
+
};
|
|
290
|
+
质粒增殖: {
|
|
291
|
+
type: string;
|
|
292
|
+
description: string;
|
|
293
|
+
};
|
|
294
|
+
加速代谢: {
|
|
295
|
+
type: string;
|
|
296
|
+
description: string;
|
|
297
|
+
};
|
|
298
|
+
组织增生: {
|
|
299
|
+
type: string;
|
|
300
|
+
description: string;
|
|
301
|
+
};
|
|
302
|
+
模仿生物签名: {
|
|
303
|
+
type: string;
|
|
304
|
+
description: string;
|
|
305
|
+
};
|
|
258
306
|
};
|
package/lib/index.js
CHANGED
|
@@ -303,7 +303,7 @@ var weaponConfig = {
|
|
|
303
303
|
damage: 70,
|
|
304
304
|
armorDamageReduction: 0.1,
|
|
305
305
|
description: "二十一世纪的武器,经过修改以减少后坐力并提高远程精度",
|
|
306
|
-
specialeffect: "连续攻击叠加[横冲直撞]效果,每层提高2.5
|
|
306
|
+
specialeffect: "连续攻击叠加[横冲直撞]效果,每层提高2.5%伤害(至多提高50%伤害)",
|
|
307
307
|
price: 2e3,
|
|
308
308
|
redCrystalCost: 20,
|
|
309
309
|
isantiair: true,
|
|
@@ -510,6 +510,18 @@ var modConfig = {
|
|
|
510
510
|
effect: "连续攻击叠加[聚变]效果,每层提高10%伤害(最多6层)",
|
|
511
511
|
exclusiveTo: "聚变磁轨枪",
|
|
512
512
|
isExclusive: true
|
|
513
|
+
},
|
|
514
|
+
"辐射充能核心": {
|
|
515
|
+
cost: 1750,
|
|
516
|
+
effect: "双倍叠加[辐射]层数,对[生物]目标改为造成150%伤害",
|
|
517
|
+
exclusiveTo: "伽马枪",
|
|
518
|
+
isExclusive: true
|
|
519
|
+
},
|
|
520
|
+
"等离子轴承": {
|
|
521
|
+
cost: 3e3,
|
|
522
|
+
effect: "每层[横冲直撞]提供双倍伤害",
|
|
523
|
+
exclusiveTo: "M134轮转机枪",
|
|
524
|
+
isExclusive: true
|
|
513
525
|
}
|
|
514
526
|
};
|
|
515
527
|
|
|
@@ -1582,6 +1594,22 @@ var bossPool = [
|
|
|
1582
1594
|
passive: []
|
|
1583
1595
|
}
|
|
1584
1596
|
]
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
id: 12,
|
|
1600
|
+
main: {
|
|
1601
|
+
name: "坏兄弟",
|
|
1602
|
+
type: "主宰",
|
|
1603
|
+
maxHP: 2e4,
|
|
1604
|
+
maxShield: 0,
|
|
1605
|
+
maxEnergy: 0,
|
|
1606
|
+
armor: 3,
|
|
1607
|
+
shieldArmor: 0,
|
|
1608
|
+
maxStacks: 20,
|
|
1609
|
+
tags: ["生物", "异形"],
|
|
1610
|
+
passive: ["基因变异"]
|
|
1611
|
+
},
|
|
1612
|
+
minions: []
|
|
1585
1613
|
}
|
|
1586
1614
|
];
|
|
1587
1615
|
|
|
@@ -3085,7 +3113,7 @@ var BattleEffectProcessor = {
|
|
|
3085
3113
|
};
|
|
3086
3114
|
}, "handleBombardmentGuide"),
|
|
3087
3115
|
// 统一的辐射效果处理函数
|
|
3088
|
-
handleRadiationEffect: /* @__PURE__ */ __name(function(targetBoss, weaponName) {
|
|
3116
|
+
handleRadiationEffect: /* @__PURE__ */ __name(function(targetBoss, weaponName, equippedWeapon) {
|
|
3089
3117
|
const messages = [];
|
|
3090
3118
|
let layerAdded = false;
|
|
3091
3119
|
const currentLayers = targetBoss.radiationLayers || 0;
|
|
@@ -3094,18 +3122,20 @@ var BattleEffectProcessor = {
|
|
|
3094
3122
|
messages.push(`☢️ 【辐射】:当前${currentLayers}层,护甲值减少${armorReduction.toFixed(2)}`);
|
|
3095
3123
|
}
|
|
3096
3124
|
let targetUpdates = null;
|
|
3097
|
-
if (weaponName === "伽马枪" &&
|
|
3098
|
-
|
|
3099
|
-
|
|
3125
|
+
if (weaponName === "伽马枪" && !targetBoss.tags.includes("机械") && targetBoss.tags.includes("生物")) {
|
|
3126
|
+
const hasRadiationCore = equippedWeapon?.installedMods?.some(
|
|
3127
|
+
(mod) => mod.name === "辐射充能核心"
|
|
3128
|
+
);
|
|
3129
|
+
const layerIncrement = hasRadiationCore ? 2 : 1;
|
|
3100
3130
|
targetUpdates = {
|
|
3101
3131
|
name: targetBoss.name,
|
|
3102
3132
|
updates: {
|
|
3103
|
-
radiationLayersChange:
|
|
3104
|
-
// 辐射层数增加1
|
|
3133
|
+
radiationLayersChange: layerIncrement
|
|
3105
3134
|
}
|
|
3106
3135
|
};
|
|
3107
|
-
|
|
3108
|
-
|
|
3136
|
+
messages.push(
|
|
3137
|
+
`☢️ 【伽马枪】武器效果:获得${layerIncrement}层「辐射」并削减${(layerIncrement * 0.05).toFixed(2)}护甲值`
|
|
3138
|
+
);
|
|
3109
3139
|
layerAdded = true;
|
|
3110
3140
|
}
|
|
3111
3141
|
return {
|
|
@@ -3113,7 +3143,6 @@ var BattleEffectProcessor = {
|
|
|
3113
3143
|
targetUpdates,
|
|
3114
3144
|
armorReduction,
|
|
3115
3145
|
layerAdded
|
|
3116
|
-
// 返回层数增加标记
|
|
3117
3146
|
};
|
|
3118
3147
|
}, "handleRadiationEffect"),
|
|
3119
3148
|
// 统一的寒冷效果处理函数
|
|
@@ -3974,7 +4003,7 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
|
|
|
3974
4003
|
updateStatsByName(psychicForgeResult.targetUpdates.name, psychicForgeResult.targetUpdates.updates);
|
|
3975
4004
|
}
|
|
3976
4005
|
}
|
|
3977
|
-
const radiationResult = BattleEffectProcessor.handleRadiationEffect(targetBoss, weaponName);
|
|
4006
|
+
const radiationResult = BattleEffectProcessor.handleRadiationEffect(targetBoss, weaponName, equippedWeapon);
|
|
3978
4007
|
if (radiationResult) {
|
|
3979
4008
|
messages.push(...radiationResult.messages);
|
|
3980
4009
|
if (radiationResult.targetUpdates) {
|
|
@@ -4379,6 +4408,54 @@ var passiveConfig = {
|
|
|
4379
4408
|
"孵化": {
|
|
4380
4409
|
type: "",
|
|
4381
4410
|
description: "每受到10次攻击,如果没有存活的巢穴子代,则随机孵化1只巢穴子代(巢穴雷兽,巢穴战士,巢穴甲虫)"
|
|
4411
|
+
},
|
|
4412
|
+
"基因变异": {
|
|
4413
|
+
type: "",
|
|
4414
|
+
description: "移除孤立无援状态;每受击3次随机获得1个基因,累计获得4个基因后再次触发则移除全部基因"
|
|
4415
|
+
},
|
|
4416
|
+
"优化冗余片段": {
|
|
4417
|
+
type: "",
|
|
4418
|
+
description: ""
|
|
4419
|
+
},
|
|
4420
|
+
"开天眼": {
|
|
4421
|
+
type: "",
|
|
4422
|
+
description: ""
|
|
4423
|
+
},
|
|
4424
|
+
"环境适应": {
|
|
4425
|
+
type: "",
|
|
4426
|
+
description: ""
|
|
4427
|
+
},
|
|
4428
|
+
"加快分化": {
|
|
4429
|
+
type: "",
|
|
4430
|
+
description: ""
|
|
4431
|
+
},
|
|
4432
|
+
"耐力强化": {
|
|
4433
|
+
type: "",
|
|
4434
|
+
description: ""
|
|
4435
|
+
},
|
|
4436
|
+
"稳定DNA": {
|
|
4437
|
+
type: "",
|
|
4438
|
+
description: ""
|
|
4439
|
+
},
|
|
4440
|
+
"增厚甲壳": {
|
|
4441
|
+
type: "",
|
|
4442
|
+
description: ""
|
|
4443
|
+
},
|
|
4444
|
+
"质粒增殖": {
|
|
4445
|
+
type: "",
|
|
4446
|
+
description: ""
|
|
4447
|
+
},
|
|
4448
|
+
"加速代谢": {
|
|
4449
|
+
type: "",
|
|
4450
|
+
description: ""
|
|
4451
|
+
},
|
|
4452
|
+
"组织增生": {
|
|
4453
|
+
type: "",
|
|
4454
|
+
description: ""
|
|
4455
|
+
},
|
|
4456
|
+
"模仿生物签名": {
|
|
4457
|
+
type: "",
|
|
4458
|
+
description: ""
|
|
4382
4459
|
}
|
|
4383
4460
|
};
|
|
4384
4461
|
|
|
@@ -5209,7 +5286,8 @@ __name(calculateCrit, "calculateCrit");
|
|
|
5209
5286
|
async function calculateTagMultiplier(weaponData, tags, equippedWeapon) {
|
|
5210
5287
|
const MOD_EFFECTS = [
|
|
5211
5288
|
{ mod: "助燃核心", tag: "惧热", value: 3 },
|
|
5212
|
-
{ mod: "助燃核心", tag: "生物", value: 2 }
|
|
5289
|
+
{ mod: "助燃核心", tag: "生物", value: 2 },
|
|
5290
|
+
{ mod: "辐射充能核心", tag: "生物", value: 1.5 }
|
|
5213
5291
|
];
|
|
5214
5292
|
let totalAdditive = 0;
|
|
5215
5293
|
for (const tag of tags) {
|
|
@@ -5242,6 +5320,21 @@ function calculateModifiers(equippedWeapon, weaponName) {
|
|
|
5242
5320
|
totalModAdd += bonusDamage;
|
|
5243
5321
|
modMessages.push(`🛠️ 【微型聚变核心】:攻击伤害+${(bonusDamage * 100).toFixed(0)}%`);
|
|
5244
5322
|
}
|
|
5323
|
+
if (weaponName === "M134轮转机枪") {
|
|
5324
|
+
const baseBonusPerStack = 0.025;
|
|
5325
|
+
const currentStacks = equippedWeapon.comboCount || 0;
|
|
5326
|
+
const hasPlasmaBearing = equippedWeapon.installedMods?.includes("等离子轴承");
|
|
5327
|
+
const bonusPerStack = hasPlasmaBearing ? baseBonusPerStack * 2 : baseBonusPerStack;
|
|
5328
|
+
const rawStacksBonus = currentStacks * bonusPerStack;
|
|
5329
|
+
const maxBonus = 0.5;
|
|
5330
|
+
const stacksBonus = Math.min(rawStacksBonus, maxBonus);
|
|
5331
|
+
totalModAdd += stacksBonus;
|
|
5332
|
+
let stacksMessage = `🔫 【横冲直撞】:连续攻击${currentStacks}次,伤害增加${(stacksBonus * 100).toFixed(1)}%`;
|
|
5333
|
+
if (rawStacksBonus >= maxBonus) {
|
|
5334
|
+
stacksMessage += ` (已达上限)`;
|
|
5335
|
+
}
|
|
5336
|
+
modMessages.push(stacksMessage);
|
|
5337
|
+
}
|
|
5245
5338
|
return {
|
|
5246
5339
|
totalModAdd,
|
|
5247
5340
|
modMessages
|
|
@@ -5366,13 +5459,17 @@ async function handleBossDefeatRewards(ctx, targetBoss) {
|
|
|
5366
5459
|
return { rewardMessages };
|
|
5367
5460
|
}
|
|
5368
5461
|
const handles = damageRecords.map((r) => r.handle);
|
|
5462
|
+
const careerData = await ctx.database.get("ggcevo_careers", {
|
|
5463
|
+
handle: { $in: handles }
|
|
5464
|
+
});
|
|
5465
|
+
const groupMap = new Map(careerData.map((c) => [c.handle, c.group]));
|
|
5466
|
+
const pirateRedcrystalRewards = /* @__PURE__ */ new Map();
|
|
5369
5467
|
const doubleWishRecords = await ctx.database.get("ggcevo_wish", {
|
|
5370
5468
|
handle: { $in: handles },
|
|
5371
5469
|
wishname: "精灵双倍",
|
|
5372
5470
|
startTime: { $lte: /* @__PURE__ */ new Date() },
|
|
5373
5471
|
endTime: { $gte: /* @__PURE__ */ new Date() },
|
|
5374
5472
|
isused: false
|
|
5375
|
-
// 只查询未使用过的双倍祈愿
|
|
5376
5473
|
});
|
|
5377
5474
|
const doubleWishIds = doubleWishRecords.map((r) => r.id);
|
|
5378
5475
|
const doubleWishHandles = new Set(doubleWishRecords.map((r) => r.handle));
|
|
@@ -5408,7 +5505,6 @@ async function handleBossDefeatRewards(ctx, targetBoss) {
|
|
|
5408
5505
|
gold,
|
|
5409
5506
|
playerName: record.playerName,
|
|
5410
5507
|
hasDoubleWish
|
|
5411
|
-
// 标记该记录使用了双倍祈愿
|
|
5412
5508
|
};
|
|
5413
5509
|
rewardMap.set(record.handle, reward);
|
|
5414
5510
|
const bonusNote = hasDoubleWish ? " (🧝♀ 精灵双倍祈愿生效)" : "";
|
|
@@ -5416,9 +5512,21 @@ async function handleBossDefeatRewards(ctx, targetBoss) {
|
|
|
5416
5512
|
`${rank}. ${record.playerName}`,
|
|
5417
5513
|
` 获得奖励: ${guguCoins} 咕咕币 + ${gold} 金币${bonusNote}`
|
|
5418
5514
|
);
|
|
5515
|
+
const group = groupMap.get(record.handle);
|
|
5516
|
+
if (group === "辛迪加海盗") {
|
|
5517
|
+
let redcrystal = 0;
|
|
5518
|
+
if (rank === 1) redcrystal = 30;
|
|
5519
|
+
else if (rank === 2) redcrystal = 25;
|
|
5520
|
+
else if (rank === 3) redcrystal = 20;
|
|
5521
|
+
else if (rank <= 10) redcrystal = 15;
|
|
5522
|
+
else if (rank <= 20) redcrystal = 10;
|
|
5523
|
+
pirateRedcrystalRewards.set(record.handle, redcrystal);
|
|
5524
|
+
rewardMessages.push(` 辛迪加海盗奖励: ${redcrystal} 红晶`);
|
|
5525
|
+
}
|
|
5419
5526
|
});
|
|
5420
5527
|
const others = damageRecords.slice(20);
|
|
5421
5528
|
const doubleWishOthers = [];
|
|
5529
|
+
const pirateOtherRewards = [];
|
|
5422
5530
|
if (others.length > 0) {
|
|
5423
5531
|
others.forEach((record) => {
|
|
5424
5532
|
let guguCoins = 3;
|
|
@@ -5433,12 +5541,20 @@ async function handleBossDefeatRewards(ctx, targetBoss) {
|
|
|
5433
5541
|
gold
|
|
5434
5542
|
});
|
|
5435
5543
|
}
|
|
5544
|
+
const group = groupMap.get(record.handle);
|
|
5545
|
+
if (group === "辛迪加海盗") {
|
|
5546
|
+
const redcrystal = 3;
|
|
5547
|
+
pirateRedcrystalRewards.set(record.handle, redcrystal);
|
|
5548
|
+
pirateOtherRewards.push({
|
|
5549
|
+
playerName: record.playerName,
|
|
5550
|
+
redcrystal
|
|
5551
|
+
});
|
|
5552
|
+
}
|
|
5436
5553
|
rewardMap.set(record.handle, {
|
|
5437
5554
|
guguCoins,
|
|
5438
5555
|
gold,
|
|
5439
5556
|
playerName: record.playerName,
|
|
5440
5557
|
hasDoubleWish
|
|
5441
|
-
// 标记该记录使用了双倍祈愿
|
|
5442
5558
|
});
|
|
5443
5559
|
});
|
|
5444
5560
|
rewardMessages.push(`其他参与者获得基础奖励: 3 咕咕币 + 500 金币`);
|
|
@@ -5451,6 +5567,9 @@ async function handleBossDefeatRewards(ctx, targetBoss) {
|
|
|
5451
5567
|
});
|
|
5452
5568
|
}
|
|
5453
5569
|
}
|
|
5570
|
+
if (pirateOtherRewards.length > 0) {
|
|
5571
|
+
rewardMessages.push(`🏴☠️ 辛迪加海盗成员获得额外参与者奖励: ${pirateOtherRewards.length} 位成员每人获得 3 红晶`);
|
|
5572
|
+
}
|
|
5454
5573
|
await ctx.database.withTransaction(async () => {
|
|
5455
5574
|
for (const [handle, reward] of rewardMap) {
|
|
5456
5575
|
const [signData] = await ctx.database.get("ggcevo_sign", { handle });
|
|
@@ -5468,10 +5587,18 @@ async function handleBossDefeatRewards(ctx, targetBoss) {
|
|
|
5468
5587
|
quantity: (backpackData?.quantity || 0) + reward.guguCoins
|
|
5469
5588
|
}], ["handle", "itemId"]);
|
|
5470
5589
|
}
|
|
5590
|
+
for (const [handle, redcrystal] of pirateRedcrystalRewards) {
|
|
5591
|
+
const [career] = await ctx.database.get("ggcevo_careers", { handle });
|
|
5592
|
+
if (career) {
|
|
5593
|
+
await ctx.database.upsert("ggcevo_careers", [{
|
|
5594
|
+
handle,
|
|
5595
|
+
redcrystal: (career?.redcrystal || 0) + redcrystal
|
|
5596
|
+
}], ["handle"]);
|
|
5597
|
+
}
|
|
5598
|
+
}
|
|
5471
5599
|
if (doubleWishIds.length > 0) {
|
|
5472
5600
|
await ctx.database.set("ggcevo_wish", { id: { $in: doubleWishIds } }, {
|
|
5473
5601
|
isused: true
|
|
5474
|
-
// 将使用过的双倍祈愿标记为已使用
|
|
5475
5602
|
});
|
|
5476
5603
|
}
|
|
5477
5604
|
});
|
|
@@ -7926,7 +8053,7 @@ ${protectionList}
|
|
|
7926
8053
|
result.push(`⚡ 加成效果:`);
|
|
7927
8054
|
result.push(...bonusEffects);
|
|
7928
8055
|
}
|
|
7929
|
-
result.push(`📅 剩余挑战次数:${
|
|
8056
|
+
result.push(`📅 剩余挑战次数:${dailyPKLimit - (initiatorPK.todayCount + 1)}`);
|
|
7930
8057
|
return result.join("\n");
|
|
7931
8058
|
} catch (error) {
|
|
7932
8059
|
console.error("PK系统异常:", error);
|
|
@@ -8637,7 +8764,11 @@ ${validTypes.join("、")}`;
|
|
|
8637
8764
|
await updateSignRecord(ctx, handle, finalReward);
|
|
8638
8765
|
const taskUpdates = [];
|
|
8639
8766
|
if (primaryAttackResult.radiationApplied) {
|
|
8640
|
-
|
|
8767
|
+
const hasRadiationCore = equippedWeapon.installedMods?.some(
|
|
8768
|
+
(mod) => mod.name === "辐射充能核心"
|
|
8769
|
+
);
|
|
8770
|
+
const count = hasRadiationCore ? 2 : 1;
|
|
8771
|
+
taskUpdates.push({ taskId: 1, count });
|
|
8641
8772
|
}
|
|
8642
8773
|
if (primaryAttackResult.freezing) {
|
|
8643
8774
|
taskUpdates.push({ taskId: 2, count: 1 });
|
package/lib/weapons.d.ts
CHANGED
|
@@ -472,4 +472,16 @@ export declare const modConfig: {
|
|
|
472
472
|
exclusiveTo: string;
|
|
473
473
|
isExclusive: boolean;
|
|
474
474
|
};
|
|
475
|
+
辐射充能核心: {
|
|
476
|
+
cost: number;
|
|
477
|
+
effect: string;
|
|
478
|
+
exclusiveTo: string;
|
|
479
|
+
isExclusive: boolean;
|
|
480
|
+
};
|
|
481
|
+
等离子轴承: {
|
|
482
|
+
cost: number;
|
|
483
|
+
effect: string;
|
|
484
|
+
exclusiveTo: string;
|
|
485
|
+
isExclusive: boolean;
|
|
486
|
+
};
|
|
475
487
|
};
|