+ Complete hacking contracts for your faction!
+ Your effectiveness, which determines how much reputation you gain for this faction, is based on your hacking skill.
+ Gain hacking exp.
+
Carry out field missions for your faction. Speed and effectiveness determined by all stats. Gains exp for all stats.
+
+ Carry out field missions for your faction.
+ Your effectiveness, which determines how much reputation you gain for this faction, is based on all of your stats.
+ Gains exp for all stats.
+
Serve in a security detail for your faction. Speed and effectiveness determined by combat stats. Gains exp for all combat stats.
+
+ Serve in a security detail for your faction.
+ Your effectiveness, which determines how much reputation you gain for this faction, is based on your combat stats.
+ Gains exp for all combat stats.
+
+
+
+ As your reputation with this faction rises, you will unlock Augmentations, which you
+ can purchase to enhance your abilities.
+
WARNING: Purchasing an Augmentation resets most of your progress, including:
+ Stats/Skill levels and Experience
+ Money
+ Scripts
+ Faction/Company reputation
+ Purchasing an Augmentation lets you start over with the perks and benefits granted by all
+ of the Augmentations you have ever purchased (purchasing an Augmentation does not reset the benefits
+ of Augmentations you have previously purchased).
+
+ Purchase
+ Cancel
+
+
diff --git a/src/Augmentations.js b/src/Augmentations.js
index b0f0cbbf1..f15c457ec 100644
--- a/src/Augmentations.js
+++ b/src/Augmentations.js
@@ -1,31 +1,41 @@
//Augmentations
function Augmentation(name) {
- this.name = name;
+ this.name = name;
this.info = "";
- this.owned = false; //Whether the player has it (you can only have each augmentation once)
+ this.owned = false; //Whether the player has it (you can only have each augmentation once)
+ this.factionInstalledBy = ""; //Which faction the Player got this from
+
+ //Price and reputation base requirements (can change based on faction multipliers)
+ this.baseRepRequirement = 0;
+ this.baseCost = 0;
}
Augmentation.prototype.setInfo(inf) {
- this.info = inf;
+ this.info = inf;
+}
+
+Augmentation.prototype.setRequirements(rep, cost) {
+ this.baseRepRequirement = rep;
+ this.baseCost = cost;
}
//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);
- }
+ 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);
+ }
}
Augmentation.prototype.toJSON = function() {
- return Generic_toJSON("Augmentation", this);
+ return Generic_toJSON("Augmentation", this);
}
Augmentation.fromJSON = function(value) {
- return Generic_fromJSON(Augmentation, value.data);
+ return Generic_fromJSON(Augmentation, value.data);
}
Reviver.constructors.Augmentation = Augmentation;
@@ -33,312 +43,353 @@ Reviver.constructors.Augmentation = Augmentation;
Augmentations = {}
AddToAugmentations = function(aug) {
- var name = aug.name;
- Augmentations[name] = 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
+// Similarly. something that helps you gain company reputation
initAugmentations = function() {
- //Combat stat augmentations
- var Targeting1 = new Augmentation("Augmented Targeting I");
- Targeting1.addToFactions("The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
- "OmniTek Incorporated", "KuaiGong International", "Blade Industries");
- AddToAugmentations(Targeting1);
-
- var Targeting2 = new Augmentation("Augmented Targeting II");
- Targeting2.addToFactions("The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
- "OmniTek Incorporated", "KuaiGong International", "Blade Industries");
- AddToAugmentations(Targeting2);
-
- var Targeting3 = new Augmentation("Augmented Targeting III");
- Targeting3.addToFactions("The Dark Army", "The Syndicate", "OmniTek Incorporated",
- "KuaiGong International", "Blade Industries", "The Covenant");
- AddToAugmentations(Targeting3);
-
- var SyntheticHeart = new Augmentation("Synthetic Heart");
- SyntheticHeart.addToFactions("KuaiGong International", "Fulcrum Secret Technologies", "Speakers for the Dead",
- "NWO", "The Covenant", "Daedalus", "Illuminati");
- AddToAugmentations(SyntheticHeart);
+ //Combat stat augmentations
+ var Targeting1 = new Augmentation("Augmented Targeting I");
+ Targeting1.setRequirements(36000, 10000000);
+ Targeting1.addToFactions("The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
+ "OmniTek Incorporated", "KuaiGong International", "Blade Industries");
+ AddToAugmentations(Targeting1);
- var SynfibrilMuscle = new Augmentation("Synfibril Muscle");
- SynfibrilMuscle.addToFactions("KuaiGong International", "Fulcrum Secret Technologies", "Speakers for the Dead",
- "NWO", "The Covenant", "Daedalus", "Illuminati", "Blade Industries");
- AddToAugmentations(SynfibrilMuscle)
-
- var CombatRib1 = new Augmentation("Combat Rib I");
- CombatRib1.addToFactions("The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
- "OmniTek Incorporated", "KuaiGong International", "Blade Industries");
- AddToAugmentations(CombatRib1);
-
- var CombatRib2 = new Augmentation("Combat Rib II");
- CombatRib2.addToFactions("The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
- "OmniTek Incorporated", "KuaiGong International", "Blade Industries");
- AddToAugmentations(CombatRib2);
-
- var CombatRib3 = new Augmentation("Combat Rib III");
- CombatRib3.addToFactions("The Dark Army", "The Syndicate", "OmniTek Incorporated",
- "KuaiGong International", "Blade Industries", "The Covenant");
- AddToAugmentations(CombatRib3);
-
- var NanofiberWeave = new Augmentation("Nanofiber Weave");
- NanofiberWeave.addToFactions("Tian Di Hui", "The Syndicate", "The Dark Army", "Speakers for the Dead",
- "Blade Industries", "Fulcrum Secret Technologies", "OmniTek Incorporated");
- AddToAugmentations(NanofiberWeave);
-
- var SubdermalArmor = new Augmentation("NEMEAN Subdermal Weave");
- SubdermalArmor.addToFactions("The Syndicate", "Fulcrum Secret Technologies", "Illuminati", "Daedalus",
- "The Covenant");
- AddToAugmentations(SubdermalArmor);
-
- var WiredReflexes = new Augmentation("Wired Reflexes");
- WiredReflexes.addToFactions("Tian Di Hui", "Sector-12", "Volhaven", "Aevum", "Ishima",
- "The Syndicate", "The Dark Army", "Speakers for the Dead");
- AddToAugmentations(WiredReflexes);
-
- var GrapheneBoneLacings = new Augmentation("Graphene Bone Lacings");
- GrapheneBoneLacings.addToFactions("Fulcrum Secret Technologies", "The Covenant");
- AddToAugmentations(GrapheneBoneLacings);
-
- var BionicSpine = new Augmentation("Bionic Spine");
- BionicSpine.addToFactions("Speakers for the Dead", "The Syndicate", "KuaiGong International",
- "OmniTek Incorporated", "Blade Industries");
- AddToAugmentations(BionicSpine);
-
- var GrapheneBionicSpine = new Augmentation("Graphene Bionic Spine Upgrade");
- GrapheneBionicSpine.addToFactions("Fulcrum Secret Technologies", "ECorp");
- AddToAugmentations(GrapheneBionicSpine);
+ var Targeting2 = new Augmentation("Augmented Targeting II");
+ Targeting2.setRequirements(72000, 20000000);
+ Targeting2.addToFactions("The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
+ "OmniTek Incorporated", "KuaiGong International", "Blade Industries");
+ AddToAugmentations(Targeting2);
+
+ var Targeting3 = new Augmentation("Augmented Targeting III");
+ Targeting3.setRequirements(144000, 50000000);
+ Targeting3.addToFactions("The Dark Army", "The Syndicate", "OmniTek Incorporated",
+ "KuaiGong International", "Blade Industries", "The Covenant");
+ AddToAugmentations(Targeting3);
+
+ var SyntheticHeart = new Augmentation("Synthetic Heart");
+ SyntheticHeart.setRequirements(1000000, 500000000);
+ SyntheticHeart.addToFactions("KuaiGong International", "Fulcrum Secret Technologies", "Speakers for the Dead",
+ "NWO", "The Covenant", "Daedalus", "Illuminati");
+ AddToAugmentations(SyntheticHeart);
+
+ var SynfibrilMuscle = new Augmentation("Synfibril Muscle");
+ SynfibrilMuscle.setRequirements(900000, 400000000);
+ SynfibrilMuscle.addToFactions("KuaiGong International", "Fulcrum Secret Technologies", "Speakers for the Dead",
+ "NWO", "The Covenant", "Daedalus", "Illuminati", "Blade Industries");
+ AddToAugmentations(SynfibrilMuscle)
+
+ var CombatRib1 = new Augmentation("Combat Rib I");
+ CombatRib1.setRequirements(50000, 15000000);
+ CombatRib1.addToFactions("The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
+ "OmniTek Incorporated", "KuaiGong International", "Blade Industries");
+ AddToAugmentations(CombatRib1);
+
+ var CombatRib2 = new Augmentation("Combat Rib II");
+ CombatRib2.setRequirements.setRequirements(100000, 40000000);
+ CombatRib2.addToFactions("The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
+ "OmniTek Incorporated", "KuaiGong International", "Blade Industries");
+ AddToAugmentations(CombatRib2);
+
+ var CombatRib3 = new Augmentation("Combat Rib III");
+ CombatRib3.setRequirements(200000, 100000000);
+ CombatRib3.addToFactions("The Dark Army", "The Syndicate", "OmniTek Incorporated",
+ "KuaiGong International", "Blade Industries", "The Covenant");
+ AddToAugmentations(CombatRib3);
+
+ var NanofiberWeave = new Augmentation("Nanofiber Weave");
+ NanofiberWeave.setRequirements(400000, 250000000);
+ NanofiberWeave.addToFactions("Tian Di Hui", "The Syndicate", "The Dark Army", "Speakers for the Dead",
+ "Blade Industries", "Fulcrum Secret Technologies", "OmniTek Incorporated");
+ AddToAugmentations(NanofiberWeave);
+
+ var SubdermalArmor = new Augmentation("NEMEAN Subdermal Weave");
+ SubdermalArmor.setRequirements(1000000, 750000000);
+ SubdermalArmor.addToFactions("The Syndicate", "Fulcrum Secret Technologies", "Illuminati", "Daedalus",
+ "The Covenant");
+ AddToAugmentations(SubdermalArmor);
+
+ var WiredReflexes = new Augmentation("Wired Reflexes");
+ WiredReflexes.setRequirements(36000, 10000000);
+ WiredReflexes.addToFactions("Tian Di Hui", "Sector-12", "Volhaven", "Aevum", "Ishima",
+ "The Syndicate", "The Dark Army", "Speakers for the Dead");
+ AddToAugmentations(WiredReflexes);
+
+ var GrapheneBoneLacings = new Augmentation("Graphene Bone Lacings");
+ GrapheneBoneLacings.setRequirements(1500000, 1000000000);
+ GrapheneBoneLacings.addToFactions("Fulcrum Secret Technologies", "The Covenant");
+ AddToAugmentations(GrapheneBoneLacings);
+
+ var BionicSpine = new Augmentation("Bionic Spine");
+ BionicSpine.setRequirements(250000, 75000000);
+ BionicSpine.addToFactions("Speakers for the Dead", "The Syndicate", "KuaiGong International",
+ "OmniTek Incorporated", "Blade Industries");
+ AddToAugmentations(BionicSpine);
+
+ var GrapheneBionicSpine = new Augmentation("Graphene Bionic Spine Upgrade");
+ GrapheneBionicSpine.setRequirements(1200000, 1000000000);
+ GrapheneBionicSpine.addToFactions("Fulcrum Secret Technologies", "ECorp");
+ AddToAugmentations(GrapheneBionicSpine);
var BionicLegs = new Augmentation("Bionic Legs");
- BionicLegs.addToFactions("Speakers for the Dead", "The Syndicate", "KuaiGong International",
- "OmniTek Incorporated", "Blade Industries");
+ BionicLegs.setRequirements(200000, 60000000);
+ BionicLegs.addToFactions("Speakers for the Dead", "The Syndicate", "KuaiGong International",
+ "OmniTek Incorporated", "Blade Industries");
AddToAugmentations(BionicLegs);
var GrapheneBionicLegs = new Augmentation("Graphene Bionic Legs Upgrade");
- GrapheneBionicLegs.addToFactions("MegaCorp", "ECorp", "Fulcrum Secret Technologies");
+ GrapheneBionicLegs.setRequirements(1000000, 900000000);
+ GrapheneBionicLegs.addToFactions("MegaCorp", "ECorp", "Fulcrum Secret Technologies");
AddToAugmentations(GrapheneBionicLegs);
-
- //Labor stat augmentations
- var SpeechProcessor = new Augmentation("Speech Processor Implant"); //Cochlear imlant?
- SpeechProcessor.addToFactions("Tian Di Hui", "Chongqing", "Sector-12", "New Tokyo", "Aevum",
- "Ishima", "Volhaven");
- AddToAugmentations(SpeechProcessor);
-
- var EnhancedSocialInteractionImplant = new Augmentation("Enhanced Social Interaction Implant");
- EnhancedSocialInteractionImplant.addToFactions("Bachman & Associates", "NWO", "Clarke Incorporated",
- "OmniTek Incorporated", "Four Sigma");
- AddToAugmentations(EnhancedSocialInteractionImplant);
-
- //Hacking augmentations
- var ArtificialBioNeuralNetwork = new Augmentation("Artificial Bio-neural Network Implant");
- ArtificialBioNeuralNetwork.addToFactions("BitRunners", "Fulcrum Secret Technologies");
- AddToAugmentations(ArtificialBioNeuralNetwork);
-
- var ArtificialSynapticPotentiation = new Augmentation("Artificial Synaptic Potentiation");
- ArtificialSynapticPotentiation.addToFactions("The Black Hand", "NiteSec");
- AddToAugmentations(ArtificialSynapticPotentiation);
+
+ //Labor stat augmentations
+ var SpeechProcessor = new Augmentation("Speech Processor Implant"); //Cochlear imlant?
+ SpeechProcessor.setRequirements(50000, 15000000);
+ SpeechProcessor.addToFactions("Tian Di Hui", "Chongqing", "Sector-12", "New Tokyo", "Aevum",
+ "Ishima", "Volhaven");
+ AddToAugmentations(SpeechProcessor);
+
+ var EnhancedSocialInteractionImplant = new Augmentation("Enhanced Social Interaction Implant");
+ EnhancedSocialInteractionImplant.setRequirements(750000, 500000000);
+ EnhancedSocialInteractionImplant.addToFactions("Bachman & Associates", "NWO", "Clarke Incorporated",
+ "OmniTek Incorporated", "Four Sigma");
+ AddToAugmentations(EnhancedSocialInteractionImplant);
+
+ //Hacking augmentations
+ var ArtificialBioNeuralNetwork = new Augmentation("Artificial Bio-neural Network Implant");
+ ArtificialBioNeuralNetwork.setRequirements(750000, 600000000);
+ ArtificialBioNeuralNetwork.addToFactions("BitRunners", "Fulcrum Secret Technologies");
+ AddToAugmentations(ArtificialBioNeuralNetwork);
+
+ var ArtificialSynapticPotentiation = new Augmentation("Artificial Synaptic Potentiation");
+ ArtificialSynapticPotentiation.setRequirements(600000, 400000000);
+ ArtificialSynapticPotentiation.addToFactions("The Black Hand", "NiteSec");
+ AddToAugmentations(ArtificialSynapticPotentiation);
var EnhancedMyelinSheathing = new Augmentation("Enhanced Myelin Sheating");
- EnhancedMyelinSheating.addToFactions("Fulcrum Secret Technologies", "BitRunners", "The Black Hand");
+ EnhancedMyelinSheathing.setRequirements(900000, 850000000);)
+ EnhancedMyelinSheating.addToFactions("Fulcrum Secret Technologies", "BitRunners", "The Black Hand");
AddToAugmentations(EnhancedMyelinSheathing);
-
- var SynapticEnhancement = new Augmentation("Synaptic Enhancement Implant");
- SynapticEnhancement.addToFactions("CyberSec");
- AddToAugmentations(SynapticEnhancement);
-
- var NeuralRetentionEnhancement = new Augmentation("Neural-Retention Enhancement");
- NeuralRetentionEnhancement.addToFactions("CyberSec", "NiteSec");
- AddToAugmentations(NeuralRetentionEnhancement);
-
- var DataJack = new Augmentation("DataJack");
- DataJack.addToFactions("BitRunners", "The Black Hand", "NiteSec", "Chongqing", "New Tokyo");
- AddToAugmentations(DataJack);
-
- var ENM = new Augmentation("Embedded Netburner Module");
- ENM.addToFactions("BitRunners", "The Black Hand", "NiteSec", "ECorp", "MegaCorp",
- "Fulcrum Secret Technologies", "NWO", "Blade Industries");
- AddToAugmentations(ENM);
-
- var ENMCore = new Augmentation("Embedded Netburner Module Core Implant");
- ENMCore.addToFactions("BitRunners", "The Black Hand", "NiteSec", "ECorp", "MegaCorp",
- "Fulcrum Secret Technologies", "NWO", "Blade Industries");
- AddToAugmentations(ENMCore);
-
- var ENMCoreV2 = new Augmentation("Embedded Netburner Module Core V2 Upgrade");
- ENMCoreV2.addToFactions("ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
- "Blade Industries", "OmniTek Incorporated", "KuaiGong International");
- AddToAugmentations(ENMCoreV2);
-
- var ENMCoreV3 = new Augmentation("Embedded Netburner Module Core V3 Upgrade");
- ENMCoreV3.addToFactions("ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
- "Daedalus", "The Covenant", "Illuminati");
- AddToAugmentations(ENMCoreV3);
-
- var ENMAnalyzeEngine = new Augmentation("Embedded Netburner Module Analyze Engine");
- ENMCoreV3.addToFactions("ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
- "Daedalus", "The Covenant", "Illuminati");
- AddToAugmentations(ENMAnalyzeEngine);
-
- var ENMDMA = new Augmentation("Embedded Netburner Module Direct Memory Access Upgrade");
- ENMCoreV3.addToFactions("ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
- "Daedalus", "The Covenant", "Illuminati");
- AddToAugmentations(ENMDMA);
-
- var Neuralstimulator = new Augmentation("Neuralstimulator");
- Neuralstimulator.addToFactions("The Black Hand", "Chongqing", "Sector-12", "New Tokyo", "Aevum",
- "Ishima", "Volhaven", "Bachman & Associates", "Clarke Incorporated",
- "Four Sigma");
- AddToAugmentations(Neuralstimulator);
-
+ var SynapticEnhancement = new Augmentation("Synaptic Enhancement Implant");
+ SynapticEnhancement.setRequirements(50000, 35000000);
+ SynapticEnhancement.addToFactions("CyberSec");
+ AddToAugmentations(SynapticEnhancement);
+
+ var NeuralRetentionEnhancement = new Augmentation("Neural-Retention Enhancement");
+ NeuralRetentionEnhancement.setRequirements(200000, 250000000);
+ NeuralRetentionEnhancement.addToFactions("CyberSec", "NiteSec");
+ AddToAugmentations(NeuralRetentionEnhancement);
+
+ var DataJack = new Augmentation("DataJack");
+ DataJack.setRequirements(750000, 750000000);
+ DataJack.addToFactions("BitRunners", "The Black Hand", "NiteSec", "Chongqing", "New Tokyo");
+ AddToAugmentations(DataJack);
+
+ var ENM = new Augmentation("Embedded Netburner Module");
+ ENM.setRequirements(500000, 300000000);
+ ENM.addToFactions("BitRunners", "The Black Hand", "NiteSec", "ECorp", "MegaCorp",
+ "Fulcrum Secret Technologies", "NWO", "Blade Industries");
+ AddToAugmentations(ENM);
+
+ var ENMCore = new Augmentation("Embedded Netburner Module Core Implant");
+ ENMCore.setRequirements(750000, 500000000);
+ ENMCore.addToFactions("BitRunners", "The Black Hand", "NiteSec", "ECorp", "MegaCorp",
+ "Fulcrum Secret Technologies", "NWO", "Blade Industries");
+ AddToAugmentations(ENMCore);
+
+ var ENMCoreV2 = new Augmentation("Embedded Netburner Module Core V2 Upgrade");
+ ENMCoreV2.setRequirements(1000000, 1000000000);
+ ENMCoreV2.addToFactions("ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
+ "Blade Industries", "OmniTek Incorporated", "KuaiGong International");
+ AddToAugmentations(ENMCoreV2);
+
+ var ENMCoreV3 = new Augmentation("Embedded Netburner Module Core V3 Upgrade");
+ ENMCOREV3.setRequirements(1500000, 1250000000);
+ ENMCoreV3.addToFactions("ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
+ "Daedalus", "The Covenant", "Illuminati");
+ AddToAugmentations(ENMCoreV3);
+
+ var ENMAnalyzeEngine = new Augmentation("Embedded Netburner Module Analyze Engine");
+ ENMAnalyzeEngine.setReqpRequirement(1250000, 1000000000);
+ ENMAnalyzeEngine.addToFactions("ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
+ "Daedalus", "The Covenant", "Illuminati");
+ AddToAugmentations(ENMAnalyzeEngine);
+
+ var ENMDMA = new Augmentation("Embedded Netburner Module Direct Memory Access Upgrade");
+ ENMDMA.setReqpRequirement(1350000, 1100000000);
+ ENMDMA.addToFactions("ECorp", "MegaCorp", "Fulcrum Secret Technologies", "NWO",
+ "Daedalus", "The Covenant", "Illuminati");
+ AddToAugmentations(ENMDMA);
+
+ var Neuralstimulator = new Augmentation("Neuralstimulator");
+ Neuralstimulator.setReqpRequirement(500000, 600000000);
+ 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");
- NuoptimalInjectorImplant.addToFactions("Tian Di Hui", "Volhaven", "New Tokyo", "Chongqing", "Ishima",
- "Clarke Incorporated", "Four Sigma", "Bachman & Associates");
+ NuoptimalInjectorImplant.setReqpRequirement(100000, 90000000);
+ NuoptimalInjectorImplant.addToFactions("Tian Di Hui", "Volhaven", "New Tokyo", "Chongqing", "Ishima",
+ "Clarke Incorporated", "Four Sigma", "Bachman & Associates");
AddToAugmentations(NuoptimalInjectorImplant);
var SpeechEnhancement = new Augmentation("Speech Enhancement");
- SpeechEnhancement.addToFactions("Tian Di Hui", "Speakers for the Dead", "Four Sigma", "KuaiGong International",
- "Clarke Incorporated", "Four Sigma", "Bachman & Associates");
+ SpeechEnhancement.setReqpRequirement(50000, 45000000);
+ 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
- FocusWire.addToFactions("Bachman & Associates", "Clarke Incorporated", "Four Sigma", "KuaiGong International");
+ FocusWire.setReqpRequirement(400000, 350000000);
+ FocusWire.addToFactions("Bachman & Associates", "Clarke Incorporated", "Four Sigma", "KuaiGong International");
AddToAugmentations(FocusWire)
var PCDNI = new Augmentation("PC Direct-Neural Interface");
- PCDNI.addToFactions("Four Sigma", "OmniTek Incorporated", "ECorp", "Blade Industries");
+ PCDNI.setReqpRequirement(750000, 650000000);
+ PCDNI.addToFactions("Four Sigma", "OmniTek Incorporated", "ECorp", "Blade Industries");
AddToAugmentations(PCDNI);
var PCDNIOptimizer = new Augmentation("PC Direct-Neural Interface Optimization Submodule");
- PCDNI.addToFactions("Fulcrum Secret Technologies", "ECorp", "Blade Industries");
+ PCDNIOptimizer.setReqpRequirement(1000000, 875000000);
+ PCDNIOptimizer.addToFactions("Fulcrum Secret Technologies", "ECorp", "Blade Industries");
AddToAugmentations(PCDNIOptimizer);
-
- var PCDNINeuralNetwork = new Augmentation("PC Direct-Neural Interface NeuroNet Injector");
- PCDNI.addToFactions("Fulcrum Secret Technologies");
+
+ var PCDNINeuralNetwork = new Augmentation("PC Direct-Neural Interface NeuroNet Injector");
+ PCDNINeuralNetwork.setRequirements(1200000, 1100000000);
+ PCDNINeuralNetwork.addToFactions("Fulcrum Secret Technologies");
AddToAugmentations(PCDNINeuralNetwork);
- //Misc augmentations
+ //Misc augmentations
var Neurotrainer1 = new Augmentation("Neurotrainer I");
- Neurotrainer1.addToFactions("CyberSec");
+ Neurotrainer1.setRequirements(50000, 35000000);
+ Neurotrainer1.addToFactions("CyberSec");
AddToAugmentations(Neurotrainer1);
var Neurotrainer2 = new Augmentation("Neurotrainer II");
- Neurotrainer2.addToFactions("BitRunners", "NiteSec");
+ Neurotrainer2.setRequirements(300000, 150000000);
+ Neurotrainer2.addToFactions("BitRunners", "NiteSec");
AddToAugmentations(Neurotrainer2);
var Neurotrainer3 = new Augmentation("Neurotrainer III");
- Neurotrainer3.addToFactions("NWO", "Four Sigma");
+ Neurotrainer3.setRequirements(900000, 725000000);
+ Neurotrainer3.addToFactions("NWO", "Four Sigma");
AddToAugmentations(Neurotrainer3);
var Hypersight = new Augmentation("HyperSight Corneal Implant");
- Hypersight.addToFactions("Blade Industries", "KuaiGong International");
+ Hypersight.setRequirements(800000, 650000000);
+ Hypersight.addToFactions("Blade Industries", "KuaiGong International");
AddToAugmentations(Hypersight);
}
-applyAugmentation = function(aug) {
- switch(aug.name) {
- //Combat stat augmentations
- case "Augmented Targeting I":
- //Dex 5%
- break;
- case "Augmented Targeting II":
- //Dex 5%
- break;
- case "Augmented Targeting III":
- //Dex 5%
- break;
- case "Synthetic Heart":
- //Agi and Str - HIGH LEVEL
- break;
- case "Synfibril Muscle":
- //Strength and Defense - MED HIGH LEVEL
- break;
- case "Combat Rib I":
- //Str and Defense 5%
- break;
- case "Combat Rib II":
- break;
- case "Combat Rib III":
- break;
- case "Nanofiber Weave":
- //str + Defense - MED LEVEL
- break;
- case "NEMEAN Subdermal Weave":
- //Defense - HIGH LEVEL
- break;
- case "Wired Reflexes":
- //Agility - Low level
- break;
- case "Graphene Bone Lacings":
- //Strength defense - HIGH level
- break;
- case "Bionic Spine":
- //Everything - Medium level
- break;
- case "Graphene Bionic Spine Upgrade":
- //Everything - high level
- break;
+applyAugmentation = function(aug, faction) {
+ switch(aug.name) {
+ //Combat stat augmentations
+ case "Augmented Targeting I":
+ //Dex 5%
+ break;
+ case "Augmented Targeting II":
+ //Dex 5%
+ break;
+ case "Augmented Targeting III":
+ //Dex 5%
+ break;
+ case "Synthetic Heart":
+ //Agi and Str - HIGH LEVEL
+ break;
+ case "Synfibril Muscle":
+ //Strength and Defense - MED HIGH LEVEL
+ break;
+ case "Combat Rib I":
+ //Str and Defense 5%
+ break;
+ case "Combat Rib II":
+ break;
+ case "Combat Rib III":
+ break;
+ case "Nanofiber Weave":
+ //str + Defense - MED LEVEL
+ break;
+ case "NEMEAN Subdermal Weave":
+ //Defense - HIGH LEVEL
+ break;
+ case "Wired Reflexes":
+ //Agility - Low level
+ break;
+ case "Graphene Bone Lacings":
+ //Strength defense - HIGH level
+ break;
+ case "Bionic Spine":
+ //Everything - Medium level
+ break;
+ case "Graphene Bionic Spine Upgrade":
+ //Everything - high level
+ break;
case "Bionic Legs":
//Agi - Med level
break;
- case "Graphene Bionic Legs Upgrade":
- //Agi - HIGH level
- break;
-
- //Labor stats augmentations
- case "Enhanced Social Interaction Implant":
- //Charisma 10% - Med high level
- break;
- case "Speech Processor Implant":
- //Charisma 5% - Med level
- break;
+ case "Graphene Bionic Legs Upgrade":
+ //Agi - HIGH level
+ break;
+
+ //Labor stats augmentations
+ case "Enhanced Social Interaction Implant":
+ //Charisma 10% - Med high level
+ break;
+ case "Speech Processor Implant":
+ //Charisma 5% - Med level
+ break;
- //Hacking augmentations
- case "Artificial Bio-neural Network Implant":
- //Hacking speed and money gained - MED Level
- break;
- case "Artificial Synaptic Potentiation":
- //Hacking speed - MED Level
- break;
+ //Hacking augmentations
+ case "Artificial Bio-neural Network Implant":
+ //Hacking speed and money gained - MED Level
+ break;
+ case "Artificial Synaptic Potentiation":
+ //Hacking speed - MED Level
+ break;
case "Enhanced Myelin Sheating":
//Hacking speed and exp gain - MED Level
break;
- case "Synaptic Enhancement Implant":
- //Hacking speed - LOw level
- break;
- case "Neural-Retention Enhancement":
- //Gain 10% more hacking exp - med level
- break;
- case "DataJack":
- //5% more money from hacking - med low level
- break;
- case "Embedded Netburner Module":
- //Doesn't give anyhting itself but allows user to install
- //ENM upgrades in the future, which are very powerful
- //Med level
- break;
- case "Embedded Netburner Module Core Implant":
- //Hacking speed, money gained, and exp gained - Med level
- break;
- case "Embedded Netburner Module Core V2 Upgrade":
- //Hacking speed, money gained, and exp gained - Med High Level
- break;
- case "Embedded Netburner Module Core V3 Upgrade":
- //Hacking speed, money gained, and exp gained - High level
- break;
- case "Embedded Netburner Module Analyze Engine":
- //Hacking speed 20% - High level
- break;
- case "Embedded Netburner Module Direct Memory Access Upgrade":
- //Money hacked 20% - High level
- break;
- case "Neuralstimulator":
- //Hacking speed, money gained, and exp gained - Med level
- break;
+ case "Synaptic Enhancement Implant":
+ //Hacking speed - LOw level
+ break;
+ case "Neural-Retention Enhancement":
+ //Gain 10% more hacking exp - med level
+ break;
+ case "DataJack":
+ //5% more money from hacking - med low level
+ break;
+ case "Embedded Netburner Module":
+ //Doesn't give anyhting itself but allows user to install
+ //ENM upgrades in the future, which are very powerful
+ //Med level
+ break;
+ case "Embedded Netburner Module Core Implant":
+ //Hacking speed, money gained, and exp gained - Med level
+ break;
+ case "Embedded Netburner Module Core V2 Upgrade":
+ //Hacking speed, money gained, and exp gained - Med High Level
+ break;
+ case "Embedded Netburner Module Core V3 Upgrade":
+ //Hacking speed, money gained, and exp gained - High level
+ break;
+ case "Embedded Netburner Module Analyze Engine":
+ //Hacking speed 20% - High level
+ break;
+ case "Embedded Netburner Module Direct Memory Access Upgrade":
+ //Money hacked 20% - High level
+ break;
+ case "Neuralstimulator":
+ //Hacking speed, money gained, and exp gained - Med level
+ break;
case "PC Direct-Neural Interface NeuroNet Injector":
//Hacking speed increases
break;
@@ -355,15 +406,15 @@ applyAugmentation = function(aug) {
break;
case "PC Direct-Neural Interface":
//Allows people to directly communicate interface with PCs..which helps with Software and IT jobs
- //Med level
+ //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
- //High level
- break;
- case "PC Direct-Neural Interface NeuroNet Injector":
+ //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
+ //High Level
break;
//Misc augmentations
@@ -379,9 +430,12 @@ applyAugmentation = function(aug) {
case "HyperSight Corneal Implant":
//Increases sight..which increases dex..hacking speed + money? - Med high level
break;
-
- default:
- console.log("No such augmentation!");
- break;
- }
+
+ default:
+ console.log("ERROR: No such augmentation!");
+ return;
+ }
+
+ aug.owned = true;
+ aug.factionInstalledBy = faction.name;
}
\ No newline at end of file
diff --git a/src/Company.js b/src/Company.js
index 5b5c3c347..d9df7caf7 100644
--- a/src/Company.js
+++ b/src/Company.js
@@ -225,8 +225,8 @@ CompanyPositions = {
//Business
BusinessIntern: new CompanyPosition("Business Intern", 1, 1, 1, 1, 1, 1, 0, 1),
- BusinessAnalyst: new CompanyPosition("Business Analyst", 5, 1, 1, 1, 1, 50, 9000, 5),
- BusinessManager: new CompanyPosition("Business Manager", 50, 1, 1, 1, 1, 100, 36000, 12),
+ BusinessAnalyst: new CompanyPosition("Business Analyst", 5, 1, 1, 1, 1, 50, 9000, 8),
+ BusinessManager: new CompanyPosition("Business Manager", 50, 1, 1, 1, 1, 100, 36000, 15),
OperationsManager: new CompanyPosition("Operations Manager", 50, 1, 1, 1, 1, 200, 72000, 20),
CFO: new CompanyPosition("Chief Financial Officer", 75, 1, 1, 1, 1, 500, 108000, 50),
CEO: new CompanyPosition("Chief Executive Officer", 100, 1, 1, 1, 1, 750, 216000, 100),
diff --git a/src/Faction.js b/src/Faction.js
index fb3bf3640..9649a37fa 100644
--- a/src/Faction.js
+++ b/src/Faction.js
@@ -8,8 +8,17 @@ function Faction(name) {
this.isMember = false; //Whether player is member
this.isBanned = false; //Whether or not player is banned from joining this faction
this.playerReputation = 0; //"Reputation" within faction
+
+ //Multipliers for unlocking and purchasing augmentations
+ this.augmentationPriceMult = 1;
+ this.augmentationRepRequirementMult = 1;
};
+Faction.prototype.setAugmentationMultipliers = function(price, rep) {
+ this.augmentationPriceMult = price;
+ this.augmentationRepRequirementMult = rep;
+}
+
Faction.prototype.setInformation = function(info) {
this.information = info;
}
@@ -33,6 +42,8 @@ AddToFactions = function(faction) {
}
//TODO Add faction information
+//TODO Augmentation price and rep requirement mult are 1 for everything right now,
+// This might change in the future for balance
initFactions = function() {
//Endgame
var Illuminati = new Faction("Illuminati");
@@ -353,6 +364,7 @@ inviteToFaction = function(faction) {
joinFaction = function(faction) {
faction.isMember = true;
+ Player.factions.push(faction.name);
//Add the faction to the Factions page content
var item = document.createElement("li");
@@ -424,7 +436,42 @@ displayFactionContent = function(factionName) {
var fieldWorkButton = document.getElementById("faction-fieldwork-button");
var securityWorkButton = document.getElementById("faction-securitywork-button");
- //TODO Add event listeners for the buttons
+ //Set new event listener for all of the work buttons
+ //The old buttons need to be replaced to clear the old event listeners
+ var newHackButton = hackButton.cloneNode(true);
+ var newFieldWorkButton = fieldWorkButton.cloneNode(true);
+ var newSecurityWorkButton = securityWorkbutton.cloneNode(true);
+
+ hackButton.parentNode.replaceChild(newHackButton, hackButton);
+ fieldWorkButton.parentNode.replaceChild(newFieldWorkButton, fieldWorkButton);
+ securityWorkButton.parentNode.replaceChild(newSecurityWorkButton, securityWorkButton);
+
+ newHackButton.addEventListener("click", function() {
+ Player.startFactionHackWork(faction);
+ return false;
+ });
+
+ newFieldWorkButton.addEventListener("click", function() {
+ Player.startFactionFieldWork(faction);
+ return false;
+ });
+
+ newSecurityWorkButton("click", function() {
+ Player.startFactionSecurityWork(faction);
+ return false;
+ });
+
+
+ //Set new event listener for the purchase augmentation buttons
+ //The old button needs to be replaced to clear the old event listeners
+ var purchaseAugmentations = document.getElementById("faction-purchase-augmentations");
+ var newPurchaseAugmentationsButton = purchaseAugmentations.cloneNode(true);
+ purchaseAugmentations.parentNode.replaceChild(newPurchaseAugmentationsButton, purchaseAugmentations);
+
+ newPurchaseAugmentationsButton.addEventListener("click", function() {
+ displayFactionAugmentations(factionName);
+ return false;
+ });
if (faction.isMember) {
switch(faction.name) {
@@ -565,4 +612,51 @@ displayFactionContent = function(factionName) {
} else {
console.log("Not a member of this faction, cannot display faction information");
}
+}
+
+displayFactionAugmentations = function(factionName) {
+ //E.g:
+ //Add the faction to the Factions page content
+ var item = document.createElement("li");
+ var aElem = document.createElement("a");
+ aElem.setAttribute("href", "#");
+ aElem.setAttribute("class", "a-link-button");
+ aElem.innerHTML = faction.name;
+ aElem.addEventListener("click", function() {
+ displayFactionContent(faction.name);
+ return false;
+ });
+ item.appendChild(aElem);
+
+ var factionsList = document.getElementById("factions-list");
+ factionsList.appendChild(item);
+ ///
+
+ var faction = Factions[factionName];
+
+ var augmentationsList = document.getElementById("faction-augmentations-list");
+
+ for (var i = 0; i < Player.augmentations.length; ++i) {
+ var aug = Augmentations[Player.augmentations[i]];
+ var span = document.createElement("span");
+ var aElem = document.createElement("a");
+ var pElem = document.createElement("p");
+ aElem.setAttribute("href", "#");
+ if (faction.playerReputation >= (aug.baseRepRequirement * faction.augmentationRepRequirementMult)) {
+ aElem.setAttribute("class", "a-link-button");
+ pElem.innerHTML = "UNLOCKED"
+ pElem.style.color = #66ff33;
+ //TODO Event listener for button to purchase augmentation
+ } else {
+ aElem.setAttribute("class", "a-link-button-inactive");
+ pElem.innerHTML = "LOCKED";
+ pElem.style.color = red;
+ }
+ aElem.innerHTML = aug.name;
+
+ span.appendChild(aElem);
+ span.appendChild(pElem);
+
+ augmentationsList.appendChild(span);
+ }
}
\ No newline at end of file
diff --git a/src/Player.js b/src/Player.js
index 6d3119403..37ed1b535 100644
--- a/src/Player.js
+++ b/src/Player.js
@@ -49,7 +49,8 @@ function PlayerObject() {
this.agility_exp_mult = 1;
this.charisma_exp_mult = 1;
- this.company_rep_mult = 1; //Multiplier for how fast the player gains reputation at a company
+ this.company_rep_mult = 1;
+ this.faction_rep_mult = 1;
//Money
this.money = 0;
@@ -72,7 +73,11 @@ function PlayerObject() {
this.discoveredServers = []; //IP addresses of secret servers not in the network that you have discovered
this.purchasedServers = [];
+ //Factions
+ this.factions = []; //Names of all factions player has joined
+
//Augmentations
+ this.augmentations = []; //Names of all installed augmentations
this.numAugmentations = 0;
//Misc statistics
@@ -89,7 +94,8 @@ function PlayerObject() {
//Flags/variables for working (both Company and faction)
this.isWorking = false;
- this.isWorkingForFaction = false;
+ this.currentWorkFactionName = "";
+ this.currentWorkFactionDescription = "";
this.workHackExpGainRate = 0;
this.workStrExpGainRate = 0;
@@ -367,33 +373,22 @@ PlayerObject.prototype.work = function(numCycles) {
}
/* Working for Faction */
-PlayerObject.prototype.finishFactionWork = function(cancelled) {
- //Since the work was cancelled early, player only gains half of what they've earned so far
- var cancMult = 1;
- if (cancelled) {
- cancMult = 2;
- }
- if (Engine.Debug) {
- console.log("Player finishWork() called with " + this.workMoneyGained / cancMult + " $ gained");
- }
- this.hacking_exp += (this.workHackExpGained / cancMult);
- this.strength_exp += (this.workStrExpGained / cancMult);
- this.defense_exp += (this.workDefExpGained / cancMult);
- this.dexterity_exp += (this.workDexExpGained / cancMult);
- this.agility_exp += (this.workAgiExpGained / cancMult);
- this.charisma_exp += (this.workChaExpGained / cancMult);
+PlayerObject.prototype.finishFactionWork = function(cancelled, faction) {
+ this.hacking_exp += (this.workHackExpGained);
+ this.strength_exp += (this.workStrExpGained);
+ this.defense_exp += (this.workDefExpGained);
+ this.dexterity_exp += (this.workDexExpGained);
+ this.agility_exp += (this.workAgiExpGained);
+ this.charisma_exp += (this.workChaExpGained);
- var company = Companies[this.companyName];
- company.playerReputation += (this.workRepGained / cancMult);
+ var faction = Factions[this.currentWorkFactionName];
+ faction.playerReputation += (this.workRepGained);
this.gainMoney(this.workMoneyGained / cancMult);
this.updateSkillLevels();
- var txt = "";
- if (cancelled) {
- txt = "You worked a short shift of " + convertTimeMsToTimeElapsedString(this.timeWorked) + "
" +
- "Since you cancelled your work early, you only gained half of the experience, money, and reputation you earned.
" +
+ var txt = "You worked for your faction " + faction.name + " for a total of " + convertTimeMsToTimeElapsedString(this.timeWorked) + "
" +
"You earned a total of: " +
"$" + (this.workMoneyGained / cancMult).toFixed(2) + " " +
(this.workRepGained / cancMult).toFixed(3) + " reputation for the company " +
@@ -403,19 +398,6 @@ PlayerObject.prototype.finishFactionWork = function(cancelled) {
(this.workDexExpGained / cancMult).toFixed(3) + " dexterity exp " +
(this.workAgiExpGained / cancMult).toFixed(3) + " agility exp " +
(this.workChaExpGained / cancMult).toFixed(3) + " charisma exp ";
-
- } else {
- txt = "You worked a full shift of 8 hours!
" +
- "You have been working for " + convertTimeMsToTimeElapsedString(this.timeWorked) + "
" +
+ txt.innerHTML = "You are currently " + this.currentWorkFactionDescription + " for your faction " + faction.name + "." +
+ "You have been doing this for " + convertTimeMsToTimeElapsedString(this.timeWorked) + "