2023-06-12 06:34:20 +02:00
|
|
|
import {
|
|
|
|
AugmentationName,
|
|
|
|
BlackOperationName,
|
|
|
|
CityName,
|
|
|
|
CompletedProgramName,
|
|
|
|
CorpUnlockName,
|
|
|
|
FactionName,
|
|
|
|
IndustryType,
|
|
|
|
} from "@enums";
|
2022-01-06 13:04:03 +01:00
|
|
|
import { SkillNames } from "../Bladeburner/data/SkillNames";
|
|
|
|
import { Skills } from "../Bladeburner/Skills";
|
|
|
|
import { CONSTANTS } from "../Constants";
|
|
|
|
import { Exploit } from "../Exploits/Exploit";
|
|
|
|
import { Factions } from "../Faction/Factions";
|
|
|
|
import { AllGangs } from "../Gang/AllGangs";
|
|
|
|
import { GangConstants } from "../Gang/data/Constants";
|
|
|
|
import { HacknetNodeConstants, HacknetServerConstants } from "../Hacknet/data/Constants";
|
|
|
|
import { hasHacknetServers } from "../Hacknet/HacknetHelpers";
|
|
|
|
import { HacknetNode } from "../Hacknet/HacknetNode";
|
|
|
|
import { HacknetServer } from "../Hacknet/HacknetServer";
|
2022-10-10 00:42:14 +02:00
|
|
|
import { Player } from "@player";
|
2022-01-06 13:04:03 +01:00
|
|
|
import { GetAllServers, GetServer } from "../Server/AllServers";
|
|
|
|
import { SpecialServers } from "../Server/data/SpecialServers";
|
|
|
|
import { Server } from "../Server/Server";
|
|
|
|
import { Router } from "../ui/GameRoot";
|
|
|
|
import { Page } from "../ui/Router";
|
2023-01-06 02:29:02 +01:00
|
|
|
import data from "./AchievementData.json";
|
2022-07-07 23:28:23 +02:00
|
|
|
import { isClassWork } from "../Work/ClassWork";
|
2023-06-16 23:52:42 +02:00
|
|
|
import { currentNodeMults } from "../BitNode/BitNodeMultipliers";
|
2023-04-28 00:21:06 +02:00
|
|
|
import { workerScripts } from "../Netscript/WorkerScripts";
|
2022-01-06 13:04:03 +01:00
|
|
|
|
2023-05-16 00:06:57 +02:00
|
|
|
import { getRecordValues } from "../Types/Record";
|
2023-03-29 06:30:27 +02:00
|
|
|
|
2022-01-06 13:04:03 +01:00
|
|
|
// Unable to correctly cast the JSON data into AchievementDataJson type otherwise...
|
2022-01-08 20:54:21 +01:00
|
|
|
const achievementData = (<AchievementDataJson>(<unknown>data)).achievements;
|
2022-01-06 13:04:03 +01:00
|
|
|
|
|
|
|
export interface Achievement {
|
|
|
|
ID: string;
|
|
|
|
Icon?: string;
|
|
|
|
Name?: string;
|
|
|
|
Description?: string;
|
|
|
|
Secret?: boolean;
|
|
|
|
Condition: () => boolean;
|
|
|
|
Visible?: () => boolean;
|
2022-01-11 19:41:08 +01:00
|
|
|
AdditionalUnlock?: string[]; // IDs of achievements that should be awarded when awarding this one
|
2022-01-06 13:04:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface PlayerAchievement {
|
|
|
|
ID: string;
|
|
|
|
unlockedOn?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface AchievementDataJson {
|
2022-10-03 18:12:16 +02:00
|
|
|
achievements: Record<string, AchievementData>;
|
2022-01-06 13:04:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface AchievementData {
|
|
|
|
ID: string;
|
|
|
|
Name: string;
|
|
|
|
Description: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
function bitNodeFinishedState(): boolean {
|
|
|
|
const wd = GetServer(SpecialServers.WorldDaemon);
|
|
|
|
if (!(wd instanceof Server)) return false;
|
|
|
|
if (wd.backdoorInstalled) return true;
|
2023-06-12 06:34:20 +02:00
|
|
|
return Player.bladeburner !== null && BlackOperationName.OperationDaedalus in Player.bladeburner.blackops;
|
2022-01-06 13:04:03 +01:00
|
|
|
}
|
|
|
|
|
2023-06-29 19:22:10 +02:00
|
|
|
function hasAccessToSF(bn: number): boolean {
|
|
|
|
return Player.bitNodeN === bn || Player.sourceFileLvl(bn) > 0;
|
2022-01-06 13:04:03 +01:00
|
|
|
}
|
|
|
|
|
2023-06-29 19:22:10 +02:00
|
|
|
function knowsAboutBitverse(): boolean {
|
|
|
|
return Player.sourceFiles.size > 0;
|
2022-01-06 13:04:03 +01:00
|
|
|
}
|
|
|
|
|
2023-06-29 19:22:10 +02:00
|
|
|
function sfAchievements(): Record<string, Achievement> {
|
|
|
|
const achs: Record<string, Achievement> = {};
|
|
|
|
for (let i = 1; i <= 12; i++) {
|
|
|
|
const ID = `SF${i}.1`;
|
|
|
|
achs[ID] = {
|
|
|
|
...achievementData[ID],
|
|
|
|
Icon: ID,
|
|
|
|
Visible: knowsAboutBitverse,
|
|
|
|
Condition: () => Player.sourceFileLvl(i) >= 1,
|
|
|
|
};
|
2022-01-06 13:04:03 +01:00
|
|
|
}
|
|
|
|
return achs;
|
|
|
|
}
|
|
|
|
|
2022-10-03 18:12:16 +02:00
|
|
|
export const achievements: Record<string, Achievement> = {
|
2023-06-12 06:34:20 +02:00
|
|
|
[FactionName.CyberSec.toUpperCase()]: {
|
|
|
|
...achievementData[FactionName.CyberSec.toUpperCase()],
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "CSEC",
|
2023-06-12 06:34:20 +02:00
|
|
|
Condition: () => Player.factions.includes(FactionName.CyberSec),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2023-06-12 06:34:20 +02:00
|
|
|
[FactionName.NiteSec.toUpperCase()]: {
|
|
|
|
...achievementData[FactionName.NiteSec.toUpperCase()],
|
|
|
|
Icon: FactionName.NiteSec,
|
|
|
|
Condition: () => Player.factions.includes(FactionName.NiteSec),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
THE_BLACK_HAND: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.THE_BLACK_HAND,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "TBH",
|
2023-06-12 06:34:20 +02:00
|
|
|
Condition: () => Player.factions.includes(FactionName.TheBlackHand),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2023-06-12 06:34:20 +02:00
|
|
|
[FactionName.BitRunners.toUpperCase()]: {
|
|
|
|
...achievementData[FactionName.BitRunners.toUpperCase()],
|
|
|
|
Icon: FactionName.BitRunners.toLowerCase(),
|
|
|
|
Condition: () => Player.factions.includes(FactionName.BitRunners),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2023-06-12 06:34:20 +02:00
|
|
|
[FactionName.Daedalus.toUpperCase()]: {
|
|
|
|
...achievementData[FactionName.Daedalus.toUpperCase()],
|
|
|
|
Icon: FactionName.Daedalus.toLowerCase(),
|
|
|
|
Condition: () => Player.factions.includes(FactionName.Daedalus),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
THE_COVENANT: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.THE_COVENANT,
|
2023-06-12 06:34:20 +02:00
|
|
|
Icon: FactionName.TheCovenant.toLowerCase().replace(/ /g, ""),
|
|
|
|
Condition: () => Player.factions.includes(FactionName.TheCovenant),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2023-06-12 06:34:20 +02:00
|
|
|
[FactionName.Illuminati.toUpperCase()]: {
|
|
|
|
...achievementData[FactionName.Illuminati.toUpperCase()],
|
|
|
|
Icon: FactionName.Illuminati.toLowerCase(),
|
|
|
|
Condition: () => Player.factions.includes(FactionName.Illuminati),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
|
|
|
"BRUTESSH.EXE": {
|
2022-01-08 20:54:21 +01:00
|
|
|
...achievementData["BRUTESSH.EXE"],
|
|
|
|
Icon: "p0",
|
FILES: Path rework & typesafety (#479)
* Added new types for various file paths, all in the Paths folder.
* TypeSafety and other helper functions related to these types
* Added basic globbing support with * and ?. Currently only implemented for Script/Text, on nano and download terminal commands
* Enforcing the new types throughout the codebase, plus whatever rewrites happened along the way
* Server.textFiles is now a map
* TextFile no longer uses a fn property, now it is filename
* Added a shared ContentFile interface for shared functionality between TextFile and Script.
* related to ContentFile change above, the player is now allowed to move a text file to a script file and vice versa.
* File paths no longer conditionally start with slashes, and all directory names other than root have ending slashes. The player is still able to provide paths starting with / but this now indicates that the player is specifying an absolute path instead of one relative to root.
* Singularized the MessageFilename and LiteratureName enums
* Because they now only accept correct types, server.writeToXFile functions now always succeed (the only reasons they could fail before were invalid filepath).
* Fix several issues with tab completion, which included pretty much a complete rewrite
* Changed the autocomplete display options so there's less chance it clips outside the display area.
* Turned CompletedProgramName into an enum.
* Got rid of programsMetadata, and programs and DarkWebItems are now initialized immediately instead of relying on initializers called from the engine.
* For any executable (program, cct, or script file) pathing can be used directly to execute without using the run command (previously the command had to start with ./ and it wasn't actually using pathing).
2023-04-24 16:26:57 +02:00
|
|
|
Condition: () => Player.getHomeComputer().programs.includes(CompletedProgramName.bruteSsh),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
|
|
|
"FTPCRACK.EXE": {
|
2022-01-08 20:54:21 +01:00
|
|
|
...achievementData["FTPCRACK.EXE"],
|
|
|
|
Icon: "p1",
|
FILES: Path rework & typesafety (#479)
* Added new types for various file paths, all in the Paths folder.
* TypeSafety and other helper functions related to these types
* Added basic globbing support with * and ?. Currently only implemented for Script/Text, on nano and download terminal commands
* Enforcing the new types throughout the codebase, plus whatever rewrites happened along the way
* Server.textFiles is now a map
* TextFile no longer uses a fn property, now it is filename
* Added a shared ContentFile interface for shared functionality between TextFile and Script.
* related to ContentFile change above, the player is now allowed to move a text file to a script file and vice versa.
* File paths no longer conditionally start with slashes, and all directory names other than root have ending slashes. The player is still able to provide paths starting with / but this now indicates that the player is specifying an absolute path instead of one relative to root.
* Singularized the MessageFilename and LiteratureName enums
* Because they now only accept correct types, server.writeToXFile functions now always succeed (the only reasons they could fail before were invalid filepath).
* Fix several issues with tab completion, which included pretty much a complete rewrite
* Changed the autocomplete display options so there's less chance it clips outside the display area.
* Turned CompletedProgramName into an enum.
* Got rid of programsMetadata, and programs and DarkWebItems are now initialized immediately instead of relying on initializers called from the engine.
* For any executable (program, cct, or script file) pathing can be used directly to execute without using the run command (previously the command had to start with ./ and it wasn't actually using pathing).
2023-04-24 16:26:57 +02:00
|
|
|
Condition: () => Player.getHomeComputer().programs.includes(CompletedProgramName.ftpCrack),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
|
|
|
//-----------------------------------------------------
|
|
|
|
"RELAYSMTP.EXE": {
|
2022-01-08 20:54:21 +01:00
|
|
|
...achievementData["RELAYSMTP.EXE"],
|
|
|
|
Icon: "p2",
|
FILES: Path rework & typesafety (#479)
* Added new types for various file paths, all in the Paths folder.
* TypeSafety and other helper functions related to these types
* Added basic globbing support with * and ?. Currently only implemented for Script/Text, on nano and download terminal commands
* Enforcing the new types throughout the codebase, plus whatever rewrites happened along the way
* Server.textFiles is now a map
* TextFile no longer uses a fn property, now it is filename
* Added a shared ContentFile interface for shared functionality between TextFile and Script.
* related to ContentFile change above, the player is now allowed to move a text file to a script file and vice versa.
* File paths no longer conditionally start with slashes, and all directory names other than root have ending slashes. The player is still able to provide paths starting with / but this now indicates that the player is specifying an absolute path instead of one relative to root.
* Singularized the MessageFilename and LiteratureName enums
* Because they now only accept correct types, server.writeToXFile functions now always succeed (the only reasons they could fail before were invalid filepath).
* Fix several issues with tab completion, which included pretty much a complete rewrite
* Changed the autocomplete display options so there's less chance it clips outside the display area.
* Turned CompletedProgramName into an enum.
* Got rid of programsMetadata, and programs and DarkWebItems are now initialized immediately instead of relying on initializers called from the engine.
* For any executable (program, cct, or script file) pathing can be used directly to execute without using the run command (previously the command had to start with ./ and it wasn't actually using pathing).
2023-04-24 16:26:57 +02:00
|
|
|
Condition: () => Player.getHomeComputer().programs.includes(CompletedProgramName.relaySmtp),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
|
|
|
"HTTPWORM.EXE": {
|
2022-01-08 20:54:21 +01:00
|
|
|
...achievementData["HTTPWORM.EXE"],
|
|
|
|
Icon: "p3",
|
FILES: Path rework & typesafety (#479)
* Added new types for various file paths, all in the Paths folder.
* TypeSafety and other helper functions related to these types
* Added basic globbing support with * and ?. Currently only implemented for Script/Text, on nano and download terminal commands
* Enforcing the new types throughout the codebase, plus whatever rewrites happened along the way
* Server.textFiles is now a map
* TextFile no longer uses a fn property, now it is filename
* Added a shared ContentFile interface for shared functionality between TextFile and Script.
* related to ContentFile change above, the player is now allowed to move a text file to a script file and vice versa.
* File paths no longer conditionally start with slashes, and all directory names other than root have ending slashes. The player is still able to provide paths starting with / but this now indicates that the player is specifying an absolute path instead of one relative to root.
* Singularized the MessageFilename and LiteratureName enums
* Because they now only accept correct types, server.writeToXFile functions now always succeed (the only reasons they could fail before were invalid filepath).
* Fix several issues with tab completion, which included pretty much a complete rewrite
* Changed the autocomplete display options so there's less chance it clips outside the display area.
* Turned CompletedProgramName into an enum.
* Got rid of programsMetadata, and programs and DarkWebItems are now initialized immediately instead of relying on initializers called from the engine.
* For any executable (program, cct, or script file) pathing can be used directly to execute without using the run command (previously the command had to start with ./ and it wasn't actually using pathing).
2023-04-24 16:26:57 +02:00
|
|
|
Condition: () => Player.getHomeComputer().programs.includes(CompletedProgramName.httpWorm),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
|
|
|
"SQLINJECT.EXE": {
|
2022-01-08 20:54:21 +01:00
|
|
|
...achievementData["SQLINJECT.EXE"],
|
|
|
|
Icon: "p4",
|
FILES: Path rework & typesafety (#479)
* Added new types for various file paths, all in the Paths folder.
* TypeSafety and other helper functions related to these types
* Added basic globbing support with * and ?. Currently only implemented for Script/Text, on nano and download terminal commands
* Enforcing the new types throughout the codebase, plus whatever rewrites happened along the way
* Server.textFiles is now a map
* TextFile no longer uses a fn property, now it is filename
* Added a shared ContentFile interface for shared functionality between TextFile and Script.
* related to ContentFile change above, the player is now allowed to move a text file to a script file and vice versa.
* File paths no longer conditionally start with slashes, and all directory names other than root have ending slashes. The player is still able to provide paths starting with / but this now indicates that the player is specifying an absolute path instead of one relative to root.
* Singularized the MessageFilename and LiteratureName enums
* Because they now only accept correct types, server.writeToXFile functions now always succeed (the only reasons they could fail before were invalid filepath).
* Fix several issues with tab completion, which included pretty much a complete rewrite
* Changed the autocomplete display options so there's less chance it clips outside the display area.
* Turned CompletedProgramName into an enum.
* Got rid of programsMetadata, and programs and DarkWebItems are now initialized immediately instead of relying on initializers called from the engine.
* For any executable (program, cct, or script file) pathing can be used directly to execute without using the run command (previously the command had to start with ./ and it wasn't actually using pathing).
2023-04-24 16:26:57 +02:00
|
|
|
Condition: () => Player.getHomeComputer().programs.includes(CompletedProgramName.sqlInject),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
|
|
|
"FORMULAS.EXE": {
|
2022-01-08 20:54:21 +01:00
|
|
|
...achievementData["FORMULAS.EXE"],
|
|
|
|
Icon: "formulas",
|
FILES: Path rework & typesafety (#479)
* Added new types for various file paths, all in the Paths folder.
* TypeSafety and other helper functions related to these types
* Added basic globbing support with * and ?. Currently only implemented for Script/Text, on nano and download terminal commands
* Enforcing the new types throughout the codebase, plus whatever rewrites happened along the way
* Server.textFiles is now a map
* TextFile no longer uses a fn property, now it is filename
* Added a shared ContentFile interface for shared functionality between TextFile and Script.
* related to ContentFile change above, the player is now allowed to move a text file to a script file and vice versa.
* File paths no longer conditionally start with slashes, and all directory names other than root have ending slashes. The player is still able to provide paths starting with / but this now indicates that the player is specifying an absolute path instead of one relative to root.
* Singularized the MessageFilename and LiteratureName enums
* Because they now only accept correct types, server.writeToXFile functions now always succeed (the only reasons they could fail before were invalid filepath).
* Fix several issues with tab completion, which included pretty much a complete rewrite
* Changed the autocomplete display options so there's less chance it clips outside the display area.
* Turned CompletedProgramName into an enum.
* Got rid of programsMetadata, and programs and DarkWebItems are now initialized immediately instead of relying on initializers called from the engine.
* For any executable (program, cct, or script file) pathing can be used directly to execute without using the run command (previously the command had to start with ./ and it wasn't actually using pathing).
2023-04-24 16:26:57 +02:00
|
|
|
Condition: () => Player.getHomeComputer().programs.includes(CompletedProgramName.formulas),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2023-06-29 19:22:10 +02:00
|
|
|
...sfAchievements(),
|
2022-01-08 20:54:21 +01:00
|
|
|
MONEY_1Q: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.MONEY_1Q,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "$1Q",
|
|
|
|
Condition: () => Player.money >= 1e18,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
MONEY_M1B: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.MONEY_M1B,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "-1b",
|
2022-01-08 20:54:21 +01:00
|
|
|
Secret: true,
|
|
|
|
Condition: () => Player.money <= -1e9,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
INSTALL_1: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.INSTALL_1,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "install",
|
|
|
|
Condition: () => Player.augmentations.length >= 1,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
INSTALL_100: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.INSTALL_100,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "install_100",
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.augmentations.length >= 100,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
QUEUE_40: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.QUEUE_40,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "queue40",
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.queuedAugmentations.length >= 40,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
HACKING_100000: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.HACKING_100000,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "hack100000",
|
2022-07-27 05:54:17 +02:00
|
|
|
Condition: () => Player.skills.hacking >= 100000,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
COMBAT_3000: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.COMBAT_3000,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "combat3000",
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () =>
|
2022-07-27 05:54:17 +02:00
|
|
|
Player.skills.strength >= 3000 &&
|
|
|
|
Player.skills.defense >= 3000 &&
|
|
|
|
Player.skills.dexterity >= 3000 &&
|
|
|
|
Player.skills.agility >= 3000,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
NEUROFLUX_255: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.NEUROFLUX_255,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "nf255",
|
2023-06-12 06:34:20 +02:00
|
|
|
Condition: () => Player.augmentations.some((a) => a.name === AugmentationName.NeuroFluxGovernor && a.level >= 255),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
NS2: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.NS2,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "ns2",
|
2023-04-18 09:19:45 +02:00
|
|
|
Condition: () => [...Player.getHomeComputer().scripts.values()].some((s) => s.filename.endsWith(".js")),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
FROZE: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.FROZE,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "forze",
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => location.href.includes("noScripts"),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
RUNNING_SCRIPTS_1000: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.RUNNING_SCRIPTS_1000,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "run1000",
|
2023-04-28 00:21:06 +02:00
|
|
|
Condition: (): boolean => workerScripts.size >= 1000,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
DRAIN_SERVER: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.DRAIN_SERVER,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "drain",
|
|
|
|
Condition: (): boolean => {
|
|
|
|
for (const s of GetAllServers()) {
|
|
|
|
if (s instanceof Server) {
|
|
|
|
if (s.moneyMax > 0 && s.moneyAvailable === 0) return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
},
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
MAX_RAM: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.MAX_RAM,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "maxram",
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.getHomeComputer().maxRam === CONSTANTS.HomeComputerMaxRam,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
MAX_CORES: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.MAX_CORES,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "maxcores",
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.getHomeComputer().cpuCores === 8,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
SCRIPTS_30: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.SCRIPTS_30,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "folders",
|
2023-04-18 09:19:45 +02:00
|
|
|
Condition: () => Player.getHomeComputer().scripts.size >= 30,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
KARMA_1000000: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.KARMA_1000000,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "karma",
|
|
|
|
Secret: true,
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.karma <= -1e6,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
STOCK_1q: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.STOCK_1q,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "$1Q",
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.moneySourceB.stock >= 1e15,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
DISCOUNT: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.DISCOUNT,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "discount",
|
|
|
|
Condition: (): boolean => {
|
|
|
|
const p = GetServer("powerhouse-fitness");
|
|
|
|
if (!(p instanceof Server)) return false;
|
|
|
|
return p.backdoorInstalled;
|
|
|
|
},
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
SCRIPT_32GB: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.SCRIPT_32GB,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "bigcost",
|
2023-04-18 09:19:45 +02:00
|
|
|
Condition: () => [...Player.getHomeComputer().scripts.values()].some((s) => (s.ramUsage ?? 0) >= 32),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
FIRST_HACKNET_NODE: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.FIRST_HACKNET_NODE,
|
2022-01-10 00:03:00 +01:00
|
|
|
Icon: "node",
|
2022-09-06 15:07:12 +02:00
|
|
|
Condition: () => !hasHacknetServers() && Player.hacknetNodes.length > 0,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
|
|
|
"30_HACKNET_NODE": {
|
2022-01-08 20:54:21 +01:00
|
|
|
...achievementData["30_HACKNET_NODE"],
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "hacknet-all",
|
2022-09-06 15:07:12 +02:00
|
|
|
Condition: () => !hasHacknetServers() && Player.hacknetNodes.length >= 30,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
MAX_HACKNET_NODE: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.MAX_HACKNET_NODE,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "hacknet-max",
|
|
|
|
Condition: (): boolean => {
|
2022-09-06 15:07:12 +02:00
|
|
|
if (hasHacknetServers()) return false;
|
2022-01-06 13:04:03 +01:00
|
|
|
for (const h of Player.hacknetNodes) {
|
|
|
|
if (!(h instanceof HacknetNode)) return false;
|
|
|
|
if (
|
|
|
|
h.ram === HacknetNodeConstants.MaxRam &&
|
|
|
|
h.cores === HacknetNodeConstants.MaxCores &&
|
|
|
|
h.level === HacknetNodeConstants.MaxLevel
|
|
|
|
)
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
},
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
HACKNET_NODE_10M: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.HACKNET_NODE_10M,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "hacknet-10m",
|
2022-09-06 15:07:12 +02:00
|
|
|
Condition: () => !hasHacknetServers() && Player.moneySourceB.hacknet >= 10e6,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
REPUTATION_10M: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.REPUTATION_10M,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "reputation",
|
|
|
|
Condition: () => Object.values(Factions).some((f) => f.playerReputation >= 10e6),
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
DONATION: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.DONATION,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "donation",
|
2022-07-26 01:35:43 +02:00
|
|
|
Condition: () =>
|
|
|
|
Object.values(Factions).some(
|
2023-06-16 23:52:42 +02:00
|
|
|
(f) => f.favor >= Math.floor(CONSTANTS.BaseFavorToDonate * currentNodeMults.RepToDonateToFaction),
|
2022-07-26 01:35:43 +02:00
|
|
|
),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
TRAVEL: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.TRAVEL,
|
2022-01-16 03:27:27 +01:00
|
|
|
Icon: "TRAVEL",
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () => Player.city !== CityName.Sector12,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
WORKOUT: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.WORKOUT,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "WORKOUT",
|
2023-09-17 21:38:52 +02:00
|
|
|
Condition: () => isClassWork(Player.currentWork) && Player.currentWork.isGym(),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
TOR: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.TOR,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "TOR",
|
|
|
|
Condition: () => Player.hasTorRouter(),
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
HOSPITALIZED: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.HOSPITALIZED,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "OUCH",
|
|
|
|
Condition: () => Player.moneySourceB.hospitalization !== 0,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
GANG: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.GANG,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "GANG",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(2),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () => Player.gang !== null,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
FULL_GANG: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.FULL_GANG,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "GANGMAX",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(2),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () => Player.gang !== null && Player.gang.members.length === GangConstants.MaximumGangMembers,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
GANG_TERRITORY: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.GANG_TERRITORY,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "GANG100%",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(2),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () => Player.gang !== null && AllGangs[Player.gang.facName].territory >= 0.999,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
GANG_MEMBER_POWER: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.GANG_MEMBER_POWER,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "GANG10000",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(2),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () =>
|
|
|
|
Player.gang !== null &&
|
2022-01-08 20:54:21 +01:00
|
|
|
Player.gang.members.some(
|
|
|
|
(m) =>
|
|
|
|
m.hack >= 10000 || m.str >= 10000 || m.def >= 10000 || m.dex >= 10000 || m.agi >= 10000 || m.cha >= 10000,
|
|
|
|
),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CORPORATION: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CORPORATION,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "CORP",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(3),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () => Player.corporation !== null,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CORPORATION_BRIBE: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CORPORATION_BRIBE,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "CORPLOBBY",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(3),
|
2023-05-16 00:06:57 +02:00
|
|
|
Condition: () => !!Player.corporation && Player.corporation.unlocks.has(CorpUnlockName.GovernmentPartnership),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CORPORATION_PROD_1000: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CORPORATION_PROD_1000,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "CORP1000",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(3),
|
2023-05-16 00:06:57 +02:00
|
|
|
Condition: () => {
|
|
|
|
if (!Player.corporation) return false;
|
|
|
|
for (const division of Player.corporation.divisions.values()) {
|
|
|
|
if (division.productionMult >= 1000) return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
},
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CORPORATION_EMPLOYEE_3000: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CORPORATION_EMPLOYEE_3000,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "CORPCITY",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(3),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: (): boolean => {
|
2023-05-16 00:06:57 +02:00
|
|
|
if (!Player.corporation) return false;
|
|
|
|
for (const division of Player.corporation.divisions.values()) {
|
|
|
|
const totalEmployees = getRecordValues(division.offices).reduce((a, b) => a + b.numEmployees, 0);
|
2022-11-29 14:24:04 +01:00
|
|
|
if (totalEmployees >= 3000) return true;
|
2022-01-06 13:04:03 +01:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
},
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CORPORATION_REAL_ESTATE: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CORPORATION_REAL_ESTATE,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "CORPRE",
|
|
|
|
Name: "Own the land",
|
|
|
|
Description: "Expand to the Real Estate division.",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(3),
|
2023-05-16 00:06:57 +02:00
|
|
|
Condition: () => {
|
|
|
|
if (!Player.corporation) return false;
|
|
|
|
for (const division of Player.corporation.divisions.values()) {
|
|
|
|
if (division.type === IndustryType.RealEstate) return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
},
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
INTELLIGENCE_255: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.INTELLIGENCE_255,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "INT255",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(5),
|
2022-07-27 05:54:17 +02:00
|
|
|
Condition: () => Player.skills.intelligence >= 255,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
BLADEBURNER_DIVISION: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.BLADEBURNER_DIVISION,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "BLADE",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(6),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () => Player.bladeburner !== null,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
BLADEBURNER_OVERCLOCK: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.BLADEBURNER_OVERCLOCK,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "BLADEOVERCLOCK",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(6),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () =>
|
|
|
|
Player.bladeburner !== null &&
|
|
|
|
Player.bladeburner.skills[SkillNames.Overclock] === Skills[SkillNames.Overclock].maxLvl,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
BLADEBURNER_UNSPENT_100000: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.BLADEBURNER_UNSPENT_100000,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "BLADE100K",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(6),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () => Player.bladeburner !== null && Player.bladeburner.skillPoints >= 100000,
|
|
|
|
},
|
|
|
|
"4S": {
|
2022-01-08 20:54:21 +01:00
|
|
|
...achievementData["4S"],
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "4S",
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.has4SData,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
FIRST_HACKNET_SERVER: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.FIRST_HACKNET_SERVER,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "HASHNET",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(9),
|
2022-09-06 15:07:12 +02:00
|
|
|
Condition: () => hasHacknetServers() && Player.hacknetNodes.length > 0,
|
2022-01-11 19:41:08 +01:00
|
|
|
AdditionalUnlock: [achievementData.FIRST_HACKNET_NODE.ID],
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
ALL_HACKNET_SERVER: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.ALL_HACKNET_SERVER,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "HASHNETALL",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(9),
|
2022-09-06 15:07:12 +02:00
|
|
|
Condition: () => hasHacknetServers() && Player.hacknetNodes.length === HacknetServerConstants.MaxServers,
|
2022-01-11 19:41:08 +01:00
|
|
|
AdditionalUnlock: [achievementData["30_HACKNET_NODE"].ID],
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
MAX_HACKNET_SERVER: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.MAX_HACKNET_SERVER,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "HASHNETALL",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(9),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: (): boolean => {
|
2022-09-06 15:07:12 +02:00
|
|
|
if (!hasHacknetServers()) return false;
|
2022-01-06 13:04:03 +01:00
|
|
|
for (const h of Player.hacknetNodes) {
|
|
|
|
if (typeof h !== "string") return false;
|
|
|
|
const hs = GetServer(h);
|
|
|
|
if (!(hs instanceof HacknetServer)) return false;
|
|
|
|
if (
|
|
|
|
hs.maxRam === HacknetServerConstants.MaxRam &&
|
|
|
|
hs.cores === HacknetServerConstants.MaxCores &&
|
|
|
|
hs.level === HacknetServerConstants.MaxLevel &&
|
|
|
|
hs.cache === HacknetServerConstants.MaxCache
|
|
|
|
)
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
},
|
2022-01-11 19:41:08 +01:00
|
|
|
AdditionalUnlock: [achievementData.MAX_HACKNET_NODE.ID],
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
HACKNET_SERVER_1B: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.HACKNET_SERVER_1B,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "HASHNETMONEY",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(9),
|
2022-09-06 15:07:12 +02:00
|
|
|
Condition: () => hasHacknetServers() && Player.moneySourceB.hacknet >= 1e9,
|
2022-01-11 19:41:08 +01:00
|
|
|
AdditionalUnlock: [achievementData.HACKNET_NODE_10M.ID],
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
MAX_CACHE: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.MAX_CACHE,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "HASHNETCAP",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(9),
|
2022-03-16 19:39:23 +01:00
|
|
|
Condition: () =>
|
2022-09-06 15:07:12 +02:00
|
|
|
hasHacknetServers() &&
|
2022-01-16 17:20:15 +01:00
|
|
|
Player.hashManager.hashes === Player.hashManager.capacity &&
|
|
|
|
Player.hashManager.capacity > 0,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
SLEEVE_8: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.SLEEVE_8,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "SLEEVE8",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(10),
|
2022-03-21 04:27:53 +01:00
|
|
|
Condition: () => Player.sleeves.length === 8 && Player.sourceFileLvl(10) === 3,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
INDECISIVE: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.INDECISIVE,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "1H",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: knowsAboutBitverse,
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: (function () {
|
|
|
|
let c = 0;
|
|
|
|
setInterval(() => {
|
|
|
|
if (Router.page() === Page.BitVerse) {
|
|
|
|
c++;
|
|
|
|
} else {
|
|
|
|
c = 0;
|
|
|
|
}
|
|
|
|
}, 60 * 1000);
|
|
|
|
return () => c > 60;
|
|
|
|
})(),
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
FAST_BN: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.FAST_BN,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "2DAYS",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: knowsAboutBitverse,
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () => bitNodeFinishedState() && Player.playtimeSinceLastBitnode < 1000 * 60 * 60 * 24 * 2,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CHALLENGE_BN1: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CHALLENGE_BN1,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "BN1+",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: knowsAboutBitverse,
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () =>
|
|
|
|
Player.bitNodeN === 1 &&
|
|
|
|
bitNodeFinishedState() &&
|
|
|
|
Player.getHomeComputer().maxRam <= 128 &&
|
|
|
|
Player.getHomeComputer().cpuCores === 1,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CHALLENGE_BN2: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CHALLENGE_BN2,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "BN2+",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(2),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () => Player.bitNodeN === 2 && bitNodeFinishedState() && Player.gang === null,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CHALLENGE_BN3: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CHALLENGE_BN3,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "BN3+",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(3),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () => Player.bitNodeN === 3 && bitNodeFinishedState() && Player.corporation === null,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CHALLENGE_BN6: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CHALLENGE_BN6,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "BN6+",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(6),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () => Player.bitNodeN === 6 && bitNodeFinishedState() && Player.bladeburner === null,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CHALLENGE_BN7: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CHALLENGE_BN7,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "BN7+",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(7),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () => Player.bitNodeN === 7 && bitNodeFinishedState() && Player.bladeburner === null,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CHALLENGE_BN8: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CHALLENGE_BN8,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "BN8+",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(8),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () => Player.bitNodeN === 8 && bitNodeFinishedState() && !Player.has4SData && !Player.has4SDataTixApi,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CHALLENGE_BN9: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CHALLENGE_BN9,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "BN9+",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(9),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () =>
|
|
|
|
Player.bitNodeN === 9 &&
|
|
|
|
bitNodeFinishedState() &&
|
|
|
|
Player.moneySourceB.hacknet === 0 &&
|
|
|
|
Player.moneySourceB.hacknet_expenses === 0,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CHALLENGE_BN10: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CHALLENGE_BN10,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "BN10+",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(10),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () =>
|
|
|
|
Player.bitNodeN === 10 &&
|
|
|
|
bitNodeFinishedState() &&
|
|
|
|
!Player.sleeves.some(
|
|
|
|
(s) =>
|
|
|
|
s.augmentations.length > 0 ||
|
2022-07-27 05:54:17 +02:00
|
|
|
s.exp.hacking > 0 ||
|
|
|
|
s.exp.strength > 0 ||
|
|
|
|
s.exp.defense > 0 ||
|
|
|
|
s.exp.agility > 0 ||
|
|
|
|
s.exp.dexterity > 0 ||
|
|
|
|
s.exp.charisma > 0,
|
2022-01-06 13:04:03 +01:00
|
|
|
),
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CHALLENGE_BN12: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CHALLENGE_BN12,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "BN12+",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(12),
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.sourceFileLvl(12) >= 50,
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
BYPASS: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.BYPASS,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "SF-1",
|
|
|
|
Secret: true,
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.exploits.includes(Exploit.Bypass),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
PROTOTYPETAMPERING: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.PROTOTYPETAMPERING,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "SF-1",
|
|
|
|
Secret: true,
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.exploits.includes(Exploit.PrototypeTampering),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
UNCLICKABLE: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.UNCLICKABLE,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "SF-1",
|
|
|
|
Secret: true,
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.exploits.includes(Exploit.Unclickable),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
UNDOCUMENTEDFUNCTIONCALL: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.UNDOCUMENTEDFUNCTIONCALL,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "SF-1",
|
|
|
|
Secret: true,
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.exploits.includes(Exploit.UndocumentedFunctionCall),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
TIMECOMPRESSION: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.TIMECOMPRESSION,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "SF-1",
|
|
|
|
Secret: true,
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.exploits.includes(Exploit.TimeCompression),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
REALITYALTERATION: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.REALITYALTERATION,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "SF-1",
|
|
|
|
Secret: true,
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.exploits.includes(Exploit.RealityAlteration),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
N00DLES: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.N00DLES,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "SF-1",
|
|
|
|
Secret: true,
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.exploits.includes(Exploit.N00dles),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
EDITSAVEFILE: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.EDITSAVEFILE,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "SF-1",
|
|
|
|
Secret: true,
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.exploits.includes(Exploit.EditSaveFile),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
UNACHIEVABLE: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.UNACHIEVABLE,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "SF-1",
|
|
|
|
Secret: true,
|
|
|
|
// Hey Players! Yes, you're supposed to modify this to get the achievement!
|
|
|
|
Condition: () => false,
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
CHALLENGE_BN13: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.CHALLENGE_BN13,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "BN13+",
|
2023-06-29 19:22:10 +02:00
|
|
|
Visible: () => hasAccessToSF(13),
|
2022-01-06 13:04:03 +01:00
|
|
|
Condition: () =>
|
|
|
|
Player.bitNodeN === 13 &&
|
|
|
|
bitNodeFinishedState() &&
|
2023-06-12 06:34:20 +02:00
|
|
|
!Player.augmentations.some((a) => a.name === AugmentationName.StaneksGift1),
|
2022-01-06 13:04:03 +01:00
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
DEVMENU: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.DEVMENU,
|
2022-01-06 13:04:03 +01:00
|
|
|
Icon: "SF-1",
|
2022-01-13 18:22:43 +01:00
|
|
|
Secret: true,
|
2022-01-08 20:54:21 +01:00
|
|
|
Condition: () => Player.exploits.includes(Exploit.YoureNotMeantToAccessThis),
|
|
|
|
},
|
2022-03-16 19:39:23 +01:00
|
|
|
RAINBOW: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.RAINBOW,
|
2022-03-16 19:39:23 +01:00
|
|
|
Icon: "SF-1",
|
|
|
|
Secret: true,
|
|
|
|
Condition: () => Player.exploits.includes(Exploit.INeedARainbow),
|
|
|
|
},
|
|
|
|
TRUE_RECURSION: {
|
2023-05-05 09:55:59 +02:00
|
|
|
...achievementData.TRUE_RECURSION,
|
2022-03-16 19:39:23 +01:00
|
|
|
Icon: "SF-1",
|
|
|
|
Secret: true,
|
|
|
|
Condition: () => Player.exploits.includes(Exploit.TrueRecursion),
|
|
|
|
},
|
2022-01-08 20:54:21 +01:00
|
|
|
};
|
2022-01-06 13:04:03 +01:00
|
|
|
|
2022-01-08 20:54:21 +01:00
|
|
|
// Steam has a limit of 100 achievement. So these were planned but commented for now.
|
2022-03-19 09:09:59 +01:00
|
|
|
// { ID: FactionNames.ECorp.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.ECorp) },
|
|
|
|
// { ID: FactionNames.MegaCorp.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.MegaCorp) },
|
|
|
|
// { ID: "BACHMAN_&_ASSOCIATES", Condition: () => Player.factions.includes(FactionNames.BachmanAssociates) },
|
|
|
|
// { ID: "BLADE_INDUSTRIES", Condition: () => Player.factions.includes(FactionNames.BladeIndustries) },
|
|
|
|
// { ID: FactionNames.NWO.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.NWO) },
|
|
|
|
// { ID: "CLARKE_INCORPORATED", Condition: () => Player.factions.includes(FactionNames.ClarkeIncorporated) },
|
|
|
|
// { ID: "OMNITEK_INCORPORATED", Condition: () => Player.factions.includes(FactionNames.OmniTekIncorporated) },
|
|
|
|
// { ID: "FOUR_SIGMA", Condition: () => Player.factions.includes(FactionNames.FourSigma) },
|
|
|
|
// { ID: "KUAIGONG_INTERNATIONAL", Condition: () => Player.factions.includes(FactionNames.KuaiGongInternational) },
|
|
|
|
// { ID: "FULCRUM_SECRET_TECHNOLOGIES", Condition: () => Player.factions.includes(FactionNames.FulcrumSecretTechnologies) },
|
|
|
|
// { ID: FactionNames.Aevum.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Aevum) },
|
|
|
|
// { ID: FactionNames.Chongqing.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Chongqing) },
|
|
|
|
// { ID: FactionNames.Ishima.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Ishima) },
|
|
|
|
// { ID: "NEW_TOKYO", Condition: () => Player.factions.includes(FactionNames.NewTokyo) },
|
|
|
|
// { ID: "SECTOR-12", Condition: () => Player.factions.includes(FactionNames.Sector12) },
|
|
|
|
// { ID: FactionNames.Volhaven.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Volhaven) },
|
|
|
|
// { ID: "SPEAKERS_FOR_THE_DEAD", Condition: () => Player.factions.includes(FactionNames.SpeakersForTheDead) },
|
|
|
|
// { ID: "THE_DARK_ARMY", Condition: () => Player.factions.includes(FactionNames.TheDarkArmy) },
|
|
|
|
// { ID: "THE_SYNDICATE", Condition: () => Player.factions.includes(FactionNames.TheSyndicate) },
|
|
|
|
// { ID: FactionNames.Silhouette.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Silhouette) },
|
|
|
|
// { ID: FactionNames.Tetrads.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Tetrads) },
|
|
|
|
// { ID: "SLUM_SNAKES", Condition: () => Player.factions.includes(FactionNames.SlumSnakes) },
|
|
|
|
// { ID: FactionNames.Netburners.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Netburners) },
|
|
|
|
// { ID: "TIAN_DI_HUI", Condition: () => Player.factions.includes(FactionNames.TianDiHui) },
|
|
|
|
// { ID: FactionNames.Bladeburners.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Bladeburners) },
|
2022-01-08 20:54:21 +01:00
|
|
|
// { ID: "DEEPSCANV1.EXE", Condition: () => Player.getHomeComputer().programs.includes(Programs.DeepscanV1.name) },
|
|
|
|
// { ID: "DEEPSCANV2.EXE", Condition: () => Player.getHomeComputer().programs.includes(Programs.DeepscanV2.name) },
|
2022-03-29 16:43:28 +02:00
|
|
|
// { ID: "INFILTRATORS", Condition: () => Player.factions.includes(FactionNames.Infiltrators) },
|
2022-01-08 20:54:21 +01:00
|
|
|
// {
|
|
|
|
// ID: "SERVERPROFILER.EXE",
|
|
|
|
// Condition: () => Player.getHomeComputer().programs.includes(Programs.ServerProfiler.name),
|
|
|
|
// },
|
|
|
|
// { ID: "AUTOLINK.EXE", Condition: () => Player.getHomeComputer().programs.includes(Programs.AutoLink.name) },
|
|
|
|
// { ID: "FLIGHT.EXE", Condition: () => Player.getHomeComputer().programs.includes(Programs.Flight.name) },
|
2022-01-06 13:04:03 +01:00
|
|
|
|
|
|
|
export function calculateAchievements(): void {
|
|
|
|
const playerAchievements = Player.achievements.map((a) => a.ID);
|
|
|
|
|
2022-01-11 18:42:20 +01:00
|
|
|
const missingAchievements = Object.values(achievements)
|
|
|
|
.filter((a) => !playerAchievements.includes(a.ID) && a.Condition())
|
2022-01-11 19:41:08 +01:00
|
|
|
// callback returns array of achievement id and id of any in the additional list, flatmap means we have only a 1D array
|
|
|
|
.flatMap((a) => [a.ID, ...(a.AdditionalUnlock || [])]);
|
2022-01-11 18:42:20 +01:00
|
|
|
|
|
|
|
for (const id of missingAchievements) {
|
2022-01-06 13:04:03 +01:00
|
|
|
Player.giveAchievement(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Write all player's achievements to document for Steam/Electron
|
|
|
|
// This could be replaced by "availableAchievements"
|
|
|
|
// if we don't want to grant the save game achievements to steam but only currently available
|
2022-04-19 02:47:33 +02:00
|
|
|
document.achievements = [...Player.achievements.map((a) => a.ID)];
|
2022-01-06 13:04:03 +01:00
|
|
|
}
|