added some funcions

This commit is contained in:
Olivier Gagnon
2021-10-27 21:07:58 -04:00
parent b1328b02ce
commit 53cb37a9fd
4 changed files with 43 additions and 4 deletions
+29
View File
@@ -3305,6 +3305,16 @@ interface NS extends Singularity {
*/
weaken (host: Host, opts?: BasicHGWOptions): Promise<number>;
/**
* Returns the security decrease that would occur if a weaken with this many threads happened.
*
* @ramCost 1 GB
* @param {number} threads Amount of threads that will be used.
* @param {number} cores Optional. The number of cores of the server that would run weaken.
* @returns {number} The security decrease.
*/
weakenAnalyze (threads: number, cores?: number): number;
/**
* This function returns the number of script threads you need when running the {@link hack} command
* to steal the specified amount of money from the target server.
@@ -3343,6 +3353,15 @@ interface NS extends Singularity {
*/
hackAnalyzePercent (host: Host): number;
/**
* Returns the security increase that would occur if a hack with this many threads happened.
*
* @ramCost 1 GB
* @param {number} threads Amount of threads that will be used.
* @returns {number} The security increase.
*/
hackAnalyzeSecurity (threads: number): number;
/**
* Returns the chance you have of successfully hacking the specified server.
*
@@ -3374,6 +3393,16 @@ interface NS extends Singularity {
*/
growthAnalyze (host: Host, growthAmount: number): number;
/**
* Returns the security increase that would occur if a grow with this many threads happened.
*
* @ramCost 1 GB
* @param {number} threads Amount of threads that will be used.
* @returns {number} The security increase.
*/
growthAnalyzeSecurity (threads: number): number;
/**
* Suspends the script for n milliseconds.
*