koishi-plugin-ggcevo-game 1.6.20 → 1.6.22

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 CHANGED
@@ -388,7 +388,7 @@ var weaponConfig = {
388
388
  damage: 90,
389
389
  armorDamageReduction: 0,
390
390
  description: "这是传说中的武器",
391
- specialeffect: "造成的30%伤害转化为火焰伤害;攻击时为目标附加2层[燃烧]效果,每层使目标受到火焰伤害时额外造成2点伤害(至多额外造成100点伤害)",
391
+ specialeffect: "造成的20%伤害转化为火焰伤害;攻击时为目标附加2层[燃烧]效果,每层使目标受到火焰伤害时额外造成2点伤害(至多额外造成100点伤害)",
392
392
  price: 6400,
393
393
  redCrystalCost: 200,
394
394
  isantiair: false,
@@ -599,7 +599,7 @@ var SyndicatedItems = {
599
599
  description: "非致命军用炸药",
600
600
  price: 75,
601
601
  redCrystalCost: 0,
602
- condition: "目标无建筑标签和重型标签",
602
+ condition: "无法对建筑目标,重型目标和具有免疫闪光技能的目标使用",
603
603
  effects: "使目标的技能层数减少10层"
604
604
  },
605
605
  "CRED-17": {
@@ -617,7 +617,7 @@ var SyndicatedItems = {
617
617
  description: "电磁脉冲干扰机械目标和灵能目标",
618
618
  price: 75,
619
619
  redCrystalCost: 0,
620
- condition: "目标拥有能量",
620
+ condition: "无法对没有能量的目标使用",
621
621
  effects: "消耗目标500点能量"
622
622
  },
623
623
  "MP3播放器": {
@@ -655,6 +655,24 @@ var SyndicatedItems = {
655
655
  redCrystalCost: 20,
656
656
  condition: "辛迪加海盗阵营",
657
657
  effects: "挖矿获得的金币收益提高10%;可使用红晶升级"
658
+ },
659
+ "莫洛托夫燃烧弹": {
660
+ id: 9,
661
+ type: "手榴弹",
662
+ description: "一种轻型手榴弹,含有易燃物质",
663
+ price: 0,
664
+ redCrystalCost: 0,
665
+ condition: "无法对免疫燃烧的目标使用",
666
+ effects: "使目标的燃烧层数增加5层"
667
+ },
668
+ "铝热炸弹": {
669
+ id: 10,
670
+ type: "爆破物",
671
+ description: "铝热炸弹能够轻易破坏安全门",
672
+ price: 0,
673
+ redCrystalCost: 0,
674
+ condition: "无法对空中目标使用",
675
+ effects: "造成100伤害;对建筑目标造成3倍伤害"
658
676
  }
659
677
  };
660
678
  var initDefaultItems = {
@@ -709,8 +727,8 @@ var itemConfig = {
709
727
  var spaceStationCrewConfig = [
710
728
  {
711
729
  professionName: "深空矿工",
712
- effect: "挖矿的收益提高50%",
713
- requirements: "挖矿累计收益达到500金币",
730
+ effect: "挖矿的金币收益提高50%",
731
+ requirements: "挖矿累计金币收益达到500金币",
714
732
  Jobtransfer: true,
715
733
  costcoins: 2e3
716
734
  },
@@ -751,7 +769,7 @@ var spaceStationCrewConfig = [
751
769
  },
752
770
  {
753
771
  professionName: "总工程师",
754
- effect: "探索获得的金币收益提高50%",
772
+ effect: "探索获得的金币收益提高50%;探索的成功率提高10%",
755
773
  requirements: "探索次数达到4次及以上",
756
774
  Jobtransfer: true,
757
775
  costcoins: 2e3
@@ -1305,7 +1323,7 @@ var Tasklist = {
1305
1323
  target: 1,
1306
1324
  price: 200,
1307
1325
  redCrystalCost: 0,
1308
- condition: "使用【焚烧枪】引爆具有10层及以上[灼烧粘液]的目标"
1326
+ condition: "使用【焚烧枪】或【龙息霰弹枪】引爆具有10层及以上[灼烧粘液]的目标"
1309
1327
  },
1310
1328
  "脉冲干扰": {
1311
1329
  id: 4,
@@ -1337,7 +1355,7 @@ var Tasklist = {
1337
1355
  target: 1,
1338
1356
  price: 25,
1339
1357
  redCrystalCost: 0,
1340
- condition: "使用【焚烧枪】或【龙息霰弹枪】攻击目标并成功增加其1层[燃烧]"
1358
+ condition: "使用【焚烧枪】或【龙息霰弹枪】攻击目标或对目标使用【莫洛托夫燃烧弹】并成功增加其1层[燃烧]"
1341
1359
  }
1342
1360
  };
1343
1361
 
@@ -2594,7 +2612,7 @@ var BattleEffectProcessor = {
2594
2612
  healAmount = damage;
2595
2613
  messages.push(`🔥 【火焰异形】生效:免疫火焰伤害并回复${healAmount}点生命值`);
2596
2614
  } else if (weaponName === "龙息霰弹枪") {
2597
- healAmount = Math.round(damage * 0.3);
2615
+ healAmount = Math.round(damage * 0.2);
2598
2616
  messages.push(`🔥 【火焰异形】生效:受到龙息霰弹枪的火焰伤害,回复${healAmount}点生命值`);
2599
2617
  }
2600
2618
  if (healAmount > 0) {
@@ -2636,7 +2654,7 @@ var BattleEffectProcessor = {
2636
2654
  }
2637
2655
  const currentStacks = targetBoss.skillStacks || 0;
2638
2656
  const maxStacks = 20;
2639
- const isFireDamage = weaponName === "焚烧枪";
2657
+ const isFireDamage = weaponName === "焚烧枪" || weaponName === "龙息霰弹枪";
2640
2658
  const updates = {};
2641
2659
  if (!isFireDamage && currentStacks < maxStacks) {
2642
2660
  updates.skillStacksChanged = 1;
@@ -4257,9 +4275,9 @@ var BattleEffectProcessor = {
4257
4275
  return null;
4258
4276
  }
4259
4277
  return {
4260
- nerfMultiplier: 0.3,
4278
+ nerfMultiplier: 0.2,
4261
4279
  messages: [
4262
- `🔥 【龙息霰弹枪】:${activeResistances.join("、")}免疫30%的火焰伤害`
4280
+ `🔥 【龙息霰弹枪】:${activeResistances.join("、")}免疫20%的火焰伤害`
4263
4281
  ]
4264
4282
  };
4265
4283
  }, "handleDragonBreathResistance")
@@ -5379,6 +5397,16 @@ var ggcevoUpdates = [
5379
5397
  - 修改了龙息霰弹枪的特殊效果
5380
5398
  - 下调了“烈火燎原”任务的奖励金币
5381
5399
  `.trim()
5400
+ },
5401
+ {
5402
+ version: "1.6.21",
5403
+ time: "2025-07-14",
5404
+ content: `
5405
+ - 增强了庞兽号歼星舰的反掠夺能力
5406
+ - 新增了莫洛托夫燃烧弹和铝热炸弹,可通过探索获得
5407
+ - 增强龙息霰弹枪特殊效果,并可引爆“灼烧粘液”
5408
+ - 增强了人类联盟的总工程师职业效果
5409
+ `.trim()
5382
5410
  }
5383
5411
  ];
5384
5412
  function compareVersions(a, b) {
@@ -5625,7 +5653,8 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
5625
5653
  if (itemConfig2.id === 1) {
5626
5654
  return {
5627
5655
  success: false,
5628
- message: "暂时被禁用了。"
5656
+ message: "暂时被禁用了。",
5657
+ isDefeated: false
5629
5658
  };
5630
5659
  const activeSentry = await ctx.database.get("ggcevo_boss", {
5631
5660
  name: "空间站哨枪塔",
@@ -5633,7 +5662,8 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
5633
5662
  });
5634
5663
  if (!activeSentry.length) return {
5635
5664
  success: false,
5636
- message: "⚠️ 目标「空间站哨枪塔」未存活"
5665
+ message: "⚠️ 目标「空间站哨枪塔」未存活",
5666
+ isDefeated: false
5637
5667
  };
5638
5668
  const [SentryTower] = await ctx.database.get("ggcevo_boss", {
5639
5669
  name: "空间站哨枪塔",
@@ -5662,13 +5692,15 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
5662
5692
  });
5663
5693
  return {
5664
5694
  success: true,
5665
- message: `成功引爆${itemName},对空间站哨枪塔造成${damageValue}点伤害,获得等额金币。`
5695
+ message: `成功引爆${itemName},对空间站哨枪塔造成${damageValue}点伤害,获得等额金币。`,
5696
+ isDefeated: false
5666
5697
  };
5667
5698
  }
5668
5699
  if (itemConfig2.id === 2) {
5669
5700
  if (!target) return {
5670
5701
  success: false,
5671
- message: "您未选择合适的目标。"
5702
+ message: "您未选择合适的目标。",
5703
+ isDefeated: false
5672
5704
  };
5673
5705
  const [targetboss] = await ctx.database.get("ggcevo_boss", {
5674
5706
  name: target,
@@ -5676,25 +5708,29 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
5676
5708
  });
5677
5709
  if (!targetboss) return {
5678
5710
  success: false,
5679
- message: "无法找到指定的目标。"
5711
+ message: "无法找到指定的目标。",
5712
+ isDefeated: false
5680
5713
  };
5681
5714
  if (targetboss.skills.includes("开天眼")) {
5682
5715
  return {
5683
5716
  success: false,
5684
- message: `目标免疫闪光弹,无法使用此物品。`
5717
+ message: `目标免疫闪光弹,无法使用此物品。`,
5718
+ isDefeated: false
5685
5719
  };
5686
5720
  }
5687
5721
  if (targetboss.tags.includes("建筑") || targetboss.tags.includes("重型") || targetboss.skills.includes("开天眼")) {
5688
5722
  return {
5689
5723
  success: false,
5690
- message: `目标${target}拥有"${targetboss.tags.includes("建筑") ? "建筑" : "重型"}"标签,无法使用此物品。`
5724
+ message: `目标${target}拥有"${targetboss.tags.includes("建筑") ? "建筑" : "重型"}"标签,无法使用此物品。`,
5725
+ isDefeated: false
5691
5726
  };
5692
5727
  }
5693
5728
  const currentCount = targetboss?.skillStacks || 0;
5694
5729
  if (currentCount <= 0) {
5695
5730
  return {
5696
5731
  success: false,
5697
- message: `目标${target}的技能层数已为0,无需使用此物品。`
5732
+ message: `目标${target}的技能层数已为0,无需使用此物品。`,
5733
+ isDefeated: false
5698
5734
  };
5699
5735
  }
5700
5736
  const newCount = Math.max(0, currentCount - 10);
@@ -5706,13 +5742,15 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
5706
5742
  );
5707
5743
  return {
5708
5744
  success: true,
5709
- message: `成功使用${itemName},使${target}的技能层数减少10层`
5745
+ message: `成功使用${itemName},使${target}的技能层数减少10层`,
5746
+ isDefeated: false
5710
5747
  };
5711
5748
  }
5712
5749
  if (itemConfig2.id === 4) {
5713
5750
  if (!target) return {
5714
5751
  success: false,
5715
- message: "您未选择合适的目标。"
5752
+ message: "您未选择合适的目标。",
5753
+ isDefeated: false
5716
5754
  };
5717
5755
  const [targetboss] = await ctx.database.get("ggcevo_boss", {
5718
5756
  name: target,
@@ -5721,12 +5759,14 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
5721
5759
  if (targetboss.skills.includes("质粒增殖")) {
5722
5760
  return {
5723
5761
  success: false,
5724
- message: `目标免疫脉冲手雷,无法使用此物品。`
5762
+ message: `目标免疫脉冲手雷,无法使用此物品。`,
5763
+ isDefeated: false
5725
5764
  };
5726
5765
  }
5727
5766
  if (!targetboss || targetboss?.energy === 0) return {
5728
5767
  success: false,
5729
- message: "您无法对没有能量的目标使用。"
5768
+ message: "您无法对没有能量的目标使用。",
5769
+ isDefeated: false
5730
5770
  };
5731
5771
  await ctx.database.set(
5732
5772
  "ggcevo_boss",
@@ -5736,18 +5776,119 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
5736
5776
  );
5737
5777
  return {
5738
5778
  success: true,
5739
- message: `成功使用${itemName},消耗${target}500点能量`
5779
+ message: `成功使用${itemName},消耗${target}500点能量`,
5780
+ isDefeated: false
5781
+ };
5782
+ }
5783
+ if (itemConfig2.id === 9) {
5784
+ if (!target) return {
5785
+ success: false,
5786
+ message: "使用燃烧弹需要指定目标",
5787
+ isDefeated: false
5788
+ };
5789
+ const [targetBoss] = await ctx.database.get("ggcevo_boss", {
5790
+ name: target,
5791
+ isActive: true
5792
+ });
5793
+ if (!targetBoss) return {
5794
+ success: false,
5795
+ message: `目标「${target}」未存活或不存在`,
5796
+ isDefeated: false
5797
+ };
5798
+ const immuneSkills = ["猎手异形", "环境适应"];
5799
+ const isImmune = immuneSkills.some(
5800
+ (skill) => targetBoss.skills?.includes(skill)
5801
+ );
5802
+ if (isImmune) return {
5803
+ success: false,
5804
+ message: `目标「${target}」免疫燃烧效果`,
5805
+ isDefeated: false
5806
+ };
5807
+ const currentLayers = targetBoss?.burnLayers || 0;
5808
+ const newLayers = currentLayers + 5;
5809
+ await ctx.database.set(
5810
+ "ggcevo_boss",
5811
+ { name: target },
5812
+ { burnLayers: newLayers }
5813
+ );
5814
+ const [taskRecord] = await ctx.database.get("ggcevo_task", {
5815
+ handle,
5816
+ taskId: 7
5817
+ });
5818
+ await ctx.database.upsert("ggcevo_task", [{
5819
+ handle,
5820
+ taskId: 7,
5821
+ progress: (taskRecord?.progress || 0) + 5
5822
+ }], ["handle", "taskId"]);
5823
+ return {
5824
+ success: true,
5825
+ message: `成功使用${itemName},目标「${target}」的燃烧层数增加5层`,
5826
+ isDefeated: false
5827
+ };
5828
+ }
5829
+ if (itemConfig2.id === 10) {
5830
+ if (!target) return {
5831
+ success: false,
5832
+ message: "使用铝热炸弹需要指定目标",
5833
+ isDefeated: false
5834
+ };
5835
+ const [targetBoss] = await ctx.database.get("ggcevo_boss", {
5836
+ name: target,
5837
+ isActive: true
5838
+ });
5839
+ if (!targetBoss) return {
5840
+ success: false,
5841
+ message: `目标「${target}」未存活或不存在`,
5842
+ isDefeated: false
5843
+ };
5844
+ const aerialTargets = ["吸血蝙蝠首领", "吸血蝙蝠", "猛毒异兽", "剧毒蝙蝠"];
5845
+ if (aerialTargets.includes(targetBoss.name)) {
5846
+ return {
5847
+ success: false,
5848
+ message: "无法对空中目标使用",
5849
+ isDefeated: false
5850
+ };
5851
+ }
5852
+ const baseDamage = 100;
5853
+ const isBuilding = targetBoss.tags?.includes("建筑");
5854
+ const damage = isBuilding ? baseDamage * 3 : baseDamage;
5855
+ const actualDamage = Math.min(damage, targetBoss.HP);
5856
+ const newHP = targetBoss.HP - actualDamage;
5857
+ const isDefeated = newHP <= 0;
5858
+ await ctx.database.set(
5859
+ "ggcevo_boss",
5860
+ { name: target },
5861
+ {
5862
+ HP: Math.max(newHP, 0),
5863
+ isActive: !isDefeated
5864
+ }
5865
+ );
5866
+ if (actualDamage > 0) {
5867
+ await ctx.database.withTransaction(async () => {
5868
+ const signRecords = await ctx.database.get("ggcevo_sign", { handle });
5869
+ await ctx.database.upsert("ggcevo_sign", [{
5870
+ handle,
5871
+ totalRewards: (signRecords[0]?.totalRewards || 0) + damage
5872
+ }], ["handle"]);
5873
+ });
5874
+ }
5875
+ return {
5876
+ success: true,
5877
+ message: `成功使用${itemName},对${isBuilding ? "建筑目标" : "目标"}「${target}」造成${damage}点伤害${isDefeated ? ",目标已被消灭" : ""}`,
5878
+ isDefeated
5740
5879
  };
5741
5880
  }
5742
5881
  return {
5743
5882
  success: false,
5744
- message: `${itemName} 无法使用。`
5883
+ message: `${itemName} 无法使用。`,
5884
+ isDefeated: false
5745
5885
  };
5746
5886
  } catch (error) {
5747
5887
  console.error("物品效果处理失败:", error);
5748
5888
  return {
5749
5889
  success: false,
5750
- message: "⚠️ 物品效果处理异常,已回滚操作。"
5890
+ message: "⚠️ 物品效果处理异常,已回滚操作。",
5891
+ isDefeated: false
5751
5892
  };
5752
5893
  }
5753
5894
  }
@@ -7099,7 +7240,7 @@ var spaceship = {
7099
7240
  description: "巨兽级歼星舰的小型化版本",
7100
7241
  miningbonus: 0,
7101
7242
  explorebonus: 30,
7102
- effect: "探索的成功率提高60%;探索发生掠夺的概率提高30%;掠夺的成功率提高30%",
7243
+ effect: "探索的成功率提高60%;探索发生掠夺的概率提高30%;掠夺的成功率提高30%;被非庞兽号歼星舰掠夺的成功率降低30%",
7103
7244
  price: 6e3
7104
7245
  }
7105
7246
  };
@@ -7108,7 +7249,8 @@ var galaxy = {
7108
7249
  description: "这一片都是人类联盟的地区,但是并非一切都很安全",
7109
7250
  success: 0.6,
7110
7251
  bonus: 0,
7111
- available: "金币,爆破物,手榴弹",
7252
+ available: ["闪光弹", "脉冲手雷"],
7253
+ // 使用中文名称数组
7112
7254
  effect: "人类联盟阵营探索时成功率提高10%"
7113
7255
  },
7114
7256
  "辛迪加星系": {
@@ -7116,14 +7258,14 @@ var galaxy = {
7116
7258
  success: 0.4,
7117
7259
  bonus: 0.2,
7118
7260
  // 金币加成系数(1.2表示+20%)
7119
- available: "金币,爆破物,手榴弹",
7261
+ available: ["闪光弹", "脉冲手雷"],
7120
7262
  effect: "辛迪加海盗阵营探索时成功率提高10%"
7121
7263
  },
7122
7264
  "陨石星系": {
7123
7265
  description: "这一片星系有着大量的陨石,充满了危险,但可能存在一些有价值的资源",
7124
7266
  success: 0.4,
7125
7267
  bonus: 0,
7126
- available: "金币,爆破物,手榴弹",
7268
+ available: ["闪光弹", "脉冲手雷", "莫洛托夫燃烧弹", "铝热炸弹"],
7127
7269
  effect: "获得物品的概率提高10%"
7128
7270
  }
7129
7271
  };
@@ -11142,6 +11284,8 @@ ${discountReason}` : "",
11142
11284
  });
11143
11285
  ctx.command("ggcevo/使用 [itemName] [target]").action(async (argv, itemName, target) => {
11144
11286
  const session = argv.session;
11287
+ let bossEventBroadcast = null;
11288
+ let cleanerRewardBroadcast = null;
11145
11289
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11146
11290
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11147
11291
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11171,11 +11315,25 @@ ${discountReason}` : "",
11171
11315
  { handle, itemId: targetItem.itemId },
11172
11316
  { quantity: newQuantity }
11173
11317
  );
11174
- return [
11175
- `✅ 成功使用 ${itemNameConfirmed}`,
11176
- `剩余数量:${newQuantity}`,
11177
- `触发效果:${effectResult.message}`
11178
- ].join("\n");
11318
+ const allDeadTargets = [];
11319
+ if (effectResult.isDefeated) {
11320
+ allDeadTargets.push(target);
11321
+ }
11322
+ const deathResults = await handleDeathTargets(ctx, allDeadTargets, session.username, handle);
11323
+ bossEventBroadcast = deathResults.bossBroadcast;
11324
+ cleanerRewardBroadcast = deathResults.cleanerBroadcast;
11325
+ await session.send(
11326
+ `✅ 成功使用 ${itemNameConfirmed}
11327
+ 剩余数量:${newQuantity}
11328
+ 触发效果:${effectResult.message}`
11329
+ );
11330
+ const groupId = [...config.groupId];
11331
+ await handleBroadcasts(
11332
+ ctx,
11333
+ groupId,
11334
+ bossEventBroadcast,
11335
+ cleanerRewardBroadcast
11336
+ );
11179
11337
  } catch (error) {
11180
11338
  ctx.logger("GGCEVO").error(error);
11181
11339
  return "⚠️ 物品使用失败,请联系管理员";
@@ -11740,6 +11898,12 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11740
11898
  }
11741
11899
  });
11742
11900
  ctx.command("ggcevo/探索 [galaxyName]").action(async ({ session }, galaxyName) => {
11901
+ const possibleItems = [
11902
+ { id: 2, name: "闪光弹", chance: 0.1 },
11903
+ { id: 4, name: "脉冲手雷", chance: 0.1 },
11904
+ { id: 9, name: "莫洛托夫燃烧弹", chance: 0.05 },
11905
+ { id: 10, name: "铝热炸弹", chance: 0.05 }
11906
+ ];
11743
11907
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11744
11908
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11745
11909
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11750,6 +11914,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11750
11914
  const [career] = await ctx.database.get("ggcevo_careers", { handle });
11751
11915
  const careerName = career?.career;
11752
11916
  const careerCoinBonus = careerName === "总工程师" ? 50 : 0;
11917
+ const engineerSuccessBonus = careerName === "总工程师" ? 0.1 : 0;
11753
11918
  const [shipRecord] = await ctx.database.get("ggcevo_spaceship", { handle });
11754
11919
  let shipBonus = 0;
11755
11920
  let plunderRateBonus = 0;
@@ -11810,6 +11975,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11810
11975
  let successRate = galaxyData2.success;
11811
11976
  if (career?.group === "人类联盟" && record.galaxy === "联盟星系") successRate += 0.1;
11812
11977
  else if (career?.group === "辛迪加海盗" && record.galaxy === "辛迪加星系") successRate += 0.1;
11978
+ successRate += engineerSuccessBonus;
11813
11979
  successRate += shipSuccessBonus;
11814
11980
  successRate = Math.min(successRate, 1);
11815
11981
  let baseCoinReward = Math.floor(Math.random() * 51) + 50;
@@ -11830,6 +11996,9 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11830
11996
  const sign = record.plunderbonus > 0 ? "+" : "";
11831
11997
  bonusEffects.push(`▸ ⚔️ 掠夺事件:${sign}${record.plunderbonus}%金币`);
11832
11998
  }
11999
+ if (engineerSuccessBonus > 0) {
12000
+ bonusEffects.push(`▸ 🔧 总工程师职业:成功率+${Math.round(engineerSuccessBonus * 100)}%`);
12001
+ }
11833
12002
  let itemDropBonus = 0;
11834
12003
  if (record.galaxy === "陨石星系") {
11835
12004
  itemDropBonus += 0.1;
@@ -11844,13 +12013,9 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11844
12013
  bonusEffects.push(`▸ ⚙️ 反应堆科技Lv.${techLevel}:+${(combinedTechBonus * 100).toFixed(0)}%金币`);
11845
12014
  }
11846
12015
  if (careerCoinBonus) {
11847
- bonusEffects.push(`▸ 🎓 总工程师职业:+${careerCoinBonus}%金币`);
12016
+ bonusEffects.push(`▸ 🎓 总工程师职业:金币+${careerCoinBonus}%`);
11848
12017
  }
11849
- const totalBonusMultiplier = 1 + (galaxyBonusPercent + // 星系加成
11850
- shipBonus + // 飞船加成
11851
- (record.plunderbonus || 0) + // 掠夺事件加成/减益
11852
- (techBonusRate + careerBonusRate) * 100 + // 科技和职业加成
11853
- careerCoinBonus) / 100;
12018
+ const totalBonusMultiplier = 1 + (galaxyBonusPercent + shipBonus + (record.plunderbonus || 0) + (techBonusRate + careerBonusRate) * 100 + careerCoinBonus) / 100;
11854
12019
  let finalCoin = Math.floor(baseCoinReward * totalBonusMultiplier);
11855
12020
  const isSuccess = Math.random() < successRate;
11856
12021
  if (!isSuccess) {
@@ -11872,31 +12037,30 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11872
12037
  }
11873
12038
  let itemRewards = [];
11874
12039
  if (isSuccess) {
11875
- const possibleItems = [
11876
- { id: 2, name: "闪光弹", chance: 0.05 },
11877
- { id: 4, name: "脉冲手雷", chance: 0.05 }
11878
- ];
12040
+ const availableItems = galaxyData2.available;
11879
12041
  for (const item of possibleItems) {
11880
- const dropRate = item.chance + itemDropBonus;
11881
- if (Math.random() < dropRate) {
11882
- const [existing] = await ctx.database.get("ggcevo_warehouse", {
11883
- handle,
11884
- itemId: item.id
11885
- });
11886
- if (existing) {
11887
- await ctx.database.set("ggcevo_warehouse", {
12042
+ if (availableItems.includes(item.name)) {
12043
+ const dropRate = item.chance + itemDropBonus;
12044
+ if (Math.random() < dropRate) {
12045
+ const [existing] = await ctx.database.get("ggcevo_warehouse", {
11888
12046
  handle,
11889
12047
  itemId: item.id
11890
- }, { quantity: existing.quantity + 1 });
11891
- } else {
11892
- await ctx.database.create("ggcevo_warehouse", {
11893
- handle,
11894
- itemId: item.id,
11895
- quantity: 1,
11896
- bonus: 0
11897
12048
  });
12049
+ if (existing) {
12050
+ await ctx.database.set("ggcevo_warehouse", {
12051
+ handle,
12052
+ itemId: item.id
12053
+ }, { quantity: existing.quantity + 1 });
12054
+ } else {
12055
+ await ctx.database.create("ggcevo_warehouse", {
12056
+ handle,
12057
+ itemId: item.id,
12058
+ quantity: 1,
12059
+ bonus: 0
12060
+ });
12061
+ }
12062
+ itemRewards.push(item.name);
11898
12063
  }
11899
- itemRewards.push(item.name);
11900
12064
  }
11901
12065
  }
11902
12066
  }
@@ -11909,13 +12073,13 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11909
12073
  });
11910
12074
  const isRewardModified = finalCoin !== baseCoinReward;
11911
12075
  const coinDisplay = isRewardModified ? `💰 金币 +${finalCoin}(基础值 ${baseCoinReward})` : `💰 金币 +${finalCoin}`;
12076
+ const availableItemsDisplay = galaxyData2.available.join("、") || "无";
11912
12077
  const resultMessage = [
11913
12078
  isSuccess ? "🎉 探索成功!" : "⚠️ 探索失败!",
11914
12079
  `🌌 星系:${record.galaxy}`,
11915
12080
  `🔮 实际成功率:${(successRate * 100).toFixed(1)}%`,
11916
12081
  coinDisplay,
11917
- // 使用新的金币显示方式
11918
- ...itemRewards.length > 0 ? [`📦 获得物品:${itemRewards.join("、")}`] : [],
12082
+ ...itemRewards.length > 0 ? [`🎁 获得物品:${itemRewards.join("、")}`] : [],
11919
12083
  ...bonusEffects.length > 0 ? [
11920
12084
  "",
11921
12085
  "⚡ 加成效果:",
@@ -11936,7 +12100,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11936
12100
  `【${name3}】`,
11937
12101
  `- 成功率:${(info.success * 100).toFixed(0)}%`,
11938
12102
  `- 金币加成:${bonusPercent > 0 ? "+" : ""}${bonusPercent}%`,
11939
- `- 可获得:${info.available}`,
12103
+ `- 可探索物品:${info.available.join("、") || "无"}`,
11940
12104
  `- 特殊效果:${info.effect}`
11941
12105
  ].join("\n"));
11942
12106
  }
@@ -11960,7 +12124,6 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11960
12124
  status: "探索中",
11961
12125
  handle: { $ne: handle },
11962
12126
  plunderbonus: { $gte: 0 }
11963
- // 新增条件:掠夺收益大于等于0
11964
12127
  });
11965
12128
  if (explorers.length > 0) {
11966
12129
  const shipHandles = explorers.map((e) => e.handle);
@@ -11974,21 +12137,30 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11974
12137
  });
11975
12138
  if (plunderTargets.length > 0) {
11976
12139
  const target = plunderTargets[Math.floor(Math.random() * plunderTargets.length)];
12140
+ let isTargetBehemoth = false;
12141
+ let defenseNote = "";
12142
+ const [targetShip] = await ctx.database.get("ggcevo_spaceship", { handle: target.handle });
12143
+ if (targetShip && targetShip.id === 4) {
12144
+ isTargetBehemoth = true;
12145
+ }
11977
12146
  let baseSuccessRate = 50;
11978
12147
  if (isBehemoth) baseSuccessRate += 30;
11979
12148
  if (shipRecord?.id === 3) baseSuccessRate += 10;
12149
+ if (isTargetBehemoth && !isBehemoth) {
12150
+ baseSuccessRate -= 30;
12151
+ defenseNote = "⚠️ 目标飞船为庞兽号歼星舰,掠夺成功率降低30%!\n";
12152
+ }
12153
+ baseSuccessRate = Math.max(0, Math.min(baseSuccessRate, 100));
11980
12154
  await session.send([
11981
12155
  `❗ 您在探索过程中发现了【${target.name}】的飞船,是否掠夺?`,
12156
+ defenseNote,
11982
12157
  `🎯 掠夺成功率:${baseSuccessRate}%`,
11983
12158
  `⏱️ (30秒内输入"是"来进行掠夺)`
11984
- ].join("\n"));
12159
+ ].filter((line) => line !== "").join("\n"));
11985
12160
  try {
11986
12161
  const response = await session.prompt(3e4);
11987
12162
  if (response === "是") {
11988
- let baseSuccessRate2 = 0.5;
11989
- if (isBehemoth) baseSuccessRate2 += 0.3;
11990
- if (shipRecord?.id === 3) baseSuccessRate2 += 0.1;
11991
- const success = Math.random() < baseSuccessRate2;
12163
+ let success = Math.random() < baseSuccessRate / 100;
11992
12164
  let playerBonus, targetBonus;
11993
12165
  if (success) {
11994
12166
  playerBonus = 20;
@@ -12035,6 +12207,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12035
12207
  let estimatedRate = galaxyData.success;
12036
12208
  if (career?.group === "人类联盟" && galaxyName === "联盟星系") estimatedRate += 0.1;
12037
12209
  else if (career?.group === "辛迪加海盗" && galaxyName === "辛迪加星系") estimatedRate += 0.1;
12210
+ estimatedRate += engineerSuccessBonus;
12038
12211
  estimatedRate += shipSuccessBonus;
12039
12212
  estimatedRate = Math.min(estimatedRate, 1) * 100;
12040
12213
  return [
@@ -12042,7 +12215,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12042
12215
  `⏱️ 开始时间:${(/* @__PURE__ */ new Date()).toLocaleString("zh-CN", { hour12: false })}`,
12043
12216
  `⏳ 持续时间:12小时`,
12044
12217
  `📊 预计成功率:${estimatedRate.toFixed(0)}%`,
12045
- "💡 探索可获得50-100的基础金币"
12218
+ `📦 可获得物品:${galaxyData.available.join("、") || "无"}`,
12219
+ "💰 预计可获得50-100金币"
12046
12220
  ].join("\n");
12047
12221
  });
12048
12222
  const shipIdToName = {};
@@ -12075,7 +12249,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12075
12249
  `📅 获得时间:${shipRecord.createTime.toLocaleString("zh-CN", { hour12: false })}`
12076
12250
  ].join("\n");
12077
12251
  });
12078
- ctx.command("ggcevo/购买飞船 [shipName]").action(async ({ session }, shipName) => {
12252
+ ctx.command("ggcevo/购买飞船 [shipName]").alias("飞船").action(async ({ session }, shipName) => {
12079
12253
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12080
12254
  if (!profile) return "🔒 需要先绑定游戏句柄。";
12081
12255
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
package/lib/items.d.ts CHANGED
@@ -71,6 +71,24 @@ export declare const SyndicatedItems: {
71
71
  condition: string;
72
72
  effects: string;
73
73
  };
74
+ 莫洛托夫燃烧弹: {
75
+ id: number;
76
+ type: string;
77
+ description: string;
78
+ price: number;
79
+ redCrystalCost: number;
80
+ condition: string;
81
+ effects: string;
82
+ };
83
+ 铝热炸弹: {
84
+ id: number;
85
+ type: string;
86
+ description: string;
87
+ price: number;
88
+ redCrystalCost: number;
89
+ condition: string;
90
+ effects: string;
91
+ };
74
92
  };
75
93
  export declare const initDefaultItems: {
76
94
  咕咕币: {
@@ -37,21 +37,21 @@ export declare const galaxy: {
37
37
  description: string;
38
38
  success: number;
39
39
  bonus: number;
40
- available: string;
40
+ available: string[];
41
41
  effect: string;
42
42
  };
43
43
  辛迪加星系: {
44
44
  description: string;
45
45
  success: number;
46
46
  bonus: number;
47
- available: string;
47
+ available: string[];
48
48
  effect: string;
49
49
  };
50
50
  陨石星系: {
51
51
  description: string;
52
52
  success: number;
53
53
  bonus: number;
54
- available: string;
54
+ available: string[];
55
55
  effect: string;
56
56
  };
57
57
  };
package/lib/tasks.d.ts CHANGED
@@ -21,7 +21,7 @@ export declare const Tasklist: {
21
21
  readonly target: 1;
22
22
  readonly price: 200;
23
23
  readonly redCrystalCost: 0;
24
- readonly condition: "使用【焚烧枪】引爆具有10层及以上[灼烧粘液]的目标";
24
+ readonly condition: "使用【焚烧枪】或【龙息霰弹枪】引爆具有10层及以上[灼烧粘液]的目标";
25
25
  };
26
26
  readonly 脉冲干扰: {
27
27
  readonly id: 4;
@@ -53,6 +53,6 @@ export declare const Tasklist: {
53
53
  readonly target: 1;
54
54
  readonly price: 25;
55
55
  readonly redCrystalCost: 0;
56
- readonly condition: "使用【焚烧枪】或【龙息霰弹枪】攻击目标并成功增加其1层[燃烧]";
56
+ readonly condition: "使用【焚烧枪】或【龙息霰弹枪】攻击目标或对目标使用【莫洛托夫燃烧弹】并成功增加其1层[燃烧]";
57
57
  };
58
58
  };
package/lib/utils.d.ts CHANGED
@@ -16,6 +16,7 @@ export declare function calculateTotalPower(ctx: Context, config: Config, handle
16
16
  export declare function applyItemEffect(ctx: Context, session: any, handle: string, itemConfig: any, target?: string): Promise<{
17
17
  success: boolean;
18
18
  message: string;
19
+ isDefeated: boolean;
19
20
  }>;
20
21
  export declare function handleTechUpgrade(ctx: Context, handle: string, target: string): Promise<string>;
21
22
  export declare function handleWeaponUpgrade(ctx: Context, handle: string, target: string): Promise<string>;
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.6.20",
4
+ "version": "1.6.22",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [