From 753a1f1193c1bac2f954bbf193b74ff9fe823e05 Mon Sep 17 00:00:00 2001 From: Sergei Kozelko Date: Fri, 12 Mar 2021 16:35:15 +0300 Subject: [PATCH 01/16] Fix AutoLink.exe substitution in "Getting started" --- .../guidesandtips/gettingstartedguideforbeginnerprogrammers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/guidesandtips/gettingstartedguideforbeginnerprogrammers.rst b/doc/source/guidesandtips/gettingstartedguideforbeginnerprogrammers.rst index b2a1df285..2e3641851 100644 --- a/doc/source/guidesandtips/gettingstartedguideforbeginnerprogrammers.rst +++ b/doc/source/guidesandtips/gettingstartedguideforbeginnerprogrammers.rst @@ -860,7 +860,7 @@ Random Tips .. Substitution definitions .. |Alpha Enterprises| replace:: :code:`Alpha Enterprises` .. |Augmentations tab| replace:: :code:`Augmentations` tab -.. |AutoLink| replace:: :code:`NUKE.exe` +.. |AutoLink| replace:: :code:`AutoLink.exe` .. |BruteSSH| replace:: :code:`BruteSSH.exe` .. |City tab| replace:: :code:`City` tab .. |CyberSec| replace:: :code:`CyberSec` From 6c0b5b3ed9b6337a140e392db5f80996ffa08865 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sun, 14 Mar 2021 01:08:24 -0500 Subject: [PATCH 02/16] Converting random pieces of code to ts --- src/Corporation/Corporation.jsx | 21 +- src/DarkWeb/{DarkWeb.js => DarkWeb.ts} | 10 +- src/InteractiveTutorial.js | 5 +- src/Literature/Literature.ts | 15 + src/Literature/LiteratureHelpers.ts | 9 + .../Literatures.ts} | 77 ++-- src/Literature/data/LiteratureNames.ts | 25 ++ src/NetscriptFunctions.js | 1 - src/NetscriptGang.js | 8 - src/NetscriptPort.js | 51 --- src/NetscriptPort.ts | 51 +++ src/Perk.js | 155 -------- src/PersonObjects/IPlayer.ts | 1 + src/Prestige.js | 4 +- src/Server/ServerHelpers.ts | 3 +- src/Server/SpecialServerIps.ts | 4 + src/Server/data/servers.ts | 81 ++-- src/Terminal.js | 2 +- src/engine.jsx | 3 - src/tags | 360 ------------------ src/tags.idx | Bin 440 -> 0 bytes 21 files changed, 198 insertions(+), 688 deletions(-) rename src/DarkWeb/{DarkWeb.js => DarkWeb.ts} (90%) create mode 100644 src/Literature/Literature.ts create mode 100644 src/Literature/LiteratureHelpers.ts rename src/{Literature.js => Literature/Literatures.ts} (96%) create mode 100644 src/Literature/data/LiteratureNames.ts delete mode 100644 src/NetscriptGang.js delete mode 100644 src/NetscriptPort.js create mode 100644 src/NetscriptPort.ts delete mode 100644 src/Perk.js delete mode 100644 src/tags delete mode 100644 src/tags.idx diff --git a/src/Corporation/Corporation.jsx b/src/Corporation/Corporation.jsx index b19b8fea4..08403439a 100644 --- a/src/Corporation/Corporation.jsx +++ b/src/Corporation/Corporation.jsx @@ -17,7 +17,8 @@ import { Warehouse } from "./Warehouse"; import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; import { CONSTANTS } from "../Constants"; import { Factions } from "../Faction/Factions"; -import { showLiterature } from "../Literature"; +import { showLiterature } from "../Literature/LiteratureHelpers"; +import { LiteratureNames } from "../Literature/data/LiteratureNames"; import { createCityMap } from "../Locations/Cities"; import { CityName } from "../Locations/data/CityNames"; import { Player } from "../Player"; @@ -1795,7 +1796,7 @@ OfficeSpace.prototype.findEmployees = function(parentRefs) { "Creativity: " + formatNumber(employee.cre, 1) + "
" + "Efficiency: " + formatNumber(employee.eff, 1) + "
" + "Salary: " + numeralWrapper.format(employee.sal, '$0.000a') + " \ s
", - clickListener:()=>{ + clickListener:() => { office.hireEmployee(employee, parentRefs); removeElementById("cmpy-mgmt-hire-employee-popup"); return false; @@ -1808,7 +1809,7 @@ OfficeSpace.prototype.findEmployees = function(parentRefs) { class:"a-link-button", innerText:"Cancel", float:"right", - clickListener:()=>{ + clickListener:() => { removeElementById("cmpy-mgmt-hire-employee-popup"); return false; } @@ -1842,7 +1843,7 @@ OfficeSpace.prototype.hireEmployee = function(employee, parentRefs) { company.rerender(); return yesNoTxtInpBoxClose(); }); - noBtn.addEventListener("click", ()=>{ + noBtn.addEventListener("click", () => { return yesNoTxtInpBoxClose(); }); yesNoTxtInpBoxCreate("Give your employee a nickname!"); @@ -2075,14 +2076,14 @@ Corporation.prototype.getInvestment = function() { noBtn = yesNoBoxGetNoButton(); yesBtn.innerHTML = "Accept"; noBtn.innerHML = "Reject"; - yesBtn.addEventListener("click", ()=>{ + yesBtn.addEventListener("click", () => { ++this.fundingRound; this.funds = this.funds.plus(funding); this.numShares -= investShares; this.rerender(); return yesNoBoxClose(); }); - noBtn.addEventListener("click", ()=>{ + noBtn.addEventListener("click", () => { return yesNoBoxClose(); }); yesNoBoxCreate("An investment firm has offered you " + numeralWrapper.format(funding, '$0.000a') + @@ -2107,7 +2108,7 @@ Corporation.prototype.goPublic = function() { var input = createElement("input", { type:"number", placeholder: "Shares to issue", - onkeyup:(e)=>{ + onkeyup:(e) => { e.preventDefault(); if (e.keyCode === KEY.ENTER) {yesBtn.click();} } @@ -2116,7 +2117,7 @@ Corporation.prototype.goPublic = function() { yesBtn = createElement("a", { class:"a-link-button", innerText:"Go Public", - clickListener:()=>{ + clickListener:() => { var numShares = Math.round(input.value); var initialSharePrice = this.determineValuation() / (this.totalShares); if (isNaN(numShares)) { @@ -2142,7 +2143,7 @@ Corporation.prototype.goPublic = function() { var noBtn = createElement("a", { class:"a-link-button", innerText:"Cancel", - clickListener:()=>{ + clickListener:() => { removeElementById(goPublicPopupId); return false; } @@ -2330,7 +2331,7 @@ Corporation.prototype.getStarterGuide = function() { // Check if player already has Corporation Handbook let homeComp = Player.getHomeComputer(), hasHandbook = false, - handbookFn = "corporation-management-handbook.lit"; + handbookFn = LiteratureNames.CorporationManagementHandbook; for (let i = 0; i < homeComp.messages.length; ++i) { if (isString(homeComp.messages[i]) && homeComp.messages[i] === handbookFn) { hasHandbook = true; diff --git a/src/DarkWeb/DarkWeb.js b/src/DarkWeb/DarkWeb.ts similarity index 90% rename from src/DarkWeb/DarkWeb.js rename to src/DarkWeb/DarkWeb.ts index b8a5cdf89..c0c301cf8 100644 --- a/src/DarkWeb/DarkWeb.js +++ b/src/DarkWeb/DarkWeb.ts @@ -8,14 +8,14 @@ import { isValidIPAddress } from "../../utils/helpers/isVali import { formatNumber } from "../../utils/StringHelperFunctions"; //Posts a "help" message if connected to DarkWeb -export function checkIfConnectedToDarkweb() { +export function checkIfConnectedToDarkweb(): void { if (SpecialServerIps.hasOwnProperty("Darkweb Server")) { - var darkwebIp = SpecialServerIps["Darkweb Server"]; + const darkwebIp = SpecialServerIps.getIp("Darkweb Server"); if (!isValidIPAddress(darkwebIp)) {return;} if (darkwebIp == Player.getCurrentServer().ip) { post("You are now connected to the dark web. From the dark web you can purchase illegal items. " + "Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] " + - "to purchase an item"); + "to purchase an item."); } } } @@ -23,7 +23,7 @@ export function checkIfConnectedToDarkweb() { //Handler for dark web commands. The terminal's executeCommand() function will pass //dark web-specific commands into this. It will pass in the raw split command array //rather than the command string -export function executeDarkwebTerminalCommand(commandArray) { +export function executeDarkwebTerminalCommand(commandArray: string[]): void { if (commandArray.length == 0) {return;} switch (commandArray[0]) { case "buy": @@ -53,7 +53,7 @@ function listAllDarkwebItems() { } } -function buyDarkwebItem(itemName) { +function buyDarkwebItem(itemName: string): void { itemName = itemName.toLowerCase(); // find the program that matches, if any diff --git a/src/InteractiveTutorial.js b/src/InteractiveTutorial.js index 979d19227..064bcefd0 100644 --- a/src/InteractiveTutorial.js +++ b/src/InteractiveTutorial.js @@ -3,6 +3,7 @@ import { Player } from "./Player"; import { Settings } from "./Settings/Settings"; import { initializeMainMenuLinks } from "./ui/MainMenu/Links"; +import { LiteratureNames } from "./Literature/data/LiteratureNames"; import { exceptionAlert } from "../utils/helpers/exceptionAlert"; import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners"; @@ -499,7 +500,7 @@ function iTutorialEnd() { "Getting Started Guide" + "Documentation

" + "The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. " + - "To read it, go to Terminal and enter

cat hackers-starting-handbook.lit" + "To read it, go to Terminal and enter

cat " + LiteratureNames.HackersStartingHandbook }); var gotitBtn = createElement("a", { class:"a-link-button", float:"right", padding:"6px", innerText:"Got it!", @@ -509,7 +510,7 @@ function iTutorialEnd() { }); createPopup(popupId, [txt, gotitBtn]); - Player.getHomeComputer().messages.push("hackers-starting-handbook.lit"); + Player.getHomeComputer().messages.push(LiteratureNames.HackersStartingHandbook); } function iTutorialSetText(txt) { diff --git a/src/Literature/Literature.ts b/src/Literature/Literature.ts new file mode 100644 index 000000000..f86f96e75 --- /dev/null +++ b/src/Literature/Literature.ts @@ -0,0 +1,15 @@ +/** + * Lore / world building literature files that can be found on servers. + * These files can be read by the player + */ +export class Literature { + title: string; + fn: string; + txt: string; + + constructor(title: string, filename: string, txt: string) { + this.title = title; + this.fn = filename; + this.txt = txt; + } +} \ No newline at end of file diff --git a/src/Literature/LiteratureHelpers.ts b/src/Literature/LiteratureHelpers.ts new file mode 100644 index 000000000..43cefdc72 --- /dev/null +++ b/src/Literature/LiteratureHelpers.ts @@ -0,0 +1,9 @@ +import { Literatures } from "./Literatures"; +import { dialogBoxCreate } from "../../utils/DialogBox"; + +export function showLiterature(fn: string): void { + const litObj = Literatures[fn]; + if (litObj == null) { return; } + const txt = `${litObj.title}

${litObj.txt}`; + dialogBoxCreate(txt); +} diff --git a/src/Literature.js b/src/Literature/Literatures.ts similarity index 96% rename from src/Literature.js rename to src/Literature/Literatures.ts index f5354a1e2..ed54e66bd 100644 --- a/src/Literature.js +++ b/src/Literature/Literatures.ts @@ -1,28 +1,13 @@ -/** - * Lore / world building literature files that can be found on servers. - * These files can be read by the player - */ -import { dialogBoxCreate } from "../utils/DialogBox"; +import { Literature } from "./Literature"; +import { LiteratureNames } from "./data/LiteratureNames"; +import { IMap } from "../types"; -function Literature(title, filename, txt) { - this.title = title; - this.fn = filename; - this.txt = txt; -} +export const Literatures: IMap = {}; -function showLiterature(fn) { - const litObj = Literatures[fn]; - if (litObj == null) { return; } - const txt = `${litObj.title}

${litObj.txt}`; - dialogBoxCreate(txt); -} - -let Literatures = {} - -function initLiterature() { - var title, fn, txt; +(function () { + let title, fn, txt; title = "The Beginner's Guide to Hacking"; - fn = "hackers-starting-handbook.lit"; + fn = LiteratureNames.HackersStartingHandbook; txt = "Some resources:

" + "Learn to Program

" + "For Experienced JavaScript Developers: NetscriptJS

" + @@ -44,7 +29,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "The Complete Handbook for Creating a Successful Corporation"; - fn = "corporation-management-handbook.lit"; + fn = LiteratureNames.CorporationManagementHandbook; txt = "Getting Started with Corporations
" + "To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires " + "$150b of your own money, but this $150b will get put into your Corporation's funds. " + @@ -94,7 +79,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "A Brief History of Synthoids"; - fn = "history-of-synthoids.lit"; + fn = LiteratureNames.HistoryOfSynthoids; txt = "Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, " + "are composed entirely of organic substances. For this reason, Synthoids are virtually identical to " + "humans in form, composition, and appearance.

" + @@ -134,7 +119,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "A Green Tomorrow"; - fn = "A-Green-Tomorrow.lit"; + fn = LiteratureNames.AGreenTomorrow; txt = "Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to " + "combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 " + "a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that " + @@ -156,7 +141,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "Alpha and Omega"; - fn = "alpha-omega.lit"; + fn = LiteratureNames.AlphaOmega; txt = "Then we saw a new heaven and a new earth, for our first heaven and earth had gone away, and our sea was no more. " + "And we saw a new holy city, new Aeria, coming down out of this new heaven, prepared as a bride adorned for her husband. " + "And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they " + @@ -173,7 +158,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "Are We Living in a Computer Simulation?"; - fn = "simulated-reality.lit"; + fn = LiteratureNames.SimulatedReality; txt = "The idea that we are living in a virtual world is not new. It's a trope that has " + "been explored constantly in literature and pop culture. However, it is also a legitimate " + "scientific hypothesis that many notable physicists and philosophers have debated for years.

" + @@ -191,7 +176,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "Beyond Man"; - fn = "beyond-man.lit"; + fn = LiteratureNames.BeyondMan; txt = "Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against " + "human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, " + "arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that " + @@ -208,7 +193,7 @@ function initLiterature() { title = "Brighter than the Sun"; - fn = "brighter-than-the-sun.lit"; + fn = LiteratureNames.BrighterThanTheSun; txt = "When people think about the corporations that dominate the East, they typically think of KuaiGong International, which " + "holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest " + "drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company " + @@ -231,7 +216,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "Democracy is Dead: The Fall of an Empire"; - fn = "democracy-is-dead.lit"; + fn = LiteratureNames.DemocracyIsDead; txt = "They rose from the shadows in the street
From the places where the oppressed meet
" + "Their cries echoed loudly through the air
As they once did in Tiananmen Square
" + "Loudness in the silence, Darkness in the light
They came forth with power and might
" + @@ -244,7 +229,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "Figures Show Rising Crime Rates in Sector-12"; - fn = "sector-12-crime.lit"; + fn = LiteratureNames.Sector12Crime; txt = "A recent study by analytics company Wilson Inc. shows a significant rise " + "in criminal activity in Sector-12. Perhaps the most alarming part of the statistic " + "is that most of the rise is in violent crime such as homicide and assault. According " + @@ -258,7 +243,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "Man and the Machine"; - fn = "man-and-machine.lit"; + fn = LiteratureNames.ManAndMachine; txt = "In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate " + "of technological advancement would continue to accelerate faster and faster until one day " + "machines would be become infinitely more intelligent than humans. This point, called the " + @@ -276,7 +261,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "Secret Societies"; - fn = "secret-societies.lit"; + fn = LiteratureNames.SecretSocieties; txt = "The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and " + "distrust. People have long wondered about who these secret society members are and what they do, with the " + "most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world " + @@ -294,7 +279,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "Space: The Failed Frontier"; - fn = "the-failed-frontier.lit"; + fn = LiteratureNames.TheFailedFrontier; txt = "Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore " + "the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, " + "we pushed the boundaries of our scientific limits, and then pushed further. Space exploration " + @@ -311,7 +296,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "Coded Intelligence: Myth or Reality?"; - fn = "coded-intelligence.lit"; + fn = LiteratureNames.CodedIntelligence; txt = "Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. " + "Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. " + "Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has " + @@ -327,7 +312,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "Synthetic Muscles"; - fn = "synthetic-muscles.lit"; + fn = LiteratureNames.SyntheticMuscles; txt = "Initial versions of synthetic muscles weren't made of anything organic but were actually " + "crude devices made to mimic human muscle function. Some of the early iterations were actually made of " + "common materials such as fishing lines and sewing threads due to their high strength for " + @@ -340,7 +325,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "Tensions rise in global tech race"; - fn = "tensions-in-tech-race.lit"; + fn = LiteratureNames.TensionsInTechRace; txt = "Have we entered a new Cold War? Is WWIII just beyond the horizon?

" + "After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, " + "geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. " + @@ -354,7 +339,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "The Cost of Immortality"; - fn = "cost-of-immortality.lit"; + fn = LiteratureNames.CostOfImmortality; txt = "Evolution and advances in medical and augmentation technology has lead to drastic improvements " + "in human mortality rates. Recent figures show that the life expectancy for humans " + "that live in a first-world country is about 130 years of age, almost double of what it was " + @@ -378,7 +363,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "The Hidden World"; - fn = "the-hidden-world.lit"; + fn = LiteratureNames.TheHiddenWorld; txt = "WAKE UP SHEEPLE

" + "THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

" + "THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!

" + @@ -396,7 +381,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "The New God"; - fn = "the-new-god.lit"; + fn = LiteratureNames.TheNewGod; txt = "Everyone has that moment in their life where they wonder about the bigger questions

" + "What's the point of all of this? What is my purpose?

" + "Some people dare to think even bigger

" + @@ -409,7 +394,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "The New Triads"; - fn = "new-triads.lit"; + fn = LiteratureNames.NewTriads; txt = "The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian " + "territories. They were often considered one of the first and biggest criminal secret societies. " + "While most of the branches of the Triads have been destroyed over the past few decades, the " + @@ -427,13 +412,7 @@ function initLiterature() { Literatures[fn] = new Literature(title, fn, txt); title = "The Secret War"; - fn = "the-secret-war.lit"; + fn = LiteratureNames.TheSecretWar; txt = "" Literatures[fn] = new Literature(title, fn, txt); -} - -export { - Literatures, - initLiterature, - showLiterature -}; +})() \ No newline at end of file diff --git a/src/Literature/data/LiteratureNames.ts b/src/Literature/data/LiteratureNames.ts new file mode 100644 index 000000000..462afb4f1 --- /dev/null +++ b/src/Literature/data/LiteratureNames.ts @@ -0,0 +1,25 @@ +import { IMap } from "../../types"; + +export const LiteratureNames: IMap = { + HackersStartingHandbook: "hackers-starting-handbook.lit", + CorporationManagementHandbook: "corporation-management-handbook.lit", + HistoryOfSynthoids: "history-of-synthoids.lit", + AGreenTomorrow: "A-Green-Tomorrow.lit", + AlphaOmega: "alpha-omega.lit", + SimulatedReality: "simulated-reality.lit", + BeyondMan: "beyond-man.lit", + BrighterThanTheSun: "brighter-than-the-sun.lit", + DemocracyIsDead: "democracy-is-dead.lit", + Sector12Crime: "sector-12-crime.lit", + ManAndMachine: "man-and-machine.lit", + SecretSocieties: "secret-societies.lit", + TheFailedFrontier: "the-failed-frontier.lit", + CodedIntelligence: "coded-intelligence.lit", + SyntheticMuscles: "synthetic-muscles.lit", + TensionsInTechRace: "tensions-in-tech-race.lit", + CostOfImmortality: "cost-of-immortality.lit", + TheHiddenWorld: "the-hidden-world.lit", + TheNewGod: "the-new-god.lit", + NewTriads: "new-triads.lit", + TheSecretWar: "the-secret-war.lit", +}; \ No newline at end of file diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index eb1633e52..257eb4fcf 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -128,7 +128,6 @@ import { TextFile, getTextFile, createTextFile } from "./TextFile"; import { unknownBladeburnerActionErrorMessage } from"./NetscriptBladeburner"; -import * as nsGang from "./NetscriptGang"; import { Gang } from "./Gang"; import { NetscriptPorts, diff --git a/src/NetscriptGang.js b/src/NetscriptGang.js deleted file mode 100644 index d592ff251..000000000 --- a/src/NetscriptGang.js +++ /dev/null @@ -1,8 +0,0 @@ -import { Player } from "./Player"; -import { Gang } from "./Gang"; -import { makeRuntimeRejectMsg } from "./NetscriptEvaluator"; - -export function unknownGangApiExceptionMessage(functionName, err) { - return `gang.${functionName}() failed with exception: ` + err; -} - diff --git a/src/NetscriptPort.js b/src/NetscriptPort.js deleted file mode 100644 index df5fa842d..000000000 --- a/src/NetscriptPort.js +++ /dev/null @@ -1,51 +0,0 @@ -import { Settings } from "./Settings/Settings"; - -function NetscriptPort() { - this.data = []; -} - -NetscriptPort.prototype.write = function(data) { - this.data.push(data); - if (this.data.length > Settings.MaxPortCapacity) { - return this.data.shift(); - } - return null; -} - -NetscriptPort.prototype.tryWrite = function(data) { - if (this.data.length >= Settings.MaxPortCapacity) { - return false; - } - this.data.push(data); - return true; -} - -NetscriptPort.prototype.read = function() { - if (this.data.length === 0) { - return "NULL PORT DATA"; - } - return this.data.shift(); -} - -NetscriptPort.prototype.peek = function() { - if (this.data.length === 0) { - return "NULL PORT DATA"; - } else { - var foo = this.data.slice(); - return foo[0]; - } -} - -NetscriptPort.prototype.full = function() { - return this.data.length == Settings.MaxPortCapacity; -} - -NetscriptPort.prototype.empty = function() { - return this.data.length === 0; -} - -NetscriptPort.prototype.clear = function() { - this.data.length = 0; -} - -export {NetscriptPort}; diff --git a/src/NetscriptPort.ts b/src/NetscriptPort.ts new file mode 100644 index 000000000..d9c5ea2a7 --- /dev/null +++ b/src/NetscriptPort.ts @@ -0,0 +1,51 @@ +import { Settings } from "./Settings/Settings"; + +export class NetscriptPort { + data: any[] = []; + + constructor() {} + + write(data: any): any { + this.data.push(data); + if (this.data.length > Settings.MaxPortCapacity) { + return this.data.shift(); + } + return null; + } + + tryWrite(data: any): boolean { + if (this.data.length >= Settings.MaxPortCapacity) { + return false; + } + this.data.push(data); + return true; + } + + read(): any { + if (this.data.length === 0) { + return "NULL PORT DATA"; + } + return this.data.shift(); + } + + peek(): any { + if (this.data.length === 0) { + return "NULL PORT DATA"; + } else { + var foo = this.data.slice(); + return foo[0]; + } + } + + full(): boolean { + return this.data.length == Settings.MaxPortCapacity; + } + + empty(): boolean { + return this.data.length === 0; + } + + clear(): void { + this.data.length = 0; + } +} diff --git a/src/Perk.js b/src/Perk.js deleted file mode 100644 index 54685a335..000000000 --- a/src/Perk.js +++ /dev/null @@ -1,155 +0,0 @@ -/* Perks - * Defines Perks that are unlocked when you gain enough reputation in a - * company or faction - */ -PerkNames = { - FreeCoffeeCompanyPerk: "Free Coffee", - FreeFoodCompanyPerk: "Free Food", - NetworkingCompanyPerk: "Networking", - PersonalTrainerCompanyPerk: "Personal Trainer", - KnowledgeBaseCompanyPerk: "Company Knowledge Base", - NootropicsCompanyPerk: "Company-provided Nootropics", - - NetworkingFactionPerk: "Networking", - SupercomputerFactionPerk: "Remote Supercomputer Use", - VPNFactionPerk: "High-Speed VPN", - PrivateServerFactionPerk: "Private Faction Server", - InsiderKnowledgeFactionPerk: "Insider Knowledge", -} - -PerkInfo = { - FreeCoffee: "Your company provides free coffee, improving your focus " + - "and productivity", - FreeFood: "Your company provides free healthy and nutritious food", - NetworkingCompany: "Working at this company provides many opportunities to " + - "build your professional network!", - PersonalTrainer: "Your company provides a free personal trainer to help you train", - KnowledgeBase: "The company has a comprehensive knowledge base that " + - "you can use to learn", - Nootropics: "Your company provides free nootropics, cognitive-enhancing drugs", - NetworkingFaction: "Being a member of this faction provides many opportunities to " + - "build your network of contacts", - SupercomputerFaction: "You are able to use your Faction's private supercomputer, " + - "giving you unparalleled computing power", - VPN: "You are able to use your Faction's high-speed VPN to more securely " + - "access the Internet", - PrivateServer: "You are able to use your Faction's private server", - InsiderKnowledge: "Other members of the faction give you insider information about other " + - "companies and factions" -} - -function Perk(name, reqRep, info) { - this.name = name; - this.info = info; - this.requiredRep = reqRep; - - //Company/faction specific multipliers - this.money_mult = 1; - this.hacking_mult = 1; - this.combat_stat_mult = 1; - this.labor_stat_mult = 1; - this.repmult = 1; - - /* Properties below set when a Perk is gained by the player */ - this.applied = false; - - this.companyPerk = false; - this.companyName = ""; - - this.factionPerk = false; - this.factionName = ""; -} - -Perk.prototype.setCompany = function(companyName) { - if (this.factionPerk) { - console.error("Perk cannot be both faction and company perk"); - return; - } - this.companyPerk = true; - this.companyName = companyName; -} - -Perk.prototype.setFaction = function(factionName) { - if (this.companyPerk) { - console.error("Perk cannot be both faction and company perk"); - return; - } - this.factionPerk = true; - this.factionName = factionName; -} - -Perk.prototype.toJSON = function() { - return Generic_toJSON("Perk", this); -} - -Perk.fromJSON = function(value) { - return Generic_fromJSON(Perk, value.data); -} - -Reviver.constructors.Perk = Perk; - - var freeCoffee = new Perk(PerkNames.FreeCoffeeCompanyPerk, 6000, PerkInfo.FreeCoffee); - -/* Company Perks */ -//Free Coffee - Increased money and hacking exp gain -//Free Food - Increased combat stat gain -//Networking - Company Rep Gain Rate + , Charisma exp gain rate + -//Company Personal Trainer - Increase in combat stat gain rates -//Knowledge Base - Increase hacking skill by some percentage -//Nootropics - Increase hacking mult, and hacking exp gain mult - -/* Faction Perks */ -//Networking - Faction Rep Gain Rate + , Chariasma Exp Gain Rate + -//Remote Supercomputer - increase in hacking speed, chance, and money -//High Speed VPN - Hack chance increase -//Private Server - Gives you a server with a lot of RAM that you can use -//Insider Knowledge - Ppl in faction from other companies have insider information that lets you hack -// other servers easier. Increase in hack chance - - -applyPerk = function(perk) { - switch (perk.name) { - case PerkNames.FreeCoffeeCompanyPerk: - //Increase money and hacking exp gain - Player.hacking_money_mult *= 1.25; - Player.hacking_exp_mult *= 1.25; - break; - case PerkNames.FreeFoodCompanyPerk: - Player.strength_exp_mult *= 1.2; - Player.defense_exp_mult *= 1.2; - Player.dexterity_exp_mult *= 1.2; - Player.agility_exp_mult *= 1.2; - break; - case PerkNames.NetworkingCompanyPerk: - Player.company_rep_mult *= 1.1; - Player.charisma_exp_mult *= 1.2; - break; - case PerkNames.PersonalTrainerCompanyPerk: - Player.strength_exp_mult *= 1.15; - Player.defense_exp_mult *= 1.15; - Player.dexterity_exp_mult *= 1.15; - Player.agility_exp_mult *= 1.15; - break; - case PerkNames.KnowledgeBaseCompanyPerk: - break; - case PerkNames.NootropicsCompanyPerk: - break; - case PerkNames.NetworkingFactionPerk: - break; - case PerkNames.SupercomputerFactionPerk: - break; - case PerkNames.VPNFactionPerk: - break; - case PerkNames.PrivateServerFactionPerk: - break; - case PerkNames.InsiderKnowledgeFactionPerk: - break; - default: - console.warn(`Unrecognized perk: ${perk.name}`); - return; - } -} - -losePerk = function(perk) { - -} \ No newline at end of file diff --git a/src/PersonObjects/IPlayer.ts b/src/PersonObjects/IPlayer.ts index 046b27861..680973e31 100644 --- a/src/PersonObjects/IPlayer.ts +++ b/src/PersonObjects/IPlayer.ts @@ -146,6 +146,7 @@ export interface IPlayer { hasCorporation(): boolean; hasGangWith(facName: string): boolean; hasTorRouter(): boolean; + hasProgram(program: string): boolean; inBladeburner(): boolean; inGang(): boolean; isQualified(company: Company, position: CompanyPosition): boolean; diff --git a/src/Prestige.js b/src/Prestige.js index 3fdc63b85..9dc2b5b7c 100755 --- a/src/Prestige.js +++ b/src/Prestige.js @@ -21,6 +21,7 @@ import { initMessages, Messages } from "./Message/MessageHelpers"; import { prestigeWorkerScripts } from "./NetscriptWorker"; import { Player } from "./Player"; import { resetPidCounter } from "./Netscript/Pid"; +import { LiteratureNames } from "./Literature/data/LiteratureNames" import { AllServers, @@ -36,7 +37,6 @@ import { } from "./SourceFile/SourceFileFlags"; import { SpecialServerIps, - SpecialServerIpsMap, prestigeSpecialServerIps, SpecialServerNames } from "./Server/SpecialServerIps"; @@ -257,7 +257,7 @@ function prestigeSourceFile() { // BitNode 3: Corporatocracy if (Player.bitNodeN === 3) { - homeComp.messages.push("corporation-management-handbook.lit"); + homeComp.messages.push(LiteratureNames.CorporationManagementHandbook); dialogBoxCreate("You received a copy of the Corporation Management Handbook on your home computer. " + "Read it if you need help getting started with Corporations!"); } diff --git a/src/Server/ServerHelpers.ts b/src/Server/ServerHelpers.ts index dc690d378..80deed022 100644 --- a/src/Server/ServerHelpers.ts +++ b/src/Server/ServerHelpers.ts @@ -10,6 +10,7 @@ import { CONSTANTS } from "../Constants"; import { HacknetServer } from "../Hacknet/HacknetServer"; import { IPlayer } from "../PersonObjects/IPlayer"; import { Programs } from "../Programs/Programs"; +import { LiteratureNames } from "../Literature/data/LiteratureNames"; import { isValidNumber } from "../utils/helpers/isValidNumber"; import { isValidIPAddress } from "../../utils/helpers/isValidIPAddress"; @@ -118,7 +119,7 @@ export function prestigeHomeComputer(homeComp: Server) { }); homeComp.messages.length = 0; //Remove .lit and .msg files - homeComp.messages.push("hackers-starting-handbook.lit"); + homeComp.messages.push(LiteratureNames.HackersStartingHandbook); } //Returns server object with corresponding hostname diff --git a/src/Server/SpecialServerIps.ts b/src/Server/SpecialServerIps.ts index 121c377cc..a5a73e90f 100644 --- a/src/Server/SpecialServerIps.ts +++ b/src/Server/SpecialServerIps.ts @@ -29,6 +29,10 @@ export class SpecialServerIpsMap { this[name] = ip; } + getIp(name: string): string { + return this[name] as string; + } + // Serialize the current object to a JSON save state toJSON(): any { return Generic_toJSON("SpecialServerIpsMap", this); diff --git a/src/Server/data/servers.ts b/src/Server/data/servers.ts index 738c1c10f..9e2ee1972 100644 --- a/src/Server/data/servers.ts +++ b/src/Server/data/servers.ts @@ -3,6 +3,7 @@ // This could actually be a JSON file as it should be constant metadata to be imported... import { IMinMaxRange } from "../../types"; import { LocationName } from "../../Locations/data/LocationNames"; +import { LiteratureNames } from "../../Literature/data/LiteratureNames"; /** * The metadata describing the base state of servers on the network. @@ -134,7 +135,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 88, }, hostname: "blade", - literature: ["beyond-man.lit"], + literature: [LiteratureNames.BeyondMan], maxRamExponent: { max: 9, min: 5, @@ -158,7 +159,7 @@ export const serverMetadata: IServerMetadata[] = [ { hackDifficulty: 99, hostname: "nwo", - literature: ["the-hidden-world.lit"], + literature: [LiteratureNames.TheHiddenWorld], moneyAvailable: { max: 40e9, min: 20e9, @@ -182,8 +183,8 @@ export const serverMetadata: IServerMetadata[] = [ }, hostname: "clarkinc", literature: [ - "beyond-man.lit", - "cost-of-immortality.lit", + LiteratureNames.BeyondMan, + LiteratureNames.CostOfImmortality, ], moneyAvailable: { max: 25e9, @@ -208,8 +209,8 @@ export const serverMetadata: IServerMetadata[] = [ }, hostname: "omnitek", literature: [ - "coded-intelligence.lit", - "history-of-synthoids.lit", + LiteratureNames.CodedIntelligence, + LiteratureNames.HistoryOfSynthoids, ], maxRamExponent: { max: 9, @@ -281,7 +282,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 83, }, hostname: "fulcrumtech", - literature: ["simulated-reality.lit"], + literature: [LiteratureNames.SimulatedReality], maxRamExponent: { max: 11, min: 7, @@ -388,7 +389,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 85, }, hostname: "helios", - literature: ["beyond-man.lit"], + literature: [LiteratureNames.BeyondMan], maxRamExponent: { max: 8, min: 5, @@ -415,7 +416,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 80, }, hostname: "vitalife", - literature: ["A-Green-Tomorrow.lit"], + literature: [LiteratureNames.AGreenTomorrow], maxRamExponent: { max: 7, min: 4, @@ -490,7 +491,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 70, }, hostname: "titan-labs", - literature: ["coded-intelligence.lit"], + literature: [LiteratureNames.CodedIntelligence], maxRamExponent: { max: 7, min: 4, @@ -517,7 +518,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 65, }, hostname: "microdyne", - literature: ["synthetic-muscles.lit"], + literature: [LiteratureNames.SyntheticMuscles], maxRamExponent: { max: 6, min: 4, @@ -545,8 +546,8 @@ export const serverMetadata: IServerMetadata[] = [ }, hostname: "taiyang-digital", literature: [ - "A-Green-Tomorrow.lit", - "brighter-than-the-sun.lit", + LiteratureNames.AGreenTomorrow, + LiteratureNames.BrighterThanTheSun, ], moneyAvailable: { max: 900000000, @@ -592,7 +593,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 80, }, hostname: "aerocorp", - literature: ["man-and-machine.lit"], + literature: [LiteratureNames.ManAndMachine], moneyAvailable: { max: 1200000000, min: 1000000000, @@ -615,7 +616,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 85, }, hostname: "omnia", - literature: ["history-of-synthoids.lit"], + literature: [LiteratureNames.HistoryOfSynthoids], maxRamExponent: { max: 6, min: 4, @@ -642,7 +643,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 55, }, hostname: "zb-def", - literature: ["synthetic-muscles.lit"], + literature: [LiteratureNames.SyntheticMuscles], moneyAvailable: { max: 1100000000, min: 900000000, @@ -688,8 +689,8 @@ export const serverMetadata: IServerMetadata[] = [ }, hostname: "solaris", literature: [ - "A-Green-Tomorrow.lit", - "the-failed-frontier.lit", + LiteratureNames.AGreenTomorrow, + LiteratureNames.TheFailedFrontier, ], maxRamExponent: { max: 7, @@ -739,7 +740,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 75, }, hostname: "global-pharm", - literature: ["A-Green-Tomorrow.lit"], + literature: [LiteratureNames.AGreenTomorrow], maxRamExponent: { max: 6, min: 3, @@ -888,7 +889,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 50, }, hostname: "alpha-ent", - literature: ["sector-12-crime.lit"], + literature: [LiteratureNames.Sector12Crime], maxRamExponent: { max: 7, min: 4, @@ -942,9 +943,9 @@ export const serverMetadata: IServerMetadata[] = [ }, hostname: "rothman-uni", literature: [ - "secret-societies.lit", - "the-failed-frontier.lit", - "tensions-in-tech-race.lit", + LiteratureNames.SecretSocieties, + LiteratureNames.TheFailedFrontier, + LiteratureNames.TensionsInTechRace, ], maxRamExponent: { max: 7, @@ -999,9 +1000,9 @@ export const serverMetadata: IServerMetadata[] = [ }, hostname: "summit-uni", literature: [ - "secret-societies.lit", - "the-failed-frontier.lit", - "synthetic-muscles.lit", + LiteratureNames.SecretSocieties, + LiteratureNames.TheFailedFrontier, + LiteratureNames.SyntheticMuscles, ], maxRamExponent: { max: 6, @@ -1051,7 +1052,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 60, }, hostname: "catalyst", - literature: ["tensions-in-tech-race.lit"], + literature: [LiteratureNames.TensionsInTechRace], maxRamExponent: { max: 7, min: 4, @@ -1104,7 +1105,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 55, }, hostname: "comptek", - literature: ["man-and-machine.lit"], + literature: [LiteratureNames.ManAndMachine], moneyAvailable: { max: 250000000, min: 220000000, @@ -1127,7 +1128,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 60, }, hostname: "netlink", - literature: ["simulated-reality.lit"], + literature: [LiteratureNames.SimulatedReality], maxRamExponent: { max: 7, min: 4, @@ -1170,7 +1171,7 @@ export const serverMetadata: IServerMetadata[] = [ { hackDifficulty: 10, hostname: "foodnstuff", - literature: ["sector-12-crime.lit"], + literature: [LiteratureNames.Sector12Crime], maxRamExponent: 4, moneyAvailable: 2000000, networkLayer: 1, @@ -1226,7 +1227,7 @@ export const serverMetadata: IServerMetadata[] = [ { hackDifficulty: 25, hostname: "neo-net", - literature: ["the-hidden-world.lit"], + literature: [LiteratureNames.TheHiddenWorld], maxRamExponent: 5, moneyAvailable: 5000000, networkLayer: 3, @@ -1238,7 +1239,7 @@ export const serverMetadata: IServerMetadata[] = [ { hackDifficulty: 30, hostname: "silver-helix", - literature: ["new-triads.lit"], + literature: [LiteratureNames.NewTriads], maxRamExponent: 6, moneyAvailable: 45000000, networkLayer: 3, @@ -1250,7 +1251,7 @@ export const serverMetadata: IServerMetadata[] = [ { hackDifficulty: 15, hostname: "hong-fang-tea", - literature: ["brighter-than-the-sun.lit"], + literature: [LiteratureNames.BrighterThanTheSun], maxRamExponent: 4, moneyAvailable: 3000000, networkLayer: 1, @@ -1298,7 +1299,7 @@ export const serverMetadata: IServerMetadata[] = [ min: 25, }, hostname: "omega-net", - literature: ["the-new-god.lit"], + literature: [LiteratureNames.TheNewGod], maxRamExponent: 5, moneyAvailable: { max: 70000000, @@ -1418,8 +1419,8 @@ export const serverMetadata: IServerMetadata[] = [ hackDifficulty: 0, hostname: "run4theh111z", literature: [ - "simulated-reality.lit", - "the-new-god.lit", + LiteratureNames.SimulatedReality, + LiteratureNames.TheNewGod, ], maxRamExponent: { max: 9, @@ -1439,7 +1440,7 @@ export const serverMetadata: IServerMetadata[] = [ { hackDifficulty: 0, hostname: "I.I.I.I", - literature: ["democracy-is-dead.lit"], + literature: [LiteratureNames.DemocracyIsDead], maxRamExponent: { max: 8, min: 4, @@ -1458,7 +1459,7 @@ export const serverMetadata: IServerMetadata[] = [ { hackDifficulty: 0, hostname: "avmnite-02h", - literature: ["democracy-is-dead.lit"], + literature: [LiteratureNames.DemocracyIsDead], maxRamExponent: { max: 7, min: 4, @@ -1492,7 +1493,7 @@ export const serverMetadata: IServerMetadata[] = [ { hackDifficulty: 0, hostname: "CSEC", - literature: ["democracy-is-dead.lit"], + literature: [LiteratureNames.DemocracyIsDead], maxRamExponent: 3, moneyAvailable: 0, networkLayer: 2, @@ -1508,7 +1509,7 @@ export const serverMetadata: IServerMetadata[] = [ { hackDifficulty: 0, hostname: "The-Cave", - literature: ["alpha-omega.lit"], + literature: [LiteratureNames.AlphaOmega], moneyAvailable: 0, networkLayer: 15, numOpenPortsRequired: 5, diff --git a/src/Terminal.js b/src/Terminal.js index d52877d5c..2b3ed51a6 100644 --- a/src/Terminal.js +++ b/src/Terminal.js @@ -50,7 +50,7 @@ import { iTutorialSteps, ITutorial } from "./InteractiveTutorial"; -import { showLiterature } from "./Literature"; +import { showLiterature } from "./Literature/LiteratureHelpers"; import { Message } from "./Message/Message"; import { showMessage } from "./Message/MessageHelpers"; import { startWorkerScript } from "./NetscriptWorker"; diff --git a/src/engine.jsx b/src/engine.jsx index c76521969..a544ca202 100644 --- a/src/engine.jsx +++ b/src/engine.jsx @@ -40,7 +40,6 @@ import { processHacknetEarnings } from "./Hacknet/HacknetHelpers"; import { iTutorialStart } from "./InteractiveTutorial"; -import { initLiterature } from "./Literature"; import { LocationName } from "./Locations/data/LocationNames"; import { LocationRoot } from "./Locations/ui/Root"; import { checkForMessagesToSend, initMessages } from "./Message/MessageHelpers"; @@ -1069,7 +1068,6 @@ const Engine = { if (Player.hasWseAccount) { initSymbolToStockMap(); } - initLiterature(); updateSourceFileFlags(Player); // Calculate the number of cycles have elapsed while offline @@ -1190,7 +1188,6 @@ const Engine = { initFactions(); initAugmentations(); initMessages(); - initLiterature(); updateSourceFileFlags(Player); // Open main menu accordions for new game diff --git a/src/tags b/src/tags deleted file mode 100644 index 717a1f6d4..000000000 --- a/src/tags +++ /dev/null @@ -1,360 +0,0 @@ -!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ -!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ -!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ -!_TAG_PROGRAM_NAME Exuberant Ctags // -!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ -!_TAG_PROGRAM_VERSION 5.8 // -$.analyzeFlag C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 84;" kind:property line:84 language:JavaScript -$.executeCommand C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 183;" kind:method line:183 language:JavaScript -$.finishAction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 86;" kind:method line:86 language:JavaScript -$.finishAnalyze C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 134;" kind:method line:134 language:JavaScript -$.finishHack C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 95;" kind:method line:95 language:JavaScript -$.hackFlag C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 83;" kind:property line:83 language:JavaScript -AddToAllServers C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 666;" kind:function line:666 language:JavaScript -AllServersSave C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 88;" kind:variable line:88 language:JavaScript -Augmentation C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 2;" kind:class line:2 language:JavaScript -Augmentation.addToFactions C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 23;" kind:method line:23 language:JavaScript -Augmentation.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 38;" kind:function line:38 language:JavaScript -Augmentation.setInfo C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 13;" kind:method line:13 language:JavaScript -Augmentation.setRequirements C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 17;" kind:method line:17 language:JavaScript -Augmentation.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 34;" kind:method line:34 language:JavaScript -AugmentationsSave C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 92;" kind:variable line:92 language:JavaScript -CONSTANTS.CodeInstructionRunTime C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 11;" kind:property line:11 language:JavaScript -CONSTANTS.CodeOfflineExecutionTime C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 14;" kind:property line:14 language:JavaScript -CONSTANTS.CorpFactionRepRequirement C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 7;" kind:property line:7 language:JavaScript -CONSTANTS.GameCyclesPer20Hours C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 23;" kind:property line:23 language:JavaScript -CONSTANTS.MaxLogCapacity C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 17;" kind:property line:17 language:JavaScript -CONSTANTS.MaxSkillLevel C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 4;" kind:property line:4 language:JavaScript -CONSTANTS.MillisecondsPer20Hours C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 22;" kind:property line:22 language:JavaScript -CONSTANTS.TorRouterCost C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 20;" kind:property line:20 language:JavaScript -CompaniesSave C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 89;" kind:variable line:89 language:JavaScript -Company C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 4;" kind:class line:4 language:JavaScript -Company.addPosition C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 34;" kind:method line:34 language:JavaScript -Company.addPositions C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 38;" kind:method line:38 language:JavaScript -Company.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 57;" kind:function line:57 language:JavaScript -Company.hasPosition C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 44;" kind:method line:44 language:JavaScript -Company.init C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 23;" kind:method line:23 language:JavaScript -Company.setInfo C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 30;" kind:method line:30 language:JavaScript -Company.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 53;" kind:method line:53 language:JavaScript -CompanyPosition C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 64;" kind:class line:64 language:JavaScript -CompanyPosition.calculateJobPerformance C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 112;" kind:method line:112 language:JavaScript -CompanyPosition.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 196;" kind:function line:196 language:JavaScript -CompanyPosition.isAgentJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 183;" kind:method line:183 language:JavaScript -CompanyPosition.isBusinessJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 160;" kind:method line:160 language:JavaScript -CompanyPosition.isITJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 136;" kind:method line:136 language:JavaScript -CompanyPosition.isNetworkEngineerJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 153;" kind:method line:153 language:JavaScript -CompanyPosition.isSecurityEngineerJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 146;" kind:method line:146 language:JavaScript -CompanyPosition.isSecurityJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 172;" kind:method line:172 language:JavaScript -CompanyPosition.isSoftwareJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 122;" kind:method line:122 language:JavaScript -CompanyPosition.setExperienceGains C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 101;" kind:method line:101 language:JavaScript -CompanyPosition.setPerformanceParameters C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 86;" kind:method line:86 language:JavaScript -CompanyPosition.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 192;" kind:method line:192 language:JavaScript -CompanyPositions.SoftwareIntern C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 206;" kind:property line:206 language:JavaScript -Engine.Clickables C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 5;" kind:property line:5 language:JavaScript -Engine.Debug C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 2;" kind:property line:2 language:JavaScript -Environment C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Environment.js 4;" kind:class line:4 language:JavaScript -Environment.def C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Environment.js 46;" kind:method line:46 language:JavaScript -Environment.extend C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Environment.js 12;" kind:method line:12 language:JavaScript -Environment.get C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Environment.js 27;" kind:method line:27 language:JavaScript -Environment.lookup C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Environment.js 17;" kind:method line:17 language:JavaScript -Environment.set C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Environment.js 34;" kind:method line:34 language:JavaScript -FALSE.type C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 6;" kind:property line:6 language:JavaScript -FALSE.value C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 6;" kind:property line:6 language:JavaScript -Faction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 2;" kind:class line:2 language:JavaScript -Faction.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 30;" kind:function line:30 language:JavaScript -Faction.setAugmentationMultipliers C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 17;" kind:method line:17 language:JavaScript -Faction.setInformation C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 22;" kind:method line:22 language:JavaScript -Faction.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 26;" kind:method line:26 language:JavaScript -FactionInfo.HelpText C:\Users\daniel.xie\Desktop\netburner\netburner\src\FactionInfo.js 5;" kind:property line:5 language:JavaScript -FactionsSave C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 90;" kind:variable line:90 language:JavaScript -GetServerByHostname C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 680;" kind:function line:680 language:JavaScript -InputStream C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\InputStream.js 3;" kind:function line:3 language:JavaScript -Locations.Aevum C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 6;" kind:property line:6 language:JavaScript -Locations.AevumAeroCorp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 20;" kind:property line:20 language:JavaScript -Locations.AevumBachmanAndAssociates C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 17;" kind:property line:17 language:JavaScript -Locations.AevumClarkeIncorporated C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 18;" kind:property line:18 language:JavaScript -Locations.AevumCrushFitnessGym C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 26;" kind:property line:26 language:JavaScript -Locations.AevumECorp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 16;" kind:property line:16 language:JavaScript -Locations.AevumFulcrumTechnologies C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 19;" kind:property line:19 language:JavaScript -Locations.AevumGalacticCybersystems C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 21;" kind:property line:21 language:JavaScript -Locations.AevumNetLinkTechnologies C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 25;" kind:property line:25 language:JavaScript -Locations.AevumPolice C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 24;" kind:property line:24 language:JavaScript -Locations.AevumRhoConstruction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 23;" kind:property line:23 language:JavaScript -Locations.AevumSnapFitnessGym C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 27;" kind:property line:27 language:JavaScript -Locations.AevumTravelAgency C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 15;" kind:property line:15 language:JavaScript -Locations.AevumWatchdogSecurity C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 22;" kind:property line:22 language:JavaScript -Locations.Chongqing C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 7;" kind:property line:7 language:JavaScript -Locations.ChongqingKuaiGongInternational C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 31;" kind:property line:31 language:JavaScript -Locations.ChongqingSolarisSpaceSystems C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 32;" kind:property line:32 language:JavaScript -Locations.ChongqingTravelAgency C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 30;" kind:property line:30 language:JavaScript -Locations.Ishima C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 10;" kind:property line:10 language:JavaScript -Locations.IshimaNovaMedical C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 61;" kind:property line:61 language:JavaScript -Locations.IshimaOmegaSoftware C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 62;" kind:property line:62 language:JavaScript -Locations.IshimaStormTechnologies C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 60;" kind:property line:60 language:JavaScript -Locations.IshimaTravelAgency C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 59;" kind:property line:59 language:JavaScript -Locations.NewTokyo C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 9;" kind:property line:9 language:JavaScript -Locations.NewTokyoDefComm C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 53;" kind:property line:53 language:JavaScript -Locations.NewTokyoGlobalPharmaceuticals C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 55;" kind:property line:55 language:JavaScript -Locations.NewTokyoNoodleBar C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 56;" kind:property line:56 language:JavaScript -Locations.NewTokyoTravelAgency C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 52;" kind:property line:52 language:JavaScript -Locations.NewTokyoVitaLife C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 54;" kind:property line:54 language:JavaScript -Locations.Sector12 C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 8;" kind:property line:8 language:JavaScript -Locations.Sector12AlphaEnterprises C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 44;" kind:property line:44 language:JavaScript -Locations.Sector12BladeIndustries C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 37;" kind:property line:37 language:JavaScript -Locations.Sector12CIA C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 42;" kind:property line:42 language:JavaScript -Locations.Sector12CarmichaelSecurity C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 45;" kind:property line:45 language:JavaScript -Locations.Sector12DeltaOne C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 41;" kind:property line:41 language:JavaScript -Locations.Sector12FoodNStuff C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 46;" kind:property line:46 language:JavaScript -Locations.Sector12FourSigma C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 38;" kind:property line:38 language:JavaScript -Locations.Sector12IcarusMicrosystems C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 39;" kind:property line:39 language:JavaScript -Locations.Sector12IronGym C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 48;" kind:property line:48 language:JavaScript -Locations.Sector12JoesGuns C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 47;" kind:property line:47 language:JavaScript -Locations.Sector12MegaCorp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 36;" kind:property line:36 language:JavaScript -Locations.Sector12NSA C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 43;" kind:property line:43 language:JavaScript -Locations.Sector12PowerhouseGym C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 49;" kind:property line:49 language:JavaScript -Locations.Sector12TravelAgency C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 35;" kind:property line:35 language:JavaScript -Locations.Sector12UniversalEnergy C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 40;" kind:property line:40 language:JavaScript -Locations.Volhaven C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 11;" kind:property line:11 language:JavaScript -Locations.VolhavenCompuTek C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 72;" kind:property line:72 language:JavaScript -Locations.VolhavenHeliosLabs C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 68;" kind:property line:68 language:JavaScript -Locations.VolhavenLexoCorp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 70;" kind:property line:70 language:JavaScript -Locations.VolhavenMilleniumFitnessGym C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 73;" kind:property line:73 language:JavaScript -Locations.VolhavenNWO C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 67;" kind:property line:67 language:JavaScript -Locations.VolhavenOmniTekIncorporated C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 66;" kind:property line:66 language:JavaScript -Locations.VolhavenOmniaCybersystems C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 69;" kind:property line:69 language:JavaScript -Locations.VolhavenSysCoreSecurities C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 71;" kind:property line:71 language:JavaScript -Locations.VolhavenTravelAgency C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 65;" kind:property line:65 language:JavaScript -Parser C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 8;" kind:function line:8 language:JavaScript -Parser.PRECEDENCE.!= C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 13;" kind:property line:13 language:JavaScript -Parser.PRECEDENCE.% C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 15;" kind:property line:15 language:JavaScript -Parser.PRECEDENCE.&& C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 12;" kind:property line:12 language:JavaScript -Parser.PRECEDENCE.* C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 15;" kind:property line:15 language:JavaScript -Parser.PRECEDENCE.+ C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 14;" kind:property line:14 language:JavaScript -Parser.PRECEDENCE.- C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 14;" kind:property line:14 language:JavaScript -Parser.PRECEDENCE./ C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 15;" kind:property line:15 language:JavaScript -Parser.PRECEDENCE.< C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 13;" kind:property line:13 language:JavaScript -Parser.PRECEDENCE.<= C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 13;" kind:property line:13 language:JavaScript -Parser.PRECEDENCE.= C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 10;" kind:property line:10 language:JavaScript -Parser.PRECEDENCE.== C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 13;" kind:property line:13 language:JavaScript -Parser.PRECEDENCE.> C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 13;" kind:property line:13 language:JavaScript -Parser.PRECEDENCE.>= C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 13;" kind:property line:13 language:JavaScript -Parser.PRECEDENCE.|| C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 11;" kind:property line:11 language:JavaScript -Parser.checkKeywordAndSkip C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 46;" kind:function line:46 language:JavaScript -Parser.checkOpAndSkip C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 53;" kind:function line:53 language:JavaScript -Parser.checkPuncAndSkip C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 39;" kind:function line:39 language:JavaScript -Parser.delimited C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 79;" kind:function line:79 language:JavaScript -Parser.is_kw C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 26;" kind:function line:26 language:JavaScript -Parser.is_op C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 32;" kind:function line:32 language:JavaScript -Parser.is_punc C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 20;" kind:function line:20 language:JavaScript -Parser.maybe_binary C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 62;" kind:function line:62 language:JavaScript -Parser.parse_call C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 92;" kind:function line:92 language:JavaScript -Parser.unexpected C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 58;" kind:function line:58 language:JavaScript -Perk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 40;" kind:class line:40 language:JavaScript -Perk.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 62;" kind:function line:62 language:JavaScript -Perk.setCompany C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 40;" kind:method line:40 language:JavaScript -Perk.setFaction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 49;" kind:method line:49 language:JavaScript -Perk.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 58;" kind:method line:58 language:JavaScript -Perks.FreeCoffeeCompanyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 6;" kind:property line:6 language:JavaScript -Perks.FreeFoodCompanyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 7;" kind:property line:7 language:JavaScript -Perks.InsiderKnowledgeFactionPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 17;" kind:property line:17 language:JavaScript -Perks.KnowledgeBaseCompanyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 10;" kind:property line:10 language:JavaScript -Perks.NetworkingCompanyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 8;" kind:property line:8 language:JavaScript -Perks.NetworkingFactionPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 13;" kind:property line:13 language:JavaScript -Perks.NootropicsCompanyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 11;" kind:property line:11 language:JavaScript -Perks.PersonalTrainerCompanyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 9;" kind:property line:9 language:JavaScript -Perks.PrivateServerFactionPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 16;" kind:property line:16 language:JavaScript -Perks.SupercomputerFactionPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 14;" kind:property line:14 language:JavaScript -Perks.VPNFactionPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 15;" kind:property line:15 language:JavaScript -PlayerObject C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 5;" kind:class line:5 language:JavaScript -PlayerObject C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 121;" kind:class line:121 language:JavaScript -PlayerObject C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 2;" kind:class line:2 language:JavaScript -PlayerObject.PlayerObject C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 436;" kind:class line:436 language:JavaScript -PlayerObject.PlayerObject C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 730;" kind:method line:730 language:JavaScript -PlayerObject.PlayerObject.createProgramWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 690;" kind:method line:690 language:JavaScript -PlayerObject.PlayerObject.finishCreateProgramWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 709;" kind:method line:709 language:JavaScript -PlayerObject.PlayerObject.getFactionFieldWorkRepGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 655;" kind:method line:655 language:JavaScript -PlayerObject.PlayerObject.getFactionSecurityWorkRepGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 646;" kind:method line:646 language:JavaScript -PlayerObject.PlayerObject.getWorkAgiExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 626;" kind:method line:626 language:JavaScript -PlayerObject.PlayerObject.getWorkChaExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 632;" kind:method line:632 language:JavaScript -PlayerObject.PlayerObject.getWorkDefExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 614;" kind:method line:614 language:JavaScript -PlayerObject.PlayerObject.getWorkDexExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 620;" kind:method line:620 language:JavaScript -PlayerObject.PlayerObject.getWorkHackExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 602;" kind:method line:602 language:JavaScript -PlayerObject.PlayerObject.getWorkMoneyGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 596;" kind:method line:596 language:JavaScript -PlayerObject.PlayerObject.getWorkRepGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 638;" kind:method line:638 language:JavaScript -PlayerObject.PlayerObject.getWorkStrExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 608;" kind:method line:608 language:JavaScript -PlayerObject.PlayerObject.startCreateProgramWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 666;" kind:method line:666 language:JavaScript -PlayerObject.PlayerObject.startFactionFieldWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 517;" kind:method line:517 language:JavaScript -PlayerObject.PlayerObject.startFactionHackWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 502;" kind:method line:502 language:JavaScript -PlayerObject.PlayerObject.startFactionSecurityWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 532;" kind:method line:532 language:JavaScript -PlayerObject.PlayerObject.startFactionWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 471;" kind:method line:471 language:JavaScript -PlayerObject.PlayerObject.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 726;" kind:method line:726 language:JavaScript -PlayerObject.PlayerObject.workForFaction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 547;" kind:method line:547 language:JavaScript -PlayerObject.analyze C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 230;" kind:method line:230 language:JavaScript -PlayerObject.applyForAgentJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 118;" kind:method line:118 language:JavaScript -PlayerObject.applyForBusinessJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 109;" kind:method line:109 language:JavaScript -PlayerObject.applyForEmployeeJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 127;" kind:method line:127 language:JavaScript -PlayerObject.applyForItJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 84;" kind:method line:84 language:JavaScript -PlayerObject.applyForJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 5;" kind:method line:5 language:JavaScript -PlayerObject.applyForNetworkEngineerJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 100;" kind:method line:100 language:JavaScript -PlayerObject.applyForSecurityEngineerJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 88;" kind:method line:88 language:JavaScript -PlayerObject.applyForSecurityJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 113;" kind:method line:113 language:JavaScript -PlayerObject.applyForSoftwareJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 80;" kind:method line:80 language:JavaScript -PlayerObject.applyForWaiterJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 139;" kind:method line:139 language:JavaScript -PlayerObject.calculateExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 216;" kind:method line:216 language:JavaScript -PlayerObject.calculateHackingChance C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 176;" kind:method line:176 language:JavaScript -PlayerObject.calculateHackingTime C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 190;" kind:method line:190 language:JavaScript -PlayerObject.calculatePercentMoneyHacked C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 201;" kind:method line:201 language:JavaScript -PlayerObject.calculateSkill C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 157;" kind:method line:157 language:JavaScript -PlayerObject.checkForFactionInvitations C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 121;" kind:method line:121 language:JavaScript -PlayerObject.finishWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 288;" kind:method line:288 language:JavaScript -PlayerObject.gainAgilityExp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 273;" kind:method line:273 language:JavaScript -PlayerObject.gainCharismaExp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 280;" kind:method line:280 language:JavaScript -PlayerObject.gainDefenseExp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 259;" kind:method line:259 language:JavaScript -PlayerObject.gainDexterityExp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 266;" kind:method line:266 language:JavaScript -PlayerObject.gainHackingExp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 245;" kind:method line:245 language:JavaScript -PlayerObject.gainMoney C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 236;" kind:method line:236 language:JavaScript -PlayerObject.gainStrengthExp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 252;" kind:method line:252 language:JavaScript -PlayerObject.getCurrentServer C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 146;" kind:method line:146 language:JavaScript -PlayerObject.getHomeComputer C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 150;" kind:method line:150 language:JavaScript -PlayerObject.hack C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 223;" kind:method line:223 language:JavaScript -PlayerObject.init C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 135;" kind:method line:135 language:JavaScript -PlayerObject.isQualified C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 152;" kind:method line:152 language:JavaScript -PlayerObject.startWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 346;" kind:method line:346 language:JavaScript -PlayerObject.updateSkillLevels C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 161;" kind:method line:161 language:JavaScript -PlayerObject.work C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 387;" kind:method line:387 language:JavaScript -PrintAllServers C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 692;" kind:function line:692 language:JavaScript -Programs.BruteSSHProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 4;" kind:property line:4 language:JavaScript -Programs.FTPCrackProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 5;" kind:property line:5 language:JavaScript -Programs.HTTPWormProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 7;" kind:property line:7 language:JavaScript -Programs.NukeProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 3;" kind:property line:3 language:JavaScript -Programs.RelaySMTPProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 6;" kind:property line:6 language:JavaScript -Programs.SQLInjectProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 8;" kind:property line:8 language:JavaScript -Script C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 66;" kind:class line:66 language:JavaScript -Script.displayLog C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 139;" kind:method line:139 language:JavaScript -Script.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 150;" kind:function line:150 language:JavaScript -Script.log C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 129;" kind:method line:129 language:JavaScript -Script.saveScript C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 90;" kind:method line:90 language:JavaScript -Script.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 145;" kind:method line:145 language:JavaScript -Script.updateNumInstructions C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 116;" kind:method line:116 language:JavaScript -Script.updateRamUsage C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 125;" kind:method line:125 language:JavaScript -ScriptEditorLastStatus C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 56;" kind:variable line:56 language:JavaScript -Server C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 4;" kind:class line:4 language:JavaScript -Server.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 108;" kind:function line:108 language:JavaScript -Server.getScript C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 94;" kind:method line:94 language:JavaScript -Server.getServerOnNetwork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 84;" kind:method line:84 language:JavaScript -Server.init C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 57;" kind:method line:57 language:JavaScript -Server.setHackingParameters C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 69;" kind:method line:69 language:JavaScript -Server.setPortProperties C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 78;" kind:method line:78 language:JavaScript -Server.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 104;" kind:method line:104 language:JavaScript -SizeOfAllServers C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 657;" kind:function line:657 language:JavaScript -SpecialServerIpsMap C:\Users\daniel.xie\Desktop\netburner\netburner\src\SpecialServerIps.js 2;" kind:function line:2 language:JavaScript -SpecialServerIpsMap C:\Users\daniel.xie\Desktop\netburner\netburner\src\SpecialServerIps.js 5;" kind:class line:5 language:JavaScript -SpecialServerIpsMap.addIp C:\Users\daniel.xie\Desktop\netburner\netburner\src\SpecialServerIps.js 5;" kind:method line:5 language:JavaScript -SpecialServerIpsMap.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\SpecialServerIps.js 13;" kind:function line:13 language:JavaScript -SpecialServerIpsMap.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\SpecialServerIps.js 9;" kind:method line:9 language:JavaScript -SpecialServerIpsSave C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 91;" kind:variable line:91 language:JavaScript -Tokenizer C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 16;" kind:function line:16 language:JavaScript -WorkerScript C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 6;" kind:class line:6 language:JavaScript -WorkerScript.getServer C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 18;" kind:method line:18 language:JavaScript -addWorkerScript C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 132;" kind:function line:132 language:JavaScript -allFiles C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 312;" kind:variable line:312 language:JavaScript -applyAugmentation C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 486;" kind:function line:486 language:JavaScript -applyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 84;" kind:function line:84 language:JavaScript -apply_op C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 498;" kind:function line:498 language:JavaScript -apply_op.div C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 504;" kind:function line:504 language:JavaScript -apply_op.num C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 499;" kind:function line:499 language:JavaScript -checkValidFilename C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 47;" kind:function line:47 language:JavaScript -createProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 82;" kind:function line:82 language:JavaScript -croak C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\InputStream.js 22;" kind:function line:22 language:JavaScript -delTarget C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 405;" kind:variable line:405 language:JavaScript -diff C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 536;" kind:variable line:536 language:JavaScript -displayFactionAugmentations C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 616;" kind:function line:616 language:JavaScript -displayFactionContent C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 417;" kind:function line:417 language:JavaScript -eof C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\InputStream.js 19;" kind:function line:19 language:JavaScript -eof C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 165;" kind:function line:165 language:JavaScript -evaluate C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 7;" kind:function line:7 language:JavaScript -evaluateFor C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 333;" kind:function line:333 language:JavaScript -evaluateProg C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 460;" kind:function line:460 language:JavaScript -evaluateWhile C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 405;" kind:function line:405 language:JavaScript -executeDarkwebTerminalCommand C:\Users\daniel.xie\Desktop\netburner\netburner\src\DarkWeb.js 2;" kind:function line:2 language:JavaScript -filename C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 334;" kind:variable line:334 language:JavaScript -getNextCompanyPosition C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 328;" kind:function line:328 language:JavaScript -hackProgressBarPost C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 10;" kind:function line:10 language:JavaScript -hackProgressPost C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 15;" kind:function line:15 language:JavaScript -hostname C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 422;" kind:variable line:422 language:JavaScript -initAugmentations C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 52;" kind:function line:52 language:JavaScript -initCompanies C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 425;" kind:function line:425 language:JavaScript -initFactions C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 47;" kind:function line:47 language:JavaScript -initForeignServers C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 117;" kind:function line:117 language:JavaScript -initLocationButtons C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 759;" kind:function line:759 language:JavaScript -inviteToFaction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 362;" kind:function line:362 language:JavaScript -ip C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 222;" kind:variable line:222 language:JavaScript -is_digit C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 31;" kind:function line:31 language:JavaScript -is_id C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 40;" kind:function line:40 language:JavaScript -is_id_start C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 36;" kind:function line:36 language:JavaScript -is_keyword C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 27;" kind:function line:27 language:JavaScript -is_op_char C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 44;" kind:function line:44 language:JavaScript -is_punc C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 48;" kind:function line:48 language:JavaScript -is_whitespace C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 52;" kind:function line:52 language:JavaScript -item C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 402;" kind:variable line:402 language:JavaScript -itemText C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 419;" kind:variable line:419 language:JavaScript -joinFaction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 369;" kind:function line:369 language:JavaScript -killWorkerScript C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 122;" kind:function line:122 language:JavaScript -li C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 384;" kind:variable line:384 language:JavaScript -loadAllRunningScripts C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 159;" kind:function line:159 language:JavaScript -losePerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 114;" kind:function line:114 language:JavaScript -mainMenu C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 263;" kind:variable line:263 language:JavaScript -maybe_call C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 203;" kind:function line:203 language:JavaScript -next C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\InputStream.js 11;" kind:function line:11 language:JavaScript -next C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 157;" kind:function line:157 language:JavaScript -offlineEps C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 440;" kind:variable line:440 language:JavaScript -offlineMps C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 438;" kind:variable line:438 language:JavaScript -offlineMpsText C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 439;" kind:variable line:439 language:JavaScript -offlineTotalMoneyMade C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 435;" kind:variable line:435 language:JavaScript -offset C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 537;" kind:variable line:537 language:JavaScript -onlineEps C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 431;" kind:variable line:431 language:JavaScript -onlineMps C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 429;" kind:variable line:429 language:JavaScript -onlineMpsText C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 430;" kind:variable line:430 language:JavaScript -onlineTotalMoneyMade C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 426;" kind:variable line:426 language:JavaScript -parse_atom C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 208;" kind:function line:208 language:JavaScript -parse_bool C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 196;" kind:function line:196 language:JavaScript -parse_expression C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 248;" kind:function line:248 language:JavaScript -parse_for C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 154;" kind:function line:154 language:JavaScript -parse_if C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 111;" kind:function line:111 language:JavaScript -parse_if.ret.cond C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 122;" kind:property line:122 language:JavaScript -parse_if.ret.type C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 121;" kind:property line:121 language:JavaScript -parse_prog C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 240;" kind:function line:240 language:JavaScript -parse_toplevel C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 230;" kind:function line:230 language:JavaScript -parse_varname C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 100;" kind:function line:100 language:JavaScript -parse_while C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 182;" kind:function line:182 language:JavaScript -peek C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\InputStream.js 16;" kind:function line:16 language:JavaScript -peek C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 151;" kind:function line:151 language:JavaScript -percent C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 657;" kind:variable line:657 language:JavaScript -post C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 4;" kind:function line:4 language:JavaScript -postNetburnerText C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 25;" kind:function line:25 language:JavaScript -postScriptEditorStatus C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 57;" kind:function line:57 language:JavaScript -prestigeAugmentation C:\Users\daniel.xie\Desktop\netburner\netburner\src\Prestige.js 4;" kind:function line:4 language:JavaScript -purchaseServer C:\Users\daniel.xie\Desktop\netburner\netburner\src\PurchaseServers.js 2;" kind:function line:2 language:JavaScript -purchaseTor C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 1292;" kind:function line:1292 language:JavaScript -read_escaped C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 88;" kind:function line:88 language:JavaScript -read_ident C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 79;" kind:function line:79 language:JavaScript -read_next C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 122;" kind:function line:122 language:JavaScript -read_number C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 63;" kind:function line:63 language:JavaScript -read_string C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 107;" kind:function line:107 language:JavaScript -read_while C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 56;" kind:function line:56 language:JavaScript -runScriptsLoop C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 26;" kind:function line:26 language:JavaScript -s C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 406;" kind:variable line:406 language:JavaScript -scriptCalculateExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 546;" kind:function line:546 language:JavaScript -scriptCalculateHackingChance C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 528;" kind:function line:528 language:JavaScript -scriptCalculateHackingTime C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 538;" kind:function line:538 language:JavaScript -scriptCalculateOfflineProduction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 183;" kind:function line:183 language:JavaScript -scriptCalculatePercentMoneyHacked C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 551;" kind:function line:551 language:JavaScript -scriptName C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 296;" kind:variable line:296 language:JavaScript -scriptname C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 342;" kind:variable line:342 language:JavaScript -serverIpHostname C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 423;" kind:variable line:423 language:JavaScript -skip_comment C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 116;" kind:function line:116 language:JavaScript -travelToCity C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 1280;" kind:function line:1280 language:JavaScript -updateOnlineScriptTimes C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 155;" kind:function line:155 language:JavaScript -updateTerminalScroll C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 20;" kind:function line:20 language:JavaScript -window.onload C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 904;" kind:function line:904 language:JavaScript -workerScripts C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 23;" kind:variable line:23 language:JavaScript diff --git a/src/tags.idx b/src/tags.idx deleted file mode 100644 index 22d704dc73e063ed04952882ba955561b1c6ef99..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 440 zcmW;9%Sr-K90%Z03L+3{QPDyd)}}>0K&^(ZT3}S@CW@0D^W-#V7@ZW_6tt+wN=S{M zJBU=$g>2DfRYB0A2MAXYL=Vuq|8G_wpR>Jd%%LbwHPTlDv=H!gy9^|| x1m@=zu%@mFlh51$D^pPvN5XwaNrbaDeEA-WJ0FOoxdAN0^+=>d=M#|U#6K)#Zn*#e From 62c571ef3af7f8ea0f344ca5a182eab3d6a43033 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sun, 14 Mar 2021 01:31:23 -0500 Subject: [PATCH 03/16] Convert CodingContractGenerator to typescript --- ...enerator.js => CodingContractGenerator.ts} | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) rename src/{CodingContractGenerator.js => CodingContractGenerator.ts} (78%) diff --git a/src/CodingContractGenerator.js b/src/CodingContractGenerator.ts similarity index 78% rename from src/CodingContractGenerator.js rename to src/CodingContractGenerator.ts index 3808d444b..6b5e62ad4 100644 --- a/src/CodingContractGenerator.js +++ b/src/CodingContractGenerator.ts @@ -1,20 +1,23 @@ import { CodingContract, CodingContractRewardType, - CodingContractTypes + CodingContractTypes, + ICodingContractReward } from "./CodingContracts"; import { Factions } from "./Faction/Factions"; import { Player } from "./Player"; import { AllServers } from "./Server/AllServers"; import { GetServerByHostname } from "./Server/ServerHelpers"; import { SpecialServerNames } from "./Server/SpecialServerIps"; +import { Server } from "./Server/Server"; +import { HacknetServer } from "./Hacknet/HacknetServer"; import { getRandomInt } from "../utils/helpers/getRandomInt"; export function generateRandomContract() { // First select a random problem type - let problemType = getRandomProblemType(); + const problemType = getRandomProblemType(); // Then select a random reward type. 'Money' will always be the last reward type const reward = getRandomReward(); @@ -22,15 +25,15 @@ export function generateRandomContract() { // Choose random server const randServer = getRandomServer(); - let contractFn = getRandomFilename(randServer, reward); - let contract = new CodingContract(contractFn, problemType, reward); + const contractFn = getRandomFilename(randServer, reward); + const contract = new CodingContract(contractFn, problemType, reward); randServer.addContract(contract); } export function generateRandomContractOnHome() { // First select a random problem type - let problemType = getRandomProblemType(); + const problemType = getRandomProblemType(); // Then select a random reward type. 'Money' will always be the last reward type const reward = getRandomReward(); @@ -38,13 +41,19 @@ export function generateRandomContractOnHome() { // Choose random server const serv = Player.getHomeComputer(); - let contractFn = getRandomFilename(serv, reward); - let contract = new CodingContract(contractFn, problemType, reward); + const contractFn = getRandomFilename(serv, reward); + const contract = new CodingContract(contractFn, problemType, reward); serv.addContract(contract); } -export function generateContract(params) { +export interface IGenerateContractParams { + problemType?: string; + server?: string; + fn?: string; +} + +export function generateContract(params: IGenerateContractParams) { // Problem Type let problemType; const problemTypes = Object.keys(CodingContractTypes); @@ -62,7 +71,7 @@ export function generateContract(params) { if (params.server != null) { server = GetServerByHostname(params.server); if (server == null) { - server = AllServers[param.server]; + server = AllServers[params.server]; } if (server == null) { server = getRandomServer(); @@ -84,7 +93,7 @@ export function generateContract(params) { } // Ensures that a contract's reward type is valid -function sanitizeRewardType(rewardType) { +function sanitizeRewardType(rewardType: CodingContractRewardType): CodingContractRewardType { let type = rewardType; // Create copy const factionsThatAllowHacking = Player.factions.filter((fac) => { @@ -115,9 +124,11 @@ function getRandomProblemType() { return problemTypes[randIndex]; } -function getRandomReward() { - let reward = {}; - reward.type = getRandomInt(0, CodingContractRewardType.Money); +function getRandomReward(): ICodingContractReward { + let reward: ICodingContractReward = { + name: "", + type: getRandomInt(0, CodingContractRewardType.Money), + }; reward.type = sanitizeRewardType(reward.type); // Add additional information based on the reward type @@ -155,7 +166,7 @@ function getRandomReward() { return reward; } -function getRandomServer() { +function getRandomServer(): Server | HacknetServer { const servers = Object.keys(AllServers); let randIndex = getRandomInt(0, servers.length - 1); let randServer = AllServers[servers[randIndex]]; @@ -163,7 +174,7 @@ function getRandomServer() { // An infinite loop shouldn't ever happen, but to be safe we'll use // a for loop with a limited number of tries for (let i = 0; i < 200; ++i) { - if (!randServer.purchasedByPlayer && randServer.hostname !== SpecialServerNames.WorldDaemon) { + if (randServer instanceof Server && !randServer.purchasedByPlayer && randServer.hostname !== SpecialServerNames.WorldDaemon) { break; } randIndex = getRandomInt(0, servers.length - 1); @@ -173,11 +184,11 @@ function getRandomServer() { return randServer; } -function getRandomFilename(server, reward) { +function getRandomFilename(server: Server | HacknetServer, reward: ICodingContractReward): string { let contractFn = `contract-${getRandomInt(0, 1e6)}`; for (let i = 0; i < 1000; ++i) { - if (server.contracts.filter((c) => {return c.fn === contractFn}).length <= 0) { break; } + if (server.contracts.filter((c: CodingContract) => {return c.fn === contractFn}).length <= 0) { break; } contractFn = `contract-${getRandomInt(0, 1e6)}`; } From 4892f0bd7961a126eaa4de6533060559b2e78a05 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sun, 14 Mar 2021 01:38:50 -0500 Subject: [PATCH 04/16] convert Hacking.js to Hacking.ts --- src/{Hacking.js => Hacking.ts} | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) rename src/{Hacking.js => Hacking.ts} (82%) diff --git a/src/Hacking.js b/src/Hacking.ts similarity index 82% rename from src/Hacking.js rename to src/Hacking.ts index 893ca3779..fc3681e0d 100644 --- a/src/Hacking.js +++ b/src/Hacking.ts @@ -1,11 +1,12 @@ import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers"; import { Player } from "./Player"; import { Server } from "./Server/Server"; +import { HacknetServer } from "./Hacknet/HacknetServer"; /** * Returns the chance the player has to successfully hack a server */ -export function calculateHackingChance(server) { +export function calculateHackingChance(server: Server): number { const hackFactor = 1.75; const intFactor = 0.2; const difficultyMult = (100 - server.hackDifficulty) / 100; @@ -22,13 +23,13 @@ export function calculateHackingChance(server) { * Returns the amount of hacking experience the player will gain upon * successfully hacking a server */ -export function calculateHackingExpGain(server) { +export function calculateHackingExpGain(server: Server): number { const baseExpGain = 3; const diffFactor = 0.3; if (server.baseDifficulty == null) { server.baseDifficulty = server.hackDifficulty; } - var expGain = baseExpGain; + let expGain = baseExpGain; expGain += (server.baseDifficulty * Player.hacking_exp_mult * diffFactor); return expGain * BitNodeMultipliers.HackExpGain; @@ -38,7 +39,7 @@ export function calculateHackingExpGain(server) { * Returns the percentage of money that will be stolen from a server if * it is successfully hacked (returns the decimal form, not the actual percent value) */ -export function calculatePercentMoneyHacked(server) { +export function calculatePercentMoneyHacked(server: Server): number { // Adjust if needed for balancing. This is the divisor for the final calculation const balanceFactor = 240; @@ -54,7 +55,7 @@ export function calculatePercentMoneyHacked(server) { /** * Returns time it takes to complete a hack on a server, in seconds */ -export function calculateHackingTime(server, hack, int) { +export function calculateHackingTime(server: Server, hack: number, int: number): number { const difficultyMult = server.requiredHackingSkill * server.hackDifficulty; const baseDiff = 500; @@ -63,7 +64,7 @@ export function calculateHackingTime(server, hack, int) { const intFactor = 0.1; if (hack == null) {hack = Player.hacking_skill;} if (int == null) {int = Player.intelligence;} - var skillFactor = (diffFactor * difficultyMult + baseDiff); + let skillFactor = (diffFactor * difficultyMult + baseDiff); // tslint:disable-next-line skillFactor /= (hack + baseSkill + (intFactor * int)); @@ -76,7 +77,7 @@ export function calculateHackingTime(server, hack, int) { /** * Returns time it takes to complete a grow operation on a server, in seconds */ -export function calculateGrowTime(server, hack, int) { +export function calculateGrowTime(server: Server, hack: number, int: number): number { const growTimeMultiplier = 3.2; // Relative to hacking time. 16/5 = 3.2 return growTimeMultiplier * calculateHackingTime(server, hack, int); @@ -85,7 +86,7 @@ export function calculateGrowTime(server, hack, int) { /** * Returns time it takes to complete a weaken operation on a server, in seconds */ -export function calculateWeakenTime(server, hack, int) { +export function calculateWeakenTime(server: Server, hack: number, int: number): number { const weakenTimeMultiplier = 4; // Relative to hacking time return weakenTimeMultiplier * calculateHackingTime(server, hack, int); From 3ec54bcdd8cbfd6a218fbd904eb841c8e552c9d2 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Mon, 15 Mar 2021 23:40:28 -0400 Subject: [PATCH 05/16] Hacking factions no longer have hacking level requirements since the servers they need to hack already have requirements, formatting and styling in sleeves. --- .../Player/PlayerObjectGeneralMethods.js | 8 +- src/PersonObjects/Sleeve/SleeveUI.ts | 73 ++++++++----------- .../Sleeve/ui/EarningsTableElement.tsx | 20 +++++ src/PersonObjects/Sleeve/ui/StatsElement.tsx | 58 +++++++++++++++ 4 files changed, 114 insertions(+), 45 deletions(-) create mode 100644 src/PersonObjects/Sleeve/ui/EarningsTableElement.tsx create mode 100644 src/PersonObjects/Sleeve/ui/StatsElement.tsx diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.js b/src/PersonObjects/Player/PlayerObjectGeneralMethods.js index 2cf3d7ac1..050de0318 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.js +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.js @@ -2021,7 +2021,7 @@ export function checkForFactionInvitations() { if (bitrunnersServer == null) { console.error("Could not find BitRunners Server"); } else if (!bitrunnersFac.isBanned && !bitrunnersFac.isMember && bitrunnersServer.manuallyHacked && - !bitrunnersFac.alreadyInvited && this.hacking_skill >= 500 && homeComp.maxRam >= 128) { + !bitrunnersFac.alreadyInvited && homeComp.maxRam >= 128) { invitedFactions.push(bitrunnersFac); } @@ -2031,7 +2031,7 @@ export function checkForFactionInvitations() { if (blackhandServer == null) { console.error("Could not find The Black Hand Server"); } else if (!theblackhandFac.isBanned && !theblackhandFac.isMember && blackhandServer.manuallyHacked && - !theblackhandFac.alreadyInvited && this.hacking_skill >= 350 && homeComp.maxRam >= 64) { + !theblackhandFac.alreadyInvited && homeComp.maxRam >= 64) { invitedFactions.push(theblackhandFac); } @@ -2041,7 +2041,7 @@ export function checkForFactionInvitations() { if (nitesecServer == null) { console.error("Could not find NiteSec Server"); } else if (!nitesecFac.isBanned && !nitesecFac.isMember && nitesecServer.manuallyHacked && - !nitesecFac.alreadyInvited && this.hacking_skill >= 200 && homeComp.maxRam >= 32) { + !nitesecFac.alreadyInvited && homeComp.maxRam >= 32) { invitedFactions.push(nitesecFac); } @@ -2185,7 +2185,7 @@ export function checkForFactionInvitations() { if (cybersecServer == null) { console.error("Could not find CyberSec Server"); } else if (!cybersecFac.isBanned && !cybersecFac.isMember && cybersecServer.manuallyHacked && - !cybersecFac.alreadyInvited && this.hacking_skill >= 50) { + !cybersecFac.alreadyInvited) { invitedFactions.push(cybersecFac); } diff --git a/src/PersonObjects/Sleeve/SleeveUI.ts b/src/PersonObjects/Sleeve/SleeveUI.ts index de15d2f60..dc5683296 100644 --- a/src/PersonObjects/Sleeve/SleeveUI.ts +++ b/src/PersonObjects/Sleeve/SleeveUI.ts @@ -39,6 +39,10 @@ import { removeChildrenFromElement } from "../../../utils/uiHelpers/removeChildr import { removeElement } from "../../../utils/uiHelpers/removeElement"; import { removeElementById } from "../../../utils/uiHelpers/removeElementById"; +import { EarningsTableElement } from "./ui/EarningsTableElement"; +import { StatsElement } from "./ui/StatsElement"; +import * as ReactDOM from "react-dom"; + // Object that keeps track of all DOM elements for the UI for a single Sleeve interface ISleeveUIElems { container: HTMLElement | null; @@ -94,7 +98,7 @@ export function createSleevesPage(p: IPlayer) { UIElems.info = createElement("p", { class: "sleeves-page-info", - innerHTML: "Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your " + + innerHTML: "

Sleeves

Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your " + "consciousness has been copied. In other words, these Synthoids contain " + "a perfect duplicate of your mind.

" + "Sleeves can be used to perform different tasks synchronously.

", @@ -195,7 +199,7 @@ function createSleeveUi(sleeve: Sleeve, allSleeves: Sleeve[]): ISleeveUIElems { }); elems.statsPanel = createElement("div", { class: "sleeve-panel", width: "25%" }); - elems.stats = createElement("p", { class: "sleeve-stats-text" }); + elems.stats = createElement("div", { class: "sleeve-stats-text" }); elems.moreStatsButton = createElement("button", { class: "std-button", innerText: "More Stats", @@ -323,7 +327,7 @@ function createSleeveUi(sleeve: Sleeve, allSleeves: Sleeve[]): ISleeveUIElems { elems.taskPanel.appendChild(elems.taskProgressBar); elems.earningsPanel = createElement("div", { class: "sleeve-panel", width: "35%" }); - elems.currentEarningsInfo = createElement("p"); + elems.currentEarningsInfo = createElement("div"); elems.totalEarningsButton = createElement("button", { class: "std-button", innerText: "More Earnings Info", @@ -375,53 +379,40 @@ function createSleeveUi(sleeve: Sleeve, allSleeves: Sleeve[]): ISleeveUIElems { function updateSleeveUi(sleeve: Sleeve, elems: ISleeveUIElems) { if (!routing.isOn(Page.Sleeves)) { return; } - elems.stats!.innerHTML = [`Hacking: ${numeralWrapper.format(sleeve.hacking_skill, "0,0")}`, - `Strength: ${numeralWrapper.format(sleeve.strength, "0,0")}`, - `Defense: ${numeralWrapper.format(sleeve.defense, "0,0")}`, - `Dexterity: ${numeralWrapper.format(sleeve.dexterity, "0,0")}`, - `Agility: ${numeralWrapper.format(sleeve.agility, "0,0")}`, - `Charisma: ${numeralWrapper.format(sleeve.charisma, "0,0")}`, - `HP: ${numeralWrapper.format(sleeve.hp, "0,0")} / ${numeralWrapper.format(sleeve.max_hp, "0,0")}`, - `City: ${sleeve.city}`, - `Shock: ${numeralWrapper.format(100 - sleeve.shock, "0,0.000")}`, - `Sync: ${numeralWrapper.format(sleeve.sync, "0,0.000")}`, - `Memory: ${numeralWrapper.format(sleeve.memory, "0")}`].join("
"); - - let repGainText: string = ""; - if (sleeve.currentTask === SleeveTaskType.Company || sleeve.currentTask === SleeveTaskType.Faction) { - const repGain: number = sleeve.getRepGain(playerRef!); - repGainText = `Reputation: ${numeralWrapper.format(5 * repGain, "0.00")} / s` - } + ReactDOM.render(StatsElement(sleeve), elems.stats!); if (sleeve.currentTask === SleeveTaskType.Crime) { - elems.currentEarningsInfo!.innerHTML = [ - `Earnings (Pre-Synchronization):`, - `Money: ${numeralWrapper.formatMoney(parseFloat(sleeve.currentTaskLocation))} if successful`, - `Hacking Exp: ${numeralWrapper.format(sleeve.gainRatesForTask.hack, "0.00")} (2x if successful)`, - `Strength Exp: ${numeralWrapper.format(sleeve.gainRatesForTask.str, "0.00")} (2x if successful)`, - `Defense Exp: ${numeralWrapper.format(sleeve.gainRatesForTask.def, "0.00")} (2x if successful)`, - `Dexterity Exp: ${numeralWrapper.format(sleeve.gainRatesForTask.dex, "0.00")} (2x if successful)`, - `Agility Exp: ${numeralWrapper.format(sleeve.gainRatesForTask.agi, "0.00")} (2x if successful)`, - `Charisma Exp: ${numeralWrapper.format(sleeve.gainRatesForTask.cha, "0.00")} (2x if successful)` - ].join("
"); + const data = [ + [`Money`, `${numeralWrapper.formatMoney(parseFloat(sleeve.currentTaskLocation))}`, `(on success)`], + [`Hacking Exp`, `${numeralWrapper.format(sleeve.gainRatesForTask.hack, "0.00")}`, `(2x on success)`], + [`Strength Exp`, `${numeralWrapper.format(sleeve.gainRatesForTask.str, "0.00")}`, `(2x on success)`], + [`Defense Exp`, `${numeralWrapper.format(sleeve.gainRatesForTask.def, "0.00")}`, `(2x on success)`], + [`Dexterity Exp`, `${numeralWrapper.format(sleeve.gainRatesForTask.dex, "0.00")}`, `(2x on success)`], + [`Agility Exp`, `${numeralWrapper.format(sleeve.gainRatesForTask.agi, "0.00")}`, `(2x on success)`], + [`Charisma Exp`, `${numeralWrapper.format(sleeve.gainRatesForTask.cha, "0.00")}`, `(2x on success)`] + ]; + ReactDOM.render(EarningsTableElement('Earnings (Pre-Synchronization)', data), elems.currentEarningsInfo!) elems.taskProgressBar!.innerText = createProgressBarText({ progress: sleeve.currentTaskTime / sleeve.currentTaskMaxTime, totalTicks: 25, }); } else { - const lines = [ - `Earnings (Pre-Synchronization):`, - `Money: ${numeralWrapper.formatMoney(5 * sleeve.gainRatesForTask.money)} / s`, - `Hacking Exp: ${numeralWrapper.format(5 * sleeve.gainRatesForTask.hack, "0.00")} / s`, - `Strength Exp: ${numeralWrapper.format(5 * sleeve.gainRatesForTask.str, "0.00")} / s`, - `Defense Exp: ${numeralWrapper.format(5 * sleeve.gainRatesForTask.def, "0.00")} / s`, - `Dexterity Exp: ${numeralWrapper.format(5 * sleeve.gainRatesForTask.dex, "0.00")} / s`, - `Agility Exp: ${numeralWrapper.format(5 * sleeve.gainRatesForTask.agi, "0.00")} / s`, - `Charisma Exp: ${numeralWrapper.format(5 * sleeve.gainRatesForTask.cha, "0.00")} / s` + const data = [ + [`Money:`, `${numeralWrapper.formatMoney(5 * sleeve.gainRatesForTask.money)} / s`], + [`Hacking Exp:`, `${numeralWrapper.format(5 * sleeve.gainRatesForTask.hack, "0.00")} / s`], + [`Strength Exp:`, `${numeralWrapper.format(5 * sleeve.gainRatesForTask.str, "0.00")} / s`], + [`Defense Exp:`, `${numeralWrapper.format(5 * sleeve.gainRatesForTask.def, "0.00")} / s`], + [`Dexterity Exp:`, `${numeralWrapper.format(5 * sleeve.gainRatesForTask.dex, "0.00")} / s`], + [`Agility Exp:`, `${numeralWrapper.format(5 * sleeve.gainRatesForTask.agi, "0.00")} / s`], + [`Charisma Exp:`, `${numeralWrapper.format(5 * sleeve.gainRatesForTask.cha, "0.00")} / s`] ]; - if (repGainText !== "") { lines.push(repGainText); } - elems.currentEarningsInfo!.innerHTML = lines.join("
"); + let repGainText: string = ""; + if (sleeve.currentTask === SleeveTaskType.Company || sleeve.currentTask === SleeveTaskType.Faction) { + const repGain: number = sleeve.getRepGain(playerRef!); + data.push([`Reputation:`, `${numeralWrapper.format(5 * repGain, "0.00")} / s`]); + } + ReactDOM.render(EarningsTableElement('Earnings (Pre-Synchronization)', data), elems.currentEarningsInfo!) elems.taskProgressBar!.innerText = ""; } diff --git a/src/PersonObjects/Sleeve/ui/EarningsTableElement.tsx b/src/PersonObjects/Sleeve/ui/EarningsTableElement.tsx new file mode 100644 index 000000000..08aa317cd --- /dev/null +++ b/src/PersonObjects/Sleeve/ui/EarningsTableElement.tsx @@ -0,0 +1,20 @@ +import * as React from "react"; + +export function EarningsTableElement(title: string, stats: any[][]): React.ReactElement { + return (<> + {title} + + + {stats.map((stat: any[], i: number) => + {stat.map((s: any, i: number) => { + let style = {}; + if(i !== 0) { + style = {textAlign: "right"}; + } + return + })} + )} + +
{s}
+ ) +} diff --git a/src/PersonObjects/Sleeve/ui/StatsElement.tsx b/src/PersonObjects/Sleeve/ui/StatsElement.tsx new file mode 100644 index 000000000..19bbcbf4e --- /dev/null +++ b/src/PersonObjects/Sleeve/ui/StatsElement.tsx @@ -0,0 +1,58 @@ +import { Sleeve } from "../Sleeve"; +import { numeralWrapper } from "../../../ui/numeralFormat"; +import * as React from "react"; + +export function StatsElement(sleeve: Sleeve): React.ReactElement { + let style = {}; + style = { textAlign: "right" }; + return (<> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HP: {numeralWrapper.format(sleeve.hp, "0,0")} / {numeralWrapper.format(sleeve.max_hp, "0,0")}
City: {sleeve.city}
Hacking: {numeralWrapper.format(sleeve.hacking_skill, "0,0")}
Strength: {numeralWrapper.format(sleeve.strength, "0,0")}
Defense: {numeralWrapper.format(sleeve.defense, "0,0")}
Dexterity: {numeralWrapper.format(sleeve.dexterity, "0,0")}
Agility: {numeralWrapper.format(sleeve.agility, "0,0")}
Charisma: {numeralWrapper.format(sleeve.charisma, "0,0")}
Shock: {numeralWrapper.format(100 - sleeve.shock, "0,0.000")}
Sync: {numeralWrapper.format(sleeve.sync, "0,0.000")}
Memory: {numeralWrapper.format(sleeve.memory, "0")}
+ ) +} From 29ea1281e0ca38e471d0d9688181c0c039c05ade Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Mon, 15 Mar 2021 23:41:10 -0400 Subject: [PATCH 06/16] changelog --- src/Constants.ts | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/src/Constants.ts b/src/Constants.ts index 97a3b9c9e..cf7a811c6 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -230,32 +230,10 @@ export let CONSTANTS: IMap = { ` v0.49.2 - 2021-03-13 ------- - - BN8 - * A new bitnode multipler has been added, it lets you reduce money from a - server without gaining actually any money. This is important for BN8 where - hack/grow can influence the stock market. No money can be gained from - hacking but server money can still be reduced. - - Documentation - * readthedocs should now be more consistent and many examples were added. - - Netscript - * Ace editor will now correctly highlight all functions. - * 'tFormat' is a new netscript function that returns a human readable - representation of milliseconds. eg. "2 hours 15 minute 43 seconds" - - Gang - * style improvements - - Bladeburner - * style improvements - * fix bug where 'skill list SKILL' would crash if skill is level 0. - - Sleeve - * karma gain now scales with sync. + Factions + * Hacking factions no longer have hacking level requirements since their associated servers do. Misc. - Fix issue where the effective stats under Character>Stats were being calculated. + * Sleeve styling. ` } From c9fe8d9b65d7c67335b67f678134833935f63fff Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Tue, 16 Mar 2021 05:42:12 -0400 Subject: [PATCH 07/16] Sleeve UI improvements. --- package-lock.json | 70 +++++++++++++++- package.json | 1 + .../Sleeve/{SleeveUI.ts => SleeveUI.tsx} | 84 ++++--------------- src/PersonObjects/Sleeve/data/SleeveFaq.ts | 57 ------------- src/PersonObjects/Sleeve/data/SleeveFaq.tsx | 80 ++++++++++++++++++ .../Sleeve/ui/EarningsTableElement.tsx | 2 +- .../Sleeve/ui/MoreEarningsContent.tsx | 41 +++++++++ .../Sleeve/ui/MoreStatsContent.tsx | 39 +++++++++ src/ui/React/StatsTable.tsx | 24 ++++++ utils/DialogBox.d.ts | 2 +- utils/{DialogBox.js => DialogBox.jsx} | 37 ++++---- utils/ui/DialogBox.tsx | 8 ++ 12 files changed, 295 insertions(+), 150 deletions(-) rename src/PersonObjects/Sleeve/{SleeveUI.ts => SleeveUI.tsx} (82%) delete mode 100644 src/PersonObjects/Sleeve/data/SleeveFaq.ts create mode 100644 src/PersonObjects/Sleeve/data/SleeveFaq.tsx create mode 100644 src/PersonObjects/Sleeve/ui/MoreEarningsContent.tsx create mode 100644 src/PersonObjects/Sleeve/ui/MoreStatsContent.tsx create mode 100644 src/ui/React/StatsTable.tsx rename utils/{DialogBox.js => DialogBox.jsx} (65%) create mode 100644 utils/ui/DialogBox.tsx diff --git a/package-lock.json b/package-lock.json index 83f71734c..385c9c483 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "bitburner", - "version": "0.47.3", + "version": "0.49.2", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "0.47.3", + "version": "0.49.2", "hasInstallScript": true, "license": "SEE LICENSE IN license.txt", "dependencies": { @@ -38,6 +38,7 @@ "numeral": "2.0.6", "react": "^16.8.3", "react-dom": "^16.8.3", + "react-modal": "^3.12.1", "sprintf-js": "^1.1.1", "tapable": "^1.0.0", "uuid": "^3.2.1", @@ -4571,6 +4572,11 @@ "node": ">=0.10.0" } }, + "node_modules/exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=" + }, "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -11779,6 +11785,29 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.3.tgz", "integrity": "sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA==" }, + "node_modules/react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, + "node_modules/react-modal": { + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.12.1.tgz", + "integrity": "sha512-WGuXn7Fq31PbFJwtWmOk+jFtGC7E9tJVbFX0lts8ZoS5EPi9+WWylUJWLKKVm3H4GlQ7ZxY7R6tLlbSIBQ5oZA==", + "dependencies": { + "exenv": "^1.2.0", + "prop-types": "^15.5.10", + "react-lifecycles-compat": "^3.0.0", + "warning": "^4.0.3" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "react": "^0.14.0 || ^15.0.0 || ^16 || ^17", + "react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17" + } + }, "node_modules/readable-stream": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz", @@ -15999,6 +16028,14 @@ "xml-name-validator": "3.0.0" } }, + "node_modules/warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/watchpack": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", @@ -21422,6 +21459,11 @@ "clone-regexp": "1.0.1" } }, + "exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=" + }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -27426,6 +27468,22 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.3.tgz", "integrity": "sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA==" }, + "react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, + "react-modal": { + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.12.1.tgz", + "integrity": "sha512-WGuXn7Fq31PbFJwtWmOk+jFtGC7E9tJVbFX0lts8ZoS5EPi9+WWylUJWLKKVm3H4GlQ7ZxY7R6tLlbSIBQ5oZA==", + "requires": { + "exenv": "^1.2.0", + "prop-types": "^15.5.10", + "react-lifecycles-compat": "^3.0.0", + "warning": "^4.0.3" + } + }, "readable-stream": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz", @@ -31040,6 +31098,14 @@ "xml-name-validator": "3.0.0" } }, + "warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "requires": { + "loose-envify": "^1.0.0" + } + }, "watchpack": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", diff --git a/package.json b/package.json index e38731864..daa83c394 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "numeral": "2.0.6", "react": "^16.8.3", "react-dom": "^16.8.3", + "react-modal": "^3.12.1", "sprintf-js": "^1.1.1", "tapable": "^1.0.0", "uuid": "^3.2.1", diff --git a/src/PersonObjects/Sleeve/SleeveUI.ts b/src/PersonObjects/Sleeve/SleeveUI.tsx similarity index 82% rename from src/PersonObjects/Sleeve/SleeveUI.ts rename to src/PersonObjects/Sleeve/SleeveUI.tsx index dc5683296..754d774e0 100644 --- a/src/PersonObjects/Sleeve/SleeveUI.ts +++ b/src/PersonObjects/Sleeve/SleeveUI.tsx @@ -41,6 +41,9 @@ import { removeElementById } from "../../../utils/uiHelpers/removeElementById"; import { EarningsTableElement } from "./ui/EarningsTableElement"; import { StatsElement } from "./ui/StatsElement"; +import { MoreStatsContent } from "./ui/MoreStatsContent"; +import { MoreEarningsContent } from "./ui/MoreEarningsContent"; +import * as React from "react"; import * as ReactDOM from "react-dom"; // Object that keeps track of all DOM elements for the UI for a single Sleeve @@ -100,8 +103,8 @@ export function createSleevesPage(p: IPlayer) { class: "sleeves-page-info", innerHTML: "

Sleeves

Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your " + "consciousness has been copied. In other words, these Synthoids contain " + - "a perfect duplicate of your mind.

" + - "Sleeves can be used to perform different tasks synchronously.

", + "a perfect duplicate of your mind.

" + + "Sleeves can be used to perform different tasks synchronously.

", }); UIElems.faqButton = createElement("button", { @@ -163,7 +166,7 @@ export function clearSleevesPage() { } for (const prop in UIElems) { - (UIElems)[prop] = null; + (UIElems as any)[prop] = null; } playerRef = null; @@ -204,35 +207,7 @@ function createSleeveUi(sleeve: Sleeve, allSleeves: Sleeve[]): ISleeveUIElems { class: "std-button", innerText: "More Stats", clickListener: () => { - dialogBoxCreate( - [ - "

Stats:

", - `Hacking: ${sleeve.hacking_skill} (${numeralWrapper.formatBigNumber(sleeve.hacking_exp)} exp)`, - `Strength: ${sleeve.strength} (${numeralWrapper.formatBigNumber(sleeve.strength_exp)} exp)`, - `Defense: ${sleeve.defense} (${numeralWrapper.formatBigNumber(sleeve.defense_exp)} exp)`, - `Dexterity: ${sleeve.dexterity} (${numeralWrapper.formatBigNumber(sleeve.dexterity_exp)} exp)`, - `Agility: ${sleeve.agility} (${numeralWrapper.formatBigNumber(sleeve.agility_exp)} exp)`, - `Charisma: ${sleeve.charisma} (${numeralWrapper.formatBigNumber(sleeve.charisma_exp)} exp)
`, - "

Multipliers:

", - `Hacking Level multiplier: ${numeralWrapper.formatPercentage(sleeve.hacking_mult)}`, - `Hacking Experience multiplier: ${numeralWrapper.formatPercentage(sleeve.hacking_exp_mult)}`, - `Strength Level multiplier: ${numeralWrapper.formatPercentage(sleeve.strength_mult)}`, - `Strength Experience multiplier: ${numeralWrapper.formatPercentage(sleeve.strength_exp_mult)}`, - `Defense Level multiplier: ${numeralWrapper.formatPercentage(sleeve.defense_mult)}`, - `Defense Experience multiplier: ${numeralWrapper.formatPercentage(sleeve.defense_exp_mult)}`, - `Dexterity Level multiplier: ${numeralWrapper.formatPercentage(sleeve.dexterity_mult)}`, - `Dexterity Experience multiplier: ${numeralWrapper.formatPercentage(sleeve.dexterity_exp_mult)}`, - `Agility Level multiplier: ${numeralWrapper.formatPercentage(sleeve.agility_mult)}`, - `Agility Experience multiplier: ${numeralWrapper.formatPercentage(sleeve.agility_exp_mult)}`, - `Charisma Level multiplier: ${numeralWrapper.formatPercentage(sleeve.charisma_mult)}`, - `Charisma Experience multiplier: ${numeralWrapper.formatPercentage(sleeve.charisma_exp_mult)}`, - `Faction Reputation Gain multiplier: ${numeralWrapper.formatPercentage(sleeve.faction_rep_mult)}`, - `Company Reputation Gain multiplier: ${numeralWrapper.formatPercentage(sleeve.company_rep_mult)}`, - `Salary multiplier: ${numeralWrapper.formatPercentage(sleeve.work_money_mult)}`, - `Crime Money multiplier: ${numeralWrapper.formatPercentage(sleeve.crime_money_mult)}`, - `Crime Success multiplier: ${numeralWrapper.formatPercentage(sleeve.crime_success_mult)}`, - ].join("
"), false - ); + dialogBoxCreate(MoreStatsContent(sleeve)); } }); elems.travelButton = createElement("button", { @@ -261,7 +236,7 @@ function createSleeveUi(sleeve: Sleeve, allSleeves: Sleeve[]): ISleeveUIElems { dialogBoxCreate("You cannot afford to have this sleeve travel to another city", false); return false; } - sleeve.city = cityName; + sleeve.city = cityName as CityName; playerRef!.loseMoney(CONSTANTS.TravelCost); sleeve.resetTaskStatus(); removeElementById(popupId); @@ -332,34 +307,7 @@ function createSleeveUi(sleeve: Sleeve, allSleeves: Sleeve[]): ISleeveUIElems { class: "std-button", innerText: "More Earnings Info", clickListener: () => { - dialogBoxCreate( - [ - "

Earnings for Current Task:

", - `Money: ${numeralWrapper.formatMoney(sleeve.earningsForTask.money)}`, - `Hacking Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForTask.hack)}`, - `Strength Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForTask.str)}`, - `Defense Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForTask.def)}`, - `Dexterity Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForTask.dex)}`, - `Agility Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForTask.agi)}`, - `Charisma Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForTask.cha)}
`, - "

Total Earnings for Host Consciousness:

", - `Money: ${numeralWrapper.formatMoney(sleeve.earningsForPlayer.money)}`, - `Hacking Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.hack)}`, - `Strength Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.str)}`, - `Defense Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.def)}`, - `Dexterity Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.dex)}`, - `Agility Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.agi)}`, - `Charisma Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.cha)}
`, - "

Total Earnings for Other Sleeves:

", - `Money: ${numeralWrapper.formatMoney(sleeve.earningsForSleeves.money)}`, - `Hacking Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.hack)}`, - `Strength Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.str)}`, - `Defense Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.def)}`, - `Dexterity Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.dex)}`, - `Agility Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.agi)}`, - `Charisma Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.cha)}`, - ].join("
"), false - ); + dialogBoxCreate(MoreEarningsContent(sleeve)); } }); @@ -383,13 +331,13 @@ function updateSleeveUi(sleeve: Sleeve, elems: ISleeveUIElems) { if (sleeve.currentTask === SleeveTaskType.Crime) { const data = [ - [`Money`, `${numeralWrapper.formatMoney(parseFloat(sleeve.currentTaskLocation))}`, `(on success)`], - [`Hacking Exp`, `${numeralWrapper.format(sleeve.gainRatesForTask.hack, "0.00")}`, `(2x on success)`], - [`Strength Exp`, `${numeralWrapper.format(sleeve.gainRatesForTask.str, "0.00")}`, `(2x on success)`], - [`Defense Exp`, `${numeralWrapper.format(sleeve.gainRatesForTask.def, "0.00")}`, `(2x on success)`], - [`Dexterity Exp`, `${numeralWrapper.format(sleeve.gainRatesForTask.dex, "0.00")}`, `(2x on success)`], - [`Agility Exp`, `${numeralWrapper.format(sleeve.gainRatesForTask.agi, "0.00")}`, `(2x on success)`], - [`Charisma Exp`, `${numeralWrapper.format(sleeve.gainRatesForTask.cha, "0.00")}`, `(2x on success)`] + [`Money`, numeralWrapper.formatMoney(parseFloat(sleeve.currentTaskLocation)), `(on success)`], + [`Hacking Exp`, numeralWrapper.format(sleeve.gainRatesForTask.hack, "0.00"), `(2x on success)`], + [`Strength Exp`, numeralWrapper.format(sleeve.gainRatesForTask.str, "0.00"), `(2x on success)`], + [`Defense Exp`, numeralWrapper.format(sleeve.gainRatesForTask.def, "0.00"), `(2x on success)`], + [`Dexterity Exp`, numeralWrapper.format(sleeve.gainRatesForTask.dex, "0.00"), `(2x on success)`], + [`Agility Exp`, numeralWrapper.format(sleeve.gainRatesForTask.agi, "0.00"), `(2x on success)`], + [`Charisma Exp`, numeralWrapper.format(sleeve.gainRatesForTask.cha, "0.00"), `(2x on success)`] ]; ReactDOM.render(EarningsTableElement('Earnings (Pre-Synchronization)', data), elems.currentEarningsInfo!) diff --git a/src/PersonObjects/Sleeve/data/SleeveFaq.ts b/src/PersonObjects/Sleeve/data/SleeveFaq.ts deleted file mode 100644 index f05f4c506..000000000 --- a/src/PersonObjects/Sleeve/data/SleeveFaq.ts +++ /dev/null @@ -1,57 +0,0 @@ -export const SleeveFaq: string = -[ -"How do Duplicate Sleeves work?
", -"Duplicate Sleeves are essentially clones. You can use them to perform any work type", -"action, such as working for a company/faction or committing a crime.", -"Having sleeves perform these tasks earns you money, experience, and reputation.

", -"Sleeves are their own individuals, which means they each have their own", -"experience and stats.

", -"When a sleeve earns experience, it earns experience for itself, the player's", -"original 'consciousness', as well as all of the player's other sleeves.

", - -"What is Synchronization (Sync)?
", -"Synchronization is a measure of how aligned your consciousness is with", -"that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and", -"it affects how much experience is earned when the sleeve is performing a task.

", -"Let N be the sleeve's synchronization. When the sleeve earns experience by performing a", -"task, both the sleeve and the player's original host consciousness earn N%", -"of the amount of experience normally earned by the task. All of the player's", -"other sleeves earn ((N/100)^2 * 100)% of the experience.

", -"Synchronization can be increased by assigning sleeves to the 'Synchronize' task.

", - -"What is Shock?
", -"Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new", -"body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates", -"no shock. Shock affects the amount of experience earned by the sleeve.

", -"Sleeve shock slowly decreases over time. You can further increase the rate at which", -"it decreases by assigning sleeves to the 'Shock Recovery' task.

", - -"Why can't I work for this company or faction?
", -"Only one of your sleeves can work for a given company/faction a time.", -"To clarify further, if you have two sleeves they can work for two different", -"companies, but they cannot both work for the same company.

", - -"Why did my Sleeve stop working?
", -"Sleeves are subject to the same time restrictions as you. This means that", -"they automatically stop working at a company after 8 hours, and stop working", -"for a faction after 20 hours.

", - -"How do I buy Augmentations for my Sleeves?
", -"Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations", -"for it.

", - -"Why can't I buy the X Augmentation for my sleeve?
", -"Certain Augmentations, like Bladeburner-specific ones and NeuroFlux Governor,", -"are not available for sleeves.

", - -"Do sleeves get reset when installing Augmentations or switching BitNodes?
", -"Sleeves are reset when switching BitNodes, but not when installing Augmentations.

", - -"What is Memory?
", -"Sleeve memory dictates what a sleeve's synchronization will be", -"when its reset by switching BitNodes. For example, if a sleeve has a memory of 25,", -"then when you switch BitNodes its synchronization will initially be set to 25, rather than 1.

", -"Memory can only be increased by purchasing upgrades from The Covenant. It is a", -"persistent stat, meaning it never gets resets back to 1. The maximum possible", -"value for a sleeve's memory is 100." -].join(" "); diff --git a/src/PersonObjects/Sleeve/data/SleeveFaq.tsx b/src/PersonObjects/Sleeve/data/SleeveFaq.tsx new file mode 100644 index 000000000..7a8ccf844 --- /dev/null +++ b/src/PersonObjects/Sleeve/data/SleeveFaq.tsx @@ -0,0 +1,80 @@ +import * as React from "react"; + +export const SleeveFaq = (<> + How do Duplicate Sleeves work? +
+ Duplicate Sleeves are essentially clones. You can use them to perform any work type + action, such as working for a company/faction or committing a crime. + Having sleeves perform these tasks earns you money, experience, and reputation. +

+ Sleeves are their own individuals, which means they each have their own + experience and stats. +

+ When a sleeve earns experience, it earns experience for itself, the player's + original 'consciousness', as well as all of the player's other sleeves. +

+ + What is Synchronization (Sync)? +
+ Synchronization is a measure of how aligned your consciousness is with + that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and + it affects how much experience is earned when the sleeve is performing a task. +

+ Let N be the sleeve's synchronization. When the sleeve earns experience by performing a + task, both the sleeve and the player's original host consciousness earn N% + of the amount of experience normally earned by the task. All of the player's + other sleeves earn ((N/100)^2 * 100)% of the experience. +

+ Synchronization can be increased by assigning sleeves to the 'Synchronize' task. +

+ + What is Shock? +
+ Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new + body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates + no shock. Shock affects the amount of experience earned by the sleeve. +

+ Sleeve shock slowly decreases over time. You can further increase the rate at which + it decreases by assigning sleeves to the 'Shock Recovery' task. +

+ + Why can't I work for this company or faction? +
+ Only one of your sleeves can work for a given company/faction a time. + To clarify further, if you have two sleeves they can work for two different + companies, but they cannot both work for the same company. +

+ + Why did my Sleeve stop working? +
+ Sleeves are subject to the same time restrictions as you. This means that + they automatically stop working at a company after 8 hours, and stop working + for a faction after 20 hours. +

+ + How do I buy Augmentations for my Sleeves? +
+ Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations + for it. +

+ + Why can't I buy the X Augmentation for my sleeve? +
+ Certain Augmentations, like Bladeburner-specific ones and NeuroFlux Governor, + are not available for sleeves. +

+ + Do sleeves get reset when installing Augmentations or switching BitNodes?
+ Sleeves are reset when switching BitNodes, but not when installing Augmentations. +

+ + What is Memory? +
+ Sleeve memory dictates what a sleeve's synchronization will be + when its reset by switching BitNodes. For example, if a sleeve has a memory of 25, + then when you switch BitNodes its synchronization will initially be set to 25, rather than 1. +

+ Memory can only be increased by purchasing upgrades from The Covenant. It is a + persistent stat, meaning it never gets resets back to 1. The maximum possible + value for a sleeve's memory is 100. +); \ No newline at end of file diff --git a/src/PersonObjects/Sleeve/ui/EarningsTableElement.tsx b/src/PersonObjects/Sleeve/ui/EarningsTableElement.tsx index 08aa317cd..005c26cb2 100644 --- a/src/PersonObjects/Sleeve/ui/EarningsTableElement.tsx +++ b/src/PersonObjects/Sleeve/ui/EarningsTableElement.tsx @@ -2,7 +2,7 @@ import * as React from "react"; export function EarningsTableElement(title: string, stats: any[][]): React.ReactElement { return (<> - {title} +
{title}
{stats.map((stat: any[], i: number) => diff --git a/src/PersonObjects/Sleeve/ui/MoreEarningsContent.tsx b/src/PersonObjects/Sleeve/ui/MoreEarningsContent.tsx new file mode 100644 index 000000000..6df19f7e2 --- /dev/null +++ b/src/PersonObjects/Sleeve/ui/MoreEarningsContent.tsx @@ -0,0 +1,41 @@ +import { Sleeve } from "../Sleeve"; +import { numeralWrapper } from "../../../ui/numeralFormat"; +import * as React from "react"; +import { StatsTable } from "../../../ui/React/StatsTable"; + +export function MoreEarningsContent(sleeve: Sleeve): React.ReactElement { + let style = {} + style = {textAlign: 'right'}; + return (<> + {StatsTable([ + ['Money ', numeralWrapper.formatMoney(sleeve.earningsForTask.money)], + ['Hacking Exp ', numeralWrapper.formatBigNumber(sleeve.earningsForTask.hack)], + ['Strength Exp ', numeralWrapper.formatBigNumber(sleeve.earningsForTask.str)], + ['Defense Exp ', numeralWrapper.formatBigNumber(sleeve.earningsForTask.def)], + ['Dexterity Exp ', numeralWrapper.formatBigNumber(sleeve.earningsForTask.dex)], + ['Agility Exp ', numeralWrapper.formatBigNumber(sleeve.earningsForTask.agi)], + ['Charisma Exp ', numeralWrapper.formatBigNumber(sleeve.earningsForTask.cha)], + ], 'Earnings for Current Task:')} +
+ {StatsTable([ + ['Money: ', numeralWrapper.formatMoney(sleeve.earningsForPlayer.money)], + ['Hacking Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.hack)], + ['Strength Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.str)], + ['Defense Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.def)], + ['Dexterity Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.dex)], + ['Agility Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.agi)], + ['Charisma Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.cha)], + ], 'Total Earnings for Host Consciousness:')} +
+ {StatsTable([ + ['Money: ', numeralWrapper.formatMoney(sleeve.earningsForSleeves.money)], + ['Hacking Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.hack)], + ['Strength Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.str)], + ['Defense Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.def)], + ['Dexterity Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.dex)], + ['Agility Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.agi)], + ['Charisma Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.cha)], + ], 'Total Earnings for Other Sleeves:')} +
+ ); +} \ No newline at end of file diff --git a/src/PersonObjects/Sleeve/ui/MoreStatsContent.tsx b/src/PersonObjects/Sleeve/ui/MoreStatsContent.tsx new file mode 100644 index 000000000..4dfe39712 --- /dev/null +++ b/src/PersonObjects/Sleeve/ui/MoreStatsContent.tsx @@ -0,0 +1,39 @@ +import { Sleeve } from "../Sleeve"; +import { numeralWrapper } from "../../../ui/numeralFormat"; +import { StatsTable } from "../../../ui/React/StatsTable"; +import * as React from "react"; + +export function MoreStatsContent(sleeve: Sleeve): React.ReactElement { + let style = {} + style = {textAlign: 'right'}; + return (<> + {StatsTable([ + ['Hacking: ', sleeve.hacking_skill, `(${numeralWrapper.formatBigNumber(sleeve.hacking_exp)} exp)`], + ['Strength: ', sleeve.strength, `(${numeralWrapper.formatBigNumber(sleeve.strength_exp)} exp)`], + ['Defense: ', sleeve.defense, `(${numeralWrapper.formatBigNumber(sleeve.defense_exp)} exp)`], + ['Dexterity: ', sleeve.dexterity, `(${numeralWrapper.formatBigNumber(sleeve.dexterity_exp)} exp)`], + ['Agility: ', sleeve.agility, `(${numeralWrapper.formatBigNumber(sleeve.agility_exp)} exp)`], + ['Charisma: ', sleeve.charisma, `(${numeralWrapper.formatBigNumber(sleeve.charisma_exp)} exp)`], + ], 'Stats:')} +
+ {StatsTable([ + ['Hacking Level multiplier: ', numeralWrapper.formatPercentage(sleeve.hacking_mult)], + ['Hacking Experience multiplier: ', numeralWrapper.formatPercentage(sleeve.hacking_exp_mult)], + ['Strength Level multiplier: ', numeralWrapper.formatPercentage(sleeve.strength_mult)], + ['Strength Experience multiplier: ', numeralWrapper.formatPercentage(sleeve.strength_exp_mult)], + ['Defense Level multiplier: ', numeralWrapper.formatPercentage(sleeve.defense_mult)], + ['Defense Experience multiplier: ', numeralWrapper.formatPercentage(sleeve.defense_exp_mult)], + ['Dexterity Level multiplier: ', numeralWrapper.formatPercentage(sleeve.dexterity_mult)], + ['Dexterity Experience multiplier: ', numeralWrapper.formatPercentage(sleeve.dexterity_exp_mult)], + ['Agility Level multiplier: ', numeralWrapper.formatPercentage(sleeve.agility_mult)], + ['Agility Experience multiplier: ', numeralWrapper.formatPercentage(sleeve.agility_exp_mult)], + ['Charisma Level multiplier: ', numeralWrapper.formatPercentage(sleeve.charisma_mult)], + ['Charisma Experience multiplier: ', numeralWrapper.formatPercentage(sleeve.charisma_exp_mult)], + ['Faction Reputation Gain multiplier: ', numeralWrapper.formatPercentage(sleeve.faction_rep_mult)], + ['Company Reputation Gain multiplier: ', numeralWrapper.formatPercentage(sleeve.company_rep_mult)], + ['Salary multiplier: ', numeralWrapper.formatPercentage(sleeve.work_money_mult)], + ['Crime Money multiplier: ', numeralWrapper.formatPercentage(sleeve.crime_money_mult)], + ['Crime Success multiplier: ', numeralWrapper.formatPercentage(sleeve.crime_success_mult)], + ], 'Multipliers:')} + ); +} \ No newline at end of file diff --git a/src/ui/React/StatsTable.tsx b/src/ui/React/StatsTable.tsx new file mode 100644 index 000000000..e86aab8a0 --- /dev/null +++ b/src/ui/React/StatsTable.tsx @@ -0,0 +1,24 @@ +import * as React from "react"; + +export function StatsTable(rows: any[][], title: string | null): React.ReactElement { + let titleElem = <> + if (title) { + titleElem = <>

{title}


; + } + return (<> + {titleElem} +
+ + {rows.map((row: any[]) => { + return + {row.map((elem: any, i: number) => { + let style = {}; + if (i !== 0) style = {textAlign: 'right'}; + return + })} + + })} + +
{elem}
+ ); +} \ No newline at end of file diff --git a/utils/DialogBox.d.ts b/utils/DialogBox.d.ts index 49f6c5a57..7273671cb 100644 --- a/utils/DialogBox.d.ts +++ b/utils/DialogBox.d.ts @@ -1,2 +1,2 @@ -export function dialogBoxCreate(txt: string, preformatted?: boolean): void; +export function dialogBoxCreate(txt: string | JSX.Element, preformatted?: boolean): void; export var dialogBoxOpened: boolean; diff --git a/utils/DialogBox.js b/utils/DialogBox.jsx similarity index 65% rename from utils/DialogBox.js rename to utils/DialogBox.jsx index 8f59abe1a..5a93cb23f 100644 --- a/utils/DialogBox.js +++ b/utils/DialogBox.jsx @@ -1,4 +1,7 @@ import { KEY } from "./helpers/keyCodes"; +import { DialogBox } from "./ui/DialogBox"; +import React from "react"; +import ReactDOM from "react-dom"; /** * Create and display a pop-up dialog box. @@ -41,32 +44,24 @@ document.addEventListener("keydown", function (event) { let dialogBoxOpened = false; + + function dialogBoxCreate(txt, preformatted=false) { - var container = document.createElement("div"); + const container = document.createElement("div"); container.setAttribute("class", "dialog-box-container"); - var content = document.createElement("div"); - content.setAttribute("class", "dialog-box-content"); - - var closeButton = document.createElement("span"); - closeButton.setAttribute("class", "dialog-box-close-button"); - closeButton.innerHTML = "×" - - var textE; - if (preformatted) { - // For text files as they are often computed data that - // shouldn't be wrapped and should retain tabstops. - textE = document.createElement("pre"); - textE.innerHTML = txt; - } else { - textE = document.createElement("p"); - textE.innerHTML = txt.replace(/(?:\r\n|\r|\n)/g, '
'); + let elem = txt; + if (typeof txt === 'string') { + if (preformatted) { + // For text files as they are often computed data that + // shouldn't be wrapped and should retain tabstops. + elem =
+        } else {
+            elem = 

') }} /> + } } - content.appendChild(closeButton); - content.appendChild(textE); - container.appendChild(content); - + ReactDOM.render(DialogBox(elem), container); document.body.appendChild(container); if (dialogBoxes.length >= 1) { container.style.visibility = "hidden"; diff --git a/utils/ui/DialogBox.tsx b/utils/ui/DialogBox.tsx new file mode 100644 index 000000000..9155ef809 --- /dev/null +++ b/utils/ui/DialogBox.tsx @@ -0,0 +1,8 @@ +import * as React from "react"; + +export function DialogBox(content: HTMLElement): React.ReactElement { + return (

+ × + {content} +
); +} From 4c30f107e3642876eaadc2445c76623b75e43ed8 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Tue, 16 Mar 2021 06:01:15 -0400 Subject: [PATCH 08/16] convert more netscript functions to use common error message --- src/NetscriptFunctions.js | 32 ++++++++++++++++---------------- src/engine.jsx | 9 +++++---- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index 257eb4fcf..5de0d085e 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -329,10 +329,10 @@ function NetscriptFunctions(workerScript) { */ const checkTixApiAccess = function(callingFn="") { if (!Player.hasWseAccount) { - throw makeRuntimeRejectMsg(workerScript, `You don't have WSE Access! Cannot use ${callingFn}()`); + throw makeRuntimeErrorMsg(callingFn, `You don't have WSE Access! Cannot use ${callingFn}()`); } if (!Player.hasTixApiAccess) { - throw makeRuntimeRejectMsg(workerScript, `You don't have TIX API Access! Cannot use ${callingFn}()`); + throw makeRuntimeErrorMsg(callingFn, `You don't have TIX API Access! Cannot use ${callingFn}()`); } } @@ -344,7 +344,7 @@ function NetscriptFunctions(workerScript) { const getStockFromSymbol = function(symbol, callingFn="") { const stock = SymbolToStockMap[symbol]; if (stock == null) { - throw makeRuntimeRejectMsg(workerScript, `Invalid stock symbol passed into ${callingFn}()`); + throw makeRuntimeErrorMsg(callingFn, `Invalid stock symbol: '${symbol}'`); } return stock; @@ -367,18 +367,18 @@ function NetscriptFunctions(workerScript) { } // Utility function to get Hacknet Node object - const getHacknetNode = function(i) { + const getHacknetNode = function(i, callingFn="") { if (isNaN(i)) { - throw makeRuntimeRejectMsg(workerScript, "Invalid index specified for Hacknet Node: " + i); + throw makeRuntimeErrorMsg(callingFn, "Invalid index specified for Hacknet Node: " + i); } if (i < 0 || i >= Player.hacknetNodes.length) { - throw makeRuntimeRejectMsg(workerScript, "Index specified for Hacknet Node is out-of-bounds: " + i); + throw makeRuntimeErrorMsg(callingFn, "Index specified for Hacknet Node is out-of-bounds: " + i); } if (hasHacknetServers()) { const hserver = AllServers[Player.hacknetNodes[i]]; if (hserver == null) { - throw makeRuntimeRejectMsg(workerScript, `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`); + throw makeRuntimeErrorMsg(callingFn, `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`); } return hserver; @@ -579,7 +579,7 @@ function NetscriptFunctions(workerScript) { } }, getNodeStats : function(i) { - const node = getHacknetNode(i); + const node = getHacknetNode(i, "getNodeStats"); const hasUpgraded = hasHacknetServers(); const res = { name: hasUpgraded ? node.hostname : node.name, @@ -599,20 +599,20 @@ function NetscriptFunctions(workerScript) { return res; }, upgradeLevel : function(i, n) { - const node = getHacknetNode(i); + const node = getHacknetNode(i, "upgradeLevel"); return purchaseLevelUpgrade(node, n); }, upgradeRam : function(i, n) { - const node = getHacknetNode(i); + const node = getHacknetNode(i, "upgradeRam"); return purchaseRamUpgrade(node, n); }, upgradeCore : function(i, n) { - const node = getHacknetNode(i); + const node = getHacknetNode(i, "upgradeCore"); return purchaseCoreUpgrade(node, n); }, upgradeCache : function(i, n) { if (!hasHacknetServers()) { return false; } - const node = getHacknetNode(i); + const node = getHacknetNode(i, "upgradeCache"); const res = purchaseCacheUpgrade(node, n); if (res) { updateHashManagerCapacity(); @@ -620,20 +620,20 @@ function NetscriptFunctions(workerScript) { return res; }, getLevelUpgradeCost : function(i, n) { - const node = getHacknetNode(i); + const node = getHacknetNode(i, "upgradeLevel"); return node.calculateLevelUpgradeCost(n, Player.hacknet_node_level_cost_mult); }, getRamUpgradeCost : function(i, n) { - const node = getHacknetNode(i); + const node = getHacknetNode(i, "upgradeRam"); return node.calculateRamUpgradeCost(n, Player.hacknet_node_ram_cost_mult); }, getCoreUpgradeCost : function(i, n) { - const node = getHacknetNode(i); + const node = getHacknetNode(i, "upgradeCore"); return node.calculateCoreUpgradeCost(n, Player.hacknet_node_core_cost_mult); }, getCacheUpgradeCost : function(i, n) { if (!hasHacknetServers()) { return Infinity; } - const node = getHacknetNode(i); + const node = getHacknetNode(i, "upgradeCache"); return node.calculateCacheUpgradeCost(n); }, numHashes : function() { diff --git a/src/engine.jsx b/src/engine.jsx index a544ca202..23f89bdfc 100644 --- a/src/engine.jsx +++ b/src/engine.jsx @@ -1149,10 +1149,11 @@ const Engine = { Engine.start(); // Run main game loop and Scripts loop removeLoadingScreen(); const timeOfflineString = convertTimeMsToTimeElapsedString(time); - dialogBoxCreate(`Offline for ${timeOfflineString}. While you were offline, your scripts ` + - "generated " + - numeralWrapper.formatMoney(offlineProductionFromScripts) + " " + - "and your Hacknet Nodes generated " + hacknetProdInfo + ""); + dialogBoxCreate(<> + Offline for {timeOfflineString}. While you were offline, your scripts generated + {numeralWrapper.formatMoney(offlineProductionFromScripts)} + and your Hacknet Nodes generated {hacknetProdInfo}. + ); // Close main menu accordions for loaded game var visibleMenuTabs = [terminal, createScript, activeScripts, stats, hacknetnodes, city, tutorial, options, dev]; From bf4d841f884524eaef0bff62ff8e7879d9e7c8cd Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Wed, 17 Mar 2021 13:40:31 -0400 Subject: [PATCH 09/16] align aug mults in bladeburner, faction augmentation now display required rep in 0.000a --- src/Bladeburner.js | 28 +++++++++------------ src/Faction/ui/PurchaseableAugmentation.tsx | 2 +- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/Bladeburner.js b/src/Bladeburner.js index 2ff0b5850..abd21897b 100644 --- a/src/Bladeburner.js +++ b/src/Bladeburner.js @@ -50,6 +50,9 @@ import { createPopup } from "../utils/uiHelpers/createPopup"; import { removeElement } from "../utils/uiHelpers/removeElement"; import { removeElementById } from "../utils/uiHelpers/removeElementById"; +import { StatsTable } from "./ui/React/StatsTable"; +import ReactDOM from "react-dom"; + const stealthIcon = ` ` const killIcon = `` @@ -1211,10 +1214,7 @@ Bladeburner.prototype.initializeDomElementRefs = function() { overviewChaos: null, overviewSkillPoints: null, overviewBonusTime: null, - overviewAugSuccessMult: null, - overviewAugMaxStaminaMult: null, - overviewAugStaminaGainMult: null, - overviewAugAnalysisMult: null, + overviewAugMults: null, // Actions and Skills Content actionsAndSkillsDesc: null, @@ -1397,10 +1397,7 @@ Bladeburner.prototype.createOverviewContent = function() { DomElems.overviewSkillPoints = createElement("p", {display:"block"}); - DomElems.overviewAugSuccessMult = createElement("p", {display:"block"}); - DomElems.overviewAugMaxStaminaMult = createElement("p", {display:"block"}); - DomElems.overviewAugStaminaGainMult = createElement("p", {display:"block"}); - DomElems.overviewAugAnalysisMult = createElement("p", {display:"block"}); + DomElems.overviewAugMults = createElement("div", {display:"block"}); DomElems.overviewDiv.appendChild(DomElems.overviewRank); @@ -1418,10 +1415,7 @@ Bladeburner.prototype.createOverviewContent = function() { DomElems.overviewDiv.appendChild(DomElems.overviewBonusTime); DomElems.overviewDiv.appendChild(DomElems.overviewSkillPoints); appendLineBreaks(DomElems.overviewDiv, 1); - DomElems.overviewDiv.appendChild(DomElems.overviewAugSuccessMult); - DomElems.overviewDiv.appendChild(DomElems.overviewAugMaxStaminaMult); - DomElems.overviewDiv.appendChild(DomElems.overviewAugStaminaGainMult); - DomElems.overviewDiv.appendChild(DomElems.overviewAugAnalysisMult); + DomElems.overviewDiv.appendChild(DomElems.overviewAugMults); // Travel to new city button appendLineBreaks(DomElems.overviewDiv, 1); @@ -1783,10 +1777,12 @@ Bladeburner.prototype.updateOverviewContent = function() { DomElems.overviewChaos.childNodes[0].nodeValue = "City Chaos: " + formatNumber(this.getCurrentCity().chaos); DomElems.overviewSkillPoints.innerText = "Skill Points: " + formatNumber(this.skillPoints, 0); DomElems.overviewBonusTime.childNodes[0].nodeValue = "Bonus time: " + convertTimeMsToTimeElapsedString(this.storedCycles/BladeburnerConstants.CyclesPerSecond*1000); - DomElems.overviewAugSuccessMult.innerText = "Aug. Success Chance Mult: " + formatNumber(Player.bladeburner_success_chance_mult*100, 1) + "%"; - DomElems.overviewAugMaxStaminaMult.innerText = "Aug. Max Stamina Mult: " + formatNumber(Player.bladeburner_max_stamina_mult*100, 1) + "%"; - DomElems.overviewAugStaminaGainMult.innerText = "Aug. Stamina Gain Mult: " + formatNumber(Player.bladeburner_stamina_gain_mult*100, 1) + "%"; - DomElems.overviewAugAnalysisMult.innerText = "Aug. Field Analysis Mult: " + formatNumber(Player.bladeburner_analysis_mult*100, 1) + "%"; + ReactDOM.render(StatsTable([ + ["Aug. Success Chance mult: ", formatNumber(Player.bladeburner_success_chance_mult*100, 1) + "%"], + ["Aug. Max Stamina mult: ", formatNumber(Player.bladeburner_max_stamina_mult*100, 1) + "%"], + ["Aug. Stamina Gain mult: ", formatNumber(Player.bladeburner_stamina_gain_mult*100, 1) + "%"], + ["Aug. Field Analysis mult: ", formatNumber(Player.bladeburner_analysis_mult*100, 1) + "%"], + ]), DomElems.overviewAugMults); } Bladeburner.prototype.updateActionAndSkillsContent = function() { diff --git a/src/Faction/ui/PurchaseableAugmentation.tsx b/src/Faction/ui/PurchaseableAugmentation.tsx index 89a8cb04e..0ac99525c 100644 --- a/src/Faction/ui/PurchaseableAugmentation.tsx +++ b/src/Faction/ui/PurchaseableAugmentation.tsx @@ -119,7 +119,7 @@ export class PurchaseableAugmentation extends React.Component { statusTxt = `UNLOCKED - ${numeralWrapper.formatMoney(moneyCost)}`; } else { disabled = true; - statusTxt = `LOCKED (Requires ${numeralWrapper.format(repCost, "0,0.0")} faction reputation - ${numeralWrapper.formatMoney(moneyCost)})`; + statusTxt = `LOCKED (Requires ${numeralWrapper.format(repCost, "0.000a")} faction reputation - ${numeralWrapper.formatMoney(moneyCost)})`; color = "red"; } From dc79f7a940475d905ad1f804132f15f7f4cc3bdc Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Thu, 18 Mar 2021 14:37:21 -0400 Subject: [PATCH 10/16] Add ram cost to softReset documentation --- doc/source/netscript/singularityfunctions/softReset.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/source/netscript/singularityfunctions/softReset.rst b/doc/source/netscript/singularityfunctions/softReset.rst index 066d196db..1b0257e64 100644 --- a/doc/source/netscript/singularityfunctions/softReset.rst +++ b/doc/source/netscript/singularityfunctions/softReset.rst @@ -3,6 +3,8 @@ softReset() Netscript Function .. js:function:: softReset() + :RAM cost: 5 GB + If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. This function will perform a reset even if you don't have any augmentation installed. From e0745d775730a521270c6881caba4dd9eb0b3f69 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 19 Mar 2021 22:54:10 -0400 Subject: [PATCH 11/16] remove wiki button from hacking mission, fix jsx class not being className --- src/Missions.js | 10 ---------- src/engine.jsx | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Missions.js b/src/Missions.js index e702ff579..062b46254 100644 --- a/src/Missions.js +++ b/src/Missions.js @@ -305,15 +305,6 @@ HackingMission.prototype.createPageDom = function() { return false; }); - var wikiGuideBtn = document.createElement("a"); - wikiGuideBtn.innerText = "Wiki Guide"; - wikiGuideBtn.classList.add("a-link-button"); - wikiGuideBtn.style.display = "inline-block"; - wikiGuideBtn.classList.add("hack-mission-header-element"); - wikiGuideBtn.target = "_blank"; - // TODO Add link to wiki page wikiGuideBtn.href = - - // Start button will get replaced with forfeit when game is started var startBtn = document.createElement("a"); startBtn.innerHTML = "Start"; @@ -490,7 +481,6 @@ HackingMission.prototype.createPageDom = function() { container.appendChild(headerText); container.appendChild(inGameGuideBtn); - container.appendChild(wikiGuideBtn); container.appendChild(startBtn); container.appendChild(forfeitMission); container.appendChild(timer); diff --git a/src/engine.jsx b/src/engine.jsx index 23f89bdfc..bffaec2bd 100644 --- a/src/engine.jsx +++ b/src/engine.jsx @@ -1151,8 +1151,8 @@ const Engine = { const timeOfflineString = convertTimeMsToTimeElapsedString(time); dialogBoxCreate(<> Offline for {timeOfflineString}. While you were offline, your scripts generated - {numeralWrapper.formatMoney(offlineProductionFromScripts)} - and your Hacknet Nodes generated {hacknetProdInfo}. + {numeralWrapper.formatMoney(offlineProductionFromScripts)} + and your Hacknet Nodes generated {hacknetProdInfo}. ); // Close main menu accordions for loaded game var visibleMenuTabs = [terminal, createScript, activeScripts, stats, From 670394ca2fa8bf149c949898c44efc8be27b8ca3 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 19 Mar 2021 22:56:43 -0400 Subject: [PATCH 12/16] format rep gain in hacking mission. --- src/Missions.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Missions.js b/src/Missions.js index 062b46254..f81de3c5e 100644 --- a/src/Missions.js +++ b/src/Missions.js @@ -5,6 +5,7 @@ import { Player } from "./Player"; import { dialogBoxCreate } from "../utils/DialogBox"; import { formatNumber } from "../utils/StringHelperFunctions"; +import { numeralWrapper } from "./ui/numeralFormat"; import { addOffset } from "../utils/helpers/addOffset"; import { getRandomInt } from "../utils/helpers/getRandomInt"; @@ -286,11 +287,8 @@ HackingMission.prototype.createPageDom = function() { var gain = this.reward * Player.faction_rep_mult * favorMult; var headerText = document.createElement("p"); headerText.innerHTML = "You are about to start a hacking mission! You will gain " + - formatNumber(gain, 3) + " faction reputation with " + this.faction.name + - " if you win. For more information " + - "about how hacking missions work, click one of the guide links " + - "below (one opens up an in-game guide and the other opens up " + - "the guide from the wiki). Click the 'Start' button to begin."; + numeralWrapper.format(gain, '0.000a') + " faction reputation with " + this.faction.name + + " if you win. Click the 'Start' button to begin."; headerText.style.display = "block"; headerText.classList.add("hack-mission-header-element"); headerText.style.width = "80%"; From 26149d5a017b00b37c94dfa99aef2818bdcf5b5f Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 19 Mar 2021 23:08:41 -0400 Subject: [PATCH 13/16] fix numeralWrapper should not return NaN anymore as it'll default to 1e+X. --- src/ui/numeralFormat.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ui/numeralFormat.ts b/src/ui/numeralFormat.ts index 67430636c..438701463 100644 --- a/src/ui/numeralFormat.ts +++ b/src/ui/numeralFormat.ts @@ -37,7 +37,12 @@ class NumeralFormatter { format(n: number, format: string): string { // numeraljs doesnt properly format numbers that are too big or too small if (Math.abs(n) < 1e-6) { n = 0; } - return numeral(n).format(format); + console.log(`${n}: ${numeral(n).format(format)}`); + const answer = numeral(n).format(format); + if (answer === 'NaN') { + return `${n}`; + } + return answer; } formatBigNumber(n: number): string { From 25078997620ac9f2111d98f9d653ed90958b7303 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sat, 20 Mar 2021 03:54:52 -0400 Subject: [PATCH 14/16] Mission format rep earned with 0.000a --- src/Missions.js | 3 ++- src/ui/numeralFormat.ts | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Missions.js b/src/Missions.js index f81de3c5e..f4ad73640 100644 --- a/src/Missions.js +++ b/src/Missions.js @@ -1515,7 +1515,8 @@ HackingMission.prototype.finishMission = function(win) { var favorMult = 1 + (this.faction.favor / 100); var gain = this.reward * Player.faction_rep_mult * favorMult; dialogBoxCreate("Mission won! You earned " + - formatNumber(gain, 3) + " reputation with " + this.faction.name); + numeralWrapper.format(gain, '0.000a') + " reputation with " + this.faction.name); + console.log(`diff ${this.difficulty}`); Player.gainIntelligenceExp(this.difficulty * CONSTANTS.IntelligenceHackingMissionBaseExpGain); this.faction.playerReputation += gain; } else { diff --git a/src/ui/numeralFormat.ts b/src/ui/numeralFormat.ts index 438701463..aa3b5a41a 100644 --- a/src/ui/numeralFormat.ts +++ b/src/ui/numeralFormat.ts @@ -37,7 +37,6 @@ class NumeralFormatter { format(n: number, format: string): string { // numeraljs doesnt properly format numbers that are too big or too small if (Math.abs(n) < 1e-6) { n = 0; } - console.log(`${n}: ${numeral(n).format(format)}`); const answer = numeral(n).format(format); if (answer === 'NaN') { return `${n}`; From 7232a786ed9b93cbbaef25cc2aab6505e9effe04 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sat, 20 Mar 2021 05:29:53 -0400 Subject: [PATCH 15/16] Intelligence rework, most intelligence gain have been multiplied by at least 100, if not more. All intelligence use have been reviewed and often boosted but by a percentage. Typically this means intelligence gives a 2-6% boost to everything for normal players and around 13% for int farmers. --- doc/source/changelog.rst | 50 ++++++++++++++----- .../getHackGrowWeakenTimes.rst | 15 ------ .../netscript/netscriptadvancedfunctions.rst | 1 - .../getAugmentationStats.rst | 14 ++++-- src/Bladeburner/Action.ts | 1 + src/Bladeburner/data/Constants.ts | 2 +- src/Constants.ts | 24 ++++++--- src/Crime/Crime.ts | 1 + src/Crime/Crimes.ts | 14 +++--- src/Hacking.ts | 21 ++++---- src/PersonObjects/IPlayer.ts | 1 + src/PersonObjects/IPlayerOrSleeve.ts | 2 + src/PersonObjects/Person.ts | 9 ++++ .../Player/PlayerObjectGeneralMethods.js | 15 ++++-- src/PersonObjects/Sleeve/Sleeve.ts | 2 +- src/Prestige.js | 2 +- src/RedPill.js | 6 +-- src/engine.jsx | 7 --- 18 files changed, 111 insertions(+), 76 deletions(-) delete mode 100644 doc/source/netscript/advancedfunctions/getHackGrowWeakenTimes.rst diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index 7d54ab04d..26c111755 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -3,39 +3,65 @@ Changelog ========= +v0.50.0 - 2021-03-20 Intelligence (hydroflame) +---------------------------------------------- + +**Intelligence** + +* int exp gain and effect has been reworked. It is now much more easy to + acquire and far more powerful. The goal here is to feel like players have + another tool in their arsenal. + +**Factions** + +* Hacking factions no longer have hacking level requirements since their associated servers do. + +**Misc.** + +* Sleeve styling. +* number formatting +* remove wiki button in Hacking Missions. +* Fix NaN displayed when very very large numbers are reached. v0.49.2 - 2021-03-13 (hydroflame) -------- +--------------------------------- + +**BN8** -BN8 * A new bitnode multipler has been added, it lets you reduce money from a server without gaining actually any money. This is important for BN8 where hack/grow can influence the stock market. No money can be gained from hacking but server money can still be reduced. -Documentation +**Documentation** + * readthedocs should now be more consistent and many examples were added. -Netscript +**Netscript** + * Ace editor will now correctly highlight all functions. * 'tFormat' is a new netscript function that returns a human readable representation of milliseconds. eg. "2 hours 15 minute 43 seconds" -Gang +**Gang** + * style improvements -Bladeburner +**Bladeburner** + * style improvements * fix bug where 'skill list SKILL' would crash if skill is level 0. -Sleeve +**Sleeve** + * karma gain now scales with sync. -Misc. -Fix issue where the effective stats under Character>Stats were being calculated. +**Misc.** + +* Fix issue where the effective stats under Character>Stats were being calculated. v0.49.0 - 2021-03-11 Source-File -1 (hydroflame) -------- +------------------------------------------------ **Source-File -1** @@ -63,7 +89,7 @@ v0.49.0 - 2021-03-11 Source-File -1 (hydroflame) v0.48.0 - ASCII - 2021-03-07 (hydroflame) -------- +----------------------------------------- **ASCII** @@ -135,7 +161,7 @@ v0.47.2 - 7/15/2019 * Added 'Solarized Dark' theme to CodeMirror editor * After Infiltration, you will now return to the company page rather than the city page * Bug fix: Stock Market UI should no longer crash for certain locale settings -* Bug fix: You can now properly remove unfinished programs (the *.exe-N%-INC files) +* Bug fix: You can now properly remove unfinished programs (the `*.exe-N%-INC` files) * Bug fix: Fixed an issue that allowed you to increase money on servers with a 'maxMoney' of 0 (like CSEC) * Bug fix: Scripts no longer persist if they were started with syntax/import errors * Bug fix: 'hack' and 'analyze' Terminal commands are now blocking diff --git a/doc/source/netscript/advancedfunctions/getHackGrowWeakenTimes.rst b/doc/source/netscript/advancedfunctions/getHackGrowWeakenTimes.rst deleted file mode 100644 index d07130126..000000000 --- a/doc/source/netscript/advancedfunctions/getHackGrowWeakenTimes.rst +++ /dev/null @@ -1,15 +0,0 @@ -getHackTime(), getGrowTime(), & getWeakenTime() -=============================================== - -The :js:func:`getHackTime`, :js:func:`getGrowTime`, and :js:func:`getWeakenTime` -all take an additional third optional parameter for specifying a specific intelligence -level to see how that would affect the hack/grow/weaken times. This parameter -defaults to your current intelligence level. - -(Intelligence is unlocked after obtaining Source-File 5). - -The function signatures are then:: - - getHackTime(hostname/ip[, hackLvl=current level, intLvl=current level]) - getGrowTime(hostname/ip[, hackLvl=current level, intLvl=current level]) - getWeakenTime(hostname/ip[, hackLvl=current level, intLvl=current level]) diff --git a/doc/source/netscript/netscriptadvancedfunctions.rst b/doc/source/netscript/netscriptadvancedfunctions.rst index 796494851..93c2323cb 100644 --- a/doc/source/netscript/netscriptadvancedfunctions.rst +++ b/doc/source/netscript/netscriptadvancedfunctions.rst @@ -9,4 +9,3 @@ they contain spoilers for the game. .. toctree:: getBitNodeMultipliers() - getHackTime(), getGrowTime(), & getWeakenTime() diff --git a/doc/source/netscript/singularityfunctions/getAugmentationStats.rst b/doc/source/netscript/singularityfunctions/getAugmentationStats.rst index 384b568a5..a73a073a4 100644 --- a/doc/source/netscript/singularityfunctions/getAugmentationStats.rst +++ b/doc/source/netscript/singularityfunctions/getAugmentationStats.rst @@ -9,8 +9,12 @@ getAugmentationStats() Netscript Function If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - ns.getAugmentationStats("Synfibril Muscle") - { - strength_mult: 1.3, - defense_mult: 1.3, - } + Examples: + + .. code-block:: javascript + + ns.getAugmentationStats("Synfibril Muscle") + { + strength_mult: 1.3, + defense_mult: 1.3, + } diff --git a/src/Bladeburner/Action.ts b/src/Bladeburner/Action.ts index 64ea44627..d2b78a011 100644 --- a/src/Bladeburner/Action.ts +++ b/src/Bladeburner/Action.ts @@ -214,6 +214,7 @@ export class Action { competence += (this.weights[stat] * Math.pow(effMultiplier*playerStatLvl, this.decays[stat])); } } + competence *= Player.getIntelligenceBonus(0.75); competence *= inst.calculateStaminaPenalty(); competence *= this.getTeamSuccessBonus(inst); diff --git a/src/Bladeburner/data/Constants.ts b/src/Bladeburner/data/Constants.ts index 62a0ddb3a..33b3d3d69 100644 --- a/src/Bladeburner/data/Constants.ts +++ b/src/Bladeburner/data/Constants.ts @@ -60,7 +60,7 @@ export const BladeburnerConstants: { ChaosThreshold: 50, // City chaos level after which it starts making tasks harder BaseStatGain: 1, // Base stat gain per second - BaseIntGain: 0.001, // Base intelligence stat gain + BaseIntGain: 0.003, // Base intelligence stat gain ActionCountGrowthPeriod: 480, // Time (s) it takes for action count to grow by its specified value diff --git a/src/Constants.ts b/src/Constants.ts index cf7a811c6..88b1c8c7f 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -6,7 +6,7 @@ import { IMap } from "./types"; export let CONSTANTS: IMap = { - Version: "0.49.2", + Version: "0.50.0", /** Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience * and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then @@ -75,14 +75,14 @@ export let CONSTANTS: IMap = { HospitalCostPerHp: 100e3, // Intelligence-related constants - IntelligenceCrimeWeight: 0.05, // Weight for how much int affects crime success rates + IntelligenceCrimeWeight: 0.025, // Weight for how much int affects crime success rates IntelligenceInfiltrationWeight: 0.1, // Weight for how much int affects infiltration success rates - IntelligenceCrimeBaseExpGain: 0.001, - IntelligenceProgramBaseExpGain: 500, // Program required hack level divided by this to determine int exp gain + IntelligenceCrimeBaseExpGain: 0.05, + IntelligenceProgramBaseExpGain: 2.5, // Program required hack level divided by this to determine int exp gain IntelligenceTerminalHackBaseExpGain: 200, // Hacking exp divided by this to determine int exp gain - IntelligenceSingFnBaseExpGain: 0.002, - IntelligenceClassBaseExpGain: 0.000001, - IntelligenceHackingMissionBaseExpGain: 0.03, // Hacking Mission difficulty multiplied by this to get exp gain + IntelligenceSingFnBaseExpGain: 1.5, + IntelligenceClassBaseExpGain: 0.01, + IntelligenceHackingMissionBaseExpGain: 3, // Hacking Mission difficulty multiplied by this to get exp gain // Hacking Missions // TODO Move this into Hacking Mission implementation @@ -228,12 +228,20 @@ export let CONSTANTS: IMap = { LatestUpdate: ` - v0.49.2 - 2021-03-13 + v0.50.0 - 2021-03-20 Intelligence (hydroflame) ------- + Intelligence + * int exp gain and effect has been reworked. It is now much more easy to + acquire and far more powerful. The goal here is to feel like players have + another tool in their arsenal. + Factions * Hacking factions no longer have hacking level requirements since their associated servers do. Misc. * Sleeve styling. + * number formatting + * remove wiki button in Hacking Missions. + * Fix NaN displayed when very very large numbers are reached. ` } diff --git a/src/Crime/Crime.ts b/src/Crime/Crime.ts index fa54abeb1..176069cf7 100644 --- a/src/Crime/Crime.ts +++ b/src/Crime/Crime.ts @@ -120,6 +120,7 @@ export class Crime { chance /= CONSTANTS.MaxSkillLevel; chance /= this.difficulty; chance *= p.crime_success_mult; + chance *= p.getIntelligenceBonus(1); return Math.min(chance, 1); } diff --git a/src/Crime/Crimes.ts b/src/Crime/Crimes.ts index bb8125127..79e9c7119 100644 --- a/src/Crime/Crimes.ts +++ b/src/Crime/Crimes.ts @@ -21,7 +21,7 @@ export const Crimes: IMap = { dexterity_success_weight: 2, agility_success_weight: 1, - intelligence_exp: 0.25 * CONSTANTS.IntelligenceCrimeBaseExpGain, + intelligence_exp: 7.5 * CONSTANTS.IntelligenceCrimeBaseExpGain, }), Mug: new Crime("Mug", CONSTANTS.CrimeMug, 4e3, 36e3, 1/5, 0.25, { @@ -45,7 +45,7 @@ export const Crimes: IMap = { dexterity_success_weight: 1, agility_success_weight: 1, - intelligence_exp: 0.5 * CONSTANTS.IntelligenceCrimeBaseExpGain, + intelligence_exp: 15 * CONSTANTS.IntelligenceCrimeBaseExpGain, }), DealDrugs: new Crime("Deal Drugs", CONSTANTS.CrimeDrugs, 10e3, 120e3, 1, 0.5, { @@ -66,7 +66,7 @@ export const Crimes: IMap = { hacking_success_weight: 0.05, dexterity_success_weight: 1.25, - intelligence_exp: 2 * CONSTANTS.IntelligenceCrimeBaseExpGain, + intelligence_exp: 60 * CONSTANTS.IntelligenceCrimeBaseExpGain, }), TraffickArms: new Crime("Traffick Arms", CONSTANTS.CrimeTraffickArms, 40e3, 600e3, 2, 1, { @@ -110,7 +110,7 @@ export const Crimes: IMap = { agility_success_weight: 2, charisma_success_weight: 2, - intelligence_exp: CONSTANTS.IntelligenceCrimeBaseExpGain, + intelligence_exp: 16 * CONSTANTS.IntelligenceCrimeBaseExpGain, }), Kidnap: new Crime("Kidnap", CONSTANTS.CrimeKidnap, 120e3, 3.6e6, 5, 6, { @@ -125,7 +125,7 @@ export const Crimes: IMap = { dexterity_success_weight: 1, agility_success_weight: 1, - intelligence_exp: 2 * CONSTANTS.IntelligenceCrimeBaseExpGain, + intelligence_exp: 26 * CONSTANTS.IntelligenceCrimeBaseExpGain, }), Assassination: new Crime("Assassination", CONSTANTS.CrimeAssassination, 300e3, 12e6, 8, 10, { @@ -138,7 +138,7 @@ export const Crimes: IMap = { dexterity_success_weight: 2, agility_success_weight: 1, - intelligence_exp: 5 * CONSTANTS.IntelligenceCrimeBaseExpGain, + intelligence_exp: 65 * CONSTANTS.IntelligenceCrimeBaseExpGain, kills: 1, }), @@ -158,6 +158,6 @@ export const Crimes: IMap = { agility_success_weight: 1, charisma_success_weight: 1, - intelligence_exp: 10 * CONSTANTS.IntelligenceCrimeBaseExpGain, + intelligence_exp: 130 * CONSTANTS.IntelligenceCrimeBaseExpGain, }), }; diff --git a/src/Hacking.ts b/src/Hacking.ts index fc3681e0d..61bca59a4 100644 --- a/src/Hacking.ts +++ b/src/Hacking.ts @@ -8,11 +8,10 @@ import { HacknetServer } from "./Hacknet/HacknetServer"; */ export function calculateHackingChance(server: Server): number { const hackFactor = 1.75; - const intFactor = 0.2; const difficultyMult = (100 - server.hackDifficulty) / 100; - const skillMult = (hackFactor * Player.hacking_skill) + (intFactor * Player.intelligence); + const skillMult = hackFactor * Player.hacking_skill; const skillChance = (skillMult - server.requiredHackingSkill) / skillMult; - const chance = skillChance * difficultyMult * Player.hacking_chance_mult; + const chance = skillChance * difficultyMult * Player.hacking_chance_mult * Player.getIntelligenceBonus(1); if (chance > 1) { return 1; } if (chance < 0) { return 0; } @@ -55,21 +54,19 @@ export function calculatePercentMoneyHacked(server: Server): number { /** * Returns time it takes to complete a hack on a server, in seconds */ -export function calculateHackingTime(server: Server, hack: number, int: number): number { +export function calculateHackingTime(server: Server, hack: number): number { const difficultyMult = server.requiredHackingSkill * server.hackDifficulty; const baseDiff = 500; const baseSkill = 50; const diffFactor = 2.5; - const intFactor = 0.1; if (hack == null) {hack = Player.hacking_skill;} - if (int == null) {int = Player.intelligence;} let skillFactor = (diffFactor * difficultyMult + baseDiff); // tslint:disable-next-line - skillFactor /= (hack + baseSkill + (intFactor * int)); + skillFactor /= (hack + baseSkill); const hackTimeMultiplier = 5; - const hackingTime = hackTimeMultiplier * skillFactor / Player.hacking_speed_mult; + const hackingTime = hackTimeMultiplier * skillFactor / (Player.hacking_speed_mult * Player.getIntelligenceBonus(1)); return hackingTime; } @@ -77,17 +74,17 @@ export function calculateHackingTime(server: Server, hack: number, int: number): /** * Returns time it takes to complete a grow operation on a server, in seconds */ -export function calculateGrowTime(server: Server, hack: number, int: number): number { +export function calculateGrowTime(server: Server, hack: number): number { const growTimeMultiplier = 3.2; // Relative to hacking time. 16/5 = 3.2 - return growTimeMultiplier * calculateHackingTime(server, hack, int); + return growTimeMultiplier * calculateHackingTime(server, hack); } /** * Returns time it takes to complete a weaken operation on a server, in seconds */ -export function calculateWeakenTime(server: Server, hack: number, int: number): number { +export function calculateWeakenTime(server: Server, hack: number): number { const weakenTimeMultiplier = 4; // Relative to hacking time - return weakenTimeMultiplier * calculateHackingTime(server, hack, int); + return weakenTimeMultiplier * calculateHackingTime(server, hack); } diff --git a/src/PersonObjects/IPlayer.ts b/src/PersonObjects/IPlayer.ts index 680973e31..f8de56873 100644 --- a/src/PersonObjects/IPlayer.ts +++ b/src/PersonObjects/IPlayer.ts @@ -178,4 +178,5 @@ export interface IPlayer { travel(to: CityName): boolean; giveExploit(exploit: Exploit): void; queryStatFromString(str: string): number; + getIntelligenceBonus(weight: number): number; } diff --git a/src/PersonObjects/IPlayerOrSleeve.ts b/src/PersonObjects/IPlayerOrSleeve.ts index 5271f7830..54cbbb22a 100644 --- a/src/PersonObjects/IPlayerOrSleeve.ts +++ b/src/PersonObjects/IPlayerOrSleeve.ts @@ -21,4 +21,6 @@ export interface IPlayerOrSleeve { // Multipliers crime_success_mult: number; + + getIntelligenceBonus(weight: number): number; } diff --git a/src/PersonObjects/Person.ts b/src/PersonObjects/Person.ts index 3e4dddd73..ec72f26c9 100644 --- a/src/PersonObjects/Person.ts +++ b/src/PersonObjects/Person.ts @@ -209,4 +209,13 @@ export abstract class Person { this.max_hp = Math.floor(10 + this.defense / 10); this.hp = Math.round(this.max_hp * ratio); } + + + getIntelligenceBonus(weight: number): number { + // 15 => +1.4% when you initially acquire int + // 50 => +3.8% mid game + // 100 => +6.6% late game + // 250 => +13.4% realistic best possible + return 1+(weight*Math.pow(this.intelligence, 0.8)/600); + } } diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.js b/src/PersonObjects/Player/PlayerObjectGeneralMethods.js index 050de0318..48fdeab0f 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.js +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.js @@ -821,7 +821,7 @@ export function startFactionHackWork(faction) { this.resetWorkStatus(); this.workHackExpGainRate = .15 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain; - this.workRepGainRate = this.workRepGainRate = (this.hacking_skill + this.intelligence) / CONSTANTS.MaxSkillLevel * this.faction_rep_mult; + this.workRepGainRate = (this.hacking_skill + this.intelligence) / CONSTANTS.MaxSkillLevel * this.faction_rep_mult * this.getIntelligenceBonus(0.5); this.factionWorkType = CONSTANTS.FactionWorkHacking; this.currentWorkFactionDescription = "carrying out hacking contracts"; @@ -869,7 +869,7 @@ export function workForFaction(numCycles) { //Constantly update the rep gain rate switch (this.factionWorkType) { case CONSTANTS.FactionWorkHacking: - this.workRepGainRate = (this.hacking_skill + this.intelligence) / CONSTANTS.MaxSkillLevel * this.faction_rep_mult; + this.workRepGainRate = (this.hacking_skill + this.intelligence) / CONSTANTS.MaxSkillLevel * this.faction_rep_mult * this.getIntelligenceBonus(0.5); break; case CONSTANTS.FactionWorkField: this.workRepGainRate = this.getFactionFieldWorkRepGain(); @@ -1157,7 +1157,7 @@ export function startCreateProgramWork(programName, time, reqLevel) { export function createProgramWork(numCycles) { //Higher hacking skill will allow you to create programs faster var reqLvl = this.createProgramReqLvl; - var skillMult = (this.hacking_skill / reqLvl); //This should always be greater than 1; + var skillMult = (this.hacking_skill / reqLvl) * this.getIntelligenceBonus(3); //This should always be greater than 1; skillMult = 1 + ((skillMult - 1) / 5); //The divider constant can be adjusted as necessary //Skill multiplier directly applied to "time worked" @@ -2305,4 +2305,13 @@ export function giveExploit(exploit) { if(!this.exploits.includes(exploit)) { this.exploits.push(exploit); } +} + + +export function getIntelligenceBonus(weight) { + // 15 => +1.4% when you initially acquire int + // 50 => +3.8% mid game + // 100 => +6.6% late game + // 250 => +13.4% realistic best possible + return 1+(weight*Math.pow(this.intelligence, 0.8)/600); } \ No newline at end of file diff --git a/src/PersonObjects/Sleeve/Sleeve.ts b/src/PersonObjects/Sleeve/Sleeve.ts index 53c7f9ff9..34f63312d 100644 --- a/src/PersonObjects/Sleeve/Sleeve.ts +++ b/src/PersonObjects/Sleeve/Sleeve.ts @@ -533,7 +533,7 @@ export class Sleeve extends Person { this.shock = Math.min(100, this.shock + (0.0002 * cyclesUsed)); break; case SleeveTaskType.Sync: - this.sync = Math.min(100, this.sync + (0.0002 * cyclesUsed)); + this.sync = Math.min(100, this.sync + (p.getIntelligenceBonus(0.5) * 0.0002 * cyclesUsed)); break; default: break; diff --git a/src/Prestige.js b/src/Prestige.js index 9dc2b5b7c..19bc56089 100755 --- a/src/Prestige.js +++ b/src/Prestige.js @@ -348,7 +348,7 @@ function prestigeSourceFile() { document.getElementById("world-menu-header").click(); // Gain int exp - Player.gainIntelligenceExp(5); + Player.gainIntelligenceExp(300); resetPidCounter(); } diff --git a/src/RedPill.js b/src/RedPill.js index 761db5f72..a1eb229a3 100644 --- a/src/RedPill.js +++ b/src/RedPill.js @@ -298,9 +298,9 @@ function createBitNodeYesNoEventListener(newBitNode, destroyedBitNode, flume=fal if (!flume) { giveSourceFile(destroyedBitNode); } else { - // If player used flume, subtract 5 int exp. The prestigeSourceFile() - // function below grants 5 int exp, so this allows sets net gain to 0 - Player.gainIntelligenceExp(-5); + // If player used flume, subtract 300 int exp. The prestigeSourceFile() + // function below grants 300 int exp, so this allows sets net gain to 0 + Player.gainIntelligenceExp(-300); } redPillFlag = false; var container = document.getElementById("red-pill-content"); diff --git a/src/engine.jsx b/src/engine.jsx index bffaec2bd..2cf46009b 100644 --- a/src/engine.jsx +++ b/src/engine.jsx @@ -196,13 +196,6 @@ const Engine = { // Display objects // TODO-Refactor this into its own component Display: { - // Progress bar - progress: null, - - // Display for status text (such as "Saved" or "Loaded") - statusText: null, - - hacking_skill: null, // Main menu content terminalContent: null, From e8aa1851c55be3c23a4c2d93ff61ff91ac0c9d26 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sat, 20 Mar 2021 05:32:38 -0400 Subject: [PATCH 16/16] build --- dist/engine.bundle.js | 4 ++-- dist/engineStyle.bundle.js | 2 +- dist/vendor.bundle.js | 24 ++++++++++++------------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index b6cb6c790..42662c7eb 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -1,4 +1,4 @@ -!function(e){function t(t){for(var r,o,s=t[0],l=t[1],c=t[2],m=0,p=[];m${e}`;r.getElementById("terminal-input").insertAdjacentHTML("beforebegin",a),function(){const e=r.getElementById("terminal-container");e.scrollTop=e.scrollHeight}()}t.post=function(e){a(e)},t.postError=function(e){a(`ERROR: ${e}`,{color:"#ff2929"})},t.hackProgressBarPost=function(e){a(e,{id:"hack-progress-bar"})},t.hackProgressPost=function(e){a(e,{id:"hack-progress"})},t.postContent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTANTS={Version:"0.49.2",MaxSkillLevel:975,MilliPerCycle:200,CorpFactionRepRequirement:2e5,BaseCostFor1GBOfRamHome:32e3,BaseCostFor1GBOfRamServer:55e3,TravelCost:2e5,BaseFavorToDonate:150,DonateMoneyToRepDivisor:1e6,FactionReputationToFavorBase:500,FactionReputationToFavorMult:1.02,CompanyReputationToFavorBase:500,CompanyReputationToFavorMult:1.02,NeuroFluxGovernorLevelMult:1.14,NumNetscriptPorts:20,HomeComputerMaxRam:1073741824,ServerBaseGrowthRate:1.03,ServerMaxGrowthRate:1.0035,ServerFortifyAmount:.002,ServerWeakenAmount:.05,PurchasedServerLimit:25,PurchasedServerMaxRam:1048576,AugmentationCostMultiplier:5,AugmentationRepMultiplier:2.5,MultipleAugMultiplier:1.9,TorRouterCost:2e5,InfiltrationBribeBaseAmount:1e5,InfiltrationMoneyValue:5e3,InfiltrationRepValue:1.4,InfiltrationExpPow:.8,WSEAccountCost:2e8,TIXAPICost:5e9,MarketData4SCost:1e9,MarketDataTixApi4SCost:25e9,StockMarketCommission:1e5,HospitalCostPerHp:1e5,IntelligenceCrimeWeight:.05,IntelligenceInfiltrationWeight:.1,IntelligenceCrimeBaseExpGain:.001,IntelligenceProgramBaseExpGain:500,IntelligenceTerminalHackBaseExpGain:200,IntelligenceSingFnBaseExpGain:.002,IntelligenceClassBaseExpGain:1e-6,IntelligenceHackingMissionBaseExpGain:.03,HackingMissionRepToDiffConversion:1e4,HackingMissionRepToRewardConversion:7,HackingMissionSpamTimeIncrease:25e3,HackingMissionTransferAttackIncrease:1.05,HackingMissionMiscDefenseIncrease:1.05,HackingMissionDifficultyToHacking:135,HackingMissionHowToPlay:"Hacking missions are a minigame that, if won, will reward you with faction reputation.

In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes are colored blue, while the enemy's are red. There are also other nodes on the map colored gray that initially belong to neither you nor the enemy. The goal of the game is to capture all of the enemy's Database nodes within the time limit. If you fail to do this, you will lose.

Each Node has three stats: Attack, Defense, and HP. There are five different actions that a Node can take:

Attack - Targets an enemy Node and lowers its HP. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.

Scan - Targets an enemy Node and lowers its Defense. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.

Weaken - Targets an enemy Node and lowers its Attack. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.

Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.

Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.

Note that when determining the effectiveness of the above actions, the TOTAL Attack or Defense of the team is used, not just the Attack/Defense of the individual Node that is performing the action.

To capture a Node, you must lower its HP down to 0.

There are six different types of Nodes:

CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action

Firewall - Nodes with high defense. These Nodes can 'Fortify'

Database - A special type of Node. The player's objective is to conquer all of the enemy's Database Nodes within the time limit. These Nodes cannot perform any actions

Spam - Conquering one of these Nodes will slow the enemy's trace, giving the player additional time to complete the mission. These Nodes cannot perform any actions

Transfer - Conquering one of these nodes will increase the Attack of all of your CPU Cores by a small fixed percentage. These Nodes are capable of performing every action except the 'Attack' action

Shield - Nodes with high defense. These Nodes can 'Fortify'

To assign an action to a Node, you must first select one of your Nodes. This can be done by simply clicking on it. Double-clicking a node will select all of your Nodes of the same type (e.g. select all CPU Core Nodes or all Transfer Nodes). Note that only Nodes that can perform actions (CPU Core, Transfer, Shield, Firewall) can be selected. Selected Nodes will be denoted with a white highlight. After selecting a Node or multiple Nodes, select its action using the Action Buttons near the top of the screen. Every action also has a corresponding keyboard shortcut.

For certain actions such as attacking, scanning, and weakening, the Node performing the action must have a target. To target another node, simply click-and-drag from the 'source' Node to a target. A Node can only have one target, and you can target any Node that is adjacent to one of your Nodes (immediately above, below, or to the side. NOT diagonal). Furthermore, only CPU Cores and Transfer Nodes can target, since they are the only ones that can perform the related actions. To remove a target, you can simply click on the line that represents the connection between one of your Nodes and its target. Alternatively, you can select the 'source' Node and click the 'Drop Connection' button, or press 'd'.

Other Notes:

-Whenever a miscellenaous Node (not owned by the player or enemy) is conquered, the defense of all remaining miscellaneous Nodes that are not actively being targeted will increase by a fixed percentage.

-Whenever a Node is conquered, its stats are significantly reduced

-Miscellaneous Nodes slowly raise their defense over time

-Nodes slowly regenerate health over time.",MillisecondsPer20Hours:72e6,GameCyclesPer20Hours:36e4,MillisecondsPer10Hours:36e6,GameCyclesPer10Hours:18e4,MillisecondsPer8Hours:288e5,GameCyclesPer8Hours:144e3,MillisecondsPer4Hours:144e5,GameCyclesPer4Hours:72e3,MillisecondsPer2Hours:72e5,GameCyclesPer2Hours:36e3,MillisecondsPerHour:36e5,GameCyclesPerHour:18e3,MillisecondsPerHalfHour:18e5,GameCyclesPerHalfHour:9e3,MillisecondsPerQuarterHour:9e5,GameCyclesPerQuarterHour:4500,MillisecondsPerFiveMinutes:3e5,GameCyclesPerFiveMinutes:1500,FactionWorkHacking:"Faction Hacking Work",FactionWorkField:"Faction Field Work",FactionWorkSecurity:"Faction Security Work",WorkTypeCompany:"Working for Company",WorkTypeCompanyPartTime:"Working for Company part-time",WorkTypeFaction:"Working for Faction",WorkTypeCreateProgram:"Working on Create a Program",WorkTypeStudyClass:"Studying or Taking a class at university",WorkTypeCrime:"Committing a crime",ClassStudyComputerScience:"studying Computer Science",ClassDataStructures:"taking a Data Structures course",ClassNetworks:"taking a Networks course",ClassAlgorithms:"taking an Algorithms course",ClassManagement:"taking a Management course",ClassLeadership:"taking a Leadership course",ClassGymStrength:"training your strength at a gym",ClassGymDefense:"training your defense at a gym",ClassGymDexterity:"training your dexterity at a gym",ClassGymAgility:"training your agility at a gym",ClassDataStructuresBaseCost:40,ClassNetworksBaseCost:80,ClassAlgorithmsBaseCost:320,ClassManagementBaseCost:160,ClassLeadershipBaseCost:320,ClassGymBaseCost:120,ClassStudyComputerScienceBaseExp:.5,ClassDataStructuresBaseExp:1,ClassNetworksBaseExp:2,ClassAlgorithmsBaseExp:4,ClassManagementBaseExp:2,ClassLeadershipBaseExp:4,CrimeShoplift:"shoplift",CrimeRobStore:"rob a store",CrimeMug:"mug someone",CrimeLarceny:"commit larceny",CrimeDrugs:"deal drugs",CrimeBondForgery:"forge corporate bonds",CrimeTraffickArms:"traffick illegal arms",CrimeHomicide:"commit homicide",CrimeGrandTheftAuto:"commit grand theft auto",CrimeKidnap:"kidnap someone for ransom",CrimeAssassination:"assassinate a high-profile target",CrimeHeist:"pull off the ultimate heist",CodingContractBaseFactionRepGain:2500,CodingContractBaseCompanyRepGain:4e3,CodingContractBaseMoneyGain:75e6,TotalNumBitNodes:24,LatestUpdate:"\n v0.49.2 - 2021-03-13\n -------\n\n BN8\n * A new bitnode multipler has been added, it lets you reduce money from a\n server without gaining actually any money. This is important for BN8 where\n hack/grow can influence the stock market. No money can be gained from\n hacking but server money can still be reduced.\n\n Documentation\n * readthedocs should now be more consistent and many examples were added.\n\n Netscript\n * Ace editor will now correctly highlight all functions.\n * 'tFormat' is a new netscript function that returns a human readable\n representation of milliseconds. eg. \"2 hours 15 minute 43 seconds\"\n\n Gang\n * style improvements\n\n Bladeburner\n * style improvements\n * fix bug where 'skill list SKILL' would crash if skill is level 0.\n\n Sleeve\n * karma gain now scales with sync.\n\n Misc.\n Fix issue where the effective stats under Character>Stats were being calculated.\n "}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48);function a(e){return e.every(r.isString)}t.replaceAt=function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)},t.convertTimeMsToTimeElapsedString=function(e){const t=Math.floor(e/1e3),n=Math.floor(t/86400),r=t%86400,a=Math.floor(r/3600),i=r%3600,o=Math.floor(i/60);let s="";return n>0&&(s+=`${n} days `),a>0&&(s+=`${a} hours `),o>0&&(s+=`${o} minutes `),s+=`${i%60} seconds`},t.longestCommonStart=function(e){if(!a(e))return"";if(0===e.length)return"";const t=e.concat().sort(),n=t[0],r=t[t.length-1],i=n.length;let o=0;const s=(e,t)=>e.toUpperCase()===t.toUpperCase();for(;o=0;e--)if(1===n[e].nodeType)return!0;return!1},t.generateRandomString=function(e){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let r=0;r=1&&(e(t.target).closest(a[0]).length||i())}),e(document).on("click",".dialog-box-close-button",function(e){i()}),document.addEventListener("keydown",function(e){e.keyCode==r.KEY.ESC&&o&&(i(),e.preventDefault())});let o=!1;function s(e,t=!1){var n=document.createElement("div");n.setAttribute("class","dialog-box-container");var r=document.createElement("div");r.setAttribute("class","dialog-box-content");var i,s=document.createElement("span");s.setAttribute("class","dialog-box-close-button"),s.innerHTML="×",t?(i=document.createElement("pre")).innerHTML=e:(i=document.createElement("p")).innerHTML=e.replace(/(?:\r\n|\r|\n)/g,"
"),r.appendChild(s),r.appendChild(i),n.appendChild(r),document.body.appendChild(n),a.length>=1&&(n.style.visibility="hidden"),a.push(n),setTimeout(function(){o=!0},400)}}.call(this,n(86))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RamCostConstants={ScriptBaseRamCost:1.6,ScriptDomRamCost:25,ScriptHackRamCost:.1,ScriptHackAnalyzeRamCost:1,ScriptGrowRamCost:.15,ScriptGrowthAnalyzeRamCost:1,ScriptWeakenRamCost:.15,ScriptScanRamCost:.2,ScriptPortProgramRamCost:.05,ScriptRunRamCost:1,ScriptExecRamCost:1.3,ScriptSpawnRamCost:2,ScriptScpRamCost:.6,ScriptKillRamCost:.5,ScriptHasRootAccessRamCost:.05,ScriptGetHostnameRamCost:.05,ScriptGetHackingLevelRamCost:.05,ScriptGetMultipliersRamCost:4,ScriptGetServerRamCost:.1,ScriptFileExistsRamCost:.1,ScriptIsRunningRamCost:.1,ScriptHacknetNodesRamCost:4,ScriptHNUpgLevelRamCost:.4,ScriptHNUpgRamRamCost:.6,ScriptHNUpgCoreRamCost:.8,ScriptGetStockRamCost:2,ScriptBuySellStockRamCost:2.5,ScriptGetPurchaseServerRamCost:.25,ScriptPurchaseServerRamCost:2.25,ScriptGetPurchasedServerLimit:.05,ScriptGetPurchasedServerMaxRam:.05,ScriptRoundRamCost:.05,ScriptReadWriteRamCost:1,ScriptArbScriptRamCost:1,ScriptGetScriptRamCost:.1,ScriptGetHackTimeRamCost:.05,ScriptGetFavorToDonate:.1,ScriptCodingContractBaseRamCost:10,ScriptSleeveBaseRamCost:4,ScriptSingularityFn1RamCost:2,ScriptSingularityFn2RamCost:3,ScriptSingularityFn3RamCost:5,ScriptGangApiBaseRamCost:4,ScriptBladeburnerApiBaseRamCost:4},t.RamCosts={hacknet:{numNodes:()=>0,purchaseNode:()=>0,getPurchaseNodeCost:()=>0,getNodeStats:()=>0,upgradeLevel:()=>0,upgradeRam:()=>0,upgradeCore:()=>0,upgradeCache:()=>0,getLevelUpgradeCost:()=>0,getRamUpgradeCost:()=>0,getCoreUpgradeCost:()=>0,getCacheUpgradeCost:()=>0,numHashes:()=>0,hashCost:()=>0,spendHashes:()=>0},sprintf:()=>0,vsprintf:()=>0,scan:()=>t.RamCostConstants.ScriptScanRamCost,hack:()=>t.RamCostConstants.ScriptHackRamCost,hackAnalyzeThreads:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,hackAnalyzePercent:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,hackChance:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,sleep:()=>0,grow:()=>t.RamCostConstants.ScriptGrowRamCost,growthAnalyze:()=>t.RamCostConstants.ScriptGrowthAnalyzeRamCost,weaken:()=>t.RamCostConstants.ScriptWeakenRamCost,print:()=>0,tprint:()=>0,clearLog:()=>0,disableLog:()=>0,enableLog:()=>0,isLogEnabled:()=>0,getScriptLogs:()=>0,nuke:()=>t.RamCostConstants.ScriptPortProgramRamCost,brutessh:()=>t.RamCostConstants.ScriptPortProgramRamCost,ftpcrack:()=>t.RamCostConstants.ScriptPortProgramRamCost,relaysmtp:()=>t.RamCostConstants.ScriptPortProgramRamCost,httpworm:()=>t.RamCostConstants.ScriptPortProgramRamCost,sqlinject:()=>t.RamCostConstants.ScriptPortProgramRamCost,run:()=>t.RamCostConstants.ScriptRunRamCost,exec:()=>t.RamCostConstants.ScriptExecRamCost,spawn:()=>t.RamCostConstants.ScriptSpawnRamCost,kill:()=>t.RamCostConstants.ScriptKillRamCost,killall:()=>t.RamCostConstants.ScriptKillRamCost,exit:()=>0,scp:()=>t.RamCostConstants.ScriptScpRamCost,ls:()=>t.RamCostConstants.ScriptScanRamCost,ps:()=>t.RamCostConstants.ScriptScanRamCost,hasRootAccess:()=>t.RamCostConstants.ScriptHasRootAccessRamCost,getIp:()=>t.RamCostConstants.ScriptGetHostnameRamCost,getHostname:()=>t.RamCostConstants.ScriptGetHostnameRamCost,getHackingLevel:()=>t.RamCostConstants.ScriptGetHackingLevelRamCost,getHackingMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getHacknetMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getBitNodeMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getServerMoneyAvailable:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerBaseSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMinSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerRequiredHackingLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMaxMoney:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerGrowth:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerNumPortsRequired:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerRam:()=>t.RamCostConstants.ScriptGetServerRamCost,serverExists:()=>t.RamCostConstants.ScriptGetServerRamCost,fileExists:()=>t.RamCostConstants.ScriptFileExistsRamCost,isRunning:()=>t.RamCostConstants.ScriptIsRunningRamCost,getStockSymbols:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockAskPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockBidPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPosition:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockMaxShares:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPurchaseCost:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockSaleGain:()=>t.RamCostConstants.ScriptGetStockRamCost,buyStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,sellStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,shortStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,sellShort:()=>t.RamCostConstants.ScriptBuySellStockRamCost,placeOrder:()=>t.RamCostConstants.ScriptBuySellStockRamCost,cancelOrder:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getOrders:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getStockVolatility:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getStockForecast:()=>t.RamCostConstants.ScriptBuySellStockRamCost,purchase4SMarketData:()=>t.RamCostConstants.ScriptBuySellStockRamCost,purchase4SMarketDataTixApi:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getPurchasedServerLimit:()=>t.RamCostConstants.ScriptGetPurchasedServerLimit,getPurchasedServerMaxRam:()=>t.RamCostConstants.ScriptGetPurchasedServerMaxRam,getPurchasedServerCost:()=>t.RamCostConstants.ScriptGetPurchaseServerRamCost,purchaseServer:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,deleteServer:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,getPurchasedServers:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,write:()=>t.RamCostConstants.ScriptReadWriteRamCost,tryWrite:()=>t.RamCostConstants.ScriptReadWriteRamCost,read:()=>t.RamCostConstants.ScriptReadWriteRamCost,peek:()=>t.RamCostConstants.ScriptReadWriteRamCost,clear:()=>t.RamCostConstants.ScriptReadWriteRamCost,getPortHandle:()=>10*t.RamCostConstants.ScriptReadWriteRamCost,rm:()=>t.RamCostConstants.ScriptReadWriteRamCost,scriptRunning:()=>t.RamCostConstants.ScriptArbScriptRamCost,scriptKill:()=>t.RamCostConstants.ScriptArbScriptRamCost,getScriptName:()=>0,getScriptRam:()=>t.RamCostConstants.ScriptGetScriptRamCost,getHackTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getGrowTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getWeakenTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getScriptIncome:()=>t.RamCostConstants.ScriptGetScriptRamCost,getScriptExpGain:()=>t.RamCostConstants.ScriptGetScriptRamCost,nFormat:()=>0,getTimeSinceLastAug:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,prompt:()=>0,wget:()=>0,getFavorToDonate:()=>t.RamCostConstants.ScriptGetFavorToDonate,universityCourse:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,gymWorkout:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,travelToCity:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,purchaseTor:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,purchaseProgram:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,getStats:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,getCharacterInformation:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,isBusy:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,stopAction:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/2,upgradeHomeRam:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getUpgradeHomeRamCost:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/2,workForCompany:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,applyToCompany:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getCompanyRep:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getCompanyFavor:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getCompanyFavorGain:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/4,checkFactionInvitations:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,joinFaction:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,workForFaction:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getFactionRep:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getFactionFavor:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getFactionFavorGain:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/4,donateToFaction:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,createProgram:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,commitCrime:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getCrimeChance:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getCrimeStats:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getOwnedAugmentations:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getOwnedSourceFiles:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationsFromFaction:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationPrereq:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationCost:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationStats:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,purchaseAugmentation:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,softReset:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,installAugmentations:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,gang:{getMemberNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getGangInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getOtherGangInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getMemberInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,canRecruitMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,recruitMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getTaskNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getTaskStats:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,setMemberTask:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getEquipmentCost:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentType:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentStats:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,purchaseEquipment:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,ascendMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,setTerritoryWarfare:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getChanceToWinClash:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,getBonusTime:()=>0},bladeburner:{getContractNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getOperationNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getBlackOpNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getBlackOpRank:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/2,getGeneralActionNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getSkillNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,startAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,stopBladeburnerAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/2,getCurrentAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/4,getActionTime:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionEstimatedSuccessChance:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionRepGain:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionCountRemaining:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionMaxLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionCurrentLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionAutolevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setActionAutolevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setActionLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getRank:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillPoints:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillUpgradeCost:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,upgradeSkill:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getTeamSize:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setTeamSize:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityEstimatedPopulation:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityEstimatedCommunities:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityChaos:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCity:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,switchCity:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getStamina:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,joinBladeburnerFaction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,joinBladeburnerDivision:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getBonusTime:()=>0},codingcontract:{attempt:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost,getContractType:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getData:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getDescription:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getNumTriesRemaining:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/5},sleeve:{getNumSleeves:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToShockRecovery:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToSynchronize:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToCommitCrime:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToUniversityCourse:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,travel:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToCompanyWork:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToFactionWork:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToGymWorkout:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleeveStats:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getTask:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getInformation:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleeveAugmentations:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleevePurchasableAugs:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,purchaseSleeveAug:()=>t.RamCostConstants.ScriptSleeveBaseRamCost},heart:{break:()=>0}},t.getRamCost=function(...e){if(0===e.length)return console.warn("No arguments passed to getRamCost()"),0;let n=t.RamCosts[e[0]];for(let t=1;t(ce.loadFactionContent(),Object(f.displayFactionContent)(n),!1)})),e.appendChild(Object(te.createElement)("br"))}();ce.Display.factionsContent.appendChild(e),ce.Display.factionsContent.appendChild(Object(te.createElement)("br")),ce.Display.factionsContent.appendChild(Object(te.createElement)("h1",{innerText:"Outstanding Faction Invitations"})),ce.Display.factionsContent.appendChild(Object(te.createElement)("p",{width:"70%",innerText:"Lists factions you have been invited to, as well as factions you have previously rejected. You can accept these faction invitations at any time."}));var n=Object(te.createElement)("ul");for(t=0;t{if(!t.isTrusted)return!1;Object(f.joinFaction)(y.Factions[e]);for(var n=0;n0&&(ce._lastUpdate=e-n,x.Player.lastUpdate=e-n,ce.updateGame(t)),window.requestAnimationFrame(ce.idleTimer)},updateGame:function(e=1){var t=e*ce._idleSpeed;null==x.Player.totalPlaytime&&(x.Player.totalPlaytime=0),null==x.Player.playtimeSinceLastAug&&(x.Player.playtimeSinceLastAug=0),null==x.Player.playtimeSinceLastBitnode&&(x.Player.playtimeSinceLastBitnode=0),x.Player.totalPlaytime+=t,x.Player.playtimeSinceLastAug+=t,x.Player.playtimeSinceLastBitnode+=t,!0===F.a.actionStarted&&(ce._totalActionTime=F.a.actionTime,ce._actionTimeLeft=F.a.actionTime,ce._actionInProgress=!0,ce._actionProgressBarCount=1,ce._actionProgressStr="[ ]",ce._actionTimeStr="Time left: ",F.a.actionStarted=!1),x.Player.isWorking&&(x.Player.workType==_.CONSTANTS.WorkTypeFaction?x.Player.workForFaction(e):x.Player.workType==_.CONSTANTS.WorkTypeCreateProgram?x.Player.createProgramWork(e):x.Player.workType==_.CONSTANTS.WorkTypeStudyClass?x.Player.takeClass(e):x.Player.workType==_.CONSTANTS.WorkTypeCrime?x.Player.commitCrime(e):x.Player.workType==_.CONSTANTS.WorkTypeCompanyPartTime?x.Player.workPartTime(e):x.Player.work(e)),x.Player.hasWseAccount&&Object(j.processStockPrices)(e),x.Player.inGang()&&x.Player.gang.process(e,x.Player),S.c&&S.b&&S.b.process(e),x.Player.corporation instanceof d.c&&x.Player.corporation.storeCycles(e),x.Player.bladeburner instanceof c.a&&x.Player.bladeburner.storeCycles(e);for(let t=0;t0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),ce.Counters.createProgramNotifications=10}if(ce.Counters.augmentationsNotifications<=0){e=x.Player.queuedAugmentations.length,t=document.getElementById("augmentations-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),ce.Counters.augmentationsNotifications=10}if(ce.Counters.checkFactionInvitations<=0){var n=x.Player.checkForFactionInvitations();if(n.length>0){!1===x.Player.firstFacInvRecvd&&(x.Player.firstFacInvRecvd=!0,document.getElementById("factions-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var r=n[Math.floor(Math.random()*n.length)];Object(f.inviteToFaction)(r)}const e=x.Player.factionInvitations.length,t=document.getElementById("factions-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),ce.Counters.checkFactionInvitations=100}if(ce.Counters.passiveFactionGrowth<=0){var o=Math.floor(600-ce.Counters.passiveFactionGrowth);Object(f.processPassiveFactionRepGain)(o),ce.Counters.passiveFactionGrowth=600}if(ce.Counters.messages<=0&&(Object(P.b)(),i.Augmentations[s.AugmentationNames.TheRedPill].owned?ce.Counters.messages=4500:ce.Counters.messages=150),ce.Counters.mechanicProcess<=0){if(x.Player.corporation instanceof d.c&&x.Player.corporation.process(),x.Player.bladeburner instanceof c.a)try{x.Player.bladeburner.process()}catch(e){Object(ne.exceptionAlert)("Exception caught in Bladeburner.process(): "+e)}ce.Counters.mechanicProcess=5}ce.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(p.b)(),ce.Counters.contractGeneration=3e3)},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*ce._idleSpeed;ce._actionTimeLeft-=t/1e3,ce._actionTimeLeft=Math.max(ce._actionTimeLeft,0);for(var n=Math.round(100*(1-ce._actionTimeLeft/ce._totalActionTime));2*ce._actionProgressBarCount<=n;)ce._actionProgressStr=Object(r.replaceAt)(ce._actionProgressStr,ce._actionProgressBarCount,"|"),ce._actionProgressBarCount+=1;ce._actionTimeStr="Time left: "+Math.max(0,Math.round(ce._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=ce._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=ce._actionProgressStr.replace(/ /g," "),n>=100&&(ce._actionInProgress=!1,F.a.finishAction())},closeMainMenuHeader:function(e){for(var t=0;t"+Y.numeralWrapper.formatMoney(K)+" and your Hacknet Nodes generated "+e+"");var V=[t,n,a,s,p,g,A,R,B];x.Player.firstFacInvRecvd?V.push(u):u.style.display="none",x.Player.firstAugPurchased?V.push(m):m.style.display="none",""!==x.Player.companyName?V.push(C):C.style.display="none",x.Player.firstTimeTraveled?V.push(b):b.style.display="none",x.Player.firstProgramAvailable?V.push(i):i.style.display="none",x.Player.hasWseAccount?V.push(T):T.style.display="none",x.Player.bladeburner instanceof c.a?V.push(S):S.style.display="none",x.Player.corporation instanceof d.c?V.push(O):O.style.display="none",x.Player.inGang()?V.push(w):w.style.display="none",ce.closeMainMenuHeader(V)}else{Object(l.initBitNodeMultipliers)(x.Player),Object(W.initSpecialServerIps)(),ce.setDisplayElements(),ce.start(),x.Player.init(),Object(I.initForeignServers)(x.Player.getHomeComputer()),Object(h.initCompanies)(),Object(y.initFactions)(),Object(o.d)(),Object(P.c)(),Object(k.a)(),Object(L.updateSourceFileFlags)(x.Player),document.getElementById("hacking-menu-header").classList.toggle("opened"),document.getElementById("character-menu-header").classList.toggle("opened"),document.getElementById("world-menu-header").classList.toggle("opened"),document.getElementById("help-menu-header").classList.toggle("opened"),u.style.display="none",m.style.display="none",C.style.display="none",T.style.display="none",b.style.display="none",i.style.display="none",S.style.display="none",O.style.display="none",w.style.display="none",B.style.display="none",ce.openMainMenuHeader([t,n,a,s,p,g,A,R]),Object(v.c)(),Object(re.removeLoadingScreen)()}Object(z.a)(),Object(D.d)(),F.a.resetTerminalInput()},setDisplayElements:function(){if(ce.Display.terminalContent=document.getElementById("terminal-container"),q.routing.navigateTo(q.Page.Terminal),ce.Display.characterContent=document.getElementById("character-container"),ce.Display.characterContent.style.display="none",ce.Display.scriptEditorContent=document.getElementById("script-editor-container"),ce.Display.scriptEditorContent.style.display="none",ce.Display.activeScriptsContent=document.getElementById("active-scripts-container"),ce.Display.activeScriptsContent.style.display="none",ce.Display.hacknetNodesContent=document.getElementById("hacknet-nodes-container"),ce.Display.hacknetNodesContent.style.display="none",ce.Display.createProgramContent=document.getElementById("create-program-container"),ce.Display.createProgramContent.style.display="none",ce.Display.factionsContent=document.getElementById("factions-container"),ce.Display.factionsContent.style.display="none",ce.Display.factionContent=document.getElementById("faction-container"),ce.Display.factionContent.style.display="none",ce.Display.augmentationsContent=document.getElementById("augmentations-container"),ce.Display.augmentationsContent.style.display="none",ce.Display.tutorialContent=document.getElementById("tutorial-container"),ce.Display.tutorialContent.style.display="none",ce.Display.infiltrationContent=document.getElementById("infiltration-container"),ce.Display.infiltrationContent.style.display="none",ce.Display.stockMarketContent=document.getElementById("stock-market-container"),ce.Display.stockMarketContent.style.display="none",ce.Display.missionContent=document.getElementById("mission-container"),ce.Display.missionContent.style.display="none",ce.Display.characterInfo=document.getElementById("character-content"),ce.Display.locationContent=document.getElementById("location-container"),ce.Display.locationContent.style.display="none",ce.Display.workInProgressContent=document.getElementById("work-in-progress-container"),ce.Display.workInProgressContent.style.display="none",ce.Display.redPillContent=document.getElementById("red-pill-container"),ce.Display.redPillContent.style.display="none",ce.Display.cinematicTextContent=document.getElementById("cinematic-text-container"),ce.Display.cinematicTextContent.style.display="none",!Object(X.initializeMainMenuLinks)()){const e="Failed to initialize Main Menu Links. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(ne.exceptionAlert)(new Error(e)),void console.error(e)}},init:function(){if(document.getElementById("import-game-link").onclick=function(){N.b.importGame()},!Object(J.initializeMainMenuHeaders)(x.Player,!1)){const e="Failed to initialize Main Menu Headers. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(ne.exceptionAlert)(new Error(e)),void console.error(e)}(X.MainMenuLinks.Terminal.addEventListener("click",function(){return ce.loadTerminalContent(),!1}),X.MainMenuLinks.ScriptEditor.addEventListener("click",function(){return ce.loadScriptEditorContent(),!1}),X.MainMenuLinks.ActiveScripts.addEventListener("click",function(){return ce.loadActiveScriptsContent(),!1}),X.MainMenuLinks.CreateProgram.addEventListener("click",function(){return ce.loadCreateProgramContent(),!1}),X.MainMenuLinks.Stats.addEventListener("click",function(){return ce.loadCharacterContent(),!1}),X.MainMenuLinks.Factions.addEventListener("click",function(){return ce.loadFactionsContent(),!1}),X.MainMenuLinks.Augmentations.addEventListener("click",function(){return ce.loadAugmentationsContent(),!1}),X.MainMenuLinks.HacknetNodes.addEventListener("click",function(){return ce.loadHacknetNodesContent(),!1}),X.MainMenuLinks.Sleeves.addEventListener("click",function(){return ce.loadSleevesContent(),X.MainMenuLinks.Sleeves.classList.add("active"),!1}),X.MainMenuLinks.City.addEventListener("click",function(){return ce.loadLocationContent(),!1}),X.MainMenuLinks.Travel.addEventListener("click",function(){return ce.loadTravelContent(),!1}),X.MainMenuLinks.Job.addEventListener("click",function(){return ce.loadJobContent(),!1}),X.MainMenuLinks.StockMarket.addEventListener("click",function(){return ce.loadStockMarketContent(),X.MainMenuLinks.StockMarket.classList.add("active"),!1}),X.MainMenuLinks.Bladeburner.addEventListener("click",function(){return ce.loadBladeburnerContent(),!1}),X.MainMenuLinks.Corporation.addEventListener("click",function(){return ce.loadCorporationContent(),X.MainMenuLinks.Corporation.classList.add("active"),!1}),X.MainMenuLinks.Gang.addEventListener("click",function(){return ce.loadGangContent(),!1}),X.MainMenuLinks.Tutorial.addEventListener("click",function(){return ce.loadTutorialContent(),!1}),X.MainMenuLinks.DevMenu.addEventListener("click",function(){return!1}),ce.ActiveScriptsList=document.getElementById("active-scripts-list"),ce.Clickables.saveMainMenuButton=document.getElementById("save-game-link"),ce.Clickables.saveMainMenuButton.addEventListener("click",function(){return N.b.saveGame(ue),!1}),ce.Clickables.deleteMainMenuButton=document.getElementById("delete-game-link"),ce.Clickables.deleteMainMenuButton.addEventListener("click",function(){return N.b.deleteGame(ue),!1}),document.getElementById("export-game-link").addEventListener("click",function(){return N.b.exportGame(),!1}),document.getElementById("character-overview-save-button").addEventListener("click",function(){return N.b.saveGame(ue),!1}),document.getElementById("character-overview-options-button").addEventListener("click",function(){return Object(Z.b)(),!1}),Object(A.c)(),Object(F.b)(),x.Player.isWorking)&&(document.getElementById("work-in-progress-cancel-button").addEventListener("click",function(){if(x.Player.workType==_.CONSTANTS.WorkTypeFaction){y.Factions[x.Player.currentWorkFactionName];x.Player.finishFactionWork(!0)}else x.Player.workType==_.CONSTANTS.WorkTypeCreateProgram?x.Player.finishCreateProgramWork(!0):x.Player.workType==_.CONSTANTS.WorkTypeStudyClass?x.Player.finishClass():x.Player.workType==_.CONSTANTS.WorkTypeCrime?x.Player.finishCrime(!0):x.Player.workType==_.CONSTANTS.WorkTypeCompanyPartTime?x.Player.finishWorkPartTime():x.Player.finishWork(!0)}),ce.loadWorkInProgressContent());document.getElementById("character-overview-container").style.display="block",document.getElementById("terminal-menu-link").removeAttribute("class"),document.getElementById("stats-menu-link").removeAttribute("class"),document.getElementById("create-script-menu-link").removeAttribute("class"),document.getElementById("active-scripts-menu-link").removeAttribute("class"),document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),document.getElementById("city-menu-link").removeAttribute("class"),document.getElementById("tutorial-menu-link").removeAttribute("class"),document.getElementById("copy-save-to-clipboard-link").addEventListener("click",function(){const e=N.b.getSaveString();if(navigator.clipboard)navigator.clipboard.writeText(e).then(function(){Object(K.createStatusText)("Copied save to clipboard")},function(e){console.error("Unable to copy save data to clipboard using Async API"),Object(K.createStatusText)("Failed to copy save")});else{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.left="-9999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")?Object(K.createStatusText)("Copied save to clipboard"):Object(K.createStatusText)("Failed to copy save")}catch(e){console.error("Unable to copy save data to clipboard using document.execCommand('copy')"),Object(K.createStatusText)("Failed to copy save")}document.body.removeChild(t)}}),document.getElementById("debug-delete-scripts-link").addEventListener("click",function(){return x.Player.getHomeComputer().runningScripts=[],Object(Q.dialogBoxCreate)("Forcefully deleted all running scripts on home computer. Please save and refresh page"),Object(Z.a)(),!1}),document.getElementById("debug-soft-reset").addEventListener("click",function(){return Object(Q.dialogBoxCreate)("Soft Reset!"),Object(w.a)(),Object(Z.a)(),!1})},start:function(){ce.idleTimer()}};var ue,me;window.onload=function(){if(!window.indexedDB)return ce.load(null);(me=window.indexedDB.open("bitburnerSave",1)).onerror=function(e){return console.error("Error opening indexedDB: "),console.error(e),ce.load(null)},me.onsuccess=function(e){var t=(ue=e.target.result).transaction(["savestring"]).objectStore("savestring").get("save");t.onerror=function(e){return console.error("Error in Database request to get savestring: "+e),ce.load(null)},t.onsuccess=function(e){ce.load(t.result)}},me.onupgradeneeded=function(e){e.target.result.createObjectStore("savestring")}}}.call(this,n(86))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(75),a=n(270),i=n(16);function o(e){const n=e.name;t.Factions[n]=e}function s(e){return t.Factions.hasOwnProperty(e)}function l(e){if(!(e instanceof r.Faction))throw new Error("Invalid argument 'newFactionObject' passed into resetFaction()");const n=e.name;s(n)&&(e.favor=t.Factions[n].favor,delete t.Factions[n]),o(e)}t.Factions={},t.loadFactions=function(e){t.Factions=JSON.parse(e,i.Reviver)},t.AddToFactions=o,t.factionExists=s,t.initFactions=function(e=1){for(const e in a.FactionInfos)l(new r.Faction(e))},t.resetFaction=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomInt=function(e,t){const n=Math.min(e,t),r=Math.max(e,t);return Math.floor(Math.random()*(r-n+1))+n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6),a=n(19),i=n(13),o=n(16);class s{constructor(e={info:"",moneyCost:0,name:"",repCost:0}){this.baseCost=0,this.baseRepRequirement=0,this.info="",this.isSpecial=!1,this.level=0,this.name="",this.owned=!1,this.prereqs=[],this.mults={},this.startingCost=0,this.name=e.name,this.info=e.info,this.prereqs=e.prereqs?e.prereqs:[],this.baseRepRequirement=e.repCost*r.CONSTANTS.AugmentationRepMultiplier*a.BitNodeMultipliers.AugmentationRepCost,this.baseCost=e.moneyCost*r.CONSTANTS.AugmentationCostMultiplier*a.BitNodeMultipliers.AugmentationMoneyCost,this.startingCost=this.baseCost,e.isSpecial&&(this.isSpecial=!0),this.level=0,e.hacking_mult&&(this.mults.hacking_mult=e.hacking_mult),e.strength_mult&&(this.mults.strength_mult=e.strength_mult),e.defense_mult&&(this.mults.defense_mult=e.defense_mult),e.dexterity_mult&&(this.mults.dexterity_mult=e.dexterity_mult),e.agility_mult&&(this.mults.agility_mult=e.agility_mult),e.charisma_mult&&(this.mults.charisma_mult=e.charisma_mult),e.hacking_exp_mult&&(this.mults.hacking_exp_mult=e.hacking_exp_mult),e.strength_exp_mult&&(this.mults.strength_exp_mult=e.strength_exp_mult),e.defense_exp_mult&&(this.mults.defense_exp_mult=e.defense_exp_mult),e.dexterity_exp_mult&&(this.mults.dexterity_exp_mult=e.dexterity_exp_mult),e.agility_exp_mult&&(this.mults.agility_exp_mult=e.agility_exp_mult),e.charisma_exp_mult&&(this.mults.charisma_exp_mult=e.charisma_exp_mult),e.hacking_chance_mult&&(this.mults.hacking_chance_mult=e.hacking_chance_mult),e.hacking_speed_mult&&(this.mults.hacking_speed_mult=e.hacking_speed_mult),e.hacking_money_mult&&(this.mults.hacking_money_mult=e.hacking_money_mult),e.hacking_grow_mult&&(this.mults.hacking_grow_mult=e.hacking_grow_mult),e.company_rep_mult&&(this.mults.company_rep_mult=e.company_rep_mult),e.faction_rep_mult&&(this.mults.faction_rep_mult=e.faction_rep_mult),e.crime_money_mult&&(this.mults.crime_money_mult=e.crime_money_mult),e.crime_success_mult&&(this.mults.crime_success_mult=e.crime_success_mult),e.work_money_mult&&(this.mults.work_money_mult=e.work_money_mult),e.hacknet_node_money_mult&&(this.mults.hacknet_node_money_mult=e.hacknet_node_money_mult),e.hacknet_node_purchase_cost_mult&&(this.mults.hacknet_node_purchase_cost_mult=e.hacknet_node_purchase_cost_mult),e.hacknet_node_ram_cost_mult&&(this.mults.hacknet_node_ram_cost_mult=e.hacknet_node_ram_cost_mult),e.hacknet_node_core_cost_mult&&(this.mults.hacknet_node_core_cost_mult=e.hacknet_node_core_cost_mult),e.hacknet_node_level_cost_mult&&(this.mults.hacknet_node_level_cost_mult=e.hacknet_node_level_cost_mult),e.bladeburner_max_stamina_mult&&(this.mults.bladeburner_max_stamina_mult=e.bladeburner_max_stamina_mult),e.bladeburner_stamina_gain_mult&&(this.mults.bladeburner_stamina_gain_mult=e.bladeburner_stamina_gain_mult),e.bladeburner_analysis_mult&&(this.mults.bladeburner_analysis_mult=e.bladeburner_analysis_mult),e.bladeburner_success_chance_mult&&(this.mults.bladeburner_success_chance_mult=e.bladeburner_success_chance_mult)}static fromJSON(e){return o.Generic_fromJSON(s,e.data)}addToFactions(e){for(let t=0;t{switch(typeof e){case"number":return e;case"object":return s.getRandomInt(e.min,e.max);default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}};for(const e of i.serverMetadata){const i={hostname:e.hostname,ip:u(),numOpenPortsRequired:e.numOpenPortsRequired,organizationName:e.organizationName};void 0!==e.maxRamExponent&&(i.maxRam=Math.pow(2,o(e.maxRamExponent)));for(const t of n)void 0!==e[t]&&(i[t]=o(e[t]));const s=new r.Server(i);for(const t of e.literature||[])s.messages.push(t);void 0!==e.specialName&&a.SpecialServerIps.addIp(e.specialName,s.ip),m(s),void 0!==e.networkLayer&&t[o(e.networkLayer)-1].push(s)}const l=(e,t)=>{e.serversOnNetwork.push(t.ip),t.serversOnNetwork.push(e.ip)},c=e=>e[Math.floor(Math.random()*e.length)],p=(e,t)=>{for(const n of e)l(n,t())};p(t[0],()=>e);for(let e=1;ec(t[e-1]))},t.prestigeAllServers=function(){for(var e in t.AllServers)delete t.AllServers[e];t.AllServers={}},t.loadAllServers=function(e){t.AllServers=JSON.parse(e,l.Reviver)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmployeePositions={Operations:"Operations",Engineer:"Engineer",Business:"Business",Management:"Management",RandD:"Research & Development",Training:"Training",Unassigned:"Unassigned"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(20),a=n(116),i=n(19),o=n(6),s=n(32),l=n(669),c=n(170);function u(e,t,n){let r=1+(o.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;r>o.CONSTANTS.ServerMaxGrowthRate&&(r=o.CONSTANTS.ServerMaxGrowthRate);const a=e.serverGrowth/100;return Math.log(t)/(Math.log(r)*n.hacking_grow_mult*a*i.BitNodeMultipliers.ServerGrowthRate)}function m(e){for(var t in r.AllServers)if(r.AllServers.hasOwnProperty(t)&&r.AllServers[t].hostname==e)return r.AllServers[t];return null}t.safetlyCreateUniqueServer=function(e){if(null!=e.ip&&r.ipExists(e.ip)&&(e.ip=r.createUniqueRandomIp()),null!=m(e.hostname)){let t=e.hostname;for(let n=0;n<200&&null!=m(t=`${e.hostname}-${n}`);++n);e.hostname=t}return new a.Server(e)},t.numCycleForGrowth=u,t.processSingleServerGrowth=function(e,t,n){const r=Math.max(Math.floor(t/450),0);var a=1+(o.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;a>o.CONSTANTS.ServerMaxGrowthRate&&(a=o.CONSTANTS.ServerMaxGrowthRate);const s=r*(e.serverGrowth/100)*i.BitNodeMultipliers.ServerGrowthRate;let c=Math.pow(a,s*n.hacking_grow_mult);c<1&&(console.warn("serverGrowth calculated to be less than 1"),c=1);const m=e.moneyAvailable;if(e.moneyAvailable*=c,l.isValidNumber(e.moneyMax)&&isNaN(e.moneyAvailable)&&(e.moneyAvailable=e.moneyMax),l.isValidNumber(e.moneyMax)&&e.moneyAvailable>e.moneyMax&&(e.moneyAvailable=e.moneyMax),m!==e.moneyAvailable){let t=u(e,e.moneyAvailable/m,n);t=Math.max(0,t),e.fortify(2*o.CONSTANTS.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/m},t.prestigeHomeComputer=function(e){const t=e.programs.includes(s.Programs.BitFlume.name);e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(s.Programs.NukeProgram.name),t&&e.programs.push(s.Programs.BitFlume.name),e.scripts.forEach(function(t){t.updateRamUsage(e.scripts)}),e.messages.length=0,e.messages.push("hackers-starting-handbook.lit")},t.GetServerByHostname=m,t.getServer=function(e){return c.isValidIPAddress(e)?void 0!==r.AllServers[e]?r.AllServers[e]:null:m(e)},t.getServerOnNetwork=function(e,t){if(!(t>e.serversOnNetwork.length))return r.AllServers[e.serversOnNetwork[t]];console.error("Tried to get server on network that was out of range")}},function(e,t,n){"use strict";n.d(t,"h",function(){return E}),n.d(t,"m",function(){return v}),n.d(t,"i",function(){return k}),n.d(t,"b",function(){return C}),n.d(t,"c",function(){return T}),n.d(t,"f",function(){return P}),n.d(t,"g",function(){return S}),n.d(t,"e",function(){return O}),n.d(t,"d",function(){return M}),n.d(t,"o",function(){return x}),n.d(t,"p",function(){return w}),n.d(t,"l",function(){return A}),n.d(t,"k",function(){return R}),n.d(t,"q",function(){return N}),n.d(t,"a",function(){return D}),n.d(t,"j",function(){return I}),n.d(t,"r",function(){return L}),n.d(t,"n",function(){return W});var r=n(54),a=n(34),i=n(108),o=n(144),s=n(123),l=n(40),c=n(0),u=n(20),m=n(22),p=n(39),h=n(11),d=(n(115),n(1)),_=n.n(d),g=n(52),y=n.n(g),f=n(179);let b;function E(){return 9===c.Player.bitNodeN||p.SourceFileFlags[9]>0}function v(){if(l.a.isRunning){if(l.a.currStep!==l.d.HacknetNodesIntroduction)return;Object(l.b)()}const e=c.Player.hacknetNodes.length;if(E()){const t=T();if(isNaN(t))throw new Error("Calculated cost of purchasing HacknetServer is NaN");if(!c.Player.canAfford(t))return-1;c.Player.loseMoney(t);c.Player.createHacknetServer();return L(),e}{const t=C();if(isNaN(t))throw new Error("Calculated cost of purchasing HacknetNode is NaN");if(!c.Player.canAfford(t))return-1;const n="hacknet-node-"+e,a=new r.HacknetNode(n,c.Player.hacknet_node_money_mult);return c.Player.loseMoney(t),c.Player.hacknetNodes.push(a),e}}function k(){return E()&&c.Player.hacknetNodes.length>=a.MaxNumberHacknetServers}function C(){const e=c.Player.hacknetNodes.length,t=r.HacknetNodePurchaseNextMult;return r.BaseCostForHacknetNode*Math.pow(t,e)*c.Player.hacknet_node_purchase_cost_mult}function T(){const e=c.Player.hacknetNodes.length,t=a.HacknetServerPurchaseMult;return e>=a.MaxNumberHacknetServers?1/0:a.BaseCostForHacknetServer*Math.pow(t,e)*c.Player.hacknet_node_purchase_cost_mult}function P(e,t){if(null==t)throw new Error("getMaxNumberLevelUpgrades() called without maxLevel arg");if(c.Player.money.lt(e.calculateLevelUpgradeCost(1,c.Player.hacknet_node_level_cost_mult)))return 0;let n=1,r=t-1,a=t-e.level;if(c.Player.money.gt(e.calculateLevelUpgradeCost(a,c.Player.hacknet_node_level_cost_mult)))return a;for(;n<=r;){var i=(n+r)/2|0;if(i!==t&&c.Player.money.gt(e.calculateLevelUpgradeCost(i,c.Player.hacknet_node_level_cost_mult))&&c.Player.money.lt(e.calculateLevelUpgradeCost(i+1,c.Player.hacknet_node_level_cost_mult)))return Math.min(a,i);if(c.Player.money.lt(e.calculateLevelUpgradeCost(i,c.Player.hacknet_node_level_cost_mult)))r=i-1;else{if(!c.Player.money.gt(e.calculateLevelUpgradeCost(i,c.Player.hacknet_node_level_cost_mult)))return Math.min(a,i);n=i+1}}return 0}function S(e,t){if(null==t)throw new Error("getMaxNumberRamUpgrades() called without maxLevel arg");if(c.Player.money.lt(e.calculateRamUpgradeCost(1,c.Player.hacknet_node_ram_cost_mult)))return 0;let n;if(n=e instanceof a.HacknetServer?Math.round(Math.log2(t/e.maxRam)):Math.round(Math.log2(t/e.ram)),c.Player.money.gt(e.calculateRamUpgradeCost(n,c.Player.hacknet_node_ram_cost_mult)))return n;for(let t=n-1;t>=0;--t)if(c.Player.money.gt(e.calculateRamUpgradeCost(t,c.Player.hacknet_node_ram_cost_mult)))return t;return 0}function O(e,t){if(null==t)throw new Error("getMaxNumberCoreUpgrades() called without maxLevel arg");if(c.Player.money.lt(e.calculateCoreUpgradeCost(1,c.Player.hacknet_node_core_cost_mult)))return 0;let n=1,r=t-1;const a=t-e.cores;if(c.Player.money.gt(e.calculateCoreUpgradeCost(a,c.Player.hacknet_node_core_cost_mult)))return a;for(;n<=r;){let i=(n+r)/2|0;if(i!=t&&c.Player.money.gt(e.calculateCoreUpgradeCost(i,c.Player.hacknet_node_core_cost_mult))&&c.Player.money.lt(e.calculateCoreUpgradeCost(i+1,c.Player.hacknet_node_core_cost_mult)))return Math.min(a,i);if(c.Player.money.lt(e.calculateCoreUpgradeCost(i,c.Player.hacknet_node_core_cost_mult)))r=i-1;else{if(!c.Player.money.gt(e.calculateCoreUpgradeCost(i,c.Player.hacknet_node_core_cost_mult)))return Math.min(a,i);n=i+1}}return 0}function M(e,t){if(null==t)throw new Error("getMaxNumberCacheUpgrades() called without maxLevel arg");if(!c.Player.canAfford(e.calculateCacheUpgradeCost(1)))return 0;let n=1,r=t-1;const a=t-e.cache;if(c.Player.canAfford(e.calculateCacheUpgradeCost(a)))return a;for(;n<=r;){let i=(n+r)/2|0;if(i!=t&&c.Player.canAfford(e.calculateCacheUpgradeCost(i))&&!c.Player.canAfford(e.calculateCacheUpgradeCost(i+1)))return Math.min(a,i);if(c.Player.canAfford(e.calculateCacheUpgradeCost(i))){if(!c.Player.canAfford(e.calculateCacheUpgradeCost(i)))return Math.min(a,i);n=i+1}else r=i-1}return 0}function x(e,t=1){const n=Math.round(t),i=e.calculateLevelUpgradeCost(n,c.Player.hacknet_node_level_cost_mult);if(isNaN(i)||i<=0||n<0)return!1;const o=e instanceof a.HacknetServer;if(e.level>=(o?a.HacknetServerMaxLevel:r.HacknetNodeMaxLevel))return!1;if(e.level+n>(o?a.HacknetServerMaxLevel:r.HacknetNodeMaxLevel)){return x(e,Math.max(0,(o?a.HacknetServerMaxLevel:r.HacknetNodeMaxLevel)-e.level))}return!!c.Player.canAfford(i)&&(c.Player.loseMoney(i),e.upgradeLevel(n,c.Player.hacknet_node_money_mult),!0)}function w(e,t=1){const n=Math.round(t),i=e.calculateRamUpgradeCost(n,c.Player.hacknet_node_ram_cost_mult);if(isNaN(i)||i<=0||n<0)return!1;const o=e instanceof a.HacknetServer;if(e.ram>=(o?a.HacknetServerMaxRam:r.HacknetNodeMaxRam))return!1;if(o){if(e.maxRam*Math.pow(2,n)>a.HacknetServerMaxRam){return w(e,Math.max(0,Math.log2(Math.round(a.HacknetServerMaxRam/e.maxRam))))}}else if(e.ram*Math.pow(2,n)>r.HacknetNodeMaxRam){return w(e,Math.max(0,Math.log2(Math.round(r.HacknetNodeMaxRam/e.ram))))}return!!c.Player.canAfford(i)&&(c.Player.loseMoney(i),e.upgradeRam(n,c.Player.hacknet_node_money_mult),!0)}function A(e,t=1){const n=Math.round(t),i=e.calculateCoreUpgradeCost(n,c.Player.hacknet_node_core_cost_mult);if(isNaN(i)||i<=0||n<0)return!1;const o=e instanceof a.HacknetServer;if(e.cores>=(o?a.HacknetServerMaxCores:r.HacknetNodeMaxCores))return!1;if(e.cores+n>(o?a.HacknetServerMaxCores:r.HacknetNodeMaxCores)){return A(e,Math.max(0,(o?a.HacknetServerMaxCores:r.HacknetNodeMaxCores)-e.cores))}return!!c.Player.canAfford(i)&&(c.Player.loseMoney(i),e.upgradeCore(n,c.Player.hacknet_node_money_mult),!0)}function R(e,t=1){const n=Math.round(t),r=e.calculateCacheUpgradeCost(n);if(isNaN(r)||r<=0||n<0)return!1;if(!(e instanceof a.HacknetServer))return console.warn("purchaseCacheUpgrade() called for a non-HacknetNode"),!1;if(e.cache+n>a.HacknetServerMaxCache){return R(e,Math.max(0,a.HacknetServerMaxCache-e.cache))}return!!c.Player.canAfford(r)&&(c.Player.loseMoney(r),e.upgradeCache(n),!0)}function N(){h.routing.isOn(h.Page.HacknetNodes)&&y.a.render(_.a.createElement(f.a,null),b)}function D(){b instanceof HTMLElement&&y.a.unmountComponentAtNode(b),b.style.display="none"}function I(e){return 0===c.Player.hacknetNodes.length?0:E()?function(e){if(!(c.Player.hashManager instanceof i.HashManager))throw new Error("Player does not have a HashManager (should be in 'hashManager' prop)");let t=0;for(let n=0;n{!function(e){null!=t.Companies[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.Companies[e.name]=new a.Company(e)}(e)});for(const n in t.Companies){const r=t.Companies[n];e[n]instanceof a.Company?(r.favor=e[n].favor,isNaN(r.favor)&&(r.favor=0)):r.favor=0}},t.loadCompanies=function(e){t.Companies=JSON.parse(e,i.Reviver)},t.companyExists=function(e){return t.Companies.hasOwnProperty(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(710),a=n(2);t.Industries={Energy:"Energy",Utilities:"Water Utilities",Agriculture:"Agriculture",Fishing:"Fishing",Mining:"Mining",Food:"Food",Tobacco:"Tobacco",Chemical:"Chemical",Pharmaceutical:"Pharmaceutical",Computer:"Computer Hardware",Robotics:"Robotics",Software:"Software",Healthcare:"Healthcare",RealEstate:"RealEstate"},t.IndustryStartingCosts={Energy:225e9,Utilities:15e10,Agriculture:4e10,Fishing:8e10,Mining:3e11,Food:1e10,Tobacco:2e10,Chemical:7e10,Pharmaceutical:2e11,Computer:5e11,Robotics:1e12,Software:25e9,Healthcare:75e10,RealEstate:6e11},t.IndustryDescriptions={Energy:"Engage in the production and distribution of energy.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Energy,"$0.000a")+"
Recommended starting Industry: NO",Utilities:"Distribute water and provide wastewater services.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Utilities,"$0.000a")+"
Recommended starting Industry: NO",Agriculture:"Cultivate crops and breed livestock to produce food.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Agriculture,"$0.000a")+"
Recommended starting Industry: YES",Fishing:"Produce food through the breeding and processing of fish and fish products.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Fishing,"$0.000a")+"
Recommended starting Industry: NO",Mining:"Extract and process metals from the earth.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Mining,"$0.000a")+"
Recommended starting Industry: NO",Food:"Create your own restaurants all around the world.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Food,"$0.000a")+"
Recommended starting Industry: YES",Tobacco:"Create and distribute tobacco and tobacco-related products.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Tobacco,"$0.000a")+"
Recommended starting Industry: YES",Chemical:"Produce industrial chemicals.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Chemical,"$0.000a")+"
Recommended starting Industry: NO",Pharmaceutical:"Discover, develop, and create new pharmaceutical drugs.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Pharmaceutical,"$0.000a")+"
Recommended starting Industry: NO",Computer:"Develop and manufacture new computer hardware and networking infrastructures.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Computer,"$0.000a")+"
Recommended starting Industry: NO",Robotics:"Develop and create robots.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Robotics,"$0.000a")+"
Recommended starting Industry: NO",Software:"Develop computer software and create AI Cores.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Software,"$0.000a")+"
Recommended starting Industry: YES",Healthcare:"Create and manage hospitals.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Healthcare,"$0.000a")+"
Recommended starting Industry: NO",RealEstate:"Develop and manage real estate properties.

Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.RealEstate,"$0.000a")+"
Recommended starting Industry: NO"},t.IndustryResearchTrees={Energy:r.getBaseResearchTreeCopy(),Utilities:r.getBaseResearchTreeCopy(),Agriculture:r.getBaseResearchTreeCopy(),Fishing:r.getBaseResearchTreeCopy(),Mining:r.getBaseResearchTreeCopy(),Food:r.getProductIndustryResearchTreeCopy(),Tobacco:r.getProductIndustryResearchTreeCopy(),Chemical:r.getBaseResearchTreeCopy(),Pharmaceutical:r.getProductIndustryResearchTreeCopy(),Computer:r.getProductIndustryResearchTreeCopy(),Robotics:r.getProductIndustryResearchTreeCopy(),Software:r.getProductIndustryResearchTreeCopy(),Healthcare:r.getProductIndustryResearchTreeCopy(),RealEstate:r.getProductIndustryResearchTreeCopy()},t.resetIndustryResearchTrees=function(){t.IndustryResearchTrees.Energy=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Utilities=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Agriculture=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Fishing=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Mining=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Food=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Tobacco=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Chemical=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Pharmaceutical=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Computer=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Robotics=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Software=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Healthcare=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.RealEstate=r.getBaseResearchTreeCopy()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY={A:65,B:66,C:67,CTRL:17,D:68,DOWNARROW:40,E:69,ENTER:13,ESC:27,F:70,H:72,J:74,K:75,L:76,M:77,N:78,O:79,P:80,R:82,S:83,TAB:9,U:85,UPARROW:38,W:87,1:49,2:50}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(115),a=n(82);t.removeElementById=function(e){try{const t=r.getElementById(e);a.removeElement(t)}catch(e){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Aevum="Aevum",e.Chongqing="Chongqing",e.Ishima="Ishima",e.NewTokyo="New Tokyo",e.Sector12="Sector-12",e.Volhaven="Volhaven"}(t.CityName||(t.CityName={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(115);t.clearEventListeners=function(e){try{let t;const n=(t="string"==typeof e?r.getElementById(e):e).cloneNode(!0);return null!==t.parentNode&&t.parentNode.replaceChild(n,t),n}catch(e){return console.error(e),null}}},function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"f",function(){return IssueNewSharesCooldown}),__webpack_require__.d(__webpack_exports__,"k",function(){return SellSharesCooldown}),__webpack_require__.d(__webpack_exports__,"m",function(){return WarehouseInitialCost}),__webpack_require__.d(__webpack_exports__,"n",function(){return WarehouseInitialSize}),__webpack_require__.d(__webpack_exports__,"o",function(){return WarehouseUpgradeBaseCost}),__webpack_require__.d(__webpack_exports__,"g",function(){return OfficeInitialCost}),__webpack_require__.d(__webpack_exports__,"h",function(){return OfficeInitialSize}),__webpack_require__.d(__webpack_exports__,"a",function(){return BribeThreshold}),__webpack_require__.d(__webpack_exports__,"b",function(){return BribeToRepRatio}),__webpack_require__.d(__webpack_exports__,"j",function(){return ProductProductionCostRatio}),__webpack_require__.d(__webpack_exports__,"d",function(){return DividendMaxPercentage}),__webpack_require__.d(__webpack_exports__,"c",function(){return Corporation}),__webpack_require__.d(__webpack_exports__,"e",function(){return Industry}),__webpack_require__.d(__webpack_exports__,"i",function(){return OfficeSpace});var _CorporationState__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(222),_CorporationState__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_CorporationState__WEBPACK_IMPORTED_MODULE_0__),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(182),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(181),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(21),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__),_IndustryData__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(25),_IndustryData__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_IndustryData__WEBPACK_IMPORTED_MODULE_4__),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(161),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__),_Material__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(156),_Material__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_Material__WEBPACK_IMPORTED_MODULE_6__),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(97),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__),_Product__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(134),_Product__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_Product__WEBPACK_IMPORTED_MODULE_8__),_ResearchMap__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(174),_ResearchMap__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_ResearchMap__WEBPACK_IMPORTED_MODULE_9__),_Warehouse__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(90),_Warehouse__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_Warehouse__WEBPACK_IMPORTED_MODULE_10__);__webpack_require__.d(__webpack_exports__,"l",function(){return _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse});var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(19),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__),_Constants__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(6),_Constants__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_Constants__WEBPACK_IMPORTED_MODULE_12__),_Faction_Factions__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(13),_Faction_Factions__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_Faction_Factions__WEBPACK_IMPORTED_MODULE_13__),_Literature__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(133),_Locations_Cities__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(104),_Locations_Cities__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_Locations_Cities__WEBPACK_IMPORTED_MODULE_15__),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(28),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__),_Player__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(0),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(2),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(11),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19__),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(317),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_20__),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(8),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(213),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_22__),_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(16),_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(78),_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_24__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(3),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(37),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_26___default=__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_26__),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(57),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_27___default=__webpack_require__.n(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_27__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(7),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(14),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(48),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_30__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(26),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(82),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_32__),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(27),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(45),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__),react__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(1),react__WEBPACK_IMPORTED_MODULE_35___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_35__),react_dom__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(52),react_dom__WEBPACK_IMPORTED_MODULE_36___default=__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_36__),_ui_CorporationUIEventHandler__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(316),_ui_Root__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__(315),_ui_Routing__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__(143),_ui_Routing__WEBPACK_IMPORTED_MODULE_39___default=__webpack_require__.n(_ui_Routing__WEBPACK_IMPORTED_MODULE_39__),decimal_js__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__(43);const INITIALSHARES=1e9,SHARESPERPRICEUPDATE=1e6,IssueNewSharesCooldown=216e3,SellSharesCooldown=18e3,CyclesPerMarketCycle=50,CyclesPerIndustryStateCycle=CyclesPerMarketCycle/_CorporationState__WEBPACK_IMPORTED_MODULE_0__.AllCorporationStates.length,SecsPerMarketCycle=CyclesPerMarketCycle/5,Cities=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],WarehouseInitialCost=5e9,WarehouseInitialSize=100,WarehouseUpgradeBaseCost=1e9,OfficeInitialCost=4e9,OfficeInitialSize=3,OfficeUpgradeBaseCost=1e9,BribeThreshold=1e14,BribeToRepRatio=1e9,ProductProductionCostRatio=5,DividendMaxPercentage=50,EmployeeSalaryMultiplier=3,CyclesPerEmployeeRaise=400,EmployeeRaiseAmount=50,BaseMaxProducts=3;let researchTreeBoxOpened=!1,researchTreeBox=null;$(document).mousedown(function(e){researchTreeBoxOpened&&null==$(e.target).closest("#corporation-research-popup-box-content").get(0)&&(Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_32__.removeElement)(researchTreeBox),researchTreeBox=null,researchTreeBoxOpened=!1)});var empManualAssignmentModeActive=!1;function Industry(e={}){this.offices={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.Sector12]:new OfficeSpace({loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.Sector12,size:OfficeInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.Volhaven]:0},this.name=e.name?e.name:0,this.type=e.type?e.type:0,this.sciResearch=new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Scientific Research"}),this.researched={},this.reqMats={},this.prodMats=[],this.products={},this.makesProducts=!1,this.awareness=0,this.popularity=0,this.startingCost=0,this.reFac=0,this.sciFac=0,this.hwFac=0,this.robFac=0,this.aiFac=0,this.advFac=0,this.prodMult=0,this.lastCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0);var t=Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__.IndustryUpgrades).length;this.upgrades=Array(t).fill(0),this.state="START",this.newInd=!0,this.warehouses={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.Chonqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.Sector12]:new _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse({corp:e.corp,industry:this,loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.Sector12,size:WarehouseInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_16__.CityName.Volhaven]:0},this.init()}function Employee(e={}){if(!(this instanceof Employee))return new Employee(e);this.name=e.name?e.name:"Bobby",this.mor=e.morale?e.morale:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),this.hap=e.happiness?e.happiness:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),this.ene=e.energy?e.energy:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),this.int=e.intelligence?e.intelligence:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(10,50),this.cha=e.charisma?e.charisma:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(10,50),this.exp=e.experience?e.experience:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(10,50),this.cre=e.creativity?e.creativity:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(10,50),this.eff=e.efficiency?e.efficiency:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(10,50),this.sal=e.salary?e.salary:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(.1,5),this.pro=0,this.cyclesUntilRaise=CyclesPerEmployeeRaise,this.loc=e.loc?e.loc:"",this.pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned}Industry.prototype.init=function(){switch(this.startingCost=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryStartingCosts[this.type],this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Energy:this.reFac=.65,this.sciFac=.7,this.robFac=.05,this.aiFac=.3,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.2},this.prodMats=["Energy"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Utilities:case"Utilities":this.reFac=.5,this.sciFac=.6,this.robFac=.4,this.aiFac=.4,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.1},this.prodMats=["Water"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Agriculture:this.reFac=.72,this.sciFac=.5,this.hwFac=.2,this.robFac=.3,this.aiFac=.3,this.advFac=.04,this.reqMats={Water:.5,Energy:.5},this.prodMats=["Plants","Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Fishing:this.reFac=.15,this.sciFac=.35,this.hwFac=.35,this.robFac=.5,this.aiFac=.2,this.advFac=.08,this.reqMats={Energy:.5},this.prodMats=["Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Mining:this.reFac=.3,this.sciFac=.26,this.hwFac=.4,this.robFac=.45,this.aiFac=.45,this.advFac=.06,this.reqMats={Energy:.8},this.prodMats=["Metal"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Food:this.sciFac=.12,this.hwFac=.15,this.robFac=.3,this.aiFac=.25,this.advFac=.25,this.reFac=.05,this.reqMats={Food:.5,Water:.5,Energy:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Tobacco:this.reFac=.15,this.sciFac=.75,this.hwFac=.15,this.robFac=.2,this.aiFac=.15,this.advFac=.2,this.reqMats={Plants:1,Water:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Chemical:this.reFac=.25,this.sciFac=.75,this.hwFac=.2,this.robFac=.25,this.aiFac=.2,this.advFac=.07,this.reqMats={Plants:1,Energy:.5,Water:.5},this.prodMats=["Chemicals"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical:this.reFac=.05,this.sciFac=.8,this.hwFac=.15,this.robFac=.25,this.aiFac=.2,this.advFac=.16,this.reqMats={Chemicals:2,Energy:1,Water:.5},this.prodMats=["Drugs"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics:this.reFac=.32,this.sciFac=.65,this.aiFac=.36,this.advFac=.18,this.hwFac=.19,this.reqMats={Hardware:5,Energy:3},this.prodMats=["Robots"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.15,this.aiFac=.18,this.robFac=.05,this.reqMats={Hardware:.5,Energy:.5},this.prodMats=["AICores"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Healthcare:this.reFac=.1,this.sciFac=.75,this.advFac=.11,this.hwFac=.1,this.robFac=.1,this.aiFac=.1,this.reqMats={Robots:10,AICores:5,Energy:5,Water:5},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:5,Energy:5,Water:2,Hardware:4},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`)}},Industry.prototype.getProductDescriptionText=function(){if(this.makesProducts)switch(this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Food:return"create and manage restaurants";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Tobacco:return"create tobacco and tobacco-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical:return"develop new pharmaceutical drugs";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics:return"build specialized robots and robot-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software:return"develop computer software";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Healthcare:return"build and manage hospitals";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.RealEstate:return"develop and manage real estate properties";default:return console.error("Invalid industry type in Industry.getProductDescriptionText"),""}},Industry.prototype.getMaximumNumberProducts=function(){if(!this.makesProducts)return 0;let e=0;return this.hasResearch("uPgrade: Capacity.I")&&++e,this.hasResearch("uPgrade: Capacity.II")&&++e,BaseMaxProducts+e},Industry.prototype.hasMaximumNumberProducts=function(){return Object.keys(this.products).length>=this.getMaximumNumberProducts()},Industry.prototype.calculateProductionFactors=function(){for(var e=0,t=0;t0&&(e.breakdown+=t+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(n.data[e.loc][0]*n.siz,0)+"
")}},Industry.prototype.process=function(e=1,t,n){if(this.state=t,"START"===t){(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.error("NaN in Corporation's computed revenue/expenses"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);var r=0;for(var a in this.offices)this.offices[a]instanceof OfficeSpace&&(r+=this.offices[a].process(e,{industry:this,corporation:n}));this.thisCycleExpenses=this.thisCycleExpenses.plus(r),this.processMaterialMarket(e),this.processProductMarket(e),this.popularity-=1e-4*e,this.popularity=Math.max(0,this.popularity);var i=n.getDreamSenseGain(),o=4*i;return void(i>0&&(this.popularity+=i*e,this.awareness+=o*e))}let s=this.processMaterials(e,n);Array.isArray(s)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(s[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(s[1])),s=this.processProducts(e,n),Array.isArray(s)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(s[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(s[1]))},Industry.prototype.processMaterialMarket=function(e=1){for(var t=this.reqMats,n=this.prodMats,r=0;r0&&(a.qty+=r,expenses+=r*a.bCost)}(matName,industry),this.updateWarehouseSizeUsed(warehouse));break;case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){var mat=warehouse.materials[this.prodMats[0]],maxProd=this.getOfficeProductivity(office)*this.prodMult*company.getProductionMultiplier()*this.getProductionMultiplier();let e;e=mat.prdman[0]?Math.min(maxProd,mat.prdman[1]):maxProd,e*=SecsPerMarketCycle*marketCycles;var totalMatSize=0;for(let e=0;e0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/totalMatSize);e=Math.min(maxAmt,e)}e<0&&(e=0),warehouse.smartSupplyStore+=e/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var req=this.reqMats[reqMatName]*e;warehouse.materials[reqMatName].qty0&&e>0){for(const t in this.reqMats){var reqMatQtyNeeded=this.reqMats[t]*e*producableFrac;warehouse.materials[t].qty-=reqMatQtyNeeded,warehouse.materials[t].prd=0,warehouse.materials[t].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}for(let t=0;tmat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];mat.totalExp=0;for(var expI=0;expI=expWarehouse.size)return[0,0];var maxAmt=Math.floor((expWarehouse.size-expWarehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[matName]);amt=Math.min(maxAmt,amt),expWarehouse.materials[matName].imp+=amt/(SecsPerMarketCycle*marketCycles),expWarehouse.materials[matName].qty+=amt,expWarehouse.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,expIndustry.updateWarehouseSizeUsed(expWarehouse);break}}}mat.totalExp/=SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error(`Invalid state: ${this.state}`)}this.updateWarehouseSizeUsed(warehouse)}office instanceof OfficeSpace&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD],.5)*company.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}return[revenue,expenses]},Industry.prototype.processProducts=function(e=1,t){var n=0;if("PRODUCTION"===this.state)for(const t in this.products){const n=this.products[t];if(!n.fin){const t=n.createCity,r=this.offices[t],a=r.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer],i=r.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management],o=r.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations],s=a+i+o;if(s<=0)break;const l=1+i/(1.2*s),c=(Math.pow(a,.34)+Math.pow(o,.2))*l;n.createProduct(e,c),n.prog>=100&&n.finishProduct(r.employeeProd,this);break}}for(var r in this.products)if(this.products.hasOwnProperty(r)){var a=this.products[r];a instanceof _Product__WEBPACK_IMPORTED_MODULE_8__.Product&&a.fin&&(n+=this.processProduct(e,a,t))}return[n,0]},Industry.prototype.processProduct=function(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/netStorageSize);prod=Math.min(maxAmt,prod)}warehouse.smartSupplyStore+=prod/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var req=product.reqMats[reqMatName]*prod;warehouse.materials[reqMatName].qty0&&prod>0){for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var reqMatQtyNeeded=product.reqMats[reqMatName]*prod*producableFrac;warehouse.materials[reqMatName].qty-=reqMatQtyNeeded,warehouse.materials[reqMatName].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}product.data[city][0]+=prod*producableFrac}product.data[city][1]=prod*producableFrac/(SecsPerMarketCycle*marketCycles);break;case"SALE":for(var reqMatName in product.pCost=0,product.reqMats)product.reqMats.hasOwnProperty(reqMatName)&&(product.pCost+=product.reqMats[reqMatName]*warehouse.materials[reqMatName].bCost);product.pCost*=ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;var sCost;if(product.marketTa2){const e=product.data[city][1],t=markupLimit,n=e,r=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),a=Math.sqrt(n/r);let i;0===r||0===a?0===n?i=0:(i=product.pCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/a+product.pCost,product.marketTa2Price[city]=i,sCost=i}else product.marketTa1?sCost=product.pCost+markupLimit:Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_30__.isString)(product.sCost)?(sCost=product.sCost.replace(/MP/g,product.pCost+product.rat/product.mku),sCost=eval(sCost)):sCost=product.sCost;var markup=1;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));var maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier(),sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_30__.isString)(product.sllman[city][1])){var tmp=product.sllman[city][1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):!1===product.sllman[city][0]?0:maxSell;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break;case"START":case"PURCHASE":case"EXPORT":break;default:console.error(`Invalid State: ${this.state}`)}}return totalProfit},Industry.prototype.discontinueProduct=function(e){for(var t in this.products)this.products.hasOwnProperty(t)&&e===this.products[t]&&delete this.products[t]},Industry.prototype.upgrade=function(e,t){var n=t.corporation,r=(t.division,t.office),a=e[0];for(e[1],e[2],e[3];this.upgrades.length<=a;)this.upgrades.push(0);switch(++this.upgrades[a],a){case 0:for(let e=0;e{if(this.sciResearch.qty>=n.cost)return this.sciResearch.qty-=n.cost,t.research(r[e]),this.researched[r[e]]=!0,Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)(`Researched ${r[e]}. It may take a market cycle `+`(~${SecsPerMarketCycle} seconds) before the effects of `+"the Research apply."),this.createResearchBox();Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)(`You do not have enough Scientific Research for ${n.name}`)}):console.warn(`Could not find Research Tree div for ${a}`)}const a=document.getElementById(`${e}-content`);null!=a&&(Object(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_24__.appendLineBreaks)(a,2),a.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("pre",{display:"block",innerText:"Multipliers from research:\n"+` * Advertising Multiplier: x${t.getAdvertisingMultiplier()}\n`+` * Employee Charisma Multiplier: x${t.getEmployeeChaMultiplier()}\n`+` * Employee Creativity Multiplier: x${t.getEmployeeCreMultiplier()}\n`+` * Employee Efficiency Multiplier: x${t.getEmployeeEffMultiplier()}\n`+` * Employee Intelligence Multiplier: x${t.getEmployeeIntMultiplier()}\n`+` * Production Multiplier: x${t.getProductionMultiplier()}\n`+` * Sales Multiplier: x${t.getSalesMultiplier()}\n`+` * Scientific Research Multiplier: x${t.getScientificResearchMultiplier()}\n`+` * Storage Multiplier: x${t.getStorageMultiplier()}`})),a.appendChild(Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_27__.createPopupCloseButton)(researchTreeBox,{class:"std-button",display:"block",innerText:"Close"}))),researchTreeBoxOpened=!0},Industry.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Generic_toJSON)("Industry",this)},Industry.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Generic_fromJSON)(Industry,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Reviver.constructors.Industry=Industry,Employee.prototype.process=function(e=1,t){var n=.003*e,r=n*Math.random();this.exp+=n,this.cyclesUntilRaise-=e,this.cyclesUntilRaise<=0&&(this.salary+=EmployeeRaiseAmount,this.cyclesUntilRaise+=CyclesPerEmployeeRaise);var a=n*Math.random();return this.pos===_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training&&(this.cha+=a,this.exp+=a,this.eff+=a),this.ene-=r,this.hap-=r,this.eneHappiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(this.hap,3)+"
Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(this.ene,3)+"
Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(i,3)+"
Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(a,3)+"
Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(this.exp,3)+"
Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(r,3)+"
Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(o,3)+"
Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(this.sal,"$0.000a")+"/ s
"}));var s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("select",{});for(var l in _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions)_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.hasOwnProperty(l)&&s.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("option",{text:_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions[l],value:_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions[l]}));s.addEventListener("change",()=>{this.pos=s.options[s.selectedIndex].value});for(var c=0;c=this.size},OfficeSpace.prototype.process=function(e=1,t){t.corporation;var n=t.industry;if(n.hasResearch("HRBuddy-Recruitment")&&!this.atCapacity()){const e=this.hireRandomEmployee();n.hasResearch("HRBuddy-Training")&&(e.pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training)}this.maxEne=100,this.maxHap=100,this.maxMor=100,n.hasResearch("Go-Juice")&&(this.maxEne+=10),n.hasResearch("JoyWire")&&(this.maxHap+=10),n.hasResearch("Sti.mu")&&(this.maxMor+=10);var r=1;n.funds<0&&n.lastCycleRevenue<0?r=Math.pow(.99,e):n.funds>0&&n.lastCycleRevenue>0&&(r=Math.pow(1.01,e));const a=n.hasResearch("AutoBrew"),i=n.hasResearch("AutoPartyManager");var o=0;for(let t=0;tCharisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(t.cha,1)+"
Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(t.exp,1)+"
Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(t.cre,1)+"
Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(t.eff,1)+"
Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(t.sal,"$0.000a")+" s
",clickListener:()=>(n.hireEmployee(t,e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)})},_=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("a",{class:"a-link-button",innerText:"Cancel",float:"right",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)}),g=[h,d(u,this),d(m,this),d(p,this),_];Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_26__.createPopup)("cmpy-mgmt-hire-employee-popup",g)}},OfficeSpace.prototype.hireEmployee=function(e,t){var n=t.corporation,r=(t.industry,Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoTxtInpBoxGetYesButton)()),a=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoTxtInpBoxGetNoButton)();r.innerHTML="Hire",a.innerHTML="Cancel",r.addEventListener("click",()=>{for(var t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoTxtInpBoxGetInput)(),r=0;rObject(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoTxtInpBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoTxtInpBoxCreate)("Give your employee a nickname!")},OfficeSpace.prototype.hireRandomEmployee=function(){if(!this.atCapacity()&&null==document.getElementById("cmpy-mgmt-hire-employee-popup")){var e=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(76,100)/100,t=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),n=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),o=new Employee({intelligence:t*e,charisma:n*e,experience:r*e,creativity:a*e,efficiency:i*e,salary:EmployeeSalaryMultiplier*(t+n+r+a+i)*e}),s=Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.generateRandomString)(7);for(let e=0;e=CyclesPerIndustryStateCycle){const t=this.getState(),n=1,r=n*CyclesPerIndustryStateCycle;if(this.storedCycles-=r,this.divisions.forEach(function(r){r.process(n,t,e)}),this.shareSaleCooldown>0&&(this.shareSaleCooldown-=r),this.issueNewSharesCooldown>0&&(this.issueNewSharesCooldown-=r),"START"===t){this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.divisions.forEach(e=>{e.lastCycleRevenue!==-1/0&&e.lastCycleRevenue!==1/0&&e.lastCycleExpenses!==-1/0&&e.lastCycleExpenses!==1/0&&(this.revenue=this.revenue.plus(e.lastCycleRevenue),this.expenses=this.expenses.plus(e.lastCycleExpenses))});const e=this.revenue.minus(this.expenses).times(n*SecsPerMarketCycle);if(isNaN(this.funds)&&(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("There was an error calculating your Corporations funds and they got reset to 0. This is a bug. Please report to game developer.

(Your funds have been set to $150b for the inconvenience)"),this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(15e10)),this.dividendPercentage>0&&e>0)if(isNaN(this.dividendPercentage)||this.dividendPercentage<0||this.dividendPercentage>DividendMaxPercentage)console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);else{const t=this.dividendPercentage/100*e,n=e-t,r=t/this.totalShares,a=this.numShares*r*(1-this.dividendTaxPercentage/100);_Player__WEBPACK_IMPORTED_MODULE_17__.Player.gainMoney(a),_Player__WEBPACK_IMPORTED_MODULE_17__.Player.recordMoneySource(a,"corporation"),this.funds=this.funds.plus(n)}else this.funds=this.funds.plus(e);this.updateSharePrice()}this.state.nextState(),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19__.Page.Corporation)&&this.rerender()}},Corporation.prototype.determineValuation=function(){var e,t=this.revenue.minus(this.expenses).toNumber();return this.public?(this.dividendPercentage>0&&(t*=(100-this.dividendPercentage)/100),e=this.funds.toNumber()+85e3*t,e*=Math.pow(1.1,this.divisions.length),e=Math.max(e,0)):(e=1e10+Math.max(this.funds.toNumber(),0)/3,t>0?(e+=315e3*t,e*=Math.pow(1.1,this.divisions.length)):e=1e10*Math.pow(1.1,this.divisions.length),e-=e%1e6),e*_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__.BitNodeMultipliers.CorporationValuation},Corporation.prototype.getInvestment=function(){var e,t=this.determineValuation();let n=4;switch(this.fundingRound){case 0:e=.1,n=4;break;case 1:e=.35,n=3;break;case 2:e=.25,n=3;break;case 3:e=.2,n=2.5;break;case 4:return}var r=t*e*n,a=Math.floor(INITIALSHARES*e),i=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoBoxGetYesButton)(),o=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoBoxGetNoButton)();i.innerHTML="Accept",o.innerHML="Reject",i.addEventListener("click",()=>(++this.fundingRound,this.funds=this.funds.plus(r),this.numShares-=a,this.rerender(),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoBoxClose)())),o.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoBoxCreate)("An investment firm has offered you "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(r,"$0.000a")+" in funding in exchange for a "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(100*e,"0.000a")+"% stake in the company ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(a,"0.000a")+" shares).

Do you accept or reject this offer?

Hint: Investment firms will offer more money if your corporation is turning a profit")},Corporation.prototype.goPublic=function(){var e,t=this.determineValuation()/this.totalShares,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("p",{innerHTML:"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(t,"$0.000a")+" per share (the IPO money will be deposited directly into your Corporation's funds).

You have a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(this.numShares,"0.000a")+" of shares that you can issue."}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("input",{type:"number",placeholder:"Shares to issue",onkeyup:t=>{t.preventDefault(),t.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.ENTER&&e.click()}}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("br",{});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("a",{class:"a-link-button",innerText:"Go Public",clickListener:()=>{var e=Math.round(r.value),t=this.determineValuation()/this.totalShares;return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("Invalid value for number of issued shares"),!1):e>this.numShares?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("Error: You don't have that many shares to issue!"),!1):(this.public=!0,this.sharePrice=t,this.issuedShares=e,this.numShares-=e,this.funds=this.funds.plus(e*t),this.rerender(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__.removeElementById)("cmpy-mgmt-go-public-popup"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)(`You took your ${this.name} public and earned `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.formatMoney(e*t)} in your IPO`),!1)}});var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__.removeElementById)("cmpy-mgmt-go-public-popup"),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_26__.createPopup)("cmpy-mgmt-go-public-popup",[n,a,r,e,i])},Corporation.prototype.getTargetSharePrice=function(){return this.determineValuation()/(2*(this.totalShares-this.numShares)+1)},Corporation.prototype.updateSharePrice=function(){const e=this.getTargetSharePrice();this.sharePrice<=e?this.sharePrice*=1+.01*Math.random():this.sharePrice*=1-.01*Math.random(),this.sharePrice<=.01&&(this.sharePrice=.01)},Corporation.prototype.immediatelyUpdateSharePrice=function(){this.sharePrice=this.getTargetSharePrice()},Corporation.prototype.calculateShareSale=function(e){let t=e,n=this.shareSalesUntilPriceUpdate,r=this.sharePrice,a=0,i=0;const o=Math.ceil(e/SHARESPERPRICEUPDATE);if(!(isNaN(o)||o>1e7)){for(let e=0;e3600?`${Math.floor(t/3600)} hour(s)`:t>60?`${Math.floor(t/60)} minute(s)`:`${Math.floor(t)} second(s)`},Corporation.prototype.unlock=function(e){const t=e[0],n=e[1];for(;this.unlockUpgrades.length<=t;)this.unlockUpgrades.push(0);this.funds.lt(n)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("You don't have enough funds to unlock this!"):(this.unlockUpgrades[t]=1,this.funds=this.funds.minus(n),5===t?this.dividendTaxPercentage-=5:6===t&&(this.dividendTaxPercentage-=10))},Corporation.prototype.upgrade=function(e){for(var t=e[0],n=e[1],r=e[2],a=e[3];this.upgrades.length<=t;)this.upgrades.push(0);for(;this.upgradeMultipliers.length<=t;)this.upgradeMultipliers.push(1);var i=n*Math.pow(r,this.upgrades[t]);if(this.funds.lt(i))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("You don't have enough funds to purchase this!");else if(++this.upgrades[t],this.funds=this.funds.minus(i),this.upgradeMultipliers[t]=1+this.upgrades[t]*a,1===t)for(var o=0;o=t.HacknetServerMaxCache)return 1/0;const r=t.HacknetServerUpgradeCacheMult;let a=0,i=this.cache;for(let e=0;e=t.HacknetServerMaxCores)return 1/0;const a=t.HacknetServerUpgradeCoreMult;let i=0,o=this.cores;for(let e=0;e=t.HacknetServerMaxLevel)return 1/0;const a=t.HacknetServerUpgradeLevelMult;let i=0,o=this.level;for(let e=0;e=t.HacknetServerMaxRam)return 1/0;let a=0,i=Math.round(Math.log2(this.maxRam)),o=this.maxRam;for(let e=0;eh.Start&&(d.currStep-=1);g()}(),!1}),Object(l.clearEventListeners)("interactive-tutorial-next").addEventListener("click",function(){return y(),!1}),g()}function g(){if(d.isRunning){var e=Object(l.clearEventListeners)("terminal-menu-link"),t=Object(l.clearEventListeners)("stats-menu-link"),n=Object(l.clearEventListeners)("active-scripts-menu-link"),a=Object(l.clearEventListeners)("hacknet-nodes-menu-link"),i=Object(l.clearEventListeners)("city-menu-link"),o=Object(l.clearEventListeners)("tutorial-menu-link");e.removeAttribute("class"),t.removeAttribute("class"),n.removeAttribute("class"),a.removeAttribute("class"),i.removeAttribute("class"),o.removeAttribute("class");var s=document.getElementById("interactive-tutorial-next");switch(d.currStep){case h.Start:r.Engine.loadTerminalContent(),b("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future...The year is 2077...

This tutorial will show you the basics of the game. You may skip the tutorial at any time."),s.style.display="inline-block";break;case h.GoToCharacterPage:r.Engine.loadTerminalContent(),b("Let's start by heading to the Stats page. Click the 'Stats' tab on the main navigation menu (left-hand side of the screen)"),s.style.display="none",t.setAttribute("class","flashing-button"),t.addEventListener("click",function(){return r.Engine.loadCharacterContent(),y(),!1});break;case h.CharacterPage:r.Engine.loadCharacterContent(),b("The Stats page shows a lot of important information about your progress, such as your skills, money, and bonuses/multipliers. "),s.style.display="inline-block";break;case h.CharacterGoToTerminalPage:r.Engine.loadCharacterContent(),b("Let's head to your computer's terminal by clicking the 'Terminal' tab on the main navigation menu."),s.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return r.Engine.loadTerminalContent(),y(),!1});break;case h.TerminalIntro:r.Engine.loadTerminalContent(),b("The Terminal is used to interface with your home computer as well as all of the other machines around the world."),s.style.display="inline-block";break;case h.TerminalHelp:r.Engine.loadTerminalContent(),b("Let's try it out. Start by entering the 'help' command into the Terminal (Don't forget to press Enter after typing the command)"),s.style.display="none";break;case h.TerminalLs:r.Engine.loadTerminalContent(),b("The 'help' command displays a list of all available Terminal commands, how to use them, and a description of what they do.

Let's try another command. Enter the 'ls' command"),s.style.display="none";break;case h.TerminalScan:r.Engine.loadTerminalContent(),b("'ls' is a basic command that shows all of the contents (programs/scripts) on the computer. Right now, it shows that you have a program called 'NUKE.exe' on your computer. We'll get to what this does later.

Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that now by first entering the 'scan' command."),s.style.display="none";break;case h.TerminalScanAnalyze1:r.Engine.loadTerminalContent(),b("The 'scan' command shows all available network connections. In other words, it displays a list of all servers that can be connected to from your current machine. A server is identified by either its IP or its hostname.

That's great and all, but there's so many servers. Which one should you go to? The 'scan-analyze' command gives some more detailed information about servers on the network. Try it now"),s.style.display="none";break;case h.TerminalScanAnalyze2:r.Engine.loadTerminalContent(),b("You just ran 'scan-analyze' with a depth of one. This command shows more detailed information about each server that you can connect to (servers that are a distance of one node away).

It is also possible to run 'scan-analyze' with a higher depth. Let's try a depth of two with the following command: 'scan-analyze 2'."),s.style.display="none";break;case h.TerminalConnect:r.Engine.loadTerminalContent(),b("Now you can see information about all servers that are up to two nodes away, as well as figure out how to navigate to those servers through the network. You can only connect to a server that is one node away. To connect to a machine, use the 'connect [ip/hostname]' command. You can type in the ip or the hostname, but dont use both.

From the results of the 'scan-analyze' command, we can see that the 'foodnstuff' server is only one node away. Let's connect so it now using: 'connect foodnstuff'"),s.style.display="none";break;case h.TerminalAnalyze:r.Engine.loadTerminalContent(),b("You are now connected to another machine! What can you do now? You can hack it!

In the year 2077, currency has become digital and decentralized. People and corporations store their money on servers and computers. Using your hacking abilities, you can hack servers to steal money and gain experience.

Before you try to hack a server, you should run diagnostics using the 'analyze' command"),s.style.display="none";break;case h.TerminalNuke:r.Engine.loadTerminalContent(),b("When the 'analyze' command finishes running it will show useful information about hacking the server.

For this server, the required hacking skill is only 1, which means you can hack it right now. However, in order to hack a server you must first gain root access. The 'NUKE.exe' program that we saw earlier on your home computer is a virus that will grant you root access to a machine if there are enough open ports.

The 'analyze' results shows that there do not need to be any open ports on this machine for the NUKE virus to work, so go ahead and run the virus using the 'run NUKE.exe' command."),s.style.display="none";break;case h.TerminalManualHack:r.Engine.loadTerminalContent(),b("You now have root access! You can hack the server using the 'hack' command. Try doing that now."),s.style.display="none";break;case h.TerminalHackingMechanics:r.Engine.loadTerminalContent(),b("You are now attempting to hack the server. Note that performing a hack takes time and only has a certain percentage chance of success. This time and success chance is determined by a variety of factors, including your hacking skill and the server's security level.

If your attempt to hack the server is successful, you will steal a certain percentage of the server's total money. This percentage is affected by your hacking skill and the server's security level.

The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money, then you will encounter diminishing returns in your hacking."),s.style.display="inline-block";break;case h.TerminalCreateScript:r.Engine.loadTerminalContent(),b("Hacking is the core mechanic of the game and is necessary for progressing. However, you don't want to be hacking manually the entire time. You can automate your hacking by writing scripts!

To create a new script or edit an existing one, you can use the 'nano' command. Scripts must end with the '.script' extension. Let's make a script now by entering 'nano foodnstuff.script' after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)"),s.style.display="none";break;case h.TerminalTypeScript:r.Engine.loadScriptEditorContent("foodnstuff.script",""),b("This is the script editor. You can use it to program your scripts. Scripts are written in the Netscript language, a programming language created for this game. There are details about the Netscript language in the documentation, which can be accessed in the 'Tutorial' tab on the main navigation menu. I highly suggest you check it out after this tutorial. For now, just copy and paste the following code into the script editor:

while(true) {
  hack('foodnstuff');
}

For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the 'foodnstuff' server.

To save and close the script editor, press the button in the bottom left, or press ctrl + b."),s.style.display="none";break;case h.TerminalFree:r.Engine.loadTerminalContent(),b("Now we'll run the script. Scripts require a certain amount of RAM to run, and can be run on any machine which you have root access to. Different servers have different amounts of RAM. You can also purchase more RAM for your home server.

To check how much RAM is available on this machine, enter the 'free' command."),s.style.display="none";break;case h.TerminalRunScript:r.Engine.loadTerminalContent(),b("We have 16GB of free RAM on this machine, which is enough to run our script. Let's run our script using 'run foodnstuff.script'."),s.style.display="none";break;case h.TerminalGoToActiveScriptsPage:r.Engine.loadTerminalContent(),b("Your script is now running! The script might take a few seconds to 'fully start up'. Your scripts will continuously run in the background and will automatically stop if the code ever completes (the 'foodnstuff.script' will never complete because it runs an infinite loop).

These scripts can passively earn you income and hacking experience. Your scripts will also earn money and experience while you are offline, although at a much slower rate.

Let's check out some statistics for our running scripts by clicking the 'Active Scripts' link in the main navigation menu."),s.style.display="none",n.setAttribute("class","flashing-button"),n.addEventListener("click",function(){return r.Engine.loadActiveScriptsContent(),y(),!1});break;case h.ActiveScriptsPage:r.Engine.loadActiveScriptsContent(),b("This page displays stats/information about all of your scripts that are running across every existing server. You can use this to gauge how well your scripts are doing. Let's go back to the Terminal now using the 'Terminal' link."),s.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return r.Engine.loadTerminalContent(),y(),!1});break;case h.ActiveScriptsToTerminal:r.Engine.loadTerminalContent(),b("One last thing about scripts, each active script contains logs that detail what it's doing. We can check these logs using the 'tail' command. Do that now for the script we just ran by typing 'tail foodnstuff.script'"),s.style.display="none";break;case h.TerminalTailScript:r.Engine.loadTerminalContent(),b("The log for this script won't show much right now (it might show nothing at all) because it just started running...but check back again in a few minutes!

This pretty much covers the basics of hacking. To learn more about writing scripts using the Netscript language, select the 'Tutorial' link in the main navigation menu to look at the documentation. If you are an experienced JavaScript developer, I would highly suggest you check out the section on NetscriptJS/Netscript 2.0.

For now, let's move on to something else!"),s.style.display="inline-block";break;case h.GoToHacknetNodesPage:r.Engine.loadTerminalContent(),b("Hacking is not the only way to earn money. One other way to passively earn money is by purchasing and upgrading Hacknet Nodes. Let's go to the 'Hacknet Nodes' page through the main navigation menu now."),s.style.display="none",a.setAttribute("class","flashing-button"),a.addEventListener("click",function(){return r.Engine.loadHacknetNodesContent(),y(),!1});break;case h.HacknetNodesIntroduction:r.Engine.loadHacknetNodesContent(),b("From this page you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now."),s.style.display="none";break;case h.HacknetNodesGoToWorldPage:r.Engine.loadHacknetNodesContent(),b("You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.

Let's go to the 'City' page through the main navigation menu."),s.style.display="none",i.setAttribute("class","flashing-button"),i.addEventListener("click",function(){return r.Engine.loadLocationContent(),y(),!1});break;case h.WorldDescription:r.Engine.loadLocationContent(),b("This page lists all of the different locations you can currently travel to. Each location has something that you can do. There's a lot of content out in the world, make sure you explore and discover!

Lastly, click on the 'Tutorial' link in the main navigation menu."),s.style.display="none",o.setAttribute("class","flashing-button"),o.addEventListener("click",function(){return r.Engine.loadTutorialContent(),y(),!1});break;case h.TutorialPageInfo:r.Engine.loadTutorialContent(),b("This page contains a lot of different documentation about the game's content and mechanics. I know it's a lot, but I highly suggest you read (or at least skim) through this before you start playing. That's the end of the tutorial. Hope you enjoy the game!"),s.style.display="inline-block",s.innerHTML="Finish Tutorial";break;case h.End:f();break;default:throw new Error("Invalid tutorial step")}!0===d.stepIsDone[d.currStep]&&(s.style.display="inline-block")}}function y(){d.currStep===h.GoToCharacterPage&&document.getElementById("stats-menu-link").removeAttribute("class"),d.currStep===h.CharacterGoToTerminalPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),d.currStep===h.TerminalGoToActiveScriptsPage&&document.getElementById("active-scripts-menu-link").removeAttribute("class"),d.currStep===h.ActiveScriptsPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),d.currStep===h.GoToHacknetNodesPage&&document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),d.currStep===h.HacknetNodesGoToWorldPage&&document.getElementById("city-menu-link").removeAttribute("class"),d.currStep===h.WorldDescription&&document.getElementById("tutorial-menu-link").removeAttribute("class"),d.stepIsDone[d.currStep]=!0,d.currStep
Getting Started GuideDocumentation

The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. To read it, go to Terminal and enter

cat hackers-starting-handbook.lit"}),n=Object(c.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(m.removeElementById)(e)}});Object(u.createPopup)(e,[t,n]),a.Player.getHomeComputer().messages.push("hackers-starting-handbook.lit")}function b(e){var t=document.getElementById("interactive-tutorial-text");if(null==t)throw new Error("Could not find text box");t.innerHTML=e,t.parentElement.scrollTop=0}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(122),a=n(494),i=n(493),o=n(117),s=n(492),l=n(491),c=n(87),u=n(77),m=n(153),p=n(490),h=n(6),d=n(121),_=n(0),g=n(207),y=n(11),f=n(2),b=n(8),E=n(16),v=n(1),k=n(52);function C(e,n,r,s,l,c=null){const u=c instanceof d.WorkerScript;if(!(e instanceof o.Stock))return u?c.log("placeOrder",`Invalid stock: '${e}'`):b.dialogBoxCreate("ERROR: Invalid stock passed to placeOrder() function"),!1;if("number"!=typeof n||"number"!=typeof r)return u?c.log("placeOrder",`Invalid arguments: shares='${n}' price='${r}'`):b.dialogBoxCreate("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;const m=new a.Order(e.symbol,n,r,s,l);if(null==t.StockMarket.Orders){const e={};for(const n in t.StockMarket){const r=t.StockMarket[n];r instanceof o.Stock&&(e[r.symbol]=[])}t.StockMarket.Orders=e}t.StockMarket.Orders[e.symbol].push(m);const p={rerenderFn:R,stockMarket:t.StockMarket,symbolToStockMap:t.SymbolToStockMap};return i.processOrders(e,m.type,m.pos,p),R(),!0}function T(e,n=null){var r=n instanceof d.WorkerScript;if(null==t.StockMarket.Orders)return!1;if(e.order&&e.order instanceof a.Order){const n=e.order;for(var i=t.StockMarket.Orders[n.stockSymbol],s=0;s=n.cap&&(s=.1,n.b=!1),isNaN(s)&&(s=.5);const l=Math.random(),m={rerenderFn:R,stockMarket:t.StockMarket,symbolToStockMap:t.SymbolToStockMap};l{!function(e){null!=t.CompanyPositions[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.CompanyPositions[e.name]=new a.CompanyPosition(e)}(e)})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?a(e.value):new n(function(t){t(e.value)}).then(o,s)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const a=n(717),i=n(16),o=n(26),s=n(3),l=n(37),c=n(27);class u{constructor(e,t,n,r,a,i){this.name=e,this.desc=t,this.generate=n,this.solver=r,this.difficulty=a,this.numTries=i}}t.CodingContractType=u,t.CodingContractTypes={};for(const e of a.codingContractTypesMetadata)t.CodingContractTypes[e.name]=new u(e.name,e.desc,e.gen,e.solver,e.difficulty,e.numTries);var m;!function(e){e[e.FactionReputation=0]="FactionReputation",e[e.FactionReputationAll=1]="FactionReputationAll",e[e.CompanyReputation=2]="CompanyReputation",e[e.Money=3]="Money"}(t.CodingContractRewardType||(t.CodingContractRewardType={})),function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure",e[e.Cancelled=2]="Cancelled"}(m=t.CodingContractResult||(t.CodingContractResult={}));class p{constructor(e="",n="Find Largest Prime Factor",r=null){if(this.tries=0,this.fn=e,this.fn.endsWith(".cct")||(this.fn+=".cct"),null==t.CodingContractTypes[n])throw new Error(`Error: invalid contract type: ${n} please contact developer`);this.type=n,this.data=t.CodingContractTypes[n].generate(),this.reward=r}static fromJSON(e){return i.Generic_fromJSON(p,e.data)}getData(){return this.data}getDescription(){return t.CodingContractTypes[this.type].desc(this.data)}getDifficulty(){return t.CodingContractTypes[this.type].difficulty}getMaxNumTries(){return t.CodingContractTypes[this.type].numTries}getType(){return t.CodingContractTypes[this.type].name}isSolution(e){return t.CodingContractTypes[this.type].solver(this.data,e)}prompt(){return r(this,void 0,void 0,function*(){return new Promise((e,n)=>{const r=t.CodingContractTypes[this.type],a=`coding-contract-prompt-popup-${this.fn}`,i=s.createElement("p",{innerHTML:["You are attempting to solve a Coding Contract. You have",`${this.getMaxNumTries()-this.tries} tries remaining,`,"after which the contract will self-destruct.

",`${r.desc(this.data).replace(/\n/g,"
")}`].join(" ")});let u,p,h;u=s.createElement("input",{onkeydown:e=>{e.keyCode===o.KEY.ENTER&&""!==u.value?(e.preventDefault(),p.click()):e.keyCode===o.KEY.ESC&&(e.preventDefault(),h.click())},placeholder:"Enter Solution here",width:"50%"}),p=s.createElement("a",{class:"a-link-button",clickListener:()=>{const t=u.value;this.isSolution(t)?e(m.Success):e(m.Failure),c.removeElementById(a)},innerText:"Solve"}),h=s.createElement("a",{class:"a-link-button",clickListener:()=>{e(m.Cancelled),c.removeElementById(a)},innerText:"Cancel"});const d=s.createElement("br");l.createPopup(a,[i,d,d,u,p,h]),u.focus()})})}toJSON(){return i.Generic_toJSON("CodingContract",this)}}t.CodingContract=p,i.Reviver.constructors.CodingContract=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isString=function(e){return"string"==typeof e||e instanceof String}},function(e,t,n){"use strict";n.d(t,"c",function(){return o}),n.d(t,"b",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"a",function(){return c});var r=n(65),a=(n(170),n(48)),i=n(20);function o(e,t){return new Promise(function(n,a){t.delay=Object(r.setTimeoutRef)(()=>{t.delay=null,n()},e),t.delayResolve=n})}function s(e,t,n=null){var r="";null!=n&&(r=" (Line "+function(e,t){var n=t.scriptRef.codeCode();try{return((n=n.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}(n,e)+")");const a=i.AllServers[e.serverIp];if(null==a)throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);return"|"+a.hostname+"|"+e.name+"|"+t+r}function l(e,t,n){const r=e.scriptRef.threads;if(!n)return isNaN(r)||r<1?1:r;const a=0|n;if(isNaN(n)||a<1)throw s(e,`Invalid thread count passed to ${t}: ${n}. Threads must be a positive number.`);if(n>r)throw s(e,`Too many threads requested by ${t}. Requested: ${n}. Has: ${r}.`);return a}function c(e){if(!Object(a.isString)(e))return!1;let t=e.split("|");if(4!=t.length)return!1;t[1];return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8);t.exceptionAlert=function(e){console.error(e),r.dialogBoxCreate("Caught an exception: "+e+"

Filename: "+(e.fileName||"UNKNOWN FILE NAME")+"

Line Number: "+(e.lineNumber||"UNKNOWN LINE NUMBER")+"

This is a bug, please report to game developer with this message as well as details about how to reproduce the bug.

If you want to be safe, I suggest refreshing the game WITHOUT saving so that your safe doesn't get corrupted",!1)}},function(e,t,n){"use strict";n.r(t),n.d(t,"inviteToFaction",function(){return P}),n.d(t,"joinFaction",function(){return S}),n.d(t,"startHackingMission",function(){return O}),n.d(t,"displayFactionContent",function(){return M}),n.d(t,"purchaseAugmentationBoxCreate",function(){return x}),n.d(t,"hasAugmentationPrereqs",function(){return w}),n.d(t,"purchaseAugmentation",function(){return A}),n.d(t,"getNextNeurofluxLevel",function(){return R}),n.d(t,"processPassiveFactionRepGain",function(){return N});var r=n(1),a=n.n(r),i=n(52),o=n.n(i),s=n(301),l=n(10),c=n(71),u=n(131),m=n(4),p=n(19),h=n(6),d=n(12),_=n(75),g=n(13),y=n(69),f=n(0),b=n(17),E=n(11),v=n(8),k=n(300),C=(n(16),n(7)),T=n(45);function P(e){b.Settings.SuppressFactionInvites?(e.alreadyInvited=!0,f.Player.factionInvitations.push(e.name),E.routing.isOn(E.Page.Factions)&&d.Engine.loadFactionsContent()):Object(k.a)(e)}function S(e){e.isMember=!0,f.Player.factions.push(e.name);const t=e.getInfo();for(const e in t.enemies){const n=t.enemies[e];g.Factions[n]instanceof _.Faction&&(g.Factions[n].isBanned=!0)}}function O(e){const t=new y.a(e.playerReputation,e);Object(y.d)(!0,t),t.init()}function M(e,t=!1){const n=g.Factions[e];if(null==n)throw new Error(`Invalid factionName passed into displayFactionContent(): ${e}`);if(!n.isMember)throw new Error("Not a member of this faction. Cannot display faction information");o.a.render(a.a.createElement(s.FactionRoot,{engine:d.Engine,initiallyOnAugmentationsPage:t,faction:n,p:f.Player,startHackingMissionFn:O}),d.Engine.Display.factionContent)}function x(e,t){const n=t.getInfo(),r=Object(T.yesNoBoxGetYesButton)();r.innerHTML="Purchase",r.addEventListener("click",function(){!Object(c.f)(e)&&f.Player.hasAugmentation(e)||(A(e,t),Object(T.yesNoBoxClose)())});const a=Object(T.yesNoBoxGetNoButton)();a.innerHTML="Cancel",a.addEventListener("click",function(){Object(T.yesNoBoxClose)()}),Object(T.yesNoBoxCreate)("

"+e.name+"


"+e.info+"


Would you like to purchase the "+e.name+" Augmentation for $"+Object(C.formatNumber)(e.baseCost*n.augmentationPriceMult,2)+"?")}function w(e){let t=!0;if(e.prereqs&&e.prereqs.length>0)for(let n=0;n=t.HacknetNodeMaxCores)return 1/0;const a=t.BaseCostForHacknetNodeCore,i=t.HacknetNodeUpgradeCoreMult;let o=0,s=this.cores;for(let e=0;e=t.HacknetNodeMaxLevel)return 1/0;const a=t.HacknetNodeUpgradeLevelMult;let i=0,o=this.level;for(let e=0;e=t.HacknetNodeMaxRam)return 1/0;let a=0,i=Math.round(Math.log2(this.ram)),o=this.ram;for(let e=0;e1?1:r<0?0:r}function o(e){null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty);var t=3;return(t+=e.baseDifficulty*a.Player.hacking_exp_mult*.3)*r.BitNodeMultipliers.HackExpGain}function s(e){const t=(100-e.hackDifficulty)/100*((a.Player.hacking_skill-(e.requiredHackingSkill-1))/a.Player.hacking_skill)*a.Player.hacking_money_mult/240;return t<0?0:t>1?1:t*r.BitNodeMultipliers.ScriptHackMoney}function l(e,t,n){const r=e.requiredHackingSkill*e.hackDifficulty;null==t&&(t=a.Player.hacking_skill),null==n&&(n=a.Player.intelligence);var i=2.5*r+500;return 5*(i/=t+50+.1*n)/a.Player.hacking_speed_mult}function c(e,t,n){return 3.2*l(e,t,n)}function u(e,t,n){return 4*l(e,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3),a=n(82);t.createPopupCloseButton=function(e,t){let n;function i(e){27===e.keyCode&&n.click()}return n=r.createElement("button",{class:t.class?t.class:"popup-box-button",display:t.display?t.display:"inline-block",innerText:null==t.innerText?"Cancel":t.innerText,clickListener:()=>{if(e instanceof Element)a.removeElement(e);else try{const t=document.getElementById(e);t instanceof Element&&a.removeElement(t)}catch(e){console.error(`createPopupCloseButton() threw: ${e}`)}return document.removeEventListener("keydown",i),!1}}),document.addEventListener("keydown",i),n}},,function(e,t,n){"use strict";n.d(t,"a",function(){return x}),n.d(t,"c",function(){return A}),n.d(t,"e",function(){return N}),n.d(t,"f",function(){return I}),n.d(t,"b",function(){return B}),n.d(t,"d",function(){return L});var r=n(67),a=n(121),i=n(89),o=n(105),s=n(160),l=n(6),c=n(12),u=n(290),m=n(49),p=n(107),h=n(211),d=n(112),_=n(0),g=n(119),y=n(177),f=n(73),b=n(20),E=n(17),v=n(65),k=n(189),C=n(8),T=(n(154),n(83)),P=n(158),S=n(7),O=n(81);const M=n(183),x=[];for(var w=0;w{i=!0;let t=e.source.value;t.startsWith("./")&&(t=t.slice(2));let n=function(e){for(let t=0;t{n.push(e.id.name),r.push(e)}}),a+="var "+t+";\n(function (namespace) {\n",r.forEach(e=>{a+=Object(k.generate)(e),a+="\n"}),n.forEach(e=>{a+="namespace."+e+" = "+e,a+="\n"}),a+="})("+t+" || ("+t+" = {}));\n"}else{let t=[];e.specifiers.forEach(e=>{t.push(e.local.name)});let n=[];M.simple(o,{FunctionDeclaration:e=>{t.includes(e.id.name)&&n.push(e)}}),n.forEach(e=>{a+=Object(k.generate)(e),a+="\n"})}}}),!i)return{code:e,lineOffset:0};var o=0;if("Program"!==n.type||null==n.body)throw new Error("Code could not be properly parsed");for(let e=n.body.length-1;e>=0;--e)"ImportDeclaration"===n.body[e].type&&(n.body.splice(e,1),++o);var s=(a.match(/\n/g)||[]).length-o;return e=Object(k.generate)(n),{code:e=a+e,lineOffset:s}}(t,e);n=a.code,i=a.lineOffset}catch(t){return Object(C.dialogBoxCreate)("Error processing Imports in "+e.name+":
"+t),e.env.stopFlag=!0,e.running=!1,void Object(r.killWorkerScript)(e)}var o;try{o=new u.a(n,function(t,n){var r=Object(p.a)(e);for(let e in r){let a=r[e];if("function"==typeof a)if("hack"===e||"grow"===e||"weaken"===e||"sleep"===e||"prompt"===e){let r=function(){let e=[];for(let n=0;n"+t),e.env.stopFlag=!0,e.running=!1,void Object(r.killWorkerScript)(e)}return new Promise(function(t,n){try{!function r(){try{if(e.env.stopFlag)return n(e);o.step()?Object(v.setTimeoutRef)(r,E.Settings.CodeInstructionRunTime):t(e)}catch(t){return t=t.toString(),Object(m.a)(t)||(t=Object(m.b)(e,t)),e.errorMessage=t,n(e)}}()}catch(t){return Object(S.isString)(t)?(e.errorMessage=t,n(e)):t instanceof a.WorkerScript?n(t):n(e)}})}function N(e,t){return D(e,t)?(t.runScript(e,_.Player.hacknet_node_money_mult),e.pid):0}function D(e,t){e.filename;let n=1;e.threads&&!isNaN(e.threads)?n=e.threads:e.threads=1;const l=Object(P.roundToTwo)(Object(y.getRamUsageFromRunningScript)(e)*n);if(l>t.maxRam-t.ramUsed)return Object(C.dialogBoxCreate)(`Not enough RAM to run script ${e.filename} with args `+`${Object(T.arrayToString)(e.args)}. This likely occurred because you re-loaded `+"the game and the script's RAM usage increased (either because of an update to the game or your changes to the script.)"),!1;t.ramUsed=Object(P.roundToTwo)(t.ramUsed+l);const c=Object(s.generateNextPid)();if(-1===c)throw new Error("Failed to start script because could not find available PID. This is most because you have too many scripts running.");const u=new a.WorkerScript(e,c,p.a);u.ramUsage=l,i.workerScripts.set(c,u),o.WorkerScriptStartStopEventEmitter.emitEvent();let d=null;if(u.name.endsWith(".js")||u.name.endsWith(".ns"))d=function(e){e.running=!0;let t=null;function n(n,r){return function(...a){if(e.env.stopFlag)throw e;if("sleep"===n)return r(...a);if(t)throw e.errorMessage=Object(m.b)(e,sprintf("Concurrent calls to Netscript functions not allowed! Did you forget to await hack(), grow(), or some other promise-returning function? (Currently running: %s tried to run: %s)",t,n),null),e;let i;t=n;try{i=r(...a)}catch(e){throw t=null,e}return i&&void 0!==i.finally?i.finally(function(){t=null}):(t=null,i)}}for(let t in e.env.vars)"function"==typeof e.env.vars[t]&&(e.env.vars[t]=n(t,e.env.vars[t]));return Object(h.a)(e.getServer().scripts,e).then(function(t){return void 0===t?e:[t,e]}).catch(t=>{if(t instanceof Error)throw e.errorMessage=Object(m.b)(e,t.message+(t.stack&&"\nstack:\n"+t.stack.toString()||"")),e;if(Object(m.a)(t))throw e.errorMessage=t,e;throw t})}(u);else if(!((d=R(u))instanceof Promise))return!1;return d.then(function(e){e.running&&(Object(r.killWorkerScript)(u),e.log("","Script finished running"))}).catch(function(e){if(e instanceof Error)return Object(C.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.error("Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: "+e.toString());if(e instanceof a.WorkerScript){if(!Object(m.a)(e.errorMessage))return void e.log("","Script killed");{const t=e.errorMessage.split("|");if(4!=t.length)return console.error("ERROR: Something wrong with Error text in evaluator..."),void console.error("Error text: "+errorText);const n=t[1],r=t[2],a=t[3];let i=`RUNTIME ERROR
${r}@${n}
`;e.args.length>0&&(i+=`Args: ${Object(T.arrayToString)(e.args)}
`),i+="
",i+=a,Object(C.dialogBoxCreate)(i),e.log("","Script crashed with runtime error")}e.running=!1,e.env.stopFlag=!0}else{if(Object(m.a)(e))return Object(C.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.error("ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: "+e.toString());Object(C.dialogBoxCreate)("An unknown script died for an unknown reason. This is a bug please contact game dev"),console.error(e)}Object(r.killWorkerScript)(u)}),!0}function I(e=1){var t=e*c.Engine._idleSpeed/1e3;for(const e of i.workerScripts.values())e.scriptRef.onlineRunningTime+=t}function B(){var e=0;let t=-1!==window.location.href.toLowerCase().indexOf("?noscripts");t&&console.info("Skipping the load of any scripts during startup");for(const n in b.AllServers)if(b.AllServers.hasOwnProperty(n)){const r=b.AllServers[n];r.ramUsed=0;for(let e=0;ec)return i.log(e,`Cannot run script '${n}' (t=${o}) on '${t.hostname}' because there is not enough available RAM!`),0;{i.log(e,`'${n}' on '${t.hostname}' with ${o} threads and args: ${Object(T.arrayToString)(r)}.`);let a=new g.RunningScript(s,r);return a.threads=o,N(a,t)}}return i.log(e,`Could not find script '${n}' on '${t.hostname}'`),0}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return T}),n.d(t,"f",function(){return P}),n.d(t,"e",function(){return S}),n.d(t,"b",function(){return O}),n.d(t,"c",function(){return A}),n.d(t,"d",function(){return N});var r=n(299),a=n(298),i=n(12),o=n(75),s=n(13),l=n(51),c=n(11),u=n(2),m=n(8),p=n(16),h=n(7),d=n(50),_=n(14),g=n(26),y=n(212),f=n(3),b=n(37),E=n(44),v=n(82),k=n(27);e(document).keydown(function(e){if(c.routing.isOn(c.Page.Gang)&&e.altKey){if(null!=D.gangMemberFilter&&D.gangMemberFilter===document.activeElement)return;e.keyCode===g.KEY[1]?"block"===D.gangTerritorySubpage.style.display&&D.managementButton.click():e.keyCode===g.KEY[2]&&"block"===D.gangManagementSubpage.style.display&&D.territoryButton.click()}}),e(document).mousedown(function(t){D.gangMemberUpgradeBoxOpened&&null==e(t.target).closest("#gang-member-upgrade-popup-box-content").get(0)&&(Object(v.removeElement)(D.gangMemberUpgradeBox),D.gangMemberUpgradeBox=null,D.gangMemberUpgradeBoxContent=null,D.gangMemberUpgradeBoxOpened=!1,D.gangMemberUpgradeBoxElements=null)});const C=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"];let T={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}};function P(){T={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}}}function S(e){T=JSON.parse(e,p.Reviver)}function O(e,t=!1){this.facName=e,this.members=[],this.wanted=1,this.respect=1,this.isHackingGang=t,this.respectGainRate=0,this.wantedGainRate=0,this.moneyGainRate=0,this.storedCycles=0,this.storedTerritoryAndPowerCycles=0,this.territoryClashChance=0,this.territoryWarfareEngaged=!1,this.notifyMemberDeath=!0}function M(e,t){const n=Math.max(1,1+Math.log(T[e].power/T[t].power)/Math.log(50));return Math.min(T[t].territory,1e-4*n*(Math.random()+.5))}function x(e){this.name=e,this.task="Unassigned",this.earnedRespect=0,this.hack=1,this.str=1,this.def=1,this.dex=1,this.agi=1,this.cha=1,this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1,this.hack_asc_mult=1,this.str_asc_mult=1,this.def_asc_mult=1,this.dex_asc_mult=1,this.agi_asc_mult=1,this.cha_asc_mult=1,this.upgrades=[],this.augmentations=[]}function w(e="",t="",n=!1,r=!1,a={baseRespect:0,baseWanted:0,baseMoney:0,hackWeight:0,strWeight:0,defWeight:0,dexWeight:0,agiWeight:0,chaWeight:0,difficulty:0}){this.name=e,this.desc=t,this.isHacking=n,this.isCombat=r,this.baseRespect=a.baseRespect?a.baseRespect:0,this.baseWanted=a.baseWanted?a.baseWanted:0,this.baseMoney=a.baseMoney?a.baseMoney:0,this.hackWeight=a.hackWeight?a.hackWeight:0,this.strWeight=a.strWeight?a.strWeight:0,this.defWeight=a.defWeight?a.defWeight:0,this.dexWeight=a.dexWeight?a.dexWeight:0,this.agiWeight=a.agiWeight?a.agiWeight:0,this.chaWeight=a.chaWeight?a.chaWeight:0,100!=Math.round(this.hackWeight+this.strWeight+this.defWeight+this.dexWeight+this.agiWeight+this.chaWeight)&&console.error(`GangMemberTask ${this.name} weights do not add up to 100`),this.difficulty=a.difficulty?a.difficulty:1,this.territory=a.territory?a.territory:{money:1,respect:1,wanted:1}}O.prototype.getPower=function(){return T[this.facName].power},O.prototype.getTerritory=function(){return T[this.facName].territory},O.prototype.process=function(e=1,t){const n=1e3/i.Engine._idleSpeed;if(isNaN(e)&&console.error(`NaN passed into Gang.process(): ${e}`),this.storedCycles+=e,this.storedCycles<2*n)return;const r=Math.min(this.storedCycles,5*n);try{this.processGains(r,t),this.processExperienceGains(r),this.processTerritoryAndPowerGains(r),this.storedCycles-=r}catch(e){Object(d.exceptionAlert)(`Exception caught when processing Gang: ${e}`)}},O.prototype.processGains=function(e=1,t){for(var n=0,r=0,a=0,i=0;it&&(n=1),this.wanted=n,this.wanted<1&&(this.wanted=1)}else console.warn("ERROR: wantedLevelGains is NaN");"number"==typeof n?(t.gainMoney(n*e),t.recordMoneySource(n*e,"gang")):console.warn("ERROR: respectGains is NaN")},O.prototype.processTerritoryAndPowerGains=function(e=1){if(this.storedTerritoryAndPowerCycles+=e,this.storedTerritoryAndPowerCycles<100)return;this.storedTerritoryAndPowerCycles-=100;const t=this.facName;for(const e in T)if(T.hasOwnProperty(e))if(e==t)T[e].power+=this.calculatePower();else{const t=Math.random();if(t<.5){const t=.005*T[e].power;T[e].power+=Math.min(.85,t)}else{const n=.75*t*T[e].territory;T[e].power+=n}}this.territoryWarfareEngaged?this.territoryClashChance=1:this.territoryClashChance>0&&(this.territoryClashChance=Math.max(0,this.territoryClashChance-.01));for(let e=0;et!==C[e]),r=Object(_.getRandomInt)(0,n.length-1),a=C[e],i=n[r];if(!(a!==t&&i!==t||Math.random()=30)&&this.respect>=this.getRespectNeededToRecruitMember()},O.prototype.getRespectNeededToRecruitMember=function(){if(this.members.length<3)return 0;const e=this.members.length-2;return Math.round(.9*Math.pow(e,3)+Math.pow(e,2))},O.prototype.recruitMember=function(e){if(""===(e=String(e))||!this.canRecruitMember())return!1;if(this.members.filter(t=>t.name===e).length>=1)return!1;let t=new x(e);return this.members.push(t),c.routing.isOn(c.Page.Gang)&&(this.createGangMemberDisplayElement(t),this.updateGangContent()),!0},O.prototype.getWantedPenalty=function(){return this.respect/(this.respect+this.wanted)},O.prototype.processExperienceGains=function(e=1){for(var t=0;t=0;--e){const n=this.members[e];if("Territory Warfare"!==n.task)continue;const r=t/Math.pow(n.def,.6);Math.random()")):t.log(`Ascended Gang member ${e.name}`),c.routing.isOn(c.Page.Gang)&&this.displayGangMemberList(),n}catch(e){if(null!=t)throw e;Object(d.exceptionAlert)(e)}},O.prototype.getDiscount=function(){const e=this.getPower(),t=this.respect,n=Math.pow(t,.01)+t/5e6+Math.pow(e,.01)+e/1e6-1;return Math.max(1,n)},O.prototype.getAllTaskNames=function(){let e=[];const t=Object.keys(A);return e=this.isHackingGang?t.filter(e=>{let t=A[e];return null!=t&&("Unassigned"!==e&&t.isHacking)}):t.filter(e=>{let t=A[e];return null!=t&&("Unassigned"!==e&&t.isCombat)})},O.prototype.getAllUpgradeNames=function(){return Object.keys(N)},O.prototype.getUpgradeCost=function(e){return null==N[e]?1/0:N[e].getCost(this)},O.prototype.getUpgradeType=function(e){const t=N[e];if(null==t)return"";switch(t.type){case"w":return"Weapon";case"a":return"Armor";case"v":return"Vehicle";case"r":return"Rootkit";case"g":return"Augmentation";default:return""}},O.prototype.toJSON=function(){return Object(p.Generic_toJSON)("Gang",this)},O.fromJSON=function(e){return Object(p.Generic_fromJSON)(O,e.data)},p.Reviver.constructors.Gang=O,x.prototype.calculateSkill=function(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)},x.prototype.updateSkillLevels=function(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.hack_asc_mult),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.str_asc_mult),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.def_asc_mult),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.dex_asc_mult),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.agi_asc_mult),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.cha_asc_mult)},x.prototype.calculatePower=function(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95},x.prototype.assignToTask=function(e){return A.hasOwnProperty(e)?(this.task=e,!0):(this.task="Unassigned",!1)},x.prototype.unassignFromTask=function(){this.task="Unassigned"},x.prototype.getTask=function(){return this.task instanceof w&&(this.task=this.task.name),A.hasOwnProperty(this.task)?A[this.task]:A.Unassigned},x.prototype.calculateRespectGain=function(e){const t=this.getTask();if(null==t||!(t instanceof w)||0===t.baseRespect)return 0;var n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=4*t.difficulty)<=0)return 0;const r=Math.pow(100*T[e.facName].territory,t.territory.respect)/100;if(isNaN(r)||r<=0)return 0;var a=e.getWantedPenalty();return 11*t.baseRespect*n*r*a},x.prototype.calculateWantedLevelGain=function(e){const t=this.getTask();if(null==t||!(t instanceof w)||0===t.baseWanted)return 0;let n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.5*t.difficulty)<=0)return 0;const r=Math.pow(100*T[e.facName].territory,t.territory.wanted)/100;if(isNaN(r)||r<=0)return 0;if(t.baseWanted<0)return.4*t.baseWanted*n*r;{const e=7*t.baseWanted/Math.pow(3*n*r,.8);return Math.min(100,e)}},x.prototype.calculateMoneyGain=function(e){const t=this.getTask();if(null==t||!(t instanceof w)||0===t.baseMoney)return 0;var n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.2*t.difficulty)<=0)return 0;const r=Math.pow(100*T[e.facName].territory,t.territory.money)/100;if(isNaN(r)||r<=0)return 0;var a=e.getWantedPenalty();return 5*t.baseMoney*n*r*a},x.prototype.gainExperience=function(e=1){const t=this.getTask();if(null==t||!(t instanceof w)||t===A.Unassigned)return;const n=Math.pow(t.difficulty,.9)*e;this.hack_exp+=t.hackWeight/1500*n,this.str_exp+=t.strWeight/1500*n,this.def_exp+=t.defWeight/1500*n,this.dex_exp+=t.dexWeight/1500*n,this.agi_exp+=t.agiWeight/1500*n,this.cha_exp+=t.chaWeight/1500*n},x.prototype.recordEarnedRespect=function(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e},x.prototype.ascend=function(){const e=this.getAscensionResults(),t=e.hack,n=e.str,r=e.def,a=e.dex,i=e.agi,o=e.cha;this.hack_asc_mult+=t,this.str_asc_mult+=n,this.def_asc_mult+=r,this.dex_asc_mult+=a,this.agi_asc_mult+=i,this.cha_asc_mult+=o,this.upgrades.length=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1;for(let e=0;e{!function(e,t,n,r,a){A[e]=new w(e,t,n,r,a)}(e.name,e.desc,e.isHacking,e.isCombat,e.params)}),R.prototype.getCost=function(e){const t=e.getDiscount();return this.cost/t},R.prototype.createDescription=function(){const e=["Increases:"];null!=this.mults.str&&e.push(`* Strength by ${Math.round(100*(this.mults.str-1))}%`),null!=this.mults.def&&e.push(`* Defense by ${Math.round(100*(this.mults.def-1))}%`),null!=this.mults.dex&&e.push(`* Dexterity by ${Math.round(100*(this.mults.dex-1))}%`),null!=this.mults.agi&&e.push(`* Agility by ${Math.round(100*(this.mults.agi-1))}%`),null!=this.mults.cha&&e.push(`* Charisma by ${Math.round(100*(this.mults.cha-1))}%`),null!=this.mults.hack&&e.push(`* Hacking by ${Math.round(100*(this.mults.hack-1))}%`),this.desc=e.join("
")},R.prototype.apply=function(e){null!=this.mults.str&&(e.str_mult*=this.mults.str),null!=this.mults.def&&(e.def_mult*=this.mults.def),null!=this.mults.dex&&(e.dex_mult*=this.mults.dex),null!=this.mults.agi&&(e.agi_mult*=this.mults.agi),null!=this.mults.cha&&(e.cha_mult*=this.mults.cha),null!=this.mults.hack&&(e.hack_mult*=this.mults.hack)},R.prototype.toJSON=function(){return Object(p.Generic_toJSON)("GangMemberUpgrade",this)},R.fromJSON=function(e){return Object(p.Generic_fromJSON)(R,e.data)},p.Reviver.constructors.GangMemberUpgrade=R;const N={};a.gangMemberUpgradesMetadata.forEach(e=>{!function(e,t,n,r){N[e]=new R(e,t,n,r)}(e.name,e.cost,e.upgType,e.mults)}),O.prototype.createGangMemberUpgradeBox=function(e,t=""){const n="gang-member-upgrade-popup-box";if(D.gangMemberUpgradeBoxOpened){if(null==D.gangMemberUpgradeBoxElements||null==D.gangMemberUpgradeBox||null==D.gangMemberUpgradeBoxContent)return void console.error("Refreshing Gang member upgrade box throws error because required elements are null");for(var r=2;r-1||this.members[r].task.indexOf(a)>-1){var i=this.members[r].createGangMemberUpgradePanel(this,e);D.gangMemberUpgradeBoxContent.appendChild(i),D.gangMemberUpgradeBoxElements.push(i)}}else{D.gangMemberUpgradeBoxFilter=Object(f.createElement)("input",{type:"text",placeholder:"Filter gang members",class:"text-input",value:t,onkeyup:()=>{var t=D.gangMemberUpgradeBoxFilter.value.toString();this.createGangMemberUpgradeBox(e,t)}}),D.gangMemberUpgradeBoxDiscount=Object(f.createElement)("p",{innerText:"Discount: -"+u.numeralWrapper.format(1-1/this.getDiscount(),"0.00%"),marginLeft:"6px",tooltip:"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts."}),D.gangMemberUpgradeBoxElements=[D.gangMemberUpgradeBoxFilter,D.gangMemberUpgradeBoxDiscount];for(a=D.gangMemberUpgradeBoxFilter.value.toString(),r=0;r-1||this.members[r].task.indexOf(a)>-1)&&D.gangMemberUpgradeBoxElements.push(this.members[r].createGangMemberUpgradePanel(this,e));D.gangMemberUpgradeBox=Object(b.createPopup)(n,D.gangMemberUpgradeBoxElements),D.gangMemberUpgradeBoxContent=document.getElementById(n+"-content"),D.gangMemberUpgradeBoxOpened=!0}},x.prototype.createGangMemberUpgradePanel=function(e,t){var n=Object(f.createElement)("div",{border:"1px solid white"}),r=Object(f.createElement)("h1",{innerText:this.name+" ("+this.task+")"});n.appendChild(r);var a=Object(f.createElement)("pre",{fontSize:"14px",display:"inline-block",width:"20%",innerText:"Hack: "+this.hack+" (x"+Object(h.formatNumber)(this.hack_mult*this.hack_asc_mult,2)+")\nStr: "+this.str+" (x"+Object(h.formatNumber)(this.str_mult*this.str_asc_mult,2)+")\nDef: "+this.def+" (x"+Object(h.formatNumber)(this.def_mult*this.def_asc_mult,2)+")\nDex: "+this.dex+" (x"+Object(h.formatNumber)(this.dex_mult*this.dex_asc_mult,2)+")\nAgi: "+this.agi+" (x"+Object(h.formatNumber)(this.agi_mult*this.agi_asc_mult,2)+")\nCha: "+this.cha+" (x"+Object(h.formatNumber)(this.cha_mult*this.cha_asc_mult,2)+")\n"});const i=[];function o(e){const t=N[e];null!=t?i.push(Object(f.createElement)("div",{class:"gang-owned-upgrade",innerText:e,tooltip:t.desc})):console.error(`Could not find GangMemberUpgrade object for name ${e}`)}for(const e of this.upgrades)o(e);for(const e of this.augmentations)o(e);var s=Object(f.createElement)("div",{class:"gang-owned-upgrades-div",innerText:"Purchased Upgrades:"});for(const e of i)s.appendChild(e);n.appendChild(a),n.appendChild(s),n.appendChild(Object(f.createElement)("br",{}));const l=[],c=[],m=[],p=[],d=[];for(let n in N)if(N.hasOwnProperty(n)){let r=N[n];if(t.money.lt(r.getCost(e)))continue;if(this.upgrades.includes(n)||this.augmentations.includes(n))continue;switch(r.type){case"w":l.push(r);break;case"a":c.push(r);break;case"v":m.push(r);break;case"r":p.push(r);break;case"g":d.push(r);break;default:console.error(`ERROR: Invalid Gang Member Upgrade Type: ${r.type}`)}}const _=Object(f.createElement)("div",{width:"20%",display:"inline-block"}),g=Object(f.createElement)("div",{width:"20%",display:"inline-block"}),y=Object(f.createElement)("div",{width:"20%",display:"inline-block"}),b=Object(f.createElement)("div",{width:"20%",display:"inline-block"}),E=Object(f.createElement)("div",{width:"20%",display:"inline-block"});_.appendChild(Object(f.createElement)("h2",{innerText:"Weapons"})),g.appendChild(Object(f.createElement)("h2",{innerText:"Armor"})),y.appendChild(Object(f.createElement)("h2",{innerText:"Vehicles"})),b.appendChild(Object(f.createElement)("h2",{innerText:"Rootkits"})),E.appendChild(Object(f.createElement)("h2",{innerText:"Augmentations"}));const v=[l,c,m,p,d],k=[_,g,y,b,E];for(let n=0;n(a.buyUpgrade(n,t,e),!1)};i>=3?s.tooltipleft=n.desc:s.tooltip=n.desc,r.appendChild(Object(f.createElement)("a",s))}(r[i],a,this,n,e)}}return n.appendChild(_),n.appendChild(g),n.appendChild(y),n.appendChild(b),n.appendChild(E),n};const D={gangContentCreated:!1,gangContainer:null,managementButton:null,territoryButton:null,gangManagementSubpage:null,gangTerritorySubpage:null,gangDesc:null,gangInfo:null,gangRecruitMemberButton:null,gangRecruitRequirementText:null,gangExpandAllButton:null,gangCollapseAllButton:null,gangMemberFilter:null,gangManageEquipmentButton:null,gangMemberList:null,gangMemberPanels:{},gangMemberUpgradeBoxOpened:!1,gangMemberUpgradeBox:null,gangMemberUpgradeBoxContent:null,gangMemberUpgradeBoxFilter:null,gangMemberUpgradeBoxDiscount:null,gangMemberUpgradeBoxElements:null,gangTerritoryDescText:null,gangTerritoryWarfareCheckbox:null,gangTerritoryWarfareCheckboxLabel:null,gangTerritoryWarfareClashChance:null,gangTerritoryDeathNotifyCheckbox:null,gangTerritoryDeathNotifyCheckboxLabel:null,gangTerritoryInfoText:null};O.prototype.displayGangContent=function(e){if(!D.gangContentCreated||null==D.gangContainer){D.gangContentCreated=!0,D.gangContainer=Object(f.createElement)("div",{id:"gang-container",class:"generic-menupage-container"});var t=this.facName;this.members,this.wanted,this.respect;D.gangContainer.appendChild(Object(f.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Back",clickListener:()=>(i.Engine.loadFactionContent(),Object(l.displayFactionContent)(t),!1)})),D.managementButton=Object(f.createElement)("a",{id:"gang-management-subpage-button",class:"a-link-button-inactive",display:"inline-block",innerHTML:"Gang Management (Alt+1)",clickListener:()=>(D.gangManagementSubpage.style.display="block",D.gangTerritorySubpage.style.display="none",D.managementButton.classList.toggle("a-link-button-inactive"),D.managementButton.classList.toggle("a-link-button"),D.territoryButton.classList.toggle("a-link-button-inactive"),D.territoryButton.classList.toggle("a-link-button"),this.updateGangContent(),!1)}),D.territoryButton=Object(f.createElement)("a",{id:"gang-territory-subpage-button",class:"a-link-button",display:"inline-block",innerHTML:"Gang Territory (Alt+2)",clickListener:()=>(D.gangManagementSubpage.style.display="none",D.gangTerritorySubpage.style.display="block",D.managementButton.classList.toggle("a-link-button-inactive"),D.managementButton.classList.toggle("a-link-button"),D.territoryButton.classList.toggle("a-link-button-inactive"),D.territoryButton.classList.toggle("a-link-button"),this.updateGangContent(),!1)}),D.gangContainer.appendChild(D.managementButton),D.gangContainer.appendChild(D.territoryButton),D.gangManagementSubpage=Object(f.createElement)("div",{display:"block",id:"gang-management-subpage"});var n="";n=this.isHackingGang?"Ethical Hacking":"Vigilante Justice",D.gangDesc=Object(f.createElement)("p",{width:"70%",innerHTML:"This page is used to manage your gang members and get an overview of your gang's stats.

If a gang member is not earning much money or respect, the task that you have assigned to that member might be too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact that your wanted level is too high. Consider assigning a few members to the '"+n+"' task to lower your wanted level.

Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing Augmentations, you will automatically be a member of whatever Faction you created your gang with.

You can also manage your gang programmatically through Netscript using the Gang API"}),D.gangManagementSubpage.appendChild(D.gangDesc),D.gangInfo=Object(f.createElement)("p",{id:"gang-info",width:"70%"}),D.gangManagementSubpage.appendChild(D.gangInfo),D.gangRecruitMemberButton=Object(f.createElement)("a",{id:"gang-management-recruit-member-btn",class:"a-link-button-inactive",innerHTML:"Recruit Gang Member",display:"inline-block",margin:"10px",clickListener:()=>{const e="recruit-gang-member-popup";let t;const n=Object(f.createElement)("p",{innerText:"Please enter a name for your new Gang member:"}),r=Object(f.createElement)("br"),a=Object(f.createElement)("input",{onkeyup:e=>{e.keyCode===g.KEY.ENTER&&t.click()},placeholder:"Name must be unique",type:"text",class:"text-input"});t=Object(f.createElement)("a",{class:"std-button",clickListener:()=>{let t=a.value;return""===t?(Object(m.dialogBoxCreate)("You must enter a name for your Gang member!"),!1):this.canRecruitMember()?this.recruitMember(t)?(Object(k.removeElementById)(e),!1):(Object(m.dialogBoxCreate)("You already have a gang member with this name!"),!1):(Object(m.dialogBoxCreate)("You cannot recruit another Gang member!"),!1)},innerText:"Recruit Gang Member"});const i=Object(f.createElement)("a",{class:"std-button",clickListener:()=>(Object(k.removeElementById)(e),!1),innerText:"Cancel"});Object(b.createPopup)(e,[n,r,a,t,i]),a.focus()}}),D.gangManagementSubpage.appendChild(D.gangRecruitMemberButton),D.gangRecruitRequirementText=Object(f.createElement)("p",{color:"red",id:"gang-recruit-requirement-text",margin:"10px"}),D.gangManagementSubpage.appendChild(D.gangRecruitRequirementText),D.gangManagementSubpage.appendChild(Object(f.createElement)("br",{})),D.gangExpandAllButton=Object(f.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Expand All",clickListener:()=>{for(var e=D.gangManagementSubpage.getElementsByClassName("accordion-header"),t=0;t{for(var e=D.gangManagementSubpage.getElementsByClassName("accordion-header"),t=0;t{this.displayGangMemberList()}}),D.gangManageEquipmentButton=Object(f.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Manage Equipment",clickListener:()=>{this.createGangMemberUpgradeBox(e)}}),D.gangManagementSubpage.appendChild(D.gangExpandAllButton),D.gangManagementSubpage.appendChild(D.gangCollapseAllButton),D.gangManagementSubpage.appendChild(D.gangMemberFilter),D.gangManagementSubpage.appendChild(D.gangManageEquipmentButton),D.gangMemberList=Object(f.createElement)("ul",{id:"gang-member-list"}),this.displayGangMemberList(),D.gangManagementSubpage.appendChild(D.gangMemberList),D.gangTerritorySubpage=Object(f.createElement)("div",{id:"gang-territory-subpage",display:"none"}),D.gangTerritoryDescText=Object(f.createElement)("p",{width:"70%",innerHTML:"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control.

Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also loses a small amount of power whenever you lose a clash

NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of whether you win or lose the clash. A gang member being killed results in both respect and power loss for your gang.

The amount of territory you have affects all aspects of your Gang members' production, including money, respect, and wanted level. It is very beneficial to have high territory control.

"}),D.gangTerritorySubpage.appendChild(D.gangTerritoryDescText),D.gangTerritoryWarfareCheckbox=Object(f.createElement)("input",{display:"inline-block",id:"gang-management-territory-warfare-checkbox",changeListener:()=>{this.territoryWarfareEngaged=D.gangTerritoryWarfareCheckbox.checked},margin:"2px",type:"checkbox"}),D.gangTerritoryWarfareCheckbox.checked=this.territoryWarfareEngaged,D.gangTerritoryWarfareCheckboxLabel=Object(f.createElement)("label",{color:"white",display:"inline-block",for:"gang-management-territory-warfare-checkbox",innerText:"Engage in Territory Warfare",tooltip:"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%"}),D.gangTerritorySubpage.appendChild(D.gangTerritoryWarfareCheckbox),D.gangTerritorySubpage.appendChild(D.gangTerritoryWarfareCheckboxLabel),D.gangTerritorySubpage.appendChild(Object(f.createElement)("br")),D.gangTerritoryWarfareClashChance=Object(f.createElement)("p",{display:"inline-block"}),D.gangTerritorySubpage.appendChild(D.gangTerritoryWarfareClashChance),D.gangTerritorySubpage.appendChild(Object(f.createElement)("div",{class:"help-tip",display:"inline-block",innerText:"?",clickListener:()=>{Object(m.dialogBoxCreate)("This percentage represents the chance you have of 'clashing' with with another gang. If you do not wish to gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.")}})),D.gangTerritoryDeathNotifyCheckbox=Object(f.createElement)("input",{display:"inline-block",id:"gang-management-notify-member-death-checkbox",changeListener:()=>{this.notifyMemberDeath=D.gangTerritoryDeathNotifyCheckbox.checked},margin:"2px",type:"checkbox"}),D.gangTerritoryDeathNotifyCheckbox.checked=this.notifyMemberDeath,D.gangTerritoryDeathNotifyCheckboxLabel=Object(f.createElement)("label",{color:"white",display:"inline-block",for:"gang-management-notify-member-death-checkbox",innerText:"Notify about Gang Member Deaths",tooltip:"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash."}),D.gangTerritorySubpage.appendChild(Object(f.createElement)("br")),D.gangTerritorySubpage.appendChild(D.gangTerritoryDeathNotifyCheckbox),D.gangTerritorySubpage.appendChild(D.gangTerritoryDeathNotifyCheckboxLabel),D.gangTerritorySubpage.appendChild(Object(f.createElement)("br"));var r=Object(f.createElement)("fieldset",{display:"block",margin:"6px",width:"50%"});D.gangTerritoryInfoText=Object(f.createElement)("p"),r.appendChild(D.gangTerritoryInfoText),D.gangTerritorySubpage.appendChild(r),D.gangContainer.appendChild(D.gangTerritorySubpage),D.gangContainer.appendChild(D.gangManagementSubpage),document.getElementById("entire-game-container").appendChild(D.gangContainer)}D.gangContainer.style.display="block",this.updateGangContent()},O.prototype.displayGangMemberList=function(){Object(E.removeChildrenFromElement)(D.gangMemberList),D.gangMemberPanels={};const e=this.members,t=D.gangMemberFilter.value.toString();for(var n=0;n-1||e[n].task.indexOf(t)>-1)&&this.createGangMemberDisplayElement(e[n])},O.prototype.updateGangContent=function(){if(D.gangContentCreated)if(D.gangMemberUpgradeBoxOpened&&(D.gangMemberUpgradeBoxDiscount.childNodes[0].nodeValue="Discount: -"+u.numeralWrapper.format(1-1/this.getDiscount(),"0.00%")),"block"===D.gangTerritorySubpage.style.display){D.gangTerritoryWarfareClashChance.innerText=`Territory Clash Chance: ${u.numeralWrapper.format(this.territoryClashChance,"0.000%")}`,D.gangTerritoryWarfareCheckbox.checked=this.territoryWarfareEngaged,D.gangTerritoryInfoText.innerHTML="";const e=T[this.facName].power;let t=Object.keys(T).filter(e=>e!=this.facName);t.unshift(this.facName);for(const n of t)if(T.hasOwnProperty(n)){const t=T[n];let r,a=100*t.territory;if(r=a<=0?Object(h.formatNumber)(0,2):a>=100?Object(h.formatNumber)(100,2):Object(h.formatNumber)(a,2),n===this.facName){let e=`${n}
Power: ${Object(h.formatNumber)(t.power,6)}
`;e+=`Territory: ${r}%

`,D.gangTerritoryInfoText.innerHTML+=e}else{const a=e/(t.power+e);let i=`${n}
Power: ${Object(h.formatNumber)(t.power,6)}
`;i+=`Territory: ${r}%
`,i+=`Chance to win clash with this gang: ${u.numeralWrapper.format(a,"0.000%")}

`,D.gangTerritoryInfoText.innerHTML+=i}}}else{if(D.gangInfo instanceof Element){var e,t=s.Factions[this.facName];e=t instanceof o.Faction?t.playerReputation:"ERROR",Object(E.removeChildrenFromElement)(D.gangInfo),D.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:"Respect: "+u.numeralWrapper.format(this.respect,"0.00000a")+" ("+u.numeralWrapper.format(5*this.respectGainRate,"0.00000a")+" / sec)",tooltip:"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction."})),D.gangInfo.appendChild(Object(f.createElement)("br")),D.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:"Wanted Level: "+u.numeralWrapper.format(this.wanted,"0.00000a")+" ("+u.numeralWrapper.format(5*this.wantedGainRate,"0.00000a")+" / sec)",tooltip:"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1."})),D.gangInfo.appendChild(Object(f.createElement)("br"));var n=this.getWantedPenalty();n=100*(1-n),D.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:`Wanted Level Penalty: -${Object(h.formatNumber)(n,2)}%`,tooltip:"Penalty for respect and money gain rates due to Wanted Level"})),D.gangInfo.appendChild(Object(f.createElement)("br")),D.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:`Money gain rate: ${u.numeralWrapper.format(5*this.moneyGainRate,"$0.000a")} / sec`})),D.gangInfo.appendChild(Object(f.createElement)("br"));var r=100*T[this.facName].territory;let a;a=r<=0?Object(h.formatNumber)(0,2):r>=100?Object(h.formatNumber)(100,2):Object(h.formatNumber)(r,2),D.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:`Territory: ${Object(h.formatNumber)(a,3)}%`,tooltip:"The percentage of total territory your Gang controls"})),D.gangInfo.appendChild(Object(f.createElement)("br")),D.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:"Faction reputation: "+u.numeralWrapper.format(e,"0.000a")})),D.gangInfo.appendChild(Object(f.createElement)("br"));const l=1e3/i.Engine._idleSpeed;this.storedCycles/l*1e3>5e3&&(D.gangInfo.appendChild(Object(f.createElement)("p",{innerText:`Bonus time: ${Object(h.convertTimeMsToTimeElapsedString)(this.storedCycles/l*1e3)}`,display:"inline-block",tooltip:"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed"})),D.gangInfo.appendChild(Object(f.createElement)("br")))}else console.error("gang-info DOM element DNE");const a=this.members.length,l=this.getRespectNeededToRecruitMember(),c=D.gangRecruitMemberButton;a>=30?(c.className="a-link-button-inactive",D.gangRecruitRequirementText.style.display="inline-block",D.gangRecruitRequirementText.innerHTML="You have reached the maximum amount of gang members"):this.canRecruitMember()?(c.className="a-link-button",D.gangRecruitRequirementText.style.display="none"):(c.className="a-link-button-inactive",D.gangRecruitRequirementText.style.display="inline-block",D.gangRecruitRequirementText.innerHTML=`${Object(h.formatNumber)(l,2)} respect needed to recruit next member`);for(let e=0;e")});D.gangMemberPanels[t].statsDiv=i;const o=Object(f.createElement)("pre",{display:"inline",id:t+"gang-member-stats-text"}),s=Object(f.createElement)("br"),l=Object(f.createElement)("button",{class:"accordion-button",innerText:"Ascend",clickListener:()=>{const t=`gang-management-ascend-member ${e.name}`,n=e.getAscensionResults(),r=Object(f.createElement)("pre",{innerText:["Are you sure you want to ascend this member? They will lose all of","their non-Augmentation upgrades and their stats will reset back to 1.","",`Furthermore, your gang will lose ${u.numeralWrapper.format(e.earnedRespect,"0.000a")} respect`,"","In return, they will gain the following permanent boost to stat multipliers:\n",`Hacking: +${u.numeralWrapper.format(n.hack,"0.00%")}`,`Strength: +${u.numeralWrapper.format(n.str,"0.00%")}`,`Defense: +${u.numeralWrapper.format(n.def,"0.00%")}`,`Dexterity: +${u.numeralWrapper.format(n.dex,"0.00%")}`,`Agility: +${u.numeralWrapper.format(n.agi,"0.00%")}`,`Charisma: +${u.numeralWrapper.format(n.cha,"0.00%")}`].join("\n")}),a=Object(f.createElement)("button",{class:"std-button",clickListener:()=>(this.ascendMember(e),this.updateGangMemberDisplayElement(e),Object(k.removeElementById)(t),!1),innerText:"Ascend"}),i=Object(f.createElement)("button",{class:"std-button",clickListener:()=>(Object(k.removeElementById)(t),!1),innerText:"Cancel"});Object(b.createPopup)(t,[r,a,i])}}),c=Object(f.createElement)("div",{class:"help-tip",clickListener:()=>{Object(m.dialogBoxCreate)(["Ascending a Gang Member resets the member's progress and stats in exchange","for a permanent boost to their stat multipliers.","

The additional stat multiplier that the Gang Member gains upon ascension","is based on the amount of multipliers the member has from non-Augmentation Equipment.","

Upon ascension, the member will lose all of its non-Augmentation Equipment and your","gang will lose respect equal to the total respect earned by the member."].join(" "))},innerText:"?",marginTop:"5px"});i.appendChild(o),i.appendChild(s),i.appendChild(l),i.appendChild(c);const p=Object(f.createElement)("div",{class:"gang-member-info-div",id:t+"gang-member-task"}),h=Object(f.createElement)("select",{class:"dropdown",id:t+"gang-member-task-selector"});let d=this.getAllTaskNames();d.unshift("---");for(var _=0;_{var t=h.options[h.selectedIndex].text;e.assignToTask(t),this.setGangMemberTaskDescription(e,t),this.updateGangContent()}),A.hasOwnProperty(e.task)){var E=e.task,v=0;for(let e=0;e"))}var a=document.getElementById(t+"gang-member-gain-info");a&&(a.innerHTML=[`Money: ${u.numeralWrapper.format(5*e.calculateMoneyGain(this),"$0.000a")} / sec`,`Respect: ${u.numeralWrapper.format(5*e.calculateRespectGain(this),"0.00000a")} / sec`,`Wanted Level: ${u.numeralWrapper.format(5*e.calculateWantedLevelGain(this),"0.00000a")} / sec`,`Total Respect Earned: ${u.numeralWrapper.format(e.earnedRespect,"0.00000a")}`].join("
"));const i=document.getElementById(t+"gang-member-task-selector");if(i){let t=this.getAllTaskNames();if(t.unshift("---"),A.hasOwnProperty(e.task)){const n=e.task;let r=0;for(let e=0;e0){if("unalias"===n[0])return n.join(" ");null!=(i=function(e){return t.Aliases.hasOwnProperty(e)?t.Aliases[e]:null}(n[0]))?n[0]=i:null!=(i=a(n[0]))&&(n[0]=i);for(var r=0;r

This message was saved as "+e.filename+" onto your home computer.";Object(p.dialogBoxCreate)(t)}function g(){var e=f[E.Jumper0],t=f[E.Jumper1],n=f[E.Jumper2],r=f[E.Jumper3],u=f[E.Jumper4],m=f[E.CyberSecTest],h=f[E.NiteSecTest],_=f[E.BitRunnersTest],g=f[E.RedPill],y=!1;if(a.Augmentations[i.AugmentationNames.TheRedPill].owned&&(y=!0),g&&y&&0===l.Player.sourceFiles.length&&!c.b&&!s.c)p.dialogBoxOpened||d(g,!0);else if(g&&y)c.b||s.c||p.dialogBoxOpened||d(g);else if(e&&!e.recvd&&l.Player.hacking_skill>=25){d(e);const t=o.Programs.Flight.name,n=l.Player.getHomeComputer();n.programs.includes(t)||n.programs.push(t)}else t&&!t.recvd&&l.Player.hacking_skill>=40?d(t):m&&!m.recvd&&l.Player.hacking_skill>=50?d(m):n&&!n.recvd&&l.Player.hacking_skill>=175?d(n):h&&!h.recvd&&l.Player.hacking_skill>=200?d(h):r&&!r.recvd&&l.Player.hacking_skill>=350?d(r):u&&!u.recvd&&l.Player.hacking_skill>=490?d(u):_&&!_.recvd&&l.Player.hacking_skill>=500&&d(_)}function y(e){f[e.filename]=e}let f={};function b(e){f=JSON.parse(e,h.Reviver)}let E={Jumper0:"j0.msg",Jumper1:"j1.msg",Jumper2:"j2.msg",Jumper3:"j3.msg",Jumper4:"j4.msg",CyberSecTest:"csec-test.msg",NiteSecTest:"nitesec-test.msg",BitRunnersTest:"19dfj3l1nd.msg",RedPill:"icarus.msg"};function v(){f={},y(new r.Message(E.Jumper0,"I know you can sense it. I know you're searching for it. It's why you spend night after night at your computer.

It's real, I've seen it. And I can help you find it. But not right now. You're not ready yet.

Use this program to track your progress

The fl1ght.exe program was added to your home computer

-jump3R")),y(new r.Message(E.Jumper1,"Soon you will be contacted by a hacking group known as CyberSec. They can help you with your search.

You should join them, garner their favor, and exploit them for their Augmentations. But do not trust them. They are not what they seem. No one is.

-jump3R")),y(new r.Message(E.Jumper2,"Do not try to save the world. There is no world to save. If you want to find the truth, worry only about yourself. Ethics and morals will get you killed.

Watch out for a hacking group known as NiteSec.

-jump3R")),y(new r.Message(E.Jumper3,"You must learn to walk before you can run. And you must run before you can fly. Look for the black hand.

I.I.I.I

-jump3R")),y(new r.Message(E.Jumper4,"To find what you are searching for, you must understand the bits. The bits are all around us. The runners will help you.

-jump3R")),y(new r.Message(E.CyberSecTest,"We've been watching you. Your skills are very impressive. But you're wasting your talents. If you join us, you can put your skills to good use and change the world for the better. If you join us, we can unlock your full potential.

But first, you must pass our test. Find and hack our server using the Terminal.

-CyberSec")),y(new r.Message(E.NiteSecTest,"People say that the corrupted governments and corporations rule the world. Yes, maybe they do. But do you know who everyone really fears? People like us. Because they can't hide from us. Because they can't fight shadows and ideas with bullets.

Join us, and people will fear you, too.

Find and hack our hidden server using the Terminal. Then, we will contact you again.

-NiteSec")),y(new r.Message(E.BitRunnersTest,"We know what you are doing. We know what drives you. We know what you are looking for.

We can help you find the answers.

run4theh111z")),y(new r.Message(E.RedPill,"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
)@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)"))}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return C}),n.d(t,"c",function(){return h}),n.d(t,"d",function(){return _}),n.d(t,"b",function(){return d});var r=n(6),a=n(12),i=n(51),o=n(0),s=n(8),l=n(7),c=n(88),u=n(14),m=n(48),p=n(29);n(674);let h=!1,d=null;function _(e,t){h=e,d=e?t:null}e(document).keydown(function(e){if(h&&d&&0!=d.selectedNode.length)switch(e.keyCode){case 65:d.actionButtons[0].click();break;case 83:d.actionButtons[1].click();break;case 87:d.actionButtons[2].click();break;case 70:d.actionButtons[3].click();break;case 82:d.actionButtons[4].click();break;case 68:d.actionButtons[5].click()}});let g={Core:"CPU Core Node",Firewall:"Firewall Node",Database:"Database Node",Spam:"Spam Node",Transfer:"Transfer Node",Shield:"Shield Node"},y="Attacking",f="Scanning",b="Weakening",E="Fortifying",v="Overflowing";function k(e,t){this.type=e,this.atk=t.atk?t.atk:0,this.def=t.def?t.def:0,this.hp=t.hp?t.hp:0,this.maxhp=this.hp,this.plyrCtrl=!1,this.enmyCtrl=!1,this.pos=[0,0],this.el=null,this.action=null,this.targetedCount=0,this.conn=null}function C(e,t){this.faction=t,this.started=!1,this.time=18e4,this.playerCores=[],this.playerNodes=[],this.playerAtk=0,this.playerDef=0,this.enemyCores=[],this.enemyDatabases=[],this.enemyNodes=[],this.enemyAtk=0,this.enemyDef=0,this.miscNodes=[],this.selectedNode=[],this.actionButtons=[],this.availablePositions=[];for(var n=0;n<8;++n)for(var a=0;a<8;++a)this.availablePositions.push([n,a]);this.map=[];for(var i=0;i<8;++i)this.map.push([null,null,null,null,null,null,null,null]);this.jsplumbinstance=null,this.difficulty=e/r.CONSTANTS.HackingMissionRepToDiffConversion+1,this.reward=250+e/r.CONSTANTS.HackingMissionRepToRewardConversion}function T(e){e.selectedNode.length>0&&(e.selectedNode.forEach(function(t){t.deselect(e.actionButtons)}),e.selectedNode.length=0)}k.prototype.setPosition=function(e,t){this.pos=[e,t]},k.prototype.setControlledByPlayer=function(){this.plyrCtrl=!0,this.enmyCtrl=!1,this.el&&(this.el.classList.remove("hack-mission-enemy-node"),this.el.classList.add("hack-mission-player-node"))},k.prototype.setControlledByEnemy=function(){this.plyrCtrl=!1,this.enmyCtrl=!0,this.el&&(this.el.classList.remove("hack-mission-player-node"),this.el.classList.add("hack-mission-enemy-node"))},k.prototype.select=function(e){if(!this.enmyCtrl){this.el.classList.add("hack-mission-player-node-active");for(var t=0;t(this.start(),!1));var m=document.createElement("a");m.innerHTML="Forfeit Mission (Exit)",m.classList.add("a-link-button"),m.classList.add("hack-mission-header-element"),m.style.display="inline-block",m.addEventListener("click",()=>(this.finishMission(!1),!1));var p=document.createElement("p");p.setAttribute("id","hacking-mission-timer"),p.style.display="inline-block",p.style.margin="6px";var h=document.createElement("span");h.style.display="block",h.classList.add("hack-mission-action-buttons-container");for(var d=0;d<6;++d)this.actionButtons.push(document.createElement("a")),this.actionButtons[d].style.display="inline-block",this.actionButtons[d].classList.add("a-link-button-inactive"),this.actionButtons[d].classList.add("tooltip"),this.actionButtons[d].classList.add("hack-mission-header-element"),h.appendChild(this.actionButtons[d]);this.actionButtons[0].innerText="Attack(a)";var _=document.createElement("span");_.classList.add("tooltiptexthigh"),_.innerText="Lowers the targeted node's HP. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[0].appendChild(_),this.actionButtons[1].innerText="Scan(s)";var k=document.createElement("span");k.classList.add("tooltiptexthigh"),k.innerText="Lowers the targeted node's defense. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[1].appendChild(k),this.actionButtons[2].innerText="Weaken(w)";var C=document.createElement("span");C.classList.add("tooltiptexthigh"),C.innerText="Lowers the targeted node's attack. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[2].appendChild(C),this.actionButtons[3].innerText="Fortify(f)";var T=document.createElement("span");T.classList.add("tooltiptexthigh"),T.innerText="Raises this node's Defense level. The effectiveness of this depends on your hacking level",this.actionButtons[3].appendChild(T),this.actionButtons[4].innerText="Overflow(r)";var P=document.createElement("span");P.classList.add("tooltiptexthigh"),P.innerText="Raises this node's Attack level but lowers its Defense level. The effectiveness of this depends on your hacking level.",this.actionButtons[4].appendChild(P),this.actionButtons[5].innerText="Drop Connection(d)";var S=document.createElement("span");S.classList.add("tooltiptexthigh"),S.innerText="Removes this Node's current connection to some target Node, if it has one. This can also be done by simply clicking the white connection line.",this.actionButtons[5].appendChild(S);var O=document.createElement("p"),M=document.createElement("p");O.style.display="inline-block",M.style.display="inline-block",O.style.color="#00ccff",M.style.color="red",O.style.margin="4px",M.style.margin="4px",O.setAttribute("id","hacking-mission-player-stats"),M.setAttribute("id","hacking-mission-enemy-stats"),h.appendChild(O),h.appendChild(M),this.actionButtons[0].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode[0].type===g.Core&&(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(y,!1),this.selectedNode.forEach(function(e){e.action=y})):console.error("Pressing Action button without selected node")}),this.actionButtons[1].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==g.Core&&e!==g.Transfer||(this.setActionButtonsActive(e),this.setActionButton(f,!1),this.selectedNode.forEach(function(e){e.action=f}))}else console.error("Pressing Action button without selected node")}),this.actionButtons[2].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==g.Core&&e!==g.Transfer||(this.setActionButtonsActive(e),this.setActionButton(b,!1),this.selectedNode.forEach(function(e){e.action=b}))}else console.error("Pressing Action button without selected node")}),this.actionButtons[3].addEventListener("click",()=>{this.selectedNode.length>0?(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(E,!1),this.selectedNode.forEach(function(e){e.action=E})):console.error("Pressing Action button without selected node")}),this.actionButtons[4].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==g.Core&&e!==g.Transfer||(this.setActionButtonsActive(e),this.setActionButton(v,!1),this.selectedNode.forEach(function(e){e.action=v}))}else console.error("Pressing Action button without selected node")}),this.actionButtons[5].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode.forEach(function(e){if(e.conn){var t=e.conn.endpoints;t[0].detachFrom(t[1])}e.action=E}):console.error("Pressing Action button without selected node")});var x=document.createElement("p");e.appendChild(a),e.appendChild(i),e.appendChild(c),e.appendChild(u),e.appendChild(m),e.appendChild(p),e.appendChild(h),e.appendChild(x)},C.prototype.setActionButtonsInactive=function(){for(var e=0;ePlayer Defense: "+Object(l.formatNumber)(this.playerDef,1),e=0;for(t=0;tEnemy Defense: "+Object(l.formatNumber)(this.enemyDef,1)},C.prototype.calculateDefenses=function(){for(var e=0,t=0;tPlayer Defense: "+Object(l.formatNumber)(this.playerDef,1),e=0;for(t=0;tEnemy Defense: "+Object(l.formatNumber)(this.enemyDef,1)},C.prototype.removeAvailablePosition=function(e,t){for(var n=0;nDef: "+Object(l.formatNumber)(e.def,1),n.innerHTML=r,t.appendChild(n),document.getElementById("hacking-mission-map").appendChild(t)},C.prototype.updateNodeDomElement=function(e){if(null!=e.el){var t,n="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1],r=(document.getElementById(n),document.getElementById(n+"-txt"));switch(e.type){case g.Core:t="CPU Core
HP: "+Object(l.formatNumber)(e.hp,1);break;case g.Firewall:t="Firewall
HP: "+Object(l.formatNumber)(e.hp,1);break;case g.Database:t="Database
HP: "+Object(l.formatNumber)(e.hp,1);break;case g.Spam:t="Spam
HP: "+Object(l.formatNumber)(e.hp,1);break;case g.Transfer:t="Transfer
HP: "+Object(l.formatNumber)(e.hp,1);break;case g.Shield:default:t="Shield
HP: "+Object(l.formatNumber)(e.hp,1)}t+="
Atk: "+Object(l.formatNumber)(e.atk,1)+"
Def: "+Object(l.formatNumber)(e.def,1),e.action&&(t+="
"+e.action),r.innerHTML=t}else console.error("Calling updateNodeDomElement on a Node without an element")},C.prototype.getNodeFromElement=function(e){var t=(Object(m.isString)(e)?e:e.id).replace("hacking-mission-node-","").split("-");if(2!=t.length)return console.error("Parsing hacking mission node id. could not find coordinates"),null;var n=t[0],r=t[1];return isNaN(n)||isNaN(r)||n>=8||r>=8||n<0||r<0?(console.error(`Unexpected values (${n}, ${r}) for (x, y)`),null):this.map[n][r]},C.prototype.configurePlayerNodeElement=function(e){null==this.getNodeFromElement(e)&&console.error("Failed getting Node object");var t=this;function n(){!function(e,t){var n=e.getNodeFromElement(t);null==n&&console.error("Failed getting Node object"),n.plyrCtrl&&(T(e),n.select(e.actionButtons),e.selectedNode.push(n))}(t,e)}e.addEventListener("click",n),e.addEventListener("dblclick",function(){!function(e,t){var n=e.getNodeFromElement(t);if(null==n&&console.error("Failed getting Node Object in multiselectNode()"),n.plyrCtrl){T(e);var r=n.type;r===g.Core?e.playerCores.forEach(function(t){t.select(e.actionButtons),e.selectedNode.push(t)}):e.playerNodes.forEach(function(t){t.type===r&&(t.select(e.actionButtons),e.selectedNode.push(t))})}}(t,e)}),e.firstChild&&e.firstChild.addEventListener("click",n)},C.prototype.configureEnemyNodeElement=function(e){for(var t=this.getNodeFromElement(e),n=0;n0&&this.map[t-1][n].plyrCtrl)||(!!(t<7&&this.map[t+1][n].plyrCtrl)||(!!(n>0&&this.map[t][n-1].plyrCtrl)||!!(n<7&&this.map[t][n+1].plyrCtrl)))},C.prototype.nodeReachableByEnemy=function(e){if(null==e)return!1;var t=e.pos[0],n=e.pos[1];return!!(t>0&&this.map[t-1][n].enmyCtrl)||(!!(t<7&&this.map[t+1][n].enmyCtrl)||(!!(n>0&&this.map[t][n-1].enmyCtrl)||!!(n<7&&this.map[t][n+1].enmyCtrl)))},C.prototype.start=function(){this.started=!0,this.initJsPlumb();var e=Object(p.clearEventListeners)("hack-mission-start-btn");e.classList.remove("a-link-button"),e.classList.add("a-link-button-inactive")},C.prototype.initJsPlumb=function(){var e=jsPlumb.getInstance({DragOptions:{cursor:"pointer",zIndex:2e3},PaintStyle:{gradient:{stops:[[0,"#FFFFFF"],[1,"#FFFFFF"]]},stroke:"#FFFFFF",strokeWidth:8}});this.jsplumbinstance=e;for(var t=0;t{if(!this.getNodeFromElement(e.source).enmyCtrl){var n=e.endpoints;n[0].detachFrom(n[1])}}),e.bind("connection",e=>{var t=this.getNodeFromElement(e.target);this.getNodeFromElement(e.source).enmyCtrl||(this.nodeReachable(t)?(this.getNodeFromElement(e.source).conn=e.connection,++(t=this.getNodeFromElement(e.target)).targetedCount):e.sourceEndpoint.detachFrom(e.targetEndpoint))}),e.bind("connectionDetached",(e,t)=>{this.getNodeFromElement(e.source).conn=null,this.getNodeFromElement(e.target).untarget()})},C.prototype.dropAllConnectionsFromNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),n=t.length-1;n>=0;--n)t[n].source==e.el&&t[n].endpoints[0].detachFrom(t[n].endpoints[1])},C.prototype.dropAllConnectionsToNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),n=t.length-1;n>=0;--n)t[n].target==e.el&&t[n].endpoints[0].detachFrom(t[n].endpoints[1]);e.beingTargeted=!1};var P=0;C.prototype.process=function(e=1){if(this.started&&!((P+=e)<2)){var t=!1;this.playerCores.forEach(e=>{t|=this.processNode(e,P)}),this.playerNodes.forEach(e=>{e.type!==g.Transfer&&e.type!==g.Shield&&e.type!==g.Firewall||(t|=this.processNode(e,P))}),this.enemyCores.forEach(e=>{this.enemyAISelectAction(e),t|=this.processNode(e,P)}),this.enemyNodes.forEach(e=>{e.type!==g.Transfer&&e.type!==g.Shield&&e.type!==g.Firewall||(this.enemyAISelectAction(e),t|=this.processNode(e,P))}),this.enemyDatabases.forEach(e=>{e.maxhp+=.1*P,e.hp+=.1*P}),t&&(this.calculateAttacks(),this.calculateDefenses()),0!==this.enemyDatabases.length?0!==this.playerCores.length?(this.miscNodes.forEach(e=>{e.def+=.1*P,e.maxhp+=.05*P,e.hp+=.1*P,e.hp>e.maxhp&&(e.hp=e.maxhp),this.updateNodeDomElement(e)}),this.time-=P*a.Engine._idleSpeed,this.time<=0?this.finishMission(!1):(this.updateTimer(),P=0)):this.finishMission(!1):this.finishMission(!0)}},C.prototype.processNode=function(e,t=1){if(null!=e.action){var n,a,i=null;e.conn&&(null==(i=null!=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))||(i.plyrCtrl?(n=this.playerDef,a=this.enemyAtk):i.enmyCtrl?(n=this.enemyDef,a=this.playerAtk):(n=i.def,a=e.plyrCtrl?this.playerAtk:this.enemyAtk)));var s=!1,l=e.plyrCtrl,c=this.difficulty*r.CONSTANTS.HackingMissionDifficultyToHacking;switch(e.action){case y:if(null==i)break;if(null==e.conn)break;var u=this.calculateAttackDamage(a,n,l?o.Player.hacking_skill:c);i.hp-=u/5*t;break;case f:if(null==i)break;if(null==e.conn)break;var m=this.calculateScanEffect(a,n,l?o.Player.hacking_skill:c);i.def-=m/5*t,s=!0;break;case b:if(null==i)break;if(null==e.conn)break;m=this.calculateWeakenEffect(a,n,l?o.Player.hacking_skill:c);i.atk-=m/5*t,s=!0;break;case E:m=this.calculateFortifyEffect(o.Player.hacking_skill);e.def+=m/5*t,s=!0;break;case v:m=this.calculateOverflowEffect(o.Player.hacking_skill);if(e.def{0===e.targetedCount&&(e.def*=r.CONSTANTS.HackingMissionMiscDefenseIncrease)})}return this.updateNodeDomElement(e),i&&this.updateNodeDomElement(i),s}},C.prototype.enemyAISelectAction=function(e){if(null!=e)switch(e.type){case g.Core:if(null==e.conn){if(0===this.miscNodes.length){var t=Object(u.getRandomInt)(0,this.playerNodes.length-1);if(n=0===this.playerNodes.length?null:this.playerNodes[t],this.nodeReachableByEnemy(n))e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount;else{if(t=Object(u.getRandomInt)(0,this.playerCores.length-1),0===this.playerCores.length)return;n=this.playerCores[t],this.nodeReachableByEnemy(n)&&(e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount)}}else{t=Object(u.getRandomInt)(0,this.miscNodes.length-1);var n=this.miscNodes[t];this.nodeReachableByEnemy(n)&&(e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount)}e.action=E}else{var r;null==(r=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))&&console.error("Error getting Target node Object in enemyAISelectAction()"),r.def>this.enemyAtk+15?e.def<50?e.action=E:e.action=v:Math.abs(r.def-this.enemyAtk)<=15?e.action=f:e.action=y}break;case g.Transfer:e.def<125?e.action=E:e.action=v;break;case g.Firewall:case g.Shield:e.action=E}};C.prototype.calculateAttackDamage=function(e,t,n=0){return Math.max(.55*(e+n/80-t),1)},C.prototype.calculateScanEffect=function(e,t,n=0){return Math.max(.6*(e+n/25-.95*t),2)},C.prototype.calculateWeakenEffect=function(e,t,n=0){return Math.max(e+n/25-.95*t,2)},C.prototype.calculateFortifyEffect=function(e=0){return.9*e/130},C.prototype.calculateOverflowEffect=function(e=0){return.95*e/130},C.prototype.updateTimer=function(){var e=document.getElementById("hacking-mission-timer"),t=Math.round(this.time/1e3),n=Math.trunc(t/60);t%=60;var r=("0"+n).slice(-2)+":"+("0"+t).slice(-2);e.innerText="Time left: "+r},C.prototype.finishMission=function(e){if(h=!1,d=null,e){var t=1+this.faction.favor/100,n=this.reward*o.Player.faction_rep_mult*t;Object(s.dialogBoxCreate)("Mission won! You earned "+Object(l.formatNumber)(n,3)+" reputation with "+this.faction.name),o.Player.gainIntelligenceExp(this.difficulty*r.CONSTANTS.IntelligenceHackingMissionBaseExpGain),this.faction.playerReputation+=n}else Object(s.dialogBoxCreate)("Mission lost/forfeited! You did not gain any faction reputation.");for(var c=document.getElementById("mission-container");c.firstChild;)c.removeChild(c.firstChild);document.getElementById("mainmenu-container").style.visibility="visible",document.getElementById("character-overview-wrapper").style.visibility="visible",a.Engine.loadFactionContent(),Object(i.displayFactionContent)(this.faction.name)}}).call(this,n(86))},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return z});var r=n(10),a=n(4),i=n(19),o=n(6),s=n(12),l=n(75),c=n(13),u=n(51),m=n(0),p=n(80),h=n(11),d=n(2),_=n(8),g=n(16),y=n(65),f=n(7),b=n(219),E=n(136),v=n(33),k=n(209),C=n(84),T=(n(224),n(126)),P=n(208),S=n(91),O=n(187),M=n(103),x=n(18),w=n(88),A=n(111),R=n(109),N=n(50),D=n(14),I=n(157),B=n(26),L=n(44),W=n(78),j=n(3),F=n(37),U=n(82),H=n(27);const G=' ',K='',$="bladeburner-active-action";let q=0;function Y(e={}){e.name&&(this.name=e.name),e.type&&(this.type=e.type)}function z(e={}){this.numHosp=0,this.moneyLost=0,this.rank=0,this.maxRank=0,this.skillPoints=0,this.totalSkillPoints=0,this.teamSize=0,this.teamLost=0,this.storedCycles=0,this.randomEventCounter=Object(D.getRandomInt)(240,600),this.actionTimeToComplete=0,this.actionTimeCurrent=0;var t=x.ActionTypes.Idle;this.action=new Y({type:t}),this.cities={};for(var n=0;n0&&(m.Player.bladeburner.postToConsole("> "+t),m.Player.bladeburner.resetConsoleInput(),m.Player.bladeburner.executeConsoleCommands(t))}if(e.keyCode===B.KEY.UPARROW){if(null==V.consoleInput)return;var n=q;if(0===(a=i.length))return;(n<0||n>a)&&(q=a),0!==n&&--q;var r=i[q];V.consoleInput.value=r,Object(y.setTimeoutRef)(function(){V.consoleInput.selectionStart=V.consoleInput.selectionEnd=1e4},0)}if(e.keyCode===B.KEY.DOWNARROW){if(null==V.consoleInput)return;var a;n=q;if(0==(a=i.length))return;if((n<0||n>a)&&(q=a),n==a||n==a-1)q=a,V.consoleInput.value="";else{r=i[++q];V.consoleInput.value=r}}}}),Y.prototype.toJSON=function(){return Object(g.Generic_toJSON)("ActionIdentifier",this)},Y.fromJSON=function(e){return Object(g.Generic_fromJSON)(Y,e.data)},g.Reviver.constructors.ActionIdentifier=Y,z.prototype.prestige=function(){this.resetAction();var e=c.Factions.Bladeburners;this.rank>=v.BladeburnerConstants.RankNeededForFaction&&Object(u.joinFaction)(e)},z.prototype.create=function(){this.contracts.Tracking=new O.Contract({name:"Tracking",desc:"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.

Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever city you are currently in.",baseDifficulty:125,difficultyFac:1.02,rewardFac:1.041,rankGain:.3,hpLoss:.5,count:Object(D.getRandomInt)(25,150),countGrowth:Object(D.getRandomInt)(5,75)/10,weights:{hack:0,str:.05,def:.05,dex:.35,agi:.35,cha:.1,int:.05},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.9,int:1},isStealth:!0}),this.contracts["Bounty Hunter"]=new O.Contract({name:"Bounty Hunter",desc:"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.

Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also increase its chaos level.",baseDifficulty:250,difficultyFac:1.04,rewardFac:1.085,rankGain:.9,hpLoss:1,count:Object(D.getRandomInt)(5,150),countGrowth:Object(D.getRandomInt)(5,75)/10,weights:{hack:0,str:.15,def:.15,dex:.25,agi:.25,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.contracts.Retirement=new O.Contract({name:"Retirement",desc:"Hunt down and retire (kill) rogue Synthoids.

Successfully completing a Retirement contract will lower the population in your current city, and will also increase its chaos level.",baseDifficulty:200,difficultyFac:1.03,rewardFac:1.065,rankGain:.6,hpLoss:1,count:Object(D.getRandomInt)(5,150),countGrowth:Object(D.getRandomInt)(5,75)/10,weights:{hack:0,str:.2,def:.2,dex:.2,agi:.2,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.operations.Investigation=new T.Operation({name:"Investigation",desc:"As a field agent, investigate and identify Synthoid populations, movements, and operations.

Successful Investigation ops will increase the accuracy of your synthoid data.

You will NOT lose HP from failed Investigation ops.",baseDifficulty:400,difficultyFac:1.03,rewardFac:1.07,reqdRank:25,rankGain:2.2,rankLoss:.2,count:Object(D.getRandomInt)(1,100),countGrowth:Object(D.getRandomInt)(10,40)/10,weights:{hack:.25,str:.05,def:.05,dex:.2,agi:.1,cha:.25,int:.1},decays:{hack:.85,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Undercover Operation"]=new T.Operation({name:"Undercover Operation",desc:"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.

Successful Undercover ops will increase the accuracy of your synthoid data.",baseDifficulty:500,difficultyFac:1.04,rewardFac:1.09,reqdRank:100,rankGain:4.4,rankLoss:.4,hpLoss:2,count:Object(D.getRandomInt)(1,100),countGrowth:Object(D.getRandomInt)(10,40)/10,weights:{hack:.2,str:.05,def:.05,dex:.2,agi:.2,cha:.2,int:.1},decays:{hack:.8,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Sting Operation"]=new T.Operation({name:"Sting Operation",desc:"Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.",baseDifficulty:650,difficultyFac:1.04,rewardFac:1.095,reqdRank:500,rankGain:5.5,rankLoss:.5,hpLoss:2.5,count:Object(D.getRandomInt)(1,150),countGrowth:Object(D.getRandomInt)(3,40)/10,weights:{hack:.25,str:.05,def:.05,dex:.25,agi:.1,cha:.2,int:.1},decays:{hack:.8,str:.85,def:.85,dex:.85,agi:.85,cha:.7,int:.9},isStealth:!0}),this.operations.Raid=new T.Operation({name:"Raid",desc:"Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your current city in order for this Operation to be successful",baseDifficulty:800,difficultyFac:1.045,rewardFac:1.1,reqdRank:3e3,rankGain:55,rankLoss:2.5,hpLoss:50,count:Object(D.getRandomInt)(1,150),countGrowth:Object(D.getRandomInt)(2,40)/10,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isKill:!0}),this.operations["Stealth Retirement Operation"]=new T.Operation({name:"Stealth Retirement Operation",desc:"Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any attention. Stealth and discretion are key.",baseDifficulty:1e3,difficultyFac:1.05,rewardFac:1.11,reqdRank:2e4,rankGain:22,rankLoss:2,hpLoss:10,count:Object(D.getRandomInt)(1,150),countGrowth:Object(D.getRandomInt)(1,20)/10,weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isStealth:!0,isKill:!0}),this.operations.Assassination=new T.Operation({name:"Assassination",desc:"Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the Synthoid communities.",baseDifficulty:1500,difficultyFac:1.06,rewardFac:1.14,reqdRank:5e4,rankGain:44,rankLoss:4,hpLoss:5,count:Object(D.getRandomInt)(1,150),countGrowth:Object(D.getRandomInt)(1,20)/10,weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.8},isStealth:!0,isKill:!0})},z.prototype.storeCycles=function(e=1){this.storedCycles+=e},z.prototype.process=function(){if(!1===p.b&&this.blackops.hasOwnProperty("Operation Daedalus"))return Object(p.a)(m.Player.bitNodeN);if(!1===r.Augmentations[a.AugmentationNames.BladesSimulacrum].owned&&m.Player.isWorking){if(this.action.type!==x.ActionTypes.Idle){let e="Your Bladeburner action was cancelled because you started doing something else.";this.automateEnabled&&(e+="

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console",this.automateEnabled=!1),Object(_.dialogBoxCreate)(e)}this.resetAction()}if(this.stamina<=0&&(this.log("Your Bladeburner action was cancelled because your stamina hit 0"),this.resetAction()),this.storedCycles>=v.BladeburnerConstants.CyclesPerSecond){var e=Math.floor(this.storedCycles/v.BladeburnerConstants.CyclesPerSecond);for(var t in e=Math.min(e,5),this.storedCycles-=e*v.BladeburnerConstants.CyclesPerSecond,this.calculateMaxStamina(),this.stamina+=this.calculateStaminaGainPerSecond()*e,this.stamina=Math.min(this.maxStamina,this.stamina),this.contracts)if(this.contracts.hasOwnProperty(t)){var n=this.contracts[t];n.count+=e*n.countGrowth/v.BladeburnerConstants.ActionCountGrowthPeriod}for(var i in this.operations)if(this.operations.hasOwnProperty(i)){var o=this.operations[i];o.count+=e*o.countGrowth/v.BladeburnerConstants.ActionCountGrowthPeriod}for(var s=0;s=this.automateThreshHigh&&(this.action.name===this.automateActionHigh.name&&this.action.type===this.automateActionHigh.type||(this.action=new Y({type:this.automateActionHigh.type,name:this.automateActionHigh.name}),this.startAction(this.action)))),h.routing.isOn(h.Page.Bladeburner)&&this.updateContent()}},z.prototype.calculateMaxStamina=function(){const e=m.Player.agility*this.skillMultipliers.effAgi;let t=(Math.pow(e,.8)+this.staminaBonus)*this.skillMultipliers.stamina*m.Player.bladeburner_max_stamina_mult;if(this.maxStamina!==t){const e=this.maxStamina;this.maxStamina=t,this.stamina=this.maxStamina*this.stamina/e}if(isNaN(t))throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()")},z.prototype.calculateStaminaGainPerSecond=function(){var e=m.Player.agility*this.skillMultipliers.effAgi,t=this.maxStamina/v.BladeburnerConstants.MaxStaminaToGainFactor;return(v.BladeburnerConstants.StaminaGainPerSecond+t)*Math.pow(e,.17)*(this.skillMultipliers.stamina*m.Player.bladeburner_stamina_gain_mult)},z.prototype.calculateStaminaPenalty=function(){return Math.min(1,this.stamina/(.5*this.maxStamina))},z.prototype.changeRank=function(e){if(isNaN(e))throw new Error("NaN passed into Bladeburner.changeRank()");this.rank+=e,this.rank<0&&(this.rank=0),this.maxRank=Math.max(this.rank,this.maxRank);if(Object(c.factionExists)("Bladeburners")){var t=c.Factions.Bladeburners;if(!(t instanceof l.Faction))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");if(t.isMember){var n=1+t.favor/100;t.playerReputation+=v.BladeburnerConstants.RankToFactionRepFactor*e*m.Player.faction_rep_mult*n}}var r=(this.totalSkillPoints+1)*v.BladeburnerConstants.RanksPerSkillPoint;if(this.maxRank>=r){var a=Math.floor((this.maxRank-r)/v.BladeburnerConstants.RanksPerSkillPoint+1);this.skillPoints+=a,this.totalSkillPoints+=a}},z.prototype.getCurrentCity=function(){var e=this.cities[this.city];if(!(e instanceof E.City))throw new Error("Bladeburner.getCurrentCity() did not properly return a City object");return e},z.prototype.resetSkillMultipliers=function(){this.skillMultipliers={successChanceAll:1,successChanceStealth:1,successChanceKill:1,successChanceContract:1,successChanceOperation:1,successChanceEstimate:1,actionTime:1,effHack:1,effStr:1,effDef:1,effDex:1,effAgi:1,effCha:1,effInt:1,stamina:1,money:1,expGain:1}},z.prototype.updateSkillMultipliers=function(){for(var e in this.resetSkillMultipliers(),this.skills)if(this.skills.hasOwnProperty(e)){var t=C.Skills[e];if(null==t)throw new Error("Could not find Skill Object for: "+e);var n=this.skills[e];if(null==n||n<=0)continue;for(var r=Object.keys(this.skillMultipliers),a=0;a=this.actionTimeToComplete?this.completeAction():void 0}},z.prototype.completeAction=function(){switch(this.action.type){case x.ActionTypes.Contract:case x.ActionTypes.Operation:try{var e=this.action.type===x.ActionTypes.Operation;if(null==(_=this.getActionObject(this.action)))throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);var t=_.getDifficulty(),n=Math.pow(t,v.BladeburnerConstants.DiffMultExponentialFactor)+t/v.BladeburnerConstants.DiffMultLinearFactor,r=Math.pow(_.rewardFac,_.level-1);if(this.stamina-=v.BladeburnerConstants.BaseStaminaLoss*n,this.stamina<0&&(this.stamina=0),_.attempt(this)){this.gainActionStats(_,!0),++_.successes,--_.count;var a=0;if(e||(a=v.BladeburnerConstants.ContractBaseMoneyGain*r*this.skillMultipliers.money,m.Player.gainMoney(a),m.Player.recordMoneySource(a,"bladeburner")),e?_.setMaxLevel(v.BladeburnerConstants.OperationSuccessesPerLevel):_.setMaxLevel(v.BladeburnerConstants.ContractSuccessesPerLevel),_.rankGain){var s=Object(w.addOffset)(_.rankGain*r*i.BitNodeMultipliers.BladeburnerRank,10);this.changeRank(s),e&&this.logging.ops?this.log(_.name+" successfully completed! Gained "+Object(f.formatNumber)(s,3)+" rank"):!e&&this.logging.contracts&&this.log(_.name+" contract successfully completed! Gained "+Object(f.formatNumber)(s,3)+" rank and "+d.numeralWrapper.format(a,"$0.000a"))}e?this.completeOperation(!0):this.completeContract(!0)}else{this.gainActionStats(_,!1),++_.failures;var l=0,c=0;_.rankLoss&&(l=Object(w.addOffset)(_.rankLoss*r,10),this.changeRank(-1*l)),_.hpLoss&&(c=_.hpLoss*n,c=Math.ceil(Object(w.addOffset)(c,10)),this.hpLost+=c,m.Player.takeDamage(c)&&(++this.numHosp,this.moneyLost+=o.CONSTANTS.HospitalCostPerHp*m.Player.max_hp));var u="";l>0&&(u+="Lost "+Object(f.formatNumber)(l,3)+" rank."),c>0&&(u+="Took "+Object(f.formatNumber)(c,0)+" damage."),e&&this.logging.ops?this.log(_.name+" failed! "+u):!e&&this.logging.contracts&&this.log(_.name+" contract failed! "+u),e?this.completeOperation(!1):this.completeContract(!1)}_.autoLevel&&(_.level=_.maxLevel),this.startAction(this.action)}catch(e){Object(N.exceptionAlert)(e)}break;case x.ActionTypes.BlackOp:case x.ActionTypes.BlackOperation:try{var _;if(null==(_=this.getActionObject(this.action))||!(_ instanceof P.BlackOperation))throw new Error("Failed to get BlackOperation Object for: "+this.action.name);t=_.getDifficulty(),n=Math.pow(t,v.BladeburnerConstants.DiffMultExponentialFactor)+t/v.BladeburnerConstants.DiffMultLinearFactor;this.stamina-=v.BladeburnerConstants.BaseStaminaLoss*n,this.stamina<0&&(this.stamina=0);var g,y=_.teamCount;if(_.attempt(this)){this.gainActionStats(_,!0),_.count=0,this.blackops[_.name]=!0;var b=0;if(_.rankGain&&(b=Object(w.addOffset)(_.rankGain*i.BitNodeMultipliers.BladeburnerRank,10),this.changeRank(b)),g=Math.ceil(y/2),"Operation Daedalus"===_.name)return this.resetAction(),Object(p.a)(m.Player.bitNodeN);h.routing.isOn(h.Page.Bladeburner)&&this.createActionAndSkillsContent(),this.logging.blackops&&this.log(_.name+" successful! Gained "+Object(f.formatNumber)(b,1)+" rank")}else{this.gainActionStats(_,!1);var E=0;c=0;_.rankLoss&&(E=Object(w.addOffset)(_.rankLoss,10),this.changeRank(-1*E)),_.hpLoss&&(c=_.hpLoss*n,c=Math.ceil(Object(w.addOffset)(c,10)),m.Player.takeDamage(c)&&(++this.numHosp,this.moneyLost+=o.CONSTANTS.HospitalCostPerHp*m.Player.max_hp)),g=Math.floor(y),this.logging.blackops&&this.log(_.name+" failed! Lost "+Object(f.formatNumber)(E,1)+" rank and took "+Object(f.formatNumber)(c,0)+" damage")}if(this.resetAction(),y>=1){var k=Object(D.getRandomInt)(1,g);this.teamSize-=k,this.teamLost+=k,this.logging.blackops&&this.log("You lost "+Object(f.formatNumber)(k,0)+" team members during "+_.name)}}catch(e){Object(N.exceptionAlert)(e)}break;case x.ActionTypes.Training:this.stamina-=.5*v.BladeburnerConstants.BaseStaminaLoss;var C=30*m.Player.strength_exp_mult,T=30*m.Player.defense_exp_mult,S=30*m.Player.dexterity_exp_mult,O=30*m.Player.agility_exp_mult,M=.04*this.skillMultipliers.stamina;m.Player.gainStrengthExp(C),m.Player.gainDefenseExp(T),m.Player.gainDexterityExp(S),m.Player.gainAgilityExp(O),this.staminaBonus+=M,this.logging.general&&this.log("Training completed. Gained: "+Object(f.formatNumber)(C,1)+" str exp, "+Object(f.formatNumber)(T,1)+" def exp, "+Object(f.formatNumber)(S,1)+" dex exp, "+Object(f.formatNumber)(O,1)+" agi exp, "+Object(f.formatNumber)(M,3)+" max stamina"),this.startAction(this.action);break;case x.ActionTypes.FieldAnalysis:case x.ActionTypes["Field Analysis"]:var A=.04*Math.pow(m.Player.hacking_skill,.3)+.04*Math.pow(m.Player.intelligence,.9)+.02*Math.pow(m.Player.charisma,.3);if(A*=m.Player.bladeburner_analysis_mult,isNaN(A)||A<0)throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");var R=20*m.Player.hacking_exp_mult,I=20*m.Player.charisma_exp_mult;m.Player.gainHackingExp(R),m.Player.gainIntelligenceExp(v.BladeburnerConstants.BaseIntGain),m.Player.gainCharismaExp(I),this.changeRank(.1*i.BitNodeMultipliers.BladeburnerRank),this.getCurrentCity().improvePopulationEstimateByPercentage(A*this.skillMultipliers.successChanceEstimate),this.logging.general&&this.log("Field analysis completed. Gained 0.1 rank, "+Object(f.formatNumber)(R,1)+" hacking exp, and "+Object(f.formatNumber)(I,1)+" charisma exp"),this.startAction(this.action);break;case x.ActionTypes.Recruitment:var B=this.getRecruitmentSuccessChance();if(Math.random()=1){n=e?Math.ceil(r/2):Math.floor(r);var a=Object(D.getRandomInt)(0,n);this.teamSize-=a,this.teamLost+=a,this.logging.ops&&a>0&&this.log("Lost "+Object(f.formatNumber)(a,0)+" team members during this "+t.name)}var i=this.getCurrentCity();switch(t.name){case"Investigation":e?(i.improvePopulationEstimateByPercentage(.4*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&i.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.1);break;case"Undercover Operation":e?(i.improvePopulationEstimateByPercentage(.8*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&i.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.15);break;case"Sting Operation":e&&i.changePopulationByPercentage(-.1,{changeEstEqually:!0,nonZero:!0}),i.changeChaosByCount(.1);break;case"Raid":if(e)i.changePopulationByPercentage(-1,{changeEstEqually:!0,nonZero:!0}),--i.comms,--i.commsEst;else{var o=Object(D.getRandomInt)(-10,-5)/10;i.changePopulationByPercentage(o,{nonZero:!0})}i.changeChaosByPercentage(Object(D.getRandomInt)(1,5));break;case"Stealth Retirement Operation":e&&i.changePopulationByPercentage(-.5,{changeEstEqually:!0,nonZero:!0}),i.changeChaosByPercentage(Object(D.getRandomInt)(-3,-1));break;case"Assassination":e&&i.changePopulationByCount(-1,{estChange:-1}),i.changeChaosByPercentage(Object(D.getRandomInt)(-5,5));break;default:throw new Error("Invalid Action name in completeOperation: "+this.action.name)}},z.prototype.getRecruitmentTime=function(){var e=m.Player.charisma*this.skillMultipliers.effCha,t=Math.pow(e,.81)+e/90;return Math.max(10,Math.round(v.BladeburnerConstants.BaseRecruitmentTimeNeeded-t))},z.prototype.getRecruitmentSuccessChance=function(){return Math.pow(m.Player.charisma,.45)/(this.teamSize+1)},z.prototype.getDiplomacyEffectiveness=function(){return(100-(Math.pow(m.Player.charisma,.045)+m.Player.charisma/1e3))/100},z.prototype.gainActionStats=function(e,t){var n=e.getDifficulty(),r=Math.pow(n,v.BladeburnerConstants.DiffMultExponentialFactor)+n/v.BladeburnerConstants.DiffMultLinearFactor,a=this.actionTimeToComplete,i=t?1:.5,o=a*v.BladeburnerConstants.BaseStatGain*i*r,s=a*v.BladeburnerConstants.BaseIntGain*i*r;const l=this.skillMultipliers.expGain;m.Player.gainHackingExp(o*e.weights.hack*m.Player.hacking_exp_mult*l),m.Player.gainStrengthExp(o*e.weights.str*m.Player.strength_exp_mult*l),m.Player.gainDefenseExp(o*e.weights.def*m.Player.defense_exp_mult*l),m.Player.gainDexterityExp(o*e.weights.dex*m.Player.dexterity_exp_mult*l),m.Player.gainAgilityExp(o*e.weights.agi*m.Player.agility_exp_mult*l),m.Player.gainCharismaExp(o*e.weights.cha*m.Player.charisma_exp_mult*l),m.Player.gainIntelligenceExp(s*e.weights.int*l)},z.prototype.randomEvent=function(){var e=Math.random(),t=v.BladeburnerConstants.CityNames[Object(D.getRandomInt)(0,5)],n=this.cities[t];if(!(n instanceof E.City))throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");for(var r=v.BladeburnerConstants.CityNames[Object(D.getRandomInt)(0,5)];r===t;)r=v.BladeburnerConstants.CityNames[Object(D.getRandomInt)(0,5)];var a=this.cities[r];if(!(n instanceof E.City&&a instanceof E.City))throw new Error("sourceCity/destCity was not a City object in Bladeburner.randomEvent()");if(e<=.05){++n.comms;var i=Object(D.getRandomInt)(10,20)/100,o=Math.round(n.pop*i);n.pop+=o,this.logging.events&&this.log("Intelligence indicates that a new Synthoid community was formed in a city")}else if(e<=.1)if(n.comms<=0){++n.comms;i=Object(D.getRandomInt)(10,20)/100,o=Math.round(n.pop*i);n.pop+=o,this.logging.events&&this.log("Intelligence indicates that a new Synthoid community was formed in a city")}else{--n.comms,++a.comms;i=Object(D.getRandomInt)(10,20)/100,o=Math.round(n.pop*i);n.pop-=o,a.pop+=o,this.logging.events&&this.log("Intelligence indicates that a Synthoid community migrated from "+t+" to some other city")}else if(e<=.3){i=Object(D.getRandomInt)(8,24)/100,o=Math.round(n.pop*i);n.pop+=o,this.logging.events&&this.log("Intelligence indicates that the Synthoid population of "+t+" just changed significantly")}else if(e<=.5)this.triggerMigration(t),this.logging.events&&this.log("Intelligence indicates that a large number of Synthoids migrated from "+t+" to some other city");else if(e<=.7)n.chaos+=1,n.chaos*=1+Object(D.getRandomInt)(5,20)/100,this.logging.events&&this.log("Tensions between Synthoids and humans lead to riots in "+t+"! Chaos increased");else if(e<=.9){i=Object(D.getRandomInt)(8,20)/100,o=Math.round(n.pop*i);n.pop-=o,this.logging.events&&this.log("Intelligence indicates that the Synthoid population of "+t+" just changed significantly")}},z.prototype.triggerPotentialMigration=function(e,t){(null==t||isNaN(t))&&console.error("Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()"),t>1&&(t/=100),Math.random()0&&(i*=Object(D.getRandomInt)(2,4),--r.comms,++n.comms);var o=Math.round(r.pop*i);r.pop-=o,n.pop+=o};let V={};z.prototype.initializeDomElementRefs=function(){V={bladeburnerDiv:null,overviewConsoleParentDiv:null,overviewDiv:null,actionAndSkillsDiv:null,currentTab:null,consoleDiv:null,consoleTable:null,consoleInputRow:null,consoleInputCell:null,consoleInputHeader:null,consoleInput:null,overviewRank:null,overviewStamina:null,overviewStaminaHelpTip:null,overviewGen1:null,overviewEstPop:null,overviewEstPopHelpTip:null,overviewEstComms:null,overviewChaos:null,overviewSkillPoints:null,overviewBonusTime:null,overviewAugSuccessMult:null,overviewAugMaxStaminaMult:null,overviewAugStaminaGainMult:null,overviewAugAnalysisMult:null,actionsAndSkillsDesc:null,actionsAndSkillsList:null,generalActions:{},contracts:{},operations:{},blackops:{},skills:{},skillPointsDisplay:null}},z.prototype.createContent=function(){V.bladeburnerDiv=Object(j.createElement)("div",{id:"bladeburner-container",position:"fixed",class:"generic-menupage-container"}),V.overviewConsoleParentDiv=Object(j.createElement)("div",{height:"60%",display:"block",position:"relative"}),V.overviewDiv=Object(j.createElement)("div",{width:"30%",display:"inline-block",border:"1px solid white"}),V.actionAndSkillsDiv=Object(j.createElement)("div",{height:"60%",width:"70%",display:"block",border:"1px solid white",margin:"6px",padding:"6px"}),V.currentTab="general",this.createOverviewContent(),this.createActionAndSkillsContent(),V.consoleDiv=Object(j.createElement)("div",{class:"bladeburner-console-div",clickListener:()=>(V.consoleInput instanceof Element&&V.consoleInput.focus(),!1)}),V.consoleTable=Object(j.createElement)("table",{class:"bladeburner-console-table"}),V.consoleInputRow=Object(j.createElement)("tr",{class:"bladeburner-console-input-row",id:"bladeubrner-console-input-row"}),V.consoleInputCell=Object(j.createElement)("td",{class:"bladeburner-console-input-cell"}),V.consoleInputHeader=Object(j.createElement)("pre",{innerText:"> "}),V.consoleInput=Object(j.createElement)("input",{type:"text",class:"bladeburner-console-input",tabIndex:1,onfocus:()=>{V.consoleInput.value=V.consoleInput.value}}),V.consoleInputCell.appendChild(V.consoleInputHeader),V.consoleInputCell.appendChild(V.consoleInput),V.consoleInputRow.appendChild(V.consoleInputCell),V.consoleTable.appendChild(V.consoleInputRow),V.consoleDiv.appendChild(V.consoleTable),V.overviewConsoleParentDiv.appendChild(V.overviewDiv),V.overviewConsoleParentDiv.appendChild(V.consoleDiv),V.bladeburnerDiv.appendChild(V.overviewConsoleParentDiv),V.bladeburnerDiv.appendChild(V.actionAndSkillsDiv);const e=Object(j.createElement)("div");if(e.innerHTML=`${G}= This action requires stealth, ${K} = This action involves retirement`,V.bladeburnerDiv.appendChild(e),document.getElementById("entire-game-container").appendChild(V.bladeburnerDiv),0===this.consoleLogs.length)this.postToConsole("Bladeburner Console BETA"),this.postToConsole("Type 'help' to see console commands");else for(let e=0;e{Object(_.dialogBoxCreate)("Performing actions will use up your stamina.

Your max stamina is determined primarily by your agility stat.

Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.

Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this means your success rate would be multipled by 85% (100 - 15).

Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}}),V.overviewGen1=Object(j.createElement)("p",{display:"block"}),V.overviewEstPop=Object(j.createElement)("p",{innerText:"Est. Synthoid Population: ",display:"inline-block",tooltip:"This is your Bladeburner division's estimate of how many Synthoids exist in your current city."}),V.overviewEstPopHelpTip=Object(j.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(_.dialogBoxCreate)("The success rate of your contracts/operations depends on the population of Synthoids in your current city. The success rate that is shown to you is only an estimate, and it is based on your Synthoid population estimate.

Therefore, it is important that this Synthoid population estimate is accurate so that you have a better idea of your success rate for contracts/operations. Certain actions will increase the accuracy of your population estimate.

The Synthoid populations of cities can change due to your actions or random events. If random events occur, they will be logged in the Bladeburner Console.")}}),V.overviewEstComms=Object(j.createElement)("p",{innerText:"Est. Synthoid Communities: ",display:"inline-block",tooltip:"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city."}),V.overviewChaos=Object(j.createElement)("p",{innerText:"City Chaos: ",display:"inline-block",tooltip:"The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a chaos level can make contracts and operations harder."}),V.overviewBonusTime=Object(j.createElement)("p",{innerText:"Bonus time: ",display:"inline-block",tooltip:"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed."}),V.overviewSkillPoints=Object(j.createElement)("p",{display:"block"}),V.overviewAugSuccessMult=Object(j.createElement)("p",{display:"block"}),V.overviewAugMaxStaminaMult=Object(j.createElement)("p",{display:"block"}),V.overviewAugStaminaGainMult=Object(j.createElement)("p",{display:"block"}),V.overviewAugAnalysisMult=Object(j.createElement)("p",{display:"block"}),V.overviewDiv.appendChild(V.overviewRank),Object(W.appendLineBreaks)(V.overviewDiv,1),V.overviewDiv.appendChild(V.overviewStamina),V.overviewDiv.appendChild(V.overviewStaminaHelpTip),V.overviewDiv.appendChild(V.overviewGen1),V.overviewDiv.appendChild(V.overviewEstPop),V.overviewDiv.appendChild(V.overviewEstPopHelpTip),Object(W.appendLineBreaks)(V.overviewDiv,1),V.overviewDiv.appendChild(V.overviewEstComms),Object(W.appendLineBreaks)(V.overviewDiv,1),V.overviewDiv.appendChild(V.overviewChaos),Object(W.appendLineBreaks)(V.overviewDiv,2),V.overviewDiv.appendChild(V.overviewBonusTime),V.overviewDiv.appendChild(V.overviewSkillPoints),Object(W.appendLineBreaks)(V.overviewDiv,1),V.overviewDiv.appendChild(V.overviewAugSuccessMult),V.overviewDiv.appendChild(V.overviewAugMaxStaminaMult),V.overviewDiv.appendChild(V.overviewAugStaminaGainMult),V.overviewDiv.appendChild(V.overviewAugAnalysisMult),Object(W.appendLineBreaks)(V.overviewDiv,1),V.overviewDiv.appendChild(Object(j.createElement)("a",{innerHTML:"Travel",class:"a-link-button",display:"inline-block",clickListener:()=>{var e="bladeburner-travel-popup-cancel-btn",t=[];t.push(Object(j.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(H.removeElementById)(e),!1)})),t.push(Object(j.createElement)("p",{innerText:"Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in for your Bladeburner duties does not affect your location in the game otherwise"}));for(var n=0;n(n.city=v.BladeburnerConstants.CityNames[r],Object(H.removeElementById)(e),n.updateOverviewContent(),!1)}))}(this,n);Object(F.createPopup)(e,t)}}));if(Object(c.factionExists)("Bladeburners")){var e=c.Factions.Bladeburners;if(!(e instanceof l.Faction))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");V.overviewDiv.appendChild(Object(j.createElement)("a",{innerText:"Faction",class:"a-link-button",display:"inline-block",tooltip:"Apply to the Bladeburner Faction, or go to the faction page if you are already a member",clickListener:()=>(e.isMember?(s.Engine.loadFactionContent(),Object(u.displayFactionContent)("Bladeburners")):this.rank>=v.BladeburnerConstants.RankNeededForFaction?(Object(u.joinFaction)(e),Object(_.dialogBoxCreate)("Congratulations! You were accepted into the Bladeburners faction"),Object(L.removeChildrenFromElement)(V.overviewDiv),this.createOverviewContent()):Object(_.dialogBoxCreate)("You need a rank of 25 to join the Bladeburners Faction!"),!1)}))}V.overviewDiv.appendChild(Object(j.createElement)("br")),V.overviewDiv.appendChild(Object(j.createElement)("br")),this.updateOverviewContent()},z.prototype.createActionAndSkillsContent=function(){null==V.currentTab&&(V.currentTab="general"),Object(L.removeChildrenFromElement)(V.actionAndSkillsDiv),Object(A.clearObject)(V.generalActions),Object(A.clearObject)(V.contracts),Object(A.clearObject)(V.operations),Object(A.clearObject)(V.blackops),Object(A.clearObject)(V.skills);for(var e=V.currentTab.toLowerCase(),t=["General","Contracts","Operations","BlackOps","Skills"],n=0;n(V.currentTab=e[t].toLowerCase(),n.createActionAndSkillsContent(),!1)}))}(t,n,this,e);switch(V.actionsAndSkillsDesc=Object(j.createElement)("p",{display:"block",margin:"4px",padding:"4px"}),Object(L.removeChildrenFromElement)(V.actionsAndSkillsList),V.actionsAndSkillsList=Object(j.createElement)("ul"),e){case"general":this.createGeneralActionsContent();break;case"contracts":this.createContractsContent();break;case"operations":this.createOperationsContent();break;case"blackops":this.createBlackOpsContent();break;case"skills":this.createSkillsContent();break;default:throw new Error("Invalid value for DomElems.currentTab in Bladeburner.createActionAndSkillsContent")}this.updateContent(),V.actionAndSkillsDiv.appendChild(V.actionsAndSkillsDesc),V.actionAndSkillsDiv.appendChild(V.actionsAndSkillsList)},z.prototype.createGeneralActionsContent=function(){if(null==V.actionsAndSkillsList||null==V.actionsAndSkillsDesc)throw new Error("Bladeburner.createGeneralActionsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in V.actionsAndSkillsDesc.innerText="These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way.",M.GeneralActions)M.GeneralActions.hasOwnProperty(e)&&(V.generalActions[e]=Object(j.createElement)("div",{class:"bladeburner-action",name:e}),V.actionsAndSkillsList.appendChild(V.generalActions[e]))},z.prototype.createContractsContent=function(){if(null==V.actionsAndSkillsList||null==V.actionsAndSkillsDesc)throw new Error("Bladeburner.createContractsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in V.actionsAndSkillsDesc.innerHTML="Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you to lose HP, which can lead to hospitalization.

You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money.",this.contracts)this.contracts.hasOwnProperty(e)&&(V.contracts[e]=Object(j.createElement)("div",{class:"bladeburner-action",name:e}),V.actionsAndSkillsList.appendChild(V.contracts[e]))},z.prototype.createOperationsContent=function(){if(null==V.actionsAndSkillsList||null==V.actionsAndSkillsDesc)throw new Error("Bladeburner.createOperationsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in V.actionsAndSkillsDesc.innerHTML="Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more punishing than contracts, but are also more rewarding.

Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.

For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.

You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience.",this.operations)this.operations.hasOwnProperty(e)&&(V.operations[e]=Object(j.createElement)("div",{class:"bladeburner-action",name:e}),V.actionsAndSkillsList.appendChild(V.operations[e]))},z.prototype.createBlackOpsContent=function(){if(null==V.actionsAndSkillsList||null==V.actionsAndSkillsDesc)throw new Error("Bladeburner.createBlackOpsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");V.actionsAndSkillsDesc.innerHTML="Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.

Your ultimate goal to climb through the ranks of Bladeburners is to complete all of the Black Ops.

Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses.";var e=[];for(var t in S.BlackOperations)S.BlackOperations.hasOwnProperty(t)&&e.push(S.BlackOperations[t]);e.sort(function(e,t){return e.reqdRank-t.reqdRank});for(var n=e.length-1;n>=0;--n)null==this.blackops[[e[n].name]]&&0!==n&&null==this.blackops[[e[n-1].name]]||(V.blackops[e[n].name]=Object(j.createElement)("div",{class:"bladeburner-action",name:e[n].name}),V.actionsAndSkillsList.appendChild(V.blackops[e[n].name]))},z.prototype.createSkillsContent=function(){if(null==V.actionsAndSkillsList||null==V.actionsAndSkillsDesc)throw new Error("Bladeburner.createSkillsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");V.actionsAndSkillsDesc.innerHTML="You will gain one skill point every "+v.BladeburnerConstants.RanksPerSkillPoint+" ranks.

Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.

";for(var e=Object.keys(this.skillMultipliers),t=0;t";break;case"successChanceStealth":V.actionsAndSkillsDesc.innerHTML+="Stealth Success Chance: x"+n+"
";break;case"successChanceKill":V.actionsAndSkillsDesc.innerHTML+="Retirement Success Chance: x"+n+"
";break;case"successChanceContract":V.actionsAndSkillsDesc.innerHTML+="Contract Success Chance: x"+n+"
";break;case"successChanceOperation":V.actionsAndSkillsDesc.innerHTML+="Operation Success Chance: x"+n+"
";break;case"successChanceEstimate":V.actionsAndSkillsDesc.innerHTML+="Synthoid Data Estimate: x"+n+"
";break;case"actionTime":V.actionsAndSkillsDesc.innerHTML+="Action Time: x"+n+"
";break;case"effHack":V.actionsAndSkillsDesc.innerHTML+="Hacking Skill: x"+n+"
";break;case"effStr":V.actionsAndSkillsDesc.innerHTML+="Strength: x"+n+"
";break;case"effDef":V.actionsAndSkillsDesc.innerHTML+="Defense: x"+n+"
";break;case"effDex":V.actionsAndSkillsDesc.innerHTML+="Dexterity: x"+n+"
";break;case"effAgi":V.actionsAndSkillsDesc.innerHTML+="Agility: x"+n+"
";break;case"effCha":V.actionsAndSkillsDesc.innerHTML+="Charisma: x"+n+"
";break;case"effInt":V.actionsAndSkillsDesc.innerHTML+="Intelligence: x"+n+"
";break;case"stamina":V.actionsAndSkillsDesc.innerHTML+="Stamina: x"+n+"
";break;case"money":V.actionsAndSkillsDesc.innerHTML+="Contract Money: x"+n+"
";break;case"expGain":V.actionsAndSkillsDesc.innerHTML+="Exp Gain: x"+n+"
";break;default:console.warn(`Unrecognized SkillMult Key: ${e[t]}`)}}for(var r in V.skillPointsDisplay=Object(j.createElement)("p",{innerHTML:"
Skill Points: "+Object(f.formatNumber)(this.skillPoints,0)+""}),V.actionAndSkillsDiv.appendChild(V.skillPointsDisplay),C.Skills)C.Skills.hasOwnProperty(r)&&(V.skills[r]=Object(j.createElement)("div",{class:"bladeburner-action",name:r}),V.actionsAndSkillsList.appendChild(V.skills[r]))},z.prototype.updateContent=function(){this.updateOverviewContent(),this.updateActionAndSkillsContent()},z.prototype.updateOverviewContent=function(){h.routing.isOn(h.Page.Bladeburner)&&(V.overviewRank.childNodes[0].nodeValue="Rank: "+Object(f.formatNumber)(this.rank,2),V.overviewStamina.innerText="Stamina: "+Object(f.formatNumber)(this.stamina,3)+" / "+Object(f.formatNumber)(this.maxStamina,3),V.overviewGen1.innerHTML="Stamina Penalty: "+Object(f.formatNumber)(100*(1-this.calculateStaminaPenalty()),1)+"%

Team Size: "+Object(f.formatNumber)(this.teamSize,0)+"
Team Members Lost: "+Object(f.formatNumber)(this.teamLost,0)+"

Num Times Hospitalized: "+this.numHosp+"
Money Lost From Hospitalizations: "+d.numeralWrapper.format(this.moneyLost,"$0.000a")+"

Current City: "+this.city+"
",V.overviewEstPop.childNodes[0].nodeValue="Est. Synthoid Population: "+d.numeralWrapper.format(this.getCurrentCity().popEst,"0.000a"),V.overviewEstComms.childNodes[0].nodeValue="Est. Synthoid Communities: "+Object(f.formatNumber)(this.getCurrentCity().comms,0),V.overviewChaos.childNodes[0].nodeValue="City Chaos: "+Object(f.formatNumber)(this.getCurrentCity().chaos),V.overviewSkillPoints.innerText="Skill Points: "+Object(f.formatNumber)(this.skillPoints,0),V.overviewBonusTime.childNodes[0].nodeValue="Bonus time: "+Object(f.convertTimeMsToTimeElapsedString)(this.storedCycles/v.BladeburnerConstants.CyclesPerSecond*1e3),V.overviewAugSuccessMult.innerText="Aug. Success Chance Mult: "+Object(f.formatNumber)(100*m.Player.bladeburner_success_chance_mult,1)+"%",V.overviewAugMaxStaminaMult.innerText="Aug. Max Stamina Mult: "+Object(f.formatNumber)(100*m.Player.bladeburner_max_stamina_mult,1)+"%",V.overviewAugStaminaGainMult.innerText="Aug. Stamina Gain Mult: "+Object(f.formatNumber)(100*m.Player.bladeburner_stamina_gain_mult,1)+"%",V.overviewAugAnalysisMult.innerText="Aug. Field Analysis Mult: "+Object(f.formatNumber)(100*m.Player.bladeburner_analysis_mult,1)+"%")},z.prototype.updateActionAndSkillsContent=function(){switch(null==V.currentTab&&(V.currentTab="general"),V.currentTab.toLowerCase()){case"general":for(var e=Object.keys(V.generalActions),t=0;t";var d=Object.keys(V.skills);for(t=0;t(this.action.type=x.ActionTypes[t.name],this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));Object(W.appendLineBreaks)(e,2),e.appendChild(Object(j.createElement)("pre",{innerHTML:t.desc,display:"inline-block"}))},z.prototype.updateContractsUIElement=function(e,t){Object(L.removeChildrenFromElement)(e);var n=e.classList.contains($),r=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(j.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(f.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(f.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var a=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(j.createElement)("p",{display:"block",innerText:Object(R.createProgressBarText)({progress:a})}))}else e.appendChild(Object(j.createElement)("a",{innerText:"Start",class:"a-link-button",padding:"3px",margin:"3px",clickListener:()=>(this.action.type=x.ActionTypes.Contract,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));var i=t.level>=t.maxLevel;Object(W.appendLineBreaks)(e,2),e.appendChild(Object(j.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(v.BladeburnerConstants.ContractSuccessesPerLevel)+" successes needed for next level"})),e.appendChild(Object(j.createElement)("a",{class:i?"a-link-button-inactive":"a-link-button",innerHTML:"↑",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the contract":"",display:"inline",clickListener:()=>(++t.level,n&&this.startAction(this.action),this.updateContractsUIElement(e,t),!1)})),e.appendChild(Object(j.createElement)("a",{class:t.level<=1?"a-link-button-inactive":"a-link-button",innerHTML:"↓",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the contract":"",display:"inline",clickListener:()=>(--t.level,n&&this.startAction(this.action),this.updateContractsUIElement(e,t),!1)}));var o=t.getActionTime(this);Object(W.appendLineBreaks)(e,2),e.appendChild(Object(j.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\n"+`Estimated success chance: ${Object(f.formatNumber)(100*r,1)}% ${t.isStealth?G:""}${t.isKill?K:""}\n`+"Time Required (s): "+Object(f.formatNumber)(o,0)+"\nContracts remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(j.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(j.createElement)("label",{for:s,innerText:"Autolevel: ",color:"white",tooltip:"Automatically increase contract level when possible"}));const l=Object(j.createElement)("input",{type:"checkbox",id:s,checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},z.prototype.updateOperationsUIElement=function(e,t){Object(L.removeChildrenFromElement)(e);var n=e.classList.contains($),r=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(j.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(f.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(f.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var a=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(j.createElement)("p",{display:"block",innerText:Object(R.createProgressBarText)({progress:a})}))}else e.appendChild(Object(j.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=x.ActionTypes.Operation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(j.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(f.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",r=Object(j.createElement)("p",{innerText:"Enter the amount of team members you would like to take on these operations. If you do not have the specified number of team members, then as many as possible will be used. Note that team members may be lost during operations."}),a=Object(j.createElement)("input",{type:"number",placeholder:"Team size",class:"text-input"}),i=Object(j.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var r=Math.round(parseFloat(a.value));return isNaN(r)?Object(_.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=r,this.updateOperationsUIElement(e,t)),Object(H.removeElementById)(n),!1}}),o=Object(j.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(H.removeElementById)(n),!1)});Object(F.createPopup)(n,[r,a,i,o])}}));var i=t.level>=t.maxLevel;Object(W.appendLineBreaks)(e,2),e.appendChild(Object(j.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(v.BladeburnerConstants.OperationSuccessesPerLevel)+" successes needed for next level"})),e.appendChild(Object(j.createElement)("a",{class:i?"a-link-button-inactive":"a-link-button",innerHTML:"↑",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the Operation":"",display:"inline",clickListener:()=>(++t.level,n&&this.startAction(this.action),this.updateOperationsUIElement(e,t),!1)})),e.appendChild(Object(j.createElement)("a",{class:t.level<=1?"a-link-button-inactive":"a-link-button",innerHTML:"↓",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the Operation":"",display:"inline",clickListener:()=>(--t.level,n&&this.startAction(this.action),this.updateOperationsUIElement(e,t),!1)}));t.getDifficulty();var o=t.getActionTime(this);Object(W.appendLineBreaks)(e,2),e.appendChild(Object(j.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\n"+`Estimated success chance: ${Object(f.formatNumber)(100*r,1)}% ${t.isStealth?G:""}${t.isKill?K:""}\n`+"Time Required(s): "+Object(f.formatNumber)(o,0)+"\nOperations remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(j.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(j.createElement)("label",{for:s,innerText:"Autolevel: ",color:"white",tooltip:"Automatically increase operation level when possible"}));const l=Object(j.createElement)("input",{type:"checkbox",id:s,checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},z.prototype.updateBlackOpsUIElement=function(e,t){Object(L.removeChildrenFromElement)(e);var n=e.classList.contains($),r=null!=this.blackops[t.name],a=t.getSuccessChance(this,{est:!0}),i=(t.getDifficulty(),t.getActionTime(this)),o=this.rank>=t.reqdRank;if(r)e.appendChild(Object(j.createElement)("h2",{innerText:t.name+" (COMPLETED)",display:"block"}));else{if(e.appendChild(Object(j.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(f.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(f.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var s=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(j.createElement)("p",{display:"block",innerText:Object(R.createProgressBarText)({progress:s})}))}else e.appendChild(Object(j.createElement)("a",{innerText:"Start",margin:"3px",padding:"3px",class:o?"a-link-button":"a-link-button-inactive",clickListener:()=>(this.action.type=x.ActionTypes.BlackOperation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(j.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(f.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",r=Object(j.createElement)("p",{innerText:"Enter the amount of team members you would like to take on this BlackOp. If you do not have the specified number of team members, then as many as possible will be used. Note that team members may be lost during operations."}),a=Object(j.createElement)("input",{type:"number",placeholder:"Team size",class:"text-input"}),i=Object(j.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var r=Math.round(parseFloat(a.value));return isNaN(r)?Object(_.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=r,this.updateBlackOpsUIElement(e,t)),Object(H.removeElementById)(n),!1}}),o=Object(j.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(H.removeElementById)(n),!1)});Object(F.createPopup)(n,[r,a,i,o])}}));Object(W.appendLineBreaks)(e,2),e.appendChild(Object(j.createElement)("p",{display:"inline-block",innerHTML:"
"+t.desc+"

"})),e.appendChild(Object(j.createElement)("p",{display:"block",color:o?"white":"red",innerHTML:"Required Rank: "+Object(f.formatNumber)(t.reqdRank,0)+"
"})),e.appendChild(Object(j.createElement)("p",{display:"inline-block",innerHTML:`Estimated Success Chance: ${Object(f.formatNumber)(100*a,1)}% ${t.isStealth?G:""}${t.isKill?K:""}\n`+"Time Required(s): "+Object(f.formatNumber)(i,0)}))}},z.prototype.updateSkillsUIElement=function(e,t){Object(L.removeChildrenFromElement)(e);var n=t.name,r=0;this.skills[n]&&!isNaN(this.skills[n])&&(r=this.skills[n]);var a=t.calculateCost(r);e.appendChild(Object(j.createElement)("h2",{innerText:t.name+" (Lvl "+r+")",display:"inline-block"}));var i=this.skillPoints>=a,o=!!t.maxLvl&&r>=t.maxLvl;e.appendChild(Object(j.createElement)("a",{innerText:"Level",display:"inline-block",class:i&&!o?"a-link-button":"a-link-button-inactive",margin:"3px",padding:"3px",clickListener:()=>{if(!(this.skillPoints100&&this.consoleLogs.shift()),null!=t&&null!=V.consoleDiv&&(e("#bladeubrner-console-input-row").before(''+t+""),V.consoleTable.childNodes.length>100&&V.consoleTable.removeChild(V.consoleTable.firstChild),this.updateConsoleScroll())},z.prototype.updateConsoleScroll=function(){V.consoleDiv.scrollTop=V.consoleDiv.scrollHeight},z.prototype.resetConsoleInput=function(){V.consoleInput.value=""},z.prototype.clearConsole=function(){for(;V.consoleTable.childNodes.length>1;)V.consoleTable.removeChild(V.consoleTable.firstChild);this.consoleLogs.length=0},z.prototype.log=function(e){this.postToConsole(`[${Object(I.getTimestamp)()}] ${e}`)},z.prototype.executeConsoleCommands=function(e){try{this.consoleHistory[this.consoleHistory.length-1]!=e&&(this.consoleHistory.push(e),this.consoleHistory.length>50&&this.consoleHistory.splice(0,1)),q=this.consoleHistory.length;const t=e.split(";");for(let e=0;e=c?(this.skillPoints-=c,this.upgradeSkill(r),this.log(r.name+" upgraded to Level "+this.skills[s]),this.createActionAndSkillsContent()):this.postToConsole("You do not have enough Skill Points to upgrade this. You need "+Object(f.formatNumber)(c,0))}else this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break;default:this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info")}},z.prototype.executeStartConsoleCommand=function(e){if(3!==e.length)return this.postToConsole("Invalid usage of 'start' console command: start [type] [name]"),void this.postToConsole("Use 'help start' for more info");var t=e[2];switch(e[1].toLowerCase()){case"general":case"gen":null!=M.GeneralActions[t]?(this.action.type=x.ActionTypes[t],this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid action name specified: "+e[2]);break;case"contract":case"contracts":null!=this.contracts[t]?(this.action.type=x.ActionTypes.Contract,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid contract name specified: "+e[2]);break;case"ops":case"op":case"operations":case"operation":null!=this.operations[t]?(this.action.type=x.ActionTypes.Operation,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid Operation name specified: "+e[2]);break;case"blackops":case"blackop":case"black operations":case"black operation":null!=S.BlackOperations[t]?(this.action.type=x.ActionTypes.BlackOperation,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid BlackOp name specified: "+e[2]);break;default:this.postToConsole("Invalid action/event type specified: "+e[1]),this.postToConsole("Examples of valid action/event identifiers are: [general, contract, op, blackop]")}},z.prototype.getActionIdFromTypeAndName=function(e="",t=""){if(""===e||""===t)return null;var n=new Y,r=e.toLowerCase().trim(),a=t.toLowerCase().trim();switch(r){case"contract":case"contracts":case"contr":return n.type=x.ActionTypes.Contract,this.contracts.hasOwnProperty(t)?(n.name=t,n):null;case"operation":case"operations":case"op":case"ops":return n.type=x.ActionTypes.Operation,this.operations.hasOwnProperty(t)?(n.name=t,n):null;case"blackoperation":case"black operation":case"black operations":case"black op":case"black ops":case"blackop":case"blackops":return n.type=x.ActionTypes.BlackOp,S.BlackOperations.hasOwnProperty(t)?(n.name=t,n):null;case"general":case"general action":case"gen":break;default:return null}if(r.startsWith("gen")){switch(a){case"training":n.type=x.ActionTypes.Training,n.name="Training";break;case"recruitment":case"recruit":n.type=x.ActionTypes.Recruitment,n.name="Recruitment";break;case"field analysis":case"fieldanalysis":n.type=x.ActionTypes["Field Analysis"],n.name="Field Analysis";break;case"diplomacy":n.type=x.ActionTypes.Diplomacy,n.name="Diplomacy";break;case"hyperbolic regeneration chamber":n.type=x.ActionTypes["Hyperbolic Regeneration Chamber"],n.name="Hyperbolic Regeneration Chamber";break;default:return null}return n}},z.prototype.getTypeAndNameFromActionId=function(e){var t={};let n=Object.keys(x.ActionTypes);for(let r=0;rthis.rank)return n.log("bladeburner.startAction",`Insufficient rank to start Black Op '${a.name}'.`),!1;if(null!=this.blackops[a.name])return n.log("bladeburner.startAction",`Black Op ${a.name} has already been completed.`),!1;var i=[];for(const e in S.BlackOperations)S.BlackOperations.hasOwnProperty(e)&&i.push(e);i.sort(function(e,t){return S.BlackOperations[e].reqdRank-S.BlackOperations[t].reqdRank});let e=i.indexOf(a.name);if(-1===e)return n.log("bladeburner.startAction",`Invalid Black Op: '${t}'`),!1;if(e>0&&null==this.blackops[i[e-1]])return n.log("bladeburner.startAction",`Preceding Black Op must be completed before starting '${a.name}'.`),!1}try{return this.startAction(a),n.log("bladeburner.startAction",`Starting bladeburner action with type '${e}' and name ${t}"`),!0}catch(e){return this.resetAction(),n.log("bladeburner.startAction",r),!1}},z.prototype.getActionTimeNetscriptFn=function(e,t,n){const r=`Invalid action: type='${e}' name='${t}'`,a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log("bladeburner.getActionTime",r),-1;const i=this.getActionObject(a);if(null==i)return n.log("bladeburner.getActionTime",r),-1;switch(a.type){case x.ActionTypes.Contract:case x.ActionTypes.Operation:case x.ActionTypes.BlackOp:case x.ActionTypes.BlackOperation:return i.getActionTime(this);case x.ActionTypes.Training:case x.ActionTypes["Field Analysis"]:case x.ActionTypes.FieldAnalysis:return 30;case x.ActionTypes.Recruitment:return this.getRecruitmentTime();default:return n.log("bladeburner.getActionTime",r),-1}},z.prototype.getActionEstimatedSuccessChanceNetscriptFn=function(e,t,n){const r=`Invalid action: type='${e}' name='${t}'`,a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log("bladeburner.getActionEstimatedSuccessChance",r),-1;const i=this.getActionObject(a);if(null==i)return n.log("bladeburner.getActionEstimatedSuccessChance",r),-1;switch(a.type){case x.ActionTypes.Contract:case x.ActionTypes.Operation:case x.ActionTypes.BlackOp:case x.ActionTypes.BlackOperation:return i.getSuccessChance(this,{est:!0});case x.ActionTypes.Training:case x.ActionTypes["Field Analysis"]:case x.ActionTypes.FieldAnalysis:return 1;case x.ActionTypes.Recruitment:return this.getRecruitmentSuccessChance();default:return n.log("bladeburner.getActionEstimatedSuccessChance",r),-1}},z.prototype.getActionCountRemainingNetscriptFn=function(e,t,n){const r=`Invalid action: type='${e}' name='${t}'`,a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log("bladeburner.getActionCountRemaining",r),-1;const i=this.getActionObject(a);if(null==i)return n.log("bladeburner.getActionCountRemaining",r),-1;switch(a.type){case x.ActionTypes.Contract:case x.ActionTypes.Operation:return Math.floor(i.count);case x.ActionTypes.BlackOp:case x.ActionTypes.BlackOperation:return null!=this.blackops[t]?0:1;case x.ActionTypes.Training:case x.ActionTypes["Field Analysis"]:case x.ActionTypes.FieldAnalysis:return 1/0;default:return n.log("bladeburner.getActionCountRemaining",r),-1}},z.prototype.getSkillLevelNetscriptFn=function(e,t){return""!==e&&C.Skills.hasOwnProperty(e)?null==this.skills[e]?0:this.skills[e]:(t.log("bladeburner.getSkillLevel",`Invalid skill: '${e}'`),-1)},z.prototype.getSkillUpgradeCostNetscriptFn=function(e,t){if(""===e||!C.Skills.hasOwnProperty(e))return t.log("bladeburner.getSkillUpgradeCost",`Invalid skill: '${e}'`),-1;const n=C.Skills[e];return null==this.skills[e]?n.calculateCost(0):n.calculateCost(this.skills[e])},z.prototype.upgradeSkillNetscriptFn=function(e,t){const n=`Invalid skill: '${e}'`;if(!C.Skills.hasOwnProperty(e))return t.log("bladeburner.upgradeSkill",n),!1;const r=C.Skills[e];let a=0;this.skills[e]&&!isNaN(this.skills[e])&&(a=this.skills[e]);const i=r.calculateCost(a);return r.maxLvl&&a>=r.maxLvl?(t.log("bladeburner.upgradeSkill",`Skill '${e}' is already maxed.`),!1):this.skillPoints=v.BladeburnerConstants.RankNeededForFaction?(Object(u.joinFaction)(t),e.log("bladeburner.joinBladeburnerFaction","Joined Bladeburners faction."),h.routing.isOn(h.Page.Bladeburner)&&(Object(L.removeChildrenFromElement)(V.overviewDiv),this.createOverviewContent()),!0):(e.log("bladeburner.joinBladeburnerFaction",`You do not have the required rank (${this.rank}/${v.BladeburnerConstants.RankNeededForFaction}).`),!1))},z.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Bladeburner",this)},z.fromJSON=function(e){return Object(g.Generic_fromJSON)(z,e.data)},g.Reviver.constructors.Bladeburner=z}).call(this,n(86))},function(e,t,n){"use strict";n.d(t,"c",function(){return O}),n.d(t,"f",function(){return M}),n.d(t,"e",function(){return P}),n.d(t,"d",function(){return k}),n.d(t,"a",function(){return T}),n.d(t,"b",function(){return S});var r=n(15),a=n(10),i=n(131),o=n(4),s=n(318),l=n(19),c=n(6),u=n(13),m=(n(59),n(0)),p=n(120),h=n(93),d=(n(119),n(106),n(116),n(53),n(17),n(11)),_=n(8),g=(n(212),n(16),n(7),n(111)),y=(n(3),n(48),n(44),n(1)),f=n.n(y),b=n(52),E=n.n(b);function v(e){var t=e.name;a.Augmentations[t]=e}function k(){for(var e in u.Factions)u.Factions.hasOwnProperty(e)&&(u.Factions[e].augmentations=[]);Object(g.clearObject)(a.Augmentations);const t=new r.Augmentation({name:o.AugmentationNames.HemoRecirculator,moneyCost:9e6,repCost:4e3,info:"A heart implant that greatly increases the body's ability to effectively use and pump blood.

This augmentation increases all of the player's combat stats by 8%.",strength_mult:1.08,defense_mult:1.08,agility_mult:1.08,dexterity_mult:1.08});t.addToFactions(["Tetrads","The Dark Army","The Syndicate"]),S(o.AugmentationNames.HemoRecirculator)&&delete a.Augmentations[o.AugmentationNames.HemoRecirculator],v(t);const n=new r.Augmentation({name:o.AugmentationNames.Targeting1,moneyCost:3e6,repCost:2e3,info:"This cranial implant is embedded within the player's inner ear structure and optic nerves. It regulates and enhances the user's balance and hand-eye coordination. It is also capable of augmenting reality by projecting digital information directly onto the retina. These enhancements allow the player to better lock-on and keep track of enemies.

This augmentation increases the player's dexterity by 10%.",dexterity_mult:1.1});n.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),S(o.AugmentationNames.Targeting1)&&delete a.Augmentations[o.AugmentationNames.Targeting1],v(n);const i=new r.Augmentation({name:o.AugmentationNames.Targeting2,moneyCost:85e5,repCost:3500,info:"This is an upgrade of the Augmented Targeting I cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination.

This augmentation increases the player's dexterity by 20%.",prereqs:[o.AugmentationNames.Targeting1],dexterity_mult:1.2});i.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),S(o.AugmentationNames.Targeting2)&&delete a.Augmentations[o.AugmentationNames.Targeting2],v(i);const s=new r.Augmentation({name:o.AugmentationNames.Targeting3,moneyCost:23e6,repCost:11e3,info:"This is an upgrade of the Augmented Targeting II cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination.

This augmentation increases the player's dexterity by 30%.",prereqs:[o.AugmentationNames.Targeting2],dexterity_mult:1.3});s.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),S(o.AugmentationNames.Targeting3)&&delete a.Augmentations[o.AugmentationNames.Targeting3],v(s);const p=new r.Augmentation({name:o.AugmentationNames.SyntheticHeart,moneyCost:575e6,repCost:3e5,info:"This advanced artificial heart, created from plasteel and graphene, is capable of pumping more blood at much higher efficiencies than a normal human heart.

This augmentation increases the player's agility and strength by 50%.",agility_mult:1.5,strength_mult:1.5});p.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati"]),S(o.AugmentationNames.SyntheticHeart)&&delete a.Augmentations[o.AugmentationNames.SyntheticHeart],v(p);const h=new r.Augmentation({name:o.AugmentationNames.SynfibrilMuscle,repCost:175e3,moneyCost:225e6,info:"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. Scientists have named these artificially enhanced units 'synfibrils'.

This augmentation increases the player's strength and defense by 30%.",strength_mult:1.3,defense_mult:1.3});h.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati","Blade Industries"]),S(o.AugmentationNames.SynfibrilMuscle)&&delete a.Augmentations[o.AugmentationNames.SynfibrilMuscle],v(h);const d=new r.Augmentation({name:o.AugmentationNames.CombatRib1,repCost:3e3,moneyCost:475e4,info:"The human body's ribs are replaced with artificial ribs that automatically and continuously release cognitive and performance-enhancing drugs into the bloodstream, improving the user's abilities in combat.

This augmentation increases the player's strength and defense by 10%.",strength_mult:1.1,defense_mult:1.1});d.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),S(o.AugmentationNames.CombatRib1)&&delete a.Augmentations[o.AugmentationNames.CombatRib1],v(d);const _=new r.Augmentation({name:o.AugmentationNames.CombatRib2,repCost:7500,moneyCost:13e6,info:"This is an upgrade to the Combat Rib I augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream.

This augmentation increases the player's strength and defense by 14%.",prereqs:[o.AugmentationNames.CombatRib1],strength_mult:1.14,defense_mult:1.14});_.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),S(o.AugmentationNames.CombatRib2)&&delete a.Augmentations[o.AugmentationNames.CombatRib2],v(_);const y=new r.Augmentation({name:o.AugmentationNames.CombatRib3,repCost:14e3,moneyCost:24e6,info:"This is an upgrade to the Combat Rib II augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream

.This augmentation increases the player's strength and defense by 18%.",prereqs:[o.AugmentationNames.CombatRib2],strength_mult:1.18,defense_mult:1.18});y.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),S(o.AugmentationNames.CombatRib3)&&delete a.Augmentations[o.AugmentationNames.CombatRib3],v(y);const f=new r.Augmentation({name:o.AugmentationNames.NanofiberWeave,repCost:15e3,moneyCost:25e6,info:"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning. This improves the skin's ability to regenerate itself and protect the body from external stresses and forces.

This augmentation increases the player's strength and defense by 20%.",strength_mult:1.2,defense_mult:1.2});f.addToFactions(["Tian Di Hui","The Syndicate","The Dark Army","Speakers for the Dead","Blade Industries","Fulcrum Secret Technologies","OmniTek Incorporated"]),S(o.AugmentationNames.NanofiberWeave)&&delete a.Augmentations[o.AugmentationNames.NanofiberWeave],v(f);const b=new r.Augmentation({name:o.AugmentationNames.SubdermalArmor,repCost:35e4,moneyCost:65e7,info:"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. The material is implanted underneath the skin, and is the most advanced form of defensive enhancement that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to mitigate damage from any fire-related or electrical traumas.

This augmentation increases the player's defense by 120%.",defense_mult:2.2});b.addToFactions(["The Syndicate","Fulcrum Secret Technologies","Illuminati","Daedalus","The Covenant"]),S(o.AugmentationNames.SubdermalArmor)&&delete a.Augmentations[o.AugmentationNames.SubdermalArmor],v(b);const E=new r.Augmentation({name:o.AugmentationNames.WiredReflexes,repCost:500,moneyCost:5e5,info:"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, supercharging the body's ability to send signals through neurons. This results in increased reflex speed.

This augmentation increases the player's agility and dexterity by 5%.",agility_mult:1.05,dexterity_mult:1.05});E.addToFactions(["Tian Di Hui","Slum Snakes","Sector-12","Volhaven","Aevum","Ishima","The Syndicate","The Dark Army","Speakers for the Dead"]),S(o.AugmentationNames.WiredReflexes)&&delete a.Augmentations[o.AugmentationNames.WiredReflexes],v(E);const k=new r.Augmentation({name:o.AugmentationNames.GrapheneBoneLacings,repCost:45e4,moneyCost:85e7,info:"A graphene-based material is grafted and fused into the user's bones, significantly increasing their density and tensile strength.

This augmentation increases the player's strength and defense by 70%.",strength_mult:1.7,defense_mult:1.7});k.addToFactions(["Fulcrum Secret Technologies","The Covenant"]),S(o.AugmentationNames.GrapheneBoneLacings)&&delete a.Augmentations[o.AugmentationNames.GrapheneBoneLacings],v(k);const T=new r.Augmentation({name:o.AugmentationNames.BionicSpine,repCost:18e3,moneyCost:25e6,info:"An artificial spine created from plasteel and carbon fibers that completely replaces the organic spine. Not only is the Bionic Spine physically stronger than a human spine, but it is also capable of digitally stimulating and regulating the neural signals that are sent and received by the spinal cord. This results in greatly improved senses and reaction speeds.

This augmentation increases all of the player's combat stats by 15%.",strength_mult:1.15,defense_mult:1.15,agility_mult:1.15,dexterity_mult:1.15});T.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),S(o.AugmentationNames.BionicSpine)&&delete a.Augmentations[o.AugmentationNames.BionicSpine],v(T);const P=new r.Augmentation({name:o.AugmentationNames.GrapheneBionicSpine,repCost:65e4,moneyCost:12e8,info:"An upgrade to the Bionic Spine augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.

This augmentation increases all of the player's combat stats by 60%.",prereqs:[o.AugmentationNames.BionicSpine],strength_mult:1.6,defense_mult:1.6,agility_mult:1.6,dexterity_mult:1.6});P.addToFactions(["Fulcrum Secret Technologies","ECorp"]),S(o.AugmentationNames.GrapheneBionicSpine)&&delete a.Augmentations[o.AugmentationNames.GrapheneBionicSpine],v(P);const O=new r.Augmentation({name:o.AugmentationNames.BionicLegs,repCost:6e4,moneyCost:75e6,info:"Cybernetic legs created from plasteel and carbon fibers that completely replace the user's organic legs.

This augmentation increases the player's agility by 60%.",agility_mult:1.6});O.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),S(o.AugmentationNames.BionicLegs)&&delete a.Augmentations[o.AugmentationNames.BionicLegs],v(O);const M=new r.Augmentation({name:o.AugmentationNames.GrapheneBionicLegs,repCost:3e5,moneyCost:9e8,info:"An upgrade to the Bionic Legs augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.

This augmentation increases the player's agility by 150%.",prereqs:[o.AugmentationNames.BionicLegs],agility_mult:2.5});M.addToFactions(["MegaCorp","ECorp","Fulcrum Secret Technologies"]),S(o.AugmentationNames.GrapheneBionicLegs)&&delete a.Augmentations[o.AugmentationNames.GrapheneBionicLegs],v(M);const x=new r.Augmentation({name:o.AugmentationNames.SpeechProcessor,repCost:3e3,moneyCost:1e7,info:"A cochlear implant with an embedded computer that analyzes incoming speech. The embedded computer processes characteristics of incoming speech, such as tone and inflection, to pick up on subtle cues and aid in social interactions.

This augmentation increases the player's charisma by 20%.",charisma_mult:1.2});x.addToFactions(["Tian Di Hui","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Silhouette"]),S(o.AugmentationNames.SpeechProcessor)&&delete a.Augmentations[o.AugmentationNames.SpeechProcessor],v(x);const w=new r.Augmentation({name:o.AugmentationNames.TITN41Injection,repCost:1e4,moneyCost:38e6,info:"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that control personality. The TITN-41 strain alters these genes so that the subject becomes more outgoing and socialable.

This augmentation increases the player's charisma and charisma experience gain rate by 15%.",charisma_mult:1.15,charisma_exp_mult:1.15});w.addToFactions(["Silhouette"]),S(o.AugmentationNames.TITN41Injection)&&delete a.Augmentations[o.AugmentationNames.TITN41Injection],v(w);const A=new r.Augmentation({name:o.AugmentationNames.EnhancedSocialInteractionImplant,repCost:15e4,moneyCost:275e6,info:"A cranial implant that greatly assists in the user's ability to analyze social situations and interactions. The system uses a wide variety of factors such as facial expression, body language, and the voice's tone/inflection to determine the best course of action during socialsituations. The implant also uses deep learning software to continuously learn new behaviorpatterns and how to best respond.

This augmentation increases the player's charisma and charisma experience gain rate by 60%.",charisma_mult:1.6,charisma_exp_mult:1.6});A.addToFactions(["Bachman & Associates","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma"]),S(o.AugmentationNames.EnhancedSocialInteractionImplant)&&delete a.Augmentations[o.AugmentationNames.EnhancedSocialInteractionImplant],v(A);const R=new r.Augmentation({name:o.AugmentationNames.BitWire,repCost:1500,moneyCost:2e6,info:"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing capabilities.

This augmentation increases the player's hacking skill by 5%.",hacking_mult:1.05});R.addToFactions(["CyberSec","NiteSec"]),S(o.AugmentationNames.BitWire)&&delete a.Augmentations[o.AugmentationNames.BitWire],v(R);const N=new r.Augmentation({name:o.AugmentationNames.ArtificialBioNeuralNetwork,repCost:11e4,moneyCost:6e8,info:"A network consisting of millions of nanoprocessors is embedded into the brain. The network is meant to mimick the way a biological brain solves a problem, which each nanoprocessor acting similar to the way a neuron would in a neural network. However, these nanoprocessors are programmed to perform computations much faster than organic neurons, allowing its user to solve much more complex problems at a much faster rate.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the amount of money the player's gains from hacking by 15%.
Increases the player's hacking skill by 12%.",hacking_speed_mult:1.03,hacking_money_mult:1.15,hacking_mult:1.12});N.addToFactions(["BitRunners","Fulcrum Secret Technologies"]),S(o.AugmentationNames.ArtificialBioNeuralNetwork)&&delete a.Augmentations[o.AugmentationNames.ArtificialBioNeuralNetwork],v(N);const D=new r.Augmentation({name:o.AugmentationNames.ArtificialSynapticPotentiation,repCost:2500,moneyCost:16e6,info:"The body is injected with a chemical that artificially induces synaptic potentiation, otherwise known as the strengthening of synapses. This results in a enhanced cognitive abilities.

This augmentation:
Increases the player's hacking speed by 2%
Increases the player's hacking chance by 5%.
Increases the player's hacking experience gain rate by 5%.",hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_exp_mult:1.05});D.addToFactions(["The Black Hand","NiteSec"]),S(o.AugmentationNames.ArtificialSynapticPotentiation)&&delete a.Augmentations[o.AugmentationNames.ArtificialSynapticPotentiation],v(D);const I=new r.Augmentation({name:o.AugmentationNames.EnhancedMyelinSheathing,repCost:4e4,moneyCost:275e6,info:"Electrical signals are used to induce a new, artificial form of myelinogensis in the human body. This process results in the proliferation of new, synthetic myelin sheaths in the nervous system. These myelin sheaths can propogate neuro-signals much faster than their organic counterparts, leading to greater processing speeds and better brain function.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the player's hacking skill by 8%.
Increases the player's hacking experience gain rate by 10%.",hacking_speed_mult:1.03,hacking_exp_mult:1.1,hacking_mult:1.08});I.addToFactions(["Fulcrum Secret Technologies","BitRunners","The Black Hand"]),S(o.AugmentationNames.EnhancedMyelinSheathing)&&delete a.Augmentations[o.AugmentationNames.EnhancedMyelinSheathing],v(I);const B=new r.Augmentation({name:o.AugmentationNames.SynapticEnhancement,repCost:800,moneyCost:15e5,info:"A small cranial implant that continuously uses weak electric signals to stimulate the brain and induce stronger synaptic activity. This improves the user's cognitive abilities.

This augmentation increases the player's hacking speed by 3%.",hacking_speed_mult:1.03});B.addToFactions(["CyberSec"]),S(o.AugmentationNames.SynapticEnhancement)&&delete a.Augmentations[o.AugmentationNames.SynapticEnhancement],v(B);const L=new r.Augmentation({name:o.AugmentationNames.NeuralRetentionEnhancement,repCost:8e3,moneyCost:5e7,info:"Chemical injections are used to permanently alter and strengthen the brain's neuronal circuits, strengthening its ability to retain information.

This augmentation increases the player's hacking experience gain rate by 25%.",hacking_exp_mult:1.25});L.addToFactions(["NiteSec"]),S(o.AugmentationNames.NeuralRetentionEnhancement)&&delete a.Augmentations[o.AugmentationNames.NeuralRetentionEnhancement],v(L);const W=new r.Augmentation({name:o.AugmentationNames.DataJack,repCost:45e3,moneyCost:9e7,info:"A brain implant that provides an interface for direct, wireless communication between a computer's main memory and the mind. This implant allows the user to not only access a computer's memory, but also alter and delete it.

This augmentation increases the amount of money the player gains from hacking by 25%.",hacking_money_mult:1.25});W.addToFactions(["BitRunners","The Black Hand","NiteSec","Chongqing","New Tokyo"]),S(o.AugmentationNames.DataJack)&&delete a.Augmentations[o.AugmentationNames.DataJack],v(W);const j=new r.Augmentation({name:o.AugmentationNames.ENM,repCost:6e3,moneyCost:5e7,info:"A thin device embedded inside the arm containing a wireless module capable of connecting to nearby networks. Once connected, the Netburner Module is capable of capturing and processing all of the traffic on that network. By itself, the Embedded Netburner Module does not do much, but a variety of very powerful upgrades can be installed that allow you to fully control the traffic on a network.

This augmentation increases the player's hacking skill by 8%.",hacking_mult:1.08});j.addToFactions(["BitRunners","The Black Hand","NiteSec","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),S(o.AugmentationNames.ENM)&&delete a.Augmentations[o.AugmentationNames.ENM],v(j);const F=new r.Augmentation({name:o.AugmentationNames.ENMCore,repCost:1e5,moneyCost:5e8,info:"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgrade allows the Embedded Netburner Module to generate its own data on a network.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the amount of money the player gains from hacking by 10%.
Increases the player's chance of successfully performing a hack by 3%.
Increases the player's hacking experience gain rate by 7%.
Increases the player's hacking skill by 7%.",prereqs:[o.AugmentationNames.ENM],hacking_speed_mult:1.03,hacking_money_mult:1.1,hacking_chance_mult:1.03,hacking_exp_mult:1.07,hacking_mult:1.07});F.addToFactions(["BitRunners","The Black Hand","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),S(o.AugmentationNames.ENMCore)&&delete a.Augmentations[o.AugmentationNames.ENMCore],v(F);const U=new r.Augmentation({name:o.AugmentationNames.ENMCoreV2,repCost:4e5,moneyCost:9e8,info:"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgraded firmware allows the Embedded Netburner Module to control the information on a network by re-routing traffic, spoofing IP addresses, or altering the data inside network packets.

This augmentation:
Increases the player's hacking speed by 5%.
Increases the amount of money the player gains from hacking by 30%.
Increases the player's chance of successfully performing a hack by 5%.
Increases the player's hacking experience gain rate by 15%.
Increases the player's hacking skill by 8%.",prereqs:[o.AugmentationNames.ENMCore],hacking_speed_mult:1.05,hacking_money_mult:1.3,hacking_chance_mult:1.05,hacking_exp_mult:1.15,hacking_mult:1.08});U.addToFactions(["BitRunners","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries","OmniTek Incorporated","KuaiGong International"]),S(o.AugmentationNames.ENMCoreV2)&&delete a.Augmentations[o.AugmentationNames.ENMCoreV2],v(U);const H=new r.Augmentation({name:o.AugmentationNames.ENMCoreV3,repCost:7e5,moneyCost:15e8,info:"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into any device on a network.

This augmentation:
Increases the player's hacking speed by 5%.
Increases the amount of money the player gains from hacking by 40%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking experience gain rate by 25%.
Increases the player's hacking skill by 10%.",prereqs:[o.AugmentationNames.ENMCoreV2],hacking_speed_mult:1.05,hacking_money_mult:1.4,hacking_chance_mult:1.1,hacking_exp_mult:1.25,hacking_mult:1.1});H.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),S(o.AugmentationNames.ENMCoreV3)&&delete a.Augmentations[o.AugmentationNames.ENMCoreV3],v(H);const G=new r.Augmentation({name:o.AugmentationNames.ENMAnalyzeEngine,repCost:25e4,moneyCost:12e8,info:"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster that vastly outperforms the Netburner Module's native single-core processor.

This augmentation increases the player's hacking speed by 10%.",prereqs:[o.AugmentationNames.ENM],hacking_speed_mult:1.1});G.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),S(o.AugmentationNames.ENMAnalyzeEngine)&&delete a.Augmentations[o.AugmentationNames.ENMAnalyzeEngine],v(G);const K=new r.Augmentation({name:o.AugmentationNames.ENMDMA,repCost:4e5,moneyCost:14e8,info:"This implant installs a Direct Memory Access (DMA) controller into the Embedded Netburner Module. This allows the Module to send and receive data directly to and from the main memory of devices on a network.

This augmentation:
Increases the amount of money the player gains from hacking by 40%.
Increases the player's chance of successfully performing a hack by 20%.",prereqs:[o.AugmentationNames.ENM],hacking_money_mult:1.4,hacking_chance_mult:1.2});K.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),S(o.AugmentationNames.ENMDMA)&&delete a.Augmentations[o.AugmentationNames.ENMDMA],v(K);const $=new r.Augmentation({name:o.AugmentationNames.Neuralstimulator,repCost:2e4,moneyCost:6e8,info:"A cranial implant that intelligently stimulates certain areas of the brain in order to improve cognitive functions.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking experience gain rate by 12%.",hacking_speed_mult:1.02,hacking_chance_mult:1.1,hacking_exp_mult:1.12});$.addToFactions(["The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Bachman & Associates","Clarke Incorporated","Four Sigma"]),S(o.AugmentationNames.Neuralstimulator)&&delete a.Augmentations[o.AugmentationNames.Neuralstimulator],v($);const q=new r.Augmentation({name:o.AugmentationNames.NeuralAccelerator,repCost:8e4,moneyCost:35e7,info:"A microprocessor that accelerates the processing speed of biological neural networks. This is a cranial implant that is embedded inside the brain.

This augmentation:
Increases the player's hacking skill by 10%.
Increases the player's hacking experience gain rate by 15%.
Increases the amount of money the player gains from hacking by 20%.",hacking_mult:1.1,hacking_exp_mult:1.15,hacking_money_mult:1.2});q.addToFactions(["BitRunners"]),S(o.AugmentationNames.NeuralAccelerator)&&delete a.Augmentations[o.AugmentationNames.NeuralAccelerator],v(q);const Y=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG1,repCost:4e3,moneyCost:14e6,info:"The first generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.

This augmentation:
Increases the player's hacking speed by 1%.
Increases the player's hacking skill by 5%.",hacking_speed_mult:1.01,hacking_mult:1.05});Y.addToFactions(["CyberSec"]),S(o.AugmentationNames.CranialSignalProcessorsG1)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG1],v(Y);const z=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG2,repCost:7500,moneyCost:25e6,info:"The second generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the player's chance of successfully performing a hack by 5%.
Increases the player's hacking skill by 7%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG1],hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_mult:1.07});z.addToFactions(["CyberSec","NiteSec"]),S(o.AugmentationNames.CranialSignalProcessorsG2)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG2],v(z);const V=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG3,repCost:2e4,moneyCost:11e7,info:"The third generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 15%.
Increases the player's hacking skill by 9%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG2],hacking_speed_mult:1.02,hacking_money_mult:1.15,hacking_mult:1.09});V.addToFactions(["NiteSec","The Black Hand","BitRunners"]),S(o.AugmentationNames.CranialSignalProcessorsG3)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG3],v(V);const J=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG4,repCost:5e4,moneyCost:22e7,info:"The fourth generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 20%.
Increases the amount of money the player can inject into servers using grow() by 25%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG3],hacking_speed_mult:1.02,hacking_money_mult:1.2,hacking_grow_mult:1.25});J.addToFactions(["The Black Hand","BitRunners"]),S(o.AugmentationNames.CranialSignalProcessorsG4)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG4],v(J);const X=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG5,repCost:1e5,moneyCost:45e7,info:"The fifth generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.

This augmentation:
Increases the player's hacking skill by 30%.
Increases the amount of money the player gains from hacking by 25%.
Increases the amount of money the player can inject into servers using grow() by 75%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG4],hacking_mult:1.3,hacking_money_mult:1.25,hacking_grow_mult:1.75});X.addToFactions(["BitRunners"]),S(o.AugmentationNames.CranialSignalProcessorsG5)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG5],v(X);const Q=new r.Augmentation({name:o.AugmentationNames.NeuronalDensification,repCost:75e3,moneyCost:275e6,info:"The brain is surgically re-engineered to have increased neuronal density by decreasing the neuron gap junction. Then, the body is genetically modified to enhance the production and capabilities of its neural stem cells.

This augmentation:
Increases the player's hacking skill by 15%.
Increases the player's hacking experience gain rate by 10%.
Increases the player's hacking speed by 3%.",hacking_mult:1.15,hacking_exp_mult:1.1,hacking_speed_mult:1.03});Q.addToFactions(["Clarke Incorporated"]),S(o.AugmentationNames.NeuronalDensification)&&delete a.Augmentations[o.AugmentationNames.NeuronalDensification],v(Q);const Z=new r.Augmentation({name:o.AugmentationNames.NuoptimalInjectorImplant,repCost:2e3,moneyCost:4e6,info:"This torso implant automatically injects nootropic supplements into the bloodstream to improve memory, increase focus, and provide other cognitive enhancements.

This augmentation increases the amount of reputation the player gains when working for a company by 20%.",company_rep_mult:1.2});Z.addToFactions(["Tian Di Hui","Volhaven","New Tokyo","Chongqing","Ishima","Clarke Incorporated","Four Sigma","Bachman & Associates"]),S(o.AugmentationNames.NuoptimalInjectorImplant)&&delete a.Augmentations[o.AugmentationNames.NuoptimalInjectorImplant],v(Z);const ee=new r.Augmentation({name:o.AugmentationNames.SpeechEnhancement,repCost:1e3,moneyCost:25e5,info:"An advanced neural implant that improves your speaking abilities, making you more convincing and likable in conversations and overall improving your social interactions.

This augmentation:
Increases the player's charisma by 10%.
Increases the amount of reputation the player gains when working for a company by 10%.",company_rep_mult:1.1,charisma_mult:1.1});ee.addToFactions(["Tian Di Hui","Speakers for the Dead","Four Sigma","KuaiGong International","Clarke Incorporated","Bachman & Associates"]),S(o.AugmentationNames.SpeechEnhancement)&&delete a.Augmentations[o.AugmentationNames.SpeechEnhancement],v(ee);const te=new r.Augmentation({name:o.AugmentationNames.FocusWire,repCost:3e4,moneyCost:18e7,info:"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.

This augmentation:
Increases all experience gains by 5%.
Increases the amount of money the player gains from working by 20%.
Increases the amount of reputation the player gains when working for a company by 10%.",hacking_exp_mult:1.05,strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,charisma_exp_mult:1.05,company_rep_mult:1.1,work_money_mult:1.2});te.addToFactions(["Bachman & Associates","Clarke Incorporated","Four Sigma","KuaiGong International"]),S(o.AugmentationNames.FocusWire)&&delete a.Augmentations[o.AugmentationNames.FocusWire],v(te);const ne=new r.Augmentation({name:o.AugmentationNames.PCDNI,repCost:15e4,moneyCost:75e7,info:"Installs a Direct-Neural Interface jack into your arm that is compatible with most computers. Connecting to a computer through this jack allows you to interface with it using the brain's electrochemical signals.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 30%.
Increases the player's hacking skill by 8%.",company_rep_mult:1.3,hacking_mult:1.08});ne.addToFactions(["Four Sigma","OmniTek Incorporated","ECorp","Blade Industries"]),S(o.AugmentationNames.PCDNI)&&delete a.Augmentations[o.AugmentationNames.PCDNI],v(ne);const re=new r.Augmentation({name:o.AugmentationNames.PCDNIOptimizer,repCost:2e5,moneyCost:9e8,info:"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It improves the performance of the interface and gives the user more control options to the connected computer.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 75%.
Increases the player's hacking skill by 10%.",prereqs:[o.AugmentationNames.PCDNI],company_rep_mult:1.75,hacking_mult:1.1});re.addToFactions(["Fulcrum Secret Technologies","ECorp","Blade Industries"]),S(o.AugmentationNames.PCDNIOptimizer)&&delete a.Augmentations[o.AugmentationNames.PCDNIOptimizer],v(re);const ae=new r.Augmentation({name:o.AugmentationNames.PCDNINeuralNetwork,repCost:6e5,moneyCost:15e8,info:"This is an additional installation that upgrades the functionality of the PC Direct-Neural Interface augmentation. When connected to a computer, The NeuroNet Injector upgrade allows the user to use his/her own brain's processing power to aid the computer in computational tasks.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 100%.
Increases the player's hacking skill by 10%.
Increases the player's hacking speed by 5%.",prereqs:[o.AugmentationNames.PCDNI],company_rep_mult:2,hacking_mult:1.1,hacking_speed_mult:1.05});ae.addToFactions(["Fulcrum Secret Technologies"]),S(o.AugmentationNames.PCDNINeuralNetwork)&&delete a.Augmentations[o.AugmentationNames.PCDNINeuralNetwork],v(ae);const ie=new r.Augmentation({name:o.AugmentationNames.ADRPheromone1,repCost:1500,moneyCost:35e5,info:"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, triggers feelings of admiration and approval in other people.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 10%
Increases the amount of reputation the player gains for a faction by 10%.",company_rep_mult:1.1,faction_rep_mult:1.1});ie.addToFactions(["Tian Di Hui","The Syndicate","NWO","MegaCorp","Four Sigma"]),S(o.AugmentationNames.ADRPheromone1)&&delete a.Augmentations[o.AugmentationNames.ADRPheromone1],v(ie);const oe=new r.Augmentation({name:o.AugmentationNames.ADRPheromone2,repCost:25e3,moneyCost:11e7,info:"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, which is similar to but more potent than ADR-V1. This pheromone, when excreted, triggers feelings of admiration, approval, and respect in others.

This augmentation:
Increases the amount of reputation the player gains for a faction and company by 20%.",company_rep_mult:1.2,faction_rep_mult:1.2});oe.addToFactions(["Silhouette","Four Sigma","Bachman & Associates","Clarke Incorporated"]),S(o.AugmentationNames.ADRPheromone2)&&delete a.Augmentations[o.AugmentationNames.ADRPheromone2],v(oe);const se=new r.Augmentation({name:o.AugmentationNames.ShadowsSimulacrum,repCost:15e3,moneyCost:8e7,info:"A crude but functional matter phase-shifter module that is embedded in the brainstem and cerebellum. This augmentation was developed by criminal organizations and allows the user to project and control holographic simulacrums within a large radius. These simulacrums are commonly used for espionage and surveillance work.

This augmentation:
Increases the amount of reputation the player gains when working for a faction or company by 15%.",company_rep_mult:1.15,faction_rep_mult:1.15});se.addToFactions(["The Syndicate","The Dark Army","Speakers for the Dead"]),S(o.AugmentationNames.ShadowsSimulacrum)&&delete a.Augmentations[o.AugmentationNames.ShadowsSimulacrum],v(se);const le=new r.Augmentation({name:o.AugmentationNames.HacknetNodeCPUUpload,repCost:1500,moneyCost:22e5,info:"Uploads the architecture and design details of a Hacknet Node's CPU into the brain. This allows the user to engineer custom hardware and software for the Hacknet Node that provides better performance.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 15%.
Decreases the cost of purchasing a Hacknet Node by 15%.",hacknet_node_money_mult:1.15,hacknet_node_purchase_cost_mult:.85});le.addToFactions(["Netburners"]),S(o.AugmentationNames.HacknetNodeCPUUpload)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeCPUUpload],v(le);const ce=new r.Augmentation({name:o.AugmentationNames.HacknetNodeCacheUpload,repCost:1e3,moneyCost:11e5,info:"Uploads the architecture and design details of a Hacknet Node's main-memory cache into the brain. This allows the user to engineer custom cache hardware for the Hacknet Node that offers better performance.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 10%.
Decreases the cost of leveling up a Hacknet Node by 15%.",hacknet_node_money_mult:1.1,hacknet_node_level_cost_mult:.85});ce.addToFactions(["Netburners"]),S(o.AugmentationNames.HacknetNodeCacheUpload)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeCacheUpload],v(ce);const ue=new r.Augmentation({name:o.AugmentationNames.HacknetNodeNICUpload,repCost:750,moneyCost:9e5,info:"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that offers better performance.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 10%.
Decreases the cost of purchasing a Hacknet Node by 10%.",hacknet_node_money_mult:1.1,hacknet_node_purchase_cost_mult:.9});ue.addToFactions(["Netburners"]),S(o.AugmentationNames.HacknetNodeNICUpload)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeNICUpload],v(ue);const me=new r.Augmentation({name:o.AugmentationNames.HacknetNodeKernelDNI,repCost:3e3,moneyCost:8e6,info:"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a Hacknet Node. This lets the user access and manipulate the Node's kernel using the mind's electrochemical signals.

This augmentation increases the amount of money produced by Hacknet Nodes by 25%.",hacknet_node_money_mult:1.25});me.addToFactions(["Netburners"]),S(o.AugmentationNames.HacknetNodeKernelDNI)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeKernelDNI],v(me);const pe=new r.Augmentation({name:o.AugmentationNames.HacknetNodeCoreDNI,repCost:5e3,moneyCost:12e6,info:"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using the mind's electrochemical signals.

This augmentation increases the amount of money produced by Hacknet Nodes by 45%.",hacknet_node_money_mult:1.45});pe.addToFactions(["Netburners"]),S(o.AugmentationNames.HacknetNodeCoreDNI)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeCoreDNI],v(pe);const he=new r.Augmentation({name:o.AugmentationNames.NeuroFluxGovernor,repCost:500,moneyCost:75e4,info:"A device that is embedded in the back of the neck. The NeuroFlux Governor monitors and regulates nervous impulses coming to and from the spinal column, essentially 'governing' the body. By doing so, it improves the functionality of the body's nervous system.

This is a special augmentation because it can be leveled up infinitely. Each level of this augmentation increases ALL of the player's multipliers by 1%.",hacking_chance_mult:1.01,hacking_speed_mult:1.01,hacking_money_mult:1.01,hacking_grow_mult:1.01,hacking_mult:1.01,strength_mult:1.01,defense_mult:1.01,dexterity_mult:1.01,agility_mult:1.01,charisma_mult:1.01,hacking_exp_mult:1.01,strength_exp_mult:1.01,defense_exp_mult:1.01,dexterity_exp_mult:1.01,agility_exp_mult:1.01,charisma_exp_mult:1.01,company_rep_mult:1.01,faction_rep_mult:1.01,crime_money_mult:1.01,crime_success_mult:1.01,hacknet_node_money_mult:1.01,hacknet_node_purchase_cost_mult:.99,hacknet_node_ram_cost_mult:.99,hacknet_node_core_cost_mult:.99,hacknet_node_level_cost_mult:.99,work_money_mult:1.01});let de=0;for(let e=0;e
This augmentation increases the player's experience gain rate for all stats by 10%.",hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1});ye.addToFactions(["CyberSec"]),S(o.AugmentationNames.Neurotrainer1)&&delete a.Augmentations[o.AugmentationNames.Neurotrainer1],v(ye);const fe=new r.Augmentation({name:o.AugmentationNames.Neurotrainer2,repCost:4e3,moneyCost:9e6,info:"A decentralized cranial implant that improves the brain's ability to learn. This is a more powerful version of the Neurotrainer I augmentation, but it does not require Neurotrainer I to be installed as a prerequisite.

This augmentation increases the player's experience gain rate for all stats by 15%.",hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15});fe.addToFactions(["BitRunners","NiteSec"]),S(o.AugmentationNames.Neurotrainer2)&&delete a.Augmentations[o.AugmentationNames.Neurotrainer2],v(fe);const be=new r.Augmentation({name:o.AugmentationNames.Neurotrainer3,repCost:1e4,moneyCost:26e6,info:"A decentralized cranial implant that improves the brain's ability to learn. This is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, but it does not require either of them to be installed as a prerequisite.

This augmentation increases the player's experience gain rate for all stats by 20%.",hacking_exp_mult:1.2,strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2,charisma_exp_mult:1.2});be.addToFactions(["NWO","Four Sigma"]),S(o.AugmentationNames.Neurotrainer3)&&delete a.Augmentations[o.AugmentationNames.Neurotrainer3],v(be);const Ee=new r.Augmentation({name:o.AugmentationNames.Hypersight,repCost:6e4,moneyCost:55e7,info:"A bionic eye implant that grants sight capabilities far beyond those of a natural human. Embedded circuitry within the implant provides the ability to detect heat and movement through solid objects such as wells, thus providing 'x-ray vision'-like capabilities.

This augmentation:
Increases the player's dexterity by 40%.
Increases the player's hacking speed by 3%.
Increases the amount of money the player gains from hacking by 10%.",dexterity_mult:1.4,hacking_speed_mult:1.03,hacking_money_mult:1.1});Ee.addToFactions(["Blade Industries","KuaiGong International"]),S(o.AugmentationNames.Hypersight)&&delete a.Augmentations[o.AugmentationNames.Hypersight],v(Ee);const ve=new r.Augmentation({name:o.AugmentationNames.LuminCloaking1,repCost:600,moneyCost:1e6,info:"A skin implant that reinforces the skin with highly-advanced synthetic cells. These cells, when powered, have a negative refractive index. As a result, they bend light around the skin, making the user much harder to see from the naked eye.

This augmentation:
Increases the player's agility by 5%
Increases the amount of money the player gains from crimes by 10%.",agility_mult:1.05,crime_money_mult:1.1});ve.addToFactions(["Slum Snakes","Tetrads"]),S(o.AugmentationNames.LuminCloaking1)&&delete a.Augmentations[o.AugmentationNames.LuminCloaking1],v(ve);const ke=new r.Augmentation({name:o.AugmentationNames.LuminCloaking2,repCost:2e3,moneyCost:6e6,info:"This is a more advanced version of the LuminCloaking-V2 augmentation. This skin implant reinforces the skin with highly-advanced synthetic cells. These cells, when powered, are capable of not only bending light but also of bending heat, making the user more resilient as well as stealthy.

This augmentation:
Increases the player's agility by 10%
Increases the player's defense by 10%
Increases the amount of money the player gains from crimes by 25%.",prereqs:[o.AugmentationNames.LuminCloaking1],agility_mult:1.1,defense_mult:1.1,crime_money_mult:1.25});ke.addToFactions(["Slum Snakes","Tetrads"]),S(o.AugmentationNames.LuminCloaking2)&&delete a.Augmentations[o.AugmentationNames.LuminCloaking2],v(ke);const Ce=new r.Augmentation({name:o.AugmentationNames.SmartSonar,repCost:9e3,moneyCost:15e6,info:"A cochlear implant that helps the player detect and locate enemies using sound propagation.

This augmentation:
Increases the player's dexterity by 10%.
Increases the player's dexterity experience gain rate by 15%.
Increases the amount of money the player gains from crimes by 25%.",dexterity_mult:1.1,dexterity_exp_mult:1.15,crime_money_mult:1.25});Ce.addToFactions(["Slum Snakes"]),S(o.AugmentationNames.SmartSonar)&&delete a.Augmentations[o.AugmentationNames.SmartSonar],v(Ce);const Te=new r.Augmentation({name:o.AugmentationNames.PowerRecirculator,repCost:1e4,moneyCost:36e6,info:"The body's nerves are attached with polypyrrole nanocircuits that are capable of capturing wasted energy (in the form of heat) and converting it back into usable power.

This augmentation:
Increases all of the player's stats by 5%.
Increases the player's experience gain rate for all stats by 10%.",hacking_mult:1.05,strength_mult:1.05,defense_mult:1.05,dexterity_mult:1.05,agility_mult:1.05,charisma_mult:1.05,hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1});Te.addToFactions(["Tetrads","The Dark Army","The Syndicate","NWO"]),S(o.AugmentationNames.PowerRecirculator)&&delete a.Augmentations[o.AugmentationNames.PowerRecirculator],v(Te);const Pe=new r.Augmentation({name:o.AugmentationNames.QLink,repCost:75e4,moneyCost:5e12,info:"A brain implant that wirelessly connects you to the Illuminati's quantum supercomputer, allowing you to access and use its incredible computing power.

This augmentation:
Increases the player's hacking skill by 75%.
Increases the player's hacking speed by 100%.
Increases the player's chance of successfully performing a hack by 150%.
Increases the amount of money the player gains from hacking by 300%.",hacking_mult:1.75,hacking_speed_mult:2,hacking_chance_mult:2.5,hacking_money_mult:4});Pe.addToFactions(["Illuminati"]),S(o.AugmentationNames.QLink)&&delete a.Augmentations[o.AugmentationNames.QLink],v(Pe);const Se=new r.Augmentation({name:o.AugmentationNames.TheRedPill,repCost:1e6,moneyCost:0,info:"It's time to leave the cave."});Se.addToFactions(["Daedalus"]),S(o.AugmentationNames.TheRedPill)&&delete a.Augmentations[o.AugmentationNames.TheRedPill],v(Se);const Oe=new r.Augmentation({name:o.AugmentationNames.SPTN97,repCost:5e5,moneyCost:975e6,info:"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an artificially-synthesized gene that was developed by DARPA to create super-soldiers through genetic modification. The gene was outlawed in 2056.

This augmentation:
Increases all of the player's combat stats by 75%.
Increases the player's hacking skill by 15%.",strength_mult:1.75,defense_mult:1.75,dexterity_mult:1.75,agility_mult:1.75,hacking_mult:1.15});Oe.addToFactions(["The Covenant"]),S(o.AugmentationNames.SPTN97)&&delete a.Augmentations[o.AugmentationNames.SPTN97],v(Oe);const Me=new r.Augmentation({name:o.AugmentationNames.HiveMind,repCost:6e5,moneyCost:11e8,info:"A brain implant developed by ECorp. They do not reveal what exactly the implant does, but they promise that it will greatly enhance your abilities.",hacking_grow_mult:3});Me.addToFactions(["ECorp"]),S(o.AugmentationNames.HiveMind)&&delete a.Augmentations[o.AugmentationNames.HiveMind],v(Me);const xe=new r.Augmentation({name:o.AugmentationNames.CordiARCReactor,repCost:45e4,moneyCost:1e9,info:"The thoracic cavity is equipped with a small chamber designed to hold and sustain hydrogen plasma. The plasma is used to generate fusion power through nuclear fusion, providing limitless amount of clean energy for the body.

This augmentation:
Increases all of the player's combat stats by 35%.
Increases all of the player's combat stat experience gain rate by 35%.",strength_mult:1.35,defense_mult:1.35,dexterity_mult:1.35,agility_mult:1.35,strength_exp_mult:1.35,defense_exp_mult:1.35,dexterity_exp_mult:1.35,agility_exp_mult:1.35});xe.addToFactions(["MegaCorp"]),S(o.AugmentationNames.CordiARCReactor)&&delete a.Augmentations[o.AugmentationNames.CordiARCReactor],v(xe);const we=new r.Augmentation({name:o.AugmentationNames.SmartJaw,repCost:15e4,moneyCost:55e7,info:"A bionic jaw that contains advanced hardware and software capable of psychoanalyzing and profiling the personality of others using optical imaging software.

This augmentation:
Increases the player's charisma by 50%.
Increases the player's charisma experience gain rate by 50%.
Increases the amount of reputation the player gains for a company by 25%.
Increases the amount of reputation the player gains for a faction by 25%.",charisma_mult:1.5,charisma_exp_mult:1.5,company_rep_mult:1.25,faction_rep_mult:1.25});we.addToFactions(["Bachman & Associates"]),S(o.AugmentationNames.SmartJaw)&&delete a.Augmentations[o.AugmentationNames.SmartJaw],v(we);const Ae=new r.Augmentation({name:o.AugmentationNames.Neotra,repCost:225e3,moneyCost:575e6,info:"A highly-advanced techno-organic drug that is injected into the skeletal and integumentary system. The drug permanently modifies the DNA of the body's skin and bone cells, granting them the ability to repair and restructure themselves.

This augmentation increases the player's strength and defense by 55%.",strength_mult:1.55,defense_mult:1.55});Ae.addToFactions(["Blade Industries"]),S(o.AugmentationNames.Neotra)&&delete a.Augmentations[o.AugmentationNames.Neotra],v(Ae);const Re=new r.Augmentation({name:o.AugmentationNames.Xanipher,repCost:35e4,moneyCost:85e7,info:"A concoction of advanced nanobots that is orally ingested into the body. These nanobots induce physiological change and significantly improve the body's functionining in all aspects.

This augmentation:
Increases all of the player's stats by 20%.
Increases the player's experience gain rate for all stats by 15%.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2,hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15});Re.addToFactions(["NWO"]),S(o.AugmentationNames.Xanipher)&&delete a.Augmentations[o.AugmentationNames.Xanipher],v(Re);const Ne=new r.Augmentation({name:o.AugmentationNames.nextSENS,repCost:175e3,moneyCost:385e6,info:"The body is genetically re-engineered to maintain a state of negligible senescence, preventing the body from deteriorating with age.

This augmentation increases all of the player's stats by 20%.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2});Ne.addToFactions(["Clarke Incorporated"]),S(o.AugmentationNames.nextSENS)&&delete a.Augmentations[o.AugmentationNames.nextSENS],v(Ne);const De=new r.Augmentation({name:o.AugmentationNames.OmniTekInfoLoad,repCost:25e4,moneyCost:575e6,info:"OmniTek's data and information repository is uploaded into your brain, enhancing your programming and hacking abilities.

This augmentation:
Increases the player's hacking skill by 20%.
Increases the player's hacking experience gain rate by 25%.",hacking_mult:1.2,hacking_exp_mult:1.25});De.addToFactions(["OmniTek Incorporated"]),S(o.AugmentationNames.OmniTekInfoLoad)&&delete a.Augmentations[o.AugmentationNames.OmniTekInfoLoad],v(De);const Ie=new r.Augmentation({name:o.AugmentationNames.PhotosyntheticCells,repCost:225e3,moneyCost:55e7,info:"Chloroplasts are added to epidermal stem cells and are applied to the body using a skin graft. The result is photosynthetic skin cells, allowing users to generate their own energy and nutrition using solar power.

This augmentation increases the player's strength, defense, and agility by 40%.",strength_mult:1.4,defense_mult:1.4,agility_mult:1.4});Ie.addToFactions(["KuaiGong International"]),S(o.AugmentationNames.PhotosyntheticCells)&&delete a.Augmentations[o.AugmentationNames.PhotosyntheticCells],v(Ie);const Be=new r.Augmentation({name:o.AugmentationNames.Neurolink,repCost:35e4,moneyCost:875e6,info:"A brain implant that provides a high-bandwidth, direct neural link between your mind and BitRunners' data servers, which reportedly contain the largest database of hacking tools and information in the world.

This augmentation:
Increases the player's hacking skill by 15%.
Increases the player's hacking experience gain rate by 20%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking speed by 5%.
Lets the player start with the FTPCrack.exe and relaySMTP.exe programs after a reset.",hacking_mult:1.15,hacking_exp_mult:1.2,hacking_chance_mult:1.1,hacking_speed_mult:1.05});Be.addToFactions(["BitRunners"]),S(o.AugmentationNames.Neurolink)&&delete a.Augmentations[o.AugmentationNames.Neurolink],v(Be);const Le=new r.Augmentation({name:o.AugmentationNames.TheBlackHand,repCost:4e4,moneyCost:11e7,info:"A highly advanced bionic hand. This prosthetic not only enhances strength and dexterity but it is also embedded with hardware and firmware that lets the user connect to, access and hack devices and machines just by touching them.

This augmentation:
Increases the player's strength and dexterity by 15%.
Increases the player's hacking skill by 10%.
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 10%.",strength_mult:1.15,dexterity_mult:1.15,hacking_mult:1.1,hacking_speed_mult:1.02,hacking_money_mult:1.1});Le.addToFactions(["The Black Hand"]),S(o.AugmentationNames.TheBlackHand)&&delete a.Augmentations[o.AugmentationNames.TheBlackHand],v(Le);const We=new r.Augmentation({name:o.AugmentationNames.CRTX42AA,repCost:18e3,moneyCost:45e6,info:"The CRTX42-AA gene is injected into the genome. The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal cortex and improves cognitive abilities.

This augmentation:
Improves the player's hacking skill by 8%.
Improves the player's hacking experience gain rate by 15%.",hacking_mult:1.08,hacking_exp_mult:1.15});We.addToFactions(["NiteSec"]),S(o.AugmentationNames.CRTX42AA)&&delete a.Augmentations[o.AugmentationNames.CRTX42AA],v(We);const je=new r.Augmentation({name:o.AugmentationNames.Neuregen,repCost:15e3,moneyCost:75e6,info:"A drug that genetically modifies the neurons in the brain. The result is that these neurons never die and continuously regenerate and strengthen themselves.

This augmentation increases the player's hacking experience gain rate by 40%.",hacking_exp_mult:1.4});je.addToFactions(["Chongqing"]),S(o.AugmentationNames.Neuregen)&&delete a.Augmentations[o.AugmentationNames.Neuregen],v(je);const Fe=new r.Augmentation({name:o.AugmentationNames.CashRoot,repCost:5e3,moneyCost:25e6,info:"A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the chip allows you to connect it to a computer and upload the assets.

This augmentation:
Lets the player start with $1,000,000 after a reset.
Lets the player start with the BruteSSH.exe program after a reset."});Fe.addToFactions(["Sector-12"]),S(o.AugmentationNames.CashRoot)&&delete a.Augmentations[o.AugmentationNames.CashRoot],v(Fe);const Ue=new r.Augmentation({name:o.AugmentationNames.NutriGen,repCost:2500,moneyCost:5e5,info:"A thermo-powered artificial nutrition generator. Endogenously synthesizes glucose, amino acids, and vitamins and redistributes them across the body. The device is powered by the body's naturally wasted energy in the form of heat.

This augmentation:
Increases the player's experience gain rate for all combat stats by 20%.",strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2});Ue.addToFactions(["New Tokyo"]),S(o.AugmentationNames.NutriGen)&&delete a.Augmentations[o.AugmentationNames.NutriGen],v(Ue);const He=new r.Augmentation({name:o.AugmentationNames.INFRARet,repCost:3e3,moneyCost:6e6,info:"A retina implant consisting of a tiny chip that sits behind the retina. This implant lets people visually detect infrared radiation.

This augmentation:
Increases the player's crime success rate by 25%.
Increases the amount of money the player gains from crimes by 10%.
Increases the player's dexterity by 10%.",crime_success_mult:1.25,crime_money_mult:1.1,dexterity_mult:1.1});He.addToFactions(["Ishima"]),S(o.AugmentationNames.INFRARet)&&delete a.Augmentations[o.AugmentationNames.INFRARet],v(He);const Ge=new r.Augmentation({name:o.AugmentationNames.DermaForce,repCost:6e3,moneyCost:1e7,info:"A synthetic skin is grafted onto the body. The skin consists of millions of nanobots capable of projecting high-density muon beams, creating an energy barrier around the user.

This augmentation increases the player's defense by 40%.",defense_mult:1.4});Ge.addToFactions(["Volhaven"]),S(o.AugmentationNames.DermaForce)&&delete a.Augmentations[o.AugmentationNames.DermaForce],v(Ge);const Ke=new r.Augmentation({name:o.AugmentationNames.GrapheneBrachiBlades,repCost:9e4,moneyCost:5e8,info:"An upgrade to the BrachiBlades augmentation. It infuses the retractable blades with an advanced graphene material to make them much stronger and lighter.

This augmentation:
Increases the player's strength and defense by 40%.
Increases the player's crime success rate by 10%.
Increases the amount of money the player gains from crimes by 30%.",prereqs:[o.AugmentationNames.BrachiBlades],strength_mult:1.4,defense_mult:1.4,crime_success_mult:1.1,crime_money_mult:1.3});Ke.addToFactions(["Speakers for the Dead"]),S(o.AugmentationNames.GrapheneBrachiBlades)&&delete a.Augmentations[o.AugmentationNames.GrapheneBrachiBlades],v(Ke);const $e=new r.Augmentation({name:o.AugmentationNames.GrapheneBionicArms,repCost:2e5,moneyCost:75e7,info:"An upgrade to the Bionic Arms augmentation. It infuses the prosthetic arms with an advanced graphene material to make them much stronger and lighter.

This augmentation increases the player's strength and dexterity by 85%.",prereqs:[o.AugmentationNames.BionicArms],strength_mult:1.85,dexterity_mult:1.85});$e.addToFactions(["The Dark Army"]),S(o.AugmentationNames.GrapheneBionicArms)&&delete a.Augmentations[o.AugmentationNames.GrapheneBionicArms],v($e);const qe=new r.Augmentation({name:o.AugmentationNames.BrachiBlades,repCost:5e3,moneyCost:18e6,info:"A set of retractable plasteel blades are implanted in the arm, underneath the skin.

This augmentation:
Increases the player's strength and defense by 15%.
Increases the player's crime success rate by 10%.
Increases the amount of money the player gains from crimes by 15%.",strength_mult:1.15,defense_mult:1.15,crime_success_mult:1.1,crime_money_mult:1.15});qe.addToFactions(["The Syndicate"]),S(o.AugmentationNames.BrachiBlades)&&delete a.Augmentations[o.AugmentationNames.BrachiBlades],v(qe);const Ye=new r.Augmentation({name:o.AugmentationNames.BionicArms,repCost:25e3,moneyCost:55e6,info:"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.

This augmentation increases the user's strength and dexterity by 30%.",strength_mult:1.3,dexterity_mult:1.3});Ye.addToFactions(["Tetrads"]),S(o.AugmentationNames.BionicArms)&&delete a.Augmentations[o.AugmentationNames.BionicArms],v(Ye);const ze=new r.Augmentation({name:o.AugmentationNames.SNA,repCost:2500,moneyCost:6e6,info:"A cranial implant that affects the user's personality, making them better at negotiation in social situations.

This augmentation:
Increases the amount of money the player earns at a company by 10%.
Increases the amount of reputation the player gains when working for a company or faction by 15%.",work_money_mult:1.1,company_rep_mult:1.15,faction_rep_mult:1.15});ze.addToFactions(["Tian Di Hui"]),S(o.AugmentationNames.SNA)&&delete a.Augmentations[o.AugmentationNames.SNA],v(ze);if(Object(u.factionExists)("Bladeburners")){const e=new r.Augmentation({name:o.AugmentationNames.EsperEyewear,repCost:500,moneyCost:33e6,info:"Ballistic-grade protective and retractable eyewear that was designed specially for Bladeburner units. This is implanted by installing a mechanical frame in the skull's orbit. This frame interfaces with the brain and allows the user to automatically extrude and extract the eyewear. The eyewear protects against debris, shrapnel, laser, flash, and gas. It is also embedded with a data processing chip that can be programmed to display an AR HUD and assist the user in field missions.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 3%.
Increases the player's dexterity by 5%.",bladeburner_success_chance_mult:1.03,dexterity_mult:1.05,isSpecial:!0});e.addToFactions(["Bladeburners"]),C(e);const t=new r.Augmentation({name:o.AugmentationNames.EMS4Recombination,repCost:1e3,moneyCost:55e6,info:"A DNA recombination of the EMS-4 Gene. This genetic engineering technique was originally used on Bladeburners during the Synthoid uprising to induce wakefulness and concentration, suppress fear, reduce empathy, and improve reflexes and memory-recall among other things.

This augmentation:
Increases the player's sucess chance in Bladeburner contracts/operations by 3%.
Increases the player's effectiveness in Bladeburner Field Analysis by 5%.
Increases the player's Bladeburner stamina gain rate by 2%.",bladeburner_success_chance_mult:1.03,bladeburner_analysis_mult:1.05,bladeburner_stamina_gain_mult:1.02,isSpecial:!0});t.addToFactions(["Bladeburners"]),C(t);const n=new r.Augmentation({name:o.AugmentationNames.OrionShoulder,repCost:2500,moneyCost:11e7,info:"A bionic shoulder augmentation for the right shoulder. Using cybernetics, the ORION-MKIV shoulder enhances the strength and dexterity of the user's right arm. It also provides protection due to its crystallized graphene plating.

This augmentation:
Increases the player's defense by 5%.
Increases the player's strength and dexterity by 5%.
Increases the player's success chance in Bladeburner contracts/operations by 4%.",defense_mult:1.05,strength_mult:1.05,dexterity_mult:1.05,bladeburner_success_chance_mult:1.04,isSpecial:!0});n.addToFactions(["Bladeburners"]),C(n);const a=new r.Augmentation({name:o.AugmentationNames.HyperionV1,repCost:5e3,moneyCost:55e7,info:"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable of rapidly firing bolts of high-density plasma. The weapon is meant to be used against augmented enemies as the ionized nature of the plasma disrupts the electrical systems of Augmentations. However, it can also be effective against non-augmented enemies due to its high temperature and concussive force.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 6%.",bladeburner_success_chance_mult:1.06,isSpecial:!0});a.addToFactions(["Bladeburners"]),C(a);const i=new r.Augmentation({name:o.AugmentationNames.HyperionV2,repCost:1e4,moneyCost:11e8,info:"A pair of mini plasma cannons embedded into the hands. This augmentation is more advanced and powerful than the original V1 model. This V2 model is more power-efficiency, more accurate, and can fire plasma bolts at a much higher velocity than the V1 model.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[o.AugmentationNames.HyperionV1],bladeburner_success_chance_mult:1.08,isSpecial:!0});i.addToFactions(["Bladeburners"]),C(i);const s=new r.Augmentation({name:o.AugmentationNames.GolemSerum,repCost:12500,moneyCost:22e8,info:"A serum that permanently enhances many aspects of a human's capabilities, including strength, speed, immune system performance, and mitochondrial efficiency. The serum was originally developed by the Chinese military in an attempt to create super soldiers.

This augmentation:
Increases all of the player's combat stats by 7%.
Increases the player's Bladeburner stamina gain rate by 5%.
",strength_mult:1.07,defense_mult:1.07,dexterity_mult:1.07,agility_mult:1.07,bladeburner_stamina_gain_mult:1.05,isSpecial:!0});s.addToFactions(["Bladeburners"]),C(s);const l=new r.Augmentation({name:o.AugmentationNames.VangelisVirus,repCost:7500,moneyCost:55e7,info:"A synthetic symbiotic virus that is injected into the human brain tissue. The Vangelis virus heightens the senses and focus of its host, and also enhances its intuition.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 10%.
Increases the player's success chance in Bladeburner contracts/operations by 4%.
Increases the player's dexterity experience gain rate by 10%.",dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.1,bladeburner_success_chance_mult:1.04,isSpecial:!0});l.addToFactions(["Bladeburners"]),C(l);const c=new r.Augmentation({name:o.AugmentationNames.VangelisVirus3,repCost:15e3,moneyCost:22e8,info:"An improved version of Vangelis, a synthetic symbiotic virus that is injected into the human brain tissue. On top of the benefits of the original virus, this also grants an accelerated healing factor and enhanced agility/reflexes.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 15%.
Increases the player's defense and dexterity experience gain rate by 10%.
Increases the player's success chance in Bladeburner contracts/operations by 5%.",prereqs:[o.AugmentationNames.VangelisVirus],defense_exp_mult:1.1,dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.05,isSpecial:!0});c.addToFactions(["Bladeburners"]),C(c);const u=new r.Augmentation({name:o.AugmentationNames.INTERLINKED,repCost:1e4,moneyCost:11e8,info:"The DNA is genetically modified to enhance the human's body extracellular matrix (ECM). This improves the ECM's ability to structurally support the body and grants heightened strength and durability.

This augmentation:
Increases the player's experience gain rate for all combat stats by 5%.
Increases the player's Bladeburner max stamina by 10%.",strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,bladeburner_max_stamina_mult:1.1,isSpecial:!0});u.addToFactions(["Bladeburners"]),C(u);const m=new r.Augmentation({name:o.AugmentationNames.BladeRunner,repCost:8e3,moneyCost:165e7,info:"A cybernetic foot augmentation that was specially created for Bladeburners during the Synthoid Uprising. The organic musculature of the human foot is enhanced with flexible carbon nanotube matrices that are controlled by intelligent servo-motors.

This augmentation:
Increases the player's agility by 5%.
Increases the player's Bladeburner max stamina by 5%.
Increases the player's Bladeburner stamina gain rate by 5%.
",agility_mult:1.05,bladeburner_max_stamina_mult:1.05,bladeburner_stamina_gain_mult:1.05,isSpecial:!0});m.addToFactions(["Bladeburners"]),C(m);const p=new r.Augmentation({name:o.AugmentationNames.BladeArmor,repCost:5e3,moneyCost:275e6,info:"A powered exoskeleton suit (exosuit) designed as armor for Bladeburner units. This exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, concussive, thermal, chemical, and electric trauma. It also enhances the user's strength and agility.

This augmentation:
Increases all of the player's combat stats by 4%.
Increases the player's Bladeburner stamina gain rate by 2%.
Increases the player's success chance in Bladeburner contracts/operations by 3%.",strength_mult:1.04,defense_mult:1.04,dexterity_mult:1.04,agility_mult:1.04,bladeburner_stamina_gain_mult:1.02,bladeburner_success_chance_mult:1.03,isSpecial:!0});p.addToFactions(["Bladeburners"]),C(p);const h=new r.Augmentation({name:o.AugmentationNames.BladeArmorPowerCells,repCost:7500,moneyCost:55e7,info:"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of more efficiently storing and using power.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 5%.
Increases the player's Bladeburner stamina gain rate by 2%.
Increases the player's Bladeburner max stamina by 5%.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_success_chance_mult:1.05,bladeburner_stamina_gain_mult:1.02,bladeburner_max_stamina_mult:1.05,isSpecial:!0});h.addToFactions(["Bladeburners"]),C(h);const d=new r.Augmentation({name:o.AugmentationNames.BladeArmorEnergyShielding,repCost:8500,moneyCost:11e8,info:"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system that is capable of projecting an energy shielding force field.

This augmentation:
Increases the player's defense by 5%.
Increases the player's success chance in Bladeburner contracts/operations by 6%.",prereqs:[o.AugmentationNames.BladeArmor],defense_mult:1.05,bladeburner_success_chance_mult:1.06,isSpecial:!0});d.addToFactions(["Bladeburners"]),C(d);const _=new r.Augmentation({name:o.AugmentationNames.BladeArmorUnibeam,repCost:12500,moneyCost:33e8,info:"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser weapon. It's precision an accuracy makes it useful for quickly neutralizing threats while keeping casualties to a minimum.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_success_chance_mult:1.08,isSpecial:!0});_.addToFactions(["Bladeburners"]),C(_);const g=new r.Augmentation({name:o.AugmentationNames.BladeArmorOmnibeam,repCost:25e3,moneyCost:55e8,info:"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use multiple-fiber system. The upgraded weapon uses multiple fiber laser modules that combine together to form a single, more powerful beam of up to 2000MW.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 10%.",prereqs:[o.AugmentationNames.BladeArmorUnibeam],bladeburner_success_chance_mult:1.1,isSpecial:!0});g.addToFactions(["Bladeburners"]),C(g);const y=new r.Augmentation({name:o.AugmentationNames.BladeArmorIPU,repCost:6e3,moneyCost:22e7,info:"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing Unit that was specially designed to analyze Synthoid related data and information.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 15%.
Increases the player's success chance in Bladeburner contracts/operations by 2%.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.02,isSpecial:!0});y.addToFactions(["Bladeburners"]),C(y);const f=new r.Augmentation({name:o.AugmentationNames.BladesSimulacrum,repCost:500,moneyCost:3e10,info:"A highly-advanced matter phase-shifter module that is embedded in the brainstem and cerebellum. This augmentation allows the user to project and control a holographic simulacrum within an extremely large radius. These specially-modified holograms were specially weaponized by Bladeburner units to be used against Synthoids.

This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time.",isSpecial:!0});f.addToFactions(["Bladeburners"]),C(f)}for(var e in ge=Math.pow(c.CONSTANTS.MultipleAugMultiplier,m.Player.queuedAugmentations.length),a.Augmentations)a.Augmentations.hasOwnProperty(e)&&(a.Augmentations[e].baseCost*=ge);m.Player.reapplyAllAugmentations()}function C(e){if(!(e instanceof r.Augmentation))throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");var t=e.name;S(t)&&delete a.Augmentations[t],v(e)}function T(e,t=!1){a.Augmentations[e.name].owned=!0;const n=a.Augmentations[e.name];for(const e in n.mults)null==m.Player[e]?console.warn(`Augmentation has unrecognized multiplier property: ${e}`):m.Player[e]*=n.mults[e];if(e.name===o.AugmentationNames.NeuroFluxGovernor&&!t){a.Augmentations[e.name].level=e.level;for(let t=0;t"):console.error(`Invalid augmentation: ${m.Player.queuedAugmentations[t].name}`)}m.Player.queuedAugmentations=[],Object(_.dialogBoxCreate)("You slowly drift to sleep as scientists put you under in order to install the following Augmentations:
"+e+"
You wake up in your home...you feel different..."),Object(p.a)()}function S(e){return a.Augmentations.hasOwnProperty(e)}function O(e){d.routing.isOn(d.Page.Augmentations)&&e instanceof HTMLElement&&E.a.render(f.a.createElement(s.AugmentationsRoot,{exportGameFn:h.b.exportGame.bind(h.b),installAugmentationsFn:P}),e)}function M(e){return(e instanceof r.Augmentation?e.name:e)===o.AugmentationNames.NeuroFluxGovernor}},function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"b",function(){return postNetburnerText}),__webpack_require__.d(__webpack_exports__,"a",function(){return Terminal});var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(76),_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__),_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(287),_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__),_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(188),_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__),_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(286),_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__),_Alias__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(64),_Alias__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_Alias__WEBPACK_IMPORTED_MODULE_4__),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(19),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__),_CodingContracts__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(47),_CodingContracts__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_CodingContracts__WEBPACK_IMPORTED_MODULE_6__),_Constants__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(6),_Constants__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_Constants__WEBPACK_IMPORTED_MODULE_7__),_Programs_Programs__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(32),_Programs_Programs__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_Programs_Programs__WEBPACK_IMPORTED_MODULE_8__),_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(220),_DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(101),_DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_10__),_engine__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(12),_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(132),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(35),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_13__),_Hacking__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(56),_Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(34),_Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_15__),_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(40),_Literature__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(133),_Message_Message__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(66),_Message_Message__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(_Message_Message__WEBPACK_IMPORTED_MODULE_18__),_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(68),_NetscriptWorker__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(59),_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(67),_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_21__),_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(105),_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_22__),_Player__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(0),_RedPill__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(80),_Script_RunningScript__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(119),_Script_RunningScript__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(_Script_RunningScript__WEBPACK_IMPORTED_MODULE_25__),_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(177),_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_26___default=__webpack_require__.n(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_26__),_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(73),_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(62),_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__),_Server_AllServers__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(20),_Server_AllServers__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(_Server_AllServers__WEBPACK_IMPORTED_MODULE_29__),_Server_Server__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(116),_Server_Server__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(_Server_Server__WEBPACK_IMPORTED_MODULE_30__),_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(22),_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_31__),_Settings_Settings__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(17),_Settings_Settings__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(_Settings_Settings__WEBPACK_IMPORTED_MODULE_32__),_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(38),_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_33__),_TextFile__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(98),_TextFile__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(_TextFile__WEBPACK_IMPORTED_MODULE_34__),_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(65),_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_35___default=__webpack_require__.n(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_35__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(11),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_36___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_36__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(2),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_37___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_37__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__(26),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__),_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__(88),_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_39___default=__webpack_require__.n(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_39__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__(48),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_40___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_40__),_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__(83),_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_41___default=__webpack_require__.n(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_41__),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__(157),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_42___default=__webpack_require__.n(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_42__),_utils_LogBox__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__(110),_utils_LogBox__WEBPACK_IMPORTED_MODULE_43___default=__webpack_require__.n(_utils_LogBox__WEBPACK_IMPORTED_MODULE_43__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__(45),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_44___default=__webpack_require__.n(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_44__),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__(5),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_45___default=__webpack_require__.n(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_45__),autosize__WEBPACK_IMPORTED_MODULE_46__=__webpack_require__(285),autosize__WEBPACK_IMPORTED_MODULE_46___default=__webpack_require__.n(autosize__WEBPACK_IMPORTED_MODULE_46__),jszip__WEBPACK_IMPORTED_MODULE_47__=__webpack_require__(284),jszip__WEBPACK_IMPORTED_MODULE_47___default=__webpack_require__.n(jszip__WEBPACK_IMPORTED_MODULE_47__),file_saver__WEBPACK_IMPORTED_MODULE_48__=__webpack_require__(283),file_saver__WEBPACK_IMPORTED_MODULE_48___default=__webpack_require__.n(file_saver__WEBPACK_IMPORTED_MODULE_48__);function postNetburnerText(){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_45__.post)("Bitburner v"+_Constants__WEBPACK_IMPORTED_MODULE_7__.CONSTANTS.Version)}function isNumber(e){return"string"==typeof e&&(!isNaN(e)&&!isNaN(parseFloat(e)))}$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_36__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_36__.Page.Terminal)){var t=document.getElementById("terminal-input-text-box");if(null==t||e.ctrlKey||e.shiftKey||Terminal.contractOpen||t.focus(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.ENTER){e.preventDefault();const n=t.value,r=Terminal.currDir;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_45__.post)("["+(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_13__.FconfSettings.ENABLE_TIMESTAMPS?Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_42__.getTimestamp)()+" ":"")+_Player__WEBPACK_IMPORTED_MODULE_23__.Player.getCurrentServer().hostname+` ~${r}]> ${n}`),n.length>0&&(Terminal.resetTerminalInput(),Terminal.executeCommands(n))}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.C&&e.ctrlKey&&(_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_45__.post)("Cancelling..."),_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress=!1,Terminal.finishAction(!0)):_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_13__.FconfSettings.ENABLE_BASH_HOTKEYS&&Terminal.resetTerminalInput()),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.L&&e.ctrlKey&&(e.preventDefault(),Terminal.executeCommand("clear")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.UPARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_13__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.P&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_13__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var n=Terminal.commandHistoryIndex;if(0==(a=Terminal.commandHistory.length))return;(n<0||n>a)&&(Terminal.commandHistoryIndex=a),0!=n&&--Terminal.commandHistoryIndex;var r=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=r,Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_35__.setTimeoutRef)(function(){t.selectionStart=t.selectionEnd=1e4},0)}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.DOWNARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_13__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.M&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_13__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var a;n=Terminal.commandHistoryIndex;if(0==(a=Terminal.commandHistory.length))return;if((n<0||n>a)&&(Terminal.commandHistoryIndex=a),n==a||n==a-1)Terminal.commandHistoryIndex=a,t.value="";else{++Terminal.commandHistoryIndex;r=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=r}}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.TAB){if(e.preventDefault(),null==t)return;let n=t.value;if(""==n)return;const r=n.lastIndexOf(";");-1!==r&&(n=n.slice(r+1));const a=(n=(n=n.trim()).replace(/\s\s+/g," ")).split(" ");let i=a.length-2;i<-1&&(i=0);const o=Object(_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__.determineAllPossibilitiesForTabCompletion)(_Player__WEBPACK_IMPORTED_MODULE_23__.Player,n,i,Terminal.currDir);if(0==o.length)return;let s="",l="";if(0==a.length)return;1==a.length?l=a[0]:2==a.length?(l=a[0],s=a[1]):3==a.length?(l=a[0]+" "+a[1],s=a[2]):(s=a.pop(),l=a.join(" ")),Object(_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__.tabCompletion)(l,s,o),t.focus()}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_13__.FconfSettings.ENABLE_BASH_HOTKEYS&&(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.A&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("home")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.E&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("end")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.B&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("prevchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.B&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("prevword")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.F&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("nextchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.F&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("nextword")),e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.H&&e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.D||!e.ctrlKey||(Terminal.modifyInput("backspace"),e.preventDefault()))}});let terminalCtrlPressed=!1,shiftKeyPressed=!1;$(document).ready(function(){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_36__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_36__.Page.Terminal)&&$(".terminal-input").focus()}),$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_36__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_36__.Page.Terminal))if(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.CTRL)terminalCtrlPressed=!0;else if(e.shiftKey)shiftKeyPressed=!0;else if(terminalCtrlPressed||shiftKeyPressed||Terminal.contractOpen);else{var t=document.getElementById("terminal-input-text-box");null!=t&&t.focus(),terminalCtrlPressed=!1,shiftKeyPressed=!1}}),$(document).keyup(function(e){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_36__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_36__.Page.Terminal)&&(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_38__.KEY.CTRL&&(terminalCtrlPressed=!1),e.shiftKey&&(shiftKeyPressed=!1))});let Terminal={hackFlag:!1,analyzeFlag:!1,actionStarted:!1,actionTime:0,commandHistory:[],commandHistoryIndex:0,contractOpen:!1,currDir:"/",resetTerminalInput:function(){const e=Terminal.currDir;_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_13__.FconfSettings.WRAP_INPUT?(document.getElementById("terminal-input-td").innerHTML=`
[${_Player__WEBPACK_IMPORTED_MODULE_23__.Player.getCurrentServer().hostname} ~${e}]$
`+'",v.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var xe=s.documentElement,we=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ke=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function Ae(){return!1}function _e(){try{return s.activeElement}catch(e){}}function Se(e,t,n,r,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)Se(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ae;else if(!i)return e;return 1===o&&(s=i,(i=function(e){return k().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}k.event={global:{},add:function(e,t,n,r,i){var o,s,a,l,u,c,h,d,f,p,g,m=Z.get(e);if(m)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(xe,i),n.guid||(n.guid=k.guid++),(l=m.events)||(l=m.events={}),(s=m.handle)||(s=m.handle=function(t){return void 0!==k&&k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(j)||[""]).length;u--;)f=g=(a=ke.exec(t[u])||[])[1],p=(a[2]||"").split(".").sort(),f&&(h=k.event.special[f]||{},f=(i?h.delegateType:h.bindType)||f,h=k.event.special[f]||{},c=k.extend({type:f,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:p.join(".")},o),(d=l[f])||((d=l[f]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,r,p,s)||e.addEventListener&&e.addEventListener(f,s)),h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),k.event.global[f]=!0)},remove:function(e,t,n,r,i){var o,s,a,l,u,c,h,d,f,p,g,m=Z.hasData(e)&&Z.get(e);if(m&&(l=m.events)){for(u=(t=(t||"").match(j)||[""]).length;u--;)if(f=g=(a=ke.exec(t[u])||[])[1],p=(a[2]||"").split(".").sort(),f){for(h=k.event.special[f]||{},d=l[f=(r?h.delegateType:h.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,h.remove&&h.remove.call(e,c));s&&!d.length&&(h.teardown&&!1!==h.teardown.call(e,p,m.handle)||k.removeEvent(e,f,m.handle),delete l[f])}else for(f in l)k.event.remove(e,f+t[u],n,r,!0);k.isEmptyObject(l)&&Z.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=k.event.fix(e),l=new Array(arguments.length),u=(Z.get(this,"events")||{})[a.type]||[],c=k.event.special[a.type]||{};for(l[0]=a,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],s={},n=0;n-1:k.find(i,this,null,[u]).length),s[i]&&o.push(r);o.length&&a.push({elem:u,handlers:o})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,De=/\s*$/g;function Be(e,t){return T(e,"table")&&T(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Me(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Re(e,t){var n,r,i,o,s,a,l,u;if(1===t.nodeType){if(Z.hasData(e)&&(o=Z.access(e),s=Z.set(t,o),u=o.events))for(i in delete s.handle,s.events={},u)for(n=0,r=u[i].length;n1&&"string"==typeof p&&!v.checkClone&&Te.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),Ie(o,t,n,r)});if(d&&(o=(i=be(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=k.map(me(i,"script"),Me)).length;h")},clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),l=k.contains(e.ownerDocument,e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(s=me(a),r=0,i=(o=me(e)).length;r0&&ve(s,!l&&me(e,"script")),a},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(X(n)){if(t=n[Z.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[Z.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return je(this,e,!0)},remove:function(e){return je(this,e)},text:function(e){return U(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ie(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Be(this,e).appendChild(e)})},prepend:function(){return Ie(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Be(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(me(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return U(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!De.test(e)&&!ge[(fe.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))),l}function Je(e,t,n){var r=$e(e),i=ze(e,t,r),o="border-box"===k.css(e,"boxSizing",!1,r),s=o;if(Ne.test(i)){if(!n)return i;i="auto"}return s=s&&(v.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===k.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],s=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),s,r,i)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ze(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=Y(t),l=Ue.test(t),u=e.style;if(l||(t=Xe(a)),s=k.cssHooks[t]||k.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:u[t];"string"===(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=le(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(k.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var i,o,s,a=Y(t);return Ue.test(t)||(t=Xe(a)),(s=k.cssHooks[t]||k.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=ze(e,t,r)),"normal"===i&&t in Ke&&(i=Ke[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],function(e,t){k.cssHooks[t]={get:function(e,n,r){if(n)return!Ve.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,t,r):ae(e,Ge,function(){return Je(e,t,r)})},set:function(e,n,r){var i,o=$e(e),s="border-box"===k.css(e,"boxSizing",!1,o),a=r&&Ze(e,t,r,s,o);return s&&v.scrollboxSize()===o.position&&(a-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),a&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=k.css(e,t)),Qe(0,n,a)}}}),k.cssHooks.marginLeft=He(v.reliableMarginLeft,function(e,t){if(t)return(parseFloat(ze(e,"marginLeft"))||e.getBoundingClientRect().left-ae(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(e,t){k.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(k.cssHooks[e+t].set=Qe)}),k.fn.extend({css:function(e,t){return U(this,function(e,t,n){var r,i,o={},s=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;s1)}}),k.Tween=et,et.prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}},et.prototype.init.prototype=et.prototype,et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[k.cssProps[e.prop]]&&!k.cssHooks[e.prop]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},et.propHooks.scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=et.prototype.init,k.fx.step={};var tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;function ot(){nt&&(!1===s.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ot):n.setTimeout(ot,k.fx.interval),k.fx.tick())}function st(){return n.setTimeout(function(){tt=void 0}),tt=Date.now()}function at(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(ut.tweeners[t]||[]).concat(ut.tweeners["*"]),o=0,s=i.length;o1)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&T(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(j);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||k.find.attr;ht[t]=function(e,t,r){var i,o,s=t.toLowerCase();return r||(o=ht[s],ht[s]=i,i=null!=n(e,t,r)?s:null,ht[s]=o),i}});var dt=/^(?:input|select|textarea|button)$/i,ft=/^(?:a|area)$/i;function pt(e){return(e.match(j)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(j)||[]}k.fn.extend({prop:function(e,t){return U(this,k.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):dt.test(e.nodeName)||ft.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(e){var t,n,r,i,o,s,a,l=0;if(y(e))return this.each(function(t){k(this).addClass(e.call(this,t,gt(this)))});if((t=mt(e)).length)for(;n=this[l++];)if(i=gt(n),r=1===n.nodeType&&" "+pt(i)+" "){for(s=0;o=t[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=pt(r))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,s,a,l=0;if(y(e))return this.each(function(t){k(this).removeClass(e.call(this,t,gt(this)))});if(!arguments.length)return this.attr("class","");if((t=mt(e)).length)for(;n=this[l++];)if(i=gt(n),r=1===n.nodeType&&" "+pt(i)+" "){for(s=0;o=t[s++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(a=pt(r))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):y(e)?this.each(function(n){k(this).toggleClass(e.call(this,n,gt(this),t),t)}):this.each(function(){var t,i,o,s;if(r)for(i=0,o=k(this),s=mt(e);t=s[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=gt(this))&&Z.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Z.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+pt(gt(n))+" ").indexOf(t)>-1)return!0;return!1}});var vt=/\r/g;k.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=y(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,k(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=k.map(i,function(e){return null==e?"":e+""})),(t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=k.valHooks[i.type]||k.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(vt,""):null==n?"":n:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:pt(k.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:i.length;for(r=o<0?l:s?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=k.inArray(k(e).val(),t)>-1}},v.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),v.focusin="onfocusin"in n;var yt=/^(?:focusinfocus|focusoutblur)$/,bt=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,r,i){var o,a,l,u,c,h,d,f,g=[r||s],m=p.call(e,"type")?e.type:e,v=p.call(e,"namespace")?e.namespace.split("."):[];if(a=f=l=r=r||s,3!==r.nodeType&&8!==r.nodeType&&!yt.test(m+k.event.triggered)&&(m.indexOf(".")>-1&&(m=(v=m.split(".")).shift(),v.sort()),c=m.indexOf(":")<0&&"on"+m,(e=e[k.expando]?e:new k.Event(m,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:k.makeArray(t,[e]),d=k.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(r,t))){if(!i&&!d.noBubble&&!b(r)){for(u=d.delegateType||m,yt.test(u+m)||(a=a.parentNode);a;a=a.parentNode)g.push(a),l=a;l===(r.ownerDocument||s)&&g.push(l.defaultView||l.parentWindow||n)}for(o=0;(a=g[o++])&&!e.isPropagationStopped();)f=a,e.type=o>1?u:d.bindType||m,(h=(Z.get(a,"events")||{})[e.type]&&Z.get(a,"handle"))&&h.apply(a,t),(h=c&&a[c])&&h.apply&&X(a)&&(e.result=h.apply(a,t),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(g.pop(),t)||!X(r)||c&&y(r[m])&&!b(r)&&((l=r[c])&&(r[c]=null),k.event.triggered=m,e.isPropagationStopped()&&f.addEventListener(m,bt),r[m](),e.isPropagationStopped()&&f.removeEventListener(m,bt),k.event.triggered=void 0,l&&(r[c]=l)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),v.focusin||k.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){k.event.simulate(t,e.target,k.event.fix(e))};k.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Z.access(r,t);i||r.addEventListener(e,n,!0),Z.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Z.access(r,t)-1;i?Z.access(r,t,i):(r.removeEventListener(e,n,!0),Z.remove(r,t))}}});var xt=n.location,wt=Date.now(),Ct=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var kt=/\[\]$/,Et=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,_t=/^(?:input|select|textarea|keygen)/i;function St(e,t,n,r){var i;if(Array.isArray(t))k.each(t,function(t,i){n||kt.test(e)?r(e,i):St(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==C(t))r(e,t);else for(i in t)St(e+"["+i+"]",t[i],n,r)}k.param=function(e,t){var n,r=[],i=function(e,t){var n=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){i(this.name,this.value)});else for(n in e)St(n,e[n],t,i);return r.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&_t.test(this.nodeName)&&!At.test(e)&&(this.checked||!de.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Ft=/%20/g,Dt=/#.*$/,Tt=/([?&])_=[^&]*/,Lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Bt=/^(?:GET|HEAD)$/,Mt=/^\/\//,Pt={},Rt={},Ot="*/".concat("*"),It=s.createElement("a");function jt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(j)||[];if(y(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Nt(e,t,n,r){var i={},o=e===Rt;function s(a){var l;return i[a]=!0,k.each(e[a]||[],function(e,a){var u=a(t,n,r);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),s(u),!1)}),l}return s(t.dataTypes[0])||!i["*"]&&s("*")}function $t(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}It.href=xt.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ot,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,k.ajaxSettings),t):$t(k.ajaxSettings,e)},ajaxPrefilter:jt(Pt),ajaxTransport:jt(Rt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,a,l,u,c,h,d,f,p=k.ajaxSetup({},t),g=p.context||p,m=p.context&&(g.nodeType||g.jquery)?k(g):k.event,v=k.Deferred(),y=k.Callbacks("once memory"),b=p.statusCode||{},x={},w={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=Lt.exec(o);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),A(0,t),this}};if(v.promise(E),p.url=((e||p.url||xt.href)+"").replace(Mt,xt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(j)||[""],null==p.crossDomain){u=s.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=It.protocol+"//"+It.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=k.param(p.data,p.traditional)),Nt(Pt,p,t,E),c)return E;for(d in(h=k.event&&p.global)&&0==k.active++&&k.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Bt.test(p.type),i=p.url.replace(Dt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ft,"+")):(f=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Ct.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Tt,"$1"),f=(Ct.test(i)?"&":"?")+"_="+wt+++f),p.url=i+f),p.ifModified&&(k.lastModified[i]&&E.setRequestHeader("If-Modified-Since",k.lastModified[i]),k.etag[i]&&E.setRequestHeader("If-None-Match",k.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&E.setRequestHeader("Content-Type",p.contentType),E.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Ot+"; q=0.01":""):p.accepts["*"]),p.headers)E.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(g,E,p)||c))return E.abort();if(C="abort",y.add(p.complete),E.done(p.success),E.fail(p.error),r=Nt(Rt,p,t,E)){if(E.readyState=1,h&&m.trigger("ajaxSend",[E,p]),c)return E;p.async&&p.timeout>0&&(l=n.setTimeout(function(){E.abort("timeout")},p.timeout));try{c=!1,r.send(x,A)}catch(e){if(c)throw e;A(-1,e)}}else A(-1,"No Transport");function A(e,t,s,a){var u,d,f,x,w,C=t;c||(c=!0,l&&n.clearTimeout(l),r=void 0,o=a||"",E.readyState=e>0?4:0,u=e>=200&&e<300||304===e,s&&(x=function(e,t,n){for(var r,i,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(p,E,s)),x=function(e,t,n,r){var i,o,s,a,l,u={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)u[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=u[l+" "+o]||u["* "+o]))for(i in u)if((a=i.split(" "))[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[i]:!0!==u[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(p,x,E,u),u?(p.ifModified&&((w=E.getResponseHeader("Last-Modified"))&&(k.lastModified[i]=w),(w=E.getResponseHeader("etag"))&&(k.etag[i]=w)),204===e||"HEAD"===p.type?C="nocontent":304===e?C="notmodified":(C=x.state,d=x.data,u=!(f=x.error))):(f=C,!e&&C||(C="error",e<0&&(e=0))),E.status=e,E.statusText=(t||C)+"",u?v.resolveWith(g,[d,C,E]):v.rejectWith(g,[E,C,f]),E.statusCode(b),b=void 0,h&&m.trigger(u?"ajaxSuccess":"ajaxError",[E,p,u?d:f]),y.fireWith(g,[E,C]),h&&(m.trigger("ajaxComplete",[E,p]),--k.active||k.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,t){k[t]=function(e,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),k.ajax(k.extend({url:e,type:t,dataType:i,data:n,success:r},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return y(e)?this.each(function(t){k(this).wrapInner(e.call(this,t))}):this.each(function(){var t=k(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=y(e);return this.each(function(n){k(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Wt={0:200,1223:204},zt=k.ajaxSettings.xhr();v.cors=!!zt&&"withCredentials"in zt,v.ajax=zt=!!zt,k.ajaxTransport(function(e){var t,r;if(v.cors||zt&&!e.crossDomain)return{send:function(i,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);t=function(e){return function(){t&&(t=r=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Wt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),r=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(e){var t,n;if(e.crossDomain)return{send:function(r,i){t=k("