Fixed a bug with displaying Augmentations at a faction. More minor rebalancing for Augmentation requirements

This commit is contained in:
Daniel Xie 2017-05-04 14:42:27 -05:00
parent 8917284f27
commit c862969198
2 changed files with 41 additions and 39 deletions

@ -243,7 +243,7 @@ initAugmentations = function() {
AddToAugmentations(ArtificialBioNeuralNetwork);
var ArtificialSynapticPotentiation = new Augmentation("Artificial Synaptic Potentiation");
ArtificialSynapticPotentiation.setRequirements(20000, 400000000);
ArtificialSynapticPotentiation.setRequirements(20000, 80000000);
ArtificialSynapticPotentiation.setInfo("The body is injected with a chemical that artificially induces synaptic potentiation,\n" +
"otherwise known as the strengthening of synapses. This results in a enhanced cognitive abilities.\n\n" +
"This augmentation increases the player's hacking speed and hacking chance by 1%.");
@ -289,7 +289,7 @@ initAugmentations = function() {
AddToAugmentations(DataJack);
var ENM = new Augmentation("Embedded Netburner Module");
ENM.setRequirements(20000, 300000000);
ENM.setRequirements(20000, 100000000);
ENM.setInfo("A thin device embedded inside the arm containing a wireless module capable of connecting\n" +
"to nearby networks. Once connected, the Netburner Module is capable of capturing and\n" +
"processing all of the traffic on that network. By itself, the Embedded Netburner Module does\n" +
@ -381,7 +381,7 @@ initAugmentations = function() {
//Work Augmentations
var NuoptimalInjectorImplant = new Augmentation("Nuoptimal Nootropic Injector Implant");
NuoptimalInjectorImplant.setRequirements(12000, 75000000);
NuoptimalInjectorImplant.setRequirements(12000, 30000000);
NuoptimalInjectorImplant.setInfo("This torso implant automatically injects nootropic supplements into\n" +
"the bloodstream to improve memory, increase focus, and provide other\n" +
"cognitive enhancements.\n\n" +
@ -392,7 +392,7 @@ initAugmentations = function() {
AddToAugmentations(NuoptimalInjectorImplant);
var SpeechEnhancement = new Augmentation("Speech Enhancement");
SpeechEnhancement.setRequirements(6000, 20000000);
SpeechEnhancement.setRequirements(6000, 4000000);
SpeechEnhancement.setInfo("An advanced neural implant that improves your speaking abilities, making\n" +
"you more convincing and likable in conversations and overall improving your\n" +
"social interactions.\n\n" +
@ -404,7 +404,7 @@ initAugmentations = function() {
AddToAugmentations(SpeechEnhancement);
var FocusWire = new Augmentation("FocusWire"); //Stops procrastination
FocusWire.setRequirements(100000, 350000000);
FocusWire.setRequirements(100000, 200000000);
FocusWire.setInfo("A cranial implant that stops procrastination by blocking specific neural pathways\n" +
"in the brain.\n\n" +
"This augmentation: \n" +
@ -504,7 +504,7 @@ initAugmentations = function() {
//Misc augmentations
var Neurotrainer1 = new Augmentation("Neurotrainer I");
Neurotrainer1.setRequirements(4000, 4000000);
Neurotrainer1.setRequirements(4000, 3000000);
Neurotrainer1.setInfo("A decentralized cranial implant that improves the brain's ability to learn. It is\n" +
"installed by releasing millions of nanobots into the human brain, each of which\n" +
"attaches to a different neural pathway to enhance the brain's ability to retain\n" +
@ -514,7 +514,7 @@ initAugmentations = function() {
AddToAugmentations(Neurotrainer1);
var Neurotrainer2 = new Augmentation("Neurotrainer II");
Neurotrainer2.setRequirements(16000, 100000000);
Neurotrainer2.setRequirements(16000, 20000000);
Neurotrainer2.setInfo("A decentralized cranial implant that improves the brain's ability to learn. This\n" +
"is a more powerful version of the Neurotrainer I augmentation, but it does not\n" +
"require Neurotrainer I to be installed as a prerequisite.\n\n" +
@ -523,7 +523,7 @@ initAugmentations = function() {
AddToAugmentations(Neurotrainer2);
var Neurotrainer3 = new Augmentation("Neurotrainer III");
Neurotrainer3.setRequirements(40000, 725000000);
Neurotrainer3.setRequirements(40000, 100000000);
Neurotrainer3.setInfo("A decentralized cranial implant that improves the brain's ability to learn. This\n" +
"is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation,\n" +
"but it does not require either of them to be installed as a prerequisite.\n\n" +

@ -739,37 +739,39 @@ displayFactionAugmentations = function(factionName) {
}
for (var i = 0; i < faction.augmentations.length; ++i) {
var aug = Augmentations[faction.augmentations[i]];
var item = document.createElement("li");
var span = document.createElement("span");
var aElem = document.createElement("a");
var pElem = document.createElement("p");
aElem.setAttribute("href", "#");
var req = aug.baseRepRequirement * faction.augmentationRepRequirementMult;
if (faction.playerReputation >= req) {
aElem.setAttribute("class", "a-link-button");
pElem.innerHTML = "UNLOCKED";
//TODO Event listener for button to purchase augmentation
} else {
aElem.setAttribute("class", "a-link-button-inactive");
pElem.innerHTML = "LOCKED (Requires " + req + " faction reputation)";
pElem.style.color = "red";
}
aElem.style.display = "inline-block";
pElem.style.display = "inline-block";
aElem.innerHTML = aug.name;
aElem.addEventListener("click", function() {
console.log("here");
purchaseAugmentationBoxCreate(aug, faction);
});
span.appendChild(aElem);
span.appendChild(pElem);
item.appendChild(span);
augmentationsList.appendChild(item);
(function () {
var aug = Augmentations[faction.augmentations[i]];
var item = document.createElement("li");
var span = document.createElement("span");
var aElem = document.createElement("a");
var pElem = document.createElement("p");
aElem.setAttribute("href", "#");
var req = aug.baseRepRequirement * faction.augmentationRepRequirementMult;
if (faction.playerReputation >= req) {
aElem.setAttribute("class", "a-link-button");
pElem.innerHTML = "UNLOCKED - $" + aug.baseCost * faction.augmentationPriceMult;
//TODO Event listener for button to purchase augmentation
} else {
aElem.setAttribute("class", "a-link-button-inactive");
pElem.innerHTML = "LOCKED (Requires " + req + " faction reputation)";
pElem.style.color = "red";
}
aElem.style.display = "inline-block";
pElem.style.display = "inline-block";
aElem.innerHTML = aug.name;
aElem.addEventListener("click", function() {
console.log("here");
purchaseAugmentationBoxCreate(aug, faction);
});
span.appendChild(aElem);
span.appendChild(pElem);
item.appendChild(span);
augmentationsList.appendChild(item);
}()); //Immediate invocation closure
}
}