koishi-plugin-ggcevo-game 1.4.12 → 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 +41 -22
- package/lib/items.d.ts +7 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -427,7 +427,8 @@ var SyndicatedItems = {
|
|
|
427
427
|
description: "一种小型的机械装置,用于吸收空间站能量并进行爆破",
|
|
428
428
|
price: 0,
|
|
429
429
|
redCrystalCost: 30,
|
|
430
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
4795
|
+
messages.push(`💎 CRED-17生效:+${totalBonusPercent}%金币`);
|
|
4788
4796
|
}
|
|
4789
4797
|
}
|
|
4790
4798
|
const [meowEffect] = await ctx.database.get("ggcevo_Wish_Record", {
|
|
@@ -5938,11 +5946,14 @@ ${items.join("、")}
|
|
|
5938
5946
|
redcrystal: (initiatorCareer?.redcrystal || 0) + redcrystalAdd
|
|
5939
5947
|
}], ["handle"]);
|
|
5940
5948
|
}
|
|
5941
|
-
if (
|
|
5949
|
+
if (computerExpertProtection) {
|
|
5950
|
+
} else if (hornEffect) {
|
|
5951
|
+
await ctx.database.set("ggcevo_sign", targetHandle, {
|
|
5952
|
+
totalRewards: targetGold - goldTransfer
|
|
5953
|
+
});
|
|
5942
5954
|
await ctx.database.set("ggcevo_sign", initiatorHandle, {
|
|
5943
5955
|
totalRewards: initiatorGold + goldTransfer + extraGold
|
|
5944
5956
|
});
|
|
5945
|
-
} else if (computerExpertProtection) {
|
|
5946
5957
|
} else {
|
|
5947
5958
|
if (isWin) {
|
|
5948
5959
|
await ctx.database.set("ggcevo_sign", targetHandle, {
|
|
@@ -6138,15 +6149,21 @@ ${discountDetails.length ? `${discountDetails.join("\n")}` : ""}` : null;
|
|
|
6138
6149
|
return `无效分类,可用类型:
|
|
6139
6150
|
${validTypes.join("、")}`;
|
|
6140
6151
|
}
|
|
6141
|
-
const items = filteredItems.filter((item) => item.type === type).map((item) =>
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
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
|
+
});
|
|
6150
6167
|
return [
|
|
6151
6168
|
`💣 爆破装备库 - ${type} 💣`,
|
|
6152
6169
|
"使用“购买 物品名称”指令进行购买",
|
|
@@ -7338,6 +7355,8 @@ ${validTypes.join("、")}`;
|
|
|
7338
7355
|
);
|
|
7339
7356
|
}
|
|
7340
7357
|
infoBlocks.push(
|
|
7358
|
+
`条件:${item.condition}`,
|
|
7359
|
+
// 新增的条件字段
|
|
7341
7360
|
`特殊效果:${item.effects}`,
|
|
7342
7361
|
`描述:${item.description}`,
|
|
7343
7362
|
"------------------"
|
|
@@ -7618,9 +7637,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7618
7637
|
return [
|
|
7619
7638
|
`✦ 等级 ${romanNumerals[level.level]}`,
|
|
7620
7639
|
costDesc,
|
|
7621
|
-
// 修改后的价格显示
|
|
7622
7640
|
`▸ 基础效果:${level.description}`,
|
|
7623
|
-
|
|
7641
|
+
`▸ 职业效果:${level.careerBonus}`,
|
|
7624
7642
|
"------------------"
|
|
7625
7643
|
].join("\n");
|
|
7626
7644
|
});
|
|
@@ -7634,9 +7652,10 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7634
7652
|
return [
|
|
7635
7653
|
`🛠️ ${tech.techname} 科技详情 🛠️`,
|
|
7636
7654
|
`最大可升级等级:${romanNumerals[tech.maxLevel]}`,
|
|
7655
|
+
`适用职业:${tech.careerNames.join("、")}`,
|
|
7656
|
+
// 适用职业移动到最顶部
|
|
7637
7657
|
'使用 "升级 科技名称" 进行升级',
|
|
7638
7658
|
...discountInfo,
|
|
7639
|
-
// 插入折扣信息
|
|
7640
7659
|
"====================",
|
|
7641
7660
|
...techDetails
|
|
7642
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
|
};
|