koishi-plugin-ggcevo-game 1.4.32 → 1.4.34
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 +8 -175
- package/lib/boss/passive.d.ts +207 -269
- package/lib/boss/passivehandler.d.ts +52 -34
- package/lib/database.d.ts +5 -4
- package/lib/index.js +1984 -1982
- package/lib/tasks.d.ts +40 -40
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1054,20 +1054,16 @@ var Tasklist = {
|
|
|
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
|
+
{
|
|
1062
1059
|
id: 1,
|
|
1063
|
-
// ID放在BOSS组层级
|
|
1064
1060
|
main: {
|
|
1065
1061
|
name: "异齿猛兽首领",
|
|
1066
1062
|
type: "主宰",
|
|
1067
1063
|
maxHP: 15e3,
|
|
1068
1064
|
maxEnergy: 0,
|
|
1069
|
-
tags:
|
|
1070
|
-
passive:
|
|
1065
|
+
tags: ["重甲", "生物", "异形"],
|
|
1066
|
+
passive: ["异形甲壳"]
|
|
1071
1067
|
},
|
|
1072
1068
|
minions: [
|
|
1073
1069
|
{
|
|
@@ -1075,20 +1071,20 @@ var bossPool = [
|
|
|
1075
1071
|
type: "子代",
|
|
1076
1072
|
maxHP: 5e3,
|
|
1077
1073
|
maxEnergy: 0,
|
|
1078
|
-
tags:
|
|
1079
|
-
passive:
|
|
1074
|
+
tags: ["重甲", "生物", "重型", "异形"],
|
|
1075
|
+
passive: ["弱化形态", "异形甲壳"]
|
|
1080
1076
|
}
|
|
1081
1077
|
]
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1084
1080
|
id: 2,
|
|
1085
1081
|
main: {
|
|
1086
1082
|
name: "寒冰王蛇",
|
|
1087
1083
|
type: "主宰",
|
|
1088
1084
|
maxHP: 15e3,
|
|
1089
1085
|
maxEnergy: 0,
|
|
1090
|
-
tags:
|
|
1091
|
-
passive:
|
|
1086
|
+
tags: ["重甲", "生物", "惧热", "重型", "异形"],
|
|
1087
|
+
passive: ["冰霜环绕", "冰霜进化"]
|
|
1092
1088
|
},
|
|
1093
1089
|
minions: [
|
|
1094
1090
|
{
|
|
@@ -1096,20 +1092,20 @@ var bossPool = [
|
|
|
1096
1092
|
type: "子代",
|
|
1097
1093
|
maxHP: 5e3,
|
|
1098
1094
|
maxEnergy: 0,
|
|
1099
|
-
tags:
|
|
1100
|
-
passive:
|
|
1095
|
+
tags: ["生物", "惧热", "异形"],
|
|
1096
|
+
passive: ["弱化形态", "冰霜回复", "冰霜进化"]
|
|
1101
1097
|
}
|
|
1102
1098
|
]
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1105
1101
|
id: 3,
|
|
1106
1102
|
main: {
|
|
1107
1103
|
name: "莽兽",
|
|
1108
1104
|
type: "主宰",
|
|
1109
1105
|
maxHP: 12e3,
|
|
1110
1106
|
maxEnergy: 0,
|
|
1111
|
-
tags:
|
|
1112
|
-
passive:
|
|
1107
|
+
tags: ["重甲", "生物", "重型", "异形"],
|
|
1108
|
+
passive: ["应激甲壳II", "求生本能II", "冷适应"]
|
|
1113
1109
|
},
|
|
1114
1110
|
minions: [
|
|
1115
1111
|
{
|
|
@@ -1117,28 +1113,28 @@ var bossPool = [
|
|
|
1117
1113
|
type: "子代",
|
|
1118
1114
|
maxHP: 4e3,
|
|
1119
1115
|
maxEnergy: 0,
|
|
1120
|
-
tags:
|
|
1121
|
-
passive:
|
|
1116
|
+
tags: ["重甲", "生物", "重型", "异形"],
|
|
1117
|
+
passive: ["弱化形态", "应激甲壳I", "求生本能I", "冷适应"]
|
|
1122
1118
|
},
|
|
1123
1119
|
{
|
|
1124
1120
|
name: "剧毒畸变体",
|
|
1125
1121
|
type: "子代",
|
|
1126
1122
|
maxHP: 4e3,
|
|
1127
1123
|
maxEnergy: 0,
|
|
1128
|
-
tags:
|
|
1129
|
-
passive:
|
|
1124
|
+
tags: ["重甲", "生物", "重型", "异形"],
|
|
1125
|
+
passive: ["弱化形态", "应激甲壳I", "求生本能I", "冷适应"]
|
|
1130
1126
|
}
|
|
1131
1127
|
]
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1134
1130
|
id: 4,
|
|
1135
1131
|
main: {
|
|
1136
1132
|
name: "空间站感染虫",
|
|
1137
1133
|
type: "主宰",
|
|
1138
1134
|
maxHP: 1e4,
|
|
1139
1135
|
maxEnergy: 0,
|
|
1140
|
-
tags:
|
|
1141
|
-
passive:
|
|
1136
|
+
tags: ["重甲", "生物", "机械", "异形"],
|
|
1137
|
+
passive: ["感染空间站", "病毒云", "霉菌滋生"]
|
|
1142
1138
|
},
|
|
1143
1139
|
minions: [
|
|
1144
1140
|
{
|
|
@@ -1146,28 +1142,28 @@ var bossPool = [
|
|
|
1146
1142
|
type: "子代",
|
|
1147
1143
|
maxHP: 3e3,
|
|
1148
1144
|
maxEnergy: 0,
|
|
1149
|
-
tags:
|
|
1150
|
-
passive:
|
|
1145
|
+
tags: ["重甲", "生物", "机械", "异形"],
|
|
1146
|
+
passive: ["弱化形态", "病毒云", "霉菌滋生"]
|
|
1151
1147
|
},
|
|
1152
1148
|
{
|
|
1153
1149
|
name: "空间站哨枪塔",
|
|
1154
1150
|
type: "子代",
|
|
1155
1151
|
maxHP: 5e3,
|
|
1156
1152
|
maxEnergy: 0,
|
|
1157
|
-
tags:
|
|
1158
|
-
passive:
|
|
1153
|
+
tags: ["重甲", "机械", "建筑"],
|
|
1154
|
+
passive: ["岗哨机枪", "结构装甲"]
|
|
1159
1155
|
}
|
|
1160
1156
|
]
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1163
1159
|
id: 5,
|
|
1164
1160
|
main: {
|
|
1165
1161
|
name: "吸血蝙蝠首领",
|
|
1166
1162
|
type: "主宰",
|
|
1167
1163
|
maxHP: 12e3,
|
|
1168
1164
|
maxEnergy: 0,
|
|
1169
|
-
tags:
|
|
1170
|
-
passive:
|
|
1165
|
+
tags: ["生物", "异形"],
|
|
1166
|
+
passive: ["吸血唾液", "进食", "吐血", "嗜血狂暴"]
|
|
1171
1167
|
},
|
|
1172
1168
|
minions: [
|
|
1173
1169
|
{
|
|
@@ -1175,20 +1171,20 @@ var bossPool = [
|
|
|
1175
1171
|
type: "子代",
|
|
1176
1172
|
maxHP: 4e3,
|
|
1177
1173
|
maxEnergy: 0,
|
|
1178
|
-
tags:
|
|
1179
|
-
passive:
|
|
1174
|
+
tags: ["生物", "异形"],
|
|
1175
|
+
passive: ["弱化形态", "吸血唾液", "进食", "吐血"]
|
|
1180
1176
|
}
|
|
1181
1177
|
]
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1184
1180
|
id: 6,
|
|
1185
1181
|
main: {
|
|
1186
1182
|
name: "亚电主宰者",
|
|
1187
1183
|
type: "主宰",
|
|
1188
1184
|
maxHP: 2e4,
|
|
1189
1185
|
maxEnergy: 1e3,
|
|
1190
|
-
tags:
|
|
1191
|
-
passive:
|
|
1186
|
+
tags: ["护盾", "灵能", "重型", "异形"],
|
|
1187
|
+
passive: ["超导体", "能源虹吸", "电能冲击波", "电能立场", "脉冲", "能量黑洞"]
|
|
1192
1188
|
},
|
|
1193
1189
|
minions: [
|
|
1194
1190
|
{
|
|
@@ -1196,20 +1192,20 @@ var bossPool = [
|
|
|
1196
1192
|
type: "子代",
|
|
1197
1193
|
maxHP: 6e3,
|
|
1198
1194
|
maxEnergy: 0,
|
|
1199
|
-
tags:
|
|
1200
|
-
passive:
|
|
1195
|
+
tags: ["护盾", "灵能", "异形"],
|
|
1196
|
+
passive: ["弱化形态", "超导体", "能源虹吸", "能量黑洞"]
|
|
1201
1197
|
}
|
|
1202
1198
|
]
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1205
1201
|
id: 7,
|
|
1206
1202
|
main: {
|
|
1207
1203
|
name: "烈焰庞兽",
|
|
1208
1204
|
type: "主宰",
|
|
1209
1205
|
maxHP: 2e4,
|
|
1210
1206
|
maxEnergy: 0,
|
|
1211
|
-
tags:
|
|
1212
|
-
passive:
|
|
1207
|
+
tags: ["重甲", "生物", "惧寒", "重型", "异形"],
|
|
1208
|
+
passive: ["火焰异形", "庞兽狂暴", "灼烧粘液", "炼狱爆弹", "火焰吐息", "太阳耀斑"]
|
|
1213
1209
|
},
|
|
1214
1210
|
minions: [
|
|
1215
1211
|
{
|
|
@@ -1217,20 +1213,20 @@ var bossPool = [
|
|
|
1217
1213
|
type: "子代",
|
|
1218
1214
|
maxHP: 5e3,
|
|
1219
1215
|
maxEnergy: 0,
|
|
1220
|
-
tags:
|
|
1221
|
-
passive:
|
|
1216
|
+
tags: ["重甲", "生物", "惧寒", "异形"],
|
|
1217
|
+
passive: ["弱化形态", "火焰异形", "灼烧粘液", "腐蚀胆汁", "燃烧潜地"]
|
|
1222
1218
|
}
|
|
1223
1219
|
]
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1220
|
+
},
|
|
1221
|
+
{
|
|
1226
1222
|
id: 8,
|
|
1227
1223
|
main: {
|
|
1228
1224
|
name: "狂猎猛禽首领",
|
|
1229
1225
|
type: "主宰",
|
|
1230
1226
|
maxHP: 2e4,
|
|
1231
1227
|
maxEnergy: 0,
|
|
1232
|
-
tags:
|
|
1233
|
-
passive:
|
|
1228
|
+
tags: ["生物", "异形"],
|
|
1229
|
+
passive: ["猎手异形", "致命一击", "狂暴", "伪装"]
|
|
1234
1230
|
},
|
|
1235
1231
|
minions: [
|
|
1236
1232
|
{
|
|
@@ -1238,28 +1234,28 @@ var bossPool = [
|
|
|
1238
1234
|
type: "子代",
|
|
1239
1235
|
maxHP: 5e3,
|
|
1240
1236
|
maxEnergy: 0,
|
|
1241
|
-
tags:
|
|
1242
|
-
passive:
|
|
1237
|
+
tags: ["生物", "异形"],
|
|
1238
|
+
passive: ["弱化形态", "猎手异形", "狂暴", "伪装"]
|
|
1243
1239
|
},
|
|
1244
1240
|
{
|
|
1245
1241
|
name: "狂猎猛禽2",
|
|
1246
1242
|
type: "子代",
|
|
1247
1243
|
maxHP: 5e3,
|
|
1248
1244
|
maxEnergy: 0,
|
|
1249
|
-
tags:
|
|
1250
|
-
passive:
|
|
1245
|
+
tags: ["生物", "异形"],
|
|
1246
|
+
passive: ["弱化形态", "猎手异形", "狂暴", "伪装"]
|
|
1251
1247
|
}
|
|
1252
1248
|
]
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1255
1251
|
id: 9,
|
|
1256
1252
|
main: {
|
|
1257
1253
|
name: "宇宙界主",
|
|
1258
1254
|
type: "主宰",
|
|
1259
1255
|
maxHP: 2e4,
|
|
1260
1256
|
maxEnergy: 1e3,
|
|
1261
|
-
tags:
|
|
1262
|
-
passive:
|
|
1257
|
+
tags: ["重甲", "护盾", "生物", "灵能", "异形"],
|
|
1258
|
+
passive: ["宇宙能量", "复苏", "光影之刃", "闪电冲锋", "远古预兆", "星界之风", "超视距穿梭"]
|
|
1263
1259
|
},
|
|
1264
1260
|
minions: [
|
|
1265
1261
|
{
|
|
@@ -1267,284 +1263,222 @@ var bossPool = [
|
|
|
1267
1263
|
type: "子代",
|
|
1268
1264
|
maxHP: 5e3,
|
|
1269
1265
|
maxEnergy: 0,
|
|
1270
|
-
tags:
|
|
1271
|
-
passive:
|
|
1266
|
+
tags: ["重甲", "护盾", "生物", "灵能", "异形"],
|
|
1267
|
+
passive: ["弱化形态", "心灵狂热", "星界之风"]
|
|
1272
1268
|
}
|
|
1273
1269
|
]
|
|
1274
|
-
}
|
|
1270
|
+
}
|
|
1275
1271
|
];
|
|
1276
1272
|
|
|
1277
1273
|
// src/boss/passive.ts
|
|
1278
1274
|
var passiveConfig = {
|
|
1279
1275
|
"弱化形态": {
|
|
1280
|
-
|
|
1281
|
-
maxStacks: 0,
|
|
1276
|
+
type: "伤害增减(负面)",
|
|
1282
1277
|
description: "子代防御脆弱,所受伤害提升10%"
|
|
1283
1278
|
},
|
|
1284
1279
|
"异形甲壳": {
|
|
1285
|
-
|
|
1286
|
-
maxStacks: 0,
|
|
1280
|
+
type: "伤害增减(正面)",
|
|
1287
1281
|
description: "强化生物甲壳提供防护,所受伤害降低20%"
|
|
1288
1282
|
},
|
|
1289
|
-
"孤立无援": {
|
|
1290
|
-
effect: 0.2,
|
|
1291
|
-
maxStacks: 0,
|
|
1292
|
-
description: "无存活子代时,所受伤害提升20%"
|
|
1293
|
-
},
|
|
1294
1283
|
"冰霜回复": {
|
|
1295
|
-
|
|
1296
|
-
maxStacks: 0,
|
|
1284
|
+
type: "生存强化(生命回复)",
|
|
1297
1285
|
description: "生命值降至30%以下时触发,立即回复自身40%最大生命值,并为其他存活异形回复10%最大生命值(触发后效果移除)"
|
|
1298
1286
|
},
|
|
1299
1287
|
"冰霜进化": {
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
description: "免疫冰霜类伤害,受到冰霜伤害时额外回复生命值"
|
|
1288
|
+
type: "状态免疫(寒冷伤害免疫)",
|
|
1289
|
+
description: "免疫寒冷类伤害,受到寒冷伤害时额外回复生命值"
|
|
1303
1290
|
},
|
|
1304
1291
|
"冰霜环绕": {
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
description: "生命值降至30%以下时触发,立即回复自身45%最大生命值(触发后效果移除)"
|
|
1292
|
+
type: "生存强化(生命回复+群体增益)",
|
|
1293
|
+
description: "生命值降至30%以下时触发,立即回复自身45%最大生命值,并使所有存活异形获得「寒霜地狱」技能(自身效果触发后移除)"
|
|
1308
1294
|
},
|
|
1309
1295
|
"寒霜地狱": {
|
|
1310
|
-
|
|
1311
|
-
maxStacks: 0,
|
|
1296
|
+
type: "伤害增减(正面)",
|
|
1312
1297
|
description: "暴风雪笼罩战场,所受伤害降低30%"
|
|
1313
1298
|
},
|
|
1314
1299
|
"应激甲壳I": {
|
|
1315
|
-
|
|
1316
|
-
maxStacks: 0,
|
|
1300
|
+
type: "伤害增减(正面)",
|
|
1317
1301
|
description: "基础应激甲壳生效,所受伤害降低20%"
|
|
1318
1302
|
},
|
|
1319
1303
|
"应激甲壳II": {
|
|
1320
|
-
|
|
1321
|
-
maxStacks: 0,
|
|
1304
|
+
type: "伤害增减(正面)",
|
|
1322
1305
|
description: "进阶应激甲壳生效,所受伤害降低25%"
|
|
1323
1306
|
},
|
|
1324
1307
|
"求生本能I": {
|
|
1325
|
-
|
|
1326
|
-
maxStacks: 0,
|
|
1308
|
+
type: "生存强化(生命回复)",
|
|
1327
1309
|
description: "濒死状态下,快速回复30%最大生命值(触发后效果移除)"
|
|
1328
1310
|
},
|
|
1329
1311
|
"求生本能II": {
|
|
1330
|
-
|
|
1331
|
-
maxStacks: 0,
|
|
1312
|
+
type: "生存强化(生命回复)",
|
|
1332
1313
|
description: "濒死状态下,快速回复50%最大生命值(触发后效果移除)"
|
|
1333
1314
|
},
|
|
1334
1315
|
"冷适应": {
|
|
1335
|
-
|
|
1336
|
-
maxStacks: 10,
|
|
1316
|
+
type: "状态免疫(寒冷伤害免疫)",
|
|
1337
1317
|
description: "累计承受10次寒冷伤害后,获得「惧热」标签并获得寒冷伤害免疫"
|
|
1338
1318
|
},
|
|
1339
1319
|
"感染空间站": {
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
description: "若「空间站哨枪塔」存活(该单位不计入子代),自身所受伤害降低50%"
|
|
1320
|
+
type: "伤害增减(正面)",
|
|
1321
|
+
description: "若「空间站哨枪塔」存活,自身所受伤害降低50%"
|
|
1343
1322
|
},
|
|
1344
1323
|
"病毒云": {
|
|
1345
|
-
|
|
1346
|
-
maxStacks: 0,
|
|
1324
|
+
type: "伤害增减(正面)",
|
|
1347
1325
|
description: "释放病毒云雾形成保护,所受伤害降低10%"
|
|
1348
1326
|
},
|
|
1349
1327
|
"霉菌滋生": {
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
description: "受到攻击后,若「空间站哨枪塔」存活,为其恢复1%最大生命值"
|
|
1328
|
+
type: "生存强化(生命回复)",
|
|
1329
|
+
description: "受到攻击后,若「空间站哨枪塔」存活,为其回复1%最大生命值"
|
|
1353
1330
|
},
|
|
1354
1331
|
"岗哨机枪": {
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
description: "累计承受10次攻击后,为所有存活异形恢复其10%最大生命值(可重复触发)"
|
|
1332
|
+
type: "生存强化(生命回复)",
|
|
1333
|
+
description: "每累计承受10次攻击后,为所有其他存活异形回复其10%最大生命值"
|
|
1358
1334
|
},
|
|
1359
1335
|
"结构装甲": {
|
|
1360
|
-
|
|
1361
|
-
maxStacks: 0,
|
|
1336
|
+
type: "伤害增减(正面)",
|
|
1362
1337
|
description: "装备结构装甲,常规伤害降低20%;若伤害来源为热能武器,伤害降低提升至40%"
|
|
1363
1338
|
},
|
|
1364
1339
|
"吸血唾液": {
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
description: "受到攻击时叠加「吸血」层数,每层提供5%减伤(最多叠加20层)"
|
|
1340
|
+
type: "伤害增减(正面)",
|
|
1341
|
+
description: "受到攻击时叠加「吸血唾液」层数,每层提供5%减伤(最多叠加20层)"
|
|
1368
1342
|
},
|
|
1369
1343
|
"进食": {
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
description: "当「吸血」层数达到20层时,下一次受击消耗所有层数并回复20%最大生命值"
|
|
1344
|
+
type: "生存强化(生命回复)",
|
|
1345
|
+
description: "当「吸血唾液」层数达到20层时,下一次受击消耗所有层数并回复20%最大生命值"
|
|
1373
1346
|
},
|
|
1374
1347
|
"嗜血狂暴": {
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
description: "生命值低于50%时触发狂暴状态,每次受击额外叠加1层「吸血」,同时所受伤害降低20%"
|
|
1348
|
+
type: "伤害增减(正面)",
|
|
1349
|
+
description: "生命值低于50%时触发狂暴状态,每次受击额外叠加1层「吸血唾液」,同时所受伤害降低20%"
|
|
1378
1350
|
},
|
|
1379
1351
|
"吐血": {
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
description: "无「吸血」层数时,所受伤害提升20%"
|
|
1383
|
-
},
|
|
1384
|
-
"电能导体": {
|
|
1385
|
-
effect: 0,
|
|
1386
|
-
maxStacks: 0,
|
|
1387
|
-
description: "生命值降至10%以下时,「护盾」标签转换为「重甲」标签"
|
|
1352
|
+
type: "伤害增减(负面)",
|
|
1353
|
+
description: "无「吸血唾液」层数时,所受伤害提升20%"
|
|
1388
1354
|
},
|
|
1389
1355
|
"超导体": {
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
description: "生命值降至5%以下时,「护盾」标签转换为「重甲」标签"
|
|
1356
|
+
type: "状态转换(护盾→重甲)",
|
|
1357
|
+
description: "生命值降至10%以下时,「护盾」标签转换为「重甲」标签"
|
|
1393
1358
|
},
|
|
1394
1359
|
"能量虹吸": {
|
|
1395
|
-
|
|
1396
|
-
maxStacks: 0,
|
|
1360
|
+
type: "伤害增减(正面)",
|
|
1397
1361
|
description: "生命值≥70%时,所受伤害降低40%;生命值≥30%时,伤害降低20%"
|
|
1398
1362
|
},
|
|
1399
1363
|
"能源虹吸": {
|
|
1400
|
-
|
|
1401
|
-
maxStacks: 0,
|
|
1364
|
+
type: "伤害增减(正面)",
|
|
1402
1365
|
description: "能量值≥80%时,所受伤害降低50%;能量值≥50%时,伤害降低30%"
|
|
1403
1366
|
},
|
|
1404
1367
|
"电能立场": {
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
description: "能量值≥30%时,每次受击有55%概率免疫该次伤害(无法免疫寒冷伤害);每存在1层「寒冷」状态,免疫概率降低5%"
|
|
1368
|
+
type: "状态免疫(伤害免疫)",
|
|
1369
|
+
description: "能量值≥30%时,每次受击有55%概率免疫该次伤害(无法免疫寒冷伤害);每存在1层「寒冷」状态,免疫概率降低5%(至多降低50%)"
|
|
1408
1370
|
},
|
|
1409
1371
|
"电能冲击波": {
|
|
1410
|
-
|
|
1411
|
-
maxStacks: 0,
|
|
1372
|
+
type: "生存强化(能量回复)",
|
|
1412
1373
|
description: "每次受击时,回复100点「能量」"
|
|
1413
1374
|
},
|
|
1414
1375
|
"脉冲": {
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
description: "能量值≥30%时,每次受击有60%概率为所有存活异形回复100点生命值;每存在1层「寒冷」状态,概率降低5%"
|
|
1376
|
+
type: "生存强化(生命回复)",
|
|
1377
|
+
description: "能量值≥30%时,每次受击有60%概率为所有存活异形回复100点生命值;每存在1层「寒冷」状态,概率降低5%(至多降低50%)"
|
|
1418
1378
|
},
|
|
1419
1379
|
"能量黑洞": {
|
|
1420
|
-
|
|
1421
|
-
maxStacks: 0,
|
|
1380
|
+
type: "伤害增减(正面)",
|
|
1422
1381
|
description: "存在「能量黑洞」时,所受伤害降低20%"
|
|
1423
1382
|
},
|
|
1424
1383
|
"火焰异形": {
|
|
1425
|
-
|
|
1426
|
-
maxStacks: 0,
|
|
1384
|
+
type: "状态免疫(火焰伤害免疫)",
|
|
1427
1385
|
description: "免疫火焰类伤害,受到火焰伤害时额外回复生命值"
|
|
1428
1386
|
},
|
|
1429
1387
|
"庞兽狂暴": {
|
|
1430
|
-
|
|
1431
|
-
maxStacks: 0,
|
|
1388
|
+
type: "伤害增减(正面)",
|
|
1432
1389
|
description: "生命值低于50%时触发狂暴状态,所受伤害降低50%"
|
|
1433
1390
|
},
|
|
1434
1391
|
"灼烧粘液": {
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
description: "受到伤害时叠加「胆汁」层数;若存在「胆汁」层数时受到火焰攻击,立即清空层数并回复(层数×10)点生命值"
|
|
1392
|
+
type: "生存强化(生命回复)",
|
|
1393
|
+
description: "受到伤害时叠加「灼烧粘液」层数;若存在「灼烧粘液」层数时受到火焰攻击,立即清空层数并回复(层数×10)点生命值"
|
|
1438
1394
|
},
|
|
1439
1395
|
"腐蚀胆汁": {
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
description: "「胆汁」层数达到10层时,下一次受击为所有存活异形回复1000点生命值并清空层数"
|
|
1396
|
+
type: "生存强化(生命回复)",
|
|
1397
|
+
description: "「灼烧粘液」层数达到10层时,下一次受击为所有存活异形回复1000点生命值并清空层数"
|
|
1443
1398
|
},
|
|
1444
1399
|
"火焰吐息": {
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
description: "「胆汁」层数达到20层时,下一次攻击为所有存活异形回复50%最大生命值并清空层数"
|
|
1400
|
+
type: "生存强化(生命回复)",
|
|
1401
|
+
description: "「灼烧粘液」层数达到20层时,下一次攻击为所有存活异形回复20%最大生命值并清空层数"
|
|
1448
1402
|
},
|
|
1449
1403
|
"太阳耀斑": {
|
|
1450
|
-
|
|
1451
|
-
maxStacks: 0,
|
|
1404
|
+
type: "状态移除+状态免疫(寒冷伤害免疫)",
|
|
1452
1405
|
description: "所有子代阵亡后,移除「惧寒」标签及「孤立无援」并获得寒冷伤害免疫"
|
|
1453
1406
|
},
|
|
1454
1407
|
"燃烧潜地": {
|
|
1455
|
-
|
|
1456
|
-
maxStacks: 0,
|
|
1408
|
+
type: "生存强化(生命回复)",
|
|
1457
1409
|
description: "生命值降至10%以下时触发,立即回复50%最大生命值(触发后效果移除)"
|
|
1458
1410
|
},
|
|
1459
1411
|
"炼狱爆弹": {
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
description: "每存在1层「胆汁」,所受伤害降低5%;若存在存活子代,伤害降低效果额外提升5%(即每层「胆汁」总降低10%)"
|
|
1412
|
+
type: "伤害增减(正面)",
|
|
1413
|
+
description: "每存在1层「灼烧粘液」,所受伤害降低5%;若存在存活子代,伤害降低效果额外提升5%(即每层「灼烧粘液」总降低10%)"
|
|
1463
1414
|
},
|
|
1464
1415
|
"猎手异形": {
|
|
1465
|
-
|
|
1466
|
-
maxStacks: 0,
|
|
1416
|
+
type: "伤害增减(条件性)+状态免疫(火焰/寒冷伤害免疫)",
|
|
1467
1417
|
description: "存在其他存活异形时,所受伤害降低20%;无其他存活异形时,所受伤害提升20%;免疫火焰及寒冷伤害"
|
|
1468
1418
|
},
|
|
1469
1419
|
"狂暴": {
|
|
1470
|
-
|
|
1471
|
-
maxStacks: 0,
|
|
1420
|
+
type: "伤害增减(正面)",
|
|
1472
1421
|
description: "生命值低于50%时触发狂暴状态,所受伤害降低50%"
|
|
1473
1422
|
},
|
|
1474
1423
|
"伪装": {
|
|
1475
|
-
|
|
1476
|
-
maxStacks: 0,
|
|
1424
|
+
type: "伤害增减(正面)",
|
|
1477
1425
|
description: "受击时记录伤害来源的武器名称(仅保留最新),下次受到同名称武器伤害时伤害降低80%"
|
|
1478
1426
|
},
|
|
1479
1427
|
"致命一击": {
|
|
1480
|
-
|
|
1481
|
-
maxStacks: 0,
|
|
1428
|
+
type: "状态免疫(伤害免疫)",
|
|
1482
1429
|
description: "受击时有5%概率免疫该次伤害"
|
|
1483
1430
|
},
|
|
1484
1431
|
"星界之风": {
|
|
1485
|
-
|
|
1486
|
-
maxStacks: 0,
|
|
1432
|
+
type: "生存强化(生命回复)",
|
|
1487
1433
|
description: "受击时有5%概率为所有存活异形回复200点生命值"
|
|
1488
1434
|
},
|
|
1489
1435
|
"心灵狂热": {
|
|
1490
|
-
|
|
1491
|
-
maxStacks: 0,
|
|
1436
|
+
type: "伤害增减(正面)",
|
|
1492
1437
|
description: "生命值低于50%时进入心灵狂热状态,所受伤害降低20%,同时「星界之风」触发概率翻倍"
|
|
1493
1438
|
},
|
|
1494
1439
|
"宇宙能量": {
|
|
1495
|
-
|
|
1496
|
-
maxStacks: 0,
|
|
1440
|
+
type: "生存强化(能量/生命回复)",
|
|
1497
1441
|
description: "受击时回复等同于本次伤害值的「能量」;若「能量」已满,则将溢出部分转换为自身生命值"
|
|
1498
1442
|
},
|
|
1499
1443
|
"复苏": {
|
|
1500
|
-
|
|
1501
|
-
maxStacks: 0,
|
|
1444
|
+
type: "生存强化(生命/能量回复)",
|
|
1502
1445
|
description: "承受致命伤害时免疫死亡,立即回复50%最大生命值及100%「能量」,并获得「灵能构造炉」技能(触发后效果移除)"
|
|
1503
1446
|
},
|
|
1504
1447
|
"光影之刃": {
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
description: "受击后叠加「光影之刃」层数"
|
|
1448
|
+
type: "状态叠加(层数叠加)",
|
|
1449
|
+
description: "受击后叠加「光影之刃」层数(至多50层)"
|
|
1508
1450
|
},
|
|
1509
1451
|
"远古预兆": {
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
description: "受击时有1%概率免疫该次伤害并回复100点「能量」"
|
|
1452
|
+
type: "状态免疫(能量伤害免疫)",
|
|
1453
|
+
description: "受击时有1%概率免疫能量武器伤害并回复100点「能量」"
|
|
1513
1454
|
},
|
|
1514
1455
|
"闪电冲锋": {
|
|
1515
|
-
|
|
1516
|
-
maxStacks: 0,
|
|
1456
|
+
type: "状态增强(触发概率提升)",
|
|
1517
1457
|
description: "每存在1层「光影之刃」,「远古预兆」「灵能构造炉」触发概率各提升0.5%"
|
|
1518
1458
|
},
|
|
1519
1459
|
"超视距穿梭": {
|
|
1520
|
-
|
|
1521
|
-
maxStacks: 0,
|
|
1460
|
+
type: "伤害增减(条件性)",
|
|
1522
1461
|
description: "能量值≥30%时,每层「光影之刃」降低5%所受伤害;能量值≥60%时,每层降低10%;能量值≤10%时,每层提升5%所受伤害"
|
|
1523
1462
|
},
|
|
1524
1463
|
"灵能构造炉": {
|
|
1525
|
-
|
|
1526
|
-
maxStacks: 0,
|
|
1464
|
+
type: "状态获得(技能获得)",
|
|
1527
1465
|
description: "受击后有5%概率随机获得以下技能之一:天启超载护盾、塌缩脉冲、地毯式轰炸、轰炸引导"
|
|
1528
1466
|
},
|
|
1529
1467
|
"天启超载护盾": {
|
|
1530
|
-
|
|
1531
|
-
maxStacks: 0,
|
|
1468
|
+
type: "生存强化(生命回复)",
|
|
1532
1469
|
description: "受击后有5%概率为所有存活异形回复(「光影之刃」层数×10)点生命值"
|
|
1533
1470
|
},
|
|
1534
1471
|
"塌缩脉冲": {
|
|
1535
|
-
|
|
1536
|
-
maxStacks: 0,
|
|
1472
|
+
type: "状态叠加(层数叠加)",
|
|
1537
1473
|
description: "受击后额外叠加1层「光影之刃」"
|
|
1538
1474
|
},
|
|
1539
1475
|
"地毯式轰炸": {
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
description: "触发时移除「孤立无援」,并使自身所受伤害降低100%(免疫所有伤害)"
|
|
1476
|
+
type: "状态移除+伤害增减(正面)",
|
|
1477
|
+
description: "触发时移除「孤立无援」,并使自身所受伤害降低100%"
|
|
1543
1478
|
},
|
|
1544
1479
|
"轰炸引导": {
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
description: "受击后有10%概率回复(「光影之刃」层数×50)点「能量」"
|
|
1480
|
+
type: "生存强化(能量回复)",
|
|
1481
|
+
description: "受击后有5%概率回复(「光影之刃」层数×50)点「能量」"
|
|
1548
1482
|
}
|
|
1549
1483
|
};
|
|
1550
1484
|
|
|
@@ -2079,7 +2013,7 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
2079
2013
|
message: `目标${target}拥有"${targetboss.tags.includes("建筑") ? "建筑" : "重型"}"标签,无法使用此物品。`
|
|
2080
2014
|
};
|
|
2081
2015
|
}
|
|
2082
|
-
const currentCount = targetboss
|
|
2016
|
+
const currentCount = targetboss?.skillStacks || 0;
|
|
2083
2017
|
if (currentCount <= 0) {
|
|
2084
2018
|
return {
|
|
2085
2019
|
success: false,
|
|
@@ -2091,7 +2025,7 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
2091
2025
|
await ctx.database.set(
|
|
2092
2026
|
"ggcevo_boss",
|
|
2093
2027
|
{ name: target },
|
|
2094
|
-
{
|
|
2028
|
+
{ skillStacks: newCount }
|
|
2095
2029
|
);
|
|
2096
2030
|
return {
|
|
2097
2031
|
success: true,
|
|
@@ -2443,1862 +2377,1875 @@ async function getRankInfo(ctx, config, handle) {
|
|
|
2443
2377
|
}
|
|
2444
2378
|
__name(getRankInfo, "getRankInfo");
|
|
2445
2379
|
|
|
2446
|
-
// src/boss/
|
|
2447
|
-
var
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
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%`];
|
|
2454
2452
|
return {
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
// 直接设置伤害为0
|
|
2458
|
-
messages: [`❄️ 【冰霜进化】生效:免疫寒冷伤害,${targetBoss.name}回复${actualHeal}生命值`]
|
|
2453
|
+
buffMultiplier: newBuffMultiplier,
|
|
2454
|
+
messages
|
|
2459
2455
|
};
|
|
2460
2456
|
}
|
|
2461
2457
|
return null;
|
|
2462
|
-
}, "
|
|
2463
|
-
//
|
|
2464
|
-
|
|
2465
|
-
if (
|
|
2466
|
-
|
|
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) {
|
|
2467
2496
|
return null;
|
|
2468
2497
|
}
|
|
2469
|
-
const
|
|
2470
|
-
const
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
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}点生命值`);
|
|
2475
2518
|
});
|
|
2476
|
-
|
|
2477
|
-
|
|
2519
|
+
messages.push(`❄️ 【冰霜回复】触发后技能移除`);
|
|
2520
|
+
return {
|
|
2521
|
+
messages,
|
|
2522
|
+
targetUpdates: {
|
|
2478
2523
|
name: targetBoss.name,
|
|
2479
|
-
|
|
2480
|
-
add: ["寒霜地狱"]
|
|
2524
|
+
updates: targetUpdates
|
|
2481
2525
|
},
|
|
2482
|
-
|
|
2483
|
-
name: m.name,
|
|
2484
|
-
add: ["寒霜地狱"]
|
|
2485
|
-
}))
|
|
2486
|
-
];
|
|
2487
|
-
return {
|
|
2488
|
-
updatedHP,
|
|
2489
|
-
skillUpdates,
|
|
2490
|
-
messages: [
|
|
2491
|
-
`❄️ 【冰霜环绕】生效,${targetBoss.name}回复45%最大生命值(+${healAmount}HP)`,
|
|
2492
|
-
`🌪️ 警告!【寒霜地狱】降临,所有存活的异形获得30%减伤效果`
|
|
2493
|
-
]
|
|
2526
|
+
otherUpdates
|
|
2494
2527
|
};
|
|
2495
|
-
}, "
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
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) {
|
|
2500
2539
|
return null;
|
|
2501
2540
|
}
|
|
2502
|
-
const
|
|
2503
|
-
const
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
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
|
|
2508
2554
|
);
|
|
2509
|
-
if (
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
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
|
+
});
|
|
2518
2568
|
}
|
|
2569
|
+
messages.push(`❄️ 【冰霜环绕】触发后技能移除`);
|
|
2519
2570
|
return {
|
|
2520
|
-
|
|
2521
|
-
|
|
2571
|
+
messages,
|
|
2572
|
+
targetUpdates: {
|
|
2522
2573
|
name: targetBoss.name,
|
|
2523
|
-
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
`❄️ 【冰霜回复】生效,${targetBoss.name}回复${actualSelfHeal}生命值(理论40%最大HP)`,
|
|
2527
|
-
mainBoss ? `,${mainBoss.name}回复${mainHeal}生命值(理论10%最大HP)` : ""
|
|
2528
|
-
].filter(Boolean)
|
|
2574
|
+
updates: targetUpdates
|
|
2575
|
+
},
|
|
2576
|
+
otherUpdates
|
|
2529
2577
|
};
|
|
2530
|
-
}, "
|
|
2531
|
-
//
|
|
2532
|
-
|
|
2533
|
-
|
|
2578
|
+
}, "handleFrostAura"),
|
|
2579
|
+
// 冰霜进化处理(免疫伤害并回复生命值)
|
|
2580
|
+
handleFrostEvolution: /* @__PURE__ */ __name(function(targetBoss, weaponName, damage) {
|
|
2581
|
+
const messages = [];
|
|
2582
|
+
let isImmune = false;
|
|
2583
|
+
if (!targetBoss.skills.includes("冰霜进化")) {
|
|
2534
2584
|
return null;
|
|
2535
2585
|
}
|
|
2536
|
-
const
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
}
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
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%`];
|
|
2545
2612
|
return {
|
|
2546
|
-
|
|
2613
|
+
nerfMultiplier: newNerfMultiplier,
|
|
2614
|
+
messages
|
|
2547
2615
|
};
|
|
2548
2616
|
}
|
|
2549
2617
|
return null;
|
|
2550
|
-
}, "
|
|
2551
|
-
//
|
|
2552
|
-
|
|
2553
|
-
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%`];
|
|
2554
2624
|
return {
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
messages: [`❄️ 【冷适应】生效:免疫寒冷伤害`]
|
|
2625
|
+
nerfMultiplier: newNerfMultiplier,
|
|
2626
|
+
messages
|
|
2558
2627
|
};
|
|
2559
2628
|
}
|
|
2560
2629
|
return null;
|
|
2561
|
-
}, "
|
|
2562
|
-
//
|
|
2563
|
-
|
|
2564
|
-
if (
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
effect = { heal: maxHP * 0.3, skill: "求生本能I" };
|
|
2568
|
-
} else if (targetBoss.skills.includes("求生本能II")) {
|
|
2569
|
-
effect = { heal: maxHP * 0.5, skill: "求生本能II" };
|
|
2570
|
-
}
|
|
2571
|
-
if (!effect) return null;
|
|
2572
|
-
return {
|
|
2573
|
-
updatedHP: effect.heal,
|
|
2574
|
-
messages: [`【${effect.skill}】生效,${targetBoss.name}濒死时瞬间回复${effect.heal}生命值`],
|
|
2575
|
-
skillUpdates: [{
|
|
2576
|
-
name: targetBoss.name,
|
|
2577
|
-
remove: [effect.skill]
|
|
2578
|
-
}]
|
|
2579
|
-
};
|
|
2580
|
-
}, "handleSurvivalInstinct"),
|
|
2581
|
-
// 感染空间站处理(返回减伤系数)
|
|
2582
|
-
handleInfectedStation: /* @__PURE__ */ __name(async (ctx, targetBoss) => {
|
|
2583
|
-
if (targetBoss.name !== "空间站感染虫" || !targetBoss.skills.includes("感染空间站")) return null;
|
|
2584
|
-
const [sentryGun] = await ctx.database.get("ggcevo_boss", { name: "空间站哨枪塔", isActive: true });
|
|
2585
|
-
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%`];
|
|
2586
2636
|
return {
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
messages: ["🛡️ 【感染空间站】生效:空间站哨枪塔存活时,受到的伤害-50%"]
|
|
2637
|
+
nerfMultiplier: newNerfMultiplier,
|
|
2638
|
+
messages
|
|
2590
2639
|
};
|
|
2591
2640
|
}
|
|
2592
2641
|
return null;
|
|
2593
|
-
}, "
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
if (!targetBoss.skills.includes("
|
|
2642
|
+
}, "handleStressShellII"),
|
|
2643
|
+
handleSurvivalInstinctI: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2644
|
+
const messages = [];
|
|
2645
|
+
if (!targetBoss.skills.includes("求生本能I")) {
|
|
2597
2646
|
return null;
|
|
2598
2647
|
}
|
|
2599
|
-
const
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
name: "空间站哨枪塔",
|
|
2603
|
-
isActive: true
|
|
2604
|
-
});
|
|
2605
|
-
if (sentryGun) {
|
|
2606
|
-
const healAmount = Math.floor(sentryConfig.maxHP * 0.01);
|
|
2607
|
-
const newHP = Math.min(sentryGun.HP + healAmount, sentryConfig.maxHP);
|
|
2608
|
-
await ctx.database.set(
|
|
2609
|
-
"ggcevo_boss",
|
|
2610
|
-
{ name: "空间站哨枪塔" },
|
|
2611
|
-
{ HP: newHP }
|
|
2612
|
-
);
|
|
2613
|
-
return {
|
|
2614
|
-
messages: [`🦠 【霉菌滋生】生效:空间站哨枪塔回复1%最大生命值(+${healAmount}HP)`]
|
|
2615
|
-
};
|
|
2616
|
-
}
|
|
2617
|
-
return null;
|
|
2618
|
-
}, "handleMoldGrowth"),
|
|
2619
|
-
// 岗哨机枪处理
|
|
2620
|
-
handleSentryGun: /* @__PURE__ */ __name(async (ctx, targetBoss, bossGroup) => {
|
|
2621
|
-
if (!targetBoss.skills.includes("岗哨机枪")) {
|
|
2648
|
+
const targetMaxHP = getMaxHPByName(targetBoss.name);
|
|
2649
|
+
const currentHP = targetBoss.HP;
|
|
2650
|
+
if (currentHP !== 0) {
|
|
2622
2651
|
return null;
|
|
2623
2652
|
}
|
|
2624
|
-
const
|
|
2625
|
-
const updates =
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
name:
|
|
2635
|
-
|
|
2636
|
-
});
|
|
2637
|
-
if (infectionBug) {
|
|
2638
|
-
const maxHP = getMaxHP("空间站感染虫");
|
|
2639
|
-
const heal = Math.floor(maxHP * 0.1);
|
|
2640
|
-
updates.push(
|
|
2641
|
-
ctx.database.set(
|
|
2642
|
-
"ggcevo_boss",
|
|
2643
|
-
{ name: infectionBug.name },
|
|
2644
|
-
{ HP: Math.min(infectionBug.HP + heal, maxHP) }
|
|
2645
|
-
)
|
|
2646
|
-
);
|
|
2647
|
-
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
|
|
2648
2665
|
}
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
const heal = Math.floor(maxHP * 0.1);
|
|
2656
|
-
updates.push(
|
|
2657
|
-
ctx.database.set(
|
|
2658
|
-
"ggcevo_boss",
|
|
2659
|
-
{ name: mechaBug.name },
|
|
2660
|
-
{ HP: Math.min(mechaBug.HP + heal, maxHP) }
|
|
2661
|
-
)
|
|
2662
|
-
);
|
|
2663
|
-
messages.push(`机械感染虫回复${heal}HP`);
|
|
2664
|
-
}
|
|
2665
|
-
updates.push(
|
|
2666
|
-
ctx.database.set(
|
|
2667
|
-
"ggcevo_boss",
|
|
2668
|
-
{ name: targetBoss.name },
|
|
2669
|
-
{ Skillcountpoints: 0 }
|
|
2670
|
-
)
|
|
2671
|
-
);
|
|
2672
|
-
await Promise.all(updates);
|
|
2673
|
-
return {
|
|
2674
|
-
messages: ["🔫 【岗哨机枪】生效:" + messages.join(",")]
|
|
2675
|
-
};
|
|
2676
|
-
}
|
|
2677
|
-
const newCount = currentCount + 1;
|
|
2678
|
-
await ctx.database.set(
|
|
2679
|
-
"ggcevo_boss",
|
|
2680
|
-
{ name: targetBoss.name },
|
|
2681
|
-
{ Skillcountpoints: newCount }
|
|
2682
|
-
);
|
|
2683
|
-
if (newCount === 10) {
|
|
2684
|
-
return {
|
|
2685
|
-
messages: ["🔫 【岗哨机枪】达到10层!下次攻击将清空层数并治疗所有存活的异形"]
|
|
2686
|
-
};
|
|
2666
|
+
};
|
|
2667
|
+
}, "handleSurvivalInstinctI"),
|
|
2668
|
+
handleSurvivalInstinctII: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2669
|
+
const messages = [];
|
|
2670
|
+
if (!targetBoss.skills.includes("求生本能II")) {
|
|
2671
|
+
return null;
|
|
2687
2672
|
}
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
if (!targetBoss.skills.includes("结构装甲")) return null;
|
|
2693
|
-
let reduction = 0.2;
|
|
2694
|
-
let msg = "受到常规武器伤害-20%";
|
|
2695
|
-
if (weaponData.type === "热能武器") {
|
|
2696
|
-
reduction = 0.4;
|
|
2697
|
-
msg = "受到热能武器伤害-40%";
|
|
2673
|
+
const targetMaxHP = getMaxHPByName(targetBoss.name);
|
|
2674
|
+
const currentHP = targetBoss.HP;
|
|
2675
|
+
if (currentHP !== 0) {
|
|
2676
|
+
return null;
|
|
2698
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】技能已移除`);
|
|
2699
2687
|
return {
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2688
|
+
messages,
|
|
2689
|
+
targetUpdates: {
|
|
2690
|
+
name: targetBoss.name,
|
|
2691
|
+
updates
|
|
2692
|
+
}
|
|
2703
2693
|
};
|
|
2704
|
-
}, "
|
|
2705
|
-
//
|
|
2706
|
-
|
|
2707
|
-
if (!targetBoss.skills.includes("吸血唾液")) return null;
|
|
2708
|
-
const bloodStacks = targetBoss.Skillcountpoints || 0;
|
|
2709
|
-
let buffAmount = 0;
|
|
2710
|
-
let nerfAmount = 0;
|
|
2694
|
+
}, "handleSurvivalInstinctII"),
|
|
2695
|
+
// 在 PassiveHandler 对象中添加冷适应技能的处理函数
|
|
2696
|
+
handleColdAdaptation: /* @__PURE__ */ __name(function(targetBoss, weaponName) {
|
|
2711
2697
|
const messages = [];
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
}
|
|
2717
|
-
if (targetBoss.skills.includes("嗜血狂暴") && currentHP / maxHP < 0.5) {
|
|
2718
|
-
nerfAmount += 0.2;
|
|
2719
|
-
messages.push(`🔥 【嗜血狂暴】生效:进入狂暴状态,受到的伤害-20%`);
|
|
2720
|
-
}
|
|
2721
|
-
if (targetBoss.skills.includes("吐血") && bloodStacks < 1) {
|
|
2722
|
-
buffAmount += 0.2;
|
|
2723
|
-
messages.push(`💔 【吐血】生效:无"吸血"层数,受到的伤害+20%`);
|
|
2698
|
+
let isImmune = false;
|
|
2699
|
+
let targetUpdates = null;
|
|
2700
|
+
if (!targetBoss.skills.includes("冷适应")) {
|
|
2701
|
+
return null;
|
|
2724
2702
|
}
|
|
2725
|
-
|
|
2703
|
+
const currentLayers = targetBoss.statusLayers || 0;
|
|
2704
|
+
const hasFearHeatTag = targetBoss.tags.includes("惧热") || false;
|
|
2705
|
+
if (hasFearHeatTag && weaponName === "零度之下") {
|
|
2706
|
+
isImmune = true;
|
|
2707
|
+
messages.push(`🧊 【冷适应】生效:免疫寒冷伤害`);
|
|
2726
2708
|
return {
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
// 正值减伤系数
|
|
2731
|
-
messages
|
|
2709
|
+
isImmune,
|
|
2710
|
+
messages,
|
|
2711
|
+
targetUpdates
|
|
2732
2712
|
};
|
|
2733
2713
|
}
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
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
|
+
}
|
|
2739
2729
|
}
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
}
|
|
2751
|
-
if (targetBoss.skills.includes("吸血唾液")) {
|
|
2752
|
-
newStacks = oldStacks + 1;
|
|
2753
|
-
messages.push(`🩸 【吸血唾液】生效:获得1层“吸血”`);
|
|
2754
|
-
}
|
|
2755
|
-
if (targetBoss.skills.includes("嗜血狂暴") && currentHP / maxHP < 0.5) {
|
|
2756
|
-
newStacks += 1;
|
|
2757
|
-
messages.push(`🔥 【嗜血狂暴】生效:额外获得1层“吸血”`);
|
|
2758
|
-
}
|
|
2759
|
-
newStacks = Math.min(newStacks, 20);
|
|
2760
|
-
if (oldStacks < 20 && newStacks >= 20) {
|
|
2761
|
-
messages.push(`🩸 “吸血”达到${newStacks}层,下次受到攻击将触发【进食】`);
|
|
2762
|
-
}
|
|
2763
|
-
await ctx.database.set("ggcevo_boss", { name: targetBoss.name }, { Skillcountpoints: newStacks });
|
|
2764
|
-
return { updatedHP, messages };
|
|
2765
|
-
}, "handleBloodCount"),
|
|
2766
|
-
// 修改后的伽马枪辐射处理(无限叠层,每层2.5%增伤,有效上限20层)
|
|
2767
|
-
handleGammaRadiation: /* @__PURE__ */ __name(async (ctx, targetBoss, weaponName) => {
|
|
2768
|
-
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("感染空间站")) {
|
|
2769
2740
|
return null;
|
|
2770
2741
|
}
|
|
2771
|
-
const
|
|
2772
|
-
|
|
2773
|
-
const currentLayers = targetBoss.Vulnerability || 0;
|
|
2774
|
-
const newLayers = currentLayers + 1;
|
|
2775
|
-
await ctx.database.set(
|
|
2776
|
-
"ggcevo_boss",
|
|
2777
|
-
{ name: targetBoss.name },
|
|
2778
|
-
{ Vulnerability: newLayers }
|
|
2742
|
+
const spaceStation = activeBosses.find(
|
|
2743
|
+
(boss) => boss.name === "空间站哨枪塔" && boss.isActive
|
|
2779
2744
|
);
|
|
2780
|
-
|
|
2781
|
-
|
|
2745
|
+
if (!spaceStation) {
|
|
2746
|
+
return null;
|
|
2747
|
+
}
|
|
2748
|
+
const newNerfMultiplier = 0.5;
|
|
2749
|
+
messages.push(`🛸 【感染空间站】生效:因「空间站哨枪塔」存活,自身所受伤害降低50%`);
|
|
2782
2750
|
return {
|
|
2783
|
-
|
|
2784
|
-
|
|
2751
|
+
nerfMultiplier: newNerfMultiplier,
|
|
2752
|
+
// 返回调整后的减伤系数
|
|
2753
|
+
messages
|
|
2785
2754
|
};
|
|
2786
|
-
}, "
|
|
2787
|
-
//
|
|
2788
|
-
|
|
2789
|
-
const radiationLayers = targetBoss.Vulnerability || 0;
|
|
2790
|
-
if (radiationLayers < 1) return null;
|
|
2791
|
-
const effectiveLayers = Math.min(radiationLayers, 20);
|
|
2792
|
-
const damageIncrease = effectiveLayers * 2.5;
|
|
2793
|
-
const maxIncrease = 50;
|
|
2755
|
+
}, "handleInfectedSpaceStation"),
|
|
2756
|
+
// 病毒云处理(释放病毒云雾减伤10%)
|
|
2757
|
+
handleVirusCloud: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2794
2758
|
const messages = [];
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
if (damageIncrease >= maxIncrease) {
|
|
2798
|
-
statusMsg += ``;
|
|
2759
|
+
if (!targetBoss.skills.includes("病毒云")) {
|
|
2760
|
+
return null;
|
|
2799
2761
|
}
|
|
2800
|
-
|
|
2762
|
+
const newNerfMultiplier = 0.1;
|
|
2763
|
+
messages.push(`☁️ 【病毒云】生效:释放病毒云雾形成保护,所受伤害降低10%`);
|
|
2801
2764
|
return {
|
|
2802
|
-
|
|
2803
|
-
//
|
|
2765
|
+
nerfMultiplier: newNerfMultiplier,
|
|
2766
|
+
// 返回调整后的减伤系数
|
|
2804
2767
|
messages
|
|
2805
2768
|
};
|
|
2806
|
-
}, "
|
|
2807
|
-
//
|
|
2808
|
-
|
|
2809
|
-
|
|
2769
|
+
}, "handleVirusCloud"),
|
|
2770
|
+
// 霉菌滋生处理(空间站存活时为其回复1%最大生命值)
|
|
2771
|
+
handleMoldGrowth: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
2772
|
+
const messages = [];
|
|
2773
|
+
if (!targetBoss.skills.includes("霉菌滋生")) {
|
|
2810
2774
|
return null;
|
|
2811
2775
|
}
|
|
2812
|
-
const
|
|
2813
|
-
|
|
2814
|
-
const currentFreezing = targetBoss.freezing || 0;
|
|
2815
|
-
const newFreezing = currentFreezing + 1;
|
|
2816
|
-
await ctx.database.set(
|
|
2817
|
-
"ggcevo_boss",
|
|
2818
|
-
{ name: targetBoss.name },
|
|
2819
|
-
{ freezing: newFreezing }
|
|
2776
|
+
const spaceStation = activeBosses.find(
|
|
2777
|
+
(boss) => boss.name === "空间站哨枪塔" && boss.isActive
|
|
2820
2778
|
);
|
|
2821
|
-
|
|
2822
|
-
|
|
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}点生命值`);
|
|
2823
2791
|
return {
|
|
2824
2792
|
messages,
|
|
2825
|
-
|
|
2793
|
+
spaceStationUpdates
|
|
2826
2794
|
};
|
|
2827
|
-
}, "
|
|
2828
|
-
//
|
|
2829
|
-
|
|
2830
|
-
const freezingLayers = targetBoss.freezing || 0;
|
|
2831
|
-
if (freezingLayers < 1) return null;
|
|
2832
|
-
const effectiveLayers = Math.min(freezingLayers, 20);
|
|
2833
|
-
const damageIncrease = effectiveLayers * 2.5;
|
|
2834
|
-
const maxIncrease = 50;
|
|
2795
|
+
}, "handleMoldGrowth"),
|
|
2796
|
+
// 岗哨机枪处理(累计10次攻击后为其他异形回复10%最大生命值)
|
|
2797
|
+
handleSentryGun: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
2835
2798
|
const messages = [];
|
|
2836
|
-
let
|
|
2837
|
-
|
|
2838
|
-
if (
|
|
2839
|
-
|
|
2799
|
+
let targetUpdates = null;
|
|
2800
|
+
const otherUpdates = [];
|
|
2801
|
+
if (!targetBoss.skills.includes("岗哨机枪")) {
|
|
2802
|
+
return null;
|
|
2840
2803
|
}
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
// 处理导体标签变化(血量低时护盾->重甲)
|
|
2850
|
-
handleConductorTagChange: /* @__PURE__ */ __name(async (ctx, targetBoss, currentHP, maxHP) => {
|
|
2851
|
-
const triggerThreshold = targetBoss.skills.includes("超导体") ? 0.05 : 0.1;
|
|
2852
|
-
const isBelowThreshold = currentHP <= maxHP * triggerThreshold;
|
|
2853
|
-
const hasShieldTag = targetBoss.tags.includes("护盾");
|
|
2854
|
-
const alreadyHeavyArmor = targetBoss.tags.includes("重甲");
|
|
2855
|
-
if (!targetBoss.skills.includes("超导体") && !targetBoss.skills.includes("电能导体")) return null;
|
|
2856
|
-
if (isBelowThreshold && hasShieldTag && !alreadyHeavyArmor) {
|
|
2857
|
-
const newTags = [
|
|
2858
|
-
...targetBoss.tags.filter((tag) => tag !== "护盾"),
|
|
2859
|
-
"重甲"
|
|
2860
|
-
];
|
|
2861
|
-
await ctx.database.set(
|
|
2862
|
-
"ggcevo_boss",
|
|
2863
|
-
{ name: targetBoss.name },
|
|
2864
|
-
{ tags: newTags }
|
|
2865
|
-
);
|
|
2866
|
-
return {
|
|
2867
|
-
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
|
+
}
|
|
2868
2812
|
};
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
}, "handleConductorTagChange"),
|
|
2872
|
-
// 处理能量虹吸减伤(基于血量)
|
|
2873
|
-
handleEnergySiphon: /* @__PURE__ */ __name((targetBoss, currentHP, maxHP) => {
|
|
2874
|
-
if (!targetBoss.skills.includes("能量虹吸")) return null;
|
|
2875
|
-
let reduction = 0;
|
|
2876
|
-
if (currentHP >= maxHP * 0.7) {
|
|
2877
|
-
reduction = 0.4;
|
|
2878
|
-
} else if (currentHP >= maxHP * 0.3) {
|
|
2879
|
-
reduction = 0.2;
|
|
2880
|
-
}
|
|
2881
|
-
if (reduction > 0) {
|
|
2813
|
+
const newStacks = currentStacks + 1;
|
|
2814
|
+
messages.push(`🔫 【岗哨机枪】充能:当前累计${newStacks}/10次攻击`);
|
|
2882
2815
|
return {
|
|
2883
|
-
|
|
2884
|
-
|
|
2816
|
+
messages,
|
|
2817
|
+
targetUpdates,
|
|
2818
|
+
otherUpdates
|
|
2885
2819
|
};
|
|
2886
2820
|
}
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
{ name: targetBoss.name },
|
|
2898
|
-
{ 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
|
|
2899
2831
|
);
|
|
2900
|
-
|
|
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
|
+
});
|
|
2901
2845
|
return {
|
|
2902
|
-
messages
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
].filter(Boolean)
|
|
2846
|
+
messages,
|
|
2847
|
+
targetUpdates,
|
|
2848
|
+
otherUpdates
|
|
2906
2849
|
};
|
|
2907
|
-
}, "
|
|
2908
|
-
//
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
let reduction = 0;
|
|
2913
|
-
if (currentEnergy >= 800) {
|
|
2914
|
-
reduction = 0.5;
|
|
2915
|
-
} else if (currentEnergy >= 500) {
|
|
2916
|
-
reduction = 0.3;
|
|
2917
|
-
}
|
|
2918
|
-
if (reduction > 0) {
|
|
2919
|
-
return {
|
|
2920
|
-
damageMultiplier: -reduction,
|
|
2921
|
-
messages: [`🔋 【能源虹吸】生效:能量${currentEnergy > 800 ? ">80%" : ">50%"},受到的伤害-${reduction * 100}%`]
|
|
2922
|
-
};
|
|
2923
|
-
}
|
|
2924
|
-
return null;
|
|
2925
|
-
}, "handlePowerSiphon"),
|
|
2926
|
-
// 处理电能立场(概率免疫伤害)
|
|
2927
|
-
handleEnergyField: /* @__PURE__ */ __name(async function(ctx, targetBoss, weaponName, initialDamage) {
|
|
2928
|
-
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("结构装甲")) {
|
|
2929
2855
|
return null;
|
|
2930
2856
|
}
|
|
2931
|
-
const
|
|
2932
|
-
const
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
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("吸血唾液")) {
|
|
2936
2870
|
return null;
|
|
2937
2871
|
}
|
|
2938
|
-
const
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
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
|
+
}
|
|
2945
2883
|
};
|
|
2946
2884
|
}
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
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;
|
|
2954
2898
|
}
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
// 修改后的脉冲处理函数
|
|
2958
|
-
handlePulse: /* @__PURE__ */ __name(async function(ctx, targetBoss, activeBosses, bossGroup, currentHP) {
|
|
2959
|
-
if (!targetBoss.skills.includes("脉冲")) return null;
|
|
2960
|
-
const currentEnergy = targetBoss.energy || 0;
|
|
2961
|
-
const currentFreezing = targetBoss.freezing || 0;
|
|
2962
|
-
const maxEnergy = 1e3;
|
|
2963
|
-
if (currentEnergy < maxEnergy * 0.3) {
|
|
2899
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
2900
|
+
if (currentStacks < 20) {
|
|
2964
2901
|
return null;
|
|
2965
2902
|
}
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
const
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
//
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
const healMessages = [];
|
|
2976
|
-
let updatedHP = currentHP;
|
|
2977
|
-
for (const member of groupMembers) {
|
|
2978
|
-
const memberConfig = this.getMemberConfig(member.name, bossGroup);
|
|
2979
|
-
if (!memberConfig) continue;
|
|
2980
|
-
const maxHP = memberConfig.maxHP;
|
|
2981
|
-
const healAmount = member.type === "主宰" ? 100 : 100;
|
|
2982
|
-
const newHP = Math.min(member.HP + healAmount, maxHP);
|
|
2983
|
-
const actualHeal = newHP - member.HP;
|
|
2984
|
-
if (member.name === targetBoss.name) {
|
|
2985
|
-
updatedHP = newHP;
|
|
2986
|
-
}
|
|
2987
|
-
updates.push(
|
|
2988
|
-
ctx.database.set(
|
|
2989
|
-
"ggcevo_boss",
|
|
2990
|
-
{ name: member.name },
|
|
2991
|
-
{ HP: newHP }
|
|
2992
|
-
)
|
|
2993
|
-
);
|
|
2994
|
-
if (actualHeal > 0) {
|
|
2995
|
-
healMessages.push(`${member.name}+${actualHeal}HP`);
|
|
2996
|
-
}
|
|
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
|
+
// 生命值回复
|
|
2997
2912
|
}
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
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
|
+
}
|
|
3007
2940
|
};
|
|
3008
2941
|
}
|
|
3009
|
-
|
|
2942
|
+
nerfMultiplier = 0.2;
|
|
2943
|
+
const stackMessage = currentStacks < 20 ? `额外叠加1层吸血唾液(当前${currentStacks + 1}/20层)` : `已达到最大20层吸血唾液`;
|
|
2944
|
+
messages.push(`🔥 【嗜血狂暴】生效:HP≤50%,${stackMessage},并且获得20%额外减伤`);
|
|
3010
2945
|
}
|
|
3011
|
-
return
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
2946
|
+
return {
|
|
2947
|
+
nerfMultiplier,
|
|
2948
|
+
messages,
|
|
2949
|
+
targetUpdates
|
|
2950
|
+
};
|
|
2951
|
+
}, "handleBloodlust"),
|
|
2952
|
+
// 吐血处理(无「吸血唾液」层数时,所受伤害提升20%)
|
|
2953
|
+
handleVomit: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3017
2954
|
const messages = [];
|
|
3018
|
-
|
|
3019
|
-
if (currentEnergy > 0) {
|
|
3020
|
-
const energyDrain = Math.min(200, currentEnergy);
|
|
3021
|
-
const newEnergy = currentEnergy - energyDrain;
|
|
3022
|
-
await ctx.database.set(
|
|
3023
|
-
"ggcevo_boss",
|
|
3024
|
-
{ name: targetBoss.name },
|
|
3025
|
-
{ energy: newEnergy }
|
|
3026
|
-
);
|
|
3027
|
-
arcApplied = true;
|
|
3028
|
-
messages.push(`⚡ 【弧焊枪】武器效果:消耗目标200点能量`);
|
|
3029
|
-
} else {
|
|
2955
|
+
if (!targetBoss.skills.includes("吐血")) {
|
|
3030
2956
|
return null;
|
|
3031
2957
|
}
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
const currentEnergy = targetBoss.energy || 0;
|
|
3038
|
-
const drainAmount = Math.min(500, currentEnergy);
|
|
3039
|
-
const newEnergy = currentEnergy - drainAmount;
|
|
3040
|
-
if (drainAmount <= 0) {
|
|
3041
|
-
return null;
|
|
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%`);
|
|
3042
2963
|
}
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
2964
|
+
return {
|
|
2965
|
+
buffMultiplier,
|
|
2966
|
+
messages
|
|
2967
|
+
};
|
|
2968
|
+
}, "handleVomit"),
|
|
2969
|
+
// 超导体(状态转换:护盾→重甲)
|
|
2970
|
+
handleSuperconductor: /* @__PURE__ */ __name(function(targetBoss) {
|
|
2971
|
+
const messages = [];
|
|
2972
|
+
let targetUpdates = null;
|
|
2973
|
+
if (!targetBoss.skills.includes("超导体")) {
|
|
2974
|
+
return null;
|
|
2975
|
+
}
|
|
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) {
|
|
2980
|
+
return null;
|
|
2981
|
+
}
|
|
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(`⚡ 【电能冲击波】生效:能量已达上限`);
|
|
3056
3062
|
return {
|
|
3057
|
-
|
|
3058
|
-
|
|
3063
|
+
messages,
|
|
3064
|
+
targetUpdates: null
|
|
3059
3065
|
};
|
|
3060
3066
|
}
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
const currentStacks = targetBoss.Skillcountpoints || 0;
|
|
3067
|
-
const newStacks = Math.min(currentStacks + 1, 20);
|
|
3068
|
-
let messages = [`💧 【灼烧粘液】生效:获得1层"胆汁"(当前${newStacks}层)`];
|
|
3069
|
-
if (currentStacks < 10 && newStacks >= 10) {
|
|
3070
|
-
if (targetBoss.skills.includes("腐蚀胆汁")) {
|
|
3071
|
-
messages.push(`🟢 胆汁达到10层,下次攻击将触发【腐蚀胆汁】`);
|
|
3067
|
+
const targetUpdates = {
|
|
3068
|
+
name: targetBoss.name,
|
|
3069
|
+
updates: {
|
|
3070
|
+
energyChange: maxHealAmount
|
|
3071
|
+
// 回复量
|
|
3072
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;
|
|
3073
3099
|
}
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
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}点生命值`);
|
|
3077
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;
|
|
3078
3129
|
}
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
{ Skillcountpoints: newStacks }
|
|
3083
|
-
);
|
|
3084
|
-
return { messages };
|
|
3085
|
-
}, "handleBileStacking"),
|
|
3086
|
-
// 修改后的太阳耀斑处理(每次受击检测)
|
|
3087
|
-
handleSolarFlare: /* @__PURE__ */ __name(async function(ctx, targetBoss, weaponName) {
|
|
3088
|
-
if (!targetBoss.skills.includes("太阳耀斑") || targetBoss.type !== "主宰") {
|
|
3089
|
-
return { immune: false, messages: [] };
|
|
3130
|
+
const isFireDamage = weaponName === "焚烧枪";
|
|
3131
|
+
if (!isFireDamage) {
|
|
3132
|
+
return null;
|
|
3090
3133
|
}
|
|
3134
|
+
isImmune = true;
|
|
3135
|
+
const healAmount = damage;
|
|
3136
|
+
const targetUpdates = {
|
|
3137
|
+
name: targetBoss.name,
|
|
3138
|
+
updates: {
|
|
3139
|
+
hpChange: healAmount
|
|
3140
|
+
// 生命值变化量
|
|
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) {
|
|
3091
3153
|
const messages = [];
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3154
|
+
if (!targetBoss.skills.includes("庞兽狂暴")) {
|
|
3155
|
+
return null;
|
|
3156
|
+
}
|
|
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%`);
|
|
3163
|
+
}
|
|
3164
|
+
return { nerfMultiplier, messages };
|
|
3165
|
+
}, "handleColossalRampage"),
|
|
3166
|
+
handleBurningSlime: /* @__PURE__ */ __name(function(targetBoss, weaponName) {
|
|
3167
|
+
const messages = [];
|
|
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}点生命值`);
|
|
3124
3191
|
}
|
|
3125
|
-
await Promise.all(updates);
|
|
3126
3192
|
}
|
|
3127
|
-
if (
|
|
3128
|
-
|
|
3129
|
-
|
|
3193
|
+
if (Object.keys(updates).length > 0) {
|
|
3194
|
+
targetUpdates = {
|
|
3195
|
+
name: targetBoss.name,
|
|
3196
|
+
updates
|
|
3197
|
+
};
|
|
3198
|
+
}
|
|
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;
|
|
3130
3214
|
}
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
getMemberMaxHP: /* @__PURE__ */ __name(function(name2, bossGroup) {
|
|
3135
|
-
if (bossGroup.main.name === name2) return bossGroup.main.maxHP;
|
|
3136
|
-
for (const minion of bossGroup.minions) {
|
|
3137
|
-
if (minion.name === name2) return minion.maxHP;
|
|
3215
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
3216
|
+
if (currentStacks < requiredStacks) {
|
|
3217
|
+
return null;
|
|
3138
3218
|
}
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
// 修改后的腐蚀胆汁处理函数
|
|
3142
|
-
handleCorrosiveBile: /* @__PURE__ */ __name(async function(ctx, targetBoss, bossGroup, currentHP) {
|
|
3143
|
-
if (!targetBoss.skills.includes("腐蚀胆汁")) return null;
|
|
3144
|
-
const bileStacks = targetBoss.Skillcountpoints || 0;
|
|
3145
|
-
if (bileStacks < 10) return null;
|
|
3146
|
-
await ctx.database.set(
|
|
3147
|
-
"ggcevo_boss",
|
|
3148
|
-
{ name: targetBoss.name },
|
|
3149
|
-
{ Skillcountpoints: 0 }
|
|
3219
|
+
const otherSurvivingBosses = activeBosses.filter(
|
|
3220
|
+
(boss) => boss.isActive
|
|
3150
3221
|
);
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
for (const member of groupMembers) {
|
|
3162
|
-
const maxHP = this.getMemberMaxHP(member.name, bossGroup);
|
|
3163
|
-
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;
|
|
3164
3232
|
const healAmount = 1e3;
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
}
|
|
3179
|
-
await Promise.all(updates);
|
|
3180
|
-
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
|
+
};
|
|
3181
3246
|
}, "handleCorrosiveBile"),
|
|
3182
|
-
//
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
const
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
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
|
|
3191
3262
|
);
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
const groupMembers = await ctx.database.get("ggcevo_boss", {
|
|
3198
|
-
groupId: targetBoss.groupId,
|
|
3199
|
-
isActive: true,
|
|
3200
|
-
HP: { $gt: 0 }
|
|
3201
|
-
});
|
|
3202
|
-
for (const member of groupMembers) {
|
|
3203
|
-
const maxHP = this.getMemberMaxHP(member.name, bossGroup);
|
|
3204
|
-
if (!maxHP) continue;
|
|
3205
|
-
const healAmount = Math.floor(maxHP * 0.5);
|
|
3206
|
-
const newHP = Math.min(member.HP + healAmount, maxHP);
|
|
3207
|
-
const actualHeal = newHP - member.HP;
|
|
3208
|
-
if (member.name === targetBoss.name) {
|
|
3209
|
-
updatedHP = newHP;
|
|
3210
|
-
}
|
|
3211
|
-
updates.push(
|
|
3212
|
-
ctx.database.set(
|
|
3213
|
-
"ggcevo_boss",
|
|
3214
|
-
{ name: member.name },
|
|
3215
|
-
{ HP: newHP }
|
|
3216
|
-
)
|
|
3217
|
-
);
|
|
3218
|
-
messages.push(`${member.name} 回复${actualHeal}点生命值`);
|
|
3219
|
-
}
|
|
3220
|
-
await Promise.all(updates);
|
|
3221
|
-
return { messages, currentHP: updatedHP };
|
|
3222
|
-
}, "handleFireBreath"),
|
|
3223
|
-
// 修改后的火焰异形处理
|
|
3224
|
-
handleFireEvolution: /* @__PURE__ */ __name(async function(ctx, targetBoss, weaponName, initialDamage, bossGroup) {
|
|
3225
|
-
if (targetBoss.skills.includes("火焰异形") && weaponName === "焚烧枪") {
|
|
3226
|
-
const maxHP = this.getMemberMaxHP(targetBoss.name, bossGroup);
|
|
3227
|
-
if (!maxHP) return null;
|
|
3228
|
-
const actualHeal = Math.min(initialDamage, maxHP - targetBoss.HP);
|
|
3229
|
-
let updatedHP = Math.min(targetBoss.HP + actualHeal, maxHP);
|
|
3230
|
-
const messages = [
|
|
3231
|
-
`🔥 【火焰异形】生效:免疫火焰伤害`,
|
|
3232
|
-
actualHeal > 0 ? `${targetBoss.name}回复${actualHeal}点生命值` : ""
|
|
3233
|
-
].filter(Boolean);
|
|
3234
|
-
const bileResult = await this.handleBileIgnition(ctx, targetBoss, bossGroup, updatedHP);
|
|
3235
|
-
if (bileResult) {
|
|
3236
|
-
updatedHP = bileResult.newHP;
|
|
3237
|
-
messages.push(...bileResult.messages);
|
|
3263
|
+
targetUpdates = {
|
|
3264
|
+
name: targetBoss.name,
|
|
3265
|
+
updates: {
|
|
3266
|
+
skillStacksChanged: -currentStacks
|
|
3267
|
+
// 重置层数为0
|
|
3238
3268
|
}
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
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;
|
|
3246
3296
|
}
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
// 修改后的灼烧粘液引爆
|
|
3250
|
-
handleBileIgnition: /* @__PURE__ */ __name(async function(ctx, targetBoss, bossGroup, updatedHP) {
|
|
3251
|
-
if (!targetBoss.skills.includes("腐蚀胆汁")) return null;
|
|
3252
|
-
const bileStacks = targetBoss.Skillcountpoints || 0;
|
|
3253
|
-
if (bileStacks < 1) return null;
|
|
3254
|
-
const theoreticalHeal = bileStacks * 10;
|
|
3255
|
-
const maxHP = this.getMemberMaxHP(targetBoss.name, bossGroup);
|
|
3256
|
-
const actualHeal = Math.min(theoreticalHeal, maxHP - updatedHP);
|
|
3257
|
-
await ctx.database.set(
|
|
3258
|
-
"ggcevo_boss",
|
|
3259
|
-
{ name: targetBoss.name },
|
|
3260
|
-
{ Skillcountpoints: 0, HP: updatedHP + actualHeal }
|
|
3297
|
+
const hasLivingOffspring = activeBosses.some(
|
|
3298
|
+
(boss) => boss.name !== targetBoss.name && boss.isActive
|
|
3261
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
|
+
}
|
|
3262
3316
|
return {
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
newHP: updatedHP + actualHeal,
|
|
3267
|
-
bileStacks
|
|
3317
|
+
isImmune,
|
|
3318
|
+
messages,
|
|
3319
|
+
targetUpdates
|
|
3268
3320
|
};
|
|
3269
|
-
}, "
|
|
3270
|
-
//
|
|
3271
|
-
handleBurningBurrow: /* @__PURE__ */ __name(
|
|
3272
|
-
|
|
3273
|
-
|
|
3321
|
+
}, "handleSolarFlare"),
|
|
3322
|
+
// 燃烧潜地 - 低生命回复
|
|
3323
|
+
handleBurningBurrow: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3324
|
+
const messages = [];
|
|
3325
|
+
let targetUpdates = null;
|
|
3326
|
+
if (!targetBoss.skills.includes("燃烧潜地")) {
|
|
3274
3327
|
return null;
|
|
3275
3328
|
}
|
|
3276
|
-
const
|
|
3277
|
-
const
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
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
|
+
}
|
|
3285
3344
|
};
|
|
3286
|
-
|
|
3287
|
-
// 修改后的炼狱爆弹处理函数(不再使用 async/await)
|
|
3288
|
-
handleHellfireBomb: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
|
|
3289
|
-
if (!targetBoss.skills.includes("炼狱爆弹")) return null;
|
|
3290
|
-
const bileStacks = targetBoss.Skillcountpoints || 0;
|
|
3291
|
-
if (bileStacks < 1) return null;
|
|
3292
|
-
const hasLivingMinions = activeBosses.some(
|
|
3293
|
-
(boss) => boss.groupId === targetBoss.groupId && boss.type === "子代" && boss.HP > 0
|
|
3294
|
-
);
|
|
3295
|
-
const baseReductionPerStack = 0.05;
|
|
3296
|
-
const bonusReductionPerStack = hasLivingMinions ? 0.05 : 0;
|
|
3297
|
-
const totalReductionPerStack = baseReductionPerStack + bonusReductionPerStack;
|
|
3298
|
-
const reduction = bileStacks * totalReductionPerStack;
|
|
3299
|
-
const messageParts = [
|
|
3300
|
-
`💣 【炼狱爆弹】生效:当前${bileStacks}层胆汁,受到的伤害-${(reduction * 100).toFixed(0)}%`
|
|
3301
|
-
];
|
|
3345
|
+
messages.push(`🔥 【燃烧潜地】生效:生命值低于10%,立即回复${healAmount}点生命值(效果移除)`);
|
|
3302
3346
|
return {
|
|
3303
|
-
|
|
3304
|
-
|
|
3347
|
+
messages,
|
|
3348
|
+
targetUpdates
|
|
3305
3349
|
};
|
|
3306
|
-
}, "
|
|
3307
|
-
//
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
messages: [`🛡️ 【猎手异形】生效:免疫${weaponName === "焚烧枪" ? "火焰" : "寒冷"}伤害`]
|
|
3314
|
-
};
|
|
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;
|
|
3315
3357
|
}
|
|
3316
|
-
const
|
|
3317
|
-
|
|
3358
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
3359
|
+
const hasLivingOffspring = activeBosses.some(
|
|
3360
|
+
(boss) => boss.name !== targetBoss.name && boss.isActive
|
|
3318
3361
|
);
|
|
3319
|
-
|
|
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
|
+
}
|
|
3320
3400
|
return {
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3401
|
+
buffMultiplier,
|
|
3402
|
+
nerfMultiplier,
|
|
3403
|
+
isImmune,
|
|
3404
|
+
messages
|
|
3325
3405
|
};
|
|
3326
3406
|
}, "handleHunterAlien"),
|
|
3327
|
-
//
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
messages: [`🔥 【狂暴】生效:血量低于50%,受到的伤害-50%`]
|
|
3334
|
-
};
|
|
3407
|
+
// 狂暴处理(低生命减伤)
|
|
3408
|
+
handleRampage: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3409
|
+
const messages = [];
|
|
3410
|
+
let nerfMultiplier = 0;
|
|
3411
|
+
if (!targetBoss.skills.includes("狂暴")) {
|
|
3412
|
+
return null;
|
|
3335
3413
|
}
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
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) {
|
|
3341
3424
|
const messages = [];
|
|
3342
|
-
let
|
|
3343
|
-
let
|
|
3344
|
-
if (targetBoss.
|
|
3345
|
-
|
|
3346
|
-
messages.push(`🎭 【伪装】生效:已适应武器【${weaponName}】,本次受到的伤害-80%`);
|
|
3425
|
+
let nerfMultiplier = 0;
|
|
3426
|
+
let targetUpdates = null;
|
|
3427
|
+
if (!targetBoss.skills.includes("伪装")) {
|
|
3428
|
+
return null;
|
|
3347
3429
|
}
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
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%`);
|
|
3355
3443
|
}
|
|
3356
3444
|
return {
|
|
3357
|
-
|
|
3358
|
-
messages
|
|
3445
|
+
nerfMultiplier,
|
|
3446
|
+
messages,
|
|
3447
|
+
targetUpdates
|
|
3359
3448
|
};
|
|
3360
3449
|
}, "handleDisguise"),
|
|
3361
|
-
//
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
messages: ["💥 【致命一击】生效:免疫本次伤害"]
|
|
3368
|
-
};
|
|
3450
|
+
// 致命一击处理(概率免疫伤害)
|
|
3451
|
+
handleDeadlyHit: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3452
|
+
const messages = [];
|
|
3453
|
+
let isImmune = false;
|
|
3454
|
+
if (!targetBoss.skills.includes("致命一击")) {
|
|
3455
|
+
return null;
|
|
3369
3456
|
}
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
handleCorrosionModule: /* @__PURE__ */ __name((installedMods) => {
|
|
3374
|
-
if (!installedMods) return 0;
|
|
3375
|
-
return installedMods.includes("破甲模块") ? 0.2 : 0;
|
|
3376
|
-
}, "handleCorrosionModule"),
|
|
3377
|
-
// 粒子相位枪效果处理
|
|
3378
|
-
handleParticlePhaseEffect: /* @__PURE__ */ __name((targetBoss, weaponName) => {
|
|
3379
|
-
if (!targetBoss || weaponName !== "粒子相位枪") return 0;
|
|
3380
|
-
return targetBoss.tags.includes("护盾") ? 0.5 : 0;
|
|
3381
|
-
}, "handleParticlePhaseEffect"),
|
|
3382
|
-
// 修改后的无视减伤处理函数
|
|
3383
|
-
handleIgnoreReductionEffects: /* @__PURE__ */ __name(async (ctx, handle, weaponName, targetBoss, nerfMultiplier) => {
|
|
3384
|
-
if (nerfMultiplier >= 0) return null;
|
|
3385
|
-
const ignoreEffects = [];
|
|
3386
|
-
let messages = [];
|
|
3387
|
-
if (weaponName === "光剑") {
|
|
3388
|
-
ignoreEffects.push(1);
|
|
3389
|
-
messages.push(`⚔️ 【光剑】武器效果:无视目标100%减伤效果`);
|
|
3390
|
-
} else if (weaponName === "M4AE脉冲步枪") {
|
|
3391
|
-
ignoreEffects.push(0.8);
|
|
3392
|
-
messages.push(`🔫 【M4AE脉冲步枪】武器效果:无视目标80%减伤效果`);
|
|
3457
|
+
if (Math.random() < 0.05) {
|
|
3458
|
+
isImmune = true;
|
|
3459
|
+
messages.push(`💀 【致命一击】生效:5%概率免疫本次伤害`);
|
|
3393
3460
|
}
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
weaponId: weaponConfigData.id,
|
|
3404
|
-
handle,
|
|
3405
|
-
equipped: true
|
|
3406
|
-
});
|
|
3407
|
-
if (equippedWeapon?.installedMods?.includes("破甲模块")) {
|
|
3408
|
-
const corrosionEffect = 0.2;
|
|
3409
|
-
ignoreEffects.push(corrosionEffect);
|
|
3410
|
-
messages.push(`⚡ 【破甲模块】生效:无视目标${corrosionEffect * 100}%减伤效果`);
|
|
3411
|
-
}
|
|
3412
|
-
}
|
|
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;
|
|
3413
3470
|
}
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
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 }
|
|
3421
3482
|
});
|
|
3422
|
-
if (radarMask && radarMask.quantity > 0) {
|
|
3423
|
-
const radarEffect = 0.1;
|
|
3424
|
-
ignoreEffects.push(radarEffect);
|
|
3425
|
-
messages.push(`🛰️ 【雷达面罩】生效:无视目标${radarEffect * 100}%减伤效果`);
|
|
3426
|
-
}
|
|
3427
|
-
if (careerData?.career === "猩红杀手" && weaponName === "侦察步枪") {
|
|
3428
|
-
const scarletEffect = 0.2;
|
|
3429
|
-
ignoreEffects.push(scarletEffect);
|
|
3430
|
-
messages.push(`🎯 【猩红杀手】职业效果:无视目标${scarletEffect * 100}%减伤效果`);
|
|
3431
|
-
}
|
|
3432
3483
|
}
|
|
3433
|
-
|
|
3434
|
-
|
|
3484
|
+
messages.push(`🌬️ 【星界之风】为「${bossName}」回复${baseHealAmount}点生命值`);
|
|
3485
|
+
});
|
|
3486
|
+
if (doubleChance) {
|
|
3487
|
+
messages.unshift(`🌬️ 【星界之风】生效:心灵狂热状态(触发概率10%)为所有存活异形回复生命值`);
|
|
3488
|
+
} else {
|
|
3489
|
+
messages.unshift(`🌬️ 【星界之风】生效:5%概率触发,为所有存活异形回复生命值`);
|
|
3490
|
+
}
|
|
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("心灵狂热")) {
|
|
3502
|
+
return null;
|
|
3435
3503
|
}
|
|
3436
|
-
|
|
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("宇宙能量")) {
|
|
3437
3518
|
return null;
|
|
3438
3519
|
}
|
|
3439
|
-
const
|
|
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
|
+
};
|
|
3440
3538
|
return {
|
|
3441
|
-
|
|
3442
|
-
|
|
3539
|
+
messages,
|
|
3540
|
+
targetUpdates
|
|
3443
3541
|
};
|
|
3444
|
-
}, "
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3542
|
+
}, "handleCosmicEnergy"),
|
|
3543
|
+
/** 复苏处理(免疫死亡并回复) */
|
|
3544
|
+
handleRevival: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3545
|
+
const messages = [];
|
|
3546
|
+
if (!targetBoss.skills.includes("复苏")) {
|
|
3448
3547
|
return null;
|
|
3449
3548
|
}
|
|
3450
|
-
|
|
3451
|
-
let pulseApplied = false;
|
|
3452
|
-
if (currentSkillCount <= 0) {
|
|
3549
|
+
if (targetBoss.HP !== 0) {
|
|
3453
3550
|
return null;
|
|
3454
3551
|
}
|
|
3455
|
-
const
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
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(`🔥 获得【灵能构造炉】技能,复苏效果移除`);
|
|
3462
3572
|
return {
|
|
3463
|
-
messages
|
|
3464
|
-
|
|
3465
|
-
],
|
|
3466
|
-
pulseApplied
|
|
3573
|
+
messages,
|
|
3574
|
+
targetUpdates
|
|
3467
3575
|
};
|
|
3468
|
-
}, "
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
let
|
|
3473
|
-
const
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
baseChance *= 2;
|
|
3477
|
-
}
|
|
3478
|
-
let lightbladeStacks = 0;
|
|
3479
|
-
if (targetBoss.skills.includes("闪电冲锋")) {
|
|
3480
|
-
}
|
|
3481
|
-
const triggerChance = baseChance + lightbladeStacks;
|
|
3482
|
-
if (Math.random() * 100 < triggerChance) {
|
|
3483
|
-
const groupMembers = activeBosses.filter(
|
|
3484
|
-
(b) => b.groupId === targetBoss.groupId && b.HP > 0
|
|
3485
|
-
);
|
|
3486
|
-
const updates = [];
|
|
3487
|
-
const messages = [`🌠 【星界之风】生效:治疗所有存活异形`];
|
|
3488
|
-
let updatedHP = currentHP;
|
|
3489
|
-
for (const member of groupMembers) {
|
|
3490
|
-
const memberConfig = PassiveHandler.getMemberConfig(member.name, bossGroup);
|
|
3491
|
-
if (!memberConfig) continue;
|
|
3492
|
-
const maxMemberHP = memberConfig.maxHP;
|
|
3493
|
-
const healAmount = 200;
|
|
3494
|
-
const actualHeal = Math.min(healAmount, maxMemberHP - member.HP);
|
|
3495
|
-
if (actualHeal <= 0) continue;
|
|
3496
|
-
const newHP = member.HP + actualHeal;
|
|
3497
|
-
updates.push(
|
|
3498
|
-
ctx.database.set(
|
|
3499
|
-
"ggcevo_boss",
|
|
3500
|
-
{ name: member.name },
|
|
3501
|
-
{ HP: newHP }
|
|
3502
|
-
)
|
|
3503
|
-
);
|
|
3504
|
-
messages.push(`${member.name} +${actualHeal}HP`);
|
|
3505
|
-
if (member.name === targetBoss.name) {
|
|
3506
|
-
updatedHP = newHP;
|
|
3507
|
-
}
|
|
3508
|
-
}
|
|
3509
|
-
if (updates.length === 0) {
|
|
3510
|
-
return null;
|
|
3511
|
-
}
|
|
3512
|
-
await Promise.all(updates);
|
|
3513
|
-
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;
|
|
3514
3584
|
}
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
handlePsychicFrenzy: /* @__PURE__ */ __name(function(targetBoss, currentHP, maxHP) {
|
|
3519
|
-
if (!targetBoss.skills.includes("心灵狂热")) return null;
|
|
3520
|
-
if (currentHP / maxHP < 0.5) {
|
|
3585
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
3586
|
+
if (currentStacks >= maxStacks) {
|
|
3587
|
+
messages.push(`✨ 【光影之刃】已达到最大层数(${maxStacks})`);
|
|
3521
3588
|
return {
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
messages: [
|
|
3525
|
-
`🌀 【心灵狂热】生效:进入心灵狂热状态,受到的伤害-20%`
|
|
3526
|
-
]
|
|
3589
|
+
messages,
|
|
3590
|
+
targetUpdates: null
|
|
3527
3591
|
};
|
|
3528
3592
|
}
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
if (!targetBoss.skills.includes("宇宙能量")) return null;
|
|
3534
|
-
const maxEnergy = 1e3;
|
|
3535
|
-
const currentEnergy = targetBoss.energy || 0;
|
|
3536
|
-
const availableSpace = maxEnergy - currentEnergy;
|
|
3537
|
-
const energyToAdd = Math.min(initialDamage, availableSpace);
|
|
3538
|
-
const newEnergy = currentEnergy + energyToAdd;
|
|
3539
|
-
let healAmount = 0;
|
|
3540
|
-
let messages = [];
|
|
3541
|
-
if (energyToAdd > 0) {
|
|
3542
|
-
messages.push(`获得${energyToAdd}点能量`);
|
|
3543
|
-
}
|
|
3544
|
-
if (newEnergy >= maxEnergy) {
|
|
3545
|
-
const overflow = initialDamage - energyToAdd;
|
|
3546
|
-
if (overflow > 0) {
|
|
3547
|
-
const memberConfig = PassiveHandler.getMemberConfig(targetBoss.name, bossGroup);
|
|
3548
|
-
const maxHP = memberConfig?.maxHP || 0;
|
|
3549
|
-
if (maxHP > 0) {
|
|
3550
|
-
healAmount = Math.min(overflow, maxHP - targetBoss.HP);
|
|
3551
|
-
messages.push(`能量溢出回复${healAmount}点生命值`);
|
|
3552
|
-
}
|
|
3593
|
+
targetUpdates = {
|
|
3594
|
+
name: targetBoss.name,
|
|
3595
|
+
updates: {
|
|
3596
|
+
skillStacksChanged: 1
|
|
3553
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;
|
|
3554
3613
|
}
|
|
3555
|
-
if (
|
|
3614
|
+
if (weaponData.type !== "能量武器") {
|
|
3556
3615
|
return null;
|
|
3557
3616
|
}
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
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
|
+
}
|
|
3566
3630
|
};
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
handleLightblade: /* @__PURE__ */ __name(async (ctx, targetBoss) => {
|
|
3570
|
-
if (!targetBoss.skills.includes("光影之刃")) return null;
|
|
3571
|
-
const currentStacks = targetBoss.Skillcountpoints || 0;
|
|
3572
|
-
const newStacks = currentStacks + 1;
|
|
3573
|
-
await ctx.database.set(
|
|
3574
|
-
"ggcevo_boss",
|
|
3575
|
-
{ name: targetBoss.name },
|
|
3576
|
-
{ Skillcountpoints: newStacks }
|
|
3577
|
-
);
|
|
3631
|
+
messages.push(`🔮 【远古预兆】生效:${(actualProbability * 100).toFixed(2)}%概率免疫能量武器伤害`);
|
|
3632
|
+
messages.push(`🔮 回复${energyGained}点能量`);
|
|
3578
3633
|
return {
|
|
3579
|
-
|
|
3634
|
+
isImmune,
|
|
3635
|
+
messages,
|
|
3636
|
+
targetUpdates
|
|
3580
3637
|
};
|
|
3581
|
-
}, "handleLightblade"),
|
|
3582
|
-
// === 远古预兆 ===
|
|
3583
|
-
handleAncientOmen: /* @__PURE__ */ __name(async (ctx, targetBoss) => {
|
|
3584
|
-
if (!targetBoss.skills.includes("远古预兆")) return null;
|
|
3585
|
-
let lightbladeStacks = 0;
|
|
3586
|
-
if (targetBoss.skills.includes("闪电冲锋")) {
|
|
3587
|
-
lightbladeStacks = targetBoss?.Skillcountpoints || 0;
|
|
3588
|
-
}
|
|
3589
|
-
const totalChance = 1 + lightbladeStacks * 0.5;
|
|
3590
|
-
if (Math.random() * 100 < totalChance) {
|
|
3591
|
-
const maxEnergy = 1e3;
|
|
3592
|
-
const currentEnergy = targetBoss.energy || 0;
|
|
3593
|
-
const newEnergy = Math.min(currentEnergy + 100, maxEnergy);
|
|
3594
|
-
await ctx.database.set(
|
|
3595
|
-
"ggcevo_boss",
|
|
3596
|
-
{ name: targetBoss.name },
|
|
3597
|
-
{ energy: newEnergy }
|
|
3598
|
-
);
|
|
3599
|
-
return {
|
|
3600
|
-
immune: true,
|
|
3601
|
-
messages: [
|
|
3602
|
-
`🔮 【远古预兆】生效:免疫此次伤害,并且回复100点能量`
|
|
3603
|
-
]
|
|
3604
|
-
};
|
|
3605
|
-
}
|
|
3606
|
-
return null;
|
|
3607
3638
|
}, "handleAncientOmen"),
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
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
|
+
}
|
|
3612
3666
|
const currentEnergy = targetBoss.energy || 0;
|
|
3613
|
-
const
|
|
3614
|
-
|
|
3615
|
-
|
|
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) {
|
|
3616
3683
|
const messages = [];
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
if (reduction > 0 || increase > 0) {
|
|
3628
|
-
return {
|
|
3629
|
-
reduction,
|
|
3630
|
-
increase,
|
|
3631
|
-
messages: [
|
|
3632
|
-
`🚀 【超视距穿梭】生效:${messages.join(" | ")} (当前${lightbladeStacks}层光影之刃)`
|
|
3633
|
-
]
|
|
3634
|
-
};
|
|
3684
|
+
let newSkill = null;
|
|
3685
|
+
let targetUpdates = null;
|
|
3686
|
+
const possibleSkills = [
|
|
3687
|
+
"天启超载护盾",
|
|
3688
|
+
"塌缩脉冲",
|
|
3689
|
+
"地毯式轰炸",
|
|
3690
|
+
"轰炸引导"
|
|
3691
|
+
];
|
|
3692
|
+
if (!targetBoss.skills.includes("灵能构造炉")) {
|
|
3693
|
+
return null;
|
|
3635
3694
|
}
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
const
|
|
3642
|
-
|
|
3643
|
-
let newSkills = targetBoss.skills;
|
|
3644
|
-
if (!newSkills.includes("灵能构造炉")) {
|
|
3645
|
-
newSkills = [...newSkills, "灵能构造炉"];
|
|
3646
|
-
}
|
|
3647
|
-
newSkills = newSkills.filter((skill) => skill !== "复苏");
|
|
3648
|
-
await ctx.database.set(
|
|
3649
|
-
"ggcevo_boss",
|
|
3650
|
-
{ name: targetBoss.name },
|
|
3651
|
-
{
|
|
3652
|
-
HP: updatedHP,
|
|
3653
|
-
energy: maxEnergy,
|
|
3654
|
-
skills: newSkills
|
|
3655
|
-
}
|
|
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)
|
|
3656
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}」`);
|
|
3657
3714
|
return {
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
]
|
|
3715
|
+
messages,
|
|
3716
|
+
newSkill,
|
|
3717
|
+
targetUpdates
|
|
3662
3718
|
};
|
|
3663
|
-
}, "
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
const
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
const newSkills = targetBoss.skills.filter((skill) => skill !== "灵能构造炉");
|
|
3671
|
-
await ctx.database.set(
|
|
3672
|
-
"ggcevo_boss",
|
|
3673
|
-
{ name: targetBoss.name },
|
|
3674
|
-
{ skills: newSkills }
|
|
3675
|
-
);
|
|
3676
|
-
return {
|
|
3677
|
-
messages: [
|
|
3678
|
-
`⚙️ 【灵能构造炉】生效:所有技能已获取完毕,此技能已移除`
|
|
3679
|
-
]
|
|
3680
|
-
};
|
|
3681
|
-
}
|
|
3682
|
-
let lightbladeStacks = 0;
|
|
3683
|
-
if (targetBoss.skills.includes("闪电冲锋")) {
|
|
3684
|
-
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;
|
|
3685
3726
|
}
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
const availableSkills = allSkills.filter(
|
|
3689
|
-
(skill) => !targetBoss.skills.includes(skill)
|
|
3690
|
-
);
|
|
3691
|
-
if (availableSkills.length === 0) return null;
|
|
3692
|
-
const randomSkill = availableSkills[Math.floor(Math.random() * availableSkills.length)];
|
|
3693
|
-
const newSkills = [...targetBoss.skills, randomSkill];
|
|
3694
|
-
await ctx.database.set(
|
|
3695
|
-
"ggcevo_boss",
|
|
3696
|
-
{ name: targetBoss.name },
|
|
3697
|
-
{ skills: newSkills }
|
|
3698
|
-
);
|
|
3699
|
-
return {
|
|
3700
|
-
messages: [
|
|
3701
|
-
`⚙️ 【灵能构造炉】生效:获得新技能【${randomSkill}】`
|
|
3702
|
-
]
|
|
3703
|
-
};
|
|
3727
|
+
if (Math.random() >= 0.05) {
|
|
3728
|
+
return null;
|
|
3704
3729
|
}
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
const groupMembers = activeBosses.filter(
|
|
3715
|
-
(b) => b.groupId === targetBoss.groupId && b.HP > 0
|
|
3716
|
-
);
|
|
3717
|
-
const healPerStack = 10;
|
|
3718
|
-
const totalHeal = lightbladeStacks * healPerStack;
|
|
3719
|
-
const updates = [];
|
|
3720
|
-
const messages = [`🛡️ 【天启超载护盾】生效:治疗所有存活异形`];
|
|
3721
|
-
let updatedHP = currentHP;
|
|
3722
|
-
for (const member of groupMembers) {
|
|
3723
|
-
const memberConfig = PassiveHandler.getMemberConfig(member.name, bossGroup);
|
|
3724
|
-
if (!memberConfig) continue;
|
|
3725
|
-
const maxMemberHP = memberConfig.maxHP;
|
|
3726
|
-
const actualHeal = Math.min(totalHeal, maxMemberHP - member.HP);
|
|
3727
|
-
if (actualHeal <= 0) continue;
|
|
3728
|
-
const newHP = member.HP + actualHeal;
|
|
3729
|
-
updates.push(
|
|
3730
|
-
ctx.database.set(
|
|
3731
|
-
"ggcevo_boss",
|
|
3732
|
-
{ name: member.name },
|
|
3733
|
-
{ HP: newHP }
|
|
3734
|
-
)
|
|
3735
|
-
);
|
|
3736
|
-
messages.push(`${member.name} +${actualHeal}HP`);
|
|
3737
|
-
if (member.name === targetBoss.name) {
|
|
3738
|
-
updatedHP = newHP;
|
|
3739
|
-
}
|
|
3740
|
-
}
|
|
3741
|
-
if (updates.length === 0) {
|
|
3742
|
-
return null;
|
|
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
|
+
});
|
|
3743
3739
|
}
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
}
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
handleCollapsePulse: /* @__PURE__ */ __name(async function(ctx, targetBoss) {
|
|
3755
|
-
if (!targetBoss.skills.includes("塌缩脉冲")) return null;
|
|
3756
|
-
const triggerChance = 100;
|
|
3757
|
-
if (Math.random() * 100 < triggerChance) {
|
|
3758
|
-
const currentStacks = targetBoss.Skillcountpoints || 0;
|
|
3759
|
-
const newStacks = currentStacks + 1;
|
|
3760
|
-
await ctx.database.set(
|
|
3761
|
-
"ggcevo_boss",
|
|
3762
|
-
{ name: targetBoss.name },
|
|
3763
|
-
{ Skillcountpoints: newStacks }
|
|
3764
|
-
);
|
|
3765
|
-
return {
|
|
3766
|
-
messages: [`💥 【塌缩脉冲】生效:额外获得1层光影之刃`]
|
|
3767
|
-
};
|
|
3768
|
-
}
|
|
3769
|
-
return null;
|
|
3770
|
-
}, "handleCollapsePulse"),
|
|
3771
|
-
// === 地毯式轰炸 ===
|
|
3772
|
-
handleCarpetBombing: /* @__PURE__ */ __name(async function(ctx, targetBoss) {
|
|
3773
|
-
if (!targetBoss.skills.includes("地毯式轰炸")) return null;
|
|
3774
|
-
const triggerChance = 100;
|
|
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) {
|
|
3775
3750
|
const messages = [];
|
|
3776
|
-
let
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
const newSkills = targetBoss.skills.filter((skill) => skill !== "孤立无援");
|
|
3781
|
-
await ctx.database.set(
|
|
3782
|
-
"ggcevo_boss",
|
|
3783
|
-
{ name: targetBoss.name },
|
|
3784
|
-
{ skills: newSkills }
|
|
3785
|
-
);
|
|
3786
|
-
messages.push(`🔥 【地毯式轰炸】生效:移除“孤立无援”`);
|
|
3787
|
-
} else {
|
|
3788
|
-
}
|
|
3789
|
-
damageMultiplier = -1;
|
|
3790
|
-
messages.push(`🔥 【地毯式轰炸】生效:我心中的怒火胜过千万个太阳!受到的伤害-100%`);
|
|
3751
|
+
let targetUpdates = null;
|
|
3752
|
+
const maxStacks = 50;
|
|
3753
|
+
if (!targetBoss.skills.includes("塌缩脉冲")) {
|
|
3754
|
+
return null;
|
|
3791
3755
|
}
|
|
3756
|
+
const currentStacks = targetBoss.skillStacks || 0;
|
|
3757
|
+
if (currentStacks >= maxStacks) {
|
|
3758
|
+
messages.push(`🌀 【塌缩脉冲】生效:层数已达上限(${maxStacks})`);
|
|
3759
|
+
return {
|
|
3760
|
+
messages,
|
|
3761
|
+
targetUpdates: null
|
|
3762
|
+
};
|
|
3763
|
+
}
|
|
3764
|
+
targetUpdates = {
|
|
3765
|
+
name: targetBoss.name,
|
|
3766
|
+
updates: {
|
|
3767
|
+
skillStacksChanged: 1
|
|
3768
|
+
}
|
|
3769
|
+
};
|
|
3770
|
+
const newStacks = currentStacks + 1;
|
|
3771
|
+
messages.push(`🌀 【塌缩脉冲】生效:额外叠加1层光影之刃,当前${newStacks}/${maxStacks}层`);
|
|
3792
3772
|
return {
|
|
3793
3773
|
messages,
|
|
3794
|
-
|
|
3774
|
+
targetUpdates
|
|
3795
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 };
|
|
3796
3787
|
}, "handleCarpetBombing"),
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
if (
|
|
3802
|
-
|
|
3803
|
-
if (Math.random() * 100 < triggerChance) {
|
|
3804
|
-
const energyGain = lightbladeStacks * 50;
|
|
3805
|
-
const maxEnergy = 1e3;
|
|
3806
|
-
const currentEnergy = targetBoss.energy || 0;
|
|
3807
|
-
const newEnergy = Math.min(currentEnergy + energyGain, maxEnergy);
|
|
3808
|
-
await ctx.database.set(
|
|
3809
|
-
"ggcevo_boss",
|
|
3810
|
-
{ name: targetBoss.name },
|
|
3811
|
-
{ energy: newEnergy }
|
|
3812
|
-
);
|
|
3813
|
-
return {
|
|
3814
|
-
messages: [
|
|
3815
|
-
`🎯 【轰炸引导】生效:回复${energyGain}点能量`
|
|
3816
|
-
]
|
|
3817
|
-
};
|
|
3788
|
+
/** 轰炸引导处理(层数相关能量回复) */
|
|
3789
|
+
handleBombardmentGuide: /* @__PURE__ */ __name(function(targetBoss) {
|
|
3790
|
+
const messages = [];
|
|
3791
|
+
let targetUpdates = null;
|
|
3792
|
+
if (!targetBoss.skills.includes("轰炸引导")) {
|
|
3793
|
+
return null;
|
|
3818
3794
|
}
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
// 修改后的伤害处理函数
|
|
3822
|
-
handlePassives: /* @__PURE__ */ __name(async function(ctx, handle, targetBoss, initialDamage, currentHP, maxHP, weaponName, weaponData, bossGroup) {
|
|
3823
|
-
let messages = [];
|
|
3824
|
-
let skillUpdates = [];
|
|
3825
|
-
let buffMultiplier = 0;
|
|
3826
|
-
let nerfMultiplier = 0;
|
|
3827
|
-
let radiationApplied = false;
|
|
3828
|
-
let freezing = false;
|
|
3829
|
-
let pulseApplied = false;
|
|
3830
|
-
let arcApplied = false;
|
|
3831
|
-
let bileStacks = 0;
|
|
3832
|
-
let skipBileStacking = false;
|
|
3833
|
-
const activeBosses = await ctx.database.get("ggcevo_boss", { isActive: true });
|
|
3834
|
-
const solarFlareResult = await this.handleSolarFlare(ctx, targetBoss, weaponName);
|
|
3835
|
-
if (solarFlareResult.immune) {
|
|
3836
|
-
return {
|
|
3837
|
-
currentHP: targetBoss.HP,
|
|
3838
|
-
messages: solarFlareResult.messages,
|
|
3839
|
-
skillUpdates: [],
|
|
3840
|
-
initialDamage: 0
|
|
3841
|
-
};
|
|
3795
|
+
if (Math.random() >= 0.05) {
|
|
3796
|
+
return null;
|
|
3842
3797
|
}
|
|
3843
|
-
const
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
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
|
+
}
|
|
3850
3835
|
};
|
|
3836
|
+
const newLayers = currentLayers + 1;
|
|
3837
|
+
messages.push(`☢️ 满足辐射条件,获得1层"辐射"效果,累计${newLayers}层`);
|
|
3838
|
+
layerAdded = true;
|
|
3851
3839
|
}
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
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
|
+
}
|
|
3859
3869
|
};
|
|
3870
|
+
const newLayers = currentLayers + 1;
|
|
3871
|
+
messages.push(`❄️ 满足寒冷条件,获得1层"寒冷"效果,累计${newLayers}层`);
|
|
3872
|
+
layerAdded = true;
|
|
3860
3873
|
}
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
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;
|
|
3872
3891
|
}
|
|
3873
|
-
const
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
messages: fireEvoResult.messages,
|
|
3884
|
-
skillUpdates: [],
|
|
3885
|
-
initialDamage: fireEvoResult.initialDamage,
|
|
3886
|
-
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
|
+
}
|
|
3887
3902
|
};
|
|
3888
3903
|
}
|
|
3889
|
-
const
|
|
3890
|
-
if (
|
|
3891
|
-
|
|
3892
|
-
currentHP: targetBoss.HP,
|
|
3893
|
-
messages: criticalResult.messages,
|
|
3894
|
-
skillUpdates: [],
|
|
3895
|
-
initialDamage: 0
|
|
3896
|
-
};
|
|
3904
|
+
const weaponDisplayName = weaponName === "弧焊枪" ? "弧焊枪" : "DG-3电弧步枪";
|
|
3905
|
+
if (success) {
|
|
3906
|
+
messages.push(`⚡ 【${weaponDisplayName}】武器效果:消耗目标${drainValue}点能量`);
|
|
3897
3907
|
}
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
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;
|
|
3906
3923
|
}
|
|
3907
|
-
const
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
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
|
+
}
|
|
3914
3934
|
};
|
|
3915
3935
|
}
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
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, activeBosses, weaponName, damage, ignoreRate) {
|
|
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);
|
|
3923
3982
|
}
|
|
3924
|
-
const effectPercent = Math.round(config.effect * 100);
|
|
3925
|
-
const effectSign = config.effect > 0 ? "+" : "";
|
|
3926
|
-
messages.push(`📚 【${skill}】生效:受到的伤害${effectSign}${effectPercent}%`);
|
|
3927
|
-
}
|
|
3928
|
-
});
|
|
3929
|
-
const radiationCalc = this.calculateRadiationDamage(targetBoss);
|
|
3930
|
-
if (radiationCalc) {
|
|
3931
|
-
buffMultiplier += radiationCalc.damageMultiplier;
|
|
3932
|
-
messages.push(...radiationCalc.messages);
|
|
3933
|
-
}
|
|
3934
|
-
const coldDamageResult = this.calculateColdDamage(targetBoss);
|
|
3935
|
-
if (coldDamageResult) {
|
|
3936
|
-
buffMultiplier += coldDamageResult.damageMultiplier;
|
|
3937
|
-
messages.push(...coldDamageResult.messages);
|
|
3938
|
-
}
|
|
3939
|
-
const infectionResult = await this.handleInfectedStation(ctx, targetBoss);
|
|
3940
|
-
if (infectionResult) {
|
|
3941
|
-
nerfMultiplier += infectionResult.damageMultiplier;
|
|
3942
|
-
messages.push(...infectionResult.messages);
|
|
3943
|
-
}
|
|
3944
|
-
const armorResult = this.handleStructuralArmor(targetBoss, weaponData);
|
|
3945
|
-
if (armorResult) {
|
|
3946
|
-
nerfMultiplier += armorResult.damageMultiplier;
|
|
3947
|
-
messages.push(...armorResult.messages);
|
|
3948
|
-
}
|
|
3949
|
-
const bloodEffect = this.handleBloodEffects(targetBoss, currentHP, maxHP);
|
|
3950
|
-
if (bloodEffect) {
|
|
3951
|
-
if (bloodEffect.buffAmount > 0) {
|
|
3952
|
-
buffMultiplier += bloodEffect.buffAmount;
|
|
3953
|
-
}
|
|
3954
|
-
if (bloodEffect.nerfAmount > 0) {
|
|
3955
|
-
nerfMultiplier -= bloodEffect.nerfAmount;
|
|
3956
|
-
}
|
|
3957
|
-
messages.push(...bloodEffect.messages);
|
|
3958
|
-
}
|
|
3959
|
-
const siphonResult = this.handleEnergySiphon(targetBoss, currentHP, maxHP);
|
|
3960
|
-
if (siphonResult) {
|
|
3961
|
-
nerfMultiplier += siphonResult.damageMultiplier;
|
|
3962
|
-
messages.push(...siphonResult.messages);
|
|
3963
|
-
}
|
|
3964
|
-
const powerSiphonResult = this.handlePowerSiphon(targetBoss);
|
|
3965
|
-
if (powerSiphonResult) {
|
|
3966
|
-
nerfMultiplier += powerSiphonResult.damageMultiplier;
|
|
3967
|
-
messages.push(...powerSiphonResult.messages);
|
|
3968
|
-
}
|
|
3969
|
-
const giantRageResult = this.handleGiantRage(targetBoss, currentHP, maxHP);
|
|
3970
|
-
if (giantRageResult) {
|
|
3971
|
-
nerfMultiplier += giantRageResult.damageMultiplier;
|
|
3972
|
-
messages.push(...giantRageResult.messages);
|
|
3973
|
-
}
|
|
3974
|
-
const hellfireBombResult = this.handleHellfireBomb(targetBoss, activeBosses);
|
|
3975
|
-
if (hellfireBombResult) {
|
|
3976
|
-
nerfMultiplier += hellfireBombResult.damageMultiplier;
|
|
3977
|
-
messages.push(...hellfireBombResult.messages);
|
|
3978
|
-
}
|
|
3979
|
-
const disguiseResult = await this.handleDisguise(ctx, targetBoss, weaponName, initialDamage);
|
|
3980
|
-
if (disguiseResult) {
|
|
3981
|
-
nerfMultiplier += disguiseResult.damageMultiplier;
|
|
3982
|
-
messages.push(...disguiseResult.messages);
|
|
3983
|
-
}
|
|
3984
|
-
if (hunterImmune && !hunterImmune.immune) {
|
|
3985
|
-
const multiplier = hunterImmune.damageMultiplier;
|
|
3986
|
-
if (multiplier > 0) {
|
|
3987
|
-
buffMultiplier += multiplier;
|
|
3988
|
-
} else {
|
|
3989
|
-
nerfMultiplier += multiplier;
|
|
3990
3983
|
}
|
|
3991
|
-
messages.push(...hunterImmune.messages);
|
|
3992
|
-
}
|
|
3993
|
-
const rageResult = this.handleRage(targetBoss, currentHP, maxHP);
|
|
3994
|
-
if (rageResult) {
|
|
3995
|
-
nerfMultiplier += rageResult.damageMultiplier;
|
|
3996
|
-
messages.push(...rageResult.messages);
|
|
3997
3984
|
}
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
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
|
+
}
|
|
4005
3995
|
}
|
|
4006
|
-
messages.push(...hyperspaceResult.messages);
|
|
4007
|
-
}
|
|
4008
|
-
const frenzyResult = this.handlePsychicFrenzy(targetBoss, currentHP, maxHP);
|
|
4009
|
-
if (frenzyResult) {
|
|
4010
|
-
nerfMultiplier += frenzyResult.damageMultiplier;
|
|
4011
|
-
messages.push(...frenzyResult.messages);
|
|
4012
|
-
}
|
|
4013
|
-
const bombingResult = await this.handleCarpetBombing(ctx, targetBoss);
|
|
4014
|
-
if (bombingResult) {
|
|
4015
|
-
nerfMultiplier += bombingResult.damageMultiplier;
|
|
4016
|
-
messages.push(...bombingResult.messages);
|
|
4017
|
-
}
|
|
4018
|
-
if (solarFlareResult.messages.length > 0) {
|
|
4019
|
-
messages.push(...solarFlareResult.messages);
|
|
4020
|
-
}
|
|
4021
|
-
let baseMultiplier = buffMultiplier + nerfMultiplier;
|
|
4022
|
-
const ignoreReductionResult = await this.handleIgnoreReductionEffects(
|
|
4023
|
-
ctx,
|
|
4024
|
-
handle,
|
|
4025
|
-
weaponName,
|
|
4026
|
-
targetBoss,
|
|
4027
|
-
nerfMultiplier
|
|
4028
|
-
// 只传入减伤部分
|
|
4029
|
-
);
|
|
4030
|
-
let effectiveMultiplier = baseMultiplier;
|
|
4031
|
-
let appliedIgnoreMessages = [];
|
|
4032
|
-
let effectiveNerf = nerfMultiplier;
|
|
4033
|
-
if (ignoreReductionResult) {
|
|
4034
|
-
appliedIgnoreMessages = ignoreReductionResult.messages;
|
|
4035
|
-
effectiveNerf = nerfMultiplier * (1 - ignoreReductionResult.ignoreRate);
|
|
4036
|
-
effectiveMultiplier = buffMultiplier + effectiveNerf;
|
|
4037
|
-
}
|
|
4038
|
-
const originalMultiplier = effectiveMultiplier;
|
|
4039
|
-
if (originalMultiplier < -1) {
|
|
4040
|
-
messages.push(`⚠️ 触发伤害保底机制:强制造成1点伤害`);
|
|
4041
|
-
}
|
|
4042
|
-
let finalDamage = initialDamage * (1 + effectiveMultiplier);
|
|
4043
|
-
finalDamage = Math.floor(finalDamage);
|
|
4044
|
-
finalDamage = Math.max(finalDamage, 1);
|
|
4045
|
-
currentHP = targetBoss.HP - finalDamage;
|
|
4046
|
-
if (currentHP < 0) {
|
|
4047
|
-
currentHP = 0;
|
|
4048
|
-
}
|
|
4049
|
-
if (appliedIgnoreMessages.length > 0) {
|
|
4050
|
-
messages.push(...appliedIgnoreMessages);
|
|
4051
|
-
messages.push(
|
|
4052
|
-
`⚡ 减伤效果:${(nerfMultiplier * 100).toFixed(0)}% → ${(effectiveNerf * 100).toFixed(0)}%`
|
|
4053
|
-
);
|
|
4054
3996
|
}
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
if (burningBurrowResult) {
|
|
4070
|
-
currentHP = burningBurrowResult.updatedHP;
|
|
4071
|
-
messages.push(...burningBurrowResult.messages);
|
|
4072
|
-
skillUpdates.push(...burningBurrowResult.skillUpdates);
|
|
4073
|
-
}
|
|
4074
|
-
const moldResult = await this.handleMoldGrowth(ctx, targetBoss, bossGroup);
|
|
4075
|
-
if (moldResult) {
|
|
4076
|
-
messages.push(...moldResult.messages);
|
|
4077
|
-
}
|
|
4078
|
-
const pulseResult = await this.handlePulse(
|
|
4079
|
-
ctx,
|
|
4080
|
-
targetBoss,
|
|
4081
|
-
activeBosses,
|
|
4082
|
-
bossGroup,
|
|
4083
|
-
currentHP
|
|
4084
|
-
// 传入当前HP值
|
|
4085
|
-
);
|
|
4086
|
-
if (pulseResult) {
|
|
4087
|
-
currentHP = pulseResult.newHP;
|
|
4088
|
-
messages.push(...pulseResult.messages);
|
|
4089
|
-
}
|
|
4090
|
-
if (weaponName !== "焚烧枪") {
|
|
4091
|
-
if (targetBoss.skills.includes("腐蚀胆汁")) {
|
|
4092
|
-
const bileTriggered = await this.handleCorrosiveBile(ctx, targetBoss, bossGroup, currentHP);
|
|
4093
|
-
if (bileTriggered) {
|
|
4094
|
-
currentHP = bileTriggered.currentHP;
|
|
4095
|
-
skipBileStacking = true;
|
|
4096
|
-
messages.push(...bileTriggered.messages);
|
|
4097
|
-
}
|
|
4098
|
-
}
|
|
4099
|
-
if (targetBoss.skills.includes("火焰吐息")) {
|
|
4100
|
-
const breathTriggered = await this.handleFireBreath(ctx, targetBoss, bossGroup, currentHP);
|
|
4101
|
-
if (breathTriggered) {
|
|
4102
|
-
currentHP = breathTriggered.currentHP;
|
|
4103
|
-
skipBileStacking = true;
|
|
4104
|
-
messages.push(...breathTriggered.messages);
|
|
4105
|
-
}
|
|
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);
|
|
4106
4011
|
}
|
|
4107
4012
|
}
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
const shieldResult = await this.handleTyrsShield(ctx, targetBoss, currentHP, activeBosses, bossGroup);
|
|
4114
|
-
if (shieldResult) {
|
|
4115
|
-
currentHP = shieldResult.updatedHP;
|
|
4116
|
-
messages.push(...shieldResult.messages);
|
|
4013
|
+
} else {
|
|
4014
|
+
const result = effect(targetBoss, weaponData);
|
|
4015
|
+
if (result && result.isImmune) {
|
|
4016
|
+
immune = true;
|
|
4017
|
+
messages.push(...result.messages);
|
|
4117
4018
|
}
|
|
4118
4019
|
}
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
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);
|
|
4124
4055
|
}
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
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
|
+
}
|
|
4129
4064
|
}
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
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
|
+
}
|
|
4138
4078
|
}
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
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);
|
|
4143
4085
|
}
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
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);
|
|
4147
4114
|
}
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4115
|
+
if (result) {
|
|
4116
|
+
messages.push(...result.messages);
|
|
4117
|
+
if (result.targetUpdates) {
|
|
4118
|
+
updateStatsByName(result.targetUpdates.name, result.targetUpdates.updates);
|
|
4119
|
+
}
|
|
4120
|
+
if (result.otherUpdates) {
|
|
4121
|
+
for (const update of result.otherUpdates) {
|
|
4122
|
+
updateStatsByName(update.name, update.updates);
|
|
4123
|
+
}
|
|
4124
|
+
}
|
|
4151
4125
|
}
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
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;
|
|
4156
4138
|
}
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
messages.push(...sentryResult.messages);
|
|
4139
|
+
if (radiationResult.targetUpdates) {
|
|
4140
|
+
updateStatsByName(radiationResult.targetUpdates.name, radiationResult.targetUpdates.updates);
|
|
4160
4141
|
}
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
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;
|
|
4164
4149
|
}
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
messages.push(...CollapsepulseResult.messages);
|
|
4150
|
+
if (coldResult.targetUpdates) {
|
|
4151
|
+
updateStatsByName(coldResult.targetUpdates.name, coldResult.targetUpdates.updates);
|
|
4168
4152
|
}
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
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);
|
|
4172
4160
|
}
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
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);
|
|
4176
4168
|
}
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
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);
|
|
4182
4177
|
}
|
|
4183
4178
|
}
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
messages.push(...gammaRadResult.messages);
|
|
4191
|
-
radiationApplied = gammaRadResult.radiationApplied;
|
|
4192
|
-
}
|
|
4193
|
-
const coldEffectResult = await this.handleColdEffect(ctx, targetBoss, weaponName);
|
|
4194
|
-
if (coldEffectResult) {
|
|
4195
|
-
messages.push(...coldEffectResult.messages);
|
|
4196
|
-
freezing = coldEffectResult.freezing;
|
|
4197
|
-
}
|
|
4198
|
-
const tagChangeResult = await this.handleConductorTagChange(ctx, targetBoss, currentHP, maxHP);
|
|
4199
|
-
if (tagChangeResult) {
|
|
4200
|
-
messages.push(...tagChangeResult.messages);
|
|
4201
|
-
}
|
|
4202
|
-
const constructorResult = await this.handleConstructor(ctx, targetBoss);
|
|
4203
|
-
if (constructorResult) {
|
|
4204
|
-
messages.push(...constructorResult.messages);
|
|
4205
|
-
}
|
|
4206
|
-
return {
|
|
4207
|
-
currentHP,
|
|
4208
|
-
messages,
|
|
4209
|
-
skillUpdates,
|
|
4210
|
-
initialDamage: finalDamage,
|
|
4211
|
-
radiationApplied,
|
|
4212
|
-
// 新增返回辐射应用标记
|
|
4213
|
-
freezing,
|
|
4214
|
-
pulseApplied,
|
|
4215
|
-
arcApplied
|
|
4216
|
-
};
|
|
4217
|
-
}, "handlePassives"),
|
|
4218
|
-
// 应用技能更新到数据库(优化合并同名boss的更新)
|
|
4219
|
-
applySkillUpdates: /* @__PURE__ */ __name(async (ctx, skillUpdates) => {
|
|
4220
|
-
const mergedUpdates = skillUpdates.reduce((acc, update) => {
|
|
4221
|
-
const existing = acc.find((u) => u.name === update.name);
|
|
4222
|
-
if (existing) {
|
|
4223
|
-
if (update.remove) {
|
|
4224
|
-
existing.remove = [.../* @__PURE__ */ new Set([...existing.remove, ...update.remove])];
|
|
4225
|
-
}
|
|
4226
|
-
if (update.add) {
|
|
4227
|
-
existing.add = [.../* @__PURE__ */ new Set([...existing.add, ...update.add])];
|
|
4228
|
-
}
|
|
4229
|
-
} else {
|
|
4230
|
-
acc.push({
|
|
4231
|
-
name: update.name,
|
|
4232
|
-
remove: [...new Set(update.remove || [])],
|
|
4233
|
-
add: [...new Set(update.add || [])]
|
|
4234
|
-
});
|
|
4235
|
-
}
|
|
4236
|
-
return acc;
|
|
4237
|
-
}, []);
|
|
4238
|
-
const updates = mergedUpdates.map(async (update) => {
|
|
4239
|
-
const [boss] = await ctx.database.get("ggcevo_boss", { name: update.name });
|
|
4240
|
-
if (!boss) return;
|
|
4241
|
-
let newSkills = [...boss.skills];
|
|
4242
|
-
if (update.remove?.length) {
|
|
4243
|
-
newSkills = newSkills.filter((s) => !update.remove.includes(s));
|
|
4244
|
-
}
|
|
4245
|
-
if (update.add?.length) {
|
|
4246
|
-
newSkills = [...newSkills, ...update.add];
|
|
4247
|
-
newSkills = [...new Set(newSkills)];
|
|
4248
|
-
}
|
|
4249
|
-
return ctx.database.set(
|
|
4250
|
-
"ggcevo_boss",
|
|
4251
|
-
{ name: update.name },
|
|
4252
|
-
{ skills: newSkills }
|
|
4253
|
-
);
|
|
4254
|
-
});
|
|
4255
|
-
await Promise.all(updates);
|
|
4256
|
-
}, "applySkillUpdates")
|
|
4257
|
-
};
|
|
4258
|
-
|
|
4259
|
-
// src/boss/attackhandling.ts
|
|
4260
|
-
function getBossMaxHP(bossName) {
|
|
4261
|
-
for (const bossGroup of bossPool) {
|
|
4262
|
-
if (bossGroup.main.name === bossName) {
|
|
4263
|
-
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);
|
|
4264
4185
|
}
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4186
|
+
}
|
|
4187
|
+
let finalDamage = damage;
|
|
4188
|
+
if (!immune) {
|
|
4189
|
+
let adjustedNerfMultiplier = totalNerfMultiplier * (1 - ignoreRate);
|
|
4190
|
+
if (ignoreRate > 0 && totalNerfMultiplier > 0) {
|
|
4191
|
+
messages.push(`🛡️ 无视减伤: 无视了${(ignoreRate * 100).toFixed(1)}%减伤效果`);
|
|
4192
|
+
messages.push(` 减伤系数由${(totalNerfMultiplier * 100).toFixed(1)}%降低至${(adjustedNerfMultiplier * 100).toFixed(1)}%`);
|
|
4193
|
+
}
|
|
4194
|
+
const damageMultiplier = 1 + totalBuffMultiplier - adjustedNerfMultiplier;
|
|
4195
|
+
finalDamage = Math.max(1, Math.round(damage * damageMultiplier));
|
|
4196
|
+
if (damage !== finalDamage) {
|
|
4197
|
+
const adjustmentPercent = ((damageMultiplier - 1) * 100).toFixed(1);
|
|
4198
|
+
if (damageMultiplier > 1) {
|
|
4199
|
+
messages.push(`⚔️ 伤害增益: 总计增加${adjustmentPercent}%伤害`);
|
|
4200
|
+
} else if (damageMultiplier < 1) {
|
|
4201
|
+
messages.push(`🛡️ 伤害减免: 总计减少${Math.abs(Number(adjustmentPercent))}%伤害`);
|
|
4202
|
+
}
|
|
4203
|
+
}
|
|
4204
|
+
if (finalDamage > 0) {
|
|
4205
|
+
updateStatsByName(targetBoss.name, {
|
|
4206
|
+
hpChange: -finalDamage
|
|
4207
|
+
});
|
|
4269
4208
|
}
|
|
4270
4209
|
}
|
|
4271
|
-
|
|
4210
|
+
if (immune) {
|
|
4211
|
+
finalDamage = 0;
|
|
4212
|
+
}
|
|
4213
|
+
return {
|
|
4214
|
+
finalDamage,
|
|
4215
|
+
messages,
|
|
4216
|
+
radiationLayerAdded,
|
|
4217
|
+
coldLayerAdded,
|
|
4218
|
+
energyDrained,
|
|
4219
|
+
layerReduced,
|
|
4220
|
+
bileDetonationTrigger
|
|
4221
|
+
};
|
|
4272
4222
|
}
|
|
4273
|
-
__name(
|
|
4223
|
+
__name(applyPassiveEffects, "applyPassiveEffects");
|
|
4224
|
+
|
|
4225
|
+
// src/boss/attackhandling.ts
|
|
4274
4226
|
async function getCleanerRewardBroadcast(ctx, boss, killerHandle, killerName) {
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
killerBonus = true;
|
|
4290
|
-
}
|
|
4291
|
-
await ctx.database.upsert("ggcevo_careers", [{
|
|
4292
|
-
handle: cleaner.handle,
|
|
4293
|
-
redcrystal: (cleaner.redcrystal || 0) + rewardAmount
|
|
4294
|
-
}], ["handle"]);
|
|
4227
|
+
const bossType = boss.type;
|
|
4228
|
+
const bossName = boss.name;
|
|
4229
|
+
const baseReward = bossType === "主宰" ? 10 : 5;
|
|
4230
|
+
const allCleaners = await ctx.database.get("ggcevo_careers", {
|
|
4231
|
+
career: "清洁工"
|
|
4232
|
+
});
|
|
4233
|
+
if (!allCleaners.length) return [];
|
|
4234
|
+
let killerBonus = false;
|
|
4235
|
+
let killerBonusMessage = "";
|
|
4236
|
+
for (const cleaner of allCleaners) {
|
|
4237
|
+
let rewardAmount = baseReward;
|
|
4238
|
+
if (cleaner.handle === killerHandle) {
|
|
4239
|
+
rewardAmount *= 2;
|
|
4240
|
+
killerBonus = true;
|
|
4295
4241
|
}
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
return [];
|
|
4242
|
+
await ctx.database.upsert("ggcevo_careers", [{
|
|
4243
|
+
handle: cleaner.handle,
|
|
4244
|
+
redcrystal: (cleaner.redcrystal || 0) + rewardAmount
|
|
4245
|
+
}], ["handle"]);
|
|
4301
4246
|
}
|
|
4247
|
+
const rewardMessage = `🧹 清洁工职业因清理 ${bossName} 获得 ${baseReward} 红晶${killerBonus ? ` (致命一击奖励者:${killerName})` : ""}`;
|
|
4248
|
+
return [rewardMessage];
|
|
4302
4249
|
}
|
|
4303
4250
|
__name(getCleanerRewardBroadcast, "getCleanerRewardBroadcast");
|
|
4304
4251
|
async function handleBossDefeatRewards(ctx, targetBoss) {
|
|
@@ -4424,42 +4371,31 @@ async function handleBossDefeatRewards(ctx, targetBoss) {
|
|
|
4424
4371
|
return { rewardMessages };
|
|
4425
4372
|
}
|
|
4426
4373
|
__name(handleBossDefeatRewards, "handleBossDefeatRewards");
|
|
4427
|
-
async function handlePrimaryAttack(ctx, session,
|
|
4374
|
+
async function handlePrimaryAttack(ctx, session, handle, config, equippedWeapon, targetBoss, activeBosses, weaponName) {
|
|
4428
4375
|
const damageResult = await calculateTotalDamage(ctx, session, config, equippedWeapon, targetBoss);
|
|
4429
|
-
const
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
maxHP,
|
|
4436
|
-
weaponName,
|
|
4437
|
-
weaponData,
|
|
4438
|
-
bossGroup
|
|
4439
|
-
);
|
|
4440
|
-
const currentHP = passiveResult.currentHP;
|
|
4441
|
-
const initialDamage = passiveResult.initialDamage;
|
|
4442
|
-
if (passiveResult.skillUpdates.length > 0) {
|
|
4443
|
-
await PassiveHandler.applySkillUpdates(ctx, passiveResult.skillUpdates);
|
|
4444
|
-
}
|
|
4376
|
+
const ignoreReduction = await handleIgnoreReductionEffects(ctx, handle, weaponName, targetBoss);
|
|
4377
|
+
const EffectProcessor = applyPassiveEffects(targetBoss, activeBosses, weaponName, damageResult.damage, ignoreReduction.ignoreRate);
|
|
4378
|
+
const initialDamage = EffectProcessor.finalDamage;
|
|
4379
|
+
await saveAndClearStats(ctx);
|
|
4380
|
+
const [currentboss] = await ctx.database.get("ggcevo_boss", { name: targetBoss.name });
|
|
4381
|
+
const currentHP = currentboss.HP;
|
|
4445
4382
|
const isDefeated = currentHP <= 0;
|
|
4446
4383
|
return {
|
|
4447
4384
|
initialDamage,
|
|
4448
4385
|
currentHP,
|
|
4449
4386
|
isDefeated,
|
|
4450
|
-
damage: initialDamage,
|
|
4451
4387
|
hasCrit: damageResult.hasCrit,
|
|
4452
4388
|
effectMessage: damageResult.effectMessage,
|
|
4453
|
-
passiveMessages:
|
|
4454
|
-
radiationApplied:
|
|
4455
|
-
freezing:
|
|
4456
|
-
bileStacks:
|
|
4457
|
-
pulseApplied:
|
|
4458
|
-
arcApplied:
|
|
4389
|
+
passiveMessages: EffectProcessor.messages,
|
|
4390
|
+
radiationApplied: EffectProcessor.radiationLayerAdded,
|
|
4391
|
+
freezing: EffectProcessor.coldLayerAdded,
|
|
4392
|
+
bileStacks: EffectProcessor.bileDetonationTrigger,
|
|
4393
|
+
pulseApplied: EffectProcessor.layerReduced,
|
|
4394
|
+
arcApplied: EffectProcessor.energyDrained
|
|
4459
4395
|
};
|
|
4460
4396
|
}
|
|
4461
4397
|
__name(handlePrimaryAttack, "handlePrimaryAttack");
|
|
4462
|
-
async function handleScatterAttack(ctx, session,
|
|
4398
|
+
async function handleScatterAttack(ctx, session, handle, config, equippedWeapon, targetBoss, weaponName, activeBosses) {
|
|
4463
4399
|
const secondaryTargets = activeBosses.filter((boss) => boss.name !== targetBoss.name);
|
|
4464
4400
|
const scatterEffectMessages = [];
|
|
4465
4401
|
const extraDamages = [];
|
|
@@ -4482,47 +4418,33 @@ async function handleScatterAttack(ctx, session, config, handle, equippedWeapon,
|
|
|
4482
4418
|
secondaryTarget
|
|
4483
4419
|
);
|
|
4484
4420
|
const secondaryDamage = Math.round(damageResult.damage * scatterRatio);
|
|
4485
|
-
const
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
getBossMaxHP(secondaryTarget.name),
|
|
4492
|
-
weaponName,
|
|
4493
|
-
weaponData,
|
|
4494
|
-
bossGroup
|
|
4495
|
-
);
|
|
4496
|
-
const actualDamage = Math.min(passiveResult.initialDamage, secondaryTarget.HP);
|
|
4497
|
-
const newHP = passiveResult.currentHP;
|
|
4421
|
+
const ignoreReduction = await handleIgnoreReductionEffects(ctx, handle, weaponName, targetBoss);
|
|
4422
|
+
const EffectProcessor = applyPassiveEffects(targetBoss, activeBosses, weaponName, secondaryDamage, ignoreReduction.ignoreRate);
|
|
4423
|
+
const actualDamage = EffectProcessor.finalDamage;
|
|
4424
|
+
await saveAndClearStats(ctx);
|
|
4425
|
+
const [currentboss] = await ctx.database.get("ggcevo_boss", { name: targetBoss.name });
|
|
4426
|
+
const currentHP = currentboss.HP;
|
|
4498
4427
|
extraDamages.push({
|
|
4499
4428
|
name: secondaryTarget.name,
|
|
4500
4429
|
damage: actualDamage
|
|
4501
4430
|
});
|
|
4502
|
-
if (
|
|
4503
|
-
await PassiveHandler.applySkillUpdates(ctx, passiveResult.skillUpdates);
|
|
4504
|
-
}
|
|
4505
|
-
if (passiveResult.radiationApplied) {
|
|
4431
|
+
if (EffectProcessor.radiationLayerAdded) {
|
|
4506
4432
|
taskUpdates.push({ taskId: 1, count: 1 });
|
|
4507
4433
|
}
|
|
4508
|
-
if (
|
|
4434
|
+
if (EffectProcessor.coldLayerAdded) {
|
|
4509
4435
|
taskUpdates.push({ taskId: 2, count: 1 });
|
|
4510
4436
|
}
|
|
4511
|
-
if (
|
|
4437
|
+
if (EffectProcessor.bileDetonationTrigger) {
|
|
4512
4438
|
taskUpdates.push({ taskId: 3, count: 1 });
|
|
4513
4439
|
}
|
|
4514
|
-
if (
|
|
4440
|
+
if (EffectProcessor.layerReduced) {
|
|
4515
4441
|
taskUpdates.push({ taskId: 4, count: 1 });
|
|
4516
4442
|
}
|
|
4517
|
-
if (
|
|
4443
|
+
if (EffectProcessor.energyDrained) {
|
|
4518
4444
|
taskUpdates.push({ taskId: 5, count: 1 });
|
|
4519
4445
|
}
|
|
4520
|
-
const isDead =
|
|
4521
|
-
|
|
4522
|
-
HP: Math.max(newHP, 0),
|
|
4523
|
-
isActive: !isDead
|
|
4524
|
-
});
|
|
4525
|
-
scatterEffectMessages.push(...passiveResult.messages.map((m) => ` 对 ${secondaryTarget.name} ${m}`));
|
|
4446
|
+
const isDead = currentHP <= 0;
|
|
4447
|
+
scatterEffectMessages.push(...EffectProcessor.messages.map((m) => ` 对 ${secondaryTarget.name} ${m}`));
|
|
4526
4448
|
if (isDead) {
|
|
4527
4449
|
actuallyDead.push(secondaryTarget.name);
|
|
4528
4450
|
}
|
|
@@ -4531,26 +4453,10 @@ async function handleScatterAttack(ctx, session, config, handle, equippedWeapon,
|
|
|
4531
4453
|
scatterEffectMessages,
|
|
4532
4454
|
extraDamages,
|
|
4533
4455
|
actuallyDead,
|
|
4534
|
-
scatterBroadcast: null,
|
|
4535
|
-
// 稍后处理广播
|
|
4536
4456
|
taskUpdates
|
|
4537
4457
|
};
|
|
4538
4458
|
}
|
|
4539
4459
|
__name(handleScatterAttack, "handleScatterAttack");
|
|
4540
|
-
async function applyAttackResults(ctx, targetBoss, result) {
|
|
4541
|
-
const { currentHP, isDefeated } = result;
|
|
4542
|
-
if (isDefeated) {
|
|
4543
|
-
await ctx.database.set("ggcevo_boss", { name: targetBoss.name }, {
|
|
4544
|
-
isActive: false,
|
|
4545
|
-
HP: 0
|
|
4546
|
-
});
|
|
4547
|
-
} else {
|
|
4548
|
-
await ctx.database.set("ggcevo_boss", { name: targetBoss.name }, {
|
|
4549
|
-
HP: Math.max(currentHP, 0)
|
|
4550
|
-
});
|
|
4551
|
-
}
|
|
4552
|
-
}
|
|
4553
|
-
__name(applyAttackResults, "applyAttackResults");
|
|
4554
4460
|
async function handleDeathTargets(ctx, deadTargets, killerName, killerHandle) {
|
|
4555
4461
|
const bossBroadcast = [];
|
|
4556
4462
|
const cleanerBroadcast = [];
|
|
@@ -4580,39 +4486,6 @@ async function handleDeathTargets(ctx, deadTargets, killerName, killerHandle) {
|
|
|
4580
4486
|
"🏆 伤害排行榜奖励:",
|
|
4581
4487
|
...rewardMessages
|
|
4582
4488
|
);
|
|
4583
|
-
} else {
|
|
4584
|
-
if (deadBoss.name === "机械感染虫") {
|
|
4585
|
-
const [mainBoss] = await ctx.database.get("ggcevo_boss", {
|
|
4586
|
-
groupId: deadBoss.groupId,
|
|
4587
|
-
type: "主宰",
|
|
4588
|
-
isActive: true
|
|
4589
|
-
});
|
|
4590
|
-
if (mainBoss && !mainBoss.skills.includes("孤立无援")) {
|
|
4591
|
-
await ctx.database.set("ggcevo_boss", { name: mainBoss.name }, {
|
|
4592
|
-
skills: [...mainBoss.skills, "孤立无援"]
|
|
4593
|
-
});
|
|
4594
|
-
bossBroadcast.push("💥 机械感染虫已阵亡,空间站感染虫进入【孤立无援】状态,受到的伤害+20%!");
|
|
4595
|
-
}
|
|
4596
|
-
} else {
|
|
4597
|
-
const remainingMinions = await ctx.database.get("ggcevo_boss", {
|
|
4598
|
-
groupId: deadBoss.groupId,
|
|
4599
|
-
type: "子代",
|
|
4600
|
-
isActive: true
|
|
4601
|
-
});
|
|
4602
|
-
if (remainingMinions.length === 0) {
|
|
4603
|
-
const [mainBoss] = await ctx.database.get("ggcevo_boss", {
|
|
4604
|
-
groupId: deadBoss.groupId,
|
|
4605
|
-
type: "主宰",
|
|
4606
|
-
isActive: true
|
|
4607
|
-
});
|
|
4608
|
-
if (mainBoss && !mainBoss.skills.includes("孤立无援")) {
|
|
4609
|
-
await ctx.database.set("ggcevo_boss", { name: mainBoss.name }, {
|
|
4610
|
-
skills: [...mainBoss.skills, "孤立无援"]
|
|
4611
|
-
});
|
|
4612
|
-
bossBroadcast.push(`💥 所有子代已阵亡,${mainBoss.name}进入【孤立无援】状态,受到的伤害+20%!`);
|
|
4613
|
-
}
|
|
4614
|
-
}
|
|
4615
|
-
}
|
|
4616
4489
|
}
|
|
4617
4490
|
}
|
|
4618
4491
|
return {
|
|
@@ -4723,13 +4596,8 @@ ${scatterResult.scatterEffectMessages.map((m) => `▸ ${m}`).join("\n")}`,
|
|
|
4723
4596
|
return messages.filter((line) => line).join("\n");
|
|
4724
4597
|
}
|
|
4725
4598
|
__name(buildResultMessage, "buildResultMessage");
|
|
4726
|
-
async function handleBroadcasts(ctx, groupIds,
|
|
4599
|
+
async function handleBroadcasts(ctx, groupIds, bossEventBroadcast, cleanerRewardBroadcast, isPrimaryAttack) {
|
|
4727
4600
|
const broadcastMessages = [];
|
|
4728
|
-
if (scatterBroadcast) {
|
|
4729
|
-
const scatterMsg = Array.isArray(scatterBroadcast) ? scatterBroadcast.join("\n") : scatterBroadcast;
|
|
4730
|
-
broadcastMessages.push(`✨ 散射攻击结果
|
|
4731
|
-
${scatterMsg}`);
|
|
4732
|
-
}
|
|
4733
4601
|
if (bossEventBroadcast) {
|
|
4734
4602
|
const bossMsg = Array.isArray(bossEventBroadcast) ? bossEventBroadcast.join("\n") : bossEventBroadcast;
|
|
4735
4603
|
broadcastMessages.push(bossMsg);
|
|
@@ -4771,6 +4639,149 @@ async function updateTaskProgress(ctx, handle, taskUpdates) {
|
|
|
4771
4639
|
}
|
|
4772
4640
|
}
|
|
4773
4641
|
__name(updateTaskProgress, "updateTaskProgress");
|
|
4642
|
+
function getMaxHPByName2(bossName) {
|
|
4643
|
+
for (const boss of bossPool) {
|
|
4644
|
+
if (boss.main.name === bossName) {
|
|
4645
|
+
return boss.main.maxHP;
|
|
4646
|
+
}
|
|
4647
|
+
for (const minion of boss.minions) {
|
|
4648
|
+
if (minion.name === bossName) {
|
|
4649
|
+
return minion.maxHP;
|
|
4650
|
+
}
|
|
4651
|
+
}
|
|
4652
|
+
}
|
|
4653
|
+
return void 0;
|
|
4654
|
+
}
|
|
4655
|
+
__name(getMaxHPByName2, "getMaxHPByName");
|
|
4656
|
+
function getMaxEnergyByName2(bossName) {
|
|
4657
|
+
for (const boss of bossPool) {
|
|
4658
|
+
if (boss.main.name === bossName) {
|
|
4659
|
+
return boss.main.maxEnergy;
|
|
4660
|
+
}
|
|
4661
|
+
for (const minion of boss.minions) {
|
|
4662
|
+
if (minion.name === bossName) {
|
|
4663
|
+
return minion.maxEnergy;
|
|
4664
|
+
}
|
|
4665
|
+
}
|
|
4666
|
+
}
|
|
4667
|
+
return void 0;
|
|
4668
|
+
}
|
|
4669
|
+
__name(getMaxEnergyByName2, "getMaxEnergyByName");
|
|
4670
|
+
async function updateDatabaseWithStats(ctx, stats) {
|
|
4671
|
+
const bossData = await ctx.database.get("ggcevo_boss", { name: stats.name });
|
|
4672
|
+
const maxHP = getMaxHPByName2(stats.name);
|
|
4673
|
+
const maxEnergy = getMaxEnergyByName2(stats.name);
|
|
4674
|
+
if (!bossData || bossData.length === 0) {
|
|
4675
|
+
return;
|
|
4676
|
+
}
|
|
4677
|
+
const boss = bossData[0];
|
|
4678
|
+
const updateData = {};
|
|
4679
|
+
if (stats.hpChange !== 0) {
|
|
4680
|
+
const newHP = boss.HP + stats.hpChange;
|
|
4681
|
+
updateData.HP = Math.max(0, Math.min(maxHP, newHP));
|
|
4682
|
+
}
|
|
4683
|
+
if (stats.energyChange !== 0) {
|
|
4684
|
+
const newEnergy = boss.energy + stats.energyChange;
|
|
4685
|
+
updateData.energy = Math.max(0, Math.min(maxEnergy, newEnergy));
|
|
4686
|
+
}
|
|
4687
|
+
if (stats.skillStacksChanged !== 0) {
|
|
4688
|
+
updateData.skillStacks = Math.max(0, boss.skillStacks + stats.skillStacksChanged);
|
|
4689
|
+
}
|
|
4690
|
+
if (stats.statusLayersChanged !== 0) {
|
|
4691
|
+
updateData.statusLayers = Math.max(0, boss.statusLayers + stats.statusLayersChanged);
|
|
4692
|
+
}
|
|
4693
|
+
if (stats.radiationLayersChange !== 0) {
|
|
4694
|
+
updateData.radiationLayers = Math.max(0, boss.radiationLayers + stats.radiationLayersChange);
|
|
4695
|
+
}
|
|
4696
|
+
if (stats.coldLayersChange !== 0) {
|
|
4697
|
+
updateData.coldLayers = Math.max(0, boss.coldLayers + stats.coldLayersChange);
|
|
4698
|
+
}
|
|
4699
|
+
if (stats.tagsAdded.length > 0 || stats.tagsRemoved.length > 0) {
|
|
4700
|
+
updateData.tags = [
|
|
4701
|
+
...boss.tags.filter((tag) => !stats.tagsRemoved.includes(tag)),
|
|
4702
|
+
...stats.tagsAdded.filter((tag) => !boss.tags.includes(tag))
|
|
4703
|
+
];
|
|
4704
|
+
}
|
|
4705
|
+
if (stats.skillsAdded.length > 0 || stats.skillsRemoved.length > 0) {
|
|
4706
|
+
updateData.skills = [
|
|
4707
|
+
...boss.skills.filter((skill) => !stats.skillsRemoved.includes(skill)),
|
|
4708
|
+
...stats.skillsAdded.filter((skill) => !boss.skills.includes(skill))
|
|
4709
|
+
];
|
|
4710
|
+
}
|
|
4711
|
+
if (stats.lastWeaponName) {
|
|
4712
|
+
updateData.lastWeaponName = stats.lastWeaponName;
|
|
4713
|
+
}
|
|
4714
|
+
if (Object.keys(updateData).length > 0) {
|
|
4715
|
+
await ctx.database.set("ggcevo_boss", { name: stats.name }, updateData);
|
|
4716
|
+
}
|
|
4717
|
+
}
|
|
4718
|
+
__name(updateDatabaseWithStats, "updateDatabaseWithStats");
|
|
4719
|
+
async function saveAndClearStats(ctx) {
|
|
4720
|
+
for (const name2 in battleStatsMap) {
|
|
4721
|
+
const stats = battleStatsMap[name2];
|
|
4722
|
+
await updateDatabaseWithStats(ctx, stats);
|
|
4723
|
+
}
|
|
4724
|
+
Object.keys(battleStatsMap).forEach((key) => delete battleStatsMap[key]);
|
|
4725
|
+
}
|
|
4726
|
+
__name(saveAndClearStats, "saveAndClearStats");
|
|
4727
|
+
async function handleIgnoreReductionEffects(ctx, handle, weaponName, targetBoss) {
|
|
4728
|
+
const ignoreEffects = [];
|
|
4729
|
+
const messages = [];
|
|
4730
|
+
const handleWeaponEffect = /* @__PURE__ */ __name(() => {
|
|
4731
|
+
if (weaponName === "光剑") {
|
|
4732
|
+
ignoreEffects.push(1);
|
|
4733
|
+
messages.push(`⚔️ 【光剑】武器效果:无视目标100%减伤效果`);
|
|
4734
|
+
} else if (weaponName === "M4AE脉冲步枪") {
|
|
4735
|
+
ignoreEffects.push(0.8);
|
|
4736
|
+
messages.push(`🔫 【M4AE脉冲步枪】武器效果:无视目标80%减伤效果`);
|
|
4737
|
+
} else if (weaponName === "粒子相位枪" && targetBoss?.tags.includes("护盾")) {
|
|
4738
|
+
ignoreEffects.push(0.5);
|
|
4739
|
+
messages.push(`⚡ 【粒子相位枪】武器效果:无视护盾目标50%减伤效果`);
|
|
4740
|
+
}
|
|
4741
|
+
}, "handleWeaponEffect");
|
|
4742
|
+
const handlePiercingMod = /* @__PURE__ */ __name(async () => {
|
|
4743
|
+
const weaponConfigData = weaponConfig[weaponName];
|
|
4744
|
+
if (!weaponConfigData) return;
|
|
4745
|
+
const [equippedWeapon] = await ctx.database.get("ggcevo_equipment", {
|
|
4746
|
+
weaponId: weaponConfigData.id,
|
|
4747
|
+
handle,
|
|
4748
|
+
equipped: true
|
|
4749
|
+
});
|
|
4750
|
+
if (equippedWeapon?.installedMods?.includes("破甲模块")) {
|
|
4751
|
+
ignoreEffects.push(0.2);
|
|
4752
|
+
messages.push(`⚡ 【破甲模块】生效:无视目标20%减伤效果`);
|
|
4753
|
+
}
|
|
4754
|
+
}, "handlePiercingMod");
|
|
4755
|
+
handleWeaponEffect();
|
|
4756
|
+
await handlePiercingMod();
|
|
4757
|
+
const handleCareerEffects = /* @__PURE__ */ __name(async () => {
|
|
4758
|
+
const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
|
|
4759
|
+
if (!careerData || careerData.group !== "辛迪加海盗") return;
|
|
4760
|
+
const [radarMask] = await ctx.database.get("ggcevo_warehouse", {
|
|
4761
|
+
handle,
|
|
4762
|
+
itemId: 6
|
|
4763
|
+
});
|
|
4764
|
+
if (radarMask?.quantity > 0) {
|
|
4765
|
+
ignoreEffects.push(0.1);
|
|
4766
|
+
messages.push(`🛰️ 【雷达面罩】生效:无视目标10%减伤效果`);
|
|
4767
|
+
}
|
|
4768
|
+
if (careerData.career === "猩红杀手" && weaponName === "侦察步枪") {
|
|
4769
|
+
ignoreEffects.push(0.2);
|
|
4770
|
+
messages.push(`🎯 【猩红杀手】职业效果:无视目标20%减伤效果`);
|
|
4771
|
+
}
|
|
4772
|
+
}, "handleCareerEffects");
|
|
4773
|
+
await handleCareerEffects();
|
|
4774
|
+
if (ignoreEffects.length === 0) return null;
|
|
4775
|
+
const totalIgnoreRate = Math.min(
|
|
4776
|
+
1,
|
|
4777
|
+
ignoreEffects.reduce((sum, rate) => sum + rate, 0)
|
|
4778
|
+
);
|
|
4779
|
+
return {
|
|
4780
|
+
ignoreRate: totalIgnoreRate,
|
|
4781
|
+
messages
|
|
4782
|
+
};
|
|
4783
|
+
}
|
|
4784
|
+
__name(handleIgnoreReductionEffects, "handleIgnoreReductionEffects");
|
|
4774
4785
|
|
|
4775
4786
|
// src/index.ts
|
|
4776
4787
|
var name = "ggcevo-game";
|
|
@@ -4958,18 +4969,17 @@ function apply(ctx, config) {
|
|
|
4958
4969
|
});
|
|
4959
4970
|
ctx.model.extend("ggcevo_boss", {
|
|
4960
4971
|
name: "string",
|
|
4972
|
+
groupId: "unsigned",
|
|
4961
4973
|
type: "string",
|
|
4962
4974
|
HP: "unsigned",
|
|
4963
4975
|
energy: "unsigned",
|
|
4964
|
-
tags:
|
|
4965
|
-
skills:
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4976
|
+
tags: "list",
|
|
4977
|
+
skills: "list",
|
|
4978
|
+
skillStacks: "unsigned",
|
|
4979
|
+
statusLayers: "unsigned",
|
|
4980
|
+
radiationLayers: "unsigned",
|
|
4981
|
+
coldLayers: "unsigned",
|
|
4970
4982
|
lastWeaponName: "string",
|
|
4971
|
-
// 新增字段,记录伪装技能的信息
|
|
4972
|
-
groupId: "unsigned",
|
|
4973
4983
|
isActive: "boolean",
|
|
4974
4984
|
respawnTime: "timestamp"
|
|
4975
4985
|
}, {
|
|
@@ -7241,7 +7251,6 @@ ${validTypes.join("、")}`;
|
|
|
7241
7251
|
ctx.command("ggcevo/攻击 <bossName>").usage("请输入要攻击的异形名称(例如:攻击 异齿猛兽 或 攻击 寒冰王蛇)").action(async (argv, bossName) => {
|
|
7242
7252
|
const session = argv.session;
|
|
7243
7253
|
let bossEventBroadcast = null;
|
|
7244
|
-
let scatterBroadcast = null;
|
|
7245
7254
|
let cleanerRewardBroadcast = null;
|
|
7246
7255
|
const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
|
|
7247
7256
|
if (!profile) return "🔒 需要先绑定游戏句柄。";
|
|
@@ -7286,17 +7295,13 @@ ${validTypes.join("、")}`;
|
|
|
7286
7295
|
const primaryAttackResult = await handlePrimaryAttack(
|
|
7287
7296
|
ctx,
|
|
7288
7297
|
session,
|
|
7289
|
-
config2,
|
|
7290
7298
|
handle,
|
|
7299
|
+
config2,
|
|
7291
7300
|
equippedWeapon,
|
|
7292
7301
|
targetBoss,
|
|
7293
7302
|
activeBosses,
|
|
7294
|
-
|
|
7295
|
-
weaponName,
|
|
7296
|
-
weaponData,
|
|
7297
|
-
maxHP
|
|
7303
|
+
weaponName
|
|
7298
7304
|
);
|
|
7299
|
-
await applyAttackResults(ctx, targetBoss, primaryAttackResult);
|
|
7300
7305
|
const allDeadTargets = [];
|
|
7301
7306
|
if (primaryAttackResult.isDefeated) {
|
|
7302
7307
|
allDeadTargets.push(targetBoss);
|
|
@@ -7308,21 +7313,19 @@ ${validTypes.join("、")}`;
|
|
|
7308
7313
|
scatterResult = await handleScatterAttack(
|
|
7309
7314
|
ctx,
|
|
7310
7315
|
session,
|
|
7311
|
-
config2,
|
|
7312
7316
|
handle,
|
|
7317
|
+
config2,
|
|
7313
7318
|
equippedWeapon,
|
|
7314
7319
|
targetBoss,
|
|
7315
7320
|
weaponName,
|
|
7316
|
-
|
|
7317
|
-
activeBosses,
|
|
7318
|
-
bossGroup
|
|
7321
|
+
activeBosses
|
|
7319
7322
|
);
|
|
7320
7323
|
scatterResult.actuallyDead.forEach((name2) => {
|
|
7321
7324
|
const deadBoss = activeBosses.find((b) => b.name === name2);
|
|
7322
7325
|
if (deadBoss) allDeadTargets.push(deadBoss);
|
|
7323
7326
|
});
|
|
7324
7327
|
}
|
|
7325
|
-
const totalDamage = primaryAttackResult.
|
|
7328
|
+
const totalDamage = primaryAttackResult.initialDamage + (scatterResult ? scatterResult.extraDamages.reduce((sum, d) => sum + d.damage, 0) : 0);
|
|
7326
7329
|
await updateBossDamageRecord(
|
|
7327
7330
|
ctx,
|
|
7328
7331
|
handle,
|
|
@@ -7347,7 +7350,7 @@ ${validTypes.join("、")}`;
|
|
|
7347
7350
|
if (primaryAttackResult.freezing) {
|
|
7348
7351
|
taskUpdates.push({ taskId: 2, count: 1 });
|
|
7349
7352
|
}
|
|
7350
|
-
if (primaryAttackResult.bileStacks
|
|
7353
|
+
if (primaryAttackResult.bileStacks) {
|
|
7351
7354
|
taskUpdates.push({ taskId: 3, count: 1 });
|
|
7352
7355
|
}
|
|
7353
7356
|
if (primaryAttackResult.pulseApplied) {
|
|
@@ -7381,7 +7384,6 @@ ${validTypes.join("、")}`;
|
|
|
7381
7384
|
await handleBroadcasts(
|
|
7382
7385
|
ctx,
|
|
7383
7386
|
groupId,
|
|
7384
|
-
scatterResult?.scatterBroadcast || null,
|
|
7385
7387
|
bossEventBroadcast,
|
|
7386
7388
|
cleanerRewardBroadcast,
|
|
7387
7389
|
!isScatterAttack
|
|
@@ -7483,11 +7485,11 @@ ${validTypes.join("、")}`;
|
|
|
7483
7485
|
result.push(`⚡ 能量:${mainBoss.energy}/1000`);
|
|
7484
7486
|
}
|
|
7485
7487
|
result.push(`🏷️ 标签:${mainBoss.tags?.join("、") || "无"}`);
|
|
7486
|
-
if (mainBoss.
|
|
7487
|
-
result.push(`☢️ 辐射:${mainBoss.
|
|
7488
|
+
if (mainBoss.radiationLayers > 0) {
|
|
7489
|
+
result.push(`☢️ 辐射:${mainBoss.radiationLayers}层`);
|
|
7488
7490
|
}
|
|
7489
|
-
if (mainBoss.
|
|
7490
|
-
result.push(`❄️ 寒冷:${mainBoss.
|
|
7491
|
+
if (mainBoss.coldLayers > 0) {
|
|
7492
|
+
result.push(`❄️ 寒冷:${mainBoss.coldLayers}层`);
|
|
7491
7493
|
}
|
|
7492
7494
|
result.push(`✨ 被动:`);
|
|
7493
7495
|
if (mainBoss.skills.length > 0) {
|
|
@@ -7497,7 +7499,7 @@ ${validTypes.join("、")}`;
|
|
|
7497
7499
|
}
|
|
7498
7500
|
const countingSkill = mainBoss.skills?.find((s) => ["冷适应", "岗哨机枪", "吸血唾液", "灼烧粘液", "光影之刃"].includes(s));
|
|
7499
7501
|
if (countingSkill) {
|
|
7500
|
-
result.push(`📈 ${countingSkill}:${mainBoss.
|
|
7502
|
+
result.push(`📈 ${countingSkill}:${mainBoss.skillStacks}层`);
|
|
7501
7503
|
}
|
|
7502
7504
|
if (mainBoss.lastWeaponName) {
|
|
7503
7505
|
result.push(`🎭 记录武器:${mainBoss.lastWeaponName}`);
|
|
@@ -7516,11 +7518,11 @@ ${validTypes.join("、")}`;
|
|
|
7516
7518
|
minionInfo.push(`⚡ 能量:${minion.energy}/1000`);
|
|
7517
7519
|
}
|
|
7518
7520
|
minionInfo.push(`🏷️ 标签:${minion.tags?.join("、") || "无"}`);
|
|
7519
|
-
if (minion.
|
|
7520
|
-
minionInfo.push(`☢️ 辐射:${minion.
|
|
7521
|
+
if (minion.radiationLayers > 0) {
|
|
7522
|
+
minionInfo.push(`☢️ 辐射:${minion.radiationLayers}层`);
|
|
7521
7523
|
}
|
|
7522
|
-
if (minion.
|
|
7523
|
-
minionInfo.push(`❄️ 寒冷:${minion.
|
|
7524
|
+
if (minion.coldLayers > 0) {
|
|
7525
|
+
minionInfo.push(`❄️ 寒冷:${minion.coldLayers}层`);
|
|
7524
7526
|
}
|
|
7525
7527
|
minionInfo.push(`✨ 被动:`);
|
|
7526
7528
|
if (minion.skills.length > 0) {
|
|
@@ -7530,7 +7532,7 @@ ${validTypes.join("、")}`;
|
|
|
7530
7532
|
}
|
|
7531
7533
|
const minionCountingSkill = minion.skills?.find((s) => ["冷适应", "岗哨机枪", "吸血唾液", "灼烧粘液", "光影之刃"].includes(s));
|
|
7532
7534
|
if (minionCountingSkill) {
|
|
7533
|
-
minionInfo.push(`📈 ${minionCountingSkill}:${minion.
|
|
7535
|
+
minionInfo.push(`📈 ${minionCountingSkill}:${minion.skillStacks}层`);
|
|
7534
7536
|
}
|
|
7535
7537
|
if (minion.lastWeaponName) {
|
|
7536
7538
|
minionInfo.push(`🎭 记录武器:${minion.lastWeaponName}`);
|