MISC: small fixes (#270)

* infiltration gain bug fix
* fix corp division description
* avoid some issues with Infinity at super high NFG levels
Co-authored-by: Daniel Perez Alvarez <danielpza@protonmail.com>
This commit is contained in:
Mughur
2023-01-02 20:51:59 +02:00
committed by GitHub
parent dfa691784c
commit 1baa615def
7 changed files with 19 additions and 15 deletions

View File

@@ -3938,6 +3938,7 @@ interface HackingFormulas {
hackPercent(server: Server, player: Person): number;
/**
* Calculate the percent a server would grow to.
* Not exact due to limitations of mathematics.
* (Ex: 3.0 would would grow the server to 300% of its current value.)
* @param server - Server info from {@link NS.getServer | getServer}
* @param threads - Amount of thread.
@@ -4615,11 +4616,11 @@ export interface NS {
*
* Use your hacking skills to increase the amount of money available on a server.
* The runtime for this command depends on your hacking level and the target servers
* security level. When `grow` completes, the money available on a target server will
* be increased by a certain, fixed percentage. This percentage is determined by the
* target servers growth rate (which varies between servers) and security level. Generally,
* higher-level servers have higher growth rates. The {@link NS.getServerGrowth | getServerGrowth} function can be used
* to obtain a servers growth rate.
* security level. When `grow` completes, the money available on a target server will be increased
* by amount equal to the number of threads used and a certain, fixed percentage of current money on
* the server. This percentage is determined by the target servers growth rate (which varies between servers)
* and security level. Generally, higher-level servers have higher growth rates.
* The {@link NS.getServerGrowth | getServerGrowth} function can be used to obtain a servers growth rate.
*
* Like {@link NS.hack | hack}, `grow` can be called on any server, regardless of where the script is running.
* The grow() command requires root access to the target server, but there is no required hacking
@@ -4773,6 +4774,8 @@ export interface NS {
* the amount of money available on the specified server by the specified amount.
* The specified amount is multiplicative and is in decimal form, not percentage.
*
* Due to limitations of mathematics, this function won't be the true value, but an approximation.
*
* Warning: The value returned by this function isnt necessarily a whole number.
*
* @example