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: nine week incarnon adapters (#4297)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4297 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>

11a163f0
AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
提交于

代码差异

2 个文件 +41 -30
Modified src/controllers/api/endlessXpController.ts +5 -0
@@ -456,6 +456,11 @@ const hardModeChosenRewards: Record<string, string> = {
456 456 Okina: "/Lotus/StoreItems/Types/Items/MiscItems/IncarnonAdapters/Melee/OkinaIncarnonUnlocker",
457 457 Sybaris: "/Lotus/StoreItems/Types/Items/MiscItems/IncarnonAdapters/Primary/SybarisIncarnonUnlocker",
458 458 Sicarus: "/Lotus/StoreItems/Types/Items/MiscItems/IncarnonAdapters/Secondary/SicarusIncarnonUnlocker",
459 Vectis: "/Lotus/StoreItems/Types/Items/MiscItems/IncarnonAdapters/Primary/VectisIncarnonUnlocker",
460 Stug: "/Lotus/StoreItems/Types/Items/MiscItems/IncarnonAdapters/Secondary/StugIncarnonUnlocker",
461 Ballistica: "/Lotus/StoreItems/Types/Items/MiscItems/IncarnonAdapters/Secondary/BallisticaIncarnonUnlocker",
462 Destreza: "/Lotus/StoreItems/Types/Items/MiscItems/IncarnonAdapters/Melee/DestrezaIncarnonUnlocker",
463 Obex: "/Lotus/StoreItems/Types/Items/MiscItems/IncarnonAdapters/Melee/ObexIncarnonUnlocker",
459 464 RivenPrimary: "/Lotus/StoreItems/Upgrades/Mods/Randomized/RawRifleRandomMod",
460 465 RivenSecondary: "/Lotus/StoreItems/Upgrades/Mods/Randomized/RawPistolRandomMod",
461 466 RivenMelee: "/Lotus/StoreItems/Upgrades/Mods/Randomized/RawMeleeRandomMod",
Modified src/services/worldStateService.ts +36 -30
@@ -1858,6 +1858,7 @@ export const getWorldState = (
1858 1858 convertGoals: boolean = true,
1859 1859 changeLegacyTags: boolean = config.unfaithfulBugFixes?.useAnniversaryTagForOldGoals || false
1860 1860 ): IWorldState => {
1861 const buildVersionInt = buildVersionToInt(buildLabel);
1861 1862 const constraints: ITimeConstraint[] = [];
1862 1863 if (config.worldState?.eidolonOverride) {
1863 1864 constraints.push(config.worldState.eidolonOverride == "day" ? eidolonDayConstraint : eidolonNightConstraint);
@@ -2143,7 +2144,7 @@ export const getWorldState = (
2143 2144 for (const [key, alert] of Object.entries(configAlerts)) {
2144 2145 if (config.worldState[key as keyof typeof config.worldState]) {
2145 2146 const { minBuildVersion, ...wsAlert } = alert;
2146 if (!minBuildVersion || minBuildVersion >= buildVersionToInt(buildLabel)) {
2147 if (!minBuildVersion || minBuildVersion >= buildVersionInt) {
2147 2148 if (wsAlert.MissionInfo.missionType == "MT_DEFENSE") {
2148 2149 wsAlert.MissionInfo.maxWaveNum =
2149 2150 defenseWavesPerRotation * (wsAlert.MissionInfo.maxRotations ?? 1);
@@ -4549,23 +4550,23 @@ export const getWorldState = (
4549 4550 }
4550 4551
4551 4552 // Circuit choices cycling every week
4552 if (version_compare(buildLabel, gameToBuildVersion["42.0.0"]) >= 0) {
4553 if (buildVersionInt >= gameToBuildVersionInt["42.0.0"]) {
4553 4554 worldState.EndlessXpSchedule = [
4554 4555 {
4555 4556 Activation: { $date: { $numberLong: weekStart.toString() } },
4556 4557 Expiry: { $date: { $numberLong: weekEnd.toString() } },
4557 CategoryChoices: getEndlessXpChoices(week)
4558 CategoryChoices: getEndlessXpChoices(week, buildVersionInt)
4558 4559 }
4559 4560 ];
4560 4561 if (isBeforeNextExpectedWorldStateRefresh(timeMs, weekEnd)) {
4561 4562 worldState.EndlessXpSchedule.push({
4562 4563 Activation: { $date: { $numberLong: (weekStart + 604800000).toString() } },
4563 4564 Expiry: { $date: { $numberLong: (weekEnd + 604800000).toString() } },
4564 CategoryChoices: getEndlessXpChoices(week + 1)
4565 CategoryChoices: getEndlessXpChoices(week + 1, buildVersionInt)
4565 4566 });
4566 4567 }
4567 } else if (version_compare(buildLabel, gameToBuildVersion["33.0.0"]) >= 0) {
4568 worldState.EndlessXpChoices = getEndlessXpChoices(week);
4568 } else if (buildVersionInt >= gameToBuildVersionInt["33.0.0"]) {
4569 worldState.EndlessXpChoices = getEndlessXpChoices(week, buildVersionInt);
4569 4570 }
4570 4571
4571 4572 // 1999 Calendar Season cycling every week + YearIteration every 4 weeks
@@ -4946,36 +4947,41 @@ export const getLiteSortie = (week: number): ILiteSortie => {
4946 4947 };
4947 4948 };
4948 4949
4949 const getEndlessXpChoices = (week: number): IEndlessXpChoice[] => {
4950 const getEndlessXpChoices = (week: number, buildVersionInt: number): IEndlessXpChoice[] => {
4951 const normalChoices = [
4952 ["Nidus", "Octavia", "Harrow"],
4953 ["Gara", "Khora", "Revenant"],
4954 ["Garuda", "Baruuk", "Hildryn"],
4955 ["Excalibur", "Trinity", "Ember"],
4956 ["Loki", "Mag", "Rhino"],
4957 ["Ash", "Frost", "Nyx"],
4958 ["Saryn", "Vauban", "Nova"],
4959 ["Nekros", "Valkyr", "Oberon"],
4960 ["Hydroid", "Mirage", "Limbo"],
4961 ["Mesa", "Chroma", "Atlas"],
4962 ["Ivara", "Inaros", "Titania"]
4963 ];
4964 const hardChoices = [
4965 ["Boar", "Gammacor", "Angstrum", "Gorgon", "Anku"],
4966 ["Bo", "Latron", "Furis", "Furax", "Strun"],
4967 ["Lex", "Magistar", "Boltor", "Bronco", "CeramicDagger"],
4968 ["Torid", "DualToxocyst", "DualIchor", "Miter", "Atomos"],
4969 ["AckAndBrunt", "Soma", "Vasto", "NamiSolo", "Burston"],
4970 ["Zylok", "Sibear", "Dread", "Despair", "Hate"],
4971 ["Dera", "Sybaris", "Cestra", "Sicarus", "Okina"],
4972 ...(buildVersionInt >= gameToBuildVersionInt["43.0.0"]
4973 ? [["Vectis", "Stug", "Ballistica", "Destreza", "Obex"]]
4974 : []),
4975 ["Braton", "Lato", "Skana", "Paris", "Kunai"]
4976 ];
4950 4977 return [
4951 4978 {
4952 4979 Category: "EXC_NORMAL",
4953 Choices: [
4954 ["Nidus", "Octavia", "Harrow"],
4955 ["Gara", "Khora", "Revenant"],
4956 ["Garuda", "Baruuk", "Hildryn"],
4957 ["Excalibur", "Trinity", "Ember"],
4958 ["Loki", "Mag", "Rhino"],
4959 ["Ash", "Frost", "Nyx"],
4960 ["Saryn", "Vauban", "Nova"],
4961 ["Nekros", "Valkyr", "Oberon"],
4962 ["Hydroid", "Mirage", "Limbo"],
4963 ["Mesa", "Chroma", "Atlas"],
4964 ["Ivara", "Inaros", "Titania"]
4965 ][week % 11]
4980 Choices: normalChoices[week % normalChoices.length]
4966 4981 },
4967 4982 {
4968 4983 Category: "EXC_HARD",
4969 Choices: [
4970 ["Boar", "Gammacor", "Angstrum", "Gorgon", "Anku"],
4971 ["Bo", "Latron", "Furis", "Furax", "Strun"],
4972 ["Lex", "Magistar", "Boltor", "Bronco", "CeramicDagger"],
4973 ["Torid", "DualToxocyst", "DualIchor", "Miter", "Atomos"],
4974 ["AckAndBrunt", "Soma", "Vasto", "NamiSolo", "Burston"],
4975 ["Zylok", "Sibear", "Dread", "Despair", "Hate"],
4976 ["Dera", "Sybaris", "Cestra", "Sicarus", "Okina"],
4977 ["Braton", "Lato", "Skana", "Paris", "Kunai"]
4978 ][week % 8]
4984 Choices: hardChoices[week % hardChoices.length]
4979 4985 }
4980 4986 ];
4981 4987 };