koishi-plugin-ggcevo-game 1.2.62 → 1.2.64
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 +29 -18
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -712,7 +712,7 @@ function apply(ctx, config) {
|
|
|
712
712
|
requirements: "拥有一把武器等级为6的能量武器",
|
|
713
713
|
Jobtransfer: true,
|
|
714
714
|
costcoins: 0,
|
|
715
|
-
costredcrystal:
|
|
715
|
+
costredcrystal: 20
|
|
716
716
|
},
|
|
717
717
|
{
|
|
718
718
|
professionName: "清洁工",
|
|
@@ -720,7 +720,7 @@ function apply(ctx, config) {
|
|
|
720
720
|
requirements: "当期伤害榜排名前3",
|
|
721
721
|
Jobtransfer: true,
|
|
722
722
|
costcoins: 0,
|
|
723
|
-
costredcrystal:
|
|
723
|
+
costredcrystal: 20
|
|
724
724
|
},
|
|
725
725
|
{
|
|
726
726
|
professionName: "枪手",
|
|
@@ -752,7 +752,7 @@ function apply(ctx, config) {
|
|
|
752
752
|
requirements: "当月累计签到28天",
|
|
753
753
|
Jobtransfer: true,
|
|
754
754
|
costcoins: 0,
|
|
755
|
-
costredcrystal:
|
|
755
|
+
costredcrystal: 40
|
|
756
756
|
},
|
|
757
757
|
{
|
|
758
758
|
professionName: "计算机专家",
|
|
@@ -3259,16 +3259,14 @@ ${achievementList.join("\n")}`;
|
|
|
3259
3259
|
await ctx.database.set("ggcevo_sign", initiatorHandle, { totalRewards: initiatorGold - goldTransfer });
|
|
3260
3260
|
await ctx.database.set("ggcevo_sign", targetHandle, { totalRewards: targetGold + goldTransfer });
|
|
3261
3261
|
}
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
}], ["handle"]);
|
|
3271
|
-
}
|
|
3262
|
+
const [initiatorCareer2] = await ctx.database.get("ggcevo_careers", {
|
|
3263
|
+
handle: initiatorHandle
|
|
3264
|
+
});
|
|
3265
|
+
if (initiatorCareer2?.group === "辛迪加海盗") {
|
|
3266
|
+
await ctx.database.upsert("ggcevo_careers", [{
|
|
3267
|
+
handle: initiatorHandle,
|
|
3268
|
+
redcrystal: (initiatorCareer2.redcrystal || 0) + 1
|
|
3269
|
+
}], ["handle"]);
|
|
3272
3270
|
}
|
|
3273
3271
|
});
|
|
3274
3272
|
const [initiatorCareer] = await ctx.database.get("ggcevo_careers", {
|
|
@@ -3282,7 +3280,7 @@ ${achievementList.join("\n")}`;
|
|
|
3282
3280
|
`🎰 金币变动:${stealPercentage}%`
|
|
3283
3281
|
];
|
|
3284
3282
|
isWin ? result.push(`💰 您从对方的口袋里抢夺了${goldTransfer}枚金币`) : result.push(`💸 您从口袋里拿出了${goldTransfer}枚金币上交给对方`);
|
|
3285
|
-
|
|
3283
|
+
initiatorCareer?.group === "辛迪加海盗" ? result.push(`🔴 海盗阵营奖励:获得1红晶`) : "";
|
|
3286
3284
|
result.push(`📅 剩余挑战次数:${config.dailyPKLimit - (initiatorPK.todayCount + 1)}`);
|
|
3287
3285
|
return result.join("\n");
|
|
3288
3286
|
} catch (error) {
|
|
@@ -3435,6 +3433,7 @@ ${validTypes.join("、")}`;
|
|
|
3435
3433
|
}).then((records) => records[0]);
|
|
3436
3434
|
let actualPrice = config2.price;
|
|
3437
3435
|
let discountMessage = "";
|
|
3436
|
+
let equippedCount;
|
|
3438
3437
|
if (activeWish) {
|
|
3439
3438
|
actualPrice = Math.floor(config2.price * 0.8);
|
|
3440
3439
|
discountMessage = ` (祈愿优惠价,原价${config2.price})`;
|
|
@@ -3458,11 +3457,23 @@ ${validTypes.join("、")}`;
|
|
|
3458
3457
|
modificationSlots: 1,
|
|
3459
3458
|
equipped: false
|
|
3460
3459
|
}], ["handle", "weaponId"]);
|
|
3460
|
+
equippedCount = await ctx.database.select("ggcevo_equipment").where({ handle, equipped: true }).execute((row) => import_koishi.$.count(row.weaponId));
|
|
3461
|
+
if (equippedCount === 0) {
|
|
3462
|
+
await ctx.database.set(
|
|
3463
|
+
"ggcevo_equipment",
|
|
3464
|
+
{ handle, weaponId: config2.id },
|
|
3465
|
+
{ equipped: true }
|
|
3466
|
+
);
|
|
3467
|
+
}
|
|
3461
3468
|
});
|
|
3462
3469
|
let message = `成功购买 ${weapon}!花费 ${actualPrice}枚金币${discountMessage}。`;
|
|
3463
3470
|
if (activeWish) {
|
|
3464
3471
|
message += `
|
|
3465
3472
|
🦗 蚱蜢优购祈愿已使用,下次购买将恢复原价。`;
|
|
3473
|
+
}
|
|
3474
|
+
if (equippedCount === 0) {
|
|
3475
|
+
message += `
|
|
3476
|
+
已自动为您装备当前武器!`;
|
|
3466
3477
|
}
|
|
3467
3478
|
return message + "\n输入“武器仓库”查看你拥有的武器。";
|
|
3468
3479
|
});
|
|
@@ -3491,9 +3502,9 @@ ${validTypes.join("、")}`;
|
|
|
3491
3502
|
"🛡️ 您当前拥有的武器",
|
|
3492
3503
|
'使用"装备武器 武器名称"来装备武器',
|
|
3493
3504
|
"⚡表示当前装备武器",
|
|
3494
|
-
"
|
|
3505
|
+
"──────────────",
|
|
3495
3506
|
...weaponDetails.length ? weaponDetails : ["空空如也,快去“武器库”看看吧!"],
|
|
3496
|
-
"
|
|
3507
|
+
"──────────────",
|
|
3497
3508
|
"💡 武器效果说明:",
|
|
3498
3509
|
"🔧 改装效果在战斗中生效"
|
|
3499
3510
|
].join("\n");
|
|
@@ -4140,7 +4151,7 @@ ${validTypes.join("、")}`;
|
|
|
4140
4151
|
date: /* @__PURE__ */ new Date()
|
|
4141
4152
|
});
|
|
4142
4153
|
}
|
|
4143
|
-
return `花费了${faction === "人类联盟" ? "1000金币" : "2000金币"}成功加入${faction}!${faction === "人类联盟" ? "" : "获得5
|
|
4154
|
+
return `花费了${faction === "人类联盟" ? "1000金币" : "2000金币"}成功加入${faction}!${faction === "人类联盟" ? "" : "获得5枚红晶,"}初始职业:${faction === "人类联盟" ? "联盟新兵" : "辛迪加炮灰新兵"}`;
|
|
4144
4155
|
} catch (err) {
|
|
4145
4156
|
ctx.logger.error("加入阵营失败:", err);
|
|
4146
4157
|
return "加入阵营时发生错误,请稍后再试";
|
|
@@ -4248,7 +4259,7 @@ ${validTypes.join("、")}`;
|
|
|
4248
4259
|
];
|
|
4249
4260
|
if (careerData.group === "辛迪加海盗") {
|
|
4250
4261
|
infoCard.push(`🔴 持有红晶:${careerData.redcrystal || 0} 个`);
|
|
4251
|
-
infoCard.push("💡 提示:红晶可通过主动PK
|
|
4262
|
+
infoCard.push("💡 提示:红晶可通过主动PK获得(无论胜负)");
|
|
4252
4263
|
} else {
|
|
4253
4264
|
infoCard.push("💡 提示:使用「转职」命令可变更职业");
|
|
4254
4265
|
}
|