prestige stuff with sg

This commit is contained in:
Olivier Gagnon
2021-10-16 21:38:03 -04:00
parent a0a698e0af
commit fdf2e72896
2 changed files with 13 additions and 1 deletions
+8 -1
View File
@@ -12,6 +12,7 @@ import { CONSTANTS } from "../Constants";
import { StanekConstants } from "./data/Constants";
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
import { Player } from "../Player";
import { AugmentationNames } from "../Augmentation/data/AugmentationNames";
export class StaneksGift implements IStaneksGift {
storedCycles = 0;
@@ -45,6 +46,7 @@ export class StaneksGift implements IStaneksGift {
}
process(p: IPlayer, numCycles = 1): void {
if (!p.hasAugmentation(AugmentationNames.StaneksGift1)) return;
this.storedCycles += numCycles;
this.storedCycles -= 5;
this.storedCycles = Math.max(0, this.storedCycles);
@@ -121,6 +123,10 @@ export class StaneksGift implements IStaneksGift {
this.fragments = [];
}
clearCharge(): void {
this.fragments.forEach((f) => (f.charge = 0));
}
updateMults(p: IPlayer): void {
p.reapplyAllAugmentations(true);
p.reapplyAllSourceFiles();
@@ -198,11 +204,12 @@ export class StaneksGift implements IStaneksGift {
}
prestigeAugmentation(): void {
this.clear();
this.clearCharge();
}
prestigeSourceFile(): void {
this.clear();
this.storedCycles = 0;
}
/**