mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-23 08:03:48 +01:00
prestige stuff with sg
This commit is contained in:
parent
a0a698e0af
commit
fdf2e72896
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user