koishi-plugin-ggcevo-game 1.4.31 → 1.4.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/boss/BattleEffectProcessor.d.ts +418 -0
- package/lib/boss/attackhandling.d.ts +7 -11
- package/lib/boss/boss.d.ts +11 -177
- package/lib/boss/passive.d.ts +156 -164
- package/lib/boss/passivehandler.d.ts +52 -28
- package/lib/database.d.ts +5 -4
- package/lib/index.js +2010 -2023
- package/lib/tasks.d.ts +40 -40
- package/lib/utils.d.ts +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1031,7 +1031,7 @@ var Tasklist = {
|
|
|
1031
1031
|
target: 1,
|
|
1032
1032
|
price: 200,
|
|
1033
1033
|
redCrystalCost: 0,
|
|
1034
|
-
condition: "
|
|
1034
|
+
condition: "使用焚烧枪攻击目标并成功引爆其≥10层的胆汁"
|
|
1035
1035
|
},
|
|
1036
1036
|
"脉冲干扰": {
|
|
1037
1037
|
id: 4,
|
|
@@ -1040,7 +1040,7 @@ var Tasklist = {
|
|
|
1040
1040
|
target: 1,
|
|
1041
1041
|
price: 75,
|
|
1042
1042
|
redCrystalCost: 0,
|
|
1043
|
-
condition: "
|
|
1043
|
+
condition: "使用脉冲扰乱枪攻击目标并成功减少其技能层数"
|
|
1044
1044
|
},
|
|
1045
1045
|
"弧能消耗": {
|
|
1046
1046
|
id: 5,
|
|
@@ -1049,447 +1049,436 @@ var Tasklist = {
|
|
|
1049
1049
|
target: 1,
|
|
1050
1050
|
price: 75,
|
|
1051
1051
|
redCrystalCost: 0,
|
|
1052
|
-
condition: "
|
|
1052
|
+
condition: "使用弧焊枪攻击目标并成功消耗其能量"
|
|
1053
1053
|
}
|
|
1054
1054
|
};
|
|
1055
1055
|
|
|
1056
1056
|
// src/boss/boss.ts
|
|
1057
|
-
var asBossTags = /* @__PURE__ */ __name((arr) => arr, "asBossTags");
|
|
1058
|
-
var asPassives = /* @__PURE__ */ __name((arr) => arr, "asPassives");
|
|
1059
|
-
var defineBoss = /* @__PURE__ */ __name((config) => config, "defineBoss");
|
|
1060
1057
|
var bossPool = [
|
|
1061
|
-
|
|
1058
|
+
{
|
|
1059
|
+
id: 1,
|
|
1062
1060
|
main: {
|
|
1063
|
-
id: 1,
|
|
1064
1061
|
name: "异齿猛兽首领",
|
|
1065
1062
|
type: "主宰",
|
|
1066
1063
|
maxHP: 15e3,
|
|
1067
|
-
|
|
1068
|
-
tags:
|
|
1069
|
-
passive:
|
|
1064
|
+
maxEnergy: 0,
|
|
1065
|
+
tags: ["重甲", "生物", "异形"],
|
|
1066
|
+
passive: ["异形甲壳"]
|
|
1070
1067
|
},
|
|
1071
1068
|
minions: [
|
|
1072
1069
|
{
|
|
1073
1070
|
name: "异齿猛兽",
|
|
1074
1071
|
type: "子代",
|
|
1075
1072
|
maxHP: 5e3,
|
|
1076
|
-
|
|
1077
|
-
tags:
|
|
1078
|
-
passive:
|
|
1073
|
+
maxEnergy: 0,
|
|
1074
|
+
tags: ["重甲", "生物", "重型", "异形"],
|
|
1075
|
+
passive: ["弱化形态", "异形甲壳"]
|
|
1079
1076
|
}
|
|
1080
1077
|
]
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
id: 2,
|
|
1083
1081
|
main: {
|
|
1084
|
-
id: 2,
|
|
1085
1082
|
name: "寒冰王蛇",
|
|
1086
1083
|
type: "主宰",
|
|
1087
1084
|
maxHP: 15e3,
|
|
1088
|
-
|
|
1089
|
-
tags:
|
|
1090
|
-
passive:
|
|
1085
|
+
maxEnergy: 0,
|
|
1086
|
+
tags: ["重甲", "生物", "惧热", "重型", "异形"],
|
|
1087
|
+
passive: ["冰霜环绕", "冰霜进化"]
|
|
1091
1088
|
},
|
|
1092
1089
|
minions: [
|
|
1093
1090
|
{
|
|
1094
1091
|
name: "冰蛇",
|
|
1095
1092
|
type: "子代",
|
|
1096
1093
|
maxHP: 5e3,
|
|
1097
|
-
|
|
1098
|
-
tags:
|
|
1099
|
-
passive:
|
|
1094
|
+
maxEnergy: 0,
|
|
1095
|
+
tags: ["生物", "惧热", "异形"],
|
|
1096
|
+
passive: ["弱化形态", "冰霜回复", "冰霜进化"]
|
|
1100
1097
|
}
|
|
1101
1098
|
]
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
id: 3,
|
|
1104
1102
|
main: {
|
|
1105
|
-
id: 3,
|
|
1106
1103
|
name: "莽兽",
|
|
1107
1104
|
type: "主宰",
|
|
1108
1105
|
maxHP: 12e3,
|
|
1109
|
-
|
|
1110
|
-
tags:
|
|
1111
|
-
passive:
|
|
1106
|
+
maxEnergy: 0,
|
|
1107
|
+
tags: ["重甲", "生物", "重型", "异形"],
|
|
1108
|
+
passive: ["应激甲壳II", "求生本能II", "冷适应"]
|
|
1112
1109
|
},
|
|
1113
1110
|
minions: [
|
|
1114
1111
|
{
|
|
1115
1112
|
name: "狂暴畸变体",
|
|
1116
1113
|
type: "子代",
|
|
1117
1114
|
maxHP: 4e3,
|
|
1118
|
-
|
|
1119
|
-
tags:
|
|
1120
|
-
passive:
|
|
1115
|
+
maxEnergy: 0,
|
|
1116
|
+
tags: ["重甲", "生物", "重型", "异形"],
|
|
1117
|
+
passive: ["弱化形态", "应激甲壳I", "求生本能I", "冷适应"]
|
|
1121
1118
|
},
|
|
1122
1119
|
{
|
|
1123
1120
|
name: "剧毒畸变体",
|
|
1124
1121
|
type: "子代",
|
|
1125
1122
|
maxHP: 4e3,
|
|
1126
|
-
|
|
1127
|
-
tags:
|
|
1128
|
-
passive:
|
|
1123
|
+
maxEnergy: 0,
|
|
1124
|
+
tags: ["重甲", "生物", "重型", "异形"],
|
|
1125
|
+
passive: ["弱化形态", "应激甲壳I", "求生本能I", "冷适应"]
|
|
1129
1126
|
}
|
|
1130
1127
|
]
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
id: 4,
|
|
1133
1131
|
main: {
|
|
1134
|
-
id: 4,
|
|
1135
1132
|
name: "空间站感染虫",
|
|
1136
1133
|
type: "主宰",
|
|
1137
1134
|
maxHP: 1e4,
|
|
1138
|
-
|
|
1139
|
-
tags:
|
|
1140
|
-
passive:
|
|
1135
|
+
maxEnergy: 0,
|
|
1136
|
+
tags: ["重甲", "生物", "机械", "异形"],
|
|
1137
|
+
passive: ["感染空间站", "病毒云", "霉菌滋生"]
|
|
1141
1138
|
},
|
|
1142
1139
|
minions: [
|
|
1143
1140
|
{
|
|
1144
1141
|
name: "机械感染虫",
|
|
1145
1142
|
type: "子代",
|
|
1146
1143
|
maxHP: 3e3,
|
|
1147
|
-
|
|
1148
|
-
tags:
|
|
1149
|
-
passive:
|
|
1144
|
+
maxEnergy: 0,
|
|
1145
|
+
tags: ["重甲", "生物", "机械", "异形"],
|
|
1146
|
+
passive: ["弱化形态", "病毒云", "霉菌滋生"]
|
|
1150
1147
|
},
|
|
1151
1148
|
{
|
|
1152
1149
|
name: "空间站哨枪塔",
|
|
1153
1150
|
type: "子代",
|
|
1154
1151
|
maxHP: 5e3,
|
|
1155
|
-
|
|
1156
|
-
tags:
|
|
1157
|
-
passive:
|
|
1152
|
+
maxEnergy: 0,
|
|
1153
|
+
tags: ["重甲", "机械", "建筑"],
|
|
1154
|
+
passive: ["岗哨机枪", "结构装甲"]
|
|
1158
1155
|
}
|
|
1159
1156
|
]
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
id: 5,
|
|
1162
1160
|
main: {
|
|
1163
|
-
id: 5,
|
|
1164
1161
|
name: "吸血蝙蝠首领",
|
|
1165
1162
|
type: "主宰",
|
|
1166
1163
|
maxHP: 12e3,
|
|
1167
|
-
|
|
1168
|
-
tags:
|
|
1169
|
-
passive:
|
|
1164
|
+
maxEnergy: 0,
|
|
1165
|
+
tags: ["生物", "异形"],
|
|
1166
|
+
passive: ["吸血唾液", "进食", "吐血", "嗜血狂暴"]
|
|
1170
1167
|
},
|
|
1171
1168
|
minions: [
|
|
1172
1169
|
{
|
|
1173
1170
|
name: "吸血蝙蝠",
|
|
1174
1171
|
type: "子代",
|
|
1175
1172
|
maxHP: 4e3,
|
|
1176
|
-
|
|
1177
|
-
tags:
|
|
1178
|
-
passive:
|
|
1173
|
+
maxEnergy: 0,
|
|
1174
|
+
tags: ["生物", "异形"],
|
|
1175
|
+
passive: ["弱化形态", "吸血唾液", "进食", "吐血"]
|
|
1179
1176
|
}
|
|
1180
1177
|
]
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
id: 6,
|
|
1183
1181
|
main: {
|
|
1184
|
-
id: 6,
|
|
1185
1182
|
name: "亚电主宰者",
|
|
1186
1183
|
type: "主宰",
|
|
1187
1184
|
maxHP: 2e4,
|
|
1188
|
-
|
|
1189
|
-
tags:
|
|
1190
|
-
passive:
|
|
1185
|
+
maxEnergy: 1e3,
|
|
1186
|
+
tags: ["护盾", "灵能", "重型", "异形"],
|
|
1187
|
+
passive: ["超导体", "能源虹吸", "电能冲击波", "电能立场", "脉冲", "能量黑洞"]
|
|
1191
1188
|
},
|
|
1192
1189
|
minions: [
|
|
1193
1190
|
{
|
|
1194
1191
|
name: "亚电能者",
|
|
1195
1192
|
type: "子代",
|
|
1196
1193
|
maxHP: 6e3,
|
|
1197
|
-
|
|
1198
|
-
tags:
|
|
1199
|
-
passive:
|
|
1194
|
+
maxEnergy: 0,
|
|
1195
|
+
tags: ["护盾", "灵能", "异形"],
|
|
1196
|
+
passive: ["弱化形态", "超导体", "能源虹吸", "能量黑洞"]
|
|
1200
1197
|
}
|
|
1201
1198
|
]
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
id: 7,
|
|
1204
1202
|
main: {
|
|
1205
|
-
id: 7,
|
|
1206
1203
|
name: "烈焰庞兽",
|
|
1207
1204
|
type: "主宰",
|
|
1208
1205
|
maxHP: 2e4,
|
|
1209
|
-
|
|
1210
|
-
tags:
|
|
1211
|
-
passive:
|
|
1206
|
+
maxEnergy: 0,
|
|
1207
|
+
tags: ["重甲", "生物", "惧寒", "重型", "异形"],
|
|
1208
|
+
passive: ["火焰异形", "庞兽狂暴", "灼烧粘液", "炼狱爆弹", "火焰吐息", "太阳耀斑"]
|
|
1212
1209
|
},
|
|
1213
1210
|
minions: [
|
|
1214
1211
|
{
|
|
1215
1212
|
name: "火焰甲虫",
|
|
1216
1213
|
type: "子代",
|
|
1217
1214
|
maxHP: 5e3,
|
|
1218
|
-
|
|
1219
|
-
tags:
|
|
1220
|
-
passive:
|
|
1215
|
+
maxEnergy: 0,
|
|
1216
|
+
tags: ["重甲", "生物", "惧寒", "异形"],
|
|
1217
|
+
passive: ["弱化形态", "火焰异形", "灼烧粘液", "腐蚀胆汁", "燃烧潜地"]
|
|
1221
1218
|
}
|
|
1222
1219
|
]
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1220
|
+
},
|
|
1221
|
+
{
|
|
1222
|
+
id: 8,
|
|
1225
1223
|
main: {
|
|
1226
|
-
id: 8,
|
|
1227
1224
|
name: "狂猎猛禽首领",
|
|
1228
1225
|
type: "主宰",
|
|
1229
1226
|
maxHP: 2e4,
|
|
1230
|
-
|
|
1231
|
-
tags:
|
|
1232
|
-
passive:
|
|
1227
|
+
maxEnergy: 0,
|
|
1228
|
+
tags: ["生物", "异形"],
|
|
1229
|
+
passive: ["猎手异形", "致命一击", "狂暴", "伪装"]
|
|
1233
1230
|
},
|
|
1234
1231
|
minions: [
|
|
1235
1232
|
{
|
|
1236
1233
|
name: "狂猎猛禽1",
|
|
1237
1234
|
type: "子代",
|
|
1238
1235
|
maxHP: 5e3,
|
|
1239
|
-
|
|
1240
|
-
tags:
|
|
1241
|
-
passive:
|
|
1236
|
+
maxEnergy: 0,
|
|
1237
|
+
tags: ["生物", "异形"],
|
|
1238
|
+
passive: ["弱化形态", "猎手异形", "狂暴", "伪装"]
|
|
1242
1239
|
},
|
|
1243
1240
|
{
|
|
1244
1241
|
name: "狂猎猛禽2",
|
|
1245
1242
|
type: "子代",
|
|
1246
1243
|
maxHP: 5e3,
|
|
1247
|
-
|
|
1248
|
-
tags:
|
|
1249
|
-
passive:
|
|
1244
|
+
maxEnergy: 0,
|
|
1245
|
+
tags: ["生物", "异形"],
|
|
1246
|
+
passive: ["弱化形态", "猎手异形", "狂暴", "伪装"]
|
|
1250
1247
|
}
|
|
1251
1248
|
]
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
id: 9,
|
|
1254
1252
|
main: {
|
|
1255
|
-
id: 9,
|
|
1256
1253
|
name: "宇宙界主",
|
|
1257
1254
|
type: "主宰",
|
|
1258
1255
|
maxHP: 2e4,
|
|
1259
|
-
|
|
1260
|
-
tags:
|
|
1261
|
-
passive:
|
|
1256
|
+
maxEnergy: 1e3,
|
|
1257
|
+
tags: ["重甲", "护盾", "生物", "灵能", "异形"],
|
|
1258
|
+
passive: ["宇宙能量", "复苏", "光影之刃", "闪电冲锋", "远古预兆", "星界之风", "超视距穿梭"]
|
|
1262
1259
|
},
|
|
1263
1260
|
minions: [
|
|
1264
1261
|
{
|
|
1265
1262
|
name: "宇宙战将",
|
|
1266
1263
|
type: "子代",
|
|
1267
1264
|
maxHP: 5e3,
|
|
1268
|
-
|
|
1269
|
-
tags:
|
|
1270
|
-
passive:
|
|
1265
|
+
maxEnergy: 0,
|
|
1266
|
+
tags: ["重甲", "护盾", "生物", "灵能", "异形"],
|
|
1267
|
+
passive: ["弱化形态", "心灵狂热", "星界之风"]
|
|
1271
1268
|
}
|
|
1272
1269
|
]
|
|
1273
|
-
}
|
|
1270
|
+
}
|
|
1274
1271
|
];
|
|
1275
1272
|
|
|
1276
1273
|
// src/boss/passive.ts
|
|
1277
1274
|
var passiveConfig = {
|
|
1278
1275
|
"弱化形态": {
|
|
1279
|
-
|
|
1280
|
-
description: "
|
|
1276
|
+
type: "伤害增减(负面)",
|
|
1277
|
+
description: "子代防御脆弱,所受伤害提升10%"
|
|
1281
1278
|
},
|
|
1282
1279
|
"异形甲壳": {
|
|
1283
|
-
|
|
1284
|
-
description: "
|
|
1285
|
-
},
|
|
1286
|
-
"孤立无援": {
|
|
1287
|
-
effect: 0.2,
|
|
1288
|
-
description: "没有存活的子代,受到的伤害+20%"
|
|
1280
|
+
type: "伤害增减(正面)",
|
|
1281
|
+
description: "强化生物甲壳提供防护,所受伤害降低20%"
|
|
1289
1282
|
},
|
|
1290
1283
|
"冰霜回复": {
|
|
1291
|
-
|
|
1292
|
-
description: "
|
|
1284
|
+
type: "生存强化(生命回复)",
|
|
1285
|
+
description: "生命值降至30%以下时触发,立即回复自身40%最大生命值,并为其他存活异形回复10%最大生命值(触发后效果移除)"
|
|
1293
1286
|
},
|
|
1294
1287
|
"冰霜进化": {
|
|
1295
|
-
|
|
1296
|
-
description: "
|
|
1288
|
+
type: "状态免疫(寒冷伤害免疫)",
|
|
1289
|
+
description: "免疫寒冷类伤害,受到寒冷伤害时额外回复生命值"
|
|
1297
1290
|
},
|
|
1298
1291
|
"冰霜环绕": {
|
|
1299
|
-
|
|
1300
|
-
description: "
|
|
1292
|
+
type: "生存强化(生命回复+群体增益)",
|
|
1293
|
+
description: "生命值降至30%以下时触发,立即回复自身45%最大生命值,并使所有存活异形获得「寒霜地狱」技能(自身效果触发后移除)"
|
|
1301
1294
|
},
|
|
1302
1295
|
"寒霜地狱": {
|
|
1303
|
-
|
|
1304
|
-
description: "
|
|
1296
|
+
type: "伤害增减(正面)",
|
|
1297
|
+
description: "暴风雪笼罩战场,所受伤害降低30%"
|
|
1305
1298
|
},
|
|
1306
1299
|
"应激甲壳I": {
|
|
1307
|
-
|
|
1308
|
-
description: "
|
|
1300
|
+
type: "伤害增减(正面)",
|
|
1301
|
+
description: "基础应激甲壳生效,所受伤害降低20%"
|
|
1309
1302
|
},
|
|
1310
1303
|
"应激甲壳II": {
|
|
1311
|
-
|
|
1312
|
-
description: "
|
|
1304
|
+
type: "伤害增减(正面)",
|
|
1305
|
+
description: "进阶应激甲壳生效,所受伤害降低25%"
|
|
1313
1306
|
},
|
|
1314
1307
|
"求生本能I": {
|
|
1315
|
-
|
|
1316
|
-
description: "
|
|
1308
|
+
type: "生存强化(生命回复)",
|
|
1309
|
+
description: "濒死状态下,快速回复30%最大生命值(触发后效果移除)"
|
|
1317
1310
|
},
|
|
1318
1311
|
"求生本能II": {
|
|
1319
|
-
|
|
1320
|
-
description: "
|
|
1312
|
+
type: "生存强化(生命回复)",
|
|
1313
|
+
description: "濒死状态下,快速回复50%最大生命值(触发后效果移除)"
|
|
1321
1314
|
},
|
|
1322
1315
|
"冷适应": {
|
|
1323
|
-
|
|
1324
|
-
description: "
|
|
1316
|
+
type: "状态免疫(寒冷伤害免疫)",
|
|
1317
|
+
description: "累计承受10次寒冷伤害后,获得「惧热」标签并获得寒冷伤害免疫"
|
|
1325
1318
|
},
|
|
1326
1319
|
"感染空间站": {
|
|
1327
|
-
|
|
1328
|
-
description: "
|
|
1320
|
+
type: "伤害增减(正面)",
|
|
1321
|
+
description: "若「空间站哨枪塔」存活,自身所受伤害降低50%"
|
|
1329
1322
|
},
|
|
1330
1323
|
"病毒云": {
|
|
1331
|
-
|
|
1332
|
-
description: "
|
|
1324
|
+
type: "伤害增减(正面)",
|
|
1325
|
+
description: "释放病毒云雾形成保护,所受伤害降低10%"
|
|
1333
1326
|
},
|
|
1334
1327
|
"霉菌滋生": {
|
|
1335
|
-
|
|
1336
|
-
description: "
|
|
1328
|
+
type: "生存强化(生命回复)",
|
|
1329
|
+
description: "受到攻击后,若「空间站哨枪塔」存活,为其回复1%最大生命值"
|
|
1337
1330
|
},
|
|
1338
1331
|
"岗哨机枪": {
|
|
1339
|
-
|
|
1340
|
-
description: "
|
|
1332
|
+
type: "生存强化(生命回复)",
|
|
1333
|
+
description: "每累计承受10次攻击后,为所有其他存活异形回复其10%最大生命值"
|
|
1341
1334
|
},
|
|
1342
1335
|
"结构装甲": {
|
|
1343
|
-
|
|
1344
|
-
description: "
|
|
1336
|
+
type: "伤害增减(正面)",
|
|
1337
|
+
description: "装备结构装甲,常规伤害降低20%;若伤害来源为热能武器,伤害降低提升至40%"
|
|
1345
1338
|
},
|
|
1346
1339
|
"吸血唾液": {
|
|
1347
|
-
|
|
1348
|
-
description: "
|
|
1340
|
+
type: "伤害增减(正面)",
|
|
1341
|
+
description: "受到攻击时叠加「吸血唾液」层数,每层提供5%减伤(最多叠加20层)"
|
|
1349
1342
|
},
|
|
1350
1343
|
"进食": {
|
|
1351
|
-
|
|
1352
|
-
description: "
|
|
1344
|
+
type: "生存强化(生命回复)",
|
|
1345
|
+
description: "当「吸血唾液」层数达到20层时,下一次受击消耗所有层数并回复20%最大生命值"
|
|
1353
1346
|
},
|
|
1354
1347
|
"嗜血狂暴": {
|
|
1355
|
-
|
|
1356
|
-
description: "
|
|
1348
|
+
type: "伤害增减(正面)",
|
|
1349
|
+
description: "生命值低于50%时触发狂暴状态,每次受击额外叠加1层「吸血唾液」,同时所受伤害降低20%"
|
|
1357
1350
|
},
|
|
1358
1351
|
"吐血": {
|
|
1359
|
-
|
|
1360
|
-
description: "
|
|
1361
|
-
},
|
|
1362
|
-
"电能导体": {
|
|
1363
|
-
effect: 0,
|
|
1364
|
-
description: "当血量降低到10%以下时,“护盾”标签变为“重甲”标签;"
|
|
1352
|
+
type: "伤害增减(负面)",
|
|
1353
|
+
description: "无「吸血唾液」层数时,所受伤害提升20%"
|
|
1365
1354
|
},
|
|
1366
1355
|
"超导体": {
|
|
1367
|
-
|
|
1368
|
-
description: "
|
|
1356
|
+
type: "状态转换(护盾→重甲)",
|
|
1357
|
+
description: "生命值降至10%以下时,「护盾」标签转换为「重甲」标签"
|
|
1369
1358
|
},
|
|
1370
1359
|
"能量虹吸": {
|
|
1371
|
-
|
|
1372
|
-
description: "
|
|
1360
|
+
type: "伤害增减(正面)",
|
|
1361
|
+
description: "生命值≥70%时,所受伤害降低40%;生命值≥30%时,伤害降低20%"
|
|
1373
1362
|
},
|
|
1374
1363
|
"能源虹吸": {
|
|
1375
|
-
|
|
1376
|
-
description: "
|
|
1364
|
+
type: "伤害增减(正面)",
|
|
1365
|
+
description: "能量值≥80%时,所受伤害降低50%;能量值≥50%时,伤害降低30%"
|
|
1377
1366
|
},
|
|
1378
1367
|
"电能立场": {
|
|
1379
|
-
|
|
1380
|
-
description: "
|
|
1368
|
+
type: "状态免疫(伤害免疫)",
|
|
1369
|
+
description: "能量值≥30%时,每次受击有55%概率免疫该次伤害(无法免疫寒冷伤害);每存在1层「寒冷」状态,免疫概率降低5%(至多降低50%)"
|
|
1381
1370
|
},
|
|
1382
1371
|
"电能冲击波": {
|
|
1383
|
-
|
|
1384
|
-
description: "
|
|
1372
|
+
type: "生存强化(能量回复)",
|
|
1373
|
+
description: "每次受击时,回复100点「能量」"
|
|
1385
1374
|
},
|
|
1386
1375
|
"脉冲": {
|
|
1387
|
-
|
|
1388
|
-
description: "
|
|
1376
|
+
type: "生存强化(生命回复)",
|
|
1377
|
+
description: "能量值≥30%时,每次受击有60%概率为所有存活异形回复100点生命值;每存在1层「寒冷」状态,概率降低5%(至多降低50%)"
|
|
1389
1378
|
},
|
|
1390
1379
|
"能量黑洞": {
|
|
1391
|
-
|
|
1392
|
-
description: "
|
|
1380
|
+
type: "伤害增减(正面)",
|
|
1381
|
+
description: "存在「能量黑洞」时,所受伤害降低20%"
|
|
1393
1382
|
},
|
|
1394
1383
|
"火焰异形": {
|
|
1395
|
-
|
|
1396
|
-
description: "
|
|
1384
|
+
type: "状态免疫(火焰伤害免疫)",
|
|
1385
|
+
description: "免疫火焰类伤害,受到火焰伤害时额外回复生命值"
|
|
1397
1386
|
},
|
|
1398
1387
|
"庞兽狂暴": {
|
|
1399
|
-
|
|
1400
|
-
description: "
|
|
1388
|
+
type: "伤害增减(正面)",
|
|
1389
|
+
description: "生命值低于50%时触发狂暴状态,所受伤害降低50%"
|
|
1401
1390
|
},
|
|
1402
1391
|
"灼烧粘液": {
|
|
1403
|
-
|
|
1404
|
-
description: "
|
|
1392
|
+
type: "生存强化(生命回复)",
|
|
1393
|
+
description: "受到伤害时叠加「灼烧粘液」层数;若存在「灼烧粘液」层数时受到火焰攻击,立即清空层数并回复(层数×10)点生命值"
|
|
1405
1394
|
},
|
|
1406
1395
|
"腐蚀胆汁": {
|
|
1407
|
-
|
|
1408
|
-
description: "
|
|
1396
|
+
type: "生存强化(生命回复)",
|
|
1397
|
+
description: "「灼烧粘液」层数达到10层时,下一次受击为所有存活异形回复1000点生命值并清空层数"
|
|
1409
1398
|
},
|
|
1410
1399
|
"火焰吐息": {
|
|
1411
|
-
|
|
1412
|
-
description: "
|
|
1400
|
+
type: "生存强化(生命回复)",
|
|
1401
|
+
description: "「灼烧粘液」层数达到20层时,下一次攻击为所有存活异形回复20%最大生命值并清空层数"
|
|
1413
1402
|
},
|
|
1414
1403
|
"太阳耀斑": {
|
|
1415
|
-
|
|
1416
|
-
description: "
|
|
1404
|
+
type: "状态移除+状态免疫(寒冷伤害免疫)",
|
|
1405
|
+
description: "所有子代阵亡后,移除「惧寒」标签及「孤立无援」并获得寒冷伤害免疫"
|
|
1417
1406
|
},
|
|
1418
1407
|
"燃烧潜地": {
|
|
1419
|
-
|
|
1420
|
-
description: "
|
|
1408
|
+
type: "生存强化(生命回复)",
|
|
1409
|
+
description: "生命值降至10%以下时触发,立即回复50%最大生命值(触发后效果移除)"
|
|
1421
1410
|
},
|
|
1422
1411
|
"炼狱爆弹": {
|
|
1423
|
-
|
|
1424
|
-
description: "
|
|
1412
|
+
type: "伤害增减(正面)",
|
|
1413
|
+
description: "每存在1层「灼烧粘液」,所受伤害降低5%;若存在存活子代,伤害降低效果额外提升5%(即每层「灼烧粘液」总降低10%)"
|
|
1425
1414
|
},
|
|
1426
1415
|
"猎手异形": {
|
|
1427
|
-
|
|
1428
|
-
description: "
|
|
1416
|
+
type: "伤害增减(条件性)+状态免疫(火焰/寒冷伤害免疫)",
|
|
1417
|
+
description: "存在其他存活异形时,所受伤害降低20%;无其他存活异形时,所受伤害提升20%;免疫火焰及寒冷伤害"
|
|
1429
1418
|
},
|
|
1430
1419
|
"狂暴": {
|
|
1431
|
-
|
|
1432
|
-
description: "
|
|
1420
|
+
type: "伤害增减(正面)",
|
|
1421
|
+
description: "生命值低于50%时触发狂暴状态,所受伤害降低50%"
|
|
1433
1422
|
},
|
|
1434
1423
|
"伪装": {
|
|
1435
|
-
|
|
1436
|
-
description: "
|
|
1424
|
+
type: "伤害增减(正面)",
|
|
1425
|
+
description: "受击时记录伤害来源的武器名称(仅保留最新),下次受到同名称武器伤害时伤害降低80%"
|
|
1437
1426
|
},
|
|
1438
1427
|
"致命一击": {
|
|
1439
|
-
|
|
1440
|
-
description: "
|
|
1428
|
+
type: "状态免疫(伤害免疫)",
|
|
1429
|
+
description: "受击时有5%概率免疫该次伤害"
|
|
1441
1430
|
},
|
|
1442
1431
|
"星界之风": {
|
|
1443
|
-
|
|
1444
|
-
description: "
|
|
1432
|
+
type: "生存强化(生命回复)",
|
|
1433
|
+
description: "受击时有5%概率为所有存活异形回复200点生命值"
|
|
1445
1434
|
},
|
|
1446
1435
|
"心灵狂热": {
|
|
1447
|
-
|
|
1448
|
-
description: "
|
|
1436
|
+
type: "伤害增减(正面)",
|
|
1437
|
+
description: "生命值低于50%时进入心灵狂热状态,所受伤害降低20%,同时「星界之风」触发概率翻倍"
|
|
1449
1438
|
},
|
|
1450
1439
|
"宇宙能量": {
|
|
1451
|
-
|
|
1452
|
-
description: "
|
|
1440
|
+
type: "生存强化(能量/生命回复)",
|
|
1441
|
+
description: "受击时回复等同于本次伤害值的「能量」;若「能量」已满,则将溢出部分转换为自身生命值"
|
|
1453
1442
|
},
|
|
1454
1443
|
"复苏": {
|
|
1455
|
-
|
|
1456
|
-
description: "
|
|
1444
|
+
type: "生存强化(生命/能量回复)",
|
|
1445
|
+
description: "承受致命伤害时免疫死亡,立即回复50%最大生命值及100%「能量」,并获得「灵能构造炉」技能(触发后效果移除)"
|
|
1457
1446
|
},
|
|
1458
1447
|
"光影之刃": {
|
|
1459
|
-
|
|
1460
|
-
description: "
|
|
1448
|
+
type: "状态叠加(层数叠加)",
|
|
1449
|
+
description: "受击后叠加「光影之刃」层数(至多50层)"
|
|
1461
1450
|
},
|
|
1462
1451
|
"远古预兆": {
|
|
1463
|
-
|
|
1464
|
-
description: "
|
|
1452
|
+
type: "状态免疫(能量伤害免疫)",
|
|
1453
|
+
description: "受击时有1%概率免疫能量武器伤害并回复100点「能量」"
|
|
1465
1454
|
},
|
|
1466
1455
|
"闪电冲锋": {
|
|
1467
|
-
|
|
1468
|
-
description: "
|
|
1456
|
+
type: "状态增强(触发概率提升)",
|
|
1457
|
+
description: "每存在1层「光影之刃」,「远古预兆」「灵能构造炉」触发概率各提升0.5%"
|
|
1469
1458
|
},
|
|
1470
1459
|
"超视距穿梭": {
|
|
1471
|
-
|
|
1472
|
-
description: "
|
|
1460
|
+
type: "伤害增减(条件性)",
|
|
1461
|
+
description: "能量值≥30%时,每层「光影之刃」降低5%所受伤害;能量值≥60%时,每层降低10%;能量值≤10%时,每层提升5%所受伤害"
|
|
1473
1462
|
},
|
|
1474
1463
|
"灵能构造炉": {
|
|
1475
|
-
|
|
1476
|
-
description: "
|
|
1464
|
+
type: "状态获得(技能获得)",
|
|
1465
|
+
description: "受击后有5%概率随机获得以下技能之一:天启超载护盾、塌缩脉冲、地毯式轰炸、轰炸引导"
|
|
1477
1466
|
},
|
|
1478
1467
|
"天启超载护盾": {
|
|
1479
|
-
|
|
1480
|
-
description: "
|
|
1468
|
+
type: "生存强化(生命回复)",
|
|
1469
|
+
description: "受击后有5%概率为所有存活异形回复(「光影之刃」层数×10)点生命值"
|
|
1481
1470
|
},
|
|
1482
1471
|
"塌缩脉冲": {
|
|
1483
|
-
|
|
1484
|
-
description: "
|
|
1472
|
+
type: "状态叠加(层数叠加)",
|
|
1473
|
+
description: "受击后额外叠加1层「光影之刃」"
|
|
1485
1474
|
},
|
|
1486
1475
|
"地毯式轰炸": {
|
|
1487
|
-
|
|
1488
|
-
description: "
|
|
1476
|
+
type: "状态移除+伤害增减(正面)",
|
|
1477
|
+
description: "触发时移除「孤立无援」,并使自身所受伤害降低100%"
|
|
1489
1478
|
},
|
|
1490
1479
|
"轰炸引导": {
|
|
1491
|
-
|
|
1492
|
-
description: "
|
|
1480
|
+
type: "生存强化(能量回复)",
|
|
1481
|
+
description: "受击后有5%概率回复(「光影之刃」层数×50)点「能量」"
|
|
1493
1482
|
}
|
|
1494
1483
|
};
|
|
1495
1484
|
|
|
@@ -1880,14 +1869,17 @@ function createHpBar(current, max) {
|
|
|
1880
1869
|
}
|
|
1881
1870
|
__name(createHpBar, "createHpBar");
|
|
1882
1871
|
async function activateNextBossGroup(ctx, currentBossId = null) {
|
|
1883
|
-
let
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
nextIndex = (currentIndex + 1) % bossPool.length;
|
|
1872
|
+
let availableIndices = [];
|
|
1873
|
+
bossPool.forEach((bossGroup, index) => {
|
|
1874
|
+
if (currentBossId === null || bossGroup.id !== currentBossId) {
|
|
1875
|
+
availableIndices.push(index);
|
|
1888
1876
|
}
|
|
1877
|
+
});
|
|
1878
|
+
if (availableIndices.length === 0) {
|
|
1879
|
+
availableIndices = Array.from({ length: bossPool.length }, (_, i) => i);
|
|
1889
1880
|
}
|
|
1890
|
-
const
|
|
1881
|
+
const randomIndex = availableIndices[Math.floor(Math.random() * availableIndices.length)];
|
|
1882
|
+
const nextBossGroup = bossPool[randomIndex];
|
|
1891
1883
|
const mainBoss = await ctx.database.create("ggcevo_boss", {
|
|
1892
1884
|
name: nextBossGroup.main.name,
|
|
1893
1885
|
type: nextBossGroup.main.type,
|
|
@@ -1895,8 +1887,8 @@ async function activateNextBossGroup(ctx, currentBossId = null) {
|
|
|
1895
1887
|
tags: nextBossGroup.main.tags,
|
|
1896
1888
|
// 新增标签字段
|
|
1897
1889
|
skills: [...nextBossGroup.main.passive],
|
|
1898
|
-
energy: nextBossGroup.main.
|
|
1899
|
-
groupId: nextBossGroup.
|
|
1890
|
+
energy: nextBossGroup.main.maxEnergy,
|
|
1891
|
+
groupId: nextBossGroup.id,
|
|
1900
1892
|
isActive: true,
|
|
1901
1893
|
respawnTime: /* @__PURE__ */ new Date()
|
|
1902
1894
|
});
|
|
@@ -1908,8 +1900,8 @@ async function activateNextBossGroup(ctx, currentBossId = null) {
|
|
|
1908
1900
|
tags: minion.tags,
|
|
1909
1901
|
// 新增标签字段
|
|
1910
1902
|
skills: [...minion.passive],
|
|
1911
|
-
energy: minion.
|
|
1912
|
-
groupId:
|
|
1903
|
+
energy: minion.maxEnergy,
|
|
1904
|
+
groupId: nextBossGroup.id,
|
|
1913
1905
|
isActive: true,
|
|
1914
1906
|
respawnTime: /* @__PURE__ */ new Date()
|
|
1915
1907
|
});
|
|
@@ -2021,7 +2013,7 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
2021
2013
|
message: `目标${target}拥有"${targetboss.tags.includes("建筑") ? "建筑" : "重型"}"标签,无法使用此物品。`
|
|
2022
2014
|
};
|
|
2023
2015
|
}
|
|
2024
|
-
const currentCount = targetboss
|
|
2016
|
+
const currentCount = targetboss?.skillStacks || 0;
|
|
2025
2017
|
if (currentCount <= 0) {
|
|
2026
2018
|
return {
|
|
2027
2019
|
success: false,
|
|
@@ -2033,7 +2025,7 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
2033
2025
|
await ctx.database.set(
|
|
2034
2026
|
"ggcevo_boss",
|
|
2035
2027
|
{ name: target },
|
|
2036
|
-
{
|
|
2028
|
+
{ skillStacks: newCount }
|
|
2037
2029
|
);
|
|
2038
2030
|
return {
|
|
2039
2031
|
success: true,
|
|
@@ -2385,1866 +2377,1870 @@ async function getRankInfo(ctx, config, handle) {
|
|
|
2385
2377
|
}
|
|
2386
2378
|
__name(getRankInfo, "getRankInfo");
|
|
2387
2379
|
|
|
2388
|
-
// src/boss/
|
|
2389
|
-
var
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2380
|
+
// src/boss/BattleEffectProcessor.ts
|
|
2381
|
+
var battleStatsMap = {};
|
|
2382
|
+
function updateStatsByName(name2, updates) {
|
|
2383
|
+
const existing = battleStatsMap[name2] ?? {
|
|
2384
|
+
name: name2,
|
|
2385
|
+
// 键与 name 一致
|
|
2386
|
+
hpChange: 0,
|
|
2387
|
+
energyChange: 0,
|
|
2388
|
+
tagsAdded: [],
|
|
2389
|
+
tagsRemoved: [],
|
|
2390
|
+
skillsAdded: [],
|
|
2391
|
+
skillsRemoved: [],
|
|
2392
|
+
skillStacksChanged: 0,
|
|
2393
|
+
statusLayersChanged: 0,
|
|
2394
|
+
radiationLayersChange: 0,
|
|
2395
|
+
coldLayersChange: 0,
|
|
2396
|
+
lastWeaponName: ""
|
|
2397
|
+
};
|
|
2398
|
+
battleStatsMap[name2] = {
|
|
2399
|
+
// name 不可变(保持原键)
|
|
2400
|
+
name: existing.name,
|
|
2401
|
+
// 数值类型:累加(支持正负变化)
|
|
2402
|
+
hpChange: existing.hpChange + (updates.hpChange ?? 0),
|
|
2403
|
+
energyChange: existing.energyChange + (updates.energyChange ?? 0),
|
|
2404
|
+
skillStacksChanged: existing.skillStacksChanged + (updates.skillStacksChanged ?? 0),
|
|
2405
|
+
statusLayersChanged: existing.statusLayersChanged + (updates.statusLayersChanged ?? 0),
|
|
2406
|
+
radiationLayersChange: existing.radiationLayersChange + (updates.radiationLayersChange ?? 0),
|
|
2407
|
+
coldLayersChange: existing.coldLayersChange + (updates.coldLayersChange ?? 0),
|
|
2408
|
+
// 数组类型:合并(新增内容追加到现有数组)
|
|
2409
|
+
tagsAdded: [...existing.tagsAdded, ...updates.tagsAdded ?? []],
|
|
2410
|
+
tagsRemoved: [...existing.tagsRemoved, ...updates.tagsRemoved ?? []],
|
|
2411
|
+
skillsAdded: [...existing.skillsAdded, ...updates.skillsAdded ?? []],
|
|
2412
|
+
skillsRemoved: [...existing.skillsRemoved, ...updates.skillsRemoved ?? []],
|
|
2413
|
+
// 字符串类型:覆盖(取最新值)
|
|
2414
|
+
lastWeaponName: updates.lastWeaponName ?? existing.lastWeaponName
|
|
2415
|
+
};
|
|
2416
|
+
}
|
|
2417
|
+
__name(updateStatsByName, "updateStatsByName");
|
|
2418
|
+
function getMaxHPByName(bossName) {
|
|
2419
|
+
for (const boss of bossPool) {
|
|
2420
|
+
if (boss.main.name === bossName) {
|
|
2421
|
+
return boss.main.maxHP;
|
|
2422
|
+
}
|
|
2423
|
+
for (const minion of boss.minions) {
|
|
2424
|
+
if (minion.name === bossName) {
|
|
2425
|
+
return minion.maxHP;
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
}
|
|
2429
|
+
return void 0;
|
|
2430
|
+
}
|
|
2431
|
+
__name(getMaxHPByName, "getMaxHPByName");
|
|
2432
|
+
function getMaxEnergyByName(bossName) {
|
|
2433
|
+
for (const boss of bossPool) {
|
|
2434
|
+
if (boss.main.name === bossName) {
|
|
2435
|
+
return boss.main.maxEnergy;
|
|
2436
|
+
}
|
|
2437
|
+
for (const minion of boss.minions) {
|
|
2438
|
+
if (minion.name === bossName) {
|
|
2439
|
+
return minion.maxEnergy;
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2442
|
+
}
|
|
2443
|
+
return void 0;
|
|
2444
|
+
}
|
|
2445
|
+
__name(getMaxEnergyByName, "getMaxEnergyByName");
|
|
2446
|
+
var BattleEffectProcessor = {
|
|
2447
|
+
// 弱化形态
|
|
2448
|
+
handleWeakForm: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2449
|
+
if (targetBoss.skills.includes("弱化形态")) {
|
|
2450
|
+
const newBuffMultiplier = 0.1;
|
|
2451
|
+
const messages = [`📚 【弱化形态】生效:子代防御脆弱,所受伤害提升10%`];
|
|
2394
2452
|
return {
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
// 直接设置伤害为0
|
|
2398
|
-
messages: [`❄️ 【冰霜进化】生效:免疫寒冷伤害,${targetBoss.name}回复${healAmount}生命值`]
|
|
2453
|
+
buffMultiplier: newBuffMultiplier,
|
|
2454
|
+
messages
|
|
2399
2455
|
};
|
|
2400
2456
|
}
|
|
2401
2457
|
return null;
|
|
2402
|
-
}, "
|
|
2403
|
-
//
|
|
2404
|
-
|
|
2405
|
-
if (
|
|
2406
|
-
|
|
2458
|
+
}, "handleWeakForm"),
|
|
2459
|
+
// 异形甲壳
|
|
2460
|
+
handleAlienShell: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2461
|
+
if (targetBoss.skills.includes("异形甲壳")) {
|
|
2462
|
+
const newNerfMultiplier = 0.2;
|
|
2463
|
+
const messages = [`🛡️ 【异形甲壳】生效:强化生物甲壳提供防护,所受伤害降低20%`];
|
|
2464
|
+
return {
|
|
2465
|
+
nerfMultiplier: newNerfMultiplier,
|
|
2466
|
+
messages
|
|
2467
|
+
};
|
|
2468
|
+
}
|
|
2469
|
+
return null;
|
|
2470
|
+
}, "handleAlienShell"),
|
|
2471
|
+
// 孤立无援处理(活跃Boss中仅自己时增伤20%)
|
|
2472
|
+
handleIsolated: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
2473
|
+
const isIsolated = activeBosses.length === 1 && // 活跃Boss仅1个
|
|
2474
|
+
activeBosses[0].name === targetBoss.name;
|
|
2475
|
+
if (isIsolated) {
|
|
2476
|
+
const newBuffMultiplier = 0.2;
|
|
2477
|
+
const messages = [
|
|
2478
|
+
`🌌 【孤立无援】生效:无存活子代时,所受伤害提升20%`
|
|
2479
|
+
];
|
|
2480
|
+
return {
|
|
2481
|
+
buffMultiplier: newBuffMultiplier,
|
|
2482
|
+
messages
|
|
2483
|
+
};
|
|
2484
|
+
}
|
|
2485
|
+
return null;
|
|
2486
|
+
}, "handleIsolated"),
|
|
2487
|
+
handleFrostRegeneration: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
2488
|
+
const messages = [];
|
|
2489
|
+
const otherUpdates = [];
|
|
2490
|
+
if (!targetBoss.skills.includes("冰霜回复")) {
|
|
2491
|
+
return null;
|
|
2492
|
+
}
|
|
2493
|
+
const targetMaxHP = getMaxHPByName(targetBoss.name);
|
|
2494
|
+
const currentHP = targetBoss.HP;
|
|
2495
|
+
if (currentHP > targetMaxHP * 0.3) {
|
|
2407
2496
|
return null;
|
|
2408
2497
|
}
|
|
2409
|
-
const
|
|
2410
|
-
const
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2498
|
+
const selfHealAmount = Math.round(targetMaxHP * 0.4);
|
|
2499
|
+
const targetUpdates = {
|
|
2500
|
+
hpChange: selfHealAmount,
|
|
2501
|
+
// 累加HP变化量(正数回复)
|
|
2502
|
+
skillsRemoved: ["冰霜回复"]
|
|
2503
|
+
// 移除技能
|
|
2504
|
+
};
|
|
2505
|
+
messages.push(`❄️ 【冰霜回复】生效:自身回复${selfHealAmount}点生命值`);
|
|
2506
|
+
const otherSurvivingBosses = activeBosses.filter(
|
|
2507
|
+
(boss) => boss.name !== targetBoss.name && boss.isActive
|
|
2508
|
+
);
|
|
2509
|
+
otherSurvivingBosses.forEach((otherBoss) => {
|
|
2510
|
+
const otherName = otherBoss.name;
|
|
2511
|
+
const otherMaxHP = getMaxHPByName(otherName);
|
|
2512
|
+
const otherHealAmount = Math.round(otherMaxHP * 0.1);
|
|
2513
|
+
otherUpdates.push({
|
|
2514
|
+
name: otherName,
|
|
2515
|
+
updates: { hpChange: otherHealAmount }
|
|
2516
|
+
});
|
|
2517
|
+
messages.push(`❄️ 「${otherName}」回复${otherHealAmount}点生命值`);
|
|
2415
2518
|
});
|
|
2416
|
-
|
|
2417
|
-
|
|
2519
|
+
messages.push(`❄️ 【冰霜回复】触发后技能移除`);
|
|
2520
|
+
return {
|
|
2521
|
+
messages,
|
|
2522
|
+
targetUpdates: {
|
|
2418
2523
|
name: targetBoss.name,
|
|
2419
|
-
|
|
2420
|
-
add: ["寒霜地狱"]
|
|
2524
|
+
updates: targetUpdates
|
|
2421
2525
|
},
|
|
2422
|
-
|
|
2423
|
-
name: m.name,
|
|
2424
|
-
add: ["寒霜地狱"]
|
|
2425
|
-
}))
|
|
2426
|
-
];
|
|
2427
|
-
return {
|
|
2428
|
-
updatedHP,
|
|
2429
|
-
skillUpdates,
|
|
2430
|
-
messages: [
|
|
2431
|
-
`❄️ 【冰霜环绕】生效,${targetBoss.name}回复45%最大生命值(+${healAmount}HP)`,
|
|
2432
|
-
`🌪️ 警告!【寒霜地狱】降临,所有存活的异形获得30%减伤效果`
|
|
2433
|
-
]
|
|
2526
|
+
otherUpdates
|
|
2434
2527
|
};
|
|
2435
|
-
}, "
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2528
|
+
}, "handleFrostRegeneration"),
|
|
2529
|
+
handleFrostAura: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
2530
|
+
const messages = [];
|
|
2531
|
+
const otherUpdates = [];
|
|
2532
|
+
if (!targetBoss.skills.includes("冰霜环绕")) {
|
|
2533
|
+
return null;
|
|
2534
|
+
}
|
|
2535
|
+
const targetMaxHP = getMaxHPByName(targetBoss.name);
|
|
2536
|
+
const currentHP = targetBoss.HP;
|
|
2537
|
+
const triggerCondition = currentHP <= targetMaxHP * 0.3;
|
|
2538
|
+
if (!triggerCondition) {
|
|
2440
2539
|
return null;
|
|
2441
2540
|
}
|
|
2442
|
-
const
|
|
2443
|
-
const
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2541
|
+
const selfHealAmount = Math.round(targetMaxHP * 0.45);
|
|
2542
|
+
const targetUpdates = {
|
|
2543
|
+
hpChange: selfHealAmount,
|
|
2544
|
+
// 累加HP变化量(正数回复)
|
|
2545
|
+
skillsRemoved: ["冰霜环绕"],
|
|
2546
|
+
// 移除自身原有技能
|
|
2547
|
+
skillsAdded: ["寒霜地狱"]
|
|
2548
|
+
// 新增【寒霜地狱】技能(自身)
|
|
2549
|
+
};
|
|
2550
|
+
messages.push(`❄️ 【冰霜环绕】生效:自身回复${selfHealAmount}点生命值`);
|
|
2551
|
+
messages.push(`❄️ 「${targetBoss.name}」获得【寒霜地狱】技能`);
|
|
2552
|
+
const survivingMinions = activeBosses.filter(
|
|
2553
|
+
(boss) => boss.name !== targetBoss.name && boss.isActive
|
|
2447
2554
|
);
|
|
2448
|
-
if (
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2555
|
+
if (survivingMinions.length > 0) {
|
|
2556
|
+
survivingMinions.forEach((minion) => {
|
|
2557
|
+
const minionName = minion.name;
|
|
2558
|
+
const minionUpdates = {
|
|
2559
|
+
skillsAdded: ["寒霜地狱"]
|
|
2560
|
+
// 新增【寒霜地狱】技能(仅异形)
|
|
2561
|
+
};
|
|
2562
|
+
otherUpdates.push({
|
|
2563
|
+
name: minionName,
|
|
2564
|
+
updates: minionUpdates
|
|
2565
|
+
});
|
|
2566
|
+
messages.push(`❄️ 「${minionName}」获得【寒霜地狱】技能`);
|
|
2567
|
+
});
|
|
2456
2568
|
}
|
|
2569
|
+
messages.push(`❄️ 【冰霜环绕】触发后技能移除`);
|
|
2457
2570
|
return {
|
|
2458
|
-
|
|
2459
|
-
|
|
2571
|
+
messages,
|
|
2572
|
+
targetUpdates: {
|
|
2460
2573
|
name: targetBoss.name,
|
|
2461
|
-
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
`❄️ 【冰霜回复】生效,${targetBoss.name}回复40%最大生命值(+${selfHeal}HP),${mainBoss.name}回复10%最大生命值(+${mainHeal}HP)`
|
|
2465
|
-
]
|
|
2574
|
+
updates: targetUpdates
|
|
2575
|
+
},
|
|
2576
|
+
otherUpdates
|
|
2466
2577
|
};
|
|
2467
|
-
}, "
|
|
2468
|
-
//
|
|
2469
|
-
|
|
2470
|
-
|
|
2578
|
+
}, "handleFrostAura"),
|
|
2579
|
+
// 冰霜进化处理(免疫伤害并回复生命值)
|
|
2580
|
+
handleFrostEvolution: /* @__PURE__ */ __name(function(targetBoss, weaponName, damage) {
|
|
2581
|
+
const messages = [];
|
|
2582
|
+
let isImmune = false;
|
|
2583
|
+
if (!targetBoss.skills.includes("冰霜进化")) {
|
|
2471
2584
|
return null;
|
|
2472
2585
|
}
|
|
2473
|
-
const
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2586
|
+
const isColdWeapon = weaponName === "零度之下";
|
|
2587
|
+
if (!isColdWeapon) {
|
|
2588
|
+
return null;
|
|
2589
|
+
}
|
|
2590
|
+
isImmune = true;
|
|
2591
|
+
const healAmount = damage;
|
|
2592
|
+
const targetUpdates = {
|
|
2593
|
+
name: targetBoss.name,
|
|
2594
|
+
updates: {
|
|
2595
|
+
hpChange: healAmount
|
|
2596
|
+
// 生命值变化量
|
|
2597
|
+
}
|
|
2598
|
+
};
|
|
2599
|
+
messages.push(`❄️ 【冰霜进化】生效:「${targetBoss.name}」免疫寒冷伤害`);
|
|
2600
|
+
messages.push(`❄️ 恢复${healAmount}点生命值`);
|
|
2601
|
+
return {
|
|
2602
|
+
isImmune,
|
|
2603
|
+
messages,
|
|
2604
|
+
targetUpdates
|
|
2605
|
+
};
|
|
2606
|
+
}, "handleFrostEvolution"),
|
|
2607
|
+
// 寒霜地狱处理
|
|
2608
|
+
handleFrostHell: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2609
|
+
if (targetBoss.skills.includes("寒霜地狱")) {
|
|
2610
|
+
const newNerfMultiplier = 0.3;
|
|
2611
|
+
const messages = [`❄️ 【寒霜地狱】生效:暴风雪笼罩战场,所受伤害降低30%`];
|
|
2482
2612
|
return {
|
|
2483
|
-
|
|
2613
|
+
nerfMultiplier: newNerfMultiplier,
|
|
2614
|
+
messages
|
|
2484
2615
|
};
|
|
2485
2616
|
}
|
|
2486
2617
|
return null;
|
|
2487
|
-
}, "
|
|
2488
|
-
//
|
|
2489
|
-
|
|
2490
|
-
if (targetBoss.skills.includes("
|
|
2618
|
+
}, "handleFrostHell"),
|
|
2619
|
+
// 应激甲壳I处理(基础减伤20%)
|
|
2620
|
+
handleStressShellI: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2621
|
+
if (targetBoss.skills.includes("应激甲壳I")) {
|
|
2622
|
+
const newNerfMultiplier = 0.2;
|
|
2623
|
+
const messages = [`🛡️ 【应激甲壳I】生效:基础应激甲壳生效,所受伤害降低20%`];
|
|
2491
2624
|
return {
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
messages: [`❄️ 【冷适应】生效:免疫寒冷伤害`]
|
|
2625
|
+
nerfMultiplier: newNerfMultiplier,
|
|
2626
|
+
messages
|
|
2495
2627
|
};
|
|
2496
2628
|
}
|
|
2497
2629
|
return null;
|
|
2498
|
-
}, "
|
|
2499
|
-
//
|
|
2500
|
-
|
|
2501
|
-
if (
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
effect = { heal: maxHP * 0.3, skill: "求生本能I" };
|
|
2505
|
-
} else if (targetBoss.skills.includes("求生本能II")) {
|
|
2506
|
-
effect = { heal: maxHP * 0.5, skill: "求生本能II" };
|
|
2507
|
-
}
|
|
2508
|
-
if (!effect) return null;
|
|
2509
|
-
return {
|
|
2510
|
-
updatedHP: effect.heal,
|
|
2511
|
-
messages: [`【${effect.skill}】生效,${targetBoss.name}濒死时瞬间回复${effect.heal}生命值`],
|
|
2512
|
-
skillUpdates: [{
|
|
2513
|
-
name: targetBoss.name,
|
|
2514
|
-
remove: [effect.skill]
|
|
2515
|
-
}]
|
|
2516
|
-
};
|
|
2517
|
-
}, "handleSurvivalInstinct"),
|
|
2518
|
-
// 感染空间站处理(返回减伤系数)
|
|
2519
|
-
handleInfectedStation: /* @__PURE__ */ __name(async (ctx, targetBoss) => {
|
|
2520
|
-
if (targetBoss.name !== "空间站感染虫" || !targetBoss.skills.includes("感染空间站")) return null;
|
|
2521
|
-
const [sentryGun] = await ctx.database.get("ggcevo_boss", { name: "空间站哨枪塔", isActive: true });
|
|
2522
|
-
if (sentryGun) {
|
|
2630
|
+
}, "handleStressShellI"),
|
|
2631
|
+
// 应激甲壳II处理(进阶减伤25%)
|
|
2632
|
+
handleStressShellII: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2633
|
+
if (targetBoss.skills.includes("应激甲壳II")) {
|
|
2634
|
+
const newNerfMultiplier = 0.25;
|
|
2635
|
+
const messages = [`🛡️ 【应激甲壳II】生效:进阶应激甲壳生效,所受伤害降低25%`];
|
|
2523
2636
|
return {
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
messages: ["🛡️ 【感染空间站】生效:空间站哨枪塔存活时,受到的伤害-50%"]
|
|
2637
|
+
nerfMultiplier: newNerfMultiplier,
|
|
2638
|
+
messages
|
|
2527
2639
|
};
|
|
2528
2640
|
}
|
|
2529
2641
|
return null;
|
|
2530
|
-
}, "
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
if (!targetBoss.skills.includes("
|
|
2642
|
+
}, "handleStressShellII"),
|
|
2643
|
+
handleSurvivalInstinctI: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2644
|
+
const messages = [];
|
|
2645
|
+
if (!targetBoss.skills.includes("求生本能I")) {
|
|
2534
2646
|
return null;
|
|
2535
2647
|
}
|
|
2536
|
-
const
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
name: "空间站哨枪塔",
|
|
2540
|
-
isActive: true
|
|
2541
|
-
});
|
|
2542
|
-
if (sentryGun) {
|
|
2543
|
-
const healAmount = Math.floor(sentryConfig.maxHP * 0.01);
|
|
2544
|
-
const newHP = Math.min(sentryGun.HP + healAmount, sentryConfig.maxHP);
|
|
2545
|
-
await ctx.database.set(
|
|
2546
|
-
"ggcevo_boss",
|
|
2547
|
-
{ name: "空间站哨枪塔" },
|
|
2548
|
-
{ HP: newHP }
|
|
2549
|
-
);
|
|
2550
|
-
return {
|
|
2551
|
-
messages: [`🦠 【霉菌滋生】生效:空间站哨枪塔回复1%最大生命值(+${healAmount}HP)`]
|
|
2552
|
-
};
|
|
2553
|
-
}
|
|
2554
|
-
return null;
|
|
2555
|
-
}, "handleMoldGrowth"),
|
|
2556
|
-
// 岗哨机枪处理
|
|
2557
|
-
handleSentryGun: /* @__PURE__ */ __name(async (ctx, targetBoss, bossGroup) => {
|
|
2558
|
-
if (!targetBoss.skills.includes("岗哨机枪")) {
|
|
2648
|
+
const targetMaxHP = getMaxHPByName(targetBoss.name);
|
|
2649
|
+
const currentHP = targetBoss.HP;
|
|
2650
|
+
if (currentHP !== 0) {
|
|
2559
2651
|
return null;
|
|
2560
2652
|
}
|
|
2561
|
-
const
|
|
2562
|
-
const updates =
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
name:
|
|
2572
|
-
|
|
2573
|
-
});
|
|
2574
|
-
if (infectionBug) {
|
|
2575
|
-
const maxHP = getMaxHP("空间站感染虫");
|
|
2576
|
-
const heal = Math.floor(maxHP * 0.1);
|
|
2577
|
-
updates.push(
|
|
2578
|
-
ctx.database.set(
|
|
2579
|
-
"ggcevo_boss",
|
|
2580
|
-
{ name: infectionBug.name },
|
|
2581
|
-
{ HP: Math.min(infectionBug.HP + heal, maxHP) }
|
|
2582
|
-
)
|
|
2583
|
-
);
|
|
2584
|
-
messages.push(`空间站感染虫回复${heal}HP`);
|
|
2653
|
+
const selfHealAmount = Math.round(targetMaxHP * 0.3);
|
|
2654
|
+
const updates = {
|
|
2655
|
+
hpChange: selfHealAmount,
|
|
2656
|
+
skillsRemoved: ["求生本能I"]
|
|
2657
|
+
};
|
|
2658
|
+
messages.push(`❤️ 【求生本能I】生效:生命值归零时回复${selfHealAmount}点生命值`);
|
|
2659
|
+
messages.push(`❤️ 「${targetBoss.name}」的【求生本能I】技能已移除`);
|
|
2660
|
+
return {
|
|
2661
|
+
messages,
|
|
2662
|
+
targetUpdates: {
|
|
2663
|
+
name: targetBoss.name,
|
|
2664
|
+
updates
|
|
2585
2665
|
}
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
const heal = Math.floor(maxHP * 0.1);
|
|
2593
|
-
updates.push(
|
|
2594
|
-
ctx.database.set(
|
|
2595
|
-
"ggcevo_boss",
|
|
2596
|
-
{ name: mechaBug.name },
|
|
2597
|
-
{ HP: Math.min(mechaBug.HP + heal, maxHP) }
|
|
2598
|
-
)
|
|
2599
|
-
);
|
|
2600
|
-
messages.push(`机械感染虫回复${heal}HP`);
|
|
2601
|
-
}
|
|
2602
|
-
updates.push(
|
|
2603
|
-
ctx.database.set(
|
|
2604
|
-
"ggcevo_boss",
|
|
2605
|
-
{ name: targetBoss.name },
|
|
2606
|
-
{ Skillcountpoints: 0 }
|
|
2607
|
-
)
|
|
2608
|
-
);
|
|
2609
|
-
await Promise.all(updates);
|
|
2610
|
-
return {
|
|
2611
|
-
messages: ["🔫 【岗哨机枪】生效:" + messages.join(",")]
|
|
2612
|
-
};
|
|
2613
|
-
}
|
|
2614
|
-
const newCount = currentCount + 1;
|
|
2615
|
-
await ctx.database.set(
|
|
2616
|
-
"ggcevo_boss",
|
|
2617
|
-
{ name: targetBoss.name },
|
|
2618
|
-
{ Skillcountpoints: newCount }
|
|
2619
|
-
);
|
|
2620
|
-
if (newCount === 10) {
|
|
2621
|
-
return {
|
|
2622
|
-
messages: ["🔫 【岗哨机枪】达到10层!下次攻击将清空层数并治疗所有存活的异形"]
|
|
2623
|
-
};
|
|
2666
|
+
};
|
|
2667
|
+
}, "handleSurvivalInstinctI"),
|
|
2668
|
+
handleSurvivalInstinctII: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2669
|
+
const messages = [];
|
|
2670
|
+
if (!targetBoss.skills.includes("求生本能II")) {
|
|
2671
|
+
return null;
|
|
2624
2672
|
}
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
if (!targetBoss.skills.includes("结构装甲")) return null;
|
|
2630
|
-
let reduction = 0.2;
|
|
2631
|
-
let msg = "受到常规武器伤害-20%";
|
|
2632
|
-
if (weaponData.type === "热能武器") {
|
|
2633
|
-
reduction = 0.4;
|
|
2634
|
-
msg = "受到热能武器伤害-40%";
|
|
2673
|
+
const targetMaxHP = getMaxHPByName(targetBoss.name);
|
|
2674
|
+
const currentHP = targetBoss.HP;
|
|
2675
|
+
if (currentHP !== 0) {
|
|
2676
|
+
return null;
|
|
2635
2677
|
}
|
|
2678
|
+
const selfHealAmount = Math.round(targetMaxHP * 0.5);
|
|
2679
|
+
const updates = {
|
|
2680
|
+
hpChange: selfHealAmount,
|
|
2681
|
+
// 生命值变化量
|
|
2682
|
+
skillsRemoved: ["求生本能II"]
|
|
2683
|
+
// 移除的技能
|
|
2684
|
+
};
|
|
2685
|
+
messages.push(`❤️ 【求生本能II】生效:生命值归零时回复${selfHealAmount}点生命值`);
|
|
2686
|
+
messages.push(`❤️ 「${targetBoss.name}」的【求生本能II】技能已移除`);
|
|
2636
2687
|
return {
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2688
|
+
messages,
|
|
2689
|
+
targetUpdates: {
|
|
2690
|
+
name: targetBoss.name,
|
|
2691
|
+
updates
|
|
2692
|
+
}
|
|
2640
2693
|
};
|
|
2641
|
-
}, "
|
|
2642
|
-
//
|
|
2643
|
-
|
|
2644
|
-
if (!targetBoss.skills.includes("吸血唾液")) return null;
|
|
2645
|
-
const bloodStacks = targetBoss.Skillcountpoints || 0;
|
|
2646
|
-
let buffAmount = 0;
|
|
2647
|
-
let nerfAmount = 0;
|
|
2694
|
+
}, "handleSurvivalInstinctII"),
|
|
2695
|
+
// 在 PassiveHandler 对象中添加冷适应技能的处理函数
|
|
2696
|
+
handleColdAdaptation: /* @__PURE__ */ __name(function(targetBoss, weaponName) {
|
|
2648
2697
|
const messages = [];
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
}
|
|
2654
|
-
if (targetBoss.skills.includes("嗜血狂暴") && currentHP / maxHP < 0.5) {
|
|
2655
|
-
nerfAmount += 0.2;
|
|
2656
|
-
messages.push(`🔥 【嗜血狂暴】生效:进入狂暴状态,受到的伤害-20%`);
|
|
2657
|
-
}
|
|
2658
|
-
if (targetBoss.skills.includes("吐血") && bloodStacks < 1) {
|
|
2659
|
-
buffAmount += 0.2;
|
|
2660
|
-
messages.push(`💔 【吐血】生效:无"吸血"层数,受到的伤害+20%`);
|
|
2698
|
+
let isImmune = false;
|
|
2699
|
+
let targetUpdates = null;
|
|
2700
|
+
if (!targetBoss.skills.includes("冷适应")) {
|
|
2701
|
+
return null;
|
|
2661
2702
|
}
|
|
2662
|
-
|
|
2703
|
+
const currentLayers = targetBoss.statusLayers || 0;
|
|
2704
|
+
const hasFearHeatTag = targetBoss.tags.includes("惧热") || false;
|
|
2705
|
+
if (hasFearHeatTag && weaponName === "零度之下") {
|
|
2706
|
+
isImmune = true;
|
|
2707
|
+
messages.push(`🧊 【冷适应】生效:免疫寒冷伤害`);
|
|
2663
2708
|
return {
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
// 正值减伤系数
|
|
2668
|
-
messages
|
|
2709
|
+
isImmune,
|
|
2710
|
+
messages,
|
|
2711
|
+
targetUpdates
|
|
2669
2712
|
};
|
|
2670
2713
|
}
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2714
|
+
if (currentLayers < 10) {
|
|
2715
|
+
const newLayers = currentLayers + 1;
|
|
2716
|
+
targetUpdates = {
|
|
2717
|
+
name: targetBoss.name,
|
|
2718
|
+
updates: {
|
|
2719
|
+
statusLayersChanged: 1
|
|
2720
|
+
// 层数+1
|
|
2721
|
+
}
|
|
2722
|
+
};
|
|
2723
|
+
messages.push(`❄️ 【冷适应】叠加状态:当前累计${newLayers}/10次寒冷伤害`);
|
|
2724
|
+
if (newLayers >= 10) {
|
|
2725
|
+
targetUpdates.updates.tagsAdded = ["惧热"];
|
|
2726
|
+
messages.push(`🧊 【冷适应】触发:累计承受10次寒冷伤害,获得「惧热」标签`);
|
|
2727
|
+
messages.push(`🧊 【冷适应】获得永久免疫寒冷伤害效果`);
|
|
2728
|
+
}
|
|
2676
2729
|
}
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
}
|
|
2688
|
-
if (targetBoss.skills.includes("吸血唾液")) {
|
|
2689
|
-
newStacks = oldStacks + 1;
|
|
2690
|
-
messages.push(`🩸 【吸血唾液】生效:获得1层“吸血”`);
|
|
2691
|
-
}
|
|
2692
|
-
if (targetBoss.skills.includes("嗜血狂暴") && currentHP / maxHP < 0.5) {
|
|
2693
|
-
newStacks += 1;
|
|
2694
|
-
messages.push(`🔥 【嗜血狂暴】生效:额外获得1层“吸血”`);
|
|
2695
|
-
}
|
|
2696
|
-
newStacks = Math.min(newStacks, 20);
|
|
2697
|
-
if (oldStacks < 20 && newStacks >= 20) {
|
|
2698
|
-
messages.push(`🩸 “吸血”达到${newStacks}层,下次受到攻击将触发【进食】`);
|
|
2699
|
-
}
|
|
2700
|
-
await ctx.database.set("ggcevo_boss", { name: targetBoss.name }, { Skillcountpoints: newStacks });
|
|
2701
|
-
return { updatedHP, messages };
|
|
2702
|
-
}, "handleBloodCount"),
|
|
2703
|
-
// 修改后的伽马枪辐射处理(无限叠层,每层2.5%增伤,有效上限20层)
|
|
2704
|
-
handleGammaRadiation: /* @__PURE__ */ __name(async (ctx, targetBoss, weaponName) => {
|
|
2705
|
-
if (weaponName !== "伽马枪" || targetBoss.tags.includes("机械") || !targetBoss.tags.includes("生物")) {
|
|
2730
|
+
return {
|
|
2731
|
+
isImmune,
|
|
2732
|
+
messages,
|
|
2733
|
+
targetUpdates
|
|
2734
|
+
};
|
|
2735
|
+
}, "handleColdAdaptation"),
|
|
2736
|
+
// 感染空间站处理(空间站存活时自身减伤50%)
|
|
2737
|
+
handleInfectedSpaceStation: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
2738
|
+
const messages = [];
|
|
2739
|
+
if (!targetBoss.skills.includes("感染空间站")) {
|
|
2706
2740
|
return null;
|
|
2707
2741
|
}
|
|
2708
|
-
const
|
|
2709
|
-
|
|
2710
|
-
const currentLayers = targetBoss.Vulnerability || 0;
|
|
2711
|
-
const newLayers = currentLayers + 1;
|
|
2712
|
-
await ctx.database.set(
|
|
2713
|
-
"ggcevo_boss",
|
|
2714
|
-
{ name: targetBoss.name },
|
|
2715
|
-
{ Vulnerability: newLayers }
|
|
2742
|
+
const spaceStation = activeBosses.find(
|
|
2743
|
+
(boss) => boss.name === "空间站哨枪塔" && boss.isActive
|
|
2716
2744
|
);
|
|
2717
|
-
|
|
2718
|
-
|
|
2745
|
+
if (!spaceStation) {
|
|
2746
|
+
return null;
|
|
2747
|
+
}
|
|
2748
|
+
const newNerfMultiplier = 0.5;
|
|
2749
|
+
messages.push(`🛸 【感染空间站】生效:因「空间站哨枪塔」存活,自身所受伤害降低50%`);
|
|
2719
2750
|
return {
|
|
2720
|
-
|
|
2721
|
-
|
|
2751
|
+
nerfMultiplier: newNerfMultiplier,
|
|
2752
|
+
// 返回调整后的减伤系数
|
|
2753
|
+
messages
|
|
2722
2754
|
};
|
|
2723
|
-
}, "
|
|
2724
|
-
//
|
|
2725
|
-
|
|
2726
|
-
const radiationLayers = targetBoss.Vulnerability || 0;
|
|
2727
|
-
if (radiationLayers < 1) return null;
|
|
2728
|
-
const effectiveLayers = Math.min(radiationLayers, 20);
|
|
2729
|
-
const damageIncrease = effectiveLayers * 2.5;
|
|
2730
|
-
const maxIncrease = 50;
|
|
2755
|
+
}, "handleInfectedSpaceStation"),
|
|
2756
|
+
// 病毒云处理(释放病毒云雾减伤10%)
|
|
2757
|
+
handleVirusCloud: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2731
2758
|
const messages = [];
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
if (damageIncrease >= maxIncrease) {
|
|
2735
|
-
statusMsg += ``;
|
|
2759
|
+
if (!targetBoss.skills.includes("病毒云")) {
|
|
2760
|
+
return null;
|
|
2736
2761
|
}
|
|
2737
|
-
|
|
2762
|
+
const newNerfMultiplier = 0.1;
|
|
2763
|
+
messages.push(`☁️ 【病毒云】生效:释放病毒云雾形成保护,所受伤害降低10%`);
|
|
2738
2764
|
return {
|
|
2739
|
-
|
|
2740
|
-
//
|
|
2765
|
+
nerfMultiplier: newNerfMultiplier,
|
|
2766
|
+
// 返回调整后的减伤系数
|
|
2741
2767
|
messages
|
|
2742
2768
|
};
|
|
2743
|
-
}, "
|
|
2744
|
-
//
|
|
2745
|
-
|
|
2746
|
-
|
|
2769
|
+
}, "handleVirusCloud"),
|
|
2770
|
+
// 霉菌滋生处理(空间站存活时为其回复1%最大生命值)
|
|
2771
|
+
handleMoldGrowth: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
2772
|
+
const messages = [];
|
|
2773
|
+
if (!targetBoss.skills.includes("霉菌滋生")) {
|
|
2747
2774
|
return null;
|
|
2748
2775
|
}
|
|
2749
|
-
const
|
|
2750
|
-
|
|
2751
|
-
const currentFreezing = targetBoss.freezing || 0;
|
|
2752
|
-
const newFreezing = currentFreezing + 1;
|
|
2753
|
-
await ctx.database.set(
|
|
2754
|
-
"ggcevo_boss",
|
|
2755
|
-
{ name: targetBoss.name },
|
|
2756
|
-
{ freezing: newFreezing }
|
|
2776
|
+
const spaceStation = activeBosses.find(
|
|
2777
|
+
(boss) => boss.name === "空间站哨枪塔" && boss.isActive
|
|
2757
2778
|
);
|
|
2758
|
-
|
|
2759
|
-
|
|
2779
|
+
if (!spaceStation) {
|
|
2780
|
+
return null;
|
|
2781
|
+
}
|
|
2782
|
+
const spaceStationMaxHP = getMaxHPByName(spaceStation.name);
|
|
2783
|
+
const healAmount = Math.round(spaceStationMaxHP * 0.01);
|
|
2784
|
+
const spaceStationUpdates = {
|
|
2785
|
+
name: spaceStation.name,
|
|
2786
|
+
updates: {
|
|
2787
|
+
hpChange: healAmount
|
|
2788
|
+
}
|
|
2789
|
+
};
|
|
2790
|
+
messages.push(`🍄 【霉菌滋生】生效:为空间站哨枪塔回复${healAmount}点生命值`);
|
|
2760
2791
|
return {
|
|
2761
2792
|
messages,
|
|
2762
|
-
|
|
2793
|
+
spaceStationUpdates
|
|
2763
2794
|
};
|
|
2764
|
-
}, "
|
|
2765
|
-
//
|
|
2766
|
-
|
|
2767
|
-
const freezingLayers = targetBoss.freezing || 0;
|
|
2768
|
-
if (freezingLayers < 1) return null;
|
|
2769
|
-
const effectiveLayers = Math.min(freezingLayers, 20);
|
|
2770
|
-
const damageIncrease = effectiveLayers * 2.5;
|
|
2771
|
-
const maxIncrease = 50;
|
|
2795
|
+
}, "handleMoldGrowth"),
|
|
2796
|
+
// 岗哨机枪处理(累计10次攻击后为其他异形回复10%最大生命值)
|
|
2797
|
+
handleSentryGun: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
2772
2798
|
const messages = [];
|
|
2773
|
-
let
|
|
2774
|
-
|
|
2775
|
-
if (
|
|
2776
|
-
|
|
2799
|
+
let targetUpdates = null;
|
|
2800
|
+
const otherUpdates = [];
|
|
2801
|
+
if (!targetBoss.skills.includes("岗哨机枪")) {
|
|
2802
|
+
return null;
|
|
2777
2803
|
}
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
// 处理导体标签变化(血量低时护盾->重甲)
|
|
2787
|
-
handleConductorTagChange: /* @__PURE__ */ __name(async (ctx, targetBoss, currentHP, maxHP) => {
|
|
2788
|
-
const triggerThreshold = targetBoss.skills.includes("超导体") ? 0.05 : 0.1;
|
|
2789
|
-
const isBelowThreshold = currentHP <= maxHP * triggerThreshold;
|
|
2790
|
-
const hasShieldTag = targetBoss.tags.includes("护盾");
|
|
2791
|
-
const alreadyHeavyArmor = targetBoss.tags.includes("重甲");
|
|
2792
|
-
if (!targetBoss.skills.includes("超导体") && !targetBoss.skills.includes("电能导体")) return null;
|
|
2793
|
-
if (isBelowThreshold && hasShieldTag && !alreadyHeavyArmor) {
|
|
2794
|
-
const newTags = [
|
|
2795
|
-
...targetBoss.tags.filter((tag) => tag !== "护盾"),
|
|
2796
|
-
"重甲"
|
|
2797
|
-
];
|
|
2798
|
-
await ctx.database.set(
|
|
2799
|
-
"ggcevo_boss",
|
|
2800
|
-
{ name: targetBoss.name },
|
|
2801
|
-
{ tags: newTags }
|
|
2802
|
-
);
|
|
2803
|
-
return {
|
|
2804
|
-
messages: [`⚡ 【${targetBoss.skills.includes("超导体") ? "超导体" : "电能导体"}】生效:护盾崩溃,标签变更为「重甲」`]
|
|
2804
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
2805
|
+
if (currentStacks < 10) {
|
|
2806
|
+
targetUpdates = {
|
|
2807
|
+
name: targetBoss.name,
|
|
2808
|
+
updates: {
|
|
2809
|
+
skillStacksChanged: 1
|
|
2810
|
+
// 层数+1
|
|
2811
|
+
}
|
|
2805
2812
|
};
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
}, "handleConductorTagChange"),
|
|
2809
|
-
// 处理能量虹吸减伤(基于血量)
|
|
2810
|
-
handleEnergySiphon: /* @__PURE__ */ __name((targetBoss, currentHP, maxHP) => {
|
|
2811
|
-
if (!targetBoss.skills.includes("能量虹吸")) return null;
|
|
2812
|
-
let reduction = 0;
|
|
2813
|
-
if (currentHP >= maxHP * 0.7) {
|
|
2814
|
-
reduction = 0.4;
|
|
2815
|
-
} else if (currentHP >= maxHP * 0.3) {
|
|
2816
|
-
reduction = 0.2;
|
|
2817
|
-
}
|
|
2818
|
-
if (reduction > 0) {
|
|
2813
|
+
const newStacks = currentStacks + 1;
|
|
2814
|
+
messages.push(`🔫 【岗哨机枪】充能:当前累计${newStacks}/10次攻击`);
|
|
2819
2815
|
return {
|
|
2820
|
-
|
|
2821
|
-
|
|
2816
|
+
messages,
|
|
2817
|
+
targetUpdates,
|
|
2818
|
+
otherUpdates
|
|
2822
2819
|
};
|
|
2823
2820
|
}
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
{ name: targetBoss.name },
|
|
2835
|
-
{ energy: newEnergy }
|
|
2821
|
+
targetUpdates = {
|
|
2822
|
+
name: targetBoss.name,
|
|
2823
|
+
updates: {
|
|
2824
|
+
skillStacksChanged: -currentStacks
|
|
2825
|
+
// 重置层数
|
|
2826
|
+
}
|
|
2827
|
+
};
|
|
2828
|
+
messages.push(`🔫 【岗哨机枪】生效:累计承受10次攻击,为所有其他存活异形回复生命值`);
|
|
2829
|
+
const otherSurvivingBosses = activeBosses.filter(
|
|
2830
|
+
(boss) => boss.name !== targetBoss.name && boss.isActive
|
|
2836
2831
|
);
|
|
2837
|
-
|
|
2832
|
+
otherSurvivingBosses.forEach((otherBoss) => {
|
|
2833
|
+
const otherName = otherBoss.name;
|
|
2834
|
+
const otherMaxHP = getMaxHPByName(otherName);
|
|
2835
|
+
const healAmount = Math.round(otherMaxHP * 0.1);
|
|
2836
|
+
otherUpdates.push({
|
|
2837
|
+
name: otherName,
|
|
2838
|
+
updates: {
|
|
2839
|
+
hpChange: healAmount
|
|
2840
|
+
// 生命值回复
|
|
2841
|
+
}
|
|
2842
|
+
});
|
|
2843
|
+
messages.push(`🔫 【岗哨机枪】触发:为「${otherName}」回复${healAmount}点生命值`);
|
|
2844
|
+
});
|
|
2838
2845
|
return {
|
|
2839
|
-
messages
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
].filter(Boolean)
|
|
2846
|
+
messages,
|
|
2847
|
+
targetUpdates,
|
|
2848
|
+
otherUpdates
|
|
2843
2849
|
};
|
|
2844
|
-
}, "
|
|
2845
|
-
//
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
let reduction = 0;
|
|
2850
|
-
if (currentEnergy >= 800) {
|
|
2851
|
-
reduction = 0.5;
|
|
2852
|
-
} else if (currentEnergy >= 500) {
|
|
2853
|
-
reduction = 0.3;
|
|
2854
|
-
}
|
|
2855
|
-
if (reduction > 0) {
|
|
2856
|
-
return {
|
|
2857
|
-
damageMultiplier: -reduction,
|
|
2858
|
-
messages: [`🔋 【能源虹吸】生效:能量${currentEnergy > 800 ? ">80%" : ">50%"},受到的伤害-${reduction * 100}%`]
|
|
2859
|
-
};
|
|
2860
|
-
}
|
|
2861
|
-
return null;
|
|
2862
|
-
}, "handlePowerSiphon"),
|
|
2863
|
-
// 处理电能立场(概率免疫伤害)
|
|
2864
|
-
handleEnergyField: /* @__PURE__ */ __name(async function(ctx, targetBoss, weaponName, initialDamage) {
|
|
2865
|
-
if (!targetBoss.skills.includes("电能立场") || initialDamage === 0 || weaponName === "零度之下") {
|
|
2850
|
+
}, "handleSentryGun"),
|
|
2851
|
+
// 结构装甲处理(常规伤害降低20%;热能武器伤害降低40%)
|
|
2852
|
+
handleStructuralArmor: /* @__PURE__ */ __name(function(targetBoss, weaponData) {
|
|
2853
|
+
const messages = [];
|
|
2854
|
+
if (!targetBoss.skills.includes("结构装甲")) {
|
|
2866
2855
|
return null;
|
|
2867
2856
|
}
|
|
2868
|
-
const
|
|
2869
|
-
const
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2857
|
+
const weaponType = weaponData.type;
|
|
2858
|
+
const isHeatWeapon = weaponType === "热能武器";
|
|
2859
|
+
const nerfMultiplier = isHeatWeapon ? 0.4 : 0.2;
|
|
2860
|
+
messages.push(`🛡️ 【结构装甲】生效:${isHeatWeapon ? "热能武器" : "常规武器"}伤害降低${nerfMultiplier * 100}%`);
|
|
2861
|
+
return {
|
|
2862
|
+
nerfMultiplier,
|
|
2863
|
+
messages
|
|
2864
|
+
};
|
|
2865
|
+
}, "handleStructuralArmor"),
|
|
2866
|
+
// 吸血唾液处理(叠加「吸血」层数,每层提供5%减伤,最多20层)
|
|
2867
|
+
handleVampireSaliva: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2868
|
+
const messages = [];
|
|
2869
|
+
if (!targetBoss.skills.includes("吸血唾液")) {
|
|
2873
2870
|
return null;
|
|
2874
2871
|
}
|
|
2875
|
-
const
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2872
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
2873
|
+
const addStacks = currentStacks < 20 ? 1 : 0;
|
|
2874
|
+
const addedReduction = currentStacks * 0.05;
|
|
2875
|
+
let targetUpdates = null;
|
|
2876
|
+
if (addStacks > 0) {
|
|
2877
|
+
targetUpdates = {
|
|
2878
|
+
name: targetBoss.name,
|
|
2879
|
+
updates: {
|
|
2880
|
+
skillStacksChanged: addStacks
|
|
2881
|
+
// 实际增加的层数(0或1)
|
|
2882
|
+
}
|
|
2882
2883
|
};
|
|
2883
2884
|
}
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2885
|
+
const stackMessage = currentStacks < 20 ? `当前${currentStacks}层,获得${(addedReduction * 100).toFixed(0)}%减伤,同时层数+1` : `已达到最大20层,获得${(addedReduction * 100).toFixed(0)}%减伤`;
|
|
2886
|
+
messages.push(`🩸 【吸血唾液】${stackMessage}`);
|
|
2887
|
+
return {
|
|
2888
|
+
nerfMultiplier: addedReduction,
|
|
2889
|
+
messages,
|
|
2890
|
+
targetUpdates
|
|
2891
|
+
};
|
|
2892
|
+
}, "handleVampireSaliva"),
|
|
2893
|
+
// 进食处理(吸血层数达到20层时,回复20%最大生命值)
|
|
2894
|
+
handleFeeding: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2895
|
+
const messages = [];
|
|
2896
|
+
if (!targetBoss.skills.includes("进食")) {
|
|
2897
|
+
return null;
|
|
2891
2898
|
}
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
// 修改后的脉冲处理函数
|
|
2895
|
-
handlePulse: /* @__PURE__ */ __name(async function(ctx, targetBoss, activeBosses, bossGroup, currentHP) {
|
|
2896
|
-
if (!targetBoss.skills.includes("脉冲")) return null;
|
|
2897
|
-
const currentEnergy = targetBoss.energy || 0;
|
|
2898
|
-
const currentFreezing = targetBoss.freezing || 0;
|
|
2899
|
-
const maxEnergy = 1e3;
|
|
2900
|
-
if (currentEnergy < maxEnergy * 0.3) {
|
|
2899
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
2900
|
+
if (currentStacks < 20) {
|
|
2901
2901
|
return null;
|
|
2902
2902
|
}
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
const
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
//
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
const healMessages = [];
|
|
2913
|
-
let updatedHP = currentHP;
|
|
2914
|
-
for (const member of groupMembers) {
|
|
2915
|
-
const memberConfig = this.getMemberConfig(member.name, bossGroup);
|
|
2916
|
-
if (!memberConfig) continue;
|
|
2917
|
-
const maxHP = memberConfig.maxHP;
|
|
2918
|
-
const healAmount = member.type === "主宰" ? 100 : 100;
|
|
2919
|
-
const newHP = Math.min(member.HP + healAmount, maxHP);
|
|
2920
|
-
const actualHeal = newHP - member.HP;
|
|
2921
|
-
if (member.name === targetBoss.name) {
|
|
2922
|
-
updatedHP = newHP;
|
|
2923
|
-
}
|
|
2924
|
-
updates.push(
|
|
2925
|
-
ctx.database.set(
|
|
2926
|
-
"ggcevo_boss",
|
|
2927
|
-
{ name: member.name },
|
|
2928
|
-
{ HP: newHP }
|
|
2929
|
-
)
|
|
2930
|
-
);
|
|
2931
|
-
if (actualHeal > 0) {
|
|
2932
|
-
healMessages.push(`${member.name}+${actualHeal}HP`);
|
|
2933
|
-
}
|
|
2903
|
+
const maxHP = getMaxHPByName(targetBoss.name);
|
|
2904
|
+
const healAmount = Math.round(maxHP * 0.2);
|
|
2905
|
+
const targetUpdates = {
|
|
2906
|
+
name: targetBoss.name,
|
|
2907
|
+
updates: {
|
|
2908
|
+
skillStacksChanged: -currentStacks,
|
|
2909
|
+
// 层数清零
|
|
2910
|
+
hpChange: healAmount
|
|
2911
|
+
// 生命值回复
|
|
2934
2912
|
}
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2913
|
+
};
|
|
2914
|
+
messages.push(`🍽️ 【进食】生效:消耗20层吸血唾液,回复${healAmount}点生命值`);
|
|
2915
|
+
return {
|
|
2916
|
+
messages,
|
|
2917
|
+
targetUpdates
|
|
2918
|
+
};
|
|
2919
|
+
}, "handleFeeding"),
|
|
2920
|
+
// 嗜血狂暴处理(生命值低于50%时,叠加吸血层数并降低20%伤害)
|
|
2921
|
+
handleBloodlust: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2922
|
+
const messages = [];
|
|
2923
|
+
let targetUpdates = null;
|
|
2924
|
+
let nerfMultiplier = 0;
|
|
2925
|
+
if (!targetBoss.skills.includes("嗜血狂暴")) {
|
|
2926
|
+
return null;
|
|
2927
|
+
}
|
|
2928
|
+
const currentHP = targetBoss.HP;
|
|
2929
|
+
const maxHP = getMaxHPByName(targetBoss.name);
|
|
2930
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
2931
|
+
const isLowHP = currentHP <= maxHP * 0.5;
|
|
2932
|
+
if (isLowHP) {
|
|
2933
|
+
if (currentStacks < 20) {
|
|
2934
|
+
targetUpdates = {
|
|
2935
|
+
name: targetBoss.name,
|
|
2936
|
+
updates: {
|
|
2937
|
+
skillStacksChanged: 1
|
|
2938
|
+
// 层数+1
|
|
2939
|
+
}
|
|
2944
2940
|
};
|
|
2945
2941
|
}
|
|
2942
|
+
nerfMultiplier = 0.2;
|
|
2943
|
+
const stackMessage = currentStacks < 20 ? `额外叠加1层吸血唾液(当前${currentStacks + 1}/20层)` : `已达到最大20层吸血唾液`;
|
|
2944
|
+
messages.push(`🔥 【嗜血狂暴】生效:HP≤50%,${stackMessage},并且获得20%额外减伤`);
|
|
2945
|
+
}
|
|
2946
|
+
return {
|
|
2947
|
+
nerfMultiplier,
|
|
2948
|
+
messages,
|
|
2949
|
+
targetUpdates
|
|
2950
|
+
};
|
|
2951
|
+
}, "handleBloodlust"),
|
|
2952
|
+
// 吐血处理(无「吸血唾液」层数时,所受伤害提升20%)
|
|
2953
|
+
handleVomit: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2954
|
+
const messages = [];
|
|
2955
|
+
if (!targetBoss.skills.includes("吐血")) {
|
|
2946
2956
|
return null;
|
|
2947
2957
|
}
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2958
|
+
const currentVampireStacks = targetBoss.skillStacks || 0;
|
|
2959
|
+
const isTriggered = currentVampireStacks === 0;
|
|
2960
|
+
const buffMultiplier = isTriggered ? 0.2 : 0;
|
|
2961
|
+
if (isTriggered) {
|
|
2962
|
+
messages.push(`🩸 【吐血】生效:无「吸血唾液」层数,所受伤害提升20%`);
|
|
2963
|
+
}
|
|
2964
|
+
return {
|
|
2965
|
+
buffMultiplier,
|
|
2966
|
+
messages
|
|
2967
|
+
};
|
|
2968
|
+
}, "handleVomit"),
|
|
2969
|
+
// 超导体(状态转换:护盾→重甲)
|
|
2970
|
+
handleSuperconductor: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2954
2971
|
const messages = [];
|
|
2955
|
-
let
|
|
2956
|
-
if (
|
|
2957
|
-
const energyDrain = Math.min(200, currentEnergy);
|
|
2958
|
-
const newEnergy = currentEnergy - energyDrain;
|
|
2959
|
-
await ctx.database.set(
|
|
2960
|
-
"ggcevo_boss",
|
|
2961
|
-
{ name: targetBoss.name },
|
|
2962
|
-
{ energy: newEnergy }
|
|
2963
|
-
);
|
|
2964
|
-
arcApplied = true;
|
|
2965
|
-
messages.push(`⚡ 【弧焊枪】武器效果:消耗目标200点能量`);
|
|
2966
|
-
} else {
|
|
2972
|
+
let targetUpdates = null;
|
|
2973
|
+
if (!targetBoss.skills.includes("超导体")) {
|
|
2967
2974
|
return null;
|
|
2968
2975
|
}
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
if (weaponName !== "DG-3电弧步枪") return null;
|
|
2974
|
-
const currentEnergy = targetBoss.energy || 0;
|
|
2975
|
-
const drainAmount = Math.min(500, currentEnergy);
|
|
2976
|
-
const newEnergy = currentEnergy - drainAmount;
|
|
2977
|
-
if (drainAmount <= 0) {
|
|
2976
|
+
const maxHP = getMaxHPByName(targetBoss.name);
|
|
2977
|
+
const hpPercent = targetBoss.HP / maxHP;
|
|
2978
|
+
const hasShieldTag = targetBoss.tags.includes("护盾") || false;
|
|
2979
|
+
if (hpPercent > 0.1 || !hasShieldTag) {
|
|
2978
2980
|
return null;
|
|
2979
2981
|
}
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2982
|
+
targetUpdates = {
|
|
2983
|
+
name: targetBoss.name,
|
|
2984
|
+
updates: {
|
|
2985
|
+
tagsRemoved: ["护盾"],
|
|
2986
|
+
// 移除护盾标签
|
|
2987
|
+
tagsAdded: ["重甲"]
|
|
2988
|
+
// 添加重甲标签
|
|
2989
|
+
}
|
|
2990
|
+
};
|
|
2991
|
+
messages.push(`🛡️ 【超导体】生效:生命值≤10%,「护盾」标签转换为「重甲」标签`);
|
|
2992
|
+
return {
|
|
2993
|
+
messages,
|
|
2994
|
+
targetUpdates
|
|
2995
|
+
};
|
|
2996
|
+
}, "handleSuperconductor"),
|
|
2997
|
+
// 能量虹吸(生命值相关减伤)
|
|
2998
|
+
handleEnergySiphon: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2999
|
+
const messages = [];
|
|
3000
|
+
if (!targetBoss.skills.includes("能量虹吸")) return null;
|
|
3001
|
+
const maxHP = getMaxHPByName(targetBoss.name);
|
|
3002
|
+
const hpPercent = targetBoss.HP / maxHP;
|
|
3003
|
+
let nerfMultiplier = 0;
|
|
3004
|
+
if (hpPercent >= 0.7) {
|
|
3005
|
+
nerfMultiplier = 0.4;
|
|
3006
|
+
messages.push(`⚡ 【能量虹吸】生效:生命值≥70%,所受伤害降低40%`);
|
|
3007
|
+
} else if (hpPercent >= 0.3) {
|
|
3008
|
+
nerfMultiplier = 0.2;
|
|
3009
|
+
messages.push(`⚡ 【能量虹吸】生效:生命值≥30%,所受伤害降低20%`);
|
|
3010
|
+
}
|
|
3011
|
+
return { nerfMultiplier, messages };
|
|
3012
|
+
}, "handleEnergySiphon"),
|
|
3013
|
+
// 能源虹吸(能量值相关减伤)
|
|
3014
|
+
handleEnergyAbsorption: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3015
|
+
const messages = [];
|
|
3016
|
+
if (!targetBoss.skills.includes("能源虹吸")) return null;
|
|
3017
|
+
const currentEnergy = targetBoss.energy;
|
|
3018
|
+
const maxEnergy = getMaxEnergyByName(targetBoss.name);
|
|
3019
|
+
const energyPercent = currentEnergy / maxEnergy;
|
|
3020
|
+
let nerfMultiplier = 0;
|
|
3021
|
+
if (energyPercent >= 0.8) {
|
|
3022
|
+
nerfMultiplier = 0.5;
|
|
3023
|
+
messages.push(`⚡ 【能源虹吸】生效:能量≥80%,所受伤害降低50%`);
|
|
3024
|
+
} else if (energyPercent >= 0.5) {
|
|
3025
|
+
nerfMultiplier = 0.3;
|
|
3026
|
+
messages.push(`⚡ 【能源虹吸】生效:能量≥50%,所受伤害降低30%`);
|
|
3027
|
+
}
|
|
3028
|
+
return { nerfMultiplier, messages };
|
|
3029
|
+
}, "handleEnergyAbsorption"),
|
|
3030
|
+
// 电能立场(能量相关免疫)
|
|
3031
|
+
handleElectricField: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3032
|
+
const messages = [];
|
|
3033
|
+
let isImmune = false;
|
|
3034
|
+
if (!targetBoss.skills.includes("电能立场")) return null;
|
|
3035
|
+
const currentEnergy = targetBoss.energy;
|
|
3036
|
+
const maxEnergy = getMaxEnergyByName(targetBoss.name);
|
|
3037
|
+
const energyPercent = currentEnergy / maxEnergy;
|
|
3038
|
+
if (energyPercent < 0.3) {
|
|
3039
|
+
return null;
|
|
3040
|
+
}
|
|
3041
|
+
const coldLayers = targetBoss.coldLayers || 0;
|
|
3042
|
+
const baseChance = 0.55;
|
|
3043
|
+
const coldPenalty = coldLayers * 0.05;
|
|
3044
|
+
const immuneChance = Math.max(baseChance - coldPenalty, 0.05);
|
|
3045
|
+
isImmune = Math.random() < immuneChance;
|
|
3046
|
+
const chancePercent = Math.round(immuneChance * 100);
|
|
3047
|
+
messages.push(`⚡ 【电能立场】生效:能量≥30%,免疫概率${chancePercent}%` + (isImmune ? " → 免疫成功" : " → 未免疫"));
|
|
3048
|
+
return { isImmune, messages };
|
|
3049
|
+
}, "handleElectricField"),
|
|
3050
|
+
// 电能冲击波(能量回复)
|
|
3051
|
+
handleElectricShockwave: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3052
|
+
const messages = [];
|
|
3053
|
+
if (!targetBoss.skills.includes("电能冲击波")) {
|
|
3054
|
+
return null;
|
|
3055
|
+
}
|
|
3056
|
+
const currentEnergy = targetBoss.energy || 0;
|
|
3057
|
+
const maxEnergy = getMaxEnergyByName(targetBoss.name);
|
|
3058
|
+
const maxHealAmount = 100;
|
|
3059
|
+
const actualHealAmount = Math.min(maxHealAmount, maxEnergy - currentEnergy);
|
|
3060
|
+
if (actualHealAmount <= 0) {
|
|
3061
|
+
messages.push(`⚡ 【电能冲击波】生效:能量已达上限`);
|
|
2993
3062
|
return {
|
|
2994
|
-
|
|
2995
|
-
|
|
3063
|
+
messages,
|
|
3064
|
+
targetUpdates: null
|
|
2996
3065
|
};
|
|
2997
3066
|
}
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3067
|
+
const targetUpdates = {
|
|
3068
|
+
name: targetBoss.name,
|
|
3069
|
+
updates: {
|
|
3070
|
+
energyChange: maxHealAmount
|
|
3071
|
+
// 回复量
|
|
3072
|
+
}
|
|
3073
|
+
};
|
|
3074
|
+
messages.push(`⚡ 【电能冲击波】生效:回复${maxHealAmount}点能量`);
|
|
3075
|
+
return {
|
|
3076
|
+
messages,
|
|
3077
|
+
targetUpdates
|
|
3078
|
+
};
|
|
3079
|
+
}, "handleElectricShockwave"),
|
|
3080
|
+
// 脉冲(生命回复)
|
|
3081
|
+
handlePulse: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
3082
|
+
const messages = [];
|
|
3083
|
+
const otherUpdates = [];
|
|
3084
|
+
if (!targetBoss.skills.includes("脉冲")) {
|
|
3085
|
+
return null;
|
|
3086
|
+
}
|
|
3087
|
+
const currentEnergy = targetBoss.energy || 0;
|
|
3088
|
+
const maxEnergy = getMaxEnergyByName(targetBoss.name);
|
|
3089
|
+
const energyPercent = maxEnergy > 0 ? currentEnergy / maxEnergy : 0;
|
|
3090
|
+
if (energyPercent < 0.3) {
|
|
3091
|
+
return null;
|
|
3092
|
+
}
|
|
3093
|
+
const coldLayers = targetBoss.coldLayers || 0;
|
|
3094
|
+
const baseChance = 0.6;
|
|
3095
|
+
const coldPenalty = coldLayers * 0.05;
|
|
3096
|
+
const triggerChance = Math.max(baseChance - coldPenalty, 0.1);
|
|
3097
|
+
if (Math.random() >= triggerChance) {
|
|
3098
|
+
return null;
|
|
3099
|
+
}
|
|
3100
|
+
const survivors = activeBosses.filter((b) => b.isActive);
|
|
3101
|
+
survivors.forEach((survivor) => {
|
|
3102
|
+
const healAmount = 100;
|
|
3103
|
+
if (healAmount > 0) {
|
|
3104
|
+
otherUpdates.push({
|
|
3105
|
+
name: survivor.name,
|
|
3106
|
+
updates: { hpChange: healAmount }
|
|
3107
|
+
});
|
|
3108
|
+
messages.push(`⚡ 【脉冲】生效:为「${survivor.name}」回复${healAmount}点生命值`);
|
|
3009
3109
|
}
|
|
3110
|
+
});
|
|
3111
|
+
return {
|
|
3112
|
+
messages,
|
|
3113
|
+
otherUpdates
|
|
3114
|
+
};
|
|
3115
|
+
}, "handlePulse"),
|
|
3116
|
+
// 能量黑洞(固定减伤)
|
|
3117
|
+
handleEnergyBlackhole: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3118
|
+
const messages = [];
|
|
3119
|
+
if (!targetBoss.skills.includes("能量黑洞")) return null;
|
|
3120
|
+
messages.push(`⚡ 【能量黑洞】生效:存在「能量黑洞」时,所受伤害降低20%`);
|
|
3121
|
+
return { nerfMultiplier: 0.2, messages };
|
|
3122
|
+
}, "handleEnergyBlackhole"),
|
|
3123
|
+
// 火焰异形(免疫伤害并回复生命值)
|
|
3124
|
+
handleFlameAlien: /* @__PURE__ */ __name(function(targetBoss, weaponName, damage) {
|
|
3125
|
+
const messages = [];
|
|
3126
|
+
let isImmune = false;
|
|
3127
|
+
if (!targetBoss.skills.includes("火焰异形")) {
|
|
3128
|
+
return null;
|
|
3129
|
+
}
|
|
3130
|
+
const isFireDamage = weaponName === "焚烧枪";
|
|
3131
|
+
if (!isFireDamage) {
|
|
3132
|
+
return null;
|
|
3010
3133
|
}
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3134
|
+
isImmune = true;
|
|
3135
|
+
const healAmount = damage;
|
|
3136
|
+
const targetUpdates = {
|
|
3137
|
+
name: targetBoss.name,
|
|
3138
|
+
updates: {
|
|
3139
|
+
hpChange: healAmount
|
|
3140
|
+
// 生命值变化量
|
|
3014
3141
|
}
|
|
3142
|
+
};
|
|
3143
|
+
messages.push(`🔥 【火焰异形】生效:「${targetBoss.boss}」免疫火焰伤害`);
|
|
3144
|
+
messages.push(`🔥 恢复${healAmount}点生命值`);
|
|
3145
|
+
return {
|
|
3146
|
+
isImmune,
|
|
3147
|
+
messages,
|
|
3148
|
+
targetUpdates
|
|
3149
|
+
};
|
|
3150
|
+
}, "handleFlameAlien"),
|
|
3151
|
+
// 庞兽狂暴 - 低生命时减伤
|
|
3152
|
+
handleColossalRampage: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3153
|
+
const messages = [];
|
|
3154
|
+
if (!targetBoss.skills.includes("庞兽狂暴")) {
|
|
3155
|
+
return null;
|
|
3015
3156
|
}
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
}, "handleBileStacking"),
|
|
3023
|
-
// 修改后的太阳耀斑处理(每次受击检测)
|
|
3024
|
-
handleSolarFlare: /* @__PURE__ */ __name(async function(ctx, targetBoss, weaponName) {
|
|
3025
|
-
if (!targetBoss.skills.includes("太阳耀斑") || targetBoss.type !== "主宰") {
|
|
3026
|
-
return { immune: false, messages: [] };
|
|
3157
|
+
const maxHP = getMaxHPByName(targetBoss.name);
|
|
3158
|
+
const hpPercent = targetBoss.HP / maxHP;
|
|
3159
|
+
let nerfMultiplier = 0;
|
|
3160
|
+
if (hpPercent < 0.5) {
|
|
3161
|
+
nerfMultiplier = 0.5;
|
|
3162
|
+
messages.push(`💥 【庞兽狂暴】生效:生命值低于50%,狂暴状态下所受伤害降低50%`);
|
|
3027
3163
|
}
|
|
3164
|
+
return { nerfMultiplier, messages };
|
|
3165
|
+
}, "handleColossalRampage"),
|
|
3166
|
+
handleBurningSlime: /* @__PURE__ */ __name(function(targetBoss, weaponName) {
|
|
3028
3167
|
const messages = [];
|
|
3029
|
-
let
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
const
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
updates.push(
|
|
3053
|
-
ctx.database.set(
|
|
3054
|
-
"ggcevo_boss",
|
|
3055
|
-
{ name: targetBoss.name },
|
|
3056
|
-
{ skills: newSkills }
|
|
3057
|
-
)
|
|
3058
|
-
);
|
|
3059
|
-
targetBoss.skills = newSkills;
|
|
3060
|
-
messages.push(`☀️ 【太阳耀斑】生效:移除"孤立无援"技能`);
|
|
3168
|
+
let targetUpdates = null;
|
|
3169
|
+
let isHighStackHeal = false;
|
|
3170
|
+
if (!targetBoss.skills.includes("灼烧粘液")) {
|
|
3171
|
+
return null;
|
|
3172
|
+
}
|
|
3173
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
3174
|
+
const maxStacks = 20;
|
|
3175
|
+
const isFireDamage = weaponName === "焚烧枪";
|
|
3176
|
+
const updates = {};
|
|
3177
|
+
if (!isFireDamage && currentStacks < maxStacks) {
|
|
3178
|
+
updates.skillStacksChanged = 1;
|
|
3179
|
+
const newStacks = currentStacks + 1;
|
|
3180
|
+
messages.push(`🔥 【灼烧粘液】叠加:当前层数${newStacks}/${maxStacks}`);
|
|
3181
|
+
}
|
|
3182
|
+
if (isFireDamage && currentStacks > 0) {
|
|
3183
|
+
const healAmount = currentStacks * 10;
|
|
3184
|
+
updates.hpChange = healAmount;
|
|
3185
|
+
updates.skillStacksChanged = -currentStacks;
|
|
3186
|
+
if (currentStacks >= 10) {
|
|
3187
|
+
isHighStackHeal = true;
|
|
3188
|
+
messages.push(`🔥 【灼烧粘液】强力回复:消耗${currentStacks}层(≥10),回复${healAmount}点生命值!`);
|
|
3189
|
+
} else {
|
|
3190
|
+
messages.push(`🔥 【灼烧粘液】生效:消耗${currentStacks}层,回复${healAmount}点生命值`);
|
|
3061
3191
|
}
|
|
3062
|
-
await Promise.all(updates);
|
|
3063
3192
|
}
|
|
3064
|
-
if (
|
|
3065
|
-
|
|
3066
|
-
|
|
3193
|
+
if (Object.keys(updates).length > 0) {
|
|
3194
|
+
targetUpdates = {
|
|
3195
|
+
name: targetBoss.name,
|
|
3196
|
+
updates
|
|
3197
|
+
};
|
|
3067
3198
|
}
|
|
3068
|
-
return {
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3199
|
+
return {
|
|
3200
|
+
messages,
|
|
3201
|
+
targetUpdates,
|
|
3202
|
+
isHighStackHeal
|
|
3203
|
+
// 新增的标记字段
|
|
3204
|
+
};
|
|
3205
|
+
}, "handleBurningSlime"),
|
|
3206
|
+
// 腐蚀胆汁 - 群体回复机制
|
|
3207
|
+
handleCorrosiveBile: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
3208
|
+
const messages = [];
|
|
3209
|
+
const otherUpdates = [];
|
|
3210
|
+
let targetUpdates = null;
|
|
3211
|
+
const requiredStacks = 10;
|
|
3212
|
+
if (!targetBoss.skills.includes("腐蚀胆汁")) {
|
|
3213
|
+
return null;
|
|
3075
3214
|
}
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
if (bileStacks < 10) return null;
|
|
3083
|
-
await ctx.database.set(
|
|
3084
|
-
"ggcevo_boss",
|
|
3085
|
-
{ name: targetBoss.name },
|
|
3086
|
-
{ Skillcountpoints: 0 }
|
|
3215
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
3216
|
+
if (currentStacks < requiredStacks) {
|
|
3217
|
+
return null;
|
|
3218
|
+
}
|
|
3219
|
+
const otherSurvivingBosses = activeBosses.filter(
|
|
3220
|
+
(boss) => boss.isActive
|
|
3087
3221
|
);
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
for (const member of groupMembers) {
|
|
3099
|
-
const maxHP = this.getMemberMaxHP(member.name, bossGroup);
|
|
3100
|
-
if (!maxHP) continue;
|
|
3222
|
+
targetUpdates = {
|
|
3223
|
+
name: targetBoss.name,
|
|
3224
|
+
updates: {
|
|
3225
|
+
skillStacksChanged: -currentStacks
|
|
3226
|
+
// 重置层数为0
|
|
3227
|
+
}
|
|
3228
|
+
};
|
|
3229
|
+
messages.push(`🧪 【腐蚀胆汁】触发:灼烧粘液达到${currentStacks}层,为所有存活异形回复生命值`);
|
|
3230
|
+
otherSurvivingBosses.forEach((otherBoss) => {
|
|
3231
|
+
const otherName = otherBoss.name;
|
|
3101
3232
|
const healAmount = 1e3;
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
}
|
|
3116
|
-
await Promise.all(updates);
|
|
3117
|
-
return { messages, currentHP: updatedHP };
|
|
3233
|
+
if (healAmount > 0) {
|
|
3234
|
+
otherUpdates.push({
|
|
3235
|
+
name: otherName,
|
|
3236
|
+
updates: { hpChange: healAmount }
|
|
3237
|
+
});
|
|
3238
|
+
messages.push(`🧪 【腐蚀胆汁】生效:为「${otherName}」回复${healAmount}点生命值`);
|
|
3239
|
+
}
|
|
3240
|
+
});
|
|
3241
|
+
return {
|
|
3242
|
+
messages,
|
|
3243
|
+
targetUpdates,
|
|
3244
|
+
otherUpdates
|
|
3245
|
+
};
|
|
3118
3246
|
}, "handleCorrosiveBile"),
|
|
3119
|
-
//
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
const
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3247
|
+
// 火焰吐息 - 高级群体回复机制
|
|
3248
|
+
handleFlameBreath: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
3249
|
+
const messages = [];
|
|
3250
|
+
const otherUpdates = [];
|
|
3251
|
+
let targetUpdates = null;
|
|
3252
|
+
const requiredStacks = 20;
|
|
3253
|
+
if (!targetBoss.skills.includes("火焰吐息")) {
|
|
3254
|
+
return null;
|
|
3255
|
+
}
|
|
3256
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
3257
|
+
if (currentStacks < requiredStacks) {
|
|
3258
|
+
return null;
|
|
3259
|
+
}
|
|
3260
|
+
const otherSurvivingBosses = activeBosses.filter(
|
|
3261
|
+
(boss) => boss.isActive
|
|
3128
3262
|
);
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
const groupMembers = await ctx.database.get("ggcevo_boss", {
|
|
3135
|
-
groupId: targetBoss.groupId,
|
|
3136
|
-
isActive: true,
|
|
3137
|
-
HP: { $gt: 0 }
|
|
3138
|
-
});
|
|
3139
|
-
for (const member of groupMembers) {
|
|
3140
|
-
const maxHP = this.getMemberMaxHP(member.name, bossGroup);
|
|
3141
|
-
if (!maxHP) continue;
|
|
3142
|
-
const healAmount = Math.floor(maxHP * 0.5);
|
|
3143
|
-
const newHP = Math.min(member.HP + healAmount, maxHP);
|
|
3144
|
-
const actualHeal = newHP - member.HP;
|
|
3145
|
-
if (member.name === targetBoss.name) {
|
|
3146
|
-
updatedHP = newHP;
|
|
3147
|
-
}
|
|
3148
|
-
updates.push(
|
|
3149
|
-
ctx.database.set(
|
|
3150
|
-
"ggcevo_boss",
|
|
3151
|
-
{ name: member.name },
|
|
3152
|
-
{ HP: newHP }
|
|
3153
|
-
)
|
|
3154
|
-
);
|
|
3155
|
-
messages.push(`${member.name} 回复${actualHeal}点生命值`);
|
|
3156
|
-
}
|
|
3157
|
-
await Promise.all(updates);
|
|
3158
|
-
return { messages, currentHP: updatedHP };
|
|
3159
|
-
}, "handleFireBreath"),
|
|
3160
|
-
// 修改后的火焰异形处理
|
|
3161
|
-
handleFireEvolution: /* @__PURE__ */ __name(async function(ctx, targetBoss, weaponName, initialDamage, bossGroup) {
|
|
3162
|
-
if (targetBoss.skills.includes("火焰异形") && weaponName === "焚烧枪") {
|
|
3163
|
-
const maxHP = this.getMemberMaxHP(targetBoss.name, bossGroup);
|
|
3164
|
-
if (!maxHP) return null;
|
|
3165
|
-
const healAmount = Math.min(initialDamage, maxHP - targetBoss.HP);
|
|
3166
|
-
let updatedHP = Math.min(targetBoss.HP + healAmount, maxHP);
|
|
3167
|
-
const messages = [
|
|
3168
|
-
`🔥 【火焰异形】生效:免疫火焰伤害`,
|
|
3169
|
-
healAmount > 0 ? `${targetBoss.name}回复${healAmount}点生命值` : ""
|
|
3170
|
-
].filter(Boolean);
|
|
3171
|
-
const bileResult = await this.handleBileIgnition(ctx, targetBoss, bossGroup, updatedHP);
|
|
3172
|
-
if (bileResult) {
|
|
3173
|
-
updatedHP = bileResult.newHP;
|
|
3174
|
-
messages.push(...bileResult.messages);
|
|
3263
|
+
targetUpdates = {
|
|
3264
|
+
name: targetBoss.name,
|
|
3265
|
+
updates: {
|
|
3266
|
+
skillStacksChanged: -currentStacks
|
|
3267
|
+
// 重置层数为0
|
|
3175
3268
|
}
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3269
|
+
};
|
|
3270
|
+
messages.push(`🔥 【火焰吐息】触发:灼烧粘液达到${currentStacks}层,为所有存活异形回复20%最大生命值`);
|
|
3271
|
+
otherSurvivingBosses.forEach((otherBoss) => {
|
|
3272
|
+
const otherName = otherBoss.name;
|
|
3273
|
+
const maxHP = getMaxHPByName(otherName);
|
|
3274
|
+
const healAmount = Math.round(maxHP * 0.2);
|
|
3275
|
+
if (healAmount > 0) {
|
|
3276
|
+
otherUpdates.push({
|
|
3277
|
+
name: otherName,
|
|
3278
|
+
updates: { hpChange: healAmount }
|
|
3279
|
+
});
|
|
3280
|
+
messages.push(`🔥 【火焰吐息】生效:为「${otherName}」回复${healAmount}点生命值`);
|
|
3281
|
+
}
|
|
3282
|
+
});
|
|
3283
|
+
return {
|
|
3284
|
+
messages,
|
|
3285
|
+
targetUpdates,
|
|
3286
|
+
otherUpdates
|
|
3287
|
+
};
|
|
3288
|
+
}, "handleFlameBreath"),
|
|
3289
|
+
// 太阳耀斑 - 移除状态并获得免疫
|
|
3290
|
+
handleSolarFlare: /* @__PURE__ */ __name(function(targetBoss, weaponName, damage, activeBosses) {
|
|
3291
|
+
const messages = [];
|
|
3292
|
+
let isImmune = false;
|
|
3293
|
+
let targetUpdates = null;
|
|
3294
|
+
if (!targetBoss.skills.includes("太阳耀斑")) {
|
|
3295
|
+
return null;
|
|
3183
3296
|
}
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
// 修改后的灼烧粘液引爆
|
|
3187
|
-
handleBileIgnition: /* @__PURE__ */ __name(async function(ctx, targetBoss, bossGroup, updatedHP) {
|
|
3188
|
-
if (!targetBoss.skills.includes("灼烧粘液")) return null;
|
|
3189
|
-
const bileStacks = targetBoss.Skillcountpoints || 0;
|
|
3190
|
-
if (bileStacks < 1) return null;
|
|
3191
|
-
const maxHP = this.getMemberMaxHP(targetBoss.name, bossGroup);
|
|
3192
|
-
if (!maxHP) return null;
|
|
3193
|
-
const healAmount = bileStacks * 10;
|
|
3194
|
-
const newHP = Math.min(updatedHP + healAmount, maxHP);
|
|
3195
|
-
await ctx.database.set(
|
|
3196
|
-
"ggcevo_boss",
|
|
3197
|
-
{ name: targetBoss.name },
|
|
3198
|
-
{ Skillcountpoints: 0, HP: newHP }
|
|
3297
|
+
const hasLivingOffspring = activeBosses.some(
|
|
3298
|
+
(boss) => boss.name !== targetBoss.name && boss.isActive
|
|
3199
3299
|
);
|
|
3300
|
+
const hasFearColdTag = targetBoss.tags.includes("惧寒") || false;
|
|
3301
|
+
if (hasLivingOffspring || !hasFearColdTag) {
|
|
3302
|
+
return null;
|
|
3303
|
+
}
|
|
3304
|
+
targetUpdates = {
|
|
3305
|
+
name: targetBoss.name,
|
|
3306
|
+
updates: {
|
|
3307
|
+
tagsRemoved: ["惧寒"]
|
|
3308
|
+
}
|
|
3309
|
+
};
|
|
3310
|
+
messages.push(`☀️ 【太阳耀斑】生效:无存活子代,移除「惧寒」状态`);
|
|
3311
|
+
const isColdWeapon = weaponName === "零度之下";
|
|
3312
|
+
if (isColdWeapon) {
|
|
3313
|
+
isImmune = true;
|
|
3314
|
+
messages.push(`☀️ 【太阳耀斑】触发:免疫寒冷伤害`);
|
|
3315
|
+
}
|
|
3200
3316
|
return {
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
newHP,
|
|
3205
|
-
bileStacks
|
|
3317
|
+
isImmune,
|
|
3318
|
+
messages,
|
|
3319
|
+
targetUpdates
|
|
3206
3320
|
};
|
|
3207
|
-
}, "
|
|
3208
|
-
//
|
|
3209
|
-
handleBurningBurrow: /* @__PURE__ */ __name(
|
|
3210
|
-
|
|
3211
|
-
|
|
3321
|
+
}, "handleSolarFlare"),
|
|
3322
|
+
// 燃烧潜地 - 低生命回复
|
|
3323
|
+
handleBurningBurrow: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3324
|
+
const messages = [];
|
|
3325
|
+
let targetUpdates = null;
|
|
3326
|
+
if (!targetBoss.skills.includes("燃烧潜地")) {
|
|
3212
3327
|
return null;
|
|
3213
3328
|
}
|
|
3214
|
-
const
|
|
3215
|
-
const
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3329
|
+
const maxHP = getMaxHPByName(targetBoss.name);
|
|
3330
|
+
const currentHP = targetBoss.HP;
|
|
3331
|
+
const hpPercent = currentHP / maxHP;
|
|
3332
|
+
if (hpPercent >= 0.1) {
|
|
3333
|
+
return null;
|
|
3334
|
+
}
|
|
3335
|
+
const healAmount = Math.round(maxHP * 0.5);
|
|
3336
|
+
targetUpdates = {
|
|
3337
|
+
name: targetBoss.name,
|
|
3338
|
+
updates: {
|
|
3339
|
+
skillsRemoved: ["燃烧潜地"],
|
|
3340
|
+
// 移除技能
|
|
3341
|
+
hpChange: healAmount
|
|
3342
|
+
// 回复生命值
|
|
3343
|
+
}
|
|
3223
3344
|
};
|
|
3224
|
-
|
|
3225
|
-
// 修改后的炼狱爆弹处理函数(不再使用 async/await)
|
|
3226
|
-
handleHellfireBomb: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
3227
|
-
if (!targetBoss.skills.includes("炼狱爆弹")) return null;
|
|
3228
|
-
const bileStacks = targetBoss.Skillcountpoints || 0;
|
|
3229
|
-
if (bileStacks < 1) return null;
|
|
3230
|
-
const hasLivingMinions = activeBosses.some(
|
|
3231
|
-
(boss) => boss.groupId === targetBoss.groupId && boss.type === "子代" && boss.HP > 0
|
|
3232
|
-
);
|
|
3233
|
-
const baseReductionPerStack = 0.05;
|
|
3234
|
-
const bonusReductionPerStack = hasLivingMinions ? 0.05 : 0;
|
|
3235
|
-
const totalReductionPerStack = baseReductionPerStack + bonusReductionPerStack;
|
|
3236
|
-
const reduction = bileStacks * totalReductionPerStack;
|
|
3237
|
-
const messageParts = [
|
|
3238
|
-
`💣 【炼狱爆弹】生效:当前${bileStacks}层胆汁,受到的伤害-${(reduction * 100).toFixed(0)}%`
|
|
3239
|
-
];
|
|
3345
|
+
messages.push(`🔥 【燃烧潜地】生效:生命值低于10%,立即回复${healAmount}点生命值(效果移除)`);
|
|
3240
3346
|
return {
|
|
3241
|
-
|
|
3242
|
-
|
|
3347
|
+
messages,
|
|
3348
|
+
targetUpdates
|
|
3243
3349
|
};
|
|
3244
|
-
}, "
|
|
3245
|
-
//
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
messages: [`🛡️ 【猎手异形】生效:免疫${weaponName === "焚烧枪" ? "火焰" : "寒冷"}伤害`]
|
|
3252
|
-
};
|
|
3350
|
+
}, "handleBurningBurrow"),
|
|
3351
|
+
// 炼狱爆弹 - 基于层数和子代的减伤
|
|
3352
|
+
handleInfernalBomb: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
3353
|
+
const messages = [];
|
|
3354
|
+
let nerfMultiplier = 0;
|
|
3355
|
+
if (!targetBoss.skills.includes("炼狱爆弹")) {
|
|
3356
|
+
return null;
|
|
3253
3357
|
}
|
|
3254
|
-
const
|
|
3255
|
-
|
|
3358
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
3359
|
+
const hasLivingOffspring = activeBosses.some(
|
|
3360
|
+
(boss) => boss.name !== targetBoss.name && boss.isActive
|
|
3256
3361
|
);
|
|
3257
|
-
|
|
3362
|
+
let baseReduction = currentStacks * 0.05;
|
|
3363
|
+
let extraReduction = 0;
|
|
3364
|
+
if (hasLivingOffspring) {
|
|
3365
|
+
extraReduction = currentStacks * 0.05;
|
|
3366
|
+
}
|
|
3367
|
+
nerfMultiplier = baseReduction + extraReduction;
|
|
3368
|
+
if (nerfMultiplier > 0) {
|
|
3369
|
+
const reductionPercent = Math.round(nerfMultiplier * 100);
|
|
3370
|
+
const offspringMsg = hasLivingOffspring ? "(存在子代,额外加成)" : "";
|
|
3371
|
+
messages.push(`💣 【炼狱爆弹】生效:灼烧粘液${currentStacks}层,获得${reductionPercent}%减伤${offspringMsg}`);
|
|
3372
|
+
}
|
|
3373
|
+
return { nerfMultiplier, messages };
|
|
3374
|
+
}, "handleInfernalBomb"),
|
|
3375
|
+
// 猎手异形处理(条件增减伤 + 火焰/寒冷免疫)
|
|
3376
|
+
handleHunterAlien: /* @__PURE__ */ __name(function(targetBoss, activeBosses, weaponName) {
|
|
3377
|
+
const messages = [];
|
|
3378
|
+
let buffMultiplier = 0;
|
|
3379
|
+
let nerfMultiplier = 0;
|
|
3380
|
+
let isImmune = false;
|
|
3381
|
+
if (!targetBoss.skills.includes("猎手异形")) {
|
|
3382
|
+
return null;
|
|
3383
|
+
}
|
|
3384
|
+
const isFireDamage = weaponName === "焚烧枪";
|
|
3385
|
+
const isColdDamage = weaponName === "零度之下";
|
|
3386
|
+
if (isFireDamage || isColdDamage) {
|
|
3387
|
+
isImmune = true;
|
|
3388
|
+
messages.push(`🦖 【猎手异形】生效:免疫${isFireDamage ? "火焰" : "寒冷"}伤害`);
|
|
3389
|
+
}
|
|
3390
|
+
const otherLivingAliens = activeBosses.filter(
|
|
3391
|
+
(boss) => boss.name !== targetBoss.name && boss.isActive
|
|
3392
|
+
).length;
|
|
3393
|
+
if (otherLivingAliens > 0) {
|
|
3394
|
+
nerfMultiplier = 0.2;
|
|
3395
|
+
messages.push(`🦖 【猎手异形】生效:存在其他存活异形,所受伤害降低20%`);
|
|
3396
|
+
} else {
|
|
3397
|
+
buffMultiplier = 0.2;
|
|
3398
|
+
messages.push(`🦖 【猎手异形】生效:无其他存活异形,所受伤害提升20%`);
|
|
3399
|
+
}
|
|
3258
3400
|
return {
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3401
|
+
buffMultiplier,
|
|
3402
|
+
nerfMultiplier,
|
|
3403
|
+
isImmune,
|
|
3404
|
+
messages
|
|
3263
3405
|
};
|
|
3264
3406
|
}, "handleHunterAlien"),
|
|
3265
|
-
//
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
messages: [`🔥 【狂暴】生效:血量低于50%,受到的伤害-50%`]
|
|
3272
|
-
};
|
|
3407
|
+
// 狂暴处理(低生命减伤)
|
|
3408
|
+
handleRampage: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3409
|
+
const messages = [];
|
|
3410
|
+
let nerfMultiplier = 0;
|
|
3411
|
+
if (!targetBoss.skills.includes("狂暴")) {
|
|
3412
|
+
return null;
|
|
3273
3413
|
}
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3414
|
+
const maxHP = getMaxHPByName(targetBoss.name);
|
|
3415
|
+
const currentHP = targetBoss.HP;
|
|
3416
|
+
if (currentHP < maxHP * 0.5) {
|
|
3417
|
+
nerfMultiplier = 0.5;
|
|
3418
|
+
messages.push(`💥 【狂暴】生效:生命值低于50%,进入狂暴状态,所受伤害降低50%`);
|
|
3419
|
+
}
|
|
3420
|
+
return { nerfMultiplier, messages };
|
|
3421
|
+
}, "handleRampage"),
|
|
3422
|
+
// 伪装处理(记录武器并触发减伤)
|
|
3423
|
+
handleDisguise: /* @__PURE__ */ __name(function(targetBoss, weaponName) {
|
|
3279
3424
|
const messages = [];
|
|
3280
|
-
let
|
|
3281
|
-
let
|
|
3282
|
-
if (targetBoss.
|
|
3283
|
-
|
|
3284
|
-
messages.push(`🎭 【伪装】生效:已适应武器【${weaponName}】,本次受到的伤害-80%`);
|
|
3425
|
+
let nerfMultiplier = 0;
|
|
3426
|
+
let targetUpdates = null;
|
|
3427
|
+
if (!targetBoss.skills.includes("伪装")) {
|
|
3428
|
+
return null;
|
|
3285
3429
|
}
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3430
|
+
const lastWeapon = targetBoss.lastWeaponName || null;
|
|
3431
|
+
if (lastWeapon && lastWeapon === weaponName) {
|
|
3432
|
+
nerfMultiplier = 0.8;
|
|
3433
|
+
messages.push(`🎭 【伪装】生效:已适应武器「${weaponName}」,本次伤害降低80%`);
|
|
3434
|
+
} else {
|
|
3435
|
+
targetUpdates = {
|
|
3436
|
+
name: targetBoss.name,
|
|
3437
|
+
updates: {
|
|
3438
|
+
lastWeaponName: weaponName
|
|
3439
|
+
// 记录当前武器
|
|
3440
|
+
}
|
|
3441
|
+
};
|
|
3442
|
+
messages.push(`🎭 【伪装】生效:记录新武器「${weaponName}」,下次同武器攻击伤害降低80%`);
|
|
3293
3443
|
}
|
|
3294
3444
|
return {
|
|
3295
|
-
|
|
3296
|
-
messages
|
|
3445
|
+
nerfMultiplier,
|
|
3446
|
+
messages,
|
|
3447
|
+
targetUpdates
|
|
3297
3448
|
};
|
|
3298
3449
|
}, "handleDisguise"),
|
|
3299
|
-
//
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
messages: ["💥 【致命一击】生效:免疫本次伤害"]
|
|
3306
|
-
};
|
|
3450
|
+
// 致命一击处理(概率免疫伤害)
|
|
3451
|
+
handleDeadlyHit: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3452
|
+
const messages = [];
|
|
3453
|
+
let isImmune = false;
|
|
3454
|
+
if (!targetBoss.skills.includes("致命一击")) {
|
|
3455
|
+
return null;
|
|
3307
3456
|
}
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
handleCorrosionModule: /* @__PURE__ */ __name((installedMods) => {
|
|
3312
|
-
if (!installedMods) return 0;
|
|
3313
|
-
return installedMods.includes("破甲模块") ? 0.2 : 0;
|
|
3314
|
-
}, "handleCorrosionModule"),
|
|
3315
|
-
// 粒子相位枪效果处理
|
|
3316
|
-
handleParticlePhaseEffect: /* @__PURE__ */ __name((targetBoss, weaponName) => {
|
|
3317
|
-
if (!targetBoss || weaponName !== "粒子相位枪") return 0;
|
|
3318
|
-
return targetBoss.tags.includes("护盾") ? 0.5 : 0;
|
|
3319
|
-
}, "handleParticlePhaseEffect"),
|
|
3320
|
-
// 修改后的无视减伤处理函数
|
|
3321
|
-
handleIgnoreReductionEffects: /* @__PURE__ */ __name(async (ctx, handle, weaponName, targetBoss, nerfMultiplier) => {
|
|
3322
|
-
if (nerfMultiplier >= 0) return null;
|
|
3323
|
-
const ignoreEffects = [];
|
|
3324
|
-
let messages = [];
|
|
3325
|
-
if (weaponName === "光剑") {
|
|
3326
|
-
ignoreEffects.push(1);
|
|
3327
|
-
messages.push(`⚔️ 【光剑】武器效果:无视目标100%减伤效果`);
|
|
3328
|
-
} else if (weaponName === "M4AE脉冲步枪") {
|
|
3329
|
-
ignoreEffects.push(0.8);
|
|
3330
|
-
messages.push(`🔫 【M4AE脉冲步枪】武器效果:无视目标80%减伤效果`);
|
|
3331
|
-
}
|
|
3332
|
-
if (weaponName !== "光剑" && weaponName !== "M4AE脉冲步枪") {
|
|
3333
|
-
const particleEffect = PassiveHandler.handleParticlePhaseEffect(targetBoss, weaponName);
|
|
3334
|
-
if (particleEffect > 0) {
|
|
3335
|
-
ignoreEffects.push(particleEffect);
|
|
3336
|
-
messages.push(`⚡ 【粒子相位枪】武器效果:无视护盾目标${particleEffect * 100}%减伤效果`);
|
|
3337
|
-
}
|
|
3338
|
-
const weaponConfigData = weaponConfig[weaponName];
|
|
3339
|
-
if (weaponConfigData) {
|
|
3340
|
-
const [equippedWeapon] = await ctx.database.get("ggcevo_equipment", {
|
|
3341
|
-
weaponId: weaponConfigData.id,
|
|
3342
|
-
handle,
|
|
3343
|
-
equipped: true
|
|
3344
|
-
});
|
|
3345
|
-
if (equippedWeapon?.installedMods?.includes("破甲模块")) {
|
|
3346
|
-
const corrosionEffect = 0.2;
|
|
3347
|
-
ignoreEffects.push(corrosionEffect);
|
|
3348
|
-
messages.push(`⚡ 【破甲模块】生效:无视目标${corrosionEffect * 100}%减伤效果`);
|
|
3349
|
-
}
|
|
3350
|
-
}
|
|
3457
|
+
if (Math.random() < 0.05) {
|
|
3458
|
+
isImmune = true;
|
|
3459
|
+
messages.push(`💀 【致命一击】生效:5%概率免疫本次伤害`);
|
|
3351
3460
|
}
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3461
|
+
return { isImmune, messages };
|
|
3462
|
+
}, "handleDeadlyHit"),
|
|
3463
|
+
/** 星界之风处理(概率群体回复)- 修正版 */
|
|
3464
|
+
handleAstralWind: /* @__PURE__ */ __name(function(targetBoss, activeBosses, doubleChance) {
|
|
3465
|
+
const messages = [];
|
|
3466
|
+
const otherUpdates = [];
|
|
3467
|
+
const baseHealAmount = 200;
|
|
3468
|
+
if (!targetBoss.skills.includes("星界之风")) {
|
|
3469
|
+
return null;
|
|
3470
|
+
}
|
|
3471
|
+
const triggerProbability = doubleChance ? 0.1 : 0.05;
|
|
3472
|
+
if (Math.random() >= triggerProbability) {
|
|
3473
|
+
return null;
|
|
3474
|
+
}
|
|
3475
|
+
const survivingBosses = activeBosses.filter((boss) => boss.isActive);
|
|
3476
|
+
survivingBosses.forEach((boss) => {
|
|
3477
|
+
const bossName = boss.name;
|
|
3478
|
+
if (baseHealAmount > 0) {
|
|
3479
|
+
otherUpdates.push({
|
|
3480
|
+
name: bossName,
|
|
3481
|
+
updates: { hpChange: baseHealAmount }
|
|
3359
3482
|
});
|
|
3360
|
-
if (radarMask && radarMask.quantity > 0) {
|
|
3361
|
-
const radarEffect = 0.1;
|
|
3362
|
-
ignoreEffects.push(radarEffect);
|
|
3363
|
-
messages.push(`🛰️ 【雷达面罩】生效:无视目标${radarEffect * 100}%减伤效果`);
|
|
3364
|
-
}
|
|
3365
|
-
if (careerData?.career === "猩红杀手" && weaponName === "侦察步枪") {
|
|
3366
|
-
const scarletEffect = 0.2;
|
|
3367
|
-
ignoreEffects.push(scarletEffect);
|
|
3368
|
-
messages.push(`🎯 【猩红杀手】职业效果:无视目标${scarletEffect * 100}%减伤效果`);
|
|
3369
|
-
}
|
|
3370
3483
|
}
|
|
3371
|
-
|
|
3372
|
-
|
|
3484
|
+
messages.push(`🌬️ 【星界之风】为「${bossName}」回复${baseHealAmount}点生命值`);
|
|
3485
|
+
});
|
|
3486
|
+
if (doubleChance) {
|
|
3487
|
+
messages.unshift(`🌬️ 【星界之风】生效:心灵狂热状态(触发概率10%)为所有存活异形回复生命值`);
|
|
3488
|
+
} else {
|
|
3489
|
+
messages.unshift(`🌬️ 【星界之风】生效:5%概率触发,为所有存活异形回复生命值`);
|
|
3373
3490
|
}
|
|
3374
|
-
|
|
3491
|
+
return {
|
|
3492
|
+
messages,
|
|
3493
|
+
otherUpdates
|
|
3494
|
+
};
|
|
3495
|
+
}, "handleAstralWind"),
|
|
3496
|
+
/** 心灵狂热处理(低生命减伤和概率强化)- 修正版 */
|
|
3497
|
+
handleMindFrenzy: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3498
|
+
const messages = [];
|
|
3499
|
+
let nerfMultiplier = 0;
|
|
3500
|
+
let doubleAstralWind = false;
|
|
3501
|
+
if (!targetBoss.skills.includes("心灵狂热")) {
|
|
3375
3502
|
return null;
|
|
3376
3503
|
}
|
|
3377
|
-
const
|
|
3504
|
+
const maxHP = getMaxHPByName(targetBoss.name);
|
|
3505
|
+
const hpPercent = targetBoss.HP / maxHP;
|
|
3506
|
+
if (hpPercent < 0.5) {
|
|
3507
|
+
nerfMultiplier = 0.2;
|
|
3508
|
+
doubleAstralWind = true;
|
|
3509
|
+
messages.push(`🧠 【心灵狂热】生效:生命值低于50%,进入心灵狂热状态,所受伤害降低20%,星界之风触发概率翻倍`);
|
|
3510
|
+
}
|
|
3511
|
+
return { nerfMultiplier, doubleAstralWind, messages };
|
|
3512
|
+
}, "handleMindFrenzy"),
|
|
3513
|
+
/** 宇宙能量处理(伤害值转能量/生命) */
|
|
3514
|
+
handleCosmicEnergy: /* @__PURE__ */ __name(function(targetBoss, activeBosses, damage) {
|
|
3515
|
+
const messages = [];
|
|
3516
|
+
let targetUpdates = null;
|
|
3517
|
+
if (!targetBoss.skills.includes("宇宙能量")) {
|
|
3518
|
+
return null;
|
|
3519
|
+
}
|
|
3520
|
+
const maxEnergy = getMaxEnergyByName(targetBoss.name);
|
|
3521
|
+
const currentEnergy = targetBoss.energy || 0;
|
|
3522
|
+
const energyToAdd = damage;
|
|
3523
|
+
const updates = {};
|
|
3524
|
+
if (currentEnergy + energyToAdd <= maxEnergy) {
|
|
3525
|
+
updates.energyChange = energyToAdd;
|
|
3526
|
+
messages.push(`🌌 【宇宙能量】生效:吸收伤害值,获得${energyToAdd}点能量`);
|
|
3527
|
+
} else {
|
|
3528
|
+
const energyGained = maxEnergy - currentEnergy;
|
|
3529
|
+
updates.energyChange = energyGained;
|
|
3530
|
+
const overflowHeal = currentEnergy + energyToAdd - maxEnergy;
|
|
3531
|
+
updates.hpChange = overflowHeal;
|
|
3532
|
+
messages.push(`🌌 【宇宙能量】生效:获得${energyGained}点能量,${overflowHeal}点溢出伤害转为生命回复`);
|
|
3533
|
+
}
|
|
3534
|
+
targetUpdates = {
|
|
3535
|
+
name: targetBoss.name,
|
|
3536
|
+
updates
|
|
3537
|
+
};
|
|
3378
3538
|
return {
|
|
3379
|
-
|
|
3380
|
-
|
|
3539
|
+
messages,
|
|
3540
|
+
targetUpdates
|
|
3381
3541
|
};
|
|
3382
|
-
}, "
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3542
|
+
}, "handleCosmicEnergy"),
|
|
3543
|
+
/** 复苏处理(免疫死亡并回复) */
|
|
3544
|
+
handleRevival: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3545
|
+
const messages = [];
|
|
3546
|
+
if (!targetBoss.skills.includes("复苏")) {
|
|
3386
3547
|
return null;
|
|
3387
3548
|
}
|
|
3388
|
-
|
|
3389
|
-
let pulseApplied = false;
|
|
3390
|
-
if (currentSkillCount <= 0) {
|
|
3549
|
+
if (targetBoss.HP !== 0) {
|
|
3391
3550
|
return null;
|
|
3392
3551
|
}
|
|
3393
|
-
const
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3552
|
+
const maxHP = getMaxHPByName(targetBoss.name);
|
|
3553
|
+
const maxEnergy = getMaxEnergyByName(targetBoss.name);
|
|
3554
|
+
const healAmount = Math.round(maxHP * 0.5);
|
|
3555
|
+
const energyGain = maxEnergy;
|
|
3556
|
+
const targetUpdates = {
|
|
3557
|
+
name: targetBoss.name,
|
|
3558
|
+
updates: {
|
|
3559
|
+
hpChange: healAmount,
|
|
3560
|
+
// 回复50%最大生命值
|
|
3561
|
+
energyChange: energyGain,
|
|
3562
|
+
// 回复100%能量
|
|
3563
|
+
skillsRemoved: ["复苏"],
|
|
3564
|
+
// 移除复苏技能
|
|
3565
|
+
skillsAdded: ["灵能构造炉"]
|
|
3566
|
+
// 添加新技能
|
|
3567
|
+
}
|
|
3568
|
+
};
|
|
3569
|
+
messages.push(`🔥 【复苏】生效:免疫致命伤害`);
|
|
3570
|
+
messages.push(`🔥 回复${healAmount}点生命值和${energyGain}点能量`);
|
|
3571
|
+
messages.push(`🔥 获得【灵能构造炉】技能,复苏效果移除`);
|
|
3400
3572
|
return {
|
|
3401
|
-
messages
|
|
3402
|
-
|
|
3403
|
-
],
|
|
3404
|
-
pulseApplied
|
|
3573
|
+
messages,
|
|
3574
|
+
targetUpdates
|
|
3405
3575
|
};
|
|
3406
|
-
}, "
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
let
|
|
3411
|
-
const
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
baseChance *= 2;
|
|
3415
|
-
}
|
|
3416
|
-
let lightbladeStacks = 0;
|
|
3417
|
-
if (targetBoss.skills.includes("闪电冲锋")) {
|
|
3418
|
-
lightbladeStacks = targetBoss?.Skillcountpoints || 0;
|
|
3419
|
-
}
|
|
3420
|
-
const triggerChance = baseChance + lightbladeStacks;
|
|
3421
|
-
if (Math.random() * 100 < triggerChance) {
|
|
3422
|
-
const groupMembers = activeBosses.filter(
|
|
3423
|
-
(b) => b.groupId === targetBoss.groupId && b.HP > 0
|
|
3424
|
-
);
|
|
3425
|
-
const updates = [];
|
|
3426
|
-
const messages = [`🌠 【星界之风】生效:治疗所有存活异形`];
|
|
3427
|
-
let updatedHP = currentHP;
|
|
3428
|
-
for (const member of groupMembers) {
|
|
3429
|
-
const memberConfig = PassiveHandler.getMemberConfig(member.name, bossGroup);
|
|
3430
|
-
if (!memberConfig) continue;
|
|
3431
|
-
const maxMemberHP = memberConfig.maxHP;
|
|
3432
|
-
const healAmount = 200;
|
|
3433
|
-
const actualHeal = Math.min(healAmount, maxMemberHP - member.HP);
|
|
3434
|
-
if (actualHeal <= 0) continue;
|
|
3435
|
-
const newHP = member.HP + actualHeal;
|
|
3436
|
-
updates.push(
|
|
3437
|
-
ctx.database.set(
|
|
3438
|
-
"ggcevo_boss",
|
|
3439
|
-
{ name: member.name },
|
|
3440
|
-
{ HP: newHP }
|
|
3441
|
-
)
|
|
3442
|
-
);
|
|
3443
|
-
messages.push(`${member.name} +${actualHeal}HP`);
|
|
3444
|
-
if (member.name === targetBoss.name) {
|
|
3445
|
-
updatedHP = newHP;
|
|
3446
|
-
}
|
|
3447
|
-
}
|
|
3448
|
-
if (updates.length === 0) {
|
|
3449
|
-
return null;
|
|
3450
|
-
}
|
|
3451
|
-
await Promise.all(updates);
|
|
3452
|
-
return { messages, updatedHP };
|
|
3576
|
+
}, "handleRevival"),
|
|
3577
|
+
/** 光影之刃处理(层数叠加) */
|
|
3578
|
+
handleBladeOfLight: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3579
|
+
const messages = [];
|
|
3580
|
+
let targetUpdates = null;
|
|
3581
|
+
const maxStacks = 50;
|
|
3582
|
+
if (!targetBoss.skills.includes("光影之刃")) {
|
|
3583
|
+
return null;
|
|
3453
3584
|
}
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
handlePsychicFrenzy: /* @__PURE__ */ __name(function(targetBoss, currentHP, maxHP) {
|
|
3458
|
-
if (!targetBoss.skills.includes("心灵狂热")) return null;
|
|
3459
|
-
if (currentHP / maxHP < 0.5) {
|
|
3585
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
3586
|
+
if (currentStacks >= maxStacks) {
|
|
3587
|
+
messages.push(`✨ 【光影之刃】已达到最大层数(${maxStacks})`);
|
|
3460
3588
|
return {
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
messages: [
|
|
3464
|
-
`🌀 【心灵狂热】生效:进入心灵狂热状态,受到的伤害-20%`
|
|
3465
|
-
]
|
|
3589
|
+
messages,
|
|
3590
|
+
targetUpdates: null
|
|
3466
3591
|
};
|
|
3467
3592
|
}
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
if (!targetBoss.skills.includes("宇宙能量")) return null;
|
|
3473
|
-
const maxEnergy = 1e3;
|
|
3474
|
-
const currentEnergy = targetBoss.energy || 0;
|
|
3475
|
-
const availableSpace = maxEnergy - currentEnergy;
|
|
3476
|
-
const energyToAdd = Math.min(initialDamage, availableSpace);
|
|
3477
|
-
const newEnergy = currentEnergy + energyToAdd;
|
|
3478
|
-
let healAmount = 0;
|
|
3479
|
-
let messages = [];
|
|
3480
|
-
if (energyToAdd > 0) {
|
|
3481
|
-
messages.push(`获得${energyToAdd}点能量`);
|
|
3482
|
-
}
|
|
3483
|
-
if (newEnergy >= maxEnergy) {
|
|
3484
|
-
const overflow = initialDamage - energyToAdd;
|
|
3485
|
-
if (overflow > 0) {
|
|
3486
|
-
const maxHP = PassiveHandler.getMemberConfig(targetBoss.name, bossGroup)?.maxHP || 0;
|
|
3487
|
-
if (maxHP > 0) {
|
|
3488
|
-
healAmount = Math.min(overflow, maxHP - targetBoss.HP);
|
|
3489
|
-
messages.push(`能量溢出回复${healAmount}点生命值`);
|
|
3490
|
-
}
|
|
3593
|
+
targetUpdates = {
|
|
3594
|
+
name: targetBoss.name,
|
|
3595
|
+
updates: {
|
|
3596
|
+
skillStacksChanged: 1
|
|
3491
3597
|
}
|
|
3598
|
+
};
|
|
3599
|
+
const newStacks = currentStacks + 1;
|
|
3600
|
+
messages.push(`✨ 【光影之刃】叠加:当前${newStacks}/${maxStacks}层`);
|
|
3601
|
+
return {
|
|
3602
|
+
messages,
|
|
3603
|
+
targetUpdates
|
|
3604
|
+
};
|
|
3605
|
+
}, "handleBladeOfLight"),
|
|
3606
|
+
/** 远古预兆处理(概率免疫能量伤害)- 增加boost参数 */
|
|
3607
|
+
handleAncientOmen: /* @__PURE__ */ __name(function(targetBoss, weaponData, boost = 0) {
|
|
3608
|
+
const messages = [];
|
|
3609
|
+
let isImmune = false;
|
|
3610
|
+
let targetUpdates = null;
|
|
3611
|
+
if (!targetBoss.skills.includes("远古预兆")) {
|
|
3612
|
+
return null;
|
|
3492
3613
|
}
|
|
3493
|
-
if (
|
|
3614
|
+
if (weaponData.type !== "能量武器") {
|
|
3494
3615
|
return null;
|
|
3495
3616
|
}
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3617
|
+
const baseProbability = 0.01;
|
|
3618
|
+
const actualProbability = Math.min(baseProbability + boost, 1);
|
|
3619
|
+
if (Math.random() >= actualProbability) {
|
|
3620
|
+
return null;
|
|
3621
|
+
}
|
|
3622
|
+
isImmune = true;
|
|
3623
|
+
const energyGained = 100;
|
|
3624
|
+
targetUpdates = {
|
|
3625
|
+
name: targetBoss.name,
|
|
3626
|
+
updates: {
|
|
3627
|
+
energyChange: energyGained
|
|
3628
|
+
// 回复100点能量
|
|
3629
|
+
}
|
|
3504
3630
|
};
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
handleLightblade: /* @__PURE__ */ __name(async (ctx, targetBoss) => {
|
|
3508
|
-
if (!targetBoss.skills.includes("光影之刃")) return null;
|
|
3509
|
-
const currentStacks = targetBoss.Skillcountpoints || 0;
|
|
3510
|
-
const newStacks = currentStacks + 1;
|
|
3511
|
-
await ctx.database.set(
|
|
3512
|
-
"ggcevo_boss",
|
|
3513
|
-
{ name: targetBoss.name },
|
|
3514
|
-
{ Skillcountpoints: newStacks }
|
|
3515
|
-
);
|
|
3631
|
+
messages.push(`🔮 【远古预兆】生效:${(actualProbability * 100).toFixed(2)}%概率免疫能量武器伤害`);
|
|
3632
|
+
messages.push(`🔮 回复${energyGained}点能量`);
|
|
3516
3633
|
return {
|
|
3517
|
-
|
|
3634
|
+
isImmune,
|
|
3635
|
+
messages,
|
|
3636
|
+
targetUpdates
|
|
3518
3637
|
};
|
|
3519
|
-
}, "handleLightblade"),
|
|
3520
|
-
// === 远古预兆 ===
|
|
3521
|
-
handleAncientOmen: /* @__PURE__ */ __name(async (ctx, targetBoss) => {
|
|
3522
|
-
if (!targetBoss.skills.includes("远古预兆")) return null;
|
|
3523
|
-
let lightbladeStacks = 0;
|
|
3524
|
-
if (targetBoss.skills.includes("闪电冲锋")) {
|
|
3525
|
-
lightbladeStacks = targetBoss?.Skillcountpoints || 0;
|
|
3526
|
-
}
|
|
3527
|
-
const totalChance = 1 + lightbladeStacks;
|
|
3528
|
-
if (Math.random() * 100 < totalChance) {
|
|
3529
|
-
const maxEnergy = 1e3;
|
|
3530
|
-
const currentEnergy = targetBoss.energy || 0;
|
|
3531
|
-
const newEnergy = Math.min(currentEnergy + 100, maxEnergy);
|
|
3532
|
-
await ctx.database.set(
|
|
3533
|
-
"ggcevo_boss",
|
|
3534
|
-
{ name: targetBoss.name },
|
|
3535
|
-
{ energy: newEnergy }
|
|
3536
|
-
);
|
|
3537
|
-
return {
|
|
3538
|
-
immune: true,
|
|
3539
|
-
messages: [
|
|
3540
|
-
`🔮 【远古预兆】生效:免疫此次伤害,并且回复100点能量`
|
|
3541
|
-
]
|
|
3542
|
-
};
|
|
3543
|
-
}
|
|
3544
|
-
return null;
|
|
3545
3638
|
}, "handleAncientOmen"),
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3639
|
+
/** 闪电冲锋处理(提升其他技能概率) - 修正版 */
|
|
3640
|
+
handleLightningCharge: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3641
|
+
const messages = [];
|
|
3642
|
+
let ancientOmenBoost = 0;
|
|
3643
|
+
let psychicForgeBoost = 0;
|
|
3644
|
+
if (!targetBoss.skills.includes("闪电冲锋")) {
|
|
3645
|
+
return null;
|
|
3646
|
+
}
|
|
3647
|
+
const lightBladeStacks = targetBoss.skillStacks || 0;
|
|
3648
|
+
const boostPerStack = 5e-3;
|
|
3649
|
+
const totalBoost = lightBladeStacks * boostPerStack;
|
|
3650
|
+
ancientOmenBoost = totalBoost;
|
|
3651
|
+
psychicForgeBoost = totalBoost;
|
|
3652
|
+
if (totalBoost > 0) {
|
|
3653
|
+
messages.push(`⚡ 【闪电冲锋】生效:每层光影之刃提升0.5%概率`);
|
|
3654
|
+
messages.push(` → 当前${lightBladeStacks}层,远古预兆+${(ancientOmenBoost * 100).toFixed(1)}%,灵能构造炉+${(psychicForgeBoost * 100).toFixed(1)}%`);
|
|
3655
|
+
}
|
|
3656
|
+
return { ancientOmenBoost, psychicForgeBoost, messages };
|
|
3657
|
+
}, "handleLightningCharge"),
|
|
3658
|
+
/** 超视距穿梭处理(层数相关伤害调整) */
|
|
3659
|
+
handleHyperRangeShift: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3660
|
+
const messages = [];
|
|
3661
|
+
let nerfMultiplier = 0;
|
|
3662
|
+
let buffMultiplier = 0;
|
|
3663
|
+
if (!targetBoss.skills.includes("超视距穿梭")) {
|
|
3664
|
+
return null;
|
|
3665
|
+
}
|
|
3550
3666
|
const currentEnergy = targetBoss.energy || 0;
|
|
3551
|
-
const
|
|
3552
|
-
|
|
3553
|
-
|
|
3667
|
+
const maxEnergy = getMaxEnergyByName(targetBoss.name);
|
|
3668
|
+
const energyPercent = currentEnergy / maxEnergy;
|
|
3669
|
+
if (energyPercent >= 0.6) {
|
|
3670
|
+
nerfMultiplier = targetBoss.skillStacks * 0.1;
|
|
3671
|
+
messages.push(`🚀 【超视距穿梭】生效:高能量状态(≥60%),受到的伤害-${(nerfMultiplier * 100).toFixed(0)}%`);
|
|
3672
|
+
} else if (energyPercent >= 0.3) {
|
|
3673
|
+
nerfMultiplier = targetBoss.skillStacks * 0.05;
|
|
3674
|
+
messages.push(`🚀 【超视距穿梭】生效:中能量状态(≥30%),受到的伤害-${(nerfMultiplier * 100).toFixed(0)}%`);
|
|
3675
|
+
} else if (energyPercent <= 0.1) {
|
|
3676
|
+
buffMultiplier = targetBoss.skillStacks * 0.05;
|
|
3677
|
+
messages.push(`🚀 【超视距穿梭】生效:低能量状态(≤10%),受到的伤害+${(buffMultiplier * 100).toFixed(0)}%`);
|
|
3678
|
+
}
|
|
3679
|
+
return { nerfMultiplier, buffMultiplier, messages };
|
|
3680
|
+
}, "handleHyperRangeShift"),
|
|
3681
|
+
/** 灵能构造炉处理(随机获得技能)- 增加boost参数 */
|
|
3682
|
+
handlePsychicForge: /* @__PURE__ */ __name(function(targetBoss, boost = 0) {
|
|
3554
3683
|
const messages = [];
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
if (reduction > 0 || increase > 0) {
|
|
3566
|
-
return {
|
|
3567
|
-
reduction,
|
|
3568
|
-
increase,
|
|
3569
|
-
messages: [
|
|
3570
|
-
`🚀 【超视距穿梭】生效:${messages.join(" | ")} (当前${lightbladeStacks}层光影之刃)`
|
|
3571
|
-
]
|
|
3572
|
-
};
|
|
3684
|
+
let newSkill = null;
|
|
3685
|
+
let targetUpdates = null;
|
|
3686
|
+
const possibleSkills = [
|
|
3687
|
+
"天启超载护盾",
|
|
3688
|
+
"塌缩脉冲",
|
|
3689
|
+
"地毯式轰炸",
|
|
3690
|
+
"轰炸引导"
|
|
3691
|
+
];
|
|
3692
|
+
if (!targetBoss.skills.includes("灵能构造炉")) {
|
|
3693
|
+
return null;
|
|
3573
3694
|
}
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
const
|
|
3580
|
-
|
|
3581
|
-
let newSkills = targetBoss.skills;
|
|
3582
|
-
if (!newSkills.includes("灵能构造炉")) {
|
|
3583
|
-
newSkills = [...newSkills, "灵能构造炉"];
|
|
3584
|
-
}
|
|
3585
|
-
newSkills = newSkills.filter((skill) => skill !== "复苏");
|
|
3586
|
-
await ctx.database.set(
|
|
3587
|
-
"ggcevo_boss",
|
|
3588
|
-
{ name: targetBoss.name },
|
|
3589
|
-
{
|
|
3590
|
-
HP: updatedHP,
|
|
3591
|
-
energy: maxEnergy,
|
|
3592
|
-
skills: newSkills
|
|
3593
|
-
}
|
|
3695
|
+
const baseProbability = 0.05;
|
|
3696
|
+
const actualProbability = Math.min(baseProbability + boost, 1);
|
|
3697
|
+
if (Math.random() >= actualProbability) {
|
|
3698
|
+
return null;
|
|
3699
|
+
}
|
|
3700
|
+
const availableSkills = possibleSkills.filter(
|
|
3701
|
+
(skill) => !targetBoss.skills.includes(skill)
|
|
3594
3702
|
);
|
|
3703
|
+
if (availableSkills.length === 0) {
|
|
3704
|
+
return null;
|
|
3705
|
+
}
|
|
3706
|
+
newSkill = availableSkills[Math.floor(Math.random() * availableSkills.length)];
|
|
3707
|
+
targetUpdates = {
|
|
3708
|
+
name: targetBoss.name,
|
|
3709
|
+
updates: {
|
|
3710
|
+
skillsAdded: [newSkill]
|
|
3711
|
+
}
|
|
3712
|
+
};
|
|
3713
|
+
messages.push(`⚙️ 【灵能构造炉】生效:${(actualProbability * 100).toFixed(2)}%概率获得新技能「${newSkill}」`);
|
|
3595
3714
|
return {
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
]
|
|
3715
|
+
messages,
|
|
3716
|
+
newSkill,
|
|
3717
|
+
targetUpdates
|
|
3600
3718
|
};
|
|
3601
|
-
}, "
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
const
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
const newSkills = targetBoss.skills.filter((skill) => skill !== "灵能构造炉");
|
|
3609
|
-
await ctx.database.set(
|
|
3610
|
-
"ggcevo_boss",
|
|
3611
|
-
{ name: targetBoss.name },
|
|
3612
|
-
{ skills: newSkills }
|
|
3613
|
-
);
|
|
3614
|
-
return {
|
|
3615
|
-
messages: [
|
|
3616
|
-
`⚙️ 【灵能构造炉】生效:所有技能已获取完毕,此技能已移除`
|
|
3617
|
-
]
|
|
3618
|
-
};
|
|
3619
|
-
}
|
|
3620
|
-
let lightbladeStacks = 0;
|
|
3621
|
-
if (targetBoss.skills.includes("闪电冲锋")) {
|
|
3622
|
-
lightbladeStacks = targetBoss.Skillcountpoints || 0;
|
|
3719
|
+
}, "handlePsychicForge"),
|
|
3720
|
+
/** 天启超载护盾处理(层数相关群体回复) */
|
|
3721
|
+
handleOverdriveShield: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
3722
|
+
const messages = [];
|
|
3723
|
+
const otherUpdates = [];
|
|
3724
|
+
if (!targetBoss.skills.includes("天启超载护盾")) {
|
|
3725
|
+
return null;
|
|
3623
3726
|
}
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
const availableSkills = allSkills.filter(
|
|
3627
|
-
(skill) => !targetBoss.skills.includes(skill)
|
|
3628
|
-
);
|
|
3629
|
-
if (availableSkills.length === 0) return null;
|
|
3630
|
-
const randomSkill = availableSkills[Math.floor(Math.random() * availableSkills.length)];
|
|
3631
|
-
const newSkills = [...targetBoss.skills, randomSkill];
|
|
3632
|
-
await ctx.database.set(
|
|
3633
|
-
"ggcevo_boss",
|
|
3634
|
-
{ name: targetBoss.name },
|
|
3635
|
-
{ skills: newSkills }
|
|
3636
|
-
);
|
|
3637
|
-
return {
|
|
3638
|
-
messages: [
|
|
3639
|
-
`⚙️ 【灵能构造炉】生效:获得新技能【${randomSkill}】`
|
|
3640
|
-
]
|
|
3641
|
-
};
|
|
3727
|
+
if (Math.random() >= 0.05) {
|
|
3728
|
+
return null;
|
|
3642
3729
|
}
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
ctx.database.set(
|
|
3669
|
-
"ggcevo_boss",
|
|
3670
|
-
{ name: member.name },
|
|
3671
|
-
{ HP: newHP }
|
|
3672
|
-
)
|
|
3673
|
-
);
|
|
3674
|
-
messages.push(`${member.name} +${actualHeal}HP`);
|
|
3675
|
-
if (member.name === targetBoss.name) {
|
|
3676
|
-
updatedHP = newHP;
|
|
3677
|
-
}
|
|
3678
|
-
}
|
|
3679
|
-
if (updates.length === 0) {
|
|
3680
|
-
return null;
|
|
3681
|
-
}
|
|
3682
|
-
await Promise.all(updates);
|
|
3683
|
-
return {
|
|
3684
|
-
messages,
|
|
3685
|
-
updatedHP
|
|
3686
|
-
// 返回当前目标的新HP(如果被治疗)
|
|
3687
|
-
};
|
|
3730
|
+
const baseHealAmount = (targetBoss.skillStacks || 0) * 10;
|
|
3731
|
+
const survivingBosses = activeBosses.filter((boss) => boss.isActive);
|
|
3732
|
+
survivingBosses.forEach((boss) => {
|
|
3733
|
+
const bossName = boss.name;
|
|
3734
|
+
if (baseHealAmount > 0) {
|
|
3735
|
+
otherUpdates.push({
|
|
3736
|
+
name: bossName,
|
|
3737
|
+
updates: { hpChange: baseHealAmount }
|
|
3738
|
+
});
|
|
3739
|
+
}
|
|
3740
|
+
messages.push(`🛡️ 【天启超载护盾】为「${bossName}」回复${baseHealAmount}点生命值`);
|
|
3741
|
+
});
|
|
3742
|
+
messages.unshift(`🛡️ 【天启超载护盾】生效:5%概率触发,为所有存活异形回复生命值`);
|
|
3743
|
+
return {
|
|
3744
|
+
messages,
|
|
3745
|
+
otherUpdates
|
|
3746
|
+
};
|
|
3747
|
+
}, "handleOverdriveShield"),
|
|
3748
|
+
/** 塌缩脉冲处理(额外叠加层数) */
|
|
3749
|
+
handleCollapsingPulse: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3750
|
+
const messages = [];
|
|
3751
|
+
let targetUpdates = null;
|
|
3752
|
+
const maxStacks = 50;
|
|
3753
|
+
if (!targetBoss.skills.includes("塌缩脉冲")) {
|
|
3754
|
+
return null;
|
|
3688
3755
|
}
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
handleCollapsePulse: /* @__PURE__ */ __name(async function(ctx, targetBoss) {
|
|
3693
|
-
if (!targetBoss.skills.includes("塌缩脉冲")) return null;
|
|
3694
|
-
const triggerChance = 100;
|
|
3695
|
-
if (Math.random() * 100 < triggerChance) {
|
|
3696
|
-
const currentStacks = targetBoss.Skillcountpoints || 0;
|
|
3697
|
-
const newStacks = currentStacks + 1;
|
|
3698
|
-
await ctx.database.set(
|
|
3699
|
-
"ggcevo_boss",
|
|
3700
|
-
{ name: targetBoss.name },
|
|
3701
|
-
{ Skillcountpoints: newStacks }
|
|
3702
|
-
);
|
|
3756
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
3757
|
+
if (currentStacks >= maxStacks) {
|
|
3758
|
+
messages.push(`🌀 【塌缩脉冲】生效:层数已达上限(${maxStacks})`);
|
|
3703
3759
|
return {
|
|
3704
|
-
messages
|
|
3760
|
+
messages,
|
|
3761
|
+
targetUpdates: null
|
|
3705
3762
|
};
|
|
3706
3763
|
}
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
if (!targetBoss.skills.includes("地毯式轰炸")) return null;
|
|
3712
|
-
const triggerChance = 100;
|
|
3713
|
-
const messages = [];
|
|
3714
|
-
let damageMultiplier = 0;
|
|
3715
|
-
if (Math.random() * 100 < triggerChance) {
|
|
3716
|
-
const hasLoneWolf = targetBoss.skills.includes("孤立无援");
|
|
3717
|
-
if (hasLoneWolf) {
|
|
3718
|
-
const newSkills = targetBoss.skills.filter((skill) => skill !== "孤立无援");
|
|
3719
|
-
await ctx.database.set(
|
|
3720
|
-
"ggcevo_boss",
|
|
3721
|
-
{ name: targetBoss.name },
|
|
3722
|
-
{ skills: newSkills }
|
|
3723
|
-
);
|
|
3724
|
-
messages.push(`🔥 【地毯式轰炸】生效:移除“孤立无援”`);
|
|
3725
|
-
} else {
|
|
3764
|
+
targetUpdates = {
|
|
3765
|
+
name: targetBoss.name,
|
|
3766
|
+
updates: {
|
|
3767
|
+
skillStacksChanged: 1
|
|
3726
3768
|
}
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
}
|
|
3769
|
+
};
|
|
3770
|
+
const newStacks = currentStacks + 1;
|
|
3771
|
+
messages.push(`🌀 【塌缩脉冲】生效:额外叠加1层光影之刃,当前${newStacks}/${maxStacks}层`);
|
|
3730
3772
|
return {
|
|
3731
3773
|
messages,
|
|
3732
|
-
|
|
3774
|
+
targetUpdates
|
|
3733
3775
|
};
|
|
3776
|
+
}, "handleCollapsingPulse"),
|
|
3777
|
+
/** 地毯式轰炸处理 */
|
|
3778
|
+
handleCarpetBombing: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3779
|
+
const messages = [];
|
|
3780
|
+
let nerfMultiplier = 0;
|
|
3781
|
+
if (!targetBoss.skills.includes("地毯式轰炸")) {
|
|
3782
|
+
return null;
|
|
3783
|
+
}
|
|
3784
|
+
nerfMultiplier = 1;
|
|
3785
|
+
messages.push(`💣 【地毯式轰炸】生效:获得100%减伤`);
|
|
3786
|
+
return { nerfMultiplier, messages };
|
|
3734
3787
|
}, "handleCarpetBombing"),
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
if (
|
|
3740
|
-
|
|
3741
|
-
if (Math.random() * 100 < triggerChance) {
|
|
3742
|
-
const energyGain = lightbladeStacks * 50;
|
|
3743
|
-
const maxEnergy = 1e3;
|
|
3744
|
-
const currentEnergy = targetBoss.energy || 0;
|
|
3745
|
-
const newEnergy = Math.min(currentEnergy + energyGain, maxEnergy);
|
|
3746
|
-
await ctx.database.set(
|
|
3747
|
-
"ggcevo_boss",
|
|
3748
|
-
{ name: targetBoss.name },
|
|
3749
|
-
{ energy: newEnergy }
|
|
3750
|
-
);
|
|
3751
|
-
return {
|
|
3752
|
-
messages: [
|
|
3753
|
-
`🎯 【轰炸引导】生效:回复${energyGain}点能量`
|
|
3754
|
-
]
|
|
3755
|
-
};
|
|
3788
|
+
/** 轰炸引导处理(层数相关能量回复) */
|
|
3789
|
+
handleBombardmentGuide: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3790
|
+
const messages = [];
|
|
3791
|
+
let targetUpdates = null;
|
|
3792
|
+
if (!targetBoss.skills.includes("轰炸引导")) {
|
|
3793
|
+
return null;
|
|
3756
3794
|
}
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
// 修改后的伤害处理函数
|
|
3760
|
-
handlePassives: /* @__PURE__ */ __name(async function(ctx, handle, targetBoss, initialDamage, currentHP, maxHP, weaponName, weaponData, bossGroup) {
|
|
3761
|
-
let messages = [];
|
|
3762
|
-
let skillUpdates = [];
|
|
3763
|
-
let buffMultiplier = 0;
|
|
3764
|
-
let nerfMultiplier = 0;
|
|
3765
|
-
let radiationApplied = false;
|
|
3766
|
-
let freezing = false;
|
|
3767
|
-
let pulseApplied = false;
|
|
3768
|
-
let arcApplied = false;
|
|
3769
|
-
let bileStacks = 0;
|
|
3770
|
-
const activeBosses = await ctx.database.get("ggcevo_boss", { isActive: true });
|
|
3771
|
-
const solarFlareResult = await this.handleSolarFlare(ctx, targetBoss, weaponName);
|
|
3772
|
-
if (solarFlareResult.immune) {
|
|
3773
|
-
return {
|
|
3774
|
-
currentHP: targetBoss.HP,
|
|
3775
|
-
messages: solarFlareResult.messages,
|
|
3776
|
-
skillUpdates: [],
|
|
3777
|
-
initialDamage: 0
|
|
3778
|
-
};
|
|
3795
|
+
if (Math.random() >= 0.05) {
|
|
3796
|
+
return null;
|
|
3779
3797
|
}
|
|
3780
|
-
const
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3798
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
3799
|
+
const energyGained = currentStacks * 50;
|
|
3800
|
+
targetUpdates = {
|
|
3801
|
+
name: targetBoss.name,
|
|
3802
|
+
updates: {
|
|
3803
|
+
energyChange: energyGained
|
|
3804
|
+
}
|
|
3805
|
+
};
|
|
3806
|
+
messages.push(`🎯 【轰炸引导】生效:5%概率触发,获得${energyGained}点能量(基于${currentStacks}层光影之刃)`);
|
|
3807
|
+
return {
|
|
3808
|
+
messages,
|
|
3809
|
+
targetUpdates
|
|
3810
|
+
};
|
|
3811
|
+
}, "handleBombardmentGuide"),
|
|
3812
|
+
// 统一的辐射效果处理函数
|
|
3813
|
+
handleRadiationEffect: /* @__PURE__ */ __name(function(targetBoss, weaponName) {
|
|
3814
|
+
const messages = [];
|
|
3815
|
+
let layerAdded = false;
|
|
3816
|
+
const currentLayers = targetBoss.radiationLayers || 0;
|
|
3817
|
+
const effectiveLayers = Math.min(currentLayers, 20);
|
|
3818
|
+
const buffMultiplier = effectiveLayers * 0.025;
|
|
3819
|
+
if (effectiveLayers > 0) {
|
|
3820
|
+
messages.push(`☢️ 【辐射增伤】:当前${currentLayers}层,伤害提升${(effectiveLayers * 2.5).toFixed(1)}%`);
|
|
3821
|
+
if (currentLayers > 20) {
|
|
3822
|
+
messages.push(`☢️ 注意:超过20层的辐射无效,不会提供额外增伤`);
|
|
3823
|
+
}
|
|
3824
|
+
}
|
|
3825
|
+
let targetUpdates = null;
|
|
3826
|
+
if (weaponName === "伽马枪" && // 使用伽马枪
|
|
3827
|
+
!targetBoss.tags.includes("机械") && // 非机械目标
|
|
3828
|
+
targetBoss.tags.includes("生物")) {
|
|
3829
|
+
targetUpdates = {
|
|
3830
|
+
name: targetBoss.name,
|
|
3831
|
+
updates: {
|
|
3832
|
+
radiationLayersChange: 1
|
|
3833
|
+
// 辐射层数增加1
|
|
3834
|
+
}
|
|
3787
3835
|
};
|
|
3836
|
+
const newLayers = currentLayers + 1;
|
|
3837
|
+
messages.push(`☢️ 满足辐射条件,获得1层"辐射"效果,累计${newLayers}层`);
|
|
3838
|
+
layerAdded = true;
|
|
3788
3839
|
}
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3840
|
+
return {
|
|
3841
|
+
messages,
|
|
3842
|
+
targetUpdates,
|
|
3843
|
+
buffMultiplier,
|
|
3844
|
+
layerAdded
|
|
3845
|
+
// 返回层数增加标记
|
|
3846
|
+
};
|
|
3847
|
+
}, "handleRadiationEffect"),
|
|
3848
|
+
// 统一的寒冷效果处理函数
|
|
3849
|
+
handleColdEffect: /* @__PURE__ */ __name(function(targetBoss, weaponName) {
|
|
3850
|
+
const messages = [];
|
|
3851
|
+
let layerAdded = false;
|
|
3852
|
+
const currentLayers = targetBoss.coldLayers || 0;
|
|
3853
|
+
const effectiveLayers = Math.min(currentLayers, 20);
|
|
3854
|
+
const buffMultiplier = effectiveLayers * 0.025;
|
|
3855
|
+
if (effectiveLayers > 0) {
|
|
3856
|
+
messages.push(`❄️ 【寒冷增伤】:当前${currentLayers}层,伤害提升${(effectiveLayers * 2.5).toFixed(1)}%`);
|
|
3857
|
+
if (currentLayers > 20) {
|
|
3858
|
+
messages.push(`❄️ 注意:超过20层的寒冷无效,不会提供额外增伤`);
|
|
3859
|
+
}
|
|
3860
|
+
}
|
|
3861
|
+
let targetUpdates = null;
|
|
3862
|
+
if (weaponName === "零度之下") {
|
|
3863
|
+
targetUpdates = {
|
|
3864
|
+
name: targetBoss.name,
|
|
3865
|
+
updates: {
|
|
3866
|
+
coldLayersChange: 1
|
|
3867
|
+
// 寒冷层数增加1
|
|
3868
|
+
}
|
|
3796
3869
|
};
|
|
3870
|
+
const newLayers = currentLayers + 1;
|
|
3871
|
+
messages.push(`❄️ 满足寒冷条件,获得1层"寒冷"效果,累计${newLayers}层`);
|
|
3872
|
+
layerAdded = true;
|
|
3797
3873
|
}
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3874
|
+
return {
|
|
3875
|
+
messages,
|
|
3876
|
+
targetUpdates,
|
|
3877
|
+
buffMultiplier,
|
|
3878
|
+
layerAdded
|
|
3879
|
+
// 返回层数增加标记
|
|
3880
|
+
};
|
|
3881
|
+
}, "handleColdEffect"),
|
|
3882
|
+
// 统一的武器能量消耗处理函数
|
|
3883
|
+
handleWeaponEnergyDrain: /* @__PURE__ */ __name(function(targetBoss, weaponName) {
|
|
3884
|
+
const weaponEnergyDrain = {
|
|
3885
|
+
"弧焊枪": 200,
|
|
3886
|
+
"DG-3电弧步枪": 500
|
|
3887
|
+
};
|
|
3888
|
+
const drainValue = weaponEnergyDrain[weaponName];
|
|
3889
|
+
if (!drainValue) {
|
|
3890
|
+
return null;
|
|
3809
3891
|
}
|
|
3810
|
-
const
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
messages: fireEvoResult.messages,
|
|
3821
|
-
skillUpdates: [],
|
|
3822
|
-
initialDamage: fireEvoResult.initialDamage,
|
|
3823
|
-
bileStacks: fireEvoResult.bileStacks
|
|
3892
|
+
const messages = [];
|
|
3893
|
+
const success = drainValue > 0;
|
|
3894
|
+
let targetUpdates = null;
|
|
3895
|
+
if (success) {
|
|
3896
|
+
targetUpdates = {
|
|
3897
|
+
name: targetBoss.name,
|
|
3898
|
+
updates: {
|
|
3899
|
+
energyChange: -drainValue
|
|
3900
|
+
// 消耗能量(负值)
|
|
3901
|
+
}
|
|
3824
3902
|
};
|
|
3825
3903
|
}
|
|
3826
|
-
const
|
|
3827
|
-
if (
|
|
3828
|
-
|
|
3829
|
-
currentHP: targetBoss.HP,
|
|
3830
|
-
messages: criticalResult.messages,
|
|
3831
|
-
skillUpdates: [],
|
|
3832
|
-
initialDamage: 0
|
|
3833
|
-
};
|
|
3904
|
+
const weaponDisplayName = weaponName === "弧焊枪" ? "弧焊枪" : "DG-3电弧步枪";
|
|
3905
|
+
if (success) {
|
|
3906
|
+
messages.push(`⚡ 【${weaponDisplayName}】武器效果:消耗目标${drainValue}点能量`);
|
|
3834
3907
|
}
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3908
|
+
return {
|
|
3909
|
+
messages,
|
|
3910
|
+
targetUpdates,
|
|
3911
|
+
success
|
|
3912
|
+
};
|
|
3913
|
+
}, "handleWeaponEnergyDrain"),
|
|
3914
|
+
// 统一的武器层数减少处理函数
|
|
3915
|
+
handleWeaponLayerReduction: /* @__PURE__ */ __name(function(targetBoss, weaponName) {
|
|
3916
|
+
const weaponLayerReduction = {
|
|
3917
|
+
"脉冲扰乱枪": 2
|
|
3918
|
+
// 可以在这里添加其他武器及其减少层数
|
|
3919
|
+
};
|
|
3920
|
+
const reductionAmount = weaponLayerReduction[weaponName];
|
|
3921
|
+
if (!reductionAmount) {
|
|
3922
|
+
return null;
|
|
3843
3923
|
}
|
|
3844
|
-
const
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3924
|
+
const messages = [];
|
|
3925
|
+
const reductionSuccess = reductionAmount > 0;
|
|
3926
|
+
let targetUpdates = null;
|
|
3927
|
+
if (reductionSuccess) {
|
|
3928
|
+
targetUpdates = {
|
|
3929
|
+
name: targetBoss.name,
|
|
3930
|
+
updates: {
|
|
3931
|
+
skillStacksChanged: -reductionAmount
|
|
3932
|
+
// 减少层数
|
|
3933
|
+
}
|
|
3851
3934
|
};
|
|
3852
3935
|
}
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3936
|
+
if (reductionSuccess) {
|
|
3937
|
+
messages.push(`⚡ 【${weaponName}】武器效果:使${targetBoss.name}的技能层数减少${reductionAmount}层`);
|
|
3938
|
+
}
|
|
3939
|
+
return {
|
|
3940
|
+
messages,
|
|
3941
|
+
targetUpdates,
|
|
3942
|
+
reductionSuccess
|
|
3943
|
+
};
|
|
3944
|
+
}, "handleWeaponLayerReduction")
|
|
3945
|
+
};
|
|
3946
|
+
function applyPassiveEffects(targetBoss, weaponName, damage, activeBosses) {
|
|
3947
|
+
const messages = [];
|
|
3948
|
+
let immune = false;
|
|
3949
|
+
let totalBuffMultiplier = 0;
|
|
3950
|
+
let totalNerfMultiplier = 0;
|
|
3951
|
+
let radiationLayerAdded = false;
|
|
3952
|
+
let coldLayerAdded = false;
|
|
3953
|
+
let energyDrained = false;
|
|
3954
|
+
let layerReduced = false;
|
|
3955
|
+
let bileDetonationTrigger = false;
|
|
3956
|
+
const weaponData = weaponConfig[weaponName] || { type: "" };
|
|
3957
|
+
let ancientOmenBoost = 0;
|
|
3958
|
+
let psychicForgeBoost = 0;
|
|
3959
|
+
let doubleAstralWind = false;
|
|
3960
|
+
const lightningResult = BattleEffectProcessor.handleLightningCharge(targetBoss);
|
|
3961
|
+
if (lightningResult) {
|
|
3962
|
+
messages.push(...lightningResult.messages);
|
|
3963
|
+
ancientOmenBoost += lightningResult.ancientOmenBoost || 0;
|
|
3964
|
+
psychicForgeBoost += lightningResult.psychicForgeBoost || 0;
|
|
3965
|
+
}
|
|
3966
|
+
const coldImmuneEffects = [
|
|
3967
|
+
BattleEffectProcessor.handleFrostEvolution,
|
|
3968
|
+
BattleEffectProcessor.handleColdAdaptation,
|
|
3969
|
+
BattleEffectProcessor.handleSolarFlare
|
|
3970
|
+
];
|
|
3971
|
+
const fireImmuneEffects = [
|
|
3972
|
+
BattleEffectProcessor.handleFlameAlien
|
|
3973
|
+
];
|
|
3974
|
+
if (weaponName === "零度之下") {
|
|
3975
|
+
for (const effect of coldImmuneEffects) {
|
|
3976
|
+
const result = effect(targetBoss, weaponName, damage, activeBosses);
|
|
3977
|
+
if (result && result.isImmune) {
|
|
3978
|
+
immune = true;
|
|
3979
|
+
messages.push(...result.messages);
|
|
3980
|
+
if (result.targetUpdates) {
|
|
3981
|
+
updateStatsByName(result.targetUpdates.name, result.targetUpdates.updates);
|
|
3860
3982
|
}
|
|
3861
|
-
const effectPercent = Math.round(config.effect * 100);
|
|
3862
|
-
const effectSign = config.effect > 0 ? "+" : "";
|
|
3863
|
-
messages.push(`📚 【${skill}】生效:受到的伤害${effectSign}${effectPercent}%`);
|
|
3864
3983
|
}
|
|
3865
|
-
});
|
|
3866
|
-
const radiationCalc = this.calculateRadiationDamage(targetBoss);
|
|
3867
|
-
if (radiationCalc) {
|
|
3868
|
-
buffMultiplier += radiationCalc.damageMultiplier;
|
|
3869
|
-
messages.push(...radiationCalc.messages);
|
|
3870
|
-
}
|
|
3871
|
-
const coldDamageResult = this.calculateColdDamage(targetBoss);
|
|
3872
|
-
if (coldDamageResult) {
|
|
3873
|
-
buffMultiplier += coldDamageResult.damageMultiplier;
|
|
3874
|
-
messages.push(...coldDamageResult.messages);
|
|
3875
|
-
}
|
|
3876
|
-
const infectionResult = await this.handleInfectedStation(ctx, targetBoss);
|
|
3877
|
-
if (infectionResult) {
|
|
3878
|
-
nerfMultiplier += infectionResult.damageMultiplier;
|
|
3879
|
-
messages.push(...infectionResult.messages);
|
|
3880
|
-
}
|
|
3881
|
-
const armorResult = this.handleStructuralArmor(targetBoss, weaponData);
|
|
3882
|
-
if (armorResult) {
|
|
3883
|
-
nerfMultiplier += armorResult.damageMultiplier;
|
|
3884
|
-
messages.push(...armorResult.messages);
|
|
3885
|
-
}
|
|
3886
|
-
const bloodEffect = this.handleBloodEffects(targetBoss, currentHP, maxHP);
|
|
3887
|
-
if (bloodEffect) {
|
|
3888
|
-
if (bloodEffect.buffAmount > 0) {
|
|
3889
|
-
buffMultiplier += bloodEffect.buffAmount;
|
|
3890
|
-
}
|
|
3891
|
-
if (bloodEffect.nerfAmount > 0) {
|
|
3892
|
-
nerfMultiplier -= bloodEffect.nerfAmount;
|
|
3893
|
-
}
|
|
3894
|
-
messages.push(...bloodEffect.messages);
|
|
3895
|
-
}
|
|
3896
|
-
const siphonResult = this.handleEnergySiphon(targetBoss, currentHP, maxHP);
|
|
3897
|
-
if (siphonResult) {
|
|
3898
|
-
nerfMultiplier += siphonResult.damageMultiplier;
|
|
3899
|
-
messages.push(...siphonResult.messages);
|
|
3900
|
-
}
|
|
3901
|
-
const powerSiphonResult = this.handlePowerSiphon(targetBoss);
|
|
3902
|
-
if (powerSiphonResult) {
|
|
3903
|
-
nerfMultiplier += powerSiphonResult.damageMultiplier;
|
|
3904
|
-
messages.push(...powerSiphonResult.messages);
|
|
3905
|
-
}
|
|
3906
|
-
const giantRageResult = this.handleGiantRage(targetBoss, currentHP, maxHP);
|
|
3907
|
-
if (giantRageResult) {
|
|
3908
|
-
nerfMultiplier += giantRageResult.damageMultiplier;
|
|
3909
|
-
messages.push(...giantRageResult.messages);
|
|
3910
|
-
}
|
|
3911
|
-
const hellfireBombResult = this.handleHellfireBomb(targetBoss, activeBosses);
|
|
3912
|
-
if (hellfireBombResult) {
|
|
3913
|
-
nerfMultiplier += hellfireBombResult.damageMultiplier;
|
|
3914
|
-
messages.push(...hellfireBombResult.messages);
|
|
3915
|
-
}
|
|
3916
|
-
const disguiseResult = await this.handleDisguise(ctx, targetBoss, weaponName, initialDamage);
|
|
3917
|
-
if (disguiseResult) {
|
|
3918
|
-
nerfMultiplier += disguiseResult.damageMultiplier;
|
|
3919
|
-
messages.push(...disguiseResult.messages);
|
|
3920
|
-
}
|
|
3921
|
-
if (hunterImmune && !hunterImmune.immune) {
|
|
3922
|
-
const multiplier = hunterImmune.damageMultiplier;
|
|
3923
|
-
if (multiplier > 0) {
|
|
3924
|
-
buffMultiplier += multiplier;
|
|
3925
|
-
} else {
|
|
3926
|
-
nerfMultiplier += multiplier;
|
|
3927
|
-
}
|
|
3928
|
-
messages.push(...hunterImmune.messages);
|
|
3929
3984
|
}
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3985
|
+
}
|
|
3986
|
+
if (weaponName === "焚烧枪") {
|
|
3987
|
+
for (const effect of fireImmuneEffects) {
|
|
3988
|
+
const result = effect(targetBoss, weaponName, damage);
|
|
3989
|
+
if (result && result.isImmune) {
|
|
3990
|
+
immune = true;
|
|
3991
|
+
messages.push(...result.messages);
|
|
3992
|
+
if (result.targetUpdates) {
|
|
3993
|
+
updateStatsByName(result.targetUpdates.name, result.targetUpdates.updates);
|
|
3994
|
+
}
|
|
3995
|
+
}
|
|
3934
3996
|
}
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3997
|
+
}
|
|
3998
|
+
const chanceImmuneEffects = [
|
|
3999
|
+
BattleEffectProcessor.handleDeadlyHit,
|
|
4000
|
+
BattleEffectProcessor.handleElectricField,
|
|
4001
|
+
BattleEffectProcessor.handleAncientOmen
|
|
4002
|
+
];
|
|
4003
|
+
for (const effect of chanceImmuneEffects) {
|
|
4004
|
+
if (effect === BattleEffectProcessor.handleAncientOmen) {
|
|
4005
|
+
const result = effect(targetBoss, weaponData, ancientOmenBoost);
|
|
4006
|
+
if (result && result.isImmune) {
|
|
4007
|
+
immune = true;
|
|
4008
|
+
messages.push(...result.messages);
|
|
4009
|
+
if (result.targetUpdates) {
|
|
4010
|
+
updateStatsByName(result.targetUpdates.name, result.targetUpdates.updates);
|
|
4011
|
+
}
|
|
3939
4012
|
}
|
|
3940
|
-
|
|
3941
|
-
|
|
4013
|
+
} else {
|
|
4014
|
+
const result = effect(targetBoss, weaponData);
|
|
4015
|
+
if (result && result.isImmune) {
|
|
4016
|
+
immune = true;
|
|
4017
|
+
messages.push(...result.messages);
|
|
3942
4018
|
}
|
|
3943
|
-
messages.push(...hyperspaceResult.messages);
|
|
3944
4019
|
}
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
4020
|
+
}
|
|
4021
|
+
const damageAdjustEffects = [
|
|
4022
|
+
BattleEffectProcessor.handleWeakForm,
|
|
4023
|
+
BattleEffectProcessor.handleAlienShell,
|
|
4024
|
+
BattleEffectProcessor.handleIsolated,
|
|
4025
|
+
BattleEffectProcessor.handleFrostHell,
|
|
4026
|
+
BattleEffectProcessor.handleStressShellI,
|
|
4027
|
+
BattleEffectProcessor.handleStressShellII,
|
|
4028
|
+
BattleEffectProcessor.handleInfectedSpaceStation,
|
|
4029
|
+
BattleEffectProcessor.handleVirusCloud,
|
|
4030
|
+
BattleEffectProcessor.handleStructuralArmor,
|
|
4031
|
+
BattleEffectProcessor.handleVampireSaliva,
|
|
4032
|
+
BattleEffectProcessor.handleBloodlust,
|
|
4033
|
+
BattleEffectProcessor.handleVomit,
|
|
4034
|
+
BattleEffectProcessor.handleEnergySiphon,
|
|
4035
|
+
BattleEffectProcessor.handleEnergyAbsorption,
|
|
4036
|
+
BattleEffectProcessor.handleEnergyBlackhole,
|
|
4037
|
+
BattleEffectProcessor.handleColossalRampage,
|
|
4038
|
+
BattleEffectProcessor.handleInfernalBomb,
|
|
4039
|
+
BattleEffectProcessor.handleHunterAlien,
|
|
4040
|
+
BattleEffectProcessor.handleRampage,
|
|
4041
|
+
BattleEffectProcessor.handleDisguise,
|
|
4042
|
+
BattleEffectProcessor.handleHyperRangeShift,
|
|
4043
|
+
BattleEffectProcessor.handleCarpetBombing
|
|
4044
|
+
];
|
|
4045
|
+
for (const effect of damageAdjustEffects) {
|
|
4046
|
+
let result;
|
|
4047
|
+
if (effect === BattleEffectProcessor.handleIsolated || effect === BattleEffectProcessor.handleInfectedSpaceStation || effect === BattleEffectProcessor.handleInfernalBomb || effect === BattleEffectProcessor.handleHunterAlien) {
|
|
4048
|
+
result = effect(targetBoss, activeBosses, weaponName);
|
|
4049
|
+
} else if (effect === BattleEffectProcessor.handleStructuralArmor) {
|
|
4050
|
+
result = effect(targetBoss, weaponData);
|
|
4051
|
+
} else if (effect === BattleEffectProcessor.handleBloodlust || effect === BattleEffectProcessor.handleVampireSaliva || effect === BattleEffectProcessor.handleHyperRangeShift) {
|
|
4052
|
+
result = effect(targetBoss, activeBosses);
|
|
4053
|
+
} else {
|
|
4054
|
+
result = effect(targetBoss, activeBosses, weaponName);
|
|
3949
4055
|
}
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
4056
|
+
if (result) {
|
|
4057
|
+
messages.push(...result.messages);
|
|
4058
|
+
if (result.buffMultiplier !== void 0 && typeof result.buffMultiplier === "number") {
|
|
4059
|
+
totalBuffMultiplier += result.buffMultiplier;
|
|
4060
|
+
}
|
|
4061
|
+
if (result.nerfMultiplier !== void 0 && typeof result.nerfMultiplier === "number") {
|
|
4062
|
+
totalNerfMultiplier += result.nerfMultiplier;
|
|
4063
|
+
}
|
|
3954
4064
|
}
|
|
3955
|
-
|
|
3956
|
-
|
|
4065
|
+
}
|
|
4066
|
+
const stateChangeEffects = [
|
|
4067
|
+
BattleEffectProcessor.handleVampireSaliva,
|
|
4068
|
+
BattleEffectProcessor.handleBladeOfLight,
|
|
4069
|
+
BattleEffectProcessor.handleSuperconductor
|
|
4070
|
+
];
|
|
4071
|
+
for (const effect of stateChangeEffects) {
|
|
4072
|
+
const result = effect(targetBoss);
|
|
4073
|
+
if (result) {
|
|
4074
|
+
messages.push(...result.messages);
|
|
4075
|
+
if (result.targetUpdates) {
|
|
4076
|
+
updateStatsByName(result.targetUpdates.name, result.targetUpdates.updates);
|
|
4077
|
+
}
|
|
3957
4078
|
}
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
nerfMultiplier
|
|
3965
|
-
// 只传入减伤部分
|
|
3966
|
-
);
|
|
3967
|
-
let effectiveMultiplier = baseMultiplier;
|
|
3968
|
-
let appliedIgnoreMessages = [];
|
|
3969
|
-
let effectiveNerf = nerfMultiplier;
|
|
3970
|
-
if (ignoreReductionResult) {
|
|
3971
|
-
appliedIgnoreMessages = ignoreReductionResult.messages;
|
|
3972
|
-
effectiveNerf = nerfMultiplier * (1 - ignoreReductionResult.ignoreRate);
|
|
3973
|
-
effectiveMultiplier = buffMultiplier + effectiveNerf;
|
|
3974
|
-
}
|
|
3975
|
-
const originalMultiplier = effectiveMultiplier;
|
|
3976
|
-
if (originalMultiplier < -1) {
|
|
3977
|
-
messages.push(`⚠️ 触发伤害保底机制:强制造成1点伤害`);
|
|
3978
|
-
}
|
|
3979
|
-
let finalDamage = initialDamage * (1 + effectiveMultiplier);
|
|
3980
|
-
finalDamage = Math.floor(finalDamage);
|
|
3981
|
-
finalDamage = Math.max(finalDamage, 1);
|
|
3982
|
-
currentHP = targetBoss.HP - finalDamage;
|
|
3983
|
-
if (currentHP < 0) {
|
|
3984
|
-
currentHP = 0;
|
|
3985
|
-
}
|
|
3986
|
-
if (appliedIgnoreMessages.length > 0) {
|
|
3987
|
-
messages.push(...appliedIgnoreMessages);
|
|
3988
|
-
messages.push(
|
|
3989
|
-
`⚡ 减伤效果:${(nerfMultiplier * 100).toFixed(0)}% → ${(effectiveNerf * 100).toFixed(0)}%`
|
|
3990
|
-
);
|
|
4079
|
+
}
|
|
4080
|
+
const burningSlimeResult = BattleEffectProcessor.handleBurningSlime(targetBoss, weaponName);
|
|
4081
|
+
if (burningSlimeResult) {
|
|
4082
|
+
messages.push(...burningSlimeResult.messages);
|
|
4083
|
+
if (burningSlimeResult.targetUpdates) {
|
|
4084
|
+
updateStatsByName(burningSlimeResult.targetUpdates.name, burningSlimeResult.targetUpdates.updates);
|
|
3991
4085
|
}
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4086
|
+
bileDetonationTrigger = burningSlimeResult.isHighStackHeal;
|
|
4087
|
+
}
|
|
4088
|
+
const healingEffects = [
|
|
4089
|
+
BattleEffectProcessor.handleFrostRegeneration,
|
|
4090
|
+
BattleEffectProcessor.handleFrostAura,
|
|
4091
|
+
BattleEffectProcessor.handleSurvivalInstinctI,
|
|
4092
|
+
BattleEffectProcessor.handleSurvivalInstinctII,
|
|
4093
|
+
BattleEffectProcessor.handleSentryGun,
|
|
4094
|
+
BattleEffectProcessor.handleFeeding,
|
|
4095
|
+
BattleEffectProcessor.handleMoldGrowth,
|
|
4096
|
+
BattleEffectProcessor.handleElectricShockwave,
|
|
4097
|
+
BattleEffectProcessor.handlePulse,
|
|
4098
|
+
BattleEffectProcessor.handleCorrosiveBile,
|
|
4099
|
+
BattleEffectProcessor.handleFlameBreath,
|
|
4100
|
+
BattleEffectProcessor.handleBurningBurrow,
|
|
4101
|
+
BattleEffectProcessor.handleRevival,
|
|
4102
|
+
BattleEffectProcessor.handleCosmicEnergy,
|
|
4103
|
+
BattleEffectProcessor.handleBombardmentGuide,
|
|
4104
|
+
BattleEffectProcessor.handleOverdriveShield
|
|
4105
|
+
];
|
|
4106
|
+
for (const effect of healingEffects) {
|
|
4107
|
+
let result;
|
|
4108
|
+
if (effect === BattleEffectProcessor.handleFrostRegeneration || effect === BattleEffectProcessor.handleFrostAura || effect === BattleEffectProcessor.handlePulse || effect === BattleEffectProcessor.handleSentryGun || effect === BattleEffectProcessor.handleCorrosiveBile || effect === BattleEffectProcessor.handleFlameBreath || effect === BattleEffectProcessor.handleOverdriveShield) {
|
|
4109
|
+
result = effect(targetBoss, activeBosses, damage);
|
|
4110
|
+
} else if (effect === BattleEffectProcessor.handleCosmicEnergy) {
|
|
4111
|
+
result = effect(targetBoss, activeBosses, damage);
|
|
4112
|
+
} else {
|
|
4113
|
+
result = effect(targetBoss, activeBosses, damage);
|
|
4001
4114
|
}
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
skillUpdates.push(...frostSurroundResult.skillUpdates);
|
|
4007
|
-
}
|
|
4008
|
-
const frostRecoveryResult = await this.handleFrostRecovery(ctx, targetBoss, currentHP, maxHP, activeBosses, bossGroup);
|
|
4009
|
-
if (frostRecoveryResult) {
|
|
4010
|
-
currentHP = frostRecoveryResult.updatedHP;
|
|
4011
|
-
messages.push(...frostRecoveryResult.messages);
|
|
4012
|
-
skillUpdates.push(...frostRecoveryResult.skillUpdates);
|
|
4013
|
-
}
|
|
4014
|
-
const burningBurrowResult = await this.handleBurningBurrow(ctx, targetBoss, currentHP, maxHP);
|
|
4015
|
-
if (burningBurrowResult) {
|
|
4016
|
-
currentHP = burningBurrowResult.updatedHP;
|
|
4017
|
-
messages.push(...burningBurrowResult.messages);
|
|
4018
|
-
skillUpdates.push(...burningBurrowResult.skillUpdates);
|
|
4019
|
-
}
|
|
4020
|
-
const moldResult = await this.handleMoldGrowth(ctx, targetBoss, bossGroup);
|
|
4021
|
-
if (moldResult) {
|
|
4022
|
-
messages.push(...moldResult.messages);
|
|
4023
|
-
}
|
|
4024
|
-
const pulseResult = await this.handlePulse(
|
|
4025
|
-
ctx,
|
|
4026
|
-
targetBoss,
|
|
4027
|
-
activeBosses,
|
|
4028
|
-
bossGroup,
|
|
4029
|
-
currentHP
|
|
4030
|
-
// 传入当前HP值
|
|
4031
|
-
);
|
|
4032
|
-
if (pulseResult) {
|
|
4033
|
-
currentHP = pulseResult.newHP;
|
|
4034
|
-
messages.push(...pulseResult.messages);
|
|
4035
|
-
}
|
|
4036
|
-
let skipBileStacking = false;
|
|
4037
|
-
if (weaponName !== "焚烧枪") {
|
|
4038
|
-
if (targetBoss.skills.includes("腐蚀胆汁")) {
|
|
4039
|
-
const bileTriggered = await this.handleCorrosiveBile(ctx, targetBoss, bossGroup, currentHP);
|
|
4040
|
-
if (bileTriggered) {
|
|
4041
|
-
currentHP = bileTriggered.currentHP;
|
|
4042
|
-
skipBileStacking = true;
|
|
4043
|
-
messages.push(...bileTriggered.messages);
|
|
4044
|
-
}
|
|
4115
|
+
if (result) {
|
|
4116
|
+
messages.push(...result.messages);
|
|
4117
|
+
if (result.targetUpdates) {
|
|
4118
|
+
updateStatsByName(result.targetUpdates.name, result.targetUpdates.updates);
|
|
4045
4119
|
}
|
|
4046
|
-
if (
|
|
4047
|
-
const
|
|
4048
|
-
|
|
4049
|
-
currentHP = breathTriggered.currentHP;
|
|
4050
|
-
skipBileStacking = true;
|
|
4051
|
-
messages.push(...breathTriggered.messages);
|
|
4120
|
+
if (result.otherUpdates) {
|
|
4121
|
+
for (const update of result.otherUpdates) {
|
|
4122
|
+
updateStatsByName(update.name, update.updates);
|
|
4052
4123
|
}
|
|
4053
4124
|
}
|
|
4054
4125
|
}
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
currentHP = survivalResult.updatedHP;
|
|
4068
|
-
messages.push(...survivalResult.messages);
|
|
4069
|
-
skillUpdates.push(...survivalResult.skillUpdates);
|
|
4070
|
-
}
|
|
4071
|
-
const revivalResult = await this.handleRevival(ctx, targetBoss, currentHP, maxHP);
|
|
4072
|
-
if (revivalResult) {
|
|
4073
|
-
currentHP = revivalResult.updatedHP;
|
|
4074
|
-
messages.push(...revivalResult.messages);
|
|
4075
|
-
}
|
|
4076
|
-
const pulseDisruptorResult = await this.handlePulseDisruptor(
|
|
4077
|
-
ctx,
|
|
4078
|
-
targetBoss,
|
|
4079
|
-
weaponName
|
|
4080
|
-
);
|
|
4081
|
-
if (pulseDisruptorResult) {
|
|
4082
|
-
messages.push(...pulseDisruptorResult.messages);
|
|
4083
|
-
pulseApplied = pulseDisruptorResult.pulseApplied;
|
|
4084
|
-
}
|
|
4085
|
-
const arcResult = await this.handleArcWelderEffect(ctx, targetBoss, weaponName);
|
|
4086
|
-
if (arcResult) {
|
|
4087
|
-
messages.push(...arcResult.messages);
|
|
4088
|
-
arcApplied = arcResult.arcApplied;
|
|
4089
|
-
}
|
|
4090
|
-
const arcRifleResult = await this.handleArcRifleEffect(ctx, targetBoss, weaponName, messages);
|
|
4091
|
-
if (arcRifleResult) {
|
|
4092
|
-
messages.push(...arcRifleResult.messages);
|
|
4093
|
-
}
|
|
4094
|
-
const coldAdaptResult = await this.handleColdAdaptation(ctx, targetBoss, weaponName);
|
|
4095
|
-
if (coldAdaptResult) {
|
|
4096
|
-
messages.push(...coldAdaptResult.messages);
|
|
4097
|
-
}
|
|
4098
|
-
const bloodCountResult = await this.handleBloodCount(ctx, targetBoss, currentHP, maxHP);
|
|
4099
|
-
if (bloodCountResult) {
|
|
4100
|
-
currentHP = bloodCountResult.updatedHP;
|
|
4101
|
-
messages.push(...bloodCountResult.messages);
|
|
4126
|
+
}
|
|
4127
|
+
const mindFrenzyResult = BattleEffectProcessor.handleMindFrenzy(targetBoss);
|
|
4128
|
+
if (mindFrenzyResult) {
|
|
4129
|
+
messages.push(...mindFrenzyResult.messages);
|
|
4130
|
+
totalNerfMultiplier += mindFrenzyResult.nerfMultiplier || 0;
|
|
4131
|
+
doubleAstralWind = mindFrenzyResult.doubleAstralWind || false;
|
|
4132
|
+
}
|
|
4133
|
+
const radiationResult = BattleEffectProcessor.handleRadiationEffect(targetBoss, weaponName);
|
|
4134
|
+
if (radiationResult) {
|
|
4135
|
+
messages.push(...radiationResult.messages);
|
|
4136
|
+
if (radiationResult.buffMultiplier) {
|
|
4137
|
+
totalBuffMultiplier += radiationResult.buffMultiplier - 1;
|
|
4102
4138
|
}
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
messages.push(...sentryResult.messages);
|
|
4139
|
+
if (radiationResult.targetUpdates) {
|
|
4140
|
+
updateStatsByName(radiationResult.targetUpdates.name, radiationResult.targetUpdates.updates);
|
|
4106
4141
|
}
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4142
|
+
radiationLayerAdded = radiationResult.layerAdded;
|
|
4143
|
+
}
|
|
4144
|
+
const coldResult = BattleEffectProcessor.handleColdEffect(targetBoss, weaponName);
|
|
4145
|
+
if (coldResult) {
|
|
4146
|
+
messages.push(...coldResult.messages);
|
|
4147
|
+
if (coldResult.buffMultiplier) {
|
|
4148
|
+
totalBuffMultiplier += coldResult.buffMultiplier - 1;
|
|
4110
4149
|
}
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
messages.push(...CollapsepulseResult.messages);
|
|
4150
|
+
if (coldResult.targetUpdates) {
|
|
4151
|
+
updateStatsByName(coldResult.targetUpdates.name, coldResult.targetUpdates.updates);
|
|
4114
4152
|
}
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4153
|
+
coldLayerAdded = coldResult.layerAdded;
|
|
4154
|
+
}
|
|
4155
|
+
const energyDrainResult = BattleEffectProcessor.handleWeaponEnergyDrain(targetBoss, weaponName);
|
|
4156
|
+
if (energyDrainResult) {
|
|
4157
|
+
messages.push(...energyDrainResult.messages);
|
|
4158
|
+
if (energyDrainResult.targetUpdates) {
|
|
4159
|
+
updateStatsByName(energyDrainResult.targetUpdates.name, energyDrainResult.targetUpdates.updates);
|
|
4118
4160
|
}
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4161
|
+
energyDrained = energyDrainResult.success;
|
|
4162
|
+
}
|
|
4163
|
+
const layerReduceResult = BattleEffectProcessor.handleWeaponLayerReduction(targetBoss, weaponName);
|
|
4164
|
+
if (layerReduceResult) {
|
|
4165
|
+
messages.push(...layerReduceResult.messages);
|
|
4166
|
+
if (layerReduceResult.targetUpdates) {
|
|
4167
|
+
updateStatsByName(layerReduceResult.targetUpdates.name, layerReduceResult.targetUpdates.updates);
|
|
4122
4168
|
}
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4169
|
+
layerReduced = layerReduceResult.reductionSuccess;
|
|
4170
|
+
}
|
|
4171
|
+
const astralWindResult = BattleEffectProcessor.handleAstralWind(targetBoss, activeBosses, doubleAstralWind);
|
|
4172
|
+
if (astralWindResult) {
|
|
4173
|
+
messages.push(...astralWindResult.messages);
|
|
4174
|
+
if (astralWindResult.otherUpdates) {
|
|
4175
|
+
for (const update of astralWindResult.otherUpdates) {
|
|
4176
|
+
updateStatsByName(update.name, update.updates);
|
|
4128
4177
|
}
|
|
4129
4178
|
}
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
messages.push(...gammaRadResult.messages);
|
|
4137
|
-
radiationApplied = gammaRadResult.radiationApplied;
|
|
4138
|
-
}
|
|
4139
|
-
const coldEffectResult = await this.handleColdEffect(ctx, targetBoss, weaponName);
|
|
4140
|
-
if (coldEffectResult) {
|
|
4141
|
-
messages.push(...coldEffectResult.messages);
|
|
4142
|
-
freezing = coldEffectResult.freezing;
|
|
4143
|
-
}
|
|
4144
|
-
const tagChangeResult = await this.handleConductorTagChange(ctx, targetBoss, currentHP, maxHP);
|
|
4145
|
-
if (tagChangeResult) {
|
|
4146
|
-
messages.push(...tagChangeResult.messages);
|
|
4147
|
-
}
|
|
4148
|
-
const constructorResult = await this.handleConstructor(ctx, targetBoss);
|
|
4149
|
-
if (constructorResult) {
|
|
4150
|
-
messages.push(...constructorResult.messages);
|
|
4151
|
-
}
|
|
4152
|
-
return {
|
|
4153
|
-
currentHP,
|
|
4154
|
-
messages,
|
|
4155
|
-
skillUpdates,
|
|
4156
|
-
initialDamage: finalDamage,
|
|
4157
|
-
radiationApplied,
|
|
4158
|
-
// 新增返回辐射应用标记
|
|
4159
|
-
freezing,
|
|
4160
|
-
pulseApplied,
|
|
4161
|
-
arcApplied
|
|
4162
|
-
};
|
|
4163
|
-
}, "handlePassives"),
|
|
4164
|
-
// 应用技能更新到数据库(优化合并同名boss的更新)
|
|
4165
|
-
applySkillUpdates: /* @__PURE__ */ __name(async (ctx, skillUpdates) => {
|
|
4166
|
-
const mergedUpdates = skillUpdates.reduce((acc, update) => {
|
|
4167
|
-
const existing = acc.find((u) => u.name === update.name);
|
|
4168
|
-
if (existing) {
|
|
4169
|
-
if (update.remove) {
|
|
4170
|
-
existing.remove = [.../* @__PURE__ */ new Set([...existing.remove, ...update.remove])];
|
|
4171
|
-
}
|
|
4172
|
-
if (update.add) {
|
|
4173
|
-
existing.add = [.../* @__PURE__ */ new Set([...existing.add, ...update.add])];
|
|
4174
|
-
}
|
|
4175
|
-
} else {
|
|
4176
|
-
acc.push({
|
|
4177
|
-
name: update.name,
|
|
4178
|
-
remove: [...new Set(update.remove || [])],
|
|
4179
|
-
add: [...new Set(update.add || [])]
|
|
4180
|
-
});
|
|
4181
|
-
}
|
|
4182
|
-
return acc;
|
|
4183
|
-
}, []);
|
|
4184
|
-
const updates = mergedUpdates.map(async (update) => {
|
|
4185
|
-
const [boss] = await ctx.database.get("ggcevo_boss", { name: update.name });
|
|
4186
|
-
if (!boss) return;
|
|
4187
|
-
let newSkills = [...boss.skills];
|
|
4188
|
-
if (update.remove?.length) {
|
|
4189
|
-
newSkills = newSkills.filter((s) => !update.remove.includes(s));
|
|
4190
|
-
}
|
|
4191
|
-
if (update.add?.length) {
|
|
4192
|
-
newSkills = [...newSkills, ...update.add];
|
|
4193
|
-
newSkills = [...new Set(newSkills)];
|
|
4194
|
-
}
|
|
4195
|
-
return ctx.database.set(
|
|
4196
|
-
"ggcevo_boss",
|
|
4197
|
-
{ name: update.name },
|
|
4198
|
-
{ skills: newSkills }
|
|
4199
|
-
);
|
|
4200
|
-
});
|
|
4201
|
-
await Promise.all(updates);
|
|
4202
|
-
}, "applySkillUpdates")
|
|
4203
|
-
};
|
|
4204
|
-
|
|
4205
|
-
// src/boss/attackhandling.ts
|
|
4206
|
-
function getBossMaxHP(bossName) {
|
|
4207
|
-
for (const bossGroup of bossPool) {
|
|
4208
|
-
if (bossGroup.main.name === bossName) {
|
|
4209
|
-
return bossGroup.main.maxHP;
|
|
4179
|
+
}
|
|
4180
|
+
const psychicForgeResult = BattleEffectProcessor.handlePsychicForge(targetBoss, psychicForgeBoost);
|
|
4181
|
+
if (psychicForgeResult) {
|
|
4182
|
+
messages.push(...psychicForgeResult.messages);
|
|
4183
|
+
if (psychicForgeResult.targetUpdates) {
|
|
4184
|
+
updateStatsByName(psychicForgeResult.targetUpdates.name, psychicForgeResult.targetUpdates.updates);
|
|
4210
4185
|
}
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4186
|
+
}
|
|
4187
|
+
let finalDamage = damage;
|
|
4188
|
+
if (!immune) {
|
|
4189
|
+
const damageMultiplier = 1 + totalBuffMultiplier - totalNerfMultiplier;
|
|
4190
|
+
finalDamage = Math.max(1, Math.round(damage * damageMultiplier));
|
|
4191
|
+
if (damage !== finalDamage) {
|
|
4192
|
+
const adjustmentPercent = ((damageMultiplier - 1) * 100).toFixed(1);
|
|
4193
|
+
if (damageMultiplier > 1) {
|
|
4194
|
+
messages.push(`⚔️ 伤害增益: 总计增加${adjustmentPercent}%伤害`);
|
|
4195
|
+
} else if (damageMultiplier < 1) {
|
|
4196
|
+
messages.push(`🛡️ 伤害减免: 总计减少${Math.abs(Number(adjustmentPercent))}%伤害`);
|
|
4197
|
+
}
|
|
4198
|
+
}
|
|
4199
|
+
if (finalDamage > 0) {
|
|
4200
|
+
updateStatsByName(targetBoss.name, {
|
|
4201
|
+
hpChange: -finalDamage
|
|
4202
|
+
});
|
|
4215
4203
|
}
|
|
4216
4204
|
}
|
|
4217
|
-
|
|
4205
|
+
if (immune) {
|
|
4206
|
+
finalDamage = 0;
|
|
4207
|
+
}
|
|
4208
|
+
return {
|
|
4209
|
+
finalDamage,
|
|
4210
|
+
messages,
|
|
4211
|
+
radiationLayerAdded,
|
|
4212
|
+
coldLayerAdded,
|
|
4213
|
+
energyDrained,
|
|
4214
|
+
layerReduced,
|
|
4215
|
+
bileDetonationTrigger
|
|
4216
|
+
};
|
|
4218
4217
|
}
|
|
4219
|
-
__name(
|
|
4218
|
+
__name(applyPassiveEffects, "applyPassiveEffects");
|
|
4219
|
+
|
|
4220
|
+
// src/boss/attackhandling.ts
|
|
4220
4221
|
async function getCleanerRewardBroadcast(ctx, boss, killerHandle, killerName) {
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
killerBonus = true;
|
|
4236
|
-
}
|
|
4237
|
-
await ctx.database.upsert("ggcevo_careers", [{
|
|
4238
|
-
handle: cleaner.handle,
|
|
4239
|
-
redcrystal: (cleaner.redcrystal || 0) + rewardAmount
|
|
4240
|
-
}], ["handle"]);
|
|
4222
|
+
const bossType = boss.type;
|
|
4223
|
+
const bossName = boss.name;
|
|
4224
|
+
const baseReward = bossType === "主宰" ? 10 : 5;
|
|
4225
|
+
const allCleaners = await ctx.database.get("ggcevo_careers", {
|
|
4226
|
+
career: "清洁工"
|
|
4227
|
+
});
|
|
4228
|
+
if (!allCleaners.length) return [];
|
|
4229
|
+
let killerBonus = false;
|
|
4230
|
+
let killerBonusMessage = "";
|
|
4231
|
+
for (const cleaner of allCleaners) {
|
|
4232
|
+
let rewardAmount = baseReward;
|
|
4233
|
+
if (cleaner.handle === killerHandle) {
|
|
4234
|
+
rewardAmount *= 2;
|
|
4235
|
+
killerBonus = true;
|
|
4241
4236
|
}
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
return [];
|
|
4237
|
+
await ctx.database.upsert("ggcevo_careers", [{
|
|
4238
|
+
handle: cleaner.handle,
|
|
4239
|
+
redcrystal: (cleaner.redcrystal || 0) + rewardAmount
|
|
4240
|
+
}], ["handle"]);
|
|
4247
4241
|
}
|
|
4242
|
+
const rewardMessage = `🧹 清洁工职业因清理 ${bossName} 获得 ${baseReward} 红晶${killerBonus ? ` (致命一击奖励者:${killerName})` : ""}`;
|
|
4243
|
+
return [rewardMessage];
|
|
4248
4244
|
}
|
|
4249
4245
|
__name(getCleanerRewardBroadcast, "getCleanerRewardBroadcast");
|
|
4250
4246
|
async function handleBossDefeatRewards(ctx, targetBoss) {
|
|
@@ -4370,42 +4366,30 @@ async function handleBossDefeatRewards(ctx, targetBoss) {
|
|
|
4370
4366
|
return { rewardMessages };
|
|
4371
4367
|
}
|
|
4372
4368
|
__name(handleBossDefeatRewards, "handleBossDefeatRewards");
|
|
4373
|
-
async function handlePrimaryAttack(ctx, session, config,
|
|
4369
|
+
async function handlePrimaryAttack(ctx, session, config, equippedWeapon, targetBoss, activeBosses, weaponName) {
|
|
4374
4370
|
const damageResult = await calculateTotalDamage(ctx, session, config, equippedWeapon, targetBoss);
|
|
4375
|
-
const
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
targetBoss.HP,
|
|
4381
|
-
maxHP,
|
|
4382
|
-
weaponName,
|
|
4383
|
-
weaponData,
|
|
4384
|
-
bossGroup
|
|
4385
|
-
);
|
|
4386
|
-
const currentHP = passiveResult.currentHP;
|
|
4387
|
-
const initialDamage = passiveResult.initialDamage;
|
|
4388
|
-
if (passiveResult.skillUpdates.length > 0) {
|
|
4389
|
-
await PassiveHandler.applySkillUpdates(ctx, passiveResult.skillUpdates);
|
|
4390
|
-
}
|
|
4371
|
+
const EffectProcessor = applyPassiveEffects(targetBoss, weaponName, damageResult.damage, activeBosses);
|
|
4372
|
+
const initialDamage = EffectProcessor.finalDamage;
|
|
4373
|
+
await saveAndClearStats(ctx);
|
|
4374
|
+
const [currentboss] = await ctx.database.get("ggcevo_boss", { name: targetBoss.name });
|
|
4375
|
+
const currentHP = currentboss.HP;
|
|
4391
4376
|
const isDefeated = currentHP <= 0;
|
|
4392
4377
|
return {
|
|
4393
4378
|
initialDamage,
|
|
4394
4379
|
currentHP,
|
|
4395
4380
|
isDefeated,
|
|
4396
|
-
damage: initialDamage,
|
|
4397
4381
|
hasCrit: damageResult.hasCrit,
|
|
4398
4382
|
effectMessage: damageResult.effectMessage,
|
|
4399
|
-
passiveMessages:
|
|
4400
|
-
radiationApplied:
|
|
4401
|
-
freezing:
|
|
4402
|
-
bileStacks:
|
|
4403
|
-
pulseApplied:
|
|
4404
|
-
arcApplied:
|
|
4383
|
+
passiveMessages: EffectProcessor.messages,
|
|
4384
|
+
radiationApplied: EffectProcessor.radiationLayerAdded,
|
|
4385
|
+
freezing: EffectProcessor.coldLayerAdded,
|
|
4386
|
+
bileStacks: EffectProcessor.bileDetonationTrigger,
|
|
4387
|
+
pulseApplied: EffectProcessor.layerReduced,
|
|
4388
|
+
arcApplied: EffectProcessor.energyDrained
|
|
4405
4389
|
};
|
|
4406
4390
|
}
|
|
4407
4391
|
__name(handlePrimaryAttack, "handlePrimaryAttack");
|
|
4408
|
-
async function handleScatterAttack(ctx, session, config,
|
|
4392
|
+
async function handleScatterAttack(ctx, session, config, equippedWeapon, targetBoss, weaponName, activeBosses) {
|
|
4409
4393
|
const secondaryTargets = activeBosses.filter((boss) => boss.name !== targetBoss.name);
|
|
4410
4394
|
const scatterEffectMessages = [];
|
|
4411
4395
|
const extraDamages = [];
|
|
@@ -4428,47 +4412,32 @@ async function handleScatterAttack(ctx, session, config, handle, equippedWeapon,
|
|
|
4428
4412
|
secondaryTarget
|
|
4429
4413
|
);
|
|
4430
4414
|
const secondaryDamage = Math.round(damageResult.damage * scatterRatio);
|
|
4431
|
-
const
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
secondaryTarget.HP,
|
|
4437
|
-
getBossMaxHP(secondaryTarget.name),
|
|
4438
|
-
weaponName,
|
|
4439
|
-
weaponData,
|
|
4440
|
-
bossGroup
|
|
4441
|
-
);
|
|
4442
|
-
const actualDamage = Math.min(passiveResult.initialDamage, secondaryTarget.HP);
|
|
4443
|
-
const newHP = passiveResult.currentHP;
|
|
4415
|
+
const EffectProcessor = applyPassiveEffects(targetBoss, weaponName, secondaryDamage, activeBosses);
|
|
4416
|
+
const actualDamage = EffectProcessor.finalDamage;
|
|
4417
|
+
await saveAndClearStats(ctx);
|
|
4418
|
+
const [currentboss] = await ctx.database.get("ggcevo_boss", { name: targetBoss.name });
|
|
4419
|
+
const currentHP = currentboss.HP;
|
|
4444
4420
|
extraDamages.push({
|
|
4445
4421
|
name: secondaryTarget.name,
|
|
4446
4422
|
damage: actualDamage
|
|
4447
4423
|
});
|
|
4448
|
-
if (
|
|
4449
|
-
await PassiveHandler.applySkillUpdates(ctx, passiveResult.skillUpdates);
|
|
4450
|
-
}
|
|
4451
|
-
if (passiveResult.radiationApplied) {
|
|
4424
|
+
if (EffectProcessor.radiationLayerAdded) {
|
|
4452
4425
|
taskUpdates.push({ taskId: 1, count: 1 });
|
|
4453
4426
|
}
|
|
4454
|
-
if (
|
|
4427
|
+
if (EffectProcessor.coldLayerAdded) {
|
|
4455
4428
|
taskUpdates.push({ taskId: 2, count: 1 });
|
|
4456
4429
|
}
|
|
4457
|
-
if (
|
|
4430
|
+
if (EffectProcessor.bileDetonationTrigger) {
|
|
4458
4431
|
taskUpdates.push({ taskId: 3, count: 1 });
|
|
4459
4432
|
}
|
|
4460
|
-
if (
|
|
4433
|
+
if (EffectProcessor.layerReduced) {
|
|
4461
4434
|
taskUpdates.push({ taskId: 4, count: 1 });
|
|
4462
4435
|
}
|
|
4463
|
-
if (
|
|
4436
|
+
if (EffectProcessor.energyDrained) {
|
|
4464
4437
|
taskUpdates.push({ taskId: 5, count: 1 });
|
|
4465
4438
|
}
|
|
4466
|
-
const isDead =
|
|
4467
|
-
|
|
4468
|
-
HP: Math.max(newHP, 0),
|
|
4469
|
-
isActive: !isDead
|
|
4470
|
-
});
|
|
4471
|
-
scatterEffectMessages.push(...passiveResult.messages.map((m) => ` 对 ${secondaryTarget.name} ${m}`));
|
|
4439
|
+
const isDead = currentHP <= 0;
|
|
4440
|
+
scatterEffectMessages.push(...EffectProcessor.messages.map((m) => ` 对 ${secondaryTarget.name} ${m}`));
|
|
4472
4441
|
if (isDead) {
|
|
4473
4442
|
actuallyDead.push(secondaryTarget.name);
|
|
4474
4443
|
}
|
|
@@ -4477,26 +4446,10 @@ async function handleScatterAttack(ctx, session, config, handle, equippedWeapon,
|
|
|
4477
4446
|
scatterEffectMessages,
|
|
4478
4447
|
extraDamages,
|
|
4479
4448
|
actuallyDead,
|
|
4480
|
-
scatterBroadcast: null,
|
|
4481
|
-
// 稍后处理广播
|
|
4482
4449
|
taskUpdates
|
|
4483
4450
|
};
|
|
4484
4451
|
}
|
|
4485
4452
|
__name(handleScatterAttack, "handleScatterAttack");
|
|
4486
|
-
async function applyAttackResults(ctx, targetBoss, result) {
|
|
4487
|
-
const { currentHP, isDefeated } = result;
|
|
4488
|
-
if (isDefeated) {
|
|
4489
|
-
await ctx.database.set("ggcevo_boss", { name: targetBoss.name }, {
|
|
4490
|
-
isActive: false,
|
|
4491
|
-
HP: 0
|
|
4492
|
-
});
|
|
4493
|
-
} else {
|
|
4494
|
-
await ctx.database.set("ggcevo_boss", { name: targetBoss.name }, {
|
|
4495
|
-
HP: Math.max(currentHP, 0)
|
|
4496
|
-
});
|
|
4497
|
-
}
|
|
4498
|
-
}
|
|
4499
|
-
__name(applyAttackResults, "applyAttackResults");
|
|
4500
4453
|
async function handleDeathTargets(ctx, deadTargets, killerName, killerHandle) {
|
|
4501
4454
|
const bossBroadcast = [];
|
|
4502
4455
|
const cleanerBroadcast = [];
|
|
@@ -4526,39 +4479,6 @@ async function handleDeathTargets(ctx, deadTargets, killerName, killerHandle) {
|
|
|
4526
4479
|
"🏆 伤害排行榜奖励:",
|
|
4527
4480
|
...rewardMessages
|
|
4528
4481
|
);
|
|
4529
|
-
} else {
|
|
4530
|
-
if (deadBoss.name === "机械感染虫") {
|
|
4531
|
-
const [mainBoss] = await ctx.database.get("ggcevo_boss", {
|
|
4532
|
-
groupId: deadBoss.groupId,
|
|
4533
|
-
type: "主宰",
|
|
4534
|
-
isActive: true
|
|
4535
|
-
});
|
|
4536
|
-
if (mainBoss && !mainBoss.skills.includes("孤立无援")) {
|
|
4537
|
-
await ctx.database.set("ggcevo_boss", { name: mainBoss.name }, {
|
|
4538
|
-
skills: [...mainBoss.skills, "孤立无援"]
|
|
4539
|
-
});
|
|
4540
|
-
bossBroadcast.push("💥 机械感染虫已阵亡,空间站感染虫进入【孤立无援】状态,受到的伤害+20%!");
|
|
4541
|
-
}
|
|
4542
|
-
} else {
|
|
4543
|
-
const remainingMinions = await ctx.database.get("ggcevo_boss", {
|
|
4544
|
-
groupId: deadBoss.groupId,
|
|
4545
|
-
type: "子代",
|
|
4546
|
-
isActive: true
|
|
4547
|
-
});
|
|
4548
|
-
if (remainingMinions.length === 0) {
|
|
4549
|
-
const [mainBoss] = await ctx.database.get("ggcevo_boss", {
|
|
4550
|
-
groupId: deadBoss.groupId,
|
|
4551
|
-
type: "主宰",
|
|
4552
|
-
isActive: true
|
|
4553
|
-
});
|
|
4554
|
-
if (mainBoss && !mainBoss.skills.includes("孤立无援")) {
|
|
4555
|
-
await ctx.database.set("ggcevo_boss", { name: mainBoss.name }, {
|
|
4556
|
-
skills: [...mainBoss.skills, "孤立无援"]
|
|
4557
|
-
});
|
|
4558
|
-
bossBroadcast.push(`💥 所有子代已阵亡,${mainBoss.name}进入【孤立无援】状态,受到的伤害+20%!`);
|
|
4559
|
-
}
|
|
4560
|
-
}
|
|
4561
|
-
}
|
|
4562
4482
|
}
|
|
4563
4483
|
}
|
|
4564
4484
|
return {
|
|
@@ -4669,13 +4589,8 @@ ${scatterResult.scatterEffectMessages.map((m) => `▸ ${m}`).join("\n")}`,
|
|
|
4669
4589
|
return messages.filter((line) => line).join("\n");
|
|
4670
4590
|
}
|
|
4671
4591
|
__name(buildResultMessage, "buildResultMessage");
|
|
4672
|
-
async function handleBroadcasts(ctx, groupIds,
|
|
4592
|
+
async function handleBroadcasts(ctx, groupIds, bossEventBroadcast, cleanerRewardBroadcast, isPrimaryAttack) {
|
|
4673
4593
|
const broadcastMessages = [];
|
|
4674
|
-
if (scatterBroadcast) {
|
|
4675
|
-
const scatterMsg = Array.isArray(scatterBroadcast) ? scatterBroadcast.join("\n") : scatterBroadcast;
|
|
4676
|
-
broadcastMessages.push(`✨ 散射攻击结果
|
|
4677
|
-
${scatterMsg}`);
|
|
4678
|
-
}
|
|
4679
4594
|
if (bossEventBroadcast) {
|
|
4680
4595
|
const bossMsg = Array.isArray(bossEventBroadcast) ? bossEventBroadcast.join("\n") : bossEventBroadcast;
|
|
4681
4596
|
broadcastMessages.push(bossMsg);
|
|
@@ -4717,6 +4632,91 @@ async function updateTaskProgress(ctx, handle, taskUpdates) {
|
|
|
4717
4632
|
}
|
|
4718
4633
|
}
|
|
4719
4634
|
__name(updateTaskProgress, "updateTaskProgress");
|
|
4635
|
+
function getMaxHPByName2(bossName) {
|
|
4636
|
+
for (const boss of bossPool) {
|
|
4637
|
+
if (boss.main.name === bossName) {
|
|
4638
|
+
return boss.main.maxHP;
|
|
4639
|
+
}
|
|
4640
|
+
for (const minion of boss.minions) {
|
|
4641
|
+
if (minion.name === bossName) {
|
|
4642
|
+
return minion.maxHP;
|
|
4643
|
+
}
|
|
4644
|
+
}
|
|
4645
|
+
}
|
|
4646
|
+
return void 0;
|
|
4647
|
+
}
|
|
4648
|
+
__name(getMaxHPByName2, "getMaxHPByName");
|
|
4649
|
+
function getMaxEnergyByName2(bossName) {
|
|
4650
|
+
for (const boss of bossPool) {
|
|
4651
|
+
if (boss.main.name === bossName) {
|
|
4652
|
+
return boss.main.maxEnergy;
|
|
4653
|
+
}
|
|
4654
|
+
for (const minion of boss.minions) {
|
|
4655
|
+
if (minion.name === bossName) {
|
|
4656
|
+
return minion.maxEnergy;
|
|
4657
|
+
}
|
|
4658
|
+
}
|
|
4659
|
+
}
|
|
4660
|
+
return void 0;
|
|
4661
|
+
}
|
|
4662
|
+
__name(getMaxEnergyByName2, "getMaxEnergyByName");
|
|
4663
|
+
async function updateDatabaseWithStats(ctx, stats) {
|
|
4664
|
+
const bossData = await ctx.database.get("ggcevo_boss", { name: stats.name });
|
|
4665
|
+
const maxHP = getMaxHPByName2(stats.name);
|
|
4666
|
+
const maxEnergy = getMaxEnergyByName2(stats.name);
|
|
4667
|
+
if (!bossData || bossData.length === 0) {
|
|
4668
|
+
return;
|
|
4669
|
+
}
|
|
4670
|
+
const boss = bossData[0];
|
|
4671
|
+
const updateData = {};
|
|
4672
|
+
if (stats.hpChange !== 0) {
|
|
4673
|
+
const newHP = boss.HP + stats.hpChange;
|
|
4674
|
+
updateData.HP = Math.max(0, Math.min(maxHP, newHP));
|
|
4675
|
+
}
|
|
4676
|
+
if (stats.energyChange !== 0) {
|
|
4677
|
+
const newEnergy = boss.energy + stats.energyChange;
|
|
4678
|
+
updateData.energy = Math.max(0, Math.min(maxEnergy, newEnergy));
|
|
4679
|
+
}
|
|
4680
|
+
if (stats.skillStacksChanged !== 0) {
|
|
4681
|
+
updateData.skillStacks = Math.max(0, boss.skillStacks + stats.skillStacksChanged);
|
|
4682
|
+
}
|
|
4683
|
+
if (stats.statusLayersChanged !== 0) {
|
|
4684
|
+
updateData.statusLayers = Math.max(0, boss.statusLayers + stats.statusLayersChanged);
|
|
4685
|
+
}
|
|
4686
|
+
if (stats.radiationLayersChange !== 0) {
|
|
4687
|
+
updateData.radiationLayers = Math.max(0, boss.radiationLayers + stats.radiationLayersChange);
|
|
4688
|
+
}
|
|
4689
|
+
if (stats.coldLayersChange !== 0) {
|
|
4690
|
+
updateData.coldLayers = Math.max(0, boss.coldLayers + stats.coldLayersChange);
|
|
4691
|
+
}
|
|
4692
|
+
if (stats.tagsAdded.length > 0 || stats.tagsRemoved.length > 0) {
|
|
4693
|
+
updateData.tags = [
|
|
4694
|
+
...boss.tags.filter((tag) => !stats.tagsRemoved.includes(tag)),
|
|
4695
|
+
...stats.tagsAdded.filter((tag) => !boss.tags.includes(tag))
|
|
4696
|
+
];
|
|
4697
|
+
}
|
|
4698
|
+
if (stats.skillsAdded.length > 0 || stats.skillsRemoved.length > 0) {
|
|
4699
|
+
updateData.skills = [
|
|
4700
|
+
...boss.skills.filter((skill) => !stats.skillsRemoved.includes(skill)),
|
|
4701
|
+
...stats.skillsAdded.filter((skill) => !boss.skills.includes(skill))
|
|
4702
|
+
];
|
|
4703
|
+
}
|
|
4704
|
+
if (stats.lastWeaponName) {
|
|
4705
|
+
updateData.lastWeaponName = stats.lastWeaponName;
|
|
4706
|
+
}
|
|
4707
|
+
if (Object.keys(updateData).length > 0) {
|
|
4708
|
+
await ctx.database.set("ggcevo_boss", { name: stats.name }, updateData);
|
|
4709
|
+
}
|
|
4710
|
+
}
|
|
4711
|
+
__name(updateDatabaseWithStats, "updateDatabaseWithStats");
|
|
4712
|
+
async function saveAndClearStats(ctx) {
|
|
4713
|
+
for (const name2 in battleStatsMap) {
|
|
4714
|
+
const stats = battleStatsMap[name2];
|
|
4715
|
+
await updateDatabaseWithStats(ctx, stats);
|
|
4716
|
+
}
|
|
4717
|
+
Object.keys(battleStatsMap).forEach((key) => delete battleStatsMap[key]);
|
|
4718
|
+
}
|
|
4719
|
+
__name(saveAndClearStats, "saveAndClearStats");
|
|
4720
4720
|
|
|
4721
4721
|
// src/index.ts
|
|
4722
4722
|
var name = "ggcevo-game";
|
|
@@ -4904,18 +4904,17 @@ function apply(ctx, config) {
|
|
|
4904
4904
|
});
|
|
4905
4905
|
ctx.model.extend("ggcevo_boss", {
|
|
4906
4906
|
name: "string",
|
|
4907
|
+
groupId: "unsigned",
|
|
4907
4908
|
type: "string",
|
|
4908
4909
|
HP: "unsigned",
|
|
4909
|
-
tags: { type: "list", initial: [] },
|
|
4910
|
-
skills: { type: "list", initial: [] },
|
|
4911
|
-
// 明确数组元素类型
|
|
4912
|
-
Skillcountpoints: "unsigned",
|
|
4913
|
-
Vulnerability: "unsigned",
|
|
4914
|
-
freezing: "unsigned",
|
|
4915
4910
|
energy: "unsigned",
|
|
4911
|
+
tags: "list",
|
|
4912
|
+
skills: "list",
|
|
4913
|
+
skillStacks: "unsigned",
|
|
4914
|
+
statusLayers: "unsigned",
|
|
4915
|
+
radiationLayers: "unsigned",
|
|
4916
|
+
coldLayers: "unsigned",
|
|
4916
4917
|
lastWeaponName: "string",
|
|
4917
|
-
// 新增字段,记录伪装技能的信息
|
|
4918
|
-
groupId: "unsigned",
|
|
4919
4918
|
isActive: "boolean",
|
|
4920
4919
|
respawnTime: "timestamp"
|
|
4921
4920
|
}, {
|
|
@@ -4991,8 +4990,8 @@ function apply(ctx, config) {
|
|
|
4991
4990
|
const totalBosses = await ctx.database.select("ggcevo_boss").execute((row) => import_koishi.$.count(row.name));
|
|
4992
4991
|
const groupId = [...config.groupId];
|
|
4993
4992
|
if (totalBosses === 0) {
|
|
4994
|
-
await activateNextBossGroup(ctx);
|
|
4995
|
-
await ctx.broadcast(groupId, `🔄
|
|
4993
|
+
const firstBoss = await activateNextBossGroup(ctx);
|
|
4994
|
+
await ctx.broadcast(groupId, `🔄 咕咕之战系统已初始化,首个主宰【${firstBoss.name}】已登场!`);
|
|
4996
4995
|
return;
|
|
4997
4996
|
}
|
|
4998
4997
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -5002,10 +5001,14 @@ function apply(ctx, config) {
|
|
|
5002
5001
|
isActive: false
|
|
5003
5002
|
}).execute();
|
|
5004
5003
|
for (const group of expiredGroups) {
|
|
5004
|
+
const currentGroupId = group.groupId;
|
|
5005
5005
|
await ctx.database.remove("ggcevo_boss_damage", {});
|
|
5006
5006
|
await ctx.database.remove("ggcevo_boss", {});
|
|
5007
|
-
await activateNextBossGroup(ctx,
|
|
5008
|
-
await ctx.broadcast(
|
|
5007
|
+
const newBossGroup = await activateNextBossGroup(ctx, currentGroupId);
|
|
5008
|
+
await ctx.broadcast(
|
|
5009
|
+
groupId,
|
|
5010
|
+
`🔄 新的主宰【${newBossGroup.name}】组已刷新,快去挑战吧!`
|
|
5011
|
+
);
|
|
5009
5012
|
}
|
|
5010
5013
|
}, 60 * 1e3);
|
|
5011
5014
|
ctx.setInterval(async () => {
|
|
@@ -7183,7 +7186,6 @@ ${validTypes.join("、")}`;
|
|
|
7183
7186
|
ctx.command("ggcevo/攻击 <bossName>").usage("请输入要攻击的异形名称(例如:攻击 异齿猛兽 或 攻击 寒冰王蛇)").action(async (argv, bossName) => {
|
|
7184
7187
|
const session = argv.session;
|
|
7185
7188
|
let bossEventBroadcast = null;
|
|
7186
|
-
let scatterBroadcast = null;
|
|
7187
7189
|
let cleanerRewardBroadcast = null;
|
|
7188
7190
|
const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
|
|
7189
7191
|
if (!profile) return "🔒 需要先绑定游戏句柄。";
|
|
@@ -7229,16 +7231,11 @@ ${validTypes.join("、")}`;
|
|
|
7229
7231
|
ctx,
|
|
7230
7232
|
session,
|
|
7231
7233
|
config2,
|
|
7232
|
-
handle,
|
|
7233
7234
|
equippedWeapon,
|
|
7234
7235
|
targetBoss,
|
|
7235
7236
|
activeBosses,
|
|
7236
|
-
|
|
7237
|
-
weaponName,
|
|
7238
|
-
weaponData,
|
|
7239
|
-
maxHP
|
|
7237
|
+
weaponName
|
|
7240
7238
|
);
|
|
7241
|
-
await applyAttackResults(ctx, targetBoss, primaryAttackResult);
|
|
7242
7239
|
const allDeadTargets = [];
|
|
7243
7240
|
if (primaryAttackResult.isDefeated) {
|
|
7244
7241
|
allDeadTargets.push(targetBoss);
|
|
@@ -7251,20 +7248,17 @@ ${validTypes.join("、")}`;
|
|
|
7251
7248
|
ctx,
|
|
7252
7249
|
session,
|
|
7253
7250
|
config2,
|
|
7254
|
-
handle,
|
|
7255
7251
|
equippedWeapon,
|
|
7256
7252
|
targetBoss,
|
|
7257
7253
|
weaponName,
|
|
7258
|
-
|
|
7259
|
-
activeBosses,
|
|
7260
|
-
bossGroup
|
|
7254
|
+
activeBosses
|
|
7261
7255
|
);
|
|
7262
7256
|
scatterResult.actuallyDead.forEach((name2) => {
|
|
7263
7257
|
const deadBoss = activeBosses.find((b) => b.name === name2);
|
|
7264
7258
|
if (deadBoss) allDeadTargets.push(deadBoss);
|
|
7265
7259
|
});
|
|
7266
7260
|
}
|
|
7267
|
-
const totalDamage = primaryAttackResult.
|
|
7261
|
+
const totalDamage = primaryAttackResult.initialDamage + (scatterResult ? scatterResult.extraDamages.reduce((sum, d) => sum + d.damage, 0) : 0);
|
|
7268
7262
|
await updateBossDamageRecord(
|
|
7269
7263
|
ctx,
|
|
7270
7264
|
handle,
|
|
@@ -7289,7 +7283,7 @@ ${validTypes.join("、")}`;
|
|
|
7289
7283
|
if (primaryAttackResult.freezing) {
|
|
7290
7284
|
taskUpdates.push({ taskId: 2, count: 1 });
|
|
7291
7285
|
}
|
|
7292
|
-
if (primaryAttackResult.bileStacks
|
|
7286
|
+
if (primaryAttackResult.bileStacks) {
|
|
7293
7287
|
taskUpdates.push({ taskId: 3, count: 1 });
|
|
7294
7288
|
}
|
|
7295
7289
|
if (primaryAttackResult.pulseApplied) {
|
|
@@ -7323,7 +7317,6 @@ ${validTypes.join("、")}`;
|
|
|
7323
7317
|
await handleBroadcasts(
|
|
7324
7318
|
ctx,
|
|
7325
7319
|
groupId,
|
|
7326
|
-
scatterResult?.scatterBroadcast || null,
|
|
7327
7320
|
bossEventBroadcast,
|
|
7328
7321
|
cleanerRewardBroadcast,
|
|
7329
7322
|
!isScatterAttack
|
|
@@ -7421,15 +7414,15 @@ ${validTypes.join("、")}`;
|
|
|
7421
7414
|
`🔴 主宰:${mainBoss.name}`,
|
|
7422
7415
|
`${mainBossHpBar} (${mainBoss.HP}/${bossGroup.main.maxHP})`
|
|
7423
7416
|
];
|
|
7424
|
-
if (bossGroup.main.
|
|
7417
|
+
if (bossGroup.main.maxEnergy > 0) {
|
|
7425
7418
|
result.push(`⚡ 能量:${mainBoss.energy}/1000`);
|
|
7426
7419
|
}
|
|
7427
7420
|
result.push(`🏷️ 标签:${mainBoss.tags?.join("、") || "无"}`);
|
|
7428
|
-
if (mainBoss.
|
|
7429
|
-
result.push(`☢️ 辐射:${mainBoss.
|
|
7421
|
+
if (mainBoss.radiationLayers > 0) {
|
|
7422
|
+
result.push(`☢️ 辐射:${mainBoss.radiationLayers}层`);
|
|
7430
7423
|
}
|
|
7431
|
-
if (mainBoss.
|
|
7432
|
-
result.push(`❄️ 寒冷:${mainBoss.
|
|
7424
|
+
if (mainBoss.coldLayers > 0) {
|
|
7425
|
+
result.push(`❄️ 寒冷:${mainBoss.coldLayers}层`);
|
|
7433
7426
|
}
|
|
7434
7427
|
result.push(`✨ 被动:`);
|
|
7435
7428
|
if (mainBoss.skills.length > 0) {
|
|
@@ -7439,7 +7432,7 @@ ${validTypes.join("、")}`;
|
|
|
7439
7432
|
}
|
|
7440
7433
|
const countingSkill = mainBoss.skills?.find((s) => ["冷适应", "岗哨机枪", "吸血唾液", "灼烧粘液", "光影之刃"].includes(s));
|
|
7441
7434
|
if (countingSkill) {
|
|
7442
|
-
result.push(`📈 ${countingSkill}:${mainBoss.
|
|
7435
|
+
result.push(`📈 ${countingSkill}:${mainBoss.skillStacks}层`);
|
|
7443
7436
|
}
|
|
7444
7437
|
if (mainBoss.lastWeaponName) {
|
|
7445
7438
|
result.push(`🎭 记录武器:${mainBoss.lastWeaponName}`);
|
|
@@ -7454,15 +7447,15 @@ ${validTypes.join("、")}`;
|
|
|
7454
7447
|
`❤️ ${minion.name}`,
|
|
7455
7448
|
`${minionHpBar} (${minion.HP}/${minionConfig?.maxHP || "未知"})`
|
|
7456
7449
|
];
|
|
7457
|
-
if (minionConfig && minionConfig.
|
|
7450
|
+
if (minionConfig && minionConfig.maxEnergy > 0) {
|
|
7458
7451
|
minionInfo.push(`⚡ 能量:${minion.energy}/1000`);
|
|
7459
7452
|
}
|
|
7460
7453
|
minionInfo.push(`🏷️ 标签:${minion.tags?.join("、") || "无"}`);
|
|
7461
|
-
if (minion.
|
|
7462
|
-
minionInfo.push(`☢️ 辐射:${minion.
|
|
7454
|
+
if (minion.radiationLayers > 0) {
|
|
7455
|
+
minionInfo.push(`☢️ 辐射:${minion.radiationLayers}层`);
|
|
7463
7456
|
}
|
|
7464
|
-
if (minion.
|
|
7465
|
-
minionInfo.push(`❄️ 寒冷:${minion.
|
|
7457
|
+
if (minion.coldLayers > 0) {
|
|
7458
|
+
minionInfo.push(`❄️ 寒冷:${minion.coldLayers}层`);
|
|
7466
7459
|
}
|
|
7467
7460
|
minionInfo.push(`✨ 被动:`);
|
|
7468
7461
|
if (minion.skills.length > 0) {
|
|
@@ -7472,7 +7465,7 @@ ${validTypes.join("、")}`;
|
|
|
7472
7465
|
}
|
|
7473
7466
|
const minionCountingSkill = minion.skills?.find((s) => ["冷适应", "岗哨机枪", "吸血唾液", "灼烧粘液", "光影之刃"].includes(s));
|
|
7474
7467
|
if (minionCountingSkill) {
|
|
7475
|
-
minionInfo.push(`📈 ${minionCountingSkill}:${minion.
|
|
7468
|
+
minionInfo.push(`📈 ${minionCountingSkill}:${minion.skillStacks}层`);
|
|
7476
7469
|
}
|
|
7477
7470
|
if (minion.lastWeaponName) {
|
|
7478
7471
|
minionInfo.push(`🎭 记录武器:${minion.lastWeaponName}`);
|
|
@@ -7485,19 +7478,19 @@ ${validTypes.join("、")}`;
|
|
|
7485
7478
|
});
|
|
7486
7479
|
ctx.command("ggcevo/初始化异形 <groupid:number>", "初始化指定主宰组", { authority: 3 }).alias("初始化yx").action(async (_, groupid) => {
|
|
7487
7480
|
if (!groupid) groupid = 1;
|
|
7488
|
-
const bossConfig = bossPool.find((g) => g.
|
|
7481
|
+
const bossConfig = bossPool.find((g) => g.id === groupid);
|
|
7489
7482
|
if (!bossConfig) {
|
|
7490
7483
|
return `未找到groupid为${groupid}的异形配置`;
|
|
7491
7484
|
}
|
|
7492
7485
|
await ctx.database.remove("ggcevo_boss_damage", {});
|
|
7493
7486
|
await ctx.database.remove("ggcevo_boss", {});
|
|
7494
|
-
|
|
7487
|
+
await ctx.database.create("ggcevo_boss", {
|
|
7495
7488
|
name: bossConfig.main.name,
|
|
7496
7489
|
type: "主宰",
|
|
7497
7490
|
HP: bossConfig.main.maxHP,
|
|
7498
7491
|
tags: bossConfig.main.tags,
|
|
7499
7492
|
skills: [...bossConfig.main.passive],
|
|
7500
|
-
energy: bossConfig.main.
|
|
7493
|
+
energy: bossConfig.main.maxEnergy,
|
|
7501
7494
|
groupId: groupid,
|
|
7502
7495
|
isActive: true,
|
|
7503
7496
|
respawnTime: /* @__PURE__ */ new Date()
|
|
@@ -7509,13 +7502,13 @@ ${validTypes.join("、")}`;
|
|
|
7509
7502
|
HP: minion.maxHP,
|
|
7510
7503
|
tags: minion.tags,
|
|
7511
7504
|
skills: [...minion.passive],
|
|
7512
|
-
energy: minion.
|
|
7505
|
+
energy: minion.maxEnergy,
|
|
7513
7506
|
groupId: groupid,
|
|
7514
7507
|
isActive: true,
|
|
7515
7508
|
respawnTime: /* @__PURE__ */ new Date()
|
|
7516
7509
|
});
|
|
7517
7510
|
}
|
|
7518
|
-
return `✅ 异形初始化成功!当前主宰:${bossConfig.main.name}
|
|
7511
|
+
return `✅ 异形初始化成功!当前主宰:${bossConfig.main.name}`;
|
|
7519
7512
|
});
|
|
7520
7513
|
ctx.command("ggcevo/祈愿").action(async (argv) => {
|
|
7521
7514
|
const session = argv.session;
|
|
@@ -8443,7 +8436,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
8443
8436
|
handle,
|
|
8444
8437
|
taskId: taskConfig.id
|
|
8445
8438
|
});
|
|
8446
|
-
if (!taskData) return `⚠️
|
|
8439
|
+
if (!taskData) return `⚠️ 任务进度不足!当前进度:0/${taskConfig.target}`;
|
|
8447
8440
|
if (taskData.progress < taskConfig.target) {
|
|
8448
8441
|
return `⚠️ 任务进度不足!当前进度:${taskData.progress}/${taskConfig.target}`;
|
|
8449
8442
|
}
|
|
@@ -8475,12 +8468,12 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
8475
8468
|
totalRewards: newTotalRewards
|
|
8476
8469
|
}], ["handle"]);
|
|
8477
8470
|
const response = [
|
|
8478
|
-
`🎉
|
|
8471
|
+
`🎉 成功完成 ${completableTimes} 次【${taskName}】任务!`
|
|
8479
8472
|
];
|
|
8480
8473
|
if (totalBonus > 0) {
|
|
8481
|
-
response.push(`💰
|
|
8474
|
+
response.push(`💰 获得奖励:${totalReward}金币 (基础值: ${baseTotal}金币)`);
|
|
8482
8475
|
} else {
|
|
8483
|
-
response.push(`💰
|
|
8476
|
+
response.push(`💰 获得奖励:${totalReward}金币`);
|
|
8484
8477
|
}
|
|
8485
8478
|
if (totalBonus > 0) {
|
|
8486
8479
|
response.push(`⚡ 加成效果:`);
|
|
@@ -8495,12 +8488,6 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
8495
8488
|
`📊 累计完成次数: ${newCompletions}次`,
|
|
8496
8489
|
`⚙️ 剩余进度点数: ${remainingProgress}/${taskConfig.target}`
|
|
8497
8490
|
);
|
|
8498
|
-
if (remainingProgress > 0) {
|
|
8499
|
-
response.push(`💡 剩余进度可完成 ${Math.floor(remainingProgress / taskConfig.target)} 次`);
|
|
8500
|
-
}
|
|
8501
|
-
if (completableTimes > 1) {
|
|
8502
|
-
response.push(`💡 成功完成${completableTimes}次任务,已发放全部奖励`);
|
|
8503
|
-
}
|
|
8504
8491
|
return response.join("\n");
|
|
8505
8492
|
} catch (error) {
|
|
8506
8493
|
console.error("完成任务命令时发生错误:", error);
|