This commit is contained in:
nickofolas
2022-03-22 17:53:57 -05:00
parent d6e0180116
commit 3df3e04f9c
6 changed files with 35 additions and 16 deletions
@@ -1,3 +1,5 @@
import { sum } from "lodash";
import { Augmentation } from "../../Augmentation/Augmentation";
import { CONSTANTS } from "../../Constants";
@@ -20,7 +22,10 @@ export class CraftableAugmentation {
}
get time(): number {
// CONSTANTS.AugmentationCraftingTimeMult
return 15000;
// Time = 1 hour * log_2(sum(aug multipliers) || 1) + 30 minutes
const antiLog = Math.max(sum(Object.values(this.augmentation.mults)), 1);
const mult = Math.log2(antiLog);
return CONSTANTS.AugmentationCraftingTimeBase * mult + CONSTANTS.MillisecondsPerHalfHour;
}
}
@@ -108,7 +108,11 @@ export const GraftingRoot = (): React.ReactElement => {
}
/>
<Typography color={Settings.theme.info}>
<b>Time to Craft:</b> {convertTimeMsToTimeElapsedString(CraftableAugmentations[selectedAug].time)}
<b>Time to Craft:</b>{" "}
{convertTimeMsToTimeElapsedString(
CraftableAugmentations[selectedAug].time / (1 + (player.getIntelligenceBonus(3) - 1) / 3),
)}
{/* Use formula so the displayed creation time is accurate to player bonus */}
</Typography>
<Typography sx={{ maxHeight: 305, overflowY: "scroll" }}>
{(() => {