Added Prestiging

This commit is contained in:
Daniel Xie
2017-02-20 16:06:16 -06:00
parent 4a60874a3a
commit fa456c48b6
6 changed files with 380 additions and 123 deletions
+69 -1
View File
@@ -40,7 +40,75 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
confirmButton.parentNode.replaceChild(newConfirmButton, confirmButton);
newConfirmButton.addEventListener("click", function() {
if (Player.money >= (aug.baseCost * fac.augmentationPriceMult)) {
//TODO Requirements for specific augmentations (e.g Embedded Netburner Module b4 its upgrades)
if (aug.name == "Augmented Targeting II") {
var targeting1 = Augmentations["Augmented Targeting I"];
if (targeting1 == null) {
console.log("ERROR: Could not find Augmented Targeting I");
return;
}
if (targeting1.owned == false) {
dialogBoxCreate("You must first install Augmented Targeting I before you can upgrade it to Augmented Targeting II");
}
} else if (aug.name == "Augmented Targeting III") {
var targeting2 = Augmentations["Augmented Targeting II"];
if (targeting2 == null) {
console.log("ERROR: Could not find Augmented Targeting II");
return;
}
if (targeting2.owned == false) {
dialogBoxCreate("You must first install Augmented Targeting II before you can upgrade it to Augmented Targeting III");
}
} else if (aug.name == "Combat Rib II") {
var combatRib1 = Augmentations["Combat Rib I"];
if (combatRib1 == null) {
console.log("ERROR: Could not find Combat Rib I");
return;
}
if (combatRib1.owned == false) {
dialogBoxCreate("You must first install Combat Rib I before you can upgrade it to Combat Rib II");
}
} else if (aug.name == "Combat Rib III") {
var combatRib2 = Augmentations["Combat Rib II"];
if (combatRib2 == null) {
console.log("ERROR: Could not find Combat Rib II");
return;
}
if (combatRib2.owned == false) {
dialogBoxCreate("You must first install Combat Rib II before you can upgrade it to Combat Rib III");
}
} else if (aug.name == "Embedded Netburner Module Core V2 Upgrade") {
var coreImplant = Augmentations["Embedded Netburner Module Core Implant"];
if (coreImplant == null) {
console.log("ERROR: Could not find ENM Core Implant");
return;
}
if (coreImplant.owned == false) {
dialogBoxCreate("You must first install Embedded Netburner Module Core Implant before you can upgrade it to V2");
}
} else if (aug.name == "Embedded Netburner Module Core V3 Upgrade") {
var v2Upgrade = Augmentations["Embedded Netburner Module Core V2 Upgrade"];
if (v2Upgrade == null) {
console.log("ERROR: Could not find ENM Core V2 upgrade");
return;
}
if (v2Upgrade.owned == false) {
dialogBoxCreate("you must first install Embedded Netburner Module Core V2 Upgrade before you can upgrade it to V3");
}
} else if (aug.name == "Embedded Netburner Module Core Implant" ||
aug.name == "Embedded Netburner Module Analyze Engine" ||
aug.name == "Embedded Netburner Module Direct Memory Access Upgrade") {
var enm = Augmentations["Embedded Netburner Module"];
if (enm == null) {
console.log("ERROR: Could not find ENM");
return;
}
if (enm.owned == false) {
dialogBoxCreate("You must first install the Embedded Netburner Module before installing any upgrades to it");
}
} else if (Player.money >= (aug.baseCost * fac.augmentationPriceMult)) {
applyAugmentation(aug, fac);
//TODO Make this text better
dialogBoxCreate("You slowly drift to sleep as " + fac.name + "'s scientists put you under <br>" +