koishi-plugin-ggcevo-game 1.4.16 → 1.4.17
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/boss/attackhandling.d.ts +3 -2
- package/lib/boss/passivehandler.d.ts +2 -2
- package/lib/index.js +162 -126
- package/package.json +1 -1
|
@@ -30,13 +30,14 @@ export declare function handleDeathTargets(ctx: Context, deadTargets: any[], kil
|
|
|
30
30
|
bossBroadcast: string[];
|
|
31
31
|
cleanerBroadcast: string[];
|
|
32
32
|
}>;
|
|
33
|
-
export declare function calculateRewards(ctx: Context, handle: string,
|
|
33
|
+
export declare function calculateRewards(ctx: Context, handle: string, totalDamage: number): Promise<{
|
|
34
34
|
finalReward: number;
|
|
35
35
|
careerMessage: string;
|
|
36
36
|
redcrystalMessage: string;
|
|
37
|
+
techMessage: string;
|
|
37
38
|
}>;
|
|
38
39
|
export declare function updateSignRecord(ctx: Context, handle: string, reward: number): Promise<void>;
|
|
39
|
-
export declare function buildResultMessage(session: any, weaponName: string, targetBoss: any, primaryResult: any, scatterResult: any,
|
|
40
|
+
export declare function buildResultMessage(session: any, weaponName: string, targetBoss: any, primaryResult: any, scatterResult: any, finalReward: number, maxHP: number, careerMessage: string, techMessage: string, redcrystalMessage: string): string;
|
|
40
41
|
export declare function handleBroadcasts(ctx: Context, groupIds: string[], scatterBroadcast: string | string[] | null, bossEventBroadcast: string[] | string | null, cleanerRewardBroadcast: string[] | null, isPrimaryAttack: boolean): Promise<void>;
|
|
41
42
|
export declare function applyScatterResults(ctx: Context, session: any, equippedWeapon: any, targetBoss: any, scatterResult: any): Promise<string[]>;
|
|
42
43
|
export declare function updateBossDamageRecord(ctx: Context, handle: string, playerName: string, bossGroupId: number, damageAmount: number): Promise<void>;
|
|
@@ -69,7 +69,7 @@ export declare const PassiveHandler: {
|
|
|
69
69
|
}>;
|
|
70
70
|
calculateRadiationDamage: (targetBoss: any) => {
|
|
71
71
|
damageMultiplier: number;
|
|
72
|
-
messages:
|
|
72
|
+
messages: any[];
|
|
73
73
|
};
|
|
74
74
|
handleColdEffect: (ctx: Context, targetBoss: any, weaponName: string) => Promise<{
|
|
75
75
|
messages: string[];
|
|
@@ -77,7 +77,7 @@ export declare const PassiveHandler: {
|
|
|
77
77
|
}>;
|
|
78
78
|
calculateColdDamage: (targetBoss: any) => {
|
|
79
79
|
damageMultiplier: number;
|
|
80
|
-
messages:
|
|
80
|
+
messages: any[];
|
|
81
81
|
};
|
|
82
82
|
handleConductorTagChange: (ctx: Context, targetBoss: any, currentHP: number, maxHP: number) => Promise<{
|
|
83
83
|
messages: string[];
|
package/lib/index.js
CHANGED
|
@@ -580,10 +580,10 @@ var spaceStationCrewConfig = [
|
|
|
580
580
|
},
|
|
581
581
|
{
|
|
582
582
|
professionName: "舰长",
|
|
583
|
-
effect: "
|
|
584
|
-
requirements: "
|
|
585
|
-
Jobtransfer:
|
|
586
|
-
costcoins:
|
|
583
|
+
effect: "完成任务奖励+50%",
|
|
584
|
+
requirements: "累计完成4次及以上任务",
|
|
585
|
+
Jobtransfer: true,
|
|
586
|
+
costcoins: 2e3
|
|
587
587
|
},
|
|
588
588
|
{
|
|
589
589
|
professionName: "机械化专家",
|
|
@@ -731,6 +731,18 @@ async function checkTransferRequirements(ctx, handle, profession) {
|
|
|
731
731
|
success: totalDamage >= 100,
|
|
732
732
|
message: `需要当期伤害榜累计造成100及以上伤害(当前${totalDamage})`
|
|
733
733
|
};
|
|
734
|
+
// +++ 新增舰长检查 +++
|
|
735
|
+
case "舰长": {
|
|
736
|
+
const taskRecords = await ctx.database.get("ggcevo_task", { handle });
|
|
737
|
+
const totalCompletions = taskRecords.reduce(
|
|
738
|
+
(sum, task) => sum + (task.Completions || 0),
|
|
739
|
+
0
|
|
740
|
+
);
|
|
741
|
+
return {
|
|
742
|
+
success: totalCompletions >= 4,
|
|
743
|
+
message: totalCompletions >= 4 ? "" : `需要累计完成4次及以上任务(当前${totalCompletions}次)`
|
|
744
|
+
};
|
|
745
|
+
}
|
|
734
746
|
case "情报副官":
|
|
735
747
|
const techs = await ctx.database.get("ggcevo_tech", { handle });
|
|
736
748
|
const hasValidTech = techs.some((t) => t.level >= 3);
|
|
@@ -973,19 +985,19 @@ var Spacestationtechnology = [
|
|
|
973
985
|
level: 3,
|
|
974
986
|
cost: 2250,
|
|
975
987
|
description: "升级空间站关键系统,完成任务奖励+15%",
|
|
976
|
-
careerBonus: "完成任务奖励+30
|
|
988
|
+
careerBonus: "完成任务奖励+30%,移除签到7日以下奖励区间"
|
|
977
989
|
},
|
|
978
990
|
{
|
|
979
991
|
level: 4,
|
|
980
992
|
cost: 2950,
|
|
981
993
|
description: "升级空间站关键系统,完成任务奖励+20%",
|
|
982
|
-
careerBonus: "完成任务奖励+40%,移除签到
|
|
994
|
+
careerBonus: "完成任务奖励+40%,移除签到14日以下奖励区间"
|
|
983
995
|
},
|
|
984
996
|
{
|
|
985
997
|
level: 5,
|
|
986
998
|
cost: 3550,
|
|
987
999
|
description: "升级空间站关键系统,完成任务奖励+25%",
|
|
988
|
-
careerBonus: "完成任务奖励+50%,移除签到
|
|
1000
|
+
careerBonus: "完成任务奖励+50%,移除签到21日以下奖励区间"
|
|
989
1001
|
}
|
|
990
1002
|
]
|
|
991
1003
|
}
|
|
@@ -997,8 +1009,8 @@ var Tasklist = {
|
|
|
997
1009
|
id: 1,
|
|
998
1010
|
type: "可重复任务",
|
|
999
1011
|
description: "利用【伽马枪】武器对异形目标造成辐射伤害",
|
|
1000
|
-
target:
|
|
1001
|
-
price:
|
|
1012
|
+
target: 1,
|
|
1013
|
+
price: 50,
|
|
1002
1014
|
redCrystalCost: 0,
|
|
1003
1015
|
condition: "使用伽马枪攻击异形并成功使辐射层数+1"
|
|
1004
1016
|
},
|
|
@@ -1006,8 +1018,8 @@ var Tasklist = {
|
|
|
1006
1018
|
id: 2,
|
|
1007
1019
|
type: "可重复任务",
|
|
1008
1020
|
description: "利用【零度之下】武器对异形目标造成寒冷伤害",
|
|
1009
|
-
target:
|
|
1010
|
-
price:
|
|
1021
|
+
target: 1,
|
|
1022
|
+
price: 50,
|
|
1011
1023
|
redCrystalCost: 0,
|
|
1012
1024
|
condition: "使用零度之下攻击异形并成功使寒冷层数+1"
|
|
1013
1025
|
},
|
|
@@ -1953,7 +1965,7 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
1953
1965
|
}
|
|
1954
1966
|
return {
|
|
1955
1967
|
success: false,
|
|
1956
|
-
message: `${itemName}
|
|
1968
|
+
message: `${itemName} 无法使用。`
|
|
1957
1969
|
};
|
|
1958
1970
|
} catch (error) {
|
|
1959
1971
|
console.error("物品效果处理失败:", error);
|
|
@@ -2029,11 +2041,11 @@ async function handleTechUpgrade(ctx, handle, target) {
|
|
|
2029
2041
|
let discountInfo = [];
|
|
2030
2042
|
if (discountApplied) {
|
|
2031
2043
|
discountInfo = [
|
|
2032
|
-
"折扣明细:",
|
|
2044
|
+
"💰 折扣明细:",
|
|
2033
2045
|
...discountDetails.map((detail) => `▸ ${detail}`)
|
|
2034
2046
|
];
|
|
2035
2047
|
}
|
|
2036
|
-
const costInfo = discountApplied ?
|
|
2048
|
+
const costInfo = discountApplied ? `💸 花费金币:${actualCost} (原价${originalCost})` : `💸 花费金币:${actualCost}`;
|
|
2037
2049
|
let permissionMessage = [];
|
|
2038
2050
|
if (permissionGrantInfo) {
|
|
2039
2051
|
const [permissionRecord] = await ctx.database.get("ggcevo_purchasepermissions", { handle });
|
|
@@ -2087,7 +2099,7 @@ async function handleWeaponUpgrade(ctx, handle, target) {
|
|
|
2087
2099
|
if (weaponDiscount > 0) {
|
|
2088
2100
|
totalDiscount += weaponDiscount;
|
|
2089
2101
|
discountDetails.push(
|
|
2090
|
-
`⚙️
|
|
2102
|
+
`⚙️ 武器系统Lv.${techLevel}:${weaponDiscount}%折扣`
|
|
2091
2103
|
);
|
|
2092
2104
|
}
|
|
2093
2105
|
}
|
|
@@ -2129,8 +2141,8 @@ async function handleWeaponUpgrade(ctx, handle, target) {
|
|
|
2129
2141
|
const damage = (weaponData.damage * (1 + 0.1 * newLevel)).toFixed(1);
|
|
2130
2142
|
let msg = `${target} 升级成功!Lv.${newLevel}`;
|
|
2131
2143
|
const priceInfo = totalDiscount > 0 ? `
|
|
2132
|
-
💸
|
|
2133
|
-
💸
|
|
2144
|
+
💸 花费:${actualCost}金币 (原价${baseCost}金币)` : `
|
|
2145
|
+
💸 花费:${actualCost}金币`;
|
|
2134
2146
|
msg += priceInfo;
|
|
2135
2147
|
if (discountDetails.length > 0) {
|
|
2136
2148
|
msg += `
|
|
@@ -2218,13 +2230,13 @@ ${priceInfo}`);
|
|
|
2218
2230
|
discountNotice.push("💰 当前折扣:");
|
|
2219
2231
|
}
|
|
2220
2232
|
if (isGunslinger) {
|
|
2221
|
-
discountNotice.push(
|
|
2233
|
+
discountNotice.push(`▸ 🔫 枪手职业:10%折扣`);
|
|
2222
2234
|
}
|
|
2223
2235
|
if (isAlliance && hasTechDiscount) {
|
|
2224
|
-
discountNotice.push(
|
|
2236
|
+
discountNotice.push(`▸ ⚙️ 武器系统Lv.${techLevel}:${techDiscountRate}%折扣`);
|
|
2225
2237
|
}
|
|
2226
2238
|
if (hasFoxDiscount) {
|
|
2227
|
-
discountNotice.push(
|
|
2239
|
+
discountNotice.push(`▸ 🦊 灵狐升运祈愿:20%折扣`);
|
|
2228
2240
|
}
|
|
2229
2241
|
if (!hasTechDiscount && !hasFoxDiscount && !hasGunslingerDiscount) {
|
|
2230
2242
|
if (isAlliance) {
|
|
@@ -2236,11 +2248,11 @@ ${priceInfo}`);
|
|
|
2236
2248
|
}
|
|
2237
2249
|
}
|
|
2238
2250
|
if (isGunslinger) {
|
|
2239
|
-
discountNotice.push("🔝 枪手职业:武器等级上限提升至7级");
|
|
2251
|
+
discountNotice.push("▸ 🔝 枪手职业:武器等级上限提升至7级");
|
|
2240
2252
|
}
|
|
2241
2253
|
return [
|
|
2242
2254
|
"⚡ 武器升级价格表 ⚡",
|
|
2243
|
-
`武器等级上限: ${maxLevel}
|
|
2255
|
+
`武器等级上限: ${maxLevel}级${isGunslinger ? " (枪手职业)" : ""}`,
|
|
2244
2256
|
"使用「升级 武器名称」对武器进行等级升级",
|
|
2245
2257
|
...discountNotice,
|
|
2246
2258
|
"====================",
|
|
@@ -2579,7 +2591,7 @@ var PassiveHandler = {
|
|
|
2579
2591
|
await ctx.database.set("ggcevo_boss", { name: targetBoss.name }, { Skillcountpoints: newStacks });
|
|
2580
2592
|
return { updatedHP, messages };
|
|
2581
2593
|
}, "handleBloodCount"),
|
|
2582
|
-
//
|
|
2594
|
+
// 修改后的伽马枪辐射处理(无限叠层,每层2.5%增伤,有效上限20层)
|
|
2583
2595
|
handleGammaRadiation: /* @__PURE__ */ __name(async (ctx, targetBoss, weaponName) => {
|
|
2584
2596
|
if (weaponName !== "伽马枪" || targetBoss.tags.includes("机械") || !targetBoss.tags.includes("生物")) {
|
|
2585
2597
|
return null;
|
|
@@ -2587,40 +2599,40 @@ var PassiveHandler = {
|
|
|
2587
2599
|
const messages = [];
|
|
2588
2600
|
let radiationApplied = false;
|
|
2589
2601
|
const currentLayers = targetBoss.Vulnerability || 0;
|
|
2590
|
-
const
|
|
2591
|
-
const newLayers = Math.min(currentLayers + 1, maxLayers);
|
|
2602
|
+
const newLayers = currentLayers + 1;
|
|
2592
2603
|
await ctx.database.set(
|
|
2593
2604
|
"ggcevo_boss",
|
|
2594
2605
|
{ name: targetBoss.name },
|
|
2595
2606
|
{ Vulnerability: newLayers }
|
|
2596
2607
|
);
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
} else {
|
|
2600
|
-
const layerIncrease = newLayers - currentLayers;
|
|
2601
|
-
messages.push(`☢️ ${targetBoss.name}获得${layerIncrease}层"辐射"(当前${newLayers}层)`);
|
|
2602
|
-
radiationApplied = true;
|
|
2603
|
-
}
|
|
2608
|
+
messages.push(`☢️ ${targetBoss.name}获得1层"辐射"(当前${newLayers}层)`);
|
|
2609
|
+
radiationApplied = true;
|
|
2604
2610
|
return {
|
|
2605
2611
|
messages,
|
|
2606
2612
|
radiationApplied
|
|
2607
2613
|
};
|
|
2608
2614
|
}, "handleGammaRadiation"),
|
|
2609
|
-
// 修改后的辐射伤害计算(每层5
|
|
2615
|
+
// 修改后的辐射伤害计算(每层2.5%增伤,上限20层)
|
|
2610
2616
|
calculateRadiationDamage: /* @__PURE__ */ __name((targetBoss) => {
|
|
2611
2617
|
const radiationLayers = targetBoss.Vulnerability || 0;
|
|
2612
|
-
if (radiationLayers
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2618
|
+
if (radiationLayers < 1) return null;
|
|
2619
|
+
const effectiveLayers = Math.min(radiationLayers, 20);
|
|
2620
|
+
const damageIncrease = effectiveLayers * 2.5;
|
|
2621
|
+
const maxIncrease = 50;
|
|
2622
|
+
const messages = [];
|
|
2623
|
+
let statusMsg = `☢️ 【辐射】生效:当前${radiationLayers}层辐射`;
|
|
2624
|
+
statusMsg += `,受到的伤害+${damageIncrease}%`;
|
|
2625
|
+
if (damageIncrease >= maxIncrease) {
|
|
2626
|
+
statusMsg += `(达到上限)`;
|
|
2620
2627
|
}
|
|
2621
|
-
|
|
2628
|
+
messages.push(statusMsg);
|
|
2629
|
+
return {
|
|
2630
|
+
damageMultiplier: effectiveLayers * 0.025,
|
|
2631
|
+
// 每层2.5%增伤
|
|
2632
|
+
messages
|
|
2633
|
+
};
|
|
2622
2634
|
}, "calculateRadiationDamage"),
|
|
2623
|
-
//
|
|
2635
|
+
// 修改后的寒冷处理(无限叠层,每层2.5%增伤,有效上限20层)
|
|
2624
2636
|
handleColdEffect: /* @__PURE__ */ __name(async (ctx, targetBoss, weaponName) => {
|
|
2625
2637
|
if (weaponName !== "零度之下") {
|
|
2626
2638
|
return null;
|
|
@@ -2628,36 +2640,38 @@ var PassiveHandler = {
|
|
|
2628
2640
|
const messages = [];
|
|
2629
2641
|
let freezing = false;
|
|
2630
2642
|
const currentFreezing = targetBoss.freezing || 0;
|
|
2631
|
-
const newFreezing =
|
|
2643
|
+
const newFreezing = currentFreezing + 1;
|
|
2632
2644
|
await ctx.database.set(
|
|
2633
2645
|
"ggcevo_boss",
|
|
2634
2646
|
{ name: targetBoss.name },
|
|
2635
2647
|
{ freezing: newFreezing }
|
|
2636
2648
|
);
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
} else {
|
|
2640
|
-
messages.push(`❄️ ${targetBoss.name} 获得1层"寒冷"(当前${newFreezing}层)`);
|
|
2641
|
-
freezing = true;
|
|
2642
|
-
}
|
|
2649
|
+
messages.push(`❄️ ${targetBoss.name} 获得1层"寒冷"(当前${newFreezing}层)`);
|
|
2650
|
+
freezing = true;
|
|
2643
2651
|
return {
|
|
2644
2652
|
messages,
|
|
2645
2653
|
freezing
|
|
2646
2654
|
};
|
|
2647
2655
|
}, "handleColdEffect"),
|
|
2648
|
-
//
|
|
2656
|
+
// 修改后的寒冷伤害计算(每层2.5%增伤,上限20层)
|
|
2649
2657
|
calculateColdDamage: /* @__PURE__ */ __name((targetBoss) => {
|
|
2650
2658
|
const freezingLayers = targetBoss.freezing || 0;
|
|
2651
|
-
if (freezingLayers
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
+
if (freezingLayers < 1) return null;
|
|
2660
|
+
const effectiveLayers = Math.min(freezingLayers, 20);
|
|
2661
|
+
const damageIncrease = effectiveLayers * 2.5;
|
|
2662
|
+
const maxIncrease = 50;
|
|
2663
|
+
const messages = [];
|
|
2664
|
+
let statusMsg = `❄️ 【寒冷】生效:当前${freezingLayers}层`;
|
|
2665
|
+
statusMsg += `,受到的伤害+${damageIncrease}%`;
|
|
2666
|
+
if (damageIncrease >= maxIncrease) {
|
|
2667
|
+
statusMsg += `(达到上限)`;
|
|
2659
2668
|
}
|
|
2660
|
-
|
|
2669
|
+
messages.push(statusMsg);
|
|
2670
|
+
return {
|
|
2671
|
+
damageMultiplier: effectiveLayers * 0.025,
|
|
2672
|
+
// 每层2.5%增伤
|
|
2673
|
+
messages
|
|
2674
|
+
};
|
|
2661
2675
|
}, "calculateColdDamage"),
|
|
2662
2676
|
// === 电能相关被动处理 ===
|
|
2663
2677
|
// 处理导体标签变化(血量低时护盾->重甲)
|
|
@@ -3679,7 +3693,7 @@ async function getCleanerRewardBroadcast(ctx, boss, killerHandle, killerName) {
|
|
|
3679
3693
|
redcrystal: (cleaner.redcrystal || 0) + rewardAmount
|
|
3680
3694
|
}], ["handle"]);
|
|
3681
3695
|
}
|
|
3682
|
-
const rewardMessage = `🧹 全体清洁工因清理 ${bossName} 获得 ${baseReward} 红晶${killerBonus ? ` (
|
|
3696
|
+
const rewardMessage = `🧹 全体清洁工因清理 ${bossName} 获得 ${baseReward} 红晶${killerBonus ? ` (致命一击双倍奖励者:${killerName})` : ""}`;
|
|
3683
3697
|
return [rewardMessage];
|
|
3684
3698
|
} catch (error) {
|
|
3685
3699
|
ctx.logger("ggcevo").warn("清洁工奖励发放失败", error);
|
|
@@ -3999,7 +4013,7 @@ async function handleDeathTargets(ctx, deadTargets, killerName, killerHandle) {
|
|
|
3999
4013
|
};
|
|
4000
4014
|
}
|
|
4001
4015
|
__name(handleDeathTargets, "handleDeathTargets");
|
|
4002
|
-
async function calculateRewards(ctx, handle,
|
|
4016
|
+
async function calculateRewards(ctx, handle, totalDamage) {
|
|
4003
4017
|
const SECURITY_BONUS_MAPPING = {
|
|
4004
4018
|
base: [5, 10, 15, 20, 25],
|
|
4005
4019
|
career: [10, 20, 30, 40, 50]
|
|
@@ -4011,11 +4025,13 @@ async function calculateRewards(ctx, handle, username, totalDamage) {
|
|
|
4011
4025
|
techId: 4
|
|
4012
4026
|
});
|
|
4013
4027
|
let techBonusPercent = 0;
|
|
4028
|
+
let techMessage = "";
|
|
4014
4029
|
if (securityTech && securityTech.level >= 1 && careerData?.group === "人类联盟") {
|
|
4015
4030
|
const techLevel = securityTech.level - 1;
|
|
4016
4031
|
const securityConfig = Spacestationtechnology.find((t) => t.techId === 4);
|
|
4017
4032
|
const isEligibleForCareerBonus = securityConfig?.careerNames.includes(career);
|
|
4018
4033
|
techBonusPercent = isEligibleForCareerBonus ? SECURITY_BONUS_MAPPING.career[techLevel] : SECURITY_BONUS_MAPPING.base[techLevel];
|
|
4034
|
+
techMessage = isEligibleForCareerBonus ? `⚙️ 安防系统Lv.${securityTech.level}:+${SECURITY_BONUS_MAPPING.career[techLevel]}%金币` : `⚙️ 安防系统Lv.${securityTech.level}:+${SECURITY_BONUS_MAPPING.base[techLevel]}%金币`;
|
|
4019
4035
|
}
|
|
4020
4036
|
let careerMultiplier = 0;
|
|
4021
4037
|
let careerMessage = "";
|
|
@@ -4040,7 +4056,9 @@ async function calculateRewards(ctx, handle, username, totalDamage) {
|
|
|
4040
4056
|
return {
|
|
4041
4057
|
finalReward,
|
|
4042
4058
|
careerMessage,
|
|
4043
|
-
redcrystalMessage
|
|
4059
|
+
redcrystalMessage,
|
|
4060
|
+
techMessage
|
|
4061
|
+
// 新增:独立返回科技奖励信息
|
|
4044
4062
|
};
|
|
4045
4063
|
}
|
|
4046
4064
|
__name(calculateRewards, "calculateRewards");
|
|
@@ -4052,7 +4070,7 @@ async function updateSignRecord(ctx, handle, reward) {
|
|
|
4052
4070
|
}], ["handle"]);
|
|
4053
4071
|
}
|
|
4054
4072
|
__name(updateSignRecord, "updateSignRecord");
|
|
4055
|
-
function buildResultMessage(session, weaponName, targetBoss, primaryResult, scatterResult,
|
|
4073
|
+
function buildResultMessage(session, weaponName, targetBoss, primaryResult, scatterResult, finalReward, maxHP, careerMessage, techMessage, redcrystalMessage) {
|
|
4056
4074
|
const messages = [
|
|
4057
4075
|
`🔥 ${session.username} 使用武器 ${weaponName} 对 ${targetBoss.name} 发起攻击!`,
|
|
4058
4076
|
...primaryResult.effectMessage.length > 0 ? [
|
|
@@ -4076,10 +4094,16 @@ ${scatterResult.scatterEffectMessages.map((m) => `▸ ${m}`).join("\n")}`,
|
|
|
4076
4094
|
] : []
|
|
4077
4095
|
);
|
|
4078
4096
|
}
|
|
4097
|
+
const bonusMessages = [
|
|
4098
|
+
careerMessage ? `▸ ${careerMessage}` : "",
|
|
4099
|
+
techMessage ? `▸ ${techMessage}` : "",
|
|
4100
|
+
redcrystalMessage ? `▸ ${redcrystalMessage}` : ""
|
|
4101
|
+
].filter((msg) => msg);
|
|
4079
4102
|
messages.push(
|
|
4080
4103
|
`获得金币:${finalReward}`,
|
|
4081
|
-
|
|
4082
|
-
|
|
4104
|
+
`⚡ 加成效果:`,
|
|
4105
|
+
...bonusMessages,
|
|
4106
|
+
// 使用展开运算符添加所有加▸的奖励消息
|
|
4083
4107
|
`目标剩余HP:${Math.max(primaryResult.currentHP, 0)}/${maxHP}`,
|
|
4084
4108
|
primaryResult.isDefeated ? `🎉 恭喜,已成功击败 ${targetBoss.name}!` : ""
|
|
4085
4109
|
);
|
|
@@ -4726,7 +4750,6 @@ ${itemDetails.join("\n")}`;
|
|
|
4726
4750
|
}
|
|
4727
4751
|
const messages = [];
|
|
4728
4752
|
let totalBonus = 0;
|
|
4729
|
-
let basePoints;
|
|
4730
4753
|
let tickets = 3;
|
|
4731
4754
|
if (monthlyDays === 7) {
|
|
4732
4755
|
tickets = 4;
|
|
@@ -4740,19 +4763,24 @@ ${itemDetails.join("\n")}`;
|
|
|
4740
4763
|
const [systemFirmwareTech] = await ctx.database.get("ggcevo_tech", { handle, techId: 5 }).catch(() => [{ level: 0 }]);
|
|
4741
4764
|
const systemFirmwareLevel = Math.min(systemFirmwareTech?.level || 0, 5);
|
|
4742
4765
|
const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
|
|
4743
|
-
const
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
else if (monthlyDays < 28) basePoints = getRandomInt(80, 100);
|
|
4766
|
+
const shouldApplyFirmwareEffect = careerData?.group === "人类联盟" && ["舰长", "情报副官"].includes(careerData.career) && systemFirmwareLevel >= 3;
|
|
4767
|
+
let basePoints;
|
|
4768
|
+
if (shouldApplyFirmwareEffect) {
|
|
4769
|
+
if (systemFirmwareLevel >= 5) {
|
|
4770
|
+
if (monthlyDays < 28) basePoints = getRandomInt(80, 100);
|
|
4749
4771
|
else basePoints = getRandomInt(100, 200);
|
|
4750
|
-
messages.push(`🛰️
|
|
4751
|
-
} else if (systemFirmwareLevel
|
|
4772
|
+
messages.push(`🛰️ 关键系统固件Lv.5:移除签到21日以下奖励区间`);
|
|
4773
|
+
} else if (systemFirmwareLevel >= 4) {
|
|
4752
4774
|
if (monthlyDays < 21) basePoints = getRandomInt(60, 80);
|
|
4753
4775
|
else if (monthlyDays < 28) basePoints = getRandomInt(80, 100);
|
|
4754
4776
|
else basePoints = getRandomInt(100, 200);
|
|
4755
|
-
messages.push(`🛰️
|
|
4777
|
+
messages.push(`🛰️ 关键系统固件Lv.4:移除签到14日以下奖励区间`);
|
|
4778
|
+
} else if (systemFirmwareLevel >= 3) {
|
|
4779
|
+
if (monthlyDays < 14) basePoints = getRandomInt(40, 60);
|
|
4780
|
+
else if (monthlyDays < 21) basePoints = getRandomInt(60, 80);
|
|
4781
|
+
else if (monthlyDays < 28) basePoints = getRandomInt(80, 100);
|
|
4782
|
+
else basePoints = getRandomInt(100, 200);
|
|
4783
|
+
messages.push(`🛰️ 关键系统固件Lv.3:移除签到7日以下奖励区间`);
|
|
4756
4784
|
}
|
|
4757
4785
|
} else {
|
|
4758
4786
|
if (monthlyDays < 7) basePoints = getRandomInt(20, 40);
|
|
@@ -4778,7 +4806,7 @@ ${itemDetails.join("\n")}`;
|
|
|
4778
4806
|
const finalBonus = Math.max(baseTechBonus, careerTechBonus);
|
|
4779
4807
|
if (finalBonus > 0) {
|
|
4780
4808
|
totalBonus += finalBonus / 100;
|
|
4781
|
-
messages.push(`⚙️
|
|
4809
|
+
messages.push(`⚙️ 采掘系统Lv.${techLevel}:+${finalBonus}%金币`);
|
|
4782
4810
|
}
|
|
4783
4811
|
}
|
|
4784
4812
|
if (careerData.career === "深空矿工") {
|
|
@@ -5985,9 +6013,6 @@ ${items.join("、")}
|
|
|
5985
6013
|
`📊 胜率预测:${winRate.toFixed(1)}%`,
|
|
5986
6014
|
`🎰 金币变动:${stealPercentage}%`
|
|
5987
6015
|
];
|
|
5988
|
-
if (targetCareer.group === "人类联盟" && isWin) {
|
|
5989
|
-
result.push(`🛡️ 人类联盟:应战者PK失败时仅损失1%的金币`);
|
|
5990
|
-
}
|
|
5991
6016
|
if (computerExpertProtection) {
|
|
5992
6017
|
result.push(`💻 计算机专家职业:应战者PK失败时不损失金币`);
|
|
5993
6018
|
} else if (isWin) {
|
|
@@ -5995,17 +6020,21 @@ ${items.join("、")}
|
|
|
5995
6020
|
} else {
|
|
5996
6021
|
result.push(`💸 您从口袋里拿出了${goldTransfer}枚金币上交给对方`);
|
|
5997
6022
|
}
|
|
6023
|
+
result.push(`⚡ 加成效果:`);
|
|
6024
|
+
if (targetCareer.group === "人类联盟" && isWin) {
|
|
6025
|
+
result.push(`▸ 🛡️ 人类联盟:应战者PK失败时仅损失1%的金币`);
|
|
6026
|
+
}
|
|
5998
6027
|
if (mp3Effect) {
|
|
5999
|
-
result.push(
|
|
6028
|
+
result.push(`▸ 💿 MP3播放器生效:挑战者PK失败时上交的金币减少50%`);
|
|
6000
6029
|
}
|
|
6001
6030
|
if (hornEffect) {
|
|
6002
|
-
result.push(
|
|
6031
|
+
result.push(`▸ 📯 气喇叭生效:辛迪加海盗总部为您发放了额外${extraGold}金币奖励!`);
|
|
6003
6032
|
}
|
|
6004
6033
|
if (initiatorCareer?.group === "辛迪加海盗") {
|
|
6005
|
-
result.push(
|
|
6034
|
+
result.push(`▸ 🔴 辛迪加海盗阵营:+1枚红晶`);
|
|
6006
6035
|
}
|
|
6007
6036
|
if (isWin && initiatorCareer?.career === "辛迪加财务经理") {
|
|
6008
|
-
result.push(
|
|
6037
|
+
result.push(`▸ 🎖️ 辛迪加财务经理职业:+1枚红晶`);
|
|
6009
6038
|
}
|
|
6010
6039
|
result.push(`📅 剩余挑战次数:${config.dailyPKLimit - (initiatorPK.todayCount + 1)}`);
|
|
6011
6040
|
return result.join("\n");
|
|
@@ -6057,7 +6086,7 @@ ${items.join("、")}
|
|
|
6057
6086
|
if (careerData?.career === "武器中士") {
|
|
6058
6087
|
const weaponSpecialistDiscount = 20;
|
|
6059
6088
|
totalDiscount += weaponSpecialistDiscount;
|
|
6060
|
-
discountDetails.push(
|
|
6089
|
+
discountDetails.push(`▸ 🎖️ 武器中士职业:${weaponSpecialistDiscount}%折扣`);
|
|
6061
6090
|
}
|
|
6062
6091
|
const activeWish = await ctx.database.get("ggcevo_Wish_Record", {
|
|
6063
6092
|
handle,
|
|
@@ -6069,7 +6098,7 @@ ${items.join("、")}
|
|
|
6069
6098
|
if (activeWish) {
|
|
6070
6099
|
const grasshopperDiscount = 20;
|
|
6071
6100
|
totalDiscount += grasshopperDiscount;
|
|
6072
|
-
discountDetails.push(
|
|
6101
|
+
discountDetails.push(`▸ 🦗 蚱蜢优购祈愿:${grasshopperDiscount}%折扣`);
|
|
6073
6102
|
}
|
|
6074
6103
|
totalDiscount = Math.min(totalDiscount, 100);
|
|
6075
6104
|
const categoryStats = Object.values(weaponConfig).filter((weapon) => weapon.price !== 0).reduce((stats, weapon) => {
|
|
@@ -6080,7 +6109,7 @@ ${items.join("、")}
|
|
|
6080
6109
|
return [
|
|
6081
6110
|
"🏪 咕咕武器库分类 🏪",
|
|
6082
6111
|
'使用 "武器库 分类名称" 查看详细列表',
|
|
6083
|
-
totalDiscount > 0 && `💰
|
|
6112
|
+
totalDiscount > 0 && `💰 折扣明细:
|
|
6084
6113
|
${discountDetails.length ? `${discountDetails.join("\n")}` : ""}`,
|
|
6085
6114
|
"====================",
|
|
6086
6115
|
...Object.entries(categoryStats).map(([catName, count]) => `▸ ${catName} (${count}种)`),
|
|
@@ -6115,7 +6144,7 @@ ${Object.keys(categoryStats).join("、")}`;
|
|
|
6115
6144
|
].filter(Boolean).join("\n");
|
|
6116
6145
|
});
|
|
6117
6146
|
const permissionNotice = isLegendaryCategory ? '⚠️ 注意:购买传奇武器需要"传奇武器购买权限"' : null;
|
|
6118
|
-
const discountInfo = totalDiscount > 0 && !isLegendaryCategory ? `💰
|
|
6147
|
+
const discountInfo = totalDiscount > 0 && !isLegendaryCategory ? `💰 折扣明细:
|
|
6119
6148
|
${discountDetails.length ? `${discountDetails.join("\n")}` : ""}` : null;
|
|
6120
6149
|
return [
|
|
6121
6150
|
`🏪 咕咕武器库 - ${category} 🏪`,
|
|
@@ -6231,13 +6260,13 @@ ${validTypes.join("、")}`;
|
|
|
6231
6260
|
if (activeWish) {
|
|
6232
6261
|
const wishDiscount = 20;
|
|
6233
6262
|
totalDiscount += wishDiscount;
|
|
6234
|
-
discountDetails.push(
|
|
6263
|
+
discountDetails.push(`▸ 🦗 蚱蜢优购祈愿:${wishDiscount}%折扣`);
|
|
6235
6264
|
}
|
|
6236
6265
|
}
|
|
6237
6266
|
if (isWeapon && careerData?.career === "武器中士") {
|
|
6238
6267
|
const specialistDiscount = 20;
|
|
6239
6268
|
totalDiscount += specialistDiscount;
|
|
6240
|
-
discountDetails.push(
|
|
6269
|
+
discountDetails.push(`▸ 🎖️ 武器中士职业:${specialistDiscount}%折扣`);
|
|
6241
6270
|
}
|
|
6242
6271
|
totalDiscount = Math.min(totalDiscount, 100);
|
|
6243
6272
|
}
|
|
@@ -6313,7 +6342,7 @@ ${validTypes.join("、")}`;
|
|
|
6313
6342
|
扣除 1 次传奇武器购买权限,剩余次数:${permissions?.legendarypermissions || 0}`;
|
|
6314
6343
|
} else if (discountDetails.length > 0) {
|
|
6315
6344
|
message += `(原价${config2.price} 金币)
|
|
6316
|
-
折扣明细:
|
|
6345
|
+
💰 折扣明细:
|
|
6317
6346
|
▸ ${discountDetails.join("\n▸ ")}`;
|
|
6318
6347
|
} else {
|
|
6319
6348
|
message += ` (原价${config2.price} 金币)`;
|
|
@@ -6482,8 +6511,8 @@ ${validTypes.join("、")}`;
|
|
|
6482
6511
|
`✅ ${weapon} 成功安装 ${mod}!`,
|
|
6483
6512
|
`花费金币:${actualCost}${discountRate > 0 ? ` (原价${modInfo.cost})` : ""}`,
|
|
6484
6513
|
discountRate > 0 && [
|
|
6485
|
-
"折扣明细:",
|
|
6486
|
-
|
|
6514
|
+
"💰 折扣明细:",
|
|
6515
|
+
`▸ ⚙️ 武器升级平台Lv.${techLevel}:${discountRate}%折扣`
|
|
6487
6516
|
].join("\n"),
|
|
6488
6517
|
`改装槽:${equipment.installedMods.length + 1}/${equipment.modificationSlots}`
|
|
6489
6518
|
].filter(Boolean).join("\n");
|
|
@@ -6521,7 +6550,7 @@ ${validTypes.join("、")}`;
|
|
|
6521
6550
|
"使用「改装 武器名称 模块名称」安装",
|
|
6522
6551
|
"※ 每个武器只能安装一个专属模块",
|
|
6523
6552
|
exclusiveDiscountRate > 0 && `💰 当前专属模块折扣:
|
|
6524
|
-
⚙️
|
|
6553
|
+
▸ ⚙️ 武器升级平台Lv.${techLevel}:${exclusiveDiscountRate}%折扣`,
|
|
6525
6554
|
"====================",
|
|
6526
6555
|
exclusiveMods.length ? exclusiveMods.join("\n") : "该武器暂无专属模块"
|
|
6527
6556
|
].filter(Boolean).join("\n");
|
|
@@ -6532,7 +6561,7 @@ ${validTypes.join("、")}`;
|
|
|
6532
6561
|
"使用「改装 武器名称 模块名称」安装通用模块",
|
|
6533
6562
|
"使用「改装 武器名称」查询武器专属模块",
|
|
6534
6563
|
universalDiscountRate > 0 && `💰 当前通用模块折扣:
|
|
6535
|
-
⚙️
|
|
6564
|
+
▸ ⚙️ 武器升级平台Lv.${techLevel}:${universalDiscountRate}%折扣`,
|
|
6536
6565
|
"====================",
|
|
6537
6566
|
universalMods.join("\n")
|
|
6538
6567
|
].filter(Boolean).join("\n");
|
|
@@ -6551,9 +6580,9 @@ ${validTypes.join("、")}`;
|
|
|
6551
6580
|
const existingEntries = await ctx.database.get("ggcevo_blacklist", { handle });
|
|
6552
6581
|
if (existingEntries.length > 0) return "⛔ 您已被列入黑名单。";
|
|
6553
6582
|
const weaponId = weaponConfig[weapon]?.id;
|
|
6554
|
-
if (!weaponId) return "❌ 请输入“拆卸 武器名称 模块名称”\n
|
|
6583
|
+
if (!weaponId) return "❌ 请输入“拆卸 武器名称 模块名称”\n注意:通用模块返还80%金币,专属模块返还50%金币";
|
|
6555
6584
|
const modInfo = modConfig[mod];
|
|
6556
|
-
if (!modInfo) return "❌ 请输入“拆卸 武器名称 模块名称”\n
|
|
6585
|
+
if (!modInfo) return "❌ 请输入“拆卸 武器名称 模块名称”\n注意:通用模块返还80%金币,专属模块返还50%金币";
|
|
6557
6586
|
const refundRate = modInfo.isExclusive ? 0.5 : 0.8;
|
|
6558
6587
|
const refundType = modInfo.isExclusive ? "专属模块返还50%" : "通用模块返还80%";
|
|
6559
6588
|
const [equipment] = await ctx.database.get("ggcevo_equipment", {
|
|
@@ -6649,7 +6678,8 @@ ${validTypes.join("、")}`;
|
|
|
6649
6678
|
allDeadTargets.push(targetBoss);
|
|
6650
6679
|
}
|
|
6651
6680
|
let scatterResult = null;
|
|
6652
|
-
const
|
|
6681
|
+
const hasOtherBosses = activeBosses.some((b) => b.name !== targetBoss.name);
|
|
6682
|
+
const isScatterAttack = (equippedWeapon.installedMods?.includes("光束曲射晶片") && weaponName === "碎骨步枪" || weaponName === "中子步枪") && hasOtherBosses;
|
|
6653
6683
|
if (isScatterAttack) {
|
|
6654
6684
|
scatterResult = await handleScatterAttack(
|
|
6655
6685
|
ctx,
|
|
@@ -6680,10 +6710,9 @@ ${validTypes.join("、")}`;
|
|
|
6680
6710
|
const deathResults = await handleDeathTargets(ctx, allDeadTargets, session.username, handle);
|
|
6681
6711
|
bossEventBroadcast = deathResults.bossBroadcast;
|
|
6682
6712
|
cleanerRewardBroadcast = deathResults.cleanerBroadcast;
|
|
6683
|
-
const { finalReward, careerMessage, redcrystalMessage } = await calculateRewards(
|
|
6713
|
+
const { finalReward, careerMessage, redcrystalMessage, techMessage } = await calculateRewards(
|
|
6684
6714
|
ctx,
|
|
6685
6715
|
handle,
|
|
6686
|
-
session.username,
|
|
6687
6716
|
totalDamage
|
|
6688
6717
|
);
|
|
6689
6718
|
await updateSignRecord(ctx, handle, finalReward);
|
|
@@ -6711,10 +6740,10 @@ ${validTypes.join("、")}`;
|
|
|
6711
6740
|
targetBoss,
|
|
6712
6741
|
primaryAttackResult,
|
|
6713
6742
|
scatterResult,
|
|
6714
|
-
totalDamage,
|
|
6715
6743
|
finalReward,
|
|
6716
6744
|
maxHP,
|
|
6717
6745
|
careerMessage,
|
|
6746
|
+
techMessage,
|
|
6718
6747
|
redcrystalMessage
|
|
6719
6748
|
);
|
|
6720
6749
|
await session.send(resultMessage);
|
|
@@ -7286,16 +7315,16 @@ ${validTypes.join("、")}`;
|
|
|
7286
7315
|
if (!category) {
|
|
7287
7316
|
const discountLines = [];
|
|
7288
7317
|
if (isComputerExpert) {
|
|
7289
|
-
discountLines.push("💻 计算机专家职业:设备工具类物品50%折扣");
|
|
7318
|
+
discountLines.push("▸ 💻 计算机专家职业:设备工具类物品50%折扣");
|
|
7290
7319
|
}
|
|
7291
7320
|
if (isSaboteur) {
|
|
7292
|
-
discountLines.push("💣 破坏者职业:爆破物类物品50%折扣");
|
|
7321
|
+
discountLines.push("▸ 💣 破坏者职业:爆破物类物品50%折扣");
|
|
7293
7322
|
}
|
|
7294
7323
|
return [
|
|
7295
7324
|
"🏴 辛迪加黑市 🏴",
|
|
7296
7325
|
'使用 "黑市 分类名称" 查看详细信息',
|
|
7297
7326
|
discountLines.length ? [
|
|
7298
|
-
"💰
|
|
7327
|
+
"💰 折扣明细:",
|
|
7299
7328
|
...discountLines
|
|
7300
7329
|
].join("\n") : "",
|
|
7301
7330
|
"====================",
|
|
@@ -7373,13 +7402,13 @@ ${validTypes.join("、")}`;
|
|
|
7373
7402
|
let discountInfo = [];
|
|
7374
7403
|
if (isSaboteur && normalizedCategory === "爆破物") {
|
|
7375
7404
|
discountInfo = [
|
|
7376
|
-
"💰
|
|
7377
|
-
"💣 破坏者职业:爆破物类物品50%折扣"
|
|
7405
|
+
"💰 折扣明细:",
|
|
7406
|
+
"▸ 💣 破坏者职业:爆破物类物品50%折扣"
|
|
7378
7407
|
];
|
|
7379
7408
|
} else if (isComputerExpert && normalizedCategory === "设备工具") {
|
|
7380
7409
|
discountInfo = [
|
|
7381
|
-
"💰
|
|
7382
|
-
"💻 计算机专家职业:设备工具类物品50%折扣"
|
|
7410
|
+
"💰 折扣明细:",
|
|
7411
|
+
"▸ 💻 计算机专家职业:设备工具类物品50%折扣"
|
|
7383
7412
|
];
|
|
7384
7413
|
}
|
|
7385
7414
|
return [
|
|
@@ -7500,7 +7529,7 @@ ${validTypes.join("、")}`;
|
|
|
7500
7529
|
return [
|
|
7501
7530
|
`✅ 成功订购【${item}】!`,
|
|
7502
7531
|
...priceInfo,
|
|
7503
|
-
discountLines.length ?
|
|
7532
|
+
discountLines.length ? `💰 折扣明细:
|
|
7504
7533
|
▸ ${discountLines.join("\n▸ ")}` : "",
|
|
7505
7534
|
`装备状态:${equippedStatus}`,
|
|
7506
7535
|
'输入 "武器仓库" 管理武器'
|
|
@@ -7513,7 +7542,7 @@ ${validTypes.join("、")}`;
|
|
|
7513
7542
|
return [
|
|
7514
7543
|
`✅ 成功订购【${item}】x1!`,
|
|
7515
7544
|
...priceInfo,
|
|
7516
|
-
discountLines.length ?
|
|
7545
|
+
discountLines.length ? `💰 折扣明细:
|
|
7517
7546
|
▸ ${discountLines.join("\n▸ ")}` : "",
|
|
7518
7547
|
`当前库存:${currentStock}件`,
|
|
7519
7548
|
'输入 "仓库" 查看所有物品'
|
|
@@ -7600,7 +7629,7 @@ ${validTypes.join("、")}`;
|
|
|
7600
7629
|
return [
|
|
7601
7630
|
`✅ 成功使用 ${itemNameConfirmed}`,
|
|
7602
7631
|
`剩余数量:${newQuantity}`,
|
|
7603
|
-
|
|
7632
|
+
`触发效果:${effectResult.message}`
|
|
7604
7633
|
].join("\n");
|
|
7605
7634
|
} catch (error) {
|
|
7606
7635
|
ctx.logger("GGCEVO").error(error);
|
|
@@ -7625,8 +7654,8 @@ ${validTypes.join("、")}`;
|
|
|
7625
7654
|
"🛰️ 空间站科技系统 🛰️",
|
|
7626
7655
|
'使用 "科技 科技名称" 查看详细信息',
|
|
7627
7656
|
isIntelligenceOfficer ? [
|
|
7628
|
-
"💰
|
|
7629
|
-
"🎖️ 情报副官职业:10
|
|
7657
|
+
"💰 折扣明细:",
|
|
7658
|
+
"▸ 🎖️ 情报副官职业:10%折扣"
|
|
7630
7659
|
].join("\n") : "",
|
|
7631
7660
|
"====================",
|
|
7632
7661
|
...techList,
|
|
@@ -7653,8 +7682,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7653
7682
|
let discountInfo = [];
|
|
7654
7683
|
if (isIntelligenceOfficer) {
|
|
7655
7684
|
discountInfo = [
|
|
7656
|
-
"💰
|
|
7657
|
-
"🎖️ 情报副官职业:10
|
|
7685
|
+
"💰 折扣明细:",
|
|
7686
|
+
"▸ 🎖️ 情报副官职业:10%折扣"
|
|
7658
7687
|
];
|
|
7659
7688
|
}
|
|
7660
7689
|
return [
|
|
@@ -7760,7 +7789,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7760
7789
|
}
|
|
7761
7790
|
reportLines.push(rewardLine);
|
|
7762
7791
|
if (tech.level >= 3) {
|
|
7763
|
-
reportLines.push(
|
|
7792
|
+
reportLines.push(`⚡ 加成效果:`);
|
|
7793
|
+
reportLines.push(`▸ ⚙️ 采掘系统Lv.${tech.level}(矿骡):+${multiplier * 100}%金币`);
|
|
7764
7794
|
}
|
|
7765
7795
|
reportLines.push(`🏆 历史总挖矿收益:${record.totalMined + total}金币`);
|
|
7766
7796
|
reportLines.push("💡 已自动开始下一轮挖矿");
|
|
@@ -7841,7 +7871,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7841
7871
|
handle,
|
|
7842
7872
|
taskId: taskConfig.id
|
|
7843
7873
|
});
|
|
7844
|
-
if (!taskData) return `⚠️
|
|
7874
|
+
if (!taskData) return `⚠️ ⚠️ 任务进度不足!无法完成"${taskName}"任务`;
|
|
7845
7875
|
if (taskData.progress < taskConfig.target) {
|
|
7846
7876
|
return `⚠️ 任务进度不足!当前进度:${taskData.progress}/${taskConfig.target}`;
|
|
7847
7877
|
}
|
|
@@ -7852,16 +7882,17 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7852
7882
|
const techLevel = Math.min(systemFirmwareTech?.level || 0, 5);
|
|
7853
7883
|
let baseReward = taskConfig.price;
|
|
7854
7884
|
let actualReward = baseReward;
|
|
7855
|
-
let bonusMessage = "";
|
|
7856
7885
|
let bonusPercent = 0;
|
|
7857
7886
|
if (techLevel > 0) {
|
|
7858
7887
|
const normalBonus = [0, 5, 10, 15, 20, 25][techLevel];
|
|
7859
|
-
const careerBonus = careerData?.group === "人类联盟" && ["舰长", "情报副官"].includes(careerData
|
|
7888
|
+
const careerBonus = careerData?.group === "人类联盟" && ["舰长", "情报副官"].includes(careerData?.career) ? [0, 10, 20, 30, 40, 50][techLevel] : 0;
|
|
7860
7889
|
bonusPercent = Math.max(normalBonus, careerBonus);
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7890
|
+
}
|
|
7891
|
+
if (careerData?.group === "人类联盟" && careerData.career === "舰长") {
|
|
7892
|
+
bonusPercent += 50;
|
|
7893
|
+
}
|
|
7894
|
+
if (bonusPercent > 0) {
|
|
7895
|
+
actualReward = Math.round(baseReward * (1 + bonusPercent / 100));
|
|
7865
7896
|
}
|
|
7866
7897
|
await ctx.database.set("ggcevo_task", {
|
|
7867
7898
|
handle,
|
|
@@ -7877,9 +7908,13 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7877
7908
|
}], ["handle"]);
|
|
7878
7909
|
const [updatedSignData] = await ctx.database.get("ggcevo_sign", { handle });
|
|
7879
7910
|
const response = [
|
|
7880
|
-
`🎉 恭喜您成功完成【${taskName}
|
|
7881
|
-
`任务奖励:${actualReward}金币(基础值:${baseReward}金币)`
|
|
7911
|
+
`🎉 恭喜您成功完成【${taskName}】任务!`
|
|
7882
7912
|
];
|
|
7913
|
+
if (bonusPercent > 0) {
|
|
7914
|
+
response.push(`任务奖励:${actualReward}金币 (基础值:${baseReward}金币)`);
|
|
7915
|
+
} else {
|
|
7916
|
+
response.push(`任务奖励:${actualReward}金币`);
|
|
7917
|
+
}
|
|
7883
7918
|
if (bonusPercent > 0) {
|
|
7884
7919
|
let bonusType = "";
|
|
7885
7920
|
if (careerData?.group === "人类联盟" && ["舰长", "情报副官"].includes(careerData.career)) {
|
|
@@ -7887,7 +7922,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7887
7922
|
} else {
|
|
7888
7923
|
bonusType = "(普通加成)";
|
|
7889
7924
|
}
|
|
7890
|
-
response.push(
|
|
7925
|
+
response.push(`⚡ 加成效果:`);
|
|
7926
|
+
response.push(`▸ ⚙️ 关键系统固件Lv.${techLevel}:+${bonusPercent}%金币`);
|
|
7891
7927
|
}
|
|
7892
7928
|
response.push(
|
|
7893
7929
|
`累计完成次数:${newCompletions}次`,
|