mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 20:55:44 +01:00
Added augmentations
This commit is contained in:
parent
8dbca029de
commit
65ba93190b
192
src/Augmentations.js
Normal file
192
src/Augmentations.js
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
//Augmentations
|
||||||
|
function Augmentation(name) {
|
||||||
|
this.name = name;
|
||||||
|
this.owned = false; //Whether the player has it (you can only have each augmentation once)
|
||||||
|
this.description = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
Augmentation.prototype.setDescription(desc) {
|
||||||
|
this.description = desc;
|
||||||
|
}
|
||||||
|
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
|
||||||
|
initAugmentations = function() {
|
||||||
|
//Combat stat augmentations
|
||||||
|
var Targeting1 = new Augmentation("Targeting I");
|
||||||
|
AddToAugmentations(Targeting1);
|
||||||
|
|
||||||
|
var Targeting2 = new Augmentation("Targeting II");
|
||||||
|
AddToAugmentations(Targeting2);
|
||||||
|
|
||||||
|
var Targeting3 = new Augmentation("Targeting III");
|
||||||
|
AddToAugmentations(Targeting3);
|
||||||
|
|
||||||
|
var SyntheticHeart = new Augmentation("Synthetic Heart");
|
||||||
|
AddToAugmentations(SyntheticHeart);
|
||||||
|
|
||||||
|
var MicrofibralMuscle = new Augmentation("Microfibral Muscle");
|
||||||
|
AddToAugmentations(MicrofibralMuscle)
|
||||||
|
|
||||||
|
var CombatStrength1 = new Augmentation("Combat Strength I");
|
||||||
|
AddToAugmentations(CombatStrength1);
|
||||||
|
|
||||||
|
var CombatStrength2 = new Augmentation("Combat Strength II");
|
||||||
|
AddToAugmentations(CombatStrength2);
|
||||||
|
|
||||||
|
var CombatStrength3 = new Augmentation("Combat Strength III");
|
||||||
|
AddToAugmentations(CombatStrength3);
|
||||||
|
|
||||||
|
var NanofiberWeave = new Augmentation("Nanofiber Weave");
|
||||||
|
AddToAugmentations(NanofiberWeave);
|
||||||
|
|
||||||
|
var SubdermalArmor = new Augmentation("Subdermal Armor");
|
||||||
|
AddToAugmentations(SubdermalArmor);
|
||||||
|
|
||||||
|
var WiredReflexes = new Augmentation("Wired Reflexes");
|
||||||
|
AddToAugmentations(WiredReflexes);
|
||||||
|
|
||||||
|
var GrapheneBoneLacings = new Augmentation("Graphene Bone Lacings");
|
||||||
|
AddToAugmentations(GrapheneBoneLacings);
|
||||||
|
|
||||||
|
//Labor stat augmentations
|
||||||
|
var CASIE = new Augmentation("Computer Assisted Social Interaction Enhancement");
|
||||||
|
AddToAugmentations(CASIE);
|
||||||
|
|
||||||
|
//Hacking augmentations
|
||||||
|
var ArtificialBioNeuralNetwork = new Augmentation("Artificial Bio-neural Network Implant");
|
||||||
|
AddToAugmentations(ArtificialBioNeuralNetwork);
|
||||||
|
|
||||||
|
var ArtificialSynapticPotentiation = new Augmentation("Artificial Synaptic Potentiation");
|
||||||
|
AddToAugmentations(ArtificialSynapticPotentiation);
|
||||||
|
|
||||||
|
var SynapticEnhancement = new Augmentation("Synaptic Enhancement Implant");
|
||||||
|
AddToAugmentations(SynapticEnhancement);
|
||||||
|
|
||||||
|
var NeuralRetentionEnhancement = new Augmentation("Neural-Retention Enhancement");
|
||||||
|
AddToAugmentations(NeuralRetentionEnhancement);
|
||||||
|
|
||||||
|
var DataJack = new Augmentation("DataJack");
|
||||||
|
AddToAugmentations(DataJack);
|
||||||
|
|
||||||
|
var ENM = new Augmentation("Embedded Netburner Module");
|
||||||
|
AddToAugmentations(ENM);
|
||||||
|
|
||||||
|
var ENMCore = new Augmentation("Embedded Netburner Module Core Implant");
|
||||||
|
AddToAugmentations(ENMCore);
|
||||||
|
|
||||||
|
var ENMCoreV2 = new Augmentation("Embedded Netburner Module Core V2 Upgrade");
|
||||||
|
AddToAugmentations(ENMCoreV2);
|
||||||
|
|
||||||
|
var ENMCoreV3 = new Augmentation("Embedded Netburner Module Core V3 Upgrade");
|
||||||
|
AddToAugmentations(ENMCoreV3);
|
||||||
|
|
||||||
|
var ENMAnalyzeEngine = new Augmentation("Embedded Netburner Module Analyze Engine");
|
||||||
|
AddToAugmentations(ENMAnalyzeEngine);
|
||||||
|
|
||||||
|
var ENMDMA = new Augmentation("Embedded Netburner Module Direct Memory Access Upgrade");
|
||||||
|
AddToAugmentations(ENMDMA);
|
||||||
|
|
||||||
|
//Misc augmentations
|
||||||
|
}
|
||||||
|
|
||||||
|
applyAugmentations = function(aug) {
|
||||||
|
switch(aug.name) {
|
||||||
|
//Combat stat augmentations
|
||||||
|
case "Targeting I":
|
||||||
|
//Dex 5%
|
||||||
|
break;
|
||||||
|
case "Targeting II":
|
||||||
|
//Dex 5%
|
||||||
|
break;
|
||||||
|
case "Targeting III":
|
||||||
|
//Dex 5%
|
||||||
|
break;
|
||||||
|
case "Synthetic Heart":
|
||||||
|
//Agi and Str 10%
|
||||||
|
break;
|
||||||
|
case "Microfibral muscle":
|
||||||
|
//Strength and Defense 10%
|
||||||
|
break;
|
||||||
|
case "Combat Strength I":
|
||||||
|
//Str and Defense 5%
|
||||||
|
break;
|
||||||
|
case "Combat Strength II":
|
||||||
|
break;
|
||||||
|
case "Combat Strength III":
|
||||||
|
break;
|
||||||
|
case "Nanofiber Weave":
|
||||||
|
//str + Defense 10%
|
||||||
|
break;
|
||||||
|
case "Subdermal Armor":
|
||||||
|
//Defense 10%
|
||||||
|
break;
|
||||||
|
case "Wired Reflexes":
|
||||||
|
//Agility 10%
|
||||||
|
break;
|
||||||
|
case "Graphene Bone Lacings":
|
||||||
|
//Strength defense 15%
|
||||||
|
break;
|
||||||
|
|
||||||
|
//Labor stats augmentations
|
||||||
|
case "Computer Assisted Social Interaction Enhancement":
|
||||||
|
//Charisma 10%
|
||||||
|
break;
|
||||||
|
|
||||||
|
//Hacking augmentations
|
||||||
|
case "Artificial Bio-neural Network Implant":
|
||||||
|
//Hacking speed and money gained 10%
|
||||||
|
break;
|
||||||
|
case "Artificial Synaptic Potentiation":
|
||||||
|
//Hacking speed 15%
|
||||||
|
break;
|
||||||
|
case "Synaptic Enhancement Implant":
|
||||||
|
//Hacking speed 5%
|
||||||
|
break;
|
||||||
|
case "Neural-Retention Enhancement":
|
||||||
|
//Gain 10% more hacking exp
|
||||||
|
break;
|
||||||
|
case "DataJack":
|
||||||
|
//5% more money from hacking
|
||||||
|
break;
|
||||||
|
case "Embedded Netburner Module":
|
||||||
|
//Doesn't give anyhting itself but allows user to install
|
||||||
|
//ENM upgrades in the future, which are very powerful
|
||||||
|
break;
|
||||||
|
case "Embedded Netburner Module Core Implant":
|
||||||
|
//Hacking speed, money gained, and exp gained 5%
|
||||||
|
break;
|
||||||
|
case "Embedded Netburner Module Core V2 Upgrade":
|
||||||
|
//Hacking speed, money gained, and exp gained 10%
|
||||||
|
break;
|
||||||
|
case "Embedded Netburner Module Core V3 Upgrade":
|
||||||
|
//Hacking speed, money gained, and exp gained 15%
|
||||||
|
break;
|
||||||
|
case "Embedded Netburner Module Analyze Engine":
|
||||||
|
//Hacking speed 20%
|
||||||
|
break;
|
||||||
|
case "Embedded Netburner Module Direct Memory Access Upgrade":
|
||||||
|
//Money hacked 20%
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
default:
|
||||||
|
console.log("No such augmentation!");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
@ -84,8 +84,17 @@ initFactions = function() {
|
|||||||
AddToFactions(Volhaven);
|
AddToFactions(Volhaven);
|
||||||
|
|
||||||
//Criminal Organizations/Gangs
|
//Criminal Organizations/Gangs
|
||||||
|
var SpeakersForTheDead = new Faction("Speakers for the Dead");
|
||||||
|
AddToFactions(SpeakersForTheDead);
|
||||||
|
var DarkArmy = new Faction("The Dark Army");
|
||||||
|
AddToFactions(DarkArmy);
|
||||||
|
var TheSyndicate = new Faction("The Syndicate");
|
||||||
|
AddToFactions(TheSyndicate);
|
||||||
|
|
||||||
//Earlygame factions - factions the player will prestige with early on that don't
|
//Earlygame factions - factions the player will prestige with early on that don't
|
||||||
//belong in other categories
|
//belong in other categories
|
||||||
|
var TianDiHui = new Faction("Tian Di Hui"); //Society of the Heaven and Earth
|
||||||
|
AddToFactions(TianDiHui);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user