koishi-plugin-ggcevo-game 1.6.34 → 1.6.35

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);
@@ -8937,6 +8978,8 @@ ${items.join("、")}
8937
8978
  ctx.command("ggcevo/pk [user]", "发起玩家对战").alias("挑战").action(async (argv, user) => {
8938
8979
  try {
8939
8980
  const session = argv.session;
8981
+ const Curfew = fixedCurfewCheck(session, config);
8982
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
8940
8983
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
8941
8984
  if (!profile) return "🔒 需要先绑定游戏句柄。";
8942
8985
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9318,6 +9361,8 @@ ${protectionList}
9318
9361
  ].join("\n");
9319
9362
  });
9320
9363
  ctx.command("ggcevo/武器库 [category]").usage('输入"武器库"查看类型,或"武器库 类型"查看详细武器信息').action(async ({ session }, category) => {
9364
+ const Curfew = fixedCurfewCheck(session, config);
9365
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9321
9366
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9322
9367
  if (!profile) return "⚠️ 需要先绑定游戏句柄";
9323
9368
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9461,6 +9506,8 @@ ${displayDiscounts.join("\n")}` : "",
9461
9506
  ].filter(Boolean).join("\n");
9462
9507
  });
9463
9508
  ctx.command("ggcevo/爆破库 [type]").usage("输入“爆破库”查看分类,或“爆破库 类型”查看详细物品").action(async ({ session }, type) => {
9509
+ const Curfew = fixedCurfewCheck(session, config);
9510
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9464
9511
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9465
9512
  if (!profile) return "⚠️ 需要先绑定游戏句柄";
9466
9513
  const filteredItems = Object.values(SyndicatedItems).filter(
@@ -9508,6 +9555,8 @@ ${validTypes.join("、")}`;
9508
9555
  ].join("\n");
9509
9556
  });
9510
9557
  ctx.command("ggcevo/购买 <item>").action(async ({ session }, item) => {
9558
+ const Curfew = fixedCurfewCheck(session, config);
9559
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9511
9560
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9512
9561
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9513
9562
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9515,15 +9564,15 @@ ${validTypes.join("、")}`;
9515
9564
  if (existingEntries.length > 0) return "⛔ 您已被列入黑名单。";
9516
9565
  const allItems = { ...weaponConfig, ...SyndicatedItems };
9517
9566
  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 === "传奇武器";
9567
+ const itemconfig = allItems[item];
9568
+ if (!itemconfig) return "无效的物品名称,请重新输入。";
9569
+ if (itemconfig.price <= 0) return "❌ 该物品不可直接购买";
9570
+ const isWeapon = ["能量武器", "热能武器", "实弹武器", "传奇武器"].includes(itemconfig.category);
9571
+ const isLegendaryWeapon = itemconfig.category === "传奇武器";
9523
9572
  if (isWeapon) {
9524
9573
  const existingWeapon = await ctx.database.get("ggcevo_weapons", {
9525
9574
  handle,
9526
- weaponId: config2.id
9575
+ weaponId: itemconfig.id
9527
9576
  });
9528
9577
  if (existingWeapon.length > 0) return `❌ 您已经拥有${item},无法重复购买`;
9529
9578
  }
@@ -9563,10 +9612,10 @@ ${validTypes.join("、")}`;
9563
9612
  const techLevel = weaponTech?.level || 0;
9564
9613
  const techConfigData = Spacestationtechnology.find((tech) => tech.techId === 2);
9565
9614
  if (!isLegendaryWeapon && playerGroup === "人类联盟" && techLevel > 0 && techConfigData) {
9566
- if (config2.level && config2.level <= techLevel) {
9615
+ if (itemconfig.level && itemconfig.level <= techLevel) {
9567
9616
  const isCareerBonus = techConfigData.careerNames.includes(playerCareer);
9568
9617
  totalDiscount += 25;
9569
- discountDetails.push(`▸ 🔧 武器系统Lv${techLevel}: ${isCareerBonus ? "50%" : "25%"}折扣 (适用${romanLevels[config2.level]}类武器)`);
9618
+ discountDetails.push(`▸ 🔧 武器系统Lv${techLevel}: ${isCareerBonus ? "50%" : "25%"}折扣 (适用${romanLevels[itemconfig.level]}类武器)`);
9570
9619
  if (isCareerBonus) {
9571
9620
  totalDiscount += 25;
9572
9621
  }
@@ -9598,15 +9647,15 @@ ${validTypes.join("、")}`;
9598
9647
  }
9599
9648
  }
9600
9649
  totalDiscount = Math.min(totalDiscount, 100);
9601
- let actualPrice = config2.price;
9650
+ let actualPrice = itemconfig.price;
9602
9651
  if (totalDiscount > 0) {
9603
- actualPrice = Math.floor(config2.price * (100 - totalDiscount) / 100);
9652
+ actualPrice = Math.floor(itemconfig.price * (100 - totalDiscount) / 100);
9604
9653
  actualPrice = Math.max(actualPrice, 1);
9605
9654
  }
9606
9655
  if ((signInfo?.totalRewards || 0) < actualPrice) {
9607
9656
  let priceInfo = `需要 ${actualPrice} 金币`;
9608
9657
  if (discountDetails.length > 0) {
9609
- priceInfo += ` (原价${config2.price})`;
9658
+ priceInfo += ` (原价${itemconfig.price})`;
9610
9659
  }
9611
9660
  return `❌ 金币不足,${priceInfo}`;
9612
9661
  }
@@ -9634,7 +9683,7 @@ ${validTypes.join("、")}`;
9634
9683
  if (isWeapon) {
9635
9684
  await ctx.database.upsert("ggcevo_weapons", [{
9636
9685
  handle,
9637
- weaponId: config2.id,
9686
+ weaponId: itemconfig.id,
9638
9687
  level: 0,
9639
9688
  modificationSlots: 1,
9640
9689
  equipped: false,
@@ -9645,7 +9694,7 @@ ${validTypes.join("、")}`;
9645
9694
  if (equippedCount === 0) {
9646
9695
  await ctx.database.set(
9647
9696
  "ggcevo_weapons",
9648
- { handle, weaponId: config2.id },
9697
+ { handle, weaponId: itemconfig.id },
9649
9698
  { equipped: true }
9650
9699
  );
9651
9700
  isAutoEquipped = true;
@@ -9653,11 +9702,11 @@ ${validTypes.join("、")}`;
9653
9702
  } else {
9654
9703
  const [existing] = await ctx.database.get("ggcevo_warehouse", {
9655
9704
  handle,
9656
- itemId: config2.id
9705
+ itemId: itemconfig.id
9657
9706
  });
9658
9707
  await ctx.database.upsert("ggcevo_warehouse", [{
9659
9708
  handle,
9660
- itemId: config2.id,
9709
+ itemId: itemconfig.id,
9661
9710
  quantity: (existing?.quantity || 0) + 1
9662
9711
  }], ["handle", "itemId"]);
9663
9712
  }
@@ -9665,7 +9714,7 @@ ${validTypes.join("、")}`;
9665
9714
  let message = `✅ 成功购买${isWeapon ? "武器" : "物品"}「${item}」
9666
9715
  `;
9667
9716
  if (discountDetails.length > 0) {
9668
- message += `花费 ${actualPrice} 金币 (原价${config2.price} 金币)`;
9717
+ message += `花费 ${actualPrice} 金币 (原价${itemconfig.price} 金币)`;
9669
9718
  message += `
9670
9719
  💰 折扣明细:
9671
9720
  ${discountDetails.join("\n")}`;
@@ -9687,13 +9736,15 @@ ${discountDetails.join("\n")}`;
9687
9736
  }
9688
9737
  message += "\n输入「武器仓库」查看详情";
9689
9738
  } else {
9690
- const [current] = await ctx.database.get("ggcevo_warehouse", { handle, itemId: config2.id });
9739
+ const [current] = await ctx.database.get("ggcevo_warehouse", { handle, itemId: itemconfig.id });
9691
9740
  message += `
9692
9741
  当前持有数量:${current?.quantity || 1},输入「仓库」查看物品`;
9693
9742
  }
9694
9743
  return message;
9695
9744
  });
9696
9745
  ctx.command("ggcevo/武器仓库").action(async ({ session }) => {
9746
+ const Curfew = fixedCurfewCheck(session, config);
9747
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9697
9748
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9698
9749
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9699
9750
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9730,6 +9781,8 @@ ${discountDetails.join("\n")}`;
9730
9781
  ].join("\n");
9731
9782
  });
9732
9783
  ctx.command("ggcevo/装备武器 <weapon>").alias("装备").action(async ({ session }, weapon) => {
9784
+ const Curfew = fixedCurfewCheck(session, config);
9785
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9733
9786
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9734
9787
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9735
9788
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9739,10 +9792,10 @@ ${discountDetails.join("\n")}`;
9739
9792
  }
9740
9793
  if (!weapon) return "请输入“装备武器 武器名称”来装备一把你拥有的武器。";
9741
9794
  if (!weaponConfig[weapon]) return "武器名称错误,请输入“装备武器 武器名称”来装备一把你拥有的武器。";
9742
- const config2 = weaponConfig[weapon];
9795
+ const itemconfig = weaponConfig[weapon];
9743
9796
  const [owned] = await ctx.database.get("ggcevo_weapons", {
9744
9797
  handle,
9745
- weaponId: config2.id
9798
+ weaponId: itemconfig.id
9746
9799
  });
9747
9800
  if (!owned) return "您尚未获得该武器。";
9748
9801
  await ctx.database.withTransaction(async () => {
@@ -9750,20 +9803,22 @@ ${discountDetails.join("\n")}`;
9750
9803
  "ggcevo_weapons",
9751
9804
  {
9752
9805
  handle,
9753
- weaponId: { $ne: config2.id }
9806
+ weaponId: { $ne: itemconfig.id }
9754
9807
  // 排除当前武器
9755
9808
  },
9756
9809
  { equipped: false }
9757
9810
  );
9758
9811
  await ctx.database.upsert("ggcevo_weapons", [{
9759
9812
  handle,
9760
- weaponId: config2.id,
9813
+ weaponId: itemconfig.id,
9761
9814
  equipped: true
9762
9815
  }], ["handle", "weaponId"]);
9763
9816
  });
9764
9817
  return `您已成功装备武器 ${weapon}!`;
9765
9818
  });
9766
9819
  ctx.command("ggcevo/升级科技 <target>", "升级空间站科技").action(async ({ session }, target) => {
9820
+ const Curfew = fixedCurfewCheck(session, config);
9821
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9767
9822
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9768
9823
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9769
9824
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9781,6 +9836,8 @@ ${discountDetails.join("\n")}`;
9781
9836
  return handleTechUpgrade(ctx, handle, target);
9782
9837
  });
9783
9838
  ctx.command("ggcevo/升级武器 <target>", "升级武器").alias("升级").action(async ({ session }, target) => {
9839
+ const Curfew = fixedCurfewCheck(session, config);
9840
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9784
9841
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9785
9842
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9786
9843
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9797,6 +9854,8 @@ ${discountDetails.join("\n")}`;
9797
9854
  return handleWeaponUpgrade(ctx, handle, target);
9798
9855
  });
9799
9856
  ctx.command("ggcevo/改装武器 <weapon> [mod]", "安装武器模块").alias("改装").action(async ({ session }, weapon, mod) => {
9857
+ const Curfew = fixedCurfewCheck(session, config);
9858
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9800
9859
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9801
9860
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9802
9861
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9953,6 +10012,8 @@ ${discountDetails.join("\n")}`;
9953
10012
  }
9954
10013
  });
9955
10014
  ctx.command("ggcevo/拆卸 <weapon> <mod>", "卸载武器模块,专属模块返还50%金币,通用模块返还80%金币").action(async ({ session }, weapon, mod) => {
10015
+ const Curfew = fixedCurfewCheck(session, config);
10016
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
9956
10017
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9957
10018
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9958
10019
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -9975,13 +10036,13 @@ ${discountDetails.join("\n")}`;
9975
10036
  let refundReason;
9976
10037
  if (isRecyclable) {
9977
10038
  refundRate = 1;
9978
- refundReason = "⚠️ 回收模式开启:全额返还金币";
10039
+ refundReason = "ℹ️ 全额返还金币";
9979
10040
  } else if (modInfo.isExclusive) {
9980
10041
  refundRate = 0.5;
9981
- refundReason = "专属模块返还50%";
10042
+ refundReason = "ℹ️ 专属模块返还50%金币";
9982
10043
  } else {
9983
10044
  refundRate = 0.8;
9984
- refundReason = "通用模块返还80%";
10045
+ refundReason = "ℹ️ 通用模块返还80%金币";
9985
10046
  }
9986
10047
  const refund = Math.floor(modInfo.cost * refundRate);
9987
10048
  const newMods = equipment.installedMods.filter((m) => m !== mod);
@@ -9996,18 +10057,21 @@ ${discountDetails.join("\n")}`;
9996
10057
  handle,
9997
10058
  totalRewards: newBalance
9998
10059
  }], ["handle"]);
9999
- return [
10060
+ const responseLines = [
10000
10061
  `✅ 已从 ${weapon} 拆卸 ${mod} 模块`,
10001
- `返还金币:${refund} (原价${modInfo.cost}, ${refundReason})`,
10062
+ refund === modInfo.cost ? `返还金币:${refund}` : `返还金币:${refund} (原价${modInfo.cost})`,
10002
10063
  `当前金币总额:${newBalance}`,
10003
10064
  `剩余模块:${newMods.join(", ") || "无"}`,
10004
- isRecyclable ? "ℹ️ 回收模式模块拆卸返还100%" : modInfo.isExclusive ? "ℹ️ 专属模块拆卸只返还50%" : ""
10005
- ].filter(Boolean).join("\n");
10065
+ refundReason
10066
+ ];
10067
+ return responseLines.filter(Boolean).join("\n");
10006
10068
  });
10007
10069
  ctx.guild().command("ggcevo/攻击 <bossName>").usage("请输入要攻击的异形名称(例如:攻击 异齿猛兽 或 攻击 寒冰王蛇)").action(async (argv, bossName) => {
10008
10070
  const session = argv.session;
10009
10071
  let bossEventBroadcast = null;
10010
10072
  let cleanerRewardBroadcast = null;
10073
+ const Curfew = fixedCurfewCheck(session, config);
10074
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10011
10075
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10012
10076
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10013
10077
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -10024,8 +10088,7 @@ ${discountDetails.join("\n")}`;
10024
10088
  return `当前没有找到名为 ${bossName} 的可攻击目标。
10025
10089
  请攻击当前存活的异形:${activeNames || "无"}。`;
10026
10090
  }
10027
- const config2 = ctx.config;
10028
- const unlimitedBossAttack = config2.unlimitedBossAttack;
10091
+ const unlimitedBossAttack = config.unlimitedBossAttack;
10029
10092
  if (!unlimitedBossAttack) {
10030
10093
  const lastAttack = await ctx.database.get("ggcevo_boss_damage", { handle });
10031
10094
  if (lastAttack.length > 0) {
@@ -10059,7 +10122,7 @@ ${discountDetails.join("\n")}`;
10059
10122
  ctx,
10060
10123
  session,
10061
10124
  handle,
10062
- config2,
10125
+ config,
10063
10126
  equippedWeapon,
10064
10127
  verifiedBoss,
10065
10128
  activeBosses,
@@ -10078,7 +10141,7 @@ ${discountDetails.join("\n")}`;
10078
10141
  ctx,
10079
10142
  session,
10080
10143
  handle,
10081
- config2,
10144
+ config,
10082
10145
  equippedWeapon,
10083
10146
  verifiedBoss,
10084
10147
  weaponName,
@@ -10191,7 +10254,7 @@ ${discountDetails.join("\n")}`;
10191
10254
  redcrystalMessage
10192
10255
  );
10193
10256
  await session.send(resultMessage);
10194
- const groupId = [...config2.groupId];
10257
+ const groupId = [...config.groupId];
10195
10258
  await handleBroadcasts(
10196
10259
  ctx,
10197
10260
  groupId,
@@ -10202,6 +10265,8 @@ ${discountDetails.join("\n")}`;
10202
10265
  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
10266
  const session = argv.session;
10204
10267
  const { options } = argv;
10268
+ const Curfew = fixedCurfewCheck(session, config);
10269
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10205
10270
  if (!name2) {
10206
10271
  name2 = "测试假人";
10207
10272
  }
@@ -10336,7 +10401,9 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10336
10401
  pageNum < totalPages ? `输入 伤害榜 ${pageNum + 1} 查看下一页` : "已是最后一页"
10337
10402
  ].join("\n");
10338
10403
  });
10339
- ctx.command("ggcevo/异形信息", "查看当前主宰信息").alias("yx信息").action(async () => {
10404
+ ctx.command("ggcevo/异形信息", "查看当前主宰信息").alias("yx信息").action(async ({ session }) => {
10405
+ const Curfew = fixedCurfewCheck(session, config);
10406
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10340
10407
  const activeBosses = await ctx.database.get("ggcevo_boss", { isActive: true });
10341
10408
  if (!activeBosses.length) return "当前没有存活的异形,请等待12点或0点刷新。";
10342
10409
  const mainBoss = activeBosses.find((b) => b.type === "主宰");
@@ -10528,6 +10595,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10528
10595
  });
10529
10596
  ctx.command("ggcevo/祈愿").action(async (argv) => {
10530
10597
  const session = argv.session;
10598
+ const Curfew = fixedCurfewCheck(session, config);
10599
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10531
10600
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10532
10601
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10533
10602
  const { regionId, realmId, profileId } = profile;
@@ -10605,6 +10674,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10605
10674
  ⏳ 效果持续至 ${formattedEndTime}`;
10606
10675
  });
10607
10676
  ctx.command("ggcevo/加入 <faction>", "加入阵营").alias("加入阵营").action(async ({ session }, faction) => {
10677
+ const Curfew = fixedCurfewCheck(session, config);
10678
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10608
10679
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10609
10680
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10610
10681
  const { regionId, realmId, profileId } = profile;
@@ -10669,6 +10740,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10669
10740
  }
10670
10741
  });
10671
10742
  ctx.command("ggcevo/退出", "退出当前阵营").alias("退出阵营").action(async ({ session }) => {
10743
+ const Curfew = fixedCurfewCheck(session, config);
10744
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10672
10745
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10673
10746
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10674
10747
  const { regionId, realmId, profileId } = profile;
@@ -10719,6 +10792,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10719
10792
  }
10720
10793
  });
10721
10794
  ctx.command("ggcevo/转职 [profession]", "转职系统").action(async ({ session }, profession) => {
10795
+ const Curfew = fixedCurfewCheck(session, config);
10796
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10722
10797
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10723
10798
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10724
10799
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -10728,16 +10803,16 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10728
10803
  }
10729
10804
  const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
10730
10805
  if (!careerData) return "请先加入阵营后使用转职功能。";
10731
- let config2;
10806
+ let careerconfig;
10732
10807
  if (careerData.group === "人类联盟") {
10733
- config2 = spaceStationCrewConfig;
10808
+ careerconfig = spaceStationCrewConfig;
10734
10809
  } else if (careerData.group === "辛迪加海盗") {
10735
- config2 = syndicatePirateConfig;
10810
+ careerconfig = syndicatePirateConfig;
10736
10811
  } else {
10737
10812
  return "未知阵营无法显示职业信息。";
10738
10813
  }
10739
10814
  if (!profession) {
10740
- const availableCareers = config2.filter(
10815
+ const availableCareers = careerconfig.filter(
10741
10816
  (p) => p.Jobtransfer && p.professionName !== careerData.career
10742
10817
  );
10743
10818
  const careerList = availableCareers.map((p) => {
@@ -10758,7 +10833,7 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10758
10833
  "💡 转职后原有职业效果将被替换"
10759
10834
  ].join("\n");
10760
10835
  }
10761
- const targetProfession = config2.find((p) => p.professionName === profession);
10836
+ const targetProfession = careerconfig.find((p) => p.professionName === profession);
10762
10837
  if (!targetProfession) return "该职业不存在。";
10763
10838
  if (!targetProfession.Jobtransfer) return "该职业无法直接转职。";
10764
10839
  if (careerData.career === profession) return "您已经是该职业了。";
@@ -10801,6 +10876,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10801
10876
  });
10802
10877
  ctx.command("ggcevo/职业信息", "查看当前阵营与职业状态").action(async ({ session }) => {
10803
10878
  try {
10879
+ const Curfew = fixedCurfewCheck(session, config);
10880
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10804
10881
  const [profile] = await ctx.database.get("sc2arcade_player", {
10805
10882
  userId: session.userId
10806
10883
  });
@@ -10869,6 +10946,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10869
10946
  }
10870
10947
  });
10871
10948
  ctx.command("ggcevo/黑市 [category]", "辛迪加海盗专属黑市").usage('输入"黑市"查看分类,或"黑市 分类名称"查看详细').action(async ({ session }, category) => {
10949
+ const Curfew = fixedCurfewCheck(session, config);
10950
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
10872
10951
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10873
10952
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10874
10953
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -10999,6 +11078,8 @@ ${discountDetails.join("\n")}` : "",
10999
11078
  ].filter(Boolean).join("\n");
11000
11079
  });
11001
11080
  ctx.command("ggcevo/订购 <item>").action(async ({ session }, item) => {
11081
+ const Curfew = fixedCurfewCheck(session, config);
11082
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11002
11083
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11003
11084
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11004
11085
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11123,6 +11204,8 @@ ${discountReason}` : "",
11123
11204
  });
11124
11205
  ctx.command("ggcevo/仓库").action(async (argv) => {
11125
11206
  const session = argv.session;
11207
+ const Curfew = fixedCurfewCheck(session, config);
11208
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11126
11209
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11127
11210
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11128
11211
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11178,6 +11261,8 @@ ${discountReason}` : "",
11178
11261
  const session = argv.session;
11179
11262
  let bossEventBroadcast = null;
11180
11263
  let cleanerRewardBroadcast = null;
11264
+ const Curfew = fixedCurfewCheck(session, config);
11265
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11181
11266
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11182
11267
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11183
11268
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11232,6 +11317,8 @@ ${discountReason}` : "",
11232
11317
  }
11233
11318
  });
11234
11319
  ctx.command("ggcevo/科技 [techName]", "查看空间站科技信息").usage("输入“科技”查看列表,或“科技 科技名称”查看详细信息").action(async ({ session }, techName) => {
11320
+ const Curfew = fixedCurfewCheck(session, config);
11321
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11235
11322
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11236
11323
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11237
11324
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11293,6 +11380,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11293
11380
  ].filter(Boolean).join("\n");
11294
11381
  });
11295
11382
  ctx.command("ggcevo/挖矿").action(async ({ session }) => {
11383
+ const Curfew = fixedCurfewCheck(session, config);
11384
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11296
11385
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11297
11386
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11298
11387
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11436,6 +11525,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11436
11525
  return reportLines.join("\n");
11437
11526
  });
11438
11527
  ctx.command("ggcevo/任务 [name]").usage('输入"任务"查看所有任务列表,或"任务 任务名称"查看详细任务信息').action(async ({ session }, name2) => {
11528
+ const Curfew = fixedCurfewCheck(session, config);
11529
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11439
11530
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11440
11531
  if (!profile) return "⚠️ 需要先绑定游戏句柄";
11441
11532
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11490,6 +11581,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11490
11581
  });
11491
11582
  ctx.command("ggcevo/完成任务 <name:text>", "完成指定任务领取奖励").usage('输入"完成任务 任务名称"来完成任务并领取奖励').action(async ({ session }, name2) => {
11492
11583
  try {
11584
+ const Curfew = fixedCurfewCheck(session, config);
11585
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11493
11586
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11494
11587
  if (!profile) return "⚠️ 需要先绑定游戏句柄";
11495
11588
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -11565,6 +11658,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11565
11658
  });
11566
11659
  ctx.command("ggcevo/购买保护卡", "花费600金币购买一周PK保护卡").alias("购买pk保护卡").action(async ({ session }) => {
11567
11660
  try {
11661
+ const Curfew = fixedCurfewCheck(session, config);
11662
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11568
11663
  const userId = session.userId;
11569
11664
  const [profile] = await ctx.database.get("sc2arcade_player", { userId });
11570
11665
  if (!profile) return "🔒 请先绑定游戏句柄。";
@@ -11626,6 +11721,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11626
11721
  });
11627
11722
  ctx.command("ggcevo/开启军械库防爆门").alias("打开军械库防爆门").action(async (argv) => {
11628
11723
  const session = argv.session;
11724
+ const Curfew = fixedCurfewCheck(session, config);
11725
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11629
11726
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11630
11727
  if (!profile) return "🔒 请先绑定游戏句柄。";
11631
11728
  const { regionId, realmId, profileId } = profile;
@@ -11676,6 +11773,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11676
11773
  ].join("\n");
11677
11774
  });
11678
11775
  ctx.command("ggcevo/技能 [异形名称]").usage('查询异形技能,输入"技能"查看所有异形,输入"技能 异形名称"查询详细技能').action(async ({ session }, unitName) => {
11776
+ const Curfew = fixedCurfewCheck(session, config);
11777
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11679
11778
  const allUnits = /* @__PURE__ */ new Set();
11680
11779
  bossPool.forEach((boss) => {
11681
11780
  allUnits.add(boss.main.name);
@@ -11766,6 +11865,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11766
11865
  });
11767
11866
  ctx.command("ggcevo/咕咕更新").action(async ({ session }) => {
11768
11867
  try {
11868
+ const Curfew = fixedCurfewCheck(session, config);
11869
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11769
11870
  const latestUpdates = [...ggcevoUpdates].sort((a, b) => compareVersions(a.version, b.version)).slice(0, 3);
11770
11871
  if (latestUpdates.length === 0) {
11771
11872
  return "🛑 暂无更新记录";
@@ -11790,6 +11891,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11790
11891
  }
11791
11892
  });
11792
11893
  ctx.command("ggcevo/探索 [galaxyName]").action(async ({ session }, galaxyName) => {
11894
+ const Curfew = fixedCurfewCheck(session, config);
11895
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
11793
11896
  const possibleItems = [
11794
11897
  { id: 2, name: "闪光弹", type: "手榴弹", chance: 0.1 },
11795
11898
  { id: 4, name: "脉冲手雷", type: "手榴弹", chance: 0.1 },
@@ -12154,6 +12257,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12154
12257
  shipIdToName[data.id] = name2;
12155
12258
  }
12156
12259
  ctx.command("ggcevo/飞船信息").action(async ({ session }) => {
12260
+ const Curfew = fixedCurfewCheck(session, config);
12261
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
12157
12262
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12158
12263
  if (!profile) return "🔒 需要先绑定游戏句柄。";
12159
12264
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -12180,6 +12285,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12180
12285
  ].join("\n");
12181
12286
  });
12182
12287
  ctx.command("ggcevo/购买飞船 [shipName]").alias("飞船").action(async ({ session }, shipName) => {
12288
+ const Curfew = fixedCurfewCheck(session, config);
12289
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
12183
12290
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12184
12291
  if (!profile) return "🔒 需要先绑定游戏句柄。";
12185
12292
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -12251,6 +12358,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12251
12358
  ].join("\n");
12252
12359
  });
12253
12360
  ctx.command("ggcevo/升级物品 [itemName]", "升级辛迪加海盗物品").usage('输入"升级物品"查看可升级列表,或"升级物品 物品名称"进行升级').action(async ({ session }, itemName) => {
12361
+ const Curfew = fixedCurfewCheck(session, config);
12362
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
12254
12363
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12255
12364
  if (!profile) return "🔒 需要先绑定游戏句柄。";
12256
12365
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -12387,6 +12496,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12387
12496
  胜点榜基准日: ${now.toLocaleDateString()}`;
12388
12497
  });
12389
12498
  ctx.command("ggcevo/竞猜 [itemId] [amount] [guess]", "参与竞猜游戏").usage('输入"竞猜"查看可竞猜项目,"竞猜 项目ID 金额 内容"进行竞猜').example("竞猜 1 500 寒冰王蛇").action(async ({ session }, itemId, amount, guess) => {
12499
+ const Curfew = fixedCurfewCheck(session, config);
12500
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
12390
12501
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12391
12502
  if (!profile) return "🔒 需要先绑定游戏句柄";
12392
12503
  const { regionId, realmId, profileId } = profile;
@@ -12483,6 +12594,8 @@ ${validBossNames.join("、")}`;
12483
12594
  }
12484
12595
  });
12485
12596
  ctx.command("ggcevo/兑换资源 [name] [amount]").usage('输入"兑换资源"查看可兑换资源列表\n输入"兑换资源 物品名称 [数量]"进行兑换').action(async ({ session }, name2, amount) => {
12597
+ const Curfew = fixedCurfewCheck(session, config);
12598
+ if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。";
12486
12599
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12487
12600
  if (!profile) return "🔒 需要先绑定游戏句柄";
12488
12601
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
@@ -12503,13 +12616,13 @@ ${validBossNames.join("、")}`;
12503
12616
  '使用 "兑换资源 物品名称 数量" 进行兑换',
12504
12617
  `您当前持有: ${coupon?.quantity || 0}张资源兑换券`,
12505
12618
  "====================",
12506
- ...Object.entries(resourceItems).map(([itemName, config3]) => `▸ ${itemName}:1张券兑换${config3.valuePerCoupon}${itemName === "金币" ? "金币" : "红晶"}`),
12619
+ ...Object.entries(resourceItems).map(([itemName, config2]) => `▸ ${itemName}:1张券兑换${config2.valuePerCoupon}${itemName === "金币" ? "金币" : "红晶"}`),
12507
12620
  "====================",
12508
12621
  '输入示例:"兑换资源 金币 5"(兑换500金币)'
12509
12622
  ].join("\n");
12510
12623
  }
12511
- const config2 = resourceItems[name2];
12512
- if (!config2) return `⚠️ 无效物品名称,可用选项:${Object.keys(resourceItems).join("、")}`;
12624
+ const itemconfig = resourceItems[name2];
12625
+ if (!itemconfig) return `⚠️ 无效物品名称,可用选项:${Object.keys(resourceItems).join("、")}`;
12513
12626
  if (name2 === "红晶") {
12514
12627
  const [career] = await ctx.database.get("ggcevo_careers", { handle });
12515
12628
  if (!career || career.group !== "辛迪加海盗") {
@@ -12526,7 +12639,7 @@ ${validBossNames.join("、")}`;
12526
12639
  if (couponCount < exchangeAmount) {
12527
12640
  return `⚠️ 兑换券不足,需要${exchangeAmount}张,当前持有:${couponCount}张`;
12528
12641
  }
12529
- const gainAmount = config2.valuePerCoupon * exchangeAmount;
12642
+ const gainAmount = itemconfig.valuePerCoupon * exchangeAmount;
12530
12643
  try {
12531
12644
  await ctx.database.withTransaction(async () => {
12532
12645
  await ctx.database.set(
@@ -12534,19 +12647,19 @@ ${validBossNames.join("、")}`;
12534
12647
  { handle, itemId: 8 },
12535
12648
  { quantity: couponCount - exchangeAmount }
12536
12649
  );
12537
- const [record] = await ctx.database.get(config2.table, { handle });
12650
+ const [record] = await ctx.database.get(itemconfig.table, { handle });
12538
12651
  if (record) {
12539
12652
  await ctx.database.set(
12540
- config2.table,
12653
+ itemconfig.table,
12541
12654
  { handle },
12542
- { [config2.currencyField]: record[config2.currencyField] + gainAmount }
12655
+ { [itemconfig.currencyField]: record[itemconfig.currencyField] + gainAmount }
12543
12656
  );
12544
12657
  } else {
12545
- await ctx.database.create(config2.table, {
12658
+ await ctx.database.create(itemconfig.table, {
12546
12659
  handle,
12547
12660
  userId: session.userId,
12548
- [config2.currencyField]: gainAmount,
12549
- ...config2.table === "ggcevo_sign" ? { lastSign: /* @__PURE__ */ new Date() } : {}
12661
+ [itemconfig.currencyField]: gainAmount,
12662
+ ...itemconfig.table === "ggcevo_sign" ? { lastSign: /* @__PURE__ */ new Date() } : {}
12550
12663
  });
12551
12664
  }
12552
12665
  });
@@ -12625,17 +12738,17 @@ PK同玩家限战:1次/日
12625
12738
  ctx.command("ggcevo/击败奖励").alias("击杀奖励").action(({}) => {
12626
12739
  return `
12627
12740
  🌟 异形主宰击败奖励规则 🌟
12628
- 🏆 前20名奖励(按伤害排名):
12741
+ 🏆 伤害榜奖励(按伤害排名):
12629
12742
  1️⃣ 第1名:
12630
- 50 资源兑换券
12743
+ 35 资源兑换券
12631
12744
  2️⃣ 第2名:
12632
- 45 资源兑换券
12745
+ 30 资源兑换券
12633
12746
  3️⃣ 第3名:
12634
- 40 资源兑换券
12747
+ 25 资源兑换券
12635
12748
  🎖️ 第4-10名:
12636
- 30 资源兑换券
12637
- 💫 第11-20名:
12638
12749
  20 资源兑换券
12750
+ 🎖 第11-20名:
12751
+ 15 资源兑换券
12639
12752
  💫 第21-50名:
12640
12753
  10 资源兑换券
12641
12754
  💝 其他参与者:
@@ -12694,7 +12807,7 @@ PK同玩家限战:1次/日
12694
12807
  📌 重要说明:
12695
12808
  1. 结算后自动发放所有奖励
12696
12809
  2. 勋章可通过背包查看
12697
- 3. 每个赛季2个月
12810
+ 3. 每个赛季持续2个月,可通过“胜点榜”指令查看
12698
12811
  `.trim();
12699
12812
  });
12700
12813
  }
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.35",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [