New BitNode multipliers, new Covenant Sleeve Purchasing feature. untested

This commit is contained in:
danielyxie 2019-02-13 18:08:18 -08:00
parent 60960559e1
commit c6a9675232
14 changed files with 248 additions and 709 deletions

@ -146,7 +146,7 @@ List of Factions and their Requirements
| | | * -90 Karma | | | | | * -90 Karma | |
| | | * Not working for CIA or NSA | | | | | * Not working for CIA or NSA | |
+---------------------+----------------+-----------------------------------------+-------------------------------+ +---------------------+----------------+-----------------------------------------+-------------------------------+
| Endgame | The Covenant | * 30 Augmentations | | | Endgame | The Covenant | * 20 Augmentations | |
| Factions | | * $75b | | | Factions | | * $75b | |
| | | * Hacking Level of 850 | | | | | * Hacking Level of 850 | |
| | | * All Combat Stats of 850 | | | | | * All Combat Stats of 850 | |

@ -10,33 +10,14 @@ getBitNodeMultipliers
.. js:function:: getBitNodeMultipliers() .. js:function:: getBitNodeMultipliers()
Returns an object containing the current BitNode multipliers. This function requires Source-File 5 in order Returns an object containing the current BitNode multipliers. This function requires Source-File 5 in order
to run. The multipliers are returned in integer forms (e.g. 1.5 instead of 150%). The multipliers represent to run. The multipliers are returned in decimal forms (e.g. 1.5 instead of 150%). The multipliers represent
the difference between the current BitNode and the original BitNode (BitNode-1). For example, if the the difference between the current BitNode and the original BitNode (BitNode-1). For example, if the
*CrimeMoney* multiplier has a value of 0.1, then that means that committing crimes in the current BitNode *CrimeMoney* multiplier has a value of 0.1, then that means that committing crimes in the current BitNode
will only give 10% of the money you would have received in BitNode-1. The object has the following structure, will only give 10% of the money you would have received in BitNode-1.
(subject to change in the future)::
{ The structure of the returned object is subject to change as BitNode multipliers get added to the game.
ServerMaxMoney: 1, Refer to the `source code here <https://github.com/danielyxie/bitburner/blob/master/src/BitNode/BitNodeMultipliers.ts>`_
ServerStartingMoney: 1, to see the name of the BitNode multipliers.
ServerGrowthRate: 1,
ServerWeakenRate: 1,
ServerStartingSecurity: 1,
ManualHackMoney: 1,
ScriptHackMoney: 1,
CompanyWorkMoney: 1,
CrimeMoney: 1,
HacknetNodeMoney: 1,
CompanyWorkExpGain: 1,
ClassGymExpGain: 1,
FactionWorkExpGain: 1,
HackExpGain: 1,
CrimeExpGain: 1,
FactionWorkRepGain: 1,
FactionPassiveRepGain: 1,
AugmentationRepCost: 1,
AugmentationMoneyCost: 1,
}
Example:: Example::

546
package-lock.json generated

@ -1259,7 +1259,6 @@
"anymatch": "2.0.0", "anymatch": "2.0.0",
"async-each": "1.0.1", "async-each": "1.0.1",
"braces": "2.3.2", "braces": "2.3.2",
"fsevents": "1.2.4",
"glob-parent": "3.1.0", "glob-parent": "3.1.0",
"inherits": "2.0.3", "inherits": "2.0.3",
"is-binary-path": "1.0.1", "is-binary-path": "1.0.1",
@ -3777,535 +3776,6 @@
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
}, },
"fsevents": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz",
"integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==",
"dev": true,
"optional": true,
"requires": {
"nan": "2.12.1",
"node-pre-gyp": "0.10.0"
},
"dependencies": {
"abbrev": {
"version": "1.1.1",
"bundled": true,
"dev": true,
"optional": true
},
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
},
"aproba": {
"version": "1.2.0",
"bundled": true,
"dev": true,
"optional": true
},
"are-we-there-yet": {
"version": "1.1.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"delegates": "1.0.0",
"readable-stream": "2.3.6"
}
},
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"requires": {
"balanced-match": "1.0.0",
"concat-map": "0.0.1"
}
},
"chownr": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
},
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
},
"core-util-is": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
},
"debug": {
"version": "2.6.9",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ms": "2.0.0"
}
},
"deep-extend": {
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true
},
"delegates": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
},
"detect-libc": {
"version": "1.0.3",
"bundled": true,
"dev": true,
"optional": true
},
"fs-minipass": {
"version": "1.2.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minipass": "2.2.4"
}
},
"fs.realpath": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
},
"gauge": {
"version": "2.7.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"aproba": "1.2.0",
"console-control-strings": "1.1.0",
"has-unicode": "2.0.1",
"object-assign": "4.1.1",
"signal-exit": "3.0.2",
"string-width": "1.0.2",
"strip-ansi": "3.0.1",
"wide-align": "1.1.2"
}
},
"glob": {
"version": "7.1.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"fs.realpath": "1.0.0",
"inflight": "1.0.6",
"inherits": "2.0.3",
"minimatch": "3.0.4",
"once": "1.4.0",
"path-is-absolute": "1.0.1"
}
},
"has-unicode": {
"version": "2.0.1",
"bundled": true,
"dev": true,
"optional": true
},
"iconv-lite": {
"version": "0.4.21",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safer-buffer": "2.1.2"
}
},
"ignore-walk": {
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimatch": "3.0.4"
}
},
"inflight": {
"version": "1.0.6",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"once": "1.4.0",
"wrappy": "1.0.2"
}
},
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
},
"ini": {
"version": "1.3.5",
"bundled": true,
"dev": true,
"optional": true
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"requires": {
"number-is-nan": "1.0.1"
}
},
"isarray": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
},
"minimatch": {
"version": "3.0.4",
"bundled": true,
"dev": true,
"requires": {
"brace-expansion": "1.1.11"
}
},
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
"requires": {
"safe-buffer": "5.1.1",
"yallist": "3.0.2"
}
},
"minizlib": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minipass": "2.2.4"
}
},
"mkdirp": {
"version": "0.5.1",
"bundled": true,
"dev": true,
"requires": {
"minimist": "0.0.8"
}
},
"ms": {
"version": "2.0.0",
"bundled": true,
"dev": true,
"optional": true
},
"needle": {
"version": "2.2.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"debug": "2.6.9",
"iconv-lite": "0.4.21",
"sax": "1.2.4"
}
},
"node-pre-gyp": {
"version": "0.10.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"detect-libc": "1.0.3",
"mkdirp": "0.5.1",
"needle": "2.2.0",
"nopt": "4.0.1",
"npm-packlist": "1.1.10",
"npmlog": "4.1.2",
"rc": "1.2.7",
"rimraf": "2.6.2",
"semver": "5.5.0",
"tar": "4.4.1"
}
},
"nopt": {
"version": "4.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"abbrev": "1.1.1",
"osenv": "0.1.5"
}
},
"npm-bundled": {
"version": "1.0.3",
"bundled": true,
"dev": true,
"optional": true
},
"npm-packlist": {
"version": "1.1.10",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ignore-walk": "3.0.1",
"npm-bundled": "1.0.3"
}
},
"npmlog": {
"version": "4.1.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"are-we-there-yet": "1.1.4",
"console-control-strings": "1.1.0",
"gauge": "2.7.4",
"set-blocking": "2.0.0"
}
},
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
},
"object-assign": {
"version": "4.1.1",
"bundled": true,
"dev": true,
"optional": true
},
"once": {
"version": "1.4.0",
"bundled": true,
"dev": true,
"requires": {
"wrappy": "1.0.2"
}
},
"os-homedir": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
},
"os-tmpdir": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
},
"osenv": {
"version": "0.1.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"os-homedir": "1.0.2",
"os-tmpdir": "1.0.2"
}
},
"path-is-absolute": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
},
"process-nextick-args": {
"version": "2.0.0",
"bundled": true,
"dev": true,
"optional": true
},
"rc": {
"version": "1.2.7",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"deep-extend": "0.5.1",
"ini": "1.3.5",
"minimist": "1.2.0",
"strip-json-comments": "2.0.1"
},
"dependencies": {
"minimist": {
"version": "1.2.0",
"bundled": true,
"dev": true,
"optional": true
}
}
},
"readable-stream": {
"version": "2.3.6",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "2.0.0",
"safe-buffer": "5.1.1",
"string_decoder": "1.1.1",
"util-deprecate": "1.0.2"
}
},
"rimraf": {
"version": "2.6.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"glob": "7.1.2"
}
},
"safe-buffer": {
"version": "5.1.1",
"bundled": true,
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
"bundled": true,
"dev": true,
"optional": true
},
"sax": {
"version": "1.2.4",
"bundled": true,
"dev": true,
"optional": true
},
"semver": {
"version": "5.5.0",
"bundled": true,
"dev": true,
"optional": true
},
"set-blocking": {
"version": "2.0.0",
"bundled": true,
"dev": true,
"optional": true
},
"signal-exit": {
"version": "3.0.2",
"bundled": true,
"dev": true,
"optional": true
},
"string-width": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"requires": {
"code-point-at": "1.1.0",
"is-fullwidth-code-point": "1.0.0",
"strip-ansi": "3.0.1"
}
},
"string_decoder": {
"version": "1.1.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "5.1.1"
}
},
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
"dev": true,
"requires": {
"ansi-regex": "2.1.1"
}
},
"strip-json-comments": {
"version": "2.0.1",
"bundled": true,
"dev": true,
"optional": true
},
"tar": {
"version": "4.4.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"chownr": "1.0.1",
"fs-minipass": "1.2.5",
"minipass": "2.2.4",
"minizlib": "1.1.0",
"mkdirp": "0.5.1",
"safe-buffer": "5.1.1",
"yallist": "3.0.2"
}
},
"util-deprecate": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
},
"wide-align": {
"version": "1.1.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"string-width": "1.0.2"
}
},
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
},
"yallist": {
"version": "3.0.2",
"bundled": true,
"dev": true
}
}
},
"fstream": { "fstream": {
"version": "1.0.11", "version": "1.0.11",
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
@ -10642,6 +10112,14 @@
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
"dev": true "dev": true
}, },
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
},
"string-width": { "string-width": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
@ -10675,14 +10153,6 @@
} }
} }
}, },
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
},
"stringify-entities": { "stringify-entities": {
"version": "1.3.2", "version": "1.3.2",
"resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.2.tgz", "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.2.tgz",

@ -1,15 +1,33 @@
import { BitNodeMultipliers } from "./BitNodeMultipliers"; import { BitNodeMultipliers } from "./BitNodeMultipliers";
import { Player } from "../Player"; import { IPlayer } from "../PersonObjects/IPlayer";
import { IMap } from "../types";
function BitNode(n, name, desc="", info="") { class BitNode {
this.number = n; // A short description, or tagline, about the BitNode
this.name = name; desc: string;
this.desc = desc;
this.info = info; // A long, detailed overview of the BitNode
info: string;
// Name of BitNode
name: string;
// BitNode number
number: number;
constructor(n: number, name: string, desc: string="", info: string="") {
this.number = n;
this.name = name;
this.desc = desc;
this.info = info;
}
} }
let BitNodes = {};
function initBitNodes() { export let BitNodes: IMap<BitNode> = {};
export function initBitNodes() {
BitNodes = {}; BitNodes = {};
BitNodes["BitNode1"] = new BitNode(1, "Source Genesis", "The original BitNode", BitNodes["BitNode1"] = new BitNode(1, "Source Genesis", "The original BitNode",
"The first BitNode created by the Enders to imprison the minds of humans. It became " + "The first BitNode created by the Enders to imprison the minds of humans. It became " +
@ -216,9 +234,9 @@ function initBitNodes() {
BitNodes["BitNode24"] = new BitNode(24, "", "COMING SOON"); BitNodes["BitNode24"] = new BitNode(24, "", "COMING SOON");
} }
function initBitNodeMultipliers() { export function initBitNodeMultipliers(p: IPlayer) {
if (Player.bitNodeN == null) { if (p.bitNodeN == null) {
Player.bitNodeN = 1; p.bitNodeN = 1;
} }
for (var mult in BitNodeMultipliers) { for (var mult in BitNodeMultipliers) {
if (BitNodeMultipliers.hasOwnProperty(mult)) { if (BitNodeMultipliers.hasOwnProperty(mult)) {
@ -226,7 +244,7 @@ function initBitNodeMultipliers() {
} }
} }
switch (Player.bitNodeN) { switch (p.bitNodeN) {
case 1: //Source Genesis (every multiplier is 1) case 1: //Source Genesis (every multiplier is 1)
break; break;
case 2: //Rise of the Underworld case 2: //Rise of the Underworld
@ -279,8 +297,8 @@ function initBitNodeMultipliers() {
BitNodeMultipliers.CorporationValuation = 0.5; BitNodeMultipliers.CorporationValuation = 0.5;
break; break;
case 6: //Bladeburner case 6: //Bladeburner
BitNodeMultipliers.HackingLevelMultiplier = 0.4; BitNodeMultipliers.HackingLevelMultiplier = 0.35;
BitNodeMultipliers.ServerMaxMoney = 0.5; BitNodeMultipliers.ServerMaxMoney = 0.4;
BitNodeMultipliers.ServerStartingMoney = 0.5; BitNodeMultipliers.ServerStartingMoney = 0.5;
BitNodeMultipliers.ServerStartingSecurity = 1.5; BitNodeMultipliers.ServerStartingSecurity = 1.5;
BitNodeMultipliers.ScriptHackMoney = 0.5; BitNodeMultipliers.ScriptHackMoney = 0.5;
@ -291,13 +309,14 @@ function initBitNodeMultipliers() {
BitNodeMultipliers.HacknetNodeMoney = 0.2; BitNodeMultipliers.HacknetNodeMoney = 0.2;
BitNodeMultipliers.FactionPassiveRepGain = 0; BitNodeMultipliers.FactionPassiveRepGain = 0;
BitNodeMultipliers.HackExpGain = 0.25; BitNodeMultipliers.HackExpGain = 0.25;
BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed
break; break;
case 7: //Bladeburner 2079 case 7: //Bladeburner 2079
BitNodeMultipliers.BladeburnerRank = 0.6; BitNodeMultipliers.BladeburnerRank = 0.6;
BitNodeMultipliers.BladeburnerSkillCost = 2; BitNodeMultipliers.BladeburnerSkillCost = 2;
BitNodeMultipliers.AugmentationMoneyCost = 3; BitNodeMultipliers.AugmentationMoneyCost = 3;
BitNodeMultipliers.HackingLevelMultiplier = 0.4; BitNodeMultipliers.HackingLevelMultiplier = 0.35;
BitNodeMultipliers.ServerMaxMoney = 0.5; BitNodeMultipliers.ServerMaxMoney = 0.4;
BitNodeMultipliers.ServerStartingMoney = 0.5; BitNodeMultipliers.ServerStartingMoney = 0.5;
BitNodeMultipliers.ServerStartingSecurity = 1.5; BitNodeMultipliers.ServerStartingSecurity = 1.5;
BitNodeMultipliers.ScriptHackMoney = 0.5; BitNodeMultipliers.ScriptHackMoney = 0.5;
@ -308,6 +327,7 @@ function initBitNodeMultipliers() {
BitNodeMultipliers.HacknetNodeMoney = 0.2; BitNodeMultipliers.HacknetNodeMoney = 0.2;
BitNodeMultipliers.FactionPassiveRepGain = 0; BitNodeMultipliers.FactionPassiveRepGain = 0;
BitNodeMultipliers.HackExpGain = 0.25; BitNodeMultipliers.HackExpGain = 0.25;
BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed
break; break;
case 8: //Ghost of Wall Street case 8: //Ghost of Wall Street
BitNodeMultipliers.ScriptHackMoney = 0; BitNodeMultipliers.ScriptHackMoney = 0;
@ -321,48 +341,57 @@ function initBitNodeMultipliers() {
BitNodeMultipliers.CodingContractMoney = 0; BitNodeMultipliers.CodingContractMoney = 0;
break; break;
case 10: // Digital Carbon case 10: // Digital Carbon
BitNodeMultipliers.HackingLevelMultiplier = 0.2; BitNodeMultipliers.HackingLevelMultiplier = 0.2;
BitNodeMultipliers.StrengthLevelMultiplier = 0.4; BitNodeMultipliers.StrengthLevelMultiplier = 0.4;
BitNodeMultipliers.DefenseLevelMultiplier = 0.4; BitNodeMultipliers.DefenseLevelMultiplier = 0.4;
BitNodeMultipliers.DexterityLevelMultiplier = 0.4; BitNodeMultipliers.DexterityLevelMultiplier = 0.4;
BitNodeMultipliers.AgilityLevelMultiplier = 0.4; BitNodeMultipliers.AgilityLevelMultiplier = 0.4;
BitNodeMultipliers.CharismaLevelMultiplier = 0.4; BitNodeMultipliers.CharismaLevelMultiplier = 0.4;
BitNodeMultipliers.CompanyWorkMoney = 0.5; BitNodeMultipliers.CompanyWorkMoney = 0.5;
BitNodeMultipliers.CrimeMoney = 0.5; BitNodeMultipliers.CrimeMoney = 0.5;
BitNodeMultipliers.HacknetNodeMoney = 0.5; BitNodeMultipliers.HacknetNodeMoney = 0.5;
BitNodeMultipliers.ManualHackMoney = 0.5; BitNodeMultipliers.ManualHackMoney = 0.5;
BitNodeMultipliers.ScriptHackMoney = 0.5; BitNodeMultipliers.ScriptHackMoney = 0.5;
BitNodeMultipliers.CodingContractMoney = 0.5; BitNodeMultipliers.CodingContractMoney = 0.5;
BitNodeMultipliers.InfiltrationMoney = 0.5; BitNodeMultipliers.InfiltrationMoney = 0.5;
BitNodeMultipliers.CorporationValuation = 0.5; BitNodeMultipliers.CorporationValuation = 0.5;
BitNodeMultipliers.AugmentationMoneyCost = 5; BitNodeMultipliers.AugmentationMoneyCost = 5;
BitNodeMultipliers.AugmentationRepCost = 2; BitNodeMultipliers.AugmentationRepCost = 2;
BitNodeMultipliers.PurchasedServerCost = 5; BitNodeMultipliers.HomeComputerRamCost = 1.5;
BitNodeMultipliers.PurchasedServerLimit = 0.6; BitNodeMultipliers.PurchasedServerCost = 5;
BitNodeMultipliers.PurchasedServerMaxRam = 0.5; BitNodeMultipliers.PurchasedServerLimit = 0.6;
BitNodeMultipliers.PurchasedServerMaxRam = 0.5;
break; break;
case 11: //The Big Crash case 11: //The Big Crash
BitNodeMultipliers.ServerMaxMoney = 0.1; BitNodeMultipliers.ServerMaxMoney = 0.1;
BitNodeMultipliers.ServerStartingMoney = 0.1; BitNodeMultipliers.ServerStartingMoney = 0.1;
BitNodeMultipliers.ServerGrowthRate = 0.5; BitNodeMultipliers.ServerGrowthRate = 0.5;
BitNodeMultipliers.ServerWeakenRate = 2; BitNodeMultipliers.ServerWeakenRate = 2;
BitNodeMultipliers.CrimeMoney = 3; BitNodeMultipliers.CrimeMoney = 3;
BitNodeMultipliers.CompanyWorkMoney = 0.5; BitNodeMultipliers.CompanyWorkMoney = 0.5;
BitNodeMultipliers.HacknetNodeMoney = 0.1; BitNodeMultipliers.HacknetNodeMoney = 0.1;
BitNodeMultipliers.AugmentationMoneyCost = 2; BitNodeMultipliers.AugmentationMoneyCost = 2;
BitNodeMultipliers.InfiltrationMoney = 2.5; BitNodeMultipliers.InfiltrationMoney = 2.5;
BitNodeMultipliers.InfiltrationRep = 2.5; BitNodeMultipliers.InfiltrationRep = 2.5;
BitNodeMultipliers.CorporationValuation = 0.01; BitNodeMultipliers.CorporationValuation = 0.01;
BitNodeMultipliers.CodingContractMoney = 0.5;
BitNodeMultipliers.FourSigmaMarketDataCost = 4;
BitNodeMultipliers.FourSigmaMarketDataApiCost = 4;
break; break;
case 12: //The Recursion case 12: //The Recursion
var sf12Lvl = 0; var sf12Lvl = 0;
for (var i = 0; i < Player.sourceFiles.length; i++) { for (var i = 0; i < p.sourceFiles.length; i++) {
if (Player.sourceFiles[i].n === 12) { if (p.sourceFiles[i].n === 12) {
sf12Lvl = Player.sourceFiles[i].lvl; sf12Lvl = p.sourceFiles[i].lvl;
} }
} }
var inc = Math.pow(1.02, sf12Lvl); var inc = Math.pow(1.02, sf12Lvl);
var dec = 1/inc; var dec = 1/inc;
// Multiplier for number of augs needed for Daedalus increases
// up to a maximum of 1.34, which results in 40 Augs required
BitNodeMultipliers.DaedalusAugsRequirement = Math.min(inc, 1.34);
BitNodeMultipliers.HackingLevelMultiplier = dec; BitNodeMultipliers.HackingLevelMultiplier = dec;
BitNodeMultipliers.StrengthLevelMultiplier = dec; BitNodeMultipliers.StrengthLevelMultiplier = dec;
BitNodeMultipliers.DefenseLevelMultiplier = dec; BitNodeMultipliers.DefenseLevelMultiplier = dec;
@ -378,6 +407,8 @@ function initBitNodeMultipliers() {
//Does not scale, otherwise security might start at 300+ //Does not scale, otherwise security might start at 300+
BitNodeMultipliers.ServerStartingSecurity = 1.5; BitNodeMultipliers.ServerStartingSecurity = 1.5;
BitNodeMultipliers.HomeComputerRamCost = inc;
BitNodeMultipliers.PurchasedServerCost = inc; BitNodeMultipliers.PurchasedServerCost = inc;
BitNodeMultipliers.PurchasedServerLimit = dec; BitNodeMultipliers.PurchasedServerLimit = dec;
BitNodeMultipliers.PurchasedServerMaxRam = dec; BitNodeMultipliers.PurchasedServerMaxRam = dec;
@ -404,6 +435,9 @@ function initBitNodeMultipliers() {
BitNodeMultipliers.InfiltrationMoney = dec; BitNodeMultipliers.InfiltrationMoney = dec;
BitNodeMultipliers.InfiltrationRep = dec; BitNodeMultipliers.InfiltrationRep = dec;
BitNodeMultipliers.FourSigmaMarketDataCost = inc;
BitNodeMultipliers.FourSigmaMarketDataApiCost = inc;
BitNodeMultipliers.CorporationValuation = dec; BitNodeMultipliers.CorporationValuation = dec;
BitNodeMultipliers.BladeburnerRank = dec; BitNodeMultipliers.BladeburnerRank = dec;
@ -414,7 +448,3 @@ function initBitNodeMultipliers() {
break; break;
} }
} }
export {initBitNodes,
BitNodes,
initBitNodeMultipliers};

@ -69,6 +69,11 @@ interface IBitNodeMultipliers {
*/ */
CrimeMoney: number; CrimeMoney: number;
/**
* Influences how many Augmentations you need in order to get invited to the Daedalus faction
*/
DaedalusAugsRequirement: number;
/** /**
* Influences how quickly the player's defense level (not exp) scales * Influences how quickly the player's defense level (not exp) scales
*/ */
@ -94,6 +99,16 @@ interface IBitNodeMultipliers {
*/ */
FactionWorkRepGain: number; FactionWorkRepGain: number;
/**
* Influences how much it costs to unlock the stock market's 4S Market Data API
*/
FourSigmaMarketDataApiCost: number;
/**
* Influences how much it costs to unlock the stock market's 4S Market Data (NOT API)
*/
FourSigmaMarketDataCost: number;
/** /**
* Influences the experienced gained when hacking a server. * Influences the experienced gained when hacking a server.
*/ */
@ -109,6 +124,11 @@ interface IBitNodeMultipliers {
*/ */
HacknetNodeMoney: number; HacknetNodeMoney: number;
/**
* Influences how much money it costs to upgrade your home computer's RAM
*/
HomeComputerRamCost: number;
/** /**
* Influences how much money is gained when the player infiltrates a company. * Influences how much money is gained when the player infiltrates a company.
*/ */
@ -178,6 +198,9 @@ interface IBitNodeMultipliers {
* Influences how quickly the player's strength level (not exp) scales * Influences how quickly the player's strength level (not exp) scales
*/ */
StrengthLevelMultiplier: number; StrengthLevelMultiplier: number;
// Index signature
[key: string]: number;
} }
/** /**
@ -185,48 +208,55 @@ interface IBitNodeMultipliers {
*/ */
// tslint:disable-next-line:variable-name // tslint:disable-next-line:variable-name
export const BitNodeMultipliers: IBitNodeMultipliers = { export const BitNodeMultipliers: IBitNodeMultipliers = {
HackingLevelMultiplier: 1, HackingLevelMultiplier: 1,
StrengthLevelMultiplier: 1, StrengthLevelMultiplier: 1,
DefenseLevelMultiplier: 1, DefenseLevelMultiplier: 1,
DexterityLevelMultiplier: 1, DexterityLevelMultiplier: 1,
AgilityLevelMultiplier: 1, AgilityLevelMultiplier: 1,
CharismaLevelMultiplier: 1, CharismaLevelMultiplier: 1,
ServerGrowthRate: 1, ServerGrowthRate: 1,
ServerMaxMoney: 1, ServerMaxMoney: 1,
ServerStartingMoney: 1, ServerStartingMoney: 1,
ServerStartingSecurity: 1, ServerStartingSecurity: 1,
ServerWeakenRate: 1, ServerWeakenRate: 1,
PurchasedServerCost: 1, HomeComputerRamCost: 1,
PurchasedServerLimit: 1,
PurchasedServerMaxRam: 1,
CompanyWorkMoney: 1, PurchasedServerCost: 1,
CrimeMoney: 1, PurchasedServerLimit: 1,
HacknetNodeMoney: 1, PurchasedServerMaxRam: 1,
ManualHackMoney: 1,
ScriptHackMoney: 1,
CodingContractMoney: 1,
ClassGymExpGain: 1, CompanyWorkMoney: 1,
CompanyWorkExpGain: 1, CrimeMoney: 1,
CrimeExpGain: 1, HacknetNodeMoney: 1,
FactionWorkExpGain: 1, ManualHackMoney: 1,
HackExpGain: 1, ScriptHackMoney: 1,
CodingContractMoney: 1,
FactionPassiveRepGain: 1, ClassGymExpGain: 1,
FactionWorkRepGain: 1, CompanyWorkExpGain: 1,
RepToDonateToFaction: 1, CrimeExpGain: 1,
FactionWorkExpGain: 1,
HackExpGain: 1,
AugmentationMoneyCost: 1, FactionPassiveRepGain: 1,
AugmentationRepCost: 1, FactionWorkRepGain: 1,
RepToDonateToFaction: 1,
InfiltrationMoney: 1, AugmentationMoneyCost: 1,
InfiltrationRep: 1, AugmentationRepCost: 1,
CorporationValuation: 1, InfiltrationMoney: 1,
InfiltrationRep: 1,
BladeburnerRank: 1, FourSigmaMarketDataCost: 1,
BladeburnerSkillCost: 1, FourSigmaMarketDataApiCost: 1,
CorporationValuation: 1,
BladeburnerRank: 1,
BladeburnerSkillCost: 1,
DaedalusAugsRequirement: 1,
}; };

@ -274,7 +274,7 @@ export let CONSTANTS: IMap<any> = {
/* Coding Contract Constants */ /* Coding Contract Constants */
CodingContractBaseFactionRepGain: 2500, CodingContractBaseFactionRepGain: 2500,
CodingContractBaseCompanyRepGain: 4000, CodingContractBaseCompanyRepGain: 4000,
CodingContractBaseMoneyGain: 50e6, CodingContractBaseMoneyGain: 75e6,
// BitNode/Source-File related stuff // BitNode/Source-File related stuff
TotalNumBitNodes: 24, TotalNumBitNodes: 24,
@ -510,25 +510,17 @@ export let CONSTANTS: IMap<any> = {
LatestUpdate: LatestUpdate:
` `
v0.43.1 v0.44.0
* Terminal changes: * Added new BitNode multipliers:
** Quoted arguments are now properly parsed. (e.g. 'run f.script "this is one argument"' will be correctly parsed) ** HomeComputerRamCost - Affects how much it costs to upgrade home computer's RAM
** Errors are now shown in red text ** DaedalusAugsRequirement - Affects how many Augmentations you need in order to get invited to Daedalus
** 'unalias' command now has a different format and no longer needs the quotations ** FourSigmaMarketDataCost - Affects how much it costs to unlock the stock market's 4S Market Data
** Bug Fix: Fixed several edge cases where autocomplete wasnt working properly ** FourSigmaMarketDataApiCost - Affects how much it costs to unlock the stock market's 4S Market Data API
* Added two new Bladeburner skills for increasing money and experience gain * A few minor changes to BitNode multipliers across the board (mostly for the new multipliers)
* Made some minor adjustments to Bladeburner UI * 'The Covenant' now requires 20 total Augmentations to get invited, rather than 30
* Corporation "Smart Factories" and "Smart Storage" upgrades have slightly lower price multipliers * You can now purchase permanent Duplicate Sleeves from 'The Covenant'. This requires Source-File 10, and you must be in BN-10 or after
* Added nFormat Netscript function * Increased the money gained from Coding Contracts by 50%
* Added 6 new Coding Contract problems
* Updated documentation with list of all Coding Contract problems
* Minor improvements for 'Active Scripts' UI
* Implemented several optimizations for active scripts. The game should now use less memory and the savefile should be slightly smaller when there are many scripts running
* Bug Fix: A Stock Forecast should no longer go above 1 (i.e. 100%)
* Bug Fix: The cost of Resleeves should no longer be affected by buying Augs
* Bug Fix: Duplicate Sleeves now use their own stats to determine crime success rate, instead of the host consciousness' stats
* Bug Fix: You can now call the prompt() Netscript function from multiple scripts simultaneously
` `
} }

@ -12,6 +12,9 @@ import { HackingMission, setInMission } from "../Missions";
import { Player } from "../Player"; import { Player } from "../Player";
import { PurchaseAugmentationsOrderSetting } from "../Settings/SettingEnums"; import { PurchaseAugmentationsOrderSetting } from "../Settings/SettingEnums";
import { Settings } from "../Settings/Settings"; import { Settings } from "../Settings/Settings";
import { SourceFileFlags } from "../SourceFile/SourceFileFlags";
import { createPurchaseSleevesFromCovenantPopup } from "../PersonObjects/Sleeve/SleeveCovenantPurchases";
import {Page, routing} from "../ui/navigationTracking"; import {Page, routing} from "../ui/navigationTracking";
import {numeralWrapper} from "../ui/numeralFormat"; import {numeralWrapper} from "../ui/numeralFormat";
@ -57,6 +60,9 @@ function displayFactionContent(factionName) {
if (faction == null) { if (faction == null) {
throw new Error("Invalid factionName passed into displayFactionContent: " + factionName); throw new Error("Invalid factionName passed into displayFactionContent: " + factionName);
} }
if (!faction.isMember) {
throw new Error("Not a member of this faction, cannot display faction information");
}
var factionInfo = faction.getInfo(); var factionInfo = faction.getInfo();
removeChildrenFromElement(Engine.Display.factionContent); removeChildrenFromElement(Engine.Display.factionContent);
@ -108,9 +114,7 @@ function displayFactionContent(factionName) {
elements.push(createElement("br")); elements.push(createElement("br"));
//Hacking Mission Option //Hacking Mission Option
var hackMissionDiv = createElement("div", { var hackMissionDiv = createElement("div", { class:"faction-work-div" });
id:"faction-hack-mission-div", class:"faction-work-div",
});
var hackMissionDivWrapper = createElement("div", {class:"faction-work-div-wrapper"}); var hackMissionDivWrapper = createElement("div", {class:"faction-work-div-wrapper"});
hackMissionDiv.appendChild(hackMissionDivWrapper); hackMissionDiv.appendChild(hackMissionDivWrapper);
hackMissionDivWrapper.appendChild(createElement("a", { hackMissionDivWrapper.appendChild(createElement("a", {
@ -131,9 +135,7 @@ function displayFactionContent(factionName) {
elements.push(hackMissionDiv); elements.push(hackMissionDiv);
//Hacking Contracts Option //Hacking Contracts Option
var hackDiv = createElement("div", { var hackDiv = createElement("div", { class:"faction-work-div", });
id:"faction-hack-div", class:"faction-work-div",
});
var hackDivWrapper = createElement("div", {class:"faction-work-div-wrapper"}); var hackDivWrapper = createElement("div", {class:"faction-work-div-wrapper"});
hackDiv.appendChild(hackDivWrapper); hackDiv.appendChild(hackDivWrapper);
hackDivWrapper.appendChild(createElement("a", { hackDivWrapper.appendChild(createElement("a", {
@ -152,9 +154,7 @@ function displayFactionContent(factionName) {
elements.push(hackDiv); elements.push(hackDiv);
//Field Work Option //Field Work Option
var fieldWorkDiv = createElement("div", { var fieldWorkDiv = createElement("div", { class:"faction-work-div" });
id:"faction-fieldwork-div", class:"faction-work-div"
});
var fieldWorkDivWrapper = createElement("div", {class:"faction-work-div-wrapper"}); var fieldWorkDivWrapper = createElement("div", {class:"faction-work-div-wrapper"});
fieldWorkDiv.appendChild(fieldWorkDivWrapper); fieldWorkDiv.appendChild(fieldWorkDivWrapper);
fieldWorkDivWrapper.appendChild(createElement("a", { fieldWorkDivWrapper.appendChild(createElement("a", {
@ -173,9 +173,7 @@ function displayFactionContent(factionName) {
elements.push(fieldWorkDiv); elements.push(fieldWorkDiv);
//Security Work Option //Security Work Option
var securityWorkDiv = createElement("div", { var securityWorkDiv = createElement("div", { class:"faction-work-div" });
id:"faction-securitywork-div", class:"faction-work-div"
});
var securityWorkDivWrapper = createElement("div", {class:"faction-work-div-wrapper"}); var securityWorkDivWrapper = createElement("div", {class:"faction-work-div-wrapper"});
securityWorkDiv.appendChild(securityWorkDivWrapper); securityWorkDiv.appendChild(securityWorkDivWrapper);
securityWorkDivWrapper.appendChild(createElement("a", { securityWorkDivWrapper.appendChild(createElement("a", {
@ -194,9 +192,7 @@ function displayFactionContent(factionName) {
elements.push(securityWorkDiv); elements.push(securityWorkDiv);
//Donate for reputation //Donate for reputation
var donateDiv = createElement("div", { var donateDiv = createElement("div", { class:"faction-work-div" });
id:"faction-donate-div", class:"faction-work-div"
});
var donateDivWrapper = createElement("div", {class:"faction-work-div-wrapper"}); var donateDivWrapper = createElement("div", {class:"faction-work-div-wrapper"});
donateDiv.appendChild(donateDivWrapper); donateDiv.appendChild(donateDivWrapper);
var donateRepGain = createElement("p", { var donateRepGain = createElement("p", {
@ -247,12 +243,13 @@ function displayFactionContent(factionName) {
"your abilities.<br><br>" "your abilities.<br><br>"
})); }));
elements.push(createElement("a", { elements.push(createElement("a", {
class:"a-link-button", innerText:"Purchase Augmentations", class:"std-button",
innerText:"Purchase Augmentations",
margin: "5px",
clickListener:()=>{ clickListener:()=>{
Engine.hideAllContent(); Engine.hideAllContent();
Engine.Display.factionAugmentationsContent.style.display = "block"; Engine.Display.factionAugmentationsContent.style.display = "block";
displayFactionAugmentations(factionName); displayFactionAugmentations(factionName);
return false; return false;
} }
@ -338,10 +335,26 @@ function displayFactionContent(factionName) {
return; return;
} }
if (!faction.isMember) { // Purchase Sleeves from Covenant
throw new Error("Not a member of this faction, cannot display faction information"); if (Player.bitNodeN >= 10 && SourceFileFlags[10]) {
} const covenantPurchaseSleevesDiv = createElement("div", { class: "faction-work-div" });
const covenantPurchaseSleevesDivWrapper = createElement("div", { class: "faction-wkro-div-wrapper" });
covenantPurchaseSleevesDiv.appendChild(covenantPurchaseSleevesDivWrapper);
covenantPurchaseSleevesDivWrapper.appendChild(createElement("button", {
class: "std-button",
innerText: "Purchase Duplicate Sleeves",
clickListener: () => {
createPurchaseSleevesFromCovenantPopup(Player);
}
}));
covenantPurchaseSleevesDivWrapper.appendChild(createElement("p", {
innerText: "Purchase Duplicate Sleeves. These are permanent! You can purchase up to 5 total.",
}));
elements.push(covenantPurchaseSleevesDiv);
}
// Determine if actions should be possible
donateDiv.style.display = faction.favor >= Math.floor(CONSTANTS.BaseFavorToDonate * BitNodeMultipliers.RepToDonateToFaction) ? "inline" : "none"; donateDiv.style.display = faction.favor >= Math.floor(CONSTANTS.BaseFavorToDonate * BitNodeMultipliers.RepToDonateToFaction) ? "inline" : "none";
hackMissionDiv.style.display = factionInfo.offerHackingMission ? "inline": "none"; hackMissionDiv.style.display = factionInfo.offerHackingMission ? "inline": "none";

@ -51,6 +51,8 @@ import {StockMarket, StockSymbols, SymbolToStockMap,
sellStock, updateStockPlayerPosition, sellStock, updateStockPlayerPosition,
shortStock, sellShort, OrderTypes, shortStock, sellShort, OrderTypes,
PositionTypes, placeOrder, cancelOrder} from "./StockMarket/StockMarket"; PositionTypes, placeOrder, cancelOrder} from "./StockMarket/StockMarket";
import { getStockmarket4SDataCost,
getStockMarket4STixApiCost } from "./StockMarket/StockMarketCosts";
import {numeralWrapper} from "./ui/numeralFormat"; import {numeralWrapper} from "./ui/numeralFormat";
import {post} from "./ui/postToTerminal"; import {post} from "./ui/postToTerminal";
import {TextFile, getTextFile, createTextFile} from "./TextFile"; import {TextFile, getTextFile, createTextFile} from "./TextFile";
@ -1847,7 +1849,7 @@ function NetscriptFunctions(workerScript) {
return true; return true;
} }
if (Player.money.lt(CONSTANTS.MarketData4SCost)) { if (Player.money.lt(getStockMarket4SDataCost())) {
if (workerScript.shouldLog("purchase4SMarketData")) { if (workerScript.shouldLog("purchase4SMarketData")) {
workerScript.log("Failed to purchase 4S Market Data - Not enough money"); workerScript.log("Failed to purchase 4S Market Data - Not enough money");
} }
@ -1855,7 +1857,7 @@ function NetscriptFunctions(workerScript) {
} }
Player.has4SData = true; Player.has4SData = true;
Player.loseMoney(CONSTANTS.MarketData4SCost); Player.loseMoney(getStockMarket4SDataCost());
if (workerScript.shouldLog("purchase4SMarketData")) { if (workerScript.shouldLog("purchase4SMarketData")) {
workerScript.log("Purchased 4S Market Data"); workerScript.log("Purchased 4S Market Data");
} }
@ -1878,7 +1880,7 @@ function NetscriptFunctions(workerScript) {
return true; return true;
} }
if (Player.money.lt(CONSTANTS.MarketDataTixApi4SCost)) { if (Player.money.lt(getStockMarket4STixApiCost())) {
if (workerScript.shouldLog("purchase4SMarketDataTixApi")) { if (workerScript.shouldLog("purchase4SMarketDataTixApi")) {
workerScript.log("Failed to purchase 4S Market Data TIX API - Not enough money"); workerScript.log("Failed to purchase 4S Market Data TIX API - Not enough money");
} }
@ -1886,7 +1888,7 @@ function NetscriptFunctions(workerScript) {
} }
Player.has4SDataTixApi = true; Player.has4SDataTixApi = true;
Player.loseMoney(CONSTANTS.MarketDataTixApi4SCost); Player.loseMoney(getStockMarket4STixApiCost());
if (workerScript.shouldLog("purchase4SMarketDataTixApi")) { if (workerScript.shouldLog("purchase4SMarketDataTixApi")) {
workerScript.log("Purchased 4S Market Data TIX API"); workerScript.log("Purchased 4S Market Data TIX API");
} }

@ -15,6 +15,7 @@ export interface IPlayer {
// Class members // Class members
augmentations: IPlayerOwnedAugmentation[]; augmentations: IPlayerOwnedAugmentation[];
bladeburner: any; bladeburner: any;
bitNodeN: number;
companyName: string; companyName: string;
corporation: any; corporation: any;
factions: string[]; factions: string[];

@ -438,13 +438,13 @@ PlayerObject.prototype.getHomeComputer = function() {
PlayerObject.prototype.getUpgradeHomeRamCost = function() { PlayerObject.prototype.getUpgradeHomeRamCost = function() {
//Calculate how many times ram has been upgraded (doubled) //Calculate how many times ram has been upgraded (doubled)
const currentRam = Player.getHomeComputer().maxRam; const currentRam = this.getHomeComputer().maxRam;
const numUpgrades = Math.log2(currentRam); const numUpgrades = Math.log2(currentRam);
//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
const mult = Math.pow(1.58, numUpgrades); const mult = Math.pow(1.58, numUpgrades);
var cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome * mult; var cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome * mult * BitNodeMultipliers.HomeComputerRamCost;
return cost; return cost;
} }
@ -2044,7 +2044,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 &&
numAugmentations >= 30 && numAugmentations >= Math.round(30 * BitNodeMultipliers.DaedalusAugsRequirement) &&
this.money.gte(100000000000) && this.money.gte(100000000000) &&
(this.hacking_skill >= 2500 || (this.hacking_skill >= 2500 ||
(this.strength >= 1500 && this.defense >= 1500 && (this.strength >= 1500 && this.defense >= 1500 &&
@ -2055,7 +2055,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 &&
numAugmentations >= 30 && numAugmentations >= 20 &&
this.money.gte(75000000000) && this.money.gte(75000000000) &&
this.hacking_skill >= 850 && this.hacking_skill >= 850 &&
this.strength >= 850 && this.strength >= 850 &&

@ -55,7 +55,7 @@ function prestigeAugmentation() {
Engine.loadTerminalContent(); Engine.loadTerminalContent();
routing.navigateTo(Page.Terminal); routing.navigateTo(Page.Terminal);
initBitNodeMultipliers(); initBitNodeMultipliers(Player);
Player.prestigeAugmentation(); Player.prestigeAugmentation();
@ -175,7 +175,7 @@ function prestigeAugmentation() {
//Prestige by destroying Bit Node and gaining a Source File //Prestige by destroying Bit Node and gaining a Source File
function prestigeSourceFile() { function prestigeSourceFile() {
initBitNodeMultipliers(); initBitNodeMultipliers(Player);
updateSourceFileFlags(Player); updateSourceFileFlags(Player);
Player.prestigeSourceFile(); Player.prestigeSourceFile();

@ -1,4 +1,6 @@
import {Stock} from "./Stock"; import {Stock} from "./Stock";
import { getStockMarket4SDataCost,
getStockMarket4STixApiCost } from "./StockMarketCosts";
import {CONSTANTS} from "../Constants"; import {CONSTANTS} from "../Constants";
import {Locations} from "../Locations"; import {Locations} from "../Locations";
@ -767,13 +769,13 @@ function displayStockMarketContent() {
//Purchase Four Sigma Market Data Feed //Purchase Four Sigma Market Data Feed
var marketDataButton = clearEventListeners("stock-market-buy-4s-data"); var marketDataButton = clearEventListeners("stock-market-buy-4s-data");
stylePurchaseButton(marketDataButton, CONSTANTS.MarketData4SCost, Player.has4SData, stylePurchaseButton(marketDataButton, getStockMarket4SDataCost(), Player.has4SData,
"Buy 4S Market Data Access - " + numeralWrapper.format(CONSTANTS.MarketData4SCost, '($0.000a)'), "Buy 4S Market Data Access - " + numeralWrapper.format(getStockMarket4SDataCost(), '($0.000a)'),
"4S Market Data - Purchased"); "4S Market Data - Purchased");
marketDataButton.addEventListener("click", function() { marketDataButton.addEventListener("click", function() {
if (Player.money.lt(CONSTANTS.MarketData4SCost)) { return false; } if (Player.money.lt(getStockMarket4SDataCost())) { return false; }
Player.has4SData = true; Player.has4SData = true;
Player.loseMoney(CONSTANTS.MarketData4SCost); Player.loseMoney(getStockMarket4SDataCost());
displayStockMarketContent(); displayStockMarketContent();
return false; return false;
}); });
@ -806,14 +808,14 @@ function displayStockMarketContent() {
//Purchase Four Sigma Market Data TIX API (Requires TIX API Access) //Purchase Four Sigma Market Data TIX API (Requires TIX API Access)
var marketDataTixButton = clearEventListeners("stock-market-buy-4s-tix-api"); var marketDataTixButton = clearEventListeners("stock-market-buy-4s-tix-api");
stylePurchaseButton(marketDataTixButton, CONSTANTS.MarketDataTixApi4SCost, Player.has4SDataTixApi, stylePurchaseButton(marketDataTixButton, getStockMarket4STixApiCost(), Player.has4SDataTixApi,
"Buy 4S Market Data TIX API Access - " + numeralWrapper.format(CONSTANTS.MarketDataTixApi4SCost, '($0.000a)'), "Buy 4S Market Data TIX API Access - " + numeralWrapper.format(getStockMarket4STixApiCost(), '($0.000a)'),
"4S Market Data TIX API - Purchased"); "4S Market Data TIX API - Purchased");
if (Player.hasTixApiAccess) { if (Player.hasTixApiAccess) {
marketDataTixButton.addEventListener("click", function() { marketDataTixButton.addEventListener("click", function() {
if (Player.money.lt(CONSTANTS.MarketDataTixApi4SCost)) { return false; } if (Player.money.lt(getStockMarket4STixApiCost())) { return false; }
Player.has4SDataTixApi = true; Player.has4SDataTixApi = true;
Player.loseMoney(CONSTANTS.MarketDataTixApi4SCost); Player.loseMoney(getStockMarket4STixApiCost());
displayStockMarketContent(); displayStockMarketContent();
return false; return false;
}); });

@ -0,0 +1,18 @@
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
import { CONSTANTS } from "../Constants";
export function getStockMarketAccountCost(): number {
return CONSTANTS.WSEAccountCost;
}
export function getStockMarketTixApiCost(): number {
return CONSTANTS.TIXAPICost;
}
export function getStockMarket4SDataCost(): number {
return CONSTANTS.MarketData4SCost * BitNodeMultipliers.FourSigmaMarketDataCost;
}
export function getStockMarket4STixApiCost(): number {
return CONSTANTS.MarketDataTixApi4SCost * BitNodeMultipliers.FourSigmaMarketDataApiCost;
}

@ -1275,7 +1275,7 @@ const Engine = {
if (loadGame(saveString)) { if (loadGame(saveString)) {
console.log("Loaded game from save"); console.log("Loaded game from save");
initBitNodes(); initBitNodes();
initBitNodeMultipliers(); initBitNodeMultipliers(Player);
initSourceFiles(); initSourceFiles();
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.
@ -1397,7 +1397,7 @@ const Engine = {
//No save found, start new game //No save found, start new game
console.log("Initializing new game"); console.log("Initializing new game");
initBitNodes(); initBitNodes();
initBitNodeMultipliers(); initBitNodeMultipliers(Player);
initSourceFiles(); initSourceFiles();
initSpecialServerIps(); initSpecialServerIps();
Engine.setDisplayElements(); //Sets variables for important DOM elements Engine.setDisplayElements(); //Sets variables for important DOM elements