koishi-plugin-ggcevo-game 1.2.73 → 1.3.1

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.d.ts CHANGED
@@ -41,6 +41,7 @@ declare module 'koishi' {
41
41
  ggcevo_careers: careers;
42
42
  ggcevo_warehouse: warehouse;
43
43
  ggcevo_tech: tech;
44
+ ggcevo_Mining: Mining;
44
45
  }
45
46
  }
46
47
  export interface backpack {
@@ -152,6 +153,7 @@ export interface Boss {
152
153
  tags: string[];
153
154
  skills: string[];
154
155
  Skillcountpoints: number;
156
+ Vulnerability: number;
155
157
  groupId: number;
156
158
  isActive: boolean;
157
159
  respawnTime: Date;
@@ -189,4 +191,8 @@ export interface tech {
189
191
  techId: number;
190
192
  level: number;
191
193
  }
194
+ export interface Mining {
195
+ handle: string;
196
+ startTime: Date;
197
+ }
192
198
  export declare function apply(ctx: Context, config: Config): void;
package/lib/index.js CHANGED
@@ -234,6 +234,7 @@ function apply(ctx, config) {
234
234
  skills: { type: "list", initial: [] },
235
235
  // 明确数组元素类型
236
236
  Skillcountpoints: "unsigned",
237
+ Vulnerability: "unsigned",
237
238
  groupId: "unsigned",
238
239
  isActive: "boolean",
239
240
  respawnTime: "timestamp"
@@ -284,6 +285,12 @@ function apply(ctx, config) {
284
285
  }, {
285
286
  primary: ["handle", "techId"]
286
287
  });
288
+ ctx.model.extend("ggcevo_Mining", {
289
+ handle: "string",
290
+ startTime: "timestamp"
291
+ }, {
292
+ primary: "handle"
293
+ });
287
294
  const weaponConfig = {
288
295
  // 武器配置
289
296
  "高斯步枪": {
@@ -365,12 +372,11 @@ function apply(ctx, config) {
365
372
  "侦查步枪": {
366
373
  id: 7,
367
374
  type: "实弹武器",
368
- damage: 60,
375
+ damage: 50,
369
376
  description: "用于隐秘射击的最佳武器,但是无法穿透护甲",
370
377
  price: 550,
371
378
  redCrystalCost: 10,
372
379
  tagEffects: {
373
- "护盾": 0.5,
374
380
  "轻甲": 0.5,
375
381
  "重甲": 0.2
376
382
  }
@@ -378,7 +384,7 @@ function apply(ctx, config) {
378
384
  "零度之下": {
379
385
  id: 8,
380
386
  type: "热能武器",
381
- damage: 30,
387
+ damage: 25,
382
388
  description: "喷射稳定的液氮恒流,对长时间接触者造成致命的损伤",
383
389
  price: 775,
384
390
  redCrystalCost: 10,
@@ -395,8 +401,19 @@ function apply(ctx, config) {
395
401
  price: 750,
396
402
  redCrystalCost: 10,
397
403
  tagEffects: {
398
- "建筑": 2,
399
- "机械": 1.5
404
+ "机械": 2,
405
+ "建筑": 1.5
406
+ }
407
+ },
408
+ "伽马枪": {
409
+ id: 10,
410
+ type: "能量武器",
411
+ damage: 24,
412
+ description: "一种高度危险性的武器,设计用辐射照射并伤害敌人",
413
+ price: 825,
414
+ redCrystalCost: 15,
415
+ tagEffects: {
416
+ "生物": 1.2
400
417
  }
401
418
  }
402
419
  };
@@ -415,7 +432,7 @@ function apply(ctx, config) {
415
432
  description: "非致命军用炸药",
416
433
  price: 75,
417
434
  redCrystalCost: 0,
418
- effects: "对目标使用后,清空其累计技能计数"
435
+ effects: "对非建筑目标使用后,重置其技能计数"
419
436
  }
420
437
  };
421
438
  const modConfig = {
@@ -571,6 +588,26 @@ function apply(ctx, config) {
571
588
  "结构装甲": {
572
589
  effect: 0,
573
590
  description: "拥有结构装甲,受到的伤害-20%; 若伤害来源于热能武器,则受到的伤害-40%"
591
+ },
592
+ "吸血唾液": {
593
+ effect: 0,
594
+ description: "受到攻击将会获得一层“吸血”,每层“吸血”提供5%的减伤,至多10层"
595
+ },
596
+ "进食": {
597
+ effect: 0,
598
+ description: "当“吸血”层数达到10层时,自身将会消耗所有层数回复20%的最大生命值"
599
+ },
600
+ "嗜血狂暴": {
601
+ effect: 0,
602
+ description: "血量低于50%时,每次受到攻击将会额外叠加一层吸血唾液,并且受到的伤害-20%"
603
+ },
604
+ "吐血": {
605
+ effect: 0,
606
+ description: "当无“吸血”层数时,受到的伤害+10%"
607
+ },
608
+ "辐射": {
609
+ effect: 0,
610
+ description: "受到伽马枪攻击时会积累辐射层数,每层使受到的伤害增加1%"
574
611
  }
575
612
  };
576
613
  const defineBoss = /* @__PURE__ */ __name((config2) => config2, "defineBoss");
@@ -588,7 +625,7 @@ function apply(ctx, config) {
588
625
  {
589
626
  name: "异齿猛兽",
590
627
  type: "子代",
591
- maxHP: 7500,
628
+ maxHP: 5e3,
592
629
  tags: asBossTags(["重甲", "生物", "异形"]),
593
630
  passive: asPassives(["弱化形态", "异形甲壳"])
594
631
  }
@@ -664,6 +701,25 @@ function apply(ctx, config) {
664
701
  passive: asPassives(["岗哨机枪", "结构装甲"])
665
702
  }
666
703
  ]
704
+ }),
705
+ defineBoss({
706
+ main: {
707
+ id: 5,
708
+ name: "吸血蝙蝠-首领",
709
+ type: "主宰",
710
+ maxHP: 1e4,
711
+ tags: asBossTags(["生物", "异形"]),
712
+ passive: asPassives(["吸血唾液", "进食", "吐血", "嗜血狂暴"])
713
+ },
714
+ minions: [
715
+ {
716
+ name: "吸血蝙蝠",
717
+ type: "子代",
718
+ maxHP: 3e3,
719
+ tags: asBossTags(["生物", "异形"]),
720
+ passive: asPassives(["弱化形态", "吸血唾液", "进食", "吐血"])
721
+ }
722
+ ]
667
723
  })
668
724
  ];
669
725
  const spaceStationCrewConfig = [
@@ -704,9 +760,9 @@ function apply(ctx, config) {
704
760
  },
705
761
  {
706
762
  professionName: "情报副官",
707
- effect: "",
708
- requirements: "拥有500枚金币",
709
- Jobtransfer: false,
763
+ effect: "升级空间站科技花费的金币是原价的80%",
764
+ requirements: "将一个空间站科技升至3级或以上",
765
+ Jobtransfer: true,
710
766
  costcoins: 3e3
711
767
  },
712
768
  {
@@ -742,7 +798,7 @@ function apply(ctx, config) {
742
798
  {
743
799
  professionName: "能量武器专家",
744
800
  effect: "能量武器攻击伤害+20%,解锁MK-4激光步枪(传奇)购买权限",
745
- requirements: "拥有一把3级及以上等级的能量武器",
801
+ requirements: "拥有一把3级或以上等级的能量武器",
746
802
  Jobtransfer: true,
747
803
  costcoins: 0,
748
804
  costredcrystal: 20
@@ -774,7 +830,7 @@ function apply(ctx, config) {
774
830
  {
775
831
  professionName: "纵火狂",
776
832
  effect: "热能武器攻击伤害+20%,解锁龙息散弹枪(传奇)购买权限",
777
- requirements: "拥有一把3级及以上等级的热能武器",
833
+ requirements: "拥有一把3级或以上等级的热能武器",
778
834
  Jobtransfer: true,
779
835
  costcoins: 0,
780
836
  costredcrystal: 20
@@ -854,25 +910,25 @@ function apply(ctx, config) {
854
910
  level: 2,
855
911
  cost: 1750,
856
912
  description: "提高挖矿效率,每日签到金币奖励+10%",
857
- careerBonus: "深空矿工/情报副官: 每日签到金币奖励+20%,解锁专属“挖矿”权限"
913
+ careerBonus: "深空矿工/情报副官: 每日签到金币奖励+20%; 解锁太空“挖矿”权限"
858
914
  },
859
915
  {
860
916
  level: 3,
861
917
  cost: 2950,
862
918
  description: "提高挖矿效率,每日签到金币奖励+15%",
863
- careerBonus: "深空矿工/情报副官: 每日签到金币奖励+30%,解锁专属“挖矿”权限,并且挖矿效率提高10%"
919
+ careerBonus: "深空矿工/情报副官: 每日签到金币奖励+30%; 解锁太空“挖矿”权限"
864
920
  },
865
921
  {
866
922
  level: 4,
867
923
  cost: 4250,
868
924
  description: "提高挖矿效率,每日签到金币奖励+20%",
869
- careerBonus: "深空矿工/情报副官: 每日签到金币奖励+40%,解锁专属“挖矿”权限,并且挖矿效率提高20%"
925
+ careerBonus: "深空矿工/情报副官: 每日签到金币奖励+40%; 解锁太空“挖矿”权限; 建造矿罗协同挖矿,效率提高20%"
870
926
  },
871
927
  {
872
928
  level: 5,
873
929
  cost: 5375,
874
930
  description: "提高挖矿效率,每日签到金币奖励+25%",
875
- careerBonus: "深空矿工/情报副官: 每日签到金币奖励+50%,解锁专属“挖矿”权限,并且挖矿效率提高30%"
931
+ careerBonus: "深空矿工/情报副官: 每日签到金币奖励+50%; 解锁太空“挖矿”权限; 建造矿罗协同挖矿,效率提高40%"
876
932
  }
877
933
  ]
878
934
  },
@@ -893,25 +949,45 @@ function apply(ctx, config) {
893
949
  level: 2,
894
950
  cost: 1500,
895
951
  description: "提升空间站武器等级,升级武器享有10%的折扣",
896
- careerBonus: "武器中士/情报副官: 升级武器享有20%的折扣,购买武器享有10%的折扣(非传奇)"
952
+ careerBonus: "武器中士/情报副官: 升级武器享有20%的折扣"
897
953
  },
898
954
  {
899
955
  level: 3,
900
956
  cost: 2550,
901
957
  description: "提升空间站武器等级,升级武器享有15%的折扣",
902
- careerBonus: "武器中士/情报副官: 升级武器享有30%的折扣,购买武器享有15%的折扣(非传奇)"
958
+ careerBonus: "武器中士/情报副官: 升级武器享有30%的折扣; 购买武器享有10%的折扣(非传奇)"
903
959
  },
904
960
  {
905
961
  level: 4,
906
962
  cost: 3950,
907
963
  description: "提升空间站武器等级,升级武器享有20%的折扣",
908
- careerBonus: "武器中士/情报副官: 在升级武器享有40%的折扣,购买武器享有20%的折扣(非传奇)"
964
+ careerBonus: "武器中士/情报副官: 在升级武器享有40%的折扣; 购买武器享有15%的折扣(非传奇)"
909
965
  },
910
966
  {
911
967
  level: 5,
912
968
  cost: 4650,
913
- description: "提升空间站武器等级,升级武器享有25%的折扣,可以以原价购买传奇武器(仅限一把)",
914
- careerBonus: "武器中士/情报副官: 升级武器享有50%的折扣,购买武器享有25%的折扣(非传奇),可以以80%的价格购买传奇武器(仅限一把)"
969
+ description: "提升空间站武器等级,升级武器享有25%的折扣; 解锁购买传奇武器权限(仅限一把)",
970
+ careerBonus: "武器中士/情报副官: 升级武器享有50%的折扣; 购买武器享有20%的折扣(非传奇); 解锁购买传奇武器权限(仅限一把),并且享有20%的折扣"
971
+ }
972
+ ]
973
+ },
974
+ {
975
+ techId: 3,
976
+ techname: "武器升级平台",
977
+ careerNames: ["武器中士", "情报副官"],
978
+ maxLevel: 2,
979
+ levels: [
980
+ {
981
+ level: 1,
982
+ cost: 750,
983
+ description: "重启武器升级站,武器改装通用模块享有5%的折扣",
984
+ careerBonus: "武器中士/情报副官: 武器改装通用模块享有10%的折扣"
985
+ },
986
+ {
987
+ level: 2,
988
+ cost: 1e3,
989
+ description: "重启高级武器改装站,武器改装通用模块享有10%的折扣",
990
+ careerBonus: "武器中士/情报副官: 武器改装通用模块享有20%的折扣,武器改装专属模块享有10%的折扣"
915
991
  }
916
992
  ]
917
993
  }
@@ -1509,6 +1585,82 @@ function apply(ctx, config) {
1509
1585
  messages: [`🛡️ 【结构装甲】生效:${msg}`]
1510
1586
  };
1511
1587
  }, "handleStructuralArmor"),
1588
+ // 处理吸血相关效果(加法减伤 + 独立增伤)
1589
+ handleBloodEffects: /* @__PURE__ */ __name(function(targetBoss, initialDamage, currentHP, maxHP) {
1590
+ let messages = [];
1591
+ let newDamage = initialDamage;
1592
+ const bloodStacks = targetBoss.Skillcountpoints || 0;
1593
+ let totalReduction = 0;
1594
+ if (targetBoss.skills.includes("吸血唾液")) {
1595
+ totalReduction += bloodStacks * 0.05;
1596
+ }
1597
+ if (targetBoss.skills.includes("嗜血狂暴") && currentHP / maxHP < 0.5) {
1598
+ totalReduction += 0.2;
1599
+ }
1600
+ if (totalReduction > 0) {
1601
+ newDamage = Math.floor(initialDamage * (1 - totalReduction));
1602
+ messages.push(
1603
+ `🩸 【吸血唾液】生效:当前层数${bloodStacks},下次受到伤害减伤${bloodStacks * 5}%` + (targetBoss.skills.includes("嗜血狂暴") && currentHP / maxHP < 0.5 ? `🔥 【嗜血狂暴】生效:血量低于50%触发20%减伤` : "")
1604
+ );
1605
+ }
1606
+ if (targetBoss.skills.includes("吐血") && bloodStacks < 1) {
1607
+ newDamage = Math.floor(newDamage * 1.1);
1608
+ messages.push(`💔 【吐血】生效:无“吸血”层数受到伤害+10%`);
1609
+ }
1610
+ return newDamage !== initialDamage ? { initialDamage: newDamage, messages } : null;
1611
+ }, "handleBloodEffects"),
1612
+ // 处理吸血层数叠加和进食触发
1613
+ handleBloodCount: /* @__PURE__ */ __name(async function(ctx2, targetBoss, currentHP, maxHP) {
1614
+ let messages = [];
1615
+ let updatedHP = currentHP;
1616
+ let newStacks = targetBoss.Skillcountpoints || 0;
1617
+ newStacks += 1;
1618
+ if (targetBoss.skills.includes("嗜血狂暴") && currentHP / maxHP < 0.5) {
1619
+ newStacks += 1;
1620
+ messages.push(`🔥 【嗜血狂暴】生效:额外叠加1层吸血,当前层数${newStacks}`);
1621
+ }
1622
+ newStacks = Math.min(newStacks, 10);
1623
+ await ctx2.database.set("ggcevo_boss", { name: targetBoss.name }, { Skillcountpoints: newStacks });
1624
+ if (newStacks >= 10 && targetBoss.skills.includes("进食")) {
1625
+ const heal = Math.floor(maxHP * 0.2);
1626
+ updatedHP = Math.min(currentHP + heal, maxHP);
1627
+ await ctx2.database.set("ggcevo_boss", { name: targetBoss.name }, { Skillcountpoints: 0 });
1628
+ messages.push(`🍽️ 【进食】生效:回复20%最大生命值(+${heal}HP),层数清零`);
1629
+ }
1630
+ return { updatedHP, messages };
1631
+ }, "handleBloodCount"),
1632
+ // 伽马枪辐射层数处理(攻击后触发)
1633
+ handleGammaRadiation: /* @__PURE__ */ __name(async (ctx2, targetBoss, weaponName) => {
1634
+ if (weaponName !== "伽马枪") return null;
1635
+ const messages = [];
1636
+ const isNewRadiation = !targetBoss.skills.includes("辐射");
1637
+ await ctx2.database.set("ggcevo_boss", { name: targetBoss.name }, {
1638
+ skills: isNewRadiation ? [...targetBoss.skills, "辐射"] : targetBoss.skills,
1639
+ Vulnerability: isNewRadiation ? 1 : targetBoss.Vulnerability + 1
1640
+ });
1641
+ const [updatedBoss] = await ctx2.database.get("ggcevo_boss", { name: targetBoss.name });
1642
+ const layerMsg = isNewRadiation ? `☢️ 获得【辐射】效果(当前层数1)` : `☢️ 辐射层数+1`;
1643
+ messages.push(`${targetBoss.name} ${layerMsg}`);
1644
+ return { messages };
1645
+ }, "handleGammaRadiation"),
1646
+ // 修正后的辐射伤害计算函数
1647
+ calculateRadiationDamage: /* @__PURE__ */ __name((targetBoss, baseDamage) => {
1648
+ if (!targetBoss.skills.includes("辐射")) {
1649
+ return {
1650
+ damage: baseDamage,
1651
+ messages: []
1652
+ };
1653
+ }
1654
+ const radiationLayers = targetBoss.Vulnerability || 0;
1655
+ const damageMultiplier = 1 + radiationLayers * 0.01;
1656
+ const amplifiedDamage = Math.floor(baseDamage * damageMultiplier);
1657
+ return {
1658
+ damage: amplifiedDamage,
1659
+ messages: radiationLayers > 0 ? [
1660
+ `☢️ 【辐射】生效:当前${radiationLayers}层辐射,受到伤害+${radiationLayers}%`
1661
+ ] : []
1662
+ };
1663
+ }, "calculateRadiationDamage"),
1512
1664
  // 统一处理被动技能(关键修复部分)
1513
1665
  handlePassives: /* @__PURE__ */ __name(async function(ctx2, targetBoss, initialDamage, currentHP, maxHP, weaponName, weaponData, baseDamage, activeBosses, bossGroup) {
1514
1666
  let messages = [];
@@ -1516,6 +1668,18 @@ function apply(ctx, config) {
1516
1668
  if (currentHP <= 0 && !targetBoss.skills.includes("求生本能I") && !targetBoss.skills.includes("求生本能II")) {
1517
1669
  return { currentHP, messages: [], skillUpdates: [], initialDamage };
1518
1670
  }
1671
+ if (weaponName === "伽马枪" && targetBoss.tags.includes("生物") && !targetBoss.tags.includes("机械")) {
1672
+ const radiationCalc = this.calculateRadiationDamage(targetBoss, initialDamage);
1673
+ if (radiationCalc.messages.length > 0) {
1674
+ messages.push(...radiationCalc.messages);
1675
+ initialDamage = radiationCalc.damage;
1676
+ }
1677
+ }
1678
+ const bloodEffectResult = this.handleBloodEffects(targetBoss, initialDamage, currentHP, maxHP);
1679
+ if (bloodEffectResult) {
1680
+ initialDamage = bloodEffectResult.initialDamage;
1681
+ messages.push(...bloodEffectResult.messages);
1682
+ }
1519
1683
  const frostEvoResult = this.handleFrostEvolution(targetBoss, weaponName, baseDamage, currentHP, maxHP);
1520
1684
  if (frostEvoResult) {
1521
1685
  initialDamage = frostEvoResult.initialDamage;
@@ -1546,11 +1710,10 @@ function apply(ctx, config) {
1546
1710
  messages.push(...coldImmunityResult.messages);
1547
1711
  return { currentHP, messages, skillUpdates, initialDamage };
1548
1712
  }
1549
- const survivalResult = this.handleSurvivalInstinct(targetBoss, currentHP, maxHP);
1550
- if (survivalResult) {
1551
- currentHP = survivalResult.updatedHP;
1552
- messages.push(...survivalResult.messages);
1553
- skillUpdates.push(...survivalResult.skillUpdates);
1713
+ const bloodCountResult = await this.handleBloodCount(ctx2, targetBoss, currentHP, maxHP);
1714
+ if (bloodCountResult) {
1715
+ currentHP = bloodCountResult.updatedHP;
1716
+ messages.push(...bloodCountResult.messages);
1554
1717
  }
1555
1718
  const infectionResult = await this.handleInfectedStation(ctx2, targetBoss, initialDamage, bossGroup);
1556
1719
  if (infectionResult) {
@@ -1570,6 +1733,18 @@ function apply(ctx, config) {
1570
1733
  if (moldResult) {
1571
1734
  messages.push(...moldResult.messages);
1572
1735
  }
1736
+ if (weaponName === "伽马枪" && targetBoss.tags.includes("生物") && !targetBoss.tags.includes("机械")) {
1737
+ const radiationResult = await this.handleGammaRadiation(ctx2, targetBoss, weaponName);
1738
+ if (radiationResult) {
1739
+ messages.push(...radiationResult.messages);
1740
+ }
1741
+ }
1742
+ const survivalResult = this.handleSurvivalInstinct(targetBoss, currentHP, maxHP);
1743
+ if (survivalResult) {
1744
+ currentHP = survivalResult.updatedHP;
1745
+ messages.push(...survivalResult.messages);
1746
+ skillUpdates.push(...survivalResult.skillUpdates);
1747
+ }
1573
1748
  return { currentHP, messages, skillUpdates, initialDamage };
1574
1749
  }, "handlePassives"),
1575
1750
  // 应用技能更新到数据库
@@ -1804,6 +1979,13 @@ function apply(ctx, config) {
1804
1979
  success: totalDamage >= 300,
1805
1980
  message: `需要累计造成300伤害(当前${totalDamage})`
1806
1981
  };
1982
+ case "情报副官":
1983
+ const techs = await ctx2.database.get("ggcevo_tech", { handle });
1984
+ const hasValidTech = techs.some((t) => t.level >= 3);
1985
+ return {
1986
+ success: hasValidTech,
1987
+ message: hasValidTech ? "" : "需要至少一个科技等级≥3级"
1988
+ };
1807
1989
  case "能量武器专家":
1808
1990
  const hasEnergyWeapon = weapons.some((weapon) => {
1809
1991
  const weaponConfigEntry = Object.values(weaponConfig).find((c) => c.id === weapon.weaponId);
@@ -1935,13 +2117,18 @@ function apply(ctx, config) {
1935
2117
  if (currentLevel >= tech.maxLevel) return `❌ ${tech.techname}已达最高等级`;
1936
2118
  const nextLevel = currentLevel + 1;
1937
2119
  const levelData = tech.levels.find((l) => l.level === nextLevel);
2120
+ let actualCost = levelData.cost;
2121
+ if (careerData.career === "情报副官") {
2122
+ actualCost = Math.floor(actualCost * 0.8);
2123
+ }
1938
2124
  const [signInfo] = await ctx.database.get("ggcevo_sign", { handle });
1939
- if (signInfo?.totalRewards < levelData.cost) {
1940
- return `❌ 需要 ${levelData.cost} 金币,当前持有:${signInfo?.totalRewards || 0}`;
2125
+ if (signInfo?.totalRewards < actualCost) {
2126
+ const originalHint = careerData.career === "情报副官" ? `(原价${levelData.cost})` : "";
2127
+ return `❌ 需要 ${actualCost} 金币${originalHint},当前持有:${signInfo?.totalRewards || 0}`;
1941
2128
  }
1942
2129
  await ctx.database.withTransaction(async () => {
1943
2130
  await ctx.database.set("ggcevo_sign", { handle }, {
1944
- totalRewards: signInfo.totalRewards - levelData.cost
2131
+ totalRewards: signInfo.totalRewards - actualCost
1945
2132
  });
1946
2133
  await ctx.database.upsert("ggcevo_tech", [{
1947
2134
  handle,
@@ -1949,7 +2136,9 @@ function apply(ctx, config) {
1949
2136
  level: nextLevel
1950
2137
  }], ["handle", "techId"]);
1951
2138
  });
2139
+ const costHint = careerData.career === "情报副官" ? `${actualCost}(情报副官:已享8折优惠)` : actualCost;
1952
2140
  return `✅ ${tech.techname} 升级至 Lv.${nextLevel}
2141
+ 💰 花费金币: ${costHint}
1953
2142
  📝 ${levelData.description}
1954
2143
  💼 ${levelData.careerBonus}`;
1955
2144
  }
@@ -2007,8 +2196,10 @@ function apply(ctx, config) {
2007
2196
  const newLevel = equipment.level + 1;
2008
2197
  const damage = (weaponData.damage * (1 + 0.1 * newLevel)).toFixed(1);
2009
2198
  let msg = `${target} 升级成功!Lv.${newLevel}`;
2010
- msg += `
2199
+ const priceInfo = actualCost === baseCost ? `
2200
+ 💸 消耗:${actualCost}金币` : `
2011
2201
  💸 消耗:${actualCost}金币 (原价${baseCost})`;
2202
+ msg += priceInfo;
2012
2203
  let discountDetails = [];
2013
2204
  if (weaponDiscount > 0) {
2014
2205
  discountDetails.push(`武器系统 Lv${techLevel} 折扣:${Math.max(baseDiscount, careerDiscount)}%`);
@@ -3449,7 +3640,8 @@ ${achievementList.join("\n")}`;
3449
3640
  }),
3450
3641
  `房主: ${lobby.hostName}`,
3451
3642
  `玩家数: ${lobby.slotsHumansTaken}/${lobby.slotsHumansTotal}`,
3452
- `🏆 安全玩家:${atElements || ""}`
3643
+ "──────────────",
3644
+ `请以下玩家通知房主踢人:${atElements || "无"}`
3453
3645
  ].join("\n");
3454
3646
  const groupId = [...config.groupId];
3455
3647
  await ctx.broadcast(groupId, message);
@@ -3729,6 +3921,16 @@ ${achievementList.join("\n")}`;
3729
3921
  ctx.command("ggcevo/武器库 [type]").usage("输入“武器库”查看类型,或“武器库 类型”查看详细武器信息").action(async ({ session }, type) => {
3730
3922
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
3731
3923
  if (!profile) return "⚠️ 需要先绑定游戏句柄";
3924
+ const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
3925
+ const [techData] = await ctx.database.get("ggcevo_tech", { handle, techId: 2 }).catch(() => [{ level: 0 }]);
3926
+ const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
3927
+ const techLevel = techData?.level || 0;
3928
+ const isCareerMatch = Spacestationtechnology.find((t) => t.techId === 2).careerNames.includes(careerData?.career);
3929
+ const BASE_DISCOUNTS = [0, 0, 0, 0, 0];
3930
+ const CAREER_DISCOUNTS = [0, 0, 10, 15, 20];
3931
+ const baseDiscount = techLevel > 0 ? BASE_DISCOUNTS[techLevel - 1] : 0;
3932
+ const careerDiscount = isCareerMatch ? CAREER_DISCOUNTS[techLevel - 1] : 0;
3933
+ const discountRate = Math.max(baseDiscount, careerDiscount);
3732
3934
  const typeStats = Object.values(weaponConfig).filter((weapon) => weapon.price !== 0).reduce((stats, weapon) => {
3733
3935
  stats[weapon.type] = (stats[weapon.type] || 0) + 1;
3734
3936
  return stats;
@@ -3739,21 +3941,23 @@ ${achievementList.join("\n")}`;
3739
3941
  '使用 "武器库 类型名称" 查看详细列表',
3740
3942
  "====================",
3741
3943
  ...Object.entries(typeStats).map(([typeName, count]) => `▸ ${typeName} (${count}种)`),
3944
+ discountRate > 0 && `
3945
+ 💡 当前购买折扣:${discountRate}%(武器系统 Lv${techLevel})`,
3742
3946
  "===================="
3743
- ].join("\n");
3947
+ ].filter(Boolean).join("\n");
3744
3948
  }
3745
- const validTypes = Object.keys(typeStats);
3746
- if (!validTypes.includes(type)) {
3949
+ if (!Object.keys(typeStats).includes(type)) {
3747
3950
  return `无效武器类型,可用类型:
3748
- ${validTypes.join("、")}`;
3951
+ ${Object.keys(typeStats).join("、")}`;
3749
3952
  }
3750
3953
  const items = Object.entries(weaponConfig).filter(([_, config2]) => config2.type === type && config2.price !== 0).map(([name2, config2]) => {
3954
+ const actualPrice = Math.floor(config2.price * (1 - discountRate / 100));
3751
3955
  const tagEffectsDesc = config2.tagEffects ? Object.entries(config2.tagEffects).map(([tag, multiplier]) => `▸ 对${tag}目标造成${(multiplier * 100).toFixed(0)}%伤害`).join("\n") : "▸ 无特殊加成效果";
3752
3956
  return [
3753
3957
  `【${name2}】`,
3754
3958
  `类型:${config2.type}`,
3755
3959
  `基础伤害:${config2.damage}`,
3756
- `价格:${config2.price}金币`,
3960
+ `价格:${actualPrice}金币${discountRate > 0 ? ` (原价${config2.price}, 折扣${discountRate}%)` : ""}`,
3757
3961
  "特性:",
3758
3962
  tagEffectsDesc,
3759
3963
  `描述:${config2.description}`
@@ -3762,10 +3966,11 @@ ${validTypes.join("、")}`;
3762
3966
  return [
3763
3967
  `🏪 咕咕武器库 - ${type} 🏪`,
3764
3968
  "使用“购买 武器名称”命令进行购买",
3969
+ discountRate > 0 && `🔧 当前应用折扣:武器系统 Lv${techLevel} ${discountRate}%`,
3765
3970
  "====================",
3766
3971
  ...items,
3767
3972
  items.length === 0 ? "⚠️ 该分类下暂无可用武器" : ""
3768
- ].join("\n\n");
3973
+ ].filter(Boolean).join("\n\n");
3769
3974
  });
3770
3975
  ctx.command("ggcevo/爆破库 [type]").usage("输入“爆破库”查看分类,或“爆破库 类型”查看详细物品").action(async ({ session }, type) => {
3771
3976
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
@@ -4021,78 +4226,109 @@ ${validTypes.join("、")}`;
4021
4226
  return `❌ 未找到 "${target}" 对应的武器或科技`;
4022
4227
  });
4023
4228
  ctx.command("ggcevo/改装 <weapon> [mod]", "安装武器模块").action(async ({ session }, weapon, mod) => {
4024
- const isValidWeapon = weapon && weaponConfig[weapon]?.id !== void 0;
4025
- const generateModList = /* @__PURE__ */ __name(() => {
4026
- if (!isValidWeapon) {
4027
- return Object.entries(modConfig).filter(([_, m]) => !m.isExclusive).map(formatModEntry).join("\n\n");
4028
- }
4029
- const exclusiveMods = Object.entries(modConfig).filter(([_, m]) => m.isExclusive && m.exclusiveTo === weapon).map(formatModEntry);
4030
- return exclusiveMods.length ? exclusiveMods.join("\n\n") : "该武器暂无专属模块";
4031
- }, "generateModList");
4032
- const formatModEntry = /* @__PURE__ */ __name(([name2, config2]) => [
4033
- `【${name2}】${config2.isExclusive ? ` (专属:${config2.exclusiveTo})` : ""}`,
4034
- `价格:${config2.cost}金币`,
4035
- `效果:${config2.effect.replace(/▸/g, "▸ ")}`,
4036
- config2.isExclusive ? "※ 每个武器只能安装一个专属模块" : ""
4037
- ].filter(Boolean).join("\n"), "formatModEntry");
4038
- if (!mod || !modConfig[mod]) {
4039
- return [
4040
- isValidWeapon ? `🛠️ ${weapon} 专属模块 🛠️` : "🛠️ 通用武器模块 🛠️",
4041
- isValidWeapon ? `使用「改装 ${weapon} 模块名称」安装专属模块` : weapon ? "※ 无效武器名称,请使用「改装 武器名称 模块名称」安装模块" : "※ 输入「改装 武器名称」查询专属模块\n※ 安装模块:「改装 武器名称 模块名称」",
4042
- "====================",
4043
- generateModList()
4044
- ].join("\n\n");
4045
- }
4046
4229
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
4047
4230
  if (!profile) return "您暂未绑定句柄";
4048
4231
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
4049
4232
  const existingEntries = await ctx.database.get("ggcevo_blacklist", { handle });
4050
- if (existingEntries.length > 0) {
4051
- return `❌ 拒绝访问,您已被列入黑名单。`;
4052
- }
4053
- const [signInfo] = await ctx.database.get("ggcevo_sign", { handle });
4054
- const [equipment] = await ctx.database.get("ggcevo_equipment", {
4055
- handle,
4056
- weaponId: weaponConfig[weapon].id
4057
- });
4058
- if (!equipment) return "尚未获得该武器。";
4059
- const modInfo = modConfig[mod];
4060
- if (modInfo.isExclusive) {
4061
- if (modInfo.exclusiveTo !== weapon) {
4062
- return `❌ 该模块只能安装在${modInfo.exclusiveTo}上。`;
4233
+ if (existingEntries.length > 0) return "❌ 拒绝访问,您已被列入黑名单";
4234
+ const isValidWeapon = weapon && weaponConfig[weapon]?.id !== void 0;
4235
+ const processModInstallation = /* @__PURE__ */ __name(async () => {
4236
+ const modInfo = modConfig[mod];
4237
+ if (!modInfo) return "无效模块名称。";
4238
+ const [equipment] = await ctx.database.get("ggcevo_equipment", {
4239
+ handle,
4240
+ weaponId: weaponConfig[weapon].id
4241
+ });
4242
+ if (!equipment) return "尚未获得该武器。";
4243
+ if (modInfo.isExclusive) {
4244
+ if (modInfo.exclusiveTo !== weapon) return `❌ 该模块只能安装在${modInfo.exclusiveTo}上。`;
4245
+ const hasExclusive = equipment.installedMods.some((m) => modConfig[m]?.isExclusive);
4246
+ if (hasExclusive) return "❌ 每个武器只能安装一个专属模块。";
4063
4247
  }
4064
- const hasExclusive = equipment.installedMods.some((m) => modConfig[m]?.isExclusive);
4065
- if (hasExclusive) return "❌ 每个武器只能安装一个专属模块。";
4066
- }
4067
- if (equipment.installedMods.length >= equipment.modificationSlots)
4068
- return "当前武器改装槽已满(升级武器等级至3/6级的时候会额外获得一个改装槽)。";
4069
- if (equipment.installedMods.includes(mod))
4070
- return "当前武器已安装相同模块。";
4071
- if ((signInfo?.totalRewards || 0) < modInfo.cost)
4072
- return `需要${modInfo.cost}枚金币,当前持有:${signInfo?.totalRewards || 0}`;
4073
- await ctx.database.set("ggcevo_equipment", {
4074
- handle,
4075
- weaponId: weaponConfig[weapon].id
4076
- }, {
4077
- installedMods: [...equipment.installedMods, mod]
4078
- });
4079
- await ctx.database.set("ggcevo_sign", { handle }, {
4080
- totalRewards: signInfo.totalRewards - modInfo.cost
4081
- });
4082
- const installedModsList = [...equipment.installedMods, mod].map((m) => {
4083
- const config2 = modConfig[m];
4248
+ if (equipment.installedMods.length >= equipment.modificationSlots) {
4249
+ return "❌ 当前可用改装槽已满(武器升级至3/6级会额外获得一个改装槽)。";
4250
+ }
4251
+ if (equipment.installedMods.includes(mod)) {
4252
+ return "❌ 已安装相同模块。";
4253
+ }
4254
+ const [techData] = await ctx.database.get("ggcevo_tech", { handle, techId: 3 }).catch(() => [{ level: 0 }]);
4255
+ const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
4256
+ const techLevel = techData?.level || 0;
4257
+ const isCareerMatch = Spacestationtechnology.find((t) => t.techId === 3).careerNames.includes(careerData?.career);
4258
+ let discountRate = 0;
4259
+ if (modInfo.isExclusive) {
4260
+ if (techLevel >= 2 && isCareerMatch) discountRate = 10;
4261
+ } else {
4262
+ const baseDiscount = [5, 10][techLevel - 1] || 0;
4263
+ const careerDiscount = techLevel >= 1 && isCareerMatch ? [10, 20][techLevel - 1] : 0;
4264
+ discountRate = Math.max(baseDiscount, careerDiscount);
4265
+ }
4266
+ const actualCost = Math.floor(modInfo.cost * (1 - discountRate / 100));
4267
+ const [signInfo] = await ctx.database.get("ggcevo_sign", { handle });
4268
+ if ((signInfo?.totalRewards || 0) < actualCost) {
4269
+ return `需要 ${actualCost} 金币,当前持有:${signInfo?.totalRewards || 0}`;
4270
+ }
4271
+ await ctx.database.set(
4272
+ "ggcevo_equipment",
4273
+ { handle, weaponId: weaponConfig[weapon].id },
4274
+ { installedMods: [...equipment.installedMods, mod] }
4275
+ );
4276
+ await ctx.database.set("ggcevo_sign", { handle }, {
4277
+ totalRewards: signInfo.totalRewards - actualCost
4278
+ });
4279
+ const discountMsg = discountRate > 0 ? `武器升级平台 Lv${techLevel} 折扣:${discountRate}%` : "";
4084
4280
  return [
4085
- `【${m}】`,
4086
- `安装费用:${config2.cost}枚金币`,
4087
- `效果:${config2.effect}`
4281
+ `✅ ${weapon} 成功安装 ${mod}!`,
4282
+ discountMsg,
4283
+ `花费金币:${actualCost}`,
4284
+ `改装槽:${equipment.installedMods.length + 1}/${equipment.modificationSlots}`
4088
4285
  ].join("\n");
4089
- }).join("\n\n");
4090
- return [
4091
- `✅ ${weapon} 成功安装 ${mod}!`,
4092
- "当前改装配置:",
4093
- installedModsList,
4094
- `剩余金币:${signInfo.totalRewards - modInfo.cost}`
4095
- ].join("\n\n");
4286
+ }, "processModInstallation");
4287
+ const showModList = /* @__PURE__ */ __name(async () => {
4288
+ const [techData] = await ctx.database.get("ggcevo_tech", { handle, techId: 3 }).catch(() => [{ level: 0 }]);
4289
+ const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
4290
+ const techLevel = techData?.level || 0;
4291
+ const isCareerMatch = Spacestationtechnology.find((t) => t.techId === 3).careerNames.includes(careerData?.career);
4292
+ const formatMod = /* @__PURE__ */ __name((name2, config2) => {
4293
+ let discountRate = 0;
4294
+ if (config2.isExclusive) {
4295
+ if (techLevel >= 2 && isCareerMatch) discountRate = 10;
4296
+ } else {
4297
+ const baseDiscount = [5, 10][techLevel - 1] || 0;
4298
+ const careerDiscount = techLevel >= 1 && isCareerMatch ? [10, 20][techLevel - 1] : 0;
4299
+ discountRate = Math.max(baseDiscount, careerDiscount);
4300
+ }
4301
+ const actualPrice = Math.floor(config2.cost * (1 - discountRate / 100));
4302
+ return [
4303
+ `【${name2}】${config2.isExclusive ? ` (专属:${config2.exclusiveTo})` : ""}`,
4304
+ `价格:${actualPrice}金币${discountRate > 0 ? ` (原价${config2.cost}, 折扣${discountRate}%)` : ""}`,
4305
+ `效果:${config2.effect.replace(/▸/g, "▸ ")}`,
4306
+ config2.isExclusive ? "※ 每个武器只能安装一个专属模块" : ""
4307
+ ].filter(Boolean).join("\n");
4308
+ }, "formatMod");
4309
+ if (isValidWeapon) {
4310
+ const exclusiveMods = Object.entries(modConfig).filter(([_, m]) => m.isExclusive && m.exclusiveTo === weapon).map(([name2, cfg]) => formatMod(name2, cfg));
4311
+ return [
4312
+ `🛠️ ${weapon} 专属模块 🛠️`,
4313
+ "使用「改装 武器名称 模块名称」安装",
4314
+ "====================",
4315
+ exclusiveMods.length ? exclusiveMods.join("\n\n") : "该武器暂无专属模块"
4316
+ ].join("\n\n");
4317
+ } else {
4318
+ const universalMods = Object.entries(modConfig).filter(([_, m]) => !m.isExclusive).map(([name2, cfg]) => formatMod(name2, cfg));
4319
+ return [
4320
+ "🛠️ 通用武器模块 🛠️",
4321
+ "使用「改装 武器名称 模块名称」安装专属模块",
4322
+ "====================",
4323
+ universalMods.join("\n\n")
4324
+ ].join("\n\n");
4325
+ }
4326
+ }, "showModList");
4327
+ if (mod) {
4328
+ return processModInstallation();
4329
+ } else {
4330
+ return showModList();
4331
+ }
4096
4332
  });
4097
4333
  ctx.command("ggcevo/攻击 <bossName>").usage("请输入要攻击的异形名称(例如:攻击 异齿猛兽 或 攻击 寒冰王蛇)").action(async (argv, bossName) => {
4098
4334
  const session = argv.session;
@@ -4294,7 +4530,7 @@ ${effectMessage.join("\n")}`
4294
4530
  // 修改金币显示行
4295
4531
  `获得金币:${finalReward}${careerMessage}`,
4296
4532
  `目标剩余HP:${Math.max(currentHP, 0)}/${maxHP}`,
4297
- isDefeated ? `🎉 恭喜,您成功击败 ${targetBoss.name}!` : ""
4533
+ isDefeated ? `🎉 恭喜,已成功击败 ${targetBoss.name}!` : ""
4298
4534
  ].filter((line) => line).join("\n");
4299
4535
  await session.send(resultMessage);
4300
4536
  if (broadcastMessage) {
@@ -4776,15 +5012,22 @@ ${effectMessage.join("\n")}`
4776
5012
  `✨ 职业效果:${effectDisplay}`,
4777
5013
  `🗓️ 就职时间:${formattedDate}`
4778
5014
  ];
4779
- if (careerData.group === "辛迪加海盗") {
4780
- infoCard.push("💡 提示:红晶可通过主动PK获得(无论胜负)");
4781
- } else {
4782
- infoCard.push("💡 提示:使用「转职」命令可变更职业");
5015
+ if (careerData.group === "人类联盟") {
5016
+ const techEntries = await ctx.database.get("ggcevo_tech", { handle });
5017
+ const activeTechs = techEntries.filter((entry) => entry.level > 0).map((entry) => {
5018
+ const techConfig = Spacestationtechnology.find((t) => t.techId === entry.techId);
5019
+ return techConfig ? `🛠️ ${techConfig.techname} [${entry.level}/${techConfig.maxLevel}]` : null;
5020
+ }).filter(Boolean);
5021
+ if (activeTechs.length > 0) {
5022
+ infoCard.push("", "〓 科技研发 〓", ...activeTechs);
5023
+ }
4783
5024
  }
5025
+ const promptMessage = careerData.group === "辛迪加海盗" ? "💡 提示:红晶可通过主动PK获得(无论胜负)" : "💡 提示:使用「转职」命令可变更职业";
4784
5026
  return [
4785
5027
  "〓 职业档案 〓",
4786
5028
  ...infoCard,
4787
- "〓═════════〓"
5029
+ "〓═════════〓\n" + promptMessage
5030
+ // 提示信息放在分隔线下方
4788
5031
  ].join("\n");
4789
5032
  } catch (error) {
4790
5033
  ctx.logger.error("查询职业信息失败:", error);
@@ -4966,7 +5209,7 @@ ${effectMessage.join("\n")}`
4966
5209
  ) && item.quantity > 0
4967
5210
  );
4968
5211
  if (!validItems.length) {
4969
- message.push("你的特殊物品仓库空空如也。");
5212
+ message.push("你的物品仓库空空如也。");
4970
5213
  } else {
4971
5214
  message.push(
4972
5215
  validItems.map((warehouseItem) => {
@@ -5029,33 +5272,6 @@ ${effectMessage.join("\n")}`
5029
5272
  return "⚠️ 物品使用失败,请联系管理员";
5030
5273
  }
5031
5274
  });
5032
- ctx.command("ggcevo/科技信息", "查看空间站科技配置").action(async ({ session }) => {
5033
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
5034
- if (!profile) return "❌ 您暂未绑定句柄。";
5035
- const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
5036
- const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
5037
- if (!careerData || careerData.group !== "人类联盟") {
5038
- return "🚫 该功能需要【人类联盟】阵营权限";
5039
- }
5040
- const techEntries = await ctx.database.get("ggcevo_tech", { handle });
5041
- const techInfo = Spacestationtechnology.map((tech) => {
5042
- const entry = techEntries.find((e) => e.techId === tech.techId);
5043
- const currentLevel = entry?.level || 0;
5044
- const levelData = tech.levels.find((l) => l.level === currentLevel);
5045
- let description = "尚未解锁";
5046
- let careerBonus = "无";
5047
- if (levelData) {
5048
- description = levelData.description;
5049
- careerBonus = levelData.careerBonus;
5050
- }
5051
- return `🛠️ ${tech.techname} [${currentLevel}/${tech.maxLevel}]
5052
- 📌 效果:${description}
5053
- 🎖️ ${careerBonus}`;
5054
- }).join("\n\n");
5055
- return `🚀 空间站科技配置信息:
5056
-
5057
- ${techInfo}`;
5058
- });
5059
5275
  ctx.command("ggcevo/科技 [techName]", "查看空间站科技信息").usage("输入“科技”查看列表,或“科技 科技名称”查看详细信息").action(async ({ session }, techName) => {
5060
5276
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
5061
5277
  if (!profile) return "🔒 需要先绑定游戏句柄";
@@ -5100,6 +5316,95 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
5100
5316
  "===================="
5101
5317
  ].join("\n");
5102
5318
  });
5319
+ ctx.command("ggcevo/挖矿").action(async ({ session }) => {
5320
+ const convertUTCtoChinaTime2 = /* @__PURE__ */ __name((utcDate) => {
5321
+ const chinaOffset = 8 * 60 * 60 * 1e3;
5322
+ return new Date(utcDate.getTime() + chinaOffset);
5323
+ }, "convertUTCtoChinaTime");
5324
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
5325
+ if (!profile) return "🔒 需要先绑定游戏句柄";
5326
+ const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
5327
+ if (await ctx.database.get("ggcevo_blacklist", { handle }).then((r) => r.length)) {
5328
+ return "⛔ 您已被列入黑名单";
5329
+ }
5330
+ const [career] = await ctx.database.get("ggcevo_careers", { handle });
5331
+ if (!career || career.group !== "人类联盟") {
5332
+ return "🚫 该功能需要【人类联盟】阵营权限";
5333
+ }
5334
+ if (!["深空矿工", "情报副官"].includes(career?.career)) {
5335
+ return "🚫 需要职业为深空矿工或情报副官";
5336
+ }
5337
+ const [tech] = await ctx.database.get("ggcevo_tech", { handle, techId: 1 });
5338
+ if (!tech || tech.level < 2) return "🚫 需要采掘系统等级≥2";
5339
+ const [record] = await ctx.database.get("ggcevo_Mining", { handle });
5340
+ const [sign] = await ctx.database.get("ggcevo_sign", { handle });
5341
+ if (!record) {
5342
+ await ctx.database.create("ggcevo_Mining", {
5343
+ handle,
5344
+ startTime: /* @__PURE__ */ new Date()
5345
+ // 记录当前时间为开始时间
5346
+ });
5347
+ return "⛏️ 挖矿作业已开始,至少1小时后可收获";
5348
+ }
5349
+ const nowtime = /* @__PURE__ */ new Date();
5350
+ const chinaStart = convertUTCtoChinaTime2(record.startTime);
5351
+ const chinaNow = convertUTCtoChinaTime2(nowtime);
5352
+ const duration = Math.floor(
5353
+ (chinaNow.getTime() - chinaStart.getTime()) / 1e3 / 60
5354
+ );
5355
+ if (duration < 60) {
5356
+ const remaining = 60 - duration;
5357
+ return [
5358
+ "⛏️ 挖矿进行中",
5359
+ `🕒 开始时间:${record.startTime.toLocaleString("zh-CN", { hour12: false })}`,
5360
+ `⏱️ 当前时间:${nowtime.toLocaleString("zh-CN", { hour12: false })}`,
5361
+ `⏳ 还需等待:${remaining}分钟`,
5362
+ `💡 提示:达到1小时可随时收获并自动开始下一轮`
5363
+ ].join("\n");
5364
+ }
5365
+ const halfHours = Math.floor(duration / 30);
5366
+ let base = halfHours * 6.25;
5367
+ base = Math.round(base);
5368
+ base = Math.min(base, 300);
5369
+ let multiplier = 0;
5370
+ switch (tech.level) {
5371
+ case 4:
5372
+ multiplier = 0.2;
5373
+ break;
5374
+ // +20%
5375
+ case 5:
5376
+ multiplier = 0.4;
5377
+ break;
5378
+ }
5379
+ const total = Math.round(base * (1 + multiplier));
5380
+ await ctx.database.withTransaction(async () => {
5381
+ await ctx.database.upsert("ggcevo_sign", [{
5382
+ handle,
5383
+ totalRewards: (sign?.totalRewards || 0) + total
5384
+ }], ["handle"]);
5385
+ await ctx.database.set("ggcevo_Mining", { handle }, {
5386
+ startTime: /* @__PURE__ */ new Date()
5387
+ // 重置为当前时间
5388
+ });
5389
+ });
5390
+ const formatTime = /* @__PURE__ */ __name((mins) => {
5391
+ const hours = Math.floor(mins / 60);
5392
+ const minutes = mins % 60;
5393
+ return `${hours}小时${minutes}分钟`;
5394
+ }, "formatTime");
5395
+ return [
5396
+ "⛏️ 挖矿报告",
5397
+ `🕒 开始时间:${record.startTime.toLocaleString("zh-CN", { hour12: false })}`,
5398
+ `⏱️ 结束时间:${nowtime.toLocaleString("zh-CN", { hour12: false })}`,
5399
+ `⏳ 持续时间:${formatTime(duration)}`,
5400
+ ...tech.level >= 3 ? (
5401
+ // 仅当科技等级≥3时显示加成信息
5402
+ [`🔧 科技加成(Lv.${tech.level}):+${multiplier * 100}%`]
5403
+ ) : [],
5404
+ `💰 实际获得:${total}金币`,
5405
+ "💡 已自动开始下一轮挖矿"
5406
+ ].join("\n");
5407
+ });
5103
5408
  }
5104
5409
  __name(apply, "apply");
5105
5410
  function simpleDraw() {
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.2.73",
4
+ "version": "1.3.1",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [