mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 23:08:36 +02:00
New BitNode multipliers, new Covenant Sleeve Purchasing feature. untested
This commit is contained in:
@@ -1,15 +1,33 @@
|
||||
import { BitNodeMultipliers } from "./BitNodeMultipliers";
|
||||
import { Player } from "../Player";
|
||||
import { IPlayer } from "../PersonObjects/IPlayer";
|
||||
import { IMap } from "../types";
|
||||
|
||||
function BitNode(n, name, desc="", info="") {
|
||||
this.number = n;
|
||||
this.name = name;
|
||||
this.desc = desc;
|
||||
this.info = info;
|
||||
class BitNode {
|
||||
// A short description, or tagline, about the BitNode
|
||||
desc: string;
|
||||
|
||||
// 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["BitNode1"] = new BitNode(1, "Source Genesis", "The original BitNode",
|
||||
"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");
|
||||
}
|
||||
|
||||
function initBitNodeMultipliers() {
|
||||
if (Player.bitNodeN == null) {
|
||||
Player.bitNodeN = 1;
|
||||
export function initBitNodeMultipliers(p: IPlayer) {
|
||||
if (p.bitNodeN == null) {
|
||||
p.bitNodeN = 1;
|
||||
}
|
||||
for (var mult in BitNodeMultipliers) {
|
||||
if (BitNodeMultipliers.hasOwnProperty(mult)) {
|
||||
@@ -226,7 +244,7 @@ function initBitNodeMultipliers() {
|
||||
}
|
||||
}
|
||||
|
||||
switch (Player.bitNodeN) {
|
||||
switch (p.bitNodeN) {
|
||||
case 1: //Source Genesis (every multiplier is 1)
|
||||
break;
|
||||
case 2: //Rise of the Underworld
|
||||
@@ -279,8 +297,8 @@ function initBitNodeMultipliers() {
|
||||
BitNodeMultipliers.CorporationValuation = 0.5;
|
||||
break;
|
||||
case 6: //Bladeburner
|
||||
BitNodeMultipliers.HackingLevelMultiplier = 0.4;
|
||||
BitNodeMultipliers.ServerMaxMoney = 0.5;
|
||||
BitNodeMultipliers.HackingLevelMultiplier = 0.35;
|
||||
BitNodeMultipliers.ServerMaxMoney = 0.4;
|
||||
BitNodeMultipliers.ServerStartingMoney = 0.5;
|
||||
BitNodeMultipliers.ServerStartingSecurity = 1.5;
|
||||
BitNodeMultipliers.ScriptHackMoney = 0.5;
|
||||
@@ -291,13 +309,14 @@ function initBitNodeMultipliers() {
|
||||
BitNodeMultipliers.HacknetNodeMoney = 0.2;
|
||||
BitNodeMultipliers.FactionPassiveRepGain = 0;
|
||||
BitNodeMultipliers.HackExpGain = 0.25;
|
||||
BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed
|
||||
break;
|
||||
case 7: //Bladeburner 2079
|
||||
BitNodeMultipliers.BladeburnerRank = 0.6;
|
||||
BitNodeMultipliers.BladeburnerSkillCost = 2;
|
||||
BitNodeMultipliers.AugmentationMoneyCost = 3;
|
||||
BitNodeMultipliers.HackingLevelMultiplier = 0.4;
|
||||
BitNodeMultipliers.ServerMaxMoney = 0.5;
|
||||
BitNodeMultipliers.HackingLevelMultiplier = 0.35;
|
||||
BitNodeMultipliers.ServerMaxMoney = 0.4;
|
||||
BitNodeMultipliers.ServerStartingMoney = 0.5;
|
||||
BitNodeMultipliers.ServerStartingSecurity = 1.5;
|
||||
BitNodeMultipliers.ScriptHackMoney = 0.5;
|
||||
@@ -308,6 +327,7 @@ function initBitNodeMultipliers() {
|
||||
BitNodeMultipliers.HacknetNodeMoney = 0.2;
|
||||
BitNodeMultipliers.FactionPassiveRepGain = 0;
|
||||
BitNodeMultipliers.HackExpGain = 0.25;
|
||||
BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed
|
||||
break;
|
||||
case 8: //Ghost of Wall Street
|
||||
BitNodeMultipliers.ScriptHackMoney = 0;
|
||||
@@ -321,48 +341,57 @@ function initBitNodeMultipliers() {
|
||||
BitNodeMultipliers.CodingContractMoney = 0;
|
||||
break;
|
||||
case 10: // Digital Carbon
|
||||
BitNodeMultipliers.HackingLevelMultiplier = 0.2;
|
||||
BitNodeMultipliers.StrengthLevelMultiplier = 0.4;
|
||||
BitNodeMultipliers.DefenseLevelMultiplier = 0.4;
|
||||
BitNodeMultipliers.HackingLevelMultiplier = 0.2;
|
||||
BitNodeMultipliers.StrengthLevelMultiplier = 0.4;
|
||||
BitNodeMultipliers.DefenseLevelMultiplier = 0.4;
|
||||
BitNodeMultipliers.DexterityLevelMultiplier = 0.4;
|
||||
BitNodeMultipliers.AgilityLevelMultiplier = 0.4;
|
||||
BitNodeMultipliers.CharismaLevelMultiplier = 0.4;
|
||||
BitNodeMultipliers.CompanyWorkMoney = 0.5;
|
||||
BitNodeMultipliers.CrimeMoney = 0.5;
|
||||
BitNodeMultipliers.HacknetNodeMoney = 0.5;
|
||||
BitNodeMultipliers.ManualHackMoney = 0.5;
|
||||
BitNodeMultipliers.ScriptHackMoney = 0.5;
|
||||
BitNodeMultipliers.CodingContractMoney = 0.5;
|
||||
BitNodeMultipliers.InfiltrationMoney = 0.5;
|
||||
BitNodeMultipliers.CorporationValuation = 0.5;
|
||||
BitNodeMultipliers.AugmentationMoneyCost = 5;
|
||||
BitNodeMultipliers.AugmentationRepCost = 2;
|
||||
BitNodeMultipliers.PurchasedServerCost = 5;
|
||||
BitNodeMultipliers.PurchasedServerLimit = 0.6;
|
||||
BitNodeMultipliers.PurchasedServerMaxRam = 0.5;
|
||||
BitNodeMultipliers.AgilityLevelMultiplier = 0.4;
|
||||
BitNodeMultipliers.CharismaLevelMultiplier = 0.4;
|
||||
BitNodeMultipliers.CompanyWorkMoney = 0.5;
|
||||
BitNodeMultipliers.CrimeMoney = 0.5;
|
||||
BitNodeMultipliers.HacknetNodeMoney = 0.5;
|
||||
BitNodeMultipliers.ManualHackMoney = 0.5;
|
||||
BitNodeMultipliers.ScriptHackMoney = 0.5;
|
||||
BitNodeMultipliers.CodingContractMoney = 0.5;
|
||||
BitNodeMultipliers.InfiltrationMoney = 0.5;
|
||||
BitNodeMultipliers.CorporationValuation = 0.5;
|
||||
BitNodeMultipliers.AugmentationMoneyCost = 5;
|
||||
BitNodeMultipliers.AugmentationRepCost = 2;
|
||||
BitNodeMultipliers.HomeComputerRamCost = 1.5;
|
||||
BitNodeMultipliers.PurchasedServerCost = 5;
|
||||
BitNodeMultipliers.PurchasedServerLimit = 0.6;
|
||||
BitNodeMultipliers.PurchasedServerMaxRam = 0.5;
|
||||
break;
|
||||
case 11: //The Big Crash
|
||||
BitNodeMultipliers.ServerMaxMoney = 0.1;
|
||||
BitNodeMultipliers.ServerStartingMoney = 0.1;
|
||||
BitNodeMultipliers.ServerGrowthRate = 0.5;
|
||||
BitNodeMultipliers.ServerWeakenRate = 2;
|
||||
BitNodeMultipliers.CrimeMoney = 3;
|
||||
BitNodeMultipliers.CompanyWorkMoney = 0.5;
|
||||
BitNodeMultipliers.HacknetNodeMoney = 0.1;
|
||||
BitNodeMultipliers.AugmentationMoneyCost = 2;
|
||||
BitNodeMultipliers.InfiltrationMoney = 2.5;
|
||||
BitNodeMultipliers.InfiltrationRep = 2.5;
|
||||
BitNodeMultipliers.CorporationValuation = 0.01;
|
||||
BitNodeMultipliers.ServerMaxMoney = 0.1;
|
||||
BitNodeMultipliers.ServerStartingMoney = 0.1;
|
||||
BitNodeMultipliers.ServerGrowthRate = 0.5;
|
||||
BitNodeMultipliers.ServerWeakenRate = 2;
|
||||
BitNodeMultipliers.CrimeMoney = 3;
|
||||
BitNodeMultipliers.CompanyWorkMoney = 0.5;
|
||||
BitNodeMultipliers.HacknetNodeMoney = 0.1;
|
||||
BitNodeMultipliers.AugmentationMoneyCost = 2;
|
||||
BitNodeMultipliers.InfiltrationMoney = 2.5;
|
||||
BitNodeMultipliers.InfiltrationRep = 2.5;
|
||||
BitNodeMultipliers.CorporationValuation = 0.01;
|
||||
BitNodeMultipliers.CodingContractMoney = 0.5;
|
||||
BitNodeMultipliers.FourSigmaMarketDataCost = 4;
|
||||
BitNodeMultipliers.FourSigmaMarketDataApiCost = 4;
|
||||
break;
|
||||
case 12: //The Recursion
|
||||
var sf12Lvl = 0;
|
||||
for (var i = 0; i < Player.sourceFiles.length; i++) {
|
||||
if (Player.sourceFiles[i].n === 12) {
|
||||
sf12Lvl = Player.sourceFiles[i].lvl;
|
||||
for (var i = 0; i < p.sourceFiles.length; i++) {
|
||||
if (p.sourceFiles[i].n === 12) {
|
||||
sf12Lvl = p.sourceFiles[i].lvl;
|
||||
}
|
||||
}
|
||||
var inc = Math.pow(1.02, sf12Lvl);
|
||||
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.StrengthLevelMultiplier = dec;
|
||||
BitNodeMultipliers.DefenseLevelMultiplier = dec;
|
||||
@@ -378,6 +407,8 @@ function initBitNodeMultipliers() {
|
||||
//Does not scale, otherwise security might start at 300+
|
||||
BitNodeMultipliers.ServerStartingSecurity = 1.5;
|
||||
|
||||
BitNodeMultipliers.HomeComputerRamCost = inc;
|
||||
|
||||
BitNodeMultipliers.PurchasedServerCost = inc;
|
||||
BitNodeMultipliers.PurchasedServerLimit = dec;
|
||||
BitNodeMultipliers.PurchasedServerMaxRam = dec;
|
||||
@@ -404,6 +435,9 @@ function initBitNodeMultipliers() {
|
||||
BitNodeMultipliers.InfiltrationMoney = dec;
|
||||
BitNodeMultipliers.InfiltrationRep = dec;
|
||||
|
||||
BitNodeMultipliers.FourSigmaMarketDataCost = inc;
|
||||
BitNodeMultipliers.FourSigmaMarketDataApiCost = inc;
|
||||
|
||||
BitNodeMultipliers.CorporationValuation = dec;
|
||||
|
||||
BitNodeMultipliers.BladeburnerRank = dec;
|
||||
@@ -414,7 +448,3 @@ function initBitNodeMultipliers() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
export {initBitNodes,
|
||||
BitNodes,
|
||||
initBitNodeMultipliers};
|
||||
@@ -69,6 +69,11 @@ interface IBitNodeMultipliers {
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -94,6 +99,16 @@ interface IBitNodeMultipliers {
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
@@ -109,6 +124,11 @@ interface IBitNodeMultipliers {
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
@@ -178,6 +198,9 @@ interface IBitNodeMultipliers {
|
||||
* Influences how quickly the player's strength level (not exp) scales
|
||||
*/
|
||||
StrengthLevelMultiplier: number;
|
||||
|
||||
// Index signature
|
||||
[key: string]: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -185,48 +208,55 @@ interface IBitNodeMultipliers {
|
||||
*/
|
||||
// tslint:disable-next-line:variable-name
|
||||
export const BitNodeMultipliers: IBitNodeMultipliers = {
|
||||
HackingLevelMultiplier: 1,
|
||||
StrengthLevelMultiplier: 1,
|
||||
DefenseLevelMultiplier: 1,
|
||||
DexterityLevelMultiplier: 1,
|
||||
AgilityLevelMultiplier: 1,
|
||||
CharismaLevelMultiplier: 1,
|
||||
HackingLevelMultiplier: 1,
|
||||
StrengthLevelMultiplier: 1,
|
||||
DefenseLevelMultiplier: 1,
|
||||
DexterityLevelMultiplier: 1,
|
||||
AgilityLevelMultiplier: 1,
|
||||
CharismaLevelMultiplier: 1,
|
||||
|
||||
ServerGrowthRate: 1,
|
||||
ServerMaxMoney: 1,
|
||||
ServerStartingMoney: 1,
|
||||
ServerStartingSecurity: 1,
|
||||
ServerWeakenRate: 1,
|
||||
ServerGrowthRate: 1,
|
||||
ServerMaxMoney: 1,
|
||||
ServerStartingMoney: 1,
|
||||
ServerStartingSecurity: 1,
|
||||
ServerWeakenRate: 1,
|
||||
|
||||
PurchasedServerCost: 1,
|
||||
PurchasedServerLimit: 1,
|
||||
PurchasedServerMaxRam: 1,
|
||||
HomeComputerRamCost: 1,
|
||||
|
||||
CompanyWorkMoney: 1,
|
||||
CrimeMoney: 1,
|
||||
HacknetNodeMoney: 1,
|
||||
ManualHackMoney: 1,
|
||||
ScriptHackMoney: 1,
|
||||
CodingContractMoney: 1,
|
||||
PurchasedServerCost: 1,
|
||||
PurchasedServerLimit: 1,
|
||||
PurchasedServerMaxRam: 1,
|
||||
|
||||
ClassGymExpGain: 1,
|
||||
CompanyWorkExpGain: 1,
|
||||
CrimeExpGain: 1,
|
||||
FactionWorkExpGain: 1,
|
||||
HackExpGain: 1,
|
||||
CompanyWorkMoney: 1,
|
||||
CrimeMoney: 1,
|
||||
HacknetNodeMoney: 1,
|
||||
ManualHackMoney: 1,
|
||||
ScriptHackMoney: 1,
|
||||
CodingContractMoney: 1,
|
||||
|
||||
FactionPassiveRepGain: 1,
|
||||
FactionWorkRepGain: 1,
|
||||
RepToDonateToFaction: 1,
|
||||
ClassGymExpGain: 1,
|
||||
CompanyWorkExpGain: 1,
|
||||
CrimeExpGain: 1,
|
||||
FactionWorkExpGain: 1,
|
||||
HackExpGain: 1,
|
||||
|
||||
AugmentationMoneyCost: 1,
|
||||
AugmentationRepCost: 1,
|
||||
FactionPassiveRepGain: 1,
|
||||
FactionWorkRepGain: 1,
|
||||
RepToDonateToFaction: 1,
|
||||
|
||||
InfiltrationMoney: 1,
|
||||
InfiltrationRep: 1,
|
||||
AugmentationMoneyCost: 1,
|
||||
AugmentationRepCost: 1,
|
||||
|
||||
CorporationValuation: 1,
|
||||
InfiltrationMoney: 1,
|
||||
InfiltrationRep: 1,
|
||||
|
||||
BladeburnerRank: 1,
|
||||
BladeburnerSkillCost: 1,
|
||||
FourSigmaMarketDataCost: 1,
|
||||
FourSigmaMarketDataApiCost: 1,
|
||||
|
||||
CorporationValuation: 1,
|
||||
|
||||
BladeburnerRank: 1,
|
||||
BladeburnerSkillCost: 1,
|
||||
|
||||
DaedalusAugsRequirement: 1,
|
||||
};
|
||||
|
||||
@@ -274,7 +274,7 @@ export let CONSTANTS: IMap<any> = {
|
||||
/* Coding Contract Constants */
|
||||
CodingContractBaseFactionRepGain: 2500,
|
||||
CodingContractBaseCompanyRepGain: 4000,
|
||||
CodingContractBaseMoneyGain: 50e6,
|
||||
CodingContractBaseMoneyGain: 75e6,
|
||||
|
||||
// BitNode/Source-File related stuff
|
||||
TotalNumBitNodes: 24,
|
||||
@@ -510,25 +510,17 @@ export let CONSTANTS: IMap<any> = {
|
||||
|
||||
LatestUpdate:
|
||||
`
|
||||
v0.43.1
|
||||
* Terminal changes:
|
||||
** Quoted arguments are now properly parsed. (e.g. 'run f.script "this is one argument"' will be correctly parsed)
|
||||
** Errors are now shown in red text
|
||||
** 'unalias' command now has a different format and no longer needs the quotations
|
||||
** Bug Fix: Fixed several edge cases where autocomplete wasnt working properly
|
||||
v0.44.0
|
||||
* Added new BitNode multipliers:
|
||||
** HomeComputerRamCost - Affects how much it costs to upgrade home computer's RAM
|
||||
** DaedalusAugsRequirement - Affects how many Augmentations you need in order to get invited to Daedalus
|
||||
** FourSigmaMarketDataCost - Affects how much it costs to unlock the stock market's 4S Market Data
|
||||
** 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
|
||||
* Made some minor adjustments to Bladeburner UI
|
||||
* Corporation "Smart Factories" and "Smart Storage" upgrades have slightly lower price multipliers
|
||||
* Added nFormat Netscript function
|
||||
* 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
|
||||
* A few minor changes to BitNode multipliers across the board (mostly for the new multipliers)
|
||||
* 'The Covenant' now requires 20 total Augmentations to get invited, rather than 30
|
||||
* You can now purchase permanent Duplicate Sleeves from 'The Covenant'. This requires Source-File 10, and you must be in BN-10 or after
|
||||
* Increased the money gained from Coding Contracts by 50%
|
||||
`
|
||||
|
||||
}
|
||||
|
||||
@@ -12,6 +12,9 @@ import { HackingMission, setInMission } from "../Missions";
|
||||
import { Player } from "../Player";
|
||||
import { PurchaseAugmentationsOrderSetting } from "../Settings/SettingEnums";
|
||||
import { Settings } from "../Settings/Settings";
|
||||
import { SourceFileFlags } from "../SourceFile/SourceFileFlags";
|
||||
|
||||
import { createPurchaseSleevesFromCovenantPopup } from "../PersonObjects/Sleeve/SleeveCovenantPurchases";
|
||||
|
||||
import {Page, routing} from "../ui/navigationTracking";
|
||||
import {numeralWrapper} from "../ui/numeralFormat";
|
||||
@@ -57,6 +60,9 @@ function displayFactionContent(factionName) {
|
||||
if (faction == null) {
|
||||
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();
|
||||
|
||||
removeChildrenFromElement(Engine.Display.factionContent);
|
||||
@@ -108,9 +114,7 @@ function displayFactionContent(factionName) {
|
||||
elements.push(createElement("br"));
|
||||
|
||||
//Hacking Mission Option
|
||||
var hackMissionDiv = createElement("div", {
|
||||
id:"faction-hack-mission-div", class:"faction-work-div",
|
||||
});
|
||||
var hackMissionDiv = createElement("div", { class:"faction-work-div" });
|
||||
var hackMissionDivWrapper = createElement("div", {class:"faction-work-div-wrapper"});
|
||||
hackMissionDiv.appendChild(hackMissionDivWrapper);
|
||||
hackMissionDivWrapper.appendChild(createElement("a", {
|
||||
@@ -131,9 +135,7 @@ function displayFactionContent(factionName) {
|
||||
elements.push(hackMissionDiv);
|
||||
|
||||
//Hacking Contracts Option
|
||||
var hackDiv = createElement("div", {
|
||||
id:"faction-hack-div", class:"faction-work-div",
|
||||
});
|
||||
var hackDiv = createElement("div", { class:"faction-work-div", });
|
||||
var hackDivWrapper = createElement("div", {class:"faction-work-div-wrapper"});
|
||||
hackDiv.appendChild(hackDivWrapper);
|
||||
hackDivWrapper.appendChild(createElement("a", {
|
||||
@@ -152,9 +154,7 @@ function displayFactionContent(factionName) {
|
||||
elements.push(hackDiv);
|
||||
|
||||
//Field Work Option
|
||||
var fieldWorkDiv = createElement("div", {
|
||||
id:"faction-fieldwork-div", class:"faction-work-div"
|
||||
});
|
||||
var fieldWorkDiv = createElement("div", { class:"faction-work-div" });
|
||||
var fieldWorkDivWrapper = createElement("div", {class:"faction-work-div-wrapper"});
|
||||
fieldWorkDiv.appendChild(fieldWorkDivWrapper);
|
||||
fieldWorkDivWrapper.appendChild(createElement("a", {
|
||||
@@ -173,9 +173,7 @@ function displayFactionContent(factionName) {
|
||||
elements.push(fieldWorkDiv);
|
||||
|
||||
//Security Work Option
|
||||
var securityWorkDiv = createElement("div", {
|
||||
id:"faction-securitywork-div", class:"faction-work-div"
|
||||
});
|
||||
var securityWorkDiv = createElement("div", { class:"faction-work-div" });
|
||||
var securityWorkDivWrapper = createElement("div", {class:"faction-work-div-wrapper"});
|
||||
securityWorkDiv.appendChild(securityWorkDivWrapper);
|
||||
securityWorkDivWrapper.appendChild(createElement("a", {
|
||||
@@ -194,9 +192,7 @@ function displayFactionContent(factionName) {
|
||||
elements.push(securityWorkDiv);
|
||||
|
||||
//Donate for reputation
|
||||
var donateDiv = createElement("div", {
|
||||
id:"faction-donate-div", class:"faction-work-div"
|
||||
});
|
||||
var donateDiv = createElement("div", { class:"faction-work-div" });
|
||||
var donateDivWrapper = createElement("div", {class:"faction-work-div-wrapper"});
|
||||
donateDiv.appendChild(donateDivWrapper);
|
||||
var donateRepGain = createElement("p", {
|
||||
@@ -247,12 +243,13 @@ function displayFactionContent(factionName) {
|
||||
"your abilities.<br><br>"
|
||||
}));
|
||||
elements.push(createElement("a", {
|
||||
class:"a-link-button", innerText:"Purchase Augmentations",
|
||||
class:"std-button",
|
||||
innerText:"Purchase Augmentations",
|
||||
margin: "5px",
|
||||
clickListener:()=>{
|
||||
Engine.hideAllContent();
|
||||
Engine.Display.factionAugmentationsContent.style.display = "block";
|
||||
|
||||
|
||||
displayFactionAugmentations(factionName);
|
||||
return false;
|
||||
}
|
||||
@@ -338,10 +335,26 @@ function displayFactionContent(factionName) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!faction.isMember) {
|
||||
throw new Error("Not a member of this faction, cannot display faction information");
|
||||
}
|
||||
// Purchase Sleeves from Covenant
|
||||
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";
|
||||
|
||||
hackMissionDiv.style.display = factionInfo.offerHackingMission ? "inline": "none";
|
||||
|
||||
@@ -51,6 +51,8 @@ import {StockMarket, StockSymbols, SymbolToStockMap,
|
||||
sellStock, updateStockPlayerPosition,
|
||||
shortStock, sellShort, OrderTypes,
|
||||
PositionTypes, placeOrder, cancelOrder} from "./StockMarket/StockMarket";
|
||||
import { getStockmarket4SDataCost,
|
||||
getStockMarket4STixApiCost } from "./StockMarket/StockMarketCosts";
|
||||
import {numeralWrapper} from "./ui/numeralFormat";
|
||||
import {post} from "./ui/postToTerminal";
|
||||
import {TextFile, getTextFile, createTextFile} from "./TextFile";
|
||||
@@ -1847,7 +1849,7 @@ function NetscriptFunctions(workerScript) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Player.money.lt(CONSTANTS.MarketData4SCost)) {
|
||||
if (Player.money.lt(getStockMarket4SDataCost())) {
|
||||
if (workerScript.shouldLog("purchase4SMarketData")) {
|
||||
workerScript.log("Failed to purchase 4S Market Data - Not enough money");
|
||||
}
|
||||
@@ -1855,7 +1857,7 @@ function NetscriptFunctions(workerScript) {
|
||||
}
|
||||
|
||||
Player.has4SData = true;
|
||||
Player.loseMoney(CONSTANTS.MarketData4SCost);
|
||||
Player.loseMoney(getStockMarket4SDataCost());
|
||||
if (workerScript.shouldLog("purchase4SMarketData")) {
|
||||
workerScript.log("Purchased 4S Market Data");
|
||||
}
|
||||
@@ -1878,7 +1880,7 @@ function NetscriptFunctions(workerScript) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Player.money.lt(CONSTANTS.MarketDataTixApi4SCost)) {
|
||||
if (Player.money.lt(getStockMarket4STixApiCost())) {
|
||||
if (workerScript.shouldLog("purchase4SMarketDataTixApi")) {
|
||||
workerScript.log("Failed to purchase 4S Market Data TIX API - Not enough money");
|
||||
}
|
||||
@@ -1886,7 +1888,7 @@ function NetscriptFunctions(workerScript) {
|
||||
}
|
||||
|
||||
Player.has4SDataTixApi = true;
|
||||
Player.loseMoney(CONSTANTS.MarketDataTixApi4SCost);
|
||||
Player.loseMoney(getStockMarket4STixApiCost());
|
||||
if (workerScript.shouldLog("purchase4SMarketDataTixApi")) {
|
||||
workerScript.log("Purchased 4S Market Data TIX API");
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ export interface IPlayer {
|
||||
// Class members
|
||||
augmentations: IPlayerOwnedAugmentation[];
|
||||
bladeburner: any;
|
||||
bitNodeN: number;
|
||||
companyName: string;
|
||||
corporation: any;
|
||||
factions: string[];
|
||||
|
||||
@@ -438,13 +438,13 @@ PlayerObject.prototype.getHomeComputer = function() {
|
||||
|
||||
PlayerObject.prototype.getUpgradeHomeRamCost = function() {
|
||||
//Calculate how many times ram has been upgraded (doubled)
|
||||
const currentRam = Player.getHomeComputer().maxRam;
|
||||
const currentRam = this.getHomeComputer().maxRam;
|
||||
const numUpgrades = Math.log2(currentRam);
|
||||
|
||||
//Calculate cost
|
||||
//Have cost increase by some percentage each time RAM has been upgraded
|
||||
const mult = Math.pow(1.58, numUpgrades);
|
||||
var cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome * mult;
|
||||
var cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome * mult * BitNodeMultipliers.HomeComputerRamCost;
|
||||
return cost;
|
||||
}
|
||||
|
||||
@@ -2044,7 +2044,7 @@ PlayerObject.prototype.checkForFactionInvitations = function() {
|
||||
//Daedalus
|
||||
var daedalusFac = Factions["Daedalus"];
|
||||
if (!daedalusFac.isBanned && !daedalusFac.isMember && !daedalusFac.alreadyInvited &&
|
||||
numAugmentations >= 30 &&
|
||||
numAugmentations >= Math.round(30 * BitNodeMultipliers.DaedalusAugsRequirement) &&
|
||||
this.money.gte(100000000000) &&
|
||||
(this.hacking_skill >= 2500 ||
|
||||
(this.strength >= 1500 && this.defense >= 1500 &&
|
||||
@@ -2055,7 +2055,7 @@ PlayerObject.prototype.checkForFactionInvitations = function() {
|
||||
//The Covenant
|
||||
var covenantFac = Factions["The Covenant"];
|
||||
if (!covenantFac.isBanned && !covenantFac.isMember && !covenantFac.alreadyInvited &&
|
||||
numAugmentations >= 30 &&
|
||||
numAugmentations >= 20 &&
|
||||
this.money.gte(75000000000) &&
|
||||
this.hacking_skill >= 850 &&
|
||||
this.strength >= 850 &&
|
||||
|
||||
@@ -55,7 +55,7 @@ function prestigeAugmentation() {
|
||||
Engine.loadTerminalContent();
|
||||
routing.navigateTo(Page.Terminal);
|
||||
|
||||
initBitNodeMultipliers();
|
||||
initBitNodeMultipliers(Player);
|
||||
|
||||
Player.prestigeAugmentation();
|
||||
|
||||
@@ -175,7 +175,7 @@ function prestigeAugmentation() {
|
||||
|
||||
//Prestige by destroying Bit Node and gaining a Source File
|
||||
function prestigeSourceFile() {
|
||||
initBitNodeMultipliers();
|
||||
initBitNodeMultipliers(Player);
|
||||
updateSourceFileFlags(Player);
|
||||
|
||||
Player.prestigeSourceFile();
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import {Stock} from "./Stock";
|
||||
import { getStockMarket4SDataCost,
|
||||
getStockMarket4STixApiCost } from "./StockMarketCosts";
|
||||
|
||||
import {CONSTANTS} from "../Constants";
|
||||
import {Locations} from "../Locations";
|
||||
@@ -767,13 +769,13 @@ function displayStockMarketContent() {
|
||||
|
||||
//Purchase Four Sigma Market Data Feed
|
||||
var marketDataButton = clearEventListeners("stock-market-buy-4s-data");
|
||||
stylePurchaseButton(marketDataButton, CONSTANTS.MarketData4SCost, Player.has4SData,
|
||||
"Buy 4S Market Data Access - " + numeralWrapper.format(CONSTANTS.MarketData4SCost, '($0.000a)'),
|
||||
stylePurchaseButton(marketDataButton, getStockMarket4SDataCost(), Player.has4SData,
|
||||
"Buy 4S Market Data Access - " + numeralWrapper.format(getStockMarket4SDataCost(), '($0.000a)'),
|
||||
"4S Market Data - Purchased");
|
||||
marketDataButton.addEventListener("click", function() {
|
||||
if (Player.money.lt(CONSTANTS.MarketData4SCost)) { return false; }
|
||||
if (Player.money.lt(getStockMarket4SDataCost())) { return false; }
|
||||
Player.has4SData = true;
|
||||
Player.loseMoney(CONSTANTS.MarketData4SCost);
|
||||
Player.loseMoney(getStockMarket4SDataCost());
|
||||
displayStockMarketContent();
|
||||
return false;
|
||||
});
|
||||
@@ -806,14 +808,14 @@ function displayStockMarketContent() {
|
||||
|
||||
//Purchase Four Sigma Market Data TIX API (Requires TIX API Access)
|
||||
var marketDataTixButton = clearEventListeners("stock-market-buy-4s-tix-api");
|
||||
stylePurchaseButton(marketDataTixButton, CONSTANTS.MarketDataTixApi4SCost, Player.has4SDataTixApi,
|
||||
"Buy 4S Market Data TIX API Access - " + numeralWrapper.format(CONSTANTS.MarketDataTixApi4SCost, '($0.000a)'),
|
||||
stylePurchaseButton(marketDataTixButton, getStockMarket4STixApiCost(), Player.has4SDataTixApi,
|
||||
"Buy 4S Market Data TIX API Access - " + numeralWrapper.format(getStockMarket4STixApiCost(), '($0.000a)'),
|
||||
"4S Market Data TIX API - Purchased");
|
||||
if (Player.hasTixApiAccess) {
|
||||
marketDataTixButton.addEventListener("click", function() {
|
||||
if (Player.money.lt(CONSTANTS.MarketDataTixApi4SCost)) { return false; }
|
||||
if (Player.money.lt(getStockMarket4STixApiCost())) { return false; }
|
||||
Player.has4SDataTixApi = true;
|
||||
Player.loseMoney(CONSTANTS.MarketDataTixApi4SCost);
|
||||
Player.loseMoney(getStockMarket4STixApiCost());
|
||||
displayStockMarketContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
18
src/StockMarket/StockMarketCosts.ts
Normal file
18
src/StockMarket/StockMarketCosts.ts
Normal file
@@ -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)) {
|
||||
console.log("Loaded game from save");
|
||||
initBitNodes();
|
||||
initBitNodeMultipliers();
|
||||
initBitNodeMultipliers(Player);
|
||||
initSourceFiles();
|
||||
Engine.setDisplayElements(); //Sets variables for important DOM elements
|
||||
Engine.init(); //Initialize buttons, work, etc.
|
||||
@@ -1397,7 +1397,7 @@ const Engine = {
|
||||
//No save found, start new game
|
||||
console.log("Initializing new game");
|
||||
initBitNodes();
|
||||
initBitNodeMultipliers();
|
||||
initBitNodeMultipliers(Player);
|
||||
initSourceFiles();
|
||||
initSpecialServerIps();
|
||||
Engine.setDisplayElements(); //Sets variables for important DOM elements
|
||||
|
||||
Reference in New Issue
Block a user