bitburner-src/src/Augmentations.js

387 lines
15 KiB
JavaScript
Raw Normal View History

2016-12-22 16:56:15 +01:00
//Augmentations
function Augmentation(name) {
this.name = name;
this.info = "";
2016-12-22 16:56:15 +01:00
this.owned = false; //Whether the player has it (you can only have each augmentation once)
}
2017-02-09 19:35:28 +01:00
Augmentation.prototype.setInfo(inf) {
this.info = inf;
2016-12-22 16:56:15 +01:00
}
2017-02-09 19:35:28 +01:00
//Takes in an array of faction names and adds this augmentation to all of those factions
Augmentation.prototype.addToFactions(factionList) {
for (var i = 0; i < factionList.length; ++i) {
var faction = Factions[factionList[i]];
if (faction = null) {
console.log("Error: Could not find faction with this name");
}
faction.augmentations.push(this.name);
}
}
2016-12-22 16:56:15 +01:00
Augmentation.prototype.toJSON = function() {
return Generic_toJSON("Augmentation", this);
}
Augmentation.fromJSON = function(value) {
return Generic_fromJSON(Augmentation, value.data);
}
Reviver.constructors.Augmentation = Augmentation;
Augmentations = {}
AddToAugmentations = function(aug) {
var name = aug.name;
Augmentations[name] = aug;
}
//TODO Set descriptions for all
//TODO Something that decreases RAM usage of scripts
//TODO SOmething that increases rate at which you gain faction respect
// Similarly. something that helps you gain company reputation
2016-12-22 16:56:15 +01:00
initAugmentations = function() {
//Combat stat augmentations
var Targeting1 = new Augmentation("Augmented Targeting I");
2017-02-09 19:35:28 +01:00
Targeting1.addToFactions("The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
"OmniTek Incorporated", "KuaiGong International", "Blade Industries");
2016-12-22 16:56:15 +01:00
AddToAugmentations(Targeting1);
var Targeting2 = new Augmentation("Augmented Targeting II");
2017-02-09 19:35:28 +01:00
Targeting2.addToFactions("The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
"OmniTek Incorporated", "KuaiGong International", "Blade Industries");
2016-12-22 16:56:15 +01:00
AddToAugmentations(Targeting2);
var Targeting3 = new Augmentation("Augmented Targeting III");
2017-02-09 19:35:28 +01:00
Targeting3.addToFactions("The Dark Army", "The Syndicate", "OmniTek Incorporated",
"KuaiGong International", "Blade Industries", "The Covenant");
2016-12-22 16:56:15 +01:00
AddToAugmentations(Targeting3);
var SyntheticHeart = new Augmentation("Synthetic Heart");
2017-02-09 19:35:28 +01:00
SyntheticHeart.addToFactions("KuaiGong International", "Fulcrum Secret Technologies", "Speakers for the Dead",
"NWO", "The Covenant", "Daedalus", "Illuminati");
2016-12-22 16:56:15 +01:00
AddToAugmentations(SyntheticHeart);
var SynfibrilMuscle = new Augmentation("Synfibril Muscle");
2017-02-09 19:35:28 +01:00
SynfibrilMuscle.addToFactions("KuaiGong International", "Fulcrum Secret Technologies", "Speakers for the Dead",
"NWO", "The Covenant", "Daedalus", "Illuminati", "Blade Industries");
AddToAugmentations(SynfibrilMuscle)
2016-12-22 16:56:15 +01:00
var CombatRib1 = new Augmentation("Combat Rib I");
2017-02-09 19:35:28 +01:00
CombatRib1.addToFactions("The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
"OmniTek Incorporated", "KuaiGong International", "Blade Industries");
AddToAugmentations(CombatRib1);
2016-12-22 16:56:15 +01:00
var CombatRib2 = new Augmentation("Combat Rib II");
2017-02-09 19:35:28 +01:00
CombatRib2.addToFactions("The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
"OmniTek Incorporated", "KuaiGong International", "Blade Industries");
AddToAugmentations(CombatRib2);
2016-12-22 16:56:15 +01:00
var CombatRib3 = new Augmentation("Combat Rib III");
2017-02-09 19:35:28 +01:00
CombatRib3.addToFactions("The Dark Army", "The Syndicate", "OmniTek Incorporated",
"KuaiGong International", "Blade Industries", "The Covenant");
AddToAugmentations(CombatRib3);
2016-12-22 16:56:15 +01:00
var NanofiberWeave = new Augmentation("Nanofiber Weave");
2017-02-09 19:35:28 +01:00
NanofiberWeave.addToFactions("Tian Di Hui", "The Syndicate", "The Dark Army", "Speakers for the Dead",
"Blade Industries", "Fulcrum Secret Technologies", "OmniTek Incorporated");
2016-12-22 16:56:15 +01:00
AddToAugmentations(NanofiberWeave);
var SubdermalArmor = new Augmentation("NEMEAN Subdermal Weave");
2017-02-09 19:35:28 +01:00
SubdermalArmor.addToFactions("The Syndicate", "Fulcrum Secret Technologies", "Illuminati", "Daedalus",
"The Covenant");
2016-12-22 16:56:15 +01:00
AddToAugmentations(SubdermalArmor);
var WiredReflexes = new Augmentation("Wired Reflexes");
2017-02-09 19:35:28 +01:00
WiredReflexes.addToFactions("Tian Di Hui", "Sector-12", "Volhaven", "Aevum", "Ishima",
"The Syndicate", "The Dark Army", "Speakers for the Dead");
2016-12-22 16:56:15 +01:00
AddToAugmentations(WiredReflexes);
var GrapheneBoneLacings = new Augmentation("Graphene Bone Lacings");
2017-02-09 19:35:28 +01:00
GrapheneBoneLacings.addToFactions("Fulcrum Secret Technologies", "The Covenant");
2016-12-22 16:56:15 +01:00
AddToAugmentations(GrapheneBoneLacings);
var BionicSpine = new Augmentation("Bionic Spine");
2017-02-09 19:35:28 +01:00
BionicSpine.addToFactions("Speakers for the Dead", "The Syndicate", "KuaiGong International",
"OmniTek Incorporated", "Blade Industries");
AddToAugmentations(BionicSpine);
var GrapheneBionicSpine = new Augmentation("Graphene Bionic Spine Upgrade");
2017-02-09 19:35:28 +01:00
GrapheneBionicSpine.addToFactions("Fulcrum Secret Technologies", "ECorp");
AddToAugmentations(GrapheneBionicSpine);
var BionicLegs = new Augmentation("Bionic Legs");
2017-02-09 19:35:28 +01:00
BionicLegs.addToFactions("Speakers for the Dead", "The Syndicate", "KuaiGong International",
"OmniTek Incorporated", "Blade Industries");
AddToAugmentations(BionicLegs);
2017-02-09 19:35:28 +01:00
var GrapheneBionicLegs = new Augmentation("Graphene Bionic Legs Upgrade");
GrapheneBionicLegs.addToFactions("MegaCorp", "ECorp", "Fulcrum Secret Technologies");
AddToAugmentations(GrapheneBionicLegs);
2016-12-22 16:56:15 +01:00
//Labor stat augmentations
var SpeechProcessor = new Augmentation("Speech Processor Implant"); //Cochlear imlant?
2017-02-09 19:35:28 +01:00
SpeechProcessor.addToFactions("Tian Di Hui", "Chongqing", "Sector-12", "New Tokyo", "Aevum",
"Ishima", "Volhaven");
AddToAugmentations(SpeechProcessor);
var EnhancedSocialInteractionImplant = new Augmentation("Enhanced Social Interaction Implant");
2017-02-09 19:35:28 +01:00
EnhancedSocialInteractionImplant.addToFactions("Bachman & Associates", "NWO", "Clarke Incorporated",
"OmniTek Incorporated", "Four Sigma");
AddToAugmentations(EnhancedSocialInteractionImplant);
2016-12-22 16:56:15 +01:00
//Hacking augmentations
var ArtificialBioNeuralNetwork = new Augmentation("Artificial Bio-neural Network Implant");
2017-02-09 19:35:28 +01:00
ArtificialBioNeuralNetwork.addToFactions("BitRunners", "Fulcrum Secret Technologies");
2016-12-22 16:56:15 +01:00
AddToAugmentations(ArtificialBioNeuralNetwork);
var ArtificialSynapticPotentiation = new Augmentation("Artificial Synaptic Potentiation");
2017-02-09 19:35:28 +01:00
ArtificialSynapticPotentiation.addToFactions("The Black Hand", "NiteSec");
2016-12-22 16:56:15 +01:00
AddToAugmentations(ArtificialSynapticPotentiation);
var EnhancedMyelinSheathing = new Augmentation("Enhanced Myelin Sheating");
2017-02-09 19:35:28 +01:00
EnhancedMyelinSheating.addToFactions("Fulcrum Secret Technologies", "BitRunners", "The Black Hand");
AddToAugmentations(EnhancedMyelinSheathing);
2016-12-22 16:56:15 +01:00
var SynapticEnhancement = new Augmentation("Synaptic Enhancement Implant");
2017-02-09 19:35:28 +01:00
SynapticEnhancement.addToFactions("CyberSec");
2016-12-22 16:56:15 +01:00
AddToAugmentations(SynapticEnhancement);
var NeuralRetentionEnhancement = new Augmentation("Neural-Retention Enhancement");
2017-02-09 19:35:28 +01:00
NeuralRetentionEnhancement.addToFactions("CyberSec", "NiteSec");
2016-12-22 16:56:15 +01:00
AddToAugmentations(NeuralRetentionEnhancement);
var DataJack = new Augmentation("DataJack");
2017-02-09 19:35:28 +01:00
DataJack.addToFactions("BitRunners", "The Black Hand", "NiteSec", "Chongqing", "New Tokyo");
2016-12-22 16:56:15 +01:00
AddToAugmentations(DataJack);
var ENM = new Augmentation("Embedded Netburner Module");
2017-02-09 19:35:28 +01:00
ENM.addToFactions("BitRunners", "The Black Hand", "NiteSec", "ECorp", "MegaCorp",
"Fulcrum Secret Technologies", "NWO", "Blade Industries");
2016-12-22 16:56:15 +01:00
AddToAugmentations(ENM);
var ENMCore = new Augmentation("Embedded Netburner Module Core Implant");
2017-02-09 19:35:28 +01:00
ENMCore.addToFactions("BitRunners", "The Black Hand", "NiteSec", "ECorp", "MegaCorp",
"Fulcrum Secret Technologies", "NWO", "Blade Industries");
2016-12-22 16:56:15 +01:00
AddToAugmentations(ENMCore);
var ENMCoreV2 = new Augmentation("Embedded Netburner Module Core V2 Upgrade");
2017-02-09 19:35:28 +01:00
ENMCoreV2.addToFactions("ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
"Blade Industries", "OmniTek Incorporated", "KuaiGong International");
2016-12-22 16:56:15 +01:00
AddToAugmentations(ENMCoreV2);
var ENMCoreV3 = new Augmentation("Embedded Netburner Module Core V3 Upgrade");
2017-02-09 19:35:28 +01:00
ENMCoreV3.addToFactions("ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
"Daedalus", "The Covenant", "Illuminati");
2016-12-22 16:56:15 +01:00
AddToAugmentations(ENMCoreV3);
var ENMAnalyzeEngine = new Augmentation("Embedded Netburner Module Analyze Engine");
2017-02-09 19:35:28 +01:00
ENMCoreV3.addToFactions("ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
"Daedalus", "The Covenant", "Illuminati");
2016-12-22 16:56:15 +01:00
AddToAugmentations(ENMAnalyzeEngine);
var ENMDMA = new Augmentation("Embedded Netburner Module Direct Memory Access Upgrade");
2017-02-09 19:35:28 +01:00
ENMCoreV3.addToFactions("ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
"Daedalus", "The Covenant", "Illuminati");
2016-12-22 16:56:15 +01:00
AddToAugmentations(ENMDMA);
var Neuralstimulator = new Augmentation("Neuralstimulator");
2017-02-09 19:35:28 +01:00
Neuralstimulator.addToFactions("The Black Hand", "Chongqing", "Sector-12", "New Tokyo", "Aevum",
"Ishima", "Volhaven", "Bachman & Associates", "Clarke Incorporated",
"Four Sigma");
AddToAugmentations(Neuralstimulator);
//Work Augmentations
var NuoptimalInjectorImplant = new Augmentation("Nuoptimal Nootropic Injector Implant");
2017-02-09 19:35:28 +01:00
NuoptimalInjectorImplant.addToFactions("Tian Di Hui", "Volhaven", "New Tokyo", "Chongqing", "Ishima",
"Clarke Incorporated", "Four Sigma", "Bachman & Associates");
AddToAugmentations(NuoptimalInjectorImplant);
var SpeechEnhancement = new Augmentation("Speech Enhancement");
2017-02-09 19:35:28 +01:00
SpeechEnhancement.addToFactions("Tian Di Hui", "Speakers for the Dead", "Four Sigma", "KuaiGong International",
"Clarke Incorporated", "Four Sigma", "Bachman & Associates");
AddToAugmentations(SpeechEnhancement);
var FocusWire = new Augmentation("FocusWire"); //Stops procrastination
2017-02-09 19:35:28 +01:00
FocusWire.addToFactions("Bachman & Associates", "Clarke Incorporated", "Four Sigma", "KuaiGong International");
AddToAugmentations(FocusWire)
var PCDNI = new Augmentation("PC Direct-Neural Interface");
2017-02-09 19:35:28 +01:00
PCDNI.addToFactions("Four Sigma", "OmniTek Incorporated", "ECorp", "Blade Industries");
AddToAugmentations(PCDNI);
var PCDNIOptimizer = new Augmentation("PC Direct-Neural Interface Optimization Submodule");
2017-02-09 19:35:28 +01:00
PCDNI.addToFactions("Fulcrum Secret Technologies", "ECorp", "Blade Industries");
AddToAugmentations(PCDNIOptimizer);
2017-02-09 19:35:28 +01:00
var PCDNINeuralNetwork = new Augmentation("PC Direct-Neural Interface NeuroNet Injector");
PCDNI.addToFactions("Fulcrum Secret Technologies");
AddToAugmentations(PCDNINeuralNetwork);
2016-12-22 16:56:15 +01:00
//Misc augmentations
var Neurotrainer1 = new Augmentation("Neurotrainer I");
2017-02-09 19:35:28 +01:00
Neurotrainer1.addToFactions("CyberSec");
AddToAugmentations(Neurotrainer1);
var Neurotrainer2 = new Augmentation("Neurotrainer II");
2017-02-09 19:35:28 +01:00
Neurotrainer2.addToFactions("BitRunners", "NiteSec");
AddToAugmentations(Neurotrainer2);
var Neurotrainer3 = new Augmentation("Neurotrainer III");
2017-02-09 19:35:28 +01:00
Neurotrainer3.addToFactions("NWO", "Four Sigma");
AddToAugmentations(Neurotrainer3);
var Hypersight = new Augmentation("HyperSight Corneal Implant");
2017-02-09 19:35:28 +01:00
Hypersight.addToFactions("Blade Industries", "KuaiGong International");
AddToAugmentations(Hypersight);
2016-12-22 16:56:15 +01:00
}
applyAugmentation = function(aug) {
2016-12-22 16:56:15 +01:00
switch(aug.name) {
//Combat stat augmentations
case "Augmented Targeting I":
2016-12-22 16:56:15 +01:00
//Dex 5%
break;
case "Augmented Targeting II":
2016-12-22 16:56:15 +01:00
//Dex 5%
break;
case "Augmented Targeting III":
2016-12-22 16:56:15 +01:00
//Dex 5%
break;
case "Synthetic Heart":
2017-02-09 19:35:28 +01:00
//Agi and Str - HIGH LEVEL
2016-12-22 16:56:15 +01:00
break;
case "Synfibril Muscle":
2017-02-09 19:35:28 +01:00
//Strength and Defense - MED HIGH LEVEL
2016-12-22 16:56:15 +01:00
break;
case "Combat Rib I":
2016-12-22 16:56:15 +01:00
//Str and Defense 5%
break;
case "Combat Rib II":
2016-12-22 16:56:15 +01:00
break;
case "Combat Rib III":
2016-12-22 16:56:15 +01:00
break;
case "Nanofiber Weave":
2017-02-09 19:35:28 +01:00
//str + Defense - MED LEVEL
2016-12-22 16:56:15 +01:00
break;
case "NEMEAN Subdermal Weave":
2017-02-09 19:35:28 +01:00
//Defense - HIGH LEVEL
2016-12-22 16:56:15 +01:00
break;
case "Wired Reflexes":
2017-02-09 19:35:28 +01:00
//Agility - Low level
2016-12-22 16:56:15 +01:00
break;
case "Graphene Bone Lacings":
2017-02-09 19:35:28 +01:00
//Strength defense - HIGH level
2016-12-22 16:56:15 +01:00
break;
case "Bionic Spine":
2017-02-09 19:35:28 +01:00
//Everything - Medium level
break;
case "Graphene Bionic Spine Upgrade":
2017-02-09 19:35:28 +01:00
//Everything - high level
break;
case "Bionic Legs":
2017-02-09 19:35:28 +01:00
//Agi - Med level
break;
2017-02-09 19:35:28 +01:00
case "Graphene Bionic Legs Upgrade":
//Agi - HIGH level
break;
2016-12-22 16:56:15 +01:00
//Labor stats augmentations
case "Enhanced Social Interaction Implant":
2017-02-09 19:35:28 +01:00
//Charisma 10% - Med high level
2016-12-22 16:56:15 +01:00
break;
case "Speech Processor Implant":
2017-02-09 19:35:28 +01:00
//Charisma 5% - Med level
break;
2016-12-22 16:56:15 +01:00
//Hacking augmentations
case "Artificial Bio-neural Network Implant":
2017-02-09 19:35:28 +01:00
//Hacking speed and money gained - MED Level
2016-12-22 16:56:15 +01:00
break;
case "Artificial Synaptic Potentiation":
2017-02-09 19:35:28 +01:00
//Hacking speed - MED Level
2016-12-22 16:56:15 +01:00
break;
case "Enhanced Myelin Sheating":
2017-02-09 19:35:28 +01:00
//Hacking speed and exp gain - MED Level
break;
2016-12-22 16:56:15 +01:00
case "Synaptic Enhancement Implant":
2017-02-09 19:35:28 +01:00
//Hacking speed - LOw level
2016-12-22 16:56:15 +01:00
break;
case "Neural-Retention Enhancement":
2017-02-09 19:35:28 +01:00
//Gain 10% more hacking exp - med level
2016-12-22 16:56:15 +01:00
break;
case "DataJack":
2017-02-09 19:35:28 +01:00
//5% more money from hacking - med low level
2016-12-22 16:56:15 +01:00
break;
case "Embedded Netburner Module":
//Doesn't give anyhting itself but allows user to install
//ENM upgrades in the future, which are very powerful
2017-02-09 19:35:28 +01:00
//Med level
2016-12-22 16:56:15 +01:00
break;
case "Embedded Netburner Module Core Implant":
2017-02-09 19:35:28 +01:00
//Hacking speed, money gained, and exp gained - Med level
2016-12-22 16:56:15 +01:00
break;
case "Embedded Netburner Module Core V2 Upgrade":
2017-02-09 19:35:28 +01:00
//Hacking speed, money gained, and exp gained - Med High Level
2016-12-22 16:56:15 +01:00
break;
case "Embedded Netburner Module Core V3 Upgrade":
2017-02-09 19:35:28 +01:00
//Hacking speed, money gained, and exp gained - High level
2016-12-22 16:56:15 +01:00
break;
case "Embedded Netburner Module Analyze Engine":
2017-02-09 19:35:28 +01:00
//Hacking speed 20% - High level
2016-12-22 16:56:15 +01:00
break;
case "Embedded Netburner Module Direct Memory Access Upgrade":
2017-02-09 19:35:28 +01:00
//Money hacked 20% - High level
2016-12-22 16:56:15 +01:00
break;
case "Neuralstimulator":
2017-02-09 19:35:28 +01:00
//Hacking speed, money gained, and exp gained - Med level
break;
case "PC Direct-Neural Interface NeuroNet Injector":
//Hacking speed increases
break;
//Work augmentations
case "Nuoptimal Nootropic Injector Implant":
2017-02-09 19:35:28 +01:00
//Increase in gains for software, IT, and Business jobs - Low Med Level
break;
case "Speech Enhancement":
2017-02-09 19:35:28 +01:00
//Increase in business jobs and reputation gained - Low Level
break;
case "FocusWire":
2017-02-09 19:35:28 +01:00
//Increase in all gains and reputation gained - Med Level
break;
case "PC Direct-Neural Interface":
//Allows people to directly communicate interface with PCs..which helps with Software and IT jobs
2017-02-09 19:35:28 +01:00
//Med level
break;
case "PC Direct-Neural Interface Optimization Submodule":
//Allows u to better optimize code/pc when connecting with PC DNI..helps with software/IT jobs
2017-02-09 19:35:28 +01:00
//High level
break;
case "PC Direct-Neural Interface NeuroNet Injector":
//Allow you to use ur brain as aneural net on a computer lol...increases everything
//High Level
break;
//Misc augmentations
case "Neurotrainer I":
2017-02-09 19:35:28 +01:00
//Increase all exp gains - Low level
break;
case "Neurotrainer II":
2017-02-09 19:35:28 +01:00
//Increase all exp gains - Med level
break;
case "Neurotrainer III":
2017-02-09 19:35:28 +01:00
//Increase all exp gains - High Level
break;
case "HyperSight Corneal Implant":
2017-02-09 19:35:28 +01:00
//Increases sight..which increases dex..hacking speed + money? - Med high level
break;
2016-12-22 16:56:15 +01:00
default:
console.log("No such augmentation!");
break;
}
}