mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-12 18:40:07 +02:00
DARKNET: Darkweb Expansion Project & Bitnode (#2139)
This is BN15. It is a really big change; see the PR for all the details.
This commit is contained in:
committed by
GitHub
parent
a674633f6c
commit
6073964768
@@ -3,6 +3,7 @@ import { Person as IPerson } from "@nsdefs";
|
||||
import { calculateIntelligenceBonus } from "./PersonObjects/formulas/intelligence";
|
||||
import { Server as IServer } from "@nsdefs";
|
||||
import { clampNumber } from "./utils/helpers/clampNumber";
|
||||
import { DarknetServer } from "./Server/DarknetServer";
|
||||
|
||||
/** Returns the chance the person has to successfully hack a server */
|
||||
export function calculateHackingChance(server: IServer, person: IPerson): number {
|
||||
@@ -57,6 +58,7 @@ export function calculatePercentMoneyHacked(server: IServer, person: IPerson): n
|
||||
|
||||
/** Returns time it takes to complete a hack on a server, in seconds */
|
||||
export function calculateHackingTime(server: IServer, person: IPerson): number {
|
||||
if (server instanceof DarknetServer) return 16;
|
||||
const { hackDifficulty, requiredHackingSkill } = server;
|
||||
if (typeof hackDifficulty !== "number" || typeof requiredHackingSkill !== "number") return Infinity;
|
||||
const difficultyMult = requiredHackingSkill * hackDifficulty;
|
||||
|
||||
Reference in New Issue
Block a user