koishi-plugin-ggcevo-game 1.4.91 → 1.4.92

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 +23 -5
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -740,7 +740,7 @@ var syndicatePirateConfig = [
740
740
  },
741
741
  {
742
742
  professionName: "计算机专家",
743
- effect: "黑市订购设备工具类享有50%折扣; 被动应战的PK对战结果为失败时,不会损失金币;每日获得3枚红晶(前日每被PK一次,红晶数量-1,下限为1)",
743
+ effect: "黑市订购设备工具类享有50%折扣; 主动发起的PK胜率提高10%; 每日主动PK次数增加3次;被动PK失败时有50%的概率不损失金币",
744
744
  requirements: "仓库中至少拥有一个黑市订购的设备工具类物品",
745
745
  Jobtransfer: true,
746
746
  costredcrystal: 30
@@ -7609,6 +7609,10 @@ ${items.join("、")}
7609
7609
  const [targetCareer] = await ctx.database.get("ggcevo_careers", {
7610
7610
  handle: targetHandle
7611
7611
  });
7612
+ let dailyPKLimit = config.dailyPKLimit;
7613
+ if (initiatorCareer?.career === "计算机专家") {
7614
+ dailyPKLimit += 3;
7615
+ }
7612
7616
  const validGroups = /* @__PURE__ */ new Set(["人类联盟", "辛迪加海盗"]);
7613
7617
  if (!initiatorCareer?.group || !validGroups.has(initiatorCareer.group)) {
7614
7618
  return "❌ 您尚未加入人类联盟或辛迪加海盗,不能参与PK";
@@ -7726,8 +7730,8 @@ ${protectionList}
7726
7730
  if (!isSameDate(convertUTCtoChinaTime(initiatorPK.lastPK), now)) {
7727
7731
  initiatorPK.todayCount = 0;
7728
7732
  }
7729
- if (initiatorPK.todayCount >= config.dailyPKLimit) {
7730
- return `今日挑战次数已用尽(${config.dailyPKLimit}次/日)。`;
7733
+ if (initiatorPK.todayCount >= dailyPKLimit) {
7734
+ return `今日挑战次数已用尽(${dailyPKLimit}次/日)。`;
7731
7735
  }
7732
7736
  const nowChina = convertUTCtoChinaTime(/* @__PURE__ */ new Date());
7733
7737
  const todayStart = new Date(nowChina);
@@ -7772,6 +7776,10 @@ ${protectionList}
7772
7776
  const powerDiff = initiatorPower - targetPower;
7773
7777
  let winRate = 50 + powerDiff / 100 * 0.1;
7774
7778
  winRate = Math.min(Math.max(winRate, 5), 95);
7779
+ if (initiatorCareer?.career === "计算机专家") {
7780
+ winRate += 10;
7781
+ }
7782
+ winRate = Math.min(Math.max(winRate, 5), 100);
7775
7783
  const randInt = Math.floor(Math.random() * 1e4);
7776
7784
  const winRateInt = Math.floor(winRate * 100);
7777
7785
  const isWin = randInt < winRateInt;
@@ -7790,8 +7798,10 @@ ${protectionList}
7790
7798
  }
7791
7799
  let computerExpertProtection = false;
7792
7800
  if (isWin && targetCareer?.career === "计算机专家") {
7793
- computerExpertProtection = true;
7794
- goldTransfer = 0;
7801
+ if (Math.random() < 0.5) {
7802
+ computerExpertProtection = true;
7803
+ goldTransfer = 0;
7804
+ }
7795
7805
  }
7796
7806
  let hornEffect = false;
7797
7807
  let extraGold = 0;
@@ -7889,6 +7899,14 @@ ${protectionList}
7889
7899
  result.push(`💸 您从口袋里拿出了${goldTransfer}枚金币上交给对方`);
7890
7900
  }
7891
7901
  const bonusEffects = [];
7902
+ if (initiatorCareer?.career === "计算机专家") {
7903
+ const usedCount = initiatorPK.todayCount + 1;
7904
+ bonusEffects.push(
7905
+ `▸ 💻 计算机专家特权:`,
7906
+ ` - 主动PK胜率+10%(最高可至100%)`,
7907
+ ` - 每日挑战次数+3(${usedCount}/${dailyPKLimit})`
7908
+ );
7909
+ }
7892
7910
  if (targetCareer.group === "人类联盟" && isWin) {
7893
7911
  bonusEffects.push(`▸ 🛡️ 人类联盟:应战者PK失败时仅损失1%的金币`);
7894
7912
  }
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.4.91",
4
+ "version": "1.4.92",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [