koishi-plugin-ggcevo-game 1.6.62 → 1.6.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/database.d.ts +12 -0
- package/lib/index.js +146 -74
- package/lib/utils.d.ts +3 -1
- package/lib/wish.d.ts +2 -2
- package/package.json +1 -1
package/lib/database.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ declare module 'koishi' {
|
|
|
15
15
|
ggcevo_weapons: WeaponInventory;
|
|
16
16
|
ggcevo_boss: BossInfo;
|
|
17
17
|
ggcevo_boss_damage: BossDamage;
|
|
18
|
+
ggcevo_damage_logs: damageLogs;
|
|
19
|
+
ggcevo_boss_weights: bossweights;
|
|
18
20
|
ggcevo_wish: WishRecord;
|
|
19
21
|
ggcevo_careers: CareerInfo;
|
|
20
22
|
ggcevo_warehouse: Warehouse;
|
|
@@ -240,3 +242,13 @@ export interface guess {
|
|
|
240
242
|
wins: number;
|
|
241
243
|
createdAt: Date;
|
|
242
244
|
}
|
|
245
|
+
export interface damageLogs {
|
|
246
|
+
id: number;
|
|
247
|
+
handle: string;
|
|
248
|
+
date: Date;
|
|
249
|
+
}
|
|
250
|
+
export interface bossweights {
|
|
251
|
+
bossId: number;
|
|
252
|
+
weight: number;
|
|
253
|
+
lastSpawn: Date;
|
|
254
|
+
}
|
package/lib/index.js
CHANGED
|
@@ -4374,13 +4374,21 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
|
|
|
4374
4374
|
args: [targetBoss]
|
|
4375
4375
|
}
|
|
4376
4376
|
];
|
|
4377
|
-
const
|
|
4377
|
+
const hunterAlienImmune = [
|
|
4378
|
+
{
|
|
4379
|
+
effect: BattleEffectProcessor.handleHunterAlien,
|
|
4380
|
+
args: [targetBoss, activeBosses, weaponName]
|
|
4381
|
+
}
|
|
4382
|
+
];
|
|
4383
|
+
const allImmuneEffects = [...coldImmuneEffects, ...fireImmuneEffects, ...chanceImmuneEffects, ...conditionImmuneEffects, ...hunterAlienImmune];
|
|
4378
4384
|
for (const immuneEffect of allImmuneEffects) {
|
|
4379
4385
|
const result = processEffect(immuneEffect.effect, ...immuneEffect.args);
|
|
4380
4386
|
if (result) {
|
|
4381
4387
|
isImmuneCold = isImmuneCold || result.immuneCold === true;
|
|
4382
4388
|
isImmuneFire = isImmuneFire || result.immuneFire === true;
|
|
4383
4389
|
if (result.isImmune) immune = true;
|
|
4390
|
+
if (result.buffMultiplier !== void 0) totalBuffMultiplier += result.buffMultiplier;
|
|
4391
|
+
if (result.nerfMultiplier !== void 0) totalNerfMultiplier += result.nerfMultiplier;
|
|
4384
4392
|
}
|
|
4385
4393
|
}
|
|
4386
4394
|
const solarFlareResult = BattleEffectProcessor.handleSolarFlare(targetBoss, weaponName, activeBosses);
|
|
@@ -4458,7 +4466,6 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
|
|
|
4458
4466
|
{ effect: BattleEffectProcessor.handleIsolated, args: [targetBoss, activeBosses, isolatedImmunityMark] },
|
|
4459
4467
|
{ effect: BattleEffectProcessor.handleInfectedSpaceStation, args: [targetBoss, activeBosses] },
|
|
4460
4468
|
{ effect: BattleEffectProcessor.handleInfernalBomb, args: [targetBoss, activeBosses] },
|
|
4461
|
-
{ effect: BattleEffectProcessor.handleHunterAlien, args: [targetBoss, activeBosses, weaponName] },
|
|
4462
4469
|
{ effect: BattleEffectProcessor.handleHiveMind, args: [targetBoss, activeBosses] },
|
|
4463
4470
|
{ effect: BattleEffectProcessor.handleReleasePheromones, args: [targetBoss] },
|
|
4464
4471
|
{ effect: BattleEffectProcessor.handleWeakeningSpit, args: [targetBoss, activeBosses] },
|
|
@@ -4615,11 +4622,15 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
|
|
|
4615
4622
|
if (hasCrit) {
|
|
4616
4623
|
finalDamage *= 2;
|
|
4617
4624
|
}
|
|
4625
|
+
let burnDamage;
|
|
4618
4626
|
if (weaponName === "焚烧枪" || weaponName === "龙息霰弹枪") {
|
|
4619
4627
|
const currentBurnLayers = Math.min(targetBoss?.burnLayers || 0, 100);
|
|
4620
|
-
|
|
4628
|
+
burnDamage = currentBurnLayers * 1;
|
|
4629
|
+
const burnDebuffMultiplier = totalNerfMultiplier * 0.5;
|
|
4630
|
+
burnDamage *= 1 - burnDebuffMultiplier;
|
|
4621
4631
|
if (burnDamage > 0) {
|
|
4622
|
-
|
|
4632
|
+
const debuffText = burnDebuffMultiplier > 0 ? `(受到${Math.round(burnDebuffMultiplier * 100)}%的减伤效果)` : "";
|
|
4633
|
+
messages.push(`🔥 【燃烧】效果造成额外${burnDamage}点伤害${debuffText}`);
|
|
4623
4634
|
}
|
|
4624
4635
|
finalDamage += burnDamage;
|
|
4625
4636
|
}
|
|
@@ -5182,11 +5193,11 @@ var wishConfig = {
|
|
|
5182
5193
|
},
|
|
5183
5194
|
{
|
|
5184
5195
|
name: "金柚赐福",
|
|
5185
|
-
effect: "立即获得
|
|
5196
|
+
effect: "立即获得3张资源兑换券"
|
|
5186
5197
|
},
|
|
5187
5198
|
{
|
|
5188
5199
|
name: "夜市赠礼",
|
|
5189
|
-
effect: "立即获得
|
|
5200
|
+
effect: "立即获得3枚咕咕币"
|
|
5190
5201
|
}
|
|
5191
5202
|
],
|
|
5192
5203
|
// 稀有祈愿(总概率 5 * 1=5%)
|
|
@@ -5523,6 +5534,14 @@ var ggcevoUpdates = [
|
|
|
5523
5534
|
- 新增兑换资源,1张兑换券可以兑换20张资源兑换券
|
|
5524
5535
|
`.trim()
|
|
5525
5536
|
},
|
|
5537
|
+
{
|
|
5538
|
+
version: "1.6.61",
|
|
5539
|
+
time: "2025-08-5",
|
|
5540
|
+
content: `
|
|
5541
|
+
- 优化探索掠夺机制,现在相同名称的飞船互相掠夺成功率固定为50%
|
|
5542
|
+
- 修改TX-12S隐形巡洋舰的机制,现在只有当掠夺金币加成≤0时,探索才不会被掠夺
|
|
5543
|
+
`.trim()
|
|
5544
|
+
},
|
|
5526
5545
|
{
|
|
5527
5546
|
version: "1.6.62",
|
|
5528
5547
|
time: "2025-08-9",
|
|
@@ -5531,11 +5550,14 @@ var ggcevoUpdates = [
|
|
|
5531
5550
|
`.trim()
|
|
5532
5551
|
},
|
|
5533
5552
|
{
|
|
5534
|
-
version: "1.6.
|
|
5535
|
-
time: "2025-08-
|
|
5553
|
+
version: "1.6.63",
|
|
5554
|
+
time: "2025-08-10",
|
|
5536
5555
|
content: `
|
|
5537
|
-
-
|
|
5538
|
-
-
|
|
5556
|
+
- 修改了斩杀机制,现在进入斩杀阶段后变为攻击时段内可以攻击2次,而不是原来的分为4个攻击时段
|
|
5557
|
+
- 修改了主宰复活机制,现在采用权重计算
|
|
5558
|
+
- 削弱了燃烧机制,现在燃烧伤害会受到目标减伤效果的50%影响
|
|
5559
|
+
- 斩杀阶段删除了验证码机制
|
|
5560
|
+
- 同一用户攻击指令增加了5秒的使用冷却时间
|
|
5539
5561
|
`.trim()
|
|
5540
5562
|
}
|
|
5541
5563
|
];
|
|
@@ -5618,15 +5640,6 @@ function isSameDate(a, b) {
|
|
|
5618
5640
|
return a.getUTCFullYear() === b.getUTCFullYear() && a.getUTCMonth() === b.getUTCMonth() && a.getUTCDate() === b.getUTCDate();
|
|
5619
5641
|
}
|
|
5620
5642
|
__name(isSameDate, "isSameDate");
|
|
5621
|
-
function isSameHalfDay(a, b) {
|
|
5622
|
-
if (!isSameDate(a, b)) {
|
|
5623
|
-
return false;
|
|
5624
|
-
}
|
|
5625
|
-
const hour1 = a.getUTCHours();
|
|
5626
|
-
const hour2 = b.getUTCHours();
|
|
5627
|
-
return hour1 < 12 && hour2 < 12 || hour1 >= 12 && hour2 >= 12;
|
|
5628
|
-
}
|
|
5629
|
-
__name(isSameHalfDay, "isSameHalfDay");
|
|
5630
5643
|
function convertUTCtoChinaTime(input) {
|
|
5631
5644
|
const utcDate = new Date(input);
|
|
5632
5645
|
if (isNaN(utcDate.getTime())) {
|
|
@@ -5654,17 +5667,26 @@ function createHpBar(current, max) {
|
|
|
5654
5667
|
}
|
|
5655
5668
|
__name(createHpBar, "createHpBar");
|
|
5656
5669
|
async function activateNextBossGroup(ctx, currentBossId = null) {
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5670
|
+
const allWeights = await ctx.database.get("ggcevo_boss_weights", {});
|
|
5671
|
+
let candidateWeights = allWeights;
|
|
5672
|
+
if (currentBossId !== null) {
|
|
5673
|
+
candidateWeights = allWeights.filter((w) => w.bossId !== currentBossId);
|
|
5674
|
+
}
|
|
5675
|
+
const totalWeight = candidateWeights.reduce((sum, w) => sum + w.weight, 0);
|
|
5676
|
+
let random = Math.random() * totalWeight;
|
|
5677
|
+
let selectedBossId;
|
|
5678
|
+
for (const weight of candidateWeights) {
|
|
5679
|
+
random -= weight.weight;
|
|
5680
|
+
if (random <= 0) {
|
|
5681
|
+
selectedBossId = weight.bossId;
|
|
5682
|
+
break;
|
|
5683
|
+
}
|
|
5684
|
+
}
|
|
5685
|
+
selectedBossId = selectedBossId || candidateWeights[candidateWeights.length - 1].bossId;
|
|
5686
|
+
const nextBossGroup = bossPool.find((g) => g.id === selectedBossId);
|
|
5687
|
+
if (!nextBossGroup) {
|
|
5688
|
+
throw new Error(`Boss group ${selectedBossId} not found in bossPool`);
|
|
5665
5689
|
}
|
|
5666
|
-
const randomIndex = availableIndices[Math.floor(Math.random() * availableIndices.length)];
|
|
5667
|
-
const nextBossGroup = bossPool[randomIndex];
|
|
5668
5690
|
const mainBoss = await ctx.database.create("ggcevo_boss", {
|
|
5669
5691
|
name: nextBossGroup.main.name,
|
|
5670
5692
|
type: nextBossGroup.main.type,
|
|
@@ -6386,6 +6408,44 @@ function privateChatCurfewCheck(session, config) {
|
|
|
6386
6408
|
return true;
|
|
6387
6409
|
}
|
|
6388
6410
|
__name(privateChatCurfewCheck, "privateChatCurfewCheck");
|
|
6411
|
+
function getHalfDayIdentifier(date) {
|
|
6412
|
+
const year = date.getFullYear();
|
|
6413
|
+
const month = date.getMonth() + 1;
|
|
6414
|
+
const day = date.getDate();
|
|
6415
|
+
const period = date.getHours() < 12 ? "am" : "pm";
|
|
6416
|
+
return `${year}${month}${day}_${period}`;
|
|
6417
|
+
}
|
|
6418
|
+
__name(getHalfDayIdentifier, "getHalfDayIdentifier");
|
|
6419
|
+
async function initWeights(ctx) {
|
|
6420
|
+
for (let id = 1; id <= 12; id++) {
|
|
6421
|
+
await ctx.database.create("ggcevo_boss_weights", {
|
|
6422
|
+
bossId: id,
|
|
6423
|
+
weight: 100,
|
|
6424
|
+
lastSpawn: /* @__PURE__ */ new Date(0)
|
|
6425
|
+
// 设置为遥远的过去
|
|
6426
|
+
});
|
|
6427
|
+
}
|
|
6428
|
+
}
|
|
6429
|
+
__name(initWeights, "initWeights");
|
|
6430
|
+
async function updateWeights(ctx, selectedId) {
|
|
6431
|
+
const allWeights = await ctx.database.get("ggcevo_boss_weights", {});
|
|
6432
|
+
for (const weight of allWeights) {
|
|
6433
|
+
if (weight.bossId === selectedId) {
|
|
6434
|
+
const newWeight = Math.max(50, Math.floor(weight.weight / 2));
|
|
6435
|
+
await ctx.database.set("ggcevo_boss_weights", { bossId: weight.bossId }, {
|
|
6436
|
+
weight: newWeight,
|
|
6437
|
+
lastSpawn: /* @__PURE__ */ new Date()
|
|
6438
|
+
});
|
|
6439
|
+
} else {
|
|
6440
|
+
const newWeight = Math.min(200, Math.floor(weight.weight * 1.2));
|
|
6441
|
+
await ctx.database.set("ggcevo_boss_weights", { bossId: weight.bossId }, {
|
|
6442
|
+
weight: newWeight,
|
|
6443
|
+
lastSpawn: weight.lastSpawn
|
|
6444
|
+
});
|
|
6445
|
+
}
|
|
6446
|
+
}
|
|
6447
|
+
}
|
|
6448
|
+
__name(updateWeights, "updateWeights");
|
|
6389
6449
|
|
|
6390
6450
|
// src/boss/damagecalculation.ts
|
|
6391
6451
|
async function calculateTotalDamage(ctx, session, config, equippedWeapon, targetBoss, careerData) {
|
|
@@ -7088,6 +7148,11 @@ async function updateBossDamageRecord(ctx, handle, playerName, bossGroupId, dama
|
|
|
7088
7148
|
attackCount: (existingRecord?.attackCount || 0) + 1,
|
|
7089
7149
|
lastattackDate: /* @__PURE__ */ new Date()
|
|
7090
7150
|
}], ["handle", "bossGroupId"]);
|
|
7151
|
+
await ctx.database.create("ggcevo_damage_logs", {
|
|
7152
|
+
handle,
|
|
7153
|
+
date: /* @__PURE__ */ new Date()
|
|
7154
|
+
// 使用当前时间戳
|
|
7155
|
+
});
|
|
7091
7156
|
}
|
|
7092
7157
|
__name(updateBossDamageRecord, "updateBossDamageRecord");
|
|
7093
7158
|
async function updateTaskProgress(ctx, handle, taskUpdates) {
|
|
@@ -7297,33 +7362,9 @@ async function verifyFinalBlow(ctx, session, bossName, targetBoss) {
|
|
|
7297
7362
|
verificationPassed: false
|
|
7298
7363
|
};
|
|
7299
7364
|
}
|
|
7300
|
-
const verificationCode = Array(6).fill(0).map(
|
|
7301
|
-
() => Math.floor(Math.random() * 10)
|
|
7302
|
-
).join("");
|
|
7303
|
-
await session.send(
|
|
7304
|
-
`<quote id="${session.messageId}"/>⚠️ ${bossName}进入斩杀阶段!每6小时周期(0点、6点、12点或18点)即可攻击一次,但需完成安全验证
|
|
7305
|
-
请在30秒内输入验证码:【${verificationCode}】`
|
|
7306
|
-
);
|
|
7307
|
-
const userInput = (await session.prompt(3e4))?.trim();
|
|
7308
|
-
if (!userInput) {
|
|
7309
|
-
await session.send("⏱️ 验证超时!请重新发起攻击。");
|
|
7310
|
-
return { success: false };
|
|
7311
|
-
}
|
|
7312
|
-
if (userInput !== verificationCode) {
|
|
7313
|
-
await session.send("❌ 验证码错误!攻击已中断。");
|
|
7314
|
-
return { success: false };
|
|
7315
|
-
}
|
|
7316
|
-
const [updatedBoss] = await ctx.database.get("ggcevo_boss", {
|
|
7317
|
-
name: bossName,
|
|
7318
|
-
isActive: true
|
|
7319
|
-
});
|
|
7320
|
-
if (!updatedBoss) {
|
|
7321
|
-
await session.send(`✅ 验证通过!但${bossName}已被其他玩家消灭。`);
|
|
7322
|
-
return { success: false };
|
|
7323
|
-
}
|
|
7324
7365
|
return {
|
|
7325
7366
|
success: true,
|
|
7326
|
-
updatedBoss,
|
|
7367
|
+
updatedBoss: targetBoss,
|
|
7327
7368
|
verificationPassed: true
|
|
7328
7369
|
};
|
|
7329
7370
|
}
|
|
@@ -7614,6 +7655,21 @@ function apply(ctx, config) {
|
|
|
7614
7655
|
}, {
|
|
7615
7656
|
primary: "handle"
|
|
7616
7657
|
});
|
|
7658
|
+
ctx.model.extend("ggcevo_damage_logs", {
|
|
7659
|
+
id: "unsigned",
|
|
7660
|
+
handle: "string",
|
|
7661
|
+
date: "timestamp"
|
|
7662
|
+
}, {
|
|
7663
|
+
primary: "id",
|
|
7664
|
+
autoInc: true
|
|
7665
|
+
});
|
|
7666
|
+
ctx.model.extend("ggcevo_boss_weights", {
|
|
7667
|
+
bossId: "unsigned",
|
|
7668
|
+
weight: "unsigned",
|
|
7669
|
+
lastSpawn: "timestamp"
|
|
7670
|
+
}, {
|
|
7671
|
+
primary: "bossId"
|
|
7672
|
+
});
|
|
7617
7673
|
ctx.model.extend("ggcevo_wish", {
|
|
7618
7674
|
id: "unsigned",
|
|
7619
7675
|
handle: "string",
|
|
@@ -7719,6 +7775,10 @@ function apply(ctx, config) {
|
|
|
7719
7775
|
primary: ["handle", "itemId"]
|
|
7720
7776
|
});
|
|
7721
7777
|
ctx.setInterval(async () => {
|
|
7778
|
+
const weightCount = await ctx.database.get("ggcevo_boss_weights", {});
|
|
7779
|
+
if (!weightCount || weightCount.length === 0) {
|
|
7780
|
+
await initWeights(ctx);
|
|
7781
|
+
}
|
|
7722
7782
|
const totalBosses = await ctx.database.select("ggcevo_boss").execute((row) => import_koishi.$.count(row.name));
|
|
7723
7783
|
const groupIds = [...config.groupId];
|
|
7724
7784
|
if (totalBosses === 0) {
|
|
@@ -7740,6 +7800,7 @@ function apply(ctx, config) {
|
|
|
7740
7800
|
await ctx.database.set("ggcevo_weapons", {}, { comboCount: 0 });
|
|
7741
7801
|
await ctx.database.set("ggcevo_weapons", {}, { pityCounter: 0 });
|
|
7742
7802
|
const newBossGroup = await activateNextBossGroup(ctx, currentGroupId);
|
|
7803
|
+
await updateWeights(ctx, newBossGroup.groupId);
|
|
7743
7804
|
const nextBossName = newBossGroup.name;
|
|
7744
7805
|
const guessingRecords = await ctx.database.get("ggcevo_guess", {
|
|
7745
7806
|
itemId: 1
|
|
@@ -10234,22 +10295,28 @@ ${discountDetails.join("\n")}`;
|
|
|
10234
10295
|
const verifiedBoss = verification.updatedBoss || targetBoss;
|
|
10235
10296
|
const unlimitedBossAttack = config.unlimitedBossAttack;
|
|
10236
10297
|
if (!unlimitedBossAttack) {
|
|
10237
|
-
const
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
|
|
10246
|
-
if (sameDay && lastQuarter === currentQuarter) {
|
|
10247
|
-
return "您在当前时间段内已参与过斩杀攻击,请等待下一个6小时周期(0点、6点、12点或18点)再挑战!";
|
|
10248
|
-
}
|
|
10298
|
+
const now = /* @__PURE__ */ new Date();
|
|
10299
|
+
const currentHalfDayIdentifier = getHalfDayIdentifier(now);
|
|
10300
|
+
console.log(currentHalfDayIdentifier);
|
|
10301
|
+
const attackLogs = await ctx.database.select("ggcevo_damage_logs").where({ handle }).orderBy("date", "desc").limit(4).execute();
|
|
10302
|
+
let currentHalfDayCount = 0;
|
|
10303
|
+
for (const log of attackLogs) {
|
|
10304
|
+
const logTime = log.date;
|
|
10305
|
+
if (getHalfDayIdentifier(logTime) === currentHalfDayIdentifier) {
|
|
10306
|
+
currentHalfDayCount++;
|
|
10249
10307
|
} else {
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10308
|
+
break;
|
|
10309
|
+
}
|
|
10310
|
+
}
|
|
10311
|
+
if (verification.verificationPassed) {
|
|
10312
|
+
if (currentHalfDayCount >= 2) {
|
|
10313
|
+
const nextResetHour = now.getHours() < 12 ? 12 : 24;
|
|
10314
|
+
return `您在当前时间段(${now.getHours() < 12 ? "0-12点" : "12-24点"})已攻击过2次(斩杀阶段),请${nextResetHour === 12 ? "中午12点" : "次日0点"}后再挑战!`;
|
|
10315
|
+
}
|
|
10316
|
+
} else {
|
|
10317
|
+
if (currentHalfDayCount >= 1) {
|
|
10318
|
+
const nextResetHour = now.getHours() < 12 ? 12 : 24;
|
|
10319
|
+
return `您在当前时间段(${now.getHours() < 12 ? "0-12点" : "12-24点"})已攻击过1次,请${nextResetHour === 12 ? "中午12点" : "次日0点"}后再挑战!`;
|
|
10253
10320
|
}
|
|
10254
10321
|
}
|
|
10255
10322
|
}
|
|
@@ -10778,7 +10845,12 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
10778
10845
|
const effect = pool[Math.floor(Math.random() * pool.length)];
|
|
10779
10846
|
switch (effect.name) {
|
|
10780
10847
|
case "金柚赐福":
|
|
10781
|
-
|
|
10848
|
+
const [ResourceExchangeVoucher] = await ctx.database.get("ggcevo_backpack", { handle, itemId: 8 });
|
|
10849
|
+
await ctx.database.upsert("ggcevo_backpack", [{
|
|
10850
|
+
handle,
|
|
10851
|
+
itemId: 8,
|
|
10852
|
+
quantity: (ResourceExchangeVoucher?.quantity || 0) + 3
|
|
10853
|
+
}]);
|
|
10782
10854
|
break;
|
|
10783
10855
|
case "酥手空空":
|
|
10784
10856
|
newGold = Math.max(0, newGold - 50);
|
|
@@ -10787,10 +10859,10 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
|
|
|
10787
10859
|
await ctx.broadcast(groupId, kfcMsg);
|
|
10788
10860
|
break;
|
|
10789
10861
|
case "夜市赠礼":
|
|
10790
|
-
const [backpack] = await ctx.database.get("ggcevo_backpack", { handle, itemId:
|
|
10862
|
+
const [backpack] = await ctx.database.get("ggcevo_backpack", { handle, itemId: 1 });
|
|
10791
10863
|
await ctx.database.upsert("ggcevo_backpack", [{
|
|
10792
10864
|
handle,
|
|
10793
|
-
itemId:
|
|
10865
|
+
itemId: 1,
|
|
10794
10866
|
quantity: (backpack?.quantity || 0) + 5
|
|
10795
10867
|
}]);
|
|
10796
10868
|
break;
|
|
@@ -13009,8 +13081,8 @@ PK同玩家限战:1次/日
|
|
|
13009
13081
|
🦗 蚱蜢优购:下一次购买武器(非传奇)享有20%的折扣
|
|
13010
13082
|
🦊 灵狐升运:下一次升级武器享有20%的折扣
|
|
13011
13083
|
👑 王权增幅:攻击伤害提高5%
|
|
13012
|
-
🍊 金柚赐福:立即获得
|
|
13013
|
-
🪙 夜市赠礼:立即获得5
|
|
13084
|
+
🍊 金柚赐福:立即获得3张资源兑换券
|
|
13085
|
+
🪙 夜市赠礼:立即获得5枚咕咕币
|
|
13014
13086
|
|
|
13015
13087
|
🔮 稀有祈愿池(5%概率)
|
|
13016
13088
|
🗡️ 悲鸣之锋:攻击伤害提高10%,武器每等级提高5%伤害
|
package/lib/utils.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export declare function checkSensitiveWord(ctx: Context, content: string): Promi
|
|
|
7
7
|
export declare function getRandomInt(min: number, max: number): number;
|
|
8
8
|
export declare function PetCapsuleToy(): "t3级宠物扭蛋" | "t2级宠物扭蛋" | "t1级宠物扭蛋" | "t0级宠物扭蛋";
|
|
9
9
|
export declare function isSameDate(a: Date, b: Date): boolean;
|
|
10
|
-
export declare function isSameHalfDay(a: Date, b: Date): boolean;
|
|
11
10
|
export declare function convertUTCtoChinaTime(input: Date | string | number): Date;
|
|
12
11
|
export declare function formatDate(d: Date): string;
|
|
13
12
|
export declare function createHpBar(current: number, max: number): string;
|
|
@@ -51,3 +50,6 @@ export declare function fixedCurfewCheck(session: any, config: Config): true | f
|
|
|
51
50
|
* @returns 是否允许私聊
|
|
52
51
|
*/
|
|
53
52
|
export declare function privateChatCurfewCheck(session: any, config: Config): boolean;
|
|
53
|
+
export declare function getHalfDayIdentifier(date: any): string;
|
|
54
|
+
export declare function initWeights(ctx: any): Promise<void>;
|
|
55
|
+
export declare function updateWeights(ctx: Context, selectedId: number): Promise<void>;
|
package/lib/wish.d.ts
CHANGED
|
@@ -10,10 +10,10 @@ export declare const wishConfig: {
|
|
|
10
10
|
readonly effect: "攻击伤害提高5%";
|
|
11
11
|
}, {
|
|
12
12
|
readonly name: "金柚赐福";
|
|
13
|
-
readonly effect: "立即获得
|
|
13
|
+
readonly effect: "立即获得3张资源兑换券";
|
|
14
14
|
}, {
|
|
15
15
|
readonly name: "夜市赠礼";
|
|
16
|
-
readonly effect: "立即获得
|
|
16
|
+
readonly effect: "立即获得3枚咕咕币";
|
|
17
17
|
}];
|
|
18
18
|
readonly rare: readonly [{
|
|
19
19
|
readonly name: "悲鸣之锋";
|