From 40d550992a3380d2812ff426a91767b7c2f3b105 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Wed, 25 Jul 2018 00:40:28 -0400 Subject: [PATCH] cna buy the red pill with negative money --- src/Faction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Faction.js b/src/Faction.js index ccec819af..806d4ae39 100644 --- a/src/Faction.js +++ b/src/Faction.js @@ -669,7 +669,7 @@ function purchaseAugmentation(aug, fac, sing=false) { var txt = "You must first purchase or install " + aug.prereqs.join(",") + " before you can " + "purchase this one."; if (sing) {return txt;} else {dialogBoxCreate(txt);} - } else if (Player.money.lt(aug.baseCost * factionInfo.augmentationPriceMult)) { + } else if (aug.baseCost !== 0 && Player.money.lt(aug.baseCost * factionInfo.augmentationPriceMult)) { let txt = "You don't have enough money to purchase " + aug.name; if (sing) {return txt;} dialogBoxCreate(txt); @@ -677,7 +677,7 @@ function purchaseAugmentation(aug, fac, sing=false) { let txt = "You don't have enough faction reputation to purchase " + aug.name; if (sing) {return txt;} dialogBoxCreate(txt); - } else if (Player.money.gte(aug.baseCost * factionInfo.augmentationPriceMult)) { + } else if (aug.baseCost === 0 || Player.money.gte(aug.baseCost * factionInfo.augmentationPriceMult)) { if (Player.firstAugPurchased === false) { Player.firstAugPurchased = true; document.getElementById("augmentations-tab").style.display = "list-item";