koishi-plugin-ggcevo-game 1.3.35 → 1.3.37
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 +2 -0
- package/lib/index.js +602 -138
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -228,6 +228,8 @@ function apply(ctx, config) {
|
|
|
228
228
|
// 明确数组元素类型
|
|
229
229
|
Skillcountpoints: "unsigned",
|
|
230
230
|
Vulnerability: "unsigned",
|
|
231
|
+
freezing: "unsigned",
|
|
232
|
+
energy: "unsigned",
|
|
231
233
|
groupId: "unsigned",
|
|
232
234
|
isActive: "boolean",
|
|
233
235
|
respawnTime: "timestamp"
|
|
@@ -442,13 +444,28 @@ function apply(ctx, config) {
|
|
|
442
444
|
type: "能量武器",
|
|
443
445
|
damage: 30,
|
|
444
446
|
description: "激光步枪的变种,采用折射技术升级",
|
|
445
|
-
specialeffect: "",
|
|
447
|
+
specialeffect: "攻击目标后,若有存活的其他异形,则对其造成20%的武器基础伤害",
|
|
446
448
|
price: 1450,
|
|
447
449
|
redCrystalCost: 15,
|
|
448
450
|
isantiair: true,
|
|
449
451
|
tagEffects: {
|
|
450
452
|
"灵能": 1.5
|
|
451
453
|
}
|
|
454
|
+
},
|
|
455
|
+
"粒子相位枪": {
|
|
456
|
+
id: 12,
|
|
457
|
+
type: "能量武器",
|
|
458
|
+
damage: 30,
|
|
459
|
+
description: "面对护盾目标而开发的武器",
|
|
460
|
+
specialeffect: "",
|
|
461
|
+
price: 1050,
|
|
462
|
+
redCrystalCost: 15,
|
|
463
|
+
isantiair: true,
|
|
464
|
+
tagEffects: {
|
|
465
|
+
"护盾": 2,
|
|
466
|
+
"轻甲": 0.5,
|
|
467
|
+
"重甲": 0.2
|
|
468
|
+
}
|
|
452
469
|
}
|
|
453
470
|
};
|
|
454
471
|
const SyndicatedItems = {
|
|
@@ -656,6 +673,38 @@ function apply(ctx, config) {
|
|
|
656
673
|
"辐射": {
|
|
657
674
|
effect: 0,
|
|
658
675
|
description: "受到伽马枪攻击时会积累辐射层数,每层使受到的伤害增加1%(至多增加100%)"
|
|
676
|
+
},
|
|
677
|
+
"电能导体": {
|
|
678
|
+
effect: 0,
|
|
679
|
+
description: "当血量降低到10%以下时,“护盾”标签变为“重甲”标签; 受到寒冷伤害时,会叠加一层“寒冷”(至多10层)"
|
|
680
|
+
},
|
|
681
|
+
"超导体": {
|
|
682
|
+
effect: 0,
|
|
683
|
+
description: "当血量降低到5%以下时,“护盾”标签变为“重甲”标签; 受到寒冷伤害时,会叠加一层“寒冷”(至多10层)"
|
|
684
|
+
},
|
|
685
|
+
"能量虹吸": {
|
|
686
|
+
effect: 0,
|
|
687
|
+
description: "当血量大于70%的时候,受到的伤害-40%; 当血量大于30%的时候,受到的伤害-20%"
|
|
688
|
+
},
|
|
689
|
+
"电能立场": {
|
|
690
|
+
effect: 0,
|
|
691
|
+
description: "当“能量”大于20%的时候,每次受到攻击有55%的概率免疫此次伤害(无法免疫寒冷伤害); 每拥有一层“寒冷”则降低5%的概率"
|
|
692
|
+
},
|
|
693
|
+
"电能冲击波": {
|
|
694
|
+
effect: 0,
|
|
695
|
+
description: "每次受到攻击时,自身回复100点“能量”"
|
|
696
|
+
},
|
|
697
|
+
"能源虹吸": {
|
|
698
|
+
effect: 0,
|
|
699
|
+
description: "拥有独特的“能量”机制。当“能量”大于80%的时候,受到的伤害-50%; 当“能量”大于50%的时候,受到的伤害-30%"
|
|
700
|
+
},
|
|
701
|
+
"脉冲": {
|
|
702
|
+
effect: 0,
|
|
703
|
+
description: "当“能量”大于80%的时候,每次受到攻击有60%的概率回复所有异形100点HP; 每拥有一层“寒冷”则降低5%的概率"
|
|
704
|
+
},
|
|
705
|
+
"能量黑洞": {
|
|
706
|
+
effect: 0,
|
|
707
|
+
description: "存在“能量黑洞”,受到的伤害-10%; 每拥有一层“寒冷”,受到的伤害+5%"
|
|
659
708
|
}
|
|
660
709
|
};
|
|
661
710
|
const defineBoss = /* @__PURE__ */ __name((config2) => config2, "defineBoss");
|
|
@@ -666,6 +715,7 @@ function apply(ctx, config) {
|
|
|
666
715
|
name: "异齿猛兽首领",
|
|
667
716
|
type: "主宰",
|
|
668
717
|
maxHP: 15e3,
|
|
718
|
+
energy: 0,
|
|
669
719
|
tags: asBossTags(["重甲", "生物", "异形"]),
|
|
670
720
|
passive: asPassives(["异形甲壳"])
|
|
671
721
|
},
|
|
@@ -674,6 +724,7 @@ function apply(ctx, config) {
|
|
|
674
724
|
name: "异齿猛兽",
|
|
675
725
|
type: "子代",
|
|
676
726
|
maxHP: 5e3,
|
|
727
|
+
energy: 0,
|
|
677
728
|
tags: asBossTags(["重甲", "生物", "重型", "异形"]),
|
|
678
729
|
passive: asPassives(["弱化形态", "异形甲壳"])
|
|
679
730
|
}
|
|
@@ -685,6 +736,7 @@ function apply(ctx, config) {
|
|
|
685
736
|
name: "寒冰王蛇",
|
|
686
737
|
type: "主宰",
|
|
687
738
|
maxHP: 15e3,
|
|
739
|
+
energy: 0,
|
|
688
740
|
tags: asBossTags(["重甲", "生物", "惧热", "重型", "异形"]),
|
|
689
741
|
passive: asPassives(["冰霜环绕", "冰霜进化"])
|
|
690
742
|
},
|
|
@@ -693,6 +745,7 @@ function apply(ctx, config) {
|
|
|
693
745
|
name: "冰蛇",
|
|
694
746
|
type: "子代",
|
|
695
747
|
maxHP: 5e3,
|
|
748
|
+
energy: 0,
|
|
696
749
|
tags: asBossTags(["生物", "惧热", "异形"]),
|
|
697
750
|
passive: asPassives(["弱化形态", "冰霜回复", "冰霜进化"])
|
|
698
751
|
}
|
|
@@ -704,6 +757,7 @@ function apply(ctx, config) {
|
|
|
704
757
|
name: "莽兽",
|
|
705
758
|
type: "主宰",
|
|
706
759
|
maxHP: 12e3,
|
|
760
|
+
energy: 0,
|
|
707
761
|
tags: asBossTags(["重甲", "生物", "重型", "异形"]),
|
|
708
762
|
passive: asPassives(["应激甲壳II", "求生本能II", "冷适应"])
|
|
709
763
|
},
|
|
@@ -712,6 +766,7 @@ function apply(ctx, config) {
|
|
|
712
766
|
name: "狂暴畸变体",
|
|
713
767
|
type: "子代",
|
|
714
768
|
maxHP: 4e3,
|
|
769
|
+
energy: 0,
|
|
715
770
|
tags: asBossTags(["重甲", "生物", "重型", "异形"]),
|
|
716
771
|
passive: asPassives(["弱化形态", "应激甲壳I", "求生本能I", "冷适应"])
|
|
717
772
|
},
|
|
@@ -719,6 +774,7 @@ function apply(ctx, config) {
|
|
|
719
774
|
name: "剧毒畸变体",
|
|
720
775
|
type: "子代",
|
|
721
776
|
maxHP: 4e3,
|
|
777
|
+
energy: 0,
|
|
722
778
|
tags: asBossTags(["重甲", "生物", "重型", "异形"]),
|
|
723
779
|
passive: asPassives(["弱化形态", "应激甲壳I", "求生本能I", "冷适应"])
|
|
724
780
|
}
|
|
@@ -730,6 +786,7 @@ function apply(ctx, config) {
|
|
|
730
786
|
name: "空间站感染虫",
|
|
731
787
|
type: "主宰",
|
|
732
788
|
maxHP: 1e4,
|
|
789
|
+
energy: 0,
|
|
733
790
|
tags: asBossTags(["重甲", "生物", "机械", "异形"]),
|
|
734
791
|
passive: asPassives(["感染空间站", "病毒云", "霉菌滋生"])
|
|
735
792
|
},
|
|
@@ -738,6 +795,7 @@ function apply(ctx, config) {
|
|
|
738
795
|
name: "机械感染虫",
|
|
739
796
|
type: "子代",
|
|
740
797
|
maxHP: 3e3,
|
|
798
|
+
energy: 0,
|
|
741
799
|
tags: asBossTags(["重甲", "生物", "机械", "异形"]),
|
|
742
800
|
passive: asPassives(["弱化形态", "病毒云", "霉菌滋生"])
|
|
743
801
|
},
|
|
@@ -745,6 +803,7 @@ function apply(ctx, config) {
|
|
|
745
803
|
name: "空间站哨枪塔",
|
|
746
804
|
type: "子代",
|
|
747
805
|
maxHP: 5e3,
|
|
806
|
+
energy: 0,
|
|
748
807
|
tags: asBossTags(["重甲", "机械", "建筑"]),
|
|
749
808
|
passive: asPassives(["岗哨机枪", "结构装甲"])
|
|
750
809
|
}
|
|
@@ -756,6 +815,7 @@ function apply(ctx, config) {
|
|
|
756
815
|
name: "吸血蝙蝠首领",
|
|
757
816
|
type: "主宰",
|
|
758
817
|
maxHP: 12e3,
|
|
818
|
+
energy: 0,
|
|
759
819
|
tags: asBossTags(["生物", "异形"]),
|
|
760
820
|
passive: asPassives(["吸血唾液", "进食", "吐血", "嗜血狂暴"])
|
|
761
821
|
},
|
|
@@ -764,30 +824,60 @@ function apply(ctx, config) {
|
|
|
764
824
|
name: "吸血蝙蝠",
|
|
765
825
|
type: "子代",
|
|
766
826
|
maxHP: 4e3,
|
|
827
|
+
energy: 0,
|
|
767
828
|
tags: asBossTags(["生物", "异形"]),
|
|
768
829
|
passive: asPassives(["弱化形态", "吸血唾液", "进食", "吐血"])
|
|
769
830
|
}
|
|
770
831
|
]
|
|
832
|
+
}),
|
|
833
|
+
defineBoss({
|
|
834
|
+
main: {
|
|
835
|
+
id: 6,
|
|
836
|
+
name: "亚电主宰者",
|
|
837
|
+
type: "主宰",
|
|
838
|
+
maxHP: 2e4,
|
|
839
|
+
energy: 1e3,
|
|
840
|
+
tags: asBossTags(["护盾", "灵能", "重型", "异形"]),
|
|
841
|
+
passive: asPassives(["超导体", "电能冲击波", "电能立场", "能源虹吸", "脉冲", "能量黑洞"])
|
|
842
|
+
},
|
|
843
|
+
minions: [
|
|
844
|
+
{
|
|
845
|
+
name: "亚电能者",
|
|
846
|
+
type: "子代",
|
|
847
|
+
maxHP: 6e3,
|
|
848
|
+
energy: 0,
|
|
849
|
+
tags: asBossTags(["护盾", "灵能", "异形"]),
|
|
850
|
+
passive: asPassives(["弱化形态", "超导体", "能量虹吸", "能量黑洞"])
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
name: "电能者",
|
|
854
|
+
type: "子代",
|
|
855
|
+
maxHP: 3e3,
|
|
856
|
+
energy: 0,
|
|
857
|
+
tags: asBossTags(["护盾", "灵能", "异形"]),
|
|
858
|
+
passive: asPassives(["弱化形态", "电能导体", "能量虹吸", "能量黑洞"])
|
|
859
|
+
}
|
|
860
|
+
]
|
|
771
861
|
})
|
|
772
862
|
];
|
|
773
863
|
const spaceStationCrewConfig = [
|
|
774
864
|
{
|
|
775
865
|
professionName: "深空矿工",
|
|
776
|
-
effect: "
|
|
866
|
+
effect: "每日签到获得的金币+50%",
|
|
777
867
|
requirements: "当月累计签到7天及以上",
|
|
778
868
|
Jobtransfer: true,
|
|
779
869
|
costcoins: 1500
|
|
780
870
|
},
|
|
781
871
|
{
|
|
782
872
|
professionName: "警卫员下士",
|
|
783
|
-
effect: "
|
|
873
|
+
effect: "攻击获得的金币+50%",
|
|
784
874
|
requirements: "当期伤害榜累计攻击4次及以上",
|
|
785
875
|
Jobtransfer: true,
|
|
786
876
|
costcoins: 2e3
|
|
787
877
|
},
|
|
788
878
|
{
|
|
789
879
|
professionName: "警卫长",
|
|
790
|
-
effect: "攻击伤害+5
|
|
880
|
+
effect: "攻击伤害+5%,攻击获得的金币+100%",
|
|
791
881
|
requirements: "当期伤害榜前十名",
|
|
792
882
|
Jobtransfer: true,
|
|
793
883
|
costcoins: 3e3
|
|
@@ -870,7 +960,7 @@ function apply(ctx, config) {
|
|
|
870
960
|
{
|
|
871
961
|
professionName: "猩红杀手",
|
|
872
962
|
effect: "使用“侦察步枪”造成的伤害+15%; 解锁DSR-55反器材步枪(传奇)购买权限",
|
|
873
|
-
requirements: "“侦察步枪”武器等级≥3",
|
|
963
|
+
requirements: "“侦察步枪”武器等级≥3级",
|
|
874
964
|
Jobtransfer: true,
|
|
875
965
|
costcoins: 0,
|
|
876
966
|
costredcrystal: 30
|
|
@@ -1038,6 +1128,45 @@ function apply(ctx, config) {
|
|
|
1038
1128
|
careerBonus: "武器中士/情报副官: 武器改装通用模块享有20%的折扣; 武器改装专属模块享有10%的折扣"
|
|
1039
1129
|
}
|
|
1040
1130
|
]
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
techId: 4,
|
|
1134
|
+
techname: "安防系统",
|
|
1135
|
+
careerNames: ["警卫员下士", "警卫长", "情报副官"],
|
|
1136
|
+
// 新增职业名称字段
|
|
1137
|
+
maxLevel: 5,
|
|
1138
|
+
levels: [
|
|
1139
|
+
{
|
|
1140
|
+
level: 1,
|
|
1141
|
+
cost: 500,
|
|
1142
|
+
description: "重启安防参数代码,攻击获得的金币+5%",
|
|
1143
|
+
careerBonus: "警卫员下士/警卫长/情报副官: 攻击获得的金币+10%"
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
level: 2,
|
|
1147
|
+
cost: 2050,
|
|
1148
|
+
description: "提高空间站安防系统强度,攻击获得的金币+10%",
|
|
1149
|
+
careerBonus: "警卫员下士/警卫长/情报副官: 攻击获得的金币+20%"
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
level: 3,
|
|
1153
|
+
cost: 3250,
|
|
1154
|
+
description: "进一步提高空间站安防系统强度,攻击获得的金币+15%",
|
|
1155
|
+
careerBonus: "警卫员下士/警卫长/情报副官: 攻击获得的金币+30%"
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
level: 4,
|
|
1159
|
+
cost: 4250,
|
|
1160
|
+
description: "大幅提高空间站安防系统强度,攻击获得的金币+20%",
|
|
1161
|
+
careerBonus: "警卫员下士/警卫长/情报副官: 攻击获得的金币+40%"
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
level: 5,
|
|
1165
|
+
cost: 5350,
|
|
1166
|
+
description: "完全恢复空间站安防系统,攻击获得的金币+25%",
|
|
1167
|
+
careerBonus: "警卫员下士/警卫长/情报副官: 攻击获得的金币+50%; 打开安全军械库防爆门,随机获得一把传奇武器"
|
|
1168
|
+
}
|
|
1169
|
+
]
|
|
1041
1170
|
}
|
|
1042
1171
|
];
|
|
1043
1172
|
const Tasklist = {
|
|
@@ -1374,6 +1503,7 @@ function apply(ctx, config) {
|
|
|
1374
1503
|
tags: nextBossGroup.main.tags,
|
|
1375
1504
|
// 新增标签字段
|
|
1376
1505
|
skills: [...nextBossGroup.main.passive],
|
|
1506
|
+
energy: nextBossGroup.main.energy,
|
|
1377
1507
|
groupId: nextBossGroup.main.id,
|
|
1378
1508
|
isActive: true,
|
|
1379
1509
|
respawnTime: /* @__PURE__ */ new Date()
|
|
@@ -1386,6 +1516,7 @@ function apply(ctx, config) {
|
|
|
1386
1516
|
tags: minion.tags,
|
|
1387
1517
|
// 新增标签字段
|
|
1388
1518
|
skills: [...minion.passive],
|
|
1519
|
+
energy: minion.energy,
|
|
1389
1520
|
groupId: mainBoss.groupId,
|
|
1390
1521
|
isActive: true,
|
|
1391
1522
|
respawnTime: /* @__PURE__ */ new Date()
|
|
@@ -1773,6 +1904,200 @@ function apply(ctx, config) {
|
|
|
1773
1904
|
messages: radiationLayers > 0 ? [`☢️ 【辐射】生效:当前${radiationLayers}层辐射,受到的伤害+${radiationLayers}%`] : []
|
|
1774
1905
|
};
|
|
1775
1906
|
}, "calculateRadiationDamage"),
|
|
1907
|
+
// === 电能相关被动处理 ===
|
|
1908
|
+
// 处理寒冷伤害叠加(电能导体/超导体)
|
|
1909
|
+
handleFreezingStack: /* @__PURE__ */ __name(async (ctx2, targetBoss, weaponName) => {
|
|
1910
|
+
if (weaponName !== "零度之下" || !(targetBoss.skills.includes("电能导体") || targetBoss.skills.includes("超导体"))) {
|
|
1911
|
+
return null;
|
|
1912
|
+
}
|
|
1913
|
+
const currentFreezing = targetBoss.freezing || 0;
|
|
1914
|
+
if (currentFreezing < 10) {
|
|
1915
|
+
const newFreezing = currentFreezing + 1;
|
|
1916
|
+
await ctx2.database.set(
|
|
1917
|
+
"ggcevo_boss",
|
|
1918
|
+
{ name: targetBoss.name },
|
|
1919
|
+
{ freezing: newFreezing }
|
|
1920
|
+
);
|
|
1921
|
+
return {
|
|
1922
|
+
messages: [`❄️ ${targetBoss.name} 获得一层"寒冷"(当前 ${newFreezing}层)`]
|
|
1923
|
+
};
|
|
1924
|
+
}
|
|
1925
|
+
return null;
|
|
1926
|
+
}, "handleFreezingStack"),
|
|
1927
|
+
// 处理导体标签变化(血量低时护盾->重甲)
|
|
1928
|
+
handleConductorTagChange: /* @__PURE__ */ __name(async (ctx2, targetBoss, currentHP, maxHP) => {
|
|
1929
|
+
const triggerThreshold = targetBoss.skills.includes("超导体") ? 0.05 : 0.1;
|
|
1930
|
+
const isBelowThreshold = currentHP <= maxHP * triggerThreshold;
|
|
1931
|
+
const hasShieldTag = targetBoss.tags.includes("护盾");
|
|
1932
|
+
const alreadyHeavyArmor = targetBoss.tags.includes("重甲");
|
|
1933
|
+
if (!targetBoss.skills.includes("超导体") || !targetBoss.skills.includes("电能导体")) return null;
|
|
1934
|
+
if (isBelowThreshold && hasShieldTag && !alreadyHeavyArmor) {
|
|
1935
|
+
const newTags = [
|
|
1936
|
+
...targetBoss.tags.filter((tag) => tag !== "护盾"),
|
|
1937
|
+
"重甲"
|
|
1938
|
+
];
|
|
1939
|
+
await ctx2.database.set(
|
|
1940
|
+
"ggcevo_boss",
|
|
1941
|
+
{ name: targetBoss.name },
|
|
1942
|
+
{ tags: newTags }
|
|
1943
|
+
);
|
|
1944
|
+
return {
|
|
1945
|
+
messages: [`⚡ 【${targetBoss.skills.includes("超导体") ? "超导体" : "电能导体"}】生效:护盾崩溃,标签变更为「重甲」`]
|
|
1946
|
+
};
|
|
1947
|
+
}
|
|
1948
|
+
return null;
|
|
1949
|
+
}, "handleConductorTagChange"),
|
|
1950
|
+
// 处理能量虹吸减伤(基于血量)
|
|
1951
|
+
handleEnergySiphon: /* @__PURE__ */ __name((targetBoss, currentHP, maxHP) => {
|
|
1952
|
+
if (!targetBoss.skills.includes("能量虹吸")) return null;
|
|
1953
|
+
let reduction = 0;
|
|
1954
|
+
if (currentHP > maxHP * 0.7) {
|
|
1955
|
+
reduction = 0.4;
|
|
1956
|
+
} else if (currentHP > maxHP * 0.3) {
|
|
1957
|
+
reduction = 0.2;
|
|
1958
|
+
}
|
|
1959
|
+
if (reduction > 0) {
|
|
1960
|
+
return {
|
|
1961
|
+
damageMultiplier: -reduction,
|
|
1962
|
+
messages: [`🔋 【能量虹吸】生效:血量${currentHP > maxHP * 0.7 ? ">70%" : ">30%"},受到的伤害-${reduction * 100}%`]
|
|
1963
|
+
};
|
|
1964
|
+
}
|
|
1965
|
+
return null;
|
|
1966
|
+
}, "handleEnergySiphon"),
|
|
1967
|
+
// 处理电能冲击波(受击回复能量)
|
|
1968
|
+
handleEnergyShockwave: /* @__PURE__ */ __name(async (ctx2, targetBoss) => {
|
|
1969
|
+
if (!targetBoss.skills.includes("电能冲击波")) return null;
|
|
1970
|
+
const energyGain = 100;
|
|
1971
|
+
const currentEnergy = targetBoss.energy || 0;
|
|
1972
|
+
const newEnergy = Math.min(currentEnergy + energyGain, 1e3);
|
|
1973
|
+
await ctx2.database.set(
|
|
1974
|
+
"ggcevo_boss",
|
|
1975
|
+
{ name: targetBoss.name },
|
|
1976
|
+
{ energy: newEnergy }
|
|
1977
|
+
);
|
|
1978
|
+
const actualGain = newEnergy - currentEnergy;
|
|
1979
|
+
return {
|
|
1980
|
+
messages: [
|
|
1981
|
+
`⚡ 【电能冲击波】生效:${actualGain > 0 ? `回复${actualGain}点能量` : "能量已达上限"}`,
|
|
1982
|
+
`当前能量: ${newEnergy}/${1e3}`
|
|
1983
|
+
].filter(Boolean)
|
|
1984
|
+
};
|
|
1985
|
+
}, "handleEnergyShockwave"),
|
|
1986
|
+
// 处理能源虹吸减伤(基于能量)
|
|
1987
|
+
handlePowerSiphon: /* @__PURE__ */ __name((targetBoss) => {
|
|
1988
|
+
if (!targetBoss.skills.includes("能源虹吸")) return null;
|
|
1989
|
+
const currentEnergy = targetBoss.energy || 0;
|
|
1990
|
+
let reduction = 0;
|
|
1991
|
+
if (currentEnergy >= 800) {
|
|
1992
|
+
reduction = 0.5;
|
|
1993
|
+
} else if (currentEnergy >= 500) {
|
|
1994
|
+
reduction = 0.3;
|
|
1995
|
+
}
|
|
1996
|
+
if (reduction > 0) {
|
|
1997
|
+
return {
|
|
1998
|
+
damageMultiplier: -reduction,
|
|
1999
|
+
messages: [`🔋 【能源虹吸】生效:能量${currentEnergy > 800 ? ">80%" : ">50%"},受到的伤害-${reduction * 100}%`]
|
|
2000
|
+
};
|
|
2001
|
+
}
|
|
2002
|
+
return null;
|
|
2003
|
+
}, "handlePowerSiphon"),
|
|
2004
|
+
// 处理能量黑洞减伤(基础减伤 + 寒冷增伤)
|
|
2005
|
+
handleEnergyBlackhole: /* @__PURE__ */ __name((targetBoss) => {
|
|
2006
|
+
if (!targetBoss.skills.includes("能量黑洞")) return null;
|
|
2007
|
+
const currentFreezing = targetBoss.freezing || 0;
|
|
2008
|
+
const baseReduction = 0.1;
|
|
2009
|
+
const freezingBonus = currentFreezing * 0.05;
|
|
2010
|
+
return {
|
|
2011
|
+
damageMultiplier: -baseReduction + freezingBonus,
|
|
2012
|
+
messages: [
|
|
2013
|
+
`🌀 【能量黑洞】生效:基础减伤10%`,
|
|
2014
|
+
currentFreezing > 0 ? `❄️ 寒冷(${currentFreezing}层)使受到的伤害+${freezingBonus * 100}%` : ""
|
|
2015
|
+
].filter(Boolean)
|
|
2016
|
+
};
|
|
2017
|
+
}, "handleEnergyBlackhole"),
|
|
2018
|
+
// 处理电能立场(概率免疫伤害)
|
|
2019
|
+
handleEnergyField: /* @__PURE__ */ __name(async function(ctx2, targetBoss, weaponName, initialDamage) {
|
|
2020
|
+
if (!targetBoss.skills.includes("电能立场") || initialDamage === 0 || weaponName === "零度之下") {
|
|
2021
|
+
return null;
|
|
2022
|
+
}
|
|
2023
|
+
const currentEnergy = targetBoss.energy || 0;
|
|
2024
|
+
const currentFreezing = targetBoss.freezing || 0;
|
|
2025
|
+
let immuneChance = 55 - currentFreezing * 5;
|
|
2026
|
+
immuneChance = Math.max(immuneChance, 5);
|
|
2027
|
+
if (currentEnergy < 200) {
|
|
2028
|
+
return null;
|
|
2029
|
+
}
|
|
2030
|
+
const roll = Math.random() * 100;
|
|
2031
|
+
if (roll <= immuneChance) {
|
|
2032
|
+
return {
|
|
2033
|
+
immune: true,
|
|
2034
|
+
messages: [
|
|
2035
|
+
`🛡️ 【电能立场】生效:成功免疫伤害!`
|
|
2036
|
+
]
|
|
2037
|
+
};
|
|
2038
|
+
}
|
|
2039
|
+
return null;
|
|
2040
|
+
}, "handleEnergyField"),
|
|
2041
|
+
// 辅助函数:从配置中获取成员配置
|
|
2042
|
+
getMemberConfig: /* @__PURE__ */ __name((name2, bossGroup) => {
|
|
2043
|
+
if (bossGroup.main.name === name2) return bossGroup.main;
|
|
2044
|
+
for (const minion of bossGroup.minions) {
|
|
2045
|
+
if (minion.name === name2) return minion;
|
|
2046
|
+
}
|
|
2047
|
+
return null;
|
|
2048
|
+
}, "getMemberConfig"),
|
|
2049
|
+
// 处理脉冲效果(概率治疗全体异形)
|
|
2050
|
+
handlePulse: /* @__PURE__ */ __name(async function(ctx2, targetBoss, activeBosses, bossGroup) {
|
|
2051
|
+
if (!targetBoss.skills.includes("脉冲")) return null;
|
|
2052
|
+
const currentEnergy = targetBoss.energy || 0;
|
|
2053
|
+
const currentFreezing = targetBoss.freezing || 0;
|
|
2054
|
+
const maxEnergy = 1e3;
|
|
2055
|
+
if (currentEnergy < maxEnergy * 0.8) {
|
|
2056
|
+
return null;
|
|
2057
|
+
}
|
|
2058
|
+
let triggerChance = 60 - currentFreezing * 5;
|
|
2059
|
+
triggerChance = Math.max(triggerChance, 5);
|
|
2060
|
+
const roll = Math.random() * 100;
|
|
2061
|
+
if (roll <= triggerChance) {
|
|
2062
|
+
const groupMembers = activeBosses.filter(
|
|
2063
|
+
(b) => b.groupId === targetBoss.groupId && b.HP > 0
|
|
2064
|
+
// 只包括存活的异形
|
|
2065
|
+
);
|
|
2066
|
+
const updates = [];
|
|
2067
|
+
const healMessages = [];
|
|
2068
|
+
for (const member of groupMembers) {
|
|
2069
|
+
const memberConfig = this.getMemberConfig(member.name, bossGroup);
|
|
2070
|
+
if (!memberConfig) continue;
|
|
2071
|
+
const maxHP = memberConfig.maxHP;
|
|
2072
|
+
const healAmount = member.type === "主宰" ? 200 : 100;
|
|
2073
|
+
const newHP = Math.min(member.HP + healAmount, maxHP);
|
|
2074
|
+
const actualHeal = newHP - member.HP;
|
|
2075
|
+
updates.push(
|
|
2076
|
+
ctx2.database.set(
|
|
2077
|
+
"ggcevo_boss",
|
|
2078
|
+
{ name: member.name },
|
|
2079
|
+
{ HP: newHP }
|
|
2080
|
+
)
|
|
2081
|
+
);
|
|
2082
|
+
if (actualHeal > 0) {
|
|
2083
|
+
healMessages.push(`${member.name}+${actualHeal}HP(当前${newHP}/${maxHP})`);
|
|
2084
|
+
} else {
|
|
2085
|
+
healMessages.push(`${member.name}生命值已满`);
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
if (healMessages.length > 0) {
|
|
2089
|
+
await Promise.all(updates);
|
|
2090
|
+
return {
|
|
2091
|
+
messages: [
|
|
2092
|
+
`❤️ 【脉冲】生效:治疗全体异形!`,
|
|
2093
|
+
...healMessages
|
|
2094
|
+
]
|
|
2095
|
+
};
|
|
2096
|
+
}
|
|
2097
|
+
return null;
|
|
2098
|
+
}
|
|
2099
|
+
return null;
|
|
2100
|
+
}, "handlePulse"),
|
|
1776
2101
|
// 统一处理被动技能
|
|
1777
2102
|
handlePassives: /* @__PURE__ */ __name(async function(ctx2, targetBoss, initialDamage, currentHP, maxHP, weaponName, weaponData, activeBosses, bossGroup) {
|
|
1778
2103
|
let messages = [];
|
|
@@ -1797,6 +2122,18 @@ function apply(ctx, config) {
|
|
|
1797
2122
|
initialDamage: 0
|
|
1798
2123
|
};
|
|
1799
2124
|
}
|
|
2125
|
+
const fieldResult = await this.handleEnergyField(ctx2, targetBoss, weaponName, initialDamage);
|
|
2126
|
+
if (fieldResult) {
|
|
2127
|
+
messages.push(...fieldResult.messages);
|
|
2128
|
+
if (fieldResult.immune) {
|
|
2129
|
+
return {
|
|
2130
|
+
currentHP: targetBoss.HP,
|
|
2131
|
+
messages,
|
|
2132
|
+
skillUpdates,
|
|
2133
|
+
initialDamage: 0
|
|
2134
|
+
};
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
1800
2137
|
targetBoss.skills.forEach((skill) => {
|
|
1801
2138
|
const config2 = passiveConfig[skill];
|
|
1802
2139
|
if (config2 && config2.effect !== void 0 && config2.effect !== 0) {
|
|
@@ -1820,6 +2157,21 @@ function apply(ctx, config) {
|
|
|
1820
2157
|
totalMultiplier += bloodEffect.damageMultiplier;
|
|
1821
2158
|
messages.push(...bloodEffect.messages);
|
|
1822
2159
|
}
|
|
2160
|
+
const siphonResult = this.handleEnergySiphon(targetBoss, currentHP, maxHP);
|
|
2161
|
+
if (siphonResult) {
|
|
2162
|
+
totalMultiplier += siphonResult.damageMultiplier;
|
|
2163
|
+
messages.push(...siphonResult.messages);
|
|
2164
|
+
}
|
|
2165
|
+
const powerSiphonResult = this.handlePowerSiphon(targetBoss);
|
|
2166
|
+
if (powerSiphonResult) {
|
|
2167
|
+
totalMultiplier += powerSiphonResult.damageMultiplier;
|
|
2168
|
+
messages.push(...powerSiphonResult.messages);
|
|
2169
|
+
}
|
|
2170
|
+
const blackholeResult = this.handleEnergyBlackhole(targetBoss);
|
|
2171
|
+
if (blackholeResult) {
|
|
2172
|
+
totalMultiplier += blackholeResult.damageMultiplier;
|
|
2173
|
+
messages.push(...blackholeResult.messages);
|
|
2174
|
+
}
|
|
1823
2175
|
const radiationCalc = this.calculateRadiationDamage(targetBoss);
|
|
1824
2176
|
if (radiationCalc) {
|
|
1825
2177
|
totalMultiplier += radiationCalc.damageMultiplier;
|
|
@@ -1858,6 +2210,10 @@ function apply(ctx, config) {
|
|
|
1858
2210
|
messages.push(...survivalResult.messages);
|
|
1859
2211
|
skillUpdates.push(...survivalResult.skillUpdates);
|
|
1860
2212
|
}
|
|
2213
|
+
const pulseResult = await this.handlePulse(ctx2, targetBoss, activeBosses, bossGroup);
|
|
2214
|
+
if (pulseResult) {
|
|
2215
|
+
messages.push(...pulseResult.messages);
|
|
2216
|
+
}
|
|
1861
2217
|
const coldAdaptResult = await this.handleColdAdaptation(ctx2, targetBoss, weaponName);
|
|
1862
2218
|
if (coldAdaptResult) {
|
|
1863
2219
|
messages.push(...coldAdaptResult.messages);
|
|
@@ -1871,6 +2227,18 @@ function apply(ctx, config) {
|
|
|
1871
2227
|
if (sentryResult) {
|
|
1872
2228
|
messages.push(...sentryResult.messages);
|
|
1873
2229
|
}
|
|
2230
|
+
const freezingStackResult = await this.handleFreezingStack(ctx2, targetBoss, weaponName);
|
|
2231
|
+
if (freezingStackResult) {
|
|
2232
|
+
messages.push(...freezingStackResult.messages);
|
|
2233
|
+
}
|
|
2234
|
+
const tagChangeResult = await this.handleConductorTagChange(ctx2, targetBoss, currentHP, maxHP);
|
|
2235
|
+
if (tagChangeResult) {
|
|
2236
|
+
messages.push(...tagChangeResult.messages);
|
|
2237
|
+
}
|
|
2238
|
+
const shockwaveResult = await this.handleEnergyShockwave(ctx2, targetBoss);
|
|
2239
|
+
if (shockwaveResult) {
|
|
2240
|
+
messages.push(...shockwaveResult.messages);
|
|
2241
|
+
}
|
|
1874
2242
|
const gammaRadResult = await this.handleGammaRadiation(ctx2, targetBoss, weaponName);
|
|
1875
2243
|
if (gammaRadResult) {
|
|
1876
2244
|
messages.push(...gammaRadResult.messages);
|
|
@@ -2058,6 +2426,134 @@ function apply(ctx, config) {
|
|
|
2058
2426
|
return { rewardMessages };
|
|
2059
2427
|
}
|
|
2060
2428
|
__name(handleBossDefeatRewards, "handleBossDefeatRewards");
|
|
2429
|
+
async function handleSecondaryTargets(ctx2, session, equippedWeapon, targetBoss, weaponName, weaponData, activeBosses, bossGroup) {
|
|
2430
|
+
const scatterEffectMessages = [];
|
|
2431
|
+
const extraDamages = [];
|
|
2432
|
+
const actuallyDead = [];
|
|
2433
|
+
let scatterBroadcast = null;
|
|
2434
|
+
const secondaryTargets = activeBosses.filter(
|
|
2435
|
+
(boss) => boss.name !== targetBoss.name
|
|
2436
|
+
);
|
|
2437
|
+
if (secondaryTargets.length === 0) return {
|
|
2438
|
+
scatterEffectMessages,
|
|
2439
|
+
extraDamages,
|
|
2440
|
+
actuallyDead,
|
|
2441
|
+
scatterBroadcast
|
|
2442
|
+
};
|
|
2443
|
+
let scatterMsg = "";
|
|
2444
|
+
let scatterRatio = 0;
|
|
2445
|
+
if (weaponName === "碎骨步枪") {
|
|
2446
|
+
scatterMsg = "🔆 【光束曲射晶片】触发散射攻击!";
|
|
2447
|
+
scatterRatio = 0.5;
|
|
2448
|
+
} else if (weaponName === "中子步枪") {
|
|
2449
|
+
scatterMsg = "🔆 【中子步枪】触发散射攻击!";
|
|
2450
|
+
scatterRatio = 0.2;
|
|
2451
|
+
}
|
|
2452
|
+
scatterEffectMessages.push(scatterMsg);
|
|
2453
|
+
const baseDamage = weaponData.damage * (1 + 0.1 * equippedWeapon.level);
|
|
2454
|
+
const secondaryDamage = Math.round(baseDamage * scatterRatio);
|
|
2455
|
+
for (const secondaryTarget of secondaryTargets) {
|
|
2456
|
+
const secondaryMaxHP = getBossMaxHP(secondaryTarget.name);
|
|
2457
|
+
let currentDamage = secondaryDamage;
|
|
2458
|
+
const passiveResult = await PassiveHandler.handlePassives(
|
|
2459
|
+
ctx2,
|
|
2460
|
+
secondaryTarget,
|
|
2461
|
+
currentDamage,
|
|
2462
|
+
secondaryTarget.HP - currentDamage,
|
|
2463
|
+
secondaryMaxHP,
|
|
2464
|
+
weaponName,
|
|
2465
|
+
weaponData,
|
|
2466
|
+
secondaryTargets,
|
|
2467
|
+
// 传入所有次要目标作为上下文
|
|
2468
|
+
bossGroup
|
|
2469
|
+
);
|
|
2470
|
+
const finalDamage = passiveResult.initialDamage;
|
|
2471
|
+
const actualDamage = Math.min(finalDamage, secondaryTarget.HP);
|
|
2472
|
+
extraDamages.push({
|
|
2473
|
+
name: secondaryTarget.name,
|
|
2474
|
+
damage: actualDamage
|
|
2475
|
+
});
|
|
2476
|
+
const newHP = passiveResult.currentHP;
|
|
2477
|
+
if (passiveResult.skillUpdates.length > 0) {
|
|
2478
|
+
await PassiveHandler.applySkillUpdates(ctx2, passiveResult.skillUpdates);
|
|
2479
|
+
}
|
|
2480
|
+
const isDead = newHP <= 0;
|
|
2481
|
+
await ctx2.database.set(
|
|
2482
|
+
"ggcevo_boss",
|
|
2483
|
+
{ name: secondaryTarget.name },
|
|
2484
|
+
{
|
|
2485
|
+
HP: Math.max(newHP, 0),
|
|
2486
|
+
isActive: !isDead
|
|
2487
|
+
}
|
|
2488
|
+
);
|
|
2489
|
+
scatterEffectMessages.push(
|
|
2490
|
+
...passiveResult.messages.map((m) => ` 对 ${secondaryTarget.name} ${m}`)
|
|
2491
|
+
);
|
|
2492
|
+
if (isDead) {
|
|
2493
|
+
actuallyDead.push(secondaryTarget.name);
|
|
2494
|
+
if (secondaryTarget.type === "子代") {
|
|
2495
|
+
if (secondaryTarget.name === "机械感染虫") {
|
|
2496
|
+
const [mainBoss] = await ctx2.database.get("ggcevo_boss", {
|
|
2497
|
+
groupId: secondaryTarget.groupId,
|
|
2498
|
+
type: "主宰",
|
|
2499
|
+
isActive: true
|
|
2500
|
+
});
|
|
2501
|
+
if (mainBoss && !mainBoss.skills.includes("孤立无援")) {
|
|
2502
|
+
await ctx2.database.set("ggcevo_boss", { name: mainBoss.name }, {
|
|
2503
|
+
skills: [...mainBoss.skills, "孤立无援"]
|
|
2504
|
+
});
|
|
2505
|
+
scatterBroadcast = "💥 机械感染虫已阵亡,空间站感染虫进入【孤立无援】状态,受到的伤害+20%!";
|
|
2506
|
+
}
|
|
2507
|
+
} else {
|
|
2508
|
+
const remainingMinions = await ctx2.database.get("ggcevo_boss", {
|
|
2509
|
+
groupId: secondaryTarget.groupId,
|
|
2510
|
+
type: "子代",
|
|
2511
|
+
isActive: true
|
|
2512
|
+
});
|
|
2513
|
+
if (remainingMinions.length === 0) {
|
|
2514
|
+
const [mainBoss] = await ctx2.database.get("ggcevo_boss", {
|
|
2515
|
+
groupId: secondaryTarget.groupId,
|
|
2516
|
+
type: "主宰",
|
|
2517
|
+
isActive: true
|
|
2518
|
+
});
|
|
2519
|
+
if (mainBoss && !mainBoss.skills.includes("孤立无援")) {
|
|
2520
|
+
await ctx2.database.set("ggcevo_boss", { name: mainBoss.name }, {
|
|
2521
|
+
skills: [...mainBoss.skills, "孤立无援"]
|
|
2522
|
+
});
|
|
2523
|
+
scatterBroadcast = `💥 所有子代已阵亡,${mainBoss.name}进入【孤立无援】状态,受到的伤害+20%!`;
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2527
|
+
} else if (secondaryTarget.type === "主宰") {
|
|
2528
|
+
await ctx2.database.set(
|
|
2529
|
+
"ggcevo_boss",
|
|
2530
|
+
{ groupId: secondaryTarget.groupId },
|
|
2531
|
+
{ isActive: false, HP: 0 }
|
|
2532
|
+
);
|
|
2533
|
+
const respawnTime = /* @__PURE__ */ new Date();
|
|
2534
|
+
respawnTime.setSeconds(respawnTime.getSeconds() + 3600);
|
|
2535
|
+
await ctx2.database.set(
|
|
2536
|
+
"ggcevo_boss",
|
|
2537
|
+
{ name: secondaryTarget.name },
|
|
2538
|
+
{ respawnTime }
|
|
2539
|
+
);
|
|
2540
|
+
const { rewardMessages } = await handleBossDefeatRewards(ctx2, secondaryTarget);
|
|
2541
|
+
await ctx2.database.remove("ggcevo_boss_damage", {
|
|
2542
|
+
bossGroupId: secondaryTarget.groupId
|
|
2543
|
+
});
|
|
2544
|
+
scatterBroadcast = [
|
|
2545
|
+
`🎯 主宰 ${secondaryTarget.name} 已被 ${session.username} 的散射伤害击败!`,
|
|
2546
|
+
`所有子代已消失,下一个主宰将在1小时后重生`,
|
|
2547
|
+
"",
|
|
2548
|
+
"🏆 伤害排行榜奖励:",
|
|
2549
|
+
...rewardMessages
|
|
2550
|
+
];
|
|
2551
|
+
}
|
|
2552
|
+
}
|
|
2553
|
+
}
|
|
2554
|
+
return { scatterEffectMessages, extraDamages, actuallyDead, scatterBroadcast };
|
|
2555
|
+
}
|
|
2556
|
+
__name(handleSecondaryTargets, "handleSecondaryTargets");
|
|
2061
2557
|
async function checkTransferRequirements(ctx2, handle, profession) {
|
|
2062
2558
|
const [mainBoss] = await ctx2.database.get("ggcevo_boss", {
|
|
2063
2559
|
type: "主宰",
|
|
@@ -2132,7 +2628,7 @@ function apply(ctx, config) {
|
|
|
2132
2628
|
const scoutRifle = weapons.find((weapon) => weapon.weaponId === 7);
|
|
2133
2629
|
return {
|
|
2134
2630
|
success: !!scoutRifle,
|
|
2135
|
-
message: scoutRifle ? "" : "需要“侦察步枪”武器等级≥3"
|
|
2631
|
+
message: scoutRifle ? "" : "需要“侦察步枪”武器等级≥3级"
|
|
2136
2632
|
};
|
|
2137
2633
|
}
|
|
2138
2634
|
;
|
|
@@ -2736,7 +3232,7 @@ ${itemDetails.join("\n")}`;
|
|
|
2736
3232
|
⚡ 加成效果:
|
|
2737
3233
|
▸ ${messages.join("\n▸ ")}`;
|
|
2738
3234
|
}
|
|
2739
|
-
return "签到成功!本月累计签到" + monthlyDays + "天,获得:\n💰 金币 x " + finalPoints + (totalBonus > 0 ? " (
|
|
3235
|
+
return "签到成功!本月累计签到" + monthlyDays + "天,获得:\n💰 金币 x " + finalPoints + (totalBonus > 0 ? " (基础值:" + basePoints + "金币)" : "") + "\n🪙 咕咕币 x " + tickets + effectMessage;
|
|
2740
3236
|
} catch (error) {
|
|
2741
3237
|
console.error("签到命令时发生错误:", error);
|
|
2742
3238
|
return "服务器繁忙,请稍后尝试。";
|
|
@@ -4090,7 +4586,7 @@ ${items.join("、")}
|
|
|
4090
4586
|
discountDetails.push(`武器系统 Lv${techLevel}:${techDiscount}%`);
|
|
4091
4587
|
}
|
|
4092
4588
|
if (grasshopperDiscount > 0) {
|
|
4093
|
-
discountDetails.push(
|
|
4589
|
+
discountDetails.push(`蚱蜢优购:${grasshopperDiscount}%`);
|
|
4094
4590
|
}
|
|
4095
4591
|
const typeStats = Object.values(weaponConfig).filter((weapon) => weapon.price !== 0).reduce((stats, weapon) => {
|
|
4096
4592
|
stats[weapon.type] = (stats[weapon.type] || 0) + 1;
|
|
@@ -4295,7 +4791,7 @@ ${validTypes.join("、")}`;
|
|
|
4295
4791
|
}
|
|
4296
4792
|
if (isWeapon) {
|
|
4297
4793
|
if (isAutoEquipped) {
|
|
4298
|
-
message += "\n
|
|
4794
|
+
message += "\n【系统已为您自动装备该武器】";
|
|
4299
4795
|
}
|
|
4300
4796
|
message += "\n输入「武器仓库」查看详情";
|
|
4301
4797
|
} else {
|
|
@@ -4509,6 +5005,7 @@ ${validTypes.join("、")}`;
|
|
|
4509
5005
|
ctx.command("ggcevo/攻击 <bossName>").usage("请输入要攻击的异形名称(例如:攻击 异齿猛兽 或 攻击 寒冰王蛇)").action(async (argv, bossName) => {
|
|
4510
5006
|
const session = argv.session;
|
|
4511
5007
|
let broadcastMessage = null;
|
|
5008
|
+
let scatterBroadcast = null;
|
|
4512
5009
|
const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
|
|
4513
5010
|
if (!profile) return "🔒 需要先绑定游戏句柄";
|
|
4514
5011
|
const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
|
|
@@ -4562,118 +5059,29 @@ ${validTypes.join("、")}`;
|
|
|
4562
5059
|
if (!bossGroup) return "无法获取异形组配置。";
|
|
4563
5060
|
const maxHP = targetBoss.type === "主宰" ? bossGroup.main.maxHP : bossGroup.minions.find((m) => m.name === targetBoss.name)?.maxHP || 0;
|
|
4564
5061
|
const { damage, hasCrit, effectMessage } = await calculateTotalDamage(ctx, session, equippedWeapon, targetBoss);
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
let
|
|
4568
|
-
if (equippedWeapon.installedMods?.includes("光束曲射晶片") && weaponName === "碎骨步枪") {
|
|
4569
|
-
const activeBosses2 = await ctx.database.get("ggcevo_boss", {
|
|
4570
|
-
|
|
4571
|
-
name
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
weaponData,
|
|
4589
|
-
activeBosses2,
|
|
4590
|
-
bossGroup
|
|
4591
|
-
);
|
|
4592
|
-
const finalDamage = passiveResult2.initialDamage;
|
|
4593
|
-
const actualDamage = Math.min(finalDamage, secondaryTarget.HP);
|
|
4594
|
-
extraDamages.push({
|
|
4595
|
-
name: secondaryTarget.name,
|
|
4596
|
-
damage: actualDamage
|
|
4597
|
-
});
|
|
4598
|
-
const newHP = passiveResult2.currentHP;
|
|
4599
|
-
if (passiveResult2.skillUpdates.length > 0) {
|
|
4600
|
-
await PassiveHandler.applySkillUpdates(ctx, passiveResult2.skillUpdates);
|
|
4601
|
-
}
|
|
4602
|
-
const isDead = newHP <= 0;
|
|
4603
|
-
await ctx.database.set(
|
|
4604
|
-
"ggcevo_boss",
|
|
4605
|
-
{ name: secondaryTarget.name },
|
|
4606
|
-
{
|
|
4607
|
-
HP: Math.max(newHP, 0),
|
|
4608
|
-
isActive: !isDead
|
|
4609
|
-
}
|
|
4610
|
-
);
|
|
4611
|
-
effectMessage.push(...passiveResult2.messages.map((m) => `+ 对 ${secondaryTarget.name} ${m}`));
|
|
4612
|
-
if (isDead) {
|
|
4613
|
-
actuallyDead.push(secondaryTarget.name);
|
|
4614
|
-
if (secondaryTarget.type === "子代") {
|
|
4615
|
-
if (secondaryTarget.name === "机械感染虫") {
|
|
4616
|
-
const [mainBoss] = await ctx.database.get("ggcevo_boss", {
|
|
4617
|
-
groupId: secondaryTarget.groupId,
|
|
4618
|
-
type: "主宰",
|
|
4619
|
-
isActive: true
|
|
4620
|
-
});
|
|
4621
|
-
if (mainBoss && !mainBoss.skills.includes("孤立无援")) {
|
|
4622
|
-
await ctx.database.set("ggcevo_boss", { name: mainBoss.name }, {
|
|
4623
|
-
skills: [...mainBoss.skills, "孤立无援"]
|
|
4624
|
-
});
|
|
4625
|
-
broadcastMessage = "💥 机械感染虫已阵亡,空间站感染虫进入【孤立无援】状态,受到的伤害+20%!";
|
|
4626
|
-
}
|
|
4627
|
-
} else {
|
|
4628
|
-
const remainingMinions = await ctx.database.get("ggcevo_boss", {
|
|
4629
|
-
groupId: secondaryTarget.groupId,
|
|
4630
|
-
type: "子代",
|
|
4631
|
-
isActive: true
|
|
4632
|
-
});
|
|
4633
|
-
if (remainingMinions.length === 0) {
|
|
4634
|
-
const [mainBoss] = await ctx.database.get("ggcevo_boss", {
|
|
4635
|
-
groupId: secondaryTarget.groupId,
|
|
4636
|
-
type: "主宰",
|
|
4637
|
-
isActive: true
|
|
4638
|
-
});
|
|
4639
|
-
if (mainBoss && !mainBoss.skills.includes("孤立无援")) {
|
|
4640
|
-
await ctx.database.set("ggcevo_boss", { name: mainBoss.name }, {
|
|
4641
|
-
skills: [...mainBoss.skills, "孤立无援"]
|
|
4642
|
-
});
|
|
4643
|
-
broadcastMessage = `💥 所有子代已阵亡,${mainBoss.name}进入【孤立无援】状态,受到的伤害+20%!`;
|
|
4644
|
-
}
|
|
4645
|
-
}
|
|
4646
|
-
}
|
|
4647
|
-
} else if (secondaryTarget.type === "主宰") {
|
|
4648
|
-
await ctx.database.set(
|
|
4649
|
-
"ggcevo_boss",
|
|
4650
|
-
{ groupId: secondaryTarget.groupId },
|
|
4651
|
-
{
|
|
4652
|
-
isActive: false,
|
|
4653
|
-
HP: 0
|
|
4654
|
-
}
|
|
4655
|
-
);
|
|
4656
|
-
const respawnTime = /* @__PURE__ */ new Date();
|
|
4657
|
-
respawnTime.setSeconds(respawnTime.getSeconds() + 3600);
|
|
4658
|
-
await ctx.database.set(
|
|
4659
|
-
"ggcevo_boss",
|
|
4660
|
-
{ name: secondaryTarget.name },
|
|
4661
|
-
{ respawnTime }
|
|
4662
|
-
);
|
|
4663
|
-
const { rewardMessages } = await handleBossDefeatRewards(ctx, secondaryTarget);
|
|
4664
|
-
await ctx.database.remove("ggcevo_boss_damage", {
|
|
4665
|
-
bossGroupId: secondaryTarget.groupId
|
|
4666
|
-
});
|
|
4667
|
-
scatterBroadcast = [
|
|
4668
|
-
`🎯 主宰 ${secondaryTarget.name} 已被 ${session.username} 的散射伤害击败!`,
|
|
4669
|
-
`所有子代已消失,下一个主宰将在1小时后重生`,
|
|
4670
|
-
"",
|
|
4671
|
-
"🏆 伤害排行榜奖励:",
|
|
4672
|
-
...rewardMessages
|
|
4673
|
-
].join("\n");
|
|
4674
|
-
}
|
|
4675
|
-
}
|
|
4676
|
-
}
|
|
5062
|
+
let scatterEffectMessages = [];
|
|
5063
|
+
let extraDamages = [];
|
|
5064
|
+
let actuallyDead = [];
|
|
5065
|
+
if (equippedWeapon.installedMods?.includes("光束曲射晶片") && weaponName === "碎骨步枪" || weaponName === "中子步枪") {
|
|
5066
|
+
const activeBosses2 = await ctx.database.get("ggcevo_boss", { isActive: true });
|
|
5067
|
+
const bossGroup2 = bossPool.find(
|
|
5068
|
+
(g) => g.main.name === targetBoss.name || g.minions.some((m) => m.name === targetBoss.name)
|
|
5069
|
+
);
|
|
5070
|
+
if (bossGroup2) {
|
|
5071
|
+
const scatterResult = await handleSecondaryTargets(
|
|
5072
|
+
ctx,
|
|
5073
|
+
session,
|
|
5074
|
+
equippedWeapon,
|
|
5075
|
+
targetBoss,
|
|
5076
|
+
weaponName,
|
|
5077
|
+
weaponData,
|
|
5078
|
+
activeBosses2,
|
|
5079
|
+
bossGroup2
|
|
5080
|
+
);
|
|
5081
|
+
scatterEffectMessages = scatterResult.scatterEffectMessages;
|
|
5082
|
+
extraDamages = scatterResult.extraDamages;
|
|
5083
|
+
actuallyDead = scatterResult.actuallyDead;
|
|
5084
|
+
scatterBroadcast = scatterResult.scatterBroadcast;
|
|
4677
5085
|
}
|
|
4678
5086
|
}
|
|
4679
5087
|
let initialDamage = Math.min(damage, targetBoss.HP);
|
|
@@ -4807,18 +5215,39 @@ ${validTypes.join("、")}`;
|
|
|
4807
5215
|
}
|
|
4808
5216
|
);
|
|
4809
5217
|
}
|
|
5218
|
+
const SECURITY_BONUS_MAPPING = {
|
|
5219
|
+
// 普通用户加成 [等级1-5]
|
|
5220
|
+
base: [5, 10, 15, 20, 25],
|
|
5221
|
+
// 职业用户加成 [等级1-5]
|
|
5222
|
+
career: [10, 20, 30, 40, 50]
|
|
5223
|
+
};
|
|
4810
5224
|
const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
|
|
4811
5225
|
const career = careerData?.career;
|
|
4812
|
-
|
|
5226
|
+
const [securityTech] = await ctx.database.get("ggcevo_tech", {
|
|
5227
|
+
handle,
|
|
5228
|
+
techId: 4
|
|
5229
|
+
});
|
|
5230
|
+
let techBonusPercent = 0;
|
|
5231
|
+
if (securityTech && securityTech.level >= 1) {
|
|
5232
|
+
const techLevel = securityTech.level - 1;
|
|
5233
|
+
const securityConfig = Spacestationtechnology.find((t) => t.techId === 4);
|
|
5234
|
+
const isEligibleForCareerBonus = securityConfig?.careerNames.includes(career);
|
|
5235
|
+
techBonusPercent = isEligibleForCareerBonus ? SECURITY_BONUS_MAPPING.career[techLevel] : SECURITY_BONUS_MAPPING.base[techLevel];
|
|
5236
|
+
}
|
|
5237
|
+
const techMessage = techBonusPercent ? ` + ${techBonusPercent}% (${securityTech.level}级安防系统${career ? ` + ${career}职业加成` : ""})` : "";
|
|
5238
|
+
let careerMultiplier = 0;
|
|
4813
5239
|
let careerMessage = "";
|
|
4814
5240
|
let redcrystalMessage = "";
|
|
4815
5241
|
if (career === "警卫员下士") {
|
|
4816
|
-
careerMultiplier =
|
|
5242
|
+
careerMultiplier = 50;
|
|
4817
5243
|
careerMessage = "(+50% 警卫员下士职业加成)";
|
|
4818
5244
|
} else if (career === "警卫长") {
|
|
4819
|
-
careerMultiplier =
|
|
5245
|
+
careerMultiplier = 100;
|
|
4820
5246
|
careerMessage = "(+100% 警卫长职业加成)";
|
|
4821
5247
|
}
|
|
5248
|
+
const totalBonusPercent = careerMultiplier + techBonusPercent;
|
|
5249
|
+
const totalBonusFactor = 1 + totalBonusPercent / 100;
|
|
5250
|
+
const finalReward = Math.round(totalDamage * totalBonusFactor);
|
|
4822
5251
|
if (career === "清洁工") {
|
|
4823
5252
|
await ctx.database.upsert("ggcevo_careers", [{
|
|
4824
5253
|
handle,
|
|
@@ -4826,7 +5255,6 @@ ${validTypes.join("、")}`;
|
|
|
4826
5255
|
}], ["handle"]);
|
|
4827
5256
|
redcrystalMessage = "🔴 清洁工职业加成:获得1枚红晶";
|
|
4828
5257
|
}
|
|
4829
|
-
const finalReward = Math.round(totalDamage * careerMultiplier);
|
|
4830
5258
|
const [existingSign] = await ctx.database.get("ggcevo_sign", { handle });
|
|
4831
5259
|
await ctx.database.upsert("ggcevo_sign", [{
|
|
4832
5260
|
handle,
|
|
@@ -4843,13 +5271,20 @@ ${effectMessage.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
4843
5271
|
...passiveMessages.length > 0 ? [
|
|
4844
5272
|
`🛡️ 被动效果:
|
|
4845
5273
|
${passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
5274
|
+
] : [],
|
|
5275
|
+
...scatterEffectMessages.length > 0 ? [
|
|
5276
|
+
`⚡ 散射效果:
|
|
5277
|
+
${scatterEffectMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
4846
5278
|
] : [],
|
|
4847
5279
|
`造成伤害:${initialDamage}${hasCrit ? "(✨ 暴击)" : ""}`,
|
|
4848
5280
|
...extraDamages.length > 0 ? [
|
|
4849
5281
|
`散射伤害:`,
|
|
4850
5282
|
...extraDamages.map((d) => `▸ 对 ${d.name} 造成 ${d.damage} 伤害`)
|
|
4851
5283
|
] : [],
|
|
4852
|
-
`获得金币:${finalReward}
|
|
5284
|
+
`获得金币:${finalReward}`,
|
|
5285
|
+
// === 新增详细金币加成信息 ===
|
|
5286
|
+
`${careerMultiplier > 0 ? `🛡️ 警卫职业加成: 金币+${careerMultiplier}%` : ""}`,
|
|
5287
|
+
`${techBonusPercent > 0 ? `🔧 安防系统加成: 金币+${techBonusPercent}%` : ""}`,
|
|
4853
5288
|
redcrystalMessage,
|
|
4854
5289
|
`目标剩余HP:${Math.max(currentHP, 0)}/${maxHP}`,
|
|
4855
5290
|
...actuallyDead.length > 0 ? [
|
|
@@ -4955,24 +5390,51 @@ ${passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
4955
5390
|
const mainBossHpBar = createHpBar(mainBoss.HP, bossGroup.main.maxHP);
|
|
4956
5391
|
const result = [
|
|
4957
5392
|
`🔴 主宰:${mainBoss.name}`,
|
|
4958
|
-
|
|
4959
|
-
`标签:${mainBoss.tags?.join("、") || "无"}`,
|
|
4960
|
-
"被动:",
|
|
4961
|
-
...mainBoss.skills.map((p) => `${p}:${passiveConfig[p]?.description}`) || ["无"]
|
|
5393
|
+
`❤️ ${mainBossHpBar} (${mainBoss.HP}/${bossGroup.main.maxHP})`
|
|
4962
5394
|
];
|
|
5395
|
+
if (bossGroup.main.energy > 0) {
|
|
5396
|
+
result.push(`⚡ 能量:${mainBoss.energy}`);
|
|
5397
|
+
}
|
|
5398
|
+
result.push(
|
|
5399
|
+
`🏷️ 标签:${mainBoss.tags?.join("、") || "无"}`,
|
|
5400
|
+
`✨ 被动:`
|
|
5401
|
+
);
|
|
5402
|
+
if (mainBoss.skills.length > 0) {
|
|
5403
|
+
result.push(...mainBoss.skills.map((p) => `➤ ${p}:${passiveConfig[p]?.description}`));
|
|
5404
|
+
} else {
|
|
5405
|
+
result.push("➤ 无");
|
|
5406
|
+
}
|
|
5407
|
+
const countingSkill = mainBoss.skills?.find((s) => ["冷适应", "岗哨机枪", "吸血唾液"].includes(s));
|
|
5408
|
+
if (countingSkill) {
|
|
5409
|
+
result.push(`📈 ${countingSkill}:${mainBoss.Skillcountpoints}层`);
|
|
5410
|
+
}
|
|
4963
5411
|
if (minions.length > 0) {
|
|
4964
5412
|
result.push("\n🟠 子代:");
|
|
4965
5413
|
for (let i = 0; i < minions.length; i++) {
|
|
4966
5414
|
const minion = minions[i];
|
|
4967
5415
|
const minionConfig = bossGroup.minions.find((m) => m.name === minion.name);
|
|
4968
5416
|
const minionHpBar = createHpBar(minion.HP, minionConfig?.maxHP || 1e3);
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
5417
|
+
const minionInfo = [
|
|
5418
|
+
`👤 ${minion.name}`,
|
|
5419
|
+
`❤️ ${minionHpBar} (${minion.HP}/${minionConfig?.maxHP || "未知"})`
|
|
5420
|
+
];
|
|
5421
|
+
if (minionConfig && minionConfig.energy > 0) {
|
|
5422
|
+
minionInfo.push(`⚡ 能量:${minion.energy}`);
|
|
5423
|
+
}
|
|
5424
|
+
minionInfo.push(
|
|
5425
|
+
`🏷️ 标签:${minion.tags?.join("、") || "无"}`,
|
|
5426
|
+
`✨ 被动:`
|
|
4975
5427
|
);
|
|
5428
|
+
if (minion.skills.length > 0) {
|
|
5429
|
+
minionInfo.push(...minion.skills.map((p) => `➤ ${p}:${passiveConfig[p]?.description}`));
|
|
5430
|
+
} else {
|
|
5431
|
+
minionInfo.push("➤ 无");
|
|
5432
|
+
}
|
|
5433
|
+
const minionCountingSkill = minion.skills?.find((s) => ["冷适应", "岗哨机枪", "吸血唾液"].includes(s));
|
|
5434
|
+
if (minionCountingSkill) {
|
|
5435
|
+
minionInfo.push(`📈 ${minionCountingSkill}:${minion.Skillcountpoints}层`);
|
|
5436
|
+
}
|
|
5437
|
+
result.push(...minionInfo);
|
|
4976
5438
|
if (i < minions.length - 1) result.push("");
|
|
4977
5439
|
}
|
|
4978
5440
|
}
|
|
@@ -4991,6 +5453,7 @@ ${passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
4991
5453
|
HP: bossConfig.main.maxHP,
|
|
4992
5454
|
tags: bossConfig.main.tags,
|
|
4993
5455
|
skills: [...bossConfig.main.passive],
|
|
5456
|
+
energy: bossConfig.main.energy,
|
|
4994
5457
|
groupId: groupid,
|
|
4995
5458
|
isActive: true,
|
|
4996
5459
|
respawnTime: /* @__PURE__ */ new Date()
|
|
@@ -5002,6 +5465,7 @@ ${passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
5002
5465
|
HP: minion.maxHP,
|
|
5003
5466
|
tags: minion.tags,
|
|
5004
5467
|
skills: [...minion.passive],
|
|
5468
|
+
energy: minion.energy,
|
|
5005
5469
|
groupId: groupid,
|
|
5006
5470
|
isActive: true,
|
|
5007
5471
|
respawnTime: /* @__PURE__ */ new Date()
|
|
@@ -5676,7 +6140,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
5676
6140
|
startTime: /* @__PURE__ */ new Date()
|
|
5677
6141
|
// 记录当前时间为开始时间
|
|
5678
6142
|
});
|
|
5679
|
-
return "⛏️ 首次挖矿作业已开始,请至少等待1
|
|
6143
|
+
return "⛏️ 首次挖矿作业已开始,请至少等待1小时后才可收获。\n提示:基础收益为每半小时6枚金币";
|
|
5680
6144
|
}
|
|
5681
6145
|
const nowtime = /* @__PURE__ */ new Date();
|
|
5682
6146
|
const chinaStart = convertUTCtoChinaTime(record.startTime);
|
|
@@ -5743,7 +6207,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
5743
6207
|
}
|
|
5744
6208
|
reportLines.push(rewardLine);
|
|
5745
6209
|
if (tech.level >= 3) {
|
|
5746
|
-
reportLines.push(`🔧
|
|
6210
|
+
reportLines.push(`🔧 采掘系统 Lv.${tech.level}:金币+${multiplier * 100}%`);
|
|
5747
6211
|
}
|
|
5748
6212
|
reportLines.push("💡 已自动开始下一轮挖矿");
|
|
5749
6213
|
return reportLines.join("\n");
|