koishi-plugin-ggcevo-game 1.2.57 → 1.2.59
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 +9 -6
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -3255,18 +3255,20 @@ ${achievementList.join("\n")}`;
|
|
|
3255
3255
|
await ctx.database.set("ggcevo_sign", targetHandle, { totalRewards: targetGold + goldTransfer });
|
|
3256
3256
|
}
|
|
3257
3257
|
if (isWin) {
|
|
3258
|
-
const [
|
|
3258
|
+
const [initiatorCareer2] = await ctx.database.get("ggcevo_careers", {
|
|
3259
3259
|
handle: initiatorHandle
|
|
3260
3260
|
});
|
|
3261
|
-
if (
|
|
3261
|
+
if (initiatorCareer2?.group === "辛迪加海盗") {
|
|
3262
3262
|
await ctx.database.upsert("ggcevo_careers", [{
|
|
3263
3263
|
handle: initiatorHandle,
|
|
3264
|
-
redcrystal: (
|
|
3264
|
+
redcrystal: (initiatorCareer2.redcrystal || 0) + 1
|
|
3265
3265
|
}], ["handle"]);
|
|
3266
|
-
result.push(`🔴 海盗阵营奖励:获得1红晶`);
|
|
3267
3266
|
}
|
|
3268
3267
|
}
|
|
3269
3268
|
});
|
|
3269
|
+
const [initiatorCareer] = await ctx.database.get("ggcevo_careers", {
|
|
3270
|
+
handle: initiatorHandle
|
|
3271
|
+
});
|
|
3270
3272
|
const result = [
|
|
3271
3273
|
`⚔️【对战结果】${isWin ? "胜利" : "失败"}`,
|
|
3272
3274
|
`🏅 挑战者:${initiatorRankname}(积分 ${initiatorRank})`,
|
|
@@ -3275,6 +3277,7 @@ ${achievementList.join("\n")}`;
|
|
|
3275
3277
|
`🎰 金币变动:${stealPercentage}%`
|
|
3276
3278
|
];
|
|
3277
3279
|
isWin ? result.push(`💰 您从对方的口袋里抢夺了${goldTransfer}枚金币`) : result.push(`💸 您从口袋里拿出了${goldTransfer}枚金币上交给对方`);
|
|
3280
|
+
isWin && initiatorCareer?.group === "辛迪加海盗" ? result.push(`🔴 海盗阵营奖励:获得1红晶`) : "";
|
|
3278
3281
|
result.push(`📅 剩余挑战次数:${config.dailyPKLimit - (initiatorPK.todayCount + 1)}`);
|
|
3279
3282
|
return result.join("\n");
|
|
3280
3283
|
} catch (error) {
|
|
@@ -4096,7 +4099,7 @@ ${validTypes.join("、")}`;
|
|
|
4096
4099
|
}
|
|
4097
4100
|
await session.send(`请问你确定要缴纳1000金币加入人类联盟吗?(请在30秒内输入“是”确定加入)`);
|
|
4098
4101
|
const cost = await session.prompt(3e4);
|
|
4099
|
-
if (
|
|
4102
|
+
if (cost !== "是") return "已取消加入。";
|
|
4100
4103
|
await ctx.database.upsert("ggcevo_sign", [{
|
|
4101
4104
|
handle,
|
|
4102
4105
|
totalRewards: signData?.totalRewards - 1e3
|
|
@@ -4118,7 +4121,7 @@ ${validTypes.join("、")}`;
|
|
|
4118
4121
|
}
|
|
4119
4122
|
await session.send(`请问你确定要缴纳2000金币并且永久开启PK功能加入辛迪加海盗吗?(请在30秒内输入“是”确定加入)`);
|
|
4120
4123
|
const cost = await session.prompt(3e4);
|
|
4121
|
-
if (
|
|
4124
|
+
if (cost !== "是") return "已取消加入。";
|
|
4122
4125
|
await ctx.database.upsert("ggcevo_sign", [{
|
|
4123
4126
|
handle,
|
|
4124
4127
|
totalRewards: signData?.totalRewards - 2e3
|