From 79238ea5e9cf2edfc59f8e4dea7346299fba7e9b Mon Sep 17 00:00:00 2001 From: phyzical Date: Tue, 29 Mar 2022 23:42:57 +0800 Subject: [PATCH] fix for augmentation pricing --- src/Augmentation/AugmentationCreator.tsx | 5 +---- src/Augmentation/AugmentationHelpers.tsx | 14 ++++++-------- src/PersonObjects/Resleeving/Resleeving.ts | 4 ++-- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/Augmentation/AugmentationCreator.tsx b/src/Augmentation/AugmentationCreator.tsx index 17f6c12bb..2b1f87002 100644 --- a/src/Augmentation/AugmentationCreator.tsx +++ b/src/Augmentation/AugmentationCreator.tsx @@ -95,7 +95,7 @@ function getRandomBonus(): any { return bonuses[Math.floor(bonuses.length * randomNumber.random())]; } -export const infiltratorsOtherAugmentations = [ +export const infiltratorsAugmentations = [ new Augmentation({ name: AugmentationNames.BionicFingers, repCost: 15e1, @@ -159,9 +159,6 @@ export const infiltratorsOtherAugmentations = [ "blunt damage when used as an alloy with almost any other metal you can think of.", factions: [FactionNames.Infiltrators], }), -]; - -export const infiltratorsMiniGameAugmentations = [ new Augmentation({ name: AugmentationNames.PythiasBrainStem, repCost: 1e2, diff --git a/src/Augmentation/AugmentationHelpers.tsx b/src/Augmentation/AugmentationHelpers.tsx index 3ec1b6856..b0bb834d5 100644 --- a/src/Augmentation/AugmentationHelpers.tsx +++ b/src/Augmentation/AugmentationHelpers.tsx @@ -17,8 +17,7 @@ import { churchOfTheMachineGodAugmentations, generalAugmentations, getNextNeuroFluxLevel, - infiltratorsMiniGameAugmentations, - infiltratorsOtherAugmentations, + infiltratorsAugmentations, initNeuroFluxGovernor, initUnstableCircadianModulator, } from "./AugmentationCreator"; @@ -34,8 +33,7 @@ function createAugmentations(): void { initNeuroFluxGovernor(), initUnstableCircadianModulator(), ...generalAugmentations, - ...infiltratorsMiniGameAugmentations, - ...infiltratorsOtherAugmentations, + ...infiltratorsAugmentations, ...(factionExists(FactionNames.Bladeburners) ? bladeburnerAugmentations : []), ...(factionExists(FactionNames.ChurchOfTheMachineGod) ? churchOfTheMachineGodAugmentations : []), ].map(resetAugmentation); @@ -78,10 +76,10 @@ function updateNeuroFluxGovernorCosts(neuroFluxGovernorAugmentation: Augmentatio function updateInfiltratorCosts(infiltratorAugmentation: Augmentation): void { const infiltratorMultiplier = - infiltratorsMiniGameAugmentations.filter((augmentation) => Player.hasAugmentation(augmentation.name)).length + 1; - infiltratorAugmentation.baseCost = Math.pow(infiltratorAugmentation.baseCost * 1000, infiltratorMultiplier); - if (infiltratorsMiniGameAugmentations.find((augmentation) => augmentation.name === infiltratorAugmentation.name)) { - infiltratorAugmentation.baseRepRequirement *= infiltratorMultiplier; + infiltratorsAugmentations.filter((augmentation) => Player.hasAugmentation(augmentation.name)).length + 1; + infiltratorAugmentation.baseCost = Math.pow(infiltratorAugmentation.startingCost * 1000, infiltratorMultiplier); + if (infiltratorsAugmentations.find((augmentation) => augmentation.name === infiltratorAugmentation.name)) { + infiltratorAugmentation.baseRepRequirement = infiltratorAugmentation.startingRepRequirement * infiltratorMultiplier; } } diff --git a/src/PersonObjects/Resleeving/Resleeving.ts b/src/PersonObjects/Resleeving/Resleeving.ts index e3ce76839..f00060f7e 100644 --- a/src/PersonObjects/Resleeving/Resleeving.ts +++ b/src/PersonObjects/Resleeving/Resleeving.ts @@ -19,7 +19,7 @@ import { IPlayerOwnedAugmentation, PlayerOwnedAugmentation } from "../../Augment import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { getRandomInt } from "../../utils/helpers/getRandomInt"; -import { infiltratorsMiniGameAugmentations } from "../../Augmentation/AugmentationCreator"; +import { infiltratorsAugmentations } from "../../Augmentation/AugmentationCreator"; // Executes the actual re-sleeve when one is purchased export function purchaseResleeve(r: Resleeve, p: IPlayer): boolean { @@ -112,7 +112,7 @@ export function generateResleeves(): Resleeve[] { AugmentationNames.StaneksGift1, AugmentationNames.StaneksGift2, AugmentationNames.StaneksGift3, - ...infiltratorsMiniGameAugmentations, + ...infiltratorsAugmentations, ].map((augmentation) => augmentation as string); if (forbidden.includes(randKey)) { continue;