Compare commits
6 Commits
main
...
translatio
Author | SHA1 | Date | |
---|---|---|---|
86edad54c1 | |||
76f55f9b11 | |||
a598e85a58 | |||
0ea67b7f57 | |||
253fe6f5ff | |||
a4f3b94e9b |
@ -24,7 +24,7 @@ export const saveDialogueController: RequestHandler = async (req, res) => {
|
||||
inventory.DialogueHistory.Dialogues ??= [];
|
||||
const dialogue = getDialogue(inventory, request.DialogueName);
|
||||
dialogue.Rank = request.Rank;
|
||||
dialogue.Chemistry += request.Chemistry;
|
||||
dialogue.Chemistry = request.Chemistry;
|
||||
dialogue.QueuedDialogues = request.QueuedDialogues;
|
||||
for (const bool of request.Booleans) {
|
||||
dialogue.Booleans.push(bool);
|
||||
|
@ -66,7 +66,15 @@ import {
|
||||
} from "@/src/helpers/nemesisHelpers";
|
||||
import { Loadout } from "../models/inventoryModels/loadoutModel";
|
||||
import { ILoadoutConfigDatabase } from "../types/saveLoadoutTypes";
|
||||
import { getLiteSortie, getSortie, idToBountyCycle, idToDay, idToWeek, pushClassicBounties } from "./worldStateService";
|
||||
import {
|
||||
getLiteSortie,
|
||||
getSortie,
|
||||
getWorldState,
|
||||
idToBountyCycle,
|
||||
idToDay,
|
||||
idToWeek,
|
||||
pushClassicBounties
|
||||
} from "./worldStateService";
|
||||
import { config } from "./configService";
|
||||
import libraryDailyTasks from "@/static/fixed_responses/libraryDailyTasks.json";
|
||||
import { ISyndicateMissionInfo } from "../types/worldStateTypes";
|
||||
@ -1258,9 +1266,9 @@ export const addMissionRewards = async (
|
||||
}
|
||||
|
||||
if (rewardInfo.challengeMissionId) {
|
||||
const [syndicateTag, tierStr, chemistryBuddyStr] = rewardInfo.challengeMissionId.split("_");
|
||||
const [syndicateTag, tierStr, chemistryStr] = rewardInfo.challengeMissionId.split("_");
|
||||
const tier = Number(tierStr);
|
||||
const chemistryBuddy = Number(chemistryBuddyStr);
|
||||
const chemistry = Number(chemistryStr);
|
||||
const isSteelPath = missions?.Tier;
|
||||
if (syndicateTag === "ZarimanSyndicate") {
|
||||
let medallionAmount = tier + 1;
|
||||
@ -1277,19 +1285,22 @@ export const addMissionRewards = async (
|
||||
if (isSteelPath) standingAmount *= 1.5;
|
||||
addStanding(inventory, syndicateTag, standingAmount, AffiliationMods);
|
||||
}
|
||||
if (syndicateTag == "HexSyndicate" && tier < 6) {
|
||||
const buddy = chemistryBuddies[chemistryBuddy];
|
||||
const dialogue = getDialogue(inventory, buddy);
|
||||
if (Date.now() >= dialogue.BountyChemExpiry.getTime()) {
|
||||
logger.debug(`Giving 20 chemistry for ${buddy}`);
|
||||
if (syndicateTag == "HexSyndicate" && chemistry && tier < 6) {
|
||||
const seed = getWorldState().SyndicateMissions.find(x => x.Tag == "HexSyndicate")!.Seed;
|
||||
const { nodes, buddies } = getHexBounties(seed);
|
||||
const buddy = buddies[tier];
|
||||
logger.debug(`Hex seed is ${seed}, giving chemistry for ${buddy}`);
|
||||
if (missions?.Tag != nodes[tier]) {
|
||||
logger.warn(
|
||||
`Uh-oh, tier ${tier} bounty should've been on ${nodes[tier]} but you were just on ${missions?.Tag}`
|
||||
);
|
||||
}
|
||||
const tomorrowAt0Utc = config.noKimCooldowns
|
||||
? Date.now()
|
||||
: (Math.trunc(Date.now() / 86400_000) + 1) * 86400_000;
|
||||
dialogue.Chemistry += 20;
|
||||
const dialogue = getDialogue(inventory, buddy);
|
||||
dialogue.Chemistry += chemistry;
|
||||
dialogue.BountyChemExpiry = new Date(tomorrowAt0Utc);
|
||||
} else {
|
||||
logger.debug(`Already got today's chemistry for ${buddy}`);
|
||||
}
|
||||
}
|
||||
if (isSteelPath) {
|
||||
await addItem(inventory, "/Lotus/Types/Items/MiscItems/SteelEssence", 1);
|
||||
@ -1853,16 +1864,7 @@ const libraryPersonalTargetToAvatar: Record<string, string> = {
|
||||
"/Lotus/Types/Enemies/Corpus/Spaceman/AIWeek/NullifySpacemanAvatar"
|
||||
};
|
||||
|
||||
const chemistryBuddies: readonly string[] = [
|
||||
"/Lotus/Types/Gameplay/1999Wf/Dialogue/JabirDialogue_rom.dialogue",
|
||||
"/Lotus/Types/Gameplay/1999Wf/Dialogue/AoiDialogue_rom.dialogue",
|
||||
"/Lotus/Types/Gameplay/1999Wf/Dialogue/ArthurDialogue_rom.dialogue",
|
||||
"/Lotus/Types/Gameplay/1999Wf/Dialogue/EleanorDialogue_rom.dialogue",
|
||||
"/Lotus/Types/Gameplay/1999Wf/Dialogue/LettieDialogue_rom.dialogue",
|
||||
"/Lotus/Types/Gameplay/1999Wf/Dialogue/QuincyDialogue_rom.dialogue"
|
||||
];
|
||||
|
||||
/*const node_excluded_buddies: Record<string, string> = {
|
||||
const node_excluded_buddies: Record<string, string> = {
|
||||
SolNode856: "/Lotus/Types/Gameplay/1999Wf/Dialogue/ArthurDialogue_rom.dialogue",
|
||||
SolNode852: "/Lotus/Types/Gameplay/1999Wf/Dialogue/LettieDialogue_rom.dialogue",
|
||||
SolNode851: "/Lotus/Types/Gameplay/1999Wf/Dialogue/JabirDialogue_rom.dialogue",
|
||||
@ -1912,4 +1914,4 @@ const getHexBounties = (seed: number): { nodes: string[]; buddies: string[] } =>
|
||||
}
|
||||
}
|
||||
return { nodes, buddies };
|
||||
};*/
|
||||
};
|
||||
|
@ -6,7 +6,7 @@ import { mixSeeds, SRng } from "@/src/services/rngService";
|
||||
import { IMongoDate } from "@/src/types/commonTypes";
|
||||
import { IItemManifest, IVendorInfo, IVendorManifest } from "@/src/types/vendorTypes";
|
||||
import { logger } from "@/src/utils/logger";
|
||||
import { ExportVendors, IRange, IVendor, IVendorOffer } from "warframe-public-export-plus";
|
||||
import { ExportVendors, IRange, IVendor } from "warframe-public-export-plus";
|
||||
|
||||
import ArchimedeanVendorManifest from "@/static/fixed_responses/getVendorInfo/ArchimedeanVendorManifest.json";
|
||||
import DeimosEntratiFragmentVendorProductsManifest from "@/static/fixed_responses/getVendorInfo/DeimosEntratiFragmentVendorProductsManifest.json";
|
||||
@ -21,6 +21,7 @@ import DeimosProspectorVendorManifest from "@/static/fixed_responses/getVendorIn
|
||||
import DuviriAcrithisVendorManifest from "@/static/fixed_responses/getVendorInfo/DuviriAcrithisVendorManifest.json";
|
||||
import EntratiLabsEntratiLabsCommisionsManifest from "@/static/fixed_responses/getVendorInfo/EntratiLabsEntratiLabsCommisionsManifest.json";
|
||||
import EntratiLabsEntratiLabVendorManifest from "@/static/fixed_responses/getVendorInfo/EntratiLabsEntratiLabVendorManifest.json";
|
||||
import HubsIronwakeDondaVendorManifest from "@/static/fixed_responses/getVendorInfo/HubsIronwakeDondaVendorManifest.json";
|
||||
import HubsRailjackCrewMemberVendorManifest from "@/static/fixed_responses/getVendorInfo/HubsRailjackCrewMemberVendorManifest.json";
|
||||
import MaskSalesmanManifest from "@/static/fixed_responses/getVendorInfo/MaskSalesmanManifest.json";
|
||||
import Nova1999ConquestShopManifest from "@/static/fixed_responses/getVendorInfo/Nova1999ConquestShopManifest.json";
|
||||
@ -46,6 +47,7 @@ const rawVendorManifests: IVendorManifest[] = [
|
||||
DuviriAcrithisVendorManifest,
|
||||
EntratiLabsEntratiLabsCommisionsManifest,
|
||||
EntratiLabsEntratiLabVendorManifest,
|
||||
HubsIronwakeDondaVendorManifest, // uses preprocessing
|
||||
HubsRailjackCrewMemberVendorManifest,
|
||||
MaskSalesmanManifest,
|
||||
Nova1999ConquestShopManifest,
|
||||
@ -81,6 +83,10 @@ const generatableVendors: IGeneratableVendorInfo[] = [
|
||||
cycleOffset: 1744934400_000,
|
||||
cycleDuration: 4 * unixTimesInMs.day
|
||||
}
|
||||
// {
|
||||
// _id: { $oid: "5dbb4c41e966f7886c3ce939" },
|
||||
// TypeName: "/Lotus/Types/Game/VendorManifests/Hubs/IronwakeDondaVendorManifest"
|
||||
// }
|
||||
];
|
||||
|
||||
const getVendorOid = (typeName: string): string => {
|
||||
@ -255,8 +261,13 @@ const generateVendorManifest = (vendorInfo: IGeneratableVendorInfo): IVendorMani
|
||||
const cycleIndex = Math.trunc((Date.now() - cycleOffset) / cycleDuration);
|
||||
const rng = new SRng(mixSeeds(vendorSeed, cycleIndex));
|
||||
const manifest = ExportVendors[vendorInfo.TypeName];
|
||||
const offersToAdd: IVendorOffer[] = [];
|
||||
if (!manifest.isOneBinPerCycle) {
|
||||
const offersToAdd = [];
|
||||
if (
|
||||
manifest.numItems &&
|
||||
(manifest.numItems.minValue != manifest.numItems.maxValue ||
|
||||
manifest.items.length != manifest.numItems.minValue) &&
|
||||
!manifest.isOneBinPerCycle
|
||||
) {
|
||||
const remainingItemCapacity: Record<string, number> = {};
|
||||
for (const item of manifest.items) {
|
||||
remainingItemCapacity[item.storeItem] = 1 + item.duplicates;
|
||||
@ -264,7 +275,6 @@ const generateVendorManifest = (vendorInfo: IGeneratableVendorInfo): IVendorMani
|
||||
for (const offer of info.ItemManifest) {
|
||||
remainingItemCapacity[offer.StoreItem] -= 1;
|
||||
}
|
||||
if (manifest.numItems && manifest.items.length != manifest.numItems.minValue) {
|
||||
const numItemsTarget = rng.randomInt(manifest.numItems.minValue, manifest.numItems.maxValue);
|
||||
while (info.ItemManifest.length + offersToAdd.length < numItemsTarget) {
|
||||
// TODO: Consider per-bin item limits
|
||||
@ -276,36 +286,20 @@ const generateVendorManifest = (vendorInfo: IGeneratableVendorInfo): IVendorMani
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (const item of manifest.items) {
|
||||
if (!item.alwaysOffered && remainingItemCapacity[item.storeItem] != 0) {
|
||||
remainingItemCapacity[item.storeItem] -= 1;
|
||||
offersToAdd.push(item);
|
||||
let binThisCycle;
|
||||
if (manifest.isOneBinPerCycle) {
|
||||
binThisCycle = cycleIndex % 2; // Note: May want to auto-compute the bin size, but this is only used for coda weapons right now.
|
||||
}
|
||||
}
|
||||
for (const e of Object.entries(remainingItemCapacity)) {
|
||||
const item = manifest.items.find(x => x.storeItem == e[0])!;
|
||||
if (!item.alwaysOffered) {
|
||||
while (e[1] != 0) {
|
||||
e[1] -= 1;
|
||||
offersToAdd.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const item of manifest.items) {
|
||||
if (item.alwaysOffered && remainingItemCapacity[item.storeItem] != 0) {
|
||||
remainingItemCapacity[item.storeItem] -= 1;
|
||||
offersToAdd.push(item);
|
||||
}
|
||||
}
|
||||
offersToAdd.reverse();
|
||||
}
|
||||
} else {
|
||||
const binThisCycle = cycleIndex % 2; // Note: May want to auto-compute the bin size, but this is only used for coda weapons right now.
|
||||
for (const rawItem of manifest.items) {
|
||||
if (rawItem.bin == binThisCycle) {
|
||||
if (!manifest.isOneBinPerCycle || rawItem.bin == binThisCycle) {
|
||||
offersToAdd.push(rawItem);
|
||||
}
|
||||
}
|
||||
|
||||
// For most vendors, the offers seem to roughly be in reverse order from the manifest. Coda weapons are an odd exception.
|
||||
if (!manifest.isOneBinPerCycle) {
|
||||
offersToAdd.reverse();
|
||||
}
|
||||
}
|
||||
const cycleStart = cycleOffset + cycleIndex * cycleDuration;
|
||||
for (const rawItem of offersToAdd) {
|
||||
@ -394,17 +388,4 @@ if (isDev) {
|
||||
) {
|
||||
logger.warn(`self test failed for /Lotus/Types/Game/VendorManifests/Hubs/GuildAdvertisementVendorManifest`);
|
||||
}
|
||||
|
||||
const pall = getVendorManifestByTypeName("/Lotus/Types/Game/VendorManifests/Hubs/IronwakeDondaVendorManifest")!
|
||||
.VendorInfo.ItemManifest;
|
||||
if (
|
||||
pall.length != 5 ||
|
||||
pall[0].StoreItem != "/Lotus/StoreItems/Types/Items/ShipDecos/HarrowQuestKeyOrnament" ||
|
||||
pall[1].StoreItem != "/Lotus/StoreItems/Types/BoosterPacks/RivenModPack" ||
|
||||
pall[2].StoreItem != "/Lotus/StoreItems/Types/StoreItems/CreditBundles/150000Credits" ||
|
||||
pall[3].StoreItem != "/Lotus/StoreItems/Types/Items/MiscItems/Kuva" ||
|
||||
pall[4].StoreItem != "/Lotus/StoreItems/Types/BoosterPacks/RivenModPack"
|
||||
) {
|
||||
logger.warn(`self test failed for /Lotus/Types/Game/VendorManifests/Hubs/IronwakeDondaVendorManifest`);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,125 @@
|
||||
{
|
||||
"VendorInfo": {
|
||||
"_id": {
|
||||
"$oid": "5dbb4c41e966f7886c3ce939"
|
||||
},
|
||||
"TypeName": "/Lotus/Types/Game/VendorManifests/Hubs/IronwakeDondaVendorManifest",
|
||||
"ItemManifest": [
|
||||
{
|
||||
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/HarrowQuestKeyOrnament",
|
||||
"ItemPrices": [
|
||||
{
|
||||
"ItemCount": 25,
|
||||
"ItemType": "/Lotus/Types/Items/MiscItems/PrimeBucks",
|
||||
"ProductCategory": "MiscItems"
|
||||
}
|
||||
],
|
||||
"Bin": "BIN_0",
|
||||
"QuantityMultiplier": 1,
|
||||
"Expiry": {
|
||||
"$date": {
|
||||
"$numberLong": "604800000"
|
||||
}
|
||||
},
|
||||
"AllowMultipurchase": true,
|
||||
"Id": {
|
||||
"$oid": "66fd60b20ba592c4c95e945f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"StoreItem": "/Lotus/StoreItems/Types/BoosterPacks/RivenModPack",
|
||||
"ItemPrices": [
|
||||
{
|
||||
"ItemCount": 10,
|
||||
"ItemType": "/Lotus/Types/Items/MiscItems/RivenFragment",
|
||||
"ProductCategory": "MiscItems"
|
||||
}
|
||||
],
|
||||
"Bin": "BIN_0",
|
||||
"QuantityMultiplier": 1,
|
||||
"Expiry": {
|
||||
"$date": {
|
||||
"$numberLong": "604800000"
|
||||
}
|
||||
},
|
||||
"PurchaseQuantityLimit": 1,
|
||||
"AllowMultipurchase": false,
|
||||
"Id": {
|
||||
"$oid": "66fd60b20ba592c4c95e9468"
|
||||
}
|
||||
},
|
||||
{
|
||||
"StoreItem": "/Lotus/StoreItems/Types/StoreItems/CreditBundles/150000Credits",
|
||||
"ItemPrices": [
|
||||
{
|
||||
"ItemCount": 5,
|
||||
"ItemType": "/Lotus/Types/Items/MiscItems/RivenFragment",
|
||||
"ProductCategory": "MiscItems"
|
||||
}
|
||||
],
|
||||
"Bin": "BIN_0",
|
||||
"QuantityMultiplier": 1,
|
||||
"Expiry": {
|
||||
"$date": {
|
||||
"$numberLong": "604800000"
|
||||
}
|
||||
},
|
||||
"PurchaseQuantityLimit": 1,
|
||||
"AllowMultipurchase": false,
|
||||
"Id": {
|
||||
"$oid": "66fd60b20ba592c4c95e9469"
|
||||
}
|
||||
},
|
||||
{
|
||||
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/Kuva",
|
||||
"ItemPrices": [
|
||||
{
|
||||
"ItemCount": 10,
|
||||
"ItemType": "/Lotus/Types/Items/MiscItems/RivenFragment",
|
||||
"ProductCategory": "MiscItems"
|
||||
}
|
||||
],
|
||||
"Bin": "BIN_0",
|
||||
"QuantityMultiplier": 35000,
|
||||
"Expiry": {
|
||||
"$date": {
|
||||
"$numberLong": "604800000"
|
||||
}
|
||||
},
|
||||
"PurchaseQuantityLimit": 1,
|
||||
"AllowMultipurchase": false,
|
||||
"Id": {
|
||||
"$oid": "66fd60b20ba592c4c95e946a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"StoreItem": "/Lotus/StoreItems/Types/BoosterPacks/RivenModPack",
|
||||
"ItemPrices": [
|
||||
{
|
||||
"ItemCount": 10,
|
||||
"ItemType": "/Lotus/Types/Items/MiscItems/RivenFragment",
|
||||
"ProductCategory": "MiscItems"
|
||||
}
|
||||
],
|
||||
"Bin": "BIN_0",
|
||||
"QuantityMultiplier": 1,
|
||||
"Expiry": {
|
||||
"$date": {
|
||||
"$numberLong": "604800000"
|
||||
}
|
||||
},
|
||||
"PurchaseQuantityLimit": 1,
|
||||
"AllowMultipurchase": false,
|
||||
"Id": {
|
||||
"$oid": "66fd60b20ba592c4c95e946b"
|
||||
}
|
||||
}
|
||||
],
|
||||
"PropertyTextHash": "62B64A8065B7C0FA345895D4BC234621",
|
||||
"Expiry": {
|
||||
"$date": {
|
||||
"$numberLong": "604800000"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user