koishi-plugin-ggcevo-game 1.6.54 → 1.6.56

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 +43 -29
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -2169,7 +2169,7 @@ var BattleEffectProcessor = {
2169
2169
  }
2170
2170
  };
2171
2171
  }, "handleSurvivalInstinctII"),
2172
- // 冷适应处理 - 新增immuneCold标记,并在免疫时清除寒冷层数
2172
+ // 冷适应处理 - 修改版:只要有惧热标签并且寒冷层数>0就清除寒冷层数
2173
2173
  handleColdAdaptation: /* @__PURE__ */ __name(function(targetBoss, weaponName) {
2174
2174
  const messages = [];
2175
2175
  let isImmune = false;
@@ -2181,27 +2181,21 @@ var BattleEffectProcessor = {
2181
2181
  const currentLayers = targetBoss.statusLayers || 0;
2182
2182
  const hasFearHeatTag = targetBoss.tags.includes("惧热") || false;
2183
2183
  const currentColdLayers = targetBoss.coldLayers || 0;
2184
+ if (hasFearHeatTag && currentColdLayers > 0) {
2185
+ if (!targetUpdates) {
2186
+ targetUpdates = {
2187
+ name: targetBoss.name,
2188
+ updates: {}
2189
+ };
2190
+ }
2191
+ targetUpdates.updates.coldLayersChange = -(currentColdLayers + 2);
2192
+ messages.push(`🌬️ 【冷适应】生效:清除全部${currentColdLayers}层寒冷效果`);
2193
+ }
2184
2194
  if (hasFearHeatTag && weaponName === "零度之下") {
2185
2195
  isImmune = true;
2186
2196
  immuneCold = true;
2187
- if (currentColdLayers > 0) {
2188
- if (!targetUpdates) {
2189
- targetUpdates = {
2190
- name: targetBoss.name,
2191
- updates: {}
2192
- };
2193
- }
2194
- targetUpdates.updates.coldLayersChange = -(currentColdLayers + 2);
2195
- messages.push(`🌬️ 【冷适应】生效:清除全部寒冷效果`);
2196
- }
2197
2197
  messages.push(`🌬️ 【冷适应】生效:免疫寒冷伤害`);
2198
- return {
2199
- isImmune,
2200
- immuneCold,
2201
- // 返回新增的免疫标记
2202
- messages,
2203
- targetUpdates
2204
- };
2198
+ return { isImmune, immuneCold, messages, targetUpdates };
2205
2199
  }
2206
2200
  if (currentLayers < 10 && weaponName === "零度之下") {
2207
2201
  const newLayers = currentLayers + 1;
@@ -2209,7 +2203,6 @@ var BattleEffectProcessor = {
2209
2203
  name: targetBoss.name,
2210
2204
  updates: {
2211
2205
  statusLayersChanged: 1
2212
- // 层数+1
2213
2206
  }
2214
2207
  };
2215
2208
  messages.push(`🌬️ 【冷适应】触发:当前${newLayers}层`);
@@ -2218,13 +2211,7 @@ var BattleEffectProcessor = {
2218
2211
  messages.push(`🔥 【冷适应】生效:获得「惧热」标签并免疫寒冷伤害`);
2219
2212
  }
2220
2213
  }
2221
- return {
2222
- isImmune,
2223
- immuneCold,
2224
- // 返回新增的免疫标记
2225
- messages,
2226
- targetUpdates
2227
- };
2214
+ return { isImmune, immuneCold, messages, targetUpdates };
2228
2215
  }, "handleColdAdaptation"),
2229
2216
  // 感染空间站处理(空间站存活时自身减伤50%)
2230
2217
  handleInfectedSpaceStation: /* @__PURE__ */ __name(function(targetBoss, activeBosses) {
@@ -5511,6 +5498,15 @@ var ggcevoUpdates = [
5511
5498
  - 调整了祈愿“​夜市赠礼”和“​喵喵财源”效果
5512
5499
  - 暂时禁用了“兑换赞助物品”指令
5513
5500
  `.trim()
5501
+ },
5502
+ {
5503
+ version: "1.6.55",
5504
+ time: "2025-07-31",
5505
+ content: `
5506
+ - 签到奖励回调了咕咕币奖励
5507
+ - 回调了祈愿“​喵喵财源”效果
5508
+ - 兑换赞助物品新增当前赛季场数要求
5509
+ `.trim()
5514
5510
  }
5515
5511
  ];
5516
5512
  function compareVersions(a, b) {
@@ -7465,7 +7461,7 @@ function apply(ctx, config) {
7465
7461
  initial: false
7466
7462
  }
7467
7463
  }, {
7468
- primary: "handle"
7464
+ primary: ["handle", "rankseason"]
7469
7465
  });
7470
7466
  ctx.model.extend("ggcevo_punishment", {
7471
7467
  id: "unsigned",
@@ -8725,6 +8721,11 @@ ${ticketMessage}${effectMessage}`;
8725
8721
  return `⛔ 您已被列入黑名单。`;
8726
8722
  }
8727
8723
  const currentSeason = config.rankseason;
8724
+ const [seasonRecord] = await ctx.database.get("ggcevo_rank", {
8725
+ handle,
8726
+ rankseason: currentSeason
8727
+ });
8728
+ const seasonMatches = seasonRecord?.matches || 0;
8728
8729
  const backpackItems = await ctx.database.get("ggcevo_backpack", { handle });
8729
8730
  const normalCoupon = backpackItems.find((item) => item.itemId === 2);
8730
8731
  const petCoupons = backpackItems.filter((item) => item.itemId >= 3 && item.itemId <= 6);
@@ -8785,6 +8786,8 @@ ${ticketMessage}${effectMessage}`;
8785
8786
  message += `普通兑奖券: ${normalCoupon?.quantity || 0}张
8786
8787
  `;
8787
8788
  message += `宠物扭蛋券: ${petCouponInfo}
8789
+ `;
8790
+ message += `本赛季场次: ${seasonMatches}场
8788
8791
 
8789
8792
  `;
8790
8793
  message += "请在30秒内输入可兑换物品名称(显示格式:物品名 [剩余/总量]):\n";
@@ -8802,6 +8805,17 @@ ${items.join("、")}
8802
8805
  if (!name2) return "已取消操作,请重新输入。";
8803
8806
  const configname = itemConfig[name2];
8804
8807
  if (!configname) return "无效的物品名称,请重新输入。";
8808
+ const matchesRequirement = {
8809
+ t3: 150,
8810
+ t2: 200,
8811
+ t1: 250,
8812
+ t0: 350
8813
+ };
8814
+ const requiredMatches = matchesRequirement[configname.quality];
8815
+ if (seasonMatches < requiredMatches) {
8816
+ return `❌ 兑换【${name2}】需要在本赛季完成${requiredMatches}场游戏
8817
+ 您当前赛季场次: ${seasonMatches}场(还需${requiredMatches - seasonMatches}场)`;
8818
+ }
8805
8819
  const userRecords = await ctx.database.get("ggcevo_exchange", { handle, item: name2 });
8806
8820
  if (userRecords.length > 0) return "您已经兑换过该物品。";
8807
8821
  if (configname.quantity !== void 0 && (configname.isLimited || config.ignoreGlobalLimit === false)) {
@@ -8821,7 +8835,7 @@ ${items.join("、")}
8821
8835
  );
8822
8836
  let cost = configname.cost;
8823
8837
  let itemId = 2;
8824
- let couponName = "兑奖券";
8838
+ let couponName = "普通兑奖券";
8825
8839
  if (petItems.has(name2)) {
8826
8840
  const specialCoupon = backpackItems.find(
8827
8841
  (item) => item.itemId === qualityMap[configname.quality]
@@ -8856,7 +8870,7 @@ ${items.join("、")}
8856
8870
  });
8857
8871
  });
8858
8872
  return `🎉 恭喜!您使用${cost}个${couponName}兑换了【${name2}】
8859
- ⚠️ 兑换完成后请寻找活动管理登记,否则将无法在游戏中使用!`;
8873
+ ⚠️ 兑换完成后请寻找活动管理员登记,否则将无法在游戏中使用!`;
8860
8874
  } catch (error) {
8861
8875
  console.error("兑换失败:", error);
8862
8876
  return "兑换失败,请稍后再试";
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.54",
4
+ "version": "1.6.56",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [