mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-09-20 04:48:38 +02:00
Implement graft time calc helper function
This commit is contained in:
parent
5490d8c837
commit
304e7e69d5
@ -1,5 +1,6 @@
|
||||
import { Augmentations } from "../../Augmentation/Augmentations";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { GraftableAugmentation } from "./GraftableAugmentation";
|
||||
import { IPlayer } from "../IPlayer";
|
||||
|
||||
export const getGraftingAvailableAugs = (player: IPlayer): string[] => {
|
||||
@ -13,3 +14,8 @@ export const getGraftingAvailableAugs = (player: IPlayer): string[] => {
|
||||
|
||||
return augs.filter((augmentation: string) => !player.hasAugmentation(augmentation));
|
||||
};
|
||||
|
||||
export const calculateGraftingTimeWithBonus = (player: IPlayer, aug: GraftableAugmentation): number => {
|
||||
const baseTime = aug.time;
|
||||
return baseTime / (1 + (player.getIntelligenceBonus(3) - 1) / 3);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user