Merge pull request #818 from danielyxie/dev

v0.50.0
This commit is contained in:
hydroflame 2021-03-20 05:35:16 -04:00 committed by GitHub
commit 8f30e60d08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
59 changed files with 808 additions and 1067 deletions

File diff suppressed because one or more lines are too long

@ -1,2 +1,2 @@
!function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],p=0,s=[];p<f.length;p++)i=f[p],u[i]&&s.push(u[i][0]),u[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(a&&a(t);s.length;)s.shift()();return r.push.apply(r,l||[]),o()}function o(){for(var n,t=0;t<r.length;t++){for(var o=r[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==u[c]&&(e=!1)}e&&(r.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},u={1:0},r=[];function i(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=n,i.c=e,i.d=function(n,t,o){i.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:o})},i.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(o,e,function(t){return n[t]}.bind(null,e));return o},i.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(t,"a",t),t},i.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},i.p="";var f=window.webpackJsonp=window.webpackJsonp||[],c=f.push.bind(f);f.push=t,f=f.slice();for(var l=0;l<f.length;l++)t(f[l]);var a=c;r.push([377,0]),o()}({320:function(n,t,o){},322:function(n,t,o){},324:function(n,t,o){},326:function(n,t,o){},328:function(n,t,o){},330:function(n,t,o){},332:function(n,t,o){},334:function(n,t,o){},336:function(n,t,o){},338:function(n,t,o){},340:function(n,t,o){},342:function(n,t,o){},344:function(n,t,o){},346:function(n,t,o){},348:function(n,t,o){},350:function(n,t,o){},352:function(n,t,o){},354:function(n,t,o){},356:function(n,t,o){},358:function(n,t,o){},360:function(n,t,o){},362:function(n,t,o){},364:function(n,t,o){},366:function(n,t,o){},368:function(n,t,o){},370:function(n,t,o){},372:function(n,t,o){},374:function(n,t,o){},377:function(n,t,o){"use strict";o.r(t);o(376),o(374),o(372),o(370),o(368),o(366),o(364),o(362),o(360),o(358),o(356),o(354),o(352),o(350),o(348),o(346),o(344),o(342),o(340),o(338),o(336),o(334),o(332),o(330),o(328),o(326),o(324),o(322),o(320)}}); !function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],p=0,s=[];p<f.length;p++)i=f[p],u[i]&&s.push(u[i][0]),u[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(a&&a(t);s.length;)s.shift()();return r.push.apply(r,l||[]),o()}function o(){for(var n,t=0;t<r.length;t++){for(var o=r[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==u[c]&&(e=!1)}e&&(r.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},u={1:0},r=[];function i(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=n,i.c=e,i.d=function(n,t,o){i.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:o})},i.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(o,e,function(t){return n[t]}.bind(null,e));return o},i.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(t,"a",t),t},i.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},i.p="";var f=window.webpackJsonp=window.webpackJsonp||[],c=f.push.bind(f);f.push=t,f=f.slice();for(var l=0;l<f.length;l++)t(f[l]);var a=c;r.push([380,0]),o()}({323:function(n,t,o){},325:function(n,t,o){},327:function(n,t,o){},329:function(n,t,o){},331:function(n,t,o){},333:function(n,t,o){},335:function(n,t,o){},337:function(n,t,o){},339:function(n,t,o){},341:function(n,t,o){},343:function(n,t,o){},345:function(n,t,o){},347:function(n,t,o){},349:function(n,t,o){},351:function(n,t,o){},353:function(n,t,o){},355:function(n,t,o){},357:function(n,t,o){},359:function(n,t,o){},361:function(n,t,o){},363:function(n,t,o){},365:function(n,t,o){},367:function(n,t,o){},369:function(n,t,o){},371:function(n,t,o){},373:function(n,t,o){},375:function(n,t,o){},377:function(n,t,o){},380:function(n,t,o){"use strict";o.r(t);o(379),o(377),o(375),o(373),o(371),o(369),o(367),o(365),o(363),o(361),o(359),o(357),o(355),o(353),o(351),o(349),o(347),o(345),o(343),o(341),o(339),o(337),o(335),o(333),o(331),o(329),o(327),o(325),o(323)}});
//# sourceMappingURL=engineStyle.bundle.js.map //# sourceMappingURL=engineStyle.bundle.js.map

24
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

@ -3,39 +3,65 @@
Changelog Changelog
========= =========
v0.50.0 - 2021-03-20 Intelligence (hydroflame)
----------------------------------------------
**Intelligence**
* int exp gain and effect has been reworked. It is now much more easy to
acquire and far more powerful. The goal here is to feel like players have
another tool in their arsenal.
**Factions**
* Hacking factions no longer have hacking level requirements since their associated servers do.
**Misc.**
* Sleeve styling.
* number formatting
* remove wiki button in Hacking Missions.
* Fix NaN displayed when very very large numbers are reached.
v0.49.2 - 2021-03-13 (hydroflame) v0.49.2 - 2021-03-13 (hydroflame)
------- ---------------------------------
**BN8**
BN8
* A new bitnode multipler has been added, it lets you reduce money from a * A new bitnode multipler has been added, it lets you reduce money from a
server without gaining actually any money. This is important for BN8 where server without gaining actually any money. This is important for BN8 where
hack/grow can influence the stock market. No money can be gained from hack/grow can influence the stock market. No money can be gained from
hacking but server money can still be reduced. hacking but server money can still be reduced.
Documentation **Documentation**
* readthedocs should now be more consistent and many examples were added. * readthedocs should now be more consistent and many examples were added.
Netscript **Netscript**
* Ace editor will now correctly highlight all functions. * Ace editor will now correctly highlight all functions.
* 'tFormat' is a new netscript function that returns a human readable * 'tFormat' is a new netscript function that returns a human readable
representation of milliseconds. eg. "2 hours 15 minute 43 seconds" representation of milliseconds. eg. "2 hours 15 minute 43 seconds"
Gang **Gang**
* style improvements * style improvements
Bladeburner **Bladeburner**
* style improvements * style improvements
* fix bug where 'skill list SKILL' would crash if skill is level 0. * fix bug where 'skill list SKILL' would crash if skill is level 0.
Sleeve **Sleeve**
* karma gain now scales with sync. * karma gain now scales with sync.
Misc. **Misc.**
Fix issue where the effective stats under Character>Stats were being calculated.
* Fix issue where the effective stats under Character>Stats were being calculated.
v0.49.0 - 2021-03-11 Source-File -1 (hydroflame) v0.49.0 - 2021-03-11 Source-File -1 (hydroflame)
------- ------------------------------------------------
**Source-File -1** **Source-File -1**
@ -63,7 +89,7 @@ v0.49.0 - 2021-03-11 Source-File -1 (hydroflame)
v0.48.0 - ASCII - 2021-03-07 (hydroflame) v0.48.0 - ASCII - 2021-03-07 (hydroflame)
------- -----------------------------------------
**ASCII** **ASCII**
@ -135,7 +161,7 @@ v0.47.2 - 7/15/2019
* Added 'Solarized Dark' theme to CodeMirror editor * Added 'Solarized Dark' theme to CodeMirror editor
* After Infiltration, you will now return to the company page rather than the city page * After Infiltration, you will now return to the company page rather than the city page
* Bug fix: Stock Market UI should no longer crash for certain locale settings * Bug fix: Stock Market UI should no longer crash for certain locale settings
* Bug fix: You can now properly remove unfinished programs (the *.exe-N%-INC files) * Bug fix: You can now properly remove unfinished programs (the `*.exe-N%-INC` files)
* Bug fix: Fixed an issue that allowed you to increase money on servers with a 'maxMoney' of 0 (like CSEC) * Bug fix: Fixed an issue that allowed you to increase money on servers with a 'maxMoney' of 0 (like CSEC)
* Bug fix: Scripts no longer persist if they were started with syntax/import errors * Bug fix: Scripts no longer persist if they were started with syntax/import errors
* Bug fix: 'hack' and 'analyze' Terminal commands are now blocking * Bug fix: 'hack' and 'analyze' Terminal commands are now blocking

@ -860,7 +860,7 @@ Random Tips
.. Substitution definitions .. Substitution definitions
.. |Alpha Enterprises| replace:: :code:`Alpha Enterprises` .. |Alpha Enterprises| replace:: :code:`Alpha Enterprises`
.. |Augmentations tab| replace:: :code:`Augmentations` tab .. |Augmentations tab| replace:: :code:`Augmentations` tab
.. |AutoLink| replace:: :code:`NUKE.exe` .. |AutoLink| replace:: :code:`AutoLink.exe`
.. |BruteSSH| replace:: :code:`BruteSSH.exe` .. |BruteSSH| replace:: :code:`BruteSSH.exe`
.. |City tab| replace:: :code:`City` tab .. |City tab| replace:: :code:`City` tab
.. |CyberSec| replace:: :code:`CyberSec` .. |CyberSec| replace:: :code:`CyberSec`

@ -1,15 +0,0 @@
getHackTime(), getGrowTime(), & getWeakenTime()
===============================================
The :js:func:`getHackTime`, :js:func:`getGrowTime`, and :js:func:`getWeakenTime`
all take an additional third optional parameter for specifying a specific intelligence
level to see how that would affect the hack/grow/weaken times. This parameter
defaults to your current intelligence level.
(Intelligence is unlocked after obtaining Source-File 5).
The function signatures are then::
getHackTime(hostname/ip[, hackLvl=current level, intLvl=current level])
getGrowTime(hostname/ip[, hackLvl=current level, intLvl=current level])
getWeakenTime(hostname/ip[, hackLvl=current level, intLvl=current level])

@ -9,4 +9,3 @@ they contain spoilers for the game.
.. toctree:: .. toctree::
getBitNodeMultipliers() <advancedfunctions/getBitNodeMultipliers> getBitNodeMultipliers() <advancedfunctions/getBitNodeMultipliers>
getHackTime(), getGrowTime(), & getWeakenTime() <advancedfunctions/getHackGrowWeakenTimes>

@ -9,6 +9,10 @@ getAugmentationStats() Netscript Function
If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function.
Examples:
.. code-block:: javascript
ns.getAugmentationStats("Synfibril Muscle") ns.getAugmentationStats("Synfibril Muscle")
{ {
strength_mult: 1.3, strength_mult: 1.3,

@ -3,6 +3,8 @@ softReset() Netscript Function
.. js:function:: softReset() .. js:function:: softReset()
:RAM cost: 5 GB
If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function.
This function will perform a reset even if you don't have any augmentation installed. This function will perform a reset even if you don't have any augmentation installed.

70
package-lock.json generated

@ -1,11 +1,11 @@
{ {
"name": "bitburner", "name": "bitburner",
"version": "0.47.3", "version": "0.49.2",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"version": "0.47.3", "version": "0.49.2",
"hasInstallScript": true, "hasInstallScript": true,
"license": "SEE LICENSE IN license.txt", "license": "SEE LICENSE IN license.txt",
"dependencies": { "dependencies": {
@ -38,6 +38,7 @@
"numeral": "2.0.6", "numeral": "2.0.6",
"react": "^16.8.3", "react": "^16.8.3",
"react-dom": "^16.8.3", "react-dom": "^16.8.3",
"react-modal": "^3.12.1",
"sprintf-js": "^1.1.1", "sprintf-js": "^1.1.1",
"tapable": "^1.0.0", "tapable": "^1.0.0",
"uuid": "^3.2.1", "uuid": "^3.2.1",
@ -4571,6 +4572,11 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/exenv": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz",
"integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50="
},
"node_modules/exit": { "node_modules/exit": {
"version": "0.1.2", "version": "0.1.2",
"resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
@ -11779,6 +11785,29 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.3.tgz", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.3.tgz",
"integrity": "sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA==" "integrity": "sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA=="
}, },
"node_modules/react-lifecycles-compat": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
},
"node_modules/react-modal": {
"version": "3.12.1",
"resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.12.1.tgz",
"integrity": "sha512-WGuXn7Fq31PbFJwtWmOk+jFtGC7E9tJVbFX0lts8ZoS5EPi9+WWylUJWLKKVm3H4GlQ7ZxY7R6tLlbSIBQ5oZA==",
"dependencies": {
"exenv": "^1.2.0",
"prop-types": "^15.5.10",
"react-lifecycles-compat": "^3.0.0",
"warning": "^4.0.3"
},
"engines": {
"node": ">=8"
},
"peerDependencies": {
"react": "^0.14.0 || ^15.0.0 || ^16 || ^17",
"react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17"
}
},
"node_modules/readable-stream": { "node_modules/readable-stream": {
"version": "2.3.4", "version": "2.3.4",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz",
@ -15999,6 +16028,14 @@
"xml-name-validator": "3.0.0" "xml-name-validator": "3.0.0"
} }
}, },
"node_modules/warning": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
"dependencies": {
"loose-envify": "^1.0.0"
}
},
"node_modules/watchpack": { "node_modules/watchpack": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz",
@ -21422,6 +21459,11 @@
"clone-regexp": "1.0.1" "clone-regexp": "1.0.1"
} }
}, },
"exenv": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz",
"integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50="
},
"exit": { "exit": {
"version": "0.1.2", "version": "0.1.2",
"resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
@ -27426,6 +27468,22 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.3.tgz", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.3.tgz",
"integrity": "sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA==" "integrity": "sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA=="
}, },
"react-lifecycles-compat": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
},
"react-modal": {
"version": "3.12.1",
"resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.12.1.tgz",
"integrity": "sha512-WGuXn7Fq31PbFJwtWmOk+jFtGC7E9tJVbFX0lts8ZoS5EPi9+WWylUJWLKKVm3H4GlQ7ZxY7R6tLlbSIBQ5oZA==",
"requires": {
"exenv": "^1.2.0",
"prop-types": "^15.5.10",
"react-lifecycles-compat": "^3.0.0",
"warning": "^4.0.3"
}
},
"readable-stream": { "readable-stream": {
"version": "2.3.4", "version": "2.3.4",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz",
@ -31040,6 +31098,14 @@
"xml-name-validator": "3.0.0" "xml-name-validator": "3.0.0"
} }
}, },
"warning": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
"requires": {
"loose-envify": "^1.0.0"
}
},
"watchpack": { "watchpack": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz",

@ -35,6 +35,7 @@
"numeral": "2.0.6", "numeral": "2.0.6",
"react": "^16.8.3", "react": "^16.8.3",
"react-dom": "^16.8.3", "react-dom": "^16.8.3",
"react-modal": "^3.12.1",
"sprintf-js": "^1.1.1", "sprintf-js": "^1.1.1",
"tapable": "^1.0.0", "tapable": "^1.0.0",
"uuid": "^3.2.1", "uuid": "^3.2.1",

@ -50,6 +50,9 @@ import { createPopup } from "../utils/uiHelpers/createPopup";
import { removeElement } from "../utils/uiHelpers/removeElement"; import { removeElement } from "../utils/uiHelpers/removeElement";
import { removeElementById } from "../utils/uiHelpers/removeElementById"; import { removeElementById } from "../utils/uiHelpers/removeElementById";
import { StatsTable } from "./ui/React/StatsTable";
import ReactDOM from "react-dom";
const stealthIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 166 132" style="fill:#adff2f;"><g><path d="M132.658-0.18l-24.321,24.321c-7.915-2.71-16.342-4.392-25.087-4.392c-45.84,0-83,46-83,46 s14.1,17.44,35.635,30.844L12.32,120.158l12.021,12.021L144.68,11.841L132.658-0.18z M52.033,80.445 c-2.104-4.458-3.283-9.438-3.283-14.695c0-19.054,15.446-34.5,34.5-34.5c5.258,0,10.237,1.179,14.695,3.284L52.033,80.445z"/><path d="M134.865,37.656l-18.482,18.482c0.884,3.052,1.367,6.275,1.367,9.612c0,19.055-15.446,34.5-34.5,34.5 c-3.337,0-6.56-0.483-9.611-1.367l-10.124,10.124c6.326,1.725,12.934,2.743,19.735,2.743c45.84,0,83-46,83-46 S153.987,50.575,134.865,37.656z"/></g></svg>&nbsp;` const stealthIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 166 132" style="fill:#adff2f;"><g><path d="M132.658-0.18l-24.321,24.321c-7.915-2.71-16.342-4.392-25.087-4.392c-45.84,0-83,46-83,46 s14.1,17.44,35.635,30.844L12.32,120.158l12.021,12.021L144.68,11.841L132.658-0.18z M52.033,80.445 c-2.104-4.458-3.283-9.438-3.283-14.695c0-19.054,15.446-34.5,34.5-34.5c5.258,0,10.237,1.179,14.695,3.284L52.033,80.445z"/><path d="M134.865,37.656l-18.482,18.482c0.884,3.052,1.367,6.275,1.367,9.612c0,19.055-15.446,34.5-34.5,34.5 c-3.337,0-6.56-0.483-9.611-1.367l-10.124,10.124c6.326,1.725,12.934,2.743,19.735,2.743c45.84,0,83-46,83-46 S153.987,50.575,134.865,37.656z"/></g></svg>&nbsp;`
const killIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="-22 0 511 511.99561" style="fill:#adff2f;"><path d="m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0"/><path d="m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0"/><path d="m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0"/><path d="m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0"/></svg>` const killIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="-22 0 511 511.99561" style="fill:#adff2f;"><path d="m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0"/><path d="m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0"/><path d="m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0"/><path d="m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0"/></svg>`
@ -1211,10 +1214,7 @@ Bladeburner.prototype.initializeDomElementRefs = function() {
overviewChaos: null, overviewChaos: null,
overviewSkillPoints: null, overviewSkillPoints: null,
overviewBonusTime: null, overviewBonusTime: null,
overviewAugSuccessMult: null, overviewAugMults: null,
overviewAugMaxStaminaMult: null,
overviewAugStaminaGainMult: null,
overviewAugAnalysisMult: null,
// Actions and Skills Content // Actions and Skills Content
actionsAndSkillsDesc: null, actionsAndSkillsDesc: null,
@ -1397,10 +1397,7 @@ Bladeburner.prototype.createOverviewContent = function() {
DomElems.overviewSkillPoints = createElement("p", {display:"block"}); DomElems.overviewSkillPoints = createElement("p", {display:"block"});
DomElems.overviewAugSuccessMult = createElement("p", {display:"block"}); DomElems.overviewAugMults = createElement("div", {display:"block"});
DomElems.overviewAugMaxStaminaMult = createElement("p", {display:"block"});
DomElems.overviewAugStaminaGainMult = createElement("p", {display:"block"});
DomElems.overviewAugAnalysisMult = createElement("p", {display:"block"});
DomElems.overviewDiv.appendChild(DomElems.overviewRank); DomElems.overviewDiv.appendChild(DomElems.overviewRank);
@ -1418,10 +1415,7 @@ Bladeburner.prototype.createOverviewContent = function() {
DomElems.overviewDiv.appendChild(DomElems.overviewBonusTime); DomElems.overviewDiv.appendChild(DomElems.overviewBonusTime);
DomElems.overviewDiv.appendChild(DomElems.overviewSkillPoints); DomElems.overviewDiv.appendChild(DomElems.overviewSkillPoints);
appendLineBreaks(DomElems.overviewDiv, 1); appendLineBreaks(DomElems.overviewDiv, 1);
DomElems.overviewDiv.appendChild(DomElems.overviewAugSuccessMult); DomElems.overviewDiv.appendChild(DomElems.overviewAugMults);
DomElems.overviewDiv.appendChild(DomElems.overviewAugMaxStaminaMult);
DomElems.overviewDiv.appendChild(DomElems.overviewAugStaminaGainMult);
DomElems.overviewDiv.appendChild(DomElems.overviewAugAnalysisMult);
// Travel to new city button // Travel to new city button
appendLineBreaks(DomElems.overviewDiv, 1); appendLineBreaks(DomElems.overviewDiv, 1);
@ -1783,10 +1777,12 @@ Bladeburner.prototype.updateOverviewContent = function() {
DomElems.overviewChaos.childNodes[0].nodeValue = "City Chaos: " + formatNumber(this.getCurrentCity().chaos); DomElems.overviewChaos.childNodes[0].nodeValue = "City Chaos: " + formatNumber(this.getCurrentCity().chaos);
DomElems.overviewSkillPoints.innerText = "Skill Points: " + formatNumber(this.skillPoints, 0); DomElems.overviewSkillPoints.innerText = "Skill Points: " + formatNumber(this.skillPoints, 0);
DomElems.overviewBonusTime.childNodes[0].nodeValue = "Bonus time: " + convertTimeMsToTimeElapsedString(this.storedCycles/BladeburnerConstants.CyclesPerSecond*1000); DomElems.overviewBonusTime.childNodes[0].nodeValue = "Bonus time: " + convertTimeMsToTimeElapsedString(this.storedCycles/BladeburnerConstants.CyclesPerSecond*1000);
DomElems.overviewAugSuccessMult.innerText = "Aug. Success Chance Mult: " + formatNumber(Player.bladeburner_success_chance_mult*100, 1) + "%"; ReactDOM.render(StatsTable([
DomElems.overviewAugMaxStaminaMult.innerText = "Aug. Max Stamina Mult: " + formatNumber(Player.bladeburner_max_stamina_mult*100, 1) + "%"; ["Aug. Success Chance mult: ", formatNumber(Player.bladeburner_success_chance_mult*100, 1) + "%"],
DomElems.overviewAugStaminaGainMult.innerText = "Aug. Stamina Gain Mult: " + formatNumber(Player.bladeburner_stamina_gain_mult*100, 1) + "%"; ["Aug. Max Stamina mult: ", formatNumber(Player.bladeburner_max_stamina_mult*100, 1) + "%"],
DomElems.overviewAugAnalysisMult.innerText = "Aug. Field Analysis Mult: " + formatNumber(Player.bladeburner_analysis_mult*100, 1) + "%"; ["Aug. Stamina Gain mult: ", formatNumber(Player.bladeburner_stamina_gain_mult*100, 1) + "%"],
["Aug. Field Analysis mult: ", formatNumber(Player.bladeburner_analysis_mult*100, 1) + "%"],
]), DomElems.overviewAugMults);
} }
Bladeburner.prototype.updateActionAndSkillsContent = function() { Bladeburner.prototype.updateActionAndSkillsContent = function() {

@ -214,6 +214,7 @@ export class Action {
competence += (this.weights[stat] * Math.pow(effMultiplier*playerStatLvl, this.decays[stat])); competence += (this.weights[stat] * Math.pow(effMultiplier*playerStatLvl, this.decays[stat]));
} }
} }
competence *= Player.getIntelligenceBonus(0.75);
competence *= inst.calculateStaminaPenalty(); competence *= inst.calculateStaminaPenalty();
competence *= this.getTeamSuccessBonus(inst); competence *= this.getTeamSuccessBonus(inst);

@ -60,7 +60,7 @@ export const BladeburnerConstants: {
ChaosThreshold: 50, // City chaos level after which it starts making tasks harder ChaosThreshold: 50, // City chaos level after which it starts making tasks harder
BaseStatGain: 1, // Base stat gain per second BaseStatGain: 1, // Base stat gain per second
BaseIntGain: 0.001, // Base intelligence stat gain BaseIntGain: 0.003, // Base intelligence stat gain
ActionCountGrowthPeriod: 480, // Time (s) it takes for action count to grow by its specified value ActionCountGrowthPeriod: 480, // Time (s) it takes for action count to grow by its specified value

@ -1,20 +1,23 @@
import { import {
CodingContract, CodingContract,
CodingContractRewardType, CodingContractRewardType,
CodingContractTypes CodingContractTypes,
ICodingContractReward
} from "./CodingContracts"; } from "./CodingContracts";
import { Factions } from "./Faction/Factions"; import { Factions } from "./Faction/Factions";
import { Player } from "./Player"; import { Player } from "./Player";
import { AllServers } from "./Server/AllServers"; import { AllServers } from "./Server/AllServers";
import { GetServerByHostname } from "./Server/ServerHelpers"; import { GetServerByHostname } from "./Server/ServerHelpers";
import { SpecialServerNames } from "./Server/SpecialServerIps"; import { SpecialServerNames } from "./Server/SpecialServerIps";
import { Server } from "./Server/Server";
import { HacknetServer } from "./Hacknet/HacknetServer";
import { getRandomInt } from "../utils/helpers/getRandomInt"; import { getRandomInt } from "../utils/helpers/getRandomInt";
export function generateRandomContract() { export function generateRandomContract() {
// First select a random problem type // First select a random problem type
let problemType = getRandomProblemType(); const problemType = getRandomProblemType();
// Then select a random reward type. 'Money' will always be the last reward type // Then select a random reward type. 'Money' will always be the last reward type
const reward = getRandomReward(); const reward = getRandomReward();
@ -22,15 +25,15 @@ export function generateRandomContract() {
// Choose random server // Choose random server
const randServer = getRandomServer(); const randServer = getRandomServer();
let contractFn = getRandomFilename(randServer, reward); const contractFn = getRandomFilename(randServer, reward);
let contract = new CodingContract(contractFn, problemType, reward); const contract = new CodingContract(contractFn, problemType, reward);
randServer.addContract(contract); randServer.addContract(contract);
} }
export function generateRandomContractOnHome() { export function generateRandomContractOnHome() {
// First select a random problem type // First select a random problem type
let problemType = getRandomProblemType(); const problemType = getRandomProblemType();
// Then select a random reward type. 'Money' will always be the last reward type // Then select a random reward type. 'Money' will always be the last reward type
const reward = getRandomReward(); const reward = getRandomReward();
@ -38,13 +41,19 @@ export function generateRandomContractOnHome() {
// Choose random server // Choose random server
const serv = Player.getHomeComputer(); const serv = Player.getHomeComputer();
let contractFn = getRandomFilename(serv, reward); const contractFn = getRandomFilename(serv, reward);
let contract = new CodingContract(contractFn, problemType, reward); const contract = new CodingContract(contractFn, problemType, reward);
serv.addContract(contract); serv.addContract(contract);
} }
export function generateContract(params) { export interface IGenerateContractParams {
problemType?: string;
server?: string;
fn?: string;
}
export function generateContract(params: IGenerateContractParams) {
// Problem Type // Problem Type
let problemType; let problemType;
const problemTypes = Object.keys(CodingContractTypes); const problemTypes = Object.keys(CodingContractTypes);
@ -62,7 +71,7 @@ export function generateContract(params) {
if (params.server != null) { if (params.server != null) {
server = GetServerByHostname(params.server); server = GetServerByHostname(params.server);
if (server == null) { if (server == null) {
server = AllServers[param.server]; server = AllServers[params.server];
} }
if (server == null) { if (server == null) {
server = getRandomServer(); server = getRandomServer();
@ -84,7 +93,7 @@ export function generateContract(params) {
} }
// Ensures that a contract's reward type is valid // Ensures that a contract's reward type is valid
function sanitizeRewardType(rewardType) { function sanitizeRewardType(rewardType: CodingContractRewardType): CodingContractRewardType {
let type = rewardType; // Create copy let type = rewardType; // Create copy
const factionsThatAllowHacking = Player.factions.filter((fac) => { const factionsThatAllowHacking = Player.factions.filter((fac) => {
@ -115,9 +124,11 @@ function getRandomProblemType() {
return problemTypes[randIndex]; return problemTypes[randIndex];
} }
function getRandomReward() { function getRandomReward(): ICodingContractReward {
let reward = {}; let reward: ICodingContractReward = {
reward.type = getRandomInt(0, CodingContractRewardType.Money); name: "",
type: getRandomInt(0, CodingContractRewardType.Money),
};
reward.type = sanitizeRewardType(reward.type); reward.type = sanitizeRewardType(reward.type);
// Add additional information based on the reward type // Add additional information based on the reward type
@ -155,7 +166,7 @@ function getRandomReward() {
return reward; return reward;
} }
function getRandomServer() { function getRandomServer(): Server | HacknetServer {
const servers = Object.keys(AllServers); const servers = Object.keys(AllServers);
let randIndex = getRandomInt(0, servers.length - 1); let randIndex = getRandomInt(0, servers.length - 1);
let randServer = AllServers[servers[randIndex]]; let randServer = AllServers[servers[randIndex]];
@ -163,7 +174,7 @@ function getRandomServer() {
// An infinite loop shouldn't ever happen, but to be safe we'll use // An infinite loop shouldn't ever happen, but to be safe we'll use
// a for loop with a limited number of tries // a for loop with a limited number of tries
for (let i = 0; i < 200; ++i) { for (let i = 0; i < 200; ++i) {
if (!randServer.purchasedByPlayer && randServer.hostname !== SpecialServerNames.WorldDaemon) { if (randServer instanceof Server && !randServer.purchasedByPlayer && randServer.hostname !== SpecialServerNames.WorldDaemon) {
break; break;
} }
randIndex = getRandomInt(0, servers.length - 1); randIndex = getRandomInt(0, servers.length - 1);
@ -173,11 +184,11 @@ function getRandomServer() {
return randServer; return randServer;
} }
function getRandomFilename(server, reward) { function getRandomFilename(server: Server | HacknetServer, reward: ICodingContractReward): string {
let contractFn = `contract-${getRandomInt(0, 1e6)}`; let contractFn = `contract-${getRandomInt(0, 1e6)}`;
for (let i = 0; i < 1000; ++i) { for (let i = 0; i < 1000; ++i) {
if (server.contracts.filter((c) => {return c.fn === contractFn}).length <= 0) { break; } if (server.contracts.filter((c: CodingContract) => {return c.fn === contractFn}).length <= 0) { break; }
contractFn = `contract-${getRandomInt(0, 1e6)}`; contractFn = `contract-${getRandomInt(0, 1e6)}`;
} }

@ -6,7 +6,7 @@
import { IMap } from "./types"; import { IMap } from "./types";
export let CONSTANTS: IMap<any> = { export let CONSTANTS: IMap<any> = {
Version: "0.49.2", Version: "0.50.0",
/** Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience /** 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 * and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then
@ -75,14 +75,14 @@ export let CONSTANTS: IMap<any> = {
HospitalCostPerHp: 100e3, HospitalCostPerHp: 100e3,
// Intelligence-related constants // Intelligence-related constants
IntelligenceCrimeWeight: 0.05, // Weight for how much int affects crime success rates IntelligenceCrimeWeight: 0.025, // Weight for how much int affects crime success rates
IntelligenceInfiltrationWeight: 0.1, // Weight for how much int affects infiltration success rates IntelligenceInfiltrationWeight: 0.1, // Weight for how much int affects infiltration success rates
IntelligenceCrimeBaseExpGain: 0.001, IntelligenceCrimeBaseExpGain: 0.05,
IntelligenceProgramBaseExpGain: 500, // Program required hack level divided by this to determine int exp gain IntelligenceProgramBaseExpGain: 2.5, // Program required hack level divided by this to determine int exp gain
IntelligenceTerminalHackBaseExpGain: 200, // Hacking exp divided by this to determine int exp gain IntelligenceTerminalHackBaseExpGain: 200, // Hacking exp divided by this to determine int exp gain
IntelligenceSingFnBaseExpGain: 0.002, IntelligenceSingFnBaseExpGain: 1.5,
IntelligenceClassBaseExpGain: 0.000001, IntelligenceClassBaseExpGain: 0.01,
IntelligenceHackingMissionBaseExpGain: 0.03, // Hacking Mission difficulty multiplied by this to get exp gain IntelligenceHackingMissionBaseExpGain: 3, // Hacking Mission difficulty multiplied by this to get exp gain
// Hacking Missions // Hacking Missions
// TODO Move this into Hacking Mission implementation // TODO Move this into Hacking Mission implementation
@ -228,34 +228,20 @@ export let CONSTANTS: IMap<any> = {
LatestUpdate: LatestUpdate:
` `
v0.49.2 - 2021-03-13 v0.50.0 - 2021-03-20 Intelligence (hydroflame)
------- -------
Intelligence
* int exp gain and effect has been reworked. It is now much more easy to
acquire and far more powerful. The goal here is to feel like players have
another tool in their arsenal.
BN8 Factions
* A new bitnode multipler has been added, it lets you reduce money from a * Hacking factions no longer have hacking level requirements since their associated servers do.
server without gaining actually any money. This is important for BN8 where
hack/grow can influence the stock market. No money can be gained from
hacking but server money can still be reduced.
Documentation
* readthedocs should now be more consistent and many examples were added.
Netscript
* Ace editor will now correctly highlight all functions.
* 'tFormat' is a new netscript function that returns a human readable
representation of milliseconds. eg. "2 hours 15 minute 43 seconds"
Gang
* style improvements
Bladeburner
* style improvements
* fix bug where 'skill list SKILL' would crash if skill is level 0.
Sleeve
* karma gain now scales with sync.
Misc. Misc.
Fix issue where the effective stats under Character>Stats were being calculated. * Sleeve styling.
* number formatting
* remove wiki button in Hacking Missions.
* Fix NaN displayed when very very large numbers are reached.
` `
} }

@ -17,7 +17,8 @@ import { Warehouse } from "./Warehouse";
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
import { CONSTANTS } from "../Constants"; import { CONSTANTS } from "../Constants";
import { Factions } from "../Faction/Factions"; import { Factions } from "../Faction/Factions";
import { showLiterature } from "../Literature"; import { showLiterature } from "../Literature/LiteratureHelpers";
import { LiteratureNames } from "../Literature/data/LiteratureNames";
import { createCityMap } from "../Locations/Cities"; import { createCityMap } from "../Locations/Cities";
import { CityName } from "../Locations/data/CityNames"; import { CityName } from "../Locations/data/CityNames";
import { Player } from "../Player"; import { Player } from "../Player";
@ -2330,7 +2331,7 @@ Corporation.prototype.getStarterGuide = function() {
// Check if player already has Corporation Handbook // Check if player already has Corporation Handbook
let homeComp = Player.getHomeComputer(), let homeComp = Player.getHomeComputer(),
hasHandbook = false, hasHandbook = false,
handbookFn = "corporation-management-handbook.lit"; handbookFn = LiteratureNames.CorporationManagementHandbook;
for (let i = 0; i < homeComp.messages.length; ++i) { for (let i = 0; i < homeComp.messages.length; ++i) {
if (isString(homeComp.messages[i]) && homeComp.messages[i] === handbookFn) { if (isString(homeComp.messages[i]) && homeComp.messages[i] === handbookFn) {
hasHandbook = true; hasHandbook = true;

@ -120,6 +120,7 @@ export class Crime {
chance /= CONSTANTS.MaxSkillLevel; chance /= CONSTANTS.MaxSkillLevel;
chance /= this.difficulty; chance /= this.difficulty;
chance *= p.crime_success_mult; chance *= p.crime_success_mult;
chance *= p.getIntelligenceBonus(1);
return Math.min(chance, 1); return Math.min(chance, 1);
} }

@ -21,7 +21,7 @@ export const Crimes: IMap<Crime> = {
dexterity_success_weight: 2, dexterity_success_weight: 2,
agility_success_weight: 1, agility_success_weight: 1,
intelligence_exp: 0.25 * CONSTANTS.IntelligenceCrimeBaseExpGain, intelligence_exp: 7.5 * CONSTANTS.IntelligenceCrimeBaseExpGain,
}), }),
Mug: new Crime("Mug", CONSTANTS.CrimeMug, 4e3, 36e3, 1/5, 0.25, { Mug: new Crime("Mug", CONSTANTS.CrimeMug, 4e3, 36e3, 1/5, 0.25, {
@ -45,7 +45,7 @@ export const Crimes: IMap<Crime> = {
dexterity_success_weight: 1, dexterity_success_weight: 1,
agility_success_weight: 1, agility_success_weight: 1,
intelligence_exp: 0.5 * CONSTANTS.IntelligenceCrimeBaseExpGain, intelligence_exp: 15 * CONSTANTS.IntelligenceCrimeBaseExpGain,
}), }),
DealDrugs: new Crime("Deal Drugs", CONSTANTS.CrimeDrugs, 10e3, 120e3, 1, 0.5, { DealDrugs: new Crime("Deal Drugs", CONSTANTS.CrimeDrugs, 10e3, 120e3, 1, 0.5, {
@ -66,7 +66,7 @@ export const Crimes: IMap<Crime> = {
hacking_success_weight: 0.05, hacking_success_weight: 0.05,
dexterity_success_weight: 1.25, dexterity_success_weight: 1.25,
intelligence_exp: 2 * CONSTANTS.IntelligenceCrimeBaseExpGain, intelligence_exp: 60 * CONSTANTS.IntelligenceCrimeBaseExpGain,
}), }),
TraffickArms: new Crime("Traffick Arms", CONSTANTS.CrimeTraffickArms, 40e3, 600e3, 2, 1, { TraffickArms: new Crime("Traffick Arms", CONSTANTS.CrimeTraffickArms, 40e3, 600e3, 2, 1, {
@ -110,7 +110,7 @@ export const Crimes: IMap<Crime> = {
agility_success_weight: 2, agility_success_weight: 2,
charisma_success_weight: 2, charisma_success_weight: 2,
intelligence_exp: CONSTANTS.IntelligenceCrimeBaseExpGain, intelligence_exp: 16 * CONSTANTS.IntelligenceCrimeBaseExpGain,
}), }),
Kidnap: new Crime("Kidnap", CONSTANTS.CrimeKidnap, 120e3, 3.6e6, 5, 6, { Kidnap: new Crime("Kidnap", CONSTANTS.CrimeKidnap, 120e3, 3.6e6, 5, 6, {
@ -125,7 +125,7 @@ export const Crimes: IMap<Crime> = {
dexterity_success_weight: 1, dexterity_success_weight: 1,
agility_success_weight: 1, agility_success_weight: 1,
intelligence_exp: 2 * CONSTANTS.IntelligenceCrimeBaseExpGain, intelligence_exp: 26 * CONSTANTS.IntelligenceCrimeBaseExpGain,
}), }),
Assassination: new Crime("Assassination", CONSTANTS.CrimeAssassination, 300e3, 12e6, 8, 10, { Assassination: new Crime("Assassination", CONSTANTS.CrimeAssassination, 300e3, 12e6, 8, 10, {
@ -138,7 +138,7 @@ export const Crimes: IMap<Crime> = {
dexterity_success_weight: 2, dexterity_success_weight: 2,
agility_success_weight: 1, agility_success_weight: 1,
intelligence_exp: 5 * CONSTANTS.IntelligenceCrimeBaseExpGain, intelligence_exp: 65 * CONSTANTS.IntelligenceCrimeBaseExpGain,
kills: 1, kills: 1,
}), }),
@ -158,6 +158,6 @@ export const Crimes: IMap<Crime> = {
agility_success_weight: 1, agility_success_weight: 1,
charisma_success_weight: 1, charisma_success_weight: 1,
intelligence_exp: 10 * CONSTANTS.IntelligenceCrimeBaseExpGain, intelligence_exp: 130 * CONSTANTS.IntelligenceCrimeBaseExpGain,
}), }),
}; };

@ -8,14 +8,14 @@ import { isValidIPAddress } from "../../utils/helpers/isVali
import { formatNumber } from "../../utils/StringHelperFunctions"; import { formatNumber } from "../../utils/StringHelperFunctions";
//Posts a "help" message if connected to DarkWeb //Posts a "help" message if connected to DarkWeb
export function checkIfConnectedToDarkweb() { export function checkIfConnectedToDarkweb(): void {
if (SpecialServerIps.hasOwnProperty("Darkweb Server")) { if (SpecialServerIps.hasOwnProperty("Darkweb Server")) {
var darkwebIp = SpecialServerIps["Darkweb Server"]; const darkwebIp = SpecialServerIps.getIp("Darkweb Server");
if (!isValidIPAddress(darkwebIp)) {return;} if (!isValidIPAddress(darkwebIp)) {return;}
if (darkwebIp == Player.getCurrentServer().ip) { if (darkwebIp == Player.getCurrentServer().ip) {
post("You are now connected to the dark web. From the dark web you can purchase illegal items. " + post("You are now connected to the dark web. From the dark web you can purchase illegal items. " +
"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] " + "Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] " +
"to purchase an item"); "to purchase an item.");
} }
} }
} }
@ -23,7 +23,7 @@ export function checkIfConnectedToDarkweb() {
//Handler for dark web commands. The terminal's executeCommand() function will pass //Handler for dark web commands. The terminal's executeCommand() function will pass
//dark web-specific commands into this. It will pass in the raw split command array //dark web-specific commands into this. It will pass in the raw split command array
//rather than the command string //rather than the command string
export function executeDarkwebTerminalCommand(commandArray) { export function executeDarkwebTerminalCommand(commandArray: string[]): void {
if (commandArray.length == 0) {return;} if (commandArray.length == 0) {return;}
switch (commandArray[0]) { switch (commandArray[0]) {
case "buy": case "buy":
@ -53,7 +53,7 @@ function listAllDarkwebItems() {
} }
} }
function buyDarkwebItem(itemName) { function buyDarkwebItem(itemName: string): void {
itemName = itemName.toLowerCase(); itemName = itemName.toLowerCase();
// find the program that matches, if any // find the program that matches, if any

@ -119,7 +119,7 @@ export class PurchaseableAugmentation extends React.Component<IProps, any> {
statusTxt = `UNLOCKED - ${numeralWrapper.formatMoney(moneyCost)}`; statusTxt = `UNLOCKED - ${numeralWrapper.formatMoney(moneyCost)}`;
} else { } else {
disabled = true; disabled = true;
statusTxt = `LOCKED (Requires ${numeralWrapper.format(repCost, "0,0.0")} faction reputation - ${numeralWrapper.formatMoney(moneyCost)})`; statusTxt = `LOCKED (Requires ${numeralWrapper.format(repCost, "0.000a")} faction reputation - ${numeralWrapper.formatMoney(moneyCost)})`;
color = "red"; color = "red";
} }

@ -1,17 +1,17 @@
import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers"; import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers";
import { Player } from "./Player"; import { Player } from "./Player";
import { Server } from "./Server/Server"; import { Server } from "./Server/Server";
import { HacknetServer } from "./Hacknet/HacknetServer";
/** /**
* Returns the chance the player has to successfully hack a server * Returns the chance the player has to successfully hack a server
*/ */
export function calculateHackingChance(server) { export function calculateHackingChance(server: Server): number {
const hackFactor = 1.75; const hackFactor = 1.75;
const intFactor = 0.2;
const difficultyMult = (100 - server.hackDifficulty) / 100; const difficultyMult = (100 - server.hackDifficulty) / 100;
const skillMult = (hackFactor * Player.hacking_skill) + (intFactor * Player.intelligence); const skillMult = hackFactor * Player.hacking_skill;
const skillChance = (skillMult - server.requiredHackingSkill) / skillMult; const skillChance = (skillMult - server.requiredHackingSkill) / skillMult;
const chance = skillChance * difficultyMult * Player.hacking_chance_mult; const chance = skillChance * difficultyMult * Player.hacking_chance_mult * Player.getIntelligenceBonus(1);
if (chance > 1) { return 1; } if (chance > 1) { return 1; }
if (chance < 0) { return 0; } if (chance < 0) { return 0; }
@ -22,13 +22,13 @@ export function calculateHackingChance(server) {
* Returns the amount of hacking experience the player will gain upon * Returns the amount of hacking experience the player will gain upon
* successfully hacking a server * successfully hacking a server
*/ */
export function calculateHackingExpGain(server) { export function calculateHackingExpGain(server: Server): number {
const baseExpGain = 3; const baseExpGain = 3;
const diffFactor = 0.3; const diffFactor = 0.3;
if (server.baseDifficulty == null) { if (server.baseDifficulty == null) {
server.baseDifficulty = server.hackDifficulty; server.baseDifficulty = server.hackDifficulty;
} }
var expGain = baseExpGain; let expGain = baseExpGain;
expGain += (server.baseDifficulty * Player.hacking_exp_mult * diffFactor); expGain += (server.baseDifficulty * Player.hacking_exp_mult * diffFactor);
return expGain * BitNodeMultipliers.HackExpGain; return expGain * BitNodeMultipliers.HackExpGain;
@ -38,7 +38,7 @@ export function calculateHackingExpGain(server) {
* Returns the percentage of money that will be stolen from a server if * Returns the percentage of money that will be stolen from a server if
* it is successfully hacked (returns the decimal form, not the actual percent value) * it is successfully hacked (returns the decimal form, not the actual percent value)
*/ */
export function calculatePercentMoneyHacked(server) { export function calculatePercentMoneyHacked(server: Server): number {
// Adjust if needed for balancing. This is the divisor for the final calculation // Adjust if needed for balancing. This is the divisor for the final calculation
const balanceFactor = 240; const balanceFactor = 240;
@ -54,21 +54,19 @@ export function calculatePercentMoneyHacked(server) {
/** /**
* Returns time it takes to complete a hack on a server, in seconds * Returns time it takes to complete a hack on a server, in seconds
*/ */
export function calculateHackingTime(server, hack, int) { export function calculateHackingTime(server: Server, hack: number): number {
const difficultyMult = server.requiredHackingSkill * server.hackDifficulty; const difficultyMult = server.requiredHackingSkill * server.hackDifficulty;
const baseDiff = 500; const baseDiff = 500;
const baseSkill = 50; const baseSkill = 50;
const diffFactor = 2.5; const diffFactor = 2.5;
const intFactor = 0.1;
if (hack == null) {hack = Player.hacking_skill;} if (hack == null) {hack = Player.hacking_skill;}
if (int == null) {int = Player.intelligence;} let skillFactor = (diffFactor * difficultyMult + baseDiff);
var skillFactor = (diffFactor * difficultyMult + baseDiff);
// tslint:disable-next-line // tslint:disable-next-line
skillFactor /= (hack + baseSkill + (intFactor * int)); skillFactor /= (hack + baseSkill);
const hackTimeMultiplier = 5; const hackTimeMultiplier = 5;
const hackingTime = hackTimeMultiplier * skillFactor / Player.hacking_speed_mult; const hackingTime = hackTimeMultiplier * skillFactor / (Player.hacking_speed_mult * Player.getIntelligenceBonus(1));
return hackingTime; return hackingTime;
} }
@ -76,17 +74,17 @@ export function calculateHackingTime(server, hack, int) {
/** /**
* Returns time it takes to complete a grow operation on a server, in seconds * Returns time it takes to complete a grow operation on a server, in seconds
*/ */
export function calculateGrowTime(server, hack, int) { export function calculateGrowTime(server: Server, hack: number): number {
const growTimeMultiplier = 3.2; // Relative to hacking time. 16/5 = 3.2 const growTimeMultiplier = 3.2; // Relative to hacking time. 16/5 = 3.2
return growTimeMultiplier * calculateHackingTime(server, hack, int); return growTimeMultiplier * calculateHackingTime(server, hack);
} }
/** /**
* Returns time it takes to complete a weaken operation on a server, in seconds * Returns time it takes to complete a weaken operation on a server, in seconds
*/ */
export function calculateWeakenTime(server, hack, int) { export function calculateWeakenTime(server: Server, hack: number): number {
const weakenTimeMultiplier = 4; // Relative to hacking time const weakenTimeMultiplier = 4; // Relative to hacking time
return weakenTimeMultiplier * calculateHackingTime(server, hack, int); return weakenTimeMultiplier * calculateHackingTime(server, hack);
} }

@ -3,6 +3,7 @@ import { Player } from "./Player";
import { Settings } from "./Settings/Settings"; import { Settings } from "./Settings/Settings";
import { initializeMainMenuLinks } from "./ui/MainMenu/Links"; import { initializeMainMenuLinks } from "./ui/MainMenu/Links";
import { LiteratureNames } from "./Literature/data/LiteratureNames";
import { exceptionAlert } from "../utils/helpers/exceptionAlert"; import { exceptionAlert } from "../utils/helpers/exceptionAlert";
import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners"; import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners";
@ -499,7 +500,7 @@ function iTutorialEnd() {
"<a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html' target='_blank'>Getting Started Guide</a>" + "<a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html' target='_blank'>Getting Started Guide</a>" +
"<a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/' target='_blank'>Documentation</a><br><br>" + "<a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/' target='_blank'>Documentation</a><br><br>" +
"The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. " + "The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. " +
"To read it, go to Terminal and enter<br><br>cat hackers-starting-handbook.lit" "To read it, go to Terminal and enter<br><br>cat " + LiteratureNames.HackersStartingHandbook
}); });
var gotitBtn = createElement("a", { var gotitBtn = createElement("a", {
class:"a-link-button", float:"right", padding:"6px", innerText:"Got it!", class:"a-link-button", float:"right", padding:"6px", innerText:"Got it!",
@ -509,7 +510,7 @@ function iTutorialEnd() {
}); });
createPopup(popupId, [txt, gotitBtn]); createPopup(popupId, [txt, gotitBtn]);
Player.getHomeComputer().messages.push("hackers-starting-handbook.lit"); Player.getHomeComputer().messages.push(LiteratureNames.HackersStartingHandbook);
} }
function iTutorialSetText(txt) { function iTutorialSetText(txt) {

@ -0,0 +1,15 @@
/**
* Lore / world building literature files that can be found on servers.
* These files can be read by the player
*/
export class Literature {
title: string;
fn: string;
txt: string;
constructor(title: string, filename: string, txt: string) {
this.title = title;
this.fn = filename;
this.txt = txt;
}
}

@ -0,0 +1,9 @@
import { Literatures } from "./Literatures";
import { dialogBoxCreate } from "../../utils/DialogBox";
export function showLiterature(fn: string): void {
const litObj = Literatures[fn];
if (litObj == null) { return; }
const txt = `<i>${litObj.title}</i><br><br>${litObj.txt}`;
dialogBoxCreate(txt);
}

@ -1,28 +1,13 @@
/** import { Literature } from "./Literature";
* Lore / world building literature files that can be found on servers. import { LiteratureNames } from "./data/LiteratureNames";
* These files can be read by the player import { IMap } from "../types";
*/
import { dialogBoxCreate } from "../utils/DialogBox";
function Literature(title, filename, txt) { export const Literatures: IMap<Literature> = {};
this.title = title;
this.fn = filename;
this.txt = txt;
}
function showLiterature(fn) { (function () {
const litObj = Literatures[fn]; let title, fn, txt;
if (litObj == null) { return; }
const txt = `<i>${litObj.title}</i><br><br>${litObj.txt}`;
dialogBoxCreate(txt);
}
let Literatures = {}
function initLiterature() {
var title, fn, txt;
title = "The Beginner's Guide to Hacking"; title = "The Beginner's Guide to Hacking";
fn = "hackers-starting-handbook.lit"; fn = LiteratureNames.HackersStartingHandbook;
txt = "Some resources:<br><br>" + txt = "Some resources:<br><br>" +
"<a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript/netscriptlearntoprogram.html' target='_blank' style='margin:4px'>Learn to Program</a><br><br>" + "<a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript/netscriptlearntoprogram.html' target='_blank' style='margin:4px'>Learn to Program</a><br><br>" +
"<a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html' target='_blank' style='margin:4px'>For Experienced JavaScript Developers: NetscriptJS</a><br><br>" + "<a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html' target='_blank' style='margin:4px'>For Experienced JavaScript Developers: NetscriptJS</a><br><br>" +
@ -44,7 +29,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "The Complete Handbook for Creating a Successful Corporation"; title = "The Complete Handbook for Creating a Successful Corporation";
fn = "corporation-management-handbook.lit"; fn = LiteratureNames.CorporationManagementHandbook;
txt = "<u>Getting Started with Corporations</u><br>" + txt = "<u>Getting Started with Corporations</u><br>" +
"To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires " + "To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires " +
"$150b of your own money, but this $150b will get put into your Corporation's funds. " + "$150b of your own money, but this $150b will get put into your Corporation's funds. " +
@ -94,7 +79,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "A Brief History of Synthoids"; title = "A Brief History of Synthoids";
fn = "history-of-synthoids.lit"; fn = LiteratureNames.HistoryOfSynthoids;
txt = "Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, " + 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 " + "are composed entirely of organic substances. For this reason, Synthoids are virtually identical to " +
"humans in form, composition, and appearance.<br><br>" + "humans in form, composition, and appearance.<br><br>" +
@ -134,7 +119,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "A Green Tomorrow"; title = "A Green Tomorrow";
fn = "A-Green-Tomorrow.lit"; fn = LiteratureNames.AGreenTomorrow;
txt = "Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to " + txt = "Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to " +
"combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 " + "combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 " +
"a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that " + "a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that " +
@ -156,7 +141,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "Alpha and Omega"; title = "Alpha and Omega";
fn = "alpha-omega.lit"; fn = LiteratureNames.AlphaOmega;
txt = "Then we saw a new heaven and a new earth, for our first heaven and earth had gone away, and our sea was no more. " + txt = "Then we saw a new heaven and a new earth, for our first heaven and earth had gone away, and our sea was no more. " +
"And we saw a new holy city, new Aeria, coming down out of this new heaven, prepared as a bride adorned for her husband. " + "And we saw a new holy city, new Aeria, coming down out of this new heaven, prepared as a bride adorned for her husband. " +
"And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they " + "And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they " +
@ -173,7 +158,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "Are We Living in a Computer Simulation?"; title = "Are We Living in a Computer Simulation?";
fn = "simulated-reality.lit"; fn = LiteratureNames.SimulatedReality;
txt = "The idea that we are living in a virtual world is not new. It's a trope that has " + txt = "The idea that we are living in a virtual world is not new. It's a trope that has " +
"been explored constantly in literature and pop culture. However, it is also a legitimate " + "been explored constantly in literature and pop culture. However, it is also a legitimate " +
"scientific hypothesis that many notable physicists and philosophers have debated for years.<br><br>" + "scientific hypothesis that many notable physicists and philosophers have debated for years.<br><br>" +
@ -191,7 +176,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "Beyond Man"; title = "Beyond Man";
fn = "beyond-man.lit"; fn = LiteratureNames.BeyondMan;
txt = "Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against " + txt = "Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against " +
"human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, " + "human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, " +
"arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that " + "arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that " +
@ -208,7 +193,7 @@ function initLiterature() {
title = "Brighter than the Sun"; title = "Brighter than the Sun";
fn = "brighter-than-the-sun.lit"; fn = LiteratureNames.BrighterThanTheSun;
txt = "When people think about the corporations that dominate the East, they typically think of KuaiGong International, which " + txt = "When people think about the corporations that dominate the East, they typically think of KuaiGong International, which " +
"holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest " + "holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest " +
"drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company " + "drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company " +
@ -231,7 +216,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "Democracy is Dead: The Fall of an Empire"; title = "Democracy is Dead: The Fall of an Empire";
fn = "democracy-is-dead.lit"; fn = LiteratureNames.DemocracyIsDead;
txt = "They rose from the shadows in the street<br>From the places where the oppressed meet<br>" + txt = "They rose from the shadows in the street<br>From the places where the oppressed meet<br>" +
"Their cries echoed loudly through the air<br>As they once did in Tiananmen Square<br>" + "Their cries echoed loudly through the air<br>As they once did in Tiananmen Square<br>" +
"Loudness in the silence, Darkness in the light<br>They came forth with power and might<br>" + "Loudness in the silence, Darkness in the light<br>They came forth with power and might<br>" +
@ -244,7 +229,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "Figures Show Rising Crime Rates in Sector-12"; title = "Figures Show Rising Crime Rates in Sector-12";
fn = "sector-12-crime.lit"; fn = LiteratureNames.Sector12Crime;
txt = "A recent study by analytics company Wilson Inc. shows a significant rise " + txt = "A recent study by analytics company Wilson Inc. shows a significant rise " +
"in criminal activity in Sector-12. Perhaps the most alarming part of the statistic " + "in criminal activity in Sector-12. Perhaps the most alarming part of the statistic " +
"is that most of the rise is in violent crime such as homicide and assault. According " + "is that most of the rise is in violent crime such as homicide and assault. According " +
@ -258,7 +243,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "Man and the Machine"; title = "Man and the Machine";
fn = "man-and-machine.lit"; fn = LiteratureNames.ManAndMachine;
txt = "In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate " + txt = "In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate " +
"of technological advancement would continue to accelerate faster and faster until one day " + "of technological advancement would continue to accelerate faster and faster until one day " +
"machines would be become infinitely more intelligent than humans. This point, called the " + "machines would be become infinitely more intelligent than humans. This point, called the " +
@ -276,7 +261,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "Secret Societies"; title = "Secret Societies";
fn = "secret-societies.lit"; fn = LiteratureNames.SecretSocieties;
txt = "The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and " + txt = "The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and " +
"distrust. People have long wondered about who these secret society members are and what they do, with the " + "distrust. People have long wondered about who these secret society members are and what they do, with the " +
"most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world " + "most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world " +
@ -294,7 +279,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "Space: The Failed Frontier"; title = "Space: The Failed Frontier";
fn = "the-failed-frontier.lit"; fn = LiteratureNames.TheFailedFrontier;
txt = "Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore " + txt = "Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore " +
"the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, " + "the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, " +
"we pushed the boundaries of our scientific limits, and then pushed further. Space exploration " + "we pushed the boundaries of our scientific limits, and then pushed further. Space exploration " +
@ -311,7 +296,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "Coded Intelligence: Myth or Reality?"; title = "Coded Intelligence: Myth or Reality?";
fn = "coded-intelligence.lit"; fn = LiteratureNames.CodedIntelligence;
txt = "Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. " + txt = "Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. " +
"Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. " + "Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. " +
"Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has " + "Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has " +
@ -327,7 +312,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "Synthetic Muscles"; title = "Synthetic Muscles";
fn = "synthetic-muscles.lit"; fn = LiteratureNames.SyntheticMuscles;
txt = "Initial versions of synthetic muscles weren't made of anything organic but were actually " + txt = "Initial versions of synthetic muscles weren't made of anything organic but were actually " +
"crude devices made to mimic human muscle function. Some of the early iterations were actually made of " + "crude devices made to mimic human muscle function. Some of the early iterations were actually made of " +
"common materials such as fishing lines and sewing threads due to their high strength for " + "common materials such as fishing lines and sewing threads due to their high strength for " +
@ -340,7 +325,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "Tensions rise in global tech race"; title = "Tensions rise in global tech race";
fn = "tensions-in-tech-race.lit"; fn = LiteratureNames.TensionsInTechRace;
txt = "Have we entered a new Cold War? Is WWIII just beyond the horizon?<br><br>" + txt = "Have we entered a new Cold War? Is WWIII just beyond the horizon?<br><br>" +
"After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, " + "After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, " +
"geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. " + "geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. " +
@ -354,7 +339,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "The Cost of Immortality"; title = "The Cost of Immortality";
fn = "cost-of-immortality.lit"; fn = LiteratureNames.CostOfImmortality;
txt = "Evolution and advances in medical and augmentation technology has lead to drastic improvements " + txt = "Evolution and advances in medical and augmentation technology has lead to drastic improvements " +
"in human mortality rates. Recent figures show that the life expectancy for humans " + "in human mortality rates. Recent figures show that the life expectancy for humans " +
"that live in a first-world country is about 130 years of age, almost double of what it was " + "that live in a first-world country is about 130 years of age, almost double of what it was " +
@ -378,7 +363,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "The Hidden World"; title = "The Hidden World";
fn = "the-hidden-world.lit"; fn = LiteratureNames.TheHiddenWorld;
txt = "WAKE UP SHEEPLE<br><br>" + txt = "WAKE UP SHEEPLE<br><br>" +
"THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY<br><br>" + "THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY<br><br>" +
"THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!<br><br>" + "THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!<br><br>" +
@ -396,7 +381,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "The New God"; title = "The New God";
fn = "the-new-god.lit"; fn = LiteratureNames.TheNewGod;
txt = "Everyone has that moment in their life where they wonder about the bigger questions<br><br>" + txt = "Everyone has that moment in their life where they wonder about the bigger questions<br><br>" +
"What's the point of all of this? What is my purpose?<br><br>" + "What's the point of all of this? What is my purpose?<br><br>" +
"Some people dare to think even bigger<br><br>" + "Some people dare to think even bigger<br><br>" +
@ -409,7 +394,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "The New Triads"; title = "The New Triads";
fn = "new-triads.lit"; fn = LiteratureNames.NewTriads;
txt = "The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian " + txt = "The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian " +
"territories. They were often considered one of the first and biggest criminal secret societies. " + "territories. They were often considered one of the first and biggest criminal secret societies. " +
"While most of the branches of the Triads have been destroyed over the past few decades, the " + "While most of the branches of the Triads have been destroyed over the past few decades, the " +
@ -427,13 +412,7 @@ function initLiterature() {
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
title = "The Secret War"; title = "The Secret War";
fn = "the-secret-war.lit"; fn = LiteratureNames.TheSecretWar;
txt = "" txt = ""
Literatures[fn] = new Literature(title, fn, txt); Literatures[fn] = new Literature(title, fn, txt);
} })()
export {
Literatures,
initLiterature,
showLiterature
};

@ -0,0 +1,25 @@
import { IMap } from "../../types";
export const LiteratureNames: IMap<string> = {
HackersStartingHandbook: "hackers-starting-handbook.lit",
CorporationManagementHandbook: "corporation-management-handbook.lit",
HistoryOfSynthoids: "history-of-synthoids.lit",
AGreenTomorrow: "A-Green-Tomorrow.lit",
AlphaOmega: "alpha-omega.lit",
SimulatedReality: "simulated-reality.lit",
BeyondMan: "beyond-man.lit",
BrighterThanTheSun: "brighter-than-the-sun.lit",
DemocracyIsDead: "democracy-is-dead.lit",
Sector12Crime: "sector-12-crime.lit",
ManAndMachine: "man-and-machine.lit",
SecretSocieties: "secret-societies.lit",
TheFailedFrontier: "the-failed-frontier.lit",
CodedIntelligence: "coded-intelligence.lit",
SyntheticMuscles: "synthetic-muscles.lit",
TensionsInTechRace: "tensions-in-tech-race.lit",
CostOfImmortality: "cost-of-immortality.lit",
TheHiddenWorld: "the-hidden-world.lit",
TheNewGod: "the-new-god.lit",
NewTriads: "new-triads.lit",
TheSecretWar: "the-secret-war.lit",
};

@ -5,6 +5,7 @@ import { Player } from "./Player";
import { dialogBoxCreate } from "../utils/DialogBox"; import { dialogBoxCreate } from "../utils/DialogBox";
import { formatNumber } from "../utils/StringHelperFunctions"; import { formatNumber } from "../utils/StringHelperFunctions";
import { numeralWrapper } from "./ui/numeralFormat";
import { addOffset } from "../utils/helpers/addOffset"; import { addOffset } from "../utils/helpers/addOffset";
import { getRandomInt } from "../utils/helpers/getRandomInt"; import { getRandomInt } from "../utils/helpers/getRandomInt";
@ -286,11 +287,8 @@ HackingMission.prototype.createPageDom = function() {
var gain = this.reward * Player.faction_rep_mult * favorMult; var gain = this.reward * Player.faction_rep_mult * favorMult;
var headerText = document.createElement("p"); var headerText = document.createElement("p");
headerText.innerHTML = "You are about to start a hacking mission! You will gain " + headerText.innerHTML = "You are about to start a hacking mission! You will gain " +
formatNumber(gain, 3) + " faction reputation with " + this.faction.name + numeralWrapper.format(gain, '0.000a') + " faction reputation with " + this.faction.name +
" if you win. For more information " + " if you win. Click the 'Start' button to begin.";
"about how hacking missions work, click one of the guide links " +
"below (one opens up an in-game guide and the other opens up " +
"the guide from the wiki). Click the 'Start' button to begin.";
headerText.style.display = "block"; headerText.style.display = "block";
headerText.classList.add("hack-mission-header-element"); headerText.classList.add("hack-mission-header-element");
headerText.style.width = "80%"; headerText.style.width = "80%";
@ -305,15 +303,6 @@ HackingMission.prototype.createPageDom = function() {
return false; return false;
}); });
var wikiGuideBtn = document.createElement("a");
wikiGuideBtn.innerText = "Wiki Guide";
wikiGuideBtn.classList.add("a-link-button");
wikiGuideBtn.style.display = "inline-block";
wikiGuideBtn.classList.add("hack-mission-header-element");
wikiGuideBtn.target = "_blank";
// TODO Add link to wiki page wikiGuideBtn.href =
// Start button will get replaced with forfeit when game is started // Start button will get replaced with forfeit when game is started
var startBtn = document.createElement("a"); var startBtn = document.createElement("a");
startBtn.innerHTML = "Start"; startBtn.innerHTML = "Start";
@ -490,7 +479,6 @@ HackingMission.prototype.createPageDom = function() {
container.appendChild(headerText); container.appendChild(headerText);
container.appendChild(inGameGuideBtn); container.appendChild(inGameGuideBtn);
container.appendChild(wikiGuideBtn);
container.appendChild(startBtn); container.appendChild(startBtn);
container.appendChild(forfeitMission); container.appendChild(forfeitMission);
container.appendChild(timer); container.appendChild(timer);
@ -1527,7 +1515,8 @@ HackingMission.prototype.finishMission = function(win) {
var favorMult = 1 + (this.faction.favor / 100); var favorMult = 1 + (this.faction.favor / 100);
var gain = this.reward * Player.faction_rep_mult * favorMult; var gain = this.reward * Player.faction_rep_mult * favorMult;
dialogBoxCreate("Mission won! You earned " + dialogBoxCreate("Mission won! You earned " +
formatNumber(gain, 3) + " reputation with " + this.faction.name); numeralWrapper.format(gain, '0.000a') + " reputation with " + this.faction.name);
console.log(`diff ${this.difficulty}`);
Player.gainIntelligenceExp(this.difficulty * CONSTANTS.IntelligenceHackingMissionBaseExpGain); Player.gainIntelligenceExp(this.difficulty * CONSTANTS.IntelligenceHackingMissionBaseExpGain);
this.faction.playerReputation += gain; this.faction.playerReputation += gain;
} else { } else {

@ -128,7 +128,6 @@ import { TextFile, getTextFile, createTextFile } from "./TextFile";
import { import {
unknownBladeburnerActionErrorMessage unknownBladeburnerActionErrorMessage
} from"./NetscriptBladeburner"; } from"./NetscriptBladeburner";
import * as nsGang from "./NetscriptGang";
import { Gang } from "./Gang"; import { Gang } from "./Gang";
import { import {
NetscriptPorts, NetscriptPorts,
@ -330,10 +329,10 @@ function NetscriptFunctions(workerScript) {
*/ */
const checkTixApiAccess = function(callingFn="") { const checkTixApiAccess = function(callingFn="") {
if (!Player.hasWseAccount) { if (!Player.hasWseAccount) {
throw makeRuntimeRejectMsg(workerScript, `You don't have WSE Access! Cannot use ${callingFn}()`); throw makeRuntimeErrorMsg(callingFn, `You don't have WSE Access! Cannot use ${callingFn}()`);
} }
if (!Player.hasTixApiAccess) { if (!Player.hasTixApiAccess) {
throw makeRuntimeRejectMsg(workerScript, `You don't have TIX API Access! Cannot use ${callingFn}()`); throw makeRuntimeErrorMsg(callingFn, `You don't have TIX API Access! Cannot use ${callingFn}()`);
} }
} }
@ -345,7 +344,7 @@ function NetscriptFunctions(workerScript) {
const getStockFromSymbol = function(symbol, callingFn="") { const getStockFromSymbol = function(symbol, callingFn="") {
const stock = SymbolToStockMap[symbol]; const stock = SymbolToStockMap[symbol];
if (stock == null) { if (stock == null) {
throw makeRuntimeRejectMsg(workerScript, `Invalid stock symbol passed into ${callingFn}()`); throw makeRuntimeErrorMsg(callingFn, `Invalid stock symbol: '${symbol}'`);
} }
return stock; return stock;
@ -368,18 +367,18 @@ function NetscriptFunctions(workerScript) {
} }
// Utility function to get Hacknet Node object // Utility function to get Hacknet Node object
const getHacknetNode = function(i) { const getHacknetNode = function(i, callingFn="") {
if (isNaN(i)) { if (isNaN(i)) {
throw makeRuntimeRejectMsg(workerScript, "Invalid index specified for Hacknet Node: " + i); throw makeRuntimeErrorMsg(callingFn, "Invalid index specified for Hacknet Node: " + i);
} }
if (i < 0 || i >= Player.hacknetNodes.length) { if (i < 0 || i >= Player.hacknetNodes.length) {
throw makeRuntimeRejectMsg(workerScript, "Index specified for Hacknet Node is out-of-bounds: " + i); throw makeRuntimeErrorMsg(callingFn, "Index specified for Hacknet Node is out-of-bounds: " + i);
} }
if (hasHacknetServers()) { if (hasHacknetServers()) {
const hserver = AllServers[Player.hacknetNodes[i]]; const hserver = AllServers[Player.hacknetNodes[i]];
if (hserver == null) { if (hserver == null) {
throw makeRuntimeRejectMsg(workerScript, `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`); throw makeRuntimeErrorMsg(callingFn, `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`);
} }
return hserver; return hserver;
@ -580,7 +579,7 @@ function NetscriptFunctions(workerScript) {
} }
}, },
getNodeStats : function(i) { getNodeStats : function(i) {
const node = getHacknetNode(i); const node = getHacknetNode(i, "getNodeStats");
const hasUpgraded = hasHacknetServers(); const hasUpgraded = hasHacknetServers();
const res = { const res = {
name: hasUpgraded ? node.hostname : node.name, name: hasUpgraded ? node.hostname : node.name,
@ -600,20 +599,20 @@ function NetscriptFunctions(workerScript) {
return res; return res;
}, },
upgradeLevel : function(i, n) { upgradeLevel : function(i, n) {
const node = getHacknetNode(i); const node = getHacknetNode(i, "upgradeLevel");
return purchaseLevelUpgrade(node, n); return purchaseLevelUpgrade(node, n);
}, },
upgradeRam : function(i, n) { upgradeRam : function(i, n) {
const node = getHacknetNode(i); const node = getHacknetNode(i, "upgradeRam");
return purchaseRamUpgrade(node, n); return purchaseRamUpgrade(node, n);
}, },
upgradeCore : function(i, n) { upgradeCore : function(i, n) {
const node = getHacknetNode(i); const node = getHacknetNode(i, "upgradeCore");
return purchaseCoreUpgrade(node, n); return purchaseCoreUpgrade(node, n);
}, },
upgradeCache : function(i, n) { upgradeCache : function(i, n) {
if (!hasHacknetServers()) { return false; } if (!hasHacknetServers()) { return false; }
const node = getHacknetNode(i); const node = getHacknetNode(i, "upgradeCache");
const res = purchaseCacheUpgrade(node, n); const res = purchaseCacheUpgrade(node, n);
if (res) { if (res) {
updateHashManagerCapacity(); updateHashManagerCapacity();
@ -621,20 +620,20 @@ function NetscriptFunctions(workerScript) {
return res; return res;
}, },
getLevelUpgradeCost : function(i, n) { getLevelUpgradeCost : function(i, n) {
const node = getHacknetNode(i); const node = getHacknetNode(i, "upgradeLevel");
return node.calculateLevelUpgradeCost(n, Player.hacknet_node_level_cost_mult); return node.calculateLevelUpgradeCost(n, Player.hacknet_node_level_cost_mult);
}, },
getRamUpgradeCost : function(i, n) { getRamUpgradeCost : function(i, n) {
const node = getHacknetNode(i); const node = getHacknetNode(i, "upgradeRam");
return node.calculateRamUpgradeCost(n, Player.hacknet_node_ram_cost_mult); return node.calculateRamUpgradeCost(n, Player.hacknet_node_ram_cost_mult);
}, },
getCoreUpgradeCost : function(i, n) { getCoreUpgradeCost : function(i, n) {
const node = getHacknetNode(i); const node = getHacknetNode(i, "upgradeCore");
return node.calculateCoreUpgradeCost(n, Player.hacknet_node_core_cost_mult); return node.calculateCoreUpgradeCost(n, Player.hacknet_node_core_cost_mult);
}, },
getCacheUpgradeCost : function(i, n) { getCacheUpgradeCost : function(i, n) {
if (!hasHacknetServers()) { return Infinity; } if (!hasHacknetServers()) { return Infinity; }
const node = getHacknetNode(i); const node = getHacknetNode(i, "upgradeCache");
return node.calculateCacheUpgradeCost(n); return node.calculateCacheUpgradeCost(n);
}, },
numHashes : function() { numHashes : function() {

@ -1,8 +0,0 @@
import { Player } from "./Player";
import { Gang } from "./Gang";
import { makeRuntimeRejectMsg } from "./NetscriptEvaluator";
export function unknownGangApiExceptionMessage(functionName, err) {
return `gang.${functionName}() failed with exception: ` + err;
}

@ -1,51 +0,0 @@
import { Settings } from "./Settings/Settings";
function NetscriptPort() {
this.data = [];
}
NetscriptPort.prototype.write = function(data) {
this.data.push(data);
if (this.data.length > Settings.MaxPortCapacity) {
return this.data.shift();
}
return null;
}
NetscriptPort.prototype.tryWrite = function(data) {
if (this.data.length >= Settings.MaxPortCapacity) {
return false;
}
this.data.push(data);
return true;
}
NetscriptPort.prototype.read = function() {
if (this.data.length === 0) {
return "NULL PORT DATA";
}
return this.data.shift();
}
NetscriptPort.prototype.peek = function() {
if (this.data.length === 0) {
return "NULL PORT DATA";
} else {
var foo = this.data.slice();
return foo[0];
}
}
NetscriptPort.prototype.full = function() {
return this.data.length == Settings.MaxPortCapacity;
}
NetscriptPort.prototype.empty = function() {
return this.data.length === 0;
}
NetscriptPort.prototype.clear = function() {
this.data.length = 0;
}
export {NetscriptPort};

51
src/NetscriptPort.ts Normal file

@ -0,0 +1,51 @@
import { Settings } from "./Settings/Settings";
export class NetscriptPort {
data: any[] = [];
constructor() {}
write(data: any): any {
this.data.push(data);
if (this.data.length > Settings.MaxPortCapacity) {
return this.data.shift();
}
return null;
}
tryWrite(data: any): boolean {
if (this.data.length >= Settings.MaxPortCapacity) {
return false;
}
this.data.push(data);
return true;
}
read(): any {
if (this.data.length === 0) {
return "NULL PORT DATA";
}
return this.data.shift();
}
peek(): any {
if (this.data.length === 0) {
return "NULL PORT DATA";
} else {
var foo = this.data.slice();
return foo[0];
}
}
full(): boolean {
return this.data.length == Settings.MaxPortCapacity;
}
empty(): boolean {
return this.data.length === 0;
}
clear(): void {
this.data.length = 0;
}
}

@ -1,155 +0,0 @@
/* Perks
* Defines Perks that are unlocked when you gain enough reputation in a
* company or faction
*/
PerkNames = {
FreeCoffeeCompanyPerk: "Free Coffee",
FreeFoodCompanyPerk: "Free Food",
NetworkingCompanyPerk: "Networking",
PersonalTrainerCompanyPerk: "Personal Trainer",
KnowledgeBaseCompanyPerk: "Company Knowledge Base",
NootropicsCompanyPerk: "Company-provided Nootropics",
NetworkingFactionPerk: "Networking",
SupercomputerFactionPerk: "Remote Supercomputer Use",
VPNFactionPerk: "High-Speed VPN",
PrivateServerFactionPerk: "Private Faction Server",
InsiderKnowledgeFactionPerk: "Insider Knowledge",
}
PerkInfo = {
FreeCoffee: "Your company provides free coffee, improving your focus " +
"and productivity",
FreeFood: "Your company provides free healthy and nutritious food",
NetworkingCompany: "Working at this company provides many opportunities to " +
"build your professional network!",
PersonalTrainer: "Your company provides a free personal trainer to help you train",
KnowledgeBase: "The company has a comprehensive knowledge base that " +
"you can use to learn",
Nootropics: "Your company provides free nootropics, cognitive-enhancing drugs",
NetworkingFaction: "Being a member of this faction provides many opportunities to " +
"build your network of contacts",
SupercomputerFaction: "You are able to use your Faction's private supercomputer, " +
"giving you unparalleled computing power",
VPN: "You are able to use your Faction's high-speed VPN to more securely " +
"access the Internet",
PrivateServer: "You are able to use your Faction's private server",
InsiderKnowledge: "Other members of the faction give you insider information about other " +
"companies and factions"
}
function Perk(name, reqRep, info) {
this.name = name;
this.info = info;
this.requiredRep = reqRep;
//Company/faction specific multipliers
this.money_mult = 1;
this.hacking_mult = 1;
this.combat_stat_mult = 1;
this.labor_stat_mult = 1;
this.repmult = 1;
/* Properties below set when a Perk is gained by the player */
this.applied = false;
this.companyPerk = false;
this.companyName = "";
this.factionPerk = false;
this.factionName = "";
}
Perk.prototype.setCompany = function(companyName) {
if (this.factionPerk) {
console.error("Perk cannot be both faction and company perk");
return;
}
this.companyPerk = true;
this.companyName = companyName;
}
Perk.prototype.setFaction = function(factionName) {
if (this.companyPerk) {
console.error("Perk cannot be both faction and company perk");
return;
}
this.factionPerk = true;
this.factionName = factionName;
}
Perk.prototype.toJSON = function() {
return Generic_toJSON("Perk", this);
}
Perk.fromJSON = function(value) {
return Generic_fromJSON(Perk, value.data);
}
Reviver.constructors.Perk = Perk;
var freeCoffee = new Perk(PerkNames.FreeCoffeeCompanyPerk, 6000, PerkInfo.FreeCoffee);
/* Company Perks */
//Free Coffee - Increased money and hacking exp gain
//Free Food - Increased combat stat gain
//Networking - Company Rep Gain Rate + , Charisma exp gain rate +
//Company Personal Trainer - Increase in combat stat gain rates
//Knowledge Base - Increase hacking skill by some percentage
//Nootropics - Increase hacking mult, and hacking exp gain mult
/* Faction Perks */
//Networking - Faction Rep Gain Rate + , Chariasma Exp Gain Rate +
//Remote Supercomputer - increase in hacking speed, chance, and money
//High Speed VPN - Hack chance increase
//Private Server - Gives you a server with a lot of RAM that you can use
//Insider Knowledge - Ppl in faction from other companies have insider information that lets you hack
// other servers easier. Increase in hack chance
applyPerk = function(perk) {
switch (perk.name) {
case PerkNames.FreeCoffeeCompanyPerk:
//Increase money and hacking exp gain
Player.hacking_money_mult *= 1.25;
Player.hacking_exp_mult *= 1.25;
break;
case PerkNames.FreeFoodCompanyPerk:
Player.strength_exp_mult *= 1.2;
Player.defense_exp_mult *= 1.2;
Player.dexterity_exp_mult *= 1.2;
Player.agility_exp_mult *= 1.2;
break;
case PerkNames.NetworkingCompanyPerk:
Player.company_rep_mult *= 1.1;
Player.charisma_exp_mult *= 1.2;
break;
case PerkNames.PersonalTrainerCompanyPerk:
Player.strength_exp_mult *= 1.15;
Player.defense_exp_mult *= 1.15;
Player.dexterity_exp_mult *= 1.15;
Player.agility_exp_mult *= 1.15;
break;
case PerkNames.KnowledgeBaseCompanyPerk:
break;
case PerkNames.NootropicsCompanyPerk:
break;
case PerkNames.NetworkingFactionPerk:
break;
case PerkNames.SupercomputerFactionPerk:
break;
case PerkNames.VPNFactionPerk:
break;
case PerkNames.PrivateServerFactionPerk:
break;
case PerkNames.InsiderKnowledgeFactionPerk:
break;
default:
console.warn(`Unrecognized perk: ${perk.name}`);
return;
}
}
losePerk = function(perk) {
}

@ -146,6 +146,7 @@ export interface IPlayer {
hasCorporation(): boolean; hasCorporation(): boolean;
hasGangWith(facName: string): boolean; hasGangWith(facName: string): boolean;
hasTorRouter(): boolean; hasTorRouter(): boolean;
hasProgram(program: string): boolean;
inBladeburner(): boolean; inBladeburner(): boolean;
inGang(): boolean; inGang(): boolean;
isQualified(company: Company, position: CompanyPosition): boolean; isQualified(company: Company, position: CompanyPosition): boolean;
@ -177,4 +178,5 @@ export interface IPlayer {
travel(to: CityName): boolean; travel(to: CityName): boolean;
giveExploit(exploit: Exploit): void; giveExploit(exploit: Exploit): void;
queryStatFromString(str: string): number; queryStatFromString(str: string): number;
getIntelligenceBonus(weight: number): number;
} }

@ -21,4 +21,6 @@ export interface IPlayerOrSleeve {
// Multipliers // Multipliers
crime_success_mult: number; crime_success_mult: number;
getIntelligenceBonus(weight: number): number;
} }

@ -209,4 +209,13 @@ export abstract class Person {
this.max_hp = Math.floor(10 + this.defense / 10); this.max_hp = Math.floor(10 + this.defense / 10);
this.hp = Math.round(this.max_hp * ratio); this.hp = Math.round(this.max_hp * ratio);
} }
getIntelligenceBonus(weight: number): number {
// 15 => +1.4% when you initially acquire int
// 50 => +3.8% mid game
// 100 => +6.6% late game
// 250 => +13.4% realistic best possible
return 1+(weight*Math.pow(this.intelligence, 0.8)/600);
}
} }

@ -821,7 +821,7 @@ export function startFactionHackWork(faction) {
this.resetWorkStatus(); this.resetWorkStatus();
this.workHackExpGainRate = .15 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain; this.workHackExpGainRate = .15 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
this.workRepGainRate = this.workRepGainRate = (this.hacking_skill + this.intelligence) / CONSTANTS.MaxSkillLevel * this.faction_rep_mult; this.workRepGainRate = (this.hacking_skill + this.intelligence) / CONSTANTS.MaxSkillLevel * this.faction_rep_mult * this.getIntelligenceBonus(0.5);
this.factionWorkType = CONSTANTS.FactionWorkHacking; this.factionWorkType = CONSTANTS.FactionWorkHacking;
this.currentWorkFactionDescription = "carrying out hacking contracts"; this.currentWorkFactionDescription = "carrying out hacking contracts";
@ -869,7 +869,7 @@ export function workForFaction(numCycles) {
//Constantly update the rep gain rate //Constantly update the rep gain rate
switch (this.factionWorkType) { switch (this.factionWorkType) {
case CONSTANTS.FactionWorkHacking: case CONSTANTS.FactionWorkHacking:
this.workRepGainRate = (this.hacking_skill + this.intelligence) / CONSTANTS.MaxSkillLevel * this.faction_rep_mult; this.workRepGainRate = (this.hacking_skill + this.intelligence) / CONSTANTS.MaxSkillLevel * this.faction_rep_mult * this.getIntelligenceBonus(0.5);
break; break;
case CONSTANTS.FactionWorkField: case CONSTANTS.FactionWorkField:
this.workRepGainRate = this.getFactionFieldWorkRepGain(); this.workRepGainRate = this.getFactionFieldWorkRepGain();
@ -1157,7 +1157,7 @@ export function startCreateProgramWork(programName, time, reqLevel) {
export function createProgramWork(numCycles) { export function createProgramWork(numCycles) {
//Higher hacking skill will allow you to create programs faster //Higher hacking skill will allow you to create programs faster
var reqLvl = this.createProgramReqLvl; var reqLvl = this.createProgramReqLvl;
var skillMult = (this.hacking_skill / reqLvl); //This should always be greater than 1; var skillMult = (this.hacking_skill / reqLvl) * this.getIntelligenceBonus(3); //This should always be greater than 1;
skillMult = 1 + ((skillMult - 1) / 5); //The divider constant can be adjusted as necessary skillMult = 1 + ((skillMult - 1) / 5); //The divider constant can be adjusted as necessary
//Skill multiplier directly applied to "time worked" //Skill multiplier directly applied to "time worked"
@ -2021,7 +2021,7 @@ export function checkForFactionInvitations() {
if (bitrunnersServer == null) { if (bitrunnersServer == null) {
console.error("Could not find BitRunners Server"); console.error("Could not find BitRunners Server");
} else if (!bitrunnersFac.isBanned && !bitrunnersFac.isMember && bitrunnersServer.manuallyHacked && } else if (!bitrunnersFac.isBanned && !bitrunnersFac.isMember && bitrunnersServer.manuallyHacked &&
!bitrunnersFac.alreadyInvited && this.hacking_skill >= 500 && homeComp.maxRam >= 128) { !bitrunnersFac.alreadyInvited && homeComp.maxRam >= 128) {
invitedFactions.push(bitrunnersFac); invitedFactions.push(bitrunnersFac);
} }
@ -2031,7 +2031,7 @@ export function checkForFactionInvitations() {
if (blackhandServer == null) { if (blackhandServer == null) {
console.error("Could not find The Black Hand Server"); console.error("Could not find The Black Hand Server");
} else if (!theblackhandFac.isBanned && !theblackhandFac.isMember && blackhandServer.manuallyHacked && } else if (!theblackhandFac.isBanned && !theblackhandFac.isMember && blackhandServer.manuallyHacked &&
!theblackhandFac.alreadyInvited && this.hacking_skill >= 350 && homeComp.maxRam >= 64) { !theblackhandFac.alreadyInvited && homeComp.maxRam >= 64) {
invitedFactions.push(theblackhandFac); invitedFactions.push(theblackhandFac);
} }
@ -2041,7 +2041,7 @@ export function checkForFactionInvitations() {
if (nitesecServer == null) { if (nitesecServer == null) {
console.error("Could not find NiteSec Server"); console.error("Could not find NiteSec Server");
} else if (!nitesecFac.isBanned && !nitesecFac.isMember && nitesecServer.manuallyHacked && } else if (!nitesecFac.isBanned && !nitesecFac.isMember && nitesecServer.manuallyHacked &&
!nitesecFac.alreadyInvited && this.hacking_skill >= 200 && homeComp.maxRam >= 32) { !nitesecFac.alreadyInvited && homeComp.maxRam >= 32) {
invitedFactions.push(nitesecFac); invitedFactions.push(nitesecFac);
} }
@ -2185,7 +2185,7 @@ export function checkForFactionInvitations() {
if (cybersecServer == null) { if (cybersecServer == null) {
console.error("Could not find CyberSec Server"); console.error("Could not find CyberSec Server");
} else if (!cybersecFac.isBanned && !cybersecFac.isMember && cybersecServer.manuallyHacked && } else if (!cybersecFac.isBanned && !cybersecFac.isMember && cybersecServer.manuallyHacked &&
!cybersecFac.alreadyInvited && this.hacking_skill >= 50) { !cybersecFac.alreadyInvited) {
invitedFactions.push(cybersecFac); invitedFactions.push(cybersecFac);
} }
@ -2306,3 +2306,12 @@ export function giveExploit(exploit) {
this.exploits.push(exploit); this.exploits.push(exploit);
} }
} }
export function getIntelligenceBonus(weight) {
// 15 => +1.4% when you initially acquire int
// 50 => +3.8% mid game
// 100 => +6.6% late game
// 250 => +13.4% realistic best possible
return 1+(weight*Math.pow(this.intelligence, 0.8)/600);
}

@ -533,7 +533,7 @@ export class Sleeve extends Person {
this.shock = Math.min(100, this.shock + (0.0002 * cyclesUsed)); this.shock = Math.min(100, this.shock + (0.0002 * cyclesUsed));
break; break;
case SleeveTaskType.Sync: case SleeveTaskType.Sync:
this.sync = Math.min(100, this.sync + (0.0002 * cyclesUsed)); this.sync = Math.min(100, this.sync + (p.getIntelligenceBonus(0.5) * 0.0002 * cyclesUsed));
break; break;
default: default:
break; break;

@ -39,6 +39,13 @@ import { removeChildrenFromElement } from "../../../utils/uiHelpers/removeChildr
import { removeElement } from "../../../utils/uiHelpers/removeElement"; import { removeElement } from "../../../utils/uiHelpers/removeElement";
import { removeElementById } from "../../../utils/uiHelpers/removeElementById"; import { removeElementById } from "../../../utils/uiHelpers/removeElementById";
import { EarningsTableElement } from "./ui/EarningsTableElement";
import { StatsElement } from "./ui/StatsElement";
import { MoreStatsContent } from "./ui/MoreStatsContent";
import { MoreEarningsContent } from "./ui/MoreEarningsContent";
import * as React from "react";
import * as ReactDOM from "react-dom";
// Object that keeps track of all DOM elements for the UI for a single Sleeve // Object that keeps track of all DOM elements for the UI for a single Sleeve
interface ISleeveUIElems { interface ISleeveUIElems {
container: HTMLElement | null; container: HTMLElement | null;
@ -94,10 +101,10 @@ export function createSleevesPage(p: IPlayer) {
UIElems.info = createElement("p", { UIElems.info = createElement("p", {
class: "sleeves-page-info", class: "sleeves-page-info",
innerHTML: "Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your " + innerHTML: "<h1>Sleeves</h1>Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your " +
"consciousness has been copied. In other words, these Synthoids contain " + "consciousness has been copied. In other words, these Synthoids contain " +
"a perfect duplicate of your mind.<br><br>" + "a perfect duplicate of your mind.<br /><br />" +
"Sleeves can be used to perform different tasks synchronously.<br><br>", "Sleeves can be used to perform different tasks synchronously.<br /><br />",
}); });
UIElems.faqButton = createElement("button", { UIElems.faqButton = createElement("button", {
@ -159,7 +166,7 @@ export function clearSleevesPage() {
} }
for (const prop in UIElems) { for (const prop in UIElems) {
(<any>UIElems)[prop] = null; (UIElems as any)[prop] = null;
} }
playerRef = null; playerRef = null;
@ -195,40 +202,12 @@ function createSleeveUi(sleeve: Sleeve, allSleeves: Sleeve[]): ISleeveUIElems {
}); });
elems.statsPanel = createElement("div", { class: "sleeve-panel", width: "25%" }); elems.statsPanel = createElement("div", { class: "sleeve-panel", width: "25%" });
elems.stats = createElement("p", { class: "sleeve-stats-text" }); elems.stats = createElement("div", { class: "sleeve-stats-text" });
elems.moreStatsButton = createElement("button", { elems.moreStatsButton = createElement("button", {
class: "std-button", class: "std-button",
innerText: "More Stats", innerText: "More Stats",
clickListener: () => { clickListener: () => {
dialogBoxCreate( dialogBoxCreate(MoreStatsContent(sleeve));
[
"<h2><u>Stats:</u></h2>",
`Hacking: ${sleeve.hacking_skill} (${numeralWrapper.formatBigNumber(sleeve.hacking_exp)} exp)`,
`Strength: ${sleeve.strength} (${numeralWrapper.formatBigNumber(sleeve.strength_exp)} exp)`,
`Defense: ${sleeve.defense} (${numeralWrapper.formatBigNumber(sleeve.defense_exp)} exp)`,
`Dexterity: ${sleeve.dexterity} (${numeralWrapper.formatBigNumber(sleeve.dexterity_exp)} exp)`,
`Agility: ${sleeve.agility} (${numeralWrapper.formatBigNumber(sleeve.agility_exp)} exp)`,
`Charisma: ${sleeve.charisma} (${numeralWrapper.formatBigNumber(sleeve.charisma_exp)} exp)<br>`,
"<h2><u>Multipliers:</u></h2>",
`Hacking Level multiplier: ${numeralWrapper.formatPercentage(sleeve.hacking_mult)}`,
`Hacking Experience multiplier: ${numeralWrapper.formatPercentage(sleeve.hacking_exp_mult)}`,
`Strength Level multiplier: ${numeralWrapper.formatPercentage(sleeve.strength_mult)}`,
`Strength Experience multiplier: ${numeralWrapper.formatPercentage(sleeve.strength_exp_mult)}`,
`Defense Level multiplier: ${numeralWrapper.formatPercentage(sleeve.defense_mult)}`,
`Defense Experience multiplier: ${numeralWrapper.formatPercentage(sleeve.defense_exp_mult)}`,
`Dexterity Level multiplier: ${numeralWrapper.formatPercentage(sleeve.dexterity_mult)}`,
`Dexterity Experience multiplier: ${numeralWrapper.formatPercentage(sleeve.dexterity_exp_mult)}`,
`Agility Level multiplier: ${numeralWrapper.formatPercentage(sleeve.agility_mult)}`,
`Agility Experience multiplier: ${numeralWrapper.formatPercentage(sleeve.agility_exp_mult)}`,
`Charisma Level multiplier: ${numeralWrapper.formatPercentage(sleeve.charisma_mult)}`,
`Charisma Experience multiplier: ${numeralWrapper.formatPercentage(sleeve.charisma_exp_mult)}`,
`Faction Reputation Gain multiplier: ${numeralWrapper.formatPercentage(sleeve.faction_rep_mult)}`,
`Company Reputation Gain multiplier: ${numeralWrapper.formatPercentage(sleeve.company_rep_mult)}`,
`Salary multiplier: ${numeralWrapper.formatPercentage(sleeve.work_money_mult)}`,
`Crime Money multiplier: ${numeralWrapper.formatPercentage(sleeve.crime_money_mult)}`,
`Crime Success multiplier: ${numeralWrapper.formatPercentage(sleeve.crime_success_mult)}`,
].join("<br>"), false
);
} }
}); });
elems.travelButton = createElement("button", { elems.travelButton = createElement("button", {
@ -257,7 +236,7 @@ function createSleeveUi(sleeve: Sleeve, allSleeves: Sleeve[]): ISleeveUIElems {
dialogBoxCreate("You cannot afford to have this sleeve travel to another city", false); dialogBoxCreate("You cannot afford to have this sleeve travel to another city", false);
return false; return false;
} }
sleeve.city = <CityName>cityName; sleeve.city = cityName as CityName;
playerRef!.loseMoney(CONSTANTS.TravelCost); playerRef!.loseMoney(CONSTANTS.TravelCost);
sleeve.resetTaskStatus(); sleeve.resetTaskStatus();
removeElementById(popupId); removeElementById(popupId);
@ -323,39 +302,12 @@ function createSleeveUi(sleeve: Sleeve, allSleeves: Sleeve[]): ISleeveUIElems {
elems.taskPanel.appendChild(elems.taskProgressBar); elems.taskPanel.appendChild(elems.taskProgressBar);
elems.earningsPanel = createElement("div", { class: "sleeve-panel", width: "35%" }); elems.earningsPanel = createElement("div", { class: "sleeve-panel", width: "35%" });
elems.currentEarningsInfo = createElement("p"); elems.currentEarningsInfo = createElement("div");
elems.totalEarningsButton = createElement("button", { elems.totalEarningsButton = createElement("button", {
class: "std-button", class: "std-button",
innerText: "More Earnings Info", innerText: "More Earnings Info",
clickListener: () => { clickListener: () => {
dialogBoxCreate( dialogBoxCreate(MoreEarningsContent(sleeve));
[
"<h2><u>Earnings for Current Task:</u></h2>",
`Money: ${numeralWrapper.formatMoney(sleeve.earningsForTask.money)}`,
`Hacking Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForTask.hack)}`,
`Strength Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForTask.str)}`,
`Defense Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForTask.def)}`,
`Dexterity Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForTask.dex)}`,
`Agility Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForTask.agi)}`,
`Charisma Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForTask.cha)}<br>`,
"<h2><u>Total Earnings for Host Consciousness:</u></h2>",
`Money: ${numeralWrapper.formatMoney(sleeve.earningsForPlayer.money)}`,
`Hacking Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.hack)}`,
`Strength Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.str)}`,
`Defense Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.def)}`,
`Dexterity Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.dex)}`,
`Agility Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.agi)}`,
`Charisma Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.cha)}<br>`,
"<h2><u>Total Earnings for Other Sleeves:</u></h2>",
`Money: ${numeralWrapper.formatMoney(sleeve.earningsForSleeves.money)}`,
`Hacking Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.hack)}`,
`Strength Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.str)}`,
`Defense Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.def)}`,
`Dexterity Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.dex)}`,
`Agility Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.agi)}`,
`Charisma Exp: ${numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.cha)}`,
].join("<br>"), false
);
} }
}); });
@ -375,53 +327,40 @@ function createSleeveUi(sleeve: Sleeve, allSleeves: Sleeve[]): ISleeveUIElems {
function updateSleeveUi(sleeve: Sleeve, elems: ISleeveUIElems) { function updateSleeveUi(sleeve: Sleeve, elems: ISleeveUIElems) {
if (!routing.isOn(Page.Sleeves)) { return; } if (!routing.isOn(Page.Sleeves)) { return; }
elems.stats!.innerHTML = [`Hacking: ${numeralWrapper.format(sleeve.hacking_skill, "0,0")}`, ReactDOM.render(StatsElement(sleeve), elems.stats!);
`Strength: ${numeralWrapper.format(sleeve.strength, "0,0")}`,
`Defense: ${numeralWrapper.format(sleeve.defense, "0,0")}`,
`Dexterity: ${numeralWrapper.format(sleeve.dexterity, "0,0")}`,
`Agility: ${numeralWrapper.format(sleeve.agility, "0,0")}`,
`Charisma: ${numeralWrapper.format(sleeve.charisma, "0,0")}`,
`HP: ${numeralWrapper.format(sleeve.hp, "0,0")} / ${numeralWrapper.format(sleeve.max_hp, "0,0")}`,
`City: ${sleeve.city}`,
`Shock: ${numeralWrapper.format(100 - sleeve.shock, "0,0.000")}`,
`Sync: ${numeralWrapper.format(sleeve.sync, "0,0.000")}`,
`Memory: ${numeralWrapper.format(sleeve.memory, "0")}`].join("<br>");
let repGainText: string = "";
if (sleeve.currentTask === SleeveTaskType.Company || sleeve.currentTask === SleeveTaskType.Faction) {
const repGain: number = sleeve.getRepGain(playerRef!);
repGainText = `Reputation: ${numeralWrapper.format(5 * repGain, "0.00")} / s`
}
if (sleeve.currentTask === SleeveTaskType.Crime) { if (sleeve.currentTask === SleeveTaskType.Crime) {
elems.currentEarningsInfo!.innerHTML = [ const data = [
`Earnings (Pre-Synchronization):`, [`Money`, numeralWrapper.formatMoney(parseFloat(sleeve.currentTaskLocation)), `(on success)`],
`Money: ${numeralWrapper.formatMoney(parseFloat(sleeve.currentTaskLocation))} if successful`, [`Hacking Exp`, numeralWrapper.format(sleeve.gainRatesForTask.hack, "0.00"), `(2x on success)`],
`Hacking Exp: ${numeralWrapper.format(sleeve.gainRatesForTask.hack, "0.00")} (2x if successful)`, [`Strength Exp`, numeralWrapper.format(sleeve.gainRatesForTask.str, "0.00"), `(2x on success)`],
`Strength Exp: ${numeralWrapper.format(sleeve.gainRatesForTask.str, "0.00")} (2x if successful)`, [`Defense Exp`, numeralWrapper.format(sleeve.gainRatesForTask.def, "0.00"), `(2x on success)`],
`Defense Exp: ${numeralWrapper.format(sleeve.gainRatesForTask.def, "0.00")} (2x if successful)`, [`Dexterity Exp`, numeralWrapper.format(sleeve.gainRatesForTask.dex, "0.00"), `(2x on success)`],
`Dexterity Exp: ${numeralWrapper.format(sleeve.gainRatesForTask.dex, "0.00")} (2x if successful)`, [`Agility Exp`, numeralWrapper.format(sleeve.gainRatesForTask.agi, "0.00"), `(2x on success)`],
`Agility Exp: ${numeralWrapper.format(sleeve.gainRatesForTask.agi, "0.00")} (2x if successful)`, [`Charisma Exp`, numeralWrapper.format(sleeve.gainRatesForTask.cha, "0.00"), `(2x on success)`]
`Charisma Exp: ${numeralWrapper.format(sleeve.gainRatesForTask.cha, "0.00")} (2x if successful)` ];
].join("<br>"); ReactDOM.render(EarningsTableElement('Earnings (Pre-Synchronization)', data), elems.currentEarningsInfo!)
elems.taskProgressBar!.innerText = createProgressBarText({ elems.taskProgressBar!.innerText = createProgressBarText({
progress: sleeve.currentTaskTime / sleeve.currentTaskMaxTime, progress: sleeve.currentTaskTime / sleeve.currentTaskMaxTime,
totalTicks: 25, totalTicks: 25,
}); });
} else { } else {
const lines = [ const data = [
`Earnings (Pre-Synchronization):`, [`Money:`, `${numeralWrapper.formatMoney(5 * sleeve.gainRatesForTask.money)} / s`],
`Money: ${numeralWrapper.formatMoney(5 * sleeve.gainRatesForTask.money)} / s`, [`Hacking Exp:`, `${numeralWrapper.format(5 * sleeve.gainRatesForTask.hack, "0.00")} / s`],
`Hacking Exp: ${numeralWrapper.format(5 * sleeve.gainRatesForTask.hack, "0.00")} / s`, [`Strength Exp:`, `${numeralWrapper.format(5 * sleeve.gainRatesForTask.str, "0.00")} / s`],
`Strength Exp: ${numeralWrapper.format(5 * sleeve.gainRatesForTask.str, "0.00")} / s`, [`Defense Exp:`, `${numeralWrapper.format(5 * sleeve.gainRatesForTask.def, "0.00")} / s`],
`Defense Exp: ${numeralWrapper.format(5 * sleeve.gainRatesForTask.def, "0.00")} / s`, [`Dexterity Exp:`, `${numeralWrapper.format(5 * sleeve.gainRatesForTask.dex, "0.00")} / s`],
`Dexterity Exp: ${numeralWrapper.format(5 * sleeve.gainRatesForTask.dex, "0.00")} / s`, [`Agility Exp:`, `${numeralWrapper.format(5 * sleeve.gainRatesForTask.agi, "0.00")} / s`],
`Agility Exp: ${numeralWrapper.format(5 * sleeve.gainRatesForTask.agi, "0.00")} / s`, [`Charisma Exp:`, `${numeralWrapper.format(5 * sleeve.gainRatesForTask.cha, "0.00")} / s`]
`Charisma Exp: ${numeralWrapper.format(5 * sleeve.gainRatesForTask.cha, "0.00")} / s`
]; ];
if (repGainText !== "") { lines.push(repGainText); } let repGainText: string = "";
elems.currentEarningsInfo!.innerHTML = lines.join("<br>"); if (sleeve.currentTask === SleeveTaskType.Company || sleeve.currentTask === SleeveTaskType.Faction) {
const repGain: number = sleeve.getRepGain(playerRef!);
data.push([`Reputation:`, `${numeralWrapper.format(5 * repGain, "0.00")} / s`]);
}
ReactDOM.render(EarningsTableElement('Earnings (Pre-Synchronization)', data), elems.currentEarningsInfo!)
elems.taskProgressBar!.innerText = ""; elems.taskProgressBar!.innerText = "";
} }

@ -1,57 +0,0 @@
export const SleeveFaq: string =
[
"<strong><u>How do Duplicate Sleeves work?</strong></u><br>",
"Duplicate Sleeves are essentially clones. You can use them to perform any work type",
"action, such as working for a company/faction or committing a crime.",
"Having sleeves perform these tasks earns you money, experience, and reputation.<br><br>",
"Sleeves are their own individuals, which means they each have their own",
"experience and stats.<br><br>",
"When a sleeve earns experience, it earns experience for itself, the player's",
"original 'consciousness', as well as all of the player's other sleeves.<br><br>",
"<strong><u>What is Synchronization (Sync)?</strong></u><br>",
"Synchronization is a measure of how aligned your consciousness is with",
"that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and",
"it affects how much experience is earned when the sleeve is performing a task.<br><br>",
"Let N be the sleeve's synchronization. When the sleeve earns experience by performing a",
"task, both the sleeve and the player's original host consciousness earn N%",
"of the amount of experience normally earned by the task. All of the player's",
"other sleeves earn ((N/100)^2 * 100)% of the experience.<br><br>",
"Synchronization can be increased by assigning sleeves to the 'Synchronize' task.<br><br>",
"<strong><u>What is Shock?</u></strong><br>",
"Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new",
"body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates",
"no shock. Shock affects the amount of experience earned by the sleeve.<br><br>",
"Sleeve shock slowly decreases over time. You can further increase the rate at which",
"it decreases by assigning sleeves to the 'Shock Recovery' task.<br><br>",
"<strong><u>Why can't I work for this company or faction?</u></strong><br>",
"Only one of your sleeves can work for a given company/faction a time.",
"To clarify further, if you have two sleeves they can work for two different",
"companies, but they cannot both work for the same company.<br><br>",
"<strong><u>Why did my Sleeve stop working?</u></strong><br>",
"Sleeves are subject to the same time restrictions as you. This means that",
"they automatically stop working at a company after 8 hours, and stop working",
"for a faction after 20 hours.<br><br>",
"<strong><u>How do I buy Augmentations for my Sleeves?</u></strong><br>",
"Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations",
"for it.<br><br>",
"<strong><u>Why can't I buy the X Augmentation for my sleeve?</u></strong><br>",
"Certain Augmentations, like Bladeburner-specific ones and NeuroFlux Governor,",
"are not available for sleeves.<br><br>",
"<strong><u>Do sleeves get reset when installing Augmentations or switching BitNodes?</u></strong><br>",
"Sleeves are reset when switching BitNodes, but not when installing Augmentations.<br><br>",
"<strong><u>What is Memory?</u></strong><br>",
"Sleeve memory dictates what a sleeve's synchronization will be",
"when its reset by switching BitNodes. For example, if a sleeve has a memory of 25,",
"then when you switch BitNodes its synchronization will initially be set to 25, rather than 1.<br><br>",
"Memory can only be increased by purchasing upgrades from The Covenant. It is a",
"persistent stat, meaning it never gets resets back to 1. The maximum possible",
"value for a sleeve's memory is 100."
].join(" ");

@ -0,0 +1,80 @@
import * as React from "react";
export const SleeveFaq = (<>
<strong><u>How do Duplicate Sleeves work?</u></strong>
<br />
Duplicate Sleeves are essentially clones. You can use them to perform any work type
action, such as working for a company/faction or committing a crime.
Having sleeves perform these tasks earns you money, experience, and reputation.
<br /><br />
Sleeves are their own individuals, which means they each have their own
experience and stats.
<br /><br />
When a sleeve earns experience, it earns experience for itself, the player's
original 'consciousness', as well as all of the player's other sleeves.
<br /><br />
<strong><u>What is Synchronization (Sync)?</u></strong>
<br />
Synchronization is a measure of how aligned your consciousness is with
that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and
it affects how much experience is earned when the sleeve is performing a task.
<br /><br />
Let N be the sleeve's synchronization. When the sleeve earns experience by performing a
task, both the sleeve and the player's original host consciousness earn N%
of the amount of experience normally earned by the task. All of the player's
other sleeves earn ((N/100)^2 * 100)% of the experience.
<br /><br />
Synchronization can be increased by assigning sleeves to the 'Synchronize' task.
<br /><br />
<strong><u>What is Shock?</u></strong>
<br />
Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new
body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates
no shock. Shock affects the amount of experience earned by the sleeve.
<br /><br />
Sleeve shock slowly decreases over time. You can further increase the rate at which
it decreases by assigning sleeves to the 'Shock Recovery' task.
<br /><br />
<strong><u>Why can't I work for this company or faction?</u></strong>
<br />
Only one of your sleeves can work for a given company/faction a time.
To clarify further, if you have two sleeves they can work for two different
companies, but they cannot both work for the same company.
<br /><br />
<strong><u>Why did my Sleeve stop working?</u></strong>
<br />
Sleeves are subject to the same time restrictions as you. This means that
they automatically stop working at a company after 8 hours, and stop working
for a faction after 20 hours.
<br /><br />
<strong><u>How do I buy Augmentations for my Sleeves?</u></strong>
<br />
Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations
for it.
<br /><br />
<strong><u>Why can't I buy the X Augmentation for my sleeve?</u></strong>
<br />
Certain Augmentations, like Bladeburner-specific ones and NeuroFlux Governor,
are not available for sleeves.
<br /><br />
<strong><u>Do sleeves get reset when installing Augmentations or switching BitNodes?</u></strong><br />
Sleeves are reset when switching BitNodes, but not when installing Augmentations.
<br /><br />
<strong><u>What is Memory?</u></strong>
<br />
Sleeve memory dictates what a sleeve's synchronization will be
when its reset by switching BitNodes. For example, if a sleeve has a memory of 25,
then when you switch BitNodes its synchronization will initially be set to 25, rather than 1.
<br /><br />
Memory can only be increased by purchasing upgrades from The Covenant. It is a
persistent stat, meaning it never gets resets back to 1. The maximum possible
value for a sleeve's memory is 100.
</>);

@ -0,0 +1,20 @@
import * as React from "react";
export function EarningsTableElement(title: string, stats: any[][]): React.ReactElement {
return (<>
<pre>{title}</pre>
<table>
<tbody>
{stats.map((stat: any[], i: number) => <tr key={i}>
{stat.map((s: any, i: number) => {
let style = {};
if(i !== 0) {
style = {textAlign: "right"};
}
return <td style={style} key={i}>{s}</td>
})}
</tr>)}
</tbody>
</table>
</>)
}

@ -0,0 +1,41 @@
import { Sleeve } from "../Sleeve";
import { numeralWrapper } from "../../../ui/numeralFormat";
import * as React from "react";
import { StatsTable } from "../../../ui/React/StatsTable";
export function MoreEarningsContent(sleeve: Sleeve): React.ReactElement {
let style = {}
style = {textAlign: 'right'};
return (<>
{StatsTable([
['Money ', numeralWrapper.formatMoney(sleeve.earningsForTask.money)],
['Hacking Exp ', numeralWrapper.formatBigNumber(sleeve.earningsForTask.hack)],
['Strength Exp ', numeralWrapper.formatBigNumber(sleeve.earningsForTask.str)],
['Defense Exp ', numeralWrapper.formatBigNumber(sleeve.earningsForTask.def)],
['Dexterity Exp ', numeralWrapper.formatBigNumber(sleeve.earningsForTask.dex)],
['Agility Exp ', numeralWrapper.formatBigNumber(sleeve.earningsForTask.agi)],
['Charisma Exp ', numeralWrapper.formatBigNumber(sleeve.earningsForTask.cha)],
], 'Earnings for Current Task:')}
<br />
{StatsTable([
['Money: ', numeralWrapper.formatMoney(sleeve.earningsForPlayer.money)],
['Hacking Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.hack)],
['Strength Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.str)],
['Defense Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.def)],
['Dexterity Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.dex)],
['Agility Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.agi)],
['Charisma Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForPlayer.cha)],
], 'Total Earnings for Host Consciousness:')}
<br />
{StatsTable([
['Money: ', numeralWrapper.formatMoney(sleeve.earningsForSleeves.money)],
['Hacking Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.hack)],
['Strength Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.str)],
['Defense Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.def)],
['Dexterity Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.dex)],
['Agility Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.agi)],
['Charisma Exp: ', numeralWrapper.formatBigNumber(sleeve.earningsForSleeves.cha)],
], 'Total Earnings for Other Sleeves:')}
<br />
</>);
}

@ -0,0 +1,39 @@
import { Sleeve } from "../Sleeve";
import { numeralWrapper } from "../../../ui/numeralFormat";
import { StatsTable } from "../../../ui/React/StatsTable";
import * as React from "react";
export function MoreStatsContent(sleeve: Sleeve): React.ReactElement {
let style = {}
style = {textAlign: 'right'};
return (<>
{StatsTable([
['Hacking: ', sleeve.hacking_skill, `(${numeralWrapper.formatBigNumber(sleeve.hacking_exp)} exp)`],
['Strength: ', sleeve.strength, `(${numeralWrapper.formatBigNumber(sleeve.strength_exp)} exp)`],
['Defense: ', sleeve.defense, `(${numeralWrapper.formatBigNumber(sleeve.defense_exp)} exp)`],
['Dexterity: ', sleeve.dexterity, `(${numeralWrapper.formatBigNumber(sleeve.dexterity_exp)} exp)`],
['Agility: ', sleeve.agility, `(${numeralWrapper.formatBigNumber(sleeve.agility_exp)} exp)`],
['Charisma: ', sleeve.charisma, `(${numeralWrapper.formatBigNumber(sleeve.charisma_exp)} exp)`],
], 'Stats:')}
<br />
{StatsTable([
['Hacking Level multiplier: ', numeralWrapper.formatPercentage(sleeve.hacking_mult)],
['Hacking Experience multiplier: ', numeralWrapper.formatPercentage(sleeve.hacking_exp_mult)],
['Strength Level multiplier: ', numeralWrapper.formatPercentage(sleeve.strength_mult)],
['Strength Experience multiplier: ', numeralWrapper.formatPercentage(sleeve.strength_exp_mult)],
['Defense Level multiplier: ', numeralWrapper.formatPercentage(sleeve.defense_mult)],
['Defense Experience multiplier: ', numeralWrapper.formatPercentage(sleeve.defense_exp_mult)],
['Dexterity Level multiplier: ', numeralWrapper.formatPercentage(sleeve.dexterity_mult)],
['Dexterity Experience multiplier: ', numeralWrapper.formatPercentage(sleeve.dexterity_exp_mult)],
['Agility Level multiplier: ', numeralWrapper.formatPercentage(sleeve.agility_mult)],
['Agility Experience multiplier: ', numeralWrapper.formatPercentage(sleeve.agility_exp_mult)],
['Charisma Level multiplier: ', numeralWrapper.formatPercentage(sleeve.charisma_mult)],
['Charisma Experience multiplier: ', numeralWrapper.formatPercentage(sleeve.charisma_exp_mult)],
['Faction Reputation Gain multiplier: ', numeralWrapper.formatPercentage(sleeve.faction_rep_mult)],
['Company Reputation Gain multiplier: ', numeralWrapper.formatPercentage(sleeve.company_rep_mult)],
['Salary multiplier: ', numeralWrapper.formatPercentage(sleeve.work_money_mult)],
['Crime Money multiplier: ', numeralWrapper.formatPercentage(sleeve.crime_money_mult)],
['Crime Success multiplier: ', numeralWrapper.formatPercentage(sleeve.crime_success_mult)],
], 'Multipliers:')}
</>);
}

@ -0,0 +1,58 @@
import { Sleeve } from "../Sleeve";
import { numeralWrapper } from "../../../ui/numeralFormat";
import * as React from "react";
export function StatsElement(sleeve: Sleeve): React.ReactElement {
let style = {};
style = { textAlign: "right" };
return (<>
<table>
<tbody>
<tr>
<td className="character-hp-cell">HP: </td>
<td className="character-hp-cell" style={style}>{numeralWrapper.format(sleeve.hp, "0,0")} / {numeralWrapper.format(sleeve.max_hp, "0,0")}</td>
</tr>
<tr>
<td>City: </td>
<td style={style}>{sleeve.city}</td>
</tr>
<tr>
<td className="character-hack-cell">Hacking: </td>
<td className="character-hack-cell" style={style}>{numeralWrapper.format(sleeve.hacking_skill, "0,0")}</td>
</tr>
<tr>
<td className="character-combat-cell">Strength: </td>
<td className="character-combat-cell" style={style}>{numeralWrapper.format(sleeve.strength, "0,0")}</td>
</tr>
<tr>
<td className="character-combat-cell">Defense: </td>
<td className="character-combat-cell" style={style}>{numeralWrapper.format(sleeve.defense, "0,0")}</td>
</tr>
<tr>
<td className="character-combat-cell">Dexterity: </td>
<td className="character-combat-cell" style={style}>{numeralWrapper.format(sleeve.dexterity, "0,0")}</td>
</tr>
<tr>
<td className="character-combat-cell">Agility: </td>
<td className="character-combat-cell" style={style}>{numeralWrapper.format(sleeve.agility, "0,0")}</td>
</tr>
<tr>
<td className="character-cha-cell">Charisma: </td>
<td className="character-cha-cell" style={style}>{numeralWrapper.format(sleeve.charisma, "0,0")}</td>
</tr>
<tr>
<td className="character-int-cell">Shock: </td>
<td className="character-int-cell" style={style}>{numeralWrapper.format(100 - sleeve.shock, "0,0.000")}</td>
</tr>
<tr>
<td className="character-int-cell">Sync: </td>
<td className="character-int-cell" style={style}>{numeralWrapper.format(sleeve.sync, "0,0.000")}</td>
</tr>
<tr>
<td className="character-int-cell">Memory: </td>
<td className="character-int-cell" style={style}>{numeralWrapper.format(sleeve.memory, "0")}</td>
</tr>
</tbody>
</table>
</>)
}

@ -21,6 +21,7 @@ import { initMessages, Messages } from "./Message/MessageHelpers";
import { prestigeWorkerScripts } from "./NetscriptWorker"; import { prestigeWorkerScripts } from "./NetscriptWorker";
import { Player } from "./Player"; import { Player } from "./Player";
import { resetPidCounter } from "./Netscript/Pid"; import { resetPidCounter } from "./Netscript/Pid";
import { LiteratureNames } from "./Literature/data/LiteratureNames"
import { import {
AllServers, AllServers,
@ -36,7 +37,6 @@ import {
} from "./SourceFile/SourceFileFlags"; } from "./SourceFile/SourceFileFlags";
import { import {
SpecialServerIps, SpecialServerIps,
SpecialServerIpsMap,
prestigeSpecialServerIps, prestigeSpecialServerIps,
SpecialServerNames SpecialServerNames
} from "./Server/SpecialServerIps"; } from "./Server/SpecialServerIps";
@ -257,7 +257,7 @@ function prestigeSourceFile() {
// BitNode 3: Corporatocracy // BitNode 3: Corporatocracy
if (Player.bitNodeN === 3) { if (Player.bitNodeN === 3) {
homeComp.messages.push("corporation-management-handbook.lit"); homeComp.messages.push(LiteratureNames.CorporationManagementHandbook);
dialogBoxCreate("You received a copy of the Corporation Management Handbook on your home computer. " + dialogBoxCreate("You received a copy of the Corporation Management Handbook on your home computer. " +
"Read it if you need help getting started with Corporations!"); "Read it if you need help getting started with Corporations!");
} }
@ -348,7 +348,7 @@ function prestigeSourceFile() {
document.getElementById("world-menu-header").click(); document.getElementById("world-menu-header").click();
// Gain int exp // Gain int exp
Player.gainIntelligenceExp(5); Player.gainIntelligenceExp(300);
resetPidCounter(); resetPidCounter();
} }

@ -298,9 +298,9 @@ function createBitNodeYesNoEventListener(newBitNode, destroyedBitNode, flume=fal
if (!flume) { if (!flume) {
giveSourceFile(destroyedBitNode); giveSourceFile(destroyedBitNode);
} else { } else {
// If player used flume, subtract 5 int exp. The prestigeSourceFile() // If player used flume, subtract 300 int exp. The prestigeSourceFile()
// function below grants 5 int exp, so this allows sets net gain to 0 // function below grants 300 int exp, so this allows sets net gain to 0
Player.gainIntelligenceExp(-5); Player.gainIntelligenceExp(-300);
} }
redPillFlag = false; redPillFlag = false;
var container = document.getElementById("red-pill-content"); var container = document.getElementById("red-pill-content");

@ -10,6 +10,7 @@ import { CONSTANTS } from "../Constants";
import { HacknetServer } from "../Hacknet/HacknetServer"; import { HacknetServer } from "../Hacknet/HacknetServer";
import { IPlayer } from "../PersonObjects/IPlayer"; import { IPlayer } from "../PersonObjects/IPlayer";
import { Programs } from "../Programs/Programs"; import { Programs } from "../Programs/Programs";
import { LiteratureNames } from "../Literature/data/LiteratureNames";
import { isValidNumber } from "../utils/helpers/isValidNumber"; import { isValidNumber } from "../utils/helpers/isValidNumber";
import { isValidIPAddress } from "../../utils/helpers/isValidIPAddress"; import { isValidIPAddress } from "../../utils/helpers/isValidIPAddress";
@ -118,7 +119,7 @@ export function prestigeHomeComputer(homeComp: Server) {
}); });
homeComp.messages.length = 0; //Remove .lit and .msg files homeComp.messages.length = 0; //Remove .lit and .msg files
homeComp.messages.push("hackers-starting-handbook.lit"); homeComp.messages.push(LiteratureNames.HackersStartingHandbook);
} }
//Returns server object with corresponding hostname //Returns server object with corresponding hostname

@ -29,6 +29,10 @@ export class SpecialServerIpsMap {
this[name] = ip; this[name] = ip;
} }
getIp(name: string): string {
return this[name] as string;
}
// Serialize the current object to a JSON save state // Serialize the current object to a JSON save state
toJSON(): any { toJSON(): any {
return Generic_toJSON("SpecialServerIpsMap", this); return Generic_toJSON("SpecialServerIpsMap", this);

@ -3,6 +3,7 @@
// This could actually be a JSON file as it should be constant metadata to be imported... // This could actually be a JSON file as it should be constant metadata to be imported...
import { IMinMaxRange } from "../../types"; import { IMinMaxRange } from "../../types";
import { LocationName } from "../../Locations/data/LocationNames"; import { LocationName } from "../../Locations/data/LocationNames";
import { LiteratureNames } from "../../Literature/data/LiteratureNames";
/** /**
* The metadata describing the base state of servers on the network. * The metadata describing the base state of servers on the network.
@ -134,7 +135,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 88, min: 88,
}, },
hostname: "blade", hostname: "blade",
literature: ["beyond-man.lit"], literature: [LiteratureNames.BeyondMan],
maxRamExponent: { maxRamExponent: {
max: 9, max: 9,
min: 5, min: 5,
@ -158,7 +159,7 @@ export const serverMetadata: IServerMetadata[] = [
{ {
hackDifficulty: 99, hackDifficulty: 99,
hostname: "nwo", hostname: "nwo",
literature: ["the-hidden-world.lit"], literature: [LiteratureNames.TheHiddenWorld],
moneyAvailable: { moneyAvailable: {
max: 40e9, max: 40e9,
min: 20e9, min: 20e9,
@ -182,8 +183,8 @@ export const serverMetadata: IServerMetadata[] = [
}, },
hostname: "clarkinc", hostname: "clarkinc",
literature: [ literature: [
"beyond-man.lit", LiteratureNames.BeyondMan,
"cost-of-immortality.lit", LiteratureNames.CostOfImmortality,
], ],
moneyAvailable: { moneyAvailable: {
max: 25e9, max: 25e9,
@ -208,8 +209,8 @@ export const serverMetadata: IServerMetadata[] = [
}, },
hostname: "omnitek", hostname: "omnitek",
literature: [ literature: [
"coded-intelligence.lit", LiteratureNames.CodedIntelligence,
"history-of-synthoids.lit", LiteratureNames.HistoryOfSynthoids,
], ],
maxRamExponent: { maxRamExponent: {
max: 9, max: 9,
@ -281,7 +282,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 83, min: 83,
}, },
hostname: "fulcrumtech", hostname: "fulcrumtech",
literature: ["simulated-reality.lit"], literature: [LiteratureNames.SimulatedReality],
maxRamExponent: { maxRamExponent: {
max: 11, max: 11,
min: 7, min: 7,
@ -388,7 +389,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 85, min: 85,
}, },
hostname: "helios", hostname: "helios",
literature: ["beyond-man.lit"], literature: [LiteratureNames.BeyondMan],
maxRamExponent: { maxRamExponent: {
max: 8, max: 8,
min: 5, min: 5,
@ -415,7 +416,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 80, min: 80,
}, },
hostname: "vitalife", hostname: "vitalife",
literature: ["A-Green-Tomorrow.lit"], literature: [LiteratureNames.AGreenTomorrow],
maxRamExponent: { maxRamExponent: {
max: 7, max: 7,
min: 4, min: 4,
@ -490,7 +491,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 70, min: 70,
}, },
hostname: "titan-labs", hostname: "titan-labs",
literature: ["coded-intelligence.lit"], literature: [LiteratureNames.CodedIntelligence],
maxRamExponent: { maxRamExponent: {
max: 7, max: 7,
min: 4, min: 4,
@ -517,7 +518,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 65, min: 65,
}, },
hostname: "microdyne", hostname: "microdyne",
literature: ["synthetic-muscles.lit"], literature: [LiteratureNames.SyntheticMuscles],
maxRamExponent: { maxRamExponent: {
max: 6, max: 6,
min: 4, min: 4,
@ -545,8 +546,8 @@ export const serverMetadata: IServerMetadata[] = [
}, },
hostname: "taiyang-digital", hostname: "taiyang-digital",
literature: [ literature: [
"A-Green-Tomorrow.lit", LiteratureNames.AGreenTomorrow,
"brighter-than-the-sun.lit", LiteratureNames.BrighterThanTheSun,
], ],
moneyAvailable: { moneyAvailable: {
max: 900000000, max: 900000000,
@ -592,7 +593,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 80, min: 80,
}, },
hostname: "aerocorp", hostname: "aerocorp",
literature: ["man-and-machine.lit"], literature: [LiteratureNames.ManAndMachine],
moneyAvailable: { moneyAvailable: {
max: 1200000000, max: 1200000000,
min: 1000000000, min: 1000000000,
@ -615,7 +616,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 85, min: 85,
}, },
hostname: "omnia", hostname: "omnia",
literature: ["history-of-synthoids.lit"], literature: [LiteratureNames.HistoryOfSynthoids],
maxRamExponent: { maxRamExponent: {
max: 6, max: 6,
min: 4, min: 4,
@ -642,7 +643,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 55, min: 55,
}, },
hostname: "zb-def", hostname: "zb-def",
literature: ["synthetic-muscles.lit"], literature: [LiteratureNames.SyntheticMuscles],
moneyAvailable: { moneyAvailable: {
max: 1100000000, max: 1100000000,
min: 900000000, min: 900000000,
@ -688,8 +689,8 @@ export const serverMetadata: IServerMetadata[] = [
}, },
hostname: "solaris", hostname: "solaris",
literature: [ literature: [
"A-Green-Tomorrow.lit", LiteratureNames.AGreenTomorrow,
"the-failed-frontier.lit", LiteratureNames.TheFailedFrontier,
], ],
maxRamExponent: { maxRamExponent: {
max: 7, max: 7,
@ -739,7 +740,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 75, min: 75,
}, },
hostname: "global-pharm", hostname: "global-pharm",
literature: ["A-Green-Tomorrow.lit"], literature: [LiteratureNames.AGreenTomorrow],
maxRamExponent: { maxRamExponent: {
max: 6, max: 6,
min: 3, min: 3,
@ -888,7 +889,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 50, min: 50,
}, },
hostname: "alpha-ent", hostname: "alpha-ent",
literature: ["sector-12-crime.lit"], literature: [LiteratureNames.Sector12Crime],
maxRamExponent: { maxRamExponent: {
max: 7, max: 7,
min: 4, min: 4,
@ -942,9 +943,9 @@ export const serverMetadata: IServerMetadata[] = [
}, },
hostname: "rothman-uni", hostname: "rothman-uni",
literature: [ literature: [
"secret-societies.lit", LiteratureNames.SecretSocieties,
"the-failed-frontier.lit", LiteratureNames.TheFailedFrontier,
"tensions-in-tech-race.lit", LiteratureNames.TensionsInTechRace,
], ],
maxRamExponent: { maxRamExponent: {
max: 7, max: 7,
@ -999,9 +1000,9 @@ export const serverMetadata: IServerMetadata[] = [
}, },
hostname: "summit-uni", hostname: "summit-uni",
literature: [ literature: [
"secret-societies.lit", LiteratureNames.SecretSocieties,
"the-failed-frontier.lit", LiteratureNames.TheFailedFrontier,
"synthetic-muscles.lit", LiteratureNames.SyntheticMuscles,
], ],
maxRamExponent: { maxRamExponent: {
max: 6, max: 6,
@ -1051,7 +1052,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 60, min: 60,
}, },
hostname: "catalyst", hostname: "catalyst",
literature: ["tensions-in-tech-race.lit"], literature: [LiteratureNames.TensionsInTechRace],
maxRamExponent: { maxRamExponent: {
max: 7, max: 7,
min: 4, min: 4,
@ -1104,7 +1105,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 55, min: 55,
}, },
hostname: "comptek", hostname: "comptek",
literature: ["man-and-machine.lit"], literature: [LiteratureNames.ManAndMachine],
moneyAvailable: { moneyAvailable: {
max: 250000000, max: 250000000,
min: 220000000, min: 220000000,
@ -1127,7 +1128,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 60, min: 60,
}, },
hostname: "netlink", hostname: "netlink",
literature: ["simulated-reality.lit"], literature: [LiteratureNames.SimulatedReality],
maxRamExponent: { maxRamExponent: {
max: 7, max: 7,
min: 4, min: 4,
@ -1170,7 +1171,7 @@ export const serverMetadata: IServerMetadata[] = [
{ {
hackDifficulty: 10, hackDifficulty: 10,
hostname: "foodnstuff", hostname: "foodnstuff",
literature: ["sector-12-crime.lit"], literature: [LiteratureNames.Sector12Crime],
maxRamExponent: 4, maxRamExponent: 4,
moneyAvailable: 2000000, moneyAvailable: 2000000,
networkLayer: 1, networkLayer: 1,
@ -1226,7 +1227,7 @@ export const serverMetadata: IServerMetadata[] = [
{ {
hackDifficulty: 25, hackDifficulty: 25,
hostname: "neo-net", hostname: "neo-net",
literature: ["the-hidden-world.lit"], literature: [LiteratureNames.TheHiddenWorld],
maxRamExponent: 5, maxRamExponent: 5,
moneyAvailable: 5000000, moneyAvailable: 5000000,
networkLayer: 3, networkLayer: 3,
@ -1238,7 +1239,7 @@ export const serverMetadata: IServerMetadata[] = [
{ {
hackDifficulty: 30, hackDifficulty: 30,
hostname: "silver-helix", hostname: "silver-helix",
literature: ["new-triads.lit"], literature: [LiteratureNames.NewTriads],
maxRamExponent: 6, maxRamExponent: 6,
moneyAvailable: 45000000, moneyAvailable: 45000000,
networkLayer: 3, networkLayer: 3,
@ -1250,7 +1251,7 @@ export const serverMetadata: IServerMetadata[] = [
{ {
hackDifficulty: 15, hackDifficulty: 15,
hostname: "hong-fang-tea", hostname: "hong-fang-tea",
literature: ["brighter-than-the-sun.lit"], literature: [LiteratureNames.BrighterThanTheSun],
maxRamExponent: 4, maxRamExponent: 4,
moneyAvailable: 3000000, moneyAvailable: 3000000,
networkLayer: 1, networkLayer: 1,
@ -1298,7 +1299,7 @@ export const serverMetadata: IServerMetadata[] = [
min: 25, min: 25,
}, },
hostname: "omega-net", hostname: "omega-net",
literature: ["the-new-god.lit"], literature: [LiteratureNames.TheNewGod],
maxRamExponent: 5, maxRamExponent: 5,
moneyAvailable: { moneyAvailable: {
max: 70000000, max: 70000000,
@ -1418,8 +1419,8 @@ export const serverMetadata: IServerMetadata[] = [
hackDifficulty: 0, hackDifficulty: 0,
hostname: "run4theh111z", hostname: "run4theh111z",
literature: [ literature: [
"simulated-reality.lit", LiteratureNames.SimulatedReality,
"the-new-god.lit", LiteratureNames.TheNewGod,
], ],
maxRamExponent: { maxRamExponent: {
max: 9, max: 9,
@ -1439,7 +1440,7 @@ export const serverMetadata: IServerMetadata[] = [
{ {
hackDifficulty: 0, hackDifficulty: 0,
hostname: "I.I.I.I", hostname: "I.I.I.I",
literature: ["democracy-is-dead.lit"], literature: [LiteratureNames.DemocracyIsDead],
maxRamExponent: { maxRamExponent: {
max: 8, max: 8,
min: 4, min: 4,
@ -1458,7 +1459,7 @@ export const serverMetadata: IServerMetadata[] = [
{ {
hackDifficulty: 0, hackDifficulty: 0,
hostname: "avmnite-02h", hostname: "avmnite-02h",
literature: ["democracy-is-dead.lit"], literature: [LiteratureNames.DemocracyIsDead],
maxRamExponent: { maxRamExponent: {
max: 7, max: 7,
min: 4, min: 4,
@ -1492,7 +1493,7 @@ export const serverMetadata: IServerMetadata[] = [
{ {
hackDifficulty: 0, hackDifficulty: 0,
hostname: "CSEC", hostname: "CSEC",
literature: ["democracy-is-dead.lit"], literature: [LiteratureNames.DemocracyIsDead],
maxRamExponent: 3, maxRamExponent: 3,
moneyAvailable: 0, moneyAvailable: 0,
networkLayer: 2, networkLayer: 2,
@ -1508,7 +1509,7 @@ export const serverMetadata: IServerMetadata[] = [
{ {
hackDifficulty: 0, hackDifficulty: 0,
hostname: "The-Cave", hostname: "The-Cave",
literature: ["alpha-omega.lit"], literature: [LiteratureNames.AlphaOmega],
moneyAvailable: 0, moneyAvailable: 0,
networkLayer: 15, networkLayer: 15,
numOpenPortsRequired: 5, numOpenPortsRequired: 5,

@ -50,7 +50,7 @@ import {
iTutorialSteps, iTutorialSteps,
ITutorial ITutorial
} from "./InteractiveTutorial"; } from "./InteractiveTutorial";
import { showLiterature } from "./Literature"; import { showLiterature } from "./Literature/LiteratureHelpers";
import { Message } from "./Message/Message"; import { Message } from "./Message/Message";
import { showMessage } from "./Message/MessageHelpers"; import { showMessage } from "./Message/MessageHelpers";
import { startWorkerScript } from "./NetscriptWorker"; import { startWorkerScript } from "./NetscriptWorker";

@ -40,7 +40,6 @@ import {
processHacknetEarnings processHacknetEarnings
} from "./Hacknet/HacknetHelpers"; } from "./Hacknet/HacknetHelpers";
import { iTutorialStart } from "./InteractiveTutorial"; import { iTutorialStart } from "./InteractiveTutorial";
import { initLiterature } from "./Literature";
import { LocationName } from "./Locations/data/LocationNames"; import { LocationName } from "./Locations/data/LocationNames";
import { LocationRoot } from "./Locations/ui/Root"; import { LocationRoot } from "./Locations/ui/Root";
import { checkForMessagesToSend, initMessages } from "./Message/MessageHelpers"; import { checkForMessagesToSend, initMessages } from "./Message/MessageHelpers";
@ -197,13 +196,6 @@ const Engine = {
// Display objects // Display objects
// TODO-Refactor this into its own component // TODO-Refactor this into its own component
Display: { Display: {
// Progress bar
progress: null,
// Display for status text (such as "Saved" or "Loaded")
statusText: null,
hacking_skill: null,
// Main menu content // Main menu content
terminalContent: null, terminalContent: null,
@ -1069,7 +1061,6 @@ const Engine = {
if (Player.hasWseAccount) { if (Player.hasWseAccount) {
initSymbolToStockMap(); initSymbolToStockMap();
} }
initLiterature();
updateSourceFileFlags(Player); updateSourceFileFlags(Player);
// Calculate the number of cycles have elapsed while offline // Calculate the number of cycles have elapsed while offline
@ -1151,10 +1142,11 @@ const Engine = {
Engine.start(); // Run main game loop and Scripts loop Engine.start(); // Run main game loop and Scripts loop
removeLoadingScreen(); removeLoadingScreen();
const timeOfflineString = convertTimeMsToTimeElapsedString(time); const timeOfflineString = convertTimeMsToTimeElapsedString(time);
dialogBoxCreate(`Offline for ${timeOfflineString}. While you were offline, your scripts ` + dialogBoxCreate(<>
"generated <span class='money-gold'>" + Offline for {timeOfflineString}. While you were offline, your scripts generated
numeralWrapper.formatMoney(offlineProductionFromScripts) + "</span> " + <span className='money-gold'> {numeralWrapper.formatMoney(offlineProductionFromScripts)} </span>
"and your Hacknet Nodes generated <span class='money-gold'>" + hacknetProdInfo + "</span>"); and your Hacknet Nodes generated <span className='money-gold'>{hacknetProdInfo}</span>.
</>);
// Close main menu accordions for loaded game // Close main menu accordions for loaded game
var visibleMenuTabs = [terminal, createScript, activeScripts, stats, var visibleMenuTabs = [terminal, createScript, activeScripts, stats,
hacknetnodes, city, tutorial, options, dev]; hacknetnodes, city, tutorial, options, dev];
@ -1190,7 +1182,6 @@ const Engine = {
initFactions(); initFactions();
initAugmentations(); initAugmentations();
initMessages(); initMessages();
initLiterature();
updateSourceFileFlags(Player); updateSourceFileFlags(Player);
// Open main menu accordions for new game // Open main menu accordions for new game

360
src/tags

@ -1,360 +0,0 @@
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.8 //
$.analyzeFlag C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 84;" kind:property line:84 language:JavaScript
$.executeCommand C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 183;" kind:method line:183 language:JavaScript
$.finishAction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 86;" kind:method line:86 language:JavaScript
$.finishAnalyze C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 134;" kind:method line:134 language:JavaScript
$.finishHack C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 95;" kind:method line:95 language:JavaScript
$.hackFlag C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 83;" kind:property line:83 language:JavaScript
AddToAllServers C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 666;" kind:function line:666 language:JavaScript
AllServersSave C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 88;" kind:variable line:88 language:JavaScript
Augmentation C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 2;" kind:class line:2 language:JavaScript
Augmentation.addToFactions C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 23;" kind:method line:23 language:JavaScript
Augmentation.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 38;" kind:function line:38 language:JavaScript
Augmentation.setInfo C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 13;" kind:method line:13 language:JavaScript
Augmentation.setRequirements C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 17;" kind:method line:17 language:JavaScript
Augmentation.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 34;" kind:method line:34 language:JavaScript
AugmentationsSave C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 92;" kind:variable line:92 language:JavaScript
CONSTANTS.CodeInstructionRunTime C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 11;" kind:property line:11 language:JavaScript
CONSTANTS.CodeOfflineExecutionTime C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 14;" kind:property line:14 language:JavaScript
CONSTANTS.CorpFactionRepRequirement C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 7;" kind:property line:7 language:JavaScript
CONSTANTS.GameCyclesPer20Hours C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 23;" kind:property line:23 language:JavaScript
CONSTANTS.MaxLogCapacity C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 17;" kind:property line:17 language:JavaScript
CONSTANTS.MaxSkillLevel C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 4;" kind:property line:4 language:JavaScript
CONSTANTS.MillisecondsPer20Hours C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 22;" kind:property line:22 language:JavaScript
CONSTANTS.TorRouterCost C:\Users\daniel.xie\Desktop\netburner\netburner\src\Constants.js 20;" kind:property line:20 language:JavaScript
CompaniesSave C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 89;" kind:variable line:89 language:JavaScript
Company C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 4;" kind:class line:4 language:JavaScript
Company.addPosition C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 34;" kind:method line:34 language:JavaScript
Company.addPositions C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 38;" kind:method line:38 language:JavaScript
Company.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 57;" kind:function line:57 language:JavaScript
Company.hasPosition C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 44;" kind:method line:44 language:JavaScript
Company.init C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 23;" kind:method line:23 language:JavaScript
Company.setInfo C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 30;" kind:method line:30 language:JavaScript
Company.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 53;" kind:method line:53 language:JavaScript
CompanyPosition C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 64;" kind:class line:64 language:JavaScript
CompanyPosition.calculateJobPerformance C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 112;" kind:method line:112 language:JavaScript
CompanyPosition.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 196;" kind:function line:196 language:JavaScript
CompanyPosition.isAgentJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 183;" kind:method line:183 language:JavaScript
CompanyPosition.isBusinessJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 160;" kind:method line:160 language:JavaScript
CompanyPosition.isITJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 136;" kind:method line:136 language:JavaScript
CompanyPosition.isNetworkEngineerJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 153;" kind:method line:153 language:JavaScript
CompanyPosition.isSecurityEngineerJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 146;" kind:method line:146 language:JavaScript
CompanyPosition.isSecurityJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 172;" kind:method line:172 language:JavaScript
CompanyPosition.isSoftwareJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 122;" kind:method line:122 language:JavaScript
CompanyPosition.setExperienceGains C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 101;" kind:method line:101 language:JavaScript
CompanyPosition.setPerformanceParameters C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 86;" kind:method line:86 language:JavaScript
CompanyPosition.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 192;" kind:method line:192 language:JavaScript
CompanyPositions.SoftwareIntern C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 206;" kind:property line:206 language:JavaScript
Engine.Clickables C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 5;" kind:property line:5 language:JavaScript
Engine.Debug C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 2;" kind:property line:2 language:JavaScript
Environment C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Environment.js 4;" kind:class line:4 language:JavaScript
Environment.def C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Environment.js 46;" kind:method line:46 language:JavaScript
Environment.extend C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Environment.js 12;" kind:method line:12 language:JavaScript
Environment.get C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Environment.js 27;" kind:method line:27 language:JavaScript
Environment.lookup C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Environment.js 17;" kind:method line:17 language:JavaScript
Environment.set C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Environment.js 34;" kind:method line:34 language:JavaScript
FALSE.type C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 6;" kind:property line:6 language:JavaScript
FALSE.value C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 6;" kind:property line:6 language:JavaScript
Faction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 2;" kind:class line:2 language:JavaScript
Faction.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 30;" kind:function line:30 language:JavaScript
Faction.setAugmentationMultipliers C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 17;" kind:method line:17 language:JavaScript
Faction.setInformation C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 22;" kind:method line:22 language:JavaScript
Faction.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 26;" kind:method line:26 language:JavaScript
FactionInfo.HelpText C:\Users\daniel.xie\Desktop\netburner\netburner\src\FactionInfo.js 5;" kind:property line:5 language:JavaScript
FactionsSave C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 90;" kind:variable line:90 language:JavaScript
GetServerByHostname C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 680;" kind:function line:680 language:JavaScript
InputStream C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\InputStream.js 3;" kind:function line:3 language:JavaScript
Locations.Aevum C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 6;" kind:property line:6 language:JavaScript
Locations.AevumAeroCorp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 20;" kind:property line:20 language:JavaScript
Locations.AevumBachmanAndAssociates C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 17;" kind:property line:17 language:JavaScript
Locations.AevumClarkeIncorporated C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 18;" kind:property line:18 language:JavaScript
Locations.AevumCrushFitnessGym C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 26;" kind:property line:26 language:JavaScript
Locations.AevumECorp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 16;" kind:property line:16 language:JavaScript
Locations.AevumFulcrumTechnologies C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 19;" kind:property line:19 language:JavaScript
Locations.AevumGalacticCybersystems C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 21;" kind:property line:21 language:JavaScript
Locations.AevumNetLinkTechnologies C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 25;" kind:property line:25 language:JavaScript
Locations.AevumPolice C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 24;" kind:property line:24 language:JavaScript
Locations.AevumRhoConstruction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 23;" kind:property line:23 language:JavaScript
Locations.AevumSnapFitnessGym C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 27;" kind:property line:27 language:JavaScript
Locations.AevumTravelAgency C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 15;" kind:property line:15 language:JavaScript
Locations.AevumWatchdogSecurity C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 22;" kind:property line:22 language:JavaScript
Locations.Chongqing C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 7;" kind:property line:7 language:JavaScript
Locations.ChongqingKuaiGongInternational C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 31;" kind:property line:31 language:JavaScript
Locations.ChongqingSolarisSpaceSystems C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 32;" kind:property line:32 language:JavaScript
Locations.ChongqingTravelAgency C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 30;" kind:property line:30 language:JavaScript
Locations.Ishima C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 10;" kind:property line:10 language:JavaScript
Locations.IshimaNovaMedical C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 61;" kind:property line:61 language:JavaScript
Locations.IshimaOmegaSoftware C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 62;" kind:property line:62 language:JavaScript
Locations.IshimaStormTechnologies C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 60;" kind:property line:60 language:JavaScript
Locations.IshimaTravelAgency C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 59;" kind:property line:59 language:JavaScript
Locations.NewTokyo C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 9;" kind:property line:9 language:JavaScript
Locations.NewTokyoDefComm C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 53;" kind:property line:53 language:JavaScript
Locations.NewTokyoGlobalPharmaceuticals C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 55;" kind:property line:55 language:JavaScript
Locations.NewTokyoNoodleBar C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 56;" kind:property line:56 language:JavaScript
Locations.NewTokyoTravelAgency C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 52;" kind:property line:52 language:JavaScript
Locations.NewTokyoVitaLife C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 54;" kind:property line:54 language:JavaScript
Locations.Sector12 C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 8;" kind:property line:8 language:JavaScript
Locations.Sector12AlphaEnterprises C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 44;" kind:property line:44 language:JavaScript
Locations.Sector12BladeIndustries C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 37;" kind:property line:37 language:JavaScript
Locations.Sector12CIA C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 42;" kind:property line:42 language:JavaScript
Locations.Sector12CarmichaelSecurity C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 45;" kind:property line:45 language:JavaScript
Locations.Sector12DeltaOne C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 41;" kind:property line:41 language:JavaScript
Locations.Sector12FoodNStuff C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 46;" kind:property line:46 language:JavaScript
Locations.Sector12FourSigma C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 38;" kind:property line:38 language:JavaScript
Locations.Sector12IcarusMicrosystems C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 39;" kind:property line:39 language:JavaScript
Locations.Sector12IronGym C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 48;" kind:property line:48 language:JavaScript
Locations.Sector12JoesGuns C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 47;" kind:property line:47 language:JavaScript
Locations.Sector12MegaCorp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 36;" kind:property line:36 language:JavaScript
Locations.Sector12NSA C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 43;" kind:property line:43 language:JavaScript
Locations.Sector12PowerhouseGym C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 49;" kind:property line:49 language:JavaScript
Locations.Sector12TravelAgency C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 35;" kind:property line:35 language:JavaScript
Locations.Sector12UniversalEnergy C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 40;" kind:property line:40 language:JavaScript
Locations.Volhaven C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 11;" kind:property line:11 language:JavaScript
Locations.VolhavenCompuTek C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 72;" kind:property line:72 language:JavaScript
Locations.VolhavenHeliosLabs C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 68;" kind:property line:68 language:JavaScript
Locations.VolhavenLexoCorp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 70;" kind:property line:70 language:JavaScript
Locations.VolhavenMilleniumFitnessGym C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 73;" kind:property line:73 language:JavaScript
Locations.VolhavenNWO C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 67;" kind:property line:67 language:JavaScript
Locations.VolhavenOmniTekIncorporated C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 66;" kind:property line:66 language:JavaScript
Locations.VolhavenOmniaCybersystems C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 69;" kind:property line:69 language:JavaScript
Locations.VolhavenSysCoreSecurities C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 71;" kind:property line:71 language:JavaScript
Locations.VolhavenTravelAgency C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 65;" kind:property line:65 language:JavaScript
Parser C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 8;" kind:function line:8 language:JavaScript
Parser.PRECEDENCE.!= C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 13;" kind:property line:13 language:JavaScript
Parser.PRECEDENCE.% C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 15;" kind:property line:15 language:JavaScript
Parser.PRECEDENCE.&& C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 12;" kind:property line:12 language:JavaScript
Parser.PRECEDENCE.* C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 15;" kind:property line:15 language:JavaScript
Parser.PRECEDENCE.+ C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 14;" kind:property line:14 language:JavaScript
Parser.PRECEDENCE.- C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 14;" kind:property line:14 language:JavaScript
Parser.PRECEDENCE./ C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 15;" kind:property line:15 language:JavaScript
Parser.PRECEDENCE.< C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 13;" kind:property line:13 language:JavaScript
Parser.PRECEDENCE.<= C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 13;" kind:property line:13 language:JavaScript
Parser.PRECEDENCE.= C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 10;" kind:property line:10 language:JavaScript
Parser.PRECEDENCE.== C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 13;" kind:property line:13 language:JavaScript
Parser.PRECEDENCE.> C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 13;" kind:property line:13 language:JavaScript
Parser.PRECEDENCE.>= C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 13;" kind:property line:13 language:JavaScript
Parser.PRECEDENCE.|| C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 11;" kind:property line:11 language:JavaScript
Parser.checkKeywordAndSkip C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 46;" kind:function line:46 language:JavaScript
Parser.checkOpAndSkip C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 53;" kind:function line:53 language:JavaScript
Parser.checkPuncAndSkip C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 39;" kind:function line:39 language:JavaScript
Parser.delimited C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 79;" kind:function line:79 language:JavaScript
Parser.is_kw C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 26;" kind:function line:26 language:JavaScript
Parser.is_op C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 32;" kind:function line:32 language:JavaScript
Parser.is_punc C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 20;" kind:function line:20 language:JavaScript
Parser.maybe_binary C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 62;" kind:function line:62 language:JavaScript
Parser.parse_call C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 92;" kind:function line:92 language:JavaScript
Parser.unexpected C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 58;" kind:function line:58 language:JavaScript
Perk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 40;" kind:class line:40 language:JavaScript
Perk.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 62;" kind:function line:62 language:JavaScript
Perk.setCompany C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 40;" kind:method line:40 language:JavaScript
Perk.setFaction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 49;" kind:method line:49 language:JavaScript
Perk.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 58;" kind:method line:58 language:JavaScript
Perks.FreeCoffeeCompanyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 6;" kind:property line:6 language:JavaScript
Perks.FreeFoodCompanyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 7;" kind:property line:7 language:JavaScript
Perks.InsiderKnowledgeFactionPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 17;" kind:property line:17 language:JavaScript
Perks.KnowledgeBaseCompanyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 10;" kind:property line:10 language:JavaScript
Perks.NetworkingCompanyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 8;" kind:property line:8 language:JavaScript
Perks.NetworkingFactionPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 13;" kind:property line:13 language:JavaScript
Perks.NootropicsCompanyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 11;" kind:property line:11 language:JavaScript
Perks.PersonalTrainerCompanyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 9;" kind:property line:9 language:JavaScript
Perks.PrivateServerFactionPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 16;" kind:property line:16 language:JavaScript
Perks.SupercomputerFactionPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 14;" kind:property line:14 language:JavaScript
Perks.VPNFactionPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 15;" kind:property line:15 language:JavaScript
PlayerObject C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 5;" kind:class line:5 language:JavaScript
PlayerObject C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 121;" kind:class line:121 language:JavaScript
PlayerObject C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 2;" kind:class line:2 language:JavaScript
PlayerObject.PlayerObject C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 436;" kind:class line:436 language:JavaScript
PlayerObject.PlayerObject C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 730;" kind:method line:730 language:JavaScript
PlayerObject.PlayerObject.createProgramWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 690;" kind:method line:690 language:JavaScript
PlayerObject.PlayerObject.finishCreateProgramWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 709;" kind:method line:709 language:JavaScript
PlayerObject.PlayerObject.getFactionFieldWorkRepGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 655;" kind:method line:655 language:JavaScript
PlayerObject.PlayerObject.getFactionSecurityWorkRepGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 646;" kind:method line:646 language:JavaScript
PlayerObject.PlayerObject.getWorkAgiExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 626;" kind:method line:626 language:JavaScript
PlayerObject.PlayerObject.getWorkChaExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 632;" kind:method line:632 language:JavaScript
PlayerObject.PlayerObject.getWorkDefExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 614;" kind:method line:614 language:JavaScript
PlayerObject.PlayerObject.getWorkDexExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 620;" kind:method line:620 language:JavaScript
PlayerObject.PlayerObject.getWorkHackExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 602;" kind:method line:602 language:JavaScript
PlayerObject.PlayerObject.getWorkMoneyGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 596;" kind:method line:596 language:JavaScript
PlayerObject.PlayerObject.getWorkRepGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 638;" kind:method line:638 language:JavaScript
PlayerObject.PlayerObject.getWorkStrExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 608;" kind:method line:608 language:JavaScript
PlayerObject.PlayerObject.startCreateProgramWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 666;" kind:method line:666 language:JavaScript
PlayerObject.PlayerObject.startFactionFieldWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 517;" kind:method line:517 language:JavaScript
PlayerObject.PlayerObject.startFactionHackWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 502;" kind:method line:502 language:JavaScript
PlayerObject.PlayerObject.startFactionSecurityWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 532;" kind:method line:532 language:JavaScript
PlayerObject.PlayerObject.startFactionWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 471;" kind:method line:471 language:JavaScript
PlayerObject.PlayerObject.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 726;" kind:method line:726 language:JavaScript
PlayerObject.PlayerObject.workForFaction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 547;" kind:method line:547 language:JavaScript
PlayerObject.analyze C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 230;" kind:method line:230 language:JavaScript
PlayerObject.applyForAgentJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 118;" kind:method line:118 language:JavaScript
PlayerObject.applyForBusinessJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 109;" kind:method line:109 language:JavaScript
PlayerObject.applyForEmployeeJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 127;" kind:method line:127 language:JavaScript
PlayerObject.applyForItJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 84;" kind:method line:84 language:JavaScript
PlayerObject.applyForJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 5;" kind:method line:5 language:JavaScript
PlayerObject.applyForNetworkEngineerJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 100;" kind:method line:100 language:JavaScript
PlayerObject.applyForSecurityEngineerJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 88;" kind:method line:88 language:JavaScript
PlayerObject.applyForSecurityJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 113;" kind:method line:113 language:JavaScript
PlayerObject.applyForSoftwareJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 80;" kind:method line:80 language:JavaScript
PlayerObject.applyForWaiterJob C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 139;" kind:method line:139 language:JavaScript
PlayerObject.calculateExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 216;" kind:method line:216 language:JavaScript
PlayerObject.calculateHackingChance C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 176;" kind:method line:176 language:JavaScript
PlayerObject.calculateHackingTime C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 190;" kind:method line:190 language:JavaScript
PlayerObject.calculatePercentMoneyHacked C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 201;" kind:method line:201 language:JavaScript
PlayerObject.calculateSkill C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 157;" kind:method line:157 language:JavaScript
PlayerObject.checkForFactionInvitations C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 121;" kind:method line:121 language:JavaScript
PlayerObject.finishWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 288;" kind:method line:288 language:JavaScript
PlayerObject.gainAgilityExp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 273;" kind:method line:273 language:JavaScript
PlayerObject.gainCharismaExp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 280;" kind:method line:280 language:JavaScript
PlayerObject.gainDefenseExp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 259;" kind:method line:259 language:JavaScript
PlayerObject.gainDexterityExp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 266;" kind:method line:266 language:JavaScript
PlayerObject.gainHackingExp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 245;" kind:method line:245 language:JavaScript
PlayerObject.gainMoney C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 236;" kind:method line:236 language:JavaScript
PlayerObject.gainStrengthExp C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 252;" kind:method line:252 language:JavaScript
PlayerObject.getCurrentServer C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 146;" kind:method line:146 language:JavaScript
PlayerObject.getHomeComputer C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 150;" kind:method line:150 language:JavaScript
PlayerObject.hack C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 223;" kind:method line:223 language:JavaScript
PlayerObject.init C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 135;" kind:method line:135 language:JavaScript
PlayerObject.isQualified C:\Users\daniel.xie\Desktop\netburner\netburner\src\CompanyJobApplication.js 152;" kind:method line:152 language:JavaScript
PlayerObject.startWork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 346;" kind:method line:346 language:JavaScript
PlayerObject.updateSkillLevels C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 161;" kind:method line:161 language:JavaScript
PlayerObject.work C:\Users\daniel.xie\Desktop\netburner\netburner\src\Player.js 387;" kind:method line:387 language:JavaScript
PrintAllServers C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 692;" kind:function line:692 language:JavaScript
Programs.BruteSSHProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 4;" kind:property line:4 language:JavaScript
Programs.FTPCrackProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 5;" kind:property line:5 language:JavaScript
Programs.HTTPWormProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 7;" kind:property line:7 language:JavaScript
Programs.NukeProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 3;" kind:property line:3 language:JavaScript
Programs.RelaySMTPProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 6;" kind:property line:6 language:JavaScript
Programs.SQLInjectProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 8;" kind:property line:8 language:JavaScript
Script C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 66;" kind:class line:66 language:JavaScript
Script.displayLog C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 139;" kind:method line:139 language:JavaScript
Script.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 150;" kind:function line:150 language:JavaScript
Script.log C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 129;" kind:method line:129 language:JavaScript
Script.saveScript C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 90;" kind:method line:90 language:JavaScript
Script.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 145;" kind:method line:145 language:JavaScript
Script.updateNumInstructions C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 116;" kind:method line:116 language:JavaScript
Script.updateRamUsage C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 125;" kind:method line:125 language:JavaScript
ScriptEditorLastStatus C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 56;" kind:variable line:56 language:JavaScript
Server C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 4;" kind:class line:4 language:JavaScript
Server.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 108;" kind:function line:108 language:JavaScript
Server.getScript C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 94;" kind:method line:94 language:JavaScript
Server.getServerOnNetwork C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 84;" kind:method line:84 language:JavaScript
Server.init C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 57;" kind:method line:57 language:JavaScript
Server.setHackingParameters C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 69;" kind:method line:69 language:JavaScript
Server.setPortProperties C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 78;" kind:method line:78 language:JavaScript
Server.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 104;" kind:method line:104 language:JavaScript
SizeOfAllServers C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 657;" kind:function line:657 language:JavaScript
SpecialServerIpsMap C:\Users\daniel.xie\Desktop\netburner\netburner\src\SpecialServerIps.js 2;" kind:function line:2 language:JavaScript
SpecialServerIpsMap C:\Users\daniel.xie\Desktop\netburner\netburner\src\SpecialServerIps.js 5;" kind:class line:5 language:JavaScript
SpecialServerIpsMap.addIp C:\Users\daniel.xie\Desktop\netburner\netburner\src\SpecialServerIps.js 5;" kind:method line:5 language:JavaScript
SpecialServerIpsMap.fromJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\SpecialServerIps.js 13;" kind:function line:13 language:JavaScript
SpecialServerIpsMap.toJSON C:\Users\daniel.xie\Desktop\netburner\netburner\src\SpecialServerIps.js 9;" kind:method line:9 language:JavaScript
SpecialServerIpsSave C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 91;" kind:variable line:91 language:JavaScript
Tokenizer C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 16;" kind:function line:16 language:JavaScript
WorkerScript C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 6;" kind:class line:6 language:JavaScript
WorkerScript.getServer C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 18;" kind:method line:18 language:JavaScript
addWorkerScript C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 132;" kind:function line:132 language:JavaScript
allFiles C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 312;" kind:variable line:312 language:JavaScript
applyAugmentation C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 486;" kind:function line:486 language:JavaScript
applyPerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 84;" kind:function line:84 language:JavaScript
apply_op C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 498;" kind:function line:498 language:JavaScript
apply_op.div C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 504;" kind:function line:504 language:JavaScript
apply_op.num C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 499;" kind:function line:499 language:JavaScript
checkValidFilename C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 47;" kind:function line:47 language:JavaScript
createProgram C:\Users\daniel.xie\Desktop\netburner\netburner\src\CreateProgram.js 82;" kind:function line:82 language:JavaScript
croak C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\InputStream.js 22;" kind:function line:22 language:JavaScript
delTarget C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 405;" kind:variable line:405 language:JavaScript
diff C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 536;" kind:variable line:536 language:JavaScript
displayFactionAugmentations C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 616;" kind:function line:616 language:JavaScript
displayFactionContent C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 417;" kind:function line:417 language:JavaScript
eof C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\InputStream.js 19;" kind:function line:19 language:JavaScript
eof C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 165;" kind:function line:165 language:JavaScript
evaluate C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 7;" kind:function line:7 language:JavaScript
evaluateFor C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 333;" kind:function line:333 language:JavaScript
evaluateProg C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 460;" kind:function line:460 language:JavaScript
evaluateWhile C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 405;" kind:function line:405 language:JavaScript
executeDarkwebTerminalCommand C:\Users\daniel.xie\Desktop\netburner\netburner\src\DarkWeb.js 2;" kind:function line:2 language:JavaScript
filename C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 334;" kind:variable line:334 language:JavaScript
getNextCompanyPosition C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 328;" kind:function line:328 language:JavaScript
hackProgressBarPost C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 10;" kind:function line:10 language:JavaScript
hackProgressPost C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 15;" kind:function line:15 language:JavaScript
hostname C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 422;" kind:variable line:422 language:JavaScript
initAugmentations C:\Users\daniel.xie\Desktop\netburner\netburner\src\Augmentations.js 52;" kind:function line:52 language:JavaScript
initCompanies C:\Users\daniel.xie\Desktop\netburner\netburner\src\Company.js 425;" kind:function line:425 language:JavaScript
initFactions C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 47;" kind:function line:47 language:JavaScript
initForeignServers C:\Users\daniel.xie\Desktop\netburner\netburner\src\Server.js 117;" kind:function line:117 language:JavaScript
initLocationButtons C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 759;" kind:function line:759 language:JavaScript
inviteToFaction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 362;" kind:function line:362 language:JavaScript
ip C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 222;" kind:variable line:222 language:JavaScript
is_digit C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 31;" kind:function line:31 language:JavaScript
is_id C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 40;" kind:function line:40 language:JavaScript
is_id_start C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 36;" kind:function line:36 language:JavaScript
is_keyword C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 27;" kind:function line:27 language:JavaScript
is_op_char C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 44;" kind:function line:44 language:JavaScript
is_punc C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 48;" kind:function line:48 language:JavaScript
is_whitespace C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 52;" kind:function line:52 language:JavaScript
item C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 402;" kind:variable line:402 language:JavaScript
itemText C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 419;" kind:variable line:419 language:JavaScript
joinFaction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Faction.js 369;" kind:function line:369 language:JavaScript
killWorkerScript C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 122;" kind:function line:122 language:JavaScript
li C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 384;" kind:variable line:384 language:JavaScript
loadAllRunningScripts C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 159;" kind:function line:159 language:JavaScript
losePerk C:\Users\daniel.xie\Desktop\netburner\netburner\src\Perk.js 114;" kind:function line:114 language:JavaScript
mainMenu C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 263;" kind:variable line:263 language:JavaScript
maybe_call C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 203;" kind:function line:203 language:JavaScript
next C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\InputStream.js 11;" kind:function line:11 language:JavaScript
next C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 157;" kind:function line:157 language:JavaScript
offlineEps C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 440;" kind:variable line:440 language:JavaScript
offlineMps C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 438;" kind:variable line:438 language:JavaScript
offlineMpsText C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 439;" kind:variable line:439 language:JavaScript
offlineTotalMoneyMade C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 435;" kind:variable line:435 language:JavaScript
offset C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 537;" kind:variable line:537 language:JavaScript
onlineEps C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 431;" kind:variable line:431 language:JavaScript
onlineMps C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 429;" kind:variable line:429 language:JavaScript
onlineMpsText C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 430;" kind:variable line:430 language:JavaScript
onlineTotalMoneyMade C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 426;" kind:variable line:426 language:JavaScript
parse_atom C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 208;" kind:function line:208 language:JavaScript
parse_bool C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 196;" kind:function line:196 language:JavaScript
parse_expression C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 248;" kind:function line:248 language:JavaScript
parse_for C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 154;" kind:function line:154 language:JavaScript
parse_if C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 111;" kind:function line:111 language:JavaScript
parse_if.ret.cond C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 122;" kind:property line:122 language:JavaScript
parse_if.ret.type C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 121;" kind:property line:121 language:JavaScript
parse_prog C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 240;" kind:function line:240 language:JavaScript
parse_toplevel C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 230;" kind:function line:230 language:JavaScript
parse_varname C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 100;" kind:function line:100 language:JavaScript
parse_while C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Parser.js 182;" kind:function line:182 language:JavaScript
peek C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\InputStream.js 16;" kind:function line:16 language:JavaScript
peek C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 151;" kind:function line:151 language:JavaScript
percent C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 657;" kind:variable line:657 language:JavaScript
post C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 4;" kind:function line:4 language:JavaScript
postNetburnerText C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 25;" kind:function line:25 language:JavaScript
postScriptEditorStatus C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 57;" kind:function line:57 language:JavaScript
prestigeAugmentation C:\Users\daniel.xie\Desktop\netburner\netburner\src\Prestige.js 4;" kind:function line:4 language:JavaScript
purchaseServer C:\Users\daniel.xie\Desktop\netburner\netburner\src\PurchaseServers.js 2;" kind:function line:2 language:JavaScript
purchaseTor C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 1292;" kind:function line:1292 language:JavaScript
read_escaped C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 88;" kind:function line:88 language:JavaScript
read_ident C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 79;" kind:function line:79 language:JavaScript
read_next C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 122;" kind:function line:122 language:JavaScript
read_number C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 63;" kind:function line:63 language:JavaScript
read_string C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 107;" kind:function line:107 language:JavaScript
read_while C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 56;" kind:function line:56 language:JavaScript
runScriptsLoop C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 26;" kind:function line:26 language:JavaScript
s C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 406;" kind:variable line:406 language:JavaScript
scriptCalculateExpGain C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 546;" kind:function line:546 language:JavaScript
scriptCalculateHackingChance C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 528;" kind:function line:528 language:JavaScript
scriptCalculateHackingTime C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 538;" kind:function line:538 language:JavaScript
scriptCalculateOfflineProduction C:\Users\daniel.xie\Desktop\netburner\netburner\src\Script.js 183;" kind:function line:183 language:JavaScript
scriptCalculatePercentMoneyHacked C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Evaluator.js 551;" kind:function line:551 language:JavaScript
scriptName C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 296;" kind:variable line:296 language:JavaScript
scriptname C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 342;" kind:variable line:342 language:JavaScript
serverIpHostname C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 423;" kind:variable line:423 language:JavaScript
skip_comment C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\Tokenizer.js 116;" kind:function line:116 language:JavaScript
travelToCity C:\Users\daniel.xie\Desktop\netburner\netburner\src\Location.js 1280;" kind:function line:1280 language:JavaScript
updateOnlineScriptTimes C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 155;" kind:function line:155 language:JavaScript
updateTerminalScroll C:\Users\daniel.xie\Desktop\netburner\netburner\src\Terminal.js 20;" kind:function line:20 language:JavaScript
window.onload C:\Users\daniel.xie\Desktop\netburner\netburner\src\engine.js 904;" kind:function line:904 language:JavaScript
workerScripts C:\Users\daniel.xie\Desktop\netburner\netburner\src\Netscript\NetscriptWorker.js 23;" kind:variable line:23 language:JavaScript

Binary file not shown.

@ -0,0 +1,24 @@
import * as React from "react";
export function StatsTable(rows: any[][], title: string | null): React.ReactElement {
let titleElem = <></>
if (title) {
titleElem = <><h2><u>{title}</u></h2><br /></>;
}
return (<>
{titleElem}
<table>
<tbody>
{rows.map((row: any[]) => {
return <tr key={row[0]}>
{row.map((elem: any, i: number) => {
let style = {};
if (i !== 0) style = {textAlign: 'right'};
return <td key={i} style={style}>{elem}</td>
})}
</tr>
})}
</tbody>
</table>
</>);
}

@ -37,7 +37,11 @@ class NumeralFormatter {
format(n: number, format: string): string { format(n: number, format: string): string {
// numeraljs doesnt properly format numbers that are too big or too small // numeraljs doesnt properly format numbers that are too big or too small
if (Math.abs(n) < 1e-6) { n = 0; } if (Math.abs(n) < 1e-6) { n = 0; }
return numeral(n).format(format); const answer = numeral(n).format(format);
if (answer === 'NaN') {
return `${n}`;
}
return answer;
} }
formatBigNumber(n: number): string { formatBigNumber(n: number): string {

@ -1,2 +1,2 @@
export function dialogBoxCreate(txt: string, preformatted?: boolean): void; export function dialogBoxCreate(txt: string | JSX.Element, preformatted?: boolean): void;
export var dialogBoxOpened: boolean; export var dialogBoxOpened: boolean;

@ -1,4 +1,7 @@
import { KEY } from "./helpers/keyCodes"; import { KEY } from "./helpers/keyCodes";
import { DialogBox } from "./ui/DialogBox";
import React from "react";
import ReactDOM from "react-dom";
/** /**
* Create and display a pop-up dialog box. * Create and display a pop-up dialog box.
@ -41,32 +44,24 @@ document.addEventListener("keydown", function (event) {
let dialogBoxOpened = false; let dialogBoxOpened = false;
function dialogBoxCreate(txt, preformatted=false) { function dialogBoxCreate(txt, preformatted=false) {
var container = document.createElement("div"); const container = document.createElement("div");
container.setAttribute("class", "dialog-box-container"); container.setAttribute("class", "dialog-box-container");
var content = document.createElement("div"); let elem = txt;
content.setAttribute("class", "dialog-box-content"); if (typeof txt === 'string') {
var closeButton = document.createElement("span");
closeButton.setAttribute("class", "dialog-box-close-button");
closeButton.innerHTML = "&times;"
var textE;
if (preformatted) { if (preformatted) {
// For text files as they are often computed data that // For text files as they are often computed data that
// shouldn't be wrapped and should retain tabstops. // shouldn't be wrapped and should retain tabstops.
textE = document.createElement("pre"); elem = <pre dangerouslySetInnerHTML={{ __html: txt }} />
textE.innerHTML = txt;
} else { } else {
textE = document.createElement("p"); elem = <p dangerouslySetInnerHTML={{ __html: txt.replace(/(?:\r\n|\r|\n)/g, '<br />') }} />
textE.innerHTML = txt.replace(/(?:\r\n|\r|\n)/g, '<br>'); }
} }
content.appendChild(closeButton); ReactDOM.render(DialogBox(elem), container);
content.appendChild(textE);
container.appendChild(content);
document.body.appendChild(container); document.body.appendChild(container);
if (dialogBoxes.length >= 1) { if (dialogBoxes.length >= 1) {
container.style.visibility = "hidden"; container.style.visibility = "hidden";

8
utils/ui/DialogBox.tsx Normal file

@ -0,0 +1,8 @@
import * as React from "react";
export function DialogBox(content: HTMLElement): React.ReactElement {
return (<div className="dialog-box-content text">
<span className="dialog-box-close-button ">&times;</span>
{content}
</div>);
}