koishi-plugin-ggcevo-game 1.4.61 → 1.4.62

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 +3 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -5169,11 +5169,11 @@ async function updateDatabaseWithStats(ctx, stats) {
5169
5169
  updateData.energy = Math.max(0, Math.min(maxEnergy, newEnergy));
5170
5170
  }
5171
5171
  if (stats.skillStacksChanged !== 0) {
5172
- updateData.skillStacks = Math.max(0, boss.skillStacks + stats.skillStacksChanged);
5172
+ const newStacks = boss.skillStacks + stats.skillStacksChanged;
5173
+ updateData.skillStacks = Math.max(0, Math.min(maxStacks, newStacks));
5173
5174
  }
5174
5175
  if (stats.skillStatusChanged !== 0) {
5175
- const newStatus = boss.skillStatus + stats.skillStatusChanged;
5176
- updateData.skillStatus = Math.max(0, Math.min(maxStacks, newStatus));
5176
+ updateData.skillStatus = Math.max(0, boss.skillStatus + stats.skillStatusChanged);
5177
5177
  }
5178
5178
  if (stats.statusLayersChanged !== 0) {
5179
5179
  updateData.statusLayers = Math.max(0, boss.statusLayers + stats.statusLayersChanged);
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.4.61",
4
+ "version": "1.4.62",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [