Merge pull request #76 from danielyxie/dev

Dev v0.23.0
This commit is contained in:
danielyxie 2017-06-28 08:48:04 -05:00 committed by GitHub
commit 8305c68d59
18 changed files with 446 additions and 304 deletions

@ -1,18 +1,21 @@
/* CSS for different main menu pages, such as character info, script editor, etc (but excluding /* CSS for different main menu pages, such as character info, script editor, etc (but excluding
terminal which has its own page) */ terminal which has its own page) */
/* Character Info */ .generic-menupage-container {
#character-container {
position: fixed;
height: 100%; height: 100%;
padding-top: 10px;
padding-left: 10px; padding-left: 10px;
margin-left: 10%; margin-left: 10%;
width: 99%; width: 99%;
overflow: auto;
overflow-y: scroll; overflow-y: scroll;
} }
/* Character Info */
#character-container {
padding-top: 10px;
position: fixed;
}
/* Script Editor */ /* Script Editor */
/* This temp element is used for auto adjusting filename field */ /* This temp element is used for auto adjusting filename field */
.tmp-element { .tmp-element {
@ -20,16 +23,13 @@
white-space: pre; white-space: pre;
} }
#script-editor-container { #script-editor-container {
position: fixed; position: fixed;
padding-top: 10px; padding-top: 10px;
height: 100%;
margin-left: 10%;
width: 99%;
color: var(--my-font-color);
overflow-y: scroll;
} }
#script-editor-buttons-wrapper { #script-editor-buttons-wrapper {
width: 100%; width: 100%;
padding-right: 0xp; padding-right: 0xp;
@ -131,11 +131,6 @@ background-color: #555;
#active-scripts-container { #active-scripts-container {
position: fixed; position: fixed;
padding-top: 10px; padding-top: 10px;
padding-left: 10px;
height: 100%;
margin-left: 10%;
width: 99%;
overflow-y: scroll;
} }
#active-scripts-text, #active-scripts-text,
@ -277,12 +272,9 @@ background-color: #555;
#hacknet-nodes-container { #hacknet-nodes-container {
position: fixed; position: fixed;
padding: 10px; padding: 10px;
height: 100%;
margin-left: 10%;
width: 99%;
overflow-y: scroll;
} }
#hacknet-nodes-container li{ #hacknet-nodes-container li{
padding: 6px; padding: 6px;
margin: 6px; margin: 6px;
@ -337,12 +329,9 @@ background-color: #555;
#world-container { #world-container {
position: fixed; position: fixed;
padding-top: 10px; padding-top: 10px;
padding-left: 10px;
height: 100%;
margin-left: 10%;
width: 99%;
} }
#world-city-name, #world-city-name,
#world-city-desc { #world-city-desc {
padding: 4px; padding: 4px;
@ -353,10 +342,6 @@ background-color: #555;
#create-program-container { #create-program-container {
position: fixed; position: fixed;
padding-top: 10px; padding-top: 10px;
padding-left: 10px;
height: 100%;
margin-left: 10%;
width: 99%;
} }
#create-program-page-text { #create-program-page-text {
@ -393,23 +378,11 @@ background-color: #555;
#factions-container { #factions-container {
position: fixed; position: fixed;
padding-top: 10px; padding-top: 10px;
padding-left: 10px;
height: 100%;
margin-left: 10%;
width: 99%;
color: var(--my-font-color);
overflow-y: auto;
} }
#faction-container { #faction-container {
position: fixed; position: fixed;
padding-top: 10px; padding-top: 10px;
padding-left: 10px;
height: 100%;
margin-left: 10%;
width: 99%;
overflow: auto;
overflow-y: auto;
} }
#factions-list li { #factions-list li {
@ -472,12 +445,6 @@ div.faction-clear {
#faction-augmentations-container{ #faction-augmentations-container{
position: fixed; position: fixed;
padding-top: 10px; padding-top: 10px;
padding-left: 10px;
height: 100%;
margin-left: 10%;
width: 99%;
color: var(--my-font-color);
overflow-y: auto;
} }
#faction-augmentations-container p, #faction-augmentations-container p,
@ -503,21 +470,19 @@ div.faction-clear {
#augmentations-container { #augmentations-container {
position: fixed; position: fixed;
padding-top: 10px; padding-top: 10px;
padding-left: 10px;
height: 100%;
margin-left: 10%;
width: 99%;
color: var(--my-font-color);
overflow-y: scroll;
} }
#augmentations-list li {
#augmentations-list li,
#queued-augmentations-list li {
width: 70%; width: 70%;
background-color: #333; background-color: #333;
} }
#augmentations-list h2, #augmentations-list h2,
#augmentations-list p { #augmentations-list p,
#queued-augmentations-list h2,
#queued-augmentations-list p {
margin: 4px; margin: 4px;
color: var(--my-font-color); color: var(--my-font-color);
padding: 8px; padding: 8px;
@ -533,13 +498,7 @@ div.faction-clear {
/* Tutorial */ /* Tutorial */
#tutorial-container { #tutorial-container {
position: fixed; position: fixed;
height: 100%;
padding-top: 10px; padding-top: 10px;
padding-left: 10px;
margin-left: 10%;
width: 99%;
overflow: auto;
overflow-y: scroll;
} }
#tutorial-text { #tutorial-text {
@ -574,4 +533,3 @@ div.faction-clear {
#location-job-reputation, #location-company-favor { #location-job-reputation, #location-company-favor {
display: inline; display: inline;
} }

@ -240,6 +240,7 @@ tr:focus {
margin-right: 14px; margin-right: 14px;
background-color: transparent; background-color: transparent;
z-index: 2; z-index: 2;
width: auto;
} }
/* Character Overview */ /* Character Overview */

@ -18,6 +18,11 @@
background-color: var(--my-background-color); background-color: var(--my-background-color);
} }
/*
.posted {
width: 70%;
}*/
#terminal-input { #terminal-input {
background-color: var(--my-background-color); background-color: var(--my-background-color);
color: var(--my-font-color); color: var(--my-font-color);

@ -142,14 +142,14 @@
</div> </div>
<!-- Character Info page --> <!-- Character Info page -->
<div id="character-container"> <div id="character-container" class="generic-menupage-container">
<div id="character-content"> <div id="character-content">
<p id="character-info"> </p> <p id="character-info"> </p>
</div> </div>
</div> </div>
<!-- Script editor --> <!-- Script editor -->
<div id="script-editor-container"> <div id="script-editor-container" class="generic-menupage-container">
<div id="script-editor-wrapper"> <div id="script-editor-wrapper">
<div id="script-editor-filename-wrapper"> <div id="script-editor-filename-wrapper">
<p id="script-editor-filename-tag"> <strong style="background-color:#555;">Script name: </strong></p> <p id="script-editor-filename-tag"> <strong style="background-color:#555;">Script name: </strong></p>
@ -165,7 +165,7 @@
</div> </div>
<!-- Active scripts info page --> <!-- Active scripts info page -->
<div id="active-scripts-container"> <div id="active-scripts-container" class="generic-menupage-container">
<p id="active-scripts-text"> This page displays a list of all of your scripts that are currently running across every machine. It also <p id="active-scripts-text"> This page displays a list of all of your scripts that are currently running across every machine. It also
provides information about each script's production. The scripts are categorized by the hostname of the servers on which provides information about each script's production. The scripts are categorized by the hostname of the servers on which
they are running. </p> they are running. </p>
@ -175,7 +175,7 @@
</div> </div>
<!-- Hacknet Nodes --> <!-- Hacknet Nodes -->
<div id="hacknet-nodes-container"> <div id="hacknet-nodes-container" class="generic-menupage-container">
<h1 id="hacknet-nodes-title"> Hacknet Nodes </h1> <h1 id="hacknet-nodes-title"> Hacknet Nodes </h1>
<p id="hacknet-nodes-text"> <p id="hacknet-nodes-text">
The Hacknet is a global, decentralized network of machines. It is used by hackers all around The Hacknet is a global, decentralized network of machines. It is used by hackers all around
@ -205,7 +205,7 @@
</div> </div>
<!-- World --> <!-- World -->
<div id="world-container" class="world-container"> <div id="world-container" class="generic-menupage-container">
<h2 id="world-city-name"> </h2> <h2 id="world-city-name"> </h2>
<p id="world-city-desc"> </p> <p id="world-city-desc"> </p>
<ul id="aevum-locations-list"> <ul id="aevum-locations-list">
@ -402,7 +402,7 @@
</div> </div>
<!-- Create a program(executable) --> <!-- Create a program(executable) -->
<div id="create-program-container"> <div id="create-program-container" class="generic-menupage-container">
<p id="create-program-page-text"> <p id="create-program-page-text">
This page displays any programs that you are able to create. Writing the code for a program takes time, which This page displays any programs that you are able to create. Writing the code for a program takes time, which
can vary based on how complex the program is. If you are working on creating on a program you can cancel can vary based on how complex the program is. If you are working on creating on a program you can cancel
@ -455,14 +455,14 @@
</div> </div>
<!-- Factions --> <!-- Factions -->
<div id="factions-container"> <div id="factions-container" class="generic-menupage-container">
<h1> Factions </h1> <h1> Factions </h1>
<p> Lists all factions you have joined </p> <p> Lists all factions you have joined </p>
<ul class="factions-list" id="factions-list"></ul> <ul class="factions-list" id="factions-list"></ul>
</div> </div>
<!-- Single Faction info (when you select a faction from the Factions menu) --> <!-- Single Faction info (when you select a faction from the Factions menu) -->
<div id="faction-container"> <div id="faction-container" class="generic-menupage-container">
<h1 id="faction-name"></h1> <h1 id="faction-name"></h1>
<p id="faction-info"></p> <p id="faction-info"></p>
<p> --------------- </p> <p> --------------- </p>
@ -539,7 +539,7 @@
<br><br><br><br> <br><br><br><br>
</div> </div>
<div id="faction-augmentations-container"> <div id="faction-augmentations-container" class="generic-menupage-container">
<a id="faction-augmentations-back-button" class="a-link-button"> Back </a> <a id="faction-augmentations-back-button" class="a-link-button"> Back </a>
<h1> Faction Augmentations </h1> <h1> Faction Augmentations </h1>
<p id="faction-augmentations-page-desc"> Lists all augmentations that are available to purchase from </p> <p id="faction-augmentations-page-desc"> Lists all augmentations that are available to purchase from </p>
@ -548,16 +548,35 @@
</ul> </ul>
</div> </div>
<!-- Installed augmentations --> <!-- Augmentations -->
<div id="augmentations-container"> <div id="augmentations-container" class="generic-menupage-container">
<h1> Augmentations </h1> <h1> Purchased Augmentations </h1>
<p> Lists all augmentations you have installed </p> <p style="width:70%;">
Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them.
<br>WARNING: Purchasing an Augmentation resets most of your progress, including: <br><br>
Stats/Skill levels and Experience <br>
Money <br>
Scripts on every computer but your home computer<br>
Purchased servers <br>
Hacknet Nodes <br>
Faction/Company reputation <br><br>
Purchasing an Augmentation lets you start over with the perks and benefits granted by all
of the Augmentations you have ever purchased. Also, you will keep any scripts and RAM upgrades
on your home computer (but you will lose all programs besides NUKE.exe).
</p>
<br><br>
<ul id="queued-augmentations-list"></ul>
<br>
<a id="install-augmentations-button" class="a-link-button"> Install Augmentations </a>
<br><br>
<h1> Installed Augmentations </h1>
<p style="width:70%;"> List of all augmentations that have been installed. You have gained the effects of these augmentations </p>
<ul id="augmentations-list"> <ul id="augmentations-list">
</ul> </ul>
</div> </div>
<!-- Tutorial content --> <!-- Tutorial content -->
<div id="tutorial-container"> <div id="tutorial-container" class="generic-menupage-container">
<a id="tutorial-getting-started-link" class="a-link-button"> Getting Started </a> <a id="tutorial-getting-started-link" class="a-link-button"> Getting Started </a>
<a id="tutorial-networking-link" class="a-link-button"> Servers & Networking </a> <a id="tutorial-networking-link" class="a-link-button"> Servers & Networking </a>
<a id="tutorial-hacking-link" class="a-link-button"> Hacking </a> <a id="tutorial-hacking-link" class="a-link-button"> Hacking </a>
@ -573,7 +592,7 @@
</div> </div>
<!-- Location (visiting a location in World) --> <!-- Location (visiting a location in World) -->
<div id="location-container"> <div id="location-container" class="generic-menupage-container">
<a id="location-return-to-world-button" class="a-link-button"> Return to World </a> <a id="location-return-to-world-button" class="a-link-button"> Return to World </a>
<h1 id="location-name"></h1> <h1 id="location-name"></h1>
<p id="location-info"> </p> <p id="location-info"> </p>
@ -660,6 +679,27 @@
<a id="location-slums-heist" class="a-link-button tooltip"> Heist </a> <a id="location-slums-heist" class="a-link-button tooltip"> Heist </a>
</div> </div>
<div id="infiltration-container" class="generic-menupage-container">
<div id="infiltration-left-panel">
<p id="infiltration-level-text"> </p>
<div id="infiltration-buttons">
<a id="infiltration-kill"> </a>
<a id="infiltration-knockout"> </a>
<a id="infiltration-stealthknockout"> </a>
<a id="infiltration-assassinate"> </a>
<a id="infiltration-hacksecurity"> </a>
<a id="infiltration-destroysecurity"> </a>
<a id="infiltration-sneak"> </a>
<a id="infiltration-pickdoor"> </a>
<a id="infiltration-bribe"> </a>
<a id="infiltration-escape"> </a>
</div>
</div>
<div id="infiltration-right-panel">
<p id="infiltration-status-text"></p>
</div>
</div>
<!-- Log Box --> <!-- Log Box -->
<div id="log-box-container"> <div id="log-box-container">
<div id="log-box-content"> <div id="log-box-content">
@ -703,17 +743,6 @@
<h2 id="purchase-augmentation-box-aug-name"> </h2> <h2 id="purchase-augmentation-box-aug-name"> </h2>
<p id="purchase-augmentation-box-aug-info"> </p> <p id="purchase-augmentation-box-aug-info"> </p>
<p id="purchase-augmentation-box-text"> </p> <p id="purchase-augmentation-box-text"> </p>
<p> <br> WARNING: Purchasing an Augmentation resets most of your progress, including: <br><br>
Stats/Skill levels and Experience <br>
Money <br>
Scripts on every computer but your home computer<br>
Purchased servers <br>
Hacknet Nodes <br>
Faction/Company reputation <br><br>
Purchasing an Augmentation lets you start over with the perks and benefits granted by all
of the Augmentations you have ever purchased. Also, you will keep any scripts and RAM upgrades
on your home computer (but you will lose all programs besides NUKE.exe).
</p>
<span id="purchase-augmentation-box-confirm"> Purchase </span> <span id="purchase-augmentation-box-confirm"> Purchase </span>
<span id="purchase-augmentation-box-cancel"> Cancel </span> <span id="purchase-augmentation-box-cancel"> Cancel </span>
</div> </div>

@ -2,7 +2,7 @@
function Augmentation(name) { function Augmentation(name) {
this.name = name; this.name = name;
this.info = ""; this.info = "";
this.owned = false; //Whether the player has it (you can only have each augmentation once) this.owned = false;
//Price and reputation base requirements (can change based on faction multipliers) //Price and reputation base requirements (can change based on faction multipliers)
this.baseRepRequirement = 0; this.baseRepRequirement = 0;
@ -153,6 +153,11 @@ AugmentationNames = {
} }
initAugmentations = function() { initAugmentations = function() {
for (var name in Factions) {
if (Factions.hasOwnProperty(name)) {
Factions[name].augmentations = [];
}
}
//Combat stat augmentations //Combat stat augmentations
var HemoRecirculator = new Augmentation(AugmentationNames.HemoRecirculator); var HemoRecirculator = new Augmentation(AugmentationNames.HemoRecirculator);
HemoRecirculator.setInfo("A heart implant that greatly increases the body's ability to effectively use and pump " + HemoRecirculator.setInfo("A heart implant that greatly increases the body's ability to effectively use and pump " +
@ -160,7 +165,6 @@ initAugmentations = function() {
HemoRecirculator.setRequirements(4000, 9000000); HemoRecirculator.setRequirements(4000, 9000000);
HemoRecirculator.addToFactions(["Tetrads", "The Dark Army", "The Syndicate"]); HemoRecirculator.addToFactions(["Tetrads", "The Dark Army", "The Syndicate"]);
if (augmentationExists(AugmentationNames.HemoRecirculator)) { if (augmentationExists(AugmentationNames.HemoRecirculator)) {
HemoRecirculator.owned = Augmentations[AugmentationNames.HemoRecirculator].owned;
delete Augmentations[AugmentationNames.HemoRecirculator]; delete Augmentations[AugmentationNames.HemoRecirculator];
} }
AddToAugmentations(HemoRecirculator); AddToAugmentations(HemoRecirculator);
@ -174,7 +178,6 @@ initAugmentations = function() {
Targeting1.addToFactions(["Slum Snakes", "The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima", Targeting1.addToFactions(["Slum Snakes", "The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
"OmniTek Incorporated", "KuaiGong International", "Blade Industries"]); "OmniTek Incorporated", "KuaiGong International", "Blade Industries"]);
if (augmentationExists(AugmentationNames.Targeting1)) { if (augmentationExists(AugmentationNames.Targeting1)) {
Targeting1.owned = Augmentations[AugmentationNames.Targeting1].owned;
delete Augmentations[AugmentationNames.Targeting1]; delete Augmentations[AugmentationNames.Targeting1];
} }
AddToAugmentations(Targeting1); AddToAugmentations(Targeting1);
@ -187,7 +190,6 @@ initAugmentations = function() {
Targeting2.addToFactions(["The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima", Targeting2.addToFactions(["The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
"OmniTek Incorporated", "KuaiGong International", "Blade Industries"]); "OmniTek Incorporated", "KuaiGong International", "Blade Industries"]);
if (augmentationExists(AugmentationNames.Targeting2)) { if (augmentationExists(AugmentationNames.Targeting2)) {
Targeting2.owned = Augmentations[AugmentationNames.Targeting2].owned;
delete Augmentations[AugmentationNames.Targeting2]; delete Augmentations[AugmentationNames.Targeting2];
} }
AddToAugmentations(Targeting2); AddToAugmentations(Targeting2);
@ -200,7 +202,6 @@ initAugmentations = function() {
Targeting3.addToFactions(["The Dark Army", "The Syndicate", "OmniTek Incorporated", Targeting3.addToFactions(["The Dark Army", "The Syndicate", "OmniTek Incorporated",
"KuaiGong International", "Blade Industries", "The Covenant"]); "KuaiGong International", "Blade Industries", "The Covenant"]);
if (augmentationExists(AugmentationNames.Targeting3)) { if (augmentationExists(AugmentationNames.Targeting3)) {
Targeting3.owned = Augmentations[AugmentationNames.Targeting3].owned;
delete Augmentations[AugmentationNames.Targeting3]; delete Augmentations[AugmentationNames.Targeting3];
} }
AddToAugmentations(Targeting3); AddToAugmentations(Targeting3);
@ -213,7 +214,6 @@ initAugmentations = function() {
SyntheticHeart.addToFactions(["KuaiGong International", "Fulcrum Secret Technologies", "Speakers for the Dead", SyntheticHeart.addToFactions(["KuaiGong International", "Fulcrum Secret Technologies", "Speakers for the Dead",
"NWO", "The Covenant", "Daedalus", "Illuminati"]); "NWO", "The Covenant", "Daedalus", "Illuminati"]);
if (augmentationExists(AugmentationNames.SyntheticHeart)) { if (augmentationExists(AugmentationNames.SyntheticHeart)) {
SyntheticHeart.owned = Augmentations[AugmentationNames.SyntheticHeart].owned;
delete Augmentations[AugmentationNames.SyntheticHeart]; delete Augmentations[AugmentationNames.SyntheticHeart];
} }
AddToAugmentations(SyntheticHeart); AddToAugmentations(SyntheticHeart);
@ -227,7 +227,6 @@ initAugmentations = function() {
SynfibrilMuscle.addToFactions(["KuaiGong International", "Fulcrum Secret Technologies", "Speakers for the Dead", SynfibrilMuscle.addToFactions(["KuaiGong International", "Fulcrum Secret Technologies", "Speakers for the Dead",
"NWO", "The Covenant", "Daedalus", "Illuminati", "Blade Industries"]); "NWO", "The Covenant", "Daedalus", "Illuminati", "Blade Industries"]);
if (augmentationExists(AugmentationNames.SynfibrilMuscle)) { if (augmentationExists(AugmentationNames.SynfibrilMuscle)) {
SynfibrilMuscle.owned = Augmentations[AugmentationNames.SynfibrilMuscle].owned;
delete Augmentations[AugmentationNames.SynfibrilMuscle]; delete Augmentations[AugmentationNames.SynfibrilMuscle];
} }
AddToAugmentations(SynfibrilMuscle) AddToAugmentations(SynfibrilMuscle)
@ -240,7 +239,6 @@ initAugmentations = function() {
CombatRib1.addToFactions(["Slum Snakes", "The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima", CombatRib1.addToFactions(["Slum Snakes", "The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
"OmniTek Incorporated", "KuaiGong International", "Blade Industries"]); "OmniTek Incorporated", "KuaiGong International", "Blade Industries"]);
if (augmentationExists(AugmentationNames.CombatRib1)) { if (augmentationExists(AugmentationNames.CombatRib1)) {
CombatRib1.owned = Augmentations[AugmentationNames.CombatRib1].owned;
delete Augmentations[AugmentationNames.CombatRib1]; delete Augmentations[AugmentationNames.CombatRib1];
} }
AddToAugmentations(CombatRib1); AddToAugmentations(CombatRib1);
@ -252,7 +250,6 @@ initAugmentations = function() {
CombatRib2.addToFactions(["The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima", CombatRib2.addToFactions(["The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
"OmniTek Incorporated", "KuaiGong International", "Blade Industries"]); "OmniTek Incorporated", "KuaiGong International", "Blade Industries"]);
if (augmentationExists(AugmentationNames.CombatRib2)) { if (augmentationExists(AugmentationNames.CombatRib2)) {
CombatRib2.owned = Augmentations[AugmentationNames.CombatRib2].owned;
delete Augmentations[AugmentationNames.CombatRib2]; delete Augmentations[AugmentationNames.CombatRib2];
} }
AddToAugmentations(CombatRib2); AddToAugmentations(CombatRib2);
@ -264,7 +261,6 @@ initAugmentations = function() {
CombatRib3.addToFactions(["The Dark Army", "The Syndicate", "OmniTek Incorporated", CombatRib3.addToFactions(["The Dark Army", "The Syndicate", "OmniTek Incorporated",
"KuaiGong International", "Blade Industries", "The Covenant"]); "KuaiGong International", "Blade Industries", "The Covenant"]);
if (augmentationExists(AugmentationNames.CombatRib3)) { if (augmentationExists(AugmentationNames.CombatRib3)) {
CombatRib3.owned = Augmentations[AugmentationNames.CombatRib3].owned;
delete Augmentations[AugmentationNames.CombatRib3]; delete Augmentations[AugmentationNames.CombatRib3];
} }
AddToAugmentations(CombatRib3); AddToAugmentations(CombatRib3);
@ -277,7 +273,6 @@ initAugmentations = function() {
NanofiberWeave.addToFactions(["Tian Di Hui", "The Syndicate", "The Dark Army", "Speakers for the Dead", NanofiberWeave.addToFactions(["Tian Di Hui", "The Syndicate", "The Dark Army", "Speakers for the Dead",
"Blade Industries", "Fulcrum Secret Technologies", "OmniTek Incorporated"]); "Blade Industries", "Fulcrum Secret Technologies", "OmniTek Incorporated"]);
if (augmentationExists(AugmentationNames.NanofiberWeave)) { if (augmentationExists(AugmentationNames.NanofiberWeave)) {
NanofiberWeave.owned = Augmentations[AugmentationNames.NanofiberWeave].owned;
delete Augmentations[AugmentationNames.NanofiberWeave]; delete Augmentations[AugmentationNames.NanofiberWeave];
} }
AddToAugmentations(NanofiberWeave); AddToAugmentations(NanofiberWeave);
@ -293,7 +288,6 @@ initAugmentations = function() {
SubdermalArmor.addToFactions(["The Syndicate", "Fulcrum Secret Technologies", "Illuminati", "Daedalus", SubdermalArmor.addToFactions(["The Syndicate", "Fulcrum Secret Technologies", "Illuminati", "Daedalus",
"The Covenant"]); "The Covenant"]);
if (augmentationExists(AugmentationNames.SubdermalArmor)) { if (augmentationExists(AugmentationNames.SubdermalArmor)) {
SubdermalArmor.owned = Augmentations[AugmentationNames.SubdermalArmor].owned;
delete Augmentations[AugmentationNames.SubdermalArmor]; delete Augmentations[AugmentationNames.SubdermalArmor];
} }
AddToAugmentations(SubdermalArmor); AddToAugmentations(SubdermalArmor);
@ -306,7 +300,6 @@ initAugmentations = function() {
WiredReflexes.addToFactions(["Tian Di Hui", "Slum Snakes", "Sector-12", "Volhaven", "Aevum", "Ishima", WiredReflexes.addToFactions(["Tian Di Hui", "Slum Snakes", "Sector-12", "Volhaven", "Aevum", "Ishima",
"The Syndicate", "The Dark Army", "Speakers for the Dead"]); "The Syndicate", "The Dark Army", "Speakers for the Dead"]);
if (augmentationExists(AugmentationNames.WiredReflexes)) { if (augmentationExists(AugmentationNames.WiredReflexes)) {
WiredReflexes.owned = Augmentations[AugmentationNames.WiredReflexes].owned;
delete Augmentations[AugmentationNames.WiredReflexes]; delete Augmentations[AugmentationNames.WiredReflexes];
} }
AddToAugmentations(WiredReflexes); AddToAugmentations(WiredReflexes);
@ -318,7 +311,6 @@ initAugmentations = function() {
"This augmentation increases the player's strength and defense by 75%."); "This augmentation increases the player's strength and defense by 75%.");
GrapheneBoneLacings.addToFactions(["Fulcrum Secret Technologies", "The Covenant"]); GrapheneBoneLacings.addToFactions(["Fulcrum Secret Technologies", "The Covenant"]);
if (augmentationExists(AugmentationNames.GrapheneBoneLacings)) { if (augmentationExists(AugmentationNames.GrapheneBoneLacings)) {
GrapheneBoneLacings.owned = Augmentations[AugmentationNames.GrapheneBoneLacings].owned;
delete Augmentations[AugmentationNames.GrapheneBoneLacings]; delete Augmentations[AugmentationNames.GrapheneBoneLacings];
} }
AddToAugmentations(GrapheneBoneLacings); AddToAugmentations(GrapheneBoneLacings);
@ -333,7 +325,6 @@ initAugmentations = function() {
BionicSpine.addToFactions(["Speakers for the Dead", "The Syndicate", "KuaiGong International", BionicSpine.addToFactions(["Speakers for the Dead", "The Syndicate", "KuaiGong International",
"OmniTek Incorporated", "Blade Industries"]); "OmniTek Incorporated", "Blade Industries"]);
if (augmentationExists(AugmentationNames.BionicSpine)) { if (augmentationExists(AugmentationNames.BionicSpine)) {
BionicSpine.owned = Augmentations[AugmentationNames.BionicSpine].owned;
delete Augmentations[AugmentationNames.BionicSpine]; delete Augmentations[AugmentationNames.BionicSpine];
} }
AddToAugmentations(BionicSpine); AddToAugmentations(BionicSpine);
@ -345,7 +336,6 @@ initAugmentations = function() {
"This augmentation increases all of the player's combat stats by 65%."); "This augmentation increases all of the player's combat stats by 65%.");
GrapheneBionicSpine.addToFactions(["Fulcrum Secret Technologies", "ECorp"]); GrapheneBionicSpine.addToFactions(["Fulcrum Secret Technologies", "ECorp"]);
if (augmentationExists(AugmentationNames.GrapheneBionicSpine)) { if (augmentationExists(AugmentationNames.GrapheneBionicSpine)) {
GrapheneBionicSpine.owned = Augmentations[AugmentationNames.GrapheneBionicSpine].owned;
delete Augmentations[AugmentationNames.GrapheneBionicSpine]; delete Augmentations[AugmentationNames.GrapheneBionicSpine];
} }
AddToAugmentations(GrapheneBionicSpine); AddToAugmentations(GrapheneBionicSpine);
@ -357,7 +347,6 @@ initAugmentations = function() {
BionicLegs.addToFactions(["Speakers for the Dead", "The Syndicate", "KuaiGong International", BionicLegs.addToFactions(["Speakers for the Dead", "The Syndicate", "KuaiGong International",
"OmniTek Incorporated", "Blade Industries"]); "OmniTek Incorporated", "Blade Industries"]);
if (augmentationExists(AugmentationNames.BionicLegs)) { if (augmentationExists(AugmentationNames.BionicLegs)) {
BionicLegs.owned = Augmentations[AugmentationNames.BionicLegs].owned;
delete Augmentations[AugmentationNames.BionicLegs]; delete Augmentations[AugmentationNames.BionicLegs];
} }
AddToAugmentations(BionicLegs); AddToAugmentations(BionicLegs);
@ -369,7 +358,6 @@ initAugmentations = function() {
"This augmentation increases the player's agility by an additional 175%."); "This augmentation increases the player's agility by an additional 175%.");
GrapheneBionicLegs.addToFactions(["MegaCorp", "ECorp", "Fulcrum Secret Technologies"]); GrapheneBionicLegs.addToFactions(["MegaCorp", "ECorp", "Fulcrum Secret Technologies"]);
if (augmentationExists(AugmentationNames.GrapheneBionicLegs)) { if (augmentationExists(AugmentationNames.GrapheneBionicLegs)) {
GrapheneBionicLegs.owned = Augmentations[AugmentationNames.GrapheneBionicLegs].owned;
delete Augmentations[AugmentationNames.GrapheneBionicLegs]; delete Augmentations[AugmentationNames.GrapheneBionicLegs];
} }
AddToAugmentations(GrapheneBionicLegs); AddToAugmentations(GrapheneBionicLegs);
@ -384,7 +372,6 @@ initAugmentations = function() {
SpeechProcessor.addToFactions(["Tian Di Hui", "Chongqing", "Sector-12", "New Tokyo", "Aevum", SpeechProcessor.addToFactions(["Tian Di Hui", "Chongqing", "Sector-12", "New Tokyo", "Aevum",
"Ishima", "Volhaven", "Silhouette"]); "Ishima", "Volhaven", "Silhouette"]);
if (augmentationExists(AugmentationNames.SpeechProcessor)) { if (augmentationExists(AugmentationNames.SpeechProcessor)) {
SpeechProcessor.owned = Augmentations[AugmentationNames.SpeechProcessor].owned;
delete Augmentations[AugmentationNames.SpeechProcessor]; delete Augmentations[AugmentationNames.SpeechProcessor];
} }
AddToAugmentations(SpeechProcessor); AddToAugmentations(SpeechProcessor);
@ -397,7 +384,6 @@ initAugmentations = function() {
"This augmentation increases the player's charisma and charisma experience gain rate by 15%"); "This augmentation increases the player's charisma and charisma experience gain rate by 15%");
TITN41Injection.addToFactions(["Silhouette"]); TITN41Injection.addToFactions(["Silhouette"]);
if (augmentationExists(AugmentationNames.TITN41Injection)) { if (augmentationExists(AugmentationNames.TITN41Injection)) {
TITN41Injection.owned = Augmentations[AugmentationNames.TITN41Injection].owned;
delete Augmentations[AugmentationNames.TITN41Injection]; delete Augmentations[AugmentationNames.TITN41Injection];
} }
AddToAugmentations(TITN41Injection); AddToAugmentations(TITN41Injection);
@ -413,7 +399,6 @@ initAugmentations = function() {
EnhancedSocialInteractionImplant.addToFactions(["Bachman & Associates", "NWO", "Clarke Incorporated", EnhancedSocialInteractionImplant.addToFactions(["Bachman & Associates", "NWO", "Clarke Incorporated",
"OmniTek Incorporated", "Four Sigma"]); "OmniTek Incorporated", "Four Sigma"]);
if (augmentationExists(AugmentationNames.EnhancedSocialInteractionImplant)) { if (augmentationExists(AugmentationNames.EnhancedSocialInteractionImplant)) {
EnhancedSocialInteractionImplant.owned = Augmentations[AugmentationNames.EnhancedSocialInteractionImplant].owned;
delete Augmentations[AugmentationNames.EnhancedSocialInteractionImplant]; delete Augmentations[AugmentationNames.EnhancedSocialInteractionImplant];
} }
AddToAugmentations(EnhancedSocialInteractionImplant); AddToAugmentations(EnhancedSocialInteractionImplant);
@ -425,7 +410,6 @@ initAugmentations = function() {
"capabilities. <br><br> This augmentation increases the player's hacking skill by 5%"); "capabilities. <br><br> This augmentation increases the player's hacking skill by 5%");
BitWire.addToFactions(["CyberSec", "NiteSec"]); BitWire.addToFactions(["CyberSec", "NiteSec"]);
if (augmentationExists(AugmentationNames.BitWire)) { if (augmentationExists(AugmentationNames.BitWire)) {
BitWire.owned = Augmentations[AugmentationNames.BitWire].owned;
delete Augmentations[AugmentationNames.BitWire]; delete Augmentations[AugmentationNames.BitWire];
} }
AddToAugmentations(BitWire); AddToAugmentations(BitWire);
@ -443,7 +427,6 @@ initAugmentations = function() {
"Inreases the player's hacking skill by 12%"); "Inreases the player's hacking skill by 12%");
ArtificialBioNeuralNetwork.addToFactions(["BitRunners", "Fulcrum Secret Technologies"]); ArtificialBioNeuralNetwork.addToFactions(["BitRunners", "Fulcrum Secret Technologies"]);
if (augmentationExists(AugmentationNames.ArtificialBioNeuralNetwork)) { if (augmentationExists(AugmentationNames.ArtificialBioNeuralNetwork)) {
ArtificialBioNeuralNetwork.owned = Augmentations[AugmentationNames.ArtificialBioNeuralNetwork].owned;
delete Augmentations[AugmentationNames.ArtificialBioNeuralNetwork]; delete Augmentations[AugmentationNames.ArtificialBioNeuralNetwork];
} }
AddToAugmentations(ArtificialBioNeuralNetwork); AddToAugmentations(ArtificialBioNeuralNetwork);
@ -458,7 +441,6 @@ initAugmentations = function() {
"Increases the player's hacking experience gain rate by 5%"); "Increases the player's hacking experience gain rate by 5%");
ArtificialSynapticPotentiation.addToFactions(["The Black Hand", "NiteSec"]); ArtificialSynapticPotentiation.addToFactions(["The Black Hand", "NiteSec"]);
if (augmentationExists(AugmentationNames.ArtificialSynapticPotentiation)) { if (augmentationExists(AugmentationNames.ArtificialSynapticPotentiation)) {
ArtificialSynapticPotentiation.owned = Augmentations[AugmentationNames.ArtificialSynapticPotentiation].owned;
delete Augmentations[AugmentationNames.ArtificialSynapticPotentiation]; delete Augmentations[AugmentationNames.ArtificialSynapticPotentiation];
} }
AddToAugmentations(ArtificialSynapticPotentiation); AddToAugmentations(ArtificialSynapticPotentiation);
@ -475,7 +457,6 @@ initAugmentations = function() {
"Increases the player's hacking experience gain rate by 10%"); "Increases the player's hacking experience gain rate by 10%");
EnhancedMyelinSheathing.addToFactions(["Fulcrum Secret Technologies", "BitRunners", "The Black Hand"]); EnhancedMyelinSheathing.addToFactions(["Fulcrum Secret Technologies", "BitRunners", "The Black Hand"]);
if (augmentationExists(AugmentationNames.EnhancedMyelinSheathing)) { if (augmentationExists(AugmentationNames.EnhancedMyelinSheathing)) {
EnhancedMyelinSheathing.owned = Augmentations[AugmentationNames.EnhancedMyelinSheathing].owned;
delete Augmentations[AugmentationNames.EnhancedMyelinSheathing]; delete Augmentations[AugmentationNames.EnhancedMyelinSheathing];
} }
AddToAugmentations(EnhancedMyelinSheathing); AddToAugmentations(EnhancedMyelinSheathing);
@ -487,7 +468,6 @@ initAugmentations = function() {
"This augmentation increases the player's hacking speed by 3%."); "This augmentation increases the player's hacking speed by 3%.");
SynapticEnhancement.addToFactions(["CyberSec"]); SynapticEnhancement.addToFactions(["CyberSec"]);
if (augmentationExists(AugmentationNames.SynapticEnhancement)) { if (augmentationExists(AugmentationNames.SynapticEnhancement)) {
SynapticEnhancement.owned = Augmentations[AugmentationNames.SynapticEnhancement].owned;
delete Augmentations[AugmentationNames.SynapticEnhancement]; delete Augmentations[AugmentationNames.SynapticEnhancement];
} }
AddToAugmentations(SynapticEnhancement); AddToAugmentations(SynapticEnhancement);
@ -499,7 +479,6 @@ initAugmentations = function() {
"This augmentation increases the player's hacking experience gain rate by 25%."); "This augmentation increases the player's hacking experience gain rate by 25%.");
NeuralRetentionEnhancement.addToFactions(["NiteSec"]); NeuralRetentionEnhancement.addToFactions(["NiteSec"]);
if (augmentationExists(AugmentationNames.NeuralRetentionEnhancement)) { if (augmentationExists(AugmentationNames.NeuralRetentionEnhancement)) {
NeuralRetentionEnhancement.owned = Augmentations[AugmentationNames.NeuralRetentionEnhancement].owned;
delete Augmentations[AugmentationNames.NeuralRetentionEnhancement]; delete Augmentations[AugmentationNames.NeuralRetentionEnhancement];
} }
AddToAugmentations(NeuralRetentionEnhancement); AddToAugmentations(NeuralRetentionEnhancement);
@ -512,7 +491,6 @@ initAugmentations = function() {
"This augmentation increases the amount of money the player gains from hacking by 25%"); "This augmentation increases the amount of money the player gains from hacking by 25%");
DataJack.addToFactions(["BitRunners", "The Black Hand", "NiteSec", "Chongqing", "New Tokyo"]); DataJack.addToFactions(["BitRunners", "The Black Hand", "NiteSec", "Chongqing", "New Tokyo"]);
if (augmentationExists(AugmentationNames.DataJack)) { if (augmentationExists(AugmentationNames.DataJack)) {
DataJack.owned = Augmentations[AugmentationNames.DataJack].owned;
delete Augmentations[AugmentationNames.DataJack]; delete Augmentations[AugmentationNames.DataJack];
} }
AddToAugmentations(DataJack); AddToAugmentations(DataJack);
@ -528,7 +506,6 @@ initAugmentations = function() {
ENM.addToFactions(["BitRunners", "The Black Hand", "NiteSec", "ECorp", "MegaCorp", ENM.addToFactions(["BitRunners", "The Black Hand", "NiteSec", "ECorp", "MegaCorp",
"Fulcrum Secret Technologies", "NWO", "Blade Industries"]); "Fulcrum Secret Technologies", "NWO", "Blade Industries"]);
if (augmentationExists(AugmentationNames.ENM)) { if (augmentationExists(AugmentationNames.ENM)) {
ENM.owned = Augmentations[AugmentationNames.ENM].owned;
delete Augmentations[AugmentationNames.ENM]; delete Augmentations[AugmentationNames.ENM];
} }
AddToAugmentations(ENM); AddToAugmentations(ENM);
@ -546,7 +523,6 @@ initAugmentations = function() {
ENMCore.addToFactions(["BitRunners", "The Black Hand", "ECorp", "MegaCorp", ENMCore.addToFactions(["BitRunners", "The Black Hand", "ECorp", "MegaCorp",
"Fulcrum Secret Technologies", "NWO", "Blade Industries"]); "Fulcrum Secret Technologies", "NWO", "Blade Industries"]);
if (augmentationExists(AugmentationNames.ENMCore)) { if (augmentationExists(AugmentationNames.ENMCore)) {
ENMCore.owned = Augmentations[AugmentationNames.ENMCore].owned;
delete Augmentations[AugmentationNames.ENMCore]; delete Augmentations[AugmentationNames.ENMCore];
} }
AddToAugmentations(ENMCore); AddToAugmentations(ENMCore);
@ -566,7 +542,6 @@ initAugmentations = function() {
ENMCoreV2.addToFactions(["BitRunners", "ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO", ENMCoreV2.addToFactions(["BitRunners", "ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
"Blade Industries", "OmniTek Incorporated", "KuaiGong International"]); "Blade Industries", "OmniTek Incorporated", "KuaiGong International"]);
if (augmentationExists(AugmentationNames.ENMCoreV2)) { if (augmentationExists(AugmentationNames.ENMCoreV2)) {
ENMCoreV2.owned = Augmentations[AugmentationNames.ENMCoreV2].owned;
delete Augmentations[AugmentationNames.ENMCoreV2]; delete Augmentations[AugmentationNames.ENMCoreV2];
} }
AddToAugmentations(ENMCoreV2); AddToAugmentations(ENMCoreV2);
@ -585,7 +560,6 @@ initAugmentations = function() {
ENMCoreV3.addToFactions(["ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO", ENMCoreV3.addToFactions(["ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
"Daedalus", "The Covenant", "Illuminati"]); "Daedalus", "The Covenant", "Illuminati"]);
if (augmentationExists(AugmentationNames.ENMCoreV3)) { if (augmentationExists(AugmentationNames.ENMCoreV3)) {
ENMCoreV3.owned = Augmentations[AugmentationNames.ENMCoreV3].owned;
delete Augmentations[AugmentationNames.ENMCoreV3]; delete Augmentations[AugmentationNames.ENMCoreV3];
} }
AddToAugmentations(ENMCoreV3); AddToAugmentations(ENMCoreV3);
@ -598,7 +572,6 @@ initAugmentations = function() {
ENMAnalyzeEngine.addToFactions(["ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO", ENMAnalyzeEngine.addToFactions(["ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
"Daedalus", "The Covenant", "Illuminati"]); "Daedalus", "The Covenant", "Illuminati"]);
if (augmentationExists(AugmentationNames.ENMAnalyzeEngine)) { if (augmentationExists(AugmentationNames.ENMAnalyzeEngine)) {
ENMAnalyzeEngine.owned = Augmentations[AugmentationNames.ENMAnalyzeEngine].owned;
delete Augmentations[AugmentationNames.ENMAnalyzeEngine]; delete Augmentations[AugmentationNames.ENMAnalyzeEngine];
} }
AddToAugmentations(ENMAnalyzeEngine); AddToAugmentations(ENMAnalyzeEngine);
@ -614,7 +587,6 @@ initAugmentations = function() {
ENMDMA.addToFactions(["ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO", ENMDMA.addToFactions(["ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
"Daedalus", "The Covenant", "Illuminati"]); "Daedalus", "The Covenant", "Illuminati"]);
if (augmentationExists(AugmentationNames.ENMDMA)) { if (augmentationExists(AugmentationNames.ENMDMA)) {
ENMDMA.owned = Augmentations[AugmentationNames.ENMDMA].owned;
delete Augmentations[AugmentationNames.ENMDMA]; delete Augmentations[AugmentationNames.ENMDMA];
} }
AddToAugmentations(ENMDMA); AddToAugmentations(ENMDMA);
@ -631,7 +603,6 @@ initAugmentations = function() {
"Ishima", "Volhaven", "Bachman & Associates", "Clarke Incorporated", "Ishima", "Volhaven", "Bachman & Associates", "Clarke Incorporated",
"Four Sigma"]); "Four Sigma"]);
if (augmentationExists(AugmentationNames.Neuralstimulator)) { if (augmentationExists(AugmentationNames.Neuralstimulator)) {
Neuralstimulator.owned = Augmentations[AugmentationNames.Neuralstimulator].owned;
delete Augmentations[AugmentationNames.Neuralstimulator]; delete Augmentations[AugmentationNames.Neuralstimulator];
} }
AddToAugmentations(Neuralstimulator); AddToAugmentations(Neuralstimulator);
@ -646,7 +617,6 @@ initAugmentations = function() {
"Increases the amount of money the player gains from hacking by 20%"); "Increases the amount of money the player gains from hacking by 20%");
NeuralAccelerator.addToFactions(["BitRunners"]); NeuralAccelerator.addToFactions(["BitRunners"]);
if (augmentationExists(AugmentationNames.NeuralAccelerator)) { if (augmentationExists(AugmentationNames.NeuralAccelerator)) {
NeuralAccelerator.owned = Augmentations[AugmentationNames.NeuralAccelerator].owned;
delete Augmentations[AugmentationNames.NeuralAccelerator]; delete Augmentations[AugmentationNames.NeuralAccelerator];
} }
AddToAugmentations(NeuralAccelerator); AddToAugmentations(NeuralAccelerator);
@ -662,7 +632,6 @@ initAugmentations = function() {
"Increases the player's hacking skill by 5%"); "Increases the player's hacking skill by 5%");
CranialSignalProcessorsG1.addToFactions(["CyberSec"]); CranialSignalProcessorsG1.addToFactions(["CyberSec"]);
if (augmentationExists(AugmentationNames.CranialSignalProcessorsG1)) { if (augmentationExists(AugmentationNames.CranialSignalProcessorsG1)) {
CranialSignalProcessorsG1.owned = Augmentations[AugmentationNames.CranialSignalProcessorsG1].owned;
delete Augmentations[AugmentationNames.CranialSignalProcessorsG1]; delete Augmentations[AugmentationNames.CranialSignalProcessorsG1];
} }
AddToAugmentations(CranialSignalProcessorsG1); AddToAugmentations(CranialSignalProcessorsG1);
@ -679,7 +648,6 @@ initAugmentations = function() {
"Increases the player's hacking skill by 7%"); "Increases the player's hacking skill by 7%");
CranialSignalProcessorsG2.addToFactions(["NiteSec"]); CranialSignalProcessorsG2.addToFactions(["NiteSec"]);
if (augmentationExists(AugmentationNames.CranialSignalProcessorsG2)) { if (augmentationExists(AugmentationNames.CranialSignalProcessorsG2)) {
CranialSignalProcessorsG2.owned = Augmentations[AugmentationNames.CranialSignalProcessorsG2].owned;
delete Augmentations[AugmentationNames.CranialSignalProcessorsG2]; delete Augmentations[AugmentationNames.CranialSignalProcessorsG2];
} }
AddToAugmentations(CranialSignalProcessorsG2); AddToAugmentations(CranialSignalProcessorsG2);
@ -696,7 +664,6 @@ initAugmentations = function() {
"Increases the player's hacking skill by 9%"); "Increases the player's hacking skill by 9%");
CranialSignalProcessorsG3.addToFactions(["NiteSec", "The Black Hand"]); CranialSignalProcessorsG3.addToFactions(["NiteSec", "The Black Hand"]);
if (augmentationExists(AugmentationNames.CranialSignalProcessorsG3)) { if (augmentationExists(AugmentationNames.CranialSignalProcessorsG3)) {
CranialSignalProcessorsG3.owned = Augmentations[AugmentationNames.CranialSignalProcessorsG3].owned;
delete Augmentations[AugmentationNames.CranialSignalProcessorsG3]; delete Augmentations[AugmentationNames.CranialSignalProcessorsG3];
} }
AddToAugmentations(CranialSignalProcessorsG3); AddToAugmentations(CranialSignalProcessorsG3);
@ -713,7 +680,6 @@ initAugmentations = function() {
"Increases the amount of money the player can inject into servers using grow() by 25%"); "Increases the amount of money the player can inject into servers using grow() by 25%");
CranialSignalProcessorsG4.addToFactions(["The Black Hand"]); CranialSignalProcessorsG4.addToFactions(["The Black Hand"]);
if (augmentationExists(AugmentationNames.CranialSignalProcessorsG4)) { if (augmentationExists(AugmentationNames.CranialSignalProcessorsG4)) {
CranialSignalProcessorsG4.owned = Augmentations[AugmentationNames.CranialSignalProcessorsG4].owned;
delete Augmentations[AugmentationNames.CranialSignalProcessorsG4]; delete Augmentations[AugmentationNames.CranialSignalProcessorsG4];
} }
AddToAugmentations(CranialSignalProcessorsG4); AddToAugmentations(CranialSignalProcessorsG4);
@ -730,7 +696,6 @@ initAugmentations = function() {
"Increases the amount of money the player can inject into servers using grow() by 75%"); "Increases the amount of money the player can inject into servers using grow() by 75%");
CranialSignalProcessorsG5.addToFactions(["BitRunners"]); CranialSignalProcessorsG5.addToFactions(["BitRunners"]);
if (augmentationExists(AugmentationNames.CranialSignalProcessorsG5)) { if (augmentationExists(AugmentationNames.CranialSignalProcessorsG5)) {
CranialSignalProcessorsG5.owned = Augmentations[AugmentationNames.CranialSignalProcessorsG5].owned;
delete Augmentations[AugmentationNames.CranialSignalProcessorsG5]; delete Augmentations[AugmentationNames.CranialSignalProcessorsG5];
} }
AddToAugmentations(CranialSignalProcessorsG5); AddToAugmentations(CranialSignalProcessorsG5);
@ -746,7 +711,6 @@ initAugmentations = function() {
"Increases the player's hacking speed by 3%"); "Increases the player's hacking speed by 3%");
NeuronalDensification.addToFactions(["Clarke Incorporated"]); NeuronalDensification.addToFactions(["Clarke Incorporated"]);
if (augmentationExists(AugmentationNames.NeuronalDensification)) { if (augmentationExists(AugmentationNames.NeuronalDensification)) {
NeuronalDensification.owned = Augmentations[AugmentationNames.NeuronalDensification].owned;
delete Augmentations[AugmentationNames.NeuronalDensification]; delete Augmentations[AugmentationNames.NeuronalDensification];
} }
AddToAugmentations(NeuronalDensification); AddToAugmentations(NeuronalDensification);
@ -762,7 +726,6 @@ initAugmentations = function() {
NuoptimalInjectorImplant.addToFactions(["Tian Di Hui", "Volhaven", "New Tokyo", "Chongqing", "Ishima", NuoptimalInjectorImplant.addToFactions(["Tian Di Hui", "Volhaven", "New Tokyo", "Chongqing", "Ishima",
"Clarke Incorporated", "Four Sigma", "Bachman & Associates"]); "Clarke Incorporated", "Four Sigma", "Bachman & Associates"]);
if (augmentationExists(AugmentationNames.NuoptimalInjectorImplant)) { if (augmentationExists(AugmentationNames.NuoptimalInjectorImplant)) {
NuoptimalInjectorImplant.owned = Augmentations[AugmentationNames.NuoptimalInjectorImplant].owned;
delete Augmentations[AugmentationNames.NuoptimalInjectorImplant]; delete Augmentations[AugmentationNames.NuoptimalInjectorImplant];
} }
AddToAugmentations(NuoptimalInjectorImplant); AddToAugmentations(NuoptimalInjectorImplant);
@ -778,7 +741,6 @@ initAugmentations = function() {
SpeechEnhancement.addToFactions(["Tian Di Hui", "Speakers for the Dead", "Four Sigma", "KuaiGong International", SpeechEnhancement.addToFactions(["Tian Di Hui", "Speakers for the Dead", "Four Sigma", "KuaiGong International",
"Clarke Incorporated", "Four Sigma", "Bachman & Associates"]); "Clarke Incorporated", "Four Sigma", "Bachman & Associates"]);
if (augmentationExists(AugmentationNames.SpeechEnhancement)) { if (augmentationExists(AugmentationNames.SpeechEnhancement)) {
SpeechEnhancement.owned = Augmentations[AugmentationNames.SpeechEnhancement].owned;
delete Augmentations[AugmentationNames.SpeechEnhancement]; delete Augmentations[AugmentationNames.SpeechEnhancement];
} }
AddToAugmentations(SpeechEnhancement); AddToAugmentations(SpeechEnhancement);
@ -793,7 +755,6 @@ initAugmentations = function() {
"Increases the amount of reputation the player gains when working for a company by 10%"); "Increases the amount of reputation the player gains when working for a company by 10%");
FocusWire.addToFactions(["Bachman & Associates", "Clarke Incorporated", "Four Sigma", "KuaiGong International"]); FocusWire.addToFactions(["Bachman & Associates", "Clarke Incorporated", "Four Sigma", "KuaiGong International"]);
if (augmentationExists(AugmentationNames.FocusWire)) { if (augmentationExists(AugmentationNames.FocusWire)) {
FocusWire.owned = Augmentations[AugmentationNames.FocusWire].owned;
delete Augmentations[AugmentationNames.FocusWire]; delete Augmentations[AugmentationNames.FocusWire];
} }
AddToAugmentations(FocusWire) AddToAugmentations(FocusWire)
@ -808,7 +769,6 @@ initAugmentations = function() {
"Increases the player's hacking skill by 8%"); "Increases the player's hacking skill by 8%");
PCDNI.addToFactions(["Four Sigma", "OmniTek Incorporated", "ECorp", "Blade Industries"]); PCDNI.addToFactions(["Four Sigma", "OmniTek Incorporated", "ECorp", "Blade Industries"]);
if (augmentationExists(AugmentationNames.PCDNI)) { if (augmentationExists(AugmentationNames.PCDNI)) {
PCDNI.owned = Augmentations[AugmentationNames.PCDNI].owned;
delete Augmentations[AugmentationNames.PCDNI]; delete Augmentations[AugmentationNames.PCDNI];
} }
AddToAugmentations(PCDNI); AddToAugmentations(PCDNI);
@ -823,7 +783,6 @@ initAugmentations = function() {
"Increases the player's hacking skill by 10%"); "Increases the player's hacking skill by 10%");
PCDNIOptimizer.addToFactions(["Fulcrum Secret Technologies", "ECorp", "Blade Industries"]); PCDNIOptimizer.addToFactions(["Fulcrum Secret Technologies", "ECorp", "Blade Industries"]);
if (augmentationExists(AugmentationNames.PCDNIOptimizer)) { if (augmentationExists(AugmentationNames.PCDNIOptimizer)) {
PCDNIOptimizer.owned = Augmentations[AugmentationNames.PCDNIOptimizer].owned;
delete Augmentations[AugmentationNames.PCDNIOptimizer]; delete Augmentations[AugmentationNames.PCDNIOptimizer];
} }
AddToAugmentations(PCDNIOptimizer); AddToAugmentations(PCDNIOptimizer);
@ -840,7 +799,6 @@ initAugmentations = function() {
"Increases the player's hacking speed by 5%"); "Increases the player's hacking speed by 5%");
PCDNINeuralNetwork.addToFactions(["Fulcrum Secret Technologies"]); PCDNINeuralNetwork.addToFactions(["Fulcrum Secret Technologies"]);
if (augmentationExists(AugmentationNames.PCDNINeuralNetwork)) { if (augmentationExists(AugmentationNames.PCDNINeuralNetwork)) {
PCDNINeuralNetwork.owned = Augmentations[AugmentationNames.PCDNINeuralNetwork].owned;
delete Augmentations[AugmentationNames.PCDNINeuralNetwork]; delete Augmentations[AugmentationNames.PCDNINeuralNetwork];
} }
AddToAugmentations(PCDNINeuralNetwork); AddToAugmentations(PCDNINeuralNetwork);
@ -855,7 +813,6 @@ initAugmentations = function() {
"Increases the amount of reputation the player gains for a faction by 10%"); "Increases the amount of reputation the player gains for a faction by 10%");
ADRPheromone1.addToFactions(["Tian Di Hui", "The Syndicate", "NWO", "MegaCorp", "Four Sigma"]); ADRPheromone1.addToFactions(["Tian Di Hui", "The Syndicate", "NWO", "MegaCorp", "Four Sigma"]);
if (augmentationExists(AugmentationNames.ADRPheromone1)) { if (augmentationExists(AugmentationNames.ADRPheromone1)) {
ADRPheromone1.owned = Augmentations[AugmentationNames.ADRPheromone1].owned;
delete Augmentations[AugmentationNames.ADRPheromone1]; delete Augmentations[AugmentationNames.ADRPheromone1];
} }
AddToAugmentations(ADRPheromone1); AddToAugmentations(ADRPheromone1);
@ -868,10 +825,9 @@ initAugmentations = function() {
"for the Hacknet Node that provides better performance.<br><br>" + "for the Hacknet Node that provides better performance.<br><br>" +
"This augmentation:<br>" + "This augmentation:<br>" +
"Increases the amount of money produced by Hacknet Nodes by 15%<br>" + "Increases the amount of money produced by Hacknet Nodes by 15%<br>" +
"Decreases the cost of purchasing a Hacknet Node Core by 15%"); "Decreases the cost of purchasing a Hacknet Node by 15%");
HacknetNodeCPUUpload.addToFactions(["Netburners"]); HacknetNodeCPUUpload.addToFactions(["Netburners"]);
if (augmentationExists(AugmentationNames.HacknetNodeCPUUpload)) { if (augmentationExists(AugmentationNames.HacknetNodeCPUUpload)) {
HacknetNodeCPUUpload.owned = Augmentations[AugmentationNames.HacknetNodeCPUUpload].owned;
delete Augmentations[AugmentationNames.HacknetNodeCPUUpload]; delete Augmentations[AugmentationNames.HacknetNodeCPUUpload];
} }
AddToAugmentations(HacknetNodeCPUUpload); AddToAugmentations(HacknetNodeCPUUpload);
@ -886,7 +842,6 @@ initAugmentations = function() {
"Decreases the cost of leveling up a Hacknet Node by 15%"); "Decreases the cost of leveling up a Hacknet Node by 15%");
HacknetNodeCacheUpload.addToFactions(["Netburners"]); HacknetNodeCacheUpload.addToFactions(["Netburners"]);
if (augmentationExists(AugmentationNames.HacknetNodeCacheUpload)) { if (augmentationExists(AugmentationNames.HacknetNodeCacheUpload)) {
HacknetNodeCacheUpload.owned = Augmentations[AugmentationNames.HacknetNodeCacheUpload].owned;
delete Augmentations[AugmentationNames.HacknetNodeCacheUpload]; delete Augmentations[AugmentationNames.HacknetNodeCacheUpload];
} }
AddToAugmentations(HacknetNodeCacheUpload); AddToAugmentations(HacknetNodeCacheUpload);
@ -901,7 +856,6 @@ initAugmentations = function() {
"Decreases the cost of purchasing a Hacknet Node by 10%"); "Decreases the cost of purchasing a Hacknet Node by 10%");
HacknetNodeNICUpload.addToFactions(["Netburners"]); HacknetNodeNICUpload.addToFactions(["Netburners"]);
if (augmentationExists(AugmentationNames.HacknetNodeNICUpload)) { if (augmentationExists(AugmentationNames.HacknetNodeNICUpload)) {
HacknetNodeNICUpload.owned = Augmentations[AugmentationNames.HacknetNodeNICUpload].owned;
delete Augmentations[AugmentationNames.HacknetNodeNICUpload]; delete Augmentations[AugmentationNames.HacknetNodeNICUpload];
} }
AddToAugmentations(HacknetNodeNICUpload); AddToAugmentations(HacknetNodeNICUpload);
@ -914,7 +868,6 @@ initAugmentations = function() {
"This augmentation increases the amount of money produced by Hacknet Nodes by 25%."); "This augmentation increases the amount of money produced by Hacknet Nodes by 25%.");
HacknetNodeKernelDNI.addToFactions(["Netburners"]); HacknetNodeKernelDNI.addToFactions(["Netburners"]);
if (augmentationExists(AugmentationNames.HacknetNodeKernelDNI)) { if (augmentationExists(AugmentationNames.HacknetNodeKernelDNI)) {
HacknetNodeKernelDNI.owned = Augmentations[AugmentationNames.HacknetNodeKernelDNI].owned;
delete Augmentations[AugmentationNames.HacknetNodeKernelDNI]; delete Augmentations[AugmentationNames.HacknetNodeKernelDNI];
} }
AddToAugmentations(HacknetNodeKernelDNI); AddToAugmentations(HacknetNodeKernelDNI);
@ -927,7 +880,6 @@ initAugmentations = function() {
"This augmentation increases the amount of money produced by Hacknet Nodes by 45%."); "This augmentation increases the amount of money produced by Hacknet Nodes by 45%.");
HacknetNodeCoreDNI.addToFactions(["Netburners"]); HacknetNodeCoreDNI.addToFactions(["Netburners"]);
if (augmentationExists(AugmentationNames.HacknetNodeCoreDNI)) { if (augmentationExists(AugmentationNames.HacknetNodeCoreDNI)) {
HacknetNodeCoreDNI.owned = Augmentations[AugmentationNames.HacknetNodeCoreDNI].owned;
delete Augmentations[AugmentationNames.HacknetNodeCoreDNI]; delete Augmentations[AugmentationNames.HacknetNodeCoreDNI];
} }
AddToAugmentations(HacknetNodeCoreDNI); AddToAugmentations(HacknetNodeCoreDNI);
@ -935,14 +887,16 @@ initAugmentations = function() {
//Misc/Hybrid augmentations //Misc/Hybrid augmentations
var NeuroFluxGovernor = new Augmentation(AugmentationNames.NeuroFluxGovernor); var NeuroFluxGovernor = new Augmentation(AugmentationNames.NeuroFluxGovernor);
if (augmentationExists(AugmentationNames.NeuroFluxGovernor)) { if (augmentationExists(AugmentationNames.NeuroFluxGovernor)) {
var oldAug = Augmentations[AugmentationNames.NeuroFluxGovernor]; var nextLevel = getNextNeurofluxLevel();
NeuroFluxGovernor.owned = oldAug.owned; NeuroFluxGovernor.level = nextLevel - 1;
NeuroFluxGovernor.level = oldAug.level;
mult = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, NeuroFluxGovernor.level); mult = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, NeuroFluxGovernor.level);
NeuroFluxGovernor.setRequirements(500 * mult, 750000 * mult); NeuroFluxGovernor.setRequirements(500 * mult, 750000 * mult);
delete Augmentations[AugmentationNames.NeuroFluxGovernor]; delete Augmentations[AugmentationNames.NeuroFluxGovernor];
} else { } else {
NeuroFluxGovernor.setRequirements(250, 500000); var nextLevel = getNextNeurofluxLevel();
NeuroFluxGovernor.level = nextLevel - 1;
mult = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, NeuroFluxGovernor.level);
NeuroFluxGovernor.setRequirements(500 * mult, 750000 * mult);
} }
NeuroFluxGovernor.setInfo("A device that is embedded in the back of the neck. The NeuroFlux Governor " + NeuroFluxGovernor.setInfo("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, " + "monitors and regulates nervous impulses coming to and from the spinal column, " +
@ -962,7 +916,6 @@ initAugmentations = function() {
"This augmentation increases the player's experience gain rate for all stats by 10%"); "This augmentation increases the player's experience gain rate for all stats by 10%");
Neurotrainer1.addToFactions(["CyberSec"]); Neurotrainer1.addToFactions(["CyberSec"]);
if (augmentationExists(AugmentationNames.Neurotrainer1)) { if (augmentationExists(AugmentationNames.Neurotrainer1)) {
Neurotrainer1.owned = Augmentations[AugmentationNames.Neurotrainer1].owned;
delete Augmentations[AugmentationNames.Neurotrainer1]; delete Augmentations[AugmentationNames.Neurotrainer1];
} }
AddToAugmentations(Neurotrainer1); AddToAugmentations(Neurotrainer1);
@ -975,7 +928,6 @@ initAugmentations = function() {
"This augmentation increases the player's experience gain rate for all stats by 15%"); "This augmentation increases the player's experience gain rate for all stats by 15%");
Neurotrainer2.addToFactions(["BitRunners", "NiteSec"]); Neurotrainer2.addToFactions(["BitRunners", "NiteSec"]);
if (augmentationExists(AugmentationNames.Neurotrainer2)) { if (augmentationExists(AugmentationNames.Neurotrainer2)) {
Neurotrainer2.owned = Augmentations[AugmentationNames.Neurotrainer2].owned;
delete Augmentations[AugmentationNames.Neurotrainer2]; delete Augmentations[AugmentationNames.Neurotrainer2];
} }
AddToAugmentations(Neurotrainer2); AddToAugmentations(Neurotrainer2);
@ -988,7 +940,6 @@ initAugmentations = function() {
"This augmentation increases the player's experience gain rate for all stats by 20%"); "This augmentation increases the player's experience gain rate for all stats by 20%");
Neurotrainer3.addToFactions(["NWO", "Four Sigma"]); Neurotrainer3.addToFactions(["NWO", "Four Sigma"]);
if (augmentationExists(AugmentationNames.Neurotrainer3)) { if (augmentationExists(AugmentationNames.Neurotrainer3)) {
Neurotrainer3.owned = Augmentations[AugmentationNames.Neurotrainer3].owned;
delete Augmentations[AugmentationNames.Neurotrainer3]; delete Augmentations[AugmentationNames.Neurotrainer3];
} }
AddToAugmentations(Neurotrainer3); AddToAugmentations(Neurotrainer3);
@ -1004,7 +955,6 @@ initAugmentations = function() {
Hypersight.setRequirements(60000, 550000000); Hypersight.setRequirements(60000, 550000000);
Hypersight.addToFactions(["Blade Industries", "KuaiGong International"]); Hypersight.addToFactions(["Blade Industries", "KuaiGong International"]);
if (augmentationExists(AugmentationNames.Hypersight)) { if (augmentationExists(AugmentationNames.Hypersight)) {
Hypersight.owned = Augmentations[AugmentationNames.Hypersight].owned;
delete Augmentations[AugmentationNames.Hypersight]; delete Augmentations[AugmentationNames.Hypersight];
} }
AddToAugmentations(Hypersight); AddToAugmentations(Hypersight);
@ -1019,7 +969,6 @@ initAugmentations = function() {
LuminCloaking1.setRequirements(600, 1000000); LuminCloaking1.setRequirements(600, 1000000);
LuminCloaking1.addToFactions(["Slum Snakes", "Tetrads"]); LuminCloaking1.addToFactions(["Slum Snakes", "Tetrads"]);
if (augmentationExists(AugmentationNames.LuminCloaking1)) { if (augmentationExists(AugmentationNames.LuminCloaking1)) {
LuminCloaking1.owned = Augmentations[AugmentationNames.LuminCloaking1].owned;
delete Augmentations[AugmentationNames.LuminCloaking1]; delete Augmentations[AugmentationNames.LuminCloaking1];
} }
AddToAugmentations(LuminCloaking1); AddToAugmentations(LuminCloaking1);
@ -1036,7 +985,6 @@ initAugmentations = function() {
LuminCloaking2.setRequirements(2000, 5000000); LuminCloaking2.setRequirements(2000, 5000000);
LuminCloaking2.addToFactions(["Slum Snakes", "Tetrads"]); LuminCloaking2.addToFactions(["Slum Snakes", "Tetrads"]);
if (augmentationExists(AugmentationNames.LuminCloaking2)) { if (augmentationExists(AugmentationNames.LuminCloaking2)) {
LuminCloaking2.owned = Augmentations[AugmentationNames.LuminCloaking2].owned;
delete Augmentations[AugmentationNames.LuminCloaking2]; delete Augmentations[AugmentationNames.LuminCloaking2];
} }
AddToAugmentations(LuminCloaking2); AddToAugmentations(LuminCloaking2);
@ -1051,7 +999,6 @@ initAugmentations = function() {
SmartSonar.setRequirements(9000, 12000000); SmartSonar.setRequirements(9000, 12000000);
SmartSonar.addToFactions(["Slum Snakes"]); SmartSonar.addToFactions(["Slum Snakes"]);
if (augmentationExists(AugmentationNames.SmartSonar)) { if (augmentationExists(AugmentationNames.SmartSonar)) {
SmartSonar.owned = Augmentations[AugmentationNames.SmartSonar].owned;
delete Augmentations[AugmentationNames.SmartSonar]; delete Augmentations[AugmentationNames.SmartSonar];
} }
AddToAugmentations(SmartSonar); AddToAugmentations(SmartSonar);
@ -1066,7 +1013,6 @@ initAugmentations = function() {
PowerRecirculator.setRequirements(10000, 33000000); PowerRecirculator.setRequirements(10000, 33000000);
PowerRecirculator.addToFactions(["Tetrads", "The Dark Army", "The Syndicate", "NWO"]); PowerRecirculator.addToFactions(["Tetrads", "The Dark Army", "The Syndicate", "NWO"]);
if (augmentationExists(AugmentationNames.PowerRecirculator)) { if (augmentationExists(AugmentationNames.PowerRecirculator)) {
PowerRecirculator.owned = Augmentations[AugmentationNames.PowerRecirculator].owned;
delete Augmentations[AugmentationNames.PowerRecirculator]; delete Augmentations[AugmentationNames.PowerRecirculator];
} }
AddToAugmentations(PowerRecirculator); AddToAugmentations(PowerRecirculator);
@ -1088,7 +1034,6 @@ initAugmentations = function() {
QLink.setRequirements(750000, 1200000000); QLink.setRequirements(750000, 1200000000);
QLink.addToFactions(["Illuminati"]); QLink.addToFactions(["Illuminati"]);
if (augmentationExists(AugmentationNames.QLink)) { if (augmentationExists(AugmentationNames.QLink)) {
QLink.owned = Augmentations[AugmentationNames.QLink].owned;
delete Augmentations[AugmentationNames.QLink]; delete Augmentations[AugmentationNames.QLink];
} }
AddToAugmentations(QLink); AddToAugmentations(QLink);
@ -1108,7 +1053,6 @@ initAugmentations = function() {
SPTN97.setRequirements(500000, 950000000); SPTN97.setRequirements(500000, 950000000);
SPTN97.addToFactions(["The Covenant"]); SPTN97.addToFactions(["The Covenant"]);
if (augmentationExists(AugmentationNames.SPTN97)) { if (augmentationExists(AugmentationNames.SPTN97)) {
SPTN97.owned = Augmentations[AugmentationNames.SPTN97].owned;
delete Augmentations[AugmentationNames.SPTN97]; delete Augmentations[AugmentationNames.SPTN97];
} }
AddToAugmentations(SPTN97); AddToAugmentations(SPTN97);
@ -1121,7 +1065,6 @@ initAugmentations = function() {
HiveMind.setRequirements(600000, 1000000000); HiveMind.setRequirements(600000, 1000000000);
HiveMind.addToFactions(["ECorp"]); HiveMind.addToFactions(["ECorp"]);
if (augmentationExists(AugmentationNames.HiveMind)) { if (augmentationExists(AugmentationNames.HiveMind)) {
HiveMind.owned = Augmentations[AugmentationNames.HiveMind].owned;
delete Augmentations[AugmentationNames.HiveMind]; delete Augmentations[AugmentationNames.HiveMind];
} }
AddToAugmentations(HiveMind); AddToAugmentations(HiveMind);
@ -1138,7 +1081,6 @@ initAugmentations = function() {
CordiARCReactor.setRequirements(450000, 975000000); CordiARCReactor.setRequirements(450000, 975000000);
CordiARCReactor.addToFactions(["MegaCorp"]); CordiARCReactor.addToFactions(["MegaCorp"]);
if (augmentationExists(AugmentationNames.CordiARCReactor)) { if (augmentationExists(AugmentationNames.CordiARCReactor)) {
CordiARCReactor.owned = Augmentations[AugmentationNames.CordiARCReactor].owned;
delete Augmentations[AugmentationNames.CordiARCReactor]; delete Augmentations[AugmentationNames.CordiARCReactor];
} }
AddToAugmentations(CordiARCReactor); AddToAugmentations(CordiARCReactor);
@ -1156,7 +1098,6 @@ initAugmentations = function() {
SmartJaw.setRequirements(150000, 500000000); SmartJaw.setRequirements(150000, 500000000);
SmartJaw.addToFactions(["Bachman & Associates"]); SmartJaw.addToFactions(["Bachman & Associates"]);
if (augmentationExists(AugmentationNames.SmartJaw)) { if (augmentationExists(AugmentationNames.SmartJaw)) {
SmartJaw.owned = Augmentations[AugmentationNames.SmartJaw].owned;
delete Augmentations[AugmentationNames.SmartJaw]; delete Augmentations[AugmentationNames.SmartJaw];
} }
AddToAugmentations(SmartJaw); AddToAugmentations(SmartJaw);
@ -1171,7 +1112,6 @@ initAugmentations = function() {
Neotra.setRequirements(225000, 550000000); Neotra.setRequirements(225000, 550000000);
Neotra.addToFactions(["Blade Industries"]); Neotra.addToFactions(["Blade Industries"]);
if (augmentationExists(AugmentationNames.Neotra)) { if (augmentationExists(AugmentationNames.Neotra)) {
Neotra.owned = Augmentations[AugmentationNames.Neotra].owned;
delete Augmentations[AugmentationNames.Neotra]; delete Augmentations[AugmentationNames.Neotra];
} }
AddToAugmentations(Neotra); AddToAugmentations(Neotra);
@ -1187,7 +1127,6 @@ initAugmentations = function() {
Xanipher.setRequirements(350000, 800000000); Xanipher.setRequirements(350000, 800000000);
Xanipher.addToFactions(["NWO"]); Xanipher.addToFactions(["NWO"]);
if (augmentationExists(AugmentationNames.Xanipher)) { if (augmentationExists(AugmentationNames.Xanipher)) {
Xanipher.owned = Augmentations[AugmentationNames.Xanipher].owned;
delete Augmentations[AugmentationNames.Xanipher]; delete Augmentations[AugmentationNames.Xanipher];
} }
AddToAugmentations(Xanipher); AddToAugmentations(Xanipher);
@ -1201,7 +1140,6 @@ initAugmentations = function() {
nextSENS.setRequirements(175000, 375000000); nextSENS.setRequirements(175000, 375000000);
nextSENS.addToFactions(["Clarke Incorporated"]); nextSENS.addToFactions(["Clarke Incorporated"]);
if (augmentationExists(AugmentationNames.nextSENS)) { if (augmentationExists(AugmentationNames.nextSENS)) {
nextSENS.owned = Augmentations[AugmentationNames.nextSENS].owned;
delete Augmentations[AugmentationNames.nextSENS]; delete Augmentations[AugmentationNames.nextSENS];
} }
AddToAugmentations(nextSENS); AddToAugmentations(nextSENS);
@ -1217,7 +1155,6 @@ initAugmentations = function() {
OmniTekInfoLoad.setRequirements(250000, 550000000) OmniTekInfoLoad.setRequirements(250000, 550000000)
OmniTekInfoLoad.addToFactions(["OmniTek Incorporated"]); OmniTekInfoLoad.addToFactions(["OmniTek Incorporated"]);
if (augmentationExists(AugmentationNames.OmniTekInfoLoad)) { if (augmentationExists(AugmentationNames.OmniTekInfoLoad)) {
OmniTekInfoLoad.owned = Augmentations[AugmentationNames.OmniTekInfoLoad].owned;
delete Augmentations[AugmentationNames.OmniTekInfoLoad]; delete Augmentations[AugmentationNames.OmniTekInfoLoad];
} }
AddToAugmentations(OmniTekInfoLoad); AddToAugmentations(OmniTekInfoLoad);
@ -1235,7 +1172,6 @@ initAugmentations = function() {
PhotosyntheticCells.setRequirements(225000, 525000000); PhotosyntheticCells.setRequirements(225000, 525000000);
PhotosyntheticCells.addToFactions(["KuaiGong International"]); PhotosyntheticCells.addToFactions(["KuaiGong International"]);
if (augmentationExists(AugmentationNames.PhotosyntheticCells)) { if (augmentationExists(AugmentationNames.PhotosyntheticCells)) {
PhotosyntheticCells.owned = Augmentations[AugmentationNames.PhotosyntheticCells].owned;
delete Augmentations[AugmentationNames.PhotosyntheticCells]; delete Augmentations[AugmentationNames.PhotosyntheticCells];
} }
AddToAugmentations(PhotosyntheticCells); AddToAugmentations(PhotosyntheticCells);
@ -1254,7 +1190,6 @@ initAugmentations = function() {
Neurolink.setRequirements(350000, 850000000); Neurolink.setRequirements(350000, 850000000);
Neurolink.addToFactions(["BitRunners"]); Neurolink.addToFactions(["BitRunners"]);
if (augmentationExists(AugmentationNames.Neurolink)) { if (augmentationExists(AugmentationNames.Neurolink)) {
Neurolink.owned = Augmentations[AugmentationNames.Neurolink].owned;
delete Augmentations[AugmentationNames.Neurolink]; delete Augmentations[AugmentationNames.Neurolink];
} }
AddToAugmentations(Neurolink); AddToAugmentations(Neurolink);
@ -1273,7 +1208,6 @@ initAugmentations = function() {
TheBlackHand.setRequirements(40000, 100000000); TheBlackHand.setRequirements(40000, 100000000);
TheBlackHand.addToFactions(["The Black Hand"]); TheBlackHand.addToFactions(["The Black Hand"]);
if (augmentationExists(AugmentationNames.TheBlackHand)) { if (augmentationExists(AugmentationNames.TheBlackHand)) {
TheBlackHand.owned = Augmentations[AugmentationNames.TheBlackHand].owned;
delete Augmentations[AugmentationNames.TheBlackHand]; delete Augmentations[AugmentationNames.TheBlackHand];
} }
AddToAugmentations(TheBlackHand); AddToAugmentations(TheBlackHand);
@ -1289,7 +1223,6 @@ initAugmentations = function() {
CRTX42AA.setRequirements(18000, 45000000); CRTX42AA.setRequirements(18000, 45000000);
CRTX42AA.addToFactions(["NiteSec"]); CRTX42AA.addToFactions(["NiteSec"]);
if (augmentationExists(AugmentationNames.CRTX42AA)) { if (augmentationExists(AugmentationNames.CRTX42AA)) {
CRTX42AA.owned = Augmentations[AugmentationNames.CRTX42AA].owned;
delete Augmentations[AugmentationNames.CRTX42AA]; delete Augmentations[AugmentationNames.CRTX42AA];
} }
AddToAugmentations(CRTX42AA); AddToAugmentations(CRTX42AA);
@ -1303,7 +1236,6 @@ initAugmentations = function() {
Neuregen.setRequirements(15000, 75000000); Neuregen.setRequirements(15000, 75000000);
Neuregen.addToFactions(["Chongqing"]); Neuregen.addToFactions(["Chongqing"]);
if (augmentationExists(AugmentationNames.Neuregen)) { if (augmentationExists(AugmentationNames.Neuregen)) {
Neuregen.owned = Augmentations[AugmentationNames.Neuregen].owned;
delete Augmentations[AugmentationNames.Neuregen]; delete Augmentations[AugmentationNames.Neuregen];
} }
AddToAugmentations(Neuregen); AddToAugmentations(Neuregen);
@ -1319,7 +1251,6 @@ initAugmentations = function() {
CashRoot.setRequirements(5000, 25000000); CashRoot.setRequirements(5000, 25000000);
CashRoot.addToFactions(["Sector-12"]); CashRoot.addToFactions(["Sector-12"]);
if (augmentationExists(AugmentationNames.CashRoot)) { if (augmentationExists(AugmentationNames.CashRoot)) {
CashRoot.owned = Augmentations[AugmentationNames.CashRoot].owned;
delete Augmentations[AugmentationNames.CashRoot]; delete Augmentations[AugmentationNames.CashRoot];
} }
AddToAugmentations(CashRoot); AddToAugmentations(CashRoot);
@ -1335,7 +1266,6 @@ initAugmentations = function() {
NutriGen.setRequirements(2500, 500000); NutriGen.setRequirements(2500, 500000);
NutriGen.addToFactions(["New Tokyo"]); NutriGen.addToFactions(["New Tokyo"]);
if (augmentationExists(AugmentationNames.NutriGen)) { if (augmentationExists(AugmentationNames.NutriGen)) {
NutriGen.owned = Augmentations[AugmentationNames.NutriGen].owned;
delete Augmentations[AugmentationNames.NutriGen]; delete Augmentations[AugmentationNames.NutriGen];
} }
AddToAugmentations(NutriGen); AddToAugmentations(NutriGen);
@ -1355,7 +1285,6 @@ initAugmentations = function() {
INFRARet.setRequirements(3000, 6000000); INFRARet.setRequirements(3000, 6000000);
INFRARet.addToFactions(["Ishima"]); INFRARet.addToFactions(["Ishima"]);
if (augmentationExists(AugmentationNames.INFRARet)) { if (augmentationExists(AugmentationNames.INFRARet)) {
INFRARet.owned = Augmentations[AugmentationNames.INFRARet].owned;
delete Augmentations[AugmentationNames.INFRARet]; delete Augmentations[AugmentationNames.INFRARet];
} }
AddToAugmentations(INFRARet); AddToAugmentations(INFRARet);
@ -1369,7 +1298,6 @@ initAugmentations = function() {
DermaForce.setRequirements(6000, 10000000); DermaForce.setRequirements(6000, 10000000);
DermaForce.addToFactions(["Volhaven"]); DermaForce.addToFactions(["Volhaven"]);
if (augmentationExists(AugmentationNames.DermaForce)) { if (augmentationExists(AugmentationNames.DermaForce)) {
DermaForce.owned = Augmentations[AugmentationNames.DermaForce].owned;
delete Augmentations[AugmentationNames.DermaForce]; delete Augmentations[AugmentationNames.DermaForce];
} }
AddToAugmentations(DermaForce); AddToAugmentations(DermaForce);
@ -1386,7 +1314,6 @@ initAugmentations = function() {
GrapheneBrachiBlades.setRequirements(90000, 500000000); GrapheneBrachiBlades.setRequirements(90000, 500000000);
GrapheneBrachiBlades.addToFactions(["Speakers for the Dead"]); GrapheneBrachiBlades.addToFactions(["Speakers for the Dead"]);
if (augmentationExists(AugmentationNames.GrapheneBrachiBlades)) { if (augmentationExists(AugmentationNames.GrapheneBrachiBlades)) {
GrapheneBrachiBlades.owned = Augmentations[AugmentationNames.GrapheneBrachiBlades].owned;
delete Augmentations[AugmentationNames.GrapheneBrachiBlades]; delete Augmentations[AugmentationNames.GrapheneBrachiBlades];
} }
AddToAugmentations(GrapheneBrachiBlades); AddToAugmentations(GrapheneBrachiBlades);
@ -1400,7 +1327,6 @@ initAugmentations = function() {
GrapheneBionicArms.setRequirements(200000, 750000000); GrapheneBionicArms.setRequirements(200000, 750000000);
GrapheneBionicArms.addToFactions(["The Dark Army"]); GrapheneBionicArms.addToFactions(["The Dark Army"]);
if (augmentationExists(AugmentationNames.GrapheneBionicArms)) { if (augmentationExists(AugmentationNames.GrapheneBionicArms)) {
GrapheneBionicArms.owned = Augmentations[AugmentationNames.GrapheneBionicArms].owned;
delete Augmentations[AugmentationNames.GrapheneBionicArms]; delete Augmentations[AugmentationNames.GrapheneBionicArms];
} }
AddToAugmentations(GrapheneBionicArms); AddToAugmentations(GrapheneBionicArms);
@ -1415,7 +1341,6 @@ initAugmentations = function() {
BrachiBlades.setRequirements(5000, 18000000); BrachiBlades.setRequirements(5000, 18000000);
BrachiBlades.addToFactions(["The Syndicate"]); BrachiBlades.addToFactions(["The Syndicate"]);
if (augmentationExists(AugmentationNames.BrachiBlades)) { if (augmentationExists(AugmentationNames.BrachiBlades)) {
BrachiBlades.owned = Augmentations[AugmentationNames.BrachiBlades].owned;
delete Augmentations[AugmentationNames.BrachiBlades]; delete Augmentations[AugmentationNames.BrachiBlades];
} }
AddToAugmentations(BrachiBlades); AddToAugmentations(BrachiBlades);
@ -1428,7 +1353,6 @@ initAugmentations = function() {
BionicArms.setRequirements(25000, 55000000); BionicArms.setRequirements(25000, 55000000);
BionicArms.addToFactions(["Tetrads"]); BionicArms.addToFactions(["Tetrads"]);
if (augmentationExists(AugmentationNames.BionicArms)) { if (augmentationExists(AugmentationNames.BionicArms)) {
BionicArms.owned = Augmentations[AugmentationNames.BionicArms].owned;
delete Augmentations[AugmentationNames.BionicArms]; delete Augmentations[AugmentationNames.BionicArms];
} }
AddToAugmentations(BionicArms); AddToAugmentations(BionicArms);
@ -1444,18 +1368,21 @@ initAugmentations = function() {
SNA.setRequirements(2500, 6000000); SNA.setRequirements(2500, 6000000);
SNA.addToFactions(["Tian Di Hui"]); SNA.addToFactions(["Tian Di Hui"]);
if (augmentationExists(AugmentationNames.SNA)) { if (augmentationExists(AugmentationNames.SNA)) {
SNA.owned = Augmentations[AugmentationNames.SNA].owned;
delete Augmentations[AugmentationNames.SNA]; delete Augmentations[AugmentationNames.SNA];
} }
AddToAugmentations(SNA); AddToAugmentations(SNA);
//Update costs based on how many have been purchased
var mult = Math.pow(CONSTANTS.MultipleAugMultiplier, Player.queuedAugmentations.length);
for (var name in Augmentations) {
if (Augmentations.hasOwnProperty(name)) {
Augmentations[name].baseCost *= mult;
}
}
} }
applyAugmentation = function(aug, reapply=false) { applyAugmentation = function(aug, reapply=false) {
if (reapply == false && aug.name != AugmentationNames.NeuroFluxGovernor && aug.owned) { Augmentations[aug.name].owned = true;
throw new Error("This Augmentation is already owned/applied...somethings wrong");
return;
}
switch(aug.name) { switch(aug.name) {
//Combat stat augmentations //Combat stat augmentations
case AugmentationNames.Targeting1: case AugmentationNames.Targeting1:
@ -1725,7 +1652,13 @@ applyAugmentation = function(aug, reapply=false) {
Player.work_money_mult *= 1.01; Player.work_money_mult *= 1.01;
if (!reapply) { if (!reapply) {
++aug.level; Augmentations[aug.name].level = aug.level;
for (var i = 0; i < Player.augmentations.length; ++i) {
if (Player.augmentations[i].name == AugmentationNames.NeuroFluxGovernor) {
Player.augmentations[i].level = aug.level;
break;
}
}
} }
break; break;
case AugmentationNames.Neurotrainer1: //Low Level case AugmentationNames.Neurotrainer1: //Low Level
@ -1924,19 +1857,48 @@ applyAugmentation = function(aug, reapply=false) {
return; return;
} }
aug.owned = true; if (aug.name == AugmentationNames.NeuroFluxGovernor) {
if (aug.name == AugmentationNames.NeuroFluxGovernor && for (var i = 0; i < Player.augmentations.length; ++i) {
Player.augmentations.indexOf(AugmentationNames.NeuroFluxGovernor) != -1) { if (Player.augmentations[i].name == AugmentationNames.NeuroFluxGovernor) {
//Already have this aug, just upgrade the level //Already have this aug, just upgrade the level
return; return;
} }
}
}
if (!reapply) { if (!reapply) {
Player.augmentations.push(aug.name); var ownedAug = new PlayerOwnedAugmentation(aug.name);
++Player.numAugmentations; Player.augmentations.push(ownedAug);
} }
} }
function PlayerOwnedAugmentation(name) {
this.name = name;
this.level = 1;
}
function installAugmentations() {
if (Player.queuedAugmentations.length == 0) {
dialogBoxCreate("You have not purchased any Augmentations to install!");
return;
}
var augmentationList = "";
for (var i = 0; i < Player.queuedAugmentations.length; ++i) {
var aug = Augmentations[Player.queuedAugmentations[i].name];
if (aug == null) {
console.log("ERROR. Invalid augmentation");
continue;
}
applyAugmentation(Player.queuedAugmentations[i]);
augmentationList += (aug.name + "<br>");
}
Player.queuedAugmentations = [];
dialogBoxCreate("You slowly drift to sleep as scientists put you under in order " +
"to install the following Augmentations:<br>" + augmentationList +
"<br>You wake up in your home...you feel different...");
prestigeAugmentation();
}
PlayerObject.prototype.reapplyAllAugmentations = function() { PlayerObject.prototype.reapplyAllAugmentations = function() {
console.log("Re-applying augmentations"); console.log("Re-applying augmentations");
//Reset multipliers //Reset multipliers
@ -1974,18 +1936,29 @@ PlayerObject.prototype.reapplyAllAugmentations = function() {
this.work_money_mult = 1; this.work_money_mult = 1;
for (i = 0; i < this.augmentations.length; ++i) { for (i = 0; i < this.augmentations.length; ++i) {
var aug = Augmentations[this.augmentations[i]]; //Compatibility with new version
if (typeof this.augmentations[i] === 'string' || this.augmentations[i] instanceof String) {
var newOwnedAug = new PlayerOwnedAugmentation(this.augmentations[i]);
if (this.augmentations[i] == AugmentationNames.NeuroFluxGovernor) {
newOwnedAug.level = Augmentations[AugmentationNames.NeuroFluxGovernor].level;
}
this.augmentations[i] = newOwnedAug;
}
var augName = this.augmentations[i].name;
var aug = Augmentations[augName];
aug.owned = true;
if (aug == null) { if (aug == null) {
console.log("WARNING: Invalid augmentation name"); console.log("WARNING: Invalid augmentation name");
continue; continue;
} }
if (aug.name == AugmentationNames.NeuroFluxGovernor) { if (aug.name == AugmentationNames.NeuroFluxGovernor) {
for (j = 0; j < aug.level; ++j) { for (j = 0; j < aug.level; ++j) {
applyAugmentation(aug, true); applyAugmentation(this.augmentations[i], true);
} }
continue; continue;
} }
applyAugmentation(aug, true); applyAugmentation(this.augmentations[i], true);
} }
} }
@ -1998,7 +1971,8 @@ function giveAllAugmentations() {
for (var name in Augmentations) { for (var name in Augmentations) {
var aug = Augmentations[name]; var aug = Augmentations[name];
if (aug == null) {continue;} if (aug == null) {continue;}
Player.augmentations.push(name); var ownedAug = new PlayerOwnedAugmentation(name);
Player.augmentations.push(ownedAug);
} }
Player.reapplyAllAugmentations(); Player.reapplyAllAugmentations();
} }

@ -82,7 +82,7 @@ function CompanyPosition(name, reqHack, reqStr, reqDef, reqDex, reqAgi, reqCha,
// //
//NOTE: These parameters should total to 100, such that each parameter represents a "weighting" of how //NOTE: These parameters should total to 100, such that each parameter represents a "weighting" of how
// important that stat/skill is for the job // important that stat/skill is for the job
CompanyPosition.prototype.setPerformanceParameters = function(hackEff, strEff, defEff, dexEff, agiEff, chaEff) { CompanyPosition.prototype.setPerformanceParameters = function(hackEff, strEff, defEff, dexEff, agiEff, chaEff, posMult=1) {
if (hackEff + strEff + defEff + dexEff + agiEff + chaEff != 100) { if (hackEff + strEff + defEff + dexEff + agiEff + chaEff != 100) {
console.log("CompanyPosition.setPerformanceParameters() arguments do not total to 100"); console.log("CompanyPosition.setPerformanceParameters() arguments do not total to 100");
return; return;
@ -93,6 +93,7 @@ CompanyPosition.prototype.setPerformanceParameters = function(hackEff, strEff, d
this.dexterityEffectiveness = dexEff; this.dexterityEffectiveness = dexEff;
this.agilityEffectiveness = agiEff; this.agilityEffectiveness = agiEff;
this.charismaEffectiveness = chaEff; this.charismaEffectiveness = chaEff;
this.positionMultiplier = posMult; //Reputation multiplier for this position
} }
//Set the stat/skill experience a Player should gain for working at a CompanyPosition. The experience is per game loop (200 ms) //Set the stat/skill experience a Player should gain for working at a CompanyPosition. The experience is per game loop (200 ms)
@ -115,7 +116,13 @@ CompanyPosition.prototype.calculateJobPerformance = function(hacking, str, def,
var dexRatio = this.dexterityEffectiveness * dex / CONSTANTS.MaxSkillLevel; var dexRatio = this.dexterityEffectiveness * dex / CONSTANTS.MaxSkillLevel;
var agiRatio = this.agilityEffectiveness * agi / CONSTANTS.MaxSkillLevel; var agiRatio = this.agilityEffectiveness * agi / CONSTANTS.MaxSkillLevel;
var chaRatio = this.charismaEffectiveness * cha / CONSTANTS.MaxSkillLevel; var chaRatio = this.charismaEffectiveness * cha / CONSTANTS.MaxSkillLevel;
return (hackRatio + strRatio + defRatio + dexRatio + agiRatio + chaRatio) / 100;
var reputationGain = this.positionMultiplier * (hackRatio + strRatio + defRatio + dexRatio + agiRatio + chaRatio) / 100;
if (isNaN(reputationGain)) {
console.log("ERROR: Code should not reach here");
reputationGain = (hackRatio + strRatio + defRatio + dexRatio + agiRatio + chaRatio) / 100;
}
return reputationGain;
} }
CompanyPosition.prototype.isSoftwareJob = function() { CompanyPosition.prototype.isSoftwareJob = function() {
@ -278,63 +285,63 @@ CompanyPositions = {
init: function() { init: function() {
//Argument order: hack, str, def, dex, agi, cha //Argument order: hack, str, def, dex, agi, cha
//Software //Software
CompanyPositions.SoftwareIntern.setPerformanceParameters(90, 0, 0, 0, 0, 10); CompanyPositions.SoftwareIntern.setPerformanceParameters(90, 0, 0, 0, 0, 10, 1);
CompanyPositions.SoftwareIntern.setExperienceGains(.1, 0, 0, 0, 0, .02); CompanyPositions.SoftwareIntern.setExperienceGains(.1, 0, 0, 0, 0, .02);
CompanyPositions.JuniorDev.setPerformanceParameters(85, 0, 0, 0, 0, 15); CompanyPositions.JuniorDev.setPerformanceParameters(85, 0, 0, 0, 0, 15, 1.1);
CompanyPositions.JuniorDev.setExperienceGains(.2, 0, 0, 0, 0, .04); CompanyPositions.JuniorDev.setExperienceGains(.2, 0, 0, 0, 0, .04);
CompanyPositions.SeniorDev.setPerformanceParameters(75, 0, 0, 0, 0, 25); CompanyPositions.SeniorDev.setPerformanceParameters(75, 0, 0, 0, 0, 25, 1.2);
CompanyPositions.SeniorDev.setExperienceGains(.4, 0, 0, 0, 0, .08); CompanyPositions.SeniorDev.setExperienceGains(.4, 0, 0, 0, 0, .08);
CompanyPositions.LeadDev.setPerformanceParameters(70, 0, 0, 0, 0, 30); CompanyPositions.LeadDev.setPerformanceParameters(70, 0, 0, 0, 0, 30, 1.3);
CompanyPositions.LeadDev.setExperienceGains(.5, 0, 0, 0, 0, .1); CompanyPositions.LeadDev.setExperienceGains(.5, 0, 0, 0, 0, .1);
CompanyPositions.SoftwareConsultant.setPerformanceParameters(80, 0, 0, 0, 0, 20); CompanyPositions.SoftwareConsultant.setPerformanceParameters(80, 0, 0, 0, 0, 20, 1);
CompanyPositions.SoftwareConsultant.setExperienceGains(.175, 0, 0, 0, 0, .03); CompanyPositions.SoftwareConsultant.setExperienceGains(.175, 0, 0, 0, 0, .03);
CompanyPositions.SeniorSoftwareConsultant.setPerformanceParameters(75, 0, 0, 0, 0, 25); CompanyPositions.SeniorSoftwareConsultant.setPerformanceParameters(75, 0, 0, 0, 0, 25, 1.15);
CompanyPositions.SeniorSoftwareConsultant.setExperienceGains(.35, 0, 0, 0, 0, .06); CompanyPositions.SeniorSoftwareConsultant.setExperienceGains(.35, 0, 0, 0, 0, .06);
//Security //Security
CompanyPositions.ITIntern.setPerformanceParameters(90, 0, 0, 0, 0, 10); CompanyPositions.ITIntern.setPerformanceParameters(90, 0, 0, 0, 0, 10, 1);
CompanyPositions.ITIntern.setExperienceGains(.05, 0, 0, 0, 0, .01); CompanyPositions.ITIntern.setExperienceGains(.05, 0, 0, 0, 0, .01);
CompanyPositions.ITAnalyst.setPerformanceParameters(85, 0, 0, 0, 0, 15); CompanyPositions.ITAnalyst.setPerformanceParameters(85, 0, 0, 0, 0, 15, 1.1);
CompanyPositions.ITAnalyst.setExperienceGains(.15, 0, 0, 0, 0, .02); CompanyPositions.ITAnalyst.setExperienceGains(.15, 0, 0, 0, 0, .02);
CompanyPositions.ITManager.setPerformanceParameters(75, 0, 0, 0, 0, 25); CompanyPositions.ITManager.setPerformanceParameters(75, 0, 0, 0, 0, 25, 1.2);
CompanyPositions.ITManager.setExperienceGains(.4, 0, 0, 0, 0, .1); CompanyPositions.ITManager.setExperienceGains(.4, 0, 0, 0, 0, .1);
CompanyPositions.SysAdmin.setPerformanceParameters(80, 0, 0, 0, 0, 20); CompanyPositions.SysAdmin.setPerformanceParameters(80, 0, 0, 0, 0, 20, 1.2);
CompanyPositions.SysAdmin.setExperienceGains(.5, 0, 0, 0, 0, .05); CompanyPositions.SysAdmin.setExperienceGains(.5, 0, 0, 0, 0, .05);
CompanyPositions.SecurityEngineer.setPerformanceParameters(85, 0, 0, 0, 0, 15); CompanyPositions.SecurityEngineer.setPerformanceParameters(85, 0, 0, 0, 0, 15, 1.15);
CompanyPositions.SecurityEngineer.setExperienceGains(0.4, 0, 0, 0, 0, .05); CompanyPositions.SecurityEngineer.setExperienceGains(0.4, 0, 0, 0, 0, .05);
CompanyPositions.NetworkEngineer.setPerformanceParameters(85, 0, 0, 0, 0, 15); CompanyPositions.NetworkEngineer.setPerformanceParameters(85, 0, 0, 0, 0, 15, 1.15);
CompanyPositions.NetworkEngineer.setExperienceGains(0.4, 0, 0, 0, 0, .05); CompanyPositions.NetworkEngineer.setExperienceGains(0.4, 0, 0, 0, 0, .05);
CompanyPositions.NetworkAdministrator.setPerformanceParameters(75, 0, 0, 0, 0, 25); CompanyPositions.NetworkAdministrator.setPerformanceParameters(75, 0, 0, 0, 0, 25, 1.25);
CompanyPositions.NetworkAdministrator.setExperienceGains(0.5, 0, 0, 0, 0, .1); CompanyPositions.NetworkAdministrator.setExperienceGains(0.5, 0, 0, 0, 0, .1);
//Technology management //Technology management
CompanyPositions.HeadOfSoftware.setPerformanceParameters(65, 0, 0, 0, 0, 35); CompanyPositions.HeadOfSoftware.setPerformanceParameters(65, 0, 0, 0, 0, 35, 1.4);
CompanyPositions.HeadOfSoftware.setExperienceGains(1, 0, 0, 0, 0, .5); CompanyPositions.HeadOfSoftware.setExperienceGains(1, 0, 0, 0, 0, .5);
CompanyPositions.HeadOfEngineering.setPerformanceParameters(60, 0, 0, 0, 0, 40); CompanyPositions.HeadOfEngineering.setPerformanceParameters(60, 0, 0, 0, 0, 40, 1.4);
CompanyPositions.HeadOfEngineering.setExperienceGains(1.1, 0, 0, 0, 0, .5); CompanyPositions.HeadOfEngineering.setExperienceGains(1.1, 0, 0, 0, 0, .5);
CompanyPositions.VicePresident.setPerformanceParameters(60, 0, 0, 0, 0, 40); CompanyPositions.VicePresident.setPerformanceParameters(60, 0, 0, 0, 0, 40, 1.5);
CompanyPositions.VicePresident.setExperienceGains(1.2, 0, 0, 0, 0, .6); CompanyPositions.VicePresident.setExperienceGains(1.2, 0, 0, 0, 0, .6);
CompanyPositions.CTO.setPerformanceParameters(50, 0, 0, 0, 0, 50); CompanyPositions.CTO.setPerformanceParameters(50, 0, 0, 0, 0, 50, 1.5);
CompanyPositions.CTO.setExperienceGains(1.5, 0, 0, 0, 1); CompanyPositions.CTO.setExperienceGains(1.5, 0, 0, 0, 1);
//Business //Business
CompanyPositions.BusinessIntern.setPerformanceParameters(10, 0, 0, 0, 0, 90); CompanyPositions.BusinessIntern.setPerformanceParameters(10, 0, 0, 0, 0, 90, 1);
CompanyPositions.BusinessIntern.setExperienceGains(.01, 0, 0, 0, 0, .1); CompanyPositions.BusinessIntern.setExperienceGains(.01, 0, 0, 0, 0, .1);
CompanyPositions.BusinessAnalyst.setPerformanceParameters(20, 0, 0, 0, 0, 80); CompanyPositions.BusinessAnalyst.setPerformanceParameters(20, 0, 0, 0, 0, 80, 1.1);
CompanyPositions.BusinessAnalyst.setExperienceGains(.02, 0, 0, 0, 0, .2); CompanyPositions.BusinessAnalyst.setExperienceGains(.02, 0, 0, 0, 0, .2);
CompanyPositions.BusinessManager.setPerformanceParameters(15, 0, 0, 0, 0, 85); CompanyPositions.BusinessManager.setPerformanceParameters(15, 0, 0, 0, 0, 85, 1.2);
CompanyPositions.BusinessManager.setExperienceGains(.02, 0, 0, 0, 0, .4); CompanyPositions.BusinessManager.setExperienceGains(.02, 0, 0, 0, 0, .4);
CompanyPositions.OperationsManager.setPerformanceParameters(15, 0, 0, 0, 0, 85); CompanyPositions.OperationsManager.setPerformanceParameters(15, 0, 0, 0, 0, 85, 1.2);
CompanyPositions.OperationsManager.setExperienceGains(.02, 0, 0, 0, 0, .4); CompanyPositions.OperationsManager.setExperienceGains(.02, 0, 0, 0, 0, .4);
CompanyPositions.CFO.setPerformanceParameters(10, 0, 0, 0, 0, 90); CompanyPositions.CFO.setPerformanceParameters(10, 0, 0, 0, 0, 90, 1.3);
CompanyPositions.CFO.setExperienceGains(.05, 0, 0, 0, 0, 1); CompanyPositions.CFO.setExperienceGains(.05, 0, 0, 0, 0, 1);
CompanyPositions.CEO.setPerformanceParameters(10, 0, 0, 0, 0, 90); CompanyPositions.CEO.setPerformanceParameters(10, 0, 0, 0, 0, 90, 1.5);
CompanyPositions.CEO.setExperienceGains(.1, 0, 0, 0, 0, 1.5); CompanyPositions.CEO.setExperienceGains(.1, 0, 0, 0, 0, 1.5);
CompanyPositions.BusinessConsultant.setPerformanceParameters(20, 0, 0, 0, 0, 80); CompanyPositions.BusinessConsultant.setPerformanceParameters(20, 0, 0, 0, 0, 80, 1);
CompanyPositions.BusinessConsultant.setExperienceGains(.015, 0, 0, 0, 0, .15); CompanyPositions.BusinessConsultant.setExperienceGains(.015, 0, 0, 0, 0, .15);
CompanyPositions.SeniorBusinessConsultant.setPerformanceParameters(15, 0, 0, 0, 0, 85); CompanyPositions.SeniorBusinessConsultant.setPerformanceParameters(15, 0, 0, 0, 0, 85, 1.15);
CompanyPositions.SeniorBusinessConsultant.setExperienceGains(.015, 0, 0, 0, 0, .3); CompanyPositions.SeniorBusinessConsultant.setExperienceGains(.015, 0, 0, 0, 0, .3);
//Non-tech/management jobs //Non-tech/management jobs
@ -347,23 +354,23 @@ CompanyPositions = {
CompanyPositions.Waiter.setExperienceGains(0, .01, .01, .01, .01, .05); CompanyPositions.Waiter.setExperienceGains(0, .01, .01, .01, .01, .05);
CompanyPositions.Employee.setPerformanceParameters(0, 10, 0, 10, 10, 70); CompanyPositions.Employee.setPerformanceParameters(0, 10, 0, 10, 10, 70);
CompanyPositions.Employee.setExperienceGains(0, .01, .01, .01, .01, .04); CompanyPositions.Employee.setExperienceGains(0, .01, .01, .01, .01, .04);
CompanyPositions.SecurityGuard.setPerformanceParameters(5, 20, 20, 20, 20, 15); CompanyPositions.SecurityGuard.setPerformanceParameters(5, 20, 20, 20, 20, 15, 1);
CompanyPositions.SecurityGuard.setExperienceGains(.01, .02, .02, .02, .02, .01); CompanyPositions.SecurityGuard.setExperienceGains(.01, .02, .02, .02, .02, .01);
CompanyPositions.PoliceOfficer.setPerformanceParameters(5, 20, 20, 20, 20, 15); CompanyPositions.PoliceOfficer.setPerformanceParameters(5, 20, 20, 20, 20, 15, 1);
CompanyPositions.PoliceOfficer.setExperienceGains(.01, .04, .04, .04, .04, .02); CompanyPositions.PoliceOfficer.setExperienceGains(.01, .04, .04, .04, .04, .02);
CompanyPositions.PoliceChief.setPerformanceParameters(5, 20, 20, 20, 20, 15); CompanyPositions.PoliceChief.setPerformanceParameters(5, 20, 20, 20, 20, 15, 1.25);
CompanyPositions.PoliceChief.setExperienceGains(.02, .06, .06, .06, .06, .05); CompanyPositions.PoliceChief.setExperienceGains(.02, .06, .06, .06, .06, .05);
CompanyPositions.SecurityOfficer.setPerformanceParameters(10, 20, 20, 20, 20, 10); CompanyPositions.SecurityOfficer.setPerformanceParameters(10, 20, 20, 20, 20, 10, 1.1);
CompanyPositions.SecurityOfficer.setExperienceGains(.02, .06, .06, .06, .06, .04); CompanyPositions.SecurityOfficer.setExperienceGains(.02, .06, .06, .06, .06, .04);
CompanyPositions.SecuritySupervisor.setPerformanceParameters(10, 15, 15, 15, 15, 30); CompanyPositions.SecuritySupervisor.setPerformanceParameters(10, 15, 15, 15, 15, 30, 1.25);
CompanyPositions.SecuritySupervisor.setExperienceGains(.02, .06, .06, .06, .06, .08); CompanyPositions.SecuritySupervisor.setExperienceGains(.02, .06, .06, .06, .06, .08);
CompanyPositions.HeadOfSecurity.setPerformanceParameters(10, 15, 15, 15, 15, 30); CompanyPositions.HeadOfSecurity.setPerformanceParameters(10, 15, 15, 15, 15, 30, 1.4);
CompanyPositions.HeadOfSecurity.setExperienceGains(.05, .1, .1, .1, .1, .1); CompanyPositions.HeadOfSecurity.setExperienceGains(.05, .1, .1, .1, .1, .1);
CompanyPositions.FieldAgent.setPerformanceParameters(10, 15, 15, 20, 20, 20); CompanyPositions.FieldAgent.setPerformanceParameters(10, 15, 15, 20, 20, 20, 1);
CompanyPositions.FieldAgent.setExperienceGains(.04, .06, .06, .06, .06, .04); CompanyPositions.FieldAgent.setExperienceGains(.04, .06, .06, .06, .06, .04);
CompanyPositions.SecretAgent.setPerformanceParameters(15, 15, 15, 20, 20, 15); CompanyPositions.SecretAgent.setPerformanceParameters(15, 15, 15, 20, 20, 15, 1.25);
CompanyPositions.SecretAgent.setExperienceGains(.08, .1, .1, .1, .1, .08); CompanyPositions.SecretAgent.setExperienceGains(.08, .1, .1, .1, .1, .08);
CompanyPositions.SpecialOperative.setPerformanceParameters(15, 15, 15, 20, 20, 15); CompanyPositions.SpecialOperative.setPerformanceParameters(15, 15, 15, 20, 20, 15, 1.5);
CompanyPositions.SpecialOperative.setExperienceGains(.12, .15, .15, .15, .15, .12); CompanyPositions.SpecialOperative.setExperienceGains(.12, .15, .15, .15, .15, .12);
} }
} }
@ -381,7 +388,7 @@ getNextCompanyPosition = function(currPos) {
if (currPos.positionName == CompanyPositions.SeniorDev.positionName) { if (currPos.positionName == CompanyPositions.SeniorDev.positionName) {
return CompanyPositions.LeadDev; return CompanyPositions.LeadDev;
} }
if (currPos.positionName == CompanyPositions.LeadDev.positionname) { if (currPos.positionName == CompanyPositions.LeadDev.positionName) {
return CompanyPositions.HeadOfSoftware; return CompanyPositions.HeadOfSoftware;
} }

@ -1,5 +1,5 @@
CONSTANTS = { CONSTANTS = {
Version: "0.22.1", Version: "0.23.0",
//Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience //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 //and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then
@ -29,8 +29,8 @@ CONSTANTS = {
HacknetNodeMaxCores: 16, HacknetNodeMaxCores: 16,
/* Faction and Company favor */ /* Faction and Company favor */
FactionReputationToFavor: 7500, FactionReputationToFavor: 6500,
CompanyReputationToFavor: 5000, CompanyReputationToFavor: 6000,
/* Augmentation */ /* Augmentation */
//NeuroFlux Governor cost multiplier as you level up //NeuroFlux Governor cost multiplier as you level up
@ -47,6 +47,7 @@ CONSTANTS = {
ScriptHackRamCost: 0.1, ScriptHackRamCost: 0.1,
ScriptGrowRamCost: 0.15, ScriptGrowRamCost: 0.15,
ScriptWeakenRamCost: 0.15, ScriptWeakenRamCost: 0.15,
ScriptScanRamCost: 0.2,
ScriptNukeRamCost: 0.05, ScriptNukeRamCost: 0.05,
ScriptBrutesshRamCost: 0.05, ScriptBrutesshRamCost: 0.05,
ScriptFtpcrackRamCost: 0.05, ScriptFtpcrackRamCost: 0.05,
@ -71,7 +72,7 @@ CONSTANTS = {
ScriptHNUpgRamRamCost: 0.6, ScriptHNUpgRamRamCost: 0.6,
ScriptHNUpgCoreRamCost: 0.8, ScriptHNUpgCoreRamCost: 0.8,
MultithreadingRAMCost: 1.002, MultithreadingRAMCost: 1,
//Server constants //Server constants
ServerBaseGrowthRate: 1.03, //Unadjusted Growth rate ServerBaseGrowthRate: 1.03, //Unadjusted Growth rate
@ -81,7 +82,8 @@ CONSTANTS = {
//Augmentation Constants //Augmentation Constants
AugmentationCostMultiplier: 5, //Used for balancing costs without having to readjust every Augmentation cost AugmentationCostMultiplier: 5, //Used for balancing costs without having to readjust every Augmentation cost
AugmentationRepMultiplier: 1.5, //Used for balancing rep cost without having to readjust every value AugmentationRepMultiplier: 1.75, //Used for balancing rep cost without having to readjust every value
MultipleAugMultiplier: 1.75,
//Maximum number of log entries for a script //Maximum number of log entries for a script
MaxLogCapacity: 50, MaxLogCapacity: 50,
@ -193,7 +195,7 @@ CONSTANTS = {
"and you can purchase additional servers as you progress through the game. Connecting to other servers " + "and you can purchase additional servers as you progress through the game. Connecting to other servers " +
"and hacking them can be a major source of income and experience. Servers can also be used to run " + "and hacking them can be a major source of income and experience. Servers can also be used to run " +
"scripts which can automatically hack servers for you. <br><br>" + "scripts which can automatically hack servers for you. <br><br>" +
"In order to navigate between machines, use the 'scan' command to see all servers " + "In order to navigate between machines, use the 'scan' or 'scan-analyze' Terminal command to see all servers " +
"that are reachable from your current server. Then, you can use the 'connect [hostname/ip]' " + "that are reachable from your current server. Then, you can use the 'connect [hostname/ip]' " +
"command to connect to one of the available machines. <br><br>" + "command to connect to one of the available machines. <br><br>" +
"The 'hostname' and 'ifconfig' commands can be used to display the hostname/IP of the " + "The 'hostname' and 'ifconfig' commands can be used to display the hostname/IP of the " +
@ -286,16 +288,15 @@ CONSTANTS = {
"every call to the hack(), grow(), and weaken() Netscript functions will have its effect multiplied by the number of scripts. " + "every call to the hack(), grow(), and weaken() Netscript functions will have its effect multiplied by the number of scripts. " +
"For example, if a normal single-threaded script is able to hack $10,000, then running the same script with 5 threads would " + "For example, if a normal single-threaded script is able to hack $10,000, then running the same script with 5 threads would " +
"yield $50,000. <br><br> " + "yield $50,000. <br><br> " +
"Each additional thread to a script will slightly increase the RAM usage for that thread. The total cost of running a script with " + "When multithreading a script, the total RAM cost can be calculated by simply multiplying the base RAM cost of the script " +
"n threads can be calculated with: <br>" + "with the number of threads, where the base cost refers to the amount of RAM required to run the script single-threaded. " +
"base cost * n * (1.005 ^ n) <br>" + "In the terminal, you can run the " +
"where the base cost is the amount of RAM required to run the script with a single thread. In the terminal, you can run the " +
"'mem [scriptname] -t n' command to see how much RAM a script requires with n threads. <br><br>" + "'mem [scriptname] -t n' command to see how much RAM a script requires with n threads. <br><br>" +
"Every method for running a script has an option for making it multihreaded. To run a script with " + "Every method for running a script has an option for making it multihreaded. To run a script with " +
"n threads from a Terminal: <br>" + "n threads from a Terminal: <br>" +
"run [scriptname] -t n<br><br>" + "run [scriptname] -t n<br><br>" +
"Using Netscript commands: <br>" + "Using Netscript commands: <br>" +
"run('scriptname.script', m);<br> " + "run('scriptname.script', n);<br> " +
"exec('scriptname.script, 'targetServer', n);<br><br>" + "exec('scriptname.script, 'targetServer', n);<br><br>" +
"<u><h1> Notes about how scripts work offline </h1> </u><br>" + "<u><h1> Notes about how scripts work offline </h1> </u><br>" +
"<strong> The scripts that you write and execute are interpreted in Javascript. For this " + "<strong> The scripts that you write and execute are interpreted in Javascript. For this " +
@ -404,7 +405,7 @@ CONSTANTS = {
"is determined by the server's growth rate and varies between servers. Generally, higher-level servers have higher growth rates. <br><br> " + "is determined by the server's growth rate and varies between servers. Generally, higher-level servers have higher growth rates. <br><br> " +
"Like hack(), grow() can be called on any server, regardless of where the script is running. " + "Like hack(), grow() can be called on any server, regardless of where the script is running. " +
"The grow() command requires root access to the target server, but there is no required hacking level to run the command. " + "The grow() command requires root access to the target server, but there is no required hacking level to run the command. " +
"It grants 0.5 hacking exp when it completes. It also raises the security level of the target server by 0.004. " + "It also raises the security level of the target server by 0.004. " +
"Returns the number by which the money on the server was multiplied for the growth. " + "Returns the number by which the money on the server was multiplied for the growth. " +
"Works offline at a slower rate. <br> Example: grow('foodnstuff');<br><br>" + "Works offline at a slower rate. <br> Example: grow('foodnstuff');<br><br>" +
"<i>weaken(hostname/ip)</i><br>Use your hacking skills to attack a server's security, lowering the server's security level. The argument passed " + "<i>weaken(hostname/ip)</i><br>Use your hacking skills to attack a server's security, lowering the server's security level. The argument passed " +
@ -412,11 +413,13 @@ CONSTANTS = {
"hacking level and the target server's security level. This function lowers the security level of the target server by " + "hacking level and the target server's security level. This function lowers the security level of the target server by " +
"0.1.<br><br> Like hack() and grow(), weaken() can be called on " + "0.1.<br><br> Like hack() and grow(), weaken() can be called on " +
"any server, regardless of where the script is running. This command requires root access to the target server, but " + "any server, regardless of where the script is running. This command requires root access to the target server, but " +
"there is no required hacking level to run the command. Grants 3 hacking exp when it completes. Returns " + "there is no required hacking level to run the command. Returns " +
"0.1. Works offline at a slower rate<br> Example: weaken('foodnstuff');<br><br>" + "0.1. Works offline at a slower rate<br> Example: weaken('foodnstuff');<br><br>" +
"<i>print(x)</i> <br> Prints a value or a variable to the scripts logs (which can be viewed with the 'tail [script]' terminal command ). <br>" + "<i>print(x)</i> <br>Prints a value or a variable to the scripts logs (which can be viewed with the 'tail [script]' terminal command ). <br>" +
"WARNING: Do NOT call print() on an array. The script will crash. You can, however, call print on single elements of an array. For example, if " + "WARNING: Do NOT call print() on an array. The script will crash. You can, however, call print on single elements of an array. For example, if " +
"the variable 'a' is an array, then do NOT call print(a), but it is okay to call print(a[0]).<br><br>" + "the variable 'a' is an array, then do NOT call print(a), but it is okay to call print(a[0]).<br><br>" +
"<i>scan()</i><br>Returns an array containing the hostnames of all servers that are one node away from the current server. The " +
"current server is the server on which the script that calls this function is running. The hostnames are strings.<br><br>" +
"<i>nuke(hostname/ip)</i><br>Run NUKE.exe on the target server. NUKE.exe must exist on your home computer. Does NOT work while offline <br> Example: nuke('foodnstuff'); <br><br>" + "<i>nuke(hostname/ip)</i><br>Run NUKE.exe on the target server. NUKE.exe must exist on your home computer. Does NOT work while offline <br> Example: nuke('foodnstuff'); <br><br>" +
"<i>brutessh(hostname/ip)</i><br>Run BruteSSH.exe on the target server. BruteSSH.exe must exist on your home computer. Does NOT work while offline <br> Example: brutessh('foodnstuff');<br><br>" + "<i>brutessh(hostname/ip)</i><br>Run BruteSSH.exe on the target server. BruteSSH.exe must exist on your home computer. Does NOT work while offline <br> Example: brutessh('foodnstuff');<br><br>" +
"<i>ftpcrack(hostname/ip)</i><br>Run FTPCrack.exe on the target server. FTPCrack.exe must exist on your home computer. Does NOT work while offline <br> Example: ftpcrack('foodnstuff');<br><br>" + "<i>ftpcrack(hostname/ip)</i><br>Run FTPCrack.exe on the target server. FTPCrack.exe must exist on your home computer. Does NOT work while offline <br> Example: ftpcrack('foodnstuff');<br><br>" +
@ -476,6 +479,8 @@ CONSTANTS = {
"<i>getHackingLevel()</i><br> Returns the Player's current hacking level. Does NOT work while offline <br><br> " + "<i>getHackingLevel()</i><br> Returns the Player's current hacking level. Does NOT work while offline <br><br> " +
"<i>getServerMoneyAvailable(hostname/ip)</i><br> Returns the amount of money available on a server. The argument passed in must be a string with either the " + "<i>getServerMoneyAvailable(hostname/ip)</i><br> Returns the amount of money available on a server. The argument passed in must be a string with either the " +
"hostname or IP of the target server. Does NOT work while offline <br> Example: getServerMoneyAvailable('foodnstuff');<br><br>" + "hostname or IP of the target server. Does NOT work while offline <br> Example: getServerMoneyAvailable('foodnstuff');<br><br>" +
"<i>getServerMaxMoney(hostname/ip)</i><br>Returns the maximum amount of money that can be available on a server. The argument passed in must be a string with " +
"the hostname or IP of the target server. Does NOT work while offline<br>Example: getServerMaxMoney('foodnstuff');<br><br>" +
"<i>getServerSecurityLevel(hostname/ip)</i><br>Returns the security level of a server. The argument passed in must be a string with either the " + "<i>getServerSecurityLevel(hostname/ip)</i><br>Returns the security level of a server. The argument passed in must be a string with either the " +
"hostname or IP of the target server. A server's security is denoted by a number between 1 and 100. Does NOT work while offline.<br><br>" + "hostname or IP of the target server. A server's security is denoted by a number between 1 and 100. Does NOT work while offline.<br><br>" +
"<i>getServerBaseSecurityLevel(hostname/ip)</i><br> Returns the base security level of a server. This is the security level that the server starts out with. " + "<i>getServerBaseSecurityLevel(hostname/ip)</i><br> Returns the base security level of a server. This is the security level that the server starts out with. " +
@ -485,6 +490,8 @@ CONSTANTS = {
"Does NOT work while offline.<br><br>" + "Does NOT work while offline.<br><br>" +
"<i>getServerRequiredHackingLevel(hostname/ip)</i><br> Returns the required hacking level of a server. The argument passed in must be a string with either the " + "<i>getServerRequiredHackingLevel(hostname/ip)</i><br> Returns the required hacking level of a server. The argument passed in must be a string with either the " +
"hostname or IP or the target server. Does NOT work while offline <br><br>" + "hostname or IP or the target server. Does NOT work while offline <br><br>" +
"<i>getServerNumPortsRequired(hostname/ip)</i><br>Returns the number of open ports required to successfully run NUKE.exe on a server. The argument " +
"passed in must be a string with either the hostname or IP of the target server. Does NOT work while offline<br><br>" +
"<i>fileExists(filename, [hostname/ip])</i><br> Returns a boolean (true or false) indicating whether the specified file exists on a server. " + "<i>fileExists(filename, [hostname/ip])</i><br> Returns a boolean (true or false) indicating whether the specified file exists on a server. " +
"The first argument must be a string with the name of the file. A file can either be a script or a program. A script name is case-sensitive, but a " + "The first argument must be a string with the name of the file. A file can either be a script or a program. A script name is case-sensitive, but a " +
"program is not. For example, fileExists('brutessh.exe') will work fine, even though the actual program is named BruteSSH.exe. <br><br> " + "program is not. For example, fileExists('brutessh.exe') will work fine, even though the actual program is named BruteSSH.exe. <br><br> " +
@ -655,6 +662,19 @@ CONSTANTS = {
"RAM Upgrades on your home computer", "RAM Upgrades on your home computer",
Changelog: Changelog:
"v0.23.0<br>" +
"-You can now purchase multiple Augmentations in a run. When you purchase an Augmentation you will lose money equal to the price " +
"and then the cost of purchasing another Augmentation during this run will be increased by 75%. You do not gain the benefits " +
"of your purchased Augmentations until you install them. This installation can be done through the 'Augmentation' tab. When " +
"you install your Augmentations, your game will reset like before. <br>" +
"-Reputation needed to gain a favor from faction decreased from 7500 to 6500<br>" +
"-Reputation needed to gain a favor from company increased from 5000 to 6000<br>" +
"-Reputation cost of all Augmentations increased by 16%<br>" +
"-Higher positions at companies now grant slightly more reputation for working<br>" +
"-Added getServerMaxMoney() Netscript function<br>" +
"-Added scan() Netscript function<br>" +
"-Added getServerNumPortsRequired() Netscript function<br>" +
"-There is now no additional RAM cost incurred when multithreading a script<br><br>" +
"v0.22.1<br>" + "v0.22.1<br>" +
"-You no longer lose progress on creating programs when cancelling your work. Your progress will be saved and you will pick up " + "-You no longer lose progress on creating programs when cancelling your work. Your progress will be saved and you will pick up " +
"where you left off when you start working on it again<br>" + "where you left off when you start working on it again<br>" +
@ -834,31 +854,17 @@ CONSTANTS = {
"-You can now see what an Augmentation does and its price even while its locked<br><br>", "-You can now see what an Augmentation does and its price even while its locked<br><br>",
LatestUpdate: LatestUpdate:
"v0.22.1<br>" + "v0.23.0<br>" +
"-You no longer lose progress on creating programs when cancelling your work. Your progress will be saved and you will pick up " + "-You can now purchase multiple Augmentations in a run. When you purchase an Augmentation you will lose money equal to the price " +
"where you left off when you start working on it again<br>" + "and then the cost of purchasing another Augmentation during this run will be increased by 75%. You do not gain the benefits " +
"-Added two new programs: AutoLink.exe and ServerProfiler.exe<br>" + "of your purchased Augmentations until you install them. This installation can be done through the 'Augmentation' tab. When " +
"-Fixed bug with Faction Field work reputation gain<br><br>" + "you install your Augmentations, your game will reset like before. <br>" +
"v0.22.0 - Major rebalancing, optimization, and favor system<br>" + "-Reputation needed to gain a favor from faction decreased from 7500 to 6500<br>" +
"-Significantly nerfed most augmentations<br>" + "-Reputation needed to gain a favor from company increased from 5000 to 6000<br>" +
"-Almost every server with a required hacking level of 200 or more now has slightly randomized server parameters. This means that after every Augmentation " + "-Reputation cost of all Augmentations increased by 16%<br>" +
"purchase, the required hacking level, base security level, and growth factor of these servers will all be slightly different<br>" + "-Higher positions at companies now grant slightly more reputation for working<br>" +
"-The hacking speed multiplier now increases rather than decreases. The hacking time is now divided by your hacking speed " + "-Added getServerMaxMoney() Netscript function<br>" +
"multiplier rather than multiplied. In other words, a higher hacking speed multiplier is better<br>" + "-Added scan() Netscript function<br>" +
"-Servers now have a minimum server security, which is approximately one third of their starting ('base') server security<br>" + "-Added getServerNumPortsRequired() Netscript function<br>" +
"-If you do not steal any money from a server, then you gain hacking experience equal to the amount you would have gained " + "-There is now no additional RAM cost incurred when multithreading a script<br><br>",
"had you failed the hack<br>" +
"-The effects of grow() were increased by 50%<br>" +
"-grow() and weaken() now give hacking experience based on the server's base security level, rather than a flat exp amount<br>" +
"-Slightly reduced amount of exp gained from hack(), weaken(), and grow()<br>" +
"-Rebalanced formulas that determine crime success<br>" +
"-Reduced RAM cost for multithreading a script. The RAM multiplier for each thread was reduced from 1.02 to 1.005<br>" +
"-Optimized Script objects so they take less space in the save file<br>" +
"-Added getServerBaseSecurityLevel() Netscript function<br>" +
"-New favor system for companies and factions. Earning reputation at a company/faction will give you favor for that entity when you " +
"reset after installing an Augmentation. This favor persists through the rest of the game. The more favor you have, the faster you will earn " +
"reputation with that faction/company<br>" +
"-You can no longer donate to a faction for reputation until you have 150 favor with that faction<br>" +
"-Added unalias Terminal command<br>" +
"-Changed requirements for endgame Factions<br>",
} }

@ -97,9 +97,9 @@ function determineCrimeChanceShoplift() {
} }
function determineCrimeChanceMug() { function determineCrimeChanceMug() {
var chance = ((2 *Player.strength / CONSTANTS.MaxSkillLevel + var chance = ((1.5 *Player.strength / CONSTANTS.MaxSkillLevel +
0.5 * Player.defense / CONSTANTS.MaxSkillLevel + 0.5 * Player.defense / CONSTANTS.MaxSkillLevel +
2 * Player.dexterity / CONSTANTS.MaxSkillLevel + 1.5 * Player.dexterity / CONSTANTS.MaxSkillLevel +
0.5 * Player.agility / CONSTANTS.MaxSkillLevel)) * 5; 0.5 * Player.agility / CONSTANTS.MaxSkillLevel)) * 5;
chance *= Player.crime_success_mult; chance *= Player.crime_success_mult;
return Math.min(chance, 1); return Math.min(chance, 1);

@ -338,6 +338,8 @@ initFactions = function() {
PlayerObject.prototype.checkForFactionInvitations = function() { PlayerObject.prototype.checkForFactionInvitations = function() {
invitedFactions = []; //Array which will hold all Factions th eplayer should be invited to invitedFactions = []; //Array which will hold all Factions th eplayer should be invited to
var numAugmentations = this.augmentations.length;
var company = Companies[this.companyName]; var company = Companies[this.companyName];
var companyRep = 0; var companyRep = 0;
if (company != null) { if (company != null) {
@ -347,7 +349,7 @@ PlayerObject.prototype.checkForFactionInvitations = function() {
//Illuminati //Illuminati
var illuminatiFac = Factions["Illuminati"]; var illuminatiFac = Factions["Illuminati"];
if (!illuminatiFac.isBanned && !illuminatiFac.isMember && !illuminatiFac.alreadyInvited && if (!illuminatiFac.isBanned && !illuminatiFac.isMember && !illuminatiFac.alreadyInvited &&
this.numAugmentations >= 30 && numAugmentations >= 30 &&
this.money >= 150000000000 && this.money >= 150000000000 &&
this.hacking_skill >= 1200 && this.hacking_skill >= 1200 &&
this.strength >= 1000 && this.defense >= 1000 && this.strength >= 1000 && this.defense >= 1000 &&
@ -358,7 +360,7 @@ PlayerObject.prototype.checkForFactionInvitations = function() {
//Daedalus //Daedalus
var daedalusFac = Factions["Daedalus"]; var daedalusFac = Factions["Daedalus"];
if (!daedalusFac.isBanned && !daedalusFac.isMember && !daedalusFac.alreadyInvited && if (!daedalusFac.isBanned && !daedalusFac.isMember && !daedalusFac.alreadyInvited &&
this.numAugmentations >= 30 && numAugmentations >= 30 &&
this.money >= 100000000000 && this.money >= 100000000000 &&
(this.hacking_skill >= 2500 || (this.hacking_skill >= 2500 ||
(this.strength >= 1500 && this.defense >= 1500 && (this.strength >= 1500 && this.defense >= 1500 &&
@ -369,7 +371,7 @@ PlayerObject.prototype.checkForFactionInvitations = function() {
//The Covenant //The Covenant
var covenantFac = Factions["The Covenant"]; var covenantFac = Factions["The Covenant"];
if (!covenantFac.isBanned && !covenantFac.isMember && !covenantFac.alreadyInvited && if (!covenantFac.isBanned && !covenantFac.isMember && !covenantFac.alreadyInvited &&
this.numAugmentations >= 30 && numAugmentations >= 30 &&
this.money >= 75000000000 && this.money >= 75000000000 &&
this.hacking_skill >= 850 && this.hacking_skill >= 850 &&
this.strength >= 850 && this.strength >= 850 &&
@ -970,6 +972,16 @@ displayFactionAugmentations = function(factionName) {
for (var i = 0; i < faction.augmentations.length; ++i) { for (var i = 0; i < faction.augmentations.length; ++i) {
(function () { (function () {
var aug = Augmentations[faction.augmentations[i]]; var aug = Augmentations[faction.augmentations[i]];
if (aug == null) {
console.log("ERROR: Invalid Augmentation");
return;
}
var owned = false;
for (var j = 0; j < Player.queuedAugmentations.length; ++j) {
if (Player.queuedAugmentations[j].name == aug.name) {
owned = true;
}
}
var item = document.createElement("li"); var item = document.createElement("li");
var span = document.createElement("span"); var span = document.createElement("span");
var aDiv = document.createElement("div"); var aDiv = document.createElement("div");
@ -977,7 +989,7 @@ displayFactionAugmentations = function(factionName) {
var pElem = document.createElement("p"); var pElem = document.createElement("p");
aElem.setAttribute("href", "#"); aElem.setAttribute("href", "#");
var req = aug.baseRepRequirement * faction.augmentationRepRequirementMult; var req = aug.baseRepRequirement * faction.augmentationRepRequirementMult;
if (aug.name != AugmentationNames.NeuroFluxGovernor && aug.owned) { if (aug.name != AugmentationNames.NeuroFluxGovernor && (aug.owned || owned)) {
aElem.setAttribute("class", "a-link-button-inactive"); aElem.setAttribute("class", "a-link-button-inactive");
pElem.innerHTML = "ALREADY OWNED"; pElem.innerHTML = "ALREADY OWNED";
} else if (faction.playerReputation >= req) { } else if (faction.playerReputation >= req) {
@ -992,7 +1004,7 @@ displayFactionAugmentations = function(factionName) {
pElem.style.display = "inline"; pElem.style.display = "inline";
aElem.innerHTML = aug.name; aElem.innerHTML = aug.name;
if (aug.name == AugmentationNames.NeuroFluxGovernor) { if (aug.name == AugmentationNames.NeuroFluxGovernor) {
aElem.innerHTML += " - Level " + (aug.level + 1); aElem.innerHTML += " - Level " + (getNextNeurofluxLevel());
} }
span.style.display = "inline-block" span.style.display = "inline-block"

@ -202,6 +202,22 @@ function evaluate(exp, workerScript) {
}, function(e) { }, function(e) {
reject(e); reject(e);
}); });
} else if (exp.func.value == "scan") {
if (exp.args.length != 0) {
return reject(makeRuntimeRejectMsg(workerScript, "scan() call has incorrect number of arguments. Takes 0 arguments"));
}
var currServ = getServer(workerScript.serverIp);
if (currServ == null) {
return reject(makeRuntimeRejectMsg(workerScript, "Could not find server ip for this script. This is a bug please contact game developer"));
}
var res = [];
for (var i = 0; i < currServ.serversOnNetwork.length; ++i) {
var thisServ = getServer(currServ.serversOnNetwork[i]);
if (thisServ == null) {continue;}
res.push({type:"str", value: thisServ.hostname});
}
resolve(res);
} else if (exp.func.value == "nuke") { } else if (exp.func.value == "nuke") {
var p = netscriptRunProgram(exp, workerScript, Programs.NukeProgram); var p = netscriptRunProgram(exp, workerScript, Programs.NukeProgram);
p.then(function(res) { p.then(function(res) {
@ -530,6 +546,38 @@ function evaluate(exp, workerScript) {
}, function(e) { }, function(e) {
reject(e); reject(e);
}); });
} else if (exp.func.value == "getServerMaxMoney") {
if (exp.args.length != 1) {
return reject(makeRuntimeRejectMsg(workerScript, "getServerMaxMoney() call has incorrect number of arguments. Takes 1 argument"));
}
var ipPromise = evaluate(exp.args[0], workerScript);
ipPromise.then(function(ip) {
var server = getServer(ip);
if (server == null) {
workerScript.scriptRef.log("getServerMaxMoney() failed. Invalid IP or hostname passed in: " + ip);
return reject(makeRuntimeRejectMsg(workerScript, "Invalid IP or hostname passed into getServerMaxMoney() command"));
}
workerScript.scriptRef.log("getServerMaxMoney() returned " + formatNumber(server.moneyMax, 0) + " for " + server.hostname);
resolve(server.moneyMax);
}, function(e) {
reject(e);
});
} else if (exp.func.value == "getServerNumPortsRequired") {
if (exp.args.length != 1) {
return reject(makeRuntimeRejectMsg(workerScript, "getServerNumPortsRequired() call has incorrect number of arguments. Takes 1 argument"));
}
var ipPromise = evaluate(exp.args[0], workerScript);
ipPromise.then(function(ip) {
var server = getServer(ip);
if (server == null) {
workerScript.scriptRef.log("getServerNumPortsRequired() failed. Invalid IP or hostname passed in: " + ip);
return reject(makeRuntimeRejectMsg(workerScript, "Invalid IP or hostname passed into getServerNumPortsRequired() command"));
}
workerScript.scriptRef.log("getServerNumPortsRequired() returned " + formatNumber(server.numOpenPortsRequired, 0) + " for " + server.hostname);
resolve(server.numOpenPortsRequired);
}, function(e) {
reject(e);
});
} else if (exp.func.value == "fileExists") { } else if (exp.func.value == "fileExists") {
if (exp.args.length != 1 && exp.args.length != 2) { if (exp.args.length != 1 && exp.args.length != 2) {
return reject(makeRuntimeRejectMsg(workerScript, "fileExists() call has incorrect number of arguments. Takes 1 or 2 arguments")); return reject(makeRuntimeRejectMsg(workerScript, "fileExists() call has incorrect number of arguments. Takes 1 or 2 arguments"));
@ -620,6 +668,16 @@ function evaluate(exp, workerScript) {
displayHacknetNodesContent(); displayHacknetNodesContent();
workerScript.scriptRef.log("Purchased new Hacknet Node with name: " + name); workerScript.scriptRef.log("Purchased new Hacknet Node with name: " + name);
resolve(numOwned); resolve(numOwned);
} else if (exp.func.value == "val") {
if (exp.args.length != 1) {
return reject(makeRuntimeRejectMsg(workerScript, "val() call has incorrect number of arguments. Takes 1 arguments"));
}
var valPromise = evaluate(exp.args[0], workerScript);
valPromise.then(function(val) {
resolve(val);
}, function(e) {
reject(e);
});
} else { } else {
reject(makeRuntimeRejectMsg(workerScript, "Invalid function: " + exp.func.value)); reject(makeRuntimeRejectMsg(workerScript, "Invalid function: " + exp.func.value));
} }

@ -176,7 +176,7 @@ function netscriptHack(exp, workerScript) {
workerScript.scriptRef.log("Attempting to hack " + ip + " in " + hackingTime.toFixed(3) + " seconds (t=" + threads + ")"); workerScript.scriptRef.log("Attempting to hack " + ip + " in " + hackingTime.toFixed(3) + " seconds (t=" + threads + ")");
return Promise.resolve([server, hackingTime]); return Promise.resolve([server, hackingTime]);
}).then(function([server, hackingTime]) { }).then(function([server, hackingTime]) {
console.log("Hacking " + server.hostname + " after " + hackingTime.toString() + " seconds (t=" + threads + ")"); //console.log("Hacking " + server.hostname + " after " + hackingTime.toString() + " seconds (t=" + threads + ")");
return netscriptDelay(hackingTime* 1000).then(function() { return netscriptDelay(hackingTime* 1000).then(function() {
if (env.stopFlag) {return Promise.reject(workerScript);} if (env.stopFlag) {return Promise.reject(workerScript);}
var hackChance = scriptCalculateHackingChance(server); var hackChance = scriptCalculateHackingChance(server);
@ -201,7 +201,7 @@ function netscriptHack(exp, workerScript) {
workerScript.scriptRef.recordHack(server.ip, moneyGained, threads); workerScript.scriptRef.recordHack(server.ip, moneyGained, threads);
Player.gainHackingExp(expGainedOnSuccess); Player.gainHackingExp(expGainedOnSuccess);
workerScript.scriptRef.onlineExpGained += expGainedOnSuccess; workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;
console.log("Script successfully hacked " + server.hostname + " for $" + formatNumber(moneyGained, 2) + " and " + formatNumber(expGainedOnSuccess, 4) + " exp"); //console.log("Script successfully hacked " + server.hostname + " for $" + formatNumber(moneyGained, 2) + " and " + formatNumber(expGainedOnSuccess, 4) + " exp");
workerScript.scriptRef.log("Script SUCCESSFULLY hacked " + server.hostname + " for $" + formatNumber(moneyGained, 2) + " and " + formatNumber(expGainedOnSuccess, 4) + " exp (t=" + threads + ")"); workerScript.scriptRef.log("Script SUCCESSFULLY hacked " + server.hostname + " for $" + formatNumber(moneyGained, 2) + " and " + formatNumber(expGainedOnSuccess, 4) + " exp (t=" + threads + ")");
server.fortify(CONSTANTS.ServerFortifyAmount * threads); server.fortify(CONSTANTS.ServerFortifyAmount * threads);
return Promise.resolve(true); return Promise.resolve(true);
@ -209,7 +209,7 @@ function netscriptHack(exp, workerScript) {
//Player only gains 25% exp for failure? TODO Can change this later to balance //Player only gains 25% exp for failure? TODO Can change this later to balance
Player.gainHackingExp(expGainedOnFailure); Player.gainHackingExp(expGainedOnFailure);
workerScript.scriptRef.onlineExpGained += expGainedOnFailure; workerScript.scriptRef.onlineExpGained += expGainedOnFailure;
console.log("Script unsuccessful to hack " + server.hostname + ". Gained " + formatNumber(expGainedOnFailure, 4) + " exp"); //console.log("Script unsuccessful to hack " + server.hostname + ". Gained " + formatNumber(expGainedOnFailure, 4) + " exp");
workerScript.scriptRef.log("Script FAILED to hack " + server.hostname + ". Gained " + formatNumber(expGainedOnFailure, 4) + " exp (t=" + threads + ")"); workerScript.scriptRef.log("Script FAILED to hack " + server.hostname + ". Gained " + formatNumber(expGainedOnFailure, 4) + " exp (t=" + threads + ")");
return Promise.resolve(false); return Promise.resolve(false);
} }
@ -245,7 +245,7 @@ function netscriptGrow(exp, workerScript) {
} }
var growTime = scriptCalculateGrowTime(server); var growTime = scriptCalculateGrowTime(server);
console.log("Executing grow() on server " + server.hostname + " in " + formatNumber(growTime/1000, 3) + " seconds") //console.log("Executing grow() on server " + server.hostname + " in " + formatNumber(growTime/1000, 3) + " seconds")
workerScript.scriptRef.log("Executing grow() on server " + server.hostname + " in " + formatNumber(growTime/1000, 3) + " seconds (t=" + threads + ")"); workerScript.scriptRef.log("Executing grow() on server " + server.hostname + " in " + formatNumber(growTime/1000, 3) + " seconds (t=" + threads + ")");
return Promise.resolve([server, growTime]); return Promise.resolve([server, growTime]);
@ -298,7 +298,7 @@ function netscriptWeaken(exp, workerScript) {
} }
var weakenTime = scriptCalculateWeakenTime(server); var weakenTime = scriptCalculateWeakenTime(server);
console.log("Executing weaken() on server " + server.hostname + " in " + formatNumber(weakenTime/1000, 3) + " seconds") //console.log("Executing weaken() on server " + server.hostname + " in " + formatNumber(weakenTime/1000, 3) + " seconds")
workerScript.scriptRef.log("Executing weaken() on server " + server.hostname + " in " + workerScript.scriptRef.log("Executing weaken() on server " + server.hostname + " in " +
formatNumber(weakenTime/1000, 3) + " seconds (t=" + threads + ")"); formatNumber(weakenTime/1000, 3) + " seconds (t=" + threads + ")");

@ -4,6 +4,8 @@ function PlayerObject() {
this.hacking_skill = 1; this.hacking_skill = 1;
//Fighting //Fighting
this.hp = 10;
this.max_hp = 10;
this.strength = 1; //Damage dealt this.strength = 1; //Damage dealt
this.defense = 1; //Damage received this.defense = 1; //Damage received
this.dexterity = 1; //Accuracy this.dexterity = 1; //Accuracy
@ -86,8 +88,8 @@ function PlayerObject() {
this.factions = []; //Names of all factions player has joined this.factions = []; //Names of all factions player has joined
//Augmentations //Augmentations
this.queuedAugmentations = []; //Purchased but not installed, names only
this.augmentations = []; //Names of all installed augmentations this.augmentations = []; //Names of all installed augmentations
this.numAugmentations = 0;
//Crime statistics (Total refers to this 'simulation'. Lifetime is forever) //Crime statistics (Total refers to this 'simulation'. Lifetime is forever)
this.karma = 0; this.karma = 0;

@ -75,6 +75,8 @@ function prestigeAugmentation() {
Player.factions = []; Player.factions = [];
Player.queuedAugmentations = [];
Player.startAction = false; Player.startAction = false;
Player.actionTime = 0; Player.actionTime = 0;
@ -187,7 +189,7 @@ function prestigeAugmentation() {
} }
//Re-initialize things - This will update any changes //Re-initialize things - This will update any changes
initFactions(); initFactions(); //Factions must be initialized before augmentations
initAugmentations(); initAugmentations();
initCompanies(); initCompanies();

@ -9,7 +9,6 @@ function BitburnerSaveObject() {
this.CompaniesSave = ""; this.CompaniesSave = "";
this.FactionsSave = ""; this.FactionsSave = "";
this.SpecialServerIpsSave = ""; this.SpecialServerIpsSave = "";
this.AugmentationsSave = "";
this.AliasesSave = ""; this.AliasesSave = "";
this.MessagesSave = ""; this.MessagesSave = "";
this.VersionSave = ""; this.VersionSave = "";
@ -35,11 +34,9 @@ BitburnerSaveObject.prototype.saveGame = function() {
this.CompaniesSave = JSON.stringify(Companies); this.CompaniesSave = JSON.stringify(Companies);
this.FactionsSave = JSON.stringify(Factions); this.FactionsSave = JSON.stringify(Factions);
this.SpecialServerIpsSave = JSON.stringify(SpecialServerIps); this.SpecialServerIpsSave = JSON.stringify(SpecialServerIps);
this.AugmentationsSave = JSON.stringify(Augmentations);
this.AliasesSave = JSON.stringify(Aliases); this.AliasesSave = JSON.stringify(Aliases);
this.MessagesSave = JSON.stringify(Messages); this.MessagesSave = JSON.stringify(Messages);
this.VersionSave = JSON.stringify(CONSTANTS.Version); this.VersionSave = JSON.stringify(CONSTANTS.Version);
var saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this)))); var saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));
window.localStorage.setItem("bitburnerSave", saveString); window.localStorage.setItem("bitburnerSave", saveString);
@ -60,7 +57,7 @@ loadGame = function(saveObj) {
Companies = JSON.parse(saveObj.CompaniesSave, Reviver); Companies = JSON.parse(saveObj.CompaniesSave, Reviver);
Factions = JSON.parse(saveObj.FactionsSave, Reviver); Factions = JSON.parse(saveObj.FactionsSave, Reviver);
SpecialServerIps = JSON.parse(saveObj.SpecialServerIpsSave, Reviver); SpecialServerIps = JSON.parse(saveObj.SpecialServerIpsSave, Reviver);
Augmentations = JSON.parse(saveObj.AugmentationsSave, Reviver);
if (saveObj.hasOwnProperty("AliasesSave")) { if (saveObj.hasOwnProperty("AliasesSave")) {
try { try {
Aliases = JSON.parse(saveObj.AliasesSave, Reviver); Aliases = JSON.parse(saveObj.AliasesSave, Reviver);
@ -97,6 +94,9 @@ loadGame = function(saveObj) {
} }
} }
} }
if (CONSTANTS.Version == "0.23.0") {
Augmentations = JSON.parse(saveObj.AugmentationsSave, Reviver);
}
createNewUpdateText(); createNewUpdateText();
} }
} catch(e) { } catch(e) {
@ -167,6 +167,9 @@ loadImportedGame = function(saveObj, saveString) {
} }
} }
} }
if (CONSTANTS.Version == "0.23.0") {
Augmentations = JSON.parse(saveObj.AugmentationsSave, Reviver);
}
createNewUpdateText(); createNewUpdateText();
} }
} catch(e) { } catch(e) {

@ -136,6 +136,7 @@ Script.prototype.updateRamUsage = function() {
var hackCount = numOccurrences(codeCopy, "hack("); var hackCount = numOccurrences(codeCopy, "hack(");
var growCount = numOccurrences(codeCopy, "grow("); var growCount = numOccurrences(codeCopy, "grow(");
var weakenCount = numOccurrences(codeCopy, "weaken("); var weakenCount = numOccurrences(codeCopy, "weaken(");
var scanCount = numOccurrences(codeCopy, "scan(");
var nukeCount = numOccurrences(codeCopy, "nuke("); var nukeCount = numOccurrences(codeCopy, "nuke(");
var brutesshCount = numOccurrences(codeCopy, "brutessh("); var brutesshCount = numOccurrences(codeCopy, "brutessh(");
var ftpcrackCount = numOccurrences(codeCopy, "ftpcrack("); var ftpcrackCount = numOccurrences(codeCopy, "ftpcrack(");
@ -168,6 +169,7 @@ Script.prototype.updateRamUsage = function() {
(hackCount * CONSTANTS.ScriptHackRamCost) + (hackCount * CONSTANTS.ScriptHackRamCost) +
(growCount * CONSTANTS.ScriptGrowRamCost) + (growCount * CONSTANTS.ScriptGrowRamCost) +
(weakenCount * CONSTANTS.ScriptWeakenRamCost) + (weakenCount * CONSTANTS.ScriptWeakenRamCost) +
(scanCount * CONSTANTS.ScriptScanRamCost) +
(nukeCount * CONSTANTS.ScriptNukeRamCost) + (nukeCount * CONSTANTS.ScriptNukeRamCost) +
(brutesshCount * CONSTANTS.ScriptBrutesshRamCost) + (brutesshCount * CONSTANTS.ScriptBrutesshRamCost) +
(ftpcrackCount * CONSTANTS.ScriptFtpcrackRamCost) + (ftpcrackCount * CONSTANTS.ScriptFtpcrackRamCost) +

@ -369,17 +369,17 @@ var Engine = {
}, },
displayAugmentationsContent: function() { displayAugmentationsContent: function() {
var augmentationsList = document.getElementById("augmentations-list"); //Purchased/queued augmentations
var queuedAugmentationsList = document.getElementById("queued-augmentations-list");
while (augmentationsList.firstChild) { while (queuedAugmentationsList.firstChild) {
augmentationsList.removeChild(augmentationsList.firstChild); queuedAugmentationsList.removeChild(queuedAugmentationsList.firstChild);
} }
for (var i = 0; i < Player.augmentations.length; ++i) { for (var i = 0; i < Player.queuedAugmentations.length; ++i) {
var augName = Player.augmentations[i]; var augName = Player.queuedAugmentations[i].name;
var aug = Augmentations[augName]; var aug = Augmentations[augName];
var item = document.createElement("li"); var item = document.createElement("li");
var hElem = document.createElement("h2"); var hElem = document.createElement("h2");
var pElem = document.createElement("p"); var pElem = document.createElement("p");
@ -387,7 +387,42 @@ var Engine = {
item.setAttribute("class", "installed-augmentation"); item.setAttribute("class", "installed-augmentation");
hElem.innerHTML = augName; hElem.innerHTML = augName;
if (augName == AugmentationNames.NeuroFluxGovernor) { if (augName == AugmentationNames.NeuroFluxGovernor) {
hElem.innerHTML += " - Level " + (aug.level); hElem.innerHTML += " - Level " + (Player.queuedAugmentations[i].level);
}
pElem.innerHTML = aug.info;
item.appendChild(hElem);
item.appendChild(pElem);
queuedAugmentationsList.appendChild(item);
}
//Install Augmentations button
var installButton = clearEventListeners("install-augmentations-button");
installButton.addEventListener("click", function() {
installAugmentations();
return false;
});
//Installed augmentations
var augmentationsList = document.getElementById("augmentations-list");
while (augmentationsList.firstChild) {
augmentationsList.removeChild(augmentationsList.firstChild);
}
for (var i = 0; i < Player.augmentations.length; ++i) {
var augName = Player.augmentations[i].name;
var aug = Augmentations[augName];
var item = document.createElement("li");
var hElem = document.createElement("h2");
var pElem = document.createElement("p");
item.setAttribute("class", "installed-augmentation");
hElem.innerHTML = augName;
if (augName == AugmentationNames.NeuroFluxGovernor) {
hElem.innerHTML += " - Level " + (Player.augmentations[i].level);
} }
pElem.innerHTML = aug.info; pElem.innerHTML = aug.info;
@ -647,6 +682,7 @@ var Engine = {
Engine.setDisplayElements(); //Sets variables for important DOM elements Engine.setDisplayElements(); //Sets variables for important DOM elements
Engine.init(); //Initialize buttons, work, etc. Engine.init(); //Initialize buttons, work, etc.
CompanyPositions.init(); CompanyPositions.init();
initAugmentations();
//Calculate the number of cycles have elapsed while offline //Calculate the number of cycles have elapsed while offline
Engine._lastUpdate = new Date().getTime(); Engine._lastUpdate = new Date().getTime();

@ -79,12 +79,37 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
Augmentations[AugmentationNames.BionicArms].owned == false) { Augmentations[AugmentationNames.BionicArms].owned == false) {
dialogBoxCreate("You must first install the Bionic Arms augmentation before installing this upgrade"); dialogBoxCreate("You must first install the Bionic Arms augmentation before installing this upgrade");
} else if (Player.money >= (aug.baseCost * fac.augmentationPriceMult)) { } else if (Player.money >= (aug.baseCost * fac.augmentationPriceMult)) {
applyAugmentation(aug); var queuedAugmentation = new PlayerOwnedAugmentation(aug.name);
dialogBoxCreate("You slowly drift to sleep as " + fac.name + "'s scientists put you under " + if (aug.name == AugmentationNames.NeuroFluxGovernor) {
" in order to install the " + aug.name + " Augmentation. <br><br>" + queuedAugmentation.level = getNextNeurofluxLevel();
"You wake up in your home...you feel different..."); }
Player.queuedAugmentations.push(queuedAugmentation);
prestigeAugmentation(); Player.loseMoney((aug.baseCost * fac.augmentationPriceMult));
dialogBoxCreate("You purchased " + aug.name + ". It's enhancements will not take " +
"effect until they are installed. To install your augmentations, go to the " +
"'Augmentations' tab on the left-hand navigation menu. Purchasing additional " +
"augmentations will now be more expensive.");
//If you just purchased Neuroflux Governor, recalculate the cost
if (aug.name == AugmentationNames.NeuroFluxGovernor) {
var nextLevel = getNextNeurofluxLevel();
--nextLevel;
var mult = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, nextLevel);
aug.setRequirements(500 * mult, 750000 * mult);
for (var i = 0; i < Player.queuedAugmentations.length-1; ++i) {
aug.baseCost *= CONSTANTS.MultipleAugMultiplier;
}
}
for (var name in Augmentations) {
if (Augmentations.hasOwnProperty(name)) {
Augmentations[name].baseCost *= CONSTANTS.MultipleAugMultiplier;
}
}
displayFactionAugmentations(fac.name);
} else { } else {
dialogBoxCreate("You don't have enough money to purchase this Augmentation!"); dialogBoxCreate("You don't have enough money to purchase this Augmentation!");
} }
@ -95,3 +120,25 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
purchaseAugmentationBoxOpen(); purchaseAugmentationBoxOpen();
} }
function getNextNeurofluxLevel() {
var aug = Augmentations[AugmentationNames.NeuroFluxGovernor];
if (aug == null) {
for (var i = 0; i < Player.augmentations.length; ++i) {
if (Player.augmentations[i].name == AugmentationNames.NeuroFluxGovernor) {
aug = Player.augmentations[i];
}
}
if (aug == null) {
console.log("ERROR, Could not find NeuroFlux Governor aug");
return 1;
}
}
var nextLevel = aug.level + 1;
for (var i = 0; i < Player.queuedAugmentations.length; ++i) {
if (Player.queuedAugmentations[i].name == AugmentationNames.NeuroFluxGovernor) {
++nextLevel;
}
}
return nextLevel;
}

@ -36,7 +36,7 @@ purchaseRamForHomeBoxCreate = function() {
//Calculate cost //Calculate cost
//Have cost increase by some percentage each time RAM has been upgraded //Have cost increase by some percentage each time RAM has been upgraded
var cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome; var cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome;
var mult = Math.pow(1.45, numUpgrades); var mult = Math.pow(1.44, numUpgrades);
cost = cost * mult; cost = cost * mult;
purchaseRamForHomeBoxSetText("Would you like to purchase additional RAM for your home computer? <br><br>" + purchaseRamForHomeBoxSetText("Would you like to purchase additional RAM for your home computer? <br><br>" +