From 125cd04383e9dd74f060f62f6c230e933940ff62 Mon Sep 17 00:00:00 2001 From: borisflagell Date: Tue, 11 Oct 2022 18:12:06 +0300 Subject: [PATCH] Fix #3884 Fix #3884 --- src/Augmentation/Augmentation.tsx | 11 +++--- src/Faction/ui/AugmentationsPage.tsx | 57 ++++++++++++++++++++-------- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/src/Augmentation/Augmentation.tsx b/src/Augmentation/Augmentation.tsx index e00b1c6af..f767ef763 100644 --- a/src/Augmentation/Augmentation.tsx +++ b/src/Augmentation/Augmentation.tsx @@ -548,13 +548,12 @@ export class Augmentation { } } else if (augmentationReference.factions.includes(FactionNames.ShadowsOfAnarchy)) { const soaAugmentationNames = initSoAAugmentations().map((augmentation) => augmentation.name); - const soaMultiplier = Math.pow( - CONSTANTS.SoACostMult, - soaAugmentationNames.filter((augmentationName) => Player.hasAugmentation(augmentationName)).length, - ); - moneyCost = augmentationReference.baseCost * soaMultiplier; + const soaAugCount = soaAugmentationNames.filter((augmentationName) => + Player.hasAugmentation(augmentationName), + ).length; + moneyCost = augmentationReference.baseCost * Math.pow(CONSTANTS.SoACostMult, soaAugCount); if (soaAugmentationNames.find((augmentationName) => augmentationName === augmentationReference.name)) { - repCost = augmentationReference.baseRepRequirement * soaMultiplier; + repCost = augmentationReference.baseRepRequirement * Math.pow(CONSTANTS.SoARepMult, soaAugCount); } } else { moneyCost = diff --git a/src/Faction/ui/AugmentationsPage.tsx b/src/Faction/ui/AugmentationsPage.tsx index dbfdf6077..3e404baf6 100644 --- a/src/Faction/ui/AugmentationsPage.tsx +++ b/src/Faction/ui/AugmentationsPage.tsx @@ -14,6 +14,7 @@ import { Reputation } from "../../ui/React/Reputation"; import { FactionNames } from "../data/FactionNames"; import { Faction } from "../Faction"; import { getFactionAugmentationsFiltered, hasAugmentationPrereqs, purchaseAugmentation } from "../FactionHelpers"; +import { CONSTANTS } from "../../Constants"; type IProps = { faction: Faction; @@ -130,11 +131,45 @@ export function AugmentationsPage(props: IProps): React.ReactElement { const multiplierComponent = props.faction.name !== FactionNames.ShadowsOfAnarchy ? ( - - Price multiplier: x {numeralWrapper.formatReallyBigNumber(getGenericAugmentationPriceMultiplier())} - + + The price of every Augmentation increases for every queued Augmentation and it is reset when you install + them. + + } + > + + Price multiplier: x {numeralWrapper.formatReallyBigNumber(getGenericAugmentationPriceMultiplier())} + + ) : ( - <> + + The prices of Shadows of Anarchy's Augmentations increases for every one already bought. These price are NOT + reset when installing augmentations. + + } + > + + Price multiplier: x{" "} + {numeralWrapper.formatReallyBigNumber( + Math.pow( + CONSTANTS.SoACostMult, + augs.filter((augmentationName) => Player.hasAugmentation(augmentationName)).length, + ), + )} +
+ Reputation multiplier: x{" "} + {numeralWrapper.formatReallyBigNumber( + Math.pow( + CONSTANTS.SoARepMult, + augs.filter((augmentationName) => Player.hasAugmentation(augmentationName)).length, + ), + )} +
+
); return ( @@ -156,20 +191,10 @@ export function AugmentationsPage(props: IProps): React.ReactElement { my: 1, }} > - - The price of every Augmentation increases for every queued Augmentation and it is reset when you - install them. - - } - > - {multiplierComponent} - + <>{multiplierComponent} Reputation: - - +
Favor: