koishi-plugin-ggcevo-game 1.6.23 → 1.6.26
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/attackhandling.d.ts +4 -0
- package/lib/index.js +187 -44
- package/package.json +1 -1
|
@@ -56,3 +56,7 @@ export declare function testAttackFunction(ctx: Context, session: any, handle: s
|
|
|
56
56
|
ignoreMessage: any[];
|
|
57
57
|
}>;
|
|
58
58
|
export declare function createNestlingBosses(ctx: any, nestlingNames: string | string[]): Promise<any[]>;
|
|
59
|
+
export declare function verifyFinalBlow(ctx: any, session: any, bossName: string, targetBoss: any): Promise<{
|
|
60
|
+
success: boolean;
|
|
61
|
+
updatedBoss?: any;
|
|
62
|
+
}>;
|
package/lib/index.js
CHANGED
|
@@ -662,7 +662,7 @@ var SyndicatedItems = {
|
|
|
662
662
|
description: "一种轻型手榴弹,含有易燃物质",
|
|
663
663
|
price: 0,
|
|
664
664
|
redCrystalCost: 0,
|
|
665
|
-
condition: "
|
|
665
|
+
condition: "无法对免疫燃烧的目标和空中目标使用",
|
|
666
666
|
effects: "使目标的燃烧层数增加5层"
|
|
667
667
|
},
|
|
668
668
|
"铝热炸弹": {
|
|
@@ -672,7 +672,7 @@ var SyndicatedItems = {
|
|
|
672
672
|
price: 0,
|
|
673
673
|
redCrystalCost: 0,
|
|
674
674
|
condition: "无法对空中目标使用",
|
|
675
|
-
effects: "
|
|
675
|
+
effects: "对目标造成100伤害;对建筑目标造成3倍伤害"
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
678
|
var initDefaultItems = {
|
|
@@ -735,7 +735,7 @@ var spaceStationCrewConfig = [
|
|
|
735
735
|
{
|
|
736
736
|
professionName: "警卫员下士",
|
|
737
737
|
effect: "攻击获得的金币+50%",
|
|
738
|
-
requirements: "当期伤害榜累计造成
|
|
738
|
+
requirements: "当期伤害榜累计造成100及以上伤害",
|
|
739
739
|
Jobtransfer: true,
|
|
740
740
|
costcoins: 3e3
|
|
741
741
|
},
|
|
@@ -827,7 +827,7 @@ var syndicatePirateConfig = [
|
|
|
827
827
|
},
|
|
828
828
|
{
|
|
829
829
|
professionName: "纵火狂",
|
|
830
|
-
effect: "热能武器攻击伤害+20%;
|
|
830
|
+
effect: "热能武器攻击伤害+20%; 探索获得莫洛托夫燃烧弹的概率提高20%并且有10%的概率额外获得1个;使用莫洛托夫燃烧弹的效果提高100%;购买龙息霰弹枪(传奇)享有50%的折扣",
|
|
831
831
|
requirements: "至少拥有一把3级及以上等级的热能武器",
|
|
832
832
|
Jobtransfer: true,
|
|
833
833
|
costredcrystal: 30
|
|
@@ -862,8 +862,8 @@ var syndicatePirateConfig = [
|
|
|
862
862
|
},
|
|
863
863
|
{
|
|
864
864
|
professionName: "破坏者",
|
|
865
|
-
effect: "黑市订购爆破物类享有50
|
|
866
|
-
requirements: "
|
|
865
|
+
effect: "黑市订购爆破物类享有50%折扣;探索获得爆破物的概率提高20%并且有10%的概率额外获得1个;使用爆破物的效果提高50%;购买核聚变重炮(传奇)享有50%的折扣",
|
|
866
|
+
requirements: "仓库中至少拥有一个爆破物类物品",
|
|
867
867
|
Jobtransfer: true,
|
|
868
868
|
costredcrystal: 30
|
|
869
869
|
},
|
|
@@ -923,8 +923,8 @@ async function checkTransferRequirements(ctx, handle, profession) {
|
|
|
923
923
|
case "警卫员下士": {
|
|
924
924
|
if (!mainBoss) return { success: false, message: "当前暂无伤害榜。" };
|
|
925
925
|
return {
|
|
926
|
-
success: totalDamage >=
|
|
927
|
-
message: `需要当期伤害榜累计造成
|
|
926
|
+
success: totalDamage >= 100,
|
|
927
|
+
message: `需要当期伤害榜累计造成100及以上伤害(当前${totalDamage})`
|
|
928
928
|
};
|
|
929
929
|
}
|
|
930
930
|
case "武器中士":
|
|
@@ -987,13 +987,13 @@ async function checkTransferRequirements(ctx, handle, profession) {
|
|
|
987
987
|
};
|
|
988
988
|
case "破坏者":
|
|
989
989
|
const warehouseItems = await ctx.database.get("ggcevo_warehouse", { handle });
|
|
990
|
-
const blackMarketExplosives = Object.values(SyndicatedItems).filter((item) => item.type === "爆破物" && item.redCrystalCost
|
|
990
|
+
const blackMarketExplosives = Object.values(SyndicatedItems).filter((item) => item.type === "爆破物" && item.redCrystalCost >= 0).map((item) => item.id);
|
|
991
991
|
const hasExplosive = warehouseItems.some(
|
|
992
|
-
(item) => blackMarketExplosives.includes(item.itemId) && item.quantity
|
|
992
|
+
(item) => blackMarketExplosives.includes(item.itemId) && item.quantity >= 0
|
|
993
993
|
);
|
|
994
994
|
return {
|
|
995
995
|
success: hasExplosive,
|
|
996
|
-
message: hasExplosive ? "" : "
|
|
996
|
+
message: hasExplosive ? "" : "需要仓库中拥有一个爆破物类物品"
|
|
997
997
|
};
|
|
998
998
|
case "装甲兵": {
|
|
999
999
|
const userWeapons = await ctx.database.get("ggcevo_weapons", {
|
|
@@ -5407,6 +5407,15 @@ var ggcevoUpdates = [
|
|
|
5407
5407
|
- 增强龙息霰弹枪特殊效果,并可引爆“灼烧粘液”
|
|
5408
5408
|
- 增强了人类联盟的总工程师职业效果
|
|
5409
5409
|
`.trim()
|
|
5410
|
+
},
|
|
5411
|
+
{
|
|
5412
|
+
version: "1.6.25",
|
|
5413
|
+
time: "2025-07-14",
|
|
5414
|
+
content: `
|
|
5415
|
+
- 当主宰的血量降低到2000以下时,卡点攻击新增验证码机制
|
|
5416
|
+
- 异形信息新增显示护甲削减值(动力钻头和传奇高斯的削减)
|
|
5417
|
+
- 增强了辛迪加海盗阵营的破坏者和纵火狂
|
|
5418
|
+
`.trim()
|
|
5410
5419
|
}
|
|
5411
5420
|
];
|
|
5412
5421
|
function compareVersions(a, b) {
|
|
@@ -5647,6 +5656,8 @@ async function calculateTotalPower(ctx, config, handle) {
|
|
|
5647
5656
|
__name(calculateTotalPower, "calculateTotalPower");
|
|
5648
5657
|
async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
5649
5658
|
try {
|
|
5659
|
+
const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
|
|
5660
|
+
const playerCareer = careerData?.career;
|
|
5650
5661
|
const itemName = Object.entries(SyndicatedItems).find(
|
|
5651
5662
|
([_, item]) => item.id === itemConfig2.id
|
|
5652
5663
|
)?.[0] || "未知物品";
|
|
@@ -5795,6 +5806,14 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5795
5806
|
message: `目标「${target}」未存活或不存在`,
|
|
5796
5807
|
isDefeated: false
|
|
5797
5808
|
};
|
|
5809
|
+
const aerialTargets = ["吸血蝙蝠首领", "吸血蝙蝠", "猛毒异兽", "剧毒蝙蝠"];
|
|
5810
|
+
if (aerialTargets.includes(targetBoss.name)) {
|
|
5811
|
+
return {
|
|
5812
|
+
success: false,
|
|
5813
|
+
message: "无法对空中目标使用",
|
|
5814
|
+
isDefeated: false
|
|
5815
|
+
};
|
|
5816
|
+
}
|
|
5798
5817
|
const immuneSkills = ["猎手异形", "环境适应"];
|
|
5799
5818
|
const isImmune = immuneSkills.some(
|
|
5800
5819
|
(skill) => targetBoss.skills?.includes(skill)
|
|
@@ -5804,8 +5823,14 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5804
5823
|
message: `目标「${target}」免疫燃烧效果`,
|
|
5805
5824
|
isDefeated: false
|
|
5806
5825
|
};
|
|
5826
|
+
const baseLayers = 5;
|
|
5827
|
+
let bonusLayers = 0;
|
|
5828
|
+
if (playerCareer === "纵火狂") {
|
|
5829
|
+
bonusLayers = baseLayers;
|
|
5830
|
+
}
|
|
5807
5831
|
const currentLayers = targetBoss?.burnLayers || 0;
|
|
5808
|
-
const
|
|
5832
|
+
const totalLayers = baseLayers + bonusLayers;
|
|
5833
|
+
const newLayers = currentLayers + totalLayers;
|
|
5809
5834
|
await ctx.database.set(
|
|
5810
5835
|
"ggcevo_boss",
|
|
5811
5836
|
{ name: target },
|
|
@@ -5818,11 +5843,12 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5818
5843
|
await ctx.database.upsert("ggcevo_task", [{
|
|
5819
5844
|
handle,
|
|
5820
5845
|
taskId: 7,
|
|
5821
|
-
progress: (taskRecord?.progress || 0) +
|
|
5846
|
+
progress: (taskRecord?.progress || 0) + totalLayers
|
|
5822
5847
|
}], ["handle", "taskId"]);
|
|
5848
|
+
const careerBonusMsg = playerCareer === "纵火狂" ? `(纵火狂使用莫洛托夫燃烧弹的效果提高100%)` : "";
|
|
5823
5849
|
return {
|
|
5824
5850
|
success: true,
|
|
5825
|
-
message: `成功使用${itemName},目标「${target}
|
|
5851
|
+
message: `成功使用${itemName},目标「${target}」的燃烧层数增加${totalLayers}层${careerBonusMsg}`,
|
|
5826
5852
|
isDefeated: false
|
|
5827
5853
|
};
|
|
5828
5854
|
}
|
|
@@ -5849,7 +5875,10 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5849
5875
|
isDefeated: false
|
|
5850
5876
|
};
|
|
5851
5877
|
}
|
|
5852
|
-
|
|
5878
|
+
let baseDamage = 100;
|
|
5879
|
+
if (playerCareer === "破坏者") {
|
|
5880
|
+
baseDamage = Math.floor(baseDamage * 1.5);
|
|
5881
|
+
}
|
|
5853
5882
|
const isBuilding = targetBoss.tags?.includes("建筑");
|
|
5854
5883
|
const damage = isBuilding ? baseDamage * 3 : baseDamage;
|
|
5855
5884
|
const actualDamage = Math.min(damage, targetBoss.HP);
|
|
@@ -5870,11 +5899,18 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5870
5899
|
handle,
|
|
5871
5900
|
totalRewards: (signRecords[0]?.totalRewards || 0) + damage
|
|
5872
5901
|
}], ["handle"]);
|
|
5902
|
+
const [damageRecords] = await ctx.database.get("ggcevo_boss_damage", { handle });
|
|
5903
|
+
await ctx.database.upsert("ggcevo_boss_damage", [{
|
|
5904
|
+
handle,
|
|
5905
|
+
playerName: session.username,
|
|
5906
|
+
totalDamage: (damageRecords?.totalDamage || 0) + damage
|
|
5907
|
+
}], ["handle"]);
|
|
5873
5908
|
});
|
|
5874
5909
|
}
|
|
5910
|
+
const careerBonusMsg = playerCareer === "破坏者" ? `(破坏者使用爆破物的效果提高50%)` : "";
|
|
5875
5911
|
return {
|
|
5876
5912
|
success: true,
|
|
5877
|
-
message: `成功使用${itemName},对${isBuilding ? "建筑目标" : "目标"}「${target}」造成${damage}点伤害${isDefeated ? ",目标已被消灭" : ""}`,
|
|
5913
|
+
message: `成功使用${itemName},对${isBuilding ? "建筑目标" : "目标"}「${target}」造成${damage}点伤害${isDefeated ? ",目标已被消灭" : ""}${careerBonusMsg}`,
|
|
5878
5914
|
isDefeated
|
|
5879
5915
|
};
|
|
5880
5916
|
}
|
|
@@ -7208,6 +7244,48 @@ async function createNestlingBosses(ctx, nestlingNames) {
|
|
|
7208
7244
|
return createdBosses;
|
|
7209
7245
|
}
|
|
7210
7246
|
__name(createNestlingBosses, "createNestlingBosses");
|
|
7247
|
+
async function verifyFinalBlow(ctx, session, bossName, targetBoss) {
|
|
7248
|
+
const isDominationBoss = targetBoss.type === "主宰";
|
|
7249
|
+
const isLowHealth = targetBoss.HP < 2e3;
|
|
7250
|
+
const forbiddenSkills = ["求生本能I", "求生本能II", "复苏"];
|
|
7251
|
+
const hasResurrectionSkill = forbiddenSkills.some(
|
|
7252
|
+
(skill) => targetBoss.skills.includes(skill)
|
|
7253
|
+
);
|
|
7254
|
+
const currentTime = /* @__PURE__ */ new Date();
|
|
7255
|
+
const hours = currentTime.getHours();
|
|
7256
|
+
const minutes = currentTime.getMinutes();
|
|
7257
|
+
const isMidnightWindow = hours === 0 && minutes <= 5;
|
|
7258
|
+
const isNoonWindow = hours === 12 && minutes <= 5;
|
|
7259
|
+
if (!(isDominationBoss && isLowHealth && !hasResurrectionSkill && (isMidnightWindow || isNoonWindow))) {
|
|
7260
|
+
return { success: true, updatedBoss: targetBoss };
|
|
7261
|
+
}
|
|
7262
|
+
const verificationCode = Array(6).fill(0).map(
|
|
7263
|
+
() => Math.floor(Math.random() * 10)
|
|
7264
|
+
).join("");
|
|
7265
|
+
await session.send(
|
|
7266
|
+
`<quote id="${session.messageId}"/>⚠️ ${bossName}进入濒死状态!需完成安全验证
|
|
7267
|
+
请在30秒内输入验证码:【${verificationCode}】`
|
|
7268
|
+
);
|
|
7269
|
+
const userInput = (await session.prompt(3e4))?.trim();
|
|
7270
|
+
if (!userInput) {
|
|
7271
|
+
await session.send("⏱️ 验证超时!请重新发起攻击。");
|
|
7272
|
+
return { success: false };
|
|
7273
|
+
}
|
|
7274
|
+
if (userInput !== verificationCode) {
|
|
7275
|
+
await session.send("❌ 验证码错误!攻击已中断。");
|
|
7276
|
+
return { success: false };
|
|
7277
|
+
}
|
|
7278
|
+
const [updatedBoss] = await ctx.database.get("ggcevo_boss", {
|
|
7279
|
+
name: bossName,
|
|
7280
|
+
isActive: true
|
|
7281
|
+
});
|
|
7282
|
+
if (!updatedBoss) {
|
|
7283
|
+
await session.send(`✅ 验证通过!但${bossName}已被其他玩家消灭。`);
|
|
7284
|
+
return { success: false };
|
|
7285
|
+
}
|
|
7286
|
+
return { success: true, updatedBoss };
|
|
7287
|
+
}
|
|
7288
|
+
__name(verifyFinalBlow, "verifyFinalBlow");
|
|
7211
7289
|
|
|
7212
7290
|
// src/spaceship.ts
|
|
7213
7291
|
var spaceship = {
|
|
@@ -8365,25 +8443,37 @@ ${ticketMessage}${effectMessage}`;
|
|
|
8365
8443
|
);
|
|
8366
8444
|
const ggcmap = await ctx.database.get("ggcevo_global_stats", {});
|
|
8367
8445
|
const lastdate = ggcmap[0].updatedAt;
|
|
8446
|
+
const rankDate = ggcmap[0].rankdate;
|
|
8447
|
+
const seasonStart = new Date(rankDate);
|
|
8448
|
+
seasonStart.setDate(seasonStart.getDate() + 1);
|
|
8449
|
+
seasonStart.setHours(0, 0, 0, 0);
|
|
8450
|
+
const seasonEnd = new Date(seasonStart);
|
|
8451
|
+
seasonEnd.setMonth(seasonEnd.getMonth() + 2);
|
|
8452
|
+
seasonEnd.setDate(seasonEnd.getDate() - 1);
|
|
8453
|
+
seasonEnd.setHours(23, 0, 0, 0);
|
|
8454
|
+
const formatDate2 = /* @__PURE__ */ __name((date) => date.toLocaleString("zh-CN", {
|
|
8455
|
+
timeZone: "Asia/Shanghai",
|
|
8456
|
+
year: "numeric",
|
|
8457
|
+
month: "2-digit",
|
|
8458
|
+
day: "2-digit",
|
|
8459
|
+
hour: "2-digit",
|
|
8460
|
+
minute: "2-digit",
|
|
8461
|
+
second: "2-digit",
|
|
8462
|
+
hour12: false
|
|
8463
|
+
}).replace(/(\d{4})\/(\d{2})\/(\d{2})/, "$1年$2月$3日").replace(/:\d{2}$/, ""), "formatDate");
|
|
8368
8464
|
const rankingText = processedRecords.map(
|
|
8369
8465
|
(item, index) => `${offset + index + 1}. ${item.displayName} | 积分: ${item.rank} | 胜率: ${item.matches === 0 ? "0.00%" : (item.wins / item.matches * 100).toFixed(2) + "%"}`
|
|
8370
8466
|
).join("\n");
|
|
8371
8467
|
return [
|
|
8372
8468
|
`🏆 咕咕胜点榜 ${config.rankseason}赛季`,
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
month: "2-digit",
|
|
8377
|
-
day: "2-digit",
|
|
8378
|
-
hour: "2-digit",
|
|
8379
|
-
minute: "2-digit",
|
|
8380
|
-
hour12: false
|
|
8381
|
-
})}`,
|
|
8469
|
+
`⏱️ 赛季时间: ${formatDate2(seasonStart)}~${formatDate2(seasonEnd)}`,
|
|
8470
|
+
// 新增的赛季持续时间
|
|
8471
|
+
`📊 数据最新同步时间: ${formatDate2(lastdate)}`,
|
|
8382
8472
|
"------------------------------",
|
|
8383
8473
|
rankingText,
|
|
8384
8474
|
"------------------------------",
|
|
8385
8475
|
`第 ${pageNum} 页 / 共 ${totalPages} 页`,
|
|
8386
|
-
pageNum < totalPages ?
|
|
8476
|
+
pageNum < totalPages ? `输入"胜点榜 ${pageNum + 1}"查看下一页` : "已是最后一页"
|
|
8387
8477
|
].join("\n");
|
|
8388
8478
|
});
|
|
8389
8479
|
ctx.command("ggcevo/赛季结算", "进行赛季结算并发放奖励", { authority: 3 }).action(async ({ session }) => {
|
|
@@ -10086,9 +10176,20 @@ ${discountDetails.join("\n")}`;
|
|
|
10086
10176
|
}
|
|
10087
10177
|
const [equippedWeapon] = await ctx.database.get("ggcevo_weapons", { handle, equipped: true });
|
|
10088
10178
|
if (!equippedWeapon) return '请先输入"装备 武器名称"后再攻击。';
|
|
10179
|
+
const verification = await verifyFinalBlow(
|
|
10180
|
+
ctx,
|
|
10181
|
+
session,
|
|
10182
|
+
bossName,
|
|
10183
|
+
targetBoss
|
|
10184
|
+
// 当前目标BOSS
|
|
10185
|
+
);
|
|
10186
|
+
if (!verification.success) {
|
|
10187
|
+
return "攻击已取消";
|
|
10188
|
+
}
|
|
10189
|
+
const verifiedBoss = verification.updatedBoss || targetBoss;
|
|
10089
10190
|
const weaponConfigEntry = Object.entries(weaponConfig).find(([_, c]) => c.id === equippedWeapon.weaponId);
|
|
10090
10191
|
const [weaponName, weaponData] = weaponConfigEntry;
|
|
10091
|
-
if (!weaponData.isantiair && (
|
|
10192
|
+
if (!weaponData.isantiair && (verifiedBoss.groupId === 5 || verifiedBoss.groupId === 10)) {
|
|
10092
10193
|
return "您当前装备的武器无法攻击空中目标!";
|
|
10093
10194
|
}
|
|
10094
10195
|
const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
|
|
@@ -10098,17 +10199,17 @@ ${discountDetails.join("\n")}`;
|
|
|
10098
10199
|
handle,
|
|
10099
10200
|
config2,
|
|
10100
10201
|
equippedWeapon,
|
|
10101
|
-
|
|
10202
|
+
verifiedBoss,
|
|
10102
10203
|
activeBosses,
|
|
10103
10204
|
weaponName,
|
|
10104
10205
|
careerData
|
|
10105
10206
|
);
|
|
10106
10207
|
const allDeadTargets = [];
|
|
10107
10208
|
if (primaryAttackResult.isDefeated) {
|
|
10108
|
-
allDeadTargets.push(
|
|
10209
|
+
allDeadTargets.push(verifiedBoss);
|
|
10109
10210
|
}
|
|
10110
10211
|
let scatterResult = null;
|
|
10111
|
-
const hasOtherBosses = activeBosses.some((b) => b.name !==
|
|
10212
|
+
const hasOtherBosses = activeBosses.some((b) => b.name !== verifiedBoss.name);
|
|
10112
10213
|
const isScatterAttack = (equippedWeapon.installedMods?.includes("光束曲射晶片") && weaponName === "碎骨步枪" || weaponName === "中子步枪" || weaponName === "DG-3电弧步枪") && hasOtherBosses;
|
|
10113
10214
|
if (isScatterAttack) {
|
|
10114
10215
|
scatterResult = await handleScatterAttack(
|
|
@@ -10117,7 +10218,7 @@ ${discountDetails.join("\n")}`;
|
|
|
10117
10218
|
handle,
|
|
10118
10219
|
config2,
|
|
10119
10220
|
equippedWeapon,
|
|
10120
|
-
|
|
10221
|
+
verifiedBoss,
|
|
10121
10222
|
weaponName,
|
|
10122
10223
|
activeBosses,
|
|
10123
10224
|
careerData
|
|
@@ -10132,7 +10233,7 @@ ${discountDetails.join("\n")}`;
|
|
|
10132
10233
|
ctx,
|
|
10133
10234
|
handle,
|
|
10134
10235
|
session.username,
|
|
10135
|
-
|
|
10236
|
+
verifiedBoss.groupId,
|
|
10136
10237
|
// 注意:所有伤害都计入同一个BOSS组
|
|
10137
10238
|
totalDamage
|
|
10138
10239
|
);
|
|
@@ -10219,7 +10320,7 @@ ${discountDetails.join("\n")}`;
|
|
|
10219
10320
|
const resultMessage = buildResultMessage(
|
|
10220
10321
|
session,
|
|
10221
10322
|
weaponName,
|
|
10222
|
-
|
|
10323
|
+
verifiedBoss,
|
|
10223
10324
|
primaryAttackResult,
|
|
10224
10325
|
scatterResult,
|
|
10225
10326
|
finalReward,
|
|
@@ -10390,6 +10491,10 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
10390
10491
|
result.push(`⚡ 能量:${mainBoss.energy}/1000`);
|
|
10391
10492
|
}
|
|
10392
10493
|
result.push(`🛡️ 护甲:${bossGroup.main.armor || 0}`);
|
|
10494
|
+
if (mainBoss.armorReductionLayers > 0) {
|
|
10495
|
+
const reductionValue = mainBoss.armorReductionLayers * 0.1;
|
|
10496
|
+
result.push(`🔻 护甲削减:${reductionValue.toFixed(1)}`);
|
|
10497
|
+
}
|
|
10393
10498
|
result.push(`🏷️ 标签:${mainBoss.tags?.join("、") || "无"}`);
|
|
10394
10499
|
if (mainBoss.radiationLayers > 0) {
|
|
10395
10500
|
result.push(`☢️ 辐射:${mainBoss.radiationLayers}层`);
|
|
@@ -10457,6 +10562,10 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
10457
10562
|
minionInfo.push(`⚡ 能量:${minion.energy}/1000`);
|
|
10458
10563
|
}
|
|
10459
10564
|
minionInfo.push(`🛡️ 护甲:${minionConfig?.armor || 0}`);
|
|
10565
|
+
if (minion.armorReductionLayers > 0) {
|
|
10566
|
+
const reductionValue = minion.armorReductionLayers * 0.1;
|
|
10567
|
+
minionInfo.push(`🔻 护甲削减:${reductionValue.toFixed(1)}`);
|
|
10568
|
+
}
|
|
10460
10569
|
minionInfo.push(`🏷️ 标签:${minion.tags?.join("、") || "无"}`);
|
|
10461
10570
|
if (minion.radiationLayers > 0) {
|
|
10462
10571
|
minionInfo.push(`☢️ 辐射:${minion.radiationLayers}层`);
|
|
@@ -11899,10 +12008,10 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11899
12008
|
});
|
|
11900
12009
|
ctx.command("ggcevo/探索 [galaxyName]").action(async ({ session }, galaxyName) => {
|
|
11901
12010
|
const possibleItems = [
|
|
11902
|
-
{ id: 2, name: "闪光弹", chance: 0.1 },
|
|
11903
|
-
{ id: 4, name: "脉冲手雷", chance: 0.1 },
|
|
11904
|
-
{ id: 9, name: "莫洛托夫燃烧弹", chance: 0.05 },
|
|
11905
|
-
{ id: 10, name: "铝热炸弹", chance: 0.05 }
|
|
12011
|
+
{ id: 2, name: "闪光弹", type: "手榴弹", chance: 0.1 },
|
|
12012
|
+
{ id: 4, name: "脉冲手雷", type: "手榴弹", chance: 0.1 },
|
|
12013
|
+
{ id: 9, name: "莫洛托夫燃烧弹", type: "手榴弹", chance: 0.05 },
|
|
12014
|
+
{ id: 10, name: "铝热炸弹", type: "爆破物", chance: 0.05 }
|
|
11906
12015
|
];
|
|
11907
12016
|
const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
|
|
11908
12017
|
if (!profile) return "🔒 需要先绑定游戏句柄。";
|
|
@@ -11915,6 +12024,18 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11915
12024
|
const careerName = career?.career;
|
|
11916
12025
|
const careerCoinBonus = careerName === "总工程师" ? 50 : 0;
|
|
11917
12026
|
const engineerSuccessBonus = careerName === "总工程师" ? 0.1 : 0;
|
|
12027
|
+
let demolitionsBonus = 0;
|
|
12028
|
+
let bomberBonusItem = "";
|
|
12029
|
+
if (careerName === "破坏者") {
|
|
12030
|
+
demolitionsBonus = 0.2;
|
|
12031
|
+
bomberBonusItem = "爆破物";
|
|
12032
|
+
}
|
|
12033
|
+
let arsonistBonus = 0;
|
|
12034
|
+
let molotovBonusItem = "";
|
|
12035
|
+
if (careerName === "纵火狂") {
|
|
12036
|
+
arsonistBonus = 0.2;
|
|
12037
|
+
molotovBonusItem = "莫洛托夫燃烧弹";
|
|
12038
|
+
}
|
|
11918
12039
|
const [shipRecord] = await ctx.database.get("ggcevo_spaceship", { handle });
|
|
11919
12040
|
let shipBonus = 0;
|
|
11920
12041
|
let plunderRateBonus = 0;
|
|
@@ -12015,6 +12136,12 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
12015
12136
|
if (careerCoinBonus) {
|
|
12016
12137
|
bonusEffects.push(`▸ 🎓 总工程师职业:金币+${careerCoinBonus}%`);
|
|
12017
12138
|
}
|
|
12139
|
+
if (demolitionsBonus > 0) {
|
|
12140
|
+
bonusEffects.push(`▸ 💣 破坏者职业:${bomberBonusItem}获得概率+${demolitionsBonus * 100}%`);
|
|
12141
|
+
}
|
|
12142
|
+
if (arsonistBonus > 0) {
|
|
12143
|
+
bonusEffects.push(`▸ 🔥 纵火狂职业:${molotovBonusItem}获得概率+${arsonistBonus * 100}%`);
|
|
12144
|
+
}
|
|
12018
12145
|
const totalBonusMultiplier = 1 + (galaxyBonusPercent + shipBonus + (record.plunderbonus || 0) + (techBonusRate + careerBonusRate) * 100 + careerCoinBonus) / 100;
|
|
12019
12146
|
let finalCoin = Math.floor(baseCoinReward * totalBonusMultiplier);
|
|
12020
12147
|
const isSuccess = Math.random() < successRate;
|
|
@@ -12040,26 +12167,42 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
12040
12167
|
const availableItems = galaxyData2.available;
|
|
12041
12168
|
for (const item of possibleItems) {
|
|
12042
12169
|
if (availableItems.includes(item.name)) {
|
|
12043
|
-
|
|
12170
|
+
let dropRate = item.chance + itemDropBonus;
|
|
12171
|
+
if (careerName === "破坏者" && item.type === bomberBonusItem) {
|
|
12172
|
+
dropRate += demolitionsBonus;
|
|
12173
|
+
}
|
|
12174
|
+
if (careerName === "纵火狂" && item.name === molotovBonusItem) {
|
|
12175
|
+
dropRate += arsonistBonus;
|
|
12176
|
+
}
|
|
12044
12177
|
if (Math.random() < dropRate) {
|
|
12045
12178
|
const [existing] = await ctx.database.get("ggcevo_warehouse", {
|
|
12046
12179
|
handle,
|
|
12047
12180
|
itemId: item.id
|
|
12048
12181
|
});
|
|
12182
|
+
let extraDrop = 0;
|
|
12183
|
+
if (careerName === "破坏者" && item.type === bomberBonusItem && Math.random() < 0.1) {
|
|
12184
|
+
extraDrop = 1;
|
|
12185
|
+
bonusEffects.push(`▸ 💣 破坏者职业效果:额外获得${item.name}×1`);
|
|
12186
|
+
}
|
|
12187
|
+
if (careerName === "纵火狂" && item.name === molotovBonusItem && Math.random() < 0.1) {
|
|
12188
|
+
extraDrop = 1;
|
|
12189
|
+
bonusEffects.push(`▸ 🔥 纵火狂职业效果:额外获得${item.name}×1`);
|
|
12190
|
+
}
|
|
12191
|
+
const finalQuantity = 1 + extraDrop;
|
|
12049
12192
|
if (existing) {
|
|
12050
12193
|
await ctx.database.set("ggcevo_warehouse", {
|
|
12051
12194
|
handle,
|
|
12052
12195
|
itemId: item.id
|
|
12053
|
-
}, { quantity: existing.quantity +
|
|
12196
|
+
}, { quantity: existing.quantity + finalQuantity });
|
|
12054
12197
|
} else {
|
|
12055
12198
|
await ctx.database.create("ggcevo_warehouse", {
|
|
12056
12199
|
handle,
|
|
12057
12200
|
itemId: item.id,
|
|
12058
|
-
quantity:
|
|
12201
|
+
quantity: finalQuantity,
|
|
12059
12202
|
bonus: 0
|
|
12060
12203
|
});
|
|
12061
12204
|
}
|
|
12062
|
-
itemRewards.push(item.name);
|
|
12205
|
+
itemRewards.push(`${item.name}${extraDrop > 0 ? `×${finalQuantity}` : ""}`);
|
|
12063
12206
|
}
|
|
12064
12207
|
}
|
|
12065
12208
|
}
|
|
@@ -12100,7 +12243,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
12100
12243
|
`【${name3}】`,
|
|
12101
12244
|
`- 成功率:${(info.success * 100).toFixed(0)}%`,
|
|
12102
12245
|
`- 金币加成:${bonusPercent > 0 ? "+" : ""}${bonusPercent}%`,
|
|
12103
|
-
`-
|
|
12246
|
+
`- 可获得物品:${info.available.join("、") || "无"}`,
|
|
12104
12247
|
`- 特殊效果:${info.effect}`
|
|
12105
12248
|
].join("\n"));
|
|
12106
12249
|
}
|
|
@@ -12216,7 +12359,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
12216
12359
|
`⏳ 持续时间:12小时`,
|
|
12217
12360
|
`📊 预计成功率:${estimatedRate.toFixed(0)}%`,
|
|
12218
12361
|
`📦 可获得物品:${galaxyData.available.join("、") || "无"}`,
|
|
12219
|
-
|
|
12362
|
+
`💰 预计可获得50-100金币`
|
|
12220
12363
|
].join("\n");
|
|
12221
12364
|
});
|
|
12222
12365
|
const shipIdToName = {};
|
|
@@ -12537,7 +12680,7 @@ ${validBossNames.join("、")}`;
|
|
|
12537
12680
|
"✅ 竞猜成功!",
|
|
12538
12681
|
`项目ID: ${parsedItemId}`,
|
|
12539
12682
|
`项目描述: ${targetItem.description}`,
|
|
12540
|
-
`竞猜内容:
|
|
12683
|
+
`竞猜内容: ${guess}`,
|
|
12541
12684
|
`投入金额: ${betAmount} 金币`,
|
|
12542
12685
|
`如猜中将获得: ${Math.floor(betAmount * targetItem.odds)} 金币`,
|
|
12543
12686
|
"⏳ 每个项目只能下注一次"
|