refactor bitnode multiplier code to have less side effect.

This commit is contained in:
Olivier Gagnon 2022-04-19 17:17:08 -04:00
parent 657a9a9a96
commit eb778aafa9
4 changed files with 405 additions and 403 deletions

@ -1,5 +1,5 @@
import React from "react"; import React from "react";
import { BitNodeMultipliers } from "./BitNodeMultipliers"; import { BitNodeMultipliers, IBitNodeMultipliers } from "./BitNodeMultipliers";
import { IPlayer } from "../PersonObjects/IPlayer"; import { IPlayer } from "../PersonObjects/IPlayer";
import { IMap } from "../types"; import { IMap } from "../types";
import { FactionNames } from "../Faction/data/FactionNames"; import { FactionNames } from "../Faction/data/FactionNames";
@ -567,372 +567,435 @@ BitNodes["BitNode13"] = new BitNode(
</> </>
), ),
); );
// Books: Frontera, Shiner
BitNodes["BitNode14"] = new BitNode(14, 2, "", "COMING SOON");
BitNodes["BitNode15"] = new BitNode(15, 2, "", "COMING SOON");
BitNodes["BitNode16"] = new BitNode(16, 2, "", "COMING SOON");
BitNodes["BitNode17"] = new BitNode(17, 2, "", "COMING SOON");
BitNodes["BitNode18"] = new BitNode(18, 2, "", "COMING SOON");
BitNodes["BitNode19"] = new BitNode(19, 2, "", "COMING SOON");
BitNodes["BitNode20"] = new BitNode(20, 2, "", "COMING SOON");
BitNodes["BitNode21"] = new BitNode(21, 2, "", "COMING SOON");
BitNodes["BitNode22"] = new BitNode(22, 2, "", "COMING SOON");
BitNodes["BitNode23"] = new BitNode(23, 2, "", "COMING SOON");
BitNodes["BitNode24"] = new BitNode(24, 2, "", "COMING SOON");
export function initBitNodeMultipliers(p: IPlayer): void { export const defaultMultipliers: IBitNodeMultipliers = {
if (p.bitNodeN == null) { HackingLevelMultiplier: 1,
p.bitNodeN = 1; StrengthLevelMultiplier: 1,
} DefenseLevelMultiplier: 1,
for (const mult of Object.keys(BitNodeMultipliers)) { DexterityLevelMultiplier: 1,
if (BitNodeMultipliers.hasOwnProperty(mult)) { AgilityLevelMultiplier: 1,
BitNodeMultipliers[mult] = 1; CharismaLevelMultiplier: 1,
}
}
// Special case.
BitNodeMultipliers.StaneksGiftExtraSize = 0;
switch (p.bitNodeN) { ServerGrowthRate: 1,
case 1: // Source Genesis (every multiplier is 1) ServerMaxMoney: 1,
break; ServerStartingMoney: 1,
case 2: // Rise of the Underworld ServerStartingSecurity: 1,
BitNodeMultipliers.HackingLevelMultiplier = 0.8; ServerWeakenRate: 1,
BitNodeMultipliers.ServerGrowthRate = 0.8;
BitNodeMultipliers.ServerMaxMoney = 0.2; HomeComputerRamCost: 1,
BitNodeMultipliers.ServerStartingMoney = 0.4;
BitNodeMultipliers.CrimeMoney = 3; PurchasedServerCost: 1,
BitNodeMultipliers.InfiltrationMoney = 3; PurchasedServerSoftcap: 1,
BitNodeMultipliers.FactionWorkRepGain = 0.5; PurchasedServerLimit: 1,
BitNodeMultipliers.FactionPassiveRepGain = 0; PurchasedServerMaxRam: 1,
BitNodeMultipliers.StaneksGiftPowerMultiplier = 2;
BitNodeMultipliers.StaneksGiftExtraSize = -6; CompanyWorkMoney: 1,
BitNodeMultipliers.PurchasedServerSoftcap = 1.3; CrimeMoney: 1,
BitNodeMultipliers.CorporationSoftCap = 0.9; HacknetNodeMoney: 1,
BitNodeMultipliers.WorldDaemonDifficulty = 5; ManualHackMoney: 1,
break; ScriptHackMoney: 1,
case 3: // Corporatocracy ScriptHackMoneyGain: 1,
BitNodeMultipliers.HackingLevelMultiplier = 0.8; CodingContractMoney: 1,
BitNodeMultipliers.RepToDonateToFaction = 0.5;
BitNodeMultipliers.AugmentationRepCost = 3; ClassGymExpGain: 1,
BitNodeMultipliers.AugmentationMoneyCost = 3; CompanyWorkExpGain: 1,
BitNodeMultipliers.ServerMaxMoney = 0.2; CrimeExpGain: 1,
BitNodeMultipliers.ServerStartingMoney = 0.2; FactionWorkExpGain: 1,
BitNodeMultipliers.ServerGrowthRate = 0.2; HackExpGain: 1,
BitNodeMultipliers.ScriptHackMoney = 0.2;
BitNodeMultipliers.CompanyWorkMoney = 0.25; FactionPassiveRepGain: 1,
BitNodeMultipliers.CrimeMoney = 0.25; FactionWorkRepGain: 1,
BitNodeMultipliers.HacknetNodeMoney = 0.25; RepToDonateToFaction: 1,
BitNodeMultipliers.HomeComputerRamCost = 1.5;
BitNodeMultipliers.PurchasedServerCost = 2; AugmentationMoneyCost: 1,
BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.75; AugmentationRepCost: 1,
BitNodeMultipliers.StaneksGiftExtraSize = -2;
BitNodeMultipliers.PurchasedServerSoftcap = 1.3; InfiltrationMoney: 1,
BitNodeMultipliers.GangSoftcap = 0.9; InfiltrationRep: 1,
BitNodeMultipliers.WorldDaemonDifficulty = 2;
BitNodeMultipliers.GangUniqueAugs = 0.5; FourSigmaMarketDataCost: 1,
break; FourSigmaMarketDataApiCost: 1,
case 4: // The Singularity
BitNodeMultipliers.ServerMaxMoney = 0.15; CorporationValuation: 1,
BitNodeMultipliers.ServerStartingMoney = 0.75; CorporationSoftCap: 1,
BitNodeMultipliers.ScriptHackMoney = 0.2;
BitNodeMultipliers.CompanyWorkMoney = 0.1; BladeburnerRank: 1,
BitNodeMultipliers.CrimeMoney = 0.2; BladeburnerSkillCost: 1,
BitNodeMultipliers.HacknetNodeMoney = 0.05;
BitNodeMultipliers.CompanyWorkExpGain = 0.5; GangSoftcap: 1,
BitNodeMultipliers.ClassGymExpGain = 0.5; GangUniqueAugs: 1,
BitNodeMultipliers.FactionWorkExpGain = 0.5;
BitNodeMultipliers.HackExpGain = 0.4; DaedalusAugsRequirement: 30,
BitNodeMultipliers.CrimeExpGain = 0.5;
BitNodeMultipliers.FactionWorkRepGain = 0.75; StaneksGiftPowerMultiplier: 1,
BitNodeMultipliers.StaneksGiftPowerMultiplier = 1.5; StaneksGiftExtraSize: 0,
BitNodeMultipliers.StaneksGiftExtraSize = 0;
BitNodeMultipliers.PurchasedServerSoftcap = 1.2; WorldDaemonDifficulty: 1,
BitNodeMultipliers.WorldDaemonDifficulty = 3; };
BitNodeMultipliers.GangUniqueAugs = 0.5;
break; export function getBitNodeMultipliers(n: number, lvl: number): IBitNodeMultipliers {
case 5: // Artificial intelligence const mults = Object.assign({}, defaultMultipliers);
BitNodeMultipliers.ServerMaxMoney = 2; switch (n) {
BitNodeMultipliers.ServerStartingSecurity = 2; case 1: {
BitNodeMultipliers.ServerStartingMoney = 0.5; return mults;
BitNodeMultipliers.ScriptHackMoney = 0.15; }
BitNodeMultipliers.HacknetNodeMoney = 0.2; case 2: {
BitNodeMultipliers.CrimeMoney = 0.5; return Object.assign(mults, {
BitNodeMultipliers.InfiltrationRep = 1.5; HackingLevelMultiplier: 0.8,
BitNodeMultipliers.InfiltrationMoney = 1.5; ServerGrowthRate: 0.8,
BitNodeMultipliers.AugmentationMoneyCost = 2; ServerMaxMoney: 0.2,
BitNodeMultipliers.HackExpGain = 0.5; ServerStartingMoney: 0.4,
BitNodeMultipliers.CorporationValuation = 0.5; CrimeMoney: 3,
BitNodeMultipliers.StaneksGiftPowerMultiplier = 1.3; InfiltrationMoney: 3,
BitNodeMultipliers.StaneksGiftExtraSize = 0; FactionWorkRepGain: 0.5,
BitNodeMultipliers.PurchasedServerSoftcap = 1.2; FactionPassiveRepGain: 0,
BitNodeMultipliers.WorldDaemonDifficulty = 1.5; StaneksGiftPowerMultiplier: 2,
BitNodeMultipliers.GangUniqueAugs = 0.5; StaneksGiftExtraSize: -6,
break; PurchasedServerSoftcap: 1.3,
case 6: // Bladeburner CorporationSoftCap: 0.9,
BitNodeMultipliers.HackingLevelMultiplier = 0.35; WorldDaemonDifficulty: 5,
BitNodeMultipliers.ServerMaxMoney = 0.4; });
BitNodeMultipliers.ServerStartingMoney = 0.5; }
BitNodeMultipliers.ServerStartingSecurity = 1.5; case 3: {
BitNodeMultipliers.ScriptHackMoney = 0.75; return Object.assign(mults, {
BitNodeMultipliers.CompanyWorkMoney = 0.5; HackingLevelMultiplier: 0.8,
BitNodeMultipliers.CrimeMoney = 0.75; RepToDonateToFaction: 0.5,
BitNodeMultipliers.InfiltrationMoney = 0.75; AugmentationRepCost: 3,
BitNodeMultipliers.CorporationValuation = 0.2; AugmentationMoneyCost: 3,
BitNodeMultipliers.HacknetNodeMoney = 0.2; ServerMaxMoney: 0.2,
BitNodeMultipliers.HackExpGain = 0.25; ServerStartingMoney: 0.2,
BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed ServerGrowthRate: 0.2,
BitNodeMultipliers.PurchasedServerSoftcap = 2; ScriptHackMoney: 0.2,
BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.5; CompanyWorkMoney: 0.25,
BitNodeMultipliers.StaneksGiftExtraSize = 2; CrimeMoney: 0.25,
BitNodeMultipliers.GangSoftcap = 0.7; HacknetNodeMoney: 0.25,
BitNodeMultipliers.CorporationSoftCap = 0.9; HomeComputerRamCost: 1.5,
BitNodeMultipliers.WorldDaemonDifficulty = 2; PurchasedServerCost: 2,
BitNodeMultipliers.GangUniqueAugs = 0.2; StaneksGiftPowerMultiplier: 0.75,
break; StaneksGiftExtraSize: -2,
case 7: // Bladeburner 2079 PurchasedServerSoftcap: 1.3,
BitNodeMultipliers.BladeburnerRank = 0.6; GangSoftcap: 0.9,
BitNodeMultipliers.BladeburnerSkillCost = 2; WorldDaemonDifficulty: 2,
BitNodeMultipliers.AugmentationMoneyCost = 3; GangUniqueAugs: 0.5,
BitNodeMultipliers.HackingLevelMultiplier = 0.35; });
BitNodeMultipliers.ServerMaxMoney = 0.4; }
BitNodeMultipliers.ServerStartingMoney = 0.5; case 4: {
BitNodeMultipliers.ServerStartingSecurity = 1.5; return Object.assign(mults, {
BitNodeMultipliers.ScriptHackMoney = 0.5; ServerMaxMoney: 0.15,
BitNodeMultipliers.CompanyWorkMoney = 0.5; ServerStartingMoney: 0.75,
BitNodeMultipliers.CrimeMoney = 0.75; ScriptHackMoney: 0.2,
BitNodeMultipliers.InfiltrationMoney = 0.75; CompanyWorkMoney: 0.1,
BitNodeMultipliers.CorporationValuation = 0.2; CrimeMoney: 0.2,
BitNodeMultipliers.HacknetNodeMoney = 0.2; HacknetNodeMoney: 0.05,
BitNodeMultipliers.HackExpGain = 0.25; CompanyWorkExpGain: 0.5,
BitNodeMultipliers.FourSigmaMarketDataCost = 2; ClassGymExpGain: 0.5,
BitNodeMultipliers.FourSigmaMarketDataApiCost = 2; FactionWorkExpGain: 0.5,
BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed HackExpGain: 0.4,
BitNodeMultipliers.PurchasedServerSoftcap = 2; CrimeExpGain: 0.5,
BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.9; FactionWorkRepGain: 0.75,
BitNodeMultipliers.StaneksGiftExtraSize = -1; StaneksGiftPowerMultiplier: 1.5,
BitNodeMultipliers.GangSoftcap = 0.7; StaneksGiftExtraSize: 0,
BitNodeMultipliers.CorporationSoftCap = 0.9; PurchasedServerSoftcap: 1.2,
BitNodeMultipliers.WorldDaemonDifficulty = 2; WorldDaemonDifficulty: 3,
BitNodeMultipliers.GangUniqueAugs = 0.2; GangUniqueAugs: 0.5,
break; });
case 8: // Ghost of Wall Street }
BitNodeMultipliers.ScriptHackMoney = 0.3; case 5: {
BitNodeMultipliers.ScriptHackMoneyGain = 0; return Object.assign(mults, {
BitNodeMultipliers.ManualHackMoney = 0; ServerMaxMoney: 2,
BitNodeMultipliers.CompanyWorkMoney = 0; ServerStartingSecurity: 2,
BitNodeMultipliers.CrimeMoney = 0; ServerStartingMoney: 0.5,
BitNodeMultipliers.HacknetNodeMoney = 0; ScriptHackMoney: 0.15,
BitNodeMultipliers.InfiltrationMoney = 0; HacknetNodeMoney: 0.2,
BitNodeMultipliers.RepToDonateToFaction = 0; CrimeMoney: 0.5,
BitNodeMultipliers.CorporationValuation = 0; InfiltrationRep: 1.5,
BitNodeMultipliers.CodingContractMoney = 0; InfiltrationMoney: 1.5,
BitNodeMultipliers.StaneksGiftExtraSize = -7; AugmentationMoneyCost: 2,
BitNodeMultipliers.PurchasedServerSoftcap = 4; HackExpGain: 0.5,
BitNodeMultipliers.GangSoftcap = 0; CorporationValuation: 0.5,
BitNodeMultipliers.CorporationSoftCap = 0; StaneksGiftPowerMultiplier: 1.3,
BitNodeMultipliers.GangUniqueAugs = 0; StaneksGiftExtraSize: 0,
break; PurchasedServerSoftcap: 1.2,
case 9: // Hacktocracy WorldDaemonDifficulty: 1.5,
BitNodeMultipliers.HackingLevelMultiplier = 0.5; GangUniqueAugs: 0.5,
BitNodeMultipliers.StrengthLevelMultiplier = 0.45; });
BitNodeMultipliers.DefenseLevelMultiplier = 0.45; }
BitNodeMultipliers.DexterityLevelMultiplier = 0.45; case 6: {
BitNodeMultipliers.AgilityLevelMultiplier = 0.45; return Object.assign(mults, {
BitNodeMultipliers.CharismaLevelMultiplier = 0.45; HackingLevelMultiplier: 0.35,
BitNodeMultipliers.PurchasedServerLimit = 0; ServerMaxMoney: 0.4,
BitNodeMultipliers.HomeComputerRamCost = 5; ServerStartingMoney: 0.5,
BitNodeMultipliers.CrimeMoney = 0.5; ServerStartingSecurity: 1.5,
BitNodeMultipliers.ScriptHackMoney = 0.1; ScriptHackMoney: 0.75,
BitNodeMultipliers.HackExpGain = 0.05; CompanyWorkMoney: 0.5,
BitNodeMultipliers.ServerStartingMoney = 0.1; CrimeMoney: 0.75,
BitNodeMultipliers.ServerMaxMoney = 0.1; InfiltrationMoney: 0.75,
BitNodeMultipliers.ServerStartingSecurity = 2.5; CorporationValuation: 0.2,
BitNodeMultipliers.CorporationValuation = 0.5; HacknetNodeMoney: 0.2,
BitNodeMultipliers.FourSigmaMarketDataCost = 5; HackExpGain: 0.25,
BitNodeMultipliers.FourSigmaMarketDataApiCost = 4; DaedalusAugsRequirement: 1.166, // Results in 35 Augs neede,
BitNodeMultipliers.BladeburnerRank = 0.9; PurchasedServerSoftcap: 2,
BitNodeMultipliers.BladeburnerSkillCost = 1.2; StaneksGiftPowerMultiplier: 0.5,
BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.5; StaneksGiftExtraSize: 2,
BitNodeMultipliers.StaneksGiftExtraSize = 2; GangSoftcap: 0.7,
BitNodeMultipliers.GangSoftcap = 0.8; CorporationSoftCap: 0.9,
BitNodeMultipliers.CorporationSoftCap = 0.7; WorldDaemonDifficulty: 2,
BitNodeMultipliers.WorldDaemonDifficulty = 2; GangUniqueAugs: 0.2,
BitNodeMultipliers.GangUniqueAugs = 0.25; });
break; }
case 10: // Digital Carbon case 7: {
BitNodeMultipliers.HackingLevelMultiplier = 0.35; return Object.assign(mults, {
BitNodeMultipliers.StrengthLevelMultiplier = 0.4; BladeburnerRank: 0.6,
BitNodeMultipliers.DefenseLevelMultiplier = 0.4; BladeburnerSkillCost: 2,
BitNodeMultipliers.DexterityLevelMultiplier = 0.4; AugmentationMoneyCost: 3,
BitNodeMultipliers.AgilityLevelMultiplier = 0.4; HackingLevelMultiplier: 0.35,
BitNodeMultipliers.CharismaLevelMultiplier = 0.4; ServerMaxMoney: 0.4,
BitNodeMultipliers.CompanyWorkMoney = 0.5; ServerStartingMoney: 0.5,
BitNodeMultipliers.CrimeMoney = 0.5; ServerStartingSecurity: 1.5,
BitNodeMultipliers.HacknetNodeMoney = 0.5; ScriptHackMoney: 0.5,
BitNodeMultipliers.ManualHackMoney = 0.5; CompanyWorkMoney: 0.5,
BitNodeMultipliers.ScriptHackMoney = 0.5; CrimeMoney: 0.75,
BitNodeMultipliers.CodingContractMoney = 0.5; InfiltrationMoney: 0.75,
BitNodeMultipliers.InfiltrationMoney = 0.5; CorporationValuation: 0.2,
BitNodeMultipliers.CorporationValuation = 0.5; HacknetNodeMoney: 0.2,
BitNodeMultipliers.AugmentationMoneyCost = 5; HackExpGain: 0.25,
BitNodeMultipliers.AugmentationRepCost = 2; FourSigmaMarketDataCost: 2,
BitNodeMultipliers.HomeComputerRamCost = 1.5; FourSigmaMarketDataApiCost: 2,
BitNodeMultipliers.PurchasedServerCost = 5; DaedalusAugsRequirement: 1.166, // Results in 35 Augs neede,
BitNodeMultipliers.PurchasedServerLimit = 0.6; PurchasedServerSoftcap: 2,
BitNodeMultipliers.PurchasedServerMaxRam = 0.5; StaneksGiftPowerMultiplier: 0.9,
BitNodeMultipliers.BladeburnerRank = 0.8; StaneksGiftExtraSize: -1,
BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.75; GangSoftcap: 0.7,
BitNodeMultipliers.StaneksGiftExtraSize = -3; CorporationSoftCap: 0.9,
BitNodeMultipliers.PurchasedServerSoftcap = 1.1; WorldDaemonDifficulty: 2,
BitNodeMultipliers.GangSoftcap = 0.9; GangUniqueAugs: 0.2,
BitNodeMultipliers.CorporationSoftCap = 0.9; });
BitNodeMultipliers.WorldDaemonDifficulty = 2; }
BitNodeMultipliers.GangUniqueAugs = 0.25; case 8: {
break; return Object.assign(mults, {
case 11: //The Big Crash ScriptHackMoney: 0.3,
BitNodeMultipliers.HackingLevelMultiplier = 0.6; ScriptHackMoneyGain: 0,
BitNodeMultipliers.HackExpGain = 0.5; ManualHackMoney: 0,
BitNodeMultipliers.ServerMaxMoney = 0.1; CompanyWorkMoney: 0,
BitNodeMultipliers.ServerStartingMoney = 0.1; CrimeMoney: 0,
BitNodeMultipliers.ServerGrowthRate = 0.2; HacknetNodeMoney: 0,
BitNodeMultipliers.ServerWeakenRate = 2; InfiltrationMoney: 0,
BitNodeMultipliers.CrimeMoney = 3; RepToDonateToFaction: 0,
BitNodeMultipliers.CompanyWorkMoney = 0.5; CorporationValuation: 0,
BitNodeMultipliers.HacknetNodeMoney = 0.1; CodingContractMoney: 0,
BitNodeMultipliers.AugmentationMoneyCost = 2; StaneksGiftExtraSize: -99,
BitNodeMultipliers.InfiltrationMoney = 2.5; PurchasedServerSoftcap: 4,
BitNodeMultipliers.InfiltrationRep = 2.5; GangSoftcap: 0,
BitNodeMultipliers.CorporationValuation = 0.1; CorporationSoftCap: 0,
BitNodeMultipliers.CodingContractMoney = 0.25; GangUniqueAugs: 0,
BitNodeMultipliers.FourSigmaMarketDataCost = 4; });
BitNodeMultipliers.FourSigmaMarketDataApiCost = 4; }
BitNodeMultipliers.PurchasedServerSoftcap = 2; case 9: {
BitNodeMultipliers.CorporationSoftCap = 0.9; return Object.assign(mults, {
BitNodeMultipliers.WorldDaemonDifficulty = 1.5; HackingLevelMultiplier: 0.5,
BitNodeMultipliers.GangUniqueAugs = 0.75; StrengthLevelMultiplier: 0.45,
break; DefenseLevelMultiplier: 0.45,
DexterityLevelMultiplier: 0.45,
AgilityLevelMultiplier: 0.45,
CharismaLevelMultiplier: 0.45,
PurchasedServerLimit: 0,
HomeComputerRamCost: 5,
CrimeMoney: 0.5,
ScriptHackMoney: 0.1,
HackExpGain: 0.05,
ServerStartingMoney: 0.1,
ServerMaxMoney: 0.1,
ServerStartingSecurity: 2.5,
CorporationValuation: 0.5,
FourSigmaMarketDataCost: 5,
FourSigmaMarketDataApiCost: 4,
BladeburnerRank: 0.9,
BladeburnerSkillCost: 1.2,
StaneksGiftPowerMultiplier: 0.5,
StaneksGiftExtraSize: 2,
GangSoftcap: 0.8,
CorporationSoftCap: 0.7,
WorldDaemonDifficulty: 2,
GangUniqueAugs: 0.25,
});
}
case 10: {
return Object.assign(mults, {
HackingLevelMultiplier: 0.35,
StrengthLevelMultiplier: 0.4,
DefenseLevelMultiplier: 0.4,
DexterityLevelMultiplier: 0.4,
AgilityLevelMultiplier: 0.4,
CharismaLevelMultiplier: 0.4,
CompanyWorkMoney: 0.5,
CrimeMoney: 0.5,
HacknetNodeMoney: 0.5,
ManualHackMoney: 0.5,
ScriptHackMoney: 0.5,
CodingContractMoney: 0.5,
InfiltrationMoney: 0.5,
CorporationValuation: 0.5,
AugmentationMoneyCost: 5,
AugmentationRepCost: 2,
HomeComputerRamCost: 1.5,
PurchasedServerCost: 5,
PurchasedServerLimit: 0.6,
PurchasedServerMaxRam: 0.5,
BladeburnerRank: 0.8,
StaneksGiftPowerMultiplier: 0.75,
StaneksGiftExtraSize: -3,
PurchasedServerSoftcap: 1.1,
GangSoftcap: 0.9,
CorporationSoftCap: 0.9,
WorldDaemonDifficulty: 2,
GangUniqueAugs: 0.25,
});
}
case 11: {
return Object.assign(mults, {
HackingLevelMultiplier: 0.6,
HackExpGain: 0.5,
ServerMaxMoney: 0.1,
ServerStartingMoney: 0.1,
ServerGrowthRate: 0.2,
ServerWeakenRate: 2,
CrimeMoney: 3,
CompanyWorkMoney: 0.5,
HacknetNodeMoney: 0.1,
AugmentationMoneyCost: 2,
InfiltrationMoney: 2.5,
InfiltrationRep: 2.5,
CorporationValuation: 0.1,
CodingContractMoney: 0.25,
FourSigmaMarketDataCost: 4,
FourSigmaMarketDataApiCost: 4,
PurchasedServerSoftcap: 2,
CorporationSoftCap: 0.9,
WorldDaemonDifficulty: 1.5,
GangUniqueAugs: 0.75,
});
}
case 12: { case 12: {
//The Recursion const inc = Math.pow(1.02, lvl);
let sf12Lvl = 0;
for (let i = 0; i < p.sourceFiles.length; i++) {
if (p.sourceFiles[i].n === 12) {
sf12Lvl = p.sourceFiles[i].lvl;
}
}
const inc = Math.pow(1.02, sf12Lvl);
const dec = 1 / inc; const dec = 1 / inc;
return Object.assign(mults, {
// Multiplier for number of augs needed for Daedalus increases // Multiplier for number of augs needed for Daedalus increases
// up to a maximum of 1.34, which results in 40 Augs required // up to a maximum of 1.34, which results in 40 Augs required
BitNodeMultipliers.DaedalusAugsRequirement = Math.min(inc, 1.34); DaedalusAugsRequirement: Math.min(inc, 1.34),
BitNodeMultipliers.HackingLevelMultiplier = dec; HackingLevelMultiplier: dec,
BitNodeMultipliers.StrengthLevelMultiplier = dec; StrengthLevelMultiplier: dec,
BitNodeMultipliers.DefenseLevelMultiplier = dec; DefenseLevelMultiplier: dec,
BitNodeMultipliers.DexterityLevelMultiplier = dec; DexterityLevelMultiplier: dec,
BitNodeMultipliers.AgilityLevelMultiplier = dec; AgilityLevelMultiplier: dec,
BitNodeMultipliers.CharismaLevelMultiplier = dec; CharismaLevelMultiplier: dec,
BitNodeMultipliers.ServerMaxMoney = dec; ServerMaxMoney: dec,
BitNodeMultipliers.ServerStartingMoney = dec; ServerStartingMoney: dec,
BitNodeMultipliers.ServerGrowthRate = dec; ServerGrowthRate: dec,
BitNodeMultipliers.ServerWeakenRate = dec; ServerWeakenRate: dec,
//Does not scale, otherwise security might start at 300+ //Does not scale, otherwise security might start at 300+
BitNodeMultipliers.ServerStartingSecurity = 1.5; ServerStartingSecurity: 1.5,
BitNodeMultipliers.HomeComputerRamCost = inc; HomeComputerRamCost: inc,
BitNodeMultipliers.PurchasedServerCost = inc; PurchasedServerCost: inc,
BitNodeMultipliers.PurchasedServerLimit = dec; PurchasedServerLimit: dec,
BitNodeMultipliers.PurchasedServerMaxRam = dec; PurchasedServerMaxRam: dec,
BitNodeMultipliers.PurchasedServerSoftcap = inc; PurchasedServerSoftcap: inc,
BitNodeMultipliers.ManualHackMoney = dec; ManualHackMoney: dec,
BitNodeMultipliers.ScriptHackMoney = dec; ScriptHackMoney: dec,
BitNodeMultipliers.CompanyWorkMoney = dec; CompanyWorkMoney: dec,
BitNodeMultipliers.CrimeMoney = dec; CrimeMoney: dec,
BitNodeMultipliers.HacknetNodeMoney = dec; HacknetNodeMoney: dec,
BitNodeMultipliers.CodingContractMoney = dec; CodingContractMoney: dec,
BitNodeMultipliers.CompanyWorkExpGain = dec; CompanyWorkExpGain: dec,
BitNodeMultipliers.ClassGymExpGain = dec; ClassGymExpGain: dec,
BitNodeMultipliers.FactionWorkExpGain = dec; FactionWorkExpGain: dec,
BitNodeMultipliers.HackExpGain = dec; HackExpGain: dec,
BitNodeMultipliers.CrimeExpGain = dec; CrimeExpGain: dec,
BitNodeMultipliers.FactionWorkRepGain = dec; FactionWorkRepGain: dec,
BitNodeMultipliers.FactionPassiveRepGain = dec; FactionPassiveRepGain: dec,
BitNodeMultipliers.RepToDonateToFaction = inc; RepToDonateToFaction: inc,
BitNodeMultipliers.AugmentationRepCost = inc; AugmentationRepCost: inc,
BitNodeMultipliers.AugmentationMoneyCost = inc; AugmentationMoneyCost: inc,
BitNodeMultipliers.InfiltrationMoney = dec; InfiltrationMoney: dec,
BitNodeMultipliers.InfiltrationRep = dec; InfiltrationRep: dec,
BitNodeMultipliers.FourSigmaMarketDataCost = inc; FourSigmaMarketDataCost: inc,
BitNodeMultipliers.FourSigmaMarketDataApiCost = inc; FourSigmaMarketDataApiCost: inc,
BitNodeMultipliers.CorporationValuation = dec; CorporationValuation: dec,
BitNodeMultipliers.BladeburnerRank = dec; BladeburnerRank: dec,
BitNodeMultipliers.BladeburnerSkillCost = inc; BladeburnerSkillCost: inc,
BitNodeMultipliers.StaneksGiftPowerMultiplier = inc; StaneksGiftPowerMultiplier: inc,
BitNodeMultipliers.StaneksGiftExtraSize = inc; StaneksGiftExtraSize: inc,
BitNodeMultipliers.GangSoftcap = 0.8; GangSoftcap: 0.8,
BitNodeMultipliers.CorporationSoftCap = 0.8; CorporationSoftCap: 0.8,
BitNodeMultipliers.WorldDaemonDifficulty = inc; WorldDaemonDifficulty: inc,
BitNodeMultipliers.GangUniqueAugs = dec; GangUniqueAugs: dec,
break; });
} }
case 13: { case 13: {
BitNodeMultipliers.PurchasedServerSoftcap = 1.6; return Object.assign(mults, {
PurchasedServerSoftcap: 1.6,
BitNodeMultipliers.HackingLevelMultiplier = 0.25; HackingLevelMultiplier: 0.25,
BitNodeMultipliers.StrengthLevelMultiplier = 0.7; StrengthLevelMultiplier: 0.7,
BitNodeMultipliers.DefenseLevelMultiplier = 0.7; DefenseLevelMultiplier: 0.7,
BitNodeMultipliers.DexterityLevelMultiplier = 0.7; DexterityLevelMultiplier: 0.7,
BitNodeMultipliers.AgilityLevelMultiplier = 0.7; AgilityLevelMultiplier: 0.7,
BitNodeMultipliers.ServerMaxMoney = 0.45; ServerMaxMoney: 0.45,
BitNodeMultipliers.ServerStartingMoney = 0.75; ServerStartingMoney: 0.75,
BitNodeMultipliers.ServerStartingSecurity = 3; ServerStartingSecurity: 3,
BitNodeMultipliers.ScriptHackMoney = 0.2; ScriptHackMoney: 0.2,
BitNodeMultipliers.CompanyWorkMoney = 0.4; CompanyWorkMoney: 0.4,
BitNodeMultipliers.CrimeMoney = 0.4; CrimeMoney: 0.4,
BitNodeMultipliers.HacknetNodeMoney = 0.4; HacknetNodeMoney: 0.4,
BitNodeMultipliers.CodingContractMoney = 0.4; CodingContractMoney: 0.4,
BitNodeMultipliers.CompanyWorkExpGain = 0.5; CompanyWorkExpGain: 0.5,
BitNodeMultipliers.ClassGymExpGain = 0.5; ClassGymExpGain: 0.5,
BitNodeMultipliers.FactionWorkExpGain = 0.5; FactionWorkExpGain: 0.5,
BitNodeMultipliers.HackExpGain = 0.1; HackExpGain: 0.1,
BitNodeMultipliers.CrimeExpGain = 0.5; CrimeExpGain: 0.5,
BitNodeMultipliers.FactionWorkRepGain = 0.6; FactionWorkRepGain: 0.6,
BitNodeMultipliers.FourSigmaMarketDataCost = 10; FourSigmaMarketDataCost: 10,
BitNodeMultipliers.FourSigmaMarketDataApiCost = 10; FourSigmaMarketDataApiCost: 10,
BitNodeMultipliers.CorporationValuation = 0.001; CorporationValuation: 0.001,
BitNodeMultipliers.BladeburnerRank = 0.45; BladeburnerRank: 0.45,
BitNodeMultipliers.BladeburnerSkillCost = 2; BladeburnerSkillCost: 2,
BitNodeMultipliers.StaneksGiftPowerMultiplier = 2; StaneksGiftPowerMultiplier: 2,
BitNodeMultipliers.StaneksGiftExtraSize = 1; StaneksGiftExtraSize: 1,
BitNodeMultipliers.GangSoftcap = 0.3; GangSoftcap: 0.3,
BitNodeMultipliers.CorporationSoftCap = 0.3; CorporationSoftCap: 0.3,
BitNodeMultipliers.WorldDaemonDifficulty = 3; WorldDaemonDifficulty: 3,
BitNodeMultipliers.GangUniqueAugs = 0.1; GangUniqueAugs: 0.1,
break; });
}
default: {
throw new Error("Invalid BitNodeN");
} }
default:
console.warn("Player.bitNodeN invalid");
break;
} }
} }
export function initBitNodeMultipliers(p: IPlayer): void {
Object.assign(BitNodeMultipliers, getBitNodeMultipliers(p.bitNodeN, p.sourceFileLvl(p.bitNodeN)));
}

@ -1,9 +1,11 @@
import { defaultMultipliers } from "./BitNode";
/** /**
* Bitnode multipliers influence the difficulty of different aspects of the game. * Bitnode multipliers influence the difficulty of different aspects of the game.
* Each Bitnode has a different theme/strategy to achieving the end goal, so these multipliers will can help drive the * Each Bitnode has a different theme/strategy to achieving the end goal, so these multipliers will can help drive the
* player toward the intended strategy. Unless they really want to play the long, slow game of waiting... * player toward the intended strategy. Unless they really want to play the long, slow game of waiting...
*/ */
interface IBitNodeMultipliers { export interface IBitNodeMultipliers {
/** /**
* Influences how quickly the player's agility level (not exp) scales * Influences how quickly the player's agility level (not exp) scales
*/ */
@ -250,67 +252,4 @@ interface IBitNodeMultipliers {
* The multipliers that are influenced by current Bitnode progression. * The multipliers that are influenced by current Bitnode progression.
*/ */
// tslint:disable-next-line:variable-name // tslint:disable-next-line:variable-name
export const BitNodeMultipliers: IBitNodeMultipliers = { export const BitNodeMultipliers = defaultMultipliers;
HackingLevelMultiplier: 1,
StrengthLevelMultiplier: 1,
DefenseLevelMultiplier: 1,
DexterityLevelMultiplier: 1,
AgilityLevelMultiplier: 1,
CharismaLevelMultiplier: 1,
ServerGrowthRate: 1,
ServerMaxMoney: 1,
ServerStartingMoney: 1,
ServerStartingSecurity: 1,
ServerWeakenRate: 1,
HomeComputerRamCost: 1,
PurchasedServerCost: 1,
PurchasedServerSoftcap: 1,
PurchasedServerLimit: 1,
PurchasedServerMaxRam: 1,
CompanyWorkMoney: 1,
CrimeMoney: 1,
HacknetNodeMoney: 1,
ManualHackMoney: 1,
ScriptHackMoney: 1,
ScriptHackMoneyGain: 1,
CodingContractMoney: 1,
ClassGymExpGain: 1,
CompanyWorkExpGain: 1,
CrimeExpGain: 1,
FactionWorkExpGain: 1,
HackExpGain: 1,
FactionPassiveRepGain: 1,
FactionWorkRepGain: 1,
RepToDonateToFaction: 1,
AugmentationMoneyCost: 1,
AugmentationRepCost: 1,
InfiltrationMoney: 1,
InfiltrationRep: 1,
FourSigmaMarketDataCost: 1,
FourSigmaMarketDataApiCost: 1,
CorporationValuation: 1,
CorporationSoftCap: 1,
BladeburnerRank: 1,
BladeburnerSkillCost: 1,
GangSoftcap: 1,
GangUniqueAugs: 1,
DaedalusAugsRequirement: 1,
StaneksGiftPowerMultiplier: 1,
StaneksGiftExtraSize: 0,
WorldDaemonDifficulty: 1,
};

@ -2166,7 +2166,7 @@ export function checkForFactionInvitations(this: IPlayer): Faction[] {
!daedalusFac.isBanned && !daedalusFac.isBanned &&
!daedalusFac.isMember && !daedalusFac.isMember &&
!daedalusFac.alreadyInvited && !daedalusFac.alreadyInvited &&
numAugmentations >= Math.round(30 * BitNodeMultipliers.DaedalusAugsRequirement) && numAugmentations >= BitNodeMultipliers.DaedalusAugsRequirement &&
this.money >= 100000000000 && this.money >= 100000000000 &&
(this.hacking >= 2500 || (this.hacking >= 2500 ||
(this.strength >= 1500 && this.defense >= 1500 && this.dexterity >= 1500 && this.agility >= 1500)) (this.strength >= 1500 && this.defense >= 1500 && this.dexterity >= 1500 && this.agility >= 1500))

@ -307,7 +307,7 @@ export const programsMetadata: IProgramCreationParams[] = [
name: "fl1ght.exe", name: "fl1ght.exe",
create: null, create: null,
run: (router: IRouter, terminal: ITerminal, player: IPlayer): void => { run: (router: IRouter, terminal: ITerminal, player: IPlayer): void => {
const numAugReq = Math.round(BitNodeMultipliers.DaedalusAugsRequirement * 30); const numAugReq = BitNodeMultipliers.DaedalusAugsRequirement;
const fulfilled = player.augmentations.length >= numAugReq && player.money > 1e11 && player.hacking >= 2500; const fulfilled = player.augmentations.length >= numAugReq && player.money > 1e11 && player.hacking >= 2500;
if (!fulfilled) { if (!fulfilled) {
terminal.print(`Augmentations: ${player.augmentations.length} / ${numAugReq}`); terminal.print(`Augmentations: ${player.augmentations.length} / ${numAugReq}`);