mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
2 new exploits
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { WorkerScript } from "../Netscript/WorkerScript";
|
||||
import { IPlayer } from "../PersonObjects/IPlayer";
|
||||
import { Exploit } from "../Exploits/Exploit";
|
||||
import * as bcrypt from "bcryptjs";
|
||||
|
||||
export interface INetscriptExtra {
|
||||
heart: {
|
||||
@@ -9,6 +10,7 @@ export interface INetscriptExtra {
|
||||
exploit(): void;
|
||||
bypass(doc: Document): void;
|
||||
alterReality(): void;
|
||||
rainbow(guess: string): void;
|
||||
}
|
||||
|
||||
export function NetscriptExtra(player: IPlayer, workerScript: WorkerScript): INetscriptExtra {
|
||||
@@ -50,5 +52,17 @@ export function NetscriptExtra(player: IPlayer, workerScript: WorkerScript): INe
|
||||
player.giveExploit(Exploit.RealityAlteration);
|
||||
}
|
||||
},
|
||||
rainbow: function (guess: unknown): void {
|
||||
async function tryGuess(): Promise<void> {
|
||||
const verified = await bcrypt.compare(
|
||||
guess + "",
|
||||
"$2a$10$aertxDEkgor8baVtQDZsLuMwwGYmkRM/ohcA6FjmmzIHQeTCsrCcO",
|
||||
);
|
||||
if (verified) {
|
||||
player.giveExploit(Exploit.INeedARainbow);
|
||||
}
|
||||
}
|
||||
tryGuess();
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user