koishi-plugin-ggcevo-game 1.2.60 → 1.2.62
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 +26 -28
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -711,23 +711,23 @@ function apply(ctx, config) {
|
|
|
711
711
|
effect: "能量武器攻击伤害+15%",
|
|
712
712
|
requirements: "拥有一把武器等级为6的能量武器",
|
|
713
713
|
Jobtransfer: true,
|
|
714
|
-
costcoins:
|
|
715
|
-
costredcrystal:
|
|
714
|
+
costcoins: 0,
|
|
715
|
+
costredcrystal: 40
|
|
716
716
|
},
|
|
717
717
|
{
|
|
718
718
|
professionName: "清洁工",
|
|
719
719
|
effect: "击败主宰能够根据排名获得红晶",
|
|
720
720
|
requirements: "当期伤害榜排名前3",
|
|
721
721
|
Jobtransfer: true,
|
|
722
|
-
costcoins:
|
|
723
|
-
costredcrystal:
|
|
722
|
+
costcoins: 0,
|
|
723
|
+
costredcrystal: 40
|
|
724
724
|
},
|
|
725
725
|
{
|
|
726
726
|
professionName: "枪手",
|
|
727
727
|
effect: "武器等级上限为7级,升级武器享有80%的折扣(可与祈愿叠加)",
|
|
728
728
|
requirements: "拥有2把武器等级为6的武器",
|
|
729
729
|
Jobtransfer: false,
|
|
730
|
-
costcoins:
|
|
730
|
+
costcoins: 0,
|
|
731
731
|
costredcrystal: 30
|
|
732
732
|
},
|
|
733
733
|
{
|
|
@@ -735,7 +735,7 @@ function apply(ctx, config) {
|
|
|
735
735
|
effect: "使用“侦查步枪”造成的伤害增加15%",
|
|
736
736
|
requirements: "“侦查步枪”武器等级为6",
|
|
737
737
|
Jobtransfer: false,
|
|
738
|
-
costcoins:
|
|
738
|
+
costcoins: 0,
|
|
739
739
|
costredcrystal: 20
|
|
740
740
|
},
|
|
741
741
|
{
|
|
@@ -743,7 +743,7 @@ function apply(ctx, config) {
|
|
|
743
743
|
effect: "热能武器攻击伤害+15%",
|
|
744
744
|
requirements: "",
|
|
745
745
|
Jobtransfer: false,
|
|
746
|
-
costcoins:
|
|
746
|
+
costcoins: 0,
|
|
747
747
|
costredcrystal: 20
|
|
748
748
|
},
|
|
749
749
|
{
|
|
@@ -751,8 +751,8 @@ function apply(ctx, config) {
|
|
|
751
751
|
effect: "每日签到能额外获得红晶",
|
|
752
752
|
requirements: "当月累计签到28天",
|
|
753
753
|
Jobtransfer: true,
|
|
754
|
-
costcoins:
|
|
755
|
-
costredcrystal:
|
|
754
|
+
costcoins: 0,
|
|
755
|
+
costredcrystal: 60
|
|
756
756
|
},
|
|
757
757
|
{
|
|
758
758
|
professionName: "计算机专家",
|
|
@@ -1980,7 +1980,7 @@ ${itemDetails.join("\n")}`;
|
|
|
1980
1980
|
await ctx.database.upsert("ggcevo_backpack", [{
|
|
1981
1981
|
handle,
|
|
1982
1982
|
itemId: 1,
|
|
1983
|
-
quantity: (backpack?.quantity || 0) +
|
|
1983
|
+
quantity: (backpack?.quantity || 0) + tickets
|
|
1984
1984
|
}]);
|
|
1985
1985
|
if (redCrystal > 0) {
|
|
1986
1986
|
await ctx.database.upsert("ggcevo_careers", [{
|
|
@@ -4087,9 +4087,10 @@ ${validTypes.join("、")}`;
|
|
|
4087
4087
|
const { regionId, realmId, profileId } = profile;
|
|
4088
4088
|
const handle = `${regionId}-S2-${realmId}-${profileId}`;
|
|
4089
4089
|
const validFactions = ["人类联盟", "辛迪加海盗"];
|
|
4090
|
-
if (!faction) return
|
|
4090
|
+
if (!faction) return `请输入“加入 阵营名称”加入对应阵营
|
|
4091
|
+
有效阵营:${validFactions.join(" / ")}`;
|
|
4091
4092
|
if (!validFactions.includes(faction)) {
|
|
4092
|
-
return
|
|
4093
|
+
return `您输入的是错误的阵营名称,请选择有效阵营:${validFactions.join(" / ")}`;
|
|
4093
4094
|
}
|
|
4094
4095
|
const [existing] = await ctx.database.get("ggcevo_careers", { handle });
|
|
4095
4096
|
if (existing) {
|
|
@@ -4170,16 +4171,16 @@ ${validTypes.join("、")}`;
|
|
|
4170
4171
|
`🛠️ ${p.professionName}`,
|
|
4171
4172
|
`▸ 效果:${p.effect || "暂无效果描述"}`,
|
|
4172
4173
|
`▸ 需求:${p.requirements || "无特殊要求"}`,
|
|
4173
|
-
`▸
|
|
4174
|
+
`▸ 消耗:` + (careerData.group === "辛迪加海盗" ? `${p.costredcrystal}红晶` : `${p.costcoins}金币`)
|
|
4174
4175
|
];
|
|
4175
4176
|
return info.join("\n");
|
|
4176
4177
|
});
|
|
4177
4178
|
return [
|
|
4178
4179
|
`🎖️ ${careerData.group} 可转职列表(当前职业:${careerData.career})`,
|
|
4179
4180
|
'使用"转职 职业名称"进行转职',
|
|
4180
|
-
"
|
|
4181
|
+
"──────────────",
|
|
4181
4182
|
...careerList.length ? careerList : ["暂无更多可转职职业"],
|
|
4182
|
-
"
|
|
4183
|
+
"──────────────",
|
|
4183
4184
|
"💡 转职后原有职业效果将被替换"
|
|
4184
4185
|
].join("\n");
|
|
4185
4186
|
}
|
|
@@ -4204,17 +4205,10 @@ ${validTypes.join("、")}`;
|
|
|
4204
4205
|
totalRewards: userCoins - targetProfession.costcoins
|
|
4205
4206
|
}], ["handle"]);
|
|
4206
4207
|
} else if (careerData.group === "辛迪加海盗") {
|
|
4207
|
-
if (userCoins < targetProfession.costcoins) {
|
|
4208
|
-
return `需要金币 ${targetProfession.costcoins},当前 ${userCoins}`;
|
|
4209
|
-
}
|
|
4210
4208
|
if (userRedCrystal < (targetProfession.costredcrystal || 0)) {
|
|
4211
4209
|
return `需要红晶 ${targetProfession.costredcrystal},当前 ${userRedCrystal}`;
|
|
4212
4210
|
}
|
|
4213
4211
|
await Promise.all([
|
|
4214
|
-
ctx.database.upsert("ggcevo_sign", [{
|
|
4215
|
-
handle,
|
|
4216
|
-
totalRewards: userCoins - targetProfession.costcoins
|
|
4217
|
-
}], ["handle"]),
|
|
4218
4212
|
ctx.database.upsert("ggcevo_careers", [{
|
|
4219
4213
|
handle,
|
|
4220
4214
|
redcrystal: userRedCrystal - (targetProfession.costredcrystal || 0)
|
|
@@ -4226,7 +4220,7 @@ ${validTypes.join("、")}`;
|
|
|
4226
4220
|
career: profession,
|
|
4227
4221
|
date: /* @__PURE__ */ new Date()
|
|
4228
4222
|
}], ["handle"]);
|
|
4229
|
-
return `${careerData.group === "辛迪加海盗" ? `花费${targetProfession.
|
|
4223
|
+
return `${careerData.group === "辛迪加海盗" ? `花费${targetProfession.costredcrystal}红晶` : `花费${targetProfession.costcoins}金币`}转职成功!当前职业:${profession}`;
|
|
4230
4224
|
} catch (err) {
|
|
4231
4225
|
ctx.logger.error("转职失败:", err);
|
|
4232
4226
|
return "转职过程中发生错误,请稍后再试";
|
|
@@ -4241,12 +4235,16 @@ ${validTypes.join("、")}`;
|
|
|
4241
4235
|
const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
|
|
4242
4236
|
const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
|
|
4243
4237
|
if (!careerData) return "您尚未加入任何阵营。";
|
|
4238
|
+
const config2 = careerData.group === "辛迪加海盗" ? syndicatePirateConfig : spaceStationCrewConfig;
|
|
4239
|
+
const profession = config2.find((p) => p.professionName === careerData.career);
|
|
4240
|
+
const effectDisplay = profession?.effect || "暂无特殊效果";
|
|
4244
4241
|
const joinDate = new Date(careerData.date);
|
|
4245
4242
|
const formattedDate = `${joinDate.getFullYear()}年${joinDate.getMonth() + 1}月${joinDate.getDate()}日`;
|
|
4246
4243
|
const infoCard = [
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4244
|
+
`🎯 当前阵营:${careerData.group}`,
|
|
4245
|
+
`👔 当前职业:${careerData.career}`,
|
|
4246
|
+
`✨ 职业效果:${effectDisplay}`,
|
|
4247
|
+
`🗓️ 就职时间:${formattedDate}`
|
|
4250
4248
|
];
|
|
4251
4249
|
if (careerData.group === "辛迪加海盗") {
|
|
4252
4250
|
infoCard.push(`🔴 持有红晶:${careerData.redcrystal || 0} 个`);
|
|
@@ -4255,9 +4253,9 @@ ${validTypes.join("、")}`;
|
|
|
4255
4253
|
infoCard.push("💡 提示:使用「转职」命令可变更职业");
|
|
4256
4254
|
}
|
|
4257
4255
|
return [
|
|
4258
|
-
"
|
|
4256
|
+
"〓 职业档案 〓",
|
|
4259
4257
|
...infoCard,
|
|
4260
|
-
"
|
|
4258
|
+
"〓═════════〓"
|
|
4261
4259
|
].join("\n");
|
|
4262
4260
|
} catch (error) {
|
|
4263
4261
|
ctx.logger.error("查询职业信息失败:", error);
|