koishi-plugin-ggcevo-game 1.6.76 → 1.6.78
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 +37 -21
- package/lib/items.d.ts +25 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -714,7 +714,12 @@ var initDefaultItems = {
|
|
|
714
714
|
"🥈S2赛季亚军勋章": { id: 112, type: "勋章", description: "" },
|
|
715
715
|
"🥉S2赛季季军勋章": { id: 113, type: "勋章", description: "" },
|
|
716
716
|
"🏅S2赛季前十勋章": { id: 114, type: "勋章", description: "" },
|
|
717
|
-
"🎖S2赛季前二十勋章": { id: 115, type: "勋章", description: "" }
|
|
717
|
+
"🎖S2赛季前二十勋章": { id: 115, type: "勋章", description: "" },
|
|
718
|
+
"🥇S3赛季冠军勋章": { id: 116, type: "勋章", description: "" },
|
|
719
|
+
"🥈S3赛季亚军勋章": { id: 117, type: "勋章", description: "" },
|
|
720
|
+
"🥉S3赛季季军勋章": { id: 118, type: "勋章", description: "" },
|
|
721
|
+
"🏅S3赛季前十勋章": { id: 119, type: "勋章", description: "" },
|
|
722
|
+
"🎖S3赛季前二十勋章": { id: 120, type: "勋章", description: "" }
|
|
718
723
|
};
|
|
719
724
|
var itemConfig = {
|
|
720
725
|
"拾荒者": { quality: "t3", type: "皮肤", cost: 3, quantity: 8, isLimited: false },
|
|
@@ -7835,7 +7840,18 @@ function apply(ctx, config) {
|
|
|
7835
7840
|
await ctx.database.set("ggcevo_sign", { handle: winner.handle }, {
|
|
7836
7841
|
totalRewards: signInfo.totalRewards + prize
|
|
7837
7842
|
});
|
|
7838
|
-
|
|
7843
|
+
const [guessRecord] = await ctx.database.get("ggcevo_guess", {
|
|
7844
|
+
handle: winner.handle,
|
|
7845
|
+
itemId: 1
|
|
7846
|
+
});
|
|
7847
|
+
const currentWins = guessRecord?.wins || 0;
|
|
7848
|
+
await ctx.database.set("ggcevo_guess", {
|
|
7849
|
+
handle: winner.handle,
|
|
7850
|
+
itemId: 1
|
|
7851
|
+
}, {
|
|
7852
|
+
wins: currentWins + 1
|
|
7853
|
+
});
|
|
7854
|
+
winMessages.push(`${winner.name}: 获得${prize}金币(第${currentWins + 1}次猜中)`);
|
|
7839
7855
|
}
|
|
7840
7856
|
}
|
|
7841
7857
|
await ctx.database.set("ggcevo_guess", {
|
|
@@ -7852,7 +7868,7 @@ function apply(ctx, config) {
|
|
|
7852
7868
|
...winMessages.length > 0 ? [
|
|
7853
7869
|
`🎉 猜中新主宰的玩家:`,
|
|
7854
7870
|
...winMessages
|
|
7855
|
-
//
|
|
7871
|
+
// 显示玩家名称、金额和猜中次数
|
|
7856
7872
|
] : []
|
|
7857
7873
|
].join("\n");
|
|
7858
7874
|
await ctx.broadcast(groupIds, broadcastMsg);
|
|
@@ -8639,12 +8655,12 @@ ${ticketMessage}${effectMessage}`;
|
|
|
8639
8655
|
for (const [index, player] of rankedPlayers.entries()) {
|
|
8640
8656
|
const rank = index + 1;
|
|
8641
8657
|
const coins = getCoinsByRank(rank);
|
|
8642
|
-
await updateBackpack(player.handle,
|
|
8658
|
+
await updateBackpack(player.handle, 1, coins);
|
|
8643
8659
|
const medalType = getMedalType(rank);
|
|
8644
8660
|
const medalName = requiredMedals[medalType];
|
|
8645
8661
|
const medalId = initDefaultItems[medalName].id;
|
|
8646
8662
|
await updateBackpack(player.handle, medalId, 1);
|
|
8647
|
-
playerDetails.push(`✦ 第${rank}名:${player.
|
|
8663
|
+
playerDetails.push(`✦ 第${rank}名:${player.name} - ${coins}咕咕币 + ${medalName}`);
|
|
8648
8664
|
}
|
|
8649
8665
|
report += "🏆 精英玩家奖励:\n" + playerDetails.join("\n") + "\n\n";
|
|
8650
8666
|
const otherPlayers = await ctx.database.get("ggcevo_rank", {
|
|
@@ -8655,16 +8671,16 @@ ${ticketMessage}${effectMessage}`;
|
|
|
8655
8671
|
for (const player of otherPlayers) {
|
|
8656
8672
|
if (player.rank > 0) {
|
|
8657
8673
|
positiveCount++;
|
|
8658
|
-
await updateBackpack(player.handle,
|
|
8674
|
+
await updateBackpack(player.handle, 1, 20);
|
|
8659
8675
|
} else {
|
|
8660
8676
|
negativeCount++;
|
|
8661
|
-
await updateBackpack(player.handle,
|
|
8677
|
+
await updateBackpack(player.handle, 1, 10);
|
|
8662
8678
|
}
|
|
8663
8679
|
}
|
|
8664
8680
|
report += "🎉 参与奖励发放:\n";
|
|
8665
|
-
report += `✦ 积极玩家(分数>0):${positiveCount}人
|
|
8681
|
+
report += `✦ 积极玩家(分数>0):${positiveCount}人 x 20咕咕币
|
|
8666
8682
|
`;
|
|
8667
|
-
report += `✦ 奋斗玩家(分数≤0):${negativeCount}人
|
|
8683
|
+
report += `✦ 奋斗玩家(分数≤0):${negativeCount}人 x 10咕咕币
|
|
8668
8684
|
|
|
8669
8685
|
`;
|
|
8670
8686
|
report += `✅ 总计发放:
|
|
@@ -12767,9 +12783,9 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
12767
12783
|
].join("\n");
|
|
12768
12784
|
}
|
|
12769
12785
|
const parsedItemId = parseInt(itemId);
|
|
12770
|
-
if (isNaN(parsedItemId)) return
|
|
12786
|
+
if (isNaN(parsedItemId)) return '⚠️ 项目ID必须是数字\n使用"竞猜 项目ID 金额 内容"下注';
|
|
12771
12787
|
const targetItem = availableItems.find((item) => item.id === parsedItemId);
|
|
12772
|
-
if (!targetItem) return
|
|
12788
|
+
if (!targetItem) return '⚠️ 无效的项目ID或项目不可用\n使用"竞猜 项目ID 金额 内容"下注';
|
|
12773
12789
|
if (!amount && !guess) {
|
|
12774
12790
|
const [userBet] = await ctx.database.get("ggcevo_guess", {
|
|
12775
12791
|
handle,
|
|
@@ -12786,10 +12802,10 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
12786
12802
|
`您的状态: ${betInfo}`
|
|
12787
12803
|
].join("\n");
|
|
12788
12804
|
}
|
|
12789
|
-
if (!amount) return
|
|
12790
|
-
if (!guess) return
|
|
12805
|
+
if (!amount) return '⚠️ 格式错误,请使用"竞猜 项目ID 金额 内容"下注';
|
|
12806
|
+
if (!guess) return '⚠️ 格式错误,请使用"竞猜 项目ID 金额 内容"下注';
|
|
12791
12807
|
const betAmount = parseInt(amount);
|
|
12792
|
-
if (isNaN(betAmount) || betAmount < 1) return
|
|
12808
|
+
if (isNaN(betAmount) || betAmount < 1) return '⚠️ 参数错误,请使用"竞猜 项目ID 金额 内容"下注';
|
|
12793
12809
|
if (betAmount < targetItem.minBet) {
|
|
12794
12810
|
return `⚠️ 下注金额必须≥${targetItem.minBet}金币 (当前项目最低投注)`;
|
|
12795
12811
|
}
|
|
@@ -13153,18 +13169,18 @@ PK同玩家限战:1次/日
|
|
|
13153
13169
|
return `
|
|
13154
13170
|
🏆 赛季排名奖励规则:
|
|
13155
13171
|
🥇 第1名:
|
|
13156
|
-
100
|
|
13172
|
+
100 咕咕币 + 🥇 赛季冠军勋章
|
|
13157
13173
|
🥈 第2名:
|
|
13158
|
-
90
|
|
13174
|
+
90 咕咕币 + 🥈 赛季亚军勋章
|
|
13159
13175
|
🥉 第3名:
|
|
13160
|
-
80
|
|
13176
|
+
80 咕咕币 + 🥉 赛季季军勋章
|
|
13161
13177
|
🏅 第4-10名:
|
|
13162
|
-
60
|
|
13178
|
+
60 咕咕币 + 🏅 赛季前十勋章
|
|
13163
13179
|
🎖 第11-20名:
|
|
13164
|
-
40
|
|
13180
|
+
40 咕咕币 + 🎖 赛季前二十勋章
|
|
13165
13181
|
💝 参与奖励:
|
|
13166
|
-
▸ 所有积分 > 0 玩家:20
|
|
13167
|
-
▸ 所有积分 ≤ 0 玩家:10
|
|
13182
|
+
▸ 所有积分 > 0 玩家:20 咕咕币
|
|
13183
|
+
▸ 所有积分 ≤ 0 玩家:10 咕咕币
|
|
13168
13184
|
|
|
13169
13185
|
📦 勋章系统:
|
|
13170
13186
|
● 每个勋章对应专属成就
|
package/lib/items.d.ts
CHANGED
|
@@ -206,6 +206,31 @@ export declare const initDefaultItems: {
|
|
|
206
206
|
type: string;
|
|
207
207
|
description: string;
|
|
208
208
|
};
|
|
209
|
+
'\uD83E\uDD47S3\u8D5B\u5B63\u51A0\u519B\u52CB\u7AE0': {
|
|
210
|
+
id: number;
|
|
211
|
+
type: string;
|
|
212
|
+
description: string;
|
|
213
|
+
};
|
|
214
|
+
'\uD83E\uDD48S3\u8D5B\u5B63\u4E9A\u519B\u52CB\u7AE0': {
|
|
215
|
+
id: number;
|
|
216
|
+
type: string;
|
|
217
|
+
description: string;
|
|
218
|
+
};
|
|
219
|
+
'\uD83E\uDD49S3\u8D5B\u5B63\u5B63\u519B\u52CB\u7AE0': {
|
|
220
|
+
id: number;
|
|
221
|
+
type: string;
|
|
222
|
+
description: string;
|
|
223
|
+
};
|
|
224
|
+
'\uD83C\uDFC5S3\u8D5B\u5B63\u524D\u5341\u52CB\u7AE0': {
|
|
225
|
+
id: number;
|
|
226
|
+
type: string;
|
|
227
|
+
description: string;
|
|
228
|
+
};
|
|
229
|
+
'\uD83C\uDF96S3\u8D5B\u5B63\u524D\u4E8C\u5341\u52CB\u7AE0': {
|
|
230
|
+
id: number;
|
|
231
|
+
type: string;
|
|
232
|
+
description: string;
|
|
233
|
+
};
|
|
209
234
|
};
|
|
210
235
|
export declare const itemConfig: {
|
|
211
236
|
拾荒者: {
|