Compare commits
No commits in common. "a5dd3bde5755e28a8bccdb0aa8e4ac900d72bf36" and "0be54dd7cea04c4a946b0582d0d3c5a7c48c7873" have entirely different histories.
a5dd3bde57
...
0be54dd7ce
@ -8,8 +8,6 @@ import { buildConfig } from "@/src/services/buildConfigService";
|
|||||||
import { IMongoDate, IOid } from "@/src/types/commonTypes";
|
import { IMongoDate, IOid } from "@/src/types/commonTypes";
|
||||||
import { unixTimesInMs } from "@/src/constants/timeConstants";
|
import { unixTimesInMs } from "@/src/constants/timeConstants";
|
||||||
import { config } from "@/src/services/configService";
|
import { config } from "@/src/services/configService";
|
||||||
import { CRng } from "@/src/services/rngService";
|
|
||||||
import { ExportRegions } from "warframe-public-export-plus";
|
|
||||||
|
|
||||||
export const worldStateController: RequestHandler = (req, res) => {
|
export const worldStateController: RequestHandler = (req, res) => {
|
||||||
const worldState: IWorldState = {
|
const worldState: IWorldState = {
|
||||||
@ -20,7 +18,6 @@ export const worldStateController: RequestHandler = (req, res) => {
|
|||||||
Time: Math.round(Date.now() / 1000),
|
Time: Math.round(Date.now() / 1000),
|
||||||
Goals: [],
|
Goals: [],
|
||||||
GlobalUpgrades: [],
|
GlobalUpgrades: [],
|
||||||
LiteSorties: [],
|
|
||||||
EndlessXpChoices: [],
|
EndlessXpChoices: [],
|
||||||
...staticWorldState
|
...staticWorldState
|
||||||
};
|
};
|
||||||
@ -56,7 +53,7 @@ export const worldStateController: RequestHandler = (req, res) => {
|
|||||||
const bountyCycleStart = bountyCycle * 9000000;
|
const bountyCycleStart = bountyCycle * 9000000;
|
||||||
const bountyCycleEnd = bountyCycleStart + 9000000;
|
const bountyCycleEnd = bountyCycleStart + 9000000;
|
||||||
worldState.SyndicateMissions[worldState.SyndicateMissions.findIndex(x => x.Tag == "ZarimanSyndicate")] = {
|
worldState.SyndicateMissions[worldState.SyndicateMissions.findIndex(x => x.Tag == "ZarimanSyndicate")] = {
|
||||||
_id: { $oid: Math.trunc(bountyCycleStart / 1000).toString(16) + "0000000000000029" },
|
_id: { $oid: bountyCycleStart.toString(16) + "0000000000000029" },
|
||||||
Activation: { $date: { $numberLong: bountyCycleStart.toString() } },
|
Activation: { $date: { $numberLong: bountyCycleStart.toString() } },
|
||||||
Expiry: { $date: { $numberLong: bountyCycleEnd.toString() } },
|
Expiry: { $date: { $numberLong: bountyCycleEnd.toString() } },
|
||||||
Tag: "ZarimanSyndicate",
|
Tag: "ZarimanSyndicate",
|
||||||
@ -64,7 +61,7 @@ export const worldStateController: RequestHandler = (req, res) => {
|
|||||||
Nodes: []
|
Nodes: []
|
||||||
};
|
};
|
||||||
worldState.SyndicateMissions[worldState.SyndicateMissions.findIndex(x => x.Tag == "EntratiLabSyndicate")] = {
|
worldState.SyndicateMissions[worldState.SyndicateMissions.findIndex(x => x.Tag == "EntratiLabSyndicate")] = {
|
||||||
_id: { $oid: Math.trunc(bountyCycleStart / 1000).toString(16) + "0000000000000004" },
|
_id: { $oid: bountyCycleStart.toString(16) + "0000000000000004" },
|
||||||
Activation: { $date: { $numberLong: bountyCycleStart.toString() } },
|
Activation: { $date: { $numberLong: bountyCycleStart.toString() } },
|
||||||
Expiry: { $date: { $numberLong: bountyCycleEnd.toString() } },
|
Expiry: { $date: { $numberLong: bountyCycleEnd.toString() } },
|
||||||
Tag: "EntratiLabSyndicate",
|
Tag: "EntratiLabSyndicate",
|
||||||
@ -72,7 +69,7 @@ export const worldStateController: RequestHandler = (req, res) => {
|
|||||||
Nodes: []
|
Nodes: []
|
||||||
};
|
};
|
||||||
worldState.SyndicateMissions[worldState.SyndicateMissions.findIndex(x => x.Tag == "HexSyndicate")] = {
|
worldState.SyndicateMissions[worldState.SyndicateMissions.findIndex(x => x.Tag == "HexSyndicate")] = {
|
||||||
_id: { $oid: Math.trunc(bountyCycleStart / 1000).toString(16) + "0000000000000006" },
|
_id: { $oid: bountyCycleStart.toString(16) + "0000000000000006" },
|
||||||
Activation: { $date: { $numberLong: bountyCycleStart.toString(10) } },
|
Activation: { $date: { $numberLong: bountyCycleStart.toString(10) } },
|
||||||
Expiry: { $date: { $numberLong: bountyCycleEnd.toString(10) } },
|
Expiry: { $date: { $numberLong: bountyCycleEnd.toString(10) } },
|
||||||
Tag: "HexSyndicate",
|
Tag: "HexSyndicate",
|
||||||
@ -117,64 +114,6 @@ export const worldStateController: RequestHandler = (req, res) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Archon Hunt cycling every week
|
|
||||||
{
|
|
||||||
const boss = ["SORTIE_BOSS_AMAR", "SORTIE_BOSS_NIRA", "SORTIE_BOSS_BOREAL"][week % 3];
|
|
||||||
const showdownNode = ["SolNode99", "SolNode53", "SolNode24"][week % 3];
|
|
||||||
const systemIndex = [3, 4, 2][week % 3]; // Mars, Jupiter, Earth
|
|
||||||
|
|
||||||
const nodes: string[] = [];
|
|
||||||
for (const [key, value] of Object.entries(ExportRegions)) {
|
|
||||||
if (
|
|
||||||
value.systemIndex === systemIndex &&
|
|
||||||
value.factionIndex !== undefined &&
|
|
||||||
value.factionIndex < 2 &&
|
|
||||||
value.name.indexOf("Archwing") == -1 &&
|
|
||||||
value.missionIndex != 0 // Exclude MT_ASSASSINATION
|
|
||||||
) {
|
|
||||||
nodes.push(key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const rng = new CRng(week);
|
|
||||||
worldState.LiteSorties.push({
|
|
||||||
_id: {
|
|
||||||
$oid: Math.trunc(weekStart / 1000).toString(16) + "5e23a244740a190c"
|
|
||||||
},
|
|
||||||
Activation: { $date: { $numberLong: weekStart.toString() } },
|
|
||||||
Expiry: { $date: { $numberLong: weekEnd.toString() } },
|
|
||||||
Reward: "/Lotus/Types/Game/MissionDecks/ArchonSortieRewards",
|
|
||||||
Seed: week,
|
|
||||||
Boss: boss,
|
|
||||||
Missions: [
|
|
||||||
{
|
|
||||||
missionType: rng.randomElement([
|
|
||||||
"MT_INTEL",
|
|
||||||
"MT_MOBILE_DEFENSE",
|
|
||||||
"MT_EXTERMINATION",
|
|
||||||
"MT_SABOTAGE",
|
|
||||||
"MT_RESCUE"
|
|
||||||
]),
|
|
||||||
node: rng.randomElement(nodes)
|
|
||||||
},
|
|
||||||
{
|
|
||||||
missionType: rng.randomElement([
|
|
||||||
"MT_DEFENSE",
|
|
||||||
"MT_TERRITORY",
|
|
||||||
"MT_ARTIFACT",
|
|
||||||
"MT_EXCAVATE",
|
|
||||||
"MT_SURVIVAL"
|
|
||||||
]),
|
|
||||||
node: rng.randomElement(nodes)
|
|
||||||
},
|
|
||||||
{
|
|
||||||
missionType: "MT_ASSASSINATION",
|
|
||||||
node: showdownNode
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Circuit choices cycling every week
|
// Circuit choices cycling every week
|
||||||
worldState.EndlessXpChoices.push({
|
worldState.EndlessXpChoices.push({
|
||||||
Category: "EXC_NORMAL",
|
Category: "EXC_NORMAL",
|
||||||
@ -258,7 +197,6 @@ interface IWorldState {
|
|||||||
Goals: IGoal[];
|
Goals: IGoal[];
|
||||||
SyndicateMissions: ISyndicateMission[];
|
SyndicateMissions: ISyndicateMission[];
|
||||||
GlobalUpgrades: IGlobalUpgrade[];
|
GlobalUpgrades: IGlobalUpgrade[];
|
||||||
LiteSorties: ILiteSortie[];
|
|
||||||
NodeOverrides: INodeOverride[];
|
NodeOverrides: INodeOverride[];
|
||||||
EndlessXpChoices: IEndlessXpChoice[];
|
EndlessXpChoices: IEndlessXpChoice[];
|
||||||
KnownCalendarSeasons: ICalendarSeason[];
|
KnownCalendarSeasons: ICalendarSeason[];
|
||||||
@ -312,19 +250,6 @@ interface INodeOverride {
|
|||||||
CustomNpcEncounters?: string;
|
CustomNpcEncounters?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ILiteSortie {
|
|
||||||
_id: IOid;
|
|
||||||
Activation: IMongoDate;
|
|
||||||
Expiry: IMongoDate;
|
|
||||||
Reward: "/Lotus/Types/Game/MissionDecks/ArchonSortieRewards";
|
|
||||||
Seed: number;
|
|
||||||
Boss: string; // "SORTIE_BOSS_AMAR" | "SORTIE_BOSS_NIRA" | "SORTIE_BOSS_BOREAL"
|
|
||||||
Missions: {
|
|
||||||
missionType: string;
|
|
||||||
node: string;
|
|
||||||
}[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IEndlessXpChoice {
|
interface IEndlessXpChoice {
|
||||||
Category: string;
|
Category: string;
|
||||||
Choices: string[];
|
Choices: string[];
|
||||||
|
@ -79,6 +79,21 @@
|
|||||||
"Twitter": true
|
"Twitter": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"LiteSorties": [
|
||||||
|
{
|
||||||
|
"_id": { "$oid": "663819fd1cec9ebe9d83a06e" },
|
||||||
|
"Activation": { "$date": { "$numberLong": "1714953600000" } },
|
||||||
|
"Expiry": { "$date": { "$numberLong": "2000000000000" } },
|
||||||
|
"Reward": "/Lotus/Types/Game/MissionDecks/ArchonSortieRewards",
|
||||||
|
"Seed": 58034,
|
||||||
|
"Boss": "SORTIE_BOSS_NIRA",
|
||||||
|
"Missions": [
|
||||||
|
{ "missionType": "MT_MOBILE_DEFENSE", "node": "SolNode125" },
|
||||||
|
{ "missionType": "MT_SURVIVAL", "node": "SolNode74" },
|
||||||
|
{ "missionType": "MT_ASSASSINATION", "node": "SolNode53" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"SyndicateMissions": [
|
"SyndicateMissions": [
|
||||||
{
|
{
|
||||||
"_id": { "$oid": "663a4fc5ba6f84724fa48049" },
|
"_id": { "$oid": "663a4fc5ba6f84724fa48049" },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user