mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-30 04:47:03 +02:00
Implement standardized grafting time calcs
This commit is contained in:
@@ -15,7 +15,11 @@ export const getGraftingAvailableAugs = (player: IPlayer): string[] => {
|
||||
return augs.filter((augmentation: string) => !player.hasAugmentation(augmentation));
|
||||
};
|
||||
|
||||
export const graftingIntBonus = (player: IPlayer): number => {
|
||||
return 1 + (player.getIntelligenceBonus(3) - 1) / 3;
|
||||
};
|
||||
|
||||
export const calculateGraftingTimeWithBonus = (player: IPlayer, aug: GraftableAugmentation): number => {
|
||||
const baseTime = aug.time;
|
||||
return baseTime / (1 + (player.getIntelligenceBonus(3) - 1) / 3);
|
||||
return baseTime / graftingIntBonus(player);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user