koishi-plugin-ggcevo-game 1.4.16 → 1.4.18
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 +169 -128
- 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,12 +4094,23 @@ ${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);
|
|
4102
|
+
messages.push(
|
|
4103
|
+
`获得金币:${finalReward}`
|
|
4104
|
+
);
|
|
4105
|
+
if (bonusMessages.length > 0) {
|
|
4106
|
+
messages.push(
|
|
4107
|
+
`⚡ 加成效果:`,
|
|
4108
|
+
...bonusMessages
|
|
4109
|
+
);
|
|
4110
|
+
}
|
|
4079
4111
|
messages.push(
|
|
4080
|
-
`获得金币:${finalReward}`,
|
|
4081
|
-
careerMessage,
|
|
4082
|
-
redcrystalMessage,
|
|
4083
4112
|
`目标剩余HP:${Math.max(primaryResult.currentHP, 0)}/${maxHP}`,
|
|
4084
|
-
primaryResult.isDefeated ? `🎉
|
|
4113
|
+
primaryResult.isDefeated ? `🎉 恭喜,您已成功击败 ${targetBoss.name}!` : ""
|
|
4085
4114
|
);
|
|
4086
4115
|
return messages.filter((line) => line).join("\n");
|
|
4087
4116
|
}
|
|
@@ -4726,7 +4755,6 @@ ${itemDetails.join("\n")}`;
|
|
|
4726
4755
|
}
|
|
4727
4756
|
const messages = [];
|
|
4728
4757
|
let totalBonus = 0;
|
|
4729
|
-
let basePoints;
|
|
4730
4758
|
let tickets = 3;
|
|
4731
4759
|
if (monthlyDays === 7) {
|
|
4732
4760
|
tickets = 4;
|
|
@@ -4740,19 +4768,24 @@ ${itemDetails.join("\n")}`;
|
|
|
4740
4768
|
const [systemFirmwareTech] = await ctx.database.get("ggcevo_tech", { handle, techId: 5 }).catch(() => [{ level: 0 }]);
|
|
4741
4769
|
const systemFirmwareLevel = Math.min(systemFirmwareTech?.level || 0, 5);
|
|
4742
4770
|
const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
|
|
4743
|
-
const
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
else if (monthlyDays < 28) basePoints = getRandomInt(80, 100);
|
|
4771
|
+
const shouldApplyFirmwareEffect = careerData?.group === "人类联盟" && ["舰长", "情报副官"].includes(careerData.career) && systemFirmwareLevel >= 3;
|
|
4772
|
+
let basePoints;
|
|
4773
|
+
if (shouldApplyFirmwareEffect) {
|
|
4774
|
+
if (systemFirmwareLevel >= 5) {
|
|
4775
|
+
if (monthlyDays < 28) basePoints = getRandomInt(80, 100);
|
|
4749
4776
|
else basePoints = getRandomInt(100, 200);
|
|
4750
|
-
messages.push(`🛰️
|
|
4751
|
-
} else if (systemFirmwareLevel
|
|
4777
|
+
messages.push(`🛰️ 关键系统固件Lv.5:移除签到21日以下奖励区间`);
|
|
4778
|
+
} else if (systemFirmwareLevel >= 4) {
|
|
4752
4779
|
if (monthlyDays < 21) basePoints = getRandomInt(60, 80);
|
|
4753
4780
|
else if (monthlyDays < 28) basePoints = getRandomInt(80, 100);
|
|
4754
4781
|
else basePoints = getRandomInt(100, 200);
|
|
4755
|
-
messages.push(`🛰️
|
|
4782
|
+
messages.push(`🛰️ 关键系统固件Lv.4:移除签到14日以下奖励区间`);
|
|
4783
|
+
} else if (systemFirmwareLevel >= 3) {
|
|
4784
|
+
if (monthlyDays < 14) basePoints = getRandomInt(40, 60);
|
|
4785
|
+
else if (monthlyDays < 21) basePoints = getRandomInt(60, 80);
|
|
4786
|
+
else if (monthlyDays < 28) basePoints = getRandomInt(80, 100);
|
|
4787
|
+
else basePoints = getRandomInt(100, 200);
|
|
4788
|
+
messages.push(`🛰️ 关键系统固件Lv.3:移除签到7日以下奖励区间`);
|
|
4756
4789
|
}
|
|
4757
4790
|
} else {
|
|
4758
4791
|
if (monthlyDays < 7) basePoints = getRandomInt(20, 40);
|
|
@@ -4778,7 +4811,7 @@ ${itemDetails.join("\n")}`;
|
|
|
4778
4811
|
const finalBonus = Math.max(baseTechBonus, careerTechBonus);
|
|
4779
4812
|
if (finalBonus > 0) {
|
|
4780
4813
|
totalBonus += finalBonus / 100;
|
|
4781
|
-
messages.push(`⚙️
|
|
4814
|
+
messages.push(`⚙️ 采掘系统Lv.${techLevel}:+${finalBonus}%金币`);
|
|
4782
4815
|
}
|
|
4783
4816
|
}
|
|
4784
4817
|
if (careerData.career === "深空矿工") {
|
|
@@ -5985,9 +6018,6 @@ ${items.join("、")}
|
|
|
5985
6018
|
`📊 胜率预测:${winRate.toFixed(1)}%`,
|
|
5986
6019
|
`🎰 金币变动:${stealPercentage}%`
|
|
5987
6020
|
];
|
|
5988
|
-
if (targetCareer.group === "人类联盟" && isWin) {
|
|
5989
|
-
result.push(`🛡️ 人类联盟:应战者PK失败时仅损失1%的金币`);
|
|
5990
|
-
}
|
|
5991
6021
|
if (computerExpertProtection) {
|
|
5992
6022
|
result.push(`💻 计算机专家职业:应战者PK失败时不损失金币`);
|
|
5993
6023
|
} else if (isWin) {
|
|
@@ -5995,17 +6025,21 @@ ${items.join("、")}
|
|
|
5995
6025
|
} else {
|
|
5996
6026
|
result.push(`💸 您从口袋里拿出了${goldTransfer}枚金币上交给对方`);
|
|
5997
6027
|
}
|
|
6028
|
+
result.push(`⚡ 加成效果:`);
|
|
6029
|
+
if (targetCareer.group === "人类联盟" && isWin) {
|
|
6030
|
+
result.push(`▸ 🛡️ 人类联盟:应战者PK失败时仅损失1%的金币`);
|
|
6031
|
+
}
|
|
5998
6032
|
if (mp3Effect) {
|
|
5999
|
-
result.push(
|
|
6033
|
+
result.push(`▸ 💿 MP3播放器生效:挑战者PK失败时上交的金币减少50%`);
|
|
6000
6034
|
}
|
|
6001
6035
|
if (hornEffect) {
|
|
6002
|
-
result.push(
|
|
6036
|
+
result.push(`▸ 📯 气喇叭生效:辛迪加海盗总部为您发放了额外${extraGold}金币奖励!`);
|
|
6003
6037
|
}
|
|
6004
6038
|
if (initiatorCareer?.group === "辛迪加海盗") {
|
|
6005
|
-
result.push(
|
|
6039
|
+
result.push(`▸ 🔴 辛迪加海盗阵营:+1枚红晶`);
|
|
6006
6040
|
}
|
|
6007
6041
|
if (isWin && initiatorCareer?.career === "辛迪加财务经理") {
|
|
6008
|
-
result.push(
|
|
6042
|
+
result.push(`▸ 🎖️ 辛迪加财务经理职业:+1枚红晶`);
|
|
6009
6043
|
}
|
|
6010
6044
|
result.push(`📅 剩余挑战次数:${config.dailyPKLimit - (initiatorPK.todayCount + 1)}`);
|
|
6011
6045
|
return result.join("\n");
|
|
@@ -6057,7 +6091,7 @@ ${items.join("、")}
|
|
|
6057
6091
|
if (careerData?.career === "武器中士") {
|
|
6058
6092
|
const weaponSpecialistDiscount = 20;
|
|
6059
6093
|
totalDiscount += weaponSpecialistDiscount;
|
|
6060
|
-
discountDetails.push(
|
|
6094
|
+
discountDetails.push(`▸ 🎖️ 武器中士职业:${weaponSpecialistDiscount}%折扣`);
|
|
6061
6095
|
}
|
|
6062
6096
|
const activeWish = await ctx.database.get("ggcevo_Wish_Record", {
|
|
6063
6097
|
handle,
|
|
@@ -6069,7 +6103,7 @@ ${items.join("、")}
|
|
|
6069
6103
|
if (activeWish) {
|
|
6070
6104
|
const grasshopperDiscount = 20;
|
|
6071
6105
|
totalDiscount += grasshopperDiscount;
|
|
6072
|
-
discountDetails.push(
|
|
6106
|
+
discountDetails.push(`▸ 🦗 蚱蜢优购祈愿:${grasshopperDiscount}%折扣`);
|
|
6073
6107
|
}
|
|
6074
6108
|
totalDiscount = Math.min(totalDiscount, 100);
|
|
6075
6109
|
const categoryStats = Object.values(weaponConfig).filter((weapon) => weapon.price !== 0).reduce((stats, weapon) => {
|
|
@@ -6080,7 +6114,7 @@ ${items.join("、")}
|
|
|
6080
6114
|
return [
|
|
6081
6115
|
"🏪 咕咕武器库分类 🏪",
|
|
6082
6116
|
'使用 "武器库 分类名称" 查看详细列表',
|
|
6083
|
-
totalDiscount > 0 && `💰
|
|
6117
|
+
totalDiscount > 0 && `💰 折扣明细:
|
|
6084
6118
|
${discountDetails.length ? `${discountDetails.join("\n")}` : ""}`,
|
|
6085
6119
|
"====================",
|
|
6086
6120
|
...Object.entries(categoryStats).map(([catName, count]) => `▸ ${catName} (${count}种)`),
|
|
@@ -6115,7 +6149,7 @@ ${Object.keys(categoryStats).join("、")}`;
|
|
|
6115
6149
|
].filter(Boolean).join("\n");
|
|
6116
6150
|
});
|
|
6117
6151
|
const permissionNotice = isLegendaryCategory ? '⚠️ 注意:购买传奇武器需要"传奇武器购买权限"' : null;
|
|
6118
|
-
const discountInfo = totalDiscount > 0 && !isLegendaryCategory ? `💰
|
|
6152
|
+
const discountInfo = totalDiscount > 0 && !isLegendaryCategory ? `💰 折扣明细:
|
|
6119
6153
|
${discountDetails.length ? `${discountDetails.join("\n")}` : ""}` : null;
|
|
6120
6154
|
return [
|
|
6121
6155
|
`🏪 咕咕武器库 - ${category} 🏪`,
|
|
@@ -6231,13 +6265,13 @@ ${validTypes.join("、")}`;
|
|
|
6231
6265
|
if (activeWish) {
|
|
6232
6266
|
const wishDiscount = 20;
|
|
6233
6267
|
totalDiscount += wishDiscount;
|
|
6234
|
-
discountDetails.push(
|
|
6268
|
+
discountDetails.push(`▸ 🦗 蚱蜢优购祈愿:${wishDiscount}%折扣`);
|
|
6235
6269
|
}
|
|
6236
6270
|
}
|
|
6237
6271
|
if (isWeapon && careerData?.career === "武器中士") {
|
|
6238
6272
|
const specialistDiscount = 20;
|
|
6239
6273
|
totalDiscount += specialistDiscount;
|
|
6240
|
-
discountDetails.push(
|
|
6274
|
+
discountDetails.push(`▸ 🎖️ 武器中士职业:${specialistDiscount}%折扣`);
|
|
6241
6275
|
}
|
|
6242
6276
|
totalDiscount = Math.min(totalDiscount, 100);
|
|
6243
6277
|
}
|
|
@@ -6313,7 +6347,7 @@ ${validTypes.join("、")}`;
|
|
|
6313
6347
|
扣除 1 次传奇武器购买权限,剩余次数:${permissions?.legendarypermissions || 0}`;
|
|
6314
6348
|
} else if (discountDetails.length > 0) {
|
|
6315
6349
|
message += `(原价${config2.price} 金币)
|
|
6316
|
-
折扣明细:
|
|
6350
|
+
💰 折扣明细:
|
|
6317
6351
|
▸ ${discountDetails.join("\n▸ ")}`;
|
|
6318
6352
|
} else {
|
|
6319
6353
|
message += ` (原价${config2.price} 金币)`;
|
|
@@ -6482,8 +6516,8 @@ ${validTypes.join("、")}`;
|
|
|
6482
6516
|
`✅ ${weapon} 成功安装 ${mod}!`,
|
|
6483
6517
|
`花费金币:${actualCost}${discountRate > 0 ? ` (原价${modInfo.cost})` : ""}`,
|
|
6484
6518
|
discountRate > 0 && [
|
|
6485
|
-
"折扣明细:",
|
|
6486
|
-
|
|
6519
|
+
"💰 折扣明细:",
|
|
6520
|
+
`▸ ⚙️ 武器升级平台Lv.${techLevel}:${discountRate}%折扣`
|
|
6487
6521
|
].join("\n"),
|
|
6488
6522
|
`改装槽:${equipment.installedMods.length + 1}/${equipment.modificationSlots}`
|
|
6489
6523
|
].filter(Boolean).join("\n");
|
|
@@ -6521,7 +6555,7 @@ ${validTypes.join("、")}`;
|
|
|
6521
6555
|
"使用「改装 武器名称 模块名称」安装",
|
|
6522
6556
|
"※ 每个武器只能安装一个专属模块",
|
|
6523
6557
|
exclusiveDiscountRate > 0 && `💰 当前专属模块折扣:
|
|
6524
|
-
⚙️
|
|
6558
|
+
▸ ⚙️ 武器升级平台Lv.${techLevel}:${exclusiveDiscountRate}%折扣`,
|
|
6525
6559
|
"====================",
|
|
6526
6560
|
exclusiveMods.length ? exclusiveMods.join("\n") : "该武器暂无专属模块"
|
|
6527
6561
|
].filter(Boolean).join("\n");
|
|
@@ -6532,7 +6566,7 @@ ${validTypes.join("、")}`;
|
|
|
6532
6566
|
"使用「改装 武器名称 模块名称」安装通用模块",
|
|
6533
6567
|
"使用「改装 武器名称」查询武器专属模块",
|
|
6534
6568
|
universalDiscountRate > 0 && `💰 当前通用模块折扣:
|
|
6535
|
-
⚙️
|
|
6569
|
+
▸ ⚙️ 武器升级平台Lv.${techLevel}:${universalDiscountRate}%折扣`,
|
|
6536
6570
|
"====================",
|
|
6537
6571
|
universalMods.join("\n")
|
|
6538
6572
|
].filter(Boolean).join("\n");
|
|
@@ -6551,9 +6585,9 @@ ${validTypes.join("、")}`;
|
|
|
6551
6585
|
const existingEntries = await ctx.database.get("ggcevo_blacklist", { handle });
|
|
6552
6586
|
if (existingEntries.length > 0) return "⛔ 您已被列入黑名单。";
|
|
6553
6587
|
const weaponId = weaponConfig[weapon]?.id;
|
|
6554
|
-
if (!weaponId) return "❌ 请输入“拆卸 武器名称 模块名称”\n
|
|
6588
|
+
if (!weaponId) return "❌ 请输入“拆卸 武器名称 模块名称”\n注意:通用模块返还80%金币,专属模块返还50%金币";
|
|
6555
6589
|
const modInfo = modConfig[mod];
|
|
6556
|
-
if (!modInfo) return "❌ 请输入“拆卸 武器名称 模块名称”\n
|
|
6590
|
+
if (!modInfo) return "❌ 请输入“拆卸 武器名称 模块名称”\n注意:通用模块返还80%金币,专属模块返还50%金币";
|
|
6557
6591
|
const refundRate = modInfo.isExclusive ? 0.5 : 0.8;
|
|
6558
6592
|
const refundType = modInfo.isExclusive ? "专属模块返还50%" : "通用模块返还80%";
|
|
6559
6593
|
const [equipment] = await ctx.database.get("ggcevo_equipment", {
|
|
@@ -6649,7 +6683,8 @@ ${validTypes.join("、")}`;
|
|
|
6649
6683
|
allDeadTargets.push(targetBoss);
|
|
6650
6684
|
}
|
|
6651
6685
|
let scatterResult = null;
|
|
6652
|
-
const
|
|
6686
|
+
const hasOtherBosses = activeBosses.some((b) => b.name !== targetBoss.name);
|
|
6687
|
+
const isScatterAttack = (equippedWeapon.installedMods?.includes("光束曲射晶片") && weaponName === "碎骨步枪" || weaponName === "中子步枪") && hasOtherBosses;
|
|
6653
6688
|
if (isScatterAttack) {
|
|
6654
6689
|
scatterResult = await handleScatterAttack(
|
|
6655
6690
|
ctx,
|
|
@@ -6680,10 +6715,9 @@ ${validTypes.join("、")}`;
|
|
|
6680
6715
|
const deathResults = await handleDeathTargets(ctx, allDeadTargets, session.username, handle);
|
|
6681
6716
|
bossEventBroadcast = deathResults.bossBroadcast;
|
|
6682
6717
|
cleanerRewardBroadcast = deathResults.cleanerBroadcast;
|
|
6683
|
-
const { finalReward, careerMessage, redcrystalMessage } = await calculateRewards(
|
|
6718
|
+
const { finalReward, careerMessage, redcrystalMessage, techMessage } = await calculateRewards(
|
|
6684
6719
|
ctx,
|
|
6685
6720
|
handle,
|
|
6686
|
-
session.username,
|
|
6687
6721
|
totalDamage
|
|
6688
6722
|
);
|
|
6689
6723
|
await updateSignRecord(ctx, handle, finalReward);
|
|
@@ -6711,10 +6745,10 @@ ${validTypes.join("、")}`;
|
|
|
6711
6745
|
targetBoss,
|
|
6712
6746
|
primaryAttackResult,
|
|
6713
6747
|
scatterResult,
|
|
6714
|
-
totalDamage,
|
|
6715
6748
|
finalReward,
|
|
6716
6749
|
maxHP,
|
|
6717
6750
|
careerMessage,
|
|
6751
|
+
techMessage,
|
|
6718
6752
|
redcrystalMessage
|
|
6719
6753
|
);
|
|
6720
6754
|
await session.send(resultMessage);
|
|
@@ -7286,16 +7320,16 @@ ${validTypes.join("、")}`;
|
|
|
7286
7320
|
if (!category) {
|
|
7287
7321
|
const discountLines = [];
|
|
7288
7322
|
if (isComputerExpert) {
|
|
7289
|
-
discountLines.push("💻 计算机专家职业:设备工具类物品50%折扣");
|
|
7323
|
+
discountLines.push("▸ 💻 计算机专家职业:设备工具类物品50%折扣");
|
|
7290
7324
|
}
|
|
7291
7325
|
if (isSaboteur) {
|
|
7292
|
-
discountLines.push("💣 破坏者职业:爆破物类物品50%折扣");
|
|
7326
|
+
discountLines.push("▸ 💣 破坏者职业:爆破物类物品50%折扣");
|
|
7293
7327
|
}
|
|
7294
7328
|
return [
|
|
7295
7329
|
"🏴 辛迪加黑市 🏴",
|
|
7296
7330
|
'使用 "黑市 分类名称" 查看详细信息',
|
|
7297
7331
|
discountLines.length ? [
|
|
7298
|
-
"💰
|
|
7332
|
+
"💰 折扣明细:",
|
|
7299
7333
|
...discountLines
|
|
7300
7334
|
].join("\n") : "",
|
|
7301
7335
|
"====================",
|
|
@@ -7373,13 +7407,13 @@ ${validTypes.join("、")}`;
|
|
|
7373
7407
|
let discountInfo = [];
|
|
7374
7408
|
if (isSaboteur && normalizedCategory === "爆破物") {
|
|
7375
7409
|
discountInfo = [
|
|
7376
|
-
"💰
|
|
7377
|
-
"💣 破坏者职业:爆破物类物品50%折扣"
|
|
7410
|
+
"💰 折扣明细:",
|
|
7411
|
+
"▸ 💣 破坏者职业:爆破物类物品50%折扣"
|
|
7378
7412
|
];
|
|
7379
7413
|
} else if (isComputerExpert && normalizedCategory === "设备工具") {
|
|
7380
7414
|
discountInfo = [
|
|
7381
|
-
"💰
|
|
7382
|
-
"💻 计算机专家职业:设备工具类物品50%折扣"
|
|
7415
|
+
"💰 折扣明细:",
|
|
7416
|
+
"▸ 💻 计算机专家职业:设备工具类物品50%折扣"
|
|
7383
7417
|
];
|
|
7384
7418
|
}
|
|
7385
7419
|
return [
|
|
@@ -7500,7 +7534,7 @@ ${validTypes.join("、")}`;
|
|
|
7500
7534
|
return [
|
|
7501
7535
|
`✅ 成功订购【${item}】!`,
|
|
7502
7536
|
...priceInfo,
|
|
7503
|
-
discountLines.length ?
|
|
7537
|
+
discountLines.length ? `💰 折扣明细:
|
|
7504
7538
|
▸ ${discountLines.join("\n▸ ")}` : "",
|
|
7505
7539
|
`装备状态:${equippedStatus}`,
|
|
7506
7540
|
'输入 "武器仓库" 管理武器'
|
|
@@ -7513,7 +7547,7 @@ ${validTypes.join("、")}`;
|
|
|
7513
7547
|
return [
|
|
7514
7548
|
`✅ 成功订购【${item}】x1!`,
|
|
7515
7549
|
...priceInfo,
|
|
7516
|
-
discountLines.length ?
|
|
7550
|
+
discountLines.length ? `💰 折扣明细:
|
|
7517
7551
|
▸ ${discountLines.join("\n▸ ")}` : "",
|
|
7518
7552
|
`当前库存:${currentStock}件`,
|
|
7519
7553
|
'输入 "仓库" 查看所有物品'
|
|
@@ -7600,7 +7634,7 @@ ${validTypes.join("、")}`;
|
|
|
7600
7634
|
return [
|
|
7601
7635
|
`✅ 成功使用 ${itemNameConfirmed}`,
|
|
7602
7636
|
`剩余数量:${newQuantity}`,
|
|
7603
|
-
|
|
7637
|
+
`触发效果:${effectResult.message}`
|
|
7604
7638
|
].join("\n");
|
|
7605
7639
|
} catch (error) {
|
|
7606
7640
|
ctx.logger("GGCEVO").error(error);
|
|
@@ -7625,8 +7659,8 @@ ${validTypes.join("、")}`;
|
|
|
7625
7659
|
"🛰️ 空间站科技系统 🛰️",
|
|
7626
7660
|
'使用 "科技 科技名称" 查看详细信息',
|
|
7627
7661
|
isIntelligenceOfficer ? [
|
|
7628
|
-
"💰
|
|
7629
|
-
"🎖️ 情报副官职业:10
|
|
7662
|
+
"💰 折扣明细:",
|
|
7663
|
+
"▸ 🎖️ 情报副官职业:10%折扣"
|
|
7630
7664
|
].join("\n") : "",
|
|
7631
7665
|
"====================",
|
|
7632
7666
|
...techList,
|
|
@@ -7653,8 +7687,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7653
7687
|
let discountInfo = [];
|
|
7654
7688
|
if (isIntelligenceOfficer) {
|
|
7655
7689
|
discountInfo = [
|
|
7656
|
-
"💰
|
|
7657
|
-
"🎖️ 情报副官职业:10
|
|
7690
|
+
"💰 折扣明细:",
|
|
7691
|
+
"▸ 🎖️ 情报副官职业:10%折扣"
|
|
7658
7692
|
];
|
|
7659
7693
|
}
|
|
7660
7694
|
return [
|
|
@@ -7760,7 +7794,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7760
7794
|
}
|
|
7761
7795
|
reportLines.push(rewardLine);
|
|
7762
7796
|
if (tech.level >= 3) {
|
|
7763
|
-
reportLines.push(
|
|
7797
|
+
reportLines.push(`⚡ 加成效果:`);
|
|
7798
|
+
reportLines.push(`▸ ⚙️ 采掘系统Lv.${tech.level}(矿骡):+${multiplier * 100}%金币`);
|
|
7764
7799
|
}
|
|
7765
7800
|
reportLines.push(`🏆 历史总挖矿收益:${record.totalMined + total}金币`);
|
|
7766
7801
|
reportLines.push("💡 已自动开始下一轮挖矿");
|
|
@@ -7841,7 +7876,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7841
7876
|
handle,
|
|
7842
7877
|
taskId: taskConfig.id
|
|
7843
7878
|
});
|
|
7844
|
-
if (!taskData) return `⚠️
|
|
7879
|
+
if (!taskData) return `⚠️ ⚠️ 任务进度不足!无法完成"${taskName}"任务`;
|
|
7845
7880
|
if (taskData.progress < taskConfig.target) {
|
|
7846
7881
|
return `⚠️ 任务进度不足!当前进度:${taskData.progress}/${taskConfig.target}`;
|
|
7847
7882
|
}
|
|
@@ -7852,16 +7887,17 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7852
7887
|
const techLevel = Math.min(systemFirmwareTech?.level || 0, 5);
|
|
7853
7888
|
let baseReward = taskConfig.price;
|
|
7854
7889
|
let actualReward = baseReward;
|
|
7855
|
-
let bonusMessage = "";
|
|
7856
7890
|
let bonusPercent = 0;
|
|
7857
7891
|
if (techLevel > 0) {
|
|
7858
7892
|
const normalBonus = [0, 5, 10, 15, 20, 25][techLevel];
|
|
7859
|
-
const careerBonus = careerData?.group === "人类联盟" && ["舰长", "情报副官"].includes(careerData
|
|
7893
|
+
const careerBonus = careerData?.group === "人类联盟" && ["舰长", "情报副官"].includes(careerData?.career) ? [0, 10, 20, 30, 40, 50][techLevel] : 0;
|
|
7860
7894
|
bonusPercent = Math.max(normalBonus, careerBonus);
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7895
|
+
}
|
|
7896
|
+
if (careerData?.group === "人类联盟" && careerData.career === "舰长") {
|
|
7897
|
+
bonusPercent += 50;
|
|
7898
|
+
}
|
|
7899
|
+
if (bonusPercent > 0) {
|
|
7900
|
+
actualReward = Math.round(baseReward * (1 + bonusPercent / 100));
|
|
7865
7901
|
}
|
|
7866
7902
|
await ctx.database.set("ggcevo_task", {
|
|
7867
7903
|
handle,
|
|
@@ -7877,9 +7913,13 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7877
7913
|
}], ["handle"]);
|
|
7878
7914
|
const [updatedSignData] = await ctx.database.get("ggcevo_sign", { handle });
|
|
7879
7915
|
const response = [
|
|
7880
|
-
`🎉 恭喜您成功完成【${taskName}
|
|
7881
|
-
`任务奖励:${actualReward}金币(基础值:${baseReward}金币)`
|
|
7916
|
+
`🎉 恭喜您成功完成【${taskName}】任务!`
|
|
7882
7917
|
];
|
|
7918
|
+
if (bonusPercent > 0) {
|
|
7919
|
+
response.push(`任务奖励:${actualReward}金币 (基础值:${baseReward}金币)`);
|
|
7920
|
+
} else {
|
|
7921
|
+
response.push(`任务奖励:${actualReward}金币`);
|
|
7922
|
+
}
|
|
7883
7923
|
if (bonusPercent > 0) {
|
|
7884
7924
|
let bonusType = "";
|
|
7885
7925
|
if (careerData?.group === "人类联盟" && ["舰长", "情报副官"].includes(careerData.career)) {
|
|
@@ -7887,7 +7927,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
7887
7927
|
} else {
|
|
7888
7928
|
bonusType = "(普通加成)";
|
|
7889
7929
|
}
|
|
7890
|
-
response.push(
|
|
7930
|
+
response.push(`⚡ 加成效果:`);
|
|
7931
|
+
response.push(`▸ ⚙️ 关键系统固件Lv.${techLevel}:+${bonusPercent}%金币`);
|
|
7891
7932
|
}
|
|
7892
7933
|
response.push(
|
|
7893
7934
|
`累计完成次数:${newCompletions}次`,
|