koishi-plugin-ggcevo-game 1.5.31 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/careersystem/technology.d.ts +0 -1
- package/lib/index.js +477 -165
- package/lib/spaceship.d.ts +7 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -580,9 +580,9 @@ var SyndicatedItems = {
|
|
|
580
580
|
type: "设备工具",
|
|
581
581
|
description: "一个小型辛迪加机器人,可以破坏电子银行账户",
|
|
582
582
|
price: 0,
|
|
583
|
-
redCrystalCost:
|
|
583
|
+
redCrystalCost: 30,
|
|
584
584
|
condition: "辛迪加海盗阵营",
|
|
585
|
-
effects: "每日签到金币奖励+50
|
|
585
|
+
effects: "每日签到金币奖励+50%;可使用红晶升级"
|
|
586
586
|
},
|
|
587
587
|
"脉冲手雷": {
|
|
588
588
|
id: 4,
|
|
@@ -627,7 +627,7 @@ var SyndicatedItems = {
|
|
|
627
627
|
price: 0,
|
|
628
628
|
redCrystalCost: 30,
|
|
629
629
|
condition: "辛迪加海盗阵营",
|
|
630
|
-
effects: "
|
|
630
|
+
effects: "挖矿获得的金币收益提高10%;可使用红晶升级"
|
|
631
631
|
}
|
|
632
632
|
};
|
|
633
633
|
var initDefaultItems = {
|
|
@@ -1166,32 +1166,32 @@ var Spacestationtechnology = [
|
|
|
1166
1166
|
{
|
|
1167
1167
|
level: 1,
|
|
1168
1168
|
cost: 500,
|
|
1169
|
-
description: "升级空间站关键系统,完成任务奖励+
|
|
1170
|
-
careerBonus: "完成任务奖励额外+
|
|
1169
|
+
description: "升级空间站关键系统,完成任务奖励+5%",
|
|
1170
|
+
careerBonus: "完成任务奖励额外+5%"
|
|
1171
1171
|
},
|
|
1172
1172
|
{
|
|
1173
1173
|
level: 2,
|
|
1174
1174
|
cost: 1250,
|
|
1175
|
-
description: "升级空间站关键系统,完成任务奖励+
|
|
1176
|
-
careerBonus: "完成任务奖励额外+
|
|
1175
|
+
description: "升级空间站关键系统,完成任务奖励+10%",
|
|
1176
|
+
careerBonus: "完成任务奖励额外+10%"
|
|
1177
1177
|
},
|
|
1178
1178
|
{
|
|
1179
1179
|
level: 3,
|
|
1180
1180
|
cost: 2250,
|
|
1181
|
-
description: "升级空间站关键系统,完成任务奖励+
|
|
1182
|
-
careerBonus: "完成任务奖励额外+
|
|
1181
|
+
description: "升级空间站关键系统,完成任务奖励+15%",
|
|
1182
|
+
careerBonus: "完成任务奖励额外+15%"
|
|
1183
1183
|
},
|
|
1184
1184
|
{
|
|
1185
1185
|
level: 4,
|
|
1186
1186
|
cost: 2950,
|
|
1187
|
-
description: "升级空间站关键系统,完成任务奖励+
|
|
1188
|
-
careerBonus: "完成任务奖励额外+
|
|
1187
|
+
description: "升级空间站关键系统,完成任务奖励+20%",
|
|
1188
|
+
careerBonus: "完成任务奖励额外+20%"
|
|
1189
1189
|
},
|
|
1190
1190
|
{
|
|
1191
1191
|
level: 5,
|
|
1192
1192
|
cost: 3550,
|
|
1193
|
-
description: "升级空间站关键系统,完成任务奖励+
|
|
1194
|
-
careerBonus: "完成任务奖励额外+
|
|
1193
|
+
description: "升级空间站关键系统,完成任务奖励+25%",
|
|
1194
|
+
careerBonus: "完成任务奖励额外+25%;签到金币奖励+100%"
|
|
1195
1195
|
}
|
|
1196
1196
|
]
|
|
1197
1197
|
},
|
|
@@ -1230,14 +1230,13 @@ var Spacestationtechnology = [
|
|
|
1230
1230
|
level: 5,
|
|
1231
1231
|
cost: 5350,
|
|
1232
1232
|
description: "升级空间站聚变反应堆控制,探索的金币收益提高50%",
|
|
1233
|
-
careerBonus: "探索的金币收益额外提高50%"
|
|
1233
|
+
careerBonus: "探索的金币收益额外提高50%;探索的物品获得概率提高20%"
|
|
1234
1234
|
}
|
|
1235
1235
|
]
|
|
1236
1236
|
}
|
|
1237
1237
|
];
|
|
1238
1238
|
var itemupgrades = [
|
|
1239
1239
|
{
|
|
1240
|
-
id: 1,
|
|
1241
1240
|
name: "自动采掘机器人",
|
|
1242
1241
|
upgradeCostBase: 10,
|
|
1243
1242
|
// 升级基础成本
|
|
@@ -1247,6 +1246,13 @@ var itemupgrades = [
|
|
|
1247
1246
|
// 每次升级最大提升
|
|
1248
1247
|
maxBonus: 90
|
|
1249
1248
|
// 总提升上限
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
name: "CRED-17",
|
|
1252
|
+
upgradeCostBase: 10,
|
|
1253
|
+
minUpgrade: 5,
|
|
1254
|
+
maxUpgrade: 10,
|
|
1255
|
+
maxBonus: 50
|
|
1250
1256
|
}
|
|
1251
1257
|
];
|
|
1252
1258
|
|
|
@@ -5265,6 +5271,31 @@ var ggcevoUpdates = [
|
|
|
5265
5271
|
- 新增了辛迪加海盗阵营升级物品机制
|
|
5266
5272
|
- 修改了异形主宰复活逻辑,现在只会在12点和0点复活
|
|
5267
5273
|
`.trim()
|
|
5274
|
+
},
|
|
5275
|
+
{
|
|
5276
|
+
version: "1.6.0",
|
|
5277
|
+
time: "2025-07-08",
|
|
5278
|
+
content: `
|
|
5279
|
+
- 增强了采掘科技,关键系统固件科技和反应堆科技的加成效果
|
|
5280
|
+
- 签到的金币奖励变更为固定区间50-100
|
|
5281
|
+
- 挖矿的收益增加至每半小时4金币
|
|
5282
|
+
- 重制了部分飞船效果
|
|
5283
|
+
- 优化了升级物品,仓库和探索的显示信息
|
|
5284
|
+
- 减少了物品“自动采掘机器人”的升级所需红晶数量
|
|
5285
|
+
`.trim()
|
|
5286
|
+
},
|
|
5287
|
+
{
|
|
5288
|
+
version: "1.6.1",
|
|
5289
|
+
time: "2025-07-08",
|
|
5290
|
+
content: `
|
|
5291
|
+
- 减少了击败异形主宰奖励中的参与奖
|
|
5292
|
+
- 增加了赛季奖励的排名奖励
|
|
5293
|
+
- 重制了部分飞船效果
|
|
5294
|
+
- 关键系统固件科技和反应堆科技新增满级后的终极加成
|
|
5295
|
+
- 新增可升级物品“CRED-17”
|
|
5296
|
+
- E-2能量炸弹已禁止销售
|
|
5297
|
+
- 黑市订购逻辑已修改,现在无法重复订购已有的设备工具类物品
|
|
5298
|
+
`.trim()
|
|
5268
5299
|
}
|
|
5269
5300
|
];
|
|
5270
5301
|
function compareVersions(a, b) {
|
|
@@ -6323,8 +6354,8 @@ async function handleBossDefeatRewards(ctx, targetBoss) {
|
|
|
6323
6354
|
const pirateOtherRewards = [];
|
|
6324
6355
|
if (others.length > 0) {
|
|
6325
6356
|
others.forEach((record) => {
|
|
6326
|
-
let guguCoins =
|
|
6327
|
-
let gold =
|
|
6357
|
+
let guguCoins = 0;
|
|
6358
|
+
let gold = 300;
|
|
6328
6359
|
const hasDoubleWish = doubleWishHandles.has(record.handle);
|
|
6329
6360
|
if (hasDoubleWish) {
|
|
6330
6361
|
guguCoins *= 2;
|
|
@@ -6351,7 +6382,7 @@ async function handleBossDefeatRewards(ctx, targetBoss) {
|
|
|
6351
6382
|
hasDoubleWish
|
|
6352
6383
|
});
|
|
6353
6384
|
});
|
|
6354
|
-
rewardMessages.push(`其他参与者获得基础奖励:
|
|
6385
|
+
rewardMessages.push(`其他参与者获得基础奖励: 300 金币`);
|
|
6355
6386
|
if (doubleWishOthers.length > 0) {
|
|
6356
6387
|
rewardMessages.push("🧝♀ 触发精灵双倍祈愿的参与者:");
|
|
6357
6388
|
doubleWishOthers.forEach((player) => {
|
|
@@ -6585,13 +6616,15 @@ async function calculateRewards(ctx, handle, totalDamage) {
|
|
|
6585
6616
|
};
|
|
6586
6617
|
const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
|
|
6587
6618
|
const career = careerData?.career;
|
|
6619
|
+
const group = careerData?.group;
|
|
6588
6620
|
const [securityTech] = await ctx.database.get("ggcevo_tech", {
|
|
6589
6621
|
handle,
|
|
6590
6622
|
techId: 4
|
|
6591
6623
|
});
|
|
6592
6624
|
let techBonusPercent = 0;
|
|
6593
6625
|
let techMessage = "";
|
|
6594
|
-
|
|
6626
|
+
const isHumanAlliance = group === "人类联盟";
|
|
6627
|
+
if (securityTech && securityTech.level >= 1 && isHumanAlliance) {
|
|
6595
6628
|
const techLevel = securityTech.level - 1;
|
|
6596
6629
|
const securityConfig = Spacestationtechnology.find((t) => t.techId === 4);
|
|
6597
6630
|
const isEligibleForCareerBonus = securityConfig?.careerNames.includes(career);
|
|
@@ -6913,7 +6946,7 @@ var spaceship = {
|
|
|
6913
6946
|
"TX-12星际巡洋舰": {
|
|
6914
6947
|
id: 1,
|
|
6915
6948
|
description: "TX-12是为商业用途开发的标准通用星际巡洋舰",
|
|
6916
|
-
miningbonus:
|
|
6949
|
+
miningbonus: 5,
|
|
6917
6950
|
explorebonus: 0,
|
|
6918
6951
|
effect: "",
|
|
6919
6952
|
price: 500
|
|
@@ -6922,8 +6955,8 @@ var spaceship = {
|
|
|
6922
6955
|
id: 2,
|
|
6923
6956
|
description: "TX-12S是标准星际巡洋舰的改型",
|
|
6924
6957
|
miningbonus: 10,
|
|
6925
|
-
explorebonus:
|
|
6926
|
-
effect: "探索的成功率提高
|
|
6958
|
+
explorebonus: 5,
|
|
6959
|
+
effect: "探索的成功率提高10%;探索时不会被掠夺",
|
|
6927
6960
|
price: 1500
|
|
6928
6961
|
},
|
|
6929
6962
|
"TX-12A突击巡洋舰": {
|
|
@@ -6931,7 +6964,7 @@ var spaceship = {
|
|
|
6931
6964
|
description: "TX-12S是标准星际巡洋舰的改型",
|
|
6932
6965
|
miningbonus: 0,
|
|
6933
6966
|
explorebonus: 20,
|
|
6934
|
-
effect: "
|
|
6967
|
+
effect: "探索的成功率提高20%;探索发生掠夺的概率提高10%;掠夺的成功率提高10%",
|
|
6935
6968
|
price: 2e3
|
|
6936
6969
|
},
|
|
6937
6970
|
"庞兽号歼星舰": {
|
|
@@ -6939,7 +6972,7 @@ var spaceship = {
|
|
|
6939
6972
|
description: "巨兽级歼星舰的小型化版本",
|
|
6940
6973
|
miningbonus: 0,
|
|
6941
6974
|
explorebonus: 30,
|
|
6942
|
-
effect: "
|
|
6975
|
+
effect: "探索的成功率提高60%;探索发生掠夺的概率提高30%;掠夺的成功率提高30%",
|
|
6943
6976
|
price: 6e3
|
|
6944
6977
|
}
|
|
6945
6978
|
};
|
|
@@ -6947,18 +6980,24 @@ var galaxy = {
|
|
|
6947
6980
|
"联盟星系": {
|
|
6948
6981
|
description: "这一片都是人类联盟的地区,但是并非一切都很安全",
|
|
6949
6982
|
success: 0.6,
|
|
6950
|
-
bonus:
|
|
6951
|
-
// 金币加成系数(1.0表示无加成)
|
|
6983
|
+
bonus: 0,
|
|
6952
6984
|
available: "金币,爆破物,手榴弹",
|
|
6953
6985
|
effect: "人类联盟阵营探索时成功率提高10%"
|
|
6954
6986
|
},
|
|
6955
6987
|
"辛迪加星系": {
|
|
6956
6988
|
description: "这一片都是辛迪加海盗的地区,充满欺诈与混乱",
|
|
6957
6989
|
success: 0.4,
|
|
6958
|
-
bonus:
|
|
6990
|
+
bonus: 0.2,
|
|
6959
6991
|
// 金币加成系数(1.2表示+20%)
|
|
6960
6992
|
available: "金币,爆破物,手榴弹",
|
|
6961
6993
|
effect: "辛迪加海盗阵营探索时成功率提高10%"
|
|
6994
|
+
},
|
|
6995
|
+
"陨石星系": {
|
|
6996
|
+
description: "这一片星系有着大量的陨石,充满了危险,但可能存在一些有价值的资源",
|
|
6997
|
+
success: 0.4,
|
|
6998
|
+
bonus: 0,
|
|
6999
|
+
available: "金币,爆破物,手榴弹",
|
|
7000
|
+
effect: "获得物品的概率提高10%"
|
|
6962
7001
|
}
|
|
6963
7002
|
};
|
|
6964
7003
|
|
|
@@ -7611,15 +7650,32 @@ ${itemDetails.join("\n")}`;
|
|
|
7611
7650
|
else baseTickets = 3;
|
|
7612
7651
|
const basePoints = getRandomInt(50, 100);
|
|
7613
7652
|
const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
|
|
7653
|
+
let tech5Bonus = 0;
|
|
7654
|
+
if (careerData && careerData.group === "人类联盟" && (careerData.career === "舰长" || careerData.career === "情报副官")) {
|
|
7655
|
+
const [tech5Data] = await ctx.database.get("ggcevo_tech", {
|
|
7656
|
+
handle,
|
|
7657
|
+
techId: 5,
|
|
7658
|
+
level: 5
|
|
7659
|
+
// 只获取5级科技
|
|
7660
|
+
});
|
|
7661
|
+
if (tech5Data) {
|
|
7662
|
+
tech5Bonus = 1;
|
|
7663
|
+
messages.push("🔧 关键系统固件科技LV.5:+100%金币");
|
|
7664
|
+
}
|
|
7665
|
+
}
|
|
7614
7666
|
if (careerData?.group === "人类联盟") {
|
|
7615
|
-
totalBonus += 0.2;
|
|
7616
|
-
messages.push(
|
|
7667
|
+
totalBonus += 0.2 + tech5Bonus;
|
|
7668
|
+
messages.push(`🏛️ 人类联盟阵营:+${20 + tech5Bonus * 100}%金币`);
|
|
7669
|
+
} else {
|
|
7670
|
+
totalBonus += tech5Bonus;
|
|
7617
7671
|
}
|
|
7618
7672
|
if (careerData?.group === "辛迪加海盗") {
|
|
7619
7673
|
const [cred17Item] = await ctx.database.get("ggcevo_warehouse", { handle, itemId: 3 });
|
|
7620
7674
|
if (cred17Item?.quantity >= 1) {
|
|
7621
|
-
|
|
7622
|
-
|
|
7675
|
+
const credBonus = 0.5 + (cred17Item.bonus || 0) / 100;
|
|
7676
|
+
totalBonus += credBonus;
|
|
7677
|
+
const totalBonusPercent = Math.round(credBonus * 100);
|
|
7678
|
+
messages.push(`💎 CRED-17生效:+${totalBonusPercent}%金币`);
|
|
7623
7679
|
}
|
|
7624
7680
|
}
|
|
7625
7681
|
let baseFinalPoints = Math.round(basePoints * (1 + totalBonus));
|
|
@@ -7688,7 +7744,7 @@ ${itemDetails.join("\n")}`;
|
|
|
7688
7744
|
}
|
|
7689
7745
|
let ticketMessage = `🪙 咕咕币 x ${finalTickets}`;
|
|
7690
7746
|
if (multiplier > 1) {
|
|
7691
|
-
ticketMessage += ` (基础值:${baseTickets}
|
|
7747
|
+
ticketMessage += ` (基础值:${baseTickets}枚)`;
|
|
7692
7748
|
}
|
|
7693
7749
|
return `签到成功!本月累计签到${monthlyDays}天,获得:
|
|
7694
7750
|
${coinMessage}
|
|
@@ -8033,17 +8089,15 @@ ${ticketMessage}${effectMessage}`;
|
|
|
8033
8089
|
let report = `=== ${currentSeason}赛季结算报告 ===
|
|
8034
8090
|
|
|
8035
8091
|
`;
|
|
8036
|
-
const
|
|
8092
|
+
const playerDetails = [];
|
|
8037
8093
|
let positiveCount = 0;
|
|
8038
8094
|
let negativeCount = 0;
|
|
8039
|
-
let
|
|
8040
|
-
let pirateTop10 = 0;
|
|
8041
|
-
let pirateTop20 = 0;
|
|
8095
|
+
let pirateTopPlayers = 0;
|
|
8042
8096
|
let piratePositive = 0;
|
|
8043
8097
|
let pirateNegative = 0;
|
|
8044
8098
|
for (const [index, player] of rankedPlayers.entries()) {
|
|
8045
8099
|
const rank = index + 1;
|
|
8046
|
-
const { coins, gold } = getRewardByRank(
|
|
8100
|
+
const { coins, gold, redcrystal } = getRewardByRank(rank);
|
|
8047
8101
|
const [backpack] = await ctx.database.get("ggcevo_backpack", {
|
|
8048
8102
|
handle: player.handle,
|
|
8049
8103
|
itemId: 1
|
|
@@ -8058,12 +8112,9 @@ ${ticketMessage}${effectMessage}`;
|
|
|
8058
8112
|
handle: player.handle,
|
|
8059
8113
|
totalRewards: (signData?.totalRewards || 0) + gold
|
|
8060
8114
|
}], ["handle"]);
|
|
8061
|
-
const medalType = getMedalType(
|
|
8115
|
+
const medalType = getMedalType(rank);
|
|
8062
8116
|
const medalName = requiredMedals[medalType];
|
|
8063
8117
|
const medalId = initDefaultItems[medalName].id;
|
|
8064
|
-
if (rank <= 3) {
|
|
8065
|
-
rewardDetails.push(`✦ 第${rank}名:${coins}枚咕咕币 + ${gold}枚金币 + ${requiredMedals[medalType]}`);
|
|
8066
|
-
}
|
|
8067
8118
|
const [medalData] = await ctx.database.get("ggcevo_backpack", {
|
|
8068
8119
|
handle: player.handle,
|
|
8069
8120
|
itemId: medalId
|
|
@@ -8074,8 +8125,9 @@ ${ticketMessage}${effectMessage}`;
|
|
|
8074
8125
|
quantity: (medalData?.quantity || 0) + 1
|
|
8075
8126
|
}], ["handle", "itemId"]);
|
|
8076
8127
|
const group = groupMap.get(player.handle);
|
|
8128
|
+
let playerLine = `✦ 第${rank}名:${player.handle} - ${coins}咕咕币 + ${gold}金币 + ${medalName}`;
|
|
8077
8129
|
if (group === "辛迪加海盗") {
|
|
8078
|
-
|
|
8130
|
+
pirateTopPlayers++;
|
|
8079
8131
|
const [career] = await ctx.database.get("ggcevo_careers", { handle: player.handle });
|
|
8080
8132
|
if (career) {
|
|
8081
8133
|
await ctx.database.upsert("ggcevo_careers", [{
|
|
@@ -8083,19 +8135,13 @@ ${ticketMessage}${effectMessage}`;
|
|
|
8083
8135
|
redcrystal: (career.redcrystal || 0) + redcrystal
|
|
8084
8136
|
}], ["handle"]);
|
|
8085
8137
|
}
|
|
8086
|
-
|
|
8087
|
-
else if (rank <= 10) pirateTop10++;
|
|
8088
|
-
else pirateTop20++;
|
|
8089
|
-
if (rank <= 3) {
|
|
8090
|
-
rewardDetails[rewardDetails.length - 1] += ` (🏴☠️海盗专属:${redcrystal}红晶)`;
|
|
8091
|
-
}
|
|
8138
|
+
playerLine += ` + ${redcrystal}红晶(海盗专属)`;
|
|
8092
8139
|
}
|
|
8140
|
+
playerDetails.push(playerLine);
|
|
8093
8141
|
}
|
|
8094
|
-
report += "🏆
|
|
8095
|
-
report +=
|
|
8096
|
-
report +=
|
|
8097
|
-
`;
|
|
8098
|
-
report += `✦ 第11-20名:40枚咕咕币 + 2000枚金币 + ${requiredMedals.top20}
|
|
8142
|
+
report += "🏆 精英玩家详情:\n";
|
|
8143
|
+
report += playerDetails.join("\n") + "\n\n";
|
|
8144
|
+
report += `ℹ️ 辛迪加海盗阵营专属奖励:前20名中共有${pirateTopPlayers}名海盗玩家获得了红晶奖励
|
|
8099
8145
|
|
|
8100
8146
|
`;
|
|
8101
8147
|
const otherPlayers = await ctx.database.get("ggcevo_rank", {
|
|
@@ -8111,7 +8157,8 @@ ${ticketMessage}${effectMessage}`;
|
|
|
8111
8157
|
for (const player of otherPlayers) {
|
|
8112
8158
|
if (player.rank > 0) {
|
|
8113
8159
|
positiveCount++;
|
|
8114
|
-
const gold =
|
|
8160
|
+
const gold = 2e3;
|
|
8161
|
+
const redcrystal = 20;
|
|
8115
8162
|
const [signData] = await ctx.database.get("ggcevo_sign", { handle: player.handle });
|
|
8116
8163
|
await ctx.database.upsert("ggcevo_sign", [{
|
|
8117
8164
|
handle: player.handle,
|
|
@@ -8119,7 +8166,6 @@ ${ticketMessage}${effectMessage}`;
|
|
|
8119
8166
|
}], ["handle"]);
|
|
8120
8167
|
const group = otherGroupMap.get(player.handle);
|
|
8121
8168
|
if (group === "辛迪加海盗") {
|
|
8122
|
-
const redcrystal = 10;
|
|
8123
8169
|
piratePositive++;
|
|
8124
8170
|
const [career] = await ctx.database.get("ggcevo_careers", { handle: player.handle });
|
|
8125
8171
|
if (career) {
|
|
@@ -8131,7 +8177,8 @@ ${ticketMessage}${effectMessage}`;
|
|
|
8131
8177
|
}
|
|
8132
8178
|
} else if (player.rank <= 0) {
|
|
8133
8179
|
negativeCount++;
|
|
8134
|
-
const gold =
|
|
8180
|
+
const gold = 1e3;
|
|
8181
|
+
const redcrystal = 10;
|
|
8135
8182
|
const [signData] = await ctx.database.get("ggcevo_sign", { handle: player.handle });
|
|
8136
8183
|
await ctx.database.upsert("ggcevo_sign", [{
|
|
8137
8184
|
handle: player.handle,
|
|
@@ -8139,7 +8186,6 @@ ${ticketMessage}${effectMessage}`;
|
|
|
8139
8186
|
}], ["handle"]);
|
|
8140
8187
|
const group = otherGroupMap.get(player.handle);
|
|
8141
8188
|
if (group === "辛迪加海盗") {
|
|
8142
|
-
const redcrystal = 5;
|
|
8143
8189
|
pirateNegative++;
|
|
8144
8190
|
const [career] = await ctx.database.get("ggcevo_careers", { handle: player.handle });
|
|
8145
8191
|
if (career) {
|
|
@@ -8152,45 +8198,35 @@ ${ticketMessage}${effectMessage}`;
|
|
|
8152
8198
|
}
|
|
8153
8199
|
}
|
|
8154
8200
|
report += "🎉 参与奖励发放:\n";
|
|
8155
|
-
report += `✦ 积极玩家(分数>0):${positiveCount}人,每人获得
|
|
8201
|
+
report += `✦ 积极玩家(分数>0):${positiveCount}人,每人获得2000枚金币 + 20红晶(海盗专属)
|
|
8156
8202
|
`;
|
|
8157
|
-
report += `✦ 奋斗玩家(分数≤0):${negativeCount}人,每人获得
|
|
8203
|
+
report += `✦ 奋斗玩家(分数≤0):${negativeCount}人,每人获得1000枚金币 + 10红晶(海盗专属)
|
|
8158
8204
|
|
|
8159
8205
|
`;
|
|
8160
|
-
|
|
8161
|
-
report += "🏴☠️ 辛迪加海盗红晶奖励:\n";
|
|
8162
|
-
if (pirateTop3 > 0) report += `✦ 冠军/亚军/季军:${pirateTop3}人,分别获得50/45/40红晶
|
|
8163
|
-
`;
|
|
8164
|
-
if (pirateTop10 > 0) report += `✦ 第4-10名:${pirateTop10}人,每人30红晶
|
|
8165
|
-
`;
|
|
8166
|
-
if (pirateTop20 > 0) report += `✦ 第11-20名:${pirateTop20}人,每人20红晶
|
|
8167
|
-
`;
|
|
8168
|
-
if (piratePositive > 0) report += `✦ 未入榜积极玩家:${piratePositive}人,每人10红晶
|
|
8169
|
-
`;
|
|
8170
|
-
if (pirateNegative > 0) report += `✦ 未入榜奋斗玩家:${pirateNegative}人,每人5红晶
|
|
8206
|
+
report += `ℹ️ 辛迪加海盗阵营专属奖励:未上榜玩家中,共有${piratePositive + pirateNegative}名海盗玩家获得了红晶奖励(${piratePositive}名积极玩家,${pirateNegative}名奋斗玩家)
|
|
8171
8207
|
|
|
8172
8208
|
`;
|
|
8173
|
-
}
|
|
8174
8209
|
report += `✅ 总计发放:
|
|
8175
8210
|
`;
|
|
8176
|
-
report += `-
|
|
8211
|
+
report += `- 精英玩家:${rankedPlayers.length}人
|
|
8177
8212
|
`;
|
|
8178
|
-
report += `-
|
|
8213
|
+
report += `- 参与玩家:${otherPlayers.length}人`;
|
|
8179
8214
|
await session.send(report);
|
|
8180
8215
|
return `${currentSeason}赛季结算数据已更新!`;
|
|
8181
8216
|
function getRewardByRank(rank) {
|
|
8182
|
-
|
|
8183
|
-
{ coins: 100, gold:
|
|
8217
|
+
const rewards = [
|
|
8218
|
+
{ coins: 100, gold: 1e4, redcrystal: 100 },
|
|
8184
8219
|
// 第1名
|
|
8185
|
-
{ coins: 90, gold:
|
|
8220
|
+
{ coins: 90, gold: 9e3, redcrystal: 90 },
|
|
8186
8221
|
// 第2名
|
|
8187
|
-
{ coins: 80, gold:
|
|
8222
|
+
{ coins: 80, gold: 8e3, redcrystal: 80 },
|
|
8188
8223
|
// 第3名
|
|
8189
|
-
...Array(7).fill({ coins: 60, gold:
|
|
8190
|
-
//4-10
|
|
8191
|
-
...Array(10).fill({ coins: 40, gold:
|
|
8192
|
-
//11-20
|
|
8193
|
-
]
|
|
8224
|
+
...Array(7).fill({ coins: 60, gold: 6e3, redcrystal: 60 }),
|
|
8225
|
+
// 4-10名
|
|
8226
|
+
...Array(10).fill({ coins: 40, gold: 4e3, redcrystal: 40 })
|
|
8227
|
+
// 11-20名
|
|
8228
|
+
];
|
|
8229
|
+
return rank <= rewards.length ? rewards[rank - 1] : { coins: 0, gold: 0, redcrystal: 0 };
|
|
8194
8230
|
}
|
|
8195
8231
|
__name(getRewardByRank, "getRewardByRank");
|
|
8196
8232
|
function getMedalType(rank) {
|
|
@@ -8201,14 +8237,6 @@ ${ticketMessage}${effectMessage}`;
|
|
|
8201
8237
|
return "top20";
|
|
8202
8238
|
}
|
|
8203
8239
|
__name(getMedalType, "getMedalType");
|
|
8204
|
-
function getPirateRedcrystalByRank(rank) {
|
|
8205
|
-
if (rank === 1) return 50;
|
|
8206
|
-
if (rank === 2) return 45;
|
|
8207
|
-
if (rank === 3) return 40;
|
|
8208
|
-
if (rank <= 10) return 30;
|
|
8209
|
-
return 20;
|
|
8210
|
-
}
|
|
8211
|
-
__name(getPirateRedcrystalByRank, "getPirateRedcrystalByRank");
|
|
8212
8240
|
});
|
|
8213
8241
|
ctx.command("ggcevo/排名 [player]", "查询个人排名").alias("rank").usage("输入“排名”查看自己的排名信息").action(async (argv, player) => {
|
|
8214
8242
|
const session = argv.session;
|
|
@@ -10686,6 +10714,15 @@ ${discountDetails.join("\n")}` : "",
|
|
|
10686
10714
|
discountApplied = true;
|
|
10687
10715
|
discountReason = `${careerData.career}职业:购买${item}享受50%折扣`;
|
|
10688
10716
|
}
|
|
10717
|
+
if (isSyndicatedItem && itemConfig2.type === "设备工具") {
|
|
10718
|
+
const [existingItem] = await ctx.database.get("ggcevo_warehouse", {
|
|
10719
|
+
handle,
|
|
10720
|
+
itemId: itemConfig2.id
|
|
10721
|
+
});
|
|
10722
|
+
if (existingItem && existingItem.quantity >= 1) {
|
|
10723
|
+
return "❌ 您已经拥有该设备工具,无法重复订购。";
|
|
10724
|
+
}
|
|
10725
|
+
}
|
|
10689
10726
|
if ((careerData.redcrystal || 0) < finalCost) {
|
|
10690
10727
|
const discountMessage = discountApplied ? `(原价${originalPrice})` : "";
|
|
10691
10728
|
return `❌ 红晶不足!需要:${finalCost}${discountMessage} 当前拥有红晶:${careerData.redcrystal}`;
|
|
@@ -10798,13 +10835,22 @@ ${discountReason}` : "",
|
|
|
10798
10835
|
([, item]) => item.id === warehouseItem.itemId
|
|
10799
10836
|
);
|
|
10800
10837
|
const [itemName, itemData] = entry;
|
|
10801
|
-
|
|
10838
|
+
const upgradeConfig = itemupgrades.find((config2) => config2.name === itemName);
|
|
10839
|
+
const isUpgradable = upgradeConfig && itemName in SyndicatedItems;
|
|
10840
|
+
const bonusValue = warehouseItem.bonus || 0;
|
|
10841
|
+
const itemLines = [
|
|
10802
10842
|
`${itemName}`,
|
|
10803
10843
|
`类型:${itemData.type} | 持有数量:${warehouseItem.quantity}`,
|
|
10804
|
-
`效果:${itemData.effects}
|
|
10844
|
+
`效果:${itemData.effects}`
|
|
10845
|
+
];
|
|
10846
|
+
if (isUpgradable) {
|
|
10847
|
+
itemLines.push(`升级加成:${bonusValue}%`);
|
|
10848
|
+
}
|
|
10849
|
+
itemLines.push(
|
|
10805
10850
|
`描述:${itemData.description}`,
|
|
10806
10851
|
"――――――――――――――"
|
|
10807
|
-
|
|
10852
|
+
);
|
|
10853
|
+
return itemLines.join("\n");
|
|
10808
10854
|
}).join("\n")
|
|
10809
10855
|
);
|
|
10810
10856
|
}
|
|
@@ -10939,7 +10985,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
10939
10985
|
totalMined: 0
|
|
10940
10986
|
// 初始化总收益
|
|
10941
10987
|
});
|
|
10942
|
-
return "⛏️ 首次挖矿作业已开始,请至少等待1
|
|
10988
|
+
return "⛏️ 首次挖矿作业已开始,请至少等待1小时。\n💡 提示:基础收益为每半小时4枚金币";
|
|
10943
10989
|
}
|
|
10944
10990
|
const nowtime = /* @__PURE__ */ new Date();
|
|
10945
10991
|
const chinaStart = record.startTime;
|
|
@@ -10953,8 +10999,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
10953
10999
|
`🕒 开始时间:${record.startTime.toLocaleString("zh-CN", { hour12: false })}`,
|
|
10954
11000
|
`⏱️ 当前时间:${nowtime.toLocaleString("zh-CN", { hour12: false })}`,
|
|
10955
11001
|
`⏳ 还需等待:${remaining}分钟`,
|
|
10956
|
-
`💡
|
|
10957
|
-
基础收益为每半小时4枚金币`
|
|
11002
|
+
`💡 提示:基础收益为每半小时4枚金币`
|
|
10958
11003
|
].join("\n");
|
|
10959
11004
|
}
|
|
10960
11005
|
let halfHours = Math.floor(duration / 30);
|
|
@@ -10984,7 +11029,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
10984
11029
|
});
|
|
10985
11030
|
if (equippedShip) {
|
|
10986
11031
|
const allowedShips = {
|
|
10987
|
-
"TX-12星际巡洋舰": 0.
|
|
11032
|
+
"TX-12星际巡洋舰": 0.05,
|
|
10988
11033
|
"TX-12S隐形巡洋舰": 0.1
|
|
10989
11034
|
};
|
|
10990
11035
|
for (const [name2, data] of Object.entries(spaceship)) {
|
|
@@ -11053,7 +11098,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11053
11098
|
}
|
|
11054
11099
|
}
|
|
11055
11100
|
reportLines.push(`🏆 历史总挖矿收益:${record.totalMined + total}金币`);
|
|
11056
|
-
reportLines.push("💡
|
|
11101
|
+
reportLines.push("💡 已自动开始新一轮挖矿");
|
|
11057
11102
|
return reportLines.join("\n");
|
|
11058
11103
|
});
|
|
11059
11104
|
ctx.command("ggcevo/任务 [name]").usage('输入"任务"查看所有任务列表,或"任务 任务名称"查看详细任务信息').action(async ({ session }, name2) => {
|
|
@@ -11140,7 +11185,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11140
11185
|
const baseTotal = taskConfig.price * completableTimes;
|
|
11141
11186
|
let baseBonus = 0;
|
|
11142
11187
|
if (techLevel > 0) {
|
|
11143
|
-
baseBonus = careerData?.group === "人类联盟" && ["舰长", "情报副官"].includes(careerData?.career) ? [0,
|
|
11188
|
+
baseBonus = careerData?.group === "人类联盟" && ["舰长", "情报副官"].includes(careerData?.career) ? [0, 10, 20, 30, 40, 50][techLevel] : [0, 5, 10, 15, 20, 25][techLevel];
|
|
11144
11189
|
}
|
|
11145
11190
|
const captainBonus = careerData?.group === "人类联盟" && careerData.career === "舰长" ? 50 : 0;
|
|
11146
11191
|
const totalBonus = baseBonus + captainBonus;
|
|
@@ -11426,28 +11471,30 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11426
11471
|
let plunderRateBonus = 0;
|
|
11427
11472
|
let isBehemoth = false;
|
|
11428
11473
|
let isStealthShip = false;
|
|
11429
|
-
let
|
|
11474
|
+
let shipSuccessBonus = 0;
|
|
11430
11475
|
if (shipRecord) {
|
|
11431
11476
|
const ship = Object.values(spaceship).find((s) => s.id === shipRecord.id);
|
|
11432
11477
|
if (ship) {
|
|
11433
11478
|
switch (ship.id) {
|
|
11434
11479
|
case 2:
|
|
11435
|
-
shipBonus =
|
|
11480
|
+
shipBonus = 5;
|
|
11436
11481
|
isStealthShip = true;
|
|
11482
|
+
shipSuccessBonus = 0.1;
|
|
11437
11483
|
break;
|
|
11438
11484
|
case 3:
|
|
11439
11485
|
shipBonus = 20;
|
|
11440
11486
|
plunderRateBonus = 20;
|
|
11487
|
+
shipSuccessBonus = 0.2;
|
|
11441
11488
|
break;
|
|
11442
11489
|
case 4:
|
|
11443
11490
|
shipBonus = 30;
|
|
11444
11491
|
plunderRateBonus = 30;
|
|
11445
11492
|
isBehemoth = true;
|
|
11493
|
+
shipSuccessBonus = 0.6;
|
|
11446
11494
|
break;
|
|
11447
11495
|
default:
|
|
11448
11496
|
shipBonus = ship.explorebonus || 0;
|
|
11449
11497
|
}
|
|
11450
|
-
if (ship.id === 2) stealthShipEffectAdded = true;
|
|
11451
11498
|
}
|
|
11452
11499
|
}
|
|
11453
11500
|
const [techReactor] = await ctx.database.get("ggcevo_tech", { handle, techId: 6 });
|
|
@@ -11471,7 +11518,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11471
11518
|
`🌌 星系:${record.galaxy}`,
|
|
11472
11519
|
`⏱️ 开始时间:${record.startTime.toLocaleString("zh-CN", { hour12: false })}`,
|
|
11473
11520
|
`⏳ 剩余时间:${Math.floor(remainingMinutes / 60)}小时${remainingMinutes % 60}分钟`,
|
|
11474
|
-
"💡 提示:探索将持续12
|
|
11521
|
+
"💡 提示:探索将持续12小时,完成后才可再次进行探索"
|
|
11475
11522
|
].join("\n");
|
|
11476
11523
|
} else {
|
|
11477
11524
|
const returnsIncrement = (record.returns || 0) + 1;
|
|
@@ -11479,15 +11526,53 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11479
11526
|
let successRate = galaxyData2.success;
|
|
11480
11527
|
if (career?.group === "人类联盟" && record.galaxy === "联盟星系") successRate += 0.1;
|
|
11481
11528
|
else if (career?.group === "辛迪加海盗" && record.galaxy === "辛迪加星系") successRate += 0.1;
|
|
11482
|
-
|
|
11529
|
+
successRate += shipSuccessBonus;
|
|
11483
11530
|
successRate = Math.min(successRate, 1);
|
|
11484
11531
|
let baseCoinReward = Math.floor(Math.random() * 51) + 50;
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
|
|
11532
|
+
const galaxyBonusPercent = galaxyData2.bonus * 100;
|
|
11533
|
+
const bonusEffects = [];
|
|
11534
|
+
if (galaxyBonusPercent) {
|
|
11535
|
+
bonusEffects.push(`▸ 🌌 ${galaxyName}:金币+${galaxyBonusPercent.toFixed(0)}%`);
|
|
11536
|
+
}
|
|
11537
|
+
if (shipBonus || shipSuccessBonus) {
|
|
11538
|
+
let shipType = "";
|
|
11539
|
+
if (shipRecord.id === 2) shipType = "TX-12S隐形巡洋舰";
|
|
11540
|
+
else if (shipRecord.id === 3) shipType = "TX-12A突击巡洋舰";
|
|
11541
|
+
else if (shipRecord.id === 4) shipType = "庞兽号歼星舰";
|
|
11542
|
+
if (shipBonus) bonusEffects.push(`▸ 🚀 ${shipType}:金币+${shipBonus}%`);
|
|
11543
|
+
if (shipSuccessBonus) bonusEffects.push(`▸ 🛸 ${shipType}:成功率+${Math.round(shipSuccessBonus * 100)}%`);
|
|
11544
|
+
}
|
|
11545
|
+
if (record.plunderbonus) {
|
|
11546
|
+
const sign = record.plunderbonus > 0 ? "+" : "";
|
|
11547
|
+
bonusEffects.push(`▸ ⚔️ 掠夺事件:${sign}${record.plunderbonus}%金币`);
|
|
11548
|
+
}
|
|
11549
|
+
let itemDropBonus = 0;
|
|
11550
|
+
if (record.galaxy === "陨石星系") {
|
|
11551
|
+
itemDropBonus += 0.1;
|
|
11552
|
+
bonusEffects.push(`▸ 🌠 陨石星系效果:物品获得概率+10%`);
|
|
11553
|
+
}
|
|
11554
|
+
if (career?.group === "人类联盟" && techLevel === 5 && ["情报副官", "总工程师"].includes(careerName)) {
|
|
11555
|
+
itemDropBonus += 0.2;
|
|
11556
|
+
bonusEffects.push(`▸ 🔍 反应堆科技Lv.${techLevel}:物品获得概率+20%`);
|
|
11557
|
+
}
|
|
11558
|
+
const combinedTechBonus = techBonusRate + careerBonusRate;
|
|
11559
|
+
if (combinedTechBonus > 0) {
|
|
11560
|
+
bonusEffects.push(`▸ ⚙️ 反应堆科技Lv.${techLevel}:+${(combinedTechBonus * 100).toFixed(0)}%金币`);
|
|
11561
|
+
}
|
|
11562
|
+
if (careerCoinBonus) {
|
|
11563
|
+
bonusEffects.push(`▸ 🎓 总工程师职业:+${careerCoinBonus}%金币`);
|
|
11564
|
+
}
|
|
11565
|
+
const totalBonusMultiplier = 1 + (galaxyBonusPercent + // 星系加成
|
|
11566
|
+
shipBonus + // 飞船加成
|
|
11567
|
+
(record.plunderbonus || 0) + // 掠夺事件加成/减益
|
|
11568
|
+
(techBonusRate + careerBonusRate) * 100 + // 科技和职业加成
|
|
11569
|
+
careerCoinBonus) / 100;
|
|
11570
|
+
let finalCoin = Math.floor(baseCoinReward * totalBonusMultiplier);
|
|
11488
11571
|
const isSuccess = Math.random() < successRate;
|
|
11489
|
-
if (!isSuccess)
|
|
11490
|
-
|
|
11572
|
+
if (!isSuccess) {
|
|
11573
|
+
finalCoin = Math.floor(finalCoin * 0.5);
|
|
11574
|
+
bonusEffects.push(`▸ ⚠️ 探索失败:金币奖励减半`);
|
|
11575
|
+
}
|
|
11491
11576
|
const [signRecord] = await ctx.database.get("ggcevo_sign", { handle });
|
|
11492
11577
|
let newTotalRewards = finalCoin;
|
|
11493
11578
|
if (signRecord) {
|
|
@@ -11503,12 +11588,13 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11503
11588
|
}
|
|
11504
11589
|
let itemRewards = [];
|
|
11505
11590
|
if (isSuccess) {
|
|
11506
|
-
const
|
|
11507
|
-
{ id: 2, name: "闪光弹" },
|
|
11508
|
-
{ id: 4, name: "脉冲手雷" }
|
|
11591
|
+
const possibleItems = [
|
|
11592
|
+
{ id: 2, name: "闪光弹", chance: 0.05 },
|
|
11593
|
+
{ id: 4, name: "脉冲手雷", chance: 0.05 }
|
|
11509
11594
|
];
|
|
11510
|
-
for (const item of
|
|
11511
|
-
|
|
11595
|
+
for (const item of possibleItems) {
|
|
11596
|
+
const dropRate = item.chance + itemDropBonus;
|
|
11597
|
+
if (Math.random() < dropRate) {
|
|
11512
11598
|
const [existing] = await ctx.database.get("ggcevo_warehouse", {
|
|
11513
11599
|
handle,
|
|
11514
11600
|
itemId: item.id
|
|
@@ -11537,22 +11623,31 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11537
11623
|
returns: returnsIncrement,
|
|
11538
11624
|
plunderbonus: 0
|
|
11539
11625
|
});
|
|
11540
|
-
|
|
11626
|
+
const isRewardModified = finalCoin !== baseCoinReward;
|
|
11627
|
+
const coinDisplay = isRewardModified ? `💰 金币 +${finalCoin}(基础值 ${baseCoinReward})` : `💰 金币 +${finalCoin}`;
|
|
11628
|
+
const resultMessage = [
|
|
11541
11629
|
isSuccess ? "🎉 探索成功!" : "⚠️ 探索失败!",
|
|
11542
11630
|
`🌌 星系:${record.galaxy}`,
|
|
11543
11631
|
`🔮 实际成功率:${(successRate * 100).toFixed(1)}%`,
|
|
11632
|
+
coinDisplay,
|
|
11633
|
+
// 使用新的金币显示方式
|
|
11634
|
+
...itemRewards.length > 0 ? [`📦 获得物品:${itemRewards.join("、")}`] : [],
|
|
11635
|
+
...bonusEffects.length > 0 ? [
|
|
11636
|
+
"",
|
|
11637
|
+
"⚡ 加成效果:",
|
|
11638
|
+
...bonusEffects
|
|
11639
|
+
] : [],
|
|
11640
|
+
"",
|
|
11544
11641
|
`🏆 已探索次数:${returnsIncrement}`,
|
|
11545
|
-
"
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
"💡 已自动结束探索任务"
|
|
11549
|
-
].join("\n");
|
|
11642
|
+
'💡 输入"探索 星系名称"开始下一轮探索'
|
|
11643
|
+
].filter(Boolean).join("\n");
|
|
11644
|
+
return resultMessage;
|
|
11550
11645
|
}
|
|
11551
11646
|
}
|
|
11552
11647
|
if (!galaxyName) {
|
|
11553
11648
|
const exploreOptions = [];
|
|
11554
11649
|
for (const [name3, info] of Object.entries(galaxy)) {
|
|
11555
|
-
const bonusPercent = Math.round(
|
|
11650
|
+
const bonusPercent = Math.round(info.bonus * 100);
|
|
11556
11651
|
exploreOptions.push([
|
|
11557
11652
|
`【${name3}】`,
|
|
11558
11653
|
`- 成功率:${(info.success * 100).toFixed(0)}%`,
|
|
@@ -11574,6 +11669,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11574
11669
|
const basePlunderRate = 0.2;
|
|
11575
11670
|
const actualPlunderRate = basePlunderRate + plunderRateBonus / 100;
|
|
11576
11671
|
const canPlunder = Math.random() < actualPlunderRate;
|
|
11672
|
+
let plunderHandled = false;
|
|
11577
11673
|
if (canPlunder) {
|
|
11578
11674
|
const explorers = await ctx.database.get("ggcevo_explore", {
|
|
11579
11675
|
galaxy: galaxyName,
|
|
@@ -11592,67 +11688,82 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11592
11688
|
});
|
|
11593
11689
|
if (plunderTargets.length > 0) {
|
|
11594
11690
|
const target = plunderTargets[Math.floor(Math.random() * plunderTargets.length)];
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
if (
|
|
11598
|
-
|
|
11599
|
-
|
|
11600
|
-
|
|
11601
|
-
|
|
11602
|
-
|
|
11603
|
-
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
|
|
11691
|
+
let baseSuccessRate = 50;
|
|
11692
|
+
if (isBehemoth) baseSuccessRate += 30;
|
|
11693
|
+
if (shipRecord?.id === 3) baseSuccessRate += 10;
|
|
11694
|
+
await session.send([
|
|
11695
|
+
`❗ 您在探索过程中发现了【${target.name}】的飞船,是否掠夺?`,
|
|
11696
|
+
`🎯 掠夺成功率:${baseSuccessRate}%`,
|
|
11697
|
+
`⏱️ (30秒内输入"是"来进行掠夺)`
|
|
11698
|
+
].join("\n"));
|
|
11699
|
+
try {
|
|
11700
|
+
const response = await session.prompt(3e4);
|
|
11701
|
+
if (response === "是") {
|
|
11702
|
+
let baseSuccessRate2 = 0.5;
|
|
11703
|
+
if (isBehemoth) baseSuccessRate2 += 0.3;
|
|
11704
|
+
if (shipRecord?.id === 3) baseSuccessRate2 += 0.1;
|
|
11705
|
+
const success = Math.random() < baseSuccessRate2;
|
|
11706
|
+
let playerBonus, targetBonus;
|
|
11707
|
+
if (success) {
|
|
11708
|
+
playerBonus = 20;
|
|
11709
|
+
targetBonus = -20;
|
|
11710
|
+
} else {
|
|
11711
|
+
playerBonus = -20;
|
|
11712
|
+
targetBonus = 20;
|
|
11713
|
+
}
|
|
11714
|
+
await ctx.database.upsert("ggcevo_explore", [{
|
|
11715
|
+
handle,
|
|
11716
|
+
name: name2,
|
|
11717
|
+
startTime: /* @__PURE__ */ new Date(),
|
|
11718
|
+
galaxy: galaxyName,
|
|
11719
|
+
returns: record?.returns || 0,
|
|
11720
|
+
plunderbonus: playerBonus,
|
|
11721
|
+
status: "探索中"
|
|
11722
|
+
}], ["handle"]);
|
|
11723
|
+
const [targetRecord] = await ctx.database.get("ggcevo_explore", { handle: target.handle });
|
|
11724
|
+
await ctx.database.set("ggcevo_explore", { handle: target.handle }, {
|
|
11725
|
+
plunderbonus: (targetRecord.plunderbonus || 0) + targetBonus
|
|
11726
|
+
});
|
|
11727
|
+
await session.send(
|
|
11728
|
+
success ? `✅ 掠夺成功!您获得${playerBonus}%金币加成,${target.name}的金币收益被降低了20%。` : `❌ 掠夺失败!您的金币收益被降低20%,${target.name}获得了20%的金币收益加成。`
|
|
11729
|
+
);
|
|
11730
|
+
plunderHandled = true;
|
|
11609
11731
|
}
|
|
11610
|
-
|
|
11611
|
-
handle,
|
|
11612
|
-
name: name2,
|
|
11613
|
-
startTime: /* @__PURE__ */ new Date(),
|
|
11614
|
-
galaxy: galaxyName,
|
|
11615
|
-
returns: record?.returns || 0,
|
|
11616
|
-
plunderbonus: playerBonus,
|
|
11617
|
-
status: "探索中"
|
|
11618
|
-
}], ["handle"]);
|
|
11619
|
-
const [targetRecord] = await ctx.database.get("ggcevo_explore", { handle: target.handle });
|
|
11620
|
-
await ctx.database.set("ggcevo_explore", { handle: target.handle }, {
|
|
11621
|
-
plunderbonus: (targetRecord.plunderbonus || 0) + targetBonus
|
|
11622
|
-
});
|
|
11623
|
-
return success ? `✅ 掠夺成功!您获得${playerBonus}%金币加成,${target.name}的金币收益被降低了20%。` : `❌ 掠夺失败!您的金币收益被降低20%,${target.name}获得了20%的金币收益加成。`;
|
|
11732
|
+
} catch (error) {
|
|
11624
11733
|
}
|
|
11625
11734
|
}
|
|
11626
11735
|
}
|
|
11627
11736
|
}
|
|
11628
|
-
|
|
11629
|
-
|
|
11630
|
-
|
|
11631
|
-
|
|
11632
|
-
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11737
|
+
if (!plunderHandled) {
|
|
11738
|
+
await ctx.database.upsert("ggcevo_explore", [{
|
|
11739
|
+
handle,
|
|
11740
|
+
name: name2,
|
|
11741
|
+
startTime: /* @__PURE__ */ new Date(),
|
|
11742
|
+
galaxy: galaxyName,
|
|
11743
|
+
returns: record?.returns || 0,
|
|
11744
|
+
plunderbonus: 0,
|
|
11745
|
+
status: "探索中"
|
|
11746
|
+
}], ["handle"]);
|
|
11747
|
+
}
|
|
11637
11748
|
const galaxyData = galaxy[galaxyName];
|
|
11638
11749
|
let estimatedRate = galaxyData.success;
|
|
11639
11750
|
if (career?.group === "人类联盟" && galaxyName === "联盟星系") estimatedRate += 0.1;
|
|
11640
|
-
if (career?.group === "辛迪加海盗" && galaxyName === "辛迪加星系") estimatedRate += 0.1;
|
|
11641
|
-
|
|
11751
|
+
else if (career?.group === "辛迪加海盗" && galaxyName === "辛迪加星系") estimatedRate += 0.1;
|
|
11752
|
+
estimatedRate += shipSuccessBonus;
|
|
11642
11753
|
estimatedRate = Math.min(estimatedRate, 1) * 100;
|
|
11643
11754
|
return [
|
|
11644
11755
|
`🚀 开始探索 ${galaxyName}`,
|
|
11645
11756
|
`⏱️ 开始时间:${(/* @__PURE__ */ new Date()).toLocaleString("zh-CN", { hour12: false })}`,
|
|
11646
11757
|
`⏳ 持续时间:12小时`,
|
|
11647
11758
|
`📊 预计成功率:${estimatedRate.toFixed(0)}%`,
|
|
11648
|
-
"💡
|
|
11759
|
+
"💡 探索可获得50-100的基础金币"
|
|
11649
11760
|
].join("\n");
|
|
11650
11761
|
});
|
|
11651
11762
|
const shipIdToName = {};
|
|
11652
11763
|
for (const [name2, data] of Object.entries(spaceship)) {
|
|
11653
11764
|
shipIdToName[data.id] = name2;
|
|
11654
11765
|
}
|
|
11655
|
-
ctx.command("
|
|
11766
|
+
ctx.command("ggcevo/飞船").action(async ({ session }) => {
|
|
11656
11767
|
const shipList = Object.keys(spaceship).map((name2) => {
|
|
11657
11768
|
const ship = spaceship[name2];
|
|
11658
11769
|
return [
|
|
@@ -11768,16 +11879,60 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11768
11879
|
// 新增的提示
|
|
11769
11880
|
].join("\n");
|
|
11770
11881
|
});
|
|
11771
|
-
ctx.command("ggcevo/升级物品 [itemName]", "升级辛迪加海盗物品").action(async ({ session }, itemName) => {
|
|
11882
|
+
ctx.command("ggcevo/升级物品 [itemName]", "升级辛迪加海盗物品").usage('输入"升级物品"查看可升级列表,或"升级物品 物品名称"进行升级').action(async ({ session }, itemName) => {
|
|
11772
11883
|
const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
|
|
11773
11884
|
if (!profile) return "🔒 需要先绑定游戏句柄。";
|
|
11774
11885
|
const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
|
|
11775
|
-
if (!itemName) return "请输入要升级的物品名称,例如:升级物品 自动采掘机器人";
|
|
11776
11886
|
const [career] = await ctx.database.get("ggcevo_careers", { handle });
|
|
11777
11887
|
if (!career) return "🚫 未查询到您的阵营信息";
|
|
11778
11888
|
if (career.group !== "辛迪加海盗") {
|
|
11779
11889
|
return `🚫 仅限辛迪加海盗阵营使用`;
|
|
11780
11890
|
}
|
|
11891
|
+
const isCommander = career.career === "指挥官";
|
|
11892
|
+
if (!itemName) {
|
|
11893
|
+
const warehouseItems2 = await ctx.database.get("ggcevo_warehouse", { handle });
|
|
11894
|
+
const upgradableItems = [];
|
|
11895
|
+
for (const item of warehouseItems2) {
|
|
11896
|
+
const [itemName2, itemConfig3] = Object.entries(SyndicatedItems).find(([name2, config2]) => config2.id === item.itemId) || [];
|
|
11897
|
+
if (!itemName2 || !itemConfig3) continue;
|
|
11898
|
+
const upgradeConfig2 = itemupgrades.find((cfg) => cfg.name === itemName2);
|
|
11899
|
+
if (!upgradeConfig2) continue;
|
|
11900
|
+
if (item.bonus >= upgradeConfig2.maxBonus) continue;
|
|
11901
|
+
const baseCost = upgradeConfig2.upgradeCostBase;
|
|
11902
|
+
const actualCost = isCommander ? Math.floor(baseCost * 0.5) : baseCost;
|
|
11903
|
+
upgradableItems.push({
|
|
11904
|
+
name: itemName2,
|
|
11905
|
+
currentBonus: item.bonus,
|
|
11906
|
+
maxBonus: upgradeConfig2.maxBonus,
|
|
11907
|
+
cost: actualCost,
|
|
11908
|
+
discount: isCommander ? `(原价: ${baseCost})` : ""
|
|
11909
|
+
});
|
|
11910
|
+
}
|
|
11911
|
+
if (upgradableItems.length === 0) {
|
|
11912
|
+
return "🚫 当前没有可升级的物品";
|
|
11913
|
+
}
|
|
11914
|
+
const discountNotice2 = [];
|
|
11915
|
+
if (isCommander) {
|
|
11916
|
+
discountNotice2.push(
|
|
11917
|
+
"💰 折扣明细:",
|
|
11918
|
+
"▸ 🎖️ 指挥官职业:50%折扣"
|
|
11919
|
+
);
|
|
11920
|
+
}
|
|
11921
|
+
const msgLines = [
|
|
11922
|
+
"💎 可升级物品列表",
|
|
11923
|
+
...discountNotice2,
|
|
11924
|
+
// 在列表下方第一行添加折扣明细
|
|
11925
|
+
"====================",
|
|
11926
|
+
...upgradableItems.map((item) => {
|
|
11927
|
+
return `▸ ${item.name}:
|
|
11928
|
+
升级加成 ${item.currentBonus}%/${item.maxBonus}%
|
|
11929
|
+
升级消耗:${item.cost}红晶 ${item.discount}`;
|
|
11930
|
+
}),
|
|
11931
|
+
"====================",
|
|
11932
|
+
`使用"升级物品 物品名称"进行升级`
|
|
11933
|
+
];
|
|
11934
|
+
return msgLines.join("\n");
|
|
11935
|
+
}
|
|
11781
11936
|
const itemConfig2 = SyndicatedItems[itemName];
|
|
11782
11937
|
if (!itemConfig2) return `🚫 未找到物品【${itemName}】的配置信息`;
|
|
11783
11938
|
const upgradeConfig = itemupgrades.find((cfg) => cfg.name === itemName);
|
|
@@ -11795,7 +11950,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11795
11950
|
}
|
|
11796
11951
|
let upgradeCost = upgradeConfig.upgradeCostBase;
|
|
11797
11952
|
let discountNotice = "";
|
|
11798
|
-
if (
|
|
11953
|
+
if (isCommander) {
|
|
11799
11954
|
upgradeCost = Math.floor(upgradeCost * 0.5);
|
|
11800
11955
|
discountNotice = `
|
|
11801
11956
|
✨ 指挥官职业生效!实际消耗: ${upgradeCost} (原价:${upgradeConfig.upgradeCostBase})`;
|
|
@@ -11827,6 +11982,163 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11827
11982
|
- 当前加成: ${totalBonus}%
|
|
11828
11983
|
- 剩余红晶: ${newRedCrystal}`;
|
|
11829
11984
|
});
|
|
11985
|
+
ctx.command("ggcevo/签到奖励").action(({}) => {
|
|
11986
|
+
return `
|
|
11987
|
+
签到咕咕币奖励:
|
|
11988
|
+
每天签到获得3枚咕咕币
|
|
11989
|
+
第7天签到获得4枚咕咕币
|
|
11990
|
+
第14天签到获得5枚咕咕币
|
|
11991
|
+
第21天签到获得6枚咕咕币
|
|
11992
|
+
第28天签到获得7枚咕咕币
|
|
11993
|
+
--------------
|
|
11994
|
+
签到金币奖励:
|
|
11995
|
+
每天获得50-100金币
|
|
11996
|
+
--------------
|
|
11997
|
+
签到红晶奖励(辛迪加财务经理职业加成):
|
|
11998
|
+
第1-6天每天获得1枚红晶
|
|
11999
|
+
第7-13天每天获得2枚红晶
|
|
12000
|
+
第14-20天每天获得3枚红晶
|
|
12001
|
+
第21-27天每天获得4枚红晶
|
|
12002
|
+
第28天及以后每天获得5枚红晶
|
|
12003
|
+
--------------
|
|
12004
|
+
注意:补签只能获得咕咕币
|
|
12005
|
+
`.trim();
|
|
12006
|
+
});
|
|
12007
|
+
ctx.command("ggcevo/pk规则").action(({}) => {
|
|
12008
|
+
return `
|
|
12009
|
+
⚔️【全新PK规则】⚔️
|
|
12010
|
+
1️⃣ 阵营限制
|
|
12011
|
+
仅限「人类联盟」与「辛迪加海盗」成员参与PK
|
|
12012
|
+
未加入阵营玩家请使用「加入」指令选择阵营
|
|
12013
|
+
|
|
12014
|
+
2️⃣ 人类联盟保护机制
|
|
12015
|
+
新成员享有30天保护期(从加入阵营日起算)
|
|
12016
|
+
保护期内不可被挑战
|
|
12017
|
+
首次主动发起PK即视为放弃保护期(永久开启PK功能)
|
|
12018
|
+
|
|
12019
|
+
3️⃣ 战斗惩罚调整
|
|
12020
|
+
人类联盟被动应战的PK战败 ➜ 仅损失1%金币
|
|
12021
|
+
辛迪加海盗PK战败 ➜ 随机1%-5%损失金币
|
|
12022
|
+
|
|
12023
|
+
4️⃣ 每日限制
|
|
12024
|
+
主动发起PK次数:3次/日
|
|
12025
|
+
PK同玩家限战:1次/日
|
|
12026
|
+
被PK次数上限:5次/日
|
|
12027
|
+
|
|
12028
|
+
🔥【战力系统升级】🔥
|
|
12029
|
+
1️⃣ 战力组成
|
|
12030
|
+
赛季积分 + 武器加成 + 职业加成
|
|
12031
|
+
|
|
12032
|
+
2️⃣ 武器加成
|
|
12033
|
+
每拥有一把武器 ➜ + 基础伤害 x 100
|
|
12034
|
+
|
|
12035
|
+
每一把武器强化等级带来指数级战力增长:
|
|
12036
|
+
等级1 ➜ +1000
|
|
12037
|
+
等级2 ➜ +3000
|
|
12038
|
+
等级3 ➜ +6000
|
|
12039
|
+
等级4 ➜ +10000
|
|
12040
|
+
等级5 ➜ +15000
|
|
12041
|
+
等级6 ➜ +21000
|
|
12042
|
+
|
|
12043
|
+
每改装一个通用模块 ➜ +2000
|
|
12044
|
+
每改装一个专属模块 ➜ +4000
|
|
12045
|
+
|
|
12046
|
+
3️⃣ 职业加成
|
|
12047
|
+
联盟新兵:+1000
|
|
12048
|
+
深空矿工,医疗专家,情报副官,总工程师,舰长,机械化专家:+2500
|
|
12049
|
+
警卫员下士,警卫长,武器中士:+3500
|
|
12050
|
+
辛迪加炮灰新兵:+2000
|
|
12051
|
+
清洁工,辛迪加财务经理,计算机专家,指挥官,装甲兵,破坏者,征募官:+3000
|
|
12052
|
+
能量武器专家,枪手,猩红杀手,纵火狂:+4000
|
|
12053
|
+
`.trim();
|
|
12054
|
+
});
|
|
12055
|
+
ctx.command("ggcevo/击败奖励").alias("击杀奖励").action(({}) => {
|
|
12056
|
+
return `
|
|
12057
|
+
🌟 异形主宰击败奖励规则 🌟
|
|
12058
|
+
🏆 前20名奖励(按伤害排名):
|
|
12059
|
+
1️⃣ 第1名:
|
|
12060
|
+
30 咕咕币 + 3000 金币 + 30 红晶
|
|
12061
|
+
2️⃣ 第2名:
|
|
12062
|
+
25 咕咕币 + 2500 金币 + 25 红晶
|
|
12063
|
+
3️⃣ 第3名:
|
|
12064
|
+
20 咕咕币 + 2000 金币 + 20 红晶
|
|
12065
|
+
🎖️ 第4-10名:
|
|
12066
|
+
15 咕咕币 + 1500 金币 + 15 红晶
|
|
12067
|
+
💫 第11-20名:
|
|
12068
|
+
10 咕咕币 + 1000 金币 + 10 红晶
|
|
12069
|
+
💝 其他参与者:
|
|
12070
|
+
300 金币 + 3 红晶
|
|
12071
|
+
└── 最低保底奖励,感谢你的参与!
|
|
12072
|
+
注意:红晶只有辛迪加海盗阵营能获得
|
|
12073
|
+
|
|
12074
|
+
🧹 清洁工职业加成:
|
|
12075
|
+
当子代被击败时,清理尸体获得 5 红晶
|
|
12076
|
+
当主宰被击败时,清理尸体获得 10 红晶
|
|
12077
|
+
若击败者(最后一击)为清洁工,则其获得双倍红晶奖励
|
|
12078
|
+
|
|
12079
|
+
|
|
12080
|
+
🌈 精灵双倍祈愿:
|
|
12081
|
+
生效时金币和咕咕币奖励翻倍
|
|
12082
|
+
(需要祈愿有效期内+首次使用)
|
|
12083
|
+
|
|
12084
|
+
💡 特殊说明:
|
|
12085
|
+
1. 奖励自动发放到账户,无需手动领取
|
|
12086
|
+
2. 清洁工职业需加入「辛迪加海盗」阵营并转职
|
|
12087
|
+
3. 精灵双倍祈愿可通过“祈愿”指令概率获得
|
|
12088
|
+
4. 排名根据实际造成伤害计算
|
|
12089
|
+
5. 红晶 = 辛迪加海盗阵营货币,用途广泛
|
|
12090
|
+
`.trim();
|
|
12091
|
+
});
|
|
12092
|
+
ctx.command("ggcevo/祈愿系统").action(({}) => {
|
|
12093
|
+
return `
|
|
12094
|
+
🎋 祈愿系统
|
|
12095
|
+
祈愿是连接星界的神秘仪式,消耗50金币可换取随机祈愿效果!通过智慧与运气的交织,助你在咕咕之战路上突破瓶颈。效果持续7天 ,冷却期间无法再次祈愿。
|
|
12096
|
+
|
|
12097
|
+
🍀 普通祈愿池(95%概率)
|
|
12098
|
+
🦗 蚱蜢优购:下一次购买武器(非传奇)享有20%的折扣
|
|
12099
|
+
🦊 灵狐升运:下一次升级武器享有20%的折扣
|
|
12100
|
+
👑 王权增幅:攻击伤害提高5%
|
|
12101
|
+
🍊 金柚赐福:立即获得250枚金币
|
|
12102
|
+
🪙 夜市赠礼:立即获得5枚咕咕币
|
|
12103
|
+
|
|
12104
|
+
🔮 稀有祈愿池(5%概率)
|
|
12105
|
+
🗡️ 悲鸣之锋:攻击伤害提高10%,武器每等级提高5%伤害
|
|
12106
|
+
🧚 精灵双倍:下一次击败主宰时可获得双倍的金币和咕咕币奖励
|
|
12107
|
+
🐾 喵喵财源:签到获得双倍的金币和咕咕币
|
|
12108
|
+
🎵 暴击韵律:攻击暴击率提高20%
|
|
12109
|
+
⚠️ 酥手空空:立即失去50枚金币(可触发彩蛋)
|
|
12110
|
+
`.trim();
|
|
12111
|
+
});
|
|
12112
|
+
ctx.command("ggcevo/赛季奖励").alias("排名奖励").action(({}) => {
|
|
12113
|
+
return `
|
|
12114
|
+
🏆 赛季排名奖励规则:
|
|
12115
|
+
🥇 第1名:
|
|
12116
|
+
100 咕咕币 + 10000 金币 + 100 红晶 + 🥇赛季冠军勋章
|
|
12117
|
+
🥈 第2名:
|
|
12118
|
+
90 咕咕币 + 9000 金币 + 90 红晶 + 🥈赛季亚军勋章
|
|
12119
|
+
🥉 第3名:
|
|
12120
|
+
80 咕咕币 + 8000 金币 + 80 红晶 + 🥉赛季季军勋章
|
|
12121
|
+
🏅 第4-10名:
|
|
12122
|
+
60 咕咕币 + 6000 金币 + 60 红晶 + 🏅赛季前十勋章
|
|
12123
|
+
🎖 第11-20名:
|
|
12124
|
+
40 咕咕币 + 4000 金币 + 40 红晶 + 🎖赛季前二十勋章
|
|
12125
|
+
💝 参与奖励:
|
|
12126
|
+
▸ 所有积分 > 0 玩家:2000 金币 + 20 红晶
|
|
12127
|
+
▸ 所有积分 ≤ 0 玩家:1000 金币 + 10 红晶
|
|
12128
|
+
(不包含前20名已获得奖励玩家)
|
|
12129
|
+
注意:红晶只有辛迪加海盗阵营能获得
|
|
12130
|
+
|
|
12131
|
+
📦 勋章系统:
|
|
12132
|
+
● 每个勋章对应专属成就
|
|
12133
|
+
● 可永久保存在背包中
|
|
12134
|
+
● 动态赛季名称显示(如:🥇S1赛季冠军勋章)
|
|
12135
|
+
|
|
12136
|
+
📌 重要说明:
|
|
12137
|
+
1. 结算后自动发放所有奖励
|
|
12138
|
+
2. 勋章可通过背包查看
|
|
12139
|
+
3. 每个赛季持续45天
|
|
12140
|
+
`.trim();
|
|
12141
|
+
});
|
|
11830
12142
|
}
|
|
11831
12143
|
__name(apply, "apply");
|
|
11832
12144
|
// Annotate the CommonJS export names for ESM import in node:
|
package/lib/spaceship.d.ts
CHANGED