koishi-plugin-ggcevo-game 1.4.77 → 1.4.78
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 +128 -119
- package/lib/utils.d.ts +5 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -715,7 +715,7 @@ var syndicatePirateConfig = [
|
|
|
715
715
|
effect: "武器等级上限为7级; 升级武器享有10%的折扣; 购买M4AE脉冲步枪(传奇)享有50%的折扣",
|
|
716
716
|
requirements: "至少拥有一把6级及以上等级的武器",
|
|
717
717
|
Jobtransfer: true,
|
|
718
|
-
costredcrystal:
|
|
718
|
+
costredcrystal: 40
|
|
719
719
|
},
|
|
720
720
|
{
|
|
721
721
|
professionName: "猩红杀手",
|
|
@@ -740,31 +740,31 @@ var syndicatePirateConfig = [
|
|
|
740
740
|
},
|
|
741
741
|
{
|
|
742
742
|
professionName: "计算机专家",
|
|
743
|
-
effect: "
|
|
743
|
+
effect: "黑市订购设备工具类享有50%折扣; 被动应战的PK对战结果为失败时,不会损失金币;购买DG-3电弧步枪(传奇)享有50%的折扣",
|
|
744
744
|
requirements: "仓库中至少拥有一个黑市订购的设备工具类物品",
|
|
745
745
|
Jobtransfer: true,
|
|
746
746
|
costredcrystal: 30
|
|
747
747
|
},
|
|
748
748
|
{
|
|
749
749
|
professionName: "指挥官",
|
|
750
|
-
effect: "
|
|
750
|
+
effect: "可以使用红晶升级独特的辛迪加空间站科技;购买光剑(传奇)享有50%的折扣",
|
|
751
751
|
requirements: "",
|
|
752
752
|
Jobtransfer: false,
|
|
753
753
|
costredcrystal: 10
|
|
754
754
|
},
|
|
755
755
|
{
|
|
756
756
|
professionName: "装甲兵",
|
|
757
|
-
effect: "",
|
|
758
|
-
requirements: "",
|
|
759
|
-
Jobtransfer:
|
|
760
|
-
costredcrystal:
|
|
757
|
+
effect: "所有武器额外拥有一个改装槽;武器改装任意模块享有10%的折扣;购买外星电浆(传奇)享有50%的折扣",
|
|
758
|
+
requirements: "至少拥有一把改装3个模块的武器",
|
|
759
|
+
Jobtransfer: true,
|
|
760
|
+
costredcrystal: 40
|
|
761
761
|
},
|
|
762
762
|
{
|
|
763
763
|
professionName: "破坏者",
|
|
764
|
-
effect: "
|
|
764
|
+
effect: "黑市订购爆破物类享有50%折扣;购买核聚变重炮(传奇)享有50%的折扣",
|
|
765
765
|
requirements: "仓库中至少拥有一个黑市订购的爆破物类物品",
|
|
766
766
|
Jobtransfer: true,
|
|
767
|
-
costredcrystal:
|
|
767
|
+
costredcrystal: 30
|
|
768
768
|
},
|
|
769
769
|
{
|
|
770
770
|
professionName: "征募官",
|
|
@@ -888,6 +888,18 @@ async function checkTransferRequirements(ctx, handle, profession) {
|
|
|
888
888
|
success: hasExplosive,
|
|
889
889
|
message: hasExplosive ? "" : "需要仓库中拥有一个从黑市订购的爆破物类物品"
|
|
890
890
|
};
|
|
891
|
+
case "装甲兵": {
|
|
892
|
+
const userWeapons = await ctx.database.get("ggcevo_weapons", {
|
|
893
|
+
handle
|
|
894
|
+
});
|
|
895
|
+
const hasModifiedWeapon = userWeapons.some(
|
|
896
|
+
(weapon) => weapon.installedMods && weapon.installedMods.length >= 3
|
|
897
|
+
);
|
|
898
|
+
return {
|
|
899
|
+
success: hasModifiedWeapon,
|
|
900
|
+
message: hasModifiedWeapon ? "" : "需要至少拥有一把改装了3个模块的武器"
|
|
901
|
+
};
|
|
902
|
+
}
|
|
891
903
|
case "清洁工":
|
|
892
904
|
if (!mainBoss) return { success: false, message: "当前暂无伤害榜。" };
|
|
893
905
|
const cleanTop20 = await ctx.database.select("ggcevo_boss_damage").where({ bossGroupId: mainBoss.groupId }).orderBy("totalDamage", "desc").limit(20).execute();
|
|
@@ -3041,6 +3053,7 @@ var BattleEffectProcessor = {
|
|
|
3041
3053
|
const currentLayers = targetBoss.radiationLayers || 0;
|
|
3042
3054
|
const armorReduction = currentLayers * 0.05;
|
|
3043
3055
|
if (currentLayers > 0) {
|
|
3056
|
+
messages.push(`☢️ 【辐射】:当前${currentLayers}层,护甲值减少${armorReduction.toFixed(2)}`);
|
|
3044
3057
|
}
|
|
3045
3058
|
let targetUpdates = null;
|
|
3046
3059
|
if (weaponName === "伽马枪" && // 使用伽马枪
|
|
@@ -3049,10 +3062,8 @@ var BattleEffectProcessor = {
|
|
|
3049
3062
|
targetUpdates = {
|
|
3050
3063
|
name: targetBoss.name,
|
|
3051
3064
|
updates: {
|
|
3052
|
-
radiationLayersChange: 1
|
|
3065
|
+
radiationLayersChange: 1
|
|
3053
3066
|
// 辐射层数增加1
|
|
3054
|
-
armorChange: -0.05
|
|
3055
|
-
// 同时削减0.05护甲值(永久生效)
|
|
3056
3067
|
}
|
|
3057
3068
|
};
|
|
3058
3069
|
const newLayers = currentLayers + 1;
|
|
@@ -3919,7 +3930,7 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
|
|
|
3919
3930
|
if (careerData?.career === "猩红杀手" && weaponName === "侦察步枪") {
|
|
3920
3931
|
armorDamageReduction = 1;
|
|
3921
3932
|
}
|
|
3922
|
-
armor = targetBoss.armor;
|
|
3933
|
+
armor = targetBoss.armor - targetBoss.radiationLayers;
|
|
3923
3934
|
if (targetBoss.name === "测试假人") {
|
|
3924
3935
|
armor = targetBoss.armor;
|
|
3925
3936
|
}
|
|
@@ -4987,9 +4998,13 @@ function formatTime(date) {
|
|
|
4987
4998
|
__name(formatTime, "formatTime");
|
|
4988
4999
|
var legendaryDiscounts = {
|
|
4989
5000
|
"MK-4激光步枪": ["能量武器专家"],
|
|
5001
|
+
"M4AE脉冲步枪": ["枪手"],
|
|
4990
5002
|
"DSR-55反器材步枪": ["猩红杀手"],
|
|
4991
5003
|
"龙息霰弹枪": ["纵火狂"],
|
|
4992
|
-
"
|
|
5004
|
+
"DG-3电弧步枪": ["计算机专家"],
|
|
5005
|
+
"光剑": ["指挥官"],
|
|
5006
|
+
"外星电浆": ["装甲兵"],
|
|
5007
|
+
"核聚变重炮": ["破坏者"]
|
|
4993
5008
|
};
|
|
4994
5009
|
|
|
4995
5010
|
// src/boss/damagecalculation.ts
|
|
@@ -8205,22 +8220,24 @@ ${validTypes.join("、")}`;
|
|
|
8205
8220
|
const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
|
|
8206
8221
|
const techLevel = techData?.level || 0;
|
|
8207
8222
|
const isCareerMatch = ["武器中士", "情报副官"].includes(careerData?.career);
|
|
8223
|
+
const isArmoredPirate = careerData?.career === "装甲兵" && careerData?.group === "辛迪加海盗";
|
|
8208
8224
|
const calculateDiscountRate = /* @__PURE__ */ __name((isExclusive) => {
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
const careerDiscount = isCareerMatch ? 10 : 0;
|
|
8220
|
-
return Math.max(baseDiscount, careerDiscount);
|
|
8225
|
+
let discount = 0;
|
|
8226
|
+
if (careerData?.group === "人类联盟") {
|
|
8227
|
+
if (isExclusive) {
|
|
8228
|
+
if (techLevel >= 2) {
|
|
8229
|
+
discount = Math.max(5, isCareerMatch ? 10 : 0);
|
|
8230
|
+
}
|
|
8231
|
+
} else {
|
|
8232
|
+
if (techLevel >= 1) {
|
|
8233
|
+
discount = Math.max(5, isCareerMatch ? 10 : 0);
|
|
8234
|
+
}
|
|
8221
8235
|
}
|
|
8222
|
-
return 0;
|
|
8223
8236
|
}
|
|
8237
|
+
if (isArmoredPirate) {
|
|
8238
|
+
discount += 10;
|
|
8239
|
+
}
|
|
8240
|
+
return Math.min(discount, 100);
|
|
8224
8241
|
}, "calculateDiscountRate");
|
|
8225
8242
|
const processModInstallation = /* @__PURE__ */ __name(async () => {
|
|
8226
8243
|
const modInfo = modConfig[mod];
|
|
@@ -8239,8 +8256,9 @@ ${validTypes.join("、")}`;
|
|
|
8239
8256
|
const hasExclusive = equipment.installedMods.some((m) => modConfig[m]?.isExclusive);
|
|
8240
8257
|
if (hasExclusive) return "❌ 每个武器只能安装一个专属模块。";
|
|
8241
8258
|
}
|
|
8242
|
-
|
|
8243
|
-
|
|
8259
|
+
const actualSlots = equipment.modificationSlots + (isArmoredPirate ? 1 : 0);
|
|
8260
|
+
if (equipment.installedMods.length >= actualSlots) {
|
|
8261
|
+
return `❌ 当前可用改装槽已满(武器升级至3/6级会额外获得一个改装槽${isArmoredPirate ? ",装甲兵职业额外获得一个改装槽" : ""})。`;
|
|
8244
8262
|
}
|
|
8245
8263
|
if (equipment.installedMods.includes(mod)) {
|
|
8246
8264
|
return "❌ 已安装相同模块。";
|
|
@@ -8259,11 +8277,25 @@ ${validTypes.join("、")}`;
|
|
|
8259
8277
|
await ctx.database.set("ggcevo_sign", { handle }, {
|
|
8260
8278
|
totalRewards: signInfo.totalRewards - actualCost
|
|
8261
8279
|
});
|
|
8280
|
+
const discountMessages = [];
|
|
8281
|
+
if (discountRate > 0) {
|
|
8282
|
+
discountMessages.push(`💰 折扣明细:`);
|
|
8283
|
+
if (careerData?.group === "人类联盟") {
|
|
8284
|
+
if (modInfo.isExclusive && techLevel >= 2) {
|
|
8285
|
+
discountMessages.push(`▸ ⚙️ 武器升级平台Lv.${techLevel}:${isCareerMatch ? 10 : 5}%折扣`);
|
|
8286
|
+
} else if (!modInfo.isExclusive && techLevel >= 1) {
|
|
8287
|
+
discountMessages.push(`▸ ⚙️ 武器升级平台Lv.${techLevel}:${isCareerMatch ? 10 : 5}%折扣`);
|
|
8288
|
+
}
|
|
8289
|
+
}
|
|
8290
|
+
if (isArmoredPirate) {
|
|
8291
|
+
discountMessages.push("▸ 🔰 装甲兵职业:10%折扣");
|
|
8292
|
+
}
|
|
8293
|
+
}
|
|
8262
8294
|
return [
|
|
8263
8295
|
`✅ ${weapon} 成功安装 ${mod}!`,
|
|
8264
8296
|
`花费金币:${actualCost}${discountRate > 0 ? ` (原价${modInfo.cost})` : ""}`,
|
|
8265
|
-
|
|
8266
|
-
`改装槽:${equipment.installedMods.length + 1}/${
|
|
8297
|
+
discountMessages.length > 0 && discountMessages.join("\n"),
|
|
8298
|
+
`改装槽:${equipment.installedMods.length + 1}/${actualSlots} ${isArmoredPirate ? "(装甲兵职业额外获得一个改装槽)" : ""}`
|
|
8267
8299
|
].filter(Boolean).join("\n");
|
|
8268
8300
|
}, "processModInstallation");
|
|
8269
8301
|
const showModList = /* @__PURE__ */ __name(async () => {
|
|
@@ -8297,22 +8329,30 @@ ${validTypes.join("、")}`;
|
|
|
8297
8329
|
"------------------"
|
|
8298
8330
|
].join("\n");
|
|
8299
8331
|
}).join("\n") : "❌ 该武器没有可用的专属模块";
|
|
8332
|
+
const armorMessage = isArmoredPirate ? "🔰 装甲兵职业:\n▸ 武器改装槽+1" : "";
|
|
8300
8333
|
return [
|
|
8301
8334
|
`🛠️ ${weapon} 专属模块 🛠️`,
|
|
8302
8335
|
"使用「改装 武器名称 模块名称」安装",
|
|
8303
8336
|
"※ 每个武器只能安装一个专属模块",
|
|
8304
|
-
|
|
8305
|
-
|
|
8337
|
+
armorMessage,
|
|
8338
|
+
// 新增装甲兵提示
|
|
8339
|
+
exclusiveDiscountRate > 0 && `💰 当前专属模块折扣:`,
|
|
8340
|
+
exclusiveDiscountRate > 0 && careerData?.group === "人类联盟" && techLevel >= 2 && `▸ ⚙️ 武器升级平台Lv.${techLevel}:${exclusiveDiscountRate}%折扣`,
|
|
8341
|
+
exclusiveDiscountRate > 0 && isArmoredPirate && "▸ 🔰 装甲兵职业:10%折扣",
|
|
8306
8342
|
"====================",
|
|
8307
8343
|
exclusiveList
|
|
8308
8344
|
].filter(Boolean).join("\n");
|
|
8309
8345
|
} else {
|
|
8346
|
+
const armorMessage = isArmoredPirate ? "🔰 装甲兵职业:\n▸ 武器改装槽+1" : "";
|
|
8310
8347
|
return [
|
|
8311
8348
|
"🛠️ 通用武器模块 🛠️",
|
|
8312
8349
|
"使用「改装 武器名称 模块名称」安装通用模块",
|
|
8313
8350
|
"※ 使用「改装 武器名称」查询武器专属模块",
|
|
8314
|
-
|
|
8315
|
-
|
|
8351
|
+
armorMessage,
|
|
8352
|
+
// 新增装甲兵提示
|
|
8353
|
+
universalDiscountRate > 0 && `💰 当前通用模块折扣:`,
|
|
8354
|
+
universalDiscountRate > 0 && careerData?.group === "人类联盟" && techLevel >= 1 && `▸ ⚙️ 武器升级平台Lv.${techLevel}:${universalDiscountRate}%折扣`,
|
|
8355
|
+
universalDiscountRate > 0 && isArmoredPirate && "▸ 🔰 装甲兵职业:10%折扣",
|
|
8316
8356
|
"====================",
|
|
8317
8357
|
buildModList(false)
|
|
8318
8358
|
].filter(Boolean).join("\n");
|
|
@@ -9270,21 +9310,6 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
9270
9310
|
return "🚫 该功能需要【辛迪加海盗】阵营权限";
|
|
9271
9311
|
}
|
|
9272
9312
|
const currentCareer = careerData.career;
|
|
9273
|
-
const discountProfessions = {
|
|
9274
|
-
"计算机专家": ["设备工具"],
|
|
9275
|
-
"破坏者": ["爆破物"]
|
|
9276
|
-
};
|
|
9277
|
-
Object.keys(legendaryDiscounts).forEach((item) => {
|
|
9278
|
-
if (legendaryDiscounts[item].includes(currentCareer)) {
|
|
9279
|
-
const category2 = weaponConfig[item]?.category;
|
|
9280
|
-
if (category2 && !discountProfessions[currentCareer]?.includes(category2)) {
|
|
9281
|
-
discountProfessions[currentCareer] = [
|
|
9282
|
-
...discountProfessions[currentCareer] || [],
|
|
9283
|
-
category2
|
|
9284
|
-
];
|
|
9285
|
-
}
|
|
9286
|
-
}
|
|
9287
|
-
});
|
|
9288
9313
|
const categoryStats = {};
|
|
9289
9314
|
Object.values(weaponConfig).filter((config2) => config2.redCrystalCost > 0).forEach((weapon) => {
|
|
9290
9315
|
categoryStats[weapon.category] = (categoryStats[weapon.category] || 0) + 1;
|
|
@@ -9294,16 +9319,23 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
9294
9319
|
});
|
|
9295
9320
|
if (!category) {
|
|
9296
9321
|
const discountLines = [];
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9322
|
+
if (currentCareer === "破坏者") {
|
|
9323
|
+
discountLines.push(`▸ 破坏者职业:爆破物类50%折扣`);
|
|
9324
|
+
}
|
|
9325
|
+
if (currentCareer === "计算机专家") {
|
|
9326
|
+
discountLines.push(`▸ 计算机专家职业:设备工具类50%折扣`);
|
|
9327
|
+
}
|
|
9328
|
+
Object.entries(legendaryDiscounts).forEach(([item, professions]) => {
|
|
9329
|
+
if (professions.includes(currentCareer)) {
|
|
9330
|
+
const category2 = weaponConfig[item]?.category;
|
|
9331
|
+
discountLines.push(`▸ ${currentCareer}职业:${item}(传奇)50%折扣`);
|
|
9332
|
+
}
|
|
9301
9333
|
});
|
|
9302
9334
|
return [
|
|
9303
9335
|
"🏴 辛迪加黑市 🏴",
|
|
9304
9336
|
'使用 "黑市 分类名称" 查看详细信息',
|
|
9305
9337
|
discountLines.length ? [
|
|
9306
|
-
"💰
|
|
9338
|
+
"💰 折扣明细:",
|
|
9307
9339
|
...discountLines
|
|
9308
9340
|
].join("\n") : "",
|
|
9309
9341
|
"====================",
|
|
@@ -9311,40 +9343,42 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
9311
9343
|
"===================="
|
|
9312
9344
|
].join("\n");
|
|
9313
9345
|
}
|
|
9314
|
-
|
|
9315
|
-
|
|
9346
|
+
if (!Object.keys(categoryStats).includes(category)) {
|
|
9347
|
+
return `无效黑市分类,可用分类:
|
|
9348
|
+
${Object.keys(categoryStats).join("、")}`;
|
|
9349
|
+
}
|
|
9350
|
+
const discountDetails = [];
|
|
9351
|
+
if (currentCareer === "破坏者" && category === "爆破物") {
|
|
9352
|
+
discountDetails.push(`▸ 破坏者职业:爆破物类50%折扣`);
|
|
9353
|
+
}
|
|
9354
|
+
if (currentCareer === "计算机专家" && category === "设备工具") {
|
|
9355
|
+
discountDetails.push(`▸ 计算机专家职业:设备工具类50%折扣`);
|
|
9356
|
+
}
|
|
9357
|
+
Object.entries(legendaryDiscounts).forEach(([weapon, professions]) => {
|
|
9358
|
+
if (professions.includes(currentCareer) && weaponConfig[weapon]?.category === category) {
|
|
9359
|
+
discountDetails.push(`▸ ${currentCareer}职业:${weapon}(传奇)50%折扣`);
|
|
9360
|
+
}
|
|
9361
|
+
});
|
|
9316
9362
|
const items = [
|
|
9317
9363
|
...Object.entries(weaponConfig).filter(
|
|
9318
|
-
([_, config2]) => config2.category ===
|
|
9364
|
+
([_, config2]) => config2.category === category && config2.redCrystalCost > 0
|
|
9319
9365
|
).map(([name2, config2]) => {
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
discountProfession = currentCareer;
|
|
9325
|
-
}
|
|
9326
|
-
const armorDamageDesc = (() => {
|
|
9327
|
-
if (config2.armorDamageReduction === 0) {
|
|
9328
|
-
return `护甲减伤:0`;
|
|
9329
|
-
} else if (config2.armorDamageReduction > 0) {
|
|
9330
|
-
return `护甲减伤:${config2.armorDamageReduction}(每点护甲扣除${config2.armorDamageReduction}点伤害)`;
|
|
9331
|
-
} else {
|
|
9332
|
-
return `护甲减伤:${config2.armorDamageReduction}(每点护甲增加${Math.abs(config2.armorDamageReduction)}点伤害)`;
|
|
9333
|
-
}
|
|
9334
|
-
})();
|
|
9366
|
+
const isDiscount = legendaryDiscounts[name2]?.includes(currentCareer);
|
|
9367
|
+
const originalPrice = config2.redCrystalCost;
|
|
9368
|
+
const discountPrice = isDiscount ? Math.floor(originalPrice * 0.5) : originalPrice;
|
|
9369
|
+
const armorDamageDesc = config2.armorDamageReduction === 0 ? `护甲减伤:0` : `护甲减伤:${config2.armorDamageReduction}`;
|
|
9335
9370
|
const infoBlocks = [
|
|
9336
9371
|
`【${name2}】`,
|
|
9337
|
-
|
|
9372
|
+
`类型:${config2.type}`,
|
|
9338
9373
|
`基础伤害:${config2.damage}`,
|
|
9339
9374
|
armorDamageDesc
|
|
9340
9375
|
];
|
|
9341
|
-
if (
|
|
9376
|
+
if (isDiscount) {
|
|
9342
9377
|
infoBlocks.push(
|
|
9343
|
-
`订购价:${discountPrice}红晶 (原价${
|
|
9344
|
-
`折扣:${discountProfession}专属50%折扣`
|
|
9378
|
+
`订购价:${discountPrice}红晶 (原价${originalPrice})`
|
|
9345
9379
|
);
|
|
9346
9380
|
} else {
|
|
9347
|
-
infoBlocks.push(`订购价:${
|
|
9381
|
+
infoBlocks.push(`订购价:${discountPrice}红晶`);
|
|
9348
9382
|
}
|
|
9349
9383
|
if (config2.specialeffect) {
|
|
9350
9384
|
infoBlocks.push(`特殊效果:${config2.specialeffect}`);
|
|
@@ -9361,30 +9395,22 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
9361
9395
|
return infoBlocks.join("\n");
|
|
9362
9396
|
}),
|
|
9363
9397
|
...Object.entries(SyndicatedItems).filter(
|
|
9364
|
-
([_, item]) => item.type ===
|
|
9398
|
+
([_, item]) => item.type === category && item.redCrystalCost > 0
|
|
9365
9399
|
).map(([name2, item]) => {
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
discountReason = "破坏者";
|
|
9371
|
-
} else if (currentCareer === "计算机专家" && normalizedCategory === "设备工具") {
|
|
9372
|
-
discountPrice = Math.floor(item.redCrystalCost * 0.5);
|
|
9373
|
-
discountReason = "计算机专家";
|
|
9374
|
-
}
|
|
9400
|
+
const isDiscount = currentCareer === "破坏者" && category === "爆破物" || currentCareer === "计算机专家" && category === "设备工具";
|
|
9401
|
+
const originalPrice = item.redCrystalCost;
|
|
9402
|
+
const discountPrice = isDiscount ? Math.floor(originalPrice * 0.5) : originalPrice;
|
|
9403
|
+
const discountReason = isDiscount ? currentCareer : null;
|
|
9375
9404
|
const infoBlocks = [
|
|
9376
9405
|
`【${name2}】`,
|
|
9377
|
-
|
|
9406
|
+
`类型:${item.type}`
|
|
9378
9407
|
];
|
|
9379
|
-
if (
|
|
9408
|
+
if (isDiscount) {
|
|
9380
9409
|
infoBlocks.push(
|
|
9381
|
-
`订购价:${discountPrice}红晶 (原价${
|
|
9382
|
-
`折扣:${discountReason}专属50%折扣`
|
|
9410
|
+
`订购价:${discountPrice}红晶 (原价${originalPrice})`
|
|
9383
9411
|
);
|
|
9384
9412
|
} else {
|
|
9385
|
-
infoBlocks.push(
|
|
9386
|
-
`订购价:${item.redCrystalCost}红晶`
|
|
9387
|
-
);
|
|
9413
|
+
infoBlocks.push(`订购价:${discountPrice}红晶`);
|
|
9388
9414
|
}
|
|
9389
9415
|
infoBlocks.push(
|
|
9390
9416
|
`条件:${item.condition}`,
|
|
@@ -9395,32 +9421,14 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
9395
9421
|
return infoBlocks.join("\n");
|
|
9396
9422
|
})
|
|
9397
9423
|
];
|
|
9398
|
-
const discountInfo = [];
|
|
9399
|
-
if (normalizedCategory === "传奇武器") {
|
|
9400
|
-
const availableDiscounts = [];
|
|
9401
|
-
Object.entries(legendaryDiscounts).forEach(([weapon, professions]) => {
|
|
9402
|
-
if (professions.includes(currentCareer)) {
|
|
9403
|
-
availableDiscounts.push(`${weapon}(${currentCareer}专属50%折扣)`);
|
|
9404
|
-
}
|
|
9405
|
-
});
|
|
9406
|
-
if (availableDiscounts.length) {
|
|
9407
|
-
discountInfo.push(
|
|
9408
|
-
"💰 传奇武器职业折扣:",
|
|
9409
|
-
`▸ ${availableDiscounts.join("\n▸ ")}`
|
|
9410
|
-
);
|
|
9411
|
-
}
|
|
9412
|
-
} else if (currentCareer === "破坏者" && normalizedCategory === "爆破物" || currentCareer === "计算机专家" && normalizedCategory === "设备工具") {
|
|
9413
|
-
discountInfo.push(
|
|
9414
|
-
"💰 折扣明细:",
|
|
9415
|
-
`▸ ${currentCareer}职业:${normalizedCategory}类50%折扣`
|
|
9416
|
-
);
|
|
9417
|
-
}
|
|
9418
9424
|
return [
|
|
9419
|
-
`🏴 辛迪加黑市 - ${
|
|
9425
|
+
`🏴 辛迪加黑市 - ${category} 🏴`,
|
|
9420
9426
|
'使用"订购 物品名称"进行购买(仅消耗红晶)',
|
|
9421
|
-
|
|
9427
|
+
discountDetails.length > 0 ? `💰 折扣明细:
|
|
9428
|
+
${discountDetails.join("\n")}` : "",
|
|
9422
9429
|
"====================",
|
|
9423
|
-
...items
|
|
9430
|
+
...items,
|
|
9431
|
+
items.length === 0 ? "⚠️ 该分类下暂无可用商品" : ""
|
|
9424
9432
|
].filter(Boolean).join("\n");
|
|
9425
9433
|
});
|
|
9426
9434
|
ctx.command("ggcevo/订购 <item>").action(async ({ session }, item) => {
|
|
@@ -9515,7 +9523,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
9515
9523
|
return [
|
|
9516
9524
|
`✅ 成功订购【${item}】!`,
|
|
9517
9525
|
...priceInfo,
|
|
9518
|
-
discountApplied ? `💰
|
|
9526
|
+
discountApplied ? `💰 折扣明细:
|
|
9527
|
+
${discountReason}` : "",
|
|
9519
9528
|
`装备状态:${equippedStatus}`,
|
|
9520
9529
|
'输入 "武器仓库" 管理武器'
|
|
9521
9530
|
].filter(Boolean).join("\n");
|
package/lib/utils.d.ts
CHANGED
|
@@ -25,7 +25,11 @@ export declare function isWithinProtection(protections: PKProtection[]): boolean
|
|
|
25
25
|
export declare function formatTime(date: Date): string;
|
|
26
26
|
export declare const legendaryDiscounts: {
|
|
27
27
|
'MK-4\u6FC0\u5149\u6B65\u67AA': string[];
|
|
28
|
+
M4AE脉冲步枪: string[];
|
|
28
29
|
'DSR-55\u53CD\u5668\u6750\u6B65\u67AA': string[];
|
|
29
30
|
龙息霰弹枪: string[];
|
|
30
|
-
|
|
31
|
+
'DG-3\u7535\u5F27\u6B65\u67AA': string[];
|
|
32
|
+
光剑: string[];
|
|
33
|
+
外星电浆: string[];
|
|
34
|
+
核聚变重炮: string[];
|
|
31
35
|
};
|