koishi-plugin-ggcevo-game 1.3.43 → 1.3.45
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 +20 -12
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -708,7 +708,7 @@ function apply(ctx, config) {
|
|
|
708
708
|
},
|
|
709
709
|
"脉冲": {
|
|
710
710
|
effect: 0,
|
|
711
|
-
description: "当“能量”≥
|
|
711
|
+
description: "当“能量”≥10%的时候,每次受到攻击有60%的概率回复所有存活的异形100点血量; 每拥有一层“寒冷”则降低5%的概率"
|
|
712
712
|
},
|
|
713
713
|
"能量黑洞": {
|
|
714
714
|
effect: 0,
|
|
@@ -2075,7 +2075,7 @@ function apply(ctx, config) {
|
|
|
2075
2075
|
const currentEnergy = targetBoss.energy || 0;
|
|
2076
2076
|
const currentFreezing = targetBoss.freezing || 0;
|
|
2077
2077
|
const maxEnergy = 1e3;
|
|
2078
|
-
if (currentEnergy < maxEnergy * 0.
|
|
2078
|
+
if (currentEnergy < maxEnergy * 0.1) {
|
|
2079
2079
|
return null;
|
|
2080
2080
|
}
|
|
2081
2081
|
let triggerChance = 60 - currentFreezing * 5;
|
|
@@ -2092,7 +2092,7 @@ function apply(ctx, config) {
|
|
|
2092
2092
|
const memberConfig = this.getMemberConfig(member.name, bossGroup);
|
|
2093
2093
|
if (!memberConfig) continue;
|
|
2094
2094
|
const maxHP = memberConfig.maxHP;
|
|
2095
|
-
const healAmount = member.type === "主宰" ?
|
|
2095
|
+
const healAmount = member.type === "主宰" ? 100 : 100;
|
|
2096
2096
|
const newHP = Math.min(member.HP + healAmount, maxHP);
|
|
2097
2097
|
const actualHeal = newHP - member.HP;
|
|
2098
2098
|
updates.push(
|
|
@@ -2263,7 +2263,14 @@ function apply(ctx, config) {
|
|
|
2263
2263
|
finalDamage = Math.max(finalDamage, 1);
|
|
2264
2264
|
currentHP = targetBoss.HP - finalDamage;
|
|
2265
2265
|
if (currentHP <= 0 && !targetBoss.skills.includes("求生本能I") && !targetBoss.skills.includes("求生本能II")) {
|
|
2266
|
-
return {
|
|
2266
|
+
return {
|
|
2267
|
+
currentHP,
|
|
2268
|
+
messages,
|
|
2269
|
+
skillUpdates,
|
|
2270
|
+
initialDamage: finalDamage,
|
|
2271
|
+
radiationApplied,
|
|
2272
|
+
freezing
|
|
2273
|
+
};
|
|
2267
2274
|
}
|
|
2268
2275
|
const frostSurroundResult = await this.handleFrostSurround(ctx2, targetBoss, currentHP, maxHP);
|
|
2269
2276
|
if (frostSurroundResult) {
|
|
@@ -5112,18 +5119,18 @@ ${validTypes.join("、")}`;
|
|
|
5112
5119
|
const existingEntries = await ctx.database.get("ggcevo_blacklist", { handle });
|
|
5113
5120
|
if (existingEntries.length > 0) return "⛔ 您已被列入黑名单";
|
|
5114
5121
|
const weaponId = weaponConfig[weapon]?.id;
|
|
5115
|
-
if (!weaponId) return "❌
|
|
5122
|
+
if (!weaponId) return "❌ 请输入“拆卸 武器名称 模块名称”\n注意:专属模块返还50%金币,通用模块返还80%金币";
|
|
5116
5123
|
const modInfo = modConfig[mod];
|
|
5117
|
-
if (!modInfo) return "❌
|
|
5124
|
+
if (!modInfo) return "❌ 请输入“拆卸 武器名称 模块名称”\n注意:专属模块返还50%金币,通用模块返还80%金币";
|
|
5118
5125
|
const refundRate = modInfo.isExclusive ? 0.5 : 0.8;
|
|
5119
5126
|
const refundType = modInfo.isExclusive ? "专属模块返还50%" : "通用模块返还80%";
|
|
5120
5127
|
const [equipment] = await ctx.database.get("ggcevo_equipment", {
|
|
5121
5128
|
handle,
|
|
5122
5129
|
weaponId
|
|
5123
5130
|
});
|
|
5124
|
-
if (!equipment) return "❌
|
|
5131
|
+
if (!equipment) return "❌ 您尚未获得该武器。";
|
|
5125
5132
|
if (!equipment.installedMods.includes(mod)) {
|
|
5126
|
-
return `❌ 该武器未安装${mod}
|
|
5133
|
+
return `❌ 该武器未安装${mod}模块。`;
|
|
5127
5134
|
}
|
|
5128
5135
|
const refund = Math.floor(modInfo.cost * refundRate);
|
|
5129
5136
|
const newMods = equipment.installedMods.filter((m) => m !== mod);
|
|
@@ -5134,9 +5141,10 @@ ${validTypes.join("、")}`;
|
|
|
5134
5141
|
);
|
|
5135
5142
|
const [signInfo] = await ctx.database.get("ggcevo_sign", { handle });
|
|
5136
5143
|
const newBalance = (signInfo?.totalRewards || 0) + refund;
|
|
5137
|
-
await ctx.database.
|
|
5144
|
+
await ctx.database.upsert("ggcevo_sign", [{
|
|
5145
|
+
handle,
|
|
5138
5146
|
totalRewards: newBalance
|
|
5139
|
-
});
|
|
5147
|
+
}], ["handle"]);
|
|
5140
5148
|
return [
|
|
5141
5149
|
`✅ 已从 ${weapon} 拆卸 ${mod} 模块`,
|
|
5142
5150
|
`返还金币:${refund} (原价${modInfo.cost},${refundType})`,
|
|
@@ -6379,13 +6387,13 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
6379
6387
|
handle,
|
|
6380
6388
|
taskId: task2.id
|
|
6381
6389
|
}).catch(() => [null]);
|
|
6382
|
-
const completionStatus = playerTask2 ?
|
|
6390
|
+
const completionStatus = playerTask2 ? `${playerTask2.progress}/${task2.target}` : "尚未开始";
|
|
6383
6391
|
taskList.push([
|
|
6384
6392
|
`▸ 【${taskName}】`,
|
|
6385
6393
|
`类型: ${task2.type}`,
|
|
6386
6394
|
`目标: ${task2.target}次`,
|
|
6387
6395
|
`奖励: ${task2.price}金币`,
|
|
6388
|
-
|
|
6396
|
+
`进度: ${completionStatus}`
|
|
6389
6397
|
].join("\n"));
|
|
6390
6398
|
}
|
|
6391
6399
|
return [
|