diff --git a/src/Augmentation/Augmentation.ts b/src/Augmentation/Augmentation.ts new file mode 100644 index 000000000..019467af4 --- /dev/null +++ b/src/Augmentation/Augmentation.ts @@ -0,0 +1,156 @@ +// Class definition for a single Augmentation object +import { CONSTANTS } from "../Constants"; +import { IMap } from "../types"; + +import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; +import { Faction } from "../Faction/Faction"; +import { Factions } from "../Faction/Factions"; + +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; + +interface IConstructorParams { + info: string; + moneyCost: number; + name: string; + prereqs?: string[]; + repCost: number; + + hacking_mult?: number; + strength_mult?: number; + defense_mult?: number; + dexterity_mult?: number; + agility_mult?: number; + charisma_mult?: number; + hacking_exp_mult?: number; + strength_exp_mult?: number; + defense_exp_mult?: number; + dexterity_exp_mult?: number; + agility_exp_mult?: number; + charisma_exp_mult?: number; + hacking_chance_mult?: number; + hacking_speed_mult?: number; + hacking_money_mult?: number; + hacking_grow_mult?: number; + company_rep_mult?: number; + faction_rep_mult?: number; + crime_money_mult?: number; + crime_success_mult?: number; + work_money_mult?: number; + hacknet_node_money_mult?: number; + hacknet_node_purchase_cost_mult?: number; + hacknet_node_ram_cost_mult?: number; + hacknet_node_core_cost_mult?: number; + hacknet_node_level_cost_mult?: number; + bladeburner_max_stamina_mult?: number; + bladeburner_stamina_gain_mult?: number; + bladeburner_analysis_mult?: number; + bladeburner_success_chance_mult?: number; +} + +export class Augmentation { + // Initiatizes a Augmentation object from a JSON save state. + static fromJSON(value: any): Augmentation { + return Generic_fromJSON(Augmentation, value.data); + } + + // How much money this costs to buy + baseCost: number = 0; + + // How much faction reputation is required to unlock this + baseRepRequirement: number = 0; + + // Description of what this Aug is and what it does + info: string = ""; + + // Augmentation level - for repeatable Augs like NeuroFlux Governor + level: number = 0; + + // Name of Augmentation + name: string = ""; + + // Whether the player owns this Augmentation + owned: boolean = false; + + // Array of names of all prerequisites + prereqs: string[] = []; + + // Multipliers given by this Augmentation. Must match the property name in + // The Player/Person classes + mults: IMap = {} + + constructor(params: IConstructorParams={ info: "", moneyCost: 0, name: "", repCost: 0 }) { + this.name = params.name; + this.info = params.info; + this.prereqs = params.prereqs ? params.prereqs : []; + + this.baseRepRequirement = params.repCost * CONSTANTS.AugmentationRepMultiplier * BitNodeMultipliers.AugmentationRepCost; + this.baseCost = params.moneyCost * CONSTANTS.AugmentationCostMultiplier * BitNodeMultipliers.AugmentationMoneyCost; + + this.level = 0; + + // Set multipliers + if (params.hacking_mult) { this.mults.hacking_mult = params.hacking_mult; } + if (params.strength_mult) { this.mults.strength_mult = params.strength_mult; } + if (params.defense_mult) { this.mults.defense_mult = params.defense_mult; } + if (params.dexterity_mult) { this.mults.dexterity_mult = params.dexterity_mult; } + if (params.agility_mult) { this.mults.agility_mult = params.agility_mult; } + if (params.charisma_mult) { this.mults.charisma_mult = params.charisma_mult; } + if (params.hacking_exp_mult) { this.mults.hacking_exp_mult = params.hacking_exp_mult; } + if (params.strength_exp_mult) { this.mults.strength_exp_mult = params.strength_exp_mult; } + if (params.defense_exp_mult) { this.mults.defense_exp_mult = params.defense_exp_mult; } + if (params.dexterity_exp_mult) { this.mults.dexterity_exp_mult = params.dexterity_exp_mult; } + if (params.agility_exp_mult) { this.mults.agility_exp_mult = params.agility_exp_mult; } + if (params.charisma_exp_mult) { this.mults.charisma_exp_mult = params.charisma_exp_mult; } + if (params.hacking_chance_mult) { this.mults.hacking_chance_mult = params.hacking_chance_mult; } + if (params.hacking_speed_mult) { this.mults.hacking_speed_mult = params.hacking_speed_mult; } + if (params.hacking_money_mult) { this.mults.hacking_money_mult = params.hacking_money_mult; } + if (params.hacking_grow_mult) { this.mults.hacking_grow_mult = params.hacking_grow_mult; } + if (params.company_rep_mult) { this.mults.company_rep_mult = params.company_rep_mult; } + if (params.faction_rep_mult) { this.mults.faction_rep_mult = params.faction_rep_mult; } + if (params.crime_money_mult) { this.mults.crime_money_mult = params.crime_money_mult; } + if (params.crime_success_mult) { this.mults.crime_success_mult = params.crime_success_mult; } + if (params.work_money_mult) { this.mults.work_money_mult = params.work_money_mult; } + if (params.hacknet_node_money_mult) { this.mults.hacknet_node_money_mult = params.hacknet_node_money_mult; } + if (params.hacknet_node_purchase_cost_mult) { this.mults.hacknet_node_purchase_cost_mult = params.hacknet_node_purchase_cost_mult; } + if (params.hacknet_node_ram_cost_mult) { this.mults.hacknet_node_ram_cost_mult = params.hacknet_node_ram_cost_mult; } + if (params.hacknet_node_core_cost_mult) { this.mults.hacknet_node_core_cost_mult = params.hacknet_node_core_cost_mult; } + if (params.hacknet_node_level_cost_mult) { this.mults.hacknet_node_level_cost_mult = params.hacknet_node_level_cost_mult; } + if (params.bladeburner_max_stamina_mult) { this.mults.bladeburner_max_stamina_mult = params.bladeburner_max_stamina_mult; } + if (params.bladeburner_stamina_gain_mult) { this.mults.bladeburner_stamina_gain_mult = params.bladeburner_stamina_gain_mult; } + if (params.bladeburner_analysis_mult) { this.mults.bladeburner_analysis_mult = params.bladeburner_analysis_mult; } + if (params.bladeburner_success_chance_mult) { this.mults.bladeburner_success_chance_mult = params.bladeburner_success_chance_mult; } + } + + // Adds this Augmentation to the specified Factions + addToFactions(factionList: string[]): void { + for (let i = 0; i < factionList.length; ++i) { + const faction: Faction | null = Factions[factionList[i]]; + if (faction == null) { + console.warn(`In Augmentation.addToFactions(), could not find faction with this name: ${factionList[i]}`); + continue; + } + faction!.augmentations.push(this.name); + } + } + + // Adds this Augmentation to all Factions + addToAllFactions(): void { + for (const fac in Factions) { + if (Factions.hasOwnProperty(fac)) { + const facObj: Faction | null = Factions[fac]; + if (facObj == null) { + console.warn(`Invalid Faction object in addToAllFactions(). Key value: ${fac}`); + continue; + } + facObj!.augmentations.push(this.name); + } + } + } + + // Serialize the current object to a JSON save state. + toJSON(): any { + return Generic_toJSON("Augmentation", this); + } +} + +Reviver.constructors.Augmentation = Augmentation; diff --git a/src/Augmentations.js b/src/Augmentation/AugmentationHelpers.js similarity index 72% rename from src/Augmentations.js rename to src/Augmentation/AugmentationHelpers.js index 77c023277..e8df221f5 100644 --- a/src/Augmentations.js +++ b/src/Augmentation/AugmentationHelpers.js @@ -1,203 +1,38 @@ -import { BitNodeMultipliers } from "./BitNodeMultipliers"; -import { CONSTANTS } from "./Constants"; +import { Augmentation } from "./Augmentation"; +import { Augmentations } from "./Augmentations"; +import { AugmentationNames } from "./data/AugmentationNames"; + +import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; +import { CONSTANTS } from "../Constants"; import { Factions, - factionExists } from "./Faction/Factions"; -import { hasBladeburnerSF } from "./NetscriptFunctions"; -import { addWorkerScript } from "./NetscriptWorker"; -import { Player } from "./Player"; -import { prestigeAugmentation } from "./Prestige"; -import { saveObject } from "./SaveObject"; -import { Script , RunningScript} from "./Script"; -import { Server } from "./Server"; -import { OwnedAugmentationsOrderSetting } from "./SettingEnums"; -import { Settings } from "./Settings"; + factionExists } from "../Faction/Factions"; +import { hasBladeburnerSF } from "../NetscriptFunctions"; +import { addWorkerScript } from "../NetscriptWorker"; +import { Player } from "../Player"; +import { prestigeAugmentation } from "../Prestige"; +import { saveObject } from "../SaveObject"; +import { Script , RunningScript} from "../Script"; +import { Server } from "../Server"; +import { OwnedAugmentationsOrderSetting } from "../SettingEnums"; +import { Settings } from "../Settings"; -import { SourceFiles } from "./SourceFile"; -import { dialogBoxCreate } from "../utils/DialogBox"; -import { createAccordionElement } from "../utils/uiHelpers/createAccordionElement"; +import { SourceFiles } from "../SourceFile"; +import { dialogBoxCreate } from "../../utils/DialogBox"; +import { createAccordionElement } from "../../utils/uiHelpers/createAccordionElement"; import { Reviver, Generic_toJSON, - Generic_fromJSON } from "../utils/JSONReviver"; -import { formatNumber } from "../utils/StringHelperFunctions"; -import { clearObject } from "../utils/helpers/clearObject"; -import { createElement } from "../utils/uiHelpers/createElement"; -import { isString } from "../utils/helpers/isString"; -import { removeChildrenFromElement } from "../utils/uiHelpers/removeChildrenFromElement"; + Generic_fromJSON } from "../../utils/JSONReviver"; +import { formatNumber } from "../../utils/StringHelperFunctions"; +import { clearObject } from "../../utils/helpers/clearObject"; +import { createElement } from "../../utils/uiHelpers/createElement"; +import { isString } from "../../utils/helpers/isString"; +import { removeChildrenFromElement } from "../../utils/uiHelpers/removeChildrenFromElement"; -//Augmentations -function Augmentation(params) { - if (params.name == null || params.info == null || params.moneyCost == null || params.repCost == null) { - dialogBoxCreate("ERROR Creating Augmentations. This is a bug please contact game dev"); - return; - } - this.name = params.name; - this.info = params.info; - this.owned = false; - this.prereqs = params.prereqs ? params.prereqs : []; - - //Price and reputation base requirements (can change based on faction multipliers) - this.baseRepRequirement = params.repCost * CONSTANTS.AugmentationRepMultiplier * BitNodeMultipliers.AugmentationRepCost; - this.baseCost = params.moneyCost * CONSTANTS.AugmentationCostMultiplier * BitNodeMultipliers.AugmentationMoneyCost; - - //Level - Only applicable for some augmentations - // NeuroFlux Governor - this.level = 0; -} - -//Takes in an array of faction names and adds this augmentation to all of those factions -Augmentation.prototype.addToFactions = function(factionList) { - for (var i = 0; i < factionList.length; ++i) { - var faction = Factions[factionList[i]]; - if (faction == null) { - throw new Error("In Augmentation.addToFactions(), could not find faction with this name:" + factionList[i]); - continue; - } - faction.augmentations.push(this.name); - } -} - -Augmentation.prototype.addToAllFactions = function() { - for (var fac in Factions) { - if (Factions.hasOwnProperty(fac)) { - var facObj = Factions[fac]; - if (facObj == null) { - console.log("ERROR: Invalid faction object"); - continue; - } - facObj.augmentations.push(this.name); - } - } -} - -Augmentation.prototype.toJSON = function() { - return Generic_toJSON("Augmentation", this); -} - -Augmentation.fromJSON = function(value) { - return Generic_fromJSON(Augmentation, value.data); -} - -Reviver.constructors.Augmentation = Augmentation; - -let Augmentations = {} function AddToAugmentations(aug) { var name = aug.name; Augmentations[name] = aug; } -let AugmentationNames = { - Targeting1: "Augmented Targeting I", - Targeting2: "Augmented Targeting II", - Targeting3: "Augmented Targeting III", - SyntheticHeart: "Synthetic Heart", - SynfibrilMuscle: "Synfibril Muscle", - CombatRib1: "Combat Rib I", - CombatRib2: "Combat Rib II", - CombatRib3: "Combat Rib III", - NanofiberWeave: "Nanofiber Weave", - SubdermalArmor: "NEMEAN Subdermal Weave", - WiredReflexes: "Wired Reflexes", - GrapheneBoneLacings: "Graphene Bone Lacings", - BionicSpine: "Bionic Spine", - GrapheneBionicSpine: "Graphene Bionic Spine Upgrade", - BionicLegs: "Bionic Legs", - GrapheneBionicLegs: "Graphene Bionic Legs Upgrade", - SpeechProcessor: "Speech Processor Implant", - TITN41Injection: "TITN-41 Gene-Modification Injection", - EnhancedSocialInteractionImplant: "Enhanced Social Interaction Implant", - BitWire: "BitWire", - ArtificialBioNeuralNetwork: "Artificial Bio-neural Network Implant", - ArtificialSynapticPotentiation: "Artificial Synaptic Potentiation", - EnhancedMyelinSheathing: "Enhanced Myelin Sheathing", - SynapticEnhancement: "Synaptic Enhancement Implant", - NeuralRetentionEnhancement: "Neural-Retention Enhancement", - DataJack: "DataJack", - ENM: "Embedded Netburner Module", - ENMCore: "Embedded Netburner Module Core Implant", - ENMCoreV2: "Embedded Netburner Module Core V2 Upgrade", - ENMCoreV3: "Embedded Netburner Module Core V3 Upgrade", - ENMAnalyzeEngine: "Embedded Netburner Module Analyze Engine", - ENMDMA: "Embedded Netburner Module Direct Memory Access Upgrade", - Neuralstimulator: "Neuralstimulator", - NeuralAccelerator: "Neural Accelerator", - CranialSignalProcessorsG1: "Cranial Signal Processors - Gen I", - CranialSignalProcessorsG2: "Cranial Signal Processors - Gen II", - CranialSignalProcessorsG3: "Cranial Signal Processors - Gen III", - CranialSignalProcessorsG4: "Cranial Signal Processors - Gen IV", - CranialSignalProcessorsG5: "Cranial Signal Processors - Gen V", - NeuronalDensification: "Neuronal Densification", - NuoptimalInjectorImplant: "Nuoptimal Nootropic Injector Implant", - SpeechEnhancement: "Speech Enhancement", - FocusWire: "FocusWire", - PCDNI: "PC Direct-Neural Interface", - PCDNIOptimizer: "PC Direct-Neural Interface Optimization Submodule", - PCDNINeuralNetwork: "PC Direct-Neural Interface NeuroNet Injector", - ADRPheromone1: "ADR-V1 Pheromone Gene", - ADRPheromone2: "ADR-V2 Pheromone Gene", - HacknetNodeCPUUpload: "Hacknet Node CPU Architecture Neural-Upload", - HacknetNodeCacheUpload: "Hacknet Node Cache Architecture Neural-Upload", - HacknetNodeNICUpload: "Hacknet Node NIC Architecture Neural-Upload", - HacknetNodeKernelDNI: "Hacknet Node Kernel Direct-Neural Interface", - HacknetNodeCoreDNI: "Hacknet Node Core Direct-Neural Interface", - NeuroFluxGovernor: "NeuroFlux Governor", - Neurotrainer1: "Neurotrainer I", - Neurotrainer2: "Neurotrainer II", - Neurotrainer3: "Neurotrainer III", - Hypersight: "HyperSight Corneal Implant", - LuminCloaking1: "LuminCloaking-V1 Skin Implant", - LuminCloaking2: "LuminCloaking-V2 Skin Implant", - HemoRecirculator: "HemoRecirculator", - SmartSonar: "SmartSonar Implant", - PowerRecirculator: "Power Recirculation Core", - QLink: "QLink", - TheRedPill: "The Red Pill", - SPTN97: "SPTN-97 Gene Modification", - HiveMind: "ECorp HVMind Implant", - CordiARCReactor: "CordiARC Fusion Reactor", - SmartJaw: "SmartJaw", - Neotra: "Neotra", - Xanipher: "Xanipher", - nextSENS: "nextSENS Gene Modification", - OmniTekInfoLoad: "OmniTek InfoLoad", - PhotosyntheticCells: "Photosynthetic Cells", - Neurolink: "BitRunners Neurolink", - TheBlackHand: "The Black Hand", - CRTX42AA: "CRTX42-AA Gene Modification", - Neuregen: "Neuregen Gene Modification", - CashRoot: "CashRoot Starter Kit", - NutriGen: "NutriGen Implant", - INFRARet: "INFRARET Enhancement", - DermaForce: "DermaForce Particle Barrier", - GrapheneBrachiBlades: "Graphene BranchiBlades Upgrade", - GrapheneBionicArms: "Graphene Bionic Arms Upgrade", - BrachiBlades: "BrachiBlades", - BionicArms: "Bionic Arms", - SNA: "Social Negotiation Assistant (S.N.A)", - EsperEyewear: "EsperTech Bladeburner Eyewear", - EMS4Recombination: "EMS-4 Recombination", - OrionShoulder: "ORION-MKIV Shoulder", - HyperionV1: "Hyperion Plasma Cannon V1", - HyperionV2: "Hyperion Plasma Cannon V2", - GolemSerum: "GOLEM Serum", - VangelisVirus: "Vangelis Virus", - VangelisVirus3: "Vangelis Virus 3.0", - INTERLINKED: "I.N.T.E.R.L.I.N.K.E.D", - BladeRunner: "Blade's Runners", - BladeArmor: "BLADE-51b Tesla Armor", - BladeArmorPowerCells: "BLADE-51b Tesla Armor: Power Cells Upgrade", - BladeArmorEnergyShielding: "BLADE-51b Tesla Armor: Energy Shielding Upgrade", - BladeArmorUnibeam: "BLADE-51b Tesla Armor: Unibeam Upgrade", - BladeArmorOmnibeam: "BLADE-51b Tesla Armor: Omnibeam Upgrade", - BladeArmorIPU: "BLADE-51b Tesla Armor: IPU Upgrade", - BladesSimulacrum: "The Blade's Simulacrum", - - //Wasteland Augs - //PepBoy: "P.E.P-Boy", Plasma Energy Projection System - //PepBoyForceField Generates plasma force fields - //PepBoyBlasts Generate high density plasma concussive blasts - //PepBoyDataStorage STore more data on pep boy, -} - function initAugmentations() { for (var name in Factions) { if (Factions.hasOwnProperty(name)) { @@ -213,7 +48,11 @@ function initAugmentations() { name:AugmentationNames.HemoRecirculator, moneyCost: 9e6, repCost:4e3, info:"A heart implant that greatly increases the body's ability to effectively use and pump " + "blood.

" + - "This augmentation increases all of the player's combat stats by 8%." + "This augmentation increases all of the player's combat stats by 8%.", + strength_mult: 1.08, + defense_mult: 1.08, + agility_mult: 1.08, + dexterity_mult: 1.08, }); HemoRecirculator.addToFactions(["Tetrads", "The Dark Army", "The Syndicate"]); if (augmentationExists(AugmentationNames.HemoRecirculator)) { @@ -226,7 +65,8 @@ function initAugmentations() { info:"This cranial implant is embedded within the player's inner ear structure and optic nerves. It regulates and enhances the user's " + "balance and hand-eye coordination. It is also capable of augmenting reality by projecting digital information " + "directly onto the retina. These enhancements allow the player to better lock-on and keep track of enemies.

" + - "This augmentation increases the player's dexterity by 10%." + "This augmentation increases the player's dexterity by 10%.", + dexterity_mult: 1.1, }); Targeting1.addToFactions(["Slum Snakes", "The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima", "OmniTek Incorporated", "KuaiGong International", "Blade Industries"]); @@ -240,7 +80,8 @@ function initAugmentations() { info:"This is an upgrade of the Augmented Targeting I cranial implant, which is capable of augmenting reality " + "and enhances the user's balance and hand-eye coordination.

" + "This augmentation increases the player's dexterity by 20%.", - prereqs:[AugmentationNames.Targeting1] + prereqs:[AugmentationNames.Targeting1], + dexterity_mult: 1.2, }); Targeting2.addToFactions(["The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima", "OmniTek Incorporated", "KuaiGong International", "Blade Industries"]); @@ -254,7 +95,8 @@ function initAugmentations() { info:"This is an upgrade of the Augmented Targeting II cranial implant, which is capable of augmenting reality " + "and enhances the user's balance and hand-eye coordination.

" + "This augmentation increases the player's dexterity by 30%.", - prereqs:[AugmentationNames.Targeting2] + prereqs:[AugmentationNames.Targeting2], + dexterity_mult: 1.3, }); Targeting3.addToFactions(["The Dark Army", "The Syndicate", "OmniTek Incorporated", "KuaiGong International", "Blade Industries", "The Covenant"]); @@ -267,7 +109,9 @@ function initAugmentations() { name:AugmentationNames.SyntheticHeart, moneyCost:575e6, repCost:300e3, info:"This advanced artificial heart, created from plasteel and graphene, is capable of pumping more blood " + "at much higher efficiencies than a normal human heart.

" + - "This augmentation increases the player's agility and strength by 50%." + "This augmentation increases the player's agility and strength by 50%.", + agility_mult: 1.5, + strength_mult: 1.5, }); SyntheticHeart.addToFactions(["KuaiGong International", "Fulcrum Secret Technologies", "Speakers for the Dead", "NWO", "The Covenant", "Daedalus", "Illuminati"]); @@ -281,7 +125,9 @@ function initAugmentations() { info:"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside " + "the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. " + "Scientists have named these artificially enhanced units 'synfibrils'.

" + - "This augmentation increases the player's strength and defense by 30%." + "This augmentation increases the player's strength and defense by 30%.", + strength_mult: 1.3, + defense_mult: 1.3, }); SynfibrilMuscle.addToFactions(["KuaiGong International", "Fulcrum Secret Technologies", "Speakers for the Dead", "NWO", "The Covenant", "Daedalus", "Illuminati", "Blade Industries"]); @@ -294,7 +140,9 @@ function initAugmentations() { name:AugmentationNames.CombatRib1, repCost:3e3, moneyCost:4750000, info:"The human body's ribs are replaced with artificial ribs that automatically and continuously release cognitive " + "and performance-enhancing drugs into the bloodstream, improving the user's abilities in combat.

" + - "This augmentation increases the player's strength and defense by 10%." + "This augmentation increases the player's strength and defense by 10%.", + strength_mult: 1.1, + defense_mult: 1.1, }); CombatRib1.addToFactions(["Slum Snakes", "The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima", "OmniTek Incorporated", "KuaiGong International", "Blade Industries"]); @@ -308,7 +156,9 @@ function initAugmentations() { info:"This is an upgrade to the Combat Rib I augmentation, and is capable of releasing even more potent combat-enhancing " + "drugs into the bloodstream.

" + "This augmentation increases the player's strength and defense by 14%.", - prereqs:[AugmentationNames.CombatRib1] + prereqs:[AugmentationNames.CombatRib1], + strength_mult: 1.14, + defense_mult: 1.14, }); CombatRib2.addToFactions(["The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima", "OmniTek Incorporated", "KuaiGong International", "Blade Industries"]); @@ -322,7 +172,9 @@ function initAugmentations() { info:"This is an upgrade to the Combat Rib II augmentation, and is capable of releasing even more potent combat-enhancing " + "drugs into the bloodstream

." + "This augmentation increases the player's strength and defense by 18%.", - prereqs:[AugmentationNames.CombatRib2] + prereqs:[AugmentationNames.CombatRib2], + strength_mult: 1.18, + defense_mult: 1.18, }); CombatRib3.addToFactions(["The Dark Army", "The Syndicate", "OmniTek Incorporated", "KuaiGong International", "Blade Industries", "The Covenant"]); @@ -335,7 +187,9 @@ function initAugmentations() { name:AugmentationNames.NanofiberWeave, repCost:15e3, moneyCost:25e6, info:"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning. " + "This improves the skin's ability to regenerate itself and protect the body from external stresses and forces.

" + - "This augmentation increases the player's strength and defense by 20%." + "This augmentation increases the player's strength and defense by 20%.", + strength_mult: 1.2, + defense_mult: 1.2, }); NanofiberWeave.addToFactions(["Tian Di Hui", "The Syndicate", "The Dark Army", "Speakers for the Dead", "Blade Industries", "Fulcrum Secret Technologies", "OmniTek Incorporated"]); @@ -351,7 +205,8 @@ function initAugmentations() { "that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective " + "at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to " + "mitigate damage from any fire-related or electrical traumas.

" + - "This augmentation increases the player's defense by 120%." + "This augmentation increases the player's defense by 120%.", + defense_mult: 2.2, }); SubdermalArmor.addToFactions(["The Syndicate", "Fulcrum Secret Technologies", "Illuminati", "Daedalus", "The Covenant"]); @@ -364,7 +219,9 @@ function initAugmentations() { name:AugmentationNames.WiredReflexes, repCost:500, moneyCost:500e3, info:"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, " + "supercharging the body's ability to send signals through neurons. This results in increased reflex speed.

" + - "This augmentation increases the player's agility and dexterity by 5%." + "This augmentation increases the player's agility and dexterity by 5%.", + agility_mult: 1.05, + dexterity_mult: 1.05, }); WiredReflexes.addToFactions(["Tian Di Hui", "Slum Snakes", "Sector-12", "Volhaven", "Aevum", "Ishima", "The Syndicate", "The Dark Army", "Speakers for the Dead"]); @@ -377,7 +234,9 @@ function initAugmentations() { name:AugmentationNames.GrapheneBoneLacings, repCost:450e3, moneyCost:850e6, info:"A graphene-based material is grafted and fused into the user's bones, significantly increasing " + "their density and tensile strength.

" + - "This augmentation increases the player's strength and defense by 70%." + "This augmentation increases the player's strength and defense by 70%.", + strength_mult: 1.7, + defense_mult: 1.7, }); GrapheneBoneLacings.addToFactions(["Fulcrum Secret Technologies", "The Covenant"]); if (augmentationExists(AugmentationNames.GrapheneBoneLacings)) { @@ -391,7 +250,11 @@ function initAugmentations() { "Not only is the Bionic Spine physically stronger than a human spine, but it is also capable of digitally " + "stimulating and regulating the neural signals that are sent and received by the spinal cord. This results in " + "greatly improved senses and reaction speeds.

" + - "This augmentation increases all of the player's combat stats by 15%." + "This augmentation increases all of the player's combat stats by 15%.", + strength_mult: 1.15, + defense_mult: 1.15, + agility_mult: 1.15, + dexterity_mult: 1.15, }); BionicSpine.addToFactions(["Speakers for the Dead", "The Syndicate", "KuaiGong International", "OmniTek Incorporated", "Blade Industries"]); @@ -405,7 +268,11 @@ function initAugmentations() { info:"An upgrade to the Bionic Spine augmentation. It fuses the implant with an advanced graphene " + "material to make it much stronger and lighter.

" + "This augmentation increases all of the player's combat stats by 60%.", - prereqs:[AugmentationNames.BionicSpine] + prereqs:[AugmentationNames.BionicSpine], + strength_mult: 1.6, + defense_mult: 1.6, + agility_mult: 1.6, + dexterity_mult: 1.6, }); GrapheneBionicSpine.addToFactions(["Fulcrum Secret Technologies", "ECorp"]); if (augmentationExists(AugmentationNames.GrapheneBionicSpine)) { @@ -416,7 +283,8 @@ function initAugmentations() { var BionicLegs = new Augmentation({ name:AugmentationNames.BionicLegs, repCost:60e3, moneyCost:75e6, info:"Cybernetic legs created from plasteel and carbon fibers that completely replace the user's organic legs.

" + - "This augmentation increases the player's agility by 60%." + "This augmentation increases the player's agility by 60%.", + agility_mult: 1.6, }); BionicLegs.addToFactions(["Speakers for the Dead", "The Syndicate", "KuaiGong International", "OmniTek Incorporated", "Blade Industries"]); @@ -430,7 +298,8 @@ function initAugmentations() { info:"An upgrade to the Bionic Legs augmentation. It fuses the implant with an advanced graphene " + "material to make it much stronger and lighter.

" + "This augmentation increases the player's agility by 150%.", - prereqs:[AugmentationNames.BionicLegs] + prereqs: [AugmentationNames.BionicLegs], + agility_mult: 2.5, }); GrapheneBionicLegs.addToFactions(["MegaCorp", "ECorp", "Fulcrum Secret Technologies"]); if (augmentationExists(AugmentationNames.GrapheneBionicLegs)) { @@ -444,7 +313,8 @@ function initAugmentations() { info:"A cochlear implant with an embedded computer that analyzes incoming speech. " + "The embedded computer processes characteristics of incoming speech, such as tone " + "and inflection, to pick up on subtle cues and aid in social interactions.

" + - "This augmentation increases the player's charisma by 20%." + "This augmentation increases the player's charisma by 20%.", + charisma_mult: 1.2, }); SpeechProcessor.addToFactions(["Tian Di Hui", "Chongqing", "Sector-12", "New Tokyo", "Aevum", "Ishima", "Volhaven", "Silhouette"]); @@ -458,7 +328,9 @@ function initAugmentations() { info:"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that " + "control personality. The TITN-41 strain alters these genes so that the subject becomes more " + "outgoing and socialable.

" + - "This augmentation increases the player's charisma and charisma experience gain rate by 15%." + "This augmentation increases the player's charisma and charisma experience gain rate by 15%.", + charisma_mult: 1.15, + charisma_exp_mult: 1.15, }); TITN41Injection.addToFactions(["Silhouette"]); if (augmentationExists(AugmentationNames.TITN41Injection)) { @@ -473,7 +345,9 @@ function initAugmentations() { "language, and the voice's tone/inflection to determine the best course of action during social" + "situations. The implant also uses deep learning software to continuously learn new behavior" + "patterns and how to best respond.

" + - "This augmentation increases the player's charisma and charisma experience gain rate by 60%." + "This augmentation increases the player's charisma and charisma experience gain rate by 60%.", + charisma_mult: 1.6, + charisma_exp_mult: 1.6, }); EnhancedSocialInteractionImplant.addToFactions(["Bachman & Associates", "NWO", "Clarke Incorporated", "OmniTek Incorporated", "Four Sigma"]); @@ -487,7 +361,8 @@ function initAugmentations() { name:AugmentationNames.BitWire, repCost:1500, moneyCost:2e6, info: "A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing " + "capabilities.

" + - "This augmentation increases the player's hacking skill by 5%." + "This augmentation increases the player's hacking skill by 5%.", + hacking_mult: 1.05, }); BitWire.addToFactions(["CyberSec", "NiteSec"]); if (augmentationExists(AugmentationNames.BitWire)) { @@ -505,7 +380,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's hacking speed by 3%.
" + "Increases the amount of money the player's gains from hacking by 15%.
" + - "Increases the player's hacking skill by 12%." + "Increases the player's hacking skill by 12%.", + hacking_speed_mult: 1.03, + hacking_money_mult: 1.15, + hacking_mult: 1.12, }); ArtificialBioNeuralNetwork.addToFactions(["BitRunners", "Fulcrum Secret Technologies"]); if (augmentationExists(AugmentationNames.ArtificialBioNeuralNetwork)) { @@ -520,7 +398,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's hacking speed by 2%
" + "Increases the player's hacking chance by 5%.
" + - "Increases the player's hacking experience gain rate by 5%." + "Increases the player's hacking experience gain rate by 5%.", + hacking_speed_mult: 1.02, + hacking_chance_mult: 1.05, + hacking_exp_mult: 1.05, }); ArtificialSynapticPotentiation.addToFactions(["The Black Hand", "NiteSec"]); if (augmentationExists(AugmentationNames.ArtificialSynapticPotentiation)) { @@ -537,7 +418,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's hacking speed by 3%.
" + "Increases the player's hacking skill by 8%.
" + - "Increases the player's hacking experience gain rate by 10%." + "Increases the player's hacking experience gain rate by 10%.", + hacking_speed_mult: 1.03, + hacking_exp_mult: 1.1, + hacking_mult: 1.08, }); EnhancedMyelinSheathing.addToFactions(["Fulcrum Secret Technologies", "BitRunners", "The Black Hand"]); if (augmentationExists(AugmentationNames.EnhancedMyelinSheathing)) { @@ -549,7 +433,8 @@ function initAugmentations() { name:AugmentationNames.SynapticEnhancement, repCost:800, moneyCost:1.5e6, info:"A small cranial implant that continuously uses weak electric signals to stimulate the brain and " + "induce stronger synaptic activity. This improves the user's cognitive abilities.

" + - "This augmentation increases the player's hacking speed by 3%." + "This augmentation increases the player's hacking speed by 3%.", + hacking_speed_mult: 1.03, }); SynapticEnhancement.addToFactions(["CyberSec"]); if (augmentationExists(AugmentationNames.SynapticEnhancement)) { @@ -561,7 +446,8 @@ function initAugmentations() { name:AugmentationNames.NeuralRetentionEnhancement, repCost:8e3, moneyCost:50e6, info:"Chemical injections are used to permanently alter and strengthen the brain's neuronal " + "circuits, strengthening its ability to retain information.

" + - "This augmentation increases the player's hacking experience gain rate by 25%." + "This augmentation increases the player's hacking experience gain rate by 25%.", + hacking_exp_mult: 1.25, }); NeuralRetentionEnhancement.addToFactions(["NiteSec"]); if (augmentationExists(AugmentationNames.NeuralRetentionEnhancement)) { @@ -574,7 +460,8 @@ function initAugmentations() { info:"A brain implant that provides an interface for direct, wireless communication between a computer's main " + "memory and the mind. This implant allows the user to not only access a computer's memory, but also alter " + "and delete it.

" + - "This augmentation increases the amount of money the player gains from hacking by 25%." + "This augmentation increases the amount of money the player gains from hacking by 25%.", + hacking_money_mult: 1.25, }); DataJack.addToFactions(["BitRunners", "The Black Hand", "NiteSec", "Chongqing", "New Tokyo"]); if (augmentationExists(AugmentationNames.DataJack)) { @@ -589,7 +476,8 @@ function initAugmentations() { "processing all of the traffic on that network. By itself, the Embedded Netburner Module does " + "not do much, but a variety of very powerful upgrades can be installed that allow you to fully " + "control the traffic on a network.

" + - "This augmentation increases the player's hacking skill by 8%." + "This augmentation increases the player's hacking skill by 8%.", + hacking_mult: 1.08, }); ENM.addToFactions(["BitRunners", "The Black Hand", "NiteSec", "ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO", "Blade Industries"]); @@ -608,7 +496,12 @@ function initAugmentations() { "Increases the player's chance of successfully performing a hack by 3%.
" + "Increases the player's hacking experience gain rate by 7%.
" + "Increases the player's hacking skill by 7%.", - prereqs:[AugmentationNames.ENM] + prereqs:[AugmentationNames.ENM], + hacking_speed_mult: 1.03, + hacking_money_mult: 1.1, + hacking_chance_mult: 1.03, + hacking_exp_mult: 1.07, + hacking_mult: 1.07, }); ENMCore.addToFactions(["BitRunners", "The Black Hand", "ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO", "Blade Industries"]); @@ -629,7 +522,12 @@ function initAugmentations() { "Increases the player's chance of successfully performing a hack by 5%.
" + "Increases the player's hacking experience gain rate by 15%.
" + "Increases the player's hacking skill by 8%.", - prereqs:[AugmentationNames.ENMCore] + prereqs:[AugmentationNames.ENMCore], + hacking_speed_mult: 1.05, + hacking_money_mult: 1.3, + hacking_chance_mult: 1.05, + hacking_exp_mult: 1.15, + hacking_mult: 1.08, }); ENMCoreV2.addToFactions(["BitRunners", "ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO", "Blade Industries", "OmniTek Incorporated", "KuaiGong International"]); @@ -649,7 +547,12 @@ function initAugmentations() { "Increases the player's chance of successfully performing a hack by 10%.
" + "Increases the player's hacking experience gain rate by 25%.
" + "Increases the player's hacking skill by 10%.", - prereqs:[AugmentationNames.ENMCoreV2] + prereqs:[AugmentationNames.ENMCoreV2], + hacking_speed_mult: 1.05, + hacking_money_mult: 1.4, + hacking_chance_mult: 1.1, + hacking_exp_mult: 1.25, + hacking_mult: 1.1, }); ENMCoreV3.addToFactions(["ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO", "Daedalus", "The Covenant", "Illuminati"]); @@ -663,7 +566,8 @@ function initAugmentations() { info:"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster " + "that vastly outperforms the Netburner Module's native single-core processor.

" + "This augmentation increases the player's hacking speed by 10%.", - prereqs:[AugmentationNames.ENM] + prereqs:[AugmentationNames.ENM], + hacking_speed_mult: 1.1, }); ENMAnalyzeEngine.addToFactions(["ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO", "Daedalus", "The Covenant", "Illuminati"]); @@ -680,7 +584,9 @@ function initAugmentations() { "This augmentation:
" + "Increases the amount of money the player gains from hacking by 40%.
" + "Increases the player's chance of successfully performing a hack by 20%.", - prereqs:[AugmentationNames.ENM] + prereqs:[AugmentationNames.ENM], + hacking_money_mult: 1.4, + hacking_chance_mult: 1.2, }); ENMDMA.addToFactions(["ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO", "Daedalus", "The Covenant", "Illuminati"]); @@ -696,7 +602,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's hacking speed by 2%.
" + "Increases the player's chance of successfully performing a hack by 10%.
" + - "Increases the player's hacking experience gain rate by 12%." + "Increases the player's hacking experience gain rate by 12%.", + hacking_speed_mult: 1.02, + hacking_chance_mult: 1.1, + hacking_exp_mult: 1.12, }); Neuralstimulator.addToFactions(["The Black Hand", "Chongqing", "Sector-12", "New Tokyo", "Aevum", "Ishima", "Volhaven", "Bachman & Associates", "Clarke Incorporated", @@ -713,7 +622,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's hacking skill by 10%.
" + "Increases the player's hacking experience gain rate by 15%.
" + - "Increases the amount of money the player gains from hacking by 20%." + "Increases the amount of money the player gains from hacking by 20%.", + hacking_mult: 1.1, + hacking_exp_mult: 1.15, + hacking_money_mult: 1.2, }); NeuralAccelerator.addToFactions(["BitRunners"]); if (augmentationExists(AugmentationNames.NeuralAccelerator)) { @@ -729,7 +641,9 @@ function initAugmentations() { "so that the brain doesn't have to.

" + "This augmentation:
" + "Increases the player's hacking speed by 1%.
" + - "Increases the player's hacking skill by 5%." + "Increases the player's hacking skill by 5%.", + hacking_speed_mult: 1.01, + hacking_mult: 1.05, }); CranialSignalProcessorsG1.addToFactions(["CyberSec"]); if (augmentationExists(AugmentationNames.CranialSignalProcessorsG1)) { @@ -747,7 +661,10 @@ function initAugmentations() { "Increases the player's hacking speed by 2%.
" + "Increases the player's chance of successfully performing a hack by 5%.
" + "Increases the player's hacking skill by 7%.", - prereqs:[AugmentationNames.CranialSignalProcessorsG1] + prereqs:[AugmentationNames.CranialSignalProcessorsG1], + hacking_speed_mult: 1.02, + hacking_chance_mult: 1.05, + hacking_mult: 1.07, }); CranialSignalProcessorsG2.addToFactions(["CyberSec", "NiteSec"]); if (augmentationExists(AugmentationNames.CranialSignalProcessorsG2)) { @@ -765,7 +682,10 @@ function initAugmentations() { "Increases the player's hacking speed by 2%.
" + "Increases the amount of money the player gains from hacking by 15%.
" + "Increases the player's hacking skill by 9%.", - prereqs:[AugmentationNames.CranialSignalProcessorsG2] + prereqs:[AugmentationNames.CranialSignalProcessorsG2], + hacking_speed_mult: 1.02, + hacking_money_mult: 1.15, + hacking_mult: 1.09, }); CranialSignalProcessorsG3.addToFactions(["NiteSec", "The Black Hand", "BitRunners"]); if (augmentationExists(AugmentationNames.CranialSignalProcessorsG3)) { @@ -783,7 +703,10 @@ function initAugmentations() { "Increases the player's hacking speed by 2%.
" + "Increases the amount of money the player gains from hacking by 20%.
" + "Increases the amount of money the player can inject into servers using grow() by 25%.", - prereqs:[AugmentationNames.CranialSignalProcessorsG3] + prereqs:[AugmentationNames.CranialSignalProcessorsG3], + hacking_speed_mult: 1.02, + hacking_money_mult: 1.2, + hacking_grow_mult: 1.25, }); CranialSignalProcessorsG4.addToFactions(["The Black Hand", "BitRunners"]); if (augmentationExists(AugmentationNames.CranialSignalProcessorsG4)) { @@ -801,7 +724,10 @@ function initAugmentations() { "Increases the player's hacking skill by 30%.
" + "Increases the amount of money the player gains from hacking by 25%.
" + "Increases the amount of money the player can inject into servers using grow() by 75%.", - prereqs:[AugmentationNames.CranialSignalProcessorsG4] + prereqs:[AugmentationNames.CranialSignalProcessorsG4], + hacking_mult: 1.3, + hacking_money_mult: 1.25, + hacking_grow_mult: 1.75, }); CranialSignalProcessorsG5.addToFactions(["BitRunners"]); if (augmentationExists(AugmentationNames.CranialSignalProcessorsG5)) { @@ -817,7 +743,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's hacking skill by 15%.
" + "Increases the player's hacking experience gain rate by 10%.
"+ - "Increases the player's hacking speed by 3%." + "Increases the player's hacking speed by 3%.", + hacking_mult: 1.15, + hacking_exp_mult: 1.1, + hacking_speed_mult: 1.03, }); NeuronalDensification.addToFactions(["Clarke Incorporated"]); if (augmentationExists(AugmentationNames.NeuronalDensification)) { @@ -832,7 +761,8 @@ function initAugmentations() { "the bloodstream to improve memory, increase focus, and provide other " + "cognitive enhancements.

" + "This augmentation increases the amount of reputation the player gains " + - "when working for a company by 20%." + "when working for a company by 20%.", + company_rep_mult: 1.2, }); NuoptimalInjectorImplant.addToFactions(["Tian Di Hui", "Volhaven", "New Tokyo", "Chongqing", "Ishima", "Clarke Incorporated", "Four Sigma", "Bachman & Associates"]); @@ -848,7 +778,9 @@ function initAugmentations() { "social interactions.

" + "This augmentation:
" + "Increases the player's charisma by 10%.
" + - "Increases the amount of reputation the player gains when working for a company by 10%." + "Increases the amount of reputation the player gains when working for a company by 10%.", + company_rep_mult: 1.1, + charisma_mult: 1.1, }); SpeechEnhancement.addToFactions(["Tian Di Hui", "Speakers for the Dead", "Four Sigma", "KuaiGong International", "Clarke Incorporated", "Bachman & Associates"]); @@ -864,7 +796,15 @@ function initAugmentations() { "This augmentation:
" + "Increases all experience gains by 5%.
" + "Increases the amount of money the player gains from working by 20%.
" + - "Increases the amount of reputation the player gains when working for a company by 10%." + "Increases the amount of reputation the player gains when working for a company by 10%.", + hacking_exp_mult: 1.05, + strength_exp_mult: 1.05, + defense_exp_mult: 1.05, + dexterity_exp_mult: 1.05, + agility_exp_mult: 1.05, + charisma_exp_mult: 1.05, + company_rep_mult: 1.1, + work_money_mult: 1.2, }); FocusWire.addToFactions(["Bachman & Associates", "Clarke Incorporated", "Four Sigma", "KuaiGong International"]); if (augmentationExists(AugmentationNames.FocusWire)) { @@ -879,7 +819,9 @@ function initAugmentations() { "it using the brain's electrochemical signals.

" + "This augmentation:
" + "Increases the amount of reputation the player gains when working for a company by 30%.
" + - "Increases the player's hacking skill by 8%." + "Increases the player's hacking skill by 8%.", + company_rep_mult: 1.3, + hacking_mult: 1.08, }); PCDNI.addToFactions(["Four Sigma", "OmniTek Incorporated", "ECorp", "Blade Industries"]); if (augmentationExists(AugmentationNames.PCDNI)) { @@ -895,7 +837,9 @@ function initAugmentations() { "This augmentation:
" + "Increases the amount of reputation the player gains when working for a company by 75%.
" + "Increases the player's hacking skill by 10%.", - prereqs:[AugmentationNames.PCDNI] + prereqs:[AugmentationNames.PCDNI], + company_rep_mult: 1.75, + hacking_mult: 1.1, }); PCDNIOptimizer.addToFactions(["Fulcrum Secret Technologies", "ECorp", "Blade Industries"]); if (augmentationExists(AugmentationNames.PCDNIOptimizer)) { @@ -913,7 +857,10 @@ function initAugmentations() { "Increases the amount of reputation the player gains when working for a company by 100%.
" + "Increases the player's hacking skill by 10%.
" + "Increases the player's hacking speed by 5%.", - prereqs:[AugmentationNames.PCDNI] + prereqs:[AugmentationNames.PCDNI], + company_rep_mult: 2, + hacking_mult: 1.1, + hacking_speed_mult: 1.05, }); PCDNINeuralNetwork.addToFactions(["Fulcrum Secret Technologies"]); if (augmentationExists(AugmentationNames.PCDNINeuralNetwork)) { @@ -928,7 +875,9 @@ function initAugmentations() { "triggers feelings of admiration and approval in other people.

" + "This augmentation:
" + "Increases the amount of reputation the player gains when working for a company by 10%
" + - "Increases the amount of reputation the player gains for a faction by 10%." + "Increases the amount of reputation the player gains for a faction by 10%.", + company_rep_mult: 1.1, + faction_rep_mult: 1.1, }); ADRPheromone1.addToFactions(["Tian Di Hui", "The Syndicate", "NWO", "MegaCorp", "Four Sigma"]); if (augmentationExists(AugmentationNames.ADRPheromone1)) { @@ -942,7 +891,9 @@ function initAugmentations() { "which is similar to but more potent than ADR-V1. This pheromone, when excreted, " + "triggers feelings of admiration, approval, and respect in others.

" + "This augmentation:
" + - "Increases the amount of reputation the player gains for a faction and company by 20%." + "Increases the amount of reputation the player gains for a faction and company by 20%.", + company_rep_mult: 1.2, + faction_rep_mult: 1.2, }); ADRPheromone2.addToFactions(["Silhouette", "Four Sigma", "Bachman & Associates", "Clarke Incorporated"]); if (augmentationExists(AugmentationNames.ADRPheromone2)) { @@ -958,7 +909,9 @@ function initAugmentations() { "for the Hacknet Node that provides better performance.

" + "This augmentation:
" + "Increases the amount of money produced by Hacknet Nodes by 15%.
" + - "Decreases the cost of purchasing a Hacknet Node by 15%." + "Decreases the cost of purchasing a Hacknet Node by 15%.", + hacknet_node_money_mult: 1.15, + hacknet_node_purchase_cost_mult: 0.85, }); HacknetNodeCPUUpload.addToFactions(["Netburners"]); if (augmentationExists(AugmentationNames.HacknetNodeCPUUpload)) { @@ -973,7 +926,9 @@ function initAugmentations() { "Hacknet Node that offers better performance.

" + "This augmentation:
" + "Increases the amount of money produced by Hacknet Nodes by 10%.
" + - "Decreases the cost of leveling up a Hacknet Node by 15%." + "Decreases the cost of leveling up a Hacknet Node by 15%.", + hacknet_node_money_mult: 1.10, + hacknet_node_level_cost_mult: 0.85, }); HacknetNodeCacheUpload.addToFactions(["Netburners"]); if (augmentationExists(AugmentationNames.HacknetNodeCacheUpload)) { @@ -988,7 +943,9 @@ function initAugmentations() { "offers better performance.

" + "This augmentation:
" + "Increases the amount of money produced by Hacknet Nodes by 10%.
" + - "Decreases the cost of purchasing a Hacknet Node by 10%." + "Decreases the cost of purchasing a Hacknet Node by 10%.", + hacknet_node_money_mult: 1.1, + hacknet_node_purchase_cost_mult: 0.9, }); HacknetNodeNICUpload.addToFactions(["Netburners"]); if (augmentationExists(AugmentationNames.HacknetNodeNICUpload)) { @@ -1001,7 +958,8 @@ function initAugmentations() { info:"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a " + "Hacknet Node. This lets the user access and manipulate the Node's kernel using the mind's " + "electrochemical signals.

" + - "This augmentation increases the amount of money produced by Hacknet Nodes by 25%." + "This augmentation increases the amount of money produced by Hacknet Nodes by 25%.", + hacknet_node_money_mult: 1.25, }); HacknetNodeKernelDNI.addToFactions(["Netburners"]); if (augmentationExists(AugmentationNames.HacknetNodeKernelDNI)) { @@ -1014,7 +972,8 @@ function initAugmentations() { info:"Installs a Direct-Neural Interface jack into the arm that is capable of connecting " + "to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using " + "the mind's electrochemical signals.

" + - "This augmentation increases the amount of money produced by Hacknet Nodes by 45%." + "This augmentation increases the amount of money produced by Hacknet Nodes by 45%.", + hacknet_node_money_mult: 1.45, }); HacknetNodeCoreDNI.addToFactions(["Netburners"]); if (augmentationExists(AugmentationNames.HacknetNodeCoreDNI)) { @@ -1030,7 +989,33 @@ function initAugmentations() { "essentially 'governing' the body. By doing so, it improves the functionality of the " + "body's nervous system.

" + "This is a special augmentation because it can be leveled up infinitely. Each level of this augmentation " + - "increases ALL of the player's multipliers by 1%." + "increases ALL of the player's multipliers by 1%.", + hacking_chance_mult: 1.01, + hacking_speed_mult: 1.01, + hacking_money_mult: 1.01, + hacking_grow_mult: 1.01, + hacking_mult: 1.01, + strength_mult: 1.01, + defense_mult: 1.01, + dexterity_mult: 1.01, + agility_mult: 1.01, + charisma_mult: 1.01, + hacking_exp_mult: 1.01, + strength_exp_mult: 1.01, + defense_exp_mult: 1.01, + dexterity_exp_mult: 1.01, + agility_exp_mult: 1.01, + charisma_exp_mult: 1.01, + company_rep_mult: 1.01, + faction_rep_mult: 1.01, + crime_money_mult: 1.01, + crime_success_mult: 1.01, + hacknet_node_money_mult: 1.01, + hacknet_node_purchase_cost_mult: 0.99, + hacknet_node_ram_cost_mult: 0.99, + hacknet_node_core_cost_mult: 0.99, + hacknet_node_level_cost_mult: 0.99, + work_money_mult: 1.01, }); // Set the Augmentation's level to the currently-installed level @@ -1065,7 +1050,13 @@ function initAugmentations() { "installed by releasing millions of nanobots into the human brain, each of which " + "attaches to a different neural pathway to enhance the brain's ability to retain " + "and retrieve information.

" + - "This augmentation increases the player's experience gain rate for all stats by 10%." + "This augmentation increases the player's experience gain rate for all stats by 10%.", + hacking_exp_mult: 1.1, + strength_exp_mult: 1.1, + defense_exp_mult: 1.1, + dexterity_exp_mult: 1.1, + agility_exp_mult: 1.1, + charisma_exp_mult: 1.1, }); Neurotrainer1.addToFactions(["CyberSec"]); if (augmentationExists(AugmentationNames.Neurotrainer1)) { @@ -1078,7 +1069,13 @@ function initAugmentations() { info:"A decentralized cranial implant that improves the brain's ability to learn. This " + "is a more powerful version of the Neurotrainer I augmentation, but it does not " + "require Neurotrainer I to be installed as a prerequisite.

" + - "This augmentation increases the player's experience gain rate for all stats by 15%." + "This augmentation increases the player's experience gain rate for all stats by 15%.", + hacking_exp_mult: 1.15, + strength_exp_mult: 1.15, + defense_exp_mult: 1.15, + dexterity_exp_mult: 1.15, + agility_exp_mult: 1.15, + charisma_exp_mult: 1.15, }); Neurotrainer2.addToFactions(["BitRunners", "NiteSec"]); if (augmentationExists(AugmentationNames.Neurotrainer2)) { @@ -1091,7 +1088,13 @@ function initAugmentations() { info:"A decentralized cranial implant that improves the brain's ability to learn. This " + "is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, " + "but it does not require either of them to be installed as a prerequisite.

" + - "This augmentation increases the player's experience gain rate for all stats by 20%." + "This augmentation increases the player's experience gain rate for all stats by 20%.", + hacking_exp_mult: 1.2, + strength_exp_mult: 1.2, + defense_exp_mult: 1.2, + dexterity_exp_mult: 1.2, + agility_exp_mult: 1.2, + charisma_exp_mult: 1.2, }); Neurotrainer3.addToFactions(["NWO", "Four Sigma"]); if (augmentationExists(AugmentationNames.Neurotrainer3)) { @@ -1107,7 +1110,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's dexterity by 40%.
" + "Increases the player's hacking speed by 3%.
" + - "Increases the amount of money the player gains from hacking by 10%." + "Increases the amount of money the player gains from hacking by 10%.", + dexterity_mult: 1.4, + hacking_speed_mult: 1.03, + hacking_money_mult: 1.1, }); Hypersight.addToFactions(["Blade Industries", "KuaiGong International"]); if (augmentationExists(AugmentationNames.Hypersight)) { @@ -1122,7 +1128,9 @@ function initAugmentations() { "around the skin, making the user much harder to see from the naked eye.

" + "This augmentation:
" + "Increases the player's agility by 5%
" + - "Increases the amount of money the player gains from crimes by 10%." + "Increases the amount of money the player gains from crimes by 10%.", + agility_mult: 1.05, + crime_money_mult: 1.1, }); LuminCloaking1.addToFactions(["Slum Snakes", "Tetrads"]); if (augmentationExists(AugmentationNames.LuminCloaking1)) { @@ -1140,7 +1148,10 @@ function initAugmentations() { "Increases the player's agility by 10%
" + "Increases the player's defense by 10%
" + "Increases the amount of money the player gains from crimes by 25%.", - prereqs:[AugmentationNames.LuminCloaking1] + prereqs:[AugmentationNames.LuminCloaking1], + agility_mult: 1.1, + defense_mult: 1.1, + crime_money_mult: 1.25, }); LuminCloaking2.addToFactions(["Slum Snakes", "Tetrads"]); if (augmentationExists(AugmentationNames.LuminCloaking2)) { @@ -1155,7 +1166,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's dexterity by 10%.
" + "Increases the player's dexterity experience gain rate by 15%.
" + - "Increases the amount of money the player gains from crimes by 25%." + "Increases the amount of money the player gains from crimes by 25%.", + dexterity_mult: 1.1, + dexterity_exp_mult: 1.15, + crime_money_mult: 1.25, }); SmartSonar.addToFactions(["Slum Snakes"]); if (augmentationExists(AugmentationNames.SmartSonar)) { @@ -1170,7 +1184,19 @@ function initAugmentations() { "and converting it back into usable power.

" + "This augmentation:
" + "Increases all of the player's stats by 5%.
" + - "Increases the player's experience gain rate for all stats by 10%." + "Increases the player's experience gain rate for all stats by 10%.", + hacking_mult: 1.05, + strength_mult: 1.05, + defense_mult: 1.05, + dexterity_mult: 1.05, + agility_mult: 1.05, + charisma_mult: 1.05, + hacking_exp_mult: 1.1, + strength_exp_mult: 1.1, + defense_exp_mult: 1.1, + dexterity_exp_mult: 1.1, + agility_exp_mult: 1.1, + charisma_exp_mult: 1.1, }); PowerRecirculator.addToFactions(["Tetrads", "The Dark Army", "The Syndicate", "NWO"]); if (augmentationExists(AugmentationNames.PowerRecirculator)) { @@ -1192,7 +1218,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's hacking speed by 10%.
" + "Increases the player's chance of successfully performing a hack by 30%.
" + - "Increases the amount of money the player gains from hacking by 100%." + "Increases the amount of money the player gains from hacking by 100%.", + hacking_speed_mult: 1.1, + hacking_chance_mult: 1.3, + hacking_money_mult: 2, }); QLink.addToFactions(["Illuminati"]); if (augmentationExists(AugmentationNames.QLink)) { @@ -1220,7 +1249,12 @@ function initAugmentations() { "2056.

" + "This augmentation:
" + "Increases all of the player's combat stats by 75%.
" + - "Increases the player's hacking skill by 15%." + "Increases the player's hacking skill by 15%.", + strength_mult: 1.75, + defense_mult: 1.75, + dexterity_mult: 1.75, + agility_mult: 1.75, + hacking_mult: 1.15, }); SPTN97.addToFactions(["The Covenant"]); if (augmentationExists(AugmentationNames.SPTN97)) { @@ -1233,7 +1267,8 @@ function initAugmentations() { name:AugmentationNames.HiveMind, repCost:600e3, moneyCost:1100e6, info:"A brain implant developed by ECorp. They do not reveal what " + "exactly the implant does, but they promise that it will greatly " + - "enhance your abilities." + "enhance your abilities.", + hacking_grow_mult: 3, }); HiveMind.addToFactions(["ECorp"]); if (augmentationExists(AugmentationNames.HiveMind)) { @@ -1250,7 +1285,15 @@ function initAugmentations() { "energy for the body.

" + "This augmentation:
" + "Increases all of the player's combat stats by 35%.
" + - "Increases all of the player's combat stat experience gain rate by 35%." + "Increases all of the player's combat stat experience gain rate by 35%.", + strength_mult: 1.35, + defense_mult: 1.35, + dexterity_mult: 1.35, + agility_mult: 1.35, + strength_exp_mult: 1.35, + defense_exp_mult: 1.35, + dexterity_exp_mult: 1.35, + agility_exp_mult: 1.35, }); CordiARCReactor.addToFactions(["MegaCorp"]); if (augmentationExists(AugmentationNames.CordiARCReactor)) { @@ -1268,7 +1311,11 @@ function initAugmentations() { "Increases the player's charisma by 50%.
" + "Increases the player's charisma experience gain rate by 50%.
" + "Increases the amount of reputation the player gains for a company by 25%.
" + - "Increases the amount of reputation the player gains for a faction by 25%." + "Increases the amount of reputation the player gains for a faction by 25%.", + charisma_mult: 1.5, + charisma_exp_mult: 1.5, + company_rep_mult: 1.25, + faction_rep_mult: 1.25, }); SmartJaw.addToFactions(["Bachman & Associates"]); if (augmentationExists(AugmentationNames.SmartJaw)) { @@ -1283,7 +1330,9 @@ function initAugmentations() { "and integumentary system. The drug permanently modifies the DNA of the " + "body's skin and bone cells, granting them the ability to repair " + "and restructure themselves.

" + - "This augmentation increases the player's strength and defense by 55%." + "This augmentation increases the player's strength and defense by 55%.", + strength_mult: 1.55, + defense_mult: 1.55, }); Neotra.addToFactions(["Blade Industries"]); if (augmentationExists(AugmentationNames.Neotra)) { @@ -1299,7 +1348,19 @@ function initAugmentations() { "improve the body's functionining in all aspects.

" + "This augmentation:
" + "Increases all of the player's stats by 20%.
" + - "Increases the player's experience gain rate for all stats by 15%." + "Increases the player's experience gain rate for all stats by 15%.", + hacking_mult: 1.2, + strength_mult: 1.2, + defense_mult: 1.2, + dexterity_mult: 1.2, + agility_mult: 1.2, + charisma_mult: 1.2, + hacking_exp_mult: 1.15, + strength_exp_mult: 1.15, + defense_exp_mult: 1.15, + dexterity_exp_mult: 1.15, + agility_exp_mult: 1.15, + charisma_exp_mult: 1.15, }); Xanipher.addToFactions(["NWO"]); if (augmentationExists(AugmentationNames.Xanipher)) { @@ -1313,7 +1374,13 @@ function initAugmentations() { info:"The body is genetically re-engineered to maintain a state " + "of negligible senescence, preventing the body from " + "deteriorating with age.

" + - "This augmentation increases all of the player's stats by 20%." + "This augmentation increases all of the player's stats by 20%.", + hacking_mult: 1.2, + strength_mult: 1.2, + defense_mult: 1.2, + dexterity_mult: 1.2, + agility_mult: 1.2, + charisma_mult: 1.2, }); nextSENS.addToFactions(["Clarke Incorporated"]); if (augmentationExists(AugmentationNames.nextSENS)) { @@ -1329,7 +1396,9 @@ function initAugmentations() { "hacking abilities.

" + "This augmentation:
" + "Increases the player's hacking skill by 20%.
" + - "Increases the player's hacking experience gain rate by 25%." + "Increases the player's hacking experience gain rate by 25%.", + hacking_mult: 1.2, + hacking_exp_mult: 1.25, }); OmniTekInfoLoad.addToFactions(["OmniTek Incorporated"]); if (augmentationExists(AugmentationNames.OmniTekInfoLoad)) { @@ -1347,7 +1416,10 @@ function initAugmentations() { "to the body using a skin graft. The result is photosynthetic " + "skin cells, allowing users to generate their own energy " + "and nutrition using solar power.

" + - "This augmentation increases the player's strength, defense, and agility by 40%." + "This augmentation increases the player's strength, defense, and agility by 40%.", + strength_mult: 1.4, + defense_mult: 1.4, + agility_mult: 1.4, }); PhotosyntheticCells.addToFactions(["KuaiGong International"]); if (augmentationExists(AugmentationNames.PhotosyntheticCells)) { @@ -1366,7 +1438,11 @@ function initAugmentations() { "Increases the player's hacking experience gain rate by 20%.
" + "Increases the player's chance of successfully performing a hack by 10%.
" + "Increases the player's hacking speed by 5%.
" + - "Lets the player start with the FTPCrack.exe and relaySMTP.exe programs after a reset." + "Lets the player start with the FTPCrack.exe and relaySMTP.exe programs after a reset.", + hacking_mult: 1.15, + hacking_exp_mult: 1.2, + hacking_chance_mult: 1.1, + hacking_speed_mult: 1.05, }); Neurolink.addToFactions(["BitRunners"]); if (augmentationExists(AugmentationNames.Neurolink)) { @@ -1385,7 +1461,12 @@ function initAugmentations() { "Increases the player's strength and dexterity by 15%.
" + "Increases the player's hacking skill by 10%.
" + "Increases the player's hacking speed by 2%.
" + - "Increases the amount of money the player gains from hacking by 10%." + "Increases the amount of money the player gains from hacking by 10%.", + strength_mult: 1.15, + dexterity_mult: 1.15, + hacking_mult: 1.1, + hacking_speed_mult: 1.02, + hacking_money_mult: 1.1, }); TheBlackHand.addToFactions(["The Black Hand"]); if (augmentationExists(AugmentationNames.TheBlackHand)) { @@ -1401,7 +1482,9 @@ function initAugmentations() { "cortex and improves cognitive abilities.

" + "This augmentation:
" + "Improves the player's hacking skill by 8%.
" + - "Improves the player's hacking experience gain rate by 15%." + "Improves the player's hacking experience gain rate by 15%.", + hacking_mult: 1.08, + hacking_exp_mult: 1.15, }); CRTX42AA.addToFactions(["NiteSec"]); if (augmentationExists(AugmentationNames.CRTX42AA)) { @@ -1415,7 +1498,8 @@ function initAugmentations() { info:"A drug that genetically modifies the neurons in the brain. " + "The result is that these neurons never die and continuously " + "regenerate and strengthen themselves.

" + - "This augmentation increases the player's hacking experience gain rate by 40%." + "This augmentation increases the player's hacking experience gain rate by 40%.", + hacking_exp_mult: 1.4, }); Neuregen.addToFactions(["Chongqing"]); if (augmentationExists(AugmentationNames.Neuregen)) { @@ -1447,7 +1531,11 @@ function initAugmentations() { "across the body. The device is powered by the body's naturally wasted " + "energy in the form of heat.

" + "This augmentation:
" + - "Increases the player's experience gain rate for all combat stats by 20%." + "Increases the player's experience gain rate for all combat stats by 20%.", + strength_exp_mult: 1.2, + defense_exp_mult: 1.2, + dexterity_exp_mult: 1.2, + agility_exp_mult: 1.2, }); NutriGen.addToFactions(["New Tokyo"]); if (augmentationExists(AugmentationNames.NutriGen)) { @@ -1467,7 +1555,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's crime success rate by 25%.
" + "Increases the amount of money the player gains from crimes by 10%.
" + - "Increases the player's dexterity by 10%." + "Increases the player's dexterity by 10%.", + crime_success_mult: 1.25, + crime_money_mult: 1.1, + dexterity_mult: 1.1, }); INFRARet.addToFactions(["Ishima"]); if (augmentationExists(AugmentationNames.INFRARet)) { @@ -1481,7 +1572,8 @@ function initAugmentations() { info:"A synthetic skin is grafted onto the body. The skin consists of " + "millions of nanobots capable of projecting high-density muon beams, " + "creating an energy barrier around the user.

" + - "This augmentation increases the player's defense by 40%." + "This augmentation increases the player's defense by 40%.", + defense_mult: 1.4, }); DermaForce.addToFactions(["Volhaven"]); if (augmentationExists(AugmentationNames.DermaForce)) { @@ -1499,7 +1591,11 @@ function initAugmentations() { "Increases the player's strength and defense by 40%.
" + "Increases the player's crime success rate by 10%.
" + "Increases the amount of money the player gains from crimes by 30%.", - prereqs:[AugmentationNames.BrachiBlades] + prereqs:[AugmentationNames.BrachiBlades], + strength_mult: 1.4, + defense_mult: 1.4, + crime_success_mult: 1.1, + crime_money_mult: 1.3, }); GrapheneBrachiBlades.addToFactions(["Speakers for the Dead"]); if (augmentationExists(AugmentationNames.GrapheneBrachiBlades)) { @@ -1514,7 +1610,9 @@ function initAugmentations() { "prosthetic arms with an advanced graphene material " + "to make them much stronger and lighter.

" + "This augmentation increases the player's strength and dexterity by 85%.", - prereqs:[AugmentationNames.BionicArms] + prereqs:[AugmentationNames.BionicArms], + strength_mult: 1.85, + dexterity_mult: 1.85, }); GrapheneBionicArms.addToFactions(["The Dark Army"]); if (augmentationExists(AugmentationNames.GrapheneBionicArms)) { @@ -1529,7 +1627,11 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's strength and defense by 15%.
" + "Increases the player's crime success rate by 10%.
" + - "Increases the amount of money the player gains from crimes by 15%." + "Increases the amount of money the player gains from crimes by 15%.", + strength_mult: 1.15, + defense_mult: 1.15, + crime_success_mult: 1.1, + crime_money_mult: 1.15, }); BrachiBlades.addToFactions(["The Syndicate"]); if (augmentationExists(AugmentationNames.BrachiBlades)) { @@ -1542,7 +1644,9 @@ function initAugmentations() { name:AugmentationNames.BionicArms, repCost:25e3, moneyCost:55e6, info:"Cybernetic arms created from plasteel and carbon fibers that completely replace " + "the user's organic arms.

" + - "This augmentation increases the user's strength and dexterity by 30%." + "This augmentation increases the user's strength and dexterity by 30%.", + strength_mult: 1.3, + dexterity_mult: 1.3, }); BionicArms.addToFactions(["Tetrads"]); if (augmentationExists(AugmentationNames.BionicArms)) { @@ -1558,7 +1662,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the amount of money the player earns at a company by 10%.
" + "Increases the amount of reputation the player gains when working for a " + - "company or faction by 15%." + "company or faction by 15%.", + work_money_mult: 1.1, + company_rep_mult: 1.15, + faction_rep_mult: 1.15, }); SNA.addToFactions(["Tian Di Hui"]); if (augmentationExists(AugmentationNames.SNA)) { @@ -1594,7 +1701,9 @@ function initAugmentations() { "AR HUD and assist the user in field missions.

" + "This augmentation:
" + "Increases the player's success chance in Bladeburner contracts/operations by 3%.
" + - "Increases the player's dexterity by 5%." + "Increases the player's dexterity by 5%.", + bladeburner_success_chance_mult: 1.03, + dexterity_mult: 1.05, }); EsperEyewear.addToFactions([BladeburnersFactionName]); resetAugmentation(EsperEyewear); @@ -1608,7 +1717,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's sucess chance in Bladeburner contracts/operations by 3%.
" + "Increases the player's effectiveness in Bladeburner Field Analysis by 5%.
" + - "Increases the player's Bladeburner stamina gain rate by 2%." + "Increases the player's Bladeburner stamina gain rate by 2%.", + bladeburner_success_chance_mult: 1.03, + bladeburner_analysis_mult: 1.05, + bladeburner_stamina_gain_mult: 1.02, }); EMS4Recombination.addToFactions([BladeburnersFactionName]); resetAugmentation(EMS4Recombination); @@ -1622,7 +1734,11 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's defense by 5%.
" + "Increases the player's strength and dexterity by 5%.
" + - "Increases the player's success chance in Bladeburner contracts/operations by 4%." + "Increases the player's success chance in Bladeburner contracts/operations by 4%.", + defense_mult: 1.05, + strength_mult: 1.05, + dexterity_mult: 1.05, + bladeburner_success_chance_mult: 1.04, }); OrionShoulder.addToFactions([BladeburnersFactionName]); resetAugmentation(OrionShoulder); @@ -1636,7 +1752,8 @@ function initAugmentations() { "it can also be effective against non-augmented enemies due to its high temperature " + "and concussive force.

" + "This augmentation:
" + - "Increases the player's success chance in Bladeburner contracts/operations by 6%." + "Increases the player's success chance in Bladeburner contracts/operations by 6%.", + bladeburner_success_chance_mult: 1.06, }); HyperionV1.addToFactions([BladeburnersFactionName]); resetAugmentation(HyperionV1); @@ -1649,7 +1766,8 @@ function initAugmentations() { "higher velocity than the V1 model.

" + "This augmentation:
" + "Increases the player's success chance in Bladeburner contracts/operations by 8%.", - prereqs:[AugmentationNames.HyperionV1] + prereqs:[AugmentationNames.HyperionV1], + bladeburner_success_chance_mult: 1.08, }); HyperionV2.addToFactions([BladeburnersFactionName]); resetAugmentation(HyperionV2); @@ -1662,7 +1780,12 @@ function initAugmentations() { "create super soldiers.

" + "This augmentation:
" + "Increases all of the player's combat stats by 7%.
" + - "Increases the player's Bladeburner stamina gain rate by 5%.
" + "Increases the player's Bladeburner stamina gain rate by 5%.
", + strength_mult: 1.07, + defense_mult: 1.07, + dexterity_mult: 1.07, + agility_mult: 1.07, + bladeburner_stamina_gain_mult: 1.05, }); GolemSerum.addToFactions([BladeburnersFactionName]); resetAugmentation(GolemSerum); @@ -1674,7 +1797,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's effectiveness in Bladeburner Field Analysis by 10%.
" + "Increases the player's success chance in Bladeburner contracts/operations by 4%.
" + - "Increases the player's dexterity experience gain rate by 10%." + "Increases the player's dexterity experience gain rate by 10%.", + dexterity_exp_mult: 1.1, + bladeburner_analysis_mult: 1.1, + bladeburner_success_chance_mult: 1.04, }); VangelisVirus.addToFactions([BladeburnersFactionName]); resetAugmentation(VangelisVirus); @@ -1689,7 +1815,11 @@ function initAugmentations() { "Increases the player's effectiveness in Bladeburner Field Analysis by 15%.
" + "Increases the player's defense and dexterity experience gain rate by 10%.
" + "Increases the player's success chance in Bladeburner contracts/operations by 5%.", - prereqs:[AugmentationNames.VangelisVirus] + prereqs:[AugmentationNames.VangelisVirus], + defense_exp_mult: 1.1, + dexterity_exp_mult: 1.1, + bladeburner_analysis_mult: 1.15, + bladeburner_success_chance_mult: 1.05, }); VangelisVirus3.addToFactions([BladeburnersFactionName]); resetAugmentation(VangelisVirus3); @@ -1702,7 +1832,12 @@ function initAugmentations() { "durability.

" + "This augmentation:
" + "Increases the player's experience gain rate for all combat stats by 5%.
" + - "Increases the player's Bladeburner max stamina by 10%." + "Increases the player's Bladeburner max stamina by 10%.", + strength_exp_mult: 1.05, + defense_exp_mult: 1.05, + dexterity_exp_mult: 1.05, + agility_exp_mult: 1.05, + bladeburner_max_stamina_mult: 1.1, }); INTERLINKED.addToFactions([BladeburnersFactionName]); resetAugmentation(INTERLINKED); @@ -1716,7 +1851,10 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's agility by 5%.
" + "Increases the player's Bladeburner max stamina by 5%.
" + - "Increases the player's Bladeburner stamina gain rate by 5%.
" + "Increases the player's Bladeburner stamina gain rate by 5%.
", + agility_mult: 1.05, + bladeburner_max_stamina_mult: 1.05, + bladeburner_stamina_gain_mult: 1.05, }); BladeRunner.addToFactions([BladeburnersFactionName]); resetAugmentation(BladeRunner); @@ -1731,6 +1869,12 @@ function initAugmentations() { "Increases all of the player's combat stats by 4%.
" + "Increases the player's Bladeburner stamina gain rate by 2%.
" + "Increases the player's success chance in Bladeburner contracts/operations by 3%.", + strength_mult: 1.04, + defense_mult: 1.04, + dexterity_mult: 1.04, + agility_mult: 1.04, + bladeburner_stamina_gain_mult: 1.02, + bladeburner_success_chance_mult: 1.03, }); BladeArmor.addToFactions([BladeburnersFactionName]); resetAugmentation(BladeArmor); @@ -1743,7 +1887,10 @@ function initAugmentations() { "Increases the player's success chance in Bladeburner contracts/operations by 5%.
" + "Increases the player's Bladeburner stamina gain rate by 2%.
" + "Increases the player's Bladeburner max stamina by 5%.", - prereqs:[AugmentationNames.BladeArmor] + prereqs:[AugmentationNames.BladeArmor], + bladeburner_success_chance_mult: 1.05, + bladeburner_stamina_gain_mult: 1.02, + bladeburner_max_stamina_mult: 1.05, }); BladeArmorPowerCells.addToFactions([BladeburnersFactionName]); resetAugmentation(BladeArmorPowerCells); @@ -1755,7 +1902,9 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's defense by 5%.
" + "Increases the player's success chance in Bladeburner contracts/operations by 6%.", - prereqs:[AugmentationNames.BladeArmor] + prereqs:[AugmentationNames.BladeArmor], + defense_mult: 1.05, + bladeburner_success_chance_mult: 1.06, }); BladeArmorEnergyShielding.addToFactions([BladeburnersFactionName]); resetAugmentation(BladeArmorEnergyShielding); @@ -1767,7 +1916,8 @@ function initAugmentations() { "threats while keeping casualties to a minimum.

" + "This augmentation:
" + "Increases the player's success chance in Bladeburner contracts/operations by 8%.", - prereqs:[AugmentationNames.BladeArmor] + prereqs:[AugmentationNames.BladeArmor], + bladeburner_success_chance_mult: 1.08, }); BladeArmorUnibeam.addToFactions([BladeburnersFactionName]); resetAugmentation(BladeArmorUnibeam); @@ -1780,7 +1930,8 @@ function initAugmentations() { "2000MW.

" + "This augmentation:
" + "Increases the player's success chance in Bladeburner contracts/operations by 10%.", - prereqs:[AugmentationNames.BladeArmorUnibeam] + prereqs:[AugmentationNames.BladeArmorUnibeam], + bladeburner_success_chance_mult: 1.1, }); BladeArmorOmnibeam.addToFactions([BladeburnersFactionName]); resetAugmentation(BladeArmorOmnibeam); @@ -1793,7 +1944,9 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's effectiveness in Bladeburner Field Analysis by 15%.
" + "Increases the player's success chance in Bladeburner contracts/operations by 2%.", - prereqs:[AugmentationNames.BladeArmor] + prereqs:[AugmentationNames.BladeArmor], + bladeburner_analysis_mult: 1.15, + bladeburner_success_chance_mult: 1.02, }); BladeArmorIPU.addToFactions([BladeburnersFactionName]); resetAugmentation(BladeArmorIPU); @@ -1837,566 +1990,27 @@ function resetAugmentation(newAugObject) { function applyAugmentation(aug, reapply=false) { Augmentations[aug.name].owned = true; - switch(aug.name) { - //Combat stat augmentations - case AugmentationNames.Targeting1: - Player.dexterity_mult *= 1.10; - break; - case AugmentationNames.Targeting2: - Player.dexterity_mult *= 1.20; - break; - case AugmentationNames.Targeting3: - Player.dexterity_mult *= 1.30; - break; - case AugmentationNames.SyntheticHeart: //High level - Player.agility_mult *= 1.5; - Player.strength_mult *= 1.5; - break; - case AugmentationNames.SynfibrilMuscle: //Medium-high level - Player.strength_mult *= 1.3; - Player.defense_mult *= 1.3; - break; - case AugmentationNames.CombatRib1: - Player.strength_mult *= 1.1; - Player.defense_mult *= 1.1; - break; - case AugmentationNames.CombatRib2: - Player.strength_mult *= 1.14; - Player.defense_mult *= 1.14; - break; - case AugmentationNames.CombatRib3: - Player.strength_mult *= 1.18; - Player.defense_mult *= 1.18; - break; - case AugmentationNames.NanofiberWeave: //Med level - Player.strength_mult *= 1.2; - Player.defense_mult *= 1.2; - break; - case AugmentationNames.SubdermalArmor: //High level - Player.defense_mult *= 2.2; - break; - case AugmentationNames.WiredReflexes: //Low level - Player.agility_mult *= 1.05; - Player.dexterity_mult *= 1.05; - break; - case AugmentationNames.GrapheneBoneLacings: //High level - Player.strength_mult *= 1.7; - Player.defense_mult *= 1.7; - break; - case AugmentationNames.BionicSpine: //Med level - Player.strength_mult *= 1.15; - Player.defense_mult *= 1.15; - Player.agility_mult *= 1.15; - Player.dexterity_mult *= 1.15; - break; - case AugmentationNames.GrapheneBionicSpine: //High level - Player.strength_mult *= 1.6; - Player.defense_mult *= 1.6; - Player.agility_mult *= 1.6; - Player.dexterity_mult *= 1.6; - break; - case AugmentationNames.BionicLegs: //Med level - Player.agility_mult *= 1.6; - break; - case AugmentationNames.GrapheneBionicLegs: //High level - Player.agility_mult *= 2.5; - break; - //Labor stats augmentations - case AugmentationNames.EnhancedSocialInteractionImplant: //Med-high level - Player.charisma_mult *= 1.6; - Player.charisma_exp_mult *= 1.6; - break; - case AugmentationNames.TITN41Injection: - Player.charisma_mult *= 1.15; - Player.charisma_exp_mult *= 1.15; - break; - case AugmentationNames.SpeechProcessor: //Med level - Player.charisma_mult *= 1.2; - break; + // Apply multipliers + for (const mult in aug.mults) { + if (Player[mult] == null) { + console.warn(`Augmentation has unrecognized multiplier property: ${mult}`); + } else { + Player[mult] *= aug.mults[mult]; + } + } - //Hacking augmentations - case AugmentationNames.BitWire: - Player.hacking_mult *= 1.05; - break; - case AugmentationNames.ArtificialBioNeuralNetwork: //Med level - Player.hacking_speed_mult *= 1.03; - Player.hacking_money_mult *= 1.15; - Player.hacking_mult *= 1.12; - break; - case AugmentationNames.ArtificialSynapticPotentiation: //Med level - Player.hacking_speed_mult *= 1.02; - Player.hacking_chance_mult *= 1.05; - Player.hacking_exp_mult *= 1.05; - break; - case AugmentationNames.EnhancedMyelinSheathing: //Med level - Player.hacking_speed_mult *= 1.03; - Player.hacking_exp_mult *= 1.1; - Player.hacking_mult *= 1.08; - break; - case AugmentationNames.SynapticEnhancement: //Low Level - Player.hacking_speed_mult *= 1.03; - break; - case AugmentationNames.NeuralRetentionEnhancement: //Med level - Player.hacking_exp_mult *= 1.25; - break; - case AugmentationNames.DataJack: //Med low level - Player.hacking_money_mult *= 1.25; - break; - case AugmentationNames.ENM: //Medium level - Player.hacking_mult *= 1.08; - break; - case AugmentationNames.ENMCore: //Medium level - Player.hacking_speed_mult *= 1.03; - Player.hacking_money_mult *= 1.1; - Player.hacking_chance_mult *= 1.03; - Player.hacking_exp_mult *= 1.07; - Player.hacking_mult *= 1.07; - break; - case AugmentationNames.ENMCoreV2: //Medium high level - Player.hacking_speed_mult *= 1.05; - Player.hacking_money_mult *= 1.3; - Player.hacking_chance_mult *= 1.05; - Player.hacking_exp_mult *= 1.15; - Player.hacking_mult *= 1.08; - break; - case AugmentationNames.ENMCoreV3: //High level - Player.hacking_speed_mult *= 1.05; - Player.hacking_money_mult *= 1.4; - Player.hacking_chance_mult *= 1.1; - Player.hacking_exp_mult *= 1.25; - Player.hacking_mult *= 1.1; - break; - case AugmentationNames.ENMAnalyzeEngine: //High level - Player.hacking_speed_mult *= 1.1; - break; - case AugmentationNames.ENMDMA: //High level - Player.hacking_money_mult *= 1.4; - Player.hacking_chance_mult *= 1.2; - break; - case AugmentationNames.Neuralstimulator: //Medium Level - Player.hacking_speed_mult *= 1.02; - Player.hacking_chance_mult *= 1.1; - Player.hacking_exp_mult *= 1.12; - break; - case AugmentationNames.NeuralAccelerator: - Player.hacking_mult *= 1.1; - Player.hacking_exp_mult *= 1.15; - Player.hacking_money_mult *= 1.2; - break; - case AugmentationNames.CranialSignalProcessorsG1: - Player.hacking_speed_mult *= 1.01; - Player.hacking_mult *= 1.05; - break; - case AugmentationNames.CranialSignalProcessorsG2: - Player.hacking_speed_mult *= 1.02; - Player.hacking_chance_mult *= 1.05; - Player.hacking_mult *= 1.07; - break; - case AugmentationNames.CranialSignalProcessorsG3: - Player.hacking_speed_mult *= 1.02; - Player.hacking_money_mult *= 1.15; - Player.hacking_mult *= 1.09; - break; - case AugmentationNames.CranialSignalProcessorsG4: - Player.hacking_speed_mult *= 1.02; - Player.hacking_money_mult *= 1.2; - Player.hacking_grow_mult *= 1.25; - break; - case AugmentationNames.CranialSignalProcessorsG5: - Player.hacking_mult *= 1.3; - Player.hacking_money_mult *= 1.25; - Player.hacking_grow_mult *= 1.75; - break; - case AugmentationNames.NeuronalDensification: - Player.hacking_mult *= 1.15; - Player.hacking_exp_mult *= 1.1; - Player.hacking_speed_mult *= 1.03; - break; - - //Work augmentations - case AugmentationNames.NuoptimalInjectorImplant: //Low medium level - Player.company_rep_mult *= 1.2; - break; - case AugmentationNames.SpeechEnhancement: //Low level - Player.company_rep_mult *= 1.1; - Player.charisma_mult *= 1.1; - break; - case AugmentationNames.FocusWire: //Med level - Player.hacking_exp_mult *= 1.05; - Player.strength_exp_mult *= 1.05; - Player.defense_exp_mult *= 1.05; - Player.dexterity_exp_mult *= 1.05; - Player.agility_exp_mult *= 1.05; - Player.charisma_exp_mult *= 1.05; - Player.company_rep_mult *= 1.1; - Player.work_money_mult *= 1.2; - break; - case AugmentationNames.PCDNI: //Med level - Player.company_rep_mult *= 1.3; - Player.hacking_mult *= 1.08; - break; - case AugmentationNames.PCDNIOptimizer: //High level - Player.company_rep_mult *= 1.75; - Player.hacking_mult *= 1.1; - break; - case AugmentationNames.PCDNINeuralNetwork: //High level - Player.company_rep_mult *= 2; - Player.hacking_mult *= 1.1; - Player.hacking_speed_mult *= 1.05; - break; - case AugmentationNames.ADRPheromone1: - Player.company_rep_mult *= 1.1; - Player.faction_rep_mult *= 1.1; - break; - case AugmentationNames.ADRPheromone2: - Player.company_rep_mult *= 1.2; - Player.faction_rep_mult *= 1.2; - break; - - //Hacknet Node Augmentations - case AugmentationNames.HacknetNodeCPUUpload: - Player.hacknet_node_money_mult *= 1.15; - Player.hacknet_node_purchase_cost_mult *= 0.85; - break; - case AugmentationNames.HacknetNodeCacheUpload: - Player.hacknet_node_money_mult *= 1.10; - Player.hacknet_node_level_cost_mult *= 0.85; - break; - case AugmentationNames.HacknetNodeNICUpload: - Player.hacknet_node_money_mult *= 1.1; - Player.hacknet_node_purchase_cost_mult *= 0.9; - break; - case AugmentationNames.HacknetNodeKernelDNI: - Player.hacknet_node_money_mult *= 1.25; - break; - case AugmentationNames.HacknetNodeCoreDNI: - Player.hacknet_node_money_mult *= 1.45; - break; - - //Misc augmentations - case AugmentationNames.NeuroFluxGovernor: - Player.hacking_chance_mult *= 1.01; - Player.hacking_speed_mult *= 1.01; - Player.hacking_money_mult *= 1.01; - Player.hacking_grow_mult *= 1.01; - Player.hacking_mult *= 1.01; - - Player.strength_mult *= 1.01; - Player.defense_mult *= 1.01; - Player.dexterity_mult *= 1.01; - Player.agility_mult *= 1.01; - Player.charisma_mult *= 1.01; - - Player.hacking_exp_mult *= 1.01; - Player.strength_exp_mult *= 1.01; - Player.defense_exp_mult *= 1.01; - Player.dexterity_exp_mult *= 1.01; - Player.agility_exp_mult *= 1.01; - Player.charisma_exp_mult *= 1.01; - - Player.company_rep_mult *= 1.01; - Player.faction_rep_mult *= 1.01; - - Player.crime_money_mult *= 1.01; - Player.crime_success_mult *= 1.01; - - Player.hacknet_node_money_mult *= 1.01; - Player.hacknet_node_purchase_cost_mult *= 0.99; - Player.hacknet_node_ram_cost_mult *= 0.99; - Player.hacknet_node_core_cost_mult *= 0.99; - Player.hacknet_node_level_cost_mult *= 0.99; - - Player.work_money_mult *= 1.01; - - if (!reapply) { - Augmentations[aug.name].level = aug.level; - for (var i = 0; i < Player.augmentations.length; ++i) { - if (Player.augmentations[i].name == AugmentationNames.NeuroFluxGovernor) { - Player.augmentations[i].level = aug.level; - break; - } + // Special logic for NeuroFlux Governor + if (aug.name === AugmentationNames.NeuroFluxGovernor) { + if (!reapply) { + Augmentations[aug.name].level = aug.level; + for (var i = 0; i < Player.augmentations.length; ++i) { + if (Player.augmentations[i].name == AugmentationNames.NeuroFluxGovernor) { + Player.augmentations[i].level = aug.level; + break; } } - break; - case AugmentationNames.Neurotrainer1: //Low Level - Player.hacking_exp_mult *= 1.1; - Player.strength_exp_mult *= 1.1; - Player.defense_exp_mult *= 1.1; - Player.dexterity_exp_mult *= 1.1; - Player.agility_exp_mult *= 1.1; - Player.charisma_exp_mult *= 1.1; - break; - case AugmentationNames.Neurotrainer2: //Medium level - Player.hacking_exp_mult *= 1.15; - Player.strength_exp_mult *= 1.15; - Player.defense_exp_mult *= 1.15; - Player.dexterity_exp_mult *= 1.15; - Player.agility_exp_mult *= 1.15; - Player.charisma_exp_mult *= 1.15; - break; - case AugmentationNames.Neurotrainer3: //High Level - Player.hacking_exp_mult *= 1.2; - Player.strength_exp_mult *= 1.2; - Player.defense_exp_mult *= 1.2; - Player.dexterity_exp_mult *= 1.2; - Player.agility_exp_mult *= 1.2; - Player.charisma_exp_mult *= 1.2; - break; - case AugmentationNames.Hypersight: //Medium high level - Player.dexterity_mult *= 1.4; - Player.hacking_speed_mult *= 1.03; - Player.hacking_money_mult *= 1.1; - break; - case AugmentationNames.LuminCloaking1: - Player.agility_mult *= 1.05; - Player.crime_money_mult *= 1.1; - break; - case AugmentationNames.LuminCloaking2: - Player.agility_mult *= 1.1; - Player.defense_mult *= 1.1; - Player.crime_money_mult *= 1.25; - break; - case AugmentationNames.HemoRecirculator: - Player.strength_mult *= 1.08; - Player.defense_mult *= 1.08; - Player.agility_mult *= 1.08; - Player.dexterity_mult *= 1.08; - break; - case AugmentationNames.SmartSonar: - Player.dexterity_mult *= 1.1; - Player.dexterity_exp_mult *= 1.15; - Player.crime_money_mult *= 1.25; - break; - case AugmentationNames.PowerRecirculator: - Player.hacking_mult *= 1.05; - Player.strength_mult *= 1.05; - Player.defense_mult *= 1.05; - Player.dexterity_mult *= 1.05; - Player.agility_mult *= 1.05; - Player.charisma_mult *= 1.05; - Player.hacking_exp_mult *= 1.1; - Player.strength_exp_mult *= 1.1; - Player.defense_exp_mult *= 1.1; - Player.dexterity_exp_mult *= 1.1; - Player.agility_exp_mult *= 1.1; - Player.charisma_exp_mult *= 1.1; - break; - //Unique augmentations (for factions) - case AugmentationNames.QLink: - Player.hacking_speed_mult *= 1.1; - Player.hacking_chance_mult *= 1.3; - Player.hacking_money_mult *= 2; - break; - case AugmentationNames.TheRedPill: - break; - case AugmentationNames.SPTN97: - Player.strength_mult *= 1.75; - Player.defense_mult *= 1.75; - Player.dexterity_mult *= 1.75; - Player.agility_mult *= 1.75; - Player.hacking_mult *= 1.15; - break; - case AugmentationNames.HiveMind: - Player.hacking_grow_mult *= 3; - break; - case AugmentationNames.CordiARCReactor: - Player.strength_mult *= 1.35; - Player.defense_mult *= 1.35; - Player.dexterity_mult *= 1.35; - Player.agility_mult *= 1.35; - Player.strength_exp_mult *= 1.35; - Player.defense_exp_mult *= 1.35; - Player.dexterity_exp_mult *= 1.35; - Player.agility_exp_mult *= 1.35; - break; - case AugmentationNames.SmartJaw: - Player.charisma_mult *= 1.5; - Player.charisma_exp_mult *= 1.5; - Player.company_rep_mult *= 1.25; - Player.faction_rep_mult *= 1.25; - break; - case AugmentationNames.Neotra: - Player.strength_mult *= 1.55; - Player.defense_mult *= 1.55; - break; - case AugmentationNames.Xanipher: - Player.hacking_mult *= 1.2; - Player.strength_mult *= 1.2; - Player.defense_mult *= 1.2; - Player.dexterity_mult *= 1.2; - Player.agility_mult *= 1.2; - Player.charisma_mult *= 1.2; - Player.hacking_exp_mult *= 1.15; - Player.strength_exp_mult *= 1.15; - Player.defense_exp_mult *= 1.15; - Player.dexterity_exp_mult *= 1.15; - Player.agility_exp_mult *= 1.15; - Player.charisma_exp_mult *= 1.15; - break; - case AugmentationNames.nextSENS: - Player.hacking_mult *= 1.2; - Player.strength_mult *= 1.2; - Player.defense_mult *= 1.2; - Player.dexterity_mult *= 1.2; - Player.agility_mult *= 1.2; - Player.charisma_mult *= 1.2; - break; - case AugmentationNames.OmniTekInfoLoad: - Player.hacking_mult *= 1.2; - Player.hacking_exp_mult *= 1.25; - break; - case AugmentationNames.PhotosyntheticCells: - Player.strength_mult *= 1.4; - Player.defense_mult *= 1.4; - Player.agility_mult *= 1.4; - break; - case AugmentationNames.Neurolink: - Player.hacking_mult *= 1.15; - Player.hacking_exp_mult *= 1.2; - Player.hacking_chance_mult *= 1.1; - Player.hacking_speed_mult *= 1.05; - break; - case AugmentationNames.TheBlackHand: - Player.strength_mult *= 1.15; - Player.dexterity_mult *= 1.15; - Player.hacking_mult *= 1.1; - Player.hacking_speed_mult *= 1.02; - Player.hacking_money_mult *= 1.1; - break; - case AugmentationNames.CRTX42AA: - Player.hacking_mult *= 1.08; - Player.hacking_exp_mult *= 1.15; - break; - case AugmentationNames.Neuregen: - Player.hacking_exp_mult *= 1.4; - break; - case AugmentationNames.CashRoot: - break; - case AugmentationNames.NutriGen: - Player.strength_exp_mult *= 1.2; - Player.defense_exp_mult *= 1.2; - Player.dexterity_exp_mult *= 1.2; - Player.agility_exp_mult *= 1.2; - break; - case AugmentationNames.INFRARet: - Player.crime_success_mult *= 1.25; - Player.crime_money_mult *= 1.1; - Player.dexterity_mult *= 1.1; - break; - case AugmentationNames.DermaForce: - Player.defense_mult *= 1.4; - break; - case AugmentationNames.GrapheneBrachiBlades: - Player.strength_mult *= 1.4; - Player.defense_mult *= 1.4; - Player.crime_success_mult *= 1.1; - Player.crime_money_mult *= 1.3; - break; - case AugmentationNames.GrapheneBionicArms: - Player.strength_mult *= 1.85; - Player.dexterity_mult *= 1.85; - break; - case AugmentationNames.BrachiBlades: - Player.strength_mult *= 1.15; - Player.defense_mult *= 1.15; - Player.crime_success_mult *= 1.1; - Player.crime_money_mult *= 1.15; - break; - case AugmentationNames.BionicArms: - Player.strength_mult *= 1.3; - Player.dexterity_mult *= 1.3; - break; - case AugmentationNames.SNA: - Player.work_money_mult *= 1.1; - Player.company_rep_mult *= 1.15; - Player.faction_rep_mult *= 1.15; - break; - - //Bladeburner augmentations - case AugmentationNames.EsperEyewear: - Player.bladeburner_success_chance_mult *= 1.03; - Player.dexterity_mult *= 1.05; - break; - case AugmentationNames.EMS4Recombination: - Player.bladeburner_success_chance_mult *= 1.03; - Player.bladeburner_analysis_mult *= 1.05; - Player.bladeburner_stamina_gain_mult *= 1.02; - break; - case AugmentationNames.OrionShoulder: - Player.defense_mult *= 1.05; - Player.strength_mult *= 1.05; - Player.dexterity_mult *= 1.05; - Player.bladeburner_success_chance_mult *= 1.04; - break; - case AugmentationNames.HyperionV1: - Player.bladeburner_success_chance_mult *= 1.06; - break; - case AugmentationNames.HyperionV2: - Player.bladeburner_success_chance_mult *= 1.08; - break; - case AugmentationNames.GolemSerum: - Player.strength_mult *= 1.07; - Player.defense_mult *= 1.07; - Player.dexterity_mult *= 1.07; - Player.agility_mult *= 1.07; - Player.bladeburner_stamina_gain_mult *= 1.05; - break; - case AugmentationNames.VangelisVirus: - Player.dexterity_exp_mult *= 1.1; - Player.bladeburner_analysis_mult *= 1.1; - Player.bladeburner_success_chance_mult *= 1.04; - break; - case AugmentationNames.VangelisVirus3: - Player.defense_exp_mult *= 1.1; - Player.dexterity_exp_mult *= 1.1; - Player.bladeburner_analysis_mult *= 1.15; - Player.bladeburner_success_chance_mult *= 1.05; - break; - case AugmentationNames.INTERLINKED: - Player.strength_exp_mult *= 1.05; - Player.defense_exp_mult *= 1.05; - Player.dexterity_exp_mult *= 1.05; - Player.agility_exp_mult *= 1.05; - Player.bladeburner_max_stamina_mult *= 1.1; - break; - case AugmentationNames.BladeRunner: - Player.agility_mult *= 1.05; - Player.bladeburner_max_stamina_mult *= 1.05; - Player.bladeburner_stamina_gain_mult *= 1.05; - break; - case AugmentationNames.BladeArmor: - Player.strength_mult *= 1.04; - Player.defense_mult *= 1.04; - Player.dexterity_mult *= 1.04; - Player.agility_mult *= 1.04; - Player.bladeburner_stamina_gain_mult *= 1.02; - Player.bladeburner_success_chance_mult *= 1.03; - break; - case AugmentationNames.BladeArmorPowerCells: - Player.bladeburner_success_chance_mult *= 1.05; - Player.bladeburner_stamina_gain_mult *= 1.02; - Player.bladeburner_max_stamina_mult *= 1.05; - break; - case AugmentationNames.BladeArmorEnergyShielding: - Player.defense_mult *= 1.05; - Player.bladeburner_success_chance_mult *= 1.06; - break; - case AugmentationNames.BladeArmorUnibeam: - Player.bladeburner_success_chance_mult *= 1.08; - break; - case AugmentationNames.BladeArmorOmnibeam: - Player.bladeburner_success_chance_mult *= 1.1; - break; - case AugmentationNames.BladeArmorIPU: - Player.bladeburner_analysis_mult *= 1.15; - Player.bladeburner_success_chance_mult *= 1.02; - break; - case AugmentationNames.BladesSimulacrum: //No multiplier effect - break; - default: - throw new Error("ERROR: No such augmentation!"); - return; + } } if (aug.name === AugmentationNames.NeuroFluxGovernor) { @@ -2408,17 +2022,13 @@ function applyAugmentation(aug, reapply=false) { } } + // Push onto Player's Augmentation list if (!reapply) { var ownedAug = new PlayerOwnedAugmentation(aug.name); Player.augmentations.push(ownedAug); } } -function PlayerOwnedAugmentation(name) { - this.name = name; - this.level = 1; -} - function installAugmentations(cbScript=null) { if (Player.queuedAugmentations.length == 0) { dialogBoxCreate("You have not purchased any Augmentations to install!"); @@ -2621,7 +2231,7 @@ function displayAugmentationsContent(contentEl) { contentEl.appendChild(createElement("p", { display: "block", innerHTML: - `

Total Multipliers:
` + + `

Total Multipliers:
` + 'Hacking Chance multiplier: ' + formatNumber(Player.hacking_chance_mult * 100, 2) + '%
' + 'Hacking Speed multiplier: ' + formatNumber(Player.hacking_speed_mult * 100, 2) + '%
' + 'Hacking Money multiplier: ' + formatNumber(Player.hacking_money_mult * 100, 2) + '%
' + @@ -2690,6 +2300,6 @@ function displaySourceFiles(listElement, sourceFiles) { } -export {AugmentationNames, Augmentations, PlayerOwnedAugmentation, installAugmentations, - initAugmentations, applyAugmentation, augmentationExists, Augmentation, +export {installAugmentations, + initAugmentations, applyAugmentation, augmentationExists, displayAugmentationsContent}; diff --git a/src/Augmentation/Augmentations.ts b/src/Augmentation/Augmentations.ts new file mode 100644 index 000000000..229a17443 --- /dev/null +++ b/src/Augmentation/Augmentations.ts @@ -0,0 +1,4 @@ +import { Augmentation } from "./Augmentation"; +import { IMap } from "../types"; + +export let Augmentations: IMap = {}; diff --git a/src/Augmentation/PlayerOwnedAugmentation.ts b/src/Augmentation/PlayerOwnedAugmentation.ts new file mode 100644 index 000000000..2455c09f8 --- /dev/null +++ b/src/Augmentation/PlayerOwnedAugmentation.ts @@ -0,0 +1,13 @@ +export class PlayerOwnedAugmentation { + level: number = 1; + name: string = ""; + + constructor(name: string = "") { + this.name = name; + } +} + +export interface IPlayerOwnedAugmentation { + level: number; + name: string; +} diff --git a/src/Augmentation/data/AugmentationNames.ts b/src/Augmentation/data/AugmentationNames.ts new file mode 100644 index 000000000..d7bce5ec2 --- /dev/null +++ b/src/Augmentation/data/AugmentationNames.ts @@ -0,0 +1,114 @@ +import { IMap } from "../../types"; + +export let AugmentationNames: IMap = { + Targeting1: "Augmented Targeting I", + Targeting2: "Augmented Targeting II", + Targeting3: "Augmented Targeting III", + SyntheticHeart: "Synthetic Heart", + SynfibrilMuscle: "Synfibril Muscle", + CombatRib1: "Combat Rib I", + CombatRib2: "Combat Rib II", + CombatRib3: "Combat Rib III", + NanofiberWeave: "Nanofiber Weave", + SubdermalArmor: "NEMEAN Subdermal Weave", + WiredReflexes: "Wired Reflexes", + GrapheneBoneLacings: "Graphene Bone Lacings", + BionicSpine: "Bionic Spine", + GrapheneBionicSpine: "Graphene Bionic Spine Upgrade", + BionicLegs: "Bionic Legs", + GrapheneBionicLegs: "Graphene Bionic Legs Upgrade", + SpeechProcessor: "Speech Processor Implant", + TITN41Injection: "TITN-41 Gene-Modification Injection", + EnhancedSocialInteractionImplant: "Enhanced Social Interaction Implant", + BitWire: "BitWire", + ArtificialBioNeuralNetwork: "Artificial Bio-neural Network Implant", + ArtificialSynapticPotentiation: "Artificial Synaptic Potentiation", + EnhancedMyelinSheathing: "Enhanced Myelin Sheathing", + SynapticEnhancement: "Synaptic Enhancement Implant", + NeuralRetentionEnhancement: "Neural-Retention Enhancement", + DataJack: "DataJack", + ENM: "Embedded Netburner Module", + ENMCore: "Embedded Netburner Module Core Implant", + ENMCoreV2: "Embedded Netburner Module Core V2 Upgrade", + ENMCoreV3: "Embedded Netburner Module Core V3 Upgrade", + ENMAnalyzeEngine: "Embedded Netburner Module Analyze Engine", + ENMDMA: "Embedded Netburner Module Direct Memory Access Upgrade", + Neuralstimulator: "Neuralstimulator", + NeuralAccelerator: "Neural Accelerator", + CranialSignalProcessorsG1: "Cranial Signal Processors - Gen I", + CranialSignalProcessorsG2: "Cranial Signal Processors - Gen II", + CranialSignalProcessorsG3: "Cranial Signal Processors - Gen III", + CranialSignalProcessorsG4: "Cranial Signal Processors - Gen IV", + CranialSignalProcessorsG5: "Cranial Signal Processors - Gen V", + NeuronalDensification: "Neuronal Densification", + NuoptimalInjectorImplant: "Nuoptimal Nootropic Injector Implant", + SpeechEnhancement: "Speech Enhancement", + FocusWire: "FocusWire", + PCDNI: "PC Direct-Neural Interface", + PCDNIOptimizer: "PC Direct-Neural Interface Optimization Submodule", + PCDNINeuralNetwork: "PC Direct-Neural Interface NeuroNet Injector", + ADRPheromone1: "ADR-V1 Pheromone Gene", + ADRPheromone2: "ADR-V2 Pheromone Gene", + HacknetNodeCPUUpload: "Hacknet Node CPU Architecture Neural-Upload", + HacknetNodeCacheUpload: "Hacknet Node Cache Architecture Neural-Upload", + HacknetNodeNICUpload: "Hacknet Node NIC Architecture Neural-Upload", + HacknetNodeKernelDNI: "Hacknet Node Kernel Direct-Neural Interface", + HacknetNodeCoreDNI: "Hacknet Node Core Direct-Neural Interface", + NeuroFluxGovernor: "NeuroFlux Governor", + Neurotrainer1: "Neurotrainer I", + Neurotrainer2: "Neurotrainer II", + Neurotrainer3: "Neurotrainer III", + Hypersight: "HyperSight Corneal Implant", + LuminCloaking1: "LuminCloaking-V1 Skin Implant", + LuminCloaking2: "LuminCloaking-V2 Skin Implant", + HemoRecirculator: "HemoRecirculator", + SmartSonar: "SmartSonar Implant", + PowerRecirculator: "Power Recirculation Core", + QLink: "QLink", + TheRedPill: "The Red Pill", + SPTN97: "SPTN-97 Gene Modification", + HiveMind: "ECorp HVMind Implant", + CordiARCReactor: "CordiARC Fusion Reactor", + SmartJaw: "SmartJaw", + Neotra: "Neotra", + Xanipher: "Xanipher", + nextSENS: "nextSENS Gene Modification", + OmniTekInfoLoad: "OmniTek InfoLoad", + PhotosyntheticCells: "Photosynthetic Cells", + Neurolink: "BitRunners Neurolink", + TheBlackHand: "The Black Hand", + CRTX42AA: "CRTX42-AA Gene Modification", + Neuregen: "Neuregen Gene Modification", + CashRoot: "CashRoot Starter Kit", + NutriGen: "NutriGen Implant", + INFRARet: "INFRARET Enhancement", + DermaForce: "DermaForce Particle Barrier", + GrapheneBrachiBlades: "Graphene BranchiBlades Upgrade", + GrapheneBionicArms: "Graphene Bionic Arms Upgrade", + BrachiBlades: "BrachiBlades", + BionicArms: "Bionic Arms", + SNA: "Social Negotiation Assistant (S.N.A)", + EsperEyewear: "EsperTech Bladeburner Eyewear", + EMS4Recombination: "EMS-4 Recombination", + OrionShoulder: "ORION-MKIV Shoulder", + HyperionV1: "Hyperion Plasma Cannon V1", + HyperionV2: "Hyperion Plasma Cannon V2", + GolemSerum: "GOLEM Serum", + VangelisVirus: "Vangelis Virus", + VangelisVirus3: "Vangelis Virus 3.0", + INTERLINKED: "I.N.T.E.R.L.I.N.K.E.D", + BladeRunner: "Blade's Runners", + BladeArmor: "BLADE-51b Tesla Armor", + BladeArmorPowerCells: "BLADE-51b Tesla Armor: Power Cells Upgrade", + BladeArmorEnergyShielding: "BLADE-51b Tesla Armor: Energy Shielding Upgrade", + BladeArmorUnibeam: "BLADE-51b Tesla Armor: Unibeam Upgrade", + BladeArmorOmnibeam: "BLADE-51b Tesla Armor: Omnibeam Upgrade", + BladeArmorIPU: "BLADE-51b Tesla Armor: IPU Upgrade", + BladesSimulacrum: "The Blade's Simulacrum", + + //Wasteland Augs + //PepBoy: "P.E.P-Boy", Plasma Energy Projection System + //PepBoyForceField Generates plasma force fields + //PepBoyBlasts Generate high density plasma concussive blasts + //PepBoyDataStorage STore more data on pep boy, +} diff --git a/src/BitNode.js b/src/BitNode/BitNode.js similarity index 99% rename from src/BitNode.js rename to src/BitNode/BitNode.js index f2be6cc89..6985a10f8 100644 --- a/src/BitNode.js +++ b/src/BitNode/BitNode.js @@ -1,5 +1,5 @@ -import {BitNodeMultipliers} from "./BitNodeMultipliers"; -import {Player} from "./Player"; +import { BitNodeMultipliers } from "./BitNodeMultipliers"; +import { Player } from "../Player"; function BitNode(n, name, desc="", info="") { this.number = n; diff --git a/src/BitNodeMultipliers.ts b/src/BitNode/BitNodeMultipliers.ts similarity index 100% rename from src/BitNodeMultipliers.ts rename to src/BitNode/BitNodeMultipliers.ts diff --git a/src/BitNode/README.md b/src/BitNode/README.md new file mode 100644 index 000000000..4819200dd --- /dev/null +++ b/src/BitNode/README.md @@ -0,0 +1 @@ +Contains implementation of BitNodes and BitNode-specific mechanics diff --git a/src/Bladeburner.js b/src/Bladeburner.js index 693e1b7eb..73b73dbe9 100644 --- a/src/Bladeburner.js +++ b/src/Bladeburner.js @@ -1,5 +1,6 @@ -import { Augmentations , AugmentationNames } from "./Augmentations"; -import { BitNodeMultipliers } from "./BitNodeMultipliers"; +import { Augmentations } from "./Augmentation/Augmentations"; +import { AugmentationNames } from "./Augmentation/data/AugmentationNames"; +import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers"; import { CONSTANTS } from "./Constants"; import { Engine } from "./engine"; import { Faction } from "./Faction/Faction"; diff --git a/src/Corporation/Corporation.js b/src/Corporation/Corporation.js index 6d498c038..3bc5227af 100644 --- a/src/Corporation/Corporation.js +++ b/src/Corporation/Corporation.js @@ -13,7 +13,7 @@ import { MaterialSizes } from "./MaterialSizes"; import { Product } from "./Product"; import { ResearchMap } from "./ResearchMap"; -import { BitNodeMultipliers } from "../BitNodeMultipliers"; +import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; import { CONSTANTS } from "../Constants"; import { Factions } from "../Faction/Factions"; import { showLiterature } from "../Literature"; diff --git a/src/DevMenu.js b/src/DevMenu.js index 48d4d4ff0..39ccc6229 100644 --- a/src/DevMenu.js +++ b/src/DevMenu.js @@ -1,4 +1,4 @@ -import { AugmentationNames } from "./Augmentations"; +import { AugmentationNames } from "./Augmentation/data/AugmentationNames"; import { generateRandomContract } from "./CodingContractGenerator"; import { Programs } from "./Programs/Programs"; import { Factions } from "./Faction/Factions"; diff --git a/src/Faction/FactionHelpers.js b/src/Faction/FactionHelpers.js index 62534d9dd..4873727f1 100644 --- a/src/Faction/FactionHelpers.js +++ b/src/Faction/FactionHelpers.js @@ -1,6 +1,7 @@ -import { Augmentations, AugmentationNames, - PlayerOwnedAugmentation } from "../Augmentations"; -import { BitNodeMultipliers } from "../BitNodeMultipliers"; +import { Augmentations } from "../Augmentation/Augmentations"; +import { PlayerOwnedAugmentation } from "../Augmentation/PlayerOwnedAugmentation"; +import { AugmentationNames } from "../Augmentation/data/AugmentationNames"; +import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; import { CONSTANTS } from "../Constants"; import { Engine } from "../engine"; import { Faction } from "./Faction"; diff --git a/src/Hacking.js b/src/Hacking.js index 16d44ab9a..452d38120 100644 --- a/src/Hacking.js +++ b/src/Hacking.js @@ -1,4 +1,4 @@ -import { BitNodeMultipliers } from "./BitNodeMultipliers"; +import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers"; import { Player } from "./Player"; import { Server } from "./Server"; diff --git a/src/HacknetNode.js b/src/HacknetNode.js index c7a9a5fa6..cf6433300 100644 --- a/src/HacknetNode.js +++ b/src/HacknetNode.js @@ -1,6 +1,6 @@ -import {BitNodeMultipliers} from "./BitNodeMultipliers"; -import {CONSTANTS} from "./Constants"; -import {Engine} from "./engine"; +import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers"; +import { CONSTANTS } from "./Constants"; +import { Engine } from "./engine"; import {iTutorialSteps, iTutorialNextStep, ITutorial} from "./InteractiveTutorial"; import {Player} from "./Player"; diff --git a/src/Infiltration.js b/src/Infiltration.js index 4c41ff3c4..697481b74 100644 --- a/src/Infiltration.js +++ b/src/Infiltration.js @@ -1,12 +1,12 @@ -import {BitNodeMultipliers} from "./BitNodeMultipliers"; -import {CONSTANTS} from "./Constants"; -import {Engine} from "./engine"; -import {Player} from "./Player"; -import {dialogBoxCreate} from "../utils/DialogBox"; -import {clearEventListeners} from "../utils/uiHelpers/clearEventListeners"; -import {getRandomInt} from "../utils/helpers/getRandomInt"; -import {infiltrationBoxCreate} from "../utils/InfiltrationBox"; -import {formatNumber} from "../utils/StringHelperFunctions"; +import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers"; +import { CONSTANTS } from "./Constants"; +import { Engine } from "./engine"; +import { Player } from "./Player"; +import { dialogBoxCreate } from "../utils/DialogBox"; +import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; +import { infiltrationBoxCreate } from "../utils/InfiltrationBox"; +import { formatNumber } from "../utils/StringHelperFunctions"; /* Infiltration.js * diff --git a/src/Message.js b/src/Message.js index fabab140a..3bdfd0e52 100644 --- a/src/Message.js +++ b/src/Message.js @@ -1,6 +1,6 @@ -import { Augmentations, - Augmentation, - AugmentationNames } from "./Augmentations"; +import { Augmentatation } from "./Augmentation/Augmentation"; +import { Augmentations } from "./Augmentation/Augmentations"; +import { AugmentationNames } from "./Augmentation/data/AugmentationNames"; import { Programs } from "./Programs/Programs"; import { inMission } from "./Missions"; import { Player } from "./Player"; diff --git a/src/NetscriptEvaluator.js b/src/NetscriptEvaluator.js index d1989f01a..11a4a56de 100644 --- a/src/NetscriptEvaluator.js +++ b/src/NetscriptEvaluator.js @@ -1,12 +1,12 @@ -import {BitNodeMultipliers} from "./BitNodeMultipliers"; -import {CONSTANTS} from "./Constants"; -import {Player} from "./Player"; -import {Environment} from "./NetscriptEnvironment"; -import {WorkerScript, addWorkerScript} from "./NetscriptWorker"; -import {Server, getServer} from "./Server"; -import {Settings} from "./Settings"; -import {Script, findRunningScript, - RunningScript} from "./Script"; +import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers"; +import { CONSTANTS } from "./Constants"; +import { Player } from "./Player"; +import { Environment } from "./NetscriptEnvironment"; +import { WorkerScript, addWorkerScript} from "./NetscriptWorker"; +import { Server, getServer} from "./Server"; +import { Settings } from "./Settings"; +import { Script, findRunningScript, + RunningScript } from "./Script"; import {parse, Node} from "../utils/acorn"; import {arrayToString} from "../utils/helpers/arrayToString"; diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index 67e17e482..8d64258ee 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -2,10 +2,12 @@ var sprintf = require('sprintf-js').sprintf, vsprintf = require('sprintf-js').vsprintf import {updateActiveScriptsItems} from "./ActiveScriptsUI"; -import {Augmentations, Augmentation, - augmentationExists, installAugmentations, - AugmentationNames} from "./Augmentations"; -import {BitNodeMultipliers} from "./BitNodeMultipliers"; +import { Augmentation } from "./Augmentation/Augmentation"; +import { Augmentations } from "./Augmentation/Augmentations"; +import { augmentationExists, + installAugmentations } from "./Augmentation/AugmentationHelpers"; +import { AugmentationNames } from "./Augmentation/data/AugmentationNames"; +import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers"; import { determineCrimeSuccess, findCrime } from "./Crime/CrimeHelpers"; import {Bladeburner} from "./Bladeburner"; import {Company} from "./Company/Company"; diff --git a/src/PersonObjects/Person.ts b/src/PersonObjects/Person.ts index 45d2250c7..1267909ec 100644 --- a/src/PersonObjects/Person.ts +++ b/src/PersonObjects/Person.ts @@ -1,5 +1,6 @@ // Base class representing a person-like object -import { BitNodeMultipliers } from "../BitNodeMultipliers"; +import { IPlayerOwnedAugmentation } from "../Augmentation/PlayerOwnedAugmentation"; +import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; import { Cities } from "../Locations/Cities"; import { CONSTANTS } from "../Constants"; import { IMap } from "../types"; @@ -10,10 +11,12 @@ import { IMap } from "../types"; // // Only contains the needed properties for Sleeve implementation export interface IPlayer { + augmentations: IPlayerOwnedAugmentation[]; companyName: string; factions: string[]; jobs: IMap; money: any; + queuedAugmentations: IPlayerOwnedAugmentation[]; hacking_skill: number; strength: number; @@ -23,6 +26,13 @@ export interface IPlayer { charisma: number; intelligence: number; + hacking_exp: number; + strength_exp: number; + defense_exp: number; + dexterity_exp: number; + agility_exp: number; + charisma_exp: number; + crime_success_mult: number; gainHackingExp(exp: number): void; @@ -33,6 +43,7 @@ export interface IPlayer { gainCharismaExp(exp: number): void; gainMoney(money: number): void; loseMoney(money: number): void; + reapplyAllAugmentations(resetMultipliers: boolean): void; startCrime(crimeType: string, hackExp: number, strExp: number, @@ -83,7 +94,7 @@ export abstract class Person { max_hp: number = 10; /** - * Multipliers + * Experience */ hacking_exp: number = 0; strength_exp: number = 0; @@ -93,6 +104,9 @@ export abstract class Person { charisma_exp: number = 0; intelligence_exp: number = 0; + /** + * Multipliers + */ hacking_mult: number = 1; strength_mult: number = 1; defense_mult: number = 1; @@ -107,6 +121,11 @@ export abstract class Person { agility_exp_mult: number = 1; charisma_exp_mult: number = 1; + hacking_chance_mult: number = 1; + hacking_speed_mult: number = 1; + hacking_money_mult: number = 1; + hacking_grow_mult: number = 1; + company_rep_mult: number = 1; faction_rep_mult: number = 1; diff --git a/src/PersonObjects/Resleeving/README.md b/src/PersonObjects/Resleeving/README.md new file mode 100644 index 000000000..e9ac3e146 --- /dev/null +++ b/src/PersonObjects/Resleeving/README.md @@ -0,0 +1,10 @@ +Implements the Re-sleeving feature, which allows players to purchase a new body +that comes with pre-existing Augmentations and experience. Note that purchasing +a new body causes you to lose all of your old Augmentations and experience + +This feature is introduced in BitNode-10, and destroying BitNode-10 allows +the user to use it in other BitNodes (provided that they purchase the required +cortical stack Augmentation) + +While they are based on the same concept, this feature is different than the +"Sleeve" mechanic. diff --git a/src/PersonObjects/Resleeving/Resleeve.ts b/src/PersonObjects/Resleeving/Resleeve.ts new file mode 100644 index 000000000..8bf14764b --- /dev/null +++ b/src/PersonObjects/Resleeving/Resleeve.ts @@ -0,0 +1,45 @@ +/** + * Implements the Resleeve class, which defines a new body + * that the player can "re-sleeve" into. + */ +import { Person } from "../Person"; + +import { Augmentation } from "../../Augmentation/Augmentation"; +import { Augmentations } from "../../Augmentation/Augmentations"; +import { CONSTANTS } from "../../Constants"; + +export class Resleeve extends Person { + constructor() { + super(); + } + + getCost(): number { + // Each experience point adds this to the cost + const CostPerExp: number = 5; + + // Final cost is multiplied by # Augs ^ this constant + const NumAugsExponent: number = 1.05; + + // Get total exp in this re-sleeve + let totalExp: number = this.hacking_exp + + this.strength_exp + + this.defense_exp + + this.dexterity_exp + + this.agility_exp + + this.charisma_exp; + + // Get total base Augmentation cost for this re-sleeve + let totalAugmentationCost: number = 0; + for (let i = 0; i < this.augmentations.length; ++i) { + const aug: Augmentation | null = Augmentations[this.augmentations[i]]; + if (aug == null) { + console.error(`Could not find Augmentation ${this.augmentations[i]}`); + continue; + } + totalAugmentationCost += aug!.baseCost; + } + + return (totalExp * CostPerExp) + (totalAugmentationCost * Math.pow(this.augmentations.length, NumAugsExponent)); + } + +} diff --git a/src/PersonObjects/Resleeving/Resleeving.ts b/src/PersonObjects/Resleeving/Resleeving.ts new file mode 100644 index 000000000..d527a09d3 --- /dev/null +++ b/src/PersonObjects/Resleeving/Resleeving.ts @@ -0,0 +1,74 @@ +/** + * Implements the Re-sleeving mechanic for BitNode-10. + * This allows the player to purchase and "use" new sleeves at VitaLife. + * These new sleeves come with different starting experience and Augmentations + * The cost of these new sleeves scales based on the exp and Augs. + * + * Note that this is different from the "Sleeve mechanic". The "Sleeve" mechanic + * provides new sleeves, essentially clones. This Re-sleeving mechanic lets + * the player purchase a new body with pre-existing Augmentations and experience + * + * As of right now, this feature is only available in BitNode 10 + */ +import { Resleeve } from "./Resleeve"; +import { IPlayer } from "../Person"; + +import { Augmentation } from "../../Augmentation/Augmentation"; +import { Augmentations } from "../../Augmentation/Augmentations"; +import { PlayerOwnedAugmentation } from "../../Augmentation/PlayerOwnedAugmentation"; + +import { getRandomInt } from "../../../utils/helpers/getRandomInt"; + + +// Executes the actual re-sleeve when one is purchased +export function resleeve(r: Resleeve, p: IPlayer) { + // Set the player's exp + p.hacking_exp = r.hacking_exp; + p.strength_exp = r.strength_exp; + p.defense_exp = r.defense_exp; + p.dexterity_exp = r.dexterity_exp; + p.agility_exp = r.agility_exp; + p.charisma_exp = r.charisma_exp; + + // Clear all of the player's augmentations, including those that are + // purchased but not installed + p.queuedAugmentations.length = 0; + p.augmentations.length = 0; + + for (let i = 0; i < r.augmentations.length; ++i) { + p.augmentations.push(new PlayerOwnedAugmentation(r.augmentations[i])); + } + + p.reapplyAllAugmentations(true); +} + +// Creates all of the Re-sleeves that will be available for purchase at VitaLife +export function generateResleeves(): Resleeve[] { + const NumResleeves: number = 40; // Total number of Resleeves to generate + + let ret: Resleeve[] = []; + for (let i = 0; i < NumResleeves; ++i) { + // i will be a number indicating how "powerful" the Re-sleeve should be + let r: Resleeve = new Resleeve(); + + // Generate experience + const expMult: number = i + 1; + r.hacking_exp = expMult * getRandomInt(500, 1500); + r.strength_exp = expMult * getRandomInt(500, 1500); + r.defense_exp = expMult * getRandomInt(500, 1500); + r.dexterity_exp = expMult * getRandomInt(500, 1500); + r.agility_exp = expMult * getRandomInt(500, 1500); + r.charisma_exp = expMult * getRandomInt(500, 1500); + + // Generate Augs + const baseNumAugs: number = Math.ceil((i + 1) / 2); + const numAugs: number = getRandomInt(baseNumAugs, baseNumAugs + 2); + for (let a = 0; a < numAugs; ++a) { + const augKeys: string[] = Object.keys(Augmentations); + + r.augmentations.push(TODO); + } + } + + return ret; +} diff --git a/src/PersonObjects/Sleeve/Sleeve.ts b/src/PersonObjects/Sleeve/Sleeve.ts index 763f46c78..e4b89053b 100644 --- a/src/PersonObjects/Sleeve/Sleeve.ts +++ b/src/PersonObjects/Sleeve/Sleeve.ts @@ -13,7 +13,7 @@ import { Person, ITaskTracker, createTaskTracker } from "../Person"; -import { BitNodeMultipliers } from "../../BitNodeMultipliers"; +import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers"; import { Crime } from "../../Crime/Crime"; diff --git a/src/Player.js b/src/Player.js index 6c2ac9b14..eb4658d9d 100644 --- a/src/Player.js +++ b/src/Player.js @@ -1,8 +1,8 @@ -import { Augmentations, - applyAugmentation, - AugmentationNames, - PlayerOwnedAugmentation } from "./Augmentations"; -import { BitNodeMultipliers } from "./BitNodeMultipliers"; +import { Augmentations } from "./Augmentation/Augmentations"; +import { applyAugmentation } from "./Augmentation/AugmentationHelpers"; +import { PlayerOwnedAugmentation } from "./Augmentation/PlayerOwnedAugmentation"; +import { AugmentationNames } from "./Augmentation/data/AugmentationNames"; +import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers"; import { CodingContractRewardType } from "./CodingContracts"; import { Company } from "./Company/Company"; import { Companies } from "./Company/Companies"; diff --git a/src/Prestige.js b/src/Prestige.js index dddd0b7a3..d58c99ab6 100755 --- a/src/Prestige.js +++ b/src/Prestige.js @@ -1,7 +1,9 @@ import {deleteActiveScriptsItem} from "./ActiveScriptsUI"; -import {Augmentations, augmentationExists, - initAugmentations, AugmentationNames} from "./Augmentations"; -import {initBitNodeMultipliers} from "./BitNode"; +import { Augmentations } from "./Augmentation/Augmentations"; +import { augmentationExists, + initAugmentations } from "./Augmentation/AugmentationHelpers"; +import { AugmentationNames } from "./Augmentation/data/AugmentationNames"; +import { initBitNodeMultipliers } from "./BitNode/BitNode"; import {Bladeburner} from "./Bladeburner"; import {writeCinematicText} from "./CinematicText"; import {Companies, initCompanies} from "./Company/Companies"; diff --git a/src/RedPill.js b/src/RedPill.js index 42799d8be..b7f572ee5 100644 --- a/src/RedPill.js +++ b/src/RedPill.js @@ -1,10 +1,11 @@ -import {BitNodes} from "./BitNode"; -import {Engine} from "./engine"; -import {Player} from "./Player"; -import {prestigeSourceFile} from "./Prestige"; -import {SourceFiles, SourceFile, - PlayerOwnedSourceFile} from "./SourceFile"; -import {Terminal} from "./Terminal"; +import { BitNodes } from "./BitNode/BitNode"; +import { Engine } from "./engine"; +import { Player } from "./Player"; +import { prestigeSourceFile } from "./Prestige"; +import { SourceFiles, + SourceFile, + PlayerOwnedSourceFile } from "./SourceFile"; +import { Terminal } from "./Terminal"; import {clearEventListeners} from "../utils/uiHelpers/clearEventListeners"; import {dialogBoxCreate} from "../utils/DialogBox"; @@ -56,7 +57,7 @@ function hackWorldDaemon(currentNodeNumber, flume=false) { // Clear Red Pill screen first var container = document.getElementById("red-pill-content"); removeChildrenFromElement(container); - + redPillFlag = true; Engine.loadRedPillContent(); return writeRedPillLine("[ERROR] SEMPOOL INVALID").then(function() { diff --git a/src/Server.js b/src/Server.js index f18a61cc1..6aa27b6f4 100644 --- a/src/Server.js +++ b/src/Server.js @@ -1,4 +1,4 @@ -import { BitNodeMultipliers } from "./BitNodeMultipliers"; +import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers"; import { CodingContract, ContractTypes } from "./CodingContracts"; import { CONSTANTS } from "./Constants"; diff --git a/src/SourceFile.js b/src/SourceFile.js index 76df6b19b..f56c52a09 100644 --- a/src/SourceFile.js +++ b/src/SourceFile.js @@ -1,5 +1,5 @@ -import {Player} from "./Player"; -import {BitNodes} from "./BitNode"; +import { Player } from "./Player"; +import { BitNodes } from "./BitNode/BitNode"; /* SourceFile.js */ //Each SourceFile corresponds to a BitNode with the same number diff --git a/src/engine.js b/src/engine.js index 9a54c8df4..031266ed5 100644 --- a/src/engine.js +++ b/src/engine.js @@ -1,6 +1,6 @@ -import { dialogBoxCreate} from "../utils/DialogBox"; +import { dialogBoxCreate} from "../utils/DialogBox"; import { gameOptionsBoxClose, - gameOptionsBoxOpen} from "../utils/GameOptions"; + gameOptionsBoxOpen } from "../utils/GameOptions"; import { getRandomInt } from "../utils/helpers/getRandomInt"; import { removeChildrenFromElement } from "../utils/uiHelpers/removeChildrenFromElement"; import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners"; @@ -17,12 +17,15 @@ import {formatNumber, import {loxBoxCreate, logBoxUpdateText, logBoxOpened} from "../utils/LogBox"; import {updateActiveScriptsItems} from "./ActiveScriptsUI"; -import {Augmentations, installAugmentations, - initAugmentations, AugmentationNames, - displayAugmentationsContent, - PlayerOwnedAugmentation} from "./Augmentations"; +import { Augmentations } from "./Augmentation/Augmentations"; +import { installAugmentations, + initAugmentations, + displayAugmentationsContent, + PlayerOwnedAugmentation } from "./Augmentation/AugmentationHelpers"; +import { AugmentationNames } from "./Augmentation/data/AugmentationNames"; + import {BitNodes, initBitNodes, - initBitNodeMultipliers} from "./BitNode"; + initBitNodeMultipliers} from "./BitNode/BitNode"; import {Bladeburner} from "./Bladeburner"; import {CharacterOverview} from "./CharacterOverview"; import {cinematicTextFlag} from "./CinematicText"; diff --git a/utils/InfiltrationBox.js b/utils/InfiltrationBox.js index d3c3b2a18..af83bd0f4 100644 --- a/utils/InfiltrationBox.js +++ b/utils/InfiltrationBox.js @@ -1,11 +1,12 @@ -import { BitNodeMultipliers } from "../src/BitNodeMultipliers"; +import { dialogBoxCreate } from "./DialogBox"; +import { clearEventListeners } from "./uiHelpers/clearEventListeners"; +import { formatNumber } from "./StringHelperFunctions"; + +import { BitNodeMultipliers } from "../src/BitNode/BitNodeMultipliers"; import { CONSTANTS } from "../src/Constants"; import { Faction } from "../src/Faction/Faction"; import { Factions } from "../src/Faction/Factions"; import { Player } from "../src/Player"; -import { dialogBoxCreate } from "./DialogBox"; -import { clearEventListeners } from "./uiHelpers/clearEventListeners"; -import { formatNumber } from "./StringHelperFunctions"; //Keep track of last faction var lastFac = "";