Added growthAnalyze() NS function. Fixed GH issue #492. In Gang mechanic, added new hacking augs/upgrades. Also rebalanced defense upgrades. Added new 'compact' main menu configuration

This commit is contained in:
danielyxie
2018-11-19 21:54:03 -08:00
parent 1a47e81001
commit 66d50a7ae4
13 changed files with 222 additions and 52 deletions
+26 -1
View File
@@ -56,7 +56,7 @@ weaken
.. js:function:: weaken(hostname/ip)
:param string hostname.ip: IP or hostname of the target server to weaken
:param string hostname/ip: IP or hostname of the target server to weaken
:returns: The amount by which the target server's security level was decreased. This is equivalent to 0.05 multiplied
by the number of script threads
:RAM cost: 0.15 GB
@@ -72,6 +72,31 @@ weaken
weaken("foodnstuff");
growthAnalyze
^^^^^^^^^^^^^
.. js:function:: growthAnalyze(hostname/ip, growthAmount)
:param string hostname/ip: IP or hostname of server to analyze
:param number growthAmount: Multiplicative factor by which the server is grown. Decimal form.
:returns: The amount of grow() calls needed to grow the specified server by the specified amount
:RAM cost: 1 GB
This function returns the number of "growths" needed in order to increase 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.
For example, if you want to determine how many `grow()` calls you need
to double the amount of money on `foodnstuff`, you would use::
growthAnalyze("foodnstuff", 2);
If this returns 100, then this means you need to call `grow()` 100 times
in order to double the money (or once with 100 threads).
**Warning**: The value returned by this function isn't necessarily a whole number.
sleep
^^^^^