feat: archon hunt rotation
All checks were successful
Build / build (20) (push) Successful in 41s
Build / build (18) (push) Successful in 1m9s
Build / build (22) (push) Successful in 1m10s
Build / build (20) (pull_request) Successful in 41s
Build / build (18) (pull_request) Successful in 1m9s
Build / build (22) (pull_request) Successful in 1m7s
All checks were successful
Build / build (20) (push) Successful in 41s
Build / build (18) (push) Successful in 1m9s
Build / build (22) (push) Successful in 1m10s
Build / build (20) (pull_request) Successful in 41s
Build / build (18) (pull_request) Successful in 1m9s
Build / build (22) (pull_request) Successful in 1m7s
This commit is contained in:
parent
6f3f1fe5b9
commit
a5dd3bde57
@ -8,6 +8,8 @@ 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 = {
|
||||||
@ -18,6 +20,7 @@ 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
|
||||||
};
|
};
|
||||||
@ -114,6 +117,64 @@ 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",
|
||||||
@ -197,6 +258,7 @@ 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[];
|
||||||
@ -250,6 +312,19 @@ 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,21 +79,6 @@
|
|||||||
"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