koishi-plugin-ggcevo-game 1.2.58 → 1.2.60
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 +12 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1977,6 +1977,11 @@ ${itemDetails.join("\n")}`;
|
|
|
1977
1977
|
monthlyDays,
|
|
1978
1978
|
totalRewards: (record?.totalRewards || 0) + points
|
|
1979
1979
|
}]);
|
|
1980
|
+
await ctx.database.upsert("ggcevo_backpack", [{
|
|
1981
|
+
handle,
|
|
1982
|
+
itemId: 1,
|
|
1983
|
+
quantity: (backpack?.quantity || 0) + points
|
|
1984
|
+
}]);
|
|
1980
1985
|
if (redCrystal > 0) {
|
|
1981
1986
|
await ctx.database.upsert("ggcevo_careers", [{
|
|
1982
1987
|
handle,
|
|
@@ -3255,18 +3260,20 @@ ${achievementList.join("\n")}`;
|
|
|
3255
3260
|
await ctx.database.set("ggcevo_sign", targetHandle, { totalRewards: targetGold + goldTransfer });
|
|
3256
3261
|
}
|
|
3257
3262
|
if (isWin) {
|
|
3258
|
-
const [
|
|
3263
|
+
const [initiatorCareer2] = await ctx.database.get("ggcevo_careers", {
|
|
3259
3264
|
handle: initiatorHandle
|
|
3260
3265
|
});
|
|
3261
|
-
if (
|
|
3266
|
+
if (initiatorCareer2?.group === "辛迪加海盗") {
|
|
3262
3267
|
await ctx.database.upsert("ggcevo_careers", [{
|
|
3263
3268
|
handle: initiatorHandle,
|
|
3264
|
-
redcrystal: (
|
|
3269
|
+
redcrystal: (initiatorCareer2.redcrystal || 0) + 1
|
|
3265
3270
|
}], ["handle"]);
|
|
3266
|
-
result.push(`🔴 海盗阵营奖励:获得1红晶`);
|
|
3267
3271
|
}
|
|
3268
3272
|
}
|
|
3269
3273
|
});
|
|
3274
|
+
const [initiatorCareer] = await ctx.database.get("ggcevo_careers", {
|
|
3275
|
+
handle: initiatorHandle
|
|
3276
|
+
});
|
|
3270
3277
|
const result = [
|
|
3271
3278
|
`⚔️【对战结果】${isWin ? "胜利" : "失败"}`,
|
|
3272
3279
|
`🏅 挑战者:${initiatorRankname}(积分 ${initiatorRank})`,
|
|
@@ -3275,6 +3282,7 @@ ${achievementList.join("\n")}`;
|
|
|
3275
3282
|
`🎰 金币变动:${stealPercentage}%`
|
|
3276
3283
|
];
|
|
3277
3284
|
isWin ? result.push(`💰 您从对方的口袋里抢夺了${goldTransfer}枚金币`) : result.push(`💸 您从口袋里拿出了${goldTransfer}枚金币上交给对方`);
|
|
3285
|
+
isWin && initiatorCareer?.group === "辛迪加海盗" ? result.push(`🔴 海盗阵营奖励:获得1红晶`) : "";
|
|
3278
3286
|
result.push(`📅 剩余挑战次数:${config.dailyPKLimit - (initiatorPK.todayCount + 1)}`);
|
|
3279
3287
|
return result.join("\n");
|
|
3280
3288
|
} catch (error) {
|