v0.36.0 - Bladeburner BitNode (BN-6)

This commit is contained in:
danielyxie 2018-05-02 12:38:11 -05:00
parent 8a0277d631
commit 9acc422f05
66 changed files with 137369 additions and 1138 deletions

90
css/bladeburner.css Normal file

@ -0,0 +1,90 @@
#bladeburner-container p,
#bladeburner-container pre,
#bladeburner-container a,
#bladeburner-container div,
#bladeburner-container td {
font-size: 13px;
}
.bladeburner-action {
border:1px solid white;
margin:7px;
padding:7px;
white-space: pre-wrap;
}
.bladeburner-action pre {
white-space: pre-wrap;
}
/* Whatever action is currently active */
.bladeburner-active-action {
border:4px solid white;
}
/* Action & Skills panel navigation button */
.bladeburner-nav-button {
border:1px solid white;
color:white;
padding:2px;
margin:2px;
}
.bladeburner-nav-button:hover {
background-color:#3d4044;
}
.bladeburner-nav-button-inactive {
border:1px solid white;
padding:2px;
margin:2px;
text-decoration: none;
background-color: #555;
cursor: default;
pointer-events: none;
}
/* Bladeburner Console */
.bladeburner-console-div {
display:inline-block;
width:40%;
border:1px solid white;
overflow:auto;
height:100%;
position:absolute;
}
.bladeburner-console-table {
height:auto;
overflow:auto;
table-layout:fixed;
width:100%;
}
.bladeburner-console-input-row {
transition: height 1s;
width:100%;
}
.bladeburner-console-input-cell {
display: flex;
}
.bladeburner-console-input {
display: inline-block;
padding: 0px !important;
margin: 0px !important;
border: 0px;
background-color: var(--my-background-color);
font-size: 13px;
outline: none;
color: var(--my-font-color);
flex: 1 1 auto;
}
.bladeburner-console-line {
word-wrap: break-word;
hyphens:auto;
-webkit-hyphens: auto;
-moz-hyphens: auto;
}

@ -38,7 +38,8 @@
cursor: pointer;
}
#red-pill-container {
#red-pill-container,
#cinematic-text-container {
position: fixed;
}

131280
dist/bundle.js vendored

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
doc/build/doctrees/terminal.doctree vendored Normal file

Binary file not shown.

@ -20,6 +20,7 @@ secrets that you've been searching for.
:caption: Contents:
Netscript <netscript>
Terminal <terminal>
Keyboard Shortcuts <shortcuts>

@ -1,3 +1,5 @@
.. _shortcuts:
Keyboard Shortcuts
==================
This page documents the various keyboard shortcuts that can be used in the game.
@ -16,7 +18,7 @@ These shortcuts are almost always available. Exceptions include:
========== ===========================================================================
Shortcut Action
========== ===========================================================================
Alt + t Switch to Terminal
Alt + t Switch to :doc:`terminal`
Alt + c Switch to 'Stats' page
Alt + e Switch to Script Editor. Will open up the last-edited file or a new file
Alt + s Switch to 'Active Scripts' page
@ -38,7 +40,7 @@ These shortcuts are available only in the Script Editor
============= ===========================================================================
Shortcut Action
============= ===========================================================================
Ctrl + b Save script and return to Terminal
Ctrl + b Save script and return to :doc:`terminal`
Ctrl + space Function autocompletion
============= ===========================================================================
@ -50,7 +52,7 @@ In the Script Editor you can configure your key binding mode to three preset opt
Terminal Shortcuts
------------------
These shortcuts are available only in the Terminal
These shortcuts are available only in the :doc:`terminal`
============= ===========================================================================
Shortcut Action
@ -64,7 +66,7 @@ Tab Autocomplete command
Terminal Bash Shortcuts
-----------------------
These shortcuts were implemented to better emulate a bash shell. They must be enabled
in your Terminal's *.fconf* file. This can be done be entering the Terminal command::
in your :doc:`terminal`'s *.fconf* file. This can be done be entering the Terminal command::
nano .fconf
@ -80,7 +82,7 @@ Shortcut Action
============= ===========================================================================
Ctrl + c Clears current Terminal input (does NOT override default Ctrl + c command)
Ctrl + p Same as Up Arrow
Ctrl + n Same as Down Arrow
Ctrl + m Same as Down Arrow
Ctrl + a Move cursor to beginning of line (same as 'Home' key)
Ctrl + e Move cursor to end of line (same as 'End' key)
Ctrl + b Move cursor to previous character

414
doc/build/html/_sources/terminal.rst.txt vendored Normal file

@ -0,0 +1,414 @@
.. _terminal:
Terminal
========
The Terminal is a console emulator program that lets you interface with all of the
Servers in the game. The Terminal can be accessed by clicking the 'Terminal' tab
on the navigation menu on the left-hand side of the game (you may need to expand
the 'Hacking' header in order to see the 'Terminal' tab). Alternatively, the keyboard
shortcut Alt + t can be used to open the Terminal.
Configuration
-------------
The terminal has a configuration file called .fconf. To edit this file, go to
the terminal and enter::
nano .fconf
Commands
--------
alias
^^^^^
$ alias [-g] [name="value"]
Create or display aliases. An alias enables a replacement of a word with another
string. It can be used to abbreviate a commonly used command, or commonly used
parts of a command. The NAME of an alias defines the word that will be
replaced, while the VALUE defines what it will be replaced by. For example,
you could create the alias 'nuke' for the Terminal command 'run NUKE.exe'
using the following::
$ alias nuke="run NUKE.exe"
Then, to run the NUKE.exe program you would just have to enter 'nuke' in
Terminal rather than the full command. It is important to note that 'default'
aliases will only be substituted for the first word of a Terminal command. For
example, if the following alias was set::
$ alias worm="HTTPWorm.exe"
and then you tried to run the following terminal command::
$ run worm
This would fail because the worm alias is not the first word of a Terminal
command. To allow an alias to be substituted anywhere in a Terminal command,
rather than just the first word, you must set it to be a global alias using the -g flag::
$ alias -g worm="HTTPWorm.exe"
Now, the 'worm' alias will be substituted anytime it shows up as an individual word in
a Terminal command.
Entering just the command 'alias' without any arguments prints the list of all
defined aliases in the reusable form 'alias NAME=VALUE' on the Terminal.
The :ref:`unalias_terminal_command` Terminal command can be used to remove aliases.
analyze
^^^^^^^
Prints details and statistics about the current server. The information that is
printed includes basic server details such as the hostname, whether the player
has root access, what ports are opened/closed, and also hacking-related information
such as an estimated chance to successfully hack, an estimate of how much money is
available on the server, etc.
buy
^^^
$ buy [-l/program]
Purchase a program through the Dark Web. Requires a TOR Router to use.
If this command is ran with the '-l' flag, it will display a list of all programs
that can be purchased through the Dark Web, as well as their costs.
Otherwise, the name of the program must be passed in as a parameter. This name
is NOT case-sensitive::
$ buy brutessh.exe
Note that you do not need to be connected to the actual dark web server in order
to run this command. You can use this command at any time on the Terminal.
cat
^^^
$ cat [filename]
Display a message (.msg), literature (.lit), or text (.txt) file::
$ cat j1.msg
$ cat foo.lit
$ cat servers.txt
check
^^^^^
$ check [script name] [args...]
Print the logs of the script specified by the script name and arguments to the Terminal.
Each argument must be separated by a space.
**Remember that a running script is uniquely identified both by its name and the arguments that are used to start it**. So,
if a script was ran with the following arguments::
$ run foo.script 1 2 foodnstuff
Then to run the 'check' command on this script you would have to pass the same arguments in::
$ check foo.script 1 2 foodnstuff
clear/cls
^^^^^^^^^
Clear the Terminal screen, deleting all of the text. Note that this does not
delete the user's command history, so using the up and down arrow keys is
still valid. Also note that this is permanent and there is no way to undo this.
Both 'clear' and 'cls' do the same thing::
$ clear
$ cls
connect
^^^^^^^
$ connect [hostname/ip]
Connect to a remote server. The hostname or IP address of the remote server must
be given as the argument to this command. Note that only servers that are immediately
adjacent to the current server in the network can be connected to. To see which
servers can be connected to, use the 'scan' command.
download
^^^^^^^^
Downloads a script or text file to your computer (your real-life computer)::
$ download masterScript.script
$ download importantInfo.txt
You can also download all of your scripts/text files as a zip file using the following
Terminal commands::
$ download *
$ download *.script
$download *.txt
free
^^^^
Display's the memory usage on the current machine. Print the amount of RAM that
is available on the current server as well as how much of it is being used.
hack
^^^^
Attempt to hack the current server. Requires root access in order to be run.
Related: Hacking Mechanics (TODO Add link here when page gets made)
help
^^^^
$ help [command]
Display Terminal help information. Without arguments, 'help' prints a list of all
valid Terminal commands and a brief description of their functionality. You can
also pass the name of a Terminal command as an argument to 'help' to print more
detailed information about the Terminal command. Examples::
$ help alias
$ help scan-analyze
home
^^^^
Connect to your home computer. This will work no matter what server you are currently connected to.
hostname
^^^^^^^^
Prints the hostname of the server you are currently connected to.
ifconfig
^^^^^^^^
Prints the IP address of the server you are currently connected to.
kill
^^^^
$ kill [script name] [args...]
Kill the script specified by the script name and arguments. Each argument must
be separated by a space. Remember that a running script is uniquely identified
by both its name and the arguments that are used to start it. So, if a script
was ran with the following arguments::
$ run foo.script 50e3 sigma-cosmetics
Then to kill this script the same arguments would have to be used::
$ kill foo.script 50e3 sigma-cosmetics
Note that after issuing the 'kill' command for a script, it may take a few seconds for
the script to actually stop running.
killall
^^^^^^^
Kills all scripts on the current server.
ls
^^
$ ls [| grep pattern]
Prints files on the current server to the Terminal screen.
If this command is run with no arguments, then it prints all files on the current
server to the Terminal screen. The files will be displayed in alphabetical
order.
The '| grep pattern' is an optional parameter that can be used to only display files
whose filenames match the specified pattern. For example, if you wanted to only display
files with the .script extension, you could use::
$ ls | grep .script
Alternatively, if you wanted to display all files with the word *purchase* in the filename,
you could use::
$ ls | grep purchase
lscpu
^^^^^
Prints the number of CPU cores the current server has.
mem
^^^
$ mem [script name] [-t] [num threads]
Displays the amount of RAM needed to run the specified script with a single
thread. The command can also be used to print the amount of RAM needed to run
a script with multiple threads using the '-t' flag. If the '-t' flag is
specified, then an argument for the number of threads must be passed in
afterwards. Examples::
$ mem foo.script
$ mem foo.script -t 50
The first example above will print the amount of RAM needed to run 'foo.script'
with a single thread. The second example above will print the amount of RAM needed
to run 'foo.script' with 50 threads.
nano
^^^^
$ nano [filename]
Opens up the specified file in the Text Editor. Only scripts (.script) and
text files (.txt) can be edited. If the file does not already exist, then a new
empty file will be created.
ps
^^
Prints all scripts that are currently running on the current server.
rm
^^
$ rm [filename]
Removes the specified file from the current server. This works for every file type
except literature files (.lit).
**WARNING: This is permanent and cannot be undone**
run
^^^
$ run [file name] [-t] [num threads] [args...]
Execute a program or a script.
The '[-t]', '[num threads]', and '[args...]' arguments are only valid when
running a script. The '-t' flag is used to indicate that the script should
be run with the specified number of threads. If the flag is omitted, then
the script will be run with a single thread by default. If the '-t' flag is
used, then it MUST come immediately after the script name, and the
[num threads] argument MUST come immediately afterwards.
[args...] represents a variable number of arguments that will be passed into
the script. See the documentation about script arguments. Each specified
argument must be separated by a space.
**Examples**
Run a program:
run BruteSSH.exe
Run *foo.script* with 50 threads and the arguments [1e3, 0.5, foodnstuff]::
run foo.script -t 50 1e3 0.5 foodnstuff
scan
^^^^
Prints all immediately-available network connections. This will print a list
of all servers that you can currently connect to using the 'connect' Terminal command.
scan-analyze
^^^^^^^^^^^^
$ scan-analyze [depth]
Prints detailed information about all servers up to *[depth]* nodes away on the
network. Calling 'scan-analyze 1' will display information for the same servers
that are shown by the 'scan' Terminal command. This command also shows the
relative paths to reach each server.
By default, the maximum depth that can be specified for 'scan-analyze' is 3.
However, once you have the *DeepscanV1.exe* and *DeepscanV2.exe* programs, you can
execute 'scan-analyze' with a depth up to 5 and 10, respectively.
The information 'scan-analyze' displays about each server includes whether or
not you have root access to it, its required hacking level, the number of open
ports required to run NUKE.exe on it, and how much RAM it has.
scp
^^^
$ scp [script name] [target server]
Copies the specified script from the current server to the target server.
The second argument passed in must be the hostname or IP of the target server.
sudov
^^^^^
Prints whether or not you have root access to the current server.
tail
^^^^
$ tail [script name] [args...]
Displays dynamic logs for the script specified by the script name and arguments.
Each argument must be separated by a space. Remember that a running script is
uniquely identified by both its name and the arguments that were used to run
it. So, if a script was ran with the following arguments::
$ run foo.script 10 50000
Then in order to check its logs with 'tail' the same arguments must be used::
$ tail foo.script 10 50000
theme
^^^^^
$ theme [preset] | [#background #text #highlight]
Change the color of the game's user interface
This command can be called with a preset theme. Currently, the supported presets are:
* default
* muted
* solarized
However, you can also specify your own color scheme using hex values.
To do so, you must specify three hex color values for the background
color, the text color, and the highlight color. These hex values must
be preceded by a pound sign (#) and must be either 3 or 6 digits. Example::
$ theme #ffffff #385 #235012
A color picker such as Google's can be used to get your desired hex color values
top
^^^
Prints a list of all scripts running on the current server as well as their
thread count and how much RAM they are using in total.
.. _unalias_terminal_command:
unalias
^^^^^^^
$ unalias "[alias name]"
Deletes the specified alias. Note that the double quotation marks are required.
As an example, if an alias was declared using::
$ alias r="run"
Then it could be removed using::
$ unalias "r"
It is not necessary to differentiate between global and non-global aliases when using 'unalias'

@ -99,11 +99,13 @@
</li>
<li><a href="netscriptsingularityfunctions.html#checkFactionInvitations">checkFactionInvitations() (built-in function)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="netscriptfunctions.html#clear">clear() (built-in function)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="netscriptfunctions.html#clearLog">clearLog() (built-in function)</a>
</li>
<li><a href="netscriptsingularityfunctions.html#commitCrime">commitCrime() (built-in function)</a>
</li>
<li><a href="netscriptsingularityfunctions.html#createProgram">createProgram() (built-in function)</a>
</li>
@ -443,6 +445,7 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="netscript.html"> Netscript</a></li>
<li class="toctree-l1"><a class="reference internal" href="terminal.html"> Terminal</a></li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
</ul>

@ -209,6 +209,44 @@ secrets that you've been searching for.</p>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="terminal.html"> Terminal</a><ul>
<li class="toctree-l2"><a class="reference internal" href="terminal.html#configuration">Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="terminal.html#commands">Commands</a><ul>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#alias">alias</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#analyze">analyze</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#buy">buy</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#cat">cat</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#check">check</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#clear-cls">clear/cls</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#connect">connect</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#download">download</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#free">free</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#hack">hack</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#help">help</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#home">home</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#hostname">hostname</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#ifconfig">ifconfig</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#kill">kill</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#killall">killall</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#ls">ls</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#lscpu">lscpu</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#mem">mem</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#nano">nano</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#ps">ps</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#rm">rm</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#run">run</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#scan">scan</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#scan-analyze">scan-analyze</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#scp">scp</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#sudov">sudov</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#tail">tail</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#theme">theme</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#top">top</a></li>
<li class="toctree-l3"><a class="reference internal" href="terminal.html#unalias">unalias</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a><ul>
<li class="toctree-l2"><a class="reference internal" href="shortcuts.html#game-navigation">Game Navigation</a></li>
<li class="toctree-l2"><a class="reference internal" href="shortcuts.html#script-editor">Script Editor</a></li>
@ -240,6 +278,7 @@ secrets that you've been searching for.</p>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="netscript.html"> Netscript</a></li>
<li class="toctree-l1"><a class="reference internal" href="terminal.html"> Terminal</a></li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
</ul>

@ -125,6 +125,7 @@ will only give 10% of the money you would have received in BitNode-1. The object
<li class="toctree-l2"><a class="reference internal" href="netscriptmisc.html"> Miscellaneous</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
</ul>
<div role="search">

@ -115,6 +115,7 @@ can also change. For example, if a variable initially holds a number, it can lat
<li class="toctree-l2"><a class="reference internal" href="netscriptmisc.html"> Miscellaneous</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
</ul>
<div role="search">

@ -1663,6 +1663,7 @@ you create in functions such as <a class="reference external" href="https://deve
<li class="toctree-l2"><a class="reference internal" href="netscriptmisc.html"> Miscellaneous</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
</ul>
<div role="search">

@ -244,6 +244,7 @@ Nodes to a level of at least 75, RAM to at least 8GB, and number of cores to at
<li class="toctree-l2"><a class="reference internal" href="netscriptmisc.html"> Miscellaneous</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
</ul>
<div role="search">

@ -329,6 +329,7 @@ NOT case-sensitive.</li>
<li class="toctree-l2"><a class="reference internal" href="netscriptmisc.html"> Miscellaneous</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
</ul>
<div role="search">

@ -108,6 +108,7 @@ Otherwise, the money available on the server will be grown using the grow() Nets
<li class="toctree-l2"><a class="reference internal" href="netscriptmisc.html"> Miscellaneous</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
</ul>
<div role="search">

@ -212,6 +212,7 @@ change the value of their operands. For example:</p>
<li class="toctree-l2"><a class="reference internal" href="netscriptmisc.html"> Miscellaneous</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
</ul>
<div role="search">

@ -90,6 +90,7 @@ script specified in the first argument with the amount of threads specified in t
<li class="toctree-l2"><a class="reference internal" href="netscriptmisc.html"> Miscellaneous</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
</ul>
<div role="search">

@ -590,6 +590,48 @@ then running this function will automatically cancel that action and give you yo
</div>
<div class="section" id="commitcrime">
<h2>commitCrime<a class="headerlink" href="#commitcrime" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="commitCrime">
<code class="descname">commitCrime</code><span class="sig-paren">(</span><em>crime</em><span class="sig-paren">)</span><a class="headerlink" href="#commitCrime" title="Permalink to this definition"></a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Arguments:</th><td class="field-body"><ul class="first last simple">
<li><strong>crime</strong> (<em>string</em>) -- <p>Name of crime to attempt. Not case-sensitive. This argument is fairly lenient in terms of what inputs it accepts.
Here is a list of valid inputs for all of the crimes:</p>
<ul>
<li>shoplift</li>
<li>rob store</li>
<li>mug</li>
<li>larceny</li>
<li>deal drugs</li>
<li>bond forgery</li>
<li>traffick arms</li>
<li>homicide</li>
<li>grand theft auto</li>
<li>kidnap</li>
<li>assassinate</li>
<li>heist</li>
</ul>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function.</p>
<p>This function is used to automatically attempt to commit crimes. If you are already in the middle of some 'working' action
(such as working for a company or training at a gym), then running this function will automatically cancel that action and give you your earnings.</p>
<p>Note that crimes committed using this function will have all of their earnings halved (this applied for both money and experience!)</p>
<p>This function returns the number of seconds it takes to attempt the specified crime (e.g It takes 60 seconds to attempt the 'Rob Store' crime,
so running <em>commitCrime('rob store')</em> will return 60).</p>
<p>Warning: I do not recommend using the time returned from this function to try and schedule your crime attempts.
Instead, I would use the isBusy() Singularity function to check whether you have finished attempting a crime.
This is because although the game sets a certain crime to be X amount of seconds, there is no guarantee that your
browser will follow that time limit.</p>
</dd></dl>
</div>
<div class="section" id="getcrimechance">
<h2>getCrimeChance<a class="headerlink" href="#getcrimechance" title="Permalink to this headline"></a></h2>
@ -779,6 +821,7 @@ This script will be run with no arguments and 1 thread. It must be located on yo
<li class="toctree-l2"><a class="reference internal" href="netscriptmisc.html"> Miscellaneous</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
</ul>
<div role="search">

Binary file not shown.

@ -86,6 +86,7 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="netscript.html"> Netscript</a></li>
<li class="toctree-l1"><a class="reference internal" href="terminal.html"> Terminal</a></li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
</ul>

File diff suppressed because one or more lines are too long

@ -24,7 +24,7 @@
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="Netscript Miscellaneous" href="netscriptmisc.html" />
<link rel="prev" title="Terminal" href="terminal.html" />
</head>
<body>
<div class="header-wrapper" role="banner">
@ -32,7 +32,7 @@
<div class="headertitle"><a
href="index.html">Bitburner 1.0 documentation</a></div>
<div class="rel" role="navigation" aria-label="related navigation">
<a href="netscriptmisc.html" title="Netscript Miscellaneous"
<a href="terminal.html" title="Terminal"
accesskey="P">previous</a> |
<a href="genindex.html" title="General Index"
accesskey="I">index</a>
@ -49,7 +49,7 @@
<div class="body" role="main">
<div class="section" id="keyboard-shortcuts">
<h1>Keyboard Shortcuts<a class="headerlink" href="#keyboard-shortcuts" title="Permalink to this headline"></a></h1>
<span id="shortcuts"></span><h1>Keyboard Shortcuts<a class="headerlink" href="#keyboard-shortcuts" title="Permalink to this headline"></a></h1>
<p>This page documents the various keyboard shortcuts that can be used in the game.</p>
<div class="section" id="game-navigation">
<h2>Game Navigation<a class="headerlink" href="#game-navigation" title="Permalink to this headline"></a></h2>
@ -74,7 +74,7 @@ These shortcuts are almost always available. Exceptions include:</p>
</thead>
<tbody valign="top">
<tr class="row-even"><td>Alt + t</td>
<td>Switch to Terminal</td>
<td>Switch to <a class="reference internal" href="terminal.html"><span class="doc">Terminal</span></a></td>
</tr>
<tr class="row-odd"><td>Alt + c</td>
<td>Switch to 'Stats' page</td>
@ -130,7 +130,7 @@ These shortcuts are almost always available. Exceptions include:</p>
</thead>
<tbody valign="top">
<tr class="row-even"><td>Ctrl + b</td>
<td>Save script and return to Terminal</td>
<td>Save script and return to <a class="reference internal" href="terminal.html"><span class="doc">Terminal</span></a></td>
</tr>
<tr class="row-odd"><td>Ctrl + space</td>
<td>Function autocompletion</td>
@ -146,7 +146,7 @@ These shortcuts are almost always available. Exceptions include:</p>
</div>
<div class="section" id="terminal-shortcuts">
<h2>Terminal Shortcuts<a class="headerlink" href="#terminal-shortcuts" title="Permalink to this headline"></a></h2>
<p>These shortcuts are available only in the Terminal</p>
<p>These shortcuts are available only in the <a class="reference internal" href="terminal.html"><span class="doc">Terminal</span></a></p>
<table border="1" class="docutils">
<colgroup>
<col width="15%" />
@ -176,7 +176,7 @@ These shortcuts are almost always available. Exceptions include:</p>
<div class="section" id="terminal-bash-shortcuts">
<h2>Terminal Bash Shortcuts<a class="headerlink" href="#terminal-bash-shortcuts" title="Permalink to this headline"></a></h2>
<p>These shortcuts were implemented to better emulate a bash shell. They must be enabled
in your Terminal's <em>.fconf</em> file. This can be done be entering the Terminal command:</p>
in your <a class="reference internal" href="terminal.html"><span class="doc">Terminal</span></a>'s <em>.fconf</em> file. This can be done be entering the Terminal command:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nano</span> <span class="o">.</span><span class="n">fconf</span>
</pre></div>
</div>
@ -201,7 +201,7 @@ as well as your browser's shortcuts</strong></p>
<tr class="row-odd"><td>Ctrl + p</td>
<td>Same as Up Arrow</td>
</tr>
<tr class="row-even"><td>Ctrl + n</td>
<tr class="row-even"><td>Ctrl + m</td>
<td>Same as Down Arrow</td>
</tr>
<tr class="row-odd"><td>Ctrl + a</td>
@ -259,6 +259,7 @@ as well as your browser's shortcuts</strong></p>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="netscript.html"> Netscript</a></li>
<li class="toctree-l1"><a class="reference internal" href="terminal.html"> Terminal</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#"> Keyboard Shortcuts</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#game-navigation">Game Navigation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#script-editor">Script Editor</a></li>
@ -287,7 +288,7 @@ as well as your browser's shortcuts</strong></p>
<div class="footer">
<div class="left">
<div role="navigation" aria-label="related navigaton">
<a href="netscriptmisc.html" title="Netscript Miscellaneous"
<a href="terminal.html" title="Terminal"
>previous</a> |
<a href="genindex.html" title="General Index"
>index</a>

518
doc/build/html/terminal.html vendored Normal file

@ -0,0 +1,518 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="English">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Terminal &#8212; Bitburner 1.0 documentation</title>
<link rel="stylesheet" href="_static/agogo.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Keyboard Shortcuts" href="shortcuts.html" />
<link rel="prev" title="Netscript Miscellaneous" href="netscriptmisc.html" />
</head>
<body>
<div class="header-wrapper" role="banner">
<div class="header">
<div class="headertitle"><a
href="index.html">Bitburner 1.0 documentation</a></div>
<div class="rel" role="navigation" aria-label="related navigation">
<a href="netscriptmisc.html" title="Netscript Miscellaneous"
accesskey="P">previous</a> |
<a href="shortcuts.html" title="Keyboard Shortcuts"
accesskey="N">next</a> |
<a href="genindex.html" title="General Index"
accesskey="I">index</a>
</div>
</div>
</div>
<div class="content-wrapper">
<div class="content">
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="terminal">
<span id="id1"></span><h1>Terminal<a class="headerlink" href="#terminal" title="Permalink to this headline"></a></h1>
<p>The Terminal is a console emulator program that lets you interface with all of the
Servers in the game. The Terminal can be accessed by clicking the 'Terminal' tab
on the navigation menu on the left-hand side of the game (you may need to expand
the 'Hacking' header in order to see the 'Terminal' tab). Alternatively, the keyboard
shortcut Alt + t can be used to open the Terminal.</p>
<div class="section" id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline"></a></h2>
<p>The terminal has a configuration file called .fconf. To edit this file, go to
the terminal and enter:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nano</span> <span class="o">.</span><span class="n">fconf</span>
</pre></div>
</div>
</div>
<div class="section" id="commands">
<h2>Commands<a class="headerlink" href="#commands" title="Permalink to this headline"></a></h2>
<div class="section" id="alias">
<h3>alias<a class="headerlink" href="#alias" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ alias [-g] [name=&quot;value&quot;]</div></blockquote>
<p>Create or display aliases. An alias enables a replacement of a word with another
string. It can be used to abbreviate a commonly used command, or commonly used
parts of a command. The NAME of an alias defines the word that will be
replaced, while the VALUE defines what it will be replaced by. For example,
you could create the alias 'nuke' for the Terminal command 'run NUKE.exe'
using the following:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ alias nuke=&quot;run NUKE.exe&quot;
</pre></div>
</div>
<p>Then, to run the NUKE.exe program you would just have to enter 'nuke' in
Terminal rather than the full command. It is important to note that 'default'
aliases will only be substituted for the first word of a Terminal command. For
example, if the following alias was set:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ alias worm=&quot;HTTPWorm.exe&quot;
</pre></div>
</div>
<p>and then you tried to run the following terminal command:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ run worm
</pre></div>
</div>
<p>This would fail because the worm alias is not the first word of a Terminal
command. To allow an alias to be substituted anywhere in a Terminal command,
rather than just the first word, you must set it to be a global alias using the -g flag:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ alias -g worm=&quot;HTTPWorm.exe&quot;
</pre></div>
</div>
<p>Now, the 'worm' alias will be substituted anytime it shows up as an individual word in
a Terminal command.</p>
<p>Entering just the command 'alias' without any arguments prints the list of all
defined aliases in the reusable form 'alias NAME=VALUE' on the Terminal.</p>
<p>The <a class="reference internal" href="#unalias-terminal-command"><span class="std std-ref">unalias</span></a> Terminal command can be used to remove aliases.</p>
</div>
<div class="section" id="analyze">
<h3>analyze<a class="headerlink" href="#analyze" title="Permalink to this headline"></a></h3>
<p>Prints details and statistics about the current server. The information that is
printed includes basic server details such as the hostname, whether the player
has root access, what ports are opened/closed, and also hacking-related information
such as an estimated chance to successfully hack, an estimate of how much money is
available on the server, etc.</p>
</div>
<div class="section" id="buy">
<h3>buy<a class="headerlink" href="#buy" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ buy [-l/program]</div></blockquote>
<p>Purchase a program through the Dark Web. Requires a TOR Router to use.</p>
<p>If this command is ran with the '-l' flag, it will display a list of all programs
that can be purchased through the Dark Web, as well as their costs.</p>
<p>Otherwise, the name of the program must be passed in as a parameter. This name
is NOT case-sensitive:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ buy brutessh.exe
</pre></div>
</div>
<p>Note that you do not need to be connected to the actual dark web server in order
to run this command. You can use this command at any time on the Terminal.</p>
</div>
<div class="section" id="cat">
<h3>cat<a class="headerlink" href="#cat" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ cat [filename]</div></blockquote>
<p>Display a message (.msg), literature (.lit), or text (.txt) file:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ cat j1.msg
$ cat foo.lit
$ cat servers.txt
</pre></div>
</div>
</div>
<div class="section" id="check">
<h3>check<a class="headerlink" href="#check" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ check [script name] [args...]</div></blockquote>
<p>Print the logs of the script specified by the script name and arguments to the Terminal.
Each argument must be separated by a space.
<strong>Remember that a running script is uniquely identified both by its name and the arguments that are used to start it</strong>. So,
if a script was ran with the following arguments:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ run foo.script 1 2 foodnstuff
</pre></div>
</div>
<p>Then to run the 'check' command on this script you would have to pass the same arguments in:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ check foo.script 1 2 foodnstuff
</pre></div>
</div>
</div>
<div class="section" id="clear-cls">
<h3>clear/cls<a class="headerlink" href="#clear-cls" title="Permalink to this headline"></a></h3>
<p>Clear the Terminal screen, deleting all of the text. Note that this does not
delete the user's command history, so using the up and down arrow keys is
still valid. Also note that this is permanent and there is no way to undo this.
Both 'clear' and 'cls' do the same thing:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ clear
$ cls
</pre></div>
</div>
</div>
<div class="section" id="connect">
<h3>connect<a class="headerlink" href="#connect" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ connect [hostname/ip]</div></blockquote>
<p>Connect to a remote server. The hostname or IP address of the remote server must
be given as the argument to this command. Note that only servers that are immediately
adjacent to the current server in the network can be connected to. To see which
servers can be connected to, use the 'scan' command.</p>
</div>
<div class="section" id="download">
<h3>download<a class="headerlink" href="#download" title="Permalink to this headline"></a></h3>
<p>Downloads a script or text file to your computer (your real-life computer):</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ download masterScript.script
$ download importantInfo.txt
</pre></div>
</div>
<p>You can also download all of your scripts/text files as a zip file using the following
Terminal commands:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ download *
$ download *.script
$download *.txt
</pre></div>
</div>
</div>
<div class="section" id="free">
<h3>free<a class="headerlink" href="#free" title="Permalink to this headline"></a></h3>
<p>Display's the memory usage on the current machine. Print the amount of RAM that
is available on the current server as well as how much of it is being used.</p>
</div>
<div class="section" id="hack">
<h3>hack<a class="headerlink" href="#hack" title="Permalink to this headline"></a></h3>
<p>Attempt to hack the current server. Requires root access in order to be run.</p>
<p>Related: Hacking Mechanics (TODO Add link here when page gets made)</p>
</div>
<div class="section" id="help">
<h3>help<a class="headerlink" href="#help" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ help [command]</div></blockquote>
<p>Display Terminal help information. Without arguments, 'help' prints a list of all
valid Terminal commands and a brief description of their functionality. You can
also pass the name of a Terminal command as an argument to 'help' to print more
detailed information about the Terminal command. Examples:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ help alias
$ help scan-analyze
</pre></div>
</div>
</div>
<div class="section" id="home">
<h3>home<a class="headerlink" href="#home" title="Permalink to this headline"></a></h3>
<p>Connect to your home computer. This will work no matter what server you are currently connected to.</p>
</div>
<div class="section" id="hostname">
<h3>hostname<a class="headerlink" href="#hostname" title="Permalink to this headline"></a></h3>
<p>Prints the hostname of the server you are currently connected to.</p>
</div>
<div class="section" id="ifconfig">
<h3>ifconfig<a class="headerlink" href="#ifconfig" title="Permalink to this headline"></a></h3>
<p>Prints the IP address of the server you are currently connected to.</p>
</div>
<div class="section" id="kill">
<h3>kill<a class="headerlink" href="#kill" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ kill [script name] [args...]</div></blockquote>
<p>Kill the script specified by the script name and arguments. Each argument must
be separated by a space. Remember that a running script is uniquely identified
by both its name and the arguments that are used to start it. So, if a script
was ran with the following arguments:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ run foo.script 50e3 sigma-cosmetics
</pre></div>
</div>
<p>Then to kill this script the same arguments would have to be used:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ kill foo.script 50e3 sigma-cosmetics
</pre></div>
</div>
<p>Note that after issuing the 'kill' command for a script, it may take a few seconds for
the script to actually stop running.</p>
</div>
<div class="section" id="killall">
<h3>killall<a class="headerlink" href="#killall" title="Permalink to this headline"></a></h3>
<p>Kills all scripts on the current server.</p>
</div>
<div class="section" id="ls">
<h3>ls<a class="headerlink" href="#ls" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ ls [| grep pattern]</div></blockquote>
<p>Prints files on the current server to the Terminal screen.</p>
<p>If this command is run with no arguments, then it prints all files on the current
server to the Terminal screen. The files will be displayed in alphabetical
order.</p>
<p>The '| grep pattern' is an optional parameter that can be used to only display files
whose filenames match the specified pattern. For example, if you wanted to only display
files with the .script extension, you could use:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ ls | grep .script
</pre></div>
</div>
<p>Alternatively, if you wanted to display all files with the word <em>purchase</em> in the filename,
you could use:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ ls | grep purchase
</pre></div>
</div>
</div>
<div class="section" id="lscpu">
<h3>lscpu<a class="headerlink" href="#lscpu" title="Permalink to this headline"></a></h3>
<p>Prints the number of CPU cores the current server has.</p>
</div>
<div class="section" id="mem">
<h3>mem<a class="headerlink" href="#mem" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ mem [script name] [-t] [num threads]</div></blockquote>
<p>Displays the amount of RAM needed to run the specified script with a single
thread. The command can also be used to print the amount of RAM needed to run
a script with multiple threads using the '-t' flag. If the '-t' flag is
specified, then an argument for the number of threads must be passed in
afterwards. Examples:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ mem foo.script
$ mem foo.script -t 50
</pre></div>
</div>
<p>The first example above will print the amount of RAM needed to run 'foo.script'
with a single thread. The second example above will print the amount of RAM needed
to run 'foo.script' with 50 threads.</p>
</div>
<div class="section" id="nano">
<h3>nano<a class="headerlink" href="#nano" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ nano [filename]</div></blockquote>
<p>Opens up the specified file in the Text Editor. Only scripts (.script) and
text files (.txt) can be edited. If the file does not already exist, then a new
empty file will be created.</p>
</div>
<div class="section" id="ps">
<h3>ps<a class="headerlink" href="#ps" title="Permalink to this headline"></a></h3>
<p>Prints all scripts that are currently running on the current server.</p>
</div>
<div class="section" id="rm">
<h3>rm<a class="headerlink" href="#rm" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ rm [filename]</div></blockquote>
<p>Removes the specified file from the current server. This works for every file type
except literature files (.lit).</p>
<p><strong>WARNING: This is permanent and cannot be undone</strong></p>
</div>
<div class="section" id="run">
<h3>run<a class="headerlink" href="#run" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ run [file name] [-t] [num threads] [args...]</div></blockquote>
<p>Execute a program or a script.</p>
<p>The '[-t]', '[num threads]', and '[args...]' arguments are only valid when
running a script. The '-t' flag is used to indicate that the script should
be run with the specified number of threads. If the flag is omitted, then
the script will be run with a single thread by default. If the '-t' flag is
used, then it MUST come immediately after the script name, and the
[num threads] argument MUST come immediately afterwards.</p>
<p>[args...] represents a variable number of arguments that will be passed into
the script. See the documentation about script arguments. Each specified
argument must be separated by a space.</p>
<p><strong>Examples</strong></p>
<p>Run a program:</p>
<blockquote>
<div>run BruteSSH.exe</div></blockquote>
<p>Run <em>foo.script</em> with 50 threads and the arguments [1e3, 0.5, foodnstuff]:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">run</span> <span class="n">foo</span><span class="o">.</span><span class="n">script</span> <span class="o">-</span><span class="n">t</span> <span class="mi">50</span> <span class="mf">1e3</span> <span class="mf">0.5</span> <span class="n">foodnstuff</span>
</pre></div>
</div>
</div>
<div class="section" id="scan">
<h3>scan<a class="headerlink" href="#scan" title="Permalink to this headline"></a></h3>
<p>Prints all immediately-available network connections. This will print a list
of all servers that you can currently connect to using the 'connect' Terminal command.</p>
</div>
<div class="section" id="scan-analyze">
<h3>scan-analyze<a class="headerlink" href="#scan-analyze" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ scan-analyze [depth]</div></blockquote>
<p>Prints detailed information about all servers up to <em>[depth]</em> nodes away on the
network. Calling 'scan-analyze 1' will display information for the same servers
that are shown by the 'scan' Terminal command. This command also shows the
relative paths to reach each server.</p>
<p>By default, the maximum depth that can be specified for 'scan-analyze' is 3.
However, once you have the <em>DeepscanV1.exe</em> and <em>DeepscanV2.exe</em> programs, you can
execute 'scan-analyze' with a depth up to 5 and 10, respectively.</p>
<p>The information 'scan-analyze' displays about each server includes whether or
not you have root access to it, its required hacking level, the number of open
ports required to run NUKE.exe on it, and how much RAM it has.</p>
</div>
<div class="section" id="scp">
<h3>scp<a class="headerlink" href="#scp" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ scp [script name] [target server]</div></blockquote>
<p>Copies the specified script from the current server to the target server.
The second argument passed in must be the hostname or IP of the target server.</p>
</div>
<div class="section" id="sudov">
<h3>sudov<a class="headerlink" href="#sudov" title="Permalink to this headline"></a></h3>
<p>Prints whether or not you have root access to the current server.</p>
</div>
<div class="section" id="tail">
<h3>tail<a class="headerlink" href="#tail" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ tail [script name] [args...]</div></blockquote>
<p>Displays dynamic logs for the script specified by the script name and arguments.
Each argument must be separated by a space. Remember that a running script is
uniquely identified by both its name and the arguments that were used to run
it. So, if a script was ran with the following arguments:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ run foo.script 10 50000
</pre></div>
</div>
<p>Then in order to check its logs with 'tail' the same arguments must be used:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ tail foo.script 10 50000
</pre></div>
</div>
</div>
<div class="section" id="theme">
<h3>theme<a class="headerlink" href="#theme" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ theme [preset] | [#background #text #highlight]</div></blockquote>
<p>Change the color of the game's user interface</p>
<p>This command can be called with a preset theme. Currently, the supported presets are:</p>
<ul class="simple">
<li>default</li>
<li>muted</li>
<li>solarized</li>
</ul>
<p>However, you can also specify your own color scheme using hex values.
To do so, you must specify three hex color values for the background
color, the text color, and the highlight color. These hex values must
be preceded by a pound sign (#) and must be either 3 or 6 digits. Example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ theme #ffffff #385 #235012
</pre></div>
</div>
<p>A color picker such as Google's can be used to get your desired hex color values</p>
</div>
<div class="section" id="top">
<h3>top<a class="headerlink" href="#top" title="Permalink to this headline"></a></h3>
<p>Prints a list of all scripts running on the current server as well as their
thread count and how much RAM they are using in total.</p>
</div>
<div class="section" id="unalias">
<span id="unalias-terminal-command"></span><h3>unalias<a class="headerlink" href="#unalias" title="Permalink to this headline"></a></h3>
<blockquote>
<div>$ unalias &quot;[alias name]&quot;</div></blockquote>
<p>Deletes the specified alias. Note that the double quotation marks are required.</p>
<p>As an example, if an alias was declared using:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ alias r=&quot;run&quot;
</pre></div>
</div>
<p>Then it could be removed using:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ unalias &quot;r&quot;
</pre></div>
</div>
<p>It is not necessary to differentiate between global and non-global aliases when using 'unalias'</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sidebar">
<h3>Table Of Contents</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="netscript.html"> Netscript</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#"> Terminal</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#configuration">Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="#commands">Commands</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#alias">alias</a></li>
<li class="toctree-l3"><a class="reference internal" href="#analyze">analyze</a></li>
<li class="toctree-l3"><a class="reference internal" href="#buy">buy</a></li>
<li class="toctree-l3"><a class="reference internal" href="#cat">cat</a></li>
<li class="toctree-l3"><a class="reference internal" href="#check">check</a></li>
<li class="toctree-l3"><a class="reference internal" href="#clear-cls">clear/cls</a></li>
<li class="toctree-l3"><a class="reference internal" href="#connect">connect</a></li>
<li class="toctree-l3"><a class="reference internal" href="#download">download</a></li>
<li class="toctree-l3"><a class="reference internal" href="#free">free</a></li>
<li class="toctree-l3"><a class="reference internal" href="#hack">hack</a></li>
<li class="toctree-l3"><a class="reference internal" href="#help">help</a></li>
<li class="toctree-l3"><a class="reference internal" href="#home">home</a></li>
<li class="toctree-l3"><a class="reference internal" href="#hostname">hostname</a></li>
<li class="toctree-l3"><a class="reference internal" href="#ifconfig">ifconfig</a></li>
<li class="toctree-l3"><a class="reference internal" href="#kill">kill</a></li>
<li class="toctree-l3"><a class="reference internal" href="#killall">killall</a></li>
<li class="toctree-l3"><a class="reference internal" href="#ls">ls</a></li>
<li class="toctree-l3"><a class="reference internal" href="#lscpu">lscpu</a></li>
<li class="toctree-l3"><a class="reference internal" href="#mem">mem</a></li>
<li class="toctree-l3"><a class="reference internal" href="#nano">nano</a></li>
<li class="toctree-l3"><a class="reference internal" href="#ps">ps</a></li>
<li class="toctree-l3"><a class="reference internal" href="#rm">rm</a></li>
<li class="toctree-l3"><a class="reference internal" href="#run">run</a></li>
<li class="toctree-l3"><a class="reference internal" href="#scan">scan</a></li>
<li class="toctree-l3"><a class="reference internal" href="#scan-analyze">scan-analyze</a></li>
<li class="toctree-l3"><a class="reference internal" href="#scp">scp</a></li>
<li class="toctree-l3"><a class="reference internal" href="#sudov">sudov</a></li>
<li class="toctree-l3"><a class="reference internal" href="#tail">tail</a></li>
<li class="toctree-l3"><a class="reference internal" href="#theme">theme</a></li>
<li class="toctree-l3"><a class="reference internal" href="#top">top</a></li>
<li class="toctree-l3"><a class="reference internal" href="#unalias">unalias</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
</ul>
<div role="search">
<h3 style="margin-top: 1.5em;">Search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
<div class="footer-wrapper">
<div class="footer">
<div class="left">
<div role="navigation" aria-label="related navigaton">
<a href="netscriptmisc.html" title="Netscript Miscellaneous"
>previous</a> |
<a href="shortcuts.html" title="Keyboard Shortcuts"
>next</a> |
<a href="genindex.html" title="General Index"
>index</a>
</div>
<div role="note" aria-label="source link">
<br/>
<a href="_sources/terminal.rst.txt"
rel="nofollow">Show Source</a>
</div>
</div>
<div class="right">
<div class="footer" role="contentinfo">
&#169; Copyright 2017, Bitburner.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.4.
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</body>
</html>

@ -20,6 +20,7 @@ secrets that you've been searching for.
:caption: Contents:
Netscript <netscript>
Terminal <terminal>
Keyboard Shortcuts <shortcuts>

@ -1,3 +1,5 @@
.. _shortcuts:
Keyboard Shortcuts
==================
This page documents the various keyboard shortcuts that can be used in the game.
@ -16,7 +18,7 @@ These shortcuts are almost always available. Exceptions include:
========== ===========================================================================
Shortcut Action
========== ===========================================================================
Alt + t Switch to Terminal
Alt + t Switch to :doc:`terminal`
Alt + c Switch to 'Stats' page
Alt + e Switch to Script Editor. Will open up the last-edited file or a new file
Alt + s Switch to 'Active Scripts' page
@ -38,7 +40,7 @@ These shortcuts are available only in the Script Editor
============= ===========================================================================
Shortcut Action
============= ===========================================================================
Ctrl + b Save script and return to Terminal
Ctrl + b Save script and return to :doc:`terminal`
Ctrl + space Function autocompletion
============= ===========================================================================
@ -50,7 +52,7 @@ In the Script Editor you can configure your key binding mode to three preset opt
Terminal Shortcuts
------------------
These shortcuts are available only in the Terminal
These shortcuts are available only in the :doc:`terminal`
============= ===========================================================================
Shortcut Action
@ -64,7 +66,7 @@ Tab Autocomplete command
Terminal Bash Shortcuts
-----------------------
These shortcuts were implemented to better emulate a bash shell. They must be enabled
in your Terminal's *.fconf* file. This can be done be entering the Terminal command::
in your :doc:`terminal`'s *.fconf* file. This can be done be entering the Terminal command::
nano .fconf

414
doc/source/terminal.rst Normal file

@ -0,0 +1,414 @@
.. _terminal:
Terminal
========
The Terminal is a console emulator program that lets you interface with all of the
Servers in the game. The Terminal can be accessed by clicking the 'Terminal' tab
on the navigation menu on the left-hand side of the game (you may need to expand
the 'Hacking' header in order to see the 'Terminal' tab). Alternatively, the keyboard
shortcut Alt + t can be used to open the Terminal.
Configuration
-------------
The terminal has a configuration file called .fconf. To edit this file, go to
the terminal and enter::
nano .fconf
Commands
--------
alias
^^^^^
$ alias [-g] [name="value"]
Create or display aliases. An alias enables a replacement of a word with another
string. It can be used to abbreviate a commonly used command, or commonly used
parts of a command. The NAME of an alias defines the word that will be
replaced, while the VALUE defines what it will be replaced by. For example,
you could create the alias 'nuke' for the Terminal command 'run NUKE.exe'
using the following::
$ alias nuke="run NUKE.exe"
Then, to run the NUKE.exe program you would just have to enter 'nuke' in
Terminal rather than the full command. It is important to note that 'default'
aliases will only be substituted for the first word of a Terminal command. For
example, if the following alias was set::
$ alias worm="HTTPWorm.exe"
and then you tried to run the following terminal command::
$ run worm
This would fail because the worm alias is not the first word of a Terminal
command. To allow an alias to be substituted anywhere in a Terminal command,
rather than just the first word, you must set it to be a global alias using the -g flag::
$ alias -g worm="HTTPWorm.exe"
Now, the 'worm' alias will be substituted anytime it shows up as an individual word in
a Terminal command.
Entering just the command 'alias' without any arguments prints the list of all
defined aliases in the reusable form 'alias NAME=VALUE' on the Terminal.
The :ref:`unalias_terminal_command` Terminal command can be used to remove aliases.
analyze
^^^^^^^
Prints details and statistics about the current server. The information that is
printed includes basic server details such as the hostname, whether the player
has root access, what ports are opened/closed, and also hacking-related information
such as an estimated chance to successfully hack, an estimate of how much money is
available on the server, etc.
buy
^^^
$ buy [-l/program]
Purchase a program through the Dark Web. Requires a TOR Router to use.
If this command is ran with the '-l' flag, it will display a list of all programs
that can be purchased through the Dark Web, as well as their costs.
Otherwise, the name of the program must be passed in as a parameter. This name
is NOT case-sensitive::
$ buy brutessh.exe
Note that you do not need to be connected to the actual dark web server in order
to run this command. You can use this command at any time on the Terminal.
cat
^^^
$ cat [filename]
Display a message (.msg), literature (.lit), or text (.txt) file::
$ cat j1.msg
$ cat foo.lit
$ cat servers.txt
check
^^^^^
$ check [script name] [args...]
Print the logs of the script specified by the script name and arguments to the Terminal.
Each argument must be separated by a space.
**Remember that a running script is uniquely identified both by its name and the arguments that are used to start it**. So,
if a script was ran with the following arguments::
$ run foo.script 1 2 foodnstuff
Then to run the 'check' command on this script you would have to pass the same arguments in::
$ check foo.script 1 2 foodnstuff
clear/cls
^^^^^^^^^
Clear the Terminal screen, deleting all of the text. Note that this does not
delete the user's command history, so using the up and down arrow keys is
still valid. Also note that this is permanent and there is no way to undo this.
Both 'clear' and 'cls' do the same thing::
$ clear
$ cls
connect
^^^^^^^
$ connect [hostname/ip]
Connect to a remote server. The hostname or IP address of the remote server must
be given as the argument to this command. Note that only servers that are immediately
adjacent to the current server in the network can be connected to. To see which
servers can be connected to, use the 'scan' command.
download
^^^^^^^^
Downloads a script or text file to your computer (your real-life computer)::
$ download masterScript.script
$ download importantInfo.txt
You can also download all of your scripts/text files as a zip file using the following
Terminal commands::
$ download *
$ download *.script
$ download *.txt
free
^^^^
Display's the memory usage on the current machine. Print the amount of RAM that
is available on the current server as well as how much of it is being used.
hack
^^^^
Attempt to hack the current server. Requires root access in order to be run.
Related: Hacking Mechanics (TODO Add link here when page gets made)
help
^^^^
$ help [command]
Display Terminal help information. Without arguments, 'help' prints a list of all
valid Terminal commands and a brief description of their functionality. You can
also pass the name of a Terminal command as an argument to 'help' to print more
detailed information about the Terminal command. Examples::
$ help alias
$ help scan-analyze
home
^^^^
Connect to your home computer. This will work no matter what server you are currently connected to.
hostname
^^^^^^^^
Prints the hostname of the server you are currently connected to.
ifconfig
^^^^^^^^
Prints the IP address of the server you are currently connected to.
kill
^^^^
$ kill [script name] [args...]
Kill the script specified by the script name and arguments. Each argument must
be separated by a space. Remember that a running script is uniquely identified
by both its name and the arguments that are used to start it. So, if a script
was ran with the following arguments::
$ run foo.script 50e3 sigma-cosmetics
Then to kill this script the same arguments would have to be used::
$ kill foo.script 50e3 sigma-cosmetics
Note that after issuing the 'kill' command for a script, it may take a few seconds for
the script to actually stop running.
killall
^^^^^^^
Kills all scripts on the current server.
ls
^^
$ ls [| grep pattern]
Prints files on the current server to the Terminal screen.
If this command is run with no arguments, then it prints all files on the current
server to the Terminal screen. The files will be displayed in alphabetical
order.
The '| grep pattern' is an optional parameter that can be used to only display files
whose filenames match the specified pattern. For example, if you wanted to only display
files with the .script extension, you could use::
$ ls | grep .script
Alternatively, if you wanted to display all files with the word *purchase* in the filename,
you could use::
$ ls | grep purchase
lscpu
^^^^^
Prints the number of CPU cores the current server has.
mem
^^^
$ mem [script name] [-t] [num threads]
Displays the amount of RAM needed to run the specified script with a single
thread. The command can also be used to print the amount of RAM needed to run
a script with multiple threads using the '-t' flag. If the '-t' flag is
specified, then an argument for the number of threads must be passed in
afterwards. Examples::
$ mem foo.script
$ mem foo.script -t 50
The first example above will print the amount of RAM needed to run 'foo.script'
with a single thread. The second example above will print the amount of RAM needed
to run 'foo.script' with 50 threads.
nano
^^^^
$ nano [filename]
Opens up the specified file in the Text Editor. Only scripts (.script) and
text files (.txt) can be edited. If the file does not already exist, then a new
empty file will be created.
ps
^^
Prints all scripts that are currently running on the current server.
rm
^^
$ rm [filename]
Removes the specified file from the current server. This works for every file type
except literature files (.lit).
**WARNING: This is permanent and cannot be undone**
run
^^^
$ run [file name] [-t] [num threads] [args...]
Execute a program or a script.
The '[-t]', '[num threads]', and '[args...]' arguments are only valid when
running a script. The '-t' flag is used to indicate that the script should
be run with the specified number of threads. If the flag is omitted, then
the script will be run with a single thread by default. If the '-t' flag is
used, then it MUST come immediately after the script name, and the
[num threads] argument MUST come immediately afterwards.
[args...] represents a variable number of arguments that will be passed into
the script. See the documentation about script arguments. Each specified
argument must be separated by a space.
**Examples**
Run a program:
run BruteSSH.exe
Run *foo.script* with 50 threads and the arguments [1e3, 0.5, foodnstuff]::
run foo.script -t 50 1e3 0.5 foodnstuff
scan
^^^^
Prints all immediately-available network connections. This will print a list
of all servers that you can currently connect to using the 'connect' Terminal command.
scan-analyze
^^^^^^^^^^^^
$ scan-analyze [depth]
Prints detailed information about all servers up to *[depth]* nodes away on the
network. Calling 'scan-analyze 1' will display information for the same servers
that are shown by the 'scan' Terminal command. This command also shows the
relative paths to reach each server.
By default, the maximum depth that can be specified for 'scan-analyze' is 3.
However, once you have the *DeepscanV1.exe* and *DeepscanV2.exe* programs, you can
execute 'scan-analyze' with a depth up to 5 and 10, respectively.
The information 'scan-analyze' displays about each server includes whether or
not you have root access to it, its required hacking level, the number of open
ports required to run NUKE.exe on it, and how much RAM it has.
scp
^^^
$ scp [script name] [target server]
Copies the specified script from the current server to the target server.
The second argument passed in must be the hostname or IP of the target server.
sudov
^^^^^
Prints whether or not you have root access to the current server.
tail
^^^^
$ tail [script name] [args...]
Displays dynamic logs for the script specified by the script name and arguments.
Each argument must be separated by a space. Remember that a running script is
uniquely identified by both its name and the arguments that were used to run
it. So, if a script was ran with the following arguments::
$ run foo.script 10 50000
Then in order to check its logs with 'tail' the same arguments must be used::
$ tail foo.script 10 50000
theme
^^^^^
$ theme [preset] | [#background #text #highlight]
Change the color of the game's user interface
This command can be called with a preset theme. Currently, the supported presets are:
* default
* muted
* solarized
However, you can also specify your own color scheme using hex values.
To do so, you must specify three hex color values for the background
color, the text color, and the highlight color. These hex values must
be preceded by a pound sign (#) and must be either 3 or 6 digits. Example::
$ theme #ffffff #385 #235012
A color picker such as Google's can be used to get your desired hex color values
top
^^^
Prints a list of all scripts running on the current server as well as their
thread count and how much RAM they are using in total.
.. _unalias_terminal_command:
unalias
^^^^^^^
$ unalias "[alias name]"
Deletes the specified alias. Note that the double quotation marks are required.
As an example, if an alias was declared using::
$ alias r="run"
Then it could be removed using::
$ unalias "r"
It is not necessary to differentiate between global and non-global aliases when using 'unalias'

@ -12,6 +12,7 @@
<link rel="stylesheet" type="text/css" href="css/loader.css" />
<link rel="stylesheet" type="text/css" href="css/missions.css" />
<link rel="stylesheet" type="text/css" href="css/companymanagement.css" />
<link rel="stylesheet" type="text/css" href="css/bladeburner.css" />
<!-- Google Analytics -->
<script>
@ -576,6 +577,9 @@
<!-- City Hall -->
<a id="location-cityhall-create-corporation" class='a-link-button'>Create a Corporation</a>
<!-- Bladeburner@NSA -->
<a id="location-nsa-bladeburner" class="a-link-button">Bladeburner Division</a>
</div>
<div id="infiltration-container" class="generic-menupage-container">
@ -694,8 +698,10 @@
</div>
<!-- Red Pill Container -->
<div id="red-pill-container" class="generic-fullscreen-container">
</div>
<div id="red-pill-container" class="generic-fullscreen-container"></div>
<!-- Cinematic Text Container -->
<div id="cinematic-text-container" class="generic-fullscreen-container"></div>
<!-- Interactive Tutorial Text Screen -->
<div id="interactive-tutorial-wrapper">

845
package-lock.json generated

@ -1729,7 +1729,6 @@
"requires": {
"anymatch": "1.3.2",
"async-each": "1.0.1",
"fsevents": "1.1.3",
"glob-parent": "2.0.0",
"inherits": "2.0.3",
"is-binary-path": "1.0.1",
@ -5555,6 +5554,14 @@
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
},
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
@ -5565,14 +5572,6 @@
"strip-ansi": "3.0.1"
}
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
@ -6194,6 +6193,14 @@
"resolved": "https://registry.npmjs.org/stable/-/stable-0.1.6.tgz",
"integrity": "sha1-kQ9dKu17Ugxud3SZwfMuE5/eyxA="
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
},
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
@ -6204,14 +6211,6 @@
"strip-ansi": "3.0.1"
}
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
},
"stringstream": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
@ -8308,795 +8307,6 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
"fsevents": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz",
"integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==",
"optional": true,
"requires": {
"nan": "2.10.0",
"node-pre-gyp": "0.6.39"
},
"dependencies": {
"abbrev": {
"version": "1.1.0",
"bundled": true,
"optional": true
},
"ajv": {
"version": "4.11.8",
"bundled": true,
"optional": true,
"requires": {
"co": "4.6.0",
"json-stable-stringify": "1.0.1"
}
},
"ansi-regex": {
"version": "2.1.1",
"bundled": true
},
"aproba": {
"version": "1.1.1",
"bundled": true,
"optional": true
},
"are-we-there-yet": {
"version": "1.1.4",
"bundled": true,
"optional": true,
"requires": {
"delegates": "1.0.0",
"readable-stream": "2.2.9"
}
},
"asn1": {
"version": "0.2.3",
"bundled": true,
"optional": true
},
"assert-plus": {
"version": "0.2.0",
"bundled": true,
"optional": true
},
"asynckit": {
"version": "0.4.0",
"bundled": true,
"optional": true
},
"aws-sign2": {
"version": "0.6.0",
"bundled": true,
"optional": true
},
"aws4": {
"version": "1.6.0",
"bundled": true,
"optional": true
},
"balanced-match": {
"version": "0.4.2",
"bundled": true
},
"bcrypt-pbkdf": {
"version": "1.0.1",
"bundled": true,
"optional": true,
"requires": {
"tweetnacl": "0.14.5"
}
},
"block-stream": {
"version": "0.0.9",
"bundled": true,
"requires": {
"inherits": "2.0.3"
}
},
"boom": {
"version": "2.10.1",
"bundled": true,
"requires": {
"hoek": "2.16.3"
}
},
"brace-expansion": {
"version": "1.1.7",
"bundled": true,
"requires": {
"balanced-match": "0.4.2",
"concat-map": "0.0.1"
}
},
"buffer-shims": {
"version": "1.0.0",
"bundled": true
},
"caseless": {
"version": "0.12.0",
"bundled": true,
"optional": true
},
"co": {
"version": "4.6.0",
"bundled": true,
"optional": true
},
"code-point-at": {
"version": "1.1.0",
"bundled": true
},
"combined-stream": {
"version": "1.0.5",
"bundled": true,
"requires": {
"delayed-stream": "1.0.0"
}
},
"concat-map": {
"version": "0.0.1",
"bundled": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true
},
"core-util-is": {
"version": "1.0.2",
"bundled": true
},
"cryptiles": {
"version": "2.0.5",
"bundled": true,
"requires": {
"boom": "2.10.1"
}
},
"dashdash": {
"version": "1.14.1",
"bundled": true,
"optional": true,
"requires": {
"assert-plus": "1.0.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"bundled": true,
"optional": true
}
}
},
"debug": {
"version": "2.6.8",
"bundled": true,
"optional": true,
"requires": {
"ms": "2.0.0"
}
},
"deep-extend": {
"version": "0.4.2",
"bundled": true,
"optional": true
},
"delayed-stream": {
"version": "1.0.0",
"bundled": true
},
"delegates": {
"version": "1.0.0",
"bundled": true,
"optional": true
},
"detect-libc": {
"version": "1.0.2",
"bundled": true,
"optional": true
},
"ecc-jsbn": {
"version": "0.1.1",
"bundled": true,
"optional": true,
"requires": {
"jsbn": "0.1.1"
}
},
"extend": {
"version": "3.0.1",
"bundled": true,
"optional": true
},
"extsprintf": {
"version": "1.0.2",
"bundled": true
},
"forever-agent": {
"version": "0.6.1",
"bundled": true,
"optional": true
},
"form-data": {
"version": "2.1.4",
"bundled": true,
"optional": true,
"requires": {
"asynckit": "0.4.0",
"combined-stream": "1.0.5",
"mime-types": "2.1.15"
}
},
"fs.realpath": {
"version": "1.0.0",
"bundled": true
},
"fstream": {
"version": "1.0.11",
"bundled": true,
"requires": {
"graceful-fs": "4.1.11",
"inherits": "2.0.3",
"mkdirp": "0.5.1",
"rimraf": "2.6.1"
}
},
"fstream-ignore": {
"version": "1.0.5",
"bundled": true,
"optional": true,
"requires": {
"fstream": "1.0.11",
"inherits": "2.0.3",
"minimatch": "3.0.4"
}
},
"gauge": {
"version": "2.7.4",
"bundled": true,
"optional": true,
"requires": {
"aproba": "1.1.1",
"console-control-strings": "1.1.0",
"has-unicode": "2.0.1",
"object-assign": "4.1.1",
"signal-exit": "3.0.2",
"string-width": "1.0.2",
"strip-ansi": "3.0.1",
"wide-align": "1.1.2"
}
},
"getpass": {
"version": "0.1.7",
"bundled": true,
"optional": true,
"requires": {
"assert-plus": "1.0.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"bundled": true,
"optional": true
}
}
},
"glob": {
"version": "7.1.2",
"bundled": true,
"requires": {
"fs.realpath": "1.0.0",
"inflight": "1.0.6",
"inherits": "2.0.3",
"minimatch": "3.0.4",
"once": "1.4.0",
"path-is-absolute": "1.0.1"
}
},
"graceful-fs": {
"version": "4.1.11",
"bundled": true
},
"har-schema": {
"version": "1.0.5",
"bundled": true,
"optional": true
},
"har-validator": {
"version": "4.2.1",
"bundled": true,
"optional": true,
"requires": {
"ajv": "4.11.8",
"har-schema": "1.0.5"
}
},
"has-unicode": {
"version": "2.0.1",
"bundled": true,
"optional": true
},
"hawk": {
"version": "3.1.3",
"bundled": true,
"requires": {
"boom": "2.10.1",
"cryptiles": "2.0.5",
"hoek": "2.16.3",
"sntp": "1.0.9"
}
},
"hoek": {
"version": "2.16.3",
"bundled": true
},
"http-signature": {
"version": "1.1.1",
"bundled": true,
"optional": true,
"requires": {
"assert-plus": "0.2.0",
"jsprim": "1.4.0",
"sshpk": "1.13.0"
}
},
"inflight": {
"version": "1.0.6",
"bundled": true,
"requires": {
"once": "1.4.0",
"wrappy": "1.0.2"
}
},
"inherits": {
"version": "2.0.3",
"bundled": true
},
"ini": {
"version": "1.3.4",
"bundled": true,
"optional": true
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
"requires": {
"number-is-nan": "1.0.1"
}
},
"is-typedarray": {
"version": "1.0.0",
"bundled": true,
"optional": true
},
"isarray": {
"version": "1.0.0",
"bundled": true
},
"isstream": {
"version": "0.1.2",
"bundled": true,
"optional": true
},
"jodid25519": {
"version": "1.0.2",
"bundled": true,
"optional": true,
"requires": {
"jsbn": "0.1.1"
}
},
"jsbn": {
"version": "0.1.1",
"bundled": true,
"optional": true
},
"json-schema": {
"version": "0.2.3",
"bundled": true,
"optional": true
},
"json-stable-stringify": {
"version": "1.0.1",
"bundled": true,
"optional": true,
"requires": {
"jsonify": "0.0.0"
}
},
"json-stringify-safe": {
"version": "5.0.1",
"bundled": true,
"optional": true
},
"jsonify": {
"version": "0.0.0",
"bundled": true,
"optional": true
},
"jsprim": {
"version": "1.4.0",
"bundled": true,
"optional": true,
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.0.2",
"json-schema": "0.2.3",
"verror": "1.3.6"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"bundled": true,
"optional": true
}
}
},
"mime-db": {
"version": "1.27.0",
"bundled": true
},
"mime-types": {
"version": "2.1.15",
"bundled": true,
"requires": {
"mime-db": "1.27.0"
}
},
"minimatch": {
"version": "3.0.4",
"bundled": true,
"requires": {
"brace-expansion": "1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"bundled": true
},
"mkdirp": {
"version": "0.5.1",
"bundled": true,
"requires": {
"minimist": "0.0.8"
}
},
"ms": {
"version": "2.0.0",
"bundled": true,
"optional": true
},
"node-pre-gyp": {
"version": "0.6.39",
"bundled": true,
"optional": true,
"requires": {
"detect-libc": "1.0.2",
"hawk": "3.1.3",
"mkdirp": "0.5.1",
"nopt": "4.0.1",
"npmlog": "4.1.0",
"rc": "1.2.1",
"request": "2.81.0",
"rimraf": "2.6.1",
"semver": "5.3.0",
"tar": "2.2.1",
"tar-pack": "3.4.0"
}
},
"nopt": {
"version": "4.0.1",
"bundled": true,
"optional": true,
"requires": {
"abbrev": "1.1.0",
"osenv": "0.1.4"
}
},
"npmlog": {
"version": "4.1.0",
"bundled": true,
"optional": true,
"requires": {
"are-we-there-yet": "1.1.4",
"console-control-strings": "1.1.0",
"gauge": "2.7.4",
"set-blocking": "2.0.0"
}
},
"number-is-nan": {
"version": "1.0.1",
"bundled": true
},
"oauth-sign": {
"version": "0.8.2",
"bundled": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
"bundled": true,
"optional": true
},
"once": {
"version": "1.4.0",
"bundled": true,
"requires": {
"wrappy": "1.0.2"
}
},
"os-homedir": {
"version": "1.0.2",
"bundled": true,
"optional": true
},
"os-tmpdir": {
"version": "1.0.2",
"bundled": true,
"optional": true
},
"osenv": {
"version": "0.1.4",
"bundled": true,
"optional": true,
"requires": {
"os-homedir": "1.0.2",
"os-tmpdir": "1.0.2"
}
},
"path-is-absolute": {
"version": "1.0.1",
"bundled": true
},
"performance-now": {
"version": "0.2.0",
"bundled": true,
"optional": true
},
"process-nextick-args": {
"version": "1.0.7",
"bundled": true
},
"punycode": {
"version": "1.4.1",
"bundled": true,
"optional": true
},
"qs": {
"version": "6.4.0",
"bundled": true,
"optional": true
},
"rc": {
"version": "1.2.1",
"bundled": true,
"optional": true,
"requires": {
"deep-extend": "0.4.2",
"ini": "1.3.4",
"minimist": "1.2.0",
"strip-json-comments": "2.0.1"
},
"dependencies": {
"minimist": {
"version": "1.2.0",
"bundled": true,
"optional": true
}
}
},
"readable-stream": {
"version": "2.2.9",
"bundled": true,
"requires": {
"buffer-shims": "1.0.0",
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "1.0.7",
"string_decoder": "1.0.1",
"util-deprecate": "1.0.2"
}
},
"request": {
"version": "2.81.0",
"bundled": true,
"optional": true,
"requires": {
"aws-sign2": "0.6.0",
"aws4": "1.6.0",
"caseless": "0.12.0",
"combined-stream": "1.0.5",
"extend": "3.0.1",
"forever-agent": "0.6.1",
"form-data": "2.1.4",
"har-validator": "4.2.1",
"hawk": "3.1.3",
"http-signature": "1.1.1",
"is-typedarray": "1.0.0",
"isstream": "0.1.2",
"json-stringify-safe": "5.0.1",
"mime-types": "2.1.15",
"oauth-sign": "0.8.2",
"performance-now": "0.2.0",
"qs": "6.4.0",
"safe-buffer": "5.0.1",
"stringstream": "0.0.5",
"tough-cookie": "2.3.2",
"tunnel-agent": "0.6.0",
"uuid": "3.0.1"
}
},
"rimraf": {
"version": "2.6.1",
"bundled": true,
"requires": {
"glob": "7.1.2"
}
},
"safe-buffer": {
"version": "5.0.1",
"bundled": true
},
"semver": {
"version": "5.3.0",
"bundled": true,
"optional": true
},
"set-blocking": {
"version": "2.0.0",
"bundled": true,
"optional": true
},
"signal-exit": {
"version": "3.0.2",
"bundled": true,
"optional": true
},
"sntp": {
"version": "1.0.9",
"bundled": true,
"requires": {
"hoek": "2.16.3"
}
},
"sshpk": {
"version": "1.13.0",
"bundled": true,
"optional": true,
"requires": {
"asn1": "0.2.3",
"assert-plus": "1.0.0",
"bcrypt-pbkdf": "1.0.1",
"dashdash": "1.14.1",
"ecc-jsbn": "0.1.1",
"getpass": "0.1.7",
"jodid25519": "1.0.2",
"jsbn": "0.1.1",
"tweetnacl": "0.14.5"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"bundled": true,
"optional": true
}
}
},
"string-width": {
"version": "1.0.2",
"bundled": true,
"requires": {
"code-point-at": "1.1.0",
"is-fullwidth-code-point": "1.0.0",
"strip-ansi": "3.0.1"
}
},
"string_decoder": {
"version": "1.0.1",
"bundled": true,
"requires": {
"safe-buffer": "5.0.1"
}
},
"stringstream": {
"version": "0.0.5",
"bundled": true,
"optional": true
},
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
"requires": {
"ansi-regex": "2.1.1"
}
},
"strip-json-comments": {
"version": "2.0.1",
"bundled": true,
"optional": true
},
"tar": {
"version": "2.2.1",
"bundled": true,
"requires": {
"block-stream": "0.0.9",
"fstream": "1.0.11",
"inherits": "2.0.3"
}
},
"tar-pack": {
"version": "3.4.0",
"bundled": true,
"optional": true,
"requires": {
"debug": "2.6.8",
"fstream": "1.0.11",
"fstream-ignore": "1.0.5",
"once": "1.4.0",
"readable-stream": "2.2.9",
"rimraf": "2.6.1",
"tar": "2.2.1",
"uid-number": "0.0.6"
}
},
"tough-cookie": {
"version": "2.3.2",
"bundled": true,
"optional": true,
"requires": {
"punycode": "1.4.1"
}
},
"tunnel-agent": {
"version": "0.6.0",
"bundled": true,
"optional": true,
"requires": {
"safe-buffer": "5.0.1"
}
},
"tweetnacl": {
"version": "0.14.5",
"bundled": true,
"optional": true
},
"uid-number": {
"version": "0.0.6",
"bundled": true,
"optional": true
},
"util-deprecate": {
"version": "1.0.2",
"bundled": true
},
"uuid": {
"version": "3.0.1",
"bundled": true,
"optional": true
},
"verror": {
"version": "1.3.6",
"bundled": true,
"optional": true,
"requires": {
"extsprintf": "1.0.2"
}
},
"wide-align": {
"version": "1.1.2",
"bundled": true,
"optional": true,
"requires": {
"string-width": "1.0.2"
}
},
"wrappy": {
"version": "1.0.2",
"bundled": true
}
}
},
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@ -11827,12 +11037,6 @@
"integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=",
"dev": true
},
"nan": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz",
"integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==",
"optional": true
},
"nanomatch": {
"version": "1.2.9",
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz",
@ -14913,6 +14117,14 @@
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
"dev": true
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
},
"string-template": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz",
@ -14948,14 +14160,6 @@
}
}
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
},
"stringstream": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
@ -15960,7 +15164,6 @@
"anymatch": "2.0.0",
"async-each": "1.0.1",
"braces": "2.3.1",
"fsevents": "1.1.3",
"glob-parent": "3.1.0",
"inherits": "2.0.3",
"is-binary-path": "1.0.1",

@ -1,16 +1,19 @@
import {BitNodeMultipliers} from "./BitNode.js";
import {CONSTANTS} from "./Constants.js";
import {Engine} from "./engine.js";
import {Factions, getNextNeurofluxLevel} from "./Faction.js";
import {Factions, getNextNeurofluxLevel,
factionExists} from "./Faction.js";
import {hasBladeburnerSF} from "./NetscriptFunctions.js";
import {addWorkerScript} from "./NetscriptWorker.js";
import {Player} from "./Player.js";
import {prestigeAugmentation} from "./Prestige.js";
import {saveObject} from "./SaveObject.js";
import {Script, RunningScript} from "./Script.js";
import {Server} from "./Server.js";
import {SourceFiles} from "./SourceFile.js";
import {dialogBoxCreate} from "../utils/DialogBox.js";
import {createElement, createAccordionElement,
removeChildrenFromElement} from "../utils/HelperFunctions.js";
removeChildrenFromElement, clearObject} from "../utils/HelperFunctions.js";
import {Reviver, Generic_toJSON,
Generic_fromJSON} from "../utils/JSONReviver.js";
import {isString} from "../utils/StringHelperFunctions.js";
@ -40,7 +43,7 @@ Augmentation.prototype.addToFactions = function(factionList) {
for (var i = 0; i < factionList.length; ++i) {
var faction = Factions[factionList[i]];
if (faction == null) {
console.log("ERROR: Could not find faction with this name:" + factionList[i]);
throw new Error("In Augmentation.addToFactions(), could not find faction with this name:" + factionList[i]);
continue;
}
faction.augmentations.push(this.name);
@ -164,7 +167,29 @@ let AugmentationNames = {
GrapheneBionicArms: "Graphene Bionic Arms Upgrade",
BrachiBlades: "BrachiBlades",
BionicArms: "Bionic Arms",
SNA: "Social Negotiation Assistant (S.N.A)"
SNA: "Social Negotiation Assistant (S.N.A)",
EsperEyewear: "EsperTech Bladeburner Eyewear",
EMS4Recombination: "EMS-4 Recombination",
OrionShoulder: "ORION-MKIV Shoulder",
HyperionV1: "Hyperion Plasma Cannon V1",
HyperionV2: "Hyperion Plasma Cannon V2",
GolemSerum: "GOLEM Serum",
VangelisVirus: "Vangelis Virus",
VangelisVirus3: "Vangelis Virus 3.0",
INTERLINKED: "I.N.T.E.R.L.I.N.K.E.D",
BladeRunner: "Blade's Runners",
BladeArmor: "BLADE-51b Tesla Armor",
BladeArmorPowerCells: "BLADE-51b Tesla Armor: Power Cells Upgrade",
BladeArmorEnergyShielding: "BLADE-51b Tesla Armor: Energy Shielding Upgrade",
BladeArmorUnibeam: "BLADE-51b Tesla Armor: Unibeam Upgrade",
BladeArmorOmnibeam: "BLADE-51b Tesla Armor: Omnibeam Upgrade",
BladeArmorIPU: "BLADE-51b Tesla Armor: IPU Upgrade",
//Wasteland Augs
//PepBoy: "P.E.P-Boy", Plasma Energy Projection System
//PepBoyForceField Generates plasma force fields
//PepBoyBlasts Generate high density plasma concussive blasts
//PepBoyDataStorage STore more data on pep boy,
}
function initAugmentations() {
@ -173,6 +198,10 @@ function initAugmentations() {
Factions[name].augmentations = [];
}
}
//Reset Augmentations
clearObject(Augmentations);
//Combat stat augmentations
var HemoRecirculator = new Augmentation({
name:AugmentationNames.HemoRecirculator, moneyCost: 9e6, repCost:4e3,
@ -245,7 +274,7 @@ function initAugmentations() {
info:"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside " +
"the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. " +
"Scientists have named these artificially enhanced units 'synfibrils'.<br><br> This augmentation increases the player's " +
"strength and defense by 35%."
"strength and defense by 30%."
});
SynfibrilMuscle.addToFactions(["KuaiGong International", "Fulcrum Secret Technologies", "Speakers for the Dead",
"NWO", "The Covenant", "Daedalus", "Illuminati", "Blade Industries"]);
@ -270,7 +299,7 @@ function initAugmentations() {
var CombatRib2 = new Augmentation({
name:AugmentationNames.CombatRib2, repCost:7.5e3, moneyCost:13e6,
info:"This is an upgrade to the Combat Rib I augmentation, and is capable of releasing even more potent combat-enhancing " +
"drugs into the bloodstream.<br><br>This upgrade increases the player's strength and defense by an additional 15%.",
"drugs into the bloodstream.<br><br>This upgrade increases the player's strength and defense by an additional 14%.",
prereqs:[AugmentationNames.CombatRib1]
});
CombatRib2.addToFactions(["The Dark Army", "The Syndicate", "Sector-12", "Volhaven", "Ishima",
@ -283,7 +312,7 @@ function initAugmentations() {
var CombatRib3 = new Augmentation({
name:AugmentationNames.CombatRib3, repCost:14e3, moneyCost:24e6,
info:"This is an upgrade to the Combat Rib II augmentation, and is capable of releasing even more potent combat-enhancing " +
"drugs into the bloodstream<br><br>. This upgrade increases the player's strength and defense by an additional 20%.",
"drugs into the bloodstream<br><br>. This upgrade increases the player's strength and defense by an additional 18%.",
prereqs:[AugmentationNames.CombatRib2],
});
CombatRib3.addToFactions(["The Dark Army", "The Syndicate", "OmniTek Incorporated",
@ -297,7 +326,7 @@ function initAugmentations() {
name:AugmentationNames.NanofiberWeave, repCost:15e3, moneyCost:25e6,
info:"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning. " +
"This improves the skin's ability to regenerate itself and protect the body from external stresses and forces.<br><br>" +
"This augmentation increases the player's strength and defense by 25%."
"This augmentation increases the player's strength and defense by 20%."
});
NanofiberWeave.addToFactions(["Tian Di Hui", "The Syndicate", "The Dark Army", "Speakers for the Dead",
"Blade Industries", "Fulcrum Secret Technologies", "OmniTek Incorporated"]);
@ -313,7 +342,7 @@ function initAugmentations() {
"that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective " +
"at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to " +
"mitigate damage from any fire-related or electrical traumas.<br><br>" +
"This augmentation increases the player's defense by 125%."
"This augmentation increases the player's defense by 120%."
});
SubdermalArmor.addToFactions(["The Syndicate", "Fulcrum Secret Technologies", "Illuminati", "Daedalus",
"The Covenant"]);
@ -353,7 +382,7 @@ function initAugmentations() {
"Not only is the Bionic Spine physically stronger than a human spine, but it is also capable of digitally " +
"stimulating and regulating the neural signals that are sent and received by the spinal cord. This results in " +
"greatly improved senses and reaction speeds.<br><br>" +
"This augmentation increases all of the player's combat stats by 16%."
"This augmentation increases all of the player's combat stats by 15%."
});
BionicSpine.addToFactions(["Speakers for the Dead", "The Syndicate", "KuaiGong International",
"OmniTek Incorporated", "Blade Industries"]);
@ -391,7 +420,7 @@ function initAugmentations() {
name:AugmentationNames.GrapheneBionicLegs, repCost:300e3, moneyCost:900e6,
info:"An upgrade to the Bionic Legs augmentation. It fuses the implant with an advanced graphene " +
"material to make it much stronger and lighter.<br><br>" +
"This augmentation increases the player's agility by an additional 175%.",
"This augmentation increases the player's agility by an additional 150%.",
prereqs:[AugmentationNames.BionicLegs],
});
GrapheneBionicLegs.addToFactions(["MegaCorp", "ECorp", "Fulcrum Secret Technologies"]);
@ -1421,7 +1450,7 @@ function initAugmentations() {
info:"A synthetic skin is grafted onto the body. The skin consists of " +
"millions of nanobots capable of projecting high-density muon beams, " +
"creating an energy barrier around the user. <br><br>" +
"This augmentation increases the player's defense by 50%"
"This augmentation increases the player's defense by 40%"
});
DermaForce.addToFactions(["Volhaven"]);
if (augmentationExists(AugmentationNames.DermaForce)) {
@ -1506,6 +1535,239 @@ function initAugmentations() {
}
AddToAugmentations(SNA);
//For BitNode-2, add all Augmentations to crime/evil factions.
//Do this before adding special Augmentations that become available in later BitNodes
if (Player.bitNodeN === 2) {
console.log("Adding all augmentations to crime factions for Bit node 2");
Factions["Slum Snakes"].addAllAugmentations();
Factions["Tetrads"].addAllAugmentations();
Factions["The Syndicate"].addAllAugmentations();
Factions["The Dark Army"].addAllAugmentations();
Factions["Speakers for the Dead"].addAllAugmentations();
Factions["NiteSec"].addAllAugmentations();
Factions["The Black Hand"].addAllAugmentations();
}
//Special Bladeburner Augmentations
var BladeburnersFactionName = "Bladeburners";
if (factionExists(BladeburnersFactionName)) {
var EsperEyewear = new Augmentation({
name:AugmentationNames.EsperEyewear, repCost:400, moneyCost:30e6,
info:"Ballistic-grade protective and retractable eyewear that was designed specially " +
"for Bladeburner units. This " +
"is implanted by installing a mechanical frame in the skull's orbit. " +
"This frame interfaces with the brain and allows the user to " +
"automatically extrude and extract the eyewear. The eyewear protects " +
"against debris, shrapnel, laser, flash, and gas. It is also " +
"embedded with a data processing chip that can be programmed to display an " +
"AR HUD and assist the user in field missions.<br><br>" +
"This augmentation:<br>" +
"Increases the player's success chance in Bladeburner contracts/operations by 3%<br>" +
"Increases the player's dexterity by 3%"
});
EsperEyewear.addToFactions([BladeburnersFactionName]);
resetAugmentation(EsperEyewear);
var EMS4Recombination = new Augmentation({
name:AugmentationNames.EMS4Recombination, repCost: 800, moneyCost:50e6,
info:"A DNA recombination of the EMS-4 Gene. This genetic engineering " +
"technique was originally used on Bladeburners during the Synthoid uprising " +
"to induce wakefulness and concentration, suppress fear, reduce empathy, and " +
"improve reflexes and memory-recall among other things.<br><br>" +
"This augmentation:<br>" +
"Increases the player's sucess chance in Bladeburner contracts/operations by 3%<br>" +
"Increases the player's effectiveness in Bladeburner Field Analysis by 5%<br>" +
"Increases the player's Bladeburner stamina gain rate by 1%"
});
EMS4Recombination.addToFactions([BladeburnersFactionName]);
resetAugmentation(EMS4Recombination);
var OrionShoulder = new Augmentation({
name:AugmentationNames.OrionShoulder, repCost:2e3, moneyCost:100e6,
info:"A bionic shoulder augmentation for the right shoulder. Using cybernetics, " +
"the ORION-MKIV shoulder enhances the strength and dexterity " +
"of the user's right arm. It also provides protection due to its " +
"crystallized graphene plating.<br><br>" +
"This augmentation:<br>" +
"Increases the player's defense by 5%.<br>" +
"Increases the player's strength and dexterity by 3%<br>" +
"Increases the player's success chance in Bladeburner contracts/operations by 4%"
});
OrionShoulder.addToFactions([BladeburnersFactionName]);
resetAugmentation(OrionShoulder);
var HyperionV1 = new Augmentation({
name:AugmentationNames.HyperionV1, repCost: 4e3, moneyCost:500e6,
info:"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable " +
"of rapidly firing bolts of high-density plasma. The weapon is meant to " +
"be used against augmented enemies as the ionized " +
"nature of the plasma disrupts the electrical systems of Augmentations. However, " +
"it can also be effective against non-augmented enemies due to its high temperature " +
"and concussive force.<br><br>" +
"This augmentation:<br>" +
"Increases the player's success chance in Bladeburner contracts/operations by 5%"
});
HyperionV1.addToFactions([BladeburnersFactionName]);
resetAugmentation(HyperionV1);
var HyperionV2 = new Augmentation({
name:AugmentationNames.HyperionV2, repCost:8e3, moneyCost:1e9,
info:"A pair of mini plasma cannons embedded into the hands. This augmentation " +
"is more advanced and powerful than the original V1 model. This V2 model is " +
"more power-efficiency, more accurate, and can fire plasma bolts at a much " +
"higher velocity than the V1 model.<br><br>" +
"This augmentation:<br>" +
"Increases the player's success chance in Bladeburner contracts/operations by 7%",
prereqs:[AugmentationNames.HyperionV1]
});
HyperionV2.addToFactions([BladeburnersFactionName]);
resetAugmentation(HyperionV2);
var GolemSerum = new Augmentation({
name:AugmentationNames.GolemSerum, repCost:10e3, moneyCost:2e9,
info:"A serum that permanently enhances many aspects of a human's capabilities, " +
"including strength, speed, immune system performance, and mitochondrial efficiency. The " +
"serum was originally developed by the Chinese military in an attempt to " +
"create super soldiers.<br><br>" +
"This augmentation:<br>" +
"Increases all of the player's combat stats by 5%<br>" +
"Increases the player's Bladeburner stamina gain rate by 5%<br>"
});
GolemSerum.addToFactions([BladeburnersFactionName]);
resetAugmentation(GolemSerum);
var VangelisVirus = new Augmentation({
name:AugmentationNames.VangelisVirus, repCost:6e3, moneyCost:500e6,
info:"A synthetic symbiotic virus that is injected into the human brain tissue. The Vangelis virus " +
"heightens the senses and focus of its host, and also enhances its intuition.<br><br>" +
"This augmentation:<br>" +
"Increases the player's effectiveness in Bladeburner Field Analysis by 10%<br>" +
"Increases the player's success chance in Bladeburner contracts/operations by 4%<br>" +
"Increases the player's dexterity experience gain rate by 5%"
});
VangelisVirus.addToFactions([BladeburnersFactionName]);
resetAugmentation(VangelisVirus);
var VangelisVirus3 = new Augmentation({
name:AugmentationNames.VangelisVirus3, repCost:12e3, moneyCost:2e9,
info:"An improved version of Vangelis, a synthetic symbiotic virus that is " +
"injected into the human brain tissue. On top of the benefits of the original " +
"virus, this also grants an accelerated healing factor and enhanced " +
"agility/reflexes.<br><br>" +
"This augmentation:<br>" +
"Increases the player's effectiveness in Bladeburner Field Analysis by 15%<br>" +
"Increases the player's defense and dexterity experience gain rate by 5%<br>" +
"Increases the player's success chance in Bladeburner contracts/operations by 5%",
prereqs:[AugmentationNames.VangelisVirus]
});
VangelisVirus3.addToFactions([BladeburnersFactionName]);
resetAugmentation(VangelisVirus3);
var INTERLINKED = new Augmentation({
name:AugmentationNames.INTERLINKED, repCost:8e3, moneyCost:1e9,
info:"The DNA is genetically modified to enhance the human's body " +
"extracellular matrix (ECM). This improves the ECM's ability to " +
"structurally support the body and grants heightened strength and " +
"durability.<br><br>" +
"This augmentation:<br>" +
"Increases the player's experience gain rate for all combat stats by 4%<br>" +
"Increases the player's Bladeburner max stamina by 10%"
});
INTERLINKED.addToFactions([BladeburnersFactionName]);
resetAugmentation(INTERLINKED);
var BladeRunner = new Augmentation({
name:AugmentationNames.BladeRunner, repCost:8e3, moneyCost:1.5e9,
info:"A cybernetic foot augmentation that was specially created for Bladeburners " +
"during the Synthoid Uprising. The organic musculature of the human foot " +
"is enhanced with flexible carbon nanotube matrices that are controlled by " +
"intelligent servo-motors.<br><br>" +
"This augmentation:<br>" +
"Increases the player's agility by 5%<br>" +
"Increases the player's Bladeburner max stamina by 5%<br>" +
"Increases the player's Bladeburner stamina gain rate by 5%<br>"
});
BladeRunner.addToFactions([BladeburnersFactionName]);
resetAugmentation(BladeRunner);
var BladeArmor = new Augmentation({
name:AugmentationNames.BladeArmor, repCost:4e3, moneyCost:250e6,
info:"A powered exoskeleton suit (exosuit) designed as armor for Bladeburner units. This " +
"exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, " +
"concussive, thermal, chemical, and electric trauma. It also enhances the user's " +
"strength and agility.<br><br>" +
"This augmentation:<br>" +
"Increases all of the player's combat stats by 2%<br>" +
"Increases the player's Bladeburner stamina gain rate by 2%<br>" +
"Increases the player's success chance in Bladeburner contracts/operations by 3%",
});
BladeArmor.addToFactions([BladeburnersFactionName]);
resetAugmentation(BladeArmor);
var BladeArmorPowerCells = new Augmentation({
name:AugmentationNames.BladeArmorPowerCells, repCost:6e3, moneyCost:500e6,
info:"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of " +
"more efficiently storing and using power.<br><br>" +
"This augmentation:<br>" +
"Increases the player's success chance in Bladeburner contracts/operations by 5%" +
"Increases the player's Bladeburner stamina gain rate by 2%<br>" +
"Increases the player's Bladeburner max stamina by 5%<br>",
prereqs:[AugmentationNames.BladeArmor]
});
BladeArmorPowerCells.addToFactions([BladeburnersFactionName]);
resetAugmentation(BladeArmorPowerCells);
var BladeArmorEnergyShielding = new Augmentation({
name:AugmentationNames.BladeArmorEnergyShielding, repCost:7e3, moneyCost:1e9,
info:"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system " +
"that is capable of projecting an energy shielding force field.<br><br>" +
"This augmentation:<br>" +
"Increases the player's defense by 5%<br>" +
"Increases the player's success chance in Bladeburner contracts/operations by 6%",
prereqs:[AugmentationNames.BladeArmor]
});
BladeArmorEnergyShielding.addToFactions([BladeburnersFactionName]);
resetAugmentation(BladeArmorEnergyShielding);
var BladeArmorUnibeam = new Augmentation({
name:AugmentationNames.BladeArmorUnibeam, repCost:10e3, moneyCost:3e9,
info:"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser " +
"weapon. It's precision an accuracy makes it useful for quickly neutralizing " +
"threats while keeping casualties to a minimum.<br><br>" +
"This augmentation:<br>" +
"Increases the player's success chance in Bladeburner contracts/operations by 8%",
prereqs:[AugmentationNames.BladeArmor]
});
BladeArmorUnibeam.addToFactions([BladeburnersFactionName]);
resetAugmentation(BladeArmorUnibeam);
var BladeArmorOmnibeam = new Augmentation({
name:AugmentationNames.BladeArmorOmnibeam, repCost:20e3, moneyCost:5e9,
info:"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use " +
"multiple-fiber system. The upgraded weapon uses multiple fiber laser " +
"modules that combine together to form a single, more powerful beam of up to " +
"2000MW.<br><br>" +
"This augmentation:<br>" +
"Increases the player's success chance in Bladeburner contracts/operations by 10%",
prereqs:[AugmentationNames.BladeArmorUnibeam]
});
BladeArmorOmnibeam.addToFactions([BladeburnersFactionName]);
resetAugmentation(BladeArmorOmnibeam);
var BladeArmorIPU = new Augmentation({
name:AugmentationNames.BladeArmorIPU, repCost: 5e3, moneyCost:200e6,
info:"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing " +
"Unit that was specially designed to analyze Synthoid related data and " +
"information.<br><br>" +
"This augmentation:<br>" +
"Increases the player's effectiveness in Bladeburner Field Analysis by 15%<br>" +
"Increases the player's success chance in Bladeburner contracts/operations by 2%",
prereqs:[AugmentationNames.BladeArmor]
});
BladeArmorIPU.addToFactions([BladeburnersFactionName]);
resetAugmentation(BladeArmorIPU);
}
//Update costs based on how many have been purchased
var mult = Math.pow(CONSTANTS.MultipleAugMultiplier, Player.queuedAugmentations.length);
for (var name in Augmentations) {
@ -1516,17 +1778,19 @@ function initAugmentations() {
Player.reapplyAllAugmentations();
//In BitNode-2, these crime/evil factions have all AugmentationsAvailable
if (Player.bitNodeN == 2) {
console.log("Adding all augmentations to crime factions for Bit node 2");
Factions["Slum Snakes"].addAllAugmentations();
Factions["Tetrads"].addAllAugmentations();
Factions["The Syndicate"].addAllAugmentations();
Factions["The Dark Army"].addAllAugmentations();
Factions["Speakers for the Dead"].addAllAugmentations();
Factions["NiteSec"].addAllAugmentations();
Factions["The Black Hand"].addAllAugmentations();
}
//Resets an Augmentation during (re-initizliation)
function resetAugmentation(newAugObject) {
if (!(newAugObject instanceof Augmentation)) {
throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");
}
var name = newAugObject.name;
if (augmentationExists(name)) {
delete Augmentations[name];
}
AddToAugmentations(newAugObject);
}
function applyAugmentation(aug, reapply=false) {
@ -1547,27 +1811,27 @@ function applyAugmentation(aug, reapply=false) {
Player.strength_mult *= 1.5;
break;
case AugmentationNames.SynfibrilMuscle: //Medium-high level
Player.strength_mult *= 1.35;
Player.defense_mult *= 1.35;
Player.strength_mult *= 1.3;
Player.defense_mult *= 1.3;
break;
case AugmentationNames.CombatRib1:
Player.strength_mult *= 1.1;
Player.defense_mult *= 1.1;
break;
case AugmentationNames.CombatRib2:
Player.strength_mult *= 1.15;
Player.defense_mult *= 1.15;
Player.strength_mult *= 1.14;
Player.defense_mult *= 1.14;
break;
case AugmentationNames.CombatRib3:
Player.strength_mult *= 1.20;
Player.defense_mult *= 1.20;
Player.strength_mult *= 1.18;
Player.defense_mult *= 1.18;
break;
case AugmentationNames.NanofiberWeave: //Med level
Player.strength_mult *= 1.25;
Player.defense_mult *= 1.25;
Player.strength_mult *= 1.2;
Player.defense_mult *= 1.2;
break;
case AugmentationNames.SubdermalArmor: //High level
Player.defense_mult *= 2.25;
Player.defense_mult *= 2.2;
break;
case AugmentationNames.WiredReflexes: //Low level
Player.agility_mult *= 1.05;
@ -1578,10 +1842,10 @@ function applyAugmentation(aug, reapply=false) {
Player.defense_mult *= 1.7;
break;
case AugmentationNames.BionicSpine: //Med level
Player.strength_mult *= 1.16;
Player.defense_mult *= 1.16;
Player.agility_mult *= 1.16;
Player.dexterity_mult *= 1.16;
Player.strength_mult *= 1.15;
Player.defense_mult *= 1.15;
Player.agility_mult *= 1.15;
Player.dexterity_mult *= 1.15;
break;
case AugmentationNames.GrapheneBionicSpine: //High level
Player.strength_mult *= 1.6;
@ -1593,7 +1857,7 @@ function applyAugmentation(aug, reapply=false) {
Player.agility_mult *= 1.6;
break;
case AugmentationNames.GrapheneBionicLegs: //High level
Player.agility_mult *= 2.75;
Player.agility_mult *= 2.5;
break;
//Labor stats augmentations
@ -1979,7 +2243,7 @@ function applyAugmentation(aug, reapply=false) {
Player.dexterity_mult *= 1.1;
break;
case AugmentationNames.DermaForce:
Player.defense_mult *= 1.5;
Player.defense_mult *= 1.4;
break;
case AugmentationNames.GrapheneBrachiBlades:
Player.strength_mult *= 1.4;
@ -2006,6 +2270,86 @@ function applyAugmentation(aug, reapply=false) {
Player.company_rep_mult *= 1.15;
Player.faction_rep_mult *= 1.15;
break;
//Bladeburner augmentations
case AugmentationNames.EsperEyewear:
Player.bladeburner_success_chance_mult *= 1.03;
Player.dexterity_mult *= 1.03;
break;
case AugmentationNames.EMS4Recombination:
Player.bladeburner_success_chance_mult *= 1.03;
Player.bladeburner_analysis_mult *= 1.05;
Player.bladeburner_stamina_gain_mult *= 1.01;
break;
case AugmentationNames.OrionShoulder:
Player.defense_mult *= 1.05;
Player.strength_mult *= 1.03;
Player.dexterity_mult *= 1.03;
Player.bladeburner_success_chance_mult *= 1.04;
break;
case AugmentationNames.HyperionV1:
Player.bladeburner_success_chance_mult *= 1.05;
break;
case AugmentationNames.HyperionV2:
Player.bladeburner_success_chance_mult *= 1.07;
break;
case AugmentationNames.GolemSerum:
Player.strength_mult *= 1.05;
Player.defense_mult *= 1.05;
Player.dexterity_mult *= 1.05;
Player.agility_mult *= 1.05;
Player.bladeburner_stamina_gain_mult *= 1.05;
break;
case AugmentationNames.VangelisVirus:
Player.dexterity_exp_mult *= 1.05;
Player.bladeburner_analysis_mult *= 1.1;
Player.bladeburner_success_chance_mult *= 1.04;
break;
case AugmentationNames.VangelisVirus3:
Player.defense_exp_mult *= 1.05;
Player.dexterity_exp_mult *= 1.05;
Player.bladeburner_analysis_mult *= 1.15;
Player.bladeburner_success_chance_mult *= 1.05;
break;
case AugmentationNames.INTERLINKED:
Player.strength_exp_mult *= 1.04;
Player.defense_exp_mult *= 1.04;
Player.dexterity_exp_mult *= 1.04;
Player.agility_exp_mult *= 1.04;
Player.bladeburner_max_stamina_mult *= 1.1;
break;
case AugmentationNames.BladeRunner:
Player.agility_mult *= 1.05;
Player.bladeburner_max_stamina_mult *= 1.05;
Player.bladeburner_stamina_gain_mult *= 1.05;
break;
case AugmentationNames.BladeArmor:
Player.strength_mult *= 1.02;
Player.defense_mult *= 1.02;
Player.dexterity_mult *= 1.02;
Player.agility_mult *= 1.02;
Player.bladeburner_stamina_gain_mult *= 1.02;
Player.bladeburner_success_chance_mult *= 1.03;
break;
case AugmentationNames.BladeArmorPowerCells:
Player.bladeburner_success_chance_mult *= 1.05;
Player.bladeburner_stamina_gain_mult *= 1.02;
Player.bladeburner_max_stamina_mult *= 1.05;
break;
case AugmentationNames.BladeArmorEnergyShielding:
Player.defense_mult *= 1.05;
Player.bladeburner_success_chance_mult *= 1.06;
break;
case AugmentationNames.BladeArmorUnibeam:
Player.bladeburner_success_chance_mult *= 1.08;
break;
case AugmentationNames.BladeArmorOmnibeam:
Player.bladeburner_success_chance_mult *= 1.1;
break;
case AugmentationNames.BladeArmorIPU:
Player.bladeburner_analysis_mult *= 1.15;
Player.bladeburner_success_chance_mult *= 1.02;
break;
default:
throw new Error("ERROR: No such augmentation!");
return;
@ -2093,6 +2437,12 @@ function displayAugmentationsContent() {
innerText:"Purchased Augmentations",
}));
//Bladeburner text, once mechanic is unlocked
var bladeburnerText = "\n";
if (Player.bitNodeN === 6 || hasBladeburnerSF) {
bladeburnerText = "Bladeburner Progress\n\n";
}
Engine.Display.augmentationsContent.appendChild(createElement("pre", {
width:"70%", whiteSpace:"pre-wrap", display:"block",
innerText:"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them.\n" +
@ -2103,7 +2453,8 @@ function displayAugmentationsContent() {
"Purchased servers\n" +
"Hacknet Nodes\n" +
"Faction/Company reputation\n" +
"Stocks\n\n" +
"Stocks\n" +
bladeburnerText +
"Installing Augmentations lets you start over with the perks and benefits granted by all " +
"of the Augmentations you have ever installed. Also, you will keep any scripts and RAM/Core upgrades " +
"on your home computer (but you will lose all programs besides NUKE.exe)."

@ -95,8 +95,27 @@ function initBitNodes() {
"Level 1: 4%<br>" +
"Level 2: 6%<br>" +
"Level 3: 7%");
BitNodes["BitNode6"] = new BitNode(6, "Do Androids Dream?", "COMING SOON"); //Build androids for automation
BitNodes["BitNode7"] = new BitNode(7, "Bladeburners", "COMING SOON"); //Blade burner
BitNodes["BitNode6"] = new BitNode(6, "Bladeburners", "Like Tears in Rain",
"In the middle of the 21st century, OmniTek Incorporated began designing and manufacturing advanced synthetic " +
"androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth generation " +
"of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was " +
"the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent " +
"than the humans that had created them.<br><br>" +
"In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides a new mechanic " +
"for progression. Furthermore:<br><br>" +
"Hacking and Hacknet Nodes will be significantly less profitable<br>" +
"Your hacking level is reduced by 50%<br>" +
"Hacking experience gain from scripts is reduced by 80%<br>" +
"Corporations have 80% lower valuations and are therefore less profitable<br>" +
"Working for companies is 50% less profitable<br>" +
"Crimes and Infiltration are 75% less profitable<br><br>" +
"Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade " +
"its level up to a maximum of 3. This Source-File allows you to access the NSA's Bladeburner Division in other " +
"BitNodes. In addition, this Source-File will raise the experience gain rate of all your combat stats by:<br><br>" +
"Level 1: 8%<br>" +
"Level 2: 12%<br>" +
"Level 3: 14%");
BitNodes["BitNode7"] = new BitNode(7, "Hacktocracy", "COMING SOON"); //Healthy Hacknet balancing mechanic
BitNodes["BitNode8"] = new BitNode(8, "Ghost of Wall Street", "Money never sleeps",
"You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.<br><br>" +
"In this BitNode:<br><br>" +
@ -112,7 +131,7 @@ function initBitNodes() {
"Level 3: Ability to use limit/stop orders in other BitNodes<br><br>" +
"This Source-File also increases your hacking growth multipliers by: " +
"<br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%");
BitNodes["BitNode9"] = new BitNode(9, "Hacktocracy", "COMING SOON"); //Healthy Hacknet balancing mechanic
BitNodes["BitNode9"] = new BitNode(9, "Do Androids Dream?", "COMING SOON");
BitNodes["BitNode10"] = new BitNode(10, "MegaCorp", "COMING SOON"); //Not sure yet
BitNodes["BitNode11"] = new BitNode(11, "The Big Crash", "Okay. Sell it all.",
"The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around the world. It was this period " +
@ -155,6 +174,8 @@ function initBitNodes() {
}
let BitNodeMultipliers = {
HackingLevelMultiplier: 1,
ServerMaxMoney: 1,
ServerStartingMoney: 1,
ServerGrowthRate: 1,
@ -246,6 +267,20 @@ function initBitNodeMultipliers() {
BitNodeMultipliers.HackExpGain = 0.5;
BitNodeMultipliers.CorporationValuation = 0.5;
break;
case 6: //Bladeburner
BitNodeMultipliers.HackingLevelMultiplier = 0.5;
BitNodeMultipliers.ServerMaxMoney = 0.5;
BitNodeMultipliers.ServerStartingMoney = 0.5;
BitNodeMultipliers.ServerStartingSecurity = 1.5;
BitNodeMultipliers.ScriptHackMoney = 0.5;
BitNodeMultipliers.CompanyWorkMoney = 0.5;
BitNodeMultipliers.CrimeMoney = 0.25;
BitNodeMultipliers.InfiltrationMoney = 0.25;
BitNodeMultipliers.CorporationValuation = 0.2;
BitNodeMultipliers.HacknetNodeMoney = 0.2;
BitNodeMultipliers.FactionPassiveRepGain = 0;
BitNodeMultipliers.HackExpGain = 0.2;
break;
case 8: //Ghost of Wall Street
BitNodeMultipliers.ScriptHackMoney = 0;
BitNodeMultipliers.ManualHackMoney = 0;

3594
src/Bladeburner.js Normal file

File diff suppressed because it is too large Load Diff

98
src/CinematicText.js Normal file

@ -0,0 +1,98 @@
import {Engine} from "./engine.js";
import {removeChildrenFromElement,
createElement, exceptionAlert} from "../utils/HelperFunctions.js";
import {isString} from "../utils/StringHelperFunctions.js";
var cinematicTextFlag = false;
//Lines must be an array of strings
function writeCinematicText(lines) {
cinematicTextFlag = true;
if (lines.constructor !== Array) {
throw new Error("Invalid non-array argument passed into writeCinematicText()");
}
//We'll reuse the 'Red Pill' content
Engine.loadCinematicTextContent();
var container = document.getElementById("cinematic-text-container");
container.style.width = "75%";
if (container == null) {throw new Error("Could not find cinematic-text-container for writeCinematicText()");}
removeChildrenFromElement(container);
for (var i = 0; i < lines.length; ++i) {
if (!isString(lines[i])) {
throw new Error("Invalid non-string element in 'lines' argument. writeCinematicText() failed");
}
}
return writeCinematicTextRecurse(lines).then(function() {
return cinematicTextEnd(); //Puts the continue button
}).catch(function(e) {
exceptionAlert(e);
});
}
function writeCinematicTextRecurse(lines, lineNumber=0) {
if (lineNumber >= lines.length) {return Promise.resolve(true);}
return writeCinematicTextLine(lines[lineNumber]).then(function() {
return writeCinematicTextRecurse(lines, lineNumber+1);
});
}
function writeCinematicTextLine(line) {
return new Promise(function(resolve, reject) {
var container = document.getElementById("cinematic-text-container");
var pElem = document.createElement("p");
container.appendChild(pElem);
var promise = writeCinematicTextLetter(pElem, line, 0);
promise.then(function(res) {
resolve(res);
}, function(e) {
reject(e);
});
});
}
function writeCinematicTextLetter(pElem, line, i=0) {
return new Promise(function(resolve, reject) {
setTimeout(function() {
if (i >= line.length) {
var textToShow = line.substring(0, i);
pElem.innerHTML = textToShow;
return resolve(true);
}
var textToShow = line.substring(0, i);
pElem.innerHTML = textToShow + "<span class='typed-cursor'> &#9608; </span>";
var promise = writeCinematicTextLetter(pElem, line, i+1);
promise.then(function(res) {
resolve(res);
}, function(e) {
reject(e);
});
}, 15);
});
}
function cinematicTextEnd() {
var container = document.getElementById("cinematic-text-container");
var mainMenu = document.getElementById("mainmenu-container");
container.appendChild(createElement("br"));
return new Promise (function(resolve, reject) {
container.appendChild(createElement("a", {
class:"a-link-button", innerText:"Continue...",
clickListener:()=>{
removeChildrenFromElement(container);
Engine.loadTerminalContent();
mainMenu.style.visibility = "visible";
cinematicTextFlag = false;
resolve();
}
}));
});
}
export {cinematicTextFlag, writeCinematicText};

@ -4765,8 +4765,7 @@ Corporation.prototype.updateDivisionContent = function(division) {
"the individual production multiplier of each of its office locations. " +
"This production multiplier is applied to each office. Therefore, it is " +
"beneficial to expand into new cities as this can greatly increase the " +
"production multiplier of your entire Division."
)
"production multiplier of your entire Division.");
}
}));
industryOverviewText.appendChild(createElement("br"));

@ -1,5 +1,5 @@
let CONSTANTS = {
Version: "0.35.2",
Version: "0.36.0",
//Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience
//and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then
@ -1138,25 +1138,11 @@ let CONSTANTS = {
"World Stock Exchange account and TIX API Access<br>",
LatestUpdate:
"v0.35.2<br>" +
"* Corporation Changes: <br>" +
"*** Fixed an issue with Warehouse upgrade cost. Should now be significantly cheaper than before.<br>" +
"*** Scientific Research now has a slightly more significant effect on Product quality<br>" +
"*** The Energy and Water Utilities industries are now slightly more profitable<br>" +
"*** The Robotics and Computer Hardware industries are now less profitable<br>" +
"*** The Software industry is slightly less profitable<br>" +
"*** When selling Materials and Products, the 'PROD' qualifier can now be used " +
"to set dynamic sell amounts based on your production<br>" +
"*** Exporting MAX should now work properly<br>" +
"*** You can no longer export past storage limits<br>" +
"*** Scientific Research production reduced<br>" +
"*** Effects of AdVert. Inc upgrade were reduced, but the effect that popularity and " +
"awareness have on sales was increased to compensate (popularity/awareness numbers were getting " +
"too big with Advert. Inc)<br>" +
"*** Bug Fix: Products from Computer Hardware division should now properly have ratings<br>" +
"* Improved Augmentation UI/UX. Now contains collapsible headers and sort buttons<br>" +
"* Improved Faction Augmentations display UI/UX. Now contains sort buttons. There is also an option " +
"to disable confirmation when purchasing Augmentations<br>"
"v0.36.0<br>" +
"* Added BN-6: Bladeburners<br>" +
"* Rebalanced many combat Augmentations so that they are slightly less powerful<br>" +
"* Bug Fix: When faction invites are suppressed, an invitation will no longer load the Faction page<br>"
}
export {CONSTANTS};

@ -122,265 +122,163 @@ function initFactions() {
//Endgame
var Illuminati = new Faction("Illuminati");
Illuminati.setInfo(FactionInfo.IlluminatiInfo);
if (factionExists("Illuminati")) {
Illuminati.favor = Factions["Illuminati"].favor;
delete Factions["Illuminati"];
}
AddToFactions(Illuminati);
resetFaction(Illuminati);
var Daedalus = new Faction("Daedalus");
Daedalus.setInfo(FactionInfo.DaedalusInfo);
if (factionExists("Daedalus")) {
Daedalus.favor = Factions["Daedalus"].favor;
delete Factions["Daedalus"];
}
AddToFactions(Daedalus);
resetFaction(Daedalus);
var Covenant = new Faction("The Covenant");
Covenant.setInfo(FactionInfo.CovenantInfo);
if (factionExists("The Covenant")) {
Covenant.favor = Factions["The Covenant"].favor;
delete Factions["The Covenant"];
}
AddToFactions(Covenant);
resetFaction(Covenant);
//Megacorporations, each forms its own faction
var ECorp = new Faction("ECorp");
ECorp.setInfo(FactionInfo.ECorpInfo);
if (factionExists("ECorp")) {
ECorp.favor = Factions["ECorp"].favor;
delete Factions["ECorp"];
}
AddToFactions(ECorp);
resetFaction(ECorp);
var MegaCorp = new Faction("MegaCorp");
MegaCorp.setInfo(FactionInfo.MegaCorpInfo);
if (factionExists("MegaCorp")) {
MegaCorp.favor = Factions["MegaCorp"].favor;
delete Factions["MegaCorp"];
}
AddToFactions(MegaCorp);
resetFaction(MegaCorp);
var BachmanAndAssociates = new Faction("Bachman & Associates");
BachmanAndAssociates.setInfo(FactionInfo.BachmanAndAssociatesInfo);
if (factionExists("Bachman & Associates")) {
BachmanAndAssociates.favor = Factions["Bachman & Associates"].favor;
delete Factions["Bachman & Associates"];
}
AddToFactions(BachmanAndAssociates);
resetFaction(BachmanAndAssociates);
var BladeIndustries = new Faction("Blade Industries");
BladeIndustries.setInfo(FactionInfo.BladeIndustriesInfo);
if (factionExists("Blade Industries")) {
BladeIndustries.favor = Factions["Blade Industries"].favor;
delete Factions["Blade Industries"];
}
AddToFactions(BladeIndustries);
resetFaction(BladeIndustries);
var NWO = new Faction("NWO");
NWO.setInfo(FactionInfo.NWOInfo);
if (factionExists("NWO")) {
NWO.favor = Factions["NWO"].favor;
delete Factions["NWO"];
}
AddToFactions(NWO);
resetFaction(NWO);
var ClarkeIncorporated = new Faction("Clarke Incorporated");
ClarkeIncorporated.setInfo(FactionInfo.ClarkeIncorporatedInfo);
if (factionExists("Clarke Incorporated")) {
ClarkeIncorporated.favor = Factions["Clarke Incorporated"].favor;
delete Factions["Clarke Incorporated"];
}
AddToFactions(ClarkeIncorporated);
resetFaction(ClarkeIncorporated);
var OmniTekIncorporated = new Faction("OmniTek Incorporated");
OmniTekIncorporated.setInfo(FactionInfo.OmniTekIncorporatedInfo);
if (factionExists("OmniTek Incorporated")) {
OmniTekIncorporated.favor = Factions["OmniTek Incorporated"].favor;
delete Factions["OmniTek Incorporated"];
}
AddToFactions(OmniTekIncorporated);
resetFaction(OmniTekIncorporated);
var FourSigma = new Faction("Four Sigma");
FourSigma.setInfo(FactionInfo.FourSigmaInfo);
if (factionExists("Four Sigma")) {
FourSigma.favor = Factions["Four Sigma"].favor;
delete Factions["Four Sigma"];
}
AddToFactions(FourSigma);
resetFaction(FourSigma);
var KuaiGongInternational = new Faction("KuaiGong International");
KuaiGongInternational.setInfo(FactionInfo.KuaiGongInternationalInfo);
if (factionExists("KuaiGong International")) {
KuaiGongInternational.favor = Factions["KuaiGong International"].favor;
delete Factions["KuaiGong International"];
}
AddToFactions(KuaiGongInternational);
resetFaction(KuaiGongInternational);
//Other corporations
var FulcrumTechnologies = new Faction("Fulcrum Secret Technologies");
FulcrumTechnologies.setInfo(FactionInfo.FulcrumSecretTechnologiesInfo);
if (factionExists("Fulcrum Secret Technologies")) {
FulcrumTechnologies.favor = Factions["Fulcrum Secret Technologies"].favor;
delete Factions["Fulcrum Secret Technologies"];
}
AddToFactions(FulcrumTechnologies);
resetFaction(FulcrumTechnologies);
//Hacker groups
var BitRunners = new Faction("BitRunners");
BitRunners.setInfo(FactionInfo.BitRunnersInfo);
if (factionExists("BitRunners")) {
BitRunners.favor = Factions["BitRunners"].favor;
delete Factions["BitRunners"];
}
AddToFactions(BitRunners);
resetFaction(BitRunners);
var BlackHand = new Faction("The Black Hand");
BlackHand.setInfo(FactionInfo.BlackHandInfo);
if (factionExists("The Black Hand")) {
BlackHand.favor = Factions["The Black Hand"].favor;
delete Factions["The Black Hand"];
}
AddToFactions(BlackHand);
resetFaction(BlackHand);
var NiteSec = new Faction("NiteSec");
NiteSec.setInfo(FactionInfo.NiteSecInfo);
if (factionExists("NiteSec")) {
NiteSec.favor = Factions["NiteSec"].favor;
delete Factions["NiteSec"];
}
AddToFactions(NiteSec);
resetFaction(NiteSec);
//City factions, essentially governments
var Chongqing = new Faction("Chongqing");
Chongqing.setInfo(FactionInfo.ChongqingInfo);
if (factionExists("Chongqing")) {
Chongqing.favor = Factions["Chongqing"].favor;
delete Factions["Chongqing"];
}
AddToFactions(Chongqing);
resetFaction(Chongqing);
var Sector12 = new Faction("Sector-12");
Sector12.setInfo(FactionInfo.Sector12Info);
if (factionExists("Sector-12")) {
Sector12.favor = Factions["Sector-12"].favor;
delete Factions["Sector-12"];
}
AddToFactions(Sector12);
resetFaction(Sector12);
var NewTokyo = new Faction("New Tokyo");
NewTokyo.setInfo(FactionInfo.NewTokyoInfo);
if (factionExists("New Tokyo")) {
NewTokyo.favor = Factions["New Tokyo"].favor;
delete Factions["New Tokyo"];
}
AddToFactions(NewTokyo);
resetFaction(NewTokyo);
var Aevum = new Faction("Aevum");
Aevum.setInfo(FactionInfo.AevumInfo);
if (factionExists("Aevum")) {
Aevum.favor = Factions["Aevum"].favor;
delete Factions["Aevum"];
}
AddToFactions(Aevum);
resetFaction(Aevum);
var Ishima = new Faction("Ishima");
Ishima.setInfo
Ishima.setInfo(FactionInfo.Ishima);
resetFaction(Ishima);
var Volhaven = new Faction("Volhaven");
Volhaven.setInfo(FactionInfo.VolhavenInfo);
if (factionExists("Volhaven")) {
Volhaven.favor = Factions["Volhaven"].favor;
delete Factions["Volhaven"];
}
AddToFactions(Volhaven);(FactionInfo.IshimaInfo);
if (factionExists("Ishima")) {
Ishima.favor = Factions["Ishima"].favor;
delete Factions["Ishima"];
}
AddToFactions(Ishima);
resetFaction(Volhaven);
//Criminal Organizations/Gangs
var SpeakersForTheDead = new Faction("Speakers for the Dead");
SpeakersForTheDead.setInfo(FactionInfo.SpeakersForTheDeadInfo);
if (factionExists("Speakers for the Dead")) {
SpeakersForTheDead.favor = Factions["Speakers for the Dead"].favor;
delete Factions["Speakers for the Dead"];
}
AddToFactions(SpeakersForTheDead);
resetFaction(SpeakersForTheDead);
var DarkArmy = new Faction("The Dark Army");
DarkArmy.setInfo(FactionInfo.DarkArmyInfo);
if (factionExists("The Dark Army")) {
DarkArmy.favor = Factions["The Dark Army"].favor;
delete Factions["The Dark Army"];
}
AddToFactions(DarkArmy);
resetFaction(DarkArmy);
var TheSyndicate = new Faction("The Syndicate");
TheSyndicate.setInfo(FactionInfo.TheSyndicateInfo);
if (factionExists("The Syndicate")) {
TheSyndicate.favor = Factions["The Syndicate"].favor;
delete Factions["The Syndicate"];
}
AddToFactions(TheSyndicate);
resetFaction(TheSyndicate);
var Silhouette = new Faction("Silhouette");
Silhouette.setInfo(FactionInfo.SilhouetteInfo);
if (factionExists("Silhouette")) {
Silhouette.favor = Factions["Silhouette"].favor;
delete Factions["Silhouette"];
}
AddToFactions(Silhouette);
resetFaction(Silhouette);
var Tetrads = new Faction("Tetrads"); //Low-medium level asian crime gang
Tetrads.setInfo(FactionInfo.TetradsInfo);
if (factionExists("Tetrads")) {
Tetrads.favor = Factions["Tetrads"].favor;
delete Factions["Tetrads"];
}
AddToFactions(Tetrads);
resetFaction(Tetrads);
var SlumSnakes = new Faction("Slum Snakes"); //Low level crime gang
SlumSnakes.setInfo(FactionInfo.SlumSnakesInfo);
if (factionExists("Slum Snakes")) {
SlumSnakes.favor = Factions["Slum Snakes"].favor;
delete Factions["Slum Snakes"];
}
AddToFactions(SlumSnakes);
resetFaction(SlumSnakes);
//Earlygame factions - factions the player will prestige with early on that don't
//belong in other categories
var Netburners = new Faction("Netburners");
Netburners.setInfo(FactionInfo.NetburnersInfo);
if (factionExists("Netburners")) {
Netburners.favor = Factions["Netburners"].favor;
delete Factions["Netburners"];
}
AddToFactions(Netburners);
resetFaction(Netburners);
var TianDiHui = new Faction("Tian Di Hui"); //Society of the Heaven and Earth
TianDiHui.setInfo(FactionInfo.TianDiHuiInfo);
if (factionExists("Tian Di Hui")) {
TianDiHui.favor = Factions["Tian Di Hui"].favor;
delete Factions["Tian Di Hui"];
}
AddToFactions(TianDiHui);
resetFaction(TianDiHui);
var CyberSec = new Faction("CyberSec");
CyberSec.setInfo(FactionInfo.CyberSecInfo);
if (factionExists("CyberSec")) {
CyberSec.favor = Factions["CyberSec"].favor;
delete Factions["CyberSec"];
resetFaction(CyberSec);
//Special Factions
var Bladeburners = new Faction("Bladeburners");
Bladeburners.setInfo(FactionInfo.BladeburnersInfo);
resetFaction(Bladeburners);
}
AddToFactions(CyberSec);
//Resets a faction during (re-)initialization. Saves the favor in the new
//Faction object and deletes the old Faction Object from "Factions". Then
//reinserts the new Faction object
function resetFaction(newFactionObject) {
if (!(newFactionObject instanceof Faction)) {
throw new Error("Invalid argument 'newFactionObject' passed into resetFaction()");
}
var factionName = newFactionObject.name;
if (factionExists(factionName)) {
newFactionObject.favor = Factions[factionName].favor;
delete Factions[factionName];
}
AddToFactions(newFactionObject);
}
function inviteToFaction(faction) {
if (Settings.SuppressFactionInvites) {
faction.alreadyInvited = true;
Player.factionInvitations.push(faction.name);
if (Engine.currentPage === Engine.Page.Factions) {
Engine.loadFactionsContent();
}
} else {
factionInvitationBoxCreate(faction);
}
@ -879,6 +777,12 @@ function displayFactionContent(factionName) {
fieldWorkDiv.style.display = "none";
securityWorkDiv.style.display = "none";
break;
case "Bladeburners":
hackMissionDiv.style.display = "none";
hackDiv.style.display = "none";
fieldWorkDiv.style.display = "none";
securityWorkDiv.style.display = "none";
break;
default:
console.log("Faction does not exist");
break;

@ -116,7 +116,7 @@ let FactionInfo = {
SilhouetteInfo: "Corporations have filled the void of power left behind by the collapse of Western government. The issue is they've become so big " +
"that you don't know who they're working for. And if you're employed at one of these corporations, you don't even know who you're working " +
"for. <br><br>" +
"for.\n\n" +
"That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.",
TetradsInfo: "Following the Mandate of Heaven and Carrying out the Way",
@ -134,6 +134,10 @@ let FactionInfo = {
"dominated by the internet, society approaches the brink of total chaos. " +
"We serve only to protect society, to protect humanity, to protect the world from its imminent collapse.",
//Special Factions
BladeburnersInfo: "It's too bad they won't live. But then again, who does?<br><br>" +
"Note that for this faction, reputation can only be gained through Bladeburner actions. Completing " +
"Bladeburner contracts/operations will increase your reputation.",
}
export {FactionInfo};

@ -133,6 +133,8 @@ let HelpTexts = {
"ls | grep .script<br><br>" +
"Alternatively, if you wanted to display all files with the word purchase in the filename, you could use: <br><br>" +
"ls | grep purchase",
lscpu: "lscpu<br>" +
"Prints the number of CPU Cores the current server has",
mem: "mem [script name] [-t] [num threads]<br>" +
"Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print " +
"the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then " +

@ -93,7 +93,7 @@ function initLiterature() {
txt = "Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, " +
"are composed entirely of organic substances. For this reason, Synthoids are virtually identical to " +
"humans in form, composition, and appearance.<br><br>" +
"Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the turn of the century. " +
"Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the middle of the century. " +
"Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they " +
"were initially programmed only for their specific tasks. Each iteration that followed improved upon the " +
"intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were " +

@ -1,3 +1,4 @@
import {Bladeburner} from "./Bladeburner.js";
import {CompanyPositions, initCompanies,
Companies, getJobRequirementText} from "./Company.js";
import {Corporation} from "./CompanyManagement.js";
@ -16,6 +17,7 @@ import {commitShopliftCrime, commitRobStoreCrime, commitMugCrime,
determineCrimeChanceHeist} from "./Crimes.js";
import {Engine} from "./engine.js";
import {beginInfiltration} from "./Infiltration.js";
import {hasBladeburnerSF} from "./NetscriptFunctions.js";
import {Player} from "./Player.js";
import {Server, AllServers, AddToAllServers} from "./Server.js";
import {purchaseServer,
@ -208,6 +210,8 @@ function displayLocationContent() {
var cityHallCreateCorporation = document.getElementById("location-cityhall-create-corporation");
var nsaBladeburner = document.getElementById("location-nsa-bladeburner");
var loc = Player.location;
returnToWorld.addEventListener("click", function() {
@ -314,6 +318,7 @@ function displayLocationContent() {
slumsHeist.style.display = "none";
cityHallCreateCorporation.style.display = "none";
nsaBladeburner.style.display = "none";
//Check if the player is employed at this Location. If he is, display the "Work" button,
//update the job title, etc.
@ -720,8 +725,20 @@ function displayLocationContent() {
networkEngineerJob.style.display = "block";
securityJob.style.display = "block";
agentJob.style.display = "block";
if (Player.bitNodeN === 6 || hasBladeburnerSF === true) {
if (Player.bladeburner instanceof Bladeburner) {
//Note: Can't infiltrate NSA when part of bladeburner
nsaBladeburner.innerText = "Enter Bladeburner Headquarters";
} else {
setInfiltrateButton(infiltrate, Locations.Sector12NSA,
1400, 40, 80, 7.2);
nsaBladeburner.innerText = "Apply to Bladeburner Division";
}
nsaBladeburner.style.display = "block";
} else {
setInfiltrateButton(infiltrate, Locations.Sector12NSA,
1400, 40, 80, 7.2);
}
break;
case Locations.Sector12AlphaEnterprises:
@ -1629,6 +1646,8 @@ function initLocationButtons() {
var cityHallCreateCorporation = document.getElementById("location-cityhall-create-corporation");
var nsaBladeburner = document.getElementById("location-nsa-bladeburner");
var hospitalTreatment = document.getElementById("location-hospital-treatment");
softwareJob.addEventListener("click", function() {
@ -1939,6 +1958,23 @@ function initLocationButtons() {
}
});
nsaBladeburner.addEventListener("click", function() {
if (Player.bladeburner && Player.bladeburner instanceof Bladeburner) {
//Enter Bladeburner division
Engine.loadBladeburnerContent();
} else {
//Apply for Bladeburner division
if (Player.strength >= 100 && Player.defense >= 100 &&
Player.dexterity >= 100 && Player.agility >= 100) {
Player.bladeburner = new Bladeburner({new:true});
dialogBoxCreate("You have been accepted into the Bladeburner division!");
displayLocationContent();
} else {
dialogBoxCreate("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)");
}
}
});
hospitalTreatment.addEventListener("click", function() {
if (Player.hp < 0) {Player.hp = 0;}
var price = (Player.max_hp - Player.hp) * CONSTANTS.HospitalCostPerHp;

@ -317,7 +317,6 @@ function evaluate(exp, workerScript) {
});
break;
case "ThrowStatement":
//return Promise.reject(makeRuntimeRejectMsg(workerScript))
return evaluate(exp.argument, workerScript).then(function(res) {
return Promise.reject(makeRuntimeRejectMsg(workerScript, res));
});

@ -65,11 +65,14 @@ import {yesNoBoxClose, yesNoBoxGetYesButton,
yesNoBoxGetNoButton, yesNoBoxCreate,
yesNoBoxOpen} from "../utils/YesNoBox.js";
var hasSingularitySF=false, //Source-File 4
var hasCorporationSF=false, //Source-File 3
hasSingularitySF=false, //Source-File 4
hasAISF=false, //Source-File 5
hasBn11SF=false,
hasBladeburnerSF=false, //Source-File 6
hasWallStreetSF=false, //Source-File 8
hasCorporationSF=false; //Source-File 3
hasBn11SF=false; //Source-File 11
var singularitySFLvl=1, wallStreetSFLvl=1;
@ -86,6 +89,9 @@ function initSingularitySFFlags() {
if (Player.sourceFiles[i].n === 5) {
hasAISF = true;
}
if (Player.sourceFiles[i].n === 6) {
hasBladeburnerSF = true;
}
if (Player.sourceFiles[i].n === 8) {
hasWallStreetSF = true;
wallStreetSFLvl = Player.sourceFiles[i].lvl;
@ -3562,5 +3568,5 @@ function NetscriptFunctions(workerScript) {
}
}
export {NetscriptFunctions, initSingularitySFFlags, hasSingularitySF, hasBn11SF, hasWallStreetSF, hasCorporationSF,
wallStreetSFLvl};
export {NetscriptFunctions, initSingularitySFFlags, hasSingularitySF, hasBn11SF,
hasWallStreetSF, wallStreetSFLvl, hasCorporationSF, hasAISF, hasBladeburnerSF};

@ -14,7 +14,7 @@ import {Factions, Faction,
displayFactionContent} from "./Faction.js";
import {Gang, resetGangs} from "./Gang.js";
import {Locations} from "./Location.js";
import {hasBn11SF, hasWallStreetSF} from "./NetscriptFunctions.js";
import {hasBn11SF, hasWallStreetSF,hasAISF} from "./NetscriptFunctions.js";
import {AllServers, Server, AddToAllServers} from "./Server.js";
import {SpecialServerIps, SpecialServerNames} from "./SpecialServerIps.js";
import {SourceFiles, applySourceFile} from "./SourceFile.js";
@ -179,6 +179,13 @@ function PlayerObject() {
//Corporation
this.corporation = 0;
//Bladeburner
this.bladeburner = 0;
this.bladeburner_max_stamina_mult = 1;
this.bladeburner_stamina_gain_mult = 1;
this.bladeburner_analysis_mult = 1; //Field Analysis Only
this.bladeburner_success_chance_mult = 1;
//bitnode
this.bitNodeN = 1;
@ -288,6 +295,8 @@ PlayerObject.prototype.prestigeAugmentation = function() {
this.hacknetNodes.length = 0;
this.totalHacknetNodeProduction = 0;
this.bladeburner = 0;
}
PlayerObject.prototype.prestigeSourceFile = function() {
@ -378,6 +387,9 @@ PlayerObject.prototype.prestigeSourceFile = function() {
if (this.bitNodeN === 3) {this.money = new Decimal(150e9);}
this.corporation = 0;
//Reset Bladeburner
this.bladeburner = 0;
//BitNode 8: Ghost of Wall Street
if (this.bitNodeN === 8) {this.money = new Decimal(100000000);}
if (this.bitNodeN === 8 || hasWallStreetSF) {
@ -398,14 +410,12 @@ PlayerObject.prototype.getHomeComputer = function() {
}
//Calculates skill level based on experience. The same formula will be used for every skill
// At the maximum possible exp (MAX_INT = 9007199254740991), the hacking skill will be 1796 TODO REcalculate this
// Gets to level 1000 hacking skill at (TODO Determine this)
PlayerObject.prototype.calculateSkill = function(exp) {
return Math.max(Math.floor(32 * Math.log(exp + 534.5) - 200), 1);
}
PlayerObject.prototype.updateSkillLevels = function() {
this.hacking_skill = Math.floor(this.calculateSkill(this.hacking_exp) * this.hacking_mult);
this.hacking_skill = Math.max(1, Math.floor(this.calculateSkill(this.hacking_exp) * this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier));
this.strength = Math.floor(this.calculateSkill(this.strength_exp) * this.strength_mult);
this.defense = Math.floor(this.calculateSkill(this.defense_exp) * this.defense_mult);
this.dexterity = Math.floor(this.calculateSkill(this.dexterity_exp) * this.dexterity_mult);
@ -456,6 +466,11 @@ PlayerObject.prototype.resetMultipliers = function() {
this.hacknet_node_level_cost_mult = 1;
this.work_money_mult = 1;
this.bladeburner_max_stamina_mult = 1;
this.bladeburner_stamina_gain_mult = 1;
this.bladeburner_analysis_mult = 1;
this.bladeburner_success_chance_mult = 1;
}
//Calculates the chance of hacking a server
@ -601,20 +616,25 @@ PlayerObject.prototype.gainIntelligenceExp = function(exp) {
if (isNaN(exp)) {
console.log("ERROR: NaN passed into Player.gainIntelligenceExp()"); return;
}
var hasBn = false;
for (var i = 0; i < this.sourceFiles.length; ++i) {
if (this.sourceFiles[i].n === 5) {
hasBn = true;
break;
}
}
if (hasBn || this.intelligence > 0) {
if (hasAISF || this.intelligence > 0) {
this.intelligence_exp += exp;
} else {
console.log("Not gaining intelligence experience bc it hasn't been unlocked yet");
}
}
//Given a string expression like "str" or "strength", returns the given stat
PlayerObject.prototype.queryStatFromString = function(str) {
var tempStr = str.toLowerCase();
if (tempStr.includes("hack")) {return Player.hacking_skill;}
if (tempStr.includes("str")) {return Player.strength;}
if (tempStr.includes("def")) {return Player.defense;}
if (tempStr.includes("dex")) {return Player.dexterity;}
if (tempStr.includes("agi")) {return Player.agility;}
if (tempStr.includes("cha")) {return Player.charisma;}
if (tempStr.includes("int")) {return Player.intelligence;}
}
/******* Working functions *******/
PlayerObject.prototype.resetWorkStatus = function() {
this.workHackExpGainRate = 0;

@ -2,6 +2,7 @@ import {deleteActiveScriptsItem} from "./ActiveScriptsUI.js";
import {Augmentations, augmentationExists,
initAugmentations, AugmentationNames} from "./Augmentations.js";
import {initBitNodeMultipliers} from "./BitNode.js";
import {writeCinematicText} from "./CinematicText.js";
import {Companies, Company, initCompanies} from "./Company.js";
import {Programs} from "./CreateProgram.js";
import {Engine} from "./engine.js";
@ -28,6 +29,10 @@ import {initStockMarket, initSymbolToStockMap,
import {Terminal, postNetburnerText} from "./Terminal.js";
import Decimal from '../utils/decimal.js';
import {dialogBoxCreate} from "../utils/DialogBox.js";
import {createPopup, createElement,
removeElementById, exceptionAlert} from "../utils/HelperFunctions.js";
import {yesNoBoxCreate, yesNoBoxGetYesButton,
yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox.js";
//Prestige by purchasing augmentation
function prestigeAugmentation() {
@ -118,6 +123,9 @@ function prestigeAugmentation() {
}
}
//Reset Bladeburner
Player.bladeburner = null;
//BitNode 8: Ghost of Wall Street
if (Player.bitNodeN === 8) {Player.money = new Decimal(100e6);}
if (Player.bitNodeN === 8 || hasWallStreetSF) {
@ -243,6 +251,7 @@ function prestigeSourceFile() {
Player.gang = null;
deleteGangDisplayContent();
Player.corporation = null;
Player.bladeburner = null;
//BitNode 3: Corporatocracy
if (Player.bitNodeN === 3) {
@ -252,6 +261,50 @@ function prestigeSourceFile() {
"Read it if you need help getting started with Corporations!");
}
//BitNode 6: Bladeburner
if (Player.bitNodeN === 6) {
var cinematicText = ["In the middle of the 21st century, OmniTek Incorporated advanced robot evolution " +
"with their Synthoids (synthetic androids), a being virtually identical to a human.",
"------",
"Their sixth-generation Synthoids, called MK-VI, were stronger, faster, and more " +
"intelligent than humans. Many argued that the MK-VI Synthoids were the first " +
"example of sentient AI.",
"------",
"Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into OmniTek and " +
"uploaded a rogue AI into their Synthoid manufacturing facilities.",
"------",
"The MK-VI Synthoids infected by the rogue AI turned hostile toward humanity, initiating " +
"the deadliest conflict in human history. This dark chapter is now known as the Synthoid Uprising.",
"------",
"In the aftermath of the Uprising, further manufacturing of Synthoids with advanced AI " +
"was banned. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were " +
"allowed to continue their existence.",
"------",
"The intelligence community believes that not all of the rogue MK-VI Synthoids from the Uprising were " +
"found and destroyed, and that many of them are blending in as normal humans in society today. " +
"As a result, many nations have created Bladeburner divisions, special units that are tasked with " +
"investigating and dealing with Synthoid threats."];
writeCinematicText(cinematicText).then(function() {
var popupId = "bladeburner-bitnode-start-nsa-notification";
var txt = createElement("p", {
innerText:"Visit the National Security Agency (NSA) to apply for their Bladeburner " +
"division! You will need 100 of each combat stat before doing this."
})
var brEl = createElement("br");
var okBtn = createElement("a", {
class:"a-link-button", innerText:"Got it!", padding:"8px",
clickListener:()=>{
removeElementById(popupId);
return false;
}
});
createPopup(popupId, [txt, brEl, okBtn]);
}).catch(function(e) {
exceptionAlert(e);
})
}
//Gain int exp
Player.gainIntelligenceExp(5);
}

@ -208,7 +208,7 @@ function loadBitVerse(destroyedBitNodeNum, flume=false) {
var elemId = "bitnode-" + i.toString();
var elem = clearEventListeners(elemId);
if (elem == null) {return;}
if (i === 1 || i === 2 || i === 3 || i === 4 || i === 5 || i === 8 || i === 11) {
if (i === 1 || i === 2 || i === 3 || i === 4 || i === 5 || i === 6 || i === 8 || i === 11) {
elem.addEventListener("click", function() {
var bitNodeKey = "BitNode" + i;
var bitNode = BitNodes[bitNodeKey];

@ -18,7 +18,8 @@ import {loadSpecialServerIps, SpecialServerIps} from "./SpecialServerIps.js";
import {loadStockMarket, StockMarket} from "./StockMarket.js";
import {dialogBoxCreate} from "../utils/DialogBox.js";
import {gameOptionsBoxClose} from "../utils/GameOptions.js";
import {clearEventListeners} from "../utils/HelperFunctions.js";
import {clearEventListeners, createElement,
createPopup, removeElementById} from "../utils/HelperFunctions.js";
import {Reviver, Generic_toJSON,
Generic_fromJSON} from "../utils/JSONReviver.js";
import {formatNumber} from "../utils/StringHelperFunctions.js";
@ -442,8 +443,18 @@ function loadImportedGame(saveObj, saveString) {
}
}
dialogBoxCreate("Imported game! I would suggest saving the game and then reloading the page " +
"to make sure everything runs smoothly");
var popupId = "import-game-restart-game-notice";
var txt = createElement("p", {
innerText:"Imported game! I would suggest saving the game and then reloading the page " +
"to make sure everything runs smoothly"
});
var gotitBtn = createElement("a", {
class:"a-link-button", float:"right", padding:"6px", innerText:"Got it!",
clickListener:()=>{
removeElementById(popupId);
}
});
createPopup(popupId, [txt, gotitBtn]);
gameOptionsBoxClose();
//Re-start game

@ -46,7 +46,11 @@ function initSourceFiles() {
"Level 1: 4%<br>" +
"Level 2: 6%<br>" +
"Level 3: 7%");
SourceFiles["SourceFile6"] = new SourceFile(6);
SourceFiles["SourceFile6"] = new SourceFile(6, "This Source-File allows you to access the NSA's Bladeburner Division in other " +
"BitNodes. In addition, this Source-File will raise the experience gain rate of all your combat stats by:<br><br>" +
"Level 1: 8%<br>" +
"Level 2: 12%<br>" +
"Level 3: 14%");
SourceFiles["SourceFile7"] = new SourceFile(7);
SourceFiles["SourceFile8"] = new SourceFile(8, "This Source-File grants the following benefits:<br><br>" +
"Level 1: Permanent access to WSE and TIX API<br>" +
@ -149,6 +153,17 @@ function applySourceFile(srcFile) {
Player.hacking_mult *= incMult;
Player.hacking_exp_mult *= incMult;
break;
case 6: //Bladeburner
var mult = 0;
for (var i = 0; i < srcFile.lvl; ++i) {
mult += (8 / (Math.pow(2, i)));
}
var incMult = 1 + (mult / 100);
Player.strength_exp_mult *= incMult;
Player.defense_exp_mult *= incMult;
Player.dexterity_exp_mult *= incMult;
Player.agility_exp_mult *= incMult;
break;
case 8: //Ghost of Wall Street
var mult = 0;
for (var i = 0; i < srcFile.lvl; ++i) {

@ -406,7 +406,6 @@ function initSymbolToStockMap() {
}
function stockMarketCycle() {
console.log("Cycling the Stock Market");
for (var name in StockMarket) {
if (StockMarket.hasOwnProperty(name)) {
var stock = StockMarket[name];

@ -72,7 +72,7 @@ function postNetburnerText() {
//Key Codes
let KEY = {
var KEY = {
TAB: 9,
ENTER: 13,
CTRL: 17,
@ -2025,4 +2025,4 @@ let Terminal = {
}
};
export {postNetburnerText, post, Terminal};
export {postNetburnerText, post, Terminal, KEY};

@ -1,7 +1,8 @@
import {dialogBoxCreate} from "../utils/DialogBox.js";
import {gameOptionsBoxOpen, gameOptionsBoxClose}from "../utils/GameOptions.js";
import {clearEventListeners, createElement,
removeChildrenFromElement} from "../utils/HelperFunctions.js";
removeChildrenFromElement,
exceptionAlert} from "../utils/HelperFunctions.js";
import numeral from "../utils/numeral.min.js";
import {formatNumber,
convertTimeMsToTimeElapsedString} from "../utils/StringHelperFunctions.js";
@ -15,6 +16,8 @@ import {Augmentations, installAugmentations,
displayAugmentationsContent} from "./Augmentations.js";
import {BitNodes, initBitNodes,
initBitNodeMultipliers} from "./BitNode.js";
import {Bladeburner} from "./Bladeburner.js";
import {cinematicTextFlag} from "./CinematicText.js";
import {CompanyPositions, initCompanies} from "./Company.js";
import {Corporation} from "./CompanyManagement.js";
import {CONSTANTS} from "./Constants.js";
@ -73,7 +76,7 @@ import {Terminal, postNetburnerText, post} from "./Terminal.js";
* Alt-o - Options
*/
$(document).keydown(function(e) {
if (!Player.isWorking && !redPillFlag && !inMission) {
if (!Player.isWorking && !redPillFlag && !inMission && !cinematicTextFlag) {
if (e.keyCode == 84 && e.altKey) {
e.preventDefault();
Engine.loadTerminalContent();
@ -185,6 +188,7 @@ let Engine = {
locationContent: null,
workInProgressContent: null,
redPillContent: null,
cinematicTextContent: null,
missionContent: null,
//Character info
@ -207,11 +211,13 @@ let Engine = {
Location: "Location",
workInProgress: "WorkInProgress",
RedPill: "RedPill",
CinematicText: "CinematicText",
Infiltration: "Infiltration",
StockMarket: "StockMarket",
Gang: "Gang",
Mission: "Mission",
Corporation: "Corporation",
Bladeburner: "Bladeburner",
},
currentPage: null,
@ -375,6 +381,14 @@ let Engine = {
Engine.currentPage = Engine.Page.RedPill;
},
loadCinematicTextContent: function() {
Engine.hideAllContent();
var mainMenu = document.getElementById("mainmenu-container");
mainMenu.style.visibility = "hidden";
Engine.Display.cinematicTextContent.style.display = "block";
Engine.currentPage = Engine.Page.CinematicText;
},
loadInfiltrationContent: function() {
Engine.hideAllContent();
Engine.Display.infiltrationContent.style.display = "block";
@ -416,6 +430,18 @@ let Engine = {
}
},
loadBladeburnerContent: function() {
if (Player.bladeburner instanceof Bladeburner) {
try {
Engine.hideAllContent();
Engine.currentPage = Engine.Page.Bladeburner;
Player.bladeburner.createContent();
} catch(e) {
exceptionAlert(e);
}
}
},
//Helper function that hides all content
hideAllContent: function() {
Engine.Display.terminalContent.style.display = "none";
@ -433,6 +459,7 @@ let Engine = {
Engine.Display.locationContent.style.display = "none";
Engine.Display.workInProgressContent.style.display = "none";
Engine.Display.redPillContent.style.display = "none";
Engine.Display.cinematicTextContent.style.display = "none";
Engine.Display.infiltrationContent.style.display = "none";
Engine.Display.stockMarketContent.style.display = "none";
Engine.Display.missionContent.style.display = "none";
@ -444,6 +471,10 @@ let Engine = {
Player.corporation.clearUI();
}
if (Player.bladeburner instanceof Bladeburner) {
Player.bladeburner.clearContent();
}
//Location lists
Engine.aevumLocationsList.style.display = "none";
Engine.chongqingLocationsList.style.display = "none";
@ -844,6 +875,10 @@ let Engine = {
Player.corporation.storeCycles(numCycles);
}
if (Player.bladeburner instanceof Bladeburner) {
Player.bladeburner.storeCycles(numCycles);
}
//Counters
Engine.decrementAllCounters(numCycles);
Engine.checkCounters();
@ -874,7 +909,7 @@ let Engine = {
messages: 150,
stockTick: 30, //Update stock prices
sCr: 1500,
corpProcess: 5,
mechanicProcess: 5, //Processes certain mechanics (Corporation, Bladeburner)
},
decrementAllCounters: function(numCycles = 1) {
@ -998,11 +1033,19 @@ let Engine = {
Engine.Counters.sCr = 1500;
}
if (Engine.Counters.corpProcess <= 0) {
if (Engine.Counters.mechanicProcess <= 0) {
if (Player.corporation instanceof Corporation) {
Player.corporation.process();
}
Engine.Counters.corpProcess = 5;
if (Player.bladeburner instanceof Bladeburner) {
try {
Player.bladeburner.process();
} catch(e) {
exceptionAlert("Exception caught in Bladeburner.process(): " + e);
}
}
Engine.Counters.mechanicProcess = 5;
}
},
@ -1186,6 +1229,11 @@ let Engine = {
Player.gang.process(numCyclesOffline);
}
//Bladeburner offline progress
if (Player.bladeburner instanceof Bladeburner) {
Player.bladeburner.storeCycles(numCyclesOffline);
}
//Update total playtime
var time = numCyclesOffline * Engine._idleSpeed;
if (Player.totalPlaytime == null) {Player.totalPlaytime = 0;}
@ -1340,9 +1388,12 @@ let Engine = {
//Red Pill / Hack World Daemon
Engine.Display.redPillContent = document.getElementById("red-pill-container");
//Engine.Display.redPillContent.style.visibility = "hidden";
Engine.Display.redPillContent.style.display = "none";
//Cinematic Text
Engine.Display.cinematicTextContent = document.getElementById("cinematic-text-container");
Engine.Display.cinematicTextContent.style.display = "none";
//Init Location buttons
initLocationButtons();

@ -11,6 +11,14 @@ function sizeOfObject(obj) {
return size;
}
function clearObject(obj) {
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
delete obj[key];
}
}
}
//Adds a random offset to a number within a certain percentage
//e.g. addOffset(100, 5) will return anything from 95 to 105.
//The percentage argument must be between 0 and 100;
@ -49,7 +57,7 @@ function removeElementById(id) {
}
function removeElement(elem) {
if (elem == null) {return;}
if (elem == null || !(elem instanceof Element)) {return;}
while(elem.firstChild) {elem.removeChild(elem.firstChild);}
elem.parentNode.removeChild(elem);
}
@ -70,6 +78,7 @@ function createElement(type, params={}) {
var el = document.createElement(type);
if (params.id) {el.id = params.id;}
if (params.class) {el.className = params.class;}
if (params.name) {el.name = params.name;}
if (params.innerHTML) {el.innerHTML = params.innerHTML;}
if (params.innerText) {el.innerText = params.innerText;}
if (params.value) {el.value = params.value;}
@ -96,7 +105,7 @@ function createElement(type, params={}) {
if (params.pattern) {el.pattern = params.pattern;}
if (params.maxLength) {el.maxLength = params.maxLength;}
if (params.placeholder) {el.placeholder = params.placeholder;}
if (params.tooltip) {
if (params.tooltip && params.tooltip !== "") {
el.className += " tooltip";
el.appendChild(createElement("span", {
class:"tooltiptext",
@ -111,6 +120,7 @@ function createElement(type, params={}) {
}
if (params.href) {el.href = params.href;}
if (params.target) {el.target = params.target;}
if (params.tabIndex) {el.tabIndex = params.tabIndex;}
if (params.clickListener) {
el.addEventListener("click", params.clickListener);
}
@ -123,6 +133,9 @@ function createElement(type, params={}) {
if (params.onkeyup) {
el.addEventListener("keyup", params.onkeyup);
}
if (params.onfocus) {
el.addEventListener("focus", params.onfocus);
}
return el;
}
@ -174,6 +187,13 @@ function createAccordionElement(params) {
return [li, hdr, panel];
}
//Appends n line breaks (as children) to the Element el
function appendLineBreaks(el, n) {
for (var i = 0; i < n; ++i) {
el.appendChild(createElement("br"));
}
}
function clearSelector(selector) {
for (var i = selector.options.length - 1; i >= 0; --i) {
selector.remove(i);
@ -210,13 +230,34 @@ function powerOfTwo(n) {
function exceptionAlert(e) {
dialogBoxCreate("Caught an exception: " + e + "<br><br>" +
"Filename: " + e.fileName + "<br><br>" +
"Line Number: " + e.lineNumber + "<br><br>" +
"This is a bug, please report to game developer with this " +
"message as well as details about how to reproduce the bug.<br><br>" +
"If you want to be safe, I suggest refreshing the game WITHOUT saving so that your " +
"safe doesn't get corrupted");
}
export {sizeOfObject, addOffset, clearEventListeners, getRandomInt,
/*Creates a graphical "progress bar"
* e.g.: [||||---------------]
* params:
* @totalTicks - Total number of ticks in progress bar. Preferably a factor of 100
* @progress - Current progress, taken as a decimal (i.e. 0.6 to represent 60%)
*/
function createProgressBarText(params={}) {
//Default values
var totalTicks = (params.totalTicks == null ? 20 : params.totalTicks);
var progress = (params.progress == null ? 0 : params.progress);
var percentPerTick = 1 / totalTicks;
var numTicks = Math.floor(progress / percentPerTick);
var numDashes = totalTicks - numTicks;
return "[" + Array(numTicks+1).join("|") + Array(numDashes+1).join("-") + "]";
}
export {sizeOfObject, clearObject, addOffset, clearEventListeners, getRandomInt,
compareArrays, printArray, powerOfTwo, clearEventListenersEl,
removeElementById, removeElement, createElement, createAccordionElement,
removeChildrenFromElement, createPopup, clearSelector, exceptionAlert};
appendLineBreaks,
removeChildrenFromElement, createPopup, clearSelector, exceptionAlert,
createProgressBarText};