koishi-plugin-ggcevo-game 1.6.60 → 1.6.62

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.
Files changed (2) hide show
  1. package/lib/index.js +61 -29
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -661,7 +661,7 @@ var SyndicatedItems = {
661
661
  price: 0,
662
662
  redCrystalCost: 30,
663
663
  condition: "辛迪加海盗阵营",
664
- effects: "主动发起的PK对战结果为胜利时将获得辛迪加海盗总部发放的等额抢夺金币作为奖励"
664
+ effects: "主动发起的PK对战结果为胜利时将获得辛迪加海盗总部发放的等额抢夺金币作为奖励(最多额外获得200金币)"
665
665
  },
666
666
  "自动采掘机器人": {
667
667
  id: 8,
@@ -1482,7 +1482,7 @@ var bossPool = [
1482
1482
  main: {
1483
1483
  name: "空间站感染虫",
1484
1484
  type: "主宰",
1485
- maxHP: 15e3,
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: 2e4,
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: 1e4,
1712
+ maxHP: 2e4,
1713
1713
  maxShield: 0,
1714
1714
  maxEnergy: 0,
1715
1715
  armor: 5,
@@ -5522,6 +5522,21 @@ var ggcevoUpdates = [
5522
5522
  content: `
5523
5523
  - 新增兑换资源,1张兑换券可以兑换20张资源兑换券
5524
5524
  `.trim()
5525
+ },
5526
+ {
5527
+ version: "1.6.62",
5528
+ time: "2025-08-9",
5529
+ content: `
5530
+ - 削弱辛迪加海盗黑市设备工具“气喇叭”,现在最多额外获得200金币
5531
+ `.trim()
5532
+ },
5533
+ {
5534
+ version: "1.6.61",
5535
+ time: "2025-08-5",
5536
+ content: `
5537
+ - 优化探索掠夺机制,现在相同名称的飞船互相掠夺成功率固定为50%
5538
+ - 修改TX-12S隐形巡洋舰的机制,现在只有当掠夺金币加成≤0时,探索才不会被掠夺
5539
+ `.trim()
5525
5540
  }
5526
5541
  ];
5527
5542
  function compareVersions(a, b) {
@@ -7329,7 +7344,7 @@ var spaceship = {
7329
7344
  description: "TX-12S是标准星际巡洋舰的改型",
7330
7345
  miningbonus: 10,
7331
7346
  explorebonus: 5,
7332
- effect: "探索的成功率提高10%;探索时不会被掠夺",
7347
+ effect: "探索的成功率提高10%;当掠夺金币加成≤0时,探索不会被掠夺",
7333
7348
  price: 1500
7334
7349
  },
7335
7350
  "TX-12A突击巡洋舰": {
@@ -7337,7 +7352,7 @@ var spaceship = {
7337
7352
  description: "TX-12S是标准星际巡洋舰的改型",
7338
7353
  miningbonus: 0,
7339
7354
  explorebonus: 20,
7340
- effect: "探索的成功率提高20%;探索发生掠夺的概率提高10%;掠夺的成功率提高10%",
7355
+ effect: "探索的成功率提高20%;探索发生掠夺的概率提高10%;掠夺其他飞船的成功率提高10%",
7341
7356
  price: 2e3
7342
7357
  },
7343
7358
  "庞兽号歼星舰": {
@@ -7345,7 +7360,7 @@ var spaceship = {
7345
7360
  description: "巨兽级歼星舰的小型化版本",
7346
7361
  miningbonus: 0,
7347
7362
  explorebonus: 30,
7348
- effect: "探索的成功率提高60%;探索发生掠夺的概率提高30%;掠夺的成功率提高30%;被非庞兽号歼星舰掠夺的成功率降低30%",
7363
+ effect: "探索的成功率提高60%;探索发生掠夺的概率提高30%;掠夺其他飞船的成功率提高30%;被非庞兽号歼星舰掠夺的成功率降低30%",
7349
7364
  price: 6e3
7350
7365
  }
7351
7366
  };
@@ -9321,7 +9336,7 @@ ${protectionList}
9321
9336
  });
9322
9337
  if (hornItem && hornItem.quantity > 0) {
9323
9338
  hornEffect = true;
9324
- extraGold = goldTransfer;
9339
+ extraGold = Math.min(goldTransfer, 200);
9325
9340
  }
9326
9341
  }
9327
9342
  await ctx.database.withTransaction(async () => {
@@ -12019,6 +12034,15 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12019
12034
  return "🛠️ 系统维护中,请稍后再试";
12020
12035
  }
12021
12036
  });
12037
+ function getSpaceshipNameById(spaceshipId) {
12038
+ for (const [name2, data] of Object.entries(spaceship)) {
12039
+ if (data.id === spaceshipId) {
12040
+ return name2;
12041
+ }
12042
+ }
12043
+ return "未知飞船型号";
12044
+ }
12045
+ __name(getSpaceshipNameById, "getSpaceshipNameById");
12022
12046
  ctx.command("ggcevo/探索 [galaxyName]").action(async ({ session }, galaxyName) => {
12023
12047
  const Curfew = fixedCurfewCheck(session, config);
12024
12048
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
@@ -12125,10 +12149,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12125
12149
  bonusEffects.push(`▸ 🌌 ${record.galaxy}:金币+${galaxyBonusPercent.toFixed(0)}%`);
12126
12150
  }
12127
12151
  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 = "庞兽号歼星舰";
12152
+ let shipType = shipRecord ? getSpaceshipNameById(shipRecord.id) : "未知飞船";
12132
12153
  if (shipBonus) bonusEffects.push(`▸ 🚀 ${shipType}:金币+${shipBonus}%`);
12133
12154
  if (shipSuccessBonus) bonusEffects.push(`▸ 🛸 ${shipType}:成功率+${Math.round(shipSuccessBonus * 100)}%`);
12134
12155
  }
@@ -12235,7 +12256,6 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12235
12256
  });
12236
12257
  const isRewardModified = finalCoin !== baseCoinReward;
12237
12258
  const coinDisplay = isRewardModified ? `💰 金币 +${finalCoin}(基础值 ${baseCoinReward})` : `💰 金币 +${finalCoin}`;
12238
- const availableItemsDisplay = galaxyData2.available.join("、") || "无";
12239
12259
  const resultMessage = [
12240
12260
  isSuccess ? "🎉 探索成功!" : "⚠️ 探索失败!",
12241
12261
  `🌌 星系:${record.galaxy}`,
@@ -12284,8 +12304,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12284
12304
  const explorers = await ctx.database.get("ggcevo_explore", {
12285
12305
  galaxy: galaxyName,
12286
12306
  status: "探索中",
12287
- handle: { $ne: handle },
12288
- plunderbonus: { $gte: 0 }
12307
+ handle: { $ne: handle }
12289
12308
  });
12290
12309
  if (explorers.length > 0) {
12291
12310
  const shipHandles = explorers.map((e) => e.handle);
@@ -12295,26 +12314,37 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12295
12314
  const shipMap = new Map(ships.map((ship) => [ship.handle, ship.id]));
12296
12315
  const plunderTargets = explorers.filter((explorer) => {
12297
12316
  const shipId = shipMap.get(explorer.handle);
12298
- return shipId !== 2;
12317
+ return !(shipId === 2 && explorer.plunderbonus <= 0);
12299
12318
  });
12300
12319
  if (plunderTargets.length > 0) {
12301
12320
  const target = plunderTargets[Math.floor(Math.random() * plunderTargets.length)];
12321
+ const targetShipId = shipMap.get(target.handle) || 0;
12322
+ const targetShipType = getSpaceshipNameById(targetShipId);
12323
+ const playerShipType = shipRecord ? getSpaceshipNameById(shipRecord.id) : "未知型号";
12302
12324
  let isTargetBehemoth = false;
12303
12325
  let defenseNote = "";
12304
- const [targetShip] = await ctx.database.get("ggcevo_spaceship", { handle: target.handle });
12305
- if (targetShip && targetShip.id === 4) {
12306
- isTargetBehemoth = true;
12307
- }
12308
- let baseSuccessRate = 50;
12309
- if (isBehemoth) baseSuccessRate += 30;
12310
- if (shipRecord?.id === 3) baseSuccessRate += 10;
12311
- if (isTargetBehemoth && !isBehemoth) {
12326
+ if (targetShipId === 4) isTargetBehemoth = true;
12327
+ const sameShipType = shipRecord?.id === targetShipId;
12328
+ let baseSuccessRate = sameShipType ? 50 : (
12329
+ // 修改2:相同型号固定50%
12330
+ isBehemoth ? 80 : (
12331
+ // 庞兽号基础成功率
12332
+ shipRecord?.id === 3 ? 60 : (
12333
+ // 突击巡洋舰
12334
+ 50
12335
+ )
12336
+ )
12337
+ );
12338
+ if (isTargetBehemoth && !isBehemoth && !sameShipType) {
12312
12339
  baseSuccessRate -= 30;
12313
12340
  defenseNote = "⚠️ 目标飞船为庞兽号歼星舰,掠夺成功率降低30%!";
12314
12341
  }
12315
- baseSuccessRate = Math.max(0, Math.min(baseSuccessRate, 100));
12342
+ if (sameShipType) {
12343
+ defenseNote = `⚠️ 检测到相同型号飞船「${playerShipType}」,掠夺成功率固定为50%!`;
12344
+ }
12316
12345
  await session.send([
12317
- `❗ 您在探索过程中发现了【${target.name}】的飞船,是否掠夺?`,
12346
+ `❗ 您在探索过程中发现了【${target.name}】的飞船`,
12347
+ `🚀 对方飞船:${targetShipType}`,
12318
12348
  defenseNote,
12319
12349
  `🎯 掠夺成功率:${baseSuccessRate}%`,
12320
12350
  `⏱️ (30秒内输入"是"来进行掠夺)`
@@ -12322,7 +12352,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12322
12352
  try {
12323
12353
  const response = await session.prompt(3e4);
12324
12354
  if (response === "是") {
12325
- let success = Math.random() < baseSuccessRate / 100;
12355
+ const success = Math.random() < baseSuccessRate / 100;
12326
12356
  let playerBonus, targetBonus;
12327
12357
  if (success) {
12328
12358
  playerBonus = 20;
@@ -12331,13 +12361,15 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12331
12361
  playerBonus = -20;
12332
12362
  targetBonus = 20;
12333
12363
  }
12364
+ const [currentRecord] = await ctx.database.get("ggcevo_explore", { handle });
12334
12365
  await ctx.database.upsert("ggcevo_explore", [{
12335
12366
  handle,
12336
12367
  name: name2,
12337
12368
  startTime: /* @__PURE__ */ new Date(),
12338
12369
  galaxy: galaxyName,
12339
- returns: record?.returns || 0,
12340
- plunderbonus: playerBonus,
12370
+ returns: currentRecord?.returns || 0,
12371
+ plunderbonus: (currentRecord?.plunderbonus || 0) + playerBonus,
12372
+ // 累加加成值
12341
12373
  status: "探索中"
12342
12374
  }], ["handle"]);
12343
12375
  const [targetRecord] = await ctx.database.get("ggcevo_explore", { handle: target.handle });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ggcevo-game",
3
3
  "description": "《星际争霸2》咕咕虫-evolved地图的专属游戏助手插件,集成天梯排行、抽奖系统、签到福利、兑换商城等丰富功能。",
4
- "version": "1.6.60",
4
+ "version": "1.6.62",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [