mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
API: Add weakenEffect to formulas.hacking namespace (#2626)
This commit is contained in:
10
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
10
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -6299,6 +6299,16 @@ interface HackingFormulas {
|
||||
* @returns The calculated weaken time, in milliseconds.
|
||||
*/
|
||||
weakenTime(server: Server, player: Person): number;
|
||||
/**
|
||||
* Calculate the security decrease from a weaken operation.
|
||||
* Unlike other hacking formulas, weaken effect depends only on thread count and
|
||||
* core count, not on server or player properties. The core bonus formula is
|
||||
* {@code 1 + (cores - 1) / 16}.
|
||||
* @param threads - Number of threads running weaken.
|
||||
* @param cores - Number of cores on the host server. Default 1.
|
||||
* @returns The security decrease amount.
|
||||
*/
|
||||
weakenEffect(threads: number, cores?: number): number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user