koishi-plugin-ggcevo-game 1.6.34 → 1.6.36

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.d.ts CHANGED
@@ -17,6 +17,7 @@ export interface Config {
17
17
  unlimitedBossAttack: boolean;
18
18
  pointBonusEnabled: boolean;
19
19
  enableViolationAlert: boolean;
20
+ enableCurfew: boolean;
20
21
  }
21
22
  export declare const Config: Schema<Config>;
22
23
  export declare function apply(ctx: Context, config: Config): void;
package/lib/index.js CHANGED
@@ -468,7 +468,7 @@ var weaponConfig = {
468
468
  damage: 90,
469
469
  armorDamageReduction: 0,
470
470
  description: "一件传奇武器",
471
- specialeffect: "无法暴击;每次攻击时有20%的概率造成核爆,额外造成50%的伤害,连续攻击每次提升5%概率",
471
+ specialeffect: "无法暴击;每次攻击时有20%的概率造成核爆,额外造成50%的伤害",
472
472
  price: 6400,
473
473
  redCrystalCost: 200,
474
474
  isantiair: true,
@@ -854,7 +854,7 @@ var syndicatePirateConfig = [
854
854
  effect: "每日签到能额外获得5枚红晶",
855
855
  requirements: "当月累计签到14天及以上",
856
856
  Jobtransfer: true,
857
- costredcrystal: 40
857
+ costredcrystal: 20
858
858
  },
859
859
  {
860
860
  professionName: "计算机专家",
@@ -3951,7 +3951,7 @@ var BattleEffectProcessor = {
3951
3951
  let fusionExplosionTriggered = false;
3952
3952
  if (weaponName !== "核聚变重炮") return null;
3953
3953
  const currentCombo = equippedWeapon?.comboCount || 0;
3954
- const fusionTriggerProbability = 0.2 + currentCombo * 0.05;
3954
+ const fusionTriggerProbability = 0.2 + currentCombo * 0;
3955
3955
  if (Math.random() < fusionTriggerProbability) {
3956
3956
  fusionExplosionTriggered = true;
3957
3957
  messages.push(`💥 【核聚变爆炸】触发:额外造成50%伤害`);
@@ -5460,6 +5460,17 @@ var ggcevoUpdates = [
5460
5460
  - 修改“兑换”指令,更改为“兑换赞助物品”,并且优化了显示信息
5461
5461
  - 暂时关闭了“兑换金币”和“兑换红晶”
5462
5462
  `.trim()
5463
+ },
5464
+ {
5465
+ version: "1.6.35",
5466
+ time: "2025-07-17",
5467
+ content: `
5468
+ - 下调了辛迪加财务的转职所需红晶
5469
+ - 削弱了核聚变重炮的武器效果
5470
+ - 调整了击败奖励
5471
+ - 增加了签到验证机制(需近3日内玩过地图)
5472
+ - 增加了宵禁机制(夜间18:00-24:00将无法在群聊中使用咕咕之战功能,可私聊使用)
5473
+ `.trim()
5463
5474
  }
5464
5475
  ];
5465
5476
  function compareVersions(a, b) {
@@ -6282,6 +6293,17 @@ var GUESSING_ITEMS = [
6282
6293
  // 可以继续添加更多竞猜项目
6283
6294
  // { id: 2, description: '其他竞猜项目', odds: 2.5, status: 'closed' },
6284
6295
  ];
6296
+ function fixedCurfewCheck(session, config) {
6297
+ if (!config.enableCurfew || session.isDirect) return true;
6298
+ const now = /* @__PURE__ */ new Date();
6299
+ const hours = now.getUTCHours() + 8;
6300
+ const currentHour = hours >= 24 ? hours - 24 : hours;
6301
+ if (currentHour >= 18 && currentHour < 24) {
6302
+ return false;
6303
+ }
6304
+ return true;
6305
+ }
6306
+ __name(fixedCurfewCheck, "fixedCurfewCheck");
6285
6307
 
6286
6308
  // src/boss/damagecalculation.ts
6287
6309
  async function calculateTotalDamage(ctx, session, config, equippedWeapon, targetBoss, careerData) {
@@ -6588,11 +6610,11 @@ async function handleBossDefeatRewards(ctx, targetBoss) {
6588
6610
  damageRecords.forEach((record, index) => {
6589
6611
  const rank = index + 1;
6590
6612
  let coupons = 0;
6591
- if (rank === 1) coupons = 50;
6592
- else if (rank === 2) coupons = 45;
6593
- else if (rank === 3) coupons = 40;
6594
- else if (rank <= 10) coupons = 30;
6595
- else if (rank <= 20) coupons = 20;
6613
+ if (rank === 1) coupons = 35;
6614
+ else if (rank === 2) coupons = 30;
6615
+ else if (rank === 3) coupons = 25;
6616
+ else if (rank <= 10) coupons = 20;
6617
+ else if (rank <= 20) coupons = 15;
6596
6618
  else if (rank <= 50) coupons = 10;
6597
6619
  else coupons = 5;
6598
6620
  const hasDoubleWish = doubleWishHandles.has(record.handle);
@@ -7295,7 +7317,8 @@ var inject = {
7295
7317
  var Config = import_koishi.Schema.intersect([
7296
7318
  // 基础配置组
7297
7319
  import_koishi.Schema.object({
7298
- proxyAgent: import_koishi.Schema.string().description("代理服务器地址")
7320
+ proxyAgent: import_koishi.Schema.string().description("代理服务器地址"),
7321
+ enableCurfew: import_koishi.Schema.boolean().description("是否开启宵禁模式(18:00-24:00禁止群聊指令)").default(false)
7299
7322
  }).description("基础设置"),
7300
7323
  // 赛季与兑换配置组
7301
7324
  import_koishi.Schema.object({
@@ -7969,6 +7992,24 @@ ${itemDetails.join("\n")}`;
7969
7992
  return `您今天已经签到过了!本月累计签到${record.monthlyDays}天。`;
7970
7993
  }
7971
7994
  }
7995
+ const threeDaysAgo = new Date(now.getTime() - 3 * 24 * 60 * 60 * 1e3);
7996
+ try {
7997
+ const requestOptions = config.proxyAgent ? { proxyAgent: config.proxyAgent } : void 0;
7998
+ const matchData = await ctx.http.get(
7999
+ `https://api.sc2arcade.com/profiles/${regionId}/${realmId}/${profileId}/matches?orderDirection=desc`,
8000
+ requestOptions
8001
+ );
8002
+ const hasRecentPlay = matchData.results.some((match) => {
8003
+ const matchDate = new Date(match.date);
8004
+ return matchDate >= threeDaysAgo;
8005
+ });
8006
+ if (!hasRecentPlay) {
8007
+ return "🚫 需要最近3天内游玩过至少1次游戏才能签到。";
8008
+ }
8009
+ } catch (apiError) {
8010
+ console.error("游戏记录API请求失败:", apiError);
8011
+ return "⚠️ 无法验证游戏记录,请稍后重试。";
8012
+ }
7972
8013
  let monthlyDays = 1;
7973
8014
  if (record) {
7974
8015
  const lastSignChina = convertUTCtoChinaTime(record.lastSign);
@@ -8594,8 +8635,6 @@ ${ticketMessage}${effectMessage}`;
8594
8635
  `审核人: ${item.reviewer}`
8595
8636
  ];
8596
8637
  let finalText = baseInfo.join("\n");
8597
- if (item.comment) finalText += `
8598
- 备注: ${item.comment}`;
8599
8638
  return finalText;
8600
8639
  }).join("\n------------------------------\n");
8601
8640
  return [
@@ -8937,6 +8976,8 @@ ${items.join("、")}
8937
8976
  ctx.command("ggcevo/pk [user]", "发起玩家对战").alias("挑战").action(async (argv, user) => {
8938
8977
  try {
8939
8978
  const session = argv.session;
8979
+ const Curfew = fixedCurfewCheck(session, config);
8980
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
8940
8981
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
8941
8982
  if (!profile) return "🔒 需要先绑定游戏句柄。";
8942
8983
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9318,6 +9359,8 @@ ${protectionList}
9318
9359
  ].join("\n");
9319
9360
  });
9320
9361
  ctx.command("ggcevo/武器库 [category]").usage('输入"武器库"查看类型,或"武器库 类型"查看详细武器信息').action(async ({ session }, category) => {
9362
+ const Curfew = fixedCurfewCheck(session, config);
9363
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9321
9364
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9322
9365
  if (!profile) return "⚠️ 需要先绑定游戏句柄";
9323
9366
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9461,6 +9504,8 @@ ${displayDiscounts.join("\n")}` : "",
9461
9504
  ].filter(Boolean).join("\n");
9462
9505
  });
9463
9506
  ctx.command("ggcevo/爆破库 [type]").usage("输入“爆破库”查看分类,或“爆破库 类型”查看详细物品").action(async ({ session }, type) => {
9507
+ const Curfew = fixedCurfewCheck(session, config);
9508
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9464
9509
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9465
9510
  if (!profile) return "⚠️ 需要先绑定游戏句柄";
9466
9511
  const filteredItems = Object.values(SyndicatedItems).filter(
@@ -9508,6 +9553,8 @@ ${validTypes.join("、")}`;
9508
9553
  ].join("\n");
9509
9554
  });
9510
9555
  ctx.command("ggcevo/购买 <item>").action(async ({ session }, item) => {
9556
+ const Curfew = fixedCurfewCheck(session, config);
9557
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9511
9558
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9512
9559
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9513
9560
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9515,15 +9562,15 @@ ${validTypes.join("、")}`;
9515
9562
  if (existingEntries.length > 0) return "⛔ 您已被列入黑名单。";
9516
9563
  const allItems = { ...weaponConfig, ...SyndicatedItems };
9517
9564
  if (!item) return '请输入"购买 物品名称"来购买所需物品。';
9518
- const config2 = allItems[item];
9519
- if (!config2) return "无效的物品名称,请重新输入。";
9520
- if (config2.price <= 0) return "❌ 该物品不可直接购买";
9521
- const isWeapon = ["能量武器", "热能武器", "实弹武器", "传奇武器"].includes(config2.category);
9522
- const isLegendaryWeapon = config2.category === "传奇武器";
9565
+ const itemconfig = allItems[item];
9566
+ if (!itemconfig) return "无效的物品名称,请重新输入。";
9567
+ if (itemconfig.price <= 0) return "❌ 该物品不可直接购买";
9568
+ const isWeapon = ["能量武器", "热能武器", "实弹武器", "传奇武器"].includes(itemconfig.category);
9569
+ const isLegendaryWeapon = itemconfig.category === "传奇武器";
9523
9570
  if (isWeapon) {
9524
9571
  const existingWeapon = await ctx.database.get("ggcevo_weapons", {
9525
9572
  handle,
9526
- weaponId: config2.id
9573
+ weaponId: itemconfig.id
9527
9574
  });
9528
9575
  if (existingWeapon.length > 0) return `❌ 您已经拥有${item},无法重复购买`;
9529
9576
  }
@@ -9563,10 +9610,10 @@ ${validTypes.join("、")}`;
9563
9610
  const techLevel = weaponTech?.level || 0;
9564
9611
  const techConfigData = Spacestationtechnology.find((tech) => tech.techId === 2);
9565
9612
  if (!isLegendaryWeapon && playerGroup === "人类联盟" && techLevel > 0 && techConfigData) {
9566
- if (config2.level && config2.level <= techLevel) {
9613
+ if (itemconfig.level && itemconfig.level <= techLevel) {
9567
9614
  const isCareerBonus = techConfigData.careerNames.includes(playerCareer);
9568
9615
  totalDiscount += 25;
9569
- discountDetails.push(`▸ 🔧 武器系统Lv${techLevel}: ${isCareerBonus ? "50%" : "25%"}折扣 (适用${romanLevels[config2.level]}类武器)`);
9616
+ discountDetails.push(`▸ 🔧 武器系统Lv${techLevel}: ${isCareerBonus ? "50%" : "25%"}折扣 (适用${romanLevels[itemconfig.level]}类武器)`);
9570
9617
  if (isCareerBonus) {
9571
9618
  totalDiscount += 25;
9572
9619
  }
@@ -9598,15 +9645,15 @@ ${validTypes.join("、")}`;
9598
9645
  }
9599
9646
  }
9600
9647
  totalDiscount = Math.min(totalDiscount, 100);
9601
- let actualPrice = config2.price;
9648
+ let actualPrice = itemconfig.price;
9602
9649
  if (totalDiscount > 0) {
9603
- actualPrice = Math.floor(config2.price * (100 - totalDiscount) / 100);
9650
+ actualPrice = Math.floor(itemconfig.price * (100 - totalDiscount) / 100);
9604
9651
  actualPrice = Math.max(actualPrice, 1);
9605
9652
  }
9606
9653
  if ((signInfo?.totalRewards || 0) < actualPrice) {
9607
9654
  let priceInfo = `需要 ${actualPrice} 金币`;
9608
9655
  if (discountDetails.length > 0) {
9609
- priceInfo += ` (原价${config2.price})`;
9656
+ priceInfo += ` (原价${itemconfig.price})`;
9610
9657
  }
9611
9658
  return `❌ 金币不足,${priceInfo}`;
9612
9659
  }
@@ -9634,7 +9681,7 @@ ${validTypes.join("、")}`;
9634
9681
  if (isWeapon) {
9635
9682
  await ctx.database.upsert("ggcevo_weapons", [{
9636
9683
  handle,
9637
- weaponId: config2.id,
9684
+ weaponId: itemconfig.id,
9638
9685
  level: 0,
9639
9686
  modificationSlots: 1,
9640
9687
  equipped: false,
@@ -9645,7 +9692,7 @@ ${validTypes.join("、")}`;
9645
9692
  if (equippedCount === 0) {
9646
9693
  await ctx.database.set(
9647
9694
  "ggcevo_weapons",
9648
- { handle, weaponId: config2.id },
9695
+ { handle, weaponId: itemconfig.id },
9649
9696
  { equipped: true }
9650
9697
  );
9651
9698
  isAutoEquipped = true;
@@ -9653,11 +9700,11 @@ ${validTypes.join("、")}`;
9653
9700
  } else {
9654
9701
  const [existing] = await ctx.database.get("ggcevo_warehouse", {
9655
9702
  handle,
9656
- itemId: config2.id
9703
+ itemId: itemconfig.id
9657
9704
  });
9658
9705
  await ctx.database.upsert("ggcevo_warehouse", [{
9659
9706
  handle,
9660
- itemId: config2.id,
9707
+ itemId: itemconfig.id,
9661
9708
  quantity: (existing?.quantity || 0) + 1
9662
9709
  }], ["handle", "itemId"]);
9663
9710
  }
@@ -9665,7 +9712,7 @@ ${validTypes.join("、")}`;
9665
9712
  let message = `✅ 成功购买${isWeapon ? "武器" : "物品"}「${item}」
9666
9713
  `;
9667
9714
  if (discountDetails.length > 0) {
9668
- message += `花费 ${actualPrice} 金币 (原价${config2.price} 金币)`;
9715
+ message += `花费 ${actualPrice} 金币 (原价${itemconfig.price} 金币)`;
9669
9716
  message += `
9670
9717
  💰 折扣明细:
9671
9718
  ${discountDetails.join("\n")}`;
@@ -9687,13 +9734,15 @@ ${discountDetails.join("\n")}`;
9687
9734
  }
9688
9735
  message += "\n输入「武器仓库」查看详情";
9689
9736
  } else {
9690
- const [current] = await ctx.database.get("ggcevo_warehouse", { handle, itemId: config2.id });
9737
+ const [current] = await ctx.database.get("ggcevo_warehouse", { handle, itemId: itemconfig.id });
9691
9738
  message += `
9692
9739
  当前持有数量:${current?.quantity || 1},输入「仓库」查看物品`;
9693
9740
  }
9694
9741
  return message;
9695
9742
  });
9696
9743
  ctx.command("ggcevo/武器仓库").action(async ({ session }) => {
9744
+ const Curfew = fixedCurfewCheck(session, config);
9745
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9697
9746
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9698
9747
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9699
9748
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9730,6 +9779,8 @@ ${discountDetails.join("\n")}`;
9730
9779
  ].join("\n");
9731
9780
  });
9732
9781
  ctx.command("ggcevo/装备武器 <weapon>").alias("装备").action(async ({ session }, weapon) => {
9782
+ const Curfew = fixedCurfewCheck(session, config);
9783
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9733
9784
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9734
9785
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9735
9786
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9739,10 +9790,10 @@ ${discountDetails.join("\n")}`;
9739
9790
  }
9740
9791
  if (!weapon) return "请输入“装备武器 武器名称”来装备一把你拥有的武器。";
9741
9792
  if (!weaponConfig[weapon]) return "武器名称错误,请输入“装备武器 武器名称”来装备一把你拥有的武器。";
9742
- const config2 = weaponConfig[weapon];
9793
+ const itemconfig = weaponConfig[weapon];
9743
9794
  const [owned] = await ctx.database.get("ggcevo_weapons", {
9744
9795
  handle,
9745
- weaponId: config2.id
9796
+ weaponId: itemconfig.id
9746
9797
  });
9747
9798
  if (!owned) return "您尚未获得该武器。";
9748
9799
  await ctx.database.withTransaction(async () => {
@@ -9750,20 +9801,22 @@ ${discountDetails.join("\n")}`;
9750
9801
  "ggcevo_weapons",
9751
9802
  {
9752
9803
  handle,
9753
- weaponId: { $ne: config2.id }
9804
+ weaponId: { $ne: itemconfig.id }
9754
9805
  // 排除当前武器
9755
9806
  },
9756
9807
  { equipped: false }
9757
9808
  );
9758
9809
  await ctx.database.upsert("ggcevo_weapons", [{
9759
9810
  handle,
9760
- weaponId: config2.id,
9811
+ weaponId: itemconfig.id,
9761
9812
  equipped: true
9762
9813
  }], ["handle", "weaponId"]);
9763
9814
  });
9764
9815
  return `您已成功装备武器 ${weapon}!`;
9765
9816
  });
9766
9817
  ctx.command("ggcevo/升级科技 <target>", "升级空间站科技").action(async ({ session }, target) => {
9818
+ const Curfew = fixedCurfewCheck(session, config);
9819
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9767
9820
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9768
9821
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9769
9822
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9781,6 +9834,8 @@ ${discountDetails.join("\n")}`;
9781
9834
  return handleTechUpgrade(ctx, handle, target);
9782
9835
  });
9783
9836
  ctx.command("ggcevo/升级武器 <target>", "升级武器").alias("升级").action(async ({ session }, target) => {
9837
+ const Curfew = fixedCurfewCheck(session, config);
9838
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9784
9839
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9785
9840
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9786
9841
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9797,6 +9852,8 @@ ${discountDetails.join("\n")}`;
9797
9852
  return handleWeaponUpgrade(ctx, handle, target);
9798
9853
  });
9799
9854
  ctx.command("ggcevo/改装武器 <weapon> [mod]", "安装武器模块").alias("改装").action(async ({ session }, weapon, mod) => {
9855
+ const Curfew = fixedCurfewCheck(session, config);
9856
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9800
9857
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9801
9858
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9802
9859
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9953,6 +10010,8 @@ ${discountDetails.join("\n")}`;
9953
10010
  }
9954
10011
  });
9955
10012
  ctx.command("ggcevo/拆卸 <weapon> <mod>", "卸载武器模块,专属模块返还50%金币,通用模块返还80%金币").action(async ({ session }, weapon, mod) => {
10013
+ const Curfew = fixedCurfewCheck(session, config);
10014
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9956
10015
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9957
10016
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9958
10017
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9975,13 +10034,13 @@ ${discountDetails.join("\n")}`;
9975
10034
  let refundReason;
9976
10035
  if (isRecyclable) {
9977
10036
  refundRate = 1;
9978
- refundReason = "⚠️ 回收模式开启:全额返还金币";
10037
+ refundReason = "ℹ️ 全额返还金币";
9979
10038
  } else if (modInfo.isExclusive) {
9980
10039
  refundRate = 0.5;
9981
- refundReason = "专属模块返还50%";
10040
+ refundReason = "ℹ️ 专属模块返还50%金币";
9982
10041
  } else {
9983
10042
  refundRate = 0.8;
9984
- refundReason = "通用模块返还80%";
10043
+ refundReason = "ℹ️ 通用模块返还80%金币";
9985
10044
  }
9986
10045
  const refund = Math.floor(modInfo.cost * refundRate);
9987
10046
  const newMods = equipment.installedMods.filter((m) => m !== mod);
@@ -9996,18 +10055,21 @@ ${discountDetails.join("\n")}`;
9996
10055
  handle,
9997
10056
  totalRewards: newBalance
9998
10057
  }], ["handle"]);
9999
- return [
10058
+ const responseLines = [
10000
10059
  `✅ 已从 ${weapon} 拆卸 ${mod} 模块`,
10001
- `返还金币:${refund} (原价${modInfo.cost}, ${refundReason})`,
10060
+ refund === modInfo.cost ? `返还金币:${refund}` : `返还金币:${refund} (原价${modInfo.cost})`,
10002
10061
  `当前金币总额:${newBalance}`,
10003
10062
  `剩余模块:${newMods.join(", ") || "无"}`,
10004
- isRecyclable ? "ℹ️ 回收模式模块拆卸返还100%" : modInfo.isExclusive ? "ℹ️ 专属模块拆卸只返还50%" : ""
10005
- ].filter(Boolean).join("\n");
10063
+ refundReason
10064
+ ];
10065
+ return responseLines.filter(Boolean).join("\n");
10006
10066
  });
10007
- ctx.guild().command("ggcevo/攻击 <bossName>").usage("请输入要攻击的异形名称(例如:攻击 异齿猛兽 或 攻击 寒冰王蛇)").action(async (argv, bossName) => {
10067
+ ctx.command("ggcevo/攻击 <bossName>").usage("请输入要攻击的异形名称(例如:攻击 异齿猛兽 或 攻击 寒冰王蛇)").action(async (argv, bossName) => {
10008
10068
  const session = argv.session;
10009
10069
  let bossEventBroadcast = null;
10010
10070
  let cleanerRewardBroadcast = null;
10071
+ const Curfew = fixedCurfewCheck(session, config);
10072
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10011
10073
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10012
10074
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10013
10075
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -10024,8 +10086,7 @@ ${discountDetails.join("\n")}`;
10024
10086
  return `当前没有找到名为 ${bossName} 的可攻击目标。
10025
10087
  请攻击当前存活的异形:${activeNames || "无"}。`;
10026
10088
  }
10027
- const config2 = ctx.config;
10028
- const unlimitedBossAttack = config2.unlimitedBossAttack;
10089
+ const unlimitedBossAttack = config.unlimitedBossAttack;
10029
10090
  if (!unlimitedBossAttack) {
10030
10091
  const lastAttack = await ctx.database.get("ggcevo_boss_damage", { handle });
10031
10092
  if (lastAttack.length > 0) {
@@ -10059,7 +10120,7 @@ ${discountDetails.join("\n")}`;
10059
10120
  ctx,
10060
10121
  session,
10061
10122
  handle,
10062
- config2,
10123
+ config,
10063
10124
  equippedWeapon,
10064
10125
  verifiedBoss,
10065
10126
  activeBosses,
@@ -10078,7 +10139,7 @@ ${discountDetails.join("\n")}`;
10078
10139
  ctx,
10079
10140
  session,
10080
10141
  handle,
10081
- config2,
10142
+ config,
10082
10143
  equippedWeapon,
10083
10144
  verifiedBoss,
10084
10145
  weaponName,
@@ -10191,7 +10252,7 @@ ${discountDetails.join("\n")}`;
10191
10252
  redcrystalMessage
10192
10253
  );
10193
10254
  await session.send(resultMessage);
10194
- const groupId = [...config2.groupId];
10255
+ const groupId = [...config.groupId];
10195
10256
  await handleBroadcasts(
10196
10257
  ctx,
10197
10258
  groupId,
@@ -10202,6 +10263,8 @@ ${discountDetails.join("\n")}`;
10202
10263
  ctx.command("ggcevo/攻击假人 [name]").option("tags", "-t <tags:string> 添加BOSS标签(逗号分隔)").option("passives", "-p <passives:string> 添加被动技能(逗号分隔)").option("hp", "-l <hp:number> 模拟假人血量").option("energy", "-e <energy:number> 模拟假人能量").option("skillStacks", "-s <stacks:number> 技能层数").option("cold", "-c <cold:number> 寒冷层数").option("status", "-a <status:number> 状态层数").option("armor", "-d <armor:number> 护甲").option("burn", "-b <burn:number> 燃烧层数").action(async (argv, name2) => {
10203
10264
  const session = argv.session;
10204
10265
  const { options } = argv;
10266
+ const Curfew = fixedCurfewCheck(session, config);
10267
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10205
10268
  if (!name2) {
10206
10269
  name2 = "测试假人";
10207
10270
  }
@@ -10336,7 +10399,9 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10336
10399
  pageNum < totalPages ? `输入 伤害榜 ${pageNum + 1} 查看下一页` : "已是最后一页"
10337
10400
  ].join("\n");
10338
10401
  });
10339
- ctx.command("ggcevo/异形信息", "查看当前主宰信息").alias("yx信息").action(async () => {
10402
+ ctx.command("ggcevo/异形信息", "查看当前主宰信息").alias("yx信息").action(async ({ session }) => {
10403
+ const Curfew = fixedCurfewCheck(session, config);
10404
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10340
10405
  const activeBosses = await ctx.database.get("ggcevo_boss", { isActive: true });
10341
10406
  if (!activeBosses.length) return "当前没有存活的异形,请等待12点或0点刷新。";
10342
10407
  const mainBoss = activeBosses.find((b) => b.type === "主宰");
@@ -10528,6 +10593,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10528
10593
  });
10529
10594
  ctx.command("ggcevo/祈愿").action(async (argv) => {
10530
10595
  const session = argv.session;
10596
+ const Curfew = fixedCurfewCheck(session, config);
10597
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10531
10598
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10532
10599
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10533
10600
  const { regionId, realmId, profileId } = profile;
@@ -10605,6 +10672,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10605
10672
  ⏳ 效果持续至 ${formattedEndTime}`;
10606
10673
  });
10607
10674
  ctx.command("ggcevo/加入 <faction>", "加入阵营").alias("加入阵营").action(async ({ session }, faction) => {
10675
+ const Curfew = fixedCurfewCheck(session, config);
10676
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10608
10677
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10609
10678
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10610
10679
  const { regionId, realmId, profileId } = profile;
@@ -10669,6 +10738,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10669
10738
  }
10670
10739
  });
10671
10740
  ctx.command("ggcevo/退出", "退出当前阵营").alias("退出阵营").action(async ({ session }) => {
10741
+ const Curfew = fixedCurfewCheck(session, config);
10742
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10672
10743
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10673
10744
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10674
10745
  const { regionId, realmId, profileId } = profile;
@@ -10719,6 +10790,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10719
10790
  }
10720
10791
  });
10721
10792
  ctx.command("ggcevo/转职 [profession]", "转职系统").action(async ({ session }, profession) => {
10793
+ const Curfew = fixedCurfewCheck(session, config);
10794
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10722
10795
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10723
10796
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10724
10797
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -10728,16 +10801,16 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10728
10801
  }
10729
10802
  const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
10730
10803
  if (!careerData) return "请先加入阵营后使用转职功能。";
10731
- let config2;
10804
+ let careerconfig;
10732
10805
  if (careerData.group === "人类联盟") {
10733
- config2 = spaceStationCrewConfig;
10806
+ careerconfig = spaceStationCrewConfig;
10734
10807
  } else if (careerData.group === "辛迪加海盗") {
10735
- config2 = syndicatePirateConfig;
10808
+ careerconfig = syndicatePirateConfig;
10736
10809
  } else {
10737
10810
  return "未知阵营无法显示职业信息。";
10738
10811
  }
10739
10812
  if (!profession) {
10740
- const availableCareers = config2.filter(
10813
+ const availableCareers = careerconfig.filter(
10741
10814
  (p) => p.Jobtransfer && p.professionName !== careerData.career
10742
10815
  );
10743
10816
  const careerList = availableCareers.map((p) => {
@@ -10758,7 +10831,7 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10758
10831
  "💡 转职后原有职业效果将被替换"
10759
10832
  ].join("\n");
10760
10833
  }
10761
- const targetProfession = config2.find((p) => p.professionName === profession);
10834
+ const targetProfession = careerconfig.find((p) => p.professionName === profession);
10762
10835
  if (!targetProfession) return "该职业不存在。";
10763
10836
  if (!targetProfession.Jobtransfer) return "该职业无法直接转职。";
10764
10837
  if (careerData.career === profession) return "您已经是该职业了。";
@@ -10801,6 +10874,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10801
10874
  });
10802
10875
  ctx.command("ggcevo/职业信息", "查看当前阵营与职业状态").action(async ({ session }) => {
10803
10876
  try {
10877
+ const Curfew = fixedCurfewCheck(session, config);
10878
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10804
10879
  const [profile] = await ctx.database.get("sc2arcade_player", {
10805
10880
  userId: session.userId
10806
10881
  });
@@ -10869,6 +10944,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10869
10944
  }
10870
10945
  });
10871
10946
  ctx.command("ggcevo/黑市 [category]", "辛迪加海盗专属黑市").usage('输入"黑市"查看分类,或"黑市 分类名称"查看详细').action(async ({ session }, category) => {
10947
+ const Curfew = fixedCurfewCheck(session, config);
10948
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10872
10949
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10873
10950
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10874
10951
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -10999,6 +11076,8 @@ ${discountDetails.join("\n")}` : "",
10999
11076
  ].filter(Boolean).join("\n");
11000
11077
  });
11001
11078
  ctx.command("ggcevo/订购 <item>").action(async ({ session }, item) => {
11079
+ const Curfew = fixedCurfewCheck(session, config);
11080
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11002
11081
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11003
11082
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11004
11083
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11123,6 +11202,8 @@ ${discountReason}` : "",
11123
11202
  });
11124
11203
  ctx.command("ggcevo/仓库").action(async (argv) => {
11125
11204
  const session = argv.session;
11205
+ const Curfew = fixedCurfewCheck(session, config);
11206
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11126
11207
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11127
11208
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11128
11209
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11178,6 +11259,8 @@ ${discountReason}` : "",
11178
11259
  const session = argv.session;
11179
11260
  let bossEventBroadcast = null;
11180
11261
  let cleanerRewardBroadcast = null;
11262
+ const Curfew = fixedCurfewCheck(session, config);
11263
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11181
11264
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11182
11265
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11183
11266
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11232,6 +11315,8 @@ ${discountReason}` : "",
11232
11315
  }
11233
11316
  });
11234
11317
  ctx.command("ggcevo/科技 [techName]", "查看空间站科技信息").usage("输入“科技”查看列表,或“科技 科技名称”查看详细信息").action(async ({ session }, techName) => {
11318
+ const Curfew = fixedCurfewCheck(session, config);
11319
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11235
11320
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11236
11321
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11237
11322
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11293,6 +11378,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11293
11378
  ].filter(Boolean).join("\n");
11294
11379
  });
11295
11380
  ctx.command("ggcevo/挖矿").action(async ({ session }) => {
11381
+ const Curfew = fixedCurfewCheck(session, config);
11382
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11296
11383
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11297
11384
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11298
11385
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11436,6 +11523,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11436
11523
  return reportLines.join("\n");
11437
11524
  });
11438
11525
  ctx.command("ggcevo/任务 [name]").usage('输入"任务"查看所有任务列表,或"任务 任务名称"查看详细任务信息').action(async ({ session }, name2) => {
11526
+ const Curfew = fixedCurfewCheck(session, config);
11527
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11439
11528
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11440
11529
  if (!profile) return "⚠️ 需要先绑定游戏句柄";
11441
11530
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11490,6 +11579,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11490
11579
  });
11491
11580
  ctx.command("ggcevo/完成任务 <name:text>", "完成指定任务领取奖励").usage('输入"完成任务 任务名称"来完成任务并领取奖励').action(async ({ session }, name2) => {
11492
11581
  try {
11582
+ const Curfew = fixedCurfewCheck(session, config);
11583
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11493
11584
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11494
11585
  if (!profile) return "⚠️ 需要先绑定游戏句柄";
11495
11586
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11565,6 +11656,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11565
11656
  });
11566
11657
  ctx.command("ggcevo/购买保护卡", "花费600金币购买一周PK保护卡").alias("购买pk保护卡").action(async ({ session }) => {
11567
11658
  try {
11659
+ const Curfew = fixedCurfewCheck(session, config);
11660
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11568
11661
  const userId = session.userId;
11569
11662
  const [profile] = await ctx.database.get("sc2arcade_player", { userId });
11570
11663
  if (!profile) return "🔒 请先绑定游戏句柄。";
@@ -11626,6 +11719,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11626
11719
  });
11627
11720
  ctx.command("ggcevo/开启军械库防爆门").alias("打开军械库防爆门").action(async (argv) => {
11628
11721
  const session = argv.session;
11722
+ const Curfew = fixedCurfewCheck(session, config);
11723
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11629
11724
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11630
11725
  if (!profile) return "🔒 请先绑定游戏句柄。";
11631
11726
  const { regionId, realmId, profileId } = profile;
@@ -11676,6 +11771,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11676
11771
  ].join("\n");
11677
11772
  });
11678
11773
  ctx.command("ggcevo/技能 [异形名称]").usage('查询异形技能,输入"技能"查看所有异形,输入"技能 异形名称"查询详细技能').action(async ({ session }, unitName) => {
11774
+ const Curfew = fixedCurfewCheck(session, config);
11775
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11679
11776
  const allUnits = /* @__PURE__ */ new Set();
11680
11777
  bossPool.forEach((boss) => {
11681
11778
  allUnits.add(boss.main.name);
@@ -11766,6 +11863,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11766
11863
  });
11767
11864
  ctx.command("ggcevo/咕咕更新").action(async ({ session }) => {
11768
11865
  try {
11866
+ const Curfew = fixedCurfewCheck(session, config);
11867
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11769
11868
  const latestUpdates = [...ggcevoUpdates].sort((a, b) => compareVersions(a.version, b.version)).slice(0, 3);
11770
11869
  if (latestUpdates.length === 0) {
11771
11870
  return "🛑 暂无更新记录";
@@ -11790,6 +11889,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11790
11889
  }
11791
11890
  });
11792
11891
  ctx.command("ggcevo/探索 [galaxyName]").action(async ({ session }, galaxyName) => {
11892
+ const Curfew = fixedCurfewCheck(session, config);
11893
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11793
11894
  const possibleItems = [
11794
11895
  { id: 2, name: "闪光弹", type: "手榴弹", chance: 0.1 },
11795
11896
  { id: 4, name: "脉冲手雷", type: "手榴弹", chance: 0.1 },
@@ -12154,6 +12255,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12154
12255
  shipIdToName[data.id] = name2;
12155
12256
  }
12156
12257
  ctx.command("ggcevo/飞船信息").action(async ({ session }) => {
12258
+ const Curfew = fixedCurfewCheck(session, config);
12259
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
12157
12260
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12158
12261
  if (!profile) return "🔒 需要先绑定游戏句柄。";
12159
12262
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -12180,6 +12283,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12180
12283
  ].join("\n");
12181
12284
  });
12182
12285
  ctx.command("ggcevo/购买飞船 [shipName]").alias("飞船").action(async ({ session }, shipName) => {
12286
+ const Curfew = fixedCurfewCheck(session, config);
12287
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
12183
12288
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12184
12289
  if (!profile) return "🔒 需要先绑定游戏句柄。";
12185
12290
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -12251,6 +12356,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12251
12356
  ].join("\n");
12252
12357
  });
12253
12358
  ctx.command("ggcevo/升级物品 [itemName]", "升级辛迪加海盗物品").usage('输入"升级物品"查看可升级列表,或"升级物品 物品名称"进行升级').action(async ({ session }, itemName) => {
12359
+ const Curfew = fixedCurfewCheck(session, config);
12360
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
12254
12361
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12255
12362
  if (!profile) return "🔒 需要先绑定游戏句柄。";
12256
12363
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -12387,6 +12494,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12387
12494
  胜点榜基准日: ${now.toLocaleDateString()}`;
12388
12495
  });
12389
12496
  ctx.command("ggcevo/竞猜 [itemId] [amount] [guess]", "参与竞猜游戏").usage('输入"竞猜"查看可竞猜项目,"竞猜 项目ID 金额 内容"进行竞猜').example("竞猜 1 500 寒冰王蛇").action(async ({ session }, itemId, amount, guess) => {
12497
+ const Curfew = fixedCurfewCheck(session, config);
12498
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
12390
12499
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12391
12500
  if (!profile) return "🔒 需要先绑定游戏句柄";
12392
12501
  const { regionId, realmId, profileId } = profile;
@@ -12483,6 +12592,8 @@ ${validBossNames.join("、")}`;
12483
12592
  }
12484
12593
  });
12485
12594
  ctx.command("ggcevo/兑换资源 [name] [amount]").usage('输入"兑换资源"查看可兑换资源列表\n输入"兑换资源 物品名称 [数量]"进行兑换').action(async ({ session }, name2, amount) => {
12595
+ const Curfew = fixedCurfewCheck(session, config);
12596
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
12486
12597
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12487
12598
  if (!profile) return "🔒 需要先绑定游戏句柄";
12488
12599
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -12503,13 +12614,13 @@ ${validBossNames.join("、")}`;
12503
12614
  '使用 "兑换资源 物品名称 数量" 进行兑换',
12504
12615
  `您当前持有: ${coupon?.quantity || 0}张资源兑换券`,
12505
12616
  "====================",
12506
- ...Object.entries(resourceItems).map(([itemName, config3]) => `▸ ${itemName}:1张券兑换${config3.valuePerCoupon}${itemName === "金币" ? "金币" : "红晶"}`),
12617
+ ...Object.entries(resourceItems).map(([itemName, config2]) => `▸ ${itemName}:1张券兑换${config2.valuePerCoupon}${itemName === "金币" ? "金币" : "红晶"}`),
12507
12618
  "====================",
12508
12619
  '输入示例:"兑换资源 金币 5"(兑换500金币)'
12509
12620
  ].join("\n");
12510
12621
  }
12511
- const config2 = resourceItems[name2];
12512
- if (!config2) return `⚠️ 无效物品名称,可用选项:${Object.keys(resourceItems).join("、")}`;
12622
+ const itemconfig = resourceItems[name2];
12623
+ if (!itemconfig) return `⚠️ 无效物品名称,可用选项:${Object.keys(resourceItems).join("、")}`;
12513
12624
  if (name2 === "红晶") {
12514
12625
  const [career] = await ctx.database.get("ggcevo_careers", { handle });
12515
12626
  if (!career || career.group !== "辛迪加海盗") {
@@ -12526,7 +12637,7 @@ ${validBossNames.join("、")}`;
12526
12637
  if (couponCount < exchangeAmount) {
12527
12638
  return `⚠️ 兑换券不足,需要${exchangeAmount}张,当前持有:${couponCount}张`;
12528
12639
  }
12529
- const gainAmount = config2.valuePerCoupon * exchangeAmount;
12640
+ const gainAmount = itemconfig.valuePerCoupon * exchangeAmount;
12530
12641
  try {
12531
12642
  await ctx.database.withTransaction(async () => {
12532
12643
  await ctx.database.set(
@@ -12534,19 +12645,19 @@ ${validBossNames.join("、")}`;
12534
12645
  { handle, itemId: 8 },
12535
12646
  { quantity: couponCount - exchangeAmount }
12536
12647
  );
12537
- const [record] = await ctx.database.get(config2.table, { handle });
12648
+ const [record] = await ctx.database.get(itemconfig.table, { handle });
12538
12649
  if (record) {
12539
12650
  await ctx.database.set(
12540
- config2.table,
12651
+ itemconfig.table,
12541
12652
  { handle },
12542
- { [config2.currencyField]: record[config2.currencyField] + gainAmount }
12653
+ { [itemconfig.currencyField]: record[itemconfig.currencyField] + gainAmount }
12543
12654
  );
12544
12655
  } else {
12545
- await ctx.database.create(config2.table, {
12656
+ await ctx.database.create(itemconfig.table, {
12546
12657
  handle,
12547
12658
  userId: session.userId,
12548
- [config2.currencyField]: gainAmount,
12549
- ...config2.table === "ggcevo_sign" ? { lastSign: /* @__PURE__ */ new Date() } : {}
12659
+ [itemconfig.currencyField]: gainAmount,
12660
+ ...itemconfig.table === "ggcevo_sign" ? { lastSign: /* @__PURE__ */ new Date() } : {}
12550
12661
  });
12551
12662
  }
12552
12663
  });
@@ -12625,17 +12736,17 @@ PK同玩家限战:1次/日
12625
12736
  ctx.command("ggcevo/击败奖励").alias("击杀奖励").action(({}) => {
12626
12737
  return `
12627
12738
  🌟 异形主宰击败奖励规则 🌟
12628
- 🏆 前20名奖励(按伤害排名):
12739
+ 🏆 伤害榜奖励(按伤害排名):
12629
12740
  1️⃣ 第1名:
12630
- 50 资源兑换券
12741
+ 35 资源兑换券
12631
12742
  2️⃣ 第2名:
12632
- 45 资源兑换券
12743
+ 30 资源兑换券
12633
12744
  3️⃣ 第3名:
12634
- 40 资源兑换券
12745
+ 25 资源兑换券
12635
12746
  🎖️ 第4-10名:
12636
- 30 资源兑换券
12637
- 💫 第11-20名:
12638
12747
  20 资源兑换券
12748
+ 🎖 第11-20名:
12749
+ 15 资源兑换券
12639
12750
  💫 第21-50名:
12640
12751
  10 资源兑换券
12641
12752
  💝 其他参与者:
@@ -12694,7 +12805,7 @@ PK同玩家限战:1次/日
12694
12805
  📌 重要说明:
12695
12806
  1. 结算后自动发放所有奖励
12696
12807
  2. 勋章可通过背包查看
12697
- 3. 每个赛季2个月
12808
+ 3. 每个赛季持续2个月,可通过“胜点榜”指令查看
12698
12809
  `.trim();
12699
12810
  });
12700
12811
  }
package/lib/utils.d.ts CHANGED
@@ -41,3 +41,4 @@ export declare const GUESSING_ITEMS: {
41
41
  minBet: number;
42
42
  status: string;
43
43
  }[];
44
+ export declare function fixedCurfewCheck(session: any, config: Config): true | false;
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.34",
4
+ "version": "1.6.36",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [