mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
Implement entropy accumulation system
This commit is contained in:
@@ -5,6 +5,8 @@ import { IPlayer } from "../IPlayer";
|
||||
|
||||
import { Augmentation } from "../../Augmentation/Augmentation";
|
||||
|
||||
import { applyEntropy as calculateEntropy } from "../Grafting/EntropyAccumulation";
|
||||
|
||||
export function hasAugmentation(this: IPlayer, aug: string | Augmentation, installed = false): boolean {
|
||||
const augName: string = aug instanceof Augmentation ? aug.name : aug;
|
||||
|
||||
@@ -24,3 +26,10 @@ export function hasAugmentation(this: IPlayer, aug: string | Augmentation, insta
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
export function applyEntropy(this: IPlayer, stacks = 1): void {
|
||||
const newMultipliers = calculateEntropy(this, stacks);
|
||||
for (const [mult, val] of Object.entries(newMultipliers)) {
|
||||
this.setMult(mult, val);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user