fix: 1999 bounty chemistry (#2164)
Closes #2162 Reviewed-on: #2164 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									d00fbed46f
								
							
						
					
					
						commit
						f448d03880
					
				@ -66,15 +66,7 @@ import {
 | 
				
			|||||||
} from "@/src/helpers/nemesisHelpers";
 | 
					} from "@/src/helpers/nemesisHelpers";
 | 
				
			||||||
import { Loadout } from "../models/inventoryModels/loadoutModel";
 | 
					import { Loadout } from "../models/inventoryModels/loadoutModel";
 | 
				
			||||||
import { ILoadoutConfigDatabase } from "../types/saveLoadoutTypes";
 | 
					import { ILoadoutConfigDatabase } from "../types/saveLoadoutTypes";
 | 
				
			||||||
import {
 | 
					import { getLiteSortie, getSortie, idToBountyCycle, idToDay, idToWeek, pushClassicBounties } from "./worldStateService";
 | 
				
			||||||
    getLiteSortie,
 | 
					 | 
				
			||||||
    getSortie,
 | 
					 | 
				
			||||||
    getWorldState,
 | 
					 | 
				
			||||||
    idToBountyCycle,
 | 
					 | 
				
			||||||
    idToDay,
 | 
					 | 
				
			||||||
    idToWeek,
 | 
					 | 
				
			||||||
    pushClassicBounties
 | 
					 | 
				
			||||||
} from "./worldStateService";
 | 
					 | 
				
			||||||
import { config } from "./configService";
 | 
					import { config } from "./configService";
 | 
				
			||||||
import libraryDailyTasks from "@/static/fixed_responses/libraryDailyTasks.json";
 | 
					import libraryDailyTasks from "@/static/fixed_responses/libraryDailyTasks.json";
 | 
				
			||||||
import { ISyndicateMissionInfo } from "../types/worldStateTypes";
 | 
					import { ISyndicateMissionInfo } from "../types/worldStateTypes";
 | 
				
			||||||
@ -1266,9 +1258,9 @@ export const addMissionRewards = async (
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (rewardInfo.challengeMissionId) {
 | 
					    if (rewardInfo.challengeMissionId) {
 | 
				
			||||||
        const [syndicateTag, tierStr, chemistryStr] = rewardInfo.challengeMissionId.split("_");
 | 
					        const [syndicateTag, tierStr, chemistryBuddyStr] = rewardInfo.challengeMissionId.split("_");
 | 
				
			||||||
        const tier = Number(tierStr);
 | 
					        const tier = Number(tierStr);
 | 
				
			||||||
        const chemistry = Number(chemistryStr);
 | 
					        const chemistryBuddy = Number(chemistryBuddyStr);
 | 
				
			||||||
        const isSteelPath = missions?.Tier;
 | 
					        const isSteelPath = missions?.Tier;
 | 
				
			||||||
        if (syndicateTag === "ZarimanSyndicate") {
 | 
					        if (syndicateTag === "ZarimanSyndicate") {
 | 
				
			||||||
            let medallionAmount = tier + 1;
 | 
					            let medallionAmount = tier + 1;
 | 
				
			||||||
@ -1285,22 +1277,19 @@ export const addMissionRewards = async (
 | 
				
			|||||||
            if (isSteelPath) standingAmount *= 1.5;
 | 
					            if (isSteelPath) standingAmount *= 1.5;
 | 
				
			||||||
            addStanding(inventory, syndicateTag, standingAmount, AffiliationMods);
 | 
					            addStanding(inventory, syndicateTag, standingAmount, AffiliationMods);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (syndicateTag == "HexSyndicate" && chemistry && tier < 6) {
 | 
					        if (syndicateTag == "HexSyndicate" && tier < 6) {
 | 
				
			||||||
            const seed = getWorldState().SyndicateMissions.find(x => x.Tag == "HexSyndicate")!.Seed;
 | 
					            const buddy = chemistryBuddies[chemistryBuddy];
 | 
				
			||||||
            const { nodes, buddies } = getHexBounties(seed);
 | 
					            const dialogue = getDialogue(inventory, buddy);
 | 
				
			||||||
            const buddy = buddies[tier];
 | 
					            if (Date.now() >= dialogue.BountyChemExpiry.getTime()) {
 | 
				
			||||||
            logger.debug(`Hex seed is ${seed}, giving chemistry for ${buddy}`);
 | 
					                logger.debug(`Giving 20 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
 | 
					                const tomorrowAt0Utc = config.noKimCooldowns
 | 
				
			||||||
                    ? Date.now()
 | 
					                    ? Date.now()
 | 
				
			||||||
                    : (Math.trunc(Date.now() / 86400_000) + 1) * 86400_000;
 | 
					                    : (Math.trunc(Date.now() / 86400_000) + 1) * 86400_000;
 | 
				
			||||||
            const dialogue = getDialogue(inventory, buddy);
 | 
					                dialogue.Chemistry += 20;
 | 
				
			||||||
            dialogue.Chemistry += chemistry;
 | 
					 | 
				
			||||||
                dialogue.BountyChemExpiry = new Date(tomorrowAt0Utc);
 | 
					                dialogue.BountyChemExpiry = new Date(tomorrowAt0Utc);
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                logger.debug(`Already got today's chemistry for ${buddy}`);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (isSteelPath) {
 | 
					        if (isSteelPath) {
 | 
				
			||||||
            await addItem(inventory, "/Lotus/Types/Items/MiscItems/SteelEssence", 1);
 | 
					            await addItem(inventory, "/Lotus/Types/Items/MiscItems/SteelEssence", 1);
 | 
				
			||||||
@ -1864,7 +1853,16 @@ const libraryPersonalTargetToAvatar: Record<string, string> = {
 | 
				
			|||||||
        "/Lotus/Types/Enemies/Corpus/Spaceman/AIWeek/NullifySpacemanAvatar"
 | 
					        "/Lotus/Types/Enemies/Corpus/Spaceman/AIWeek/NullifySpacemanAvatar"
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const node_excluded_buddies: Record<string, string> = {
 | 
					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> = {
 | 
				
			||||||
    SolNode856: "/Lotus/Types/Gameplay/1999Wf/Dialogue/ArthurDialogue_rom.dialogue",
 | 
					    SolNode856: "/Lotus/Types/Gameplay/1999Wf/Dialogue/ArthurDialogue_rom.dialogue",
 | 
				
			||||||
    SolNode852: "/Lotus/Types/Gameplay/1999Wf/Dialogue/LettieDialogue_rom.dialogue",
 | 
					    SolNode852: "/Lotus/Types/Gameplay/1999Wf/Dialogue/LettieDialogue_rom.dialogue",
 | 
				
			||||||
    SolNode851: "/Lotus/Types/Gameplay/1999Wf/Dialogue/JabirDialogue_rom.dialogue",
 | 
					    SolNode851: "/Lotus/Types/Gameplay/1999Wf/Dialogue/JabirDialogue_rom.dialogue",
 | 
				
			||||||
@ -1914,4 +1912,4 @@ const getHexBounties = (seed: number): { nodes: string[]; buddies: string[] } =>
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return { nodes, buddies };
 | 
					    return { nodes, buddies };
 | 
				
			||||||
};
 | 
					};*/
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user