From 21611ec57108e96691d258a1c7fff00775a0838b Mon Sep 17 00:00:00 2001 From: Tesseract1234567890 Date: Thu, 3 Jun 2021 11:59:49 -0400 Subject: [PATCH] Made random mult into function --- src/Augmentation/AugmentationHelpers.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Augmentation/AugmentationHelpers.jsx b/src/Augmentation/AugmentationHelpers.jsx index 0a6cf4dbf..26f4ebbd1 100644 --- a/src/Augmentation/AugmentationHelpers.jsx +++ b/src/Augmentation/AugmentationHelpers.jsx @@ -28,6 +28,12 @@ function AddToAugmentations(aug) { Augmentations[name] = aug; } +function getRandomMultiplier(min, max) { + var randomNumber = (new WHRNG(Player.lastUpdate)); + randomNumber.step(); + return (min + (max - min) * (randomNumber.random())); +} + function initAugmentations() { for (var name in Factions) { if (Factions.hasOwnProperty(name)) { @@ -43,7 +49,7 @@ function initAugmentations() { name:AugmentationNames.CircadianRhythm, moneyCost: 1e12, repCost:450e3, info:"An injection which improves your perception by a variable amount.

" + "This augmentation increases the player's hacking skill by a variable amount.", - hacking_mult: (0.9 + 1.1 * (new WHRNG(Player.lastUpdate).random())), + hacking_mult: getRandomMultiplier(0.9, 2), }); CircadianRhythm.addToFactions(["Illuminati"]); if (augmentationExists(AugmentationNames.CircadianRhythm)) {