XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

feat: Arcana Isolation Vault rewards (#2276)

Closes #388 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2276 Reviewed-by: Sainan <sainan@calamity.inc> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>

3a6e4ac2
AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
提交于

代码差异

3 个文件 +52 -28
Modified package-lock.json +4 -4
@@ -21,7 +21,7 @@
21 21 "ncp": "^2.0.0",
22 22 "typescript": "^5.5",
23 23 "undici": "^7.10.0",
24 "warframe-public-export-plus": "^0.5.68",
24 "warframe-public-export-plus": "^0.5.69",
25 25 "warframe-riven-info": "^0.1.2",
26 26 "winston": "^3.17.0",
27 27 "winston-daily-rotate-file": "^5.0.0",
@@ -3396,9 +3396,9 @@
3396 3396 }
3397 3397 },
3398 3398 "node_modules/warframe-public-export-plus": {
3399 "version": "0.5.68",
3400 "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.68.tgz",
3401 "integrity": "sha512-KMmwCVeQ4k+EN73UZqxnM+qQdPsST8geWoJCP7US5LT6JcRxa8ptmqYXwCzaLtckBLZyVbamsxKZAxPPJckxsA=="
3399 "version": "0.5.69",
3400 "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.69.tgz",
3401 "integrity": "sha512-vTU1tUzqpihzpseUSJMrM82pYbCDZCfW40jXIi+Ol9B3a3Acz0DccfP7i4eoXf7Abahu4H/sjRt/nSHLNBvLHA=="
3402 3402 },
3403 3403 "node_modules/warframe-riven-info": {
3404 3404 "version": "0.1.2",
Modified package.json +1 -1
@@ -33,7 +33,7 @@
33 33 "ncp": "^2.0.0",
34 34 "typescript": "^5.5",
35 35 "undici": "^7.10.0",
36 "warframe-public-export-plus": "^0.5.68",
36 "warframe-public-export-plus": "^0.5.69",
37 37 "warframe-riven-info": "^0.1.2",
38 38 "winston": "^3.17.0",
39 39 "winston-daily-rotate-file": "^5.0.0",
Modified src/services/missionInventoryUpdateService.ts +47 -23
@@ -1207,7 +1207,7 @@ export const addMissionRewards = async (
1207 1207
1208 1208 if (rewardInfo.JobStage != undefined && rewardInfo.jobId) {
1209 1209 // eslint-disable-next-line @typescript-eslint/no-unused-vars
1210 const [jobType, unkIndex, hubNode, syndicateMissionId, locationTag] = rewardInfo.jobId.split("_");
1210 const [jobType, unkIndex, hubNode, syndicateMissionId] = rewardInfo.jobId.split("_");
1211 1211 const syndicateMissions: ISyndicateMissionInfo[] = [];
1212 1212 if (syndicateMissionId) {
1213 1213 pushClassicBounties(syndicateMissions, idToBountyCycle(syndicateMissionId));
@@ -1216,12 +1216,27 @@ export const addMissionRewards = async (
1216 1216 if (syndicateEntry && syndicateEntry.Jobs) {
1217 1217 let currentJob = syndicateEntry.Jobs[rewardInfo.JobTier!];
1218 1218 if (syndicateEntry.Tag === "EntratiSyndicate") {
1219 if (jobType.endsWith("VaultBounty")) {
1220 const vault = syndicateEntry.Jobs.find(j => j.locationTag === locationTag);
1221 if (vault) currentJob = vault;
1219 if (
1220 [
1221 "DeimosRuinsExterminateBounty",
1222 "DeimosRuinsEscortBounty",
1223 "DeimosRuinsMistBounty",
1224 "DeimosRuinsPurifyBounty",
1225 "DeimosRuinsSacBounty",
1226 "VaultBounty"
1227 ].some(ending => jobType.endsWith(ending))
1228 ) {
1229 const vault = syndicateEntry.Jobs.find(j => j.locationTag == rewardInfo.jobId!.split("_").at(-1));
1230 if (vault) {
1231 currentJob = vault;
1232 if (jobType.endsWith("VaultBounty")) {
1233 currentJob.xpAmounts = [currentJob.xpAmounts.reduce((partialSum, a) => partialSum + a, 0)];
1234 }
1235 }
1222 1236 }
1223 let medallionAmount = Math.floor(currentJob.xpAmounts[rewardInfo.JobStage] / (rewardInfo.Q ? 0.8 : 1));
1224
1237 let medallionAmount = Math.floor(
1238 Math.min(rewardInfo.JobStage, currentJob.xpAmounts.length - 1) / (rewardInfo.Q ? 0.8 : 1)
1239 );
1225 1240 if (
1226 1241 ["DeimosEndlessAreaDefenseBounty", "DeimosEndlessExcavateBounty", "DeimosEndlessPurifyBounty"].some(
1227 1242 ending => jobType.endsWith(ending)
@@ -1554,7 +1569,7 @@ function getRandomMissionDrops(
1554 1569 if (RewardInfo.jobId) {
1555 1570 if (RewardInfo.JobStage! >= 0) {
1556 1571 // eslint-disable-next-line @typescript-eslint/no-unused-vars
1557 const [jobType, unkIndex, hubNode, syndicateMissionId, locationTag] = RewardInfo.jobId.split("_");
1572 const [jobType, unkIndex, hubNode, syndicateMissionId] = RewardInfo.jobId.split("_");
1558 1573 let isEndlessJob = false;
1559 1574 if (syndicateMissionId) {
1560 1575 const syndicateMissions: ISyndicateMissionInfo[] = [];
@@ -1566,21 +1581,30 @@ function getRandomMissionDrops(
1566 1581 let job = syndicateEntry.Jobs[RewardInfo.JobTier!];
1567 1582
1568 1583 if (syndicateEntry.Tag === "EntratiSyndicate") {
1569 if (jobType.endsWith("VaultBounty")) {
1570 const vault = syndicateEntry.Jobs.find(j => j.locationTag === locationTag);
1571 if (vault) job = vault;
1584 if (
1585 [
1586 "DeimosRuinsExterminateBounty",
1587 "DeimosRuinsEscortBounty",
1588 "DeimosRuinsMistBounty",
1589 "DeimosRuinsPurifyBounty",
1590 "DeimosRuinsSacBounty",
1591 "VaultBounty"
1592 ].some(ending => jobType.endsWith(ending))
1593 ) {
1594 const vault = syndicateEntry.Jobs.find(
1595 j => j.locationTag === RewardInfo.jobId!.split("_").at(-1)
1596 );
1597 if (vault) {
1598 job = vault;
1599 if (jobType.endsWith("VaultBounty")) {
1600 job.rewards = job.rewards.replace(
1601 "/Lotus/Types/Game/MissionDecks/",
1602 "/Supplementals/"
1603 );
1604 job.xpAmounts = [job.xpAmounts.reduce((partialSum, a) => partialSum + a, 0)];
1605 }
1606 }
1572 1607 }
1573 // if (
1574 // [
1575 // "DeimosRuinsExterminateBounty",
1576 // "DeimosRuinsEscortBounty",
1577 // "DeimosRuinsMistBounty",
1578 // "DeimosRuinsPurifyBounty",
1579 // "DeimosRuinsSacBounty"
1580 // ].some(ending => jobType.endsWith(ending))
1581 // ) {
1582 // job.rewards = "TODO"; // Droptable for Arcana Isolation Vault
1583 // }
1584 1608 if (
1585 1609 [
1586 1610 "DeimosEndlessAreaDefenseBounty",
@@ -1657,10 +1681,10 @@ function getRandomMissionDrops(
1657 1681 }
1658 1682 if (
1659 1683 RewardInfo.Q &&
1660 (RewardInfo.JobStage === job.xpAmounts.length - 1 || job.isVault) &&
1684 (RewardInfo.JobStage === job.xpAmounts.length - 1 || jobType.endsWith("VaultBounty")) &&
1661 1685 !isEndlessJob
1662 1686 ) {
1663 rotations.push(3);
1687 rotations.push(ExportRewards[job.rewards].length - 1);
1664 1688 }
1665 1689 }
1666 1690 }