koishi-plugin-ggcevo-game 1.4.83 → 1.4.85
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 -0
- package/lib/boss/attackhandling.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +47 -23
- package/lib/tasks.d.ts +11 -3
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ export declare function handlePrimaryAttack(ctx: Context, session: any, handle:
|
|
|
13
13
|
bileStacks: boolean;
|
|
14
14
|
pulseApplied: boolean;
|
|
15
15
|
arcApplied: boolean;
|
|
16
|
+
pulseGrenadeTriggered: boolean;
|
|
16
17
|
}>;
|
|
17
18
|
export declare function handleScatterAttack(ctx: Context, session: any, handle: string, config: Config, equippedWeapon: any, targetBoss: any, weaponName: string, activeBosses: any[], careerData: any): Promise<{
|
|
18
19
|
scatterEffectMessages: string[];
|
package/lib/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export interface Config {
|
|
|
15
15
|
sameOpponentLimit: boolean;
|
|
16
16
|
maxDailyBeChallenged: number;
|
|
17
17
|
unlimitedBossAttack: boolean;
|
|
18
|
+
pointBonusEnabled: boolean;
|
|
18
19
|
}
|
|
19
20
|
export declare const Config: Schema<Config>;
|
|
20
21
|
export declare function apply(ctx: Context, config: Config): void;
|
package/lib/index.js
CHANGED
|
@@ -1116,7 +1116,7 @@ var Tasklist = {
|
|
|
1116
1116
|
id: 1,
|
|
1117
1117
|
type: "可重复任务",
|
|
1118
1118
|
target: 1,
|
|
1119
|
-
price:
|
|
1119
|
+
price: 75,
|
|
1120
1120
|
redCrystalCost: 0,
|
|
1121
1121
|
condition: "使用【伽马枪】攻击目标并成功增加其辐射层数"
|
|
1122
1122
|
},
|
|
@@ -1140,7 +1140,7 @@ var Tasklist = {
|
|
|
1140
1140
|
id: 4,
|
|
1141
1141
|
type: "可重复任务",
|
|
1142
1142
|
target: 1,
|
|
1143
|
-
price:
|
|
1143
|
+
price: 100,
|
|
1144
1144
|
redCrystalCost: 0,
|
|
1145
1145
|
condition: "使用【脉冲扰乱枪】攻击目标并成功减少其技能层数"
|
|
1146
1146
|
},
|
|
@@ -1148,9 +1148,17 @@ var Tasklist = {
|
|
|
1148
1148
|
id: 5,
|
|
1149
1149
|
type: "可重复任务",
|
|
1150
1150
|
target: 1,
|
|
1151
|
-
price:
|
|
1151
|
+
price: 100,
|
|
1152
1152
|
redCrystalCost: 0,
|
|
1153
1153
|
condition: "使用【弧焊枪】或【DG-3电弧步枪】攻击目标并成功消耗其能量"
|
|
1154
|
+
},
|
|
1155
|
+
"破甲先锋": {
|
|
1156
|
+
id: 6,
|
|
1157
|
+
type: "可重复任务",
|
|
1158
|
+
target: 1,
|
|
1159
|
+
price: 150,
|
|
1160
|
+
redCrystalCost: 0,
|
|
1161
|
+
condition: "使用【M4AE脉冲步枪】攻击目标并成功削减其护甲"
|
|
1154
1162
|
}
|
|
1155
1163
|
};
|
|
1156
1164
|
|
|
@@ -3663,6 +3671,7 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
|
|
|
3663
3671
|
let bileDetonationTrigger = false;
|
|
3664
3672
|
let spawnNewBossMarks = [];
|
|
3665
3673
|
let armor = 0;
|
|
3674
|
+
let pulseGrenadeTriggered = false;
|
|
3666
3675
|
const weaponData = weaponConfig[weaponName] || { type: "" };
|
|
3667
3676
|
let doubleAstralWind = false;
|
|
3668
3677
|
let isolatedImmunityMark = false;
|
|
@@ -3736,6 +3745,7 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
|
|
|
3736
3745
|
const pulseEffect = BattleEffectProcessor.handlePulseRifleEffect(weaponName, targetBoss);
|
|
3737
3746
|
if (pulseEffect) {
|
|
3738
3747
|
messages.push(...pulseEffect.messages);
|
|
3748
|
+
pulseGrenadeTriggered = pulseEffect.pulseGrenadeTriggered;
|
|
3739
3749
|
if (pulseEffect.targetUpdates) {
|
|
3740
3750
|
updateStatsByName(pulseEffect.targetUpdates.name, pulseEffect.targetUpdates.updates);
|
|
3741
3751
|
}
|
|
@@ -3941,7 +3951,7 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
|
|
|
3941
3951
|
let adjustedNerfMultiplier = totalNerfMultiplier * (1 - ignoreRate);
|
|
3942
3952
|
const damageMultiplier = 1 + totalBuffMultiplier - adjustedNerfMultiplier;
|
|
3943
3953
|
finalDamage = damage * damageMultiplier;
|
|
3944
|
-
if (
|
|
3954
|
+
if (pulseGrenadeTriggered || fusionEffect?.fusionExplosionTriggered) {
|
|
3945
3955
|
finalDamage *= 1.5;
|
|
3946
3956
|
}
|
|
3947
3957
|
if (hasCrit) {
|
|
@@ -4034,8 +4044,9 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
|
|
|
4034
4044
|
energyDrained,
|
|
4035
4045
|
layerReduced,
|
|
4036
4046
|
bileDetonationTrigger,
|
|
4037
|
-
spawnNewBossMarks
|
|
4047
|
+
spawnNewBossMarks,
|
|
4038
4048
|
// +++ 新增生成标记 +++
|
|
4049
|
+
pulseGrenadeTriggered
|
|
4039
4050
|
};
|
|
4040
4051
|
}
|
|
4041
4052
|
__name(applyPassiveEffects, "applyPassiveEffects");
|
|
@@ -4535,11 +4546,14 @@ for (const key in weaponConfig) {
|
|
|
4535
4546
|
weaponConfigById[weaponConfig[key].id] = weaponConfig[key];
|
|
4536
4547
|
}
|
|
4537
4548
|
async function calculateTotalPower(ctx, config, handle) {
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4549
|
+
let baseRank = 0;
|
|
4550
|
+
if (config.pointBonusEnabled) {
|
|
4551
|
+
const [rankData] = await ctx.database.get("ggcevo_rank", {
|
|
4552
|
+
handle,
|
|
4553
|
+
rankseason: config.rankseason
|
|
4554
|
+
});
|
|
4555
|
+
baseRank = rankData?.rank || 0;
|
|
4556
|
+
}
|
|
4543
4557
|
let total = baseRank;
|
|
4544
4558
|
const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
|
|
4545
4559
|
const career = careerData?.career;
|
|
@@ -5051,9 +5065,12 @@ async function calculateTotalDamage(ctx, session, config, equippedWeapon, target
|
|
|
5051
5065
|
if (careerAddResult.message) effectMessage.push(careerAddResult.message);
|
|
5052
5066
|
const wishAddResult = await calculateWishAdditive(ctx, handle, equippedWeapon);
|
|
5053
5067
|
if (wishAddResult.message) effectMessage.push(wishAddResult.message);
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5068
|
+
let rankAddResult = { value: 0, message: "" };
|
|
5069
|
+
if (config.pointBonusEnabled) {
|
|
5070
|
+
const [rankRecord] = await ctx.database.get("ggcevo_rank", { handle, rankseason: config.rankseason });
|
|
5071
|
+
const rankAddResult2 = calculateRankAdditive(rankRecord);
|
|
5072
|
+
if (rankAddResult2.message) effectMessage.push(rankAddResult2.message);
|
|
5073
|
+
}
|
|
5057
5074
|
const otherAdditive = careerAddResult.value + wishAddResult.value + rankAddResult.value;
|
|
5058
5075
|
const otherMultiplier = 1 + otherAdditive;
|
|
5059
5076
|
let finalDamage = baseDamage * tagMultiplier * modMultiplier * otherMultiplier;
|
|
@@ -5087,16 +5104,16 @@ async function calculateCrit(ctx, handle, equippedWeapon, weaponName) {
|
|
|
5087
5104
|
if (equippedWeapon.installedMods?.includes("棱镜超载核心") && modConfig["棱镜超载核心"]?.exclusiveTo === weaponName && pityCounter >= 4) {
|
|
5088
5105
|
return {
|
|
5089
5106
|
hasCrit: true,
|
|
5090
|
-
critSources: ["⚙️
|
|
5107
|
+
critSources: ["⚙️ 【棱镜超载核心】:保底暴击"]
|
|
5091
5108
|
};
|
|
5092
5109
|
}
|
|
5093
5110
|
if (equippedWeapon.installedMods?.includes("棱镜水晶")) {
|
|
5094
5111
|
critRate += 10;
|
|
5095
|
-
critSources.push("⚙️
|
|
5112
|
+
critSources.push("⚙️ 【棱镜水晶】:暴击率+10%");
|
|
5096
5113
|
}
|
|
5097
5114
|
if (equippedWeapon.installedMods?.includes("棱镜超载核心") && modConfig["棱镜超载核心"]?.exclusiveTo === weaponName) {
|
|
5098
5115
|
critRate += 20;
|
|
5099
|
-
critSources.push("⚙️
|
|
5116
|
+
critSources.push("⚙️ 【棱镜超载核心】:暴击率+20%");
|
|
5100
5117
|
}
|
|
5101
5118
|
const [critRhythm] = await ctx.database.get("ggcevo_wish", {
|
|
5102
5119
|
handle,
|
|
@@ -5416,7 +5433,8 @@ async function handlePrimaryAttack(ctx, session, handle, config, equippedWeapon,
|
|
|
5416
5433
|
freezing: EffectProcessor.coldLayerAdded,
|
|
5417
5434
|
bileStacks: EffectProcessor.bileDetonationTrigger,
|
|
5418
5435
|
pulseApplied: EffectProcessor.layerReduced,
|
|
5419
|
-
arcApplied: EffectProcessor.energyDrained
|
|
5436
|
+
arcApplied: EffectProcessor.energyDrained,
|
|
5437
|
+
pulseGrenadeTriggered: EffectProcessor.pulseGrenadeTriggered
|
|
5420
5438
|
};
|
|
5421
5439
|
}
|
|
5422
5440
|
__name(handlePrimaryAttack, "handlePrimaryAttack");
|
|
@@ -5428,13 +5446,13 @@ async function handleScatterAttack(ctx, session, handle, config, equippedWeapon,
|
|
|
5428
5446
|
const taskUpdates = [];
|
|
5429
5447
|
let scatterRatio = 0;
|
|
5430
5448
|
if (weaponName === "碎骨步枪") {
|
|
5431
|
-
scatterEffectMessages.push("
|
|
5449
|
+
scatterEffectMessages.push("【光束曲射晶片】触发散射攻击!");
|
|
5432
5450
|
scatterRatio = 1;
|
|
5433
5451
|
} else if (weaponName === "中子步枪") {
|
|
5434
|
-
scatterEffectMessages.push("
|
|
5452
|
+
scatterEffectMessages.push("【中子步枪】触发散射攻击!");
|
|
5435
5453
|
scatterRatio = 1.2;
|
|
5436
5454
|
} else if (weaponName === "DG-3电弧步枪") {
|
|
5437
|
-
scatterEffectMessages.push("
|
|
5455
|
+
scatterEffectMessages.push("【DG-3电弧步枪】触发散射攻击!");
|
|
5438
5456
|
scatterRatio = 0.3;
|
|
5439
5457
|
}
|
|
5440
5458
|
for (const secondaryTarget of secondaryTargets) {
|
|
@@ -5472,6 +5490,9 @@ async function handleScatterAttack(ctx, session, handle, config, equippedWeapon,
|
|
|
5472
5490
|
if (EffectProcessor.energyDrained) {
|
|
5473
5491
|
taskUpdates.push({ taskId: 5, count: 1 });
|
|
5474
5492
|
}
|
|
5493
|
+
if (EffectProcessor.pulseGrenadeTriggered) {
|
|
5494
|
+
taskUpdates.push({ taskId: 6, count: 1 });
|
|
5495
|
+
}
|
|
5475
5496
|
const isDead = currentHP <= 0;
|
|
5476
5497
|
scatterEffectMessages.push(...EffectProcessor.messages.map((m) => ` 对 ${secondaryTarget.name} ${m}`));
|
|
5477
5498
|
if (isDead) {
|
|
@@ -5872,7 +5893,8 @@ var Config = import_koishi.Schema.intersect([
|
|
|
5872
5893
|
import_koishi.Schema.object({
|
|
5873
5894
|
rankseason: import_koishi.Schema.string().description("当前赛季名称(影响兑换系统)").default("S1"),
|
|
5874
5895
|
autorank: import_koishi.Schema.boolean().description("自动同步天梯数据").default(false),
|
|
5875
|
-
ignoreGlobalLimit: import_koishi.Schema.boolean().description("禁用全局兑换限制(谨慎开启)").default(false)
|
|
5896
|
+
ignoreGlobalLimit: import_koishi.Schema.boolean().description("禁用全局兑换限制(谨慎开启)").default(false),
|
|
5897
|
+
pointBonusEnabled: import_koishi.Schema.boolean().description("是否开启积分加成功能").default(false)
|
|
5876
5898
|
}).description("赛季配置"),
|
|
5877
5899
|
// 对战系统配置组
|
|
5878
5900
|
import_koishi.Schema.object({
|
|
@@ -8533,6 +8555,9 @@ ${validTypes.join("、")}`;
|
|
|
8533
8555
|
if (primaryAttackResult.arcApplied) {
|
|
8534
8556
|
taskUpdates.push({ taskId: 5, count: 1 });
|
|
8535
8557
|
}
|
|
8558
|
+
if (primaryAttackResult.pulseGrenadeTriggered) {
|
|
8559
|
+
taskUpdates.push({ taskId: 6, count: 1 });
|
|
8560
|
+
}
|
|
8536
8561
|
if (scatterResult && scatterResult.taskUpdates) {
|
|
8537
8562
|
scatterResult.taskUpdates.forEach((update) => {
|
|
8538
8563
|
taskUpdates.push(update);
|
|
@@ -9929,8 +9954,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
9929
9954
|
}
|
|
9930
9955
|
}
|
|
9931
9956
|
response.push(
|
|
9932
|
-
`📊 累计完成次数: ${newCompletions}
|
|
9933
|
-
`⚙️ 剩余进度点数: ${remainingProgress}/${taskConfig.target}`
|
|
9957
|
+
`📊 累计完成次数: ${newCompletions}次`
|
|
9934
9958
|
);
|
|
9935
9959
|
return response.join("\n");
|
|
9936
9960
|
} catch (error) {
|
package/lib/tasks.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const Tasklist: {
|
|
|
3
3
|
readonly id: 1;
|
|
4
4
|
readonly type: "可重复任务";
|
|
5
5
|
readonly target: 1;
|
|
6
|
-
readonly price:
|
|
6
|
+
readonly price: 75;
|
|
7
7
|
readonly redCrystalCost: 0;
|
|
8
8
|
readonly condition: "使用【伽马枪】攻击目标并成功增加其辐射层数";
|
|
9
9
|
};
|
|
@@ -27,7 +27,7 @@ export declare const Tasklist: {
|
|
|
27
27
|
readonly id: 4;
|
|
28
28
|
readonly type: "可重复任务";
|
|
29
29
|
readonly target: 1;
|
|
30
|
-
readonly price:
|
|
30
|
+
readonly price: 100;
|
|
31
31
|
readonly redCrystalCost: 0;
|
|
32
32
|
readonly condition: "使用【脉冲扰乱枪】攻击目标并成功减少其技能层数";
|
|
33
33
|
};
|
|
@@ -35,8 +35,16 @@ export declare const Tasklist: {
|
|
|
35
35
|
readonly id: 5;
|
|
36
36
|
readonly type: "可重复任务";
|
|
37
37
|
readonly target: 1;
|
|
38
|
-
readonly price:
|
|
38
|
+
readonly price: 100;
|
|
39
39
|
readonly redCrystalCost: 0;
|
|
40
40
|
readonly condition: "使用【弧焊枪】或【DG-3电弧步枪】攻击目标并成功消耗其能量";
|
|
41
41
|
};
|
|
42
|
+
readonly 破甲先锋: {
|
|
43
|
+
readonly id: 6;
|
|
44
|
+
readonly type: "可重复任务";
|
|
45
|
+
readonly target: 1;
|
|
46
|
+
readonly price: 150;
|
|
47
|
+
readonly redCrystalCost: 0;
|
|
48
|
+
readonly condition: "使用【M4AE脉冲步枪】攻击目标并成功削减其护甲";
|
|
49
|
+
};
|
|
42
50
|
};
|