diff --git a/src/CotMG/StaneksGift.ts b/src/CotMG/StaneksGift.ts index 19b46bf5b..9107e56d4 100644 --- a/src/CotMG/StaneksGift.ts +++ b/src/CotMG/StaneksGift.ts @@ -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; } /** diff --git a/src/Prestige.ts b/src/Prestige.ts index d82bbbd5b..1aed669bd 100755 --- a/src/Prestige.ts +++ b/src/Prestige.ts @@ -27,6 +27,7 @@ import { Terminal } from "./Terminal"; import { dialogBoxCreate } from "./ui/React/DialogBox"; import Decimal from "decimal.js"; +import { staneksGift } from "./CotMG/Helper"; const BitNode8StartingMoney = 250e6; @@ -143,6 +144,8 @@ function prestigeAugmentation(): void { joinFaction(Factions["Church of the Machine God"]); } + staneksGift.prestigeAugmentation(); + resetPidCounter(); } @@ -270,6 +273,8 @@ function prestigeSourceFile(flume: boolean): void { updateHashManagerCapacity(Player); } + staneksGift.prestigeSourceFile(); + // Gain int exp if (SourceFileFlags[5] !== 0 && !flume) Player.gainIntelligenceExp(300);