koishi-plugin-ggcevo-game 1.5.8 → 1.5.9

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 CHANGED
@@ -620,7 +620,12 @@ var initDefaultItems = {
620
620
  "🥈S1赛季亚军勋章": { id: 107, type: "勋章", description: "" },
621
621
  "🥉S1赛季季军勋章": { id: 108, type: "勋章", description: "" },
622
622
  "🏅S1赛季前十勋章": { id: 109, type: "勋章", description: "" },
623
- "🎖S1赛季前二十勋章": { id: 110, type: "勋章", description: "" }
623
+ "🎖S1赛季前二十勋章": { id: 110, type: "勋章", description: "" },
624
+ "🥇S2赛季冠军勋章": { id: 111, type: "勋章", description: "" },
625
+ "🥈S2赛季亚军勋章": { id: 112, type: "勋章", description: "" },
626
+ "🥉S2赛季季军勋章": { id: 113, type: "勋章", description: "" },
627
+ "🏅S2赛季前十勋章": { id: 114, type: "勋章", description: "" },
628
+ "🎖S2赛季前二十勋章": { id: 115, type: "勋章", description: "" }
624
629
  };
625
630
  var itemConfig = {
626
631
  "拾荒者": { quality: "t3", type: "皮肤", cost: 3, isLimited: false },
@@ -4876,7 +4881,7 @@ var wishConfig = {
4876
4881
  },
4877
4882
  {
4878
4883
  name: "王权增幅",
4879
- effect: "伤害+10%"
4884
+ effect: "伤害+5%"
4880
4885
  },
4881
4886
  {
4882
4887
  name: "金柚赐福",
@@ -4957,6 +4962,14 @@ var ggcevoUpdates = [
4957
4962
  - 重制了脉冲干扰和能量消耗的任务要求
4958
4963
  - 新增专属模块:脉冲稳定核心和高压电池
4959
4964
  `.trim()
4965
+ },
4966
+ {
4967
+ version: "1.5.9",
4968
+ time: "2025-06-30",
4969
+ content: `
4970
+ - 赛季奖励中新增辛迪加海盗阵营的排名奖励
4971
+ - 王权增幅祈愿的伤害加成更改为+5%
4972
+ `.trim()
4960
4973
  }
4961
4974
  ];
4962
4975
  function compareVersions(a, b) {
@@ -5865,8 +5878,8 @@ async function calculateWishAdditive(ctx, handle, weapon) {
5865
5878
  endTime: { $gte: /* @__PURE__ */ new Date() }
5866
5879
  });
5867
5880
  if (sovereign) {
5868
- value += 0.1;
5869
- messages.push("👑 王权增幅祈愿:攻击伤害+10%");
5881
+ value += 0.05;
5882
+ messages.push("👑 王权增幅祈愿:攻击伤害+5%");
5870
5883
  }
5871
5884
  const [lament] = await ctx.database.get("ggcevo_wish", {
5872
5885
  handle,
@@ -7289,8 +7302,8 @@ ${itemDetails.join("\n")}`;
7289
7302
  if (extraBonus > 0) {
7290
7303
  redCrystal += extraBonus;
7291
7304
  messages.push(
7292
- `🎖️ 辛迪加财务经理职业:+${redCrystal - extraBonus}枚红晶(基础)
7293
- 红晶储量加成:+${extraBonus}枚`
7305
+ `🎖️ 辛迪加财务经理职业:+${redCrystal - extraBonus}枚红晶
7306
+ 红晶储量加成:额外+${extraBonus}枚红晶`
7294
7307
  );
7295
7308
  } else {
7296
7309
  messages.push(`🎖️ 辛迪加财务经理职业:+${redCrystal}枚红晶`);
@@ -7666,12 +7679,22 @@ ${ticketMessage}${effectMessage}`;
7666
7679
  sort: { rank: "desc" },
7667
7680
  limit: 20
7668
7681
  });
7682
+ const allHandles = [...rankedPlayers.map((p) => p.handle)];
7683
+ const careerData = await ctx.database.get("ggcevo_careers", {
7684
+ handle: { $in: allHandles }
7685
+ });
7686
+ const groupMap = new Map(careerData.map((c) => [c.handle, c.group]));
7669
7687
  let report = `=== ${currentSeason}赛季结算报告 ===
7670
7688
 
7671
7689
  `;
7672
7690
  const rewardDetails = [];
7673
7691
  let positiveCount = 0;
7674
7692
  let negativeCount = 0;
7693
+ let pirateTop3 = 0;
7694
+ let pirateTop10 = 0;
7695
+ let pirateTop20 = 0;
7696
+ let piratePositive = 0;
7697
+ let pirateNegative = 0;
7675
7698
  for (const [index, player] of rankedPlayers.entries()) {
7676
7699
  const rank = index + 1;
7677
7700
  const { coins, gold } = getRewardByRank(index + 1);
@@ -7704,6 +7727,23 @@ ${ticketMessage}${effectMessage}`;
7704
7727
  itemId: medalId,
7705
7728
  quantity: (medalData?.quantity || 0) + 1
7706
7729
  }], ["handle", "itemId"]);
7730
+ const group = groupMap.get(player.handle);
7731
+ if (group === "辛迪加海盗") {
7732
+ let redcrystal = getPirateRedcrystalByRank(rank);
7733
+ const [career] = await ctx.database.get("ggcevo_careers", { handle: player.handle });
7734
+ if (career) {
7735
+ await ctx.database.upsert("ggcevo_careers", [{
7736
+ handle: player.handle,
7737
+ redcrystal: (career.redcrystal || 0) + redcrystal
7738
+ }], ["handle"]);
7739
+ }
7740
+ if (rank <= 3) pirateTop3++;
7741
+ else if (rank <= 10) pirateTop10++;
7742
+ else pirateTop20++;
7743
+ if (rank <= 3) {
7744
+ rewardDetails[rewardDetails.length - 1] += ` (🏴‍☠️海盗专属:${redcrystal}红晶)`;
7745
+ }
7746
+ }
7707
7747
  }
7708
7748
  report += "🏆 精英奖励详情:\n";
7709
7749
  report += rewardDetails.join("\n") + "\n";
@@ -7717,6 +7757,11 @@ ${ticketMessage}${effectMessage}`;
7717
7757
  rankseason: currentSeason,
7718
7758
  handle: { $nin: rankedPlayers.map((p) => p.handle) }
7719
7759
  });
7760
+ const otherHandles = otherPlayers.map((p) => p.handle);
7761
+ const otherCareerData = await ctx.database.get("ggcevo_careers", {
7762
+ handle: { $in: otherHandles }
7763
+ });
7764
+ const otherGroupMap = new Map(otherCareerData.map((c) => [c.handle, c.group]));
7720
7765
  for (const player of otherPlayers) {
7721
7766
  if (player.rank > 0) {
7722
7767
  positiveCount++;
@@ -7726,6 +7771,18 @@ ${ticketMessage}${effectMessage}`;
7726
7771
  handle: player.handle,
7727
7772
  totalRewards: (signData?.totalRewards || 0) + gold
7728
7773
  }], ["handle"]);
7774
+ const group = otherGroupMap.get(player.handle);
7775
+ if (group === "辛迪加海盗") {
7776
+ const redcrystal = 10;
7777
+ piratePositive++;
7778
+ const [career] = await ctx.database.get("ggcevo_careers", { handle: player.handle });
7779
+ if (career) {
7780
+ await ctx.database.upsert("ggcevo_careers", [{
7781
+ handle: player.handle,
7782
+ redcrystal: (career.redcrystal || 0) + redcrystal
7783
+ }], ["handle"]);
7784
+ }
7785
+ }
7729
7786
  } else if (player.rank <= 0) {
7730
7787
  negativeCount++;
7731
7788
  const gold = 500;
@@ -7734,6 +7791,18 @@ ${ticketMessage}${effectMessage}`;
7734
7791
  handle: player.handle,
7735
7792
  totalRewards: (signData?.totalRewards || 0) + gold
7736
7793
  }], ["handle"]);
7794
+ const group = otherGroupMap.get(player.handle);
7795
+ if (group === "辛迪加海盗") {
7796
+ const redcrystal = 5;
7797
+ pirateNegative++;
7798
+ const [career] = await ctx.database.get("ggcevo_careers", { handle: player.handle });
7799
+ if (career) {
7800
+ await ctx.database.upsert("ggcevo_careers", [{
7801
+ handle: player.handle,
7802
+ redcrystal: (career.redcrystal || 0) + redcrystal
7803
+ }], ["handle"]);
7804
+ }
7805
+ }
7737
7806
  }
7738
7807
  }
7739
7808
  report += "🎉 参与奖励发放:\n";
@@ -7742,6 +7811,20 @@ ${ticketMessage}${effectMessage}`;
7742
7811
  report += `✦ 奋斗玩家(分数≤0):${negativeCount}人,每人获得500枚金币
7743
7812
 
7744
7813
  `;
7814
+ if (pirateTop3 > 0 || pirateTop10 > 0 || pirateTop20 > 0 || piratePositive > 0 || pirateNegative > 0) {
7815
+ report += "🏴‍☠️ 辛迪加海盗红晶奖励:\n";
7816
+ if (pirateTop3 > 0) report += `✦ 冠军/亚军/季军:${pirateTop3}人,分别获得50/45/40红晶
7817
+ `;
7818
+ if (pirateTop10 > 0) report += `✦ 第4-10名:${pirateTop10}人,每人30红晶
7819
+ `;
7820
+ if (pirateTop20 > 0) report += `✦ 第11-20名:${pirateTop20}人,每人20红晶
7821
+ `;
7822
+ if (piratePositive > 0) report += `✦ 未入榜积极玩家:${piratePositive}人,每人10红晶
7823
+ `;
7824
+ if (pirateNegative > 0) report += `✦ 未入榜奋斗玩家:${pirateNegative}人,每人5红晶
7825
+
7826
+ `;
7827
+ }
7745
7828
  report += `✅ 总计发放:
7746
7829
  `;
7747
7830
  report += `- 赛季奖励:${rankedPlayers.length}人
@@ -7772,6 +7855,14 @@ ${ticketMessage}${effectMessage}`;
7772
7855
  return "top20";
7773
7856
  }
7774
7857
  __name(getMedalType, "getMedalType");
7858
+ function getPirateRedcrystalByRank(rank) {
7859
+ if (rank === 1) return 50;
7860
+ if (rank === 2) return 45;
7861
+ if (rank === 3) return 40;
7862
+ if (rank <= 10) return 30;
7863
+ return 20;
7864
+ }
7865
+ __name(getPirateRedcrystalByRank, "getPirateRedcrystalByRank");
7775
7866
  });
7776
7867
  ctx.command("ggcevo/排名 [player]", "查询个人排名").alias("rank").usage("输入“排名”查看自己的排名信息").action(async (argv, player) => {
7777
7868
  const session = argv.session;
package/lib/items.d.ts CHANGED
@@ -149,6 +149,31 @@ export declare const initDefaultItems: {
149
149
  type: string;
150
150
  description: string;
151
151
  };
152
+ '\uD83E\uDD47S2\u8D5B\u5B63\u51A0\u519B\u52CB\u7AE0': {
153
+ id: number;
154
+ type: string;
155
+ description: string;
156
+ };
157
+ '\uD83E\uDD48S2\u8D5B\u5B63\u4E9A\u519B\u52CB\u7AE0': {
158
+ id: number;
159
+ type: string;
160
+ description: string;
161
+ };
162
+ '\uD83E\uDD49S2\u8D5B\u5B63\u5B63\u519B\u52CB\u7AE0': {
163
+ id: number;
164
+ type: string;
165
+ description: string;
166
+ };
167
+ '\uD83C\uDFC5S2\u8D5B\u5B63\u524D\u5341\u52CB\u7AE0': {
168
+ id: number;
169
+ type: string;
170
+ description: string;
171
+ };
172
+ '\uD83C\uDF96S2\u8D5B\u5B63\u524D\u4E8C\u5341\u52CB\u7AE0': {
173
+ id: number;
174
+ type: string;
175
+ description: string;
176
+ };
152
177
  };
153
178
  export declare const itemConfig: {
154
179
  拾荒者: {
package/lib/wish.d.ts CHANGED
@@ -7,7 +7,7 @@ export declare const wishConfig: {
7
7
  readonly effect: "下一次升级武器享有20%的折扣";
8
8
  }, {
9
9
  readonly name: "王权增幅";
10
- readonly effect: "伤害+10%";
10
+ readonly effect: "伤害+5%";
11
11
  }, {
12
12
  readonly name: "金柚赐福";
13
13
  readonly effect: "立即获得250枚金币";
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.8",
4
+ "version": "1.5.9",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [