koishi-plugin-ggcevo-game 1.3.13 → 1.3.15

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 +8 -14
  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 = [];
@@ -4231,23 +4226,22 @@ ${validTypes.join("、")}`;
4231
4226
  }], ["handle", "itemId"]);
4232
4227
  }
4233
4228
  });
4234
- let message = `✅ 成功获取 ${isWeapon ? "武器" : "物品"}「${item}」
4229
+ let message = `✅ 成功购买${isWeapon ? "武器" : "物品"}「${item}」
4235
4230
  `;
4236
4231
  message += `花费 ${actualPrice} 金币`;
4237
4232
  if (discountDetails.length > 0) {
4238
- message += `(原价 ${config2.price} 金币)
4233
+ message += `(原价 ${config2.price} 金币)
4239
4234
  折扣明细:
4240
4235
  ▸ ${discountDetails.join("\n▸ ")}`;
4241
4236
  }
4242
4237
  if (isWeapon) {
4243
4238
  if (isAutoEquipped) {
4244
- message += "\n\n【系统已自动装备该武器】";
4239
+ message += "\n【系统已自动装备该武器】";
4245
4240
  }
4246
4241
  message += "\n输入「武器仓库」查看详情";
4247
4242
  } else {
4248
4243
  const [current] = await ctx.database.get("ggcevo_warehouse", { handle, itemId: config2.id });
4249
4244
  message += `
4250
-
4251
4245
  当前持有数量:${current?.quantity || 1},输入「仓库」查看物品`;
4252
4246
  }
4253
4247
  return message;
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.15",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [