koishi-plugin-ggcevo-game 1.4.29 → 1.4.30
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 +40 -24
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -3401,12 +3401,16 @@ var PassiveHandler = {
|
|
|
3401
3401
|
(b) => b.groupId === targetBoss.groupId && b.HP > 0
|
|
3402
3402
|
);
|
|
3403
3403
|
const updates = [];
|
|
3404
|
-
const messages = [`🌠
|
|
3404
|
+
const messages = [`🌠 【星界之风】生效:治疗所有存活异形`];
|
|
3405
|
+
let updatedHP = currentHP;
|
|
3405
3406
|
for (const member of groupMembers) {
|
|
3406
|
-
const
|
|
3407
|
-
if (!
|
|
3407
|
+
const memberConfig = PassiveHandler.getMemberConfig(member.name, bossGroup);
|
|
3408
|
+
if (!memberConfig) continue;
|
|
3409
|
+
const maxMemberHP = memberConfig.maxHP;
|
|
3408
3410
|
const healAmount = 200;
|
|
3409
|
-
const
|
|
3411
|
+
const actualHeal = Math.min(healAmount, maxMemberHP - member.HP);
|
|
3412
|
+
if (actualHeal <= 0) continue;
|
|
3413
|
+
const newHP = member.HP + actualHeal;
|
|
3410
3414
|
updates.push(
|
|
3411
3415
|
ctx.database.set(
|
|
3412
3416
|
"ggcevo_boss",
|
|
@@ -3414,12 +3418,16 @@ var PassiveHandler = {
|
|
|
3414
3418
|
{ HP: newHP }
|
|
3415
3419
|
)
|
|
3416
3420
|
);
|
|
3417
|
-
messages.push(`${member.name} +${
|
|
3421
|
+
messages.push(`${member.name} +${actualHeal}HP`);
|
|
3422
|
+
if (member.name === targetBoss.name) {
|
|
3423
|
+
updatedHP = newHP;
|
|
3424
|
+
}
|
|
3418
3425
|
}
|
|
3419
|
-
if (
|
|
3426
|
+
if (updates.length === 0) {
|
|
3427
|
+
return null;
|
|
3420
3428
|
}
|
|
3421
3429
|
await Promise.all(updates);
|
|
3422
|
-
return { messages, updatedHP
|
|
3430
|
+
return { messages, updatedHP };
|
|
3423
3431
|
}
|
|
3424
3432
|
return null;
|
|
3425
3433
|
}, "handleStellarWind"),
|
|
@@ -3622,30 +3630,38 @@ var PassiveHandler = {
|
|
|
3622
3630
|
const groupMembers = activeBosses.filter(
|
|
3623
3631
|
(b) => b.groupId === targetBoss.groupId && b.HP > 0
|
|
3624
3632
|
);
|
|
3625
|
-
const
|
|
3633
|
+
const healPerStack = 10;
|
|
3634
|
+
const totalHeal = lightbladeStacks * healPerStack;
|
|
3626
3635
|
const updates = [];
|
|
3627
3636
|
const messages = [`🛡️ 【天启超载护盾】生效:治疗所有存活异形`];
|
|
3637
|
+
let updatedHP = currentHP;
|
|
3628
3638
|
for (const member of groupMembers) {
|
|
3629
|
-
const
|
|
3630
|
-
if (!
|
|
3631
|
-
const
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
)
|
|
3641
|
-
|
|
3639
|
+
const memberConfig = PassiveHandler.getMemberConfig(member.name, bossGroup);
|
|
3640
|
+
if (!memberConfig) continue;
|
|
3641
|
+
const maxMemberHP = memberConfig.maxHP;
|
|
3642
|
+
const actualHeal = Math.min(totalHeal, maxMemberHP - member.HP);
|
|
3643
|
+
if (actualHeal <= 0) continue;
|
|
3644
|
+
const newHP = member.HP + actualHeal;
|
|
3645
|
+
updates.push(
|
|
3646
|
+
ctx.database.set(
|
|
3647
|
+
"ggcevo_boss",
|
|
3648
|
+
{ name: member.name },
|
|
3649
|
+
{ HP: newHP }
|
|
3650
|
+
)
|
|
3651
|
+
);
|
|
3652
|
+
messages.push(`${member.name} +${actualHeal}HP`);
|
|
3653
|
+
if (member.name === targetBoss.name) {
|
|
3654
|
+
updatedHP = newHP;
|
|
3642
3655
|
}
|
|
3643
3656
|
}
|
|
3657
|
+
if (updates.length === 0) {
|
|
3658
|
+
return null;
|
|
3659
|
+
}
|
|
3644
3660
|
await Promise.all(updates);
|
|
3645
3661
|
return {
|
|
3646
3662
|
messages,
|
|
3647
|
-
updatedHP
|
|
3648
|
-
//
|
|
3663
|
+
updatedHP
|
|
3664
|
+
// 返回当前目标的新HP(如果被治疗)
|
|
3649
3665
|
};
|
|
3650
3666
|
}
|
|
3651
3667
|
return null;
|
|
@@ -7318,7 +7334,7 @@ ${validTypes.join("、")}`;
|
|
|
7318
7334
|
// 这里添加符号
|
|
7319
7335
|
] : [],
|
|
7320
7336
|
`📊 理论伤害值:${damage}${hasCrit ? " (✨ 暴击)" : ""}`,
|
|
7321
|
-
"💡 提示:使用 -t
|
|
7337
|
+
"💡 提示:使用 -t 重甲,生物(标签之间用英文逗号分隔) 添加测试标签"
|
|
7322
7338
|
].filter((line) => line).join("\n");
|
|
7323
7339
|
});
|
|
7324
7340
|
ctx.command("ggcevo/伤害榜 [page]", "查看当前主宰伤害排名").usage("输入 伤害榜 [页码] 查看对应页的排行榜,每页10条").action(async (_, page) => {
|