koishi-plugin-ggcevo-game 1.5.25 → 1.5.27

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 +27 -26
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -6938,8 +6938,8 @@ var spaceship = {
6938
6938
  id: 4,
6939
6939
  description: "巨兽级歼星舰的小型化版本",
6940
6940
  miningbonus: 0,
6941
- explorebonus: 50,
6942
- effect: "探索发生掠夺的概率提高50%;掠夺的收益提高50%",
6941
+ explorebonus: 20,
6942
+ effect: "探索发生掠夺的概率提高50%;掠夺的收益额外提高30%",
6943
6943
  price: 6e3
6944
6944
  }
6945
6945
  };
@@ -7262,7 +7262,7 @@ function apply(ctx, config) {
7262
7262
  startTime: "timestamp",
7263
7263
  galaxy: "string",
7264
7264
  returns: "unsigned",
7265
- plunderbonus: "unsigned",
7265
+ plunderbonus: "integer",
7266
7266
  status: "string"
7267
7267
  }, {
7268
7268
  primary: "handle"
@@ -11424,7 +11424,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11424
11424
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11425
11425
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11426
11426
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
11427
- const name2 = session.userId;
11427
+ const name2 = session.username;
11428
11428
  if (await ctx.database.get("ggcevo_blacklist", { handle }).then((r) => r.length)) {
11429
11429
  return "⛔ 您已被列入黑名单。";
11430
11430
  }
@@ -11448,7 +11448,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11448
11448
  plunderRateBonus = 20;
11449
11449
  } else if (ship.id === 4) {
11450
11450
  plunderRateBonus = 50;
11451
- plunderBonusEffect = 50;
11451
+ plunderBonusEffect = 30;
11452
11452
  }
11453
11453
  }
11454
11454
  }
@@ -11488,10 +11488,9 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11488
11488
  } else if (career.group === "辛迪加海盗" && record.galaxy === "辛迪加星系") {
11489
11489
  successRate += 0.1;
11490
11490
  }
11491
- successRate += shipBonus / 100;
11492
11491
  successRate = Math.min(successRate, 1);
11493
11492
  const isSuccess = Math.random() < successRate;
11494
- let baseCoinReward = Math.floor(Math.random() * 101) + 100;
11493
+ let baseCoinReward = Math.floor(Math.random() * 51) + 50;
11495
11494
  const baseCoinBeforeBonus = baseCoinReward;
11496
11495
  baseCoinReward = Math.floor(baseCoinReward * galaxyData2.bonus);
11497
11496
  const bonusPercent2 = Math.round((galaxyData2.bonus - 1) * 100);
@@ -11502,7 +11501,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11502
11501
  }
11503
11502
  if (shipBonus !== 0) {
11504
11503
  totalBonus += shipBonus;
11505
- bonusEffects.push(`飞船:+${shipBonus}%`);
11504
+ bonusEffects.push(`飞船:金币收益+${shipBonus}%`);
11506
11505
  }
11507
11506
  if (record.plunderbonus) {
11508
11507
  totalBonus += record.plunderbonus;
@@ -11511,16 +11510,16 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11511
11510
  totalBonus += techBonusPercent;
11512
11511
  if (totalTechBonusRate > 0) {
11513
11512
  const careerDesc = careerBonusRate > 0 ? ` (${careerName})` : "";
11514
- bonusEffects.push(`⚙️ 反应堆科技Lv.${techLevel}:+${techBonusPercent.toFixed(0)}%${careerDesc}`);
11513
+ bonusEffects.push(`⚙️ 反应堆科技Lv.${techLevel}:金币收益+${techBonusPercent.toFixed(0)}%${careerDesc}`);
11515
11514
  }
11516
11515
  if (careerCoinBonus > 0) {
11517
11516
  totalBonus += careerCoinBonus;
11518
- bonusEffects.push(`🧑‍🚀 ${careerName}职业:+${careerCoinBonus}%`);
11517
+ bonusEffects.push(`⚙️ ${careerName}职业:金币收益+${careerCoinBonus}%`);
11519
11518
  }
11520
11519
  let finalCoin = baseCoinReward * (1 + totalBonus / 100);
11521
11520
  if (!isSuccess) {
11522
11521
  finalCoin *= 0.5;
11523
- bonusEffects.push("探索失败:-50%");
11522
+ bonusEffects.push("探索失败:奖励-50%");
11524
11523
  }
11525
11524
  finalCoin = Math.floor(finalCoin);
11526
11525
  const [signRecord] = await ctx.database.get("ggcevo_sign", { handle });
@@ -11650,9 +11649,9 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11650
11649
  if (success) {
11651
11650
  let baseReward = 20;
11652
11651
  if (plunderBonusEffect > 0) {
11653
- baseReward *= 1 + plunderBonusEffect / 100;
11652
+ baseReward += plunderBonusEffect;
11654
11653
  }
11655
- playerBonus = Math.round(baseReward);
11654
+ playerBonus = baseReward;
11656
11655
  targetBonus = -20;
11657
11656
  } else {
11658
11657
  playerBonus = -20;
@@ -11665,12 +11664,16 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11665
11664
  galaxy: galaxyName,
11666
11665
  returns: record?.returns || 0,
11667
11666
  plunderbonus: playerBonus,
11667
+ // 掠夺者加成值
11668
11668
  status: "探索中"
11669
11669
  }], ["handle"]);
11670
+ const [targetRecord] = await ctx.database.get("ggcevo_explore", {
11671
+ handle: target.handle
11672
+ });
11670
11673
  await ctx.database.set("ggcevo_explore", { handle: target.handle }, {
11671
- plunderbonus: targetBonus
11674
+ plunderbonus: (targetRecord.plunderbonus || 0) + targetBonus
11672
11675
  });
11673
- return success ? `✅ 掠夺成功!您获得${playerBonus}%金币加成(基础20%${plunderBonusEffect > 0 ? `+飞船加成${plunderBonusEffect}%` : ""})` : `❌ 掠夺失败!您的金币收益被降低了20%。${target.name}获得了20%的金币收益加成。`;
11676
+ return success ? `✅ 掠夺成功!您获得${playerBonus}%金币加成,${target.name}的金币收益被降低了20%。` : `❌ 掠夺失败!您的金币收益被降低20%,${target.name}获得了20%的金币收益加成。`;
11674
11677
  }
11675
11678
  }
11676
11679
  }
@@ -11695,7 +11698,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11695
11698
  bonusInfo.push("辛迪加海盗阵营:成功率+10%");
11696
11699
  }
11697
11700
  if (shipBonus > 0) {
11698
- bonusInfo.push(`飞船加成:成功率+${shipBonus}%`);
11701
+ bonusInfo.push(`飞船:金币收益+${shipBonus}%`);
11699
11702
  }
11700
11703
  if (shipEffect) {
11701
11704
  bonusInfo.push(`飞船效果:${shipEffect}`);
@@ -11711,12 +11714,11 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11711
11714
  bonusInfo.push(`⚙️ 反应堆科技Lv.${techLevel}:金币收益+${techBonusPercent.toFixed(0)}%${careerDesc}`);
11712
11715
  }
11713
11716
  if (careerCoinBonus > 0) {
11714
- bonusInfo.push(`🧑‍🚀 ${careerName}职业:金币收益提高${careerCoinBonus}%`);
11717
+ bonusInfo.push(`🧑‍🚀 ${careerName}职业:金币收益+${careerCoinBonus}%`);
11715
11718
  }
11716
11719
  let estimatedRate = galaxyData.success;
11717
11720
  if (career.group === "人类联盟" && galaxyName === "联盟星系") estimatedRate += 0.1;
11718
11721
  if (career.group === "辛迪加海盗" && galaxyName === "辛迪加星系") estimatedRate += 0.1;
11719
- estimatedRate += shipBonus / 100;
11720
11722
  estimatedRate = Math.min(estimatedRate, 1) * 100;
11721
11723
  return [
11722
11724
  `🚀 开始探索 ${galaxyName}`,
@@ -11741,7 +11743,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11741
11743
  `【${name2}】`,
11742
11744
  `- 价格: ${ship.price}金币`,
11743
11745
  `- 探索加成: +${ship.explorebonus}%成功率`,
11744
- `- 采矿加成: +${ship.miningbonus}%效率`,
11746
+ `- 挖矿加成: +${ship.miningbonus}%效率`,
11745
11747
  `- 特殊效果: ${ship.effect || "无"}`
11746
11748
  ].join("\n");
11747
11749
  });
@@ -11776,7 +11778,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11776
11778
  `🚀 飞船名称:${shipName}`,
11777
11779
  `📝 描述:${ship.description}`,
11778
11780
  `🔭 探索加成:+${ship.explorebonus}%金币`,
11779
- `⛏️ 采矿加成:+${ship.miningbonus}%金币`,
11781
+ `⛏️ 挖矿加成:+${ship.miningbonus}%金币`,
11780
11782
  `💡 特殊效果:${ship.effect || "无"}`,
11781
11783
  `🛒 购买价格:${ship.price}金币`,
11782
11784
  `📅 获得时间:${shipRecord.createTime.toLocaleString("zh-CN", { hour12: false })}`,
@@ -11788,18 +11790,17 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11788
11790
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11789
11791
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11790
11792
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
11791
- const name2 = session.userId;
11792
11793
  const [signRecord] = await ctx.database.get("ggcevo_sign", { handle });
11793
11794
  if (!signRecord) return "⛔ 请先进行至少一次签到获得金币后购买飞船";
11794
11795
  const coins = signRecord.totalRewards;
11795
11796
  if (!shipName) {
11796
- const shipList = Object.keys(spaceship).map((name3) => {
11797
- const ship2 = spaceship[name3];
11797
+ const shipList = Object.keys(spaceship).map((name2) => {
11798
+ const ship2 = spaceship[name2];
11798
11799
  return [
11799
- `【${name3}】`,
11800
+ `【${name2}】`,
11800
11801
  `- 价格: ${ship2.price}金币`,
11801
11802
  `- 探索加成: ${ship2.explorebonus}%`,
11802
- `- 采矿加成: ${ship2.miningbonus}%`,
11803
+ `- 挖矿加成: ${ship2.miningbonus}%`,
11803
11804
  `- 效果: ${ship2.effect || "无"}`
11804
11805
  ].join("\n");
11805
11806
  });
@@ -11847,7 +11848,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11847
11848
  return [
11848
11849
  `🎉 成功购买 ${shipName}!`,
11849
11850
  `🔭 探索加成:+${ship.explorebonus}%金币`,
11850
- `⛏️ 采矿加成:+${ship.miningbonus}%金币`,
11851
+ `⛏️ 挖矿加成:+${ship.miningbonus}%金币`,
11851
11852
  `💡 特殊效果:${ship.effect || "无"}`,
11852
11853
  `📅 购买时间:${now.toLocaleString("zh-CN", { hour12: false })}`,
11853
11854
  `💰 剩余金币:${newCoins}`,
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.5.25",
4
+ "version": "1.5.27",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [