koishi-plugin-ggcevo-game 1.4.13 → 1.4.14

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
@@ -427,7 +427,8 @@ var SyndicatedItems = {
427
427
  description: "一种小型的机械装置,用于吸收空间站能量并进行爆破",
428
428
  price: 0,
429
429
  redCrystalCost: 30,
430
- effects: "当主宰为“空间站感染虫”时才能使用,对“空间站哨枪塔”造成其当前血量值的伤害(获得等同于伤害值的金币)"
430
+ condition: "空间站哨枪塔存活",
431
+ effects: "对空间站哨枪塔造成其当前血量值的伤害(获得等同于伤害值的金币)"
431
432
  },
432
433
  "闪光弹": {
433
434
  id: 2,
@@ -435,7 +436,8 @@ var SyndicatedItems = {
435
436
  description: "非致命军用炸药",
436
437
  price: 75,
437
438
  redCrystalCost: 0,
438
- effects: "对目标使用后,重置其技能计数(无法对重型和建筑目标使用)"
439
+ condition: "目标无建筑标签和重型标签",
440
+ effects: "重置目标的技能计数"
439
441
  },
440
442
  "CRED-17": {
441
443
  id: 3,
@@ -443,7 +445,8 @@ var SyndicatedItems = {
443
445
  description: "一个小型辛迪加机器人,可以破坏电子银行账户",
444
446
  price: 0,
445
447
  redCrystalCost: 60,
446
- effects: "此物品存放于仓库自动生效(阵营必须为辛迪加海盗)。每日签到金币奖励+50%,每有一名人类联盟玩家额外增加1%(至多额外增加50%)"
448
+ condition: "辛迪加海盗阵营",
449
+ effects: "每日签到金币奖励+50%,每有一名人类联盟玩家额外增加1%(至多额外增加50%)"
447
450
  },
448
451
  "脉冲手雷": {
449
452
  id: 4,
@@ -451,7 +454,8 @@ var SyndicatedItems = {
451
454
  description: "电磁脉冲干扰机械目标和灵能目标",
452
455
  price: 75,
453
456
  redCrystalCost: 0,
454
- effects: "对目标使用后,消耗其500点能量"
457
+ condition: "目标拥有能量",
458
+ effects: "消耗目标500点能量"
455
459
  },
456
460
  "MP3播放器": {
457
461
  id: 5,
@@ -459,7 +463,8 @@ var SyndicatedItems = {
459
463
  description: "这是一款未来派音乐设备",
460
464
  price: 0,
461
465
  redCrystalCost: 10,
462
- effects: "此物品存放于仓库自动生效(阵营必须为辛迪加海盗)。主动发起的PK对战结果为失败时上交给对方的金币-50%"
466
+ condition: "辛迪加海盗阵营",
467
+ effects: "主动发起的PK对战结果为失败时上交给对方的金币-50%"
463
468
  },
464
469
  "雷达面罩": {
465
470
  id: 6,
@@ -467,7 +472,8 @@ var SyndicatedItems = {
467
472
  description: "一个复杂的雷达面罩,用于远距离侦察或探测隐藏单位",
468
473
  price: 0,
469
474
  redCrystalCost: 25,
470
- effects: "此物品存放于仓库自动生效(阵营必须为辛迪加海盗)。使用武器攻击时,无视目标10%的减伤效果"
475
+ condition: "辛迪加海盗阵营",
476
+ effects: "使用武器攻击时,无视目标10%的减伤效果"
471
477
  },
472
478
  "气喇叭": {
473
479
  id: 7,
@@ -475,7 +481,8 @@ var SyndicatedItems = {
475
481
  description: "气喇叭一直被用于展示纯粹的勇气",
476
482
  price: 0,
477
483
  redCrystalCost: 30,
478
- effects: "此物品存放于仓库自动生效(阵营必须为辛迪加海盗)。主动发起的PK对战结果为胜利时将获得辛迪加海盗总部发放的等额金币作为奖励"
484
+ condition: "辛迪加海盗阵营",
485
+ effects: "主动发起的PK对战结果为胜利时将获得辛迪加海盗总部发放的等额抢夺金币作为奖励"
479
486
  }
480
487
  };
481
488
  var initDefaultItems = {
@@ -4783,8 +4790,9 @@ ${itemDetails.join("\n")}`;
4783
4790
  const humanPlayersCount = await ctx.database.select("ggcevo_careers").where({ group: "人类联盟" }).execute((row) => import_koishi.$.count(row.handle));
4784
4791
  const additionalBonus = Math.min(humanPlayersCount, 50);
4785
4792
  const credBonus = 0.5 + additionalBonus / 100;
4793
+ const totalBonusPercent = Math.round(credBonus * 100);
4786
4794
  totalBonus += credBonus;
4787
- messages.push(`💎 CRED-17生效:+50%金币 (额外+${additionalBonus}%金币)`);
4795
+ messages.push(`💎 CRED-17生效:+${totalBonusPercent}%金币`);
4788
4796
  }
4789
4797
  }
4790
4798
  const [meowEffect] = await ctx.database.get("ggcevo_Wish_Record", {
@@ -6141,15 +6149,21 @@ ${discountDetails.length ? `${discountDetails.join("\n")}` : ""}` : null;
6141
6149
  return `无效分类,可用类型:
6142
6150
  ${validTypes.join("、")}`;
6143
6151
  }
6144
- const items = filteredItems.filter((item) => item.type === type).map((item) => [
6145
- `${Object.keys(SyndicatedItems).find((k) => SyndicatedItems[k] === item)}`,
6146
- // 获取物品名称
6147
- `类型:${item.type}`,
6148
- `价格:${item.price}金币`,
6149
- `效果:${item.effects}`,
6150
- `描述:${item.description}`,
6151
- "------------------"
6152
- ].join("\n"));
6152
+ const items = filteredItems.filter((item) => item.type === type).map((item) => {
6153
+ const itemName = Object.keys(SyndicatedItems).find((k) => SyndicatedItems[k] === item);
6154
+ const itemDetails = [
6155
+ `名称:${itemName}`,
6156
+ `类型:${item.type}`,
6157
+ `价格:${item.price}金币`,
6158
+ `条件:${item.condition}`,
6159
+ // 新增的条件字段
6160
+ `效果:${item.effects}`,
6161
+ // 效果字段保持不变
6162
+ `描述:${item.description}`,
6163
+ "------------------"
6164
+ ];
6165
+ return itemDetails.join("\n");
6166
+ });
6153
6167
  return [
6154
6168
  `💣 爆破装备库 - ${type} 💣`,
6155
6169
  "使用“购买 物品名称”指令进行购买",
@@ -7341,6 +7355,8 @@ ${validTypes.join("、")}`;
7341
7355
  );
7342
7356
  }
7343
7357
  infoBlocks.push(
7358
+ `条件:${item.condition}`,
7359
+ // 新增的条件字段
7344
7360
  `特殊效果:${item.effects}`,
7345
7361
  `描述:${item.description}`,
7346
7362
  "------------------"
@@ -7621,9 +7637,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
7621
7637
  return [
7622
7638
  `✦ 等级 ${romanNumerals[level.level]}`,
7623
7639
  costDesc,
7624
- // 修改后的价格显示
7625
7640
  `▸ 基础效果:${level.description}`,
7626
- `💼 ${level.careerBonus}`,
7641
+ `▸ 职业效果:${level.careerBonus}`,
7627
7642
  "------------------"
7628
7643
  ].join("\n");
7629
7644
  });
@@ -7637,9 +7652,10 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
7637
7652
  return [
7638
7653
  `🛠️ ${tech.techname} 科技详情 🛠️`,
7639
7654
  `最大可升级等级:${romanNumerals[tech.maxLevel]}`,
7655
+ `适用职业:${tech.careerNames.join("、")}`,
7656
+ // 适用职业移动到最顶部
7640
7657
  '使用 "升级 科技名称" 进行升级',
7641
7658
  ...discountInfo,
7642
- // 插入折扣信息
7643
7659
  "====================",
7644
7660
  ...techDetails
7645
7661
  ].filter(Boolean).join("\n");
package/lib/items.d.ts CHANGED
@@ -5,6 +5,7 @@ export declare const SyndicatedItems: {
5
5
  description: string;
6
6
  price: number;
7
7
  redCrystalCost: number;
8
+ condition: string;
8
9
  effects: string;
9
10
  };
10
11
  闪光弹: {
@@ -13,6 +14,7 @@ export declare const SyndicatedItems: {
13
14
  description: string;
14
15
  price: number;
15
16
  redCrystalCost: number;
17
+ condition: string;
16
18
  effects: string;
17
19
  };
18
20
  'CRED-17': {
@@ -21,6 +23,7 @@ export declare const SyndicatedItems: {
21
23
  description: string;
22
24
  price: number;
23
25
  redCrystalCost: number;
26
+ condition: string;
24
27
  effects: string;
25
28
  };
26
29
  脉冲手雷: {
@@ -29,6 +32,7 @@ export declare const SyndicatedItems: {
29
32
  description: string;
30
33
  price: number;
31
34
  redCrystalCost: number;
35
+ condition: string;
32
36
  effects: string;
33
37
  };
34
38
  MP3播放器: {
@@ -37,6 +41,7 @@ export declare const SyndicatedItems: {
37
41
  description: string;
38
42
  price: number;
39
43
  redCrystalCost: number;
44
+ condition: string;
40
45
  effects: string;
41
46
  };
42
47
  雷达面罩: {
@@ -45,6 +50,7 @@ export declare const SyndicatedItems: {
45
50
  description: string;
46
51
  price: number;
47
52
  redCrystalCost: number;
53
+ condition: string;
48
54
  effects: string;
49
55
  };
50
56
  气喇叭: {
@@ -53,6 +59,7 @@ export declare const SyndicatedItems: {
53
59
  description: string;
54
60
  price: number;
55
61
  redCrystalCost: number;
62
+ condition: string;
56
63
  effects: string;
57
64
  };
58
65
  };
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.4.13",
4
+ "version": "1.4.14",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [