koishi-plugin-ggcevo-game 1.5.30 → 1.5.31
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 +12 -15
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -10959,23 +10959,23 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
10959
10959
|
}
|
|
10960
10960
|
let halfHours = Math.floor(duration / 30);
|
|
10961
10961
|
let base = halfHours * 4;
|
|
10962
|
-
const maxHalfHours = career
|
|
10962
|
+
const maxHalfHours = career?.group === "人类联盟" && techLevel === 5 ? 96 : 48;
|
|
10963
10963
|
halfHours = Math.min(halfHours, maxHalfHours);
|
|
10964
10964
|
base = Math.min(base, maxHalfHours * 4);
|
|
10965
10965
|
let techBonusRate = 0;
|
|
10966
10966
|
let careerBonusRate = 0;
|
|
10967
10967
|
let shipBonusRate = 0;
|
|
10968
10968
|
let minerBonusRate = 0;
|
|
10969
|
-
if (career
|
|
10969
|
+
if (career?.group === "人类联盟") {
|
|
10970
10970
|
const baseTechRates = [0, 0.1, 0.2, 0.3, 0.4, 0.5];
|
|
10971
10971
|
techBonusRate = baseTechRates[Math.min(techLevel, 5)];
|
|
10972
10972
|
const techCareers = ["深空矿工", "情报副官"];
|
|
10973
|
-
if (techCareers.includes(career
|
|
10973
|
+
if (techCareers.includes(career?.career)) {
|
|
10974
10974
|
const careerBonusRates = [0, 0.1, 0.2, 0.3, 0.4, 0.5];
|
|
10975
10975
|
careerBonusRate = careerBonusRates[Math.min(techLevel, 5)];
|
|
10976
10976
|
}
|
|
10977
10977
|
}
|
|
10978
|
-
if (career
|
|
10978
|
+
if (career?.career === "深空矿工") {
|
|
10979
10979
|
minerBonusRate = 0.5;
|
|
10980
10980
|
}
|
|
10981
10981
|
let shipName = "";
|
|
@@ -11048,7 +11048,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11048
11048
|
if (hasMinerBonus) {
|
|
11049
11049
|
reportLines.push(`▸ ⛏️ 深空矿工专业加成:+${(minerBonusRate * 100).toFixed(0)}%金币`);
|
|
11050
11050
|
}
|
|
11051
|
-
if (techLevel === 5 && career
|
|
11051
|
+
if (techLevel === 5 && career?.group === "人类联盟") {
|
|
11052
11052
|
reportLines.push(`▸ ⏱️ 单次挖矿时间上限增加至48小时`);
|
|
11053
11053
|
}
|
|
11054
11054
|
}
|
|
@@ -11419,10 +11419,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11419
11419
|
return "⛔ 您已被列入黑名单。";
|
|
11420
11420
|
}
|
|
11421
11421
|
const [career] = await ctx.database.get("ggcevo_careers", { handle });
|
|
11422
|
-
const
|
|
11423
|
-
if (!allowedGroups.includes(career.group)) {
|
|
11424
|
-
}
|
|
11425
|
-
const careerName = career.career;
|
|
11422
|
+
const careerName = career?.career;
|
|
11426
11423
|
const careerCoinBonus = careerName === "总工程师" ? 50 : 0;
|
|
11427
11424
|
const [shipRecord] = await ctx.database.get("ggcevo_spaceship", { handle });
|
|
11428
11425
|
let shipBonus = 0;
|
|
@@ -11457,7 +11454,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11457
11454
|
const techLevel = techReactor?.level || 0;
|
|
11458
11455
|
let techBonusRate = 0;
|
|
11459
11456
|
let careerBonusRate = 0;
|
|
11460
|
-
if (career
|
|
11457
|
+
if (career?.group === "人类联盟" && techLevel > 0) {
|
|
11461
11458
|
const baseRates = [0, 0.1, 0.2, 0.3, 0.4, 0.5];
|
|
11462
11459
|
techBonusRate = baseRates[techLevel];
|
|
11463
11460
|
const specialCareers = ["总工程师", "情报副官"];
|
|
@@ -11480,8 +11477,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11480
11477
|
const returnsIncrement = (record.returns || 0) + 1;
|
|
11481
11478
|
const galaxyData2 = galaxy[record.galaxy];
|
|
11482
11479
|
let successRate = galaxyData2.success;
|
|
11483
|
-
if (career
|
|
11484
|
-
else if (career
|
|
11480
|
+
if (career?.group === "人类联盟" && record.galaxy === "联盟星系") successRate += 0.1;
|
|
11481
|
+
else if (career?.group === "辛迪加海盗" && record.galaxy === "辛迪加星系") successRate += 0.1;
|
|
11485
11482
|
if (stealthShipEffectAdded) successRate += 0.2;
|
|
11486
11483
|
successRate = Math.min(successRate, 1);
|
|
11487
11484
|
let baseCoinReward = Math.floor(Math.random() * 51) + 50;
|
|
@@ -11639,8 +11636,8 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11639
11636
|
}], ["handle"]);
|
|
11640
11637
|
const galaxyData = galaxy[galaxyName];
|
|
11641
11638
|
let estimatedRate = galaxyData.success;
|
|
11642
|
-
if (career
|
|
11643
|
-
if (career
|
|
11639
|
+
if (career?.group === "人类联盟" && galaxyName === "联盟星系") estimatedRate += 0.1;
|
|
11640
|
+
if (career?.group === "辛迪加海盗" && galaxyName === "辛迪加星系") estimatedRate += 0.1;
|
|
11644
11641
|
if (isStealthShip) estimatedRate += 0.2;
|
|
11645
11642
|
estimatedRate = Math.min(estimatedRate, 1) * 100;
|
|
11646
11643
|
return [
|
|
@@ -11801,7 +11798,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
|
|
|
11801
11798
|
if (career.career === "指挥官") {
|
|
11802
11799
|
upgradeCost = Math.floor(upgradeCost * 0.5);
|
|
11803
11800
|
discountNotice = `
|
|
11804
|
-
✨ 指挥官职业生效!实际消耗: ${upgradeCost} (
|
|
11801
|
+
✨ 指挥官职业生效!实际消耗: ${upgradeCost} (原价:${upgradeConfig.upgradeCostBase})`;
|
|
11805
11802
|
}
|
|
11806
11803
|
if (career.redcrystal < upgradeCost) {
|
|
11807
11804
|
return `🚫 红晶不足!升级需要${upgradeCost}红晶,您当前有${career.redcrystal}红晶`;
|