koishi-plugin-ggcevo-game 1.4.30 → 1.4.31

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.
@@ -11,6 +11,8 @@ export declare function handlePrimaryAttack(ctx: Context, session: any, config:
11
11
  radiationApplied: boolean;
12
12
  freezing: boolean;
13
13
  bileStacks: any;
14
+ pulseApplied: boolean;
15
+ arcApplied: boolean;
14
16
  }>;
15
17
  export declare function handleScatterAttack(ctx: Context, session: any, config: Config, handle: string, equippedWeapon: any, targetBoss: any, weaponName: string, weaponData: any, activeBosses: any[], bossGroup: any): Promise<{
16
18
  scatterEffectMessages: string[];
@@ -105,6 +105,7 @@ export declare const PassiveHandler: {
105
105
  }>;
106
106
  handleArcWelderEffect: (ctx: Context, targetBoss: any, weaponName: string) => Promise<{
107
107
  messages: string[];
108
+ arcApplied: boolean;
108
109
  }>;
109
110
  handleArcRifleEffect: (ctx: Context, targetBoss: any, weaponName: string, messages: string[]) => Promise<{
110
111
  drainAmount: number;
@@ -181,6 +182,7 @@ export declare const PassiveHandler: {
181
182
  }>;
182
183
  handlePulseDisruptor: (ctx: Context, targetBoss: any, weaponName: string) => Promise<{
183
184
  messages: string[];
185
+ pulseApplied: boolean;
184
186
  }>;
185
187
  handleStellarWind: (ctx: Context, targetBoss: any, initialDamage: number, currentHP: number, maxHP: number, activeBosses: any[], bossGroup: BossPoolItem) => Promise<{
186
188
  messages: string[];
@@ -235,6 +237,8 @@ export declare const PassiveHandler: {
235
237
  bileStacks?: undefined;
236
238
  radiationApplied?: undefined;
237
239
  freezing?: undefined;
240
+ pulseApplied?: undefined;
241
+ arcApplied?: undefined;
238
242
  } | {
239
243
  currentHP: any;
240
244
  messages: any;
@@ -243,6 +247,8 @@ export declare const PassiveHandler: {
243
247
  bileStacks: any;
244
248
  radiationApplied?: undefined;
245
249
  freezing?: undefined;
250
+ pulseApplied?: undefined;
251
+ arcApplied?: undefined;
246
252
  } | {
247
253
  currentHP: number;
248
254
  messages: string[];
@@ -251,6 +257,18 @@ export declare const PassiveHandler: {
251
257
  radiationApplied: boolean;
252
258
  freezing: boolean;
253
259
  bileStacks?: undefined;
260
+ pulseApplied?: undefined;
261
+ arcApplied?: undefined;
262
+ } | {
263
+ currentHP: number;
264
+ messages: string[];
265
+ skillUpdates: any[];
266
+ initialDamage: number;
267
+ radiationApplied: boolean;
268
+ freezing: boolean;
269
+ pulseApplied: boolean;
270
+ arcApplied: boolean;
271
+ bileStacks?: undefined;
254
272
  }>;
255
273
  applySkillUpdates: (ctx: Context, skillUpdates: any[]) => Promise<void>;
256
274
  };
package/lib/index.js CHANGED
@@ -1009,29 +1009,47 @@ var Tasklist = {
1009
1009
  "伽马辐射": {
1010
1010
  id: 1,
1011
1011
  type: "可重复任务",
1012
- description: "利用【伽马枪】武器对异形目标造成辐射伤害",
1012
+ description: "利用【伽马枪】武器对目标造成辐射伤害",
1013
1013
  target: 1,
1014
1014
  price: 50,
1015
1015
  redCrystalCost: 0,
1016
- condition: "使用伽马枪攻击异形并成功使辐射层数+1"
1016
+ condition: "使用伽马枪攻击目标并成功增加其辐射层数"
1017
1017
  },
1018
1018
  "绝对零度": {
1019
1019
  id: 2,
1020
1020
  type: "可重复任务",
1021
- description: "利用【零度之下】武器对异形目标造成寒冷伤害",
1021
+ description: "利用【零度之下】武器对目标造成寒冷伤害",
1022
1022
  target: 1,
1023
1023
  price: 50,
1024
1024
  redCrystalCost: 0,
1025
- condition: "使用零度之下攻击异形并成功使寒冷层数+1"
1025
+ condition: "使用零度之下攻击目标并成功增加其寒冷层数"
1026
1026
  },
1027
1027
  "胆汁引爆": {
1028
1028
  id: 3,
1029
1029
  type: "可重复任务",
1030
- description: "利用【焚烧枪】武器引爆异形目标的胆汁",
1030
+ description: "利用【焚烧枪】武器引爆目标的胆汁",
1031
1031
  target: 1,
1032
1032
  price: 200,
1033
1033
  redCrystalCost: 0,
1034
- condition: "使用焚烧枪攻击异形并成功引爆≥10层的胆汁"
1034
+ condition: "使用焚烧枪攻击异形并成功引爆其≥10层的胆汁"
1035
+ },
1036
+ "脉冲干扰": {
1037
+ id: 4,
1038
+ type: "可重复任务",
1039
+ description: "利用【脉冲扰乱枪】武器干扰目标的技能释放",
1040
+ target: 1,
1041
+ price: 75,
1042
+ redCrystalCost: 0,
1043
+ condition: "使用脉冲扰乱枪攻击异形并成功减少其技能层数"
1044
+ },
1045
+ "弧能消耗": {
1046
+ id: 5,
1047
+ type: "可重复任务",
1048
+ description: "利用【弧焊枪】武器消耗目标的能量",
1049
+ target: 1,
1050
+ price: 75,
1051
+ redCrystalCost: 0,
1052
+ condition: "使用弧焊枪攻击异形并成功消耗其能量"
1035
1053
  }
1036
1054
  };
1037
1055
 
@@ -2934,6 +2952,7 @@ var PassiveHandler = {
2934
2952
  if (weaponName !== "弧焊枪") return null;
2935
2953
  const currentEnergy = targetBoss.energy || 0;
2936
2954
  const messages = [];
2955
+ let arcApplied = false;
2937
2956
  if (currentEnergy > 0) {
2938
2957
  const energyDrain = Math.min(200, currentEnergy);
2939
2958
  const newEnergy = currentEnergy - energyDrain;
@@ -2942,11 +2961,12 @@ var PassiveHandler = {
2942
2961
  { name: targetBoss.name },
2943
2962
  { energy: newEnergy }
2944
2963
  );
2964
+ arcApplied = true;
2945
2965
  messages.push(`⚡ 【弧焊枪】武器效果:消耗目标200点能量`);
2946
2966
  } else {
2947
2967
  return null;
2948
2968
  }
2949
- return { messages };
2969
+ return { messages, arcApplied };
2950
2970
  }, "handleArcWelderEffect"),
2951
2971
  // 在 PassiveHandler 对象中添加新的处理函数
2952
2972
  handleArcRifleEffect: /* @__PURE__ */ __name(async function(ctx, targetBoss, weaponName, messages) {
@@ -3366,6 +3386,7 @@ var PassiveHandler = {
3366
3386
  return null;
3367
3387
  }
3368
3388
  const currentSkillCount = targetBoss.Skillcountpoints || 0;
3389
+ let pulseApplied = false;
3369
3390
  if (currentSkillCount <= 0) {
3370
3391
  return null;
3371
3392
  }
@@ -3375,11 +3396,12 @@ var PassiveHandler = {
3375
3396
  { name: targetBoss.name },
3376
3397
  { Skillcountpoints: newCount }
3377
3398
  );
3378
- targetBoss.Skillcountpoints = newCount;
3399
+ pulseApplied = true;
3379
3400
  return {
3380
3401
  messages: [
3381
- `⚡ 【脉冲扰乱枪】武器效果:使${targetBoss.name}的技能层数减少2层(当前${newCount}层)`
3382
- ]
3402
+ `⚡ 【脉冲扰乱枪】武器效果:使${targetBoss.name}的技能层数减少2层`
3403
+ ],
3404
+ pulseApplied
3383
3405
  };
3384
3406
  }, "handlePulseDisruptor"),
3385
3407
  // === 星界之风 ===
@@ -3742,6 +3764,8 @@ var PassiveHandler = {
3742
3764
  let nerfMultiplier = 0;
3743
3765
  let radiationApplied = false;
3744
3766
  let freezing = false;
3767
+ let pulseApplied = false;
3768
+ let arcApplied = false;
3745
3769
  let bileStacks = 0;
3746
3770
  const activeBosses = await ctx.database.get("ggcevo_boss", { isActive: true });
3747
3771
  const solarFlareResult = await this.handleSolarFlare(ctx, targetBoss, weaponName);
@@ -4056,10 +4080,12 @@ var PassiveHandler = {
4056
4080
  );
4057
4081
  if (pulseDisruptorResult) {
4058
4082
  messages.push(...pulseDisruptorResult.messages);
4083
+ pulseApplied = pulseDisruptorResult.pulseApplied;
4059
4084
  }
4060
4085
  const arcResult = await this.handleArcWelderEffect(ctx, targetBoss, weaponName);
4061
4086
  if (arcResult) {
4062
4087
  messages.push(...arcResult.messages);
4088
+ arcApplied = arcResult.arcApplied;
4063
4089
  }
4064
4090
  const arcRifleResult = await this.handleArcRifleEffect(ctx, targetBoss, weaponName, messages);
4065
4091
  if (arcRifleResult) {
@@ -4130,7 +4156,9 @@ var PassiveHandler = {
4130
4156
  initialDamage: finalDamage,
4131
4157
  radiationApplied,
4132
4158
  // 新增返回辐射应用标记
4133
- freezing
4159
+ freezing,
4160
+ pulseApplied,
4161
+ arcApplied
4134
4162
  };
4135
4163
  }, "handlePassives"),
4136
4164
  // 应用技能更新到数据库(优化合并同名boss的更新)
@@ -4371,7 +4399,9 @@ async function handlePrimaryAttack(ctx, session, config, handle, equippedWeapon,
4371
4399
  passiveMessages: passiveResult.messages,
4372
4400
  radiationApplied: passiveResult.radiationApplied,
4373
4401
  freezing: passiveResult.freezing,
4374
- bileStacks: passiveResult.bileStacks
4402
+ bileStacks: passiveResult.bileStacks,
4403
+ pulseApplied: passiveResult.pulseApplied,
4404
+ arcApplied: passiveResult.arcApplied
4375
4405
  };
4376
4406
  }
4377
4407
  __name(handlePrimaryAttack, "handlePrimaryAttack");
@@ -4427,6 +4457,12 @@ async function handleScatterAttack(ctx, session, config, handle, equippedWeapon,
4427
4457
  if (passiveResult.bileStacks >= 10) {
4428
4458
  taskUpdates.push({ taskId: 3, count: 1 });
4429
4459
  }
4460
+ if (passiveResult.pulseApplied) {
4461
+ taskUpdates.push({ taskId: 4, count: 1 });
4462
+ }
4463
+ if (passiveResult.arcApplied) {
4464
+ taskUpdates.push({ taskId: 5, count: 1 });
4465
+ }
4430
4466
  const isDead = newHP <= 0;
4431
4467
  await ctx.database.set("ggcevo_boss", { name: secondaryTarget.name }, {
4432
4468
  HP: Math.max(newHP, 0),
@@ -7256,6 +7292,12 @@ ${validTypes.join("、")}`;
7256
7292
  if (primaryAttackResult.bileStacks >= 10) {
7257
7293
  taskUpdates.push({ taskId: 3, count: 1 });
7258
7294
  }
7295
+ if (primaryAttackResult.pulseApplied) {
7296
+ taskUpdates.push({ taskId: 4, count: 1 });
7297
+ }
7298
+ if (primaryAttackResult.arcApplied) {
7299
+ taskUpdates.push({ taskId: 5, count: 1 });
7300
+ }
7259
7301
  if (scatterResult && scatterResult.taskUpdates) {
7260
7302
  scatterResult.taskUpdates.forEach((update) => {
7261
7303
  taskUpdates.push(update);
@@ -7334,7 +7376,7 @@ ${validTypes.join("、")}`;
7334
7376
  // 这里添加符号
7335
7377
  ] : [],
7336
7378
  `📊 理论伤害值:${damage}${hasCrit ? " (✨ 暴击)" : ""}`,
7337
- "💡 提示:使用 -t 重甲,生物(标签之间用英文逗号分隔) 添加测试标签"
7379
+ "💡 提示:添加测试标签: -t 重甲,生物(标签之间用英文逗号分隔)"
7338
7380
  ].filter((line) => line).join("\n");
7339
7381
  });
7340
7382
  ctx.command("ggcevo/伤害榜 [page]", "查看当前主宰伤害排名").usage("输入 伤害榜 [页码] 查看对应页的排行榜,每页10条").action(async (_, page) => {
package/lib/tasks.d.ts CHANGED
@@ -26,4 +26,22 @@ export declare const Tasklist: {
26
26
  redCrystalCost: number;
27
27
  condition: string;
28
28
  };
29
+ 脉冲干扰: {
30
+ id: number;
31
+ type: string;
32
+ description: string;
33
+ target: number;
34
+ price: number;
35
+ redCrystalCost: number;
36
+ condition: string;
37
+ };
38
+ 弧能消耗: {
39
+ id: number;
40
+ type: string;
41
+ description: string;
42
+ target: number;
43
+ price: number;
44
+ redCrystalCost: number;
45
+ condition: string;
46
+ };
29
47
  };
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.4.30",
4
+ "version": "1.4.31",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [