koishi-plugin-ggcevo-game 1.3.13 → 1.3.14

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 +5 -10
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -2234,14 +2234,14 @@ function apply(ctx, config) {
2234
2234
  msg += priceInfo;
2235
2235
  let discountDetails = [];
2236
2236
  if (weaponDiscount > 0) {
2237
- discountDetails.push(`武器系统 Lv${techLevel} 折扣:${Math.round(weaponDiscount * 100)}%`);
2237
+ discountDetails.push(`${Math.round(weaponDiscount * 100)}% (武器系统 Lv${techLevel})`);
2238
2238
  }
2239
2239
  if (activeWish) {
2240
- discountDetails.push("灵狐升运折扣:20%");
2240
+ discountDetails.push("20% (灵狐升运祈愿生效)");
2241
2241
  }
2242
2242
  if (discountDetails.length > 0) {
2243
2243
  msg += `
2244
- 🔧 已应用折扣:${discountDetails.join(" + ")}`;
2244
+ 🔧 折扣:${discountDetails.join(" + ")}`;
2245
2245
  }
2246
2246
  msg += `
2247
2247
  💥 伤害:${damage}`;
@@ -2279,25 +2279,20 @@ function apply(ctx, config) {
2279
2279
  const priceDetails = BASE_COST.map((baseCost, index) => {
2280
2280
  const level = `${index}→${index + 1}`;
2281
2281
  let finalPrice = baseCost;
2282
- let discountTips = [];
2283
2282
  if (hasTechDiscount || hasFoxDiscount) {
2284
2283
  let discounted = baseCost;
2285
2284
  if (hasTechDiscount) {
2286
2285
  discounted *= 1 - techDiscountRate / 100;
2287
- discountTips.push(`科技折扣 ${techDiscountRate}%`);
2288
2286
  }
2289
2287
  if (hasFoxDiscount) {
2290
2288
  discounted *= 0.8;
2291
- discountTips.push(`灵狐折扣 20%`);
2292
2289
  }
2293
2290
  finalPrice = Math.floor(discounted);
2294
2291
  }
2295
- const totalDiscount = hasTechDiscount || hasFoxDiscount ? Math.round(100 - finalPrice / baseCost * 100) : 0;
2292
+ const showOriginal = finalPrice < baseCost;
2296
2293
  return [
2297
2294
  `等级 ${level.padEnd(5)}`,
2298
- ...totalDiscount > 0 ? [
2299
- `▸ 价格: ${finalPrice.toString().padStart(4)} (原价 ${baseCost})`
2300
- ] : []
2295
+ `▸ 价格: ${finalPrice.toString().padStart(4)}${showOriginal ? ` (原价 ${baseCost})` : ""}`
2301
2296
  ].join("\n");
2302
2297
  });
2303
2298
  const discountNotice = [];
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.3.13",
4
+ "version": "1.3.14",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [