Fix #3884
This commit is contained in:
borisflagell 2022-10-11 18:12:06 +03:00
parent 1d5d839cd9
commit 125cd04383
2 changed files with 46 additions and 22 deletions

@ -548,13 +548,12 @@ export class Augmentation {
} }
} else if (augmentationReference.factions.includes(FactionNames.ShadowsOfAnarchy)) { } else if (augmentationReference.factions.includes(FactionNames.ShadowsOfAnarchy)) {
const soaAugmentationNames = initSoAAugmentations().map((augmentation) => augmentation.name); const soaAugmentationNames = initSoAAugmentations().map((augmentation) => augmentation.name);
const soaMultiplier = Math.pow( const soaAugCount = soaAugmentationNames.filter((augmentationName) =>
CONSTANTS.SoACostMult, Player.hasAugmentation(augmentationName),
soaAugmentationNames.filter((augmentationName) => Player.hasAugmentation(augmentationName)).length, ).length;
); moneyCost = augmentationReference.baseCost * Math.pow(CONSTANTS.SoACostMult, soaAugCount);
moneyCost = augmentationReference.baseCost * soaMultiplier;
if (soaAugmentationNames.find((augmentationName) => augmentationName === augmentationReference.name)) { if (soaAugmentationNames.find((augmentationName) => augmentationName === augmentationReference.name)) {
repCost = augmentationReference.baseRepRequirement * soaMultiplier; repCost = augmentationReference.baseRepRequirement * Math.pow(CONSTANTS.SoARepMult, soaAugCount);
} }
} else { } else {
moneyCost = moneyCost =

@ -14,6 +14,7 @@ import { Reputation } from "../../ui/React/Reputation";
import { FactionNames } from "../data/FactionNames"; import { FactionNames } from "../data/FactionNames";
import { Faction } from "../Faction"; import { Faction } from "../Faction";
import { getFactionAugmentationsFiltered, hasAugmentationPrereqs, purchaseAugmentation } from "../FactionHelpers"; import { getFactionAugmentationsFiltered, hasAugmentationPrereqs, purchaseAugmentation } from "../FactionHelpers";
import { CONSTANTS } from "../../Constants";
type IProps = { type IProps = {
faction: Faction; faction: Faction;
@ -130,11 +131,45 @@ export function AugmentationsPage(props: IProps): React.ReactElement {
const multiplierComponent = const multiplierComponent =
props.faction.name !== FactionNames.ShadowsOfAnarchy ? ( props.faction.name !== FactionNames.ShadowsOfAnarchy ? (
<Tooltip
title={
<Typography>
The price of every Augmentation increases for every queued Augmentation and it is reset when you install
them.
</Typography>
}
>
<Typography> <Typography>
<b>Price multiplier:</b> x {numeralWrapper.formatReallyBigNumber(getGenericAugmentationPriceMultiplier())} <b>Price multiplier:</b> x {numeralWrapper.formatReallyBigNumber(getGenericAugmentationPriceMultiplier())}
</Typography> </Typography>
</Tooltip>
) : ( ) : (
<></> <Tooltip
title={
<Typography>
The prices of Shadows of Anarchy's Augmentations increases for every one already bought. These price are NOT
reset when installing augmentations.
</Typography>
}
>
<Typography>
<b>Price multiplier:</b> x{" "}
{numeralWrapper.formatReallyBigNumber(
Math.pow(
CONSTANTS.SoACostMult,
augs.filter((augmentationName) => Player.hasAugmentation(augmentationName)).length,
),
)}
<br />
<b>Reputation multiplier:</b> x{" "}
{numeralWrapper.formatReallyBigNumber(
Math.pow(
CONSTANTS.SoARepMult,
augs.filter((augmentationName) => Player.hasAugmentation(augmentationName)).length,
),
)}
</Typography>
</Tooltip>
); );
return ( return (
@ -156,20 +191,10 @@ export function AugmentationsPage(props: IProps): React.ReactElement {
my: 1, my: 1,
}} }}
> >
<Tooltip <>{multiplierComponent}</>
title={
<Typography>
The price of every Augmentation increases for every queued Augmentation and it is reset when you
install them.
</Typography>
}
>
{multiplierComponent}
</Tooltip>
<Typography> <Typography>
<b>Reputation:</b> <Reputation reputation={props.faction.playerReputation} /> <b>Reputation:</b> <Reputation reputation={props.faction.playerReputation} />
</Typography> <br />
<Typography>
<b>Favor:</b> <Favor favor={Math.floor(props.faction.favor)} /> <b>Favor:</b> <Favor favor={Math.floor(props.faction.favor)} />
</Typography> </Typography>
</Box> </Box>