koishi-plugin-ggcevo-game 1.6.60 → 1.6.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +50 -25
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1482,7 +1482,7 @@ var bossPool = [
|
|
|
1482
1482
|
main: {
|
|
1483
1483
|
name: "空间站感染虫",
|
|
1484
1484
|
type: "主宰",
|
|
1485
|
-
maxHP:
|
|
1485
|
+
maxHP: 2e4,
|
|
1486
1486
|
maxShield: 0,
|
|
1487
1487
|
maxEnergy: 0,
|
|
1488
1488
|
armor: 5,
|
|
@@ -1507,7 +1507,7 @@ var bossPool = [
|
|
|
1507
1507
|
{
|
|
1508
1508
|
name: "空间站哨枪塔",
|
|
1509
1509
|
type: "子代",
|
|
1510
|
-
maxHP:
|
|
1510
|
+
maxHP: 3e4,
|
|
1511
1511
|
maxShield: 0,
|
|
1512
1512
|
maxEnergy: 0,
|
|
1513
1513
|
armor: 6.5,
|
|
@@ -1709,7 +1709,7 @@ var bossPool = [
|
|
|
1709
1709
|
main: {
|
|
1710
1710
|
name: "虫群女王",
|
|
1711
1711
|
type: "主宰",
|
|
1712
|
-
maxHP:
|
|
1712
|
+
maxHP: 2e4,
|
|
1713
1713
|
maxShield: 0,
|
|
1714
1714
|
maxEnergy: 0,
|
|
1715
1715
|
armor: 5,
|
|
@@ -5522,6 +5522,14 @@ var ggcevoUpdates = [
|
|
|
5522
5522
|
content: `
|
|
5523
5523
|
- 新增兑换资源,1张兑换券可以兑换20张资源兑换券
|
|
5524
5524
|
`.trim()
|
|
5525
|
+
},
|
|
5526
|
+
{
|
|
5527
|
+
version: "1.6.61",
|
|
5528
|
+
time: "2025-08-5",
|
|
5529
|
+
content: `
|
|
5530
|
+
- 优化探索掠夺机制,现在相同名称的飞船互相掠夺成功率固定为50%
|
|
5531
|
+
- 修改TX-12S隐形巡洋舰的机制,现在只有当掠夺金币加成≤0时,探索才不会被掠夺
|
|
5532
|
+
`.trim()
|
|
5525
5533
|
}
|
|
5526
5534
|
];
|
|
5527
5535
|
function compareVersions(a, b) {
|
|
@@ -7329,7 +7337,7 @@ var spaceship = {
|
|
|
7329
7337
|
description: "TX-12S是标准星际巡洋舰的改型",
|
|
7330
7338
|
miningbonus: 10,
|
|
7331
7339
|
explorebonus: 5,
|
|
7332
|
-
effect: "探索的成功率提高10
|
|
7340
|
+
effect: "探索的成功率提高10%;当掠夺金币加成≤0时,探索不会被掠夺",
|
|
7333
7341
|
price: 1500
|
|
7334
7342
|
},
|
|
7335
7343
|
"TX-12A突击巡洋舰": {
|
|
@@ -12019,6 +12027,15 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
12019
12027
|
return "🛠️ 系统维护中,请稍后再试";
|
|
12020
12028
|
}
|
|
12021
12029
|
});
|
|
12030
|
+
function getSpaceshipNameById(spaceshipId) {
|
|
12031
|
+
for (const [name2, data] of Object.entries(spaceship)) {
|
|
12032
|
+
if (data.id === spaceshipId) {
|
|
12033
|
+
return name2;
|
|
12034
|
+
}
|
|
12035
|
+
}
|
|
12036
|
+
return "未知飞船型号";
|
|
12037
|
+
}
|
|
12038
|
+
__name(getSpaceshipNameById, "getSpaceshipNameById");
|
|
12022
12039
|
ctx.command("ggcevo/探索 [galaxyName]").action(async ({ session }, galaxyName) => {
|
|
12023
12040
|
const Curfew = fixedCurfewCheck(session, config);
|
|
12024
12041
|
if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
|
|
@@ -12125,10 +12142,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
12125
12142
|
bonusEffects.push(`▸ 🌌 ${record.galaxy}:金币+${galaxyBonusPercent.toFixed(0)}%`);
|
|
12126
12143
|
}
|
|
12127
12144
|
if (shipBonus || shipSuccessBonus) {
|
|
12128
|
-
let shipType = "";
|
|
12129
|
-
if (shipRecord.id === 2) shipType = "TX-12S隐形巡洋舰";
|
|
12130
|
-
else if (shipRecord.id === 3) shipType = "TX-12A突击巡洋舰";
|
|
12131
|
-
else if (shipRecord.id === 4) shipType = "庞兽号歼星舰";
|
|
12145
|
+
let shipType = shipRecord ? getSpaceshipNameById(shipRecord.id) : "未知飞船";
|
|
12132
12146
|
if (shipBonus) bonusEffects.push(`▸ 🚀 ${shipType}:金币+${shipBonus}%`);
|
|
12133
12147
|
if (shipSuccessBonus) bonusEffects.push(`▸ 🛸 ${shipType}:成功率+${Math.round(shipSuccessBonus * 100)}%`);
|
|
12134
12148
|
}
|
|
@@ -12235,7 +12249,6 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
12235
12249
|
});
|
|
12236
12250
|
const isRewardModified = finalCoin !== baseCoinReward;
|
|
12237
12251
|
const coinDisplay = isRewardModified ? `💰 金币 +${finalCoin}(基础值 ${baseCoinReward})` : `💰 金币 +${finalCoin}`;
|
|
12238
|
-
const availableItemsDisplay = galaxyData2.available.join("、") || "无";
|
|
12239
12252
|
const resultMessage = [
|
|
12240
12253
|
isSuccess ? "🎉 探索成功!" : "⚠️ 探索失败!",
|
|
12241
12254
|
`🌌 星系:${record.galaxy}`,
|
|
@@ -12284,8 +12297,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
12284
12297
|
const explorers = await ctx.database.get("ggcevo_explore", {
|
|
12285
12298
|
galaxy: galaxyName,
|
|
12286
12299
|
status: "探索中",
|
|
12287
|
-
handle: { $ne: handle }
|
|
12288
|
-
plunderbonus: { $gte: 0 }
|
|
12300
|
+
handle: { $ne: handle }
|
|
12289
12301
|
});
|
|
12290
12302
|
if (explorers.length > 0) {
|
|
12291
12303
|
const shipHandles = explorers.map((e) => e.handle);
|
|
@@ -12295,26 +12307,37 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
12295
12307
|
const shipMap = new Map(ships.map((ship) => [ship.handle, ship.id]));
|
|
12296
12308
|
const plunderTargets = explorers.filter((explorer) => {
|
|
12297
12309
|
const shipId = shipMap.get(explorer.handle);
|
|
12298
|
-
return shipId
|
|
12310
|
+
return !(shipId === 2 && explorer.plunderbonus <= 0);
|
|
12299
12311
|
});
|
|
12300
12312
|
if (plunderTargets.length > 0) {
|
|
12301
12313
|
const target = plunderTargets[Math.floor(Math.random() * plunderTargets.length)];
|
|
12314
|
+
const targetShipId = shipMap.get(target.handle) || 0;
|
|
12315
|
+
const targetShipType = getSpaceshipNameById(targetShipId);
|
|
12316
|
+
const playerShipType = shipRecord ? getSpaceshipNameById(shipRecord.id) : "未知型号";
|
|
12302
12317
|
let isTargetBehemoth = false;
|
|
12303
12318
|
let defenseNote = "";
|
|
12304
|
-
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
|
|
12311
|
-
|
|
12319
|
+
if (targetShipId === 4) isTargetBehemoth = true;
|
|
12320
|
+
const sameShipType = shipRecord?.id === targetShipId;
|
|
12321
|
+
let baseSuccessRate = sameShipType ? 50 : (
|
|
12322
|
+
// 修改2:相同型号固定50%
|
|
12323
|
+
isBehemoth ? 80 : (
|
|
12324
|
+
// 庞兽号基础成功率
|
|
12325
|
+
shipRecord?.id === 3 ? 60 : (
|
|
12326
|
+
// 突击巡洋舰
|
|
12327
|
+
50
|
|
12328
|
+
)
|
|
12329
|
+
)
|
|
12330
|
+
);
|
|
12331
|
+
if (isTargetBehemoth && !isBehemoth && !sameShipType) {
|
|
12312
12332
|
baseSuccessRate -= 30;
|
|
12313
12333
|
defenseNote = "⚠️ 目标飞船为庞兽号歼星舰,掠夺成功率降低30%!";
|
|
12314
12334
|
}
|
|
12315
|
-
|
|
12335
|
+
if (sameShipType) {
|
|
12336
|
+
defenseNote = `⚠️ 检测到相同型号飞船「${playerShipType}」,掠夺成功率固定为50%!`;
|
|
12337
|
+
}
|
|
12316
12338
|
await session.send([
|
|
12317
|
-
`❗ 您在探索过程中发现了【${target.name}
|
|
12339
|
+
`❗ 您在探索过程中发现了【${target.name}】的飞船`,
|
|
12340
|
+
`🚀 对方飞船:${targetShipType}`,
|
|
12318
12341
|
defenseNote,
|
|
12319
12342
|
`🎯 掠夺成功率:${baseSuccessRate}%`,
|
|
12320
12343
|
`⏱️ (30秒内输入"是"来进行掠夺)`
|
|
@@ -12322,7 +12345,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
12322
12345
|
try {
|
|
12323
12346
|
const response = await session.prompt(3e4);
|
|
12324
12347
|
if (response === "是") {
|
|
12325
|
-
|
|
12348
|
+
const success = Math.random() < baseSuccessRate / 100;
|
|
12326
12349
|
let playerBonus, targetBonus;
|
|
12327
12350
|
if (success) {
|
|
12328
12351
|
playerBonus = 20;
|
|
@@ -12331,13 +12354,15 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
12331
12354
|
playerBonus = -20;
|
|
12332
12355
|
targetBonus = 20;
|
|
12333
12356
|
}
|
|
12357
|
+
const [currentRecord] = await ctx.database.get("ggcevo_explore", { handle });
|
|
12334
12358
|
await ctx.database.upsert("ggcevo_explore", [{
|
|
12335
12359
|
handle,
|
|
12336
12360
|
name: name2,
|
|
12337
12361
|
startTime: /* @__PURE__ */ new Date(),
|
|
12338
12362
|
galaxy: galaxyName,
|
|
12339
|
-
returns:
|
|
12340
|
-
plunderbonus: playerBonus,
|
|
12363
|
+
returns: currentRecord?.returns || 0,
|
|
12364
|
+
plunderbonus: (currentRecord?.plunderbonus || 0) + playerBonus,
|
|
12365
|
+
// 累加加成值
|
|
12341
12366
|
status: "探索中"
|
|
12342
12367
|
}], ["handle"]);
|
|
12343
12368
|
const [targetRecord] = await ctx.database.get("ggcevo_explore", { handle: target.handle });
|