koishi-plugin-ggcevo-game 1.2.58 → 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.
Files changed (2) hide show
  1. package/lib/index.js +7 -4
  2. 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 [initiatorCareer] = await ctx.database.get("ggcevo_careers", {
3258
+ const [initiatorCareer2] = await ctx.database.get("ggcevo_careers", {
3259
3259
  handle: initiatorHandle
3260
3260
  });
3261
- if (initiatorCareer?.group === "辛迪加海盗") {
3261
+ if (initiatorCareer2?.group === "辛迪加海盗") {
3262
3262
  await ctx.database.upsert("ggcevo_careers", [{
3263
3263
  handle: initiatorHandle,
3264
- redcrystal: (initiatorCareer.redcrystal || 0) + 1
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) {
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.2.58",
4
+ "version": "1.2.59",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [