koishi-plugin-ggcevo-game 1.6.65 → 1.6.67
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 +27 -67
- package/lib/utils.d.ts +0 -1
- package/lib/wish.d.ts +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -5208,7 +5208,7 @@ var wishConfig = {
|
|
|
5208
5208
|
},
|
|
5209
5209
|
{
|
|
5210
5210
|
name: "精灵双倍",
|
|
5211
|
-
effect: "
|
|
5211
|
+
effect: "下一次击败主宰时可获得双倍资源兑换券"
|
|
5212
5212
|
},
|
|
5213
5213
|
{
|
|
5214
5214
|
name: "喵喵财源",
|
|
@@ -5770,8 +5770,7 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5770
5770
|
if (itemConfig2.id === 1) {
|
|
5771
5771
|
return {
|
|
5772
5772
|
success: false,
|
|
5773
|
-
message: "暂时被禁用了。"
|
|
5774
|
-
isDefeated: false
|
|
5773
|
+
message: "暂时被禁用了。"
|
|
5775
5774
|
};
|
|
5776
5775
|
const activeSentry = await ctx.database.get("ggcevo_boss", {
|
|
5777
5776
|
name: "空间站哨枪塔",
|
|
@@ -5779,8 +5778,7 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5779
5778
|
});
|
|
5780
5779
|
if (!activeSentry.length) return {
|
|
5781
5780
|
success: false,
|
|
5782
|
-
message: "⚠️ 目标「空间站哨枪塔」未存活"
|
|
5783
|
-
isDefeated: false
|
|
5781
|
+
message: "⚠️ 目标「空间站哨枪塔」未存活"
|
|
5784
5782
|
};
|
|
5785
5783
|
const [SentryTower] = await ctx.database.get("ggcevo_boss", {
|
|
5786
5784
|
name: "空间站哨枪塔",
|
|
@@ -5809,15 +5807,13 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5809
5807
|
});
|
|
5810
5808
|
return {
|
|
5811
5809
|
success: true,
|
|
5812
|
-
message: `成功引爆${itemName},对空间站哨枪塔造成${damageValue}
|
|
5813
|
-
isDefeated: false
|
|
5810
|
+
message: `成功引爆${itemName},对空间站哨枪塔造成${damageValue}点伤害,获得等额金币。`
|
|
5814
5811
|
};
|
|
5815
5812
|
}
|
|
5816
5813
|
if (itemConfig2.id === 2) {
|
|
5817
5814
|
if (!target) return {
|
|
5818
5815
|
success: false,
|
|
5819
|
-
message: "您未选择合适的目标。"
|
|
5820
|
-
isDefeated: false
|
|
5816
|
+
message: "您未选择合适的目标。"
|
|
5821
5817
|
};
|
|
5822
5818
|
const [targetboss] = await ctx.database.get("ggcevo_boss", {
|
|
5823
5819
|
name: target,
|
|
@@ -5825,29 +5821,25 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5825
5821
|
});
|
|
5826
5822
|
if (!targetboss) return {
|
|
5827
5823
|
success: false,
|
|
5828
|
-
message: "无法找到指定的目标。"
|
|
5829
|
-
isDefeated: false
|
|
5824
|
+
message: "无法找到指定的目标。"
|
|
5830
5825
|
};
|
|
5831
5826
|
if (targetboss.skills.includes("开天眼")) {
|
|
5832
5827
|
return {
|
|
5833
5828
|
success: false,
|
|
5834
|
-
message:
|
|
5835
|
-
isDefeated: false
|
|
5829
|
+
message: `目标免疫闪光弹,无法使用此物品。`
|
|
5836
5830
|
};
|
|
5837
5831
|
}
|
|
5838
5832
|
if (targetboss.tags.includes("建筑") || targetboss.tags.includes("重型") || targetboss.skills.includes("开天眼")) {
|
|
5839
5833
|
return {
|
|
5840
5834
|
success: false,
|
|
5841
|
-
message: `目标${target}拥有"${targetboss.tags.includes("建筑") ? "建筑" : "重型"}"
|
|
5842
|
-
isDefeated: false
|
|
5835
|
+
message: `目标${target}拥有"${targetboss.tags.includes("建筑") ? "建筑" : "重型"}"标签,无法使用此物品。`
|
|
5843
5836
|
};
|
|
5844
5837
|
}
|
|
5845
5838
|
const currentCount = targetboss?.skillStacks || 0;
|
|
5846
5839
|
if (currentCount <= 0) {
|
|
5847
5840
|
return {
|
|
5848
5841
|
success: false,
|
|
5849
|
-
message: `目标${target}的技能层数已为0
|
|
5850
|
-
isDefeated: false
|
|
5842
|
+
message: `目标${target}的技能层数已为0,无需使用此物品。`
|
|
5851
5843
|
};
|
|
5852
5844
|
}
|
|
5853
5845
|
const newCount = Math.max(0, currentCount - 10);
|
|
@@ -5859,15 +5851,13 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5859
5851
|
);
|
|
5860
5852
|
return {
|
|
5861
5853
|
success: true,
|
|
5862
|
-
message: `成功使用${itemName},使${target}的技能层数减少10
|
|
5863
|
-
isDefeated: false
|
|
5854
|
+
message: `成功使用${itemName},使${target}的技能层数减少10层`
|
|
5864
5855
|
};
|
|
5865
5856
|
}
|
|
5866
5857
|
if (itemConfig2.id === 4) {
|
|
5867
5858
|
if (!target) return {
|
|
5868
5859
|
success: false,
|
|
5869
|
-
message: "您未选择合适的目标。"
|
|
5870
|
-
isDefeated: false
|
|
5860
|
+
message: "您未选择合适的目标。"
|
|
5871
5861
|
};
|
|
5872
5862
|
const [targetboss] = await ctx.database.get("ggcevo_boss", {
|
|
5873
5863
|
name: target,
|
|
@@ -5876,14 +5866,12 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5876
5866
|
if (targetboss.skills.includes("质粒增殖")) {
|
|
5877
5867
|
return {
|
|
5878
5868
|
success: false,
|
|
5879
|
-
message:
|
|
5880
|
-
isDefeated: false
|
|
5869
|
+
message: `目标免疫脉冲手雷,无法使用此物品。`
|
|
5881
5870
|
};
|
|
5882
5871
|
}
|
|
5883
5872
|
if (!targetboss || targetboss?.energy === 0) return {
|
|
5884
5873
|
success: false,
|
|
5885
|
-
message: "您无法对没有能量的目标使用。"
|
|
5886
|
-
isDefeated: false
|
|
5874
|
+
message: "您无法对没有能量的目标使用。"
|
|
5887
5875
|
};
|
|
5888
5876
|
await ctx.database.set(
|
|
5889
5877
|
"ggcevo_boss",
|
|
@@ -5893,15 +5881,13 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5893
5881
|
);
|
|
5894
5882
|
return {
|
|
5895
5883
|
success: true,
|
|
5896
|
-
message: `成功使用${itemName},消耗${target}500
|
|
5897
|
-
isDefeated: false
|
|
5884
|
+
message: `成功使用${itemName},消耗${target}500点能量`
|
|
5898
5885
|
};
|
|
5899
5886
|
}
|
|
5900
5887
|
if (itemConfig2.id === 9) {
|
|
5901
5888
|
if (!target) return {
|
|
5902
5889
|
success: false,
|
|
5903
|
-
message: "使用燃烧弹需要指定目标。"
|
|
5904
|
-
isDefeated: false
|
|
5890
|
+
message: "使用燃烧弹需要指定目标。"
|
|
5905
5891
|
};
|
|
5906
5892
|
const [targetBoss] = await ctx.database.get("ggcevo_boss", {
|
|
5907
5893
|
name: target,
|
|
@@ -5909,15 +5895,13 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5909
5895
|
});
|
|
5910
5896
|
if (!targetBoss) return {
|
|
5911
5897
|
success: false,
|
|
5912
|
-
message: `目标「${target}
|
|
5913
|
-
isDefeated: false
|
|
5898
|
+
message: `目标「${target}」未存活或不存在。`
|
|
5914
5899
|
};
|
|
5915
5900
|
const aerialTargets = ["吸血蝙蝠首领", "吸血蝙蝠", "猛毒异兽", "剧毒蝙蝠"];
|
|
5916
5901
|
if (aerialTargets.includes(targetBoss.name)) {
|
|
5917
5902
|
return {
|
|
5918
5903
|
success: false,
|
|
5919
|
-
message: "无法对空中目标使用。"
|
|
5920
|
-
isDefeated: false
|
|
5904
|
+
message: "无法对空中目标使用。"
|
|
5921
5905
|
};
|
|
5922
5906
|
}
|
|
5923
5907
|
const immuneSkills = ["猎手异形", "环境适应"];
|
|
@@ -5926,8 +5910,7 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5926
5910
|
);
|
|
5927
5911
|
if (isImmune) return {
|
|
5928
5912
|
success: false,
|
|
5929
|
-
message: `目标「${target}
|
|
5930
|
-
isDefeated: false
|
|
5913
|
+
message: `目标「${target}」免疫燃烧效果。`
|
|
5931
5914
|
};
|
|
5932
5915
|
const baseLayers = 5;
|
|
5933
5916
|
let bonusLayers = 0;
|
|
@@ -5954,15 +5937,13 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5954
5937
|
const careerBonusMsg = playerCareer === "纵火狂" ? `(纵火狂使用莫洛托夫燃烧弹的效果提高100%)` : "";
|
|
5955
5938
|
return {
|
|
5956
5939
|
success: true,
|
|
5957
|
-
message: `成功使用${itemName},目标「${target}」的燃烧层数增加${totalLayers}层${careerBonusMsg}
|
|
5958
|
-
isDefeated: false
|
|
5940
|
+
message: `成功使用${itemName},目标「${target}」的燃烧层数增加${totalLayers}层${careerBonusMsg}`
|
|
5959
5941
|
};
|
|
5960
5942
|
}
|
|
5961
5943
|
if (itemConfig2.id === 10) {
|
|
5962
5944
|
if (!target) return {
|
|
5963
5945
|
success: false,
|
|
5964
|
-
message: "使用铝热炸弹需要指定目标。"
|
|
5965
|
-
isDefeated: false
|
|
5946
|
+
message: "使用铝热炸弹需要指定目标。"
|
|
5966
5947
|
};
|
|
5967
5948
|
const [targetBoss] = await ctx.database.get("ggcevo_boss", {
|
|
5968
5949
|
name: target,
|
|
@@ -5970,22 +5951,19 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
5970
5951
|
});
|
|
5971
5952
|
if (!targetBoss) return {
|
|
5972
5953
|
success: false,
|
|
5973
|
-
message: `目标「${target}
|
|
5974
|
-
isDefeated: false
|
|
5954
|
+
message: `目标「${target}」未存活或不存在。`
|
|
5975
5955
|
};
|
|
5976
5956
|
const aerialTargets = ["吸血蝙蝠首领", "吸血蝙蝠", "猛毒异兽", "剧毒蝙蝠"];
|
|
5977
5957
|
if (aerialTargets.includes(targetBoss.name)) {
|
|
5978
5958
|
return {
|
|
5979
5959
|
success: false,
|
|
5980
|
-
message: "无法对空中目标使用。"
|
|
5981
|
-
isDefeated: false
|
|
5960
|
+
message: "无法对空中目标使用。"
|
|
5982
5961
|
};
|
|
5983
5962
|
}
|
|
5984
5963
|
if (targetBoss.HP === 1) {
|
|
5985
5964
|
return {
|
|
5986
5965
|
success: false,
|
|
5987
|
-
message: `目标「${target}」血量已是1点,无法使用${itemName}
|
|
5988
|
-
isDefeated: false
|
|
5966
|
+
message: `目标「${target}」血量已是1点,无法使用${itemName}。`
|
|
5989
5967
|
};
|
|
5990
5968
|
}
|
|
5991
5969
|
let baseDamage = 100;
|
|
@@ -6020,22 +5998,18 @@ async function applyItemEffect(ctx, session, handle, itemConfig2, target) {
|
|
|
6020
5998
|
const lowHpMsg = newHP === 1 ? ",目标血量已降至1点" : "";
|
|
6021
5999
|
return {
|
|
6022
6000
|
success: true,
|
|
6023
|
-
message: `成功使用${itemName},对${isBuilding ? "建筑目标" : "目标"}「${target}」造成${actualDamage}点伤害${lowHpMsg}${careerBonusMsg}
|
|
6024
|
-
isDefeated: false
|
|
6025
|
-
// 永远不会消灭目标
|
|
6001
|
+
message: `成功使用${itemName},对${isBuilding ? "建筑目标" : "目标"}「${target}」造成${actualDamage}点伤害${lowHpMsg}${careerBonusMsg}`
|
|
6026
6002
|
};
|
|
6027
6003
|
}
|
|
6028
6004
|
return {
|
|
6029
6005
|
success: false,
|
|
6030
|
-
message: `${itemName}
|
|
6031
|
-
isDefeated: false
|
|
6006
|
+
message: `${itemName} 无法使用。`
|
|
6032
6007
|
};
|
|
6033
6008
|
} catch (error) {
|
|
6034
6009
|
console.error("物品效果处理失败:", error);
|
|
6035
6010
|
return {
|
|
6036
6011
|
success: false,
|
|
6037
|
-
message: "⚠️ 物品效果处理异常,已回滚操作。"
|
|
6038
|
-
isDefeated: false
|
|
6012
|
+
message: "⚠️ 物品效果处理异常,已回滚操作。"
|
|
6039
6013
|
};
|
|
6040
6014
|
}
|
|
6041
6015
|
}
|
|
@@ -11506,25 +11480,11 @@ ${discountReason}` : "",
|
|
|
11506
11480
|
{ handle, itemId: targetItem.itemId },
|
|
11507
11481
|
{ quantity: newQuantity }
|
|
11508
11482
|
);
|
|
11509
|
-
const allDeadTargets = [];
|
|
11510
|
-
if (effectResult.isDefeated) {
|
|
11511
|
-
allDeadTargets.push(target);
|
|
11512
|
-
}
|
|
11513
|
-
const deathResults = await handleDeathTargets(ctx, allDeadTargets, session.username, handle);
|
|
11514
|
-
bossEventBroadcast = deathResults.bossBroadcast;
|
|
11515
|
-
cleanerRewardBroadcast = deathResults.cleanerBroadcast;
|
|
11516
11483
|
await session.send(
|
|
11517
11484
|
`✅ 成功使用 ${itemNameConfirmed}
|
|
11518
11485
|
剩余数量:${newQuantity}
|
|
11519
11486
|
触发效果:${effectResult.message}`
|
|
11520
11487
|
);
|
|
11521
|
-
const groupId = [...config.groupId];
|
|
11522
|
-
await handleBroadcasts(
|
|
11523
|
-
ctx,
|
|
11524
|
-
groupId,
|
|
11525
|
-
bossEventBroadcast,
|
|
11526
|
-
cleanerRewardBroadcast
|
|
11527
|
-
);
|
|
11528
11488
|
} catch (error) {
|
|
11529
11489
|
ctx.logger("GGCEVO").error(error);
|
|
11530
11490
|
return "⚠️ 物品使用失败,请联系管理员";
|
|
@@ -11609,7 +11569,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11609
11569
|
let itemBonusRate = 0;
|
|
11610
11570
|
let miningRobotBonus = 0;
|
|
11611
11571
|
const miningItem = warehouseItems.find((item) => item.itemId === 8);
|
|
11612
|
-
if (miningItem) {
|
|
11572
|
+
if (miningItem && career.group === "辛迪加海盗") {
|
|
11613
11573
|
miningRobotBonus = (10 + miningItem.bonus) / 100;
|
|
11614
11574
|
itemBonusRate += miningRobotBonus;
|
|
11615
11575
|
}
|
package/lib/utils.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ export declare function calculateTotalPower(ctx: Context, config: Config, handle
|
|
|
15
15
|
export declare function applyItemEffect(ctx: Context, session: any, handle: string, itemConfig: any, target?: string): Promise<{
|
|
16
16
|
success: boolean;
|
|
17
17
|
message: string;
|
|
18
|
-
isDefeated: boolean;
|
|
19
18
|
}>;
|
|
20
19
|
export declare function handleTechUpgrade(ctx: Context, handle: string, target: string): Promise<string>;
|
|
21
20
|
export declare function handleWeaponUpgrade(ctx: Context, handle: string, target: string): Promise<string>;
|
package/lib/wish.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare const wishConfig: {
|
|
|
20
20
|
readonly effect: "攻击伤害提高10%,武器每等级提高5%伤害";
|
|
21
21
|
}, {
|
|
22
22
|
readonly name: "精灵双倍";
|
|
23
|
-
readonly effect: "
|
|
23
|
+
readonly effect: "下一次击败主宰时可获得双倍资源兑换券";
|
|
24
24
|
}, {
|
|
25
25
|
readonly name: "喵喵财源";
|
|
26
26
|
readonly effect: "签到获得双倍的金币和咕咕币";
|