koishi-plugin-ggcevo-game 2.0.5 → 2.0.6

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
@@ -20,6 +20,7 @@ export interface Config {
20
20
  enableCurfew: boolean;
21
21
  enablePlayRequirement: boolean;
22
22
  enableGuguBattle: boolean;
23
+ enableMatchesRequirement: boolean;
23
24
  }
24
25
  export declare const Config: Schema<Config>;
25
26
  export declare function apply(ctx: Context, config: Config): void;
package/lib/index.js CHANGED
@@ -7481,7 +7481,9 @@ var Config = import_koishi.Schema.intersect([
7481
7481
  rankseason: import_koishi.Schema.string().description("当前赛季名称(影响兑换系统)").default("S1"),
7482
7482
  autorank: import_koishi.Schema.boolean().description("自动同步天梯数据").default(false),
7483
7483
  ignoreGlobalLimit: import_koishi.Schema.boolean().description("禁用全局兑换限制(谨慎开启)").default(false),
7484
- pointBonusEnabled: import_koishi.Schema.boolean().description("是否开启积分加成功能").default(false)
7484
+ pointBonusEnabled: import_koishi.Schema.boolean().description("是否开启积分加成功能").default(false),
7485
+ enableMatchesRequirement: import_koishi.Schema.boolean().description("兑换物品是否需要场次需求").default(true)
7486
+ // 默认开启
7485
7487
  }).description("赛季配置"),
7486
7488
  // 对战系统配置组
7487
7489
  import_koishi.Schema.object({
@@ -8937,16 +8939,18 @@ ${items.join("、")}
8937
8939
  if (!name2) return "已取消操作,请重新输入。";
8938
8940
  const configname = itemConfig[name2];
8939
8941
  if (!configname) return "无效的物品名称,请重新输入。";
8940
- const matchesRequirement = {
8941
- t3: 150,
8942
- t2: 200,
8943
- t1: 250,
8944
- t0: 350
8945
- };
8946
- const requiredMatches = matchesRequirement[configname.quality];
8947
- if (seasonMatches < requiredMatches) {
8948
- return `❌ 兑换【${name2}】需要在本赛季完成${requiredMatches}场游戏
8942
+ if (config.enableMatchesRequirement) {
8943
+ const matchesRequirement = {
8944
+ t3: 150,
8945
+ t2: 200,
8946
+ t1: 250,
8947
+ t0: 350
8948
+ };
8949
+ const requiredMatches = matchesRequirement[configname.quality];
8950
+ if (seasonMatches < requiredMatches) {
8951
+ return `❌ 兑换【${name2}】需要在本赛季完成${requiredMatches}场游戏
8949
8952
  您当前赛季场次: ${seasonMatches}场(还需${requiredMatches - seasonMatches}场)`;
8953
+ }
8950
8954
  }
8951
8955
  const userRecords = await ctx.database.get("ggcevo_exchange", { handle, item: name2 });
8952
8956
  if (userRecords.length > 0) 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": "2.0.5",
4
+ "version": "2.0.6",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [