Compare commits

...

147 Commits

Author SHA1 Message Date
Snarling
a58eace23a RELEASE: Version 2.7.0 (#1829) 2024-12-08 15:51:46 -05:00
catloversg
933ec964cf CORPORATION: Print error message when player cannot create corporation (#1820) 2024-12-01 13:50:32 -08:00
catloversg
6e1848dd79 CORPORATION: Add new API to check if player can create corporation (#1598)
* CORPORATION: Add new API to check if player can create corporation
* Update description of createCorporation API
* Return enum instead of true/false
* Use throwIfReachable
* Fix typo in comment
2024-11-30 21:49:19 -08:00
catloversg
67704f2ab0 CODEBASE: Use "esnext" target when transforming code with swc (#1810) 2024-11-30 16:02:32 -08:00
catloversg
0caeb5c5ca DOCUMENTATION: Clarify prerequisites of augmentations when grafting (#1814) 2024-11-30 15:46:04 -08:00
catloversg
9efc091f8d CORPORATION: Improve FAQ and .lit file (#1808) 2024-11-30 15:36:02 -08:00
catloversg
7a4b3e23c1 CODEBASE: Show error dialog when finding out old bugs in pre-v2.4.0 (#1816)
* CODEBASE: Show error dialog when finding out old bugs in pre-v2.4.0

* Only show error dialog once
2024-11-30 15:31:44 -08:00
catloversg
9c7223f876 MISC: Enable new lint rules (#1806) 2024-11-27 13:56:58 -08:00
catloversg
fdcdf0e27a MISC: Add missing comma in changelog (#1805) 2024-11-27 13:55:51 -08:00
David Walker
b829f28f8c MISC: Update changelog (#1804)
Updated through c6865802
2024-11-27 01:42:34 -08:00
catloversg
c686580289 MISC: Update changelog (#1803) 2024-11-27 01:28:35 -08:00
catloversg
1e6c9d69e2 JEST: Move TerminalMatching.test.ts (#1801) 2024-11-27 01:23:51 -08:00
catloversg
88322a23a7 BUGFIX: Cannot load Bladeburner tasks of Sleeves from pre-v2.6.1 (#1800) 2024-11-27 01:23:20 -08:00
catloversg
22b6458c22 REFACTOR: Handle migration of ActionIdentifier in Bladeburner code instead of GenericReviver (#1799) 2024-11-27 01:22:23 -08:00
catloversg
3846c69204 BUGFIX: Infinite loop when migrating player's scripts from pre-v1.0.0 (#1798) 2024-11-27 01:18:43 -08:00
catloversg
55627d7212 CORPORATION: Fix wrong initial productionMult of new division (#1794) 2024-11-27 01:16:19 -08:00
catloversg
faed78cf2c CODEBASE: Validate AllGangs and StockMarket after loading with JSON.parse (#1783) 2024-11-27 01:13:47 -08:00
catloversg
7d03a9ef32 CODEBASE: Improve type checks in SaveObject.ts (#1774) 2024-11-27 00:35:09 -08:00
catloversg
6d2e106371 MISC: Change current version to 2.7.0 (#1795) 2024-11-27 00:07:16 -08:00
catloversg
bb0b857f71 JEST: Add tests for b1tflum3 and destroyW0r1dD43m0n API (#1802) 2024-11-27 00:06:11 -08:00
catloversg
9d8ac65aaf BUGFIX: Generic Reviver does not handle Message class (#1796) 2024-11-24 13:46:18 -08:00
catloversg
294c9cbf4d MISC: Accept "noscript" as parameter for skipping loading scripts (#1797) 2024-11-24 13:44:30 -08:00
catloversg
05da0efc81 REFACTOR: Mitigate cyclic dependency between Jsonable classes (#1792) 2024-11-23 15:53:31 -08:00
catloversg
45a6ca6b8e BUGFIX: Wrong usage of delete operator in Settings.load (#1791) 2024-11-23 15:23:57 -08:00
catloversg
596a621c62 BUGFIX: Missing migration code for v0.56.0 (#1790) 2024-11-21 22:57:36 -08:00
catloversg
8c4fcfe045 CODEBASE: Recheck all usages of typecasting with JSON.parse (#1775) 2024-11-20 23:47:02 -08:00
catloversg
70a231e421 BUGFIX: Hashserver UI shows wrong server list when purchasing upgrades (#1782) 2024-11-20 12:53:11 -08:00
catloversg
fe2c98e3cf BLADEBURNER: Deduct karma when successfully completing action involving killing (#1784) 2024-11-20 12:51:18 -08:00
Jon Hartnett
99aeecbd0e BUGFIX: Fix ramOverride check (#1787)
ramOverride currently prevents you from actually using exactly all of a server's memory due to a bug in the ram check. Simply replace ">=" with ">" to allow the new ram to equal the max ram.

Test script:
```js
/** @param {NS} ns */
export async function main(ns) {
  ns.tprint(ns.ramOverride(8));
}
```
Expected output (on fresh save):
```js
8
```
Output before this commit:
```js
1.6
```
2024-11-20 12:47:55 -08:00
catloversg
04611a30b6 MISC: Remove duplicate usages of special server's hostname (#1781) 2024-11-19 11:47:34 -08:00
David Walker
5faa418c74 REFACTOR: Better casting in JSONReviver.ts (#1780) 2024-11-19 11:45:26 -08:00
catloversg
d824cd4fa6 CODEBASE: Add comments to Generic_fromJSON (#1776) 2024-11-18 15:36:23 -08:00
gmcew
93a9475b8d Fix hashnet server list (#1779)
Remove WD if TRP isn't installed.
2024-11-18 14:23:01 -08:00
catloversg
75cf9c88b5 CODEBASE: Fix lint errors 3 (#1758)
This is a really big refactor because it actually *fixes* a lot of the lint errors instead of disabling them.
2024-11-14 08:18:57 -08:00
catloversg
97ca8c5f5e CODEBASE: Fix lint errors 4 (#1773)
Co-authored-by: Michael Ficocelli <ficocemt@gmail.com>
2024-11-14 07:47:35 -08:00
catloversg
4f84a894eb MISC: Add error cause to exceptionAlert and Recovery mode (#1772) 2024-11-12 19:27:18 -08:00
catloversg
246d668951 CORPORATION: Rewrite validation code for strings of price and quantity (#1753) 2024-11-12 07:39:21 -08:00
catloversg
9bba6a0a41 CORPORATION: Fix negative stored material (#1771) 2024-11-12 07:24:59 -08:00
catloversg
9013ea935a BUGFIX: nano and vim use wrong template for text files (#1770) 2024-11-12 07:22:17 -08:00
catloversg
48b25d2223 MISC: Update monaco-editor (#1769) 2024-11-12 07:20:42 -08:00
catloversg
5d26f4fa56 GANG: Show error popup when there are errors (#1763)
* GANG: Show error popup when there are errors

* Only show error once when it's in a hot code path
2024-11-11 07:41:38 -08:00
catloversg
72a63b15cb API: Return active SF levels in getOwnedSourceFiles and ResetInfo.ownedSF (#1761)
* DOCUMENTATION: Clarify getOwnedSourceFiles when player overrides active levels of SFs
* Return Player.activeSourceFiles instead of Player.sourceFiles
* Get rid of zeroes in the map
2024-11-10 22:56:57 -08:00
catloversg
cb9e281c45 UI: Auto focus hashnet upgrade modal (#1768) 2024-11-10 22:54:51 -08:00
catloversg
40651a757d CORPORATION: Clarify ns.corporation.bribe() (#1766) 2024-11-10 22:53:27 -08:00
catloversg
c638d858c6 DOCUMENTATION: Clarify FactionWorkRepGain multiplier (#1767) 2024-11-10 16:40:13 -08:00
catloversg
e825492319 CORPORATION: Expose valuation via ns.corporation.getCorporation() (#1765) 2024-11-10 16:32:25 -08:00
catloversg
daec7482fa UI: Change order of information in stats progress bar (#1764) 2024-11-10 16:30:47 -08:00
catloversg
650cf51acb DOCUMENTATION: Add more information for deprecated nFormat API (#1762) 2024-11-10 16:27:35 -08:00
catloversg
f4c2b29d40 GANG: Show confirmation popup if player enables territory clashes while being too weak (#1760) 2024-11-09 21:12:17 -08:00
G4mingJon4s
d6874d68aa UI: Added the ability to change the font size (#1703) 2024-11-09 16:50:18 -08:00
catloversg
90cb8a9551 MISC: Add proper type check to AST walking code (#1757) 2024-11-09 15:34:46 -08:00
catloversg
36c143b687 CODEBASE: Fix lint errors 2 (#1756) 2024-11-06 23:09:11 -08:00
catloversg
e3c10e9f0f MISC: Always add script's earnings to its parent (#1754) 2024-11-06 18:44:38 -08:00
catloversg
60c4be0496 MISC: Add generic type as returned type for action and checking (#1748) 2024-11-06 18:10:56 -08:00
catloversg
36eb12098f CORPORATION: Fix typo in documentation (#1752) 2024-11-06 18:03:04 -08:00
catloversg
c7cf0b853b MISC: Minor code change in SkillElem.tsx (#1751) 2024-11-04 16:24:15 -08:00
catloversg
81e068ba9c MISC: Include React component stack in Recovery Mode report (#1750) 2024-11-04 16:20:02 -08:00
catloversg
e5e4e2693f DOCUMENTATION: Clarify getSkillUpgradeCost and fix typo in BaseTask (#1749) 2024-11-03 23:27:59 -08:00
catloversg
772762493f BLADEBURNER: Change sleeveSize from property to getter (#1746) 2024-11-03 23:19:01 -08:00
catloversg
56c797e23f BLADEBURNER: Remove duplicate getRecruitmentSuccessChance (#1745) 2024-11-03 23:16:54 -08:00
catloversg
bc02d4f92f BLADEBURNER: Change skill.canUpgrade and Skills UI (#1744) 2024-11-03 23:08:19 -08:00
JMack6490
5786d7adcb DOCUMENTATION: Update NetscriptDefinitions.d.ts (#1743)
Added line 5934: using hackAnalyzeThreads on a server you cannot hack returns -1
2024-11-03 22:54:43 -08:00
catloversg
b388865317 UI: Fix typo in CovenantPurchasesRoot.tsx (#1740) 2024-11-03 22:38:19 -08:00
catloversg
c8183e55db BUGFIX: Crash in theme editor modal (#1735) 2024-11-03 22:38:01 -08:00
catloversg
f6502dd490 CODEBASE: Fix lint errors 1 (#1732) 2024-11-03 22:35:14 -08:00
catloversg
f7ee3a340f MISC: Remove or change popup shown when system clock moved backward (#1739) 2024-10-30 04:15:43 -07:00
catloversg
a12c48ed43 UI: Disable font ligatures by default (#1729) 2024-10-27 22:39:01 -07:00
ballardrog
0bf378a1b0 IPVGO: Add getCheatCount(). (#1734) 2024-10-27 18:52:23 -07:00
catloversg
b01527a9dc MISC: Update blood donation (#1736) 2024-10-27 18:40:23 -07:00
Michael Ficocelli
6df3dcdc82 IPVGO: Add optional board state argument to the go analysis functions (#1716) 2024-10-27 17:31:06 -07:00
Michael Ficocelli
ecc2d92edb IPVGO: uncheck the 'show prior move' feature when a new game is started (#1728) 2024-10-27 17:25:04 -07:00
catloversg
810cfc8b21 MISC: Validate hostname and port of RFA (#1721) 2024-10-23 18:12:04 -07:00
catloversg
f49d3b32a5 DOCUMENTATION: Clarify cyclesWorked of Task (#1725) 2024-10-23 16:18:18 -07:00
catloversg
9a0400d3df API: Improve built-in print APIs when printing objects containing Map or Set (#1723) 2024-10-23 16:01:58 -07:00
catloversg
d0022aac2b DEVMENU: Reset other gangs when leaving gang (#1715) 2024-10-23 01:55:22 -07:00
catloversg
b72c03acf0 DOCUMENTATION: Clarify "completion" property of GraftingTask (#1713) 2024-10-21 21:22:17 -07:00
catloversg
3ce2ae5fd7 API: Change type of skill name parameter of skillMaxUpgradeCount API (#1712) 2024-10-21 20:39:56 -07:00
catloversg
c5e50ba327 MISC: Improve discoverability of Corporation documentation (#1711) 2024-10-21 20:38:56 -07:00
catloversg
867f79c5ab API: Improve built-in print APIs when printing Promise objects (#1710) 2024-10-21 20:37:40 -07:00
catloversg
bc51733fbe MISC: Improve exception alert (#1709) 2024-10-21 20:36:29 -07:00
Denis Čahuk
8d1cfb2d97 BLADEBURNER: Test cover action completion (#1695) 2024-10-21 20:33:56 -07:00
catloversg
6d8084f40e MISC: Improve tutorial, documentation and discoverability of NS API documentation (#1697) 2024-10-20 20:37:42 -07:00
catloversg
a3e1b297ca MISC: Expose more information of HiveMind augmentation (#1701) 2024-10-20 20:36:42 -07:00
catloversg
97489629d9 CLI: Add warning when installing backdoor on backdoored server (#1705) 2024-10-20 20:36:02 -07:00
Denis Čahuk
2e6aa8989c BLADEBURNER: UI now shows tooltips on action success chance to indicate which stat it scales with (#1699) 2024-10-20 20:35:03 -07:00
catloversg
cc4c6d150b UI: Remove unnecessary newlines when augmentation does not have stats (#1698) 2024-10-20 01:09:30 -07:00
David Walker
424ae160ba NETSCRIPT: Fix dynamicRamUsage returned by getRunningScript() (#1704)
Fixes #1700
2024-10-20 00:52:57 -07:00
Pimvgd
24ab173d6c UI: Fix typo in field work description (#1691) 2024-10-09 21:18:57 -07:00
Alain Bryden
cd99006c4e NETSCRIPT: Update ScriptDeath to extend Error (#1685)
* Update ScriptDeath to extend Error

- Rename the "name" property to "hostname" so that it doesn't clash with inherited Error.name property.
- Extend Error, this way if a user ends up catching it they can:
  - Test the type of error caught (name) and ignore it if desired
  - Get a stack trace and find out where they went wrong
  - Not require special case error printing logic for catching things that are neither strings, nor Error objects.

It is possible (but unlikely) that this could make killing scripts slower in some circumstances.
2024-10-09 21:18:06 -07:00
catloversg
cace34d759 BUGFIX: Wrong calculation in team casualties of Bladeburner action (#1672) 2024-10-07 23:55:11 -07:00
catloversg
2fa8dd41ac BUGFIX: Missing tooltip when doing faction work (#1679) 2024-10-07 23:51:02 -07:00
egg362
dc328b14df MISC: Fixes to typos in augmentation descriptions (#1680) 2024-10-07 23:28:21 -07:00
catloversg
b829534067 BUGFIX: Scripts are killed too late when prestiging (#1683)
* Scripts are killed too late when prestiging
* Kill all scripts earlier
2024-10-07 23:20:58 -07:00
catloversg
e644c0e91e API: Make condition of donateToFaction consistent (#1686) 2024-10-07 23:14:09 -07:00
catloversg
3ef3821a08 DOCUMENTATION: Clarify condition of ns.corporation.bribe (#1687) 2024-10-07 23:12:35 -07:00
Caldwell
ccd9118b93 MISC: add stopFlag check before running main (#1689)
It's possible that before the script starts runn, the stopFlag is set.
2024-10-07 22:57:35 -07:00
catloversg
4d60c833cc MISC: Remove mention of Hacking Mission (#1684) 2024-10-06 22:58:24 -07:00
Ben Rog-Wilhelm
dad34a09dd CONTRACT: Fix incorrect description of Hamming Codes in Integer to Encoded Binary. (#1677) 2024-10-04 03:51:31 -07:00
Shy
7c3d71d21a MISC: remove google analytics config (#1676) 2024-10-03 16:12:51 -07:00
David Walker
bedd398789 CCT: Add new Square Root coding contract (#1656)
To make this simpler, there is now a general-purpose util for getting
random bigints. I don't know if anyone else will use it, but it makes
this code simpler.

I also rejiggered the type-checking on contracts a little more, because
the previous refactor didn't quite catch all the mistakes that could be
made.
2024-09-30 20:18:58 -07:00
catloversg
32e00aff7a BUGFIX: Wrong parameter requirement of ns.bladeburner.setTeamSize (#1673) 2024-09-30 20:18:25 -07:00
lucebac
7513fec507 EDITOR: import resolution in code editor (#1661)
* FIX: import resolution in code editor
Since I did not find any callback where we could just load imports
on-demand, I opted for just loading all scripts from the server where
a given script was opened from command line. This does not include
scripts which are already open, only files which are not yet opened
will be loaded.
2024-09-26 11:36:42 -07:00
Yichi Zhang
2b4410739d HACKNET: Remove hacknet servers from ServerType.Foreign (#1665) 2024-09-25 16:19:25 -07:00
Denis Čahuk
6c81e1ac67 BLADEBURNER: test cover console commands (#1664) 2024-09-25 16:06:46 -07:00
Denis Čahuk
b86044bcc1 BLADEBURNER: Move bladeburner team losses to Casualties (#1654) 2024-09-23 17:03:01 -07:00
Marvin Sautter
cf2d9b8335 Update babel-plugin-transform-barrels to the official version 1.0.17 for improved stability (#1663) 2024-09-22 22:27:51 -07:00
catloversg
c2727b5127 BUGFIX: Change generation rate of CCTs (#1657) 2024-09-22 21:35:34 -07:00
catloversg
53c8296baf BUGFIX: Follow-up of #1658 (Wrong team size in Bladeburner) (#1662) 2024-09-22 21:33:01 -07:00
catloversg
ade92ed297 BUGFIX: Wrong size of table cell in Import Save Comparison UI (#1659) 2024-09-20 21:02:57 -07:00
catloversg
70e16bf349 BUGFIX: Wrong team size when all team members die in Bladeburner's action (#1658) 2024-09-20 02:31:15 -07:00
David Walker
21ffa5322f MISC: Refactor coding contracts for type safety (#1653)
* MISC: Refactor coding contracts for type safety

This refactor does three things without any behavior changes:
* Adds type safety by introducing generic type parameters to the coding
  contract definitions, so they can use concrete types instead of
  "unknown". This also eliminates a bunch of boilerplate casts.
* Removes the unneeded CodingContractType class. We can use the metadata
  type directly.
* Introduces a new hidden state to coding contracts. Instead of
  generating and storing the data (which is what is shown to the user as
  the problem's input), the state is stored instead. This allows
  problems to (for instance) generate the answer up-front, and check the
  solution directly against the answer, instead of needing to embed a
  solver in the problem (which can then easily be ripped from the source
  code).

For compatibility, state == data by default. I plan to make use of this
feature in a followup, but it is unused currently.
2024-09-15 23:53:10 -07:00
Denis Čahuk
cde5e3f6ae MISC: Refactor BLADEBURNER Identifier Lookup (#1646) 2024-09-14 17:39:18 -07:00
David Walker
f39402e8be BLADE: Use "grow" semantics for population estimate (#1624)
This changes the way percantage-based population estimates work, so that
they have a similar mechanism to grow(). This allows natural recovery
from 0, and also falling to 0 in finite steps.

This also changes the formula for reducing estimates to est / (1 + p)
instead of est * (1 - p). The latter becomes overpowered at large p,
we've seen this formula issue elsewhere (such as BN modifiers).
2024-09-13 23:41:10 -07:00
Marvin Sautter
3d7a6f70d8 JEST: Test faster by removing barrels (#1645) 2024-09-09 18:36:00 -07:00
Marvin Sautter
dd59612121 JEST: Decrease frequency of random Bladeburner Tests by ~59% for improved performance (#1648) 2024-09-09 18:33:37 -07:00
Michael Ficocelli
2a5b0ca4e9 IPVGO: Prevent issues caused by resetting the board while the go AI is in flight (#1608) 2024-09-07 18:33:49 -07:00
catloversg
4f426e1b20 UI: Change description of Documentation button in Script Editor (#1644) 2024-09-07 18:08:16 -07:00
G4mingJon4s
651b17739c NETSCRIPT: Add ns.self() as a free info function (#1636)
* added utility info

* moved info to running script

* fix for RAM cost

* description changes

Co-authored-by: David Walker <d0sboots@gmail.com>

* fixed wrong formatting

* Added parent to ignored fields

---------

Co-authored-by: David Walker <d0sboots@gmail.com>
2024-09-07 17:34:24 -07:00
catloversg
0ce5cd35dc DOCUMENTATION: Fix mangled NS API TSDoc (#1643) 2024-09-07 17:29:23 -07:00
nobody0
17e906cd76 Update NetscriptDefinitions.d.ts to match class BitNodeMultipliers (#1642) 2024-08-30 19:31:04 -07:00
Fireball5939
95394b5956 DOCUMENTATION: Improve ns.enableLog() docs to remove a missleading description (#1634)
Changed ns.enableLog documentation to be very similar to ns.disableLog, to remove possible confusion that it only undoes the effects of ns.disableLog
2024-08-26 19:49:44 -07:00
Tahvohck
47b261f520 STANEK: Typo fix in description (#1627)
Fixing a typo (missing space) in the CotMG faction info text.
2024-08-25 10:14:33 -07:00
Nicole
b4f2a5c641 set static information netscript costs to 0 (#1628) 2024-08-25 10:09:36 -07:00
catloversg
3750363d95 MISC: Show more information about documentation in last step of tutorial (#1630) 2024-08-25 10:04:55 -07:00
catloversg
e58a7d8eaa DEVMENU: Use Autocomplete instead of Select in more tools (#1631) 2024-08-25 10:02:28 -07:00
catloversg
2e42a1f781 DOCUMENTATION: Minor changes in index page (#1626) 2024-08-24 14:11:11 -07:00
catloversg
ac0c9bd7e8 BUGFIX: Missing error handler when calling libarg (#1625) 2024-08-24 14:08:42 -07:00
gmcew
49629d1d28 UI: Remove extra "label=" text from SmartSupply interface (#1622) 2024-08-23 21:27:36 -07:00
Yichi Zhang
028e779602 NETSCRIPT: Don't make dynamicLoadedFns entries for free functions. (#1617) 2024-08-23 21:23:41 -07:00
Nicole
2141032432 BLADE: Fix population estimate percent growth when estimate is 0 (#1620) 2024-08-23 21:22:41 -07:00
catloversg
be515cc195 BUGFIX: Crash in b1tflum3 and destroyW0r1dD43m0n API (#1619) 2024-08-23 21:06:53 -07:00
catloversg
329d8ca8e6 BUGFIX: Wrong skill multipliers in Bladeburner (#1615) 2024-08-23 21:04:13 -07:00
bupjae
95bb6a33df DOCUMENTATION: Clarify experience gain of sleeves (#1609) 2024-08-22 12:53:16 -07:00
Nicole
7f5c4e1fe0 API: Reduced RAM cost for ns.getPurchasedServers (#1614) 2024-08-22 00:44:21 -07:00
catloversg
614bec1e13 DOCUMENTATION: Fix wrong description of ns.corporation.createCorporation (#1612) 2024-08-21 17:50:47 -07:00
catloversg
4a3dcf8a26 MISC: Expose internal data in dev build (#1611) 2024-08-21 17:50:11 -07:00
Sol
8d9f63f49f UI: Fix incorrect information given in pserv upgrade error msg. (#1602) 2024-08-21 17:48:55 -07:00
catloversg
818d7446be MISC: Rename getRandomArbitrary (#1605) 2024-08-21 16:50:51 -07:00
Nicole
995e367432 DOCS: Correct function signature for hashUpgradeCost (#1603) 2024-08-21 16:47:26 -07:00
David Walker
f235513742 CHANGELOG: Update changelog for 2.6.3dev (#1601)
Commit d82247a4 was a lazy update, this finishes putting all the entries
in the changelog. The "last updated" date is not changed, since it is
only including changes up to the old date.

Reverts the html-ification introduced in the last changelog update.
2024-08-18 17:28:59 -07:00
Yichi Zhang
2563874acb MISC: Use indirect eval for terminal expr and corporation sell prices/amounts (#1599) 2024-08-17 18:13:31 -07:00
catloversg
94eef8ecde BUGFIX: Fix inconsistencies of error handling in promise-based API (#1377) 2024-08-17 14:23:08 -07:00
Fireball5939
701c5d8e64 API: Fixed ns.singularity.donateToFaction being able to donate to SoA (#1595)
Fixed ns.singularity.donateToFaction bug
Fixed a bug within singularity.donateToFaction where you could use it to donate to Shadows Of Anarchy
Also updated the Node version in package-lock.json to 18
2024-08-17 14:10:01 -07:00
catloversg
cacecda72f API: Add types for parameters of gym-university-bladeburner API (Fix merging error) (#1596)
* API: Add types for parameters of gym-university-bladeburner API
* Fix merging error
2024-08-17 14:08:55 -07:00
David Walker
5b2a4eafcb MISC: Improve several things relating to PID lookups (#1594)
findRunningScriptByPid needlessly took a "server" argument. This caused
there to be a "getRunningScriptByPid" version that did *not*, and it was
looping through all servers in order to function, which is needlessly
inefficient.

By removing the parameter and the needless inefficient helper method,
the following changes:
- Many Netscript functions such as isRunning() and getScript() become faster.
- The terminal "tail" command now works by pid regardless of the current
  server. Note that "kill" already worked this way.

I also improved the docs around "tail", since the pid argument wasn't
in the help.
2024-08-17 14:03:00 -07:00
David Walker
34db6e8b26 NETSCRIPT: Rework disableLog for efficiency (#1589)
The current implementation was naive; disableLog("ALL") was storing a
key for every function, and iterating over a different object to do it
(when iterating over objects is quite slow).

The common cases of Bitburner (and especially batching, where efficiency
matters most) are either never disabling anything, or disabling "ALL".
This optimizes for these two cases, at the expense of slightly more
complicated code to deal with the less-common edge cases.
2024-08-16 19:10:20 -07:00
Nicole
385a9dc11d BUGFIX: Fix Bladeburner city chaos reaching Infinity/NaN (#1588) 2024-08-16 16:28:43 -07:00
414 changed files with 8531 additions and 4136 deletions

View File

@@ -7,6 +7,7 @@ node_modules/
dist
input
assets
coverage
doc
markdown
electron

View File

@@ -9,8 +9,8 @@ module.exports = {
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
//"plugin:@typescript-eslint/recommended-requiring-type-checking",
//"plugin:@typescript-eslint/strict",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/strict",
],
parser: "@typescript-eslint/parser",
parserOptions: {
@@ -34,10 +34,26 @@ module.exports = {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"react/no-unescaped-entities": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
},
settings: {
react: {
version: "detect",
},
},
overrides: [
/**
* Some enums are subsets of other enums. For example, UniversityLocationName contains locations of 3 universities.
* With each member, we refer to the respective LocationName's member instead of using a literal string. This usage
* is okay, but it triggers the "prefer-literal-enum-member" rule. This rule is not useful in this case, so we
* suppress it in NetscriptDefinitions.d.ts.
*/
{
files: ["src/ScriptEditor/NetscriptDefinitions.d.ts"],
rules: {
"@typescript-eslint/prefer-literal-enum-member": ["off"],
},
},
],
};

1
.gitignore vendored
View File

@@ -3,6 +3,7 @@
.vscode
Changelog.txt
Netburner.txt
/coverage
/doc/build
/node_modules
/electron/node_modules

View File

@@ -3,6 +3,7 @@ package.json
dist
doc/build
doc/source
coverage
.build
.package
.app

View File

@@ -13,9 +13,10 @@ See the [frequently asked questions](./doc/FAQ.md) for more information . To dis
# Documentation
The game's official documentation can be found in-game.
There are 2 types of documentation:
The [in-game documentation](./markdown/bitburner.md) is generated from the [TypeScript definitions](./src/ScriptEditor/NetscriptDefinitions.d.ts).
- In-game documentation: It can be found in the Documentation tab. This is the best place to get up-to-date information. You can also read the web version at https://github.com/bitburner-official/bitburner-src/blob/stable/src/Documentation/doc/index.md.
- NS API documentation: It's generated from the [TypeScript definitions](./src/ScriptEditor/NetscriptDefinitions.d.ts). You can read it at https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.md.
Anyone is welcome to contribute to the documentation by editing the [source
files](/src/Documentation/doc) and then making a pull request with your contributions.

View File

@@ -1,12 +1,12 @@
{
"name": "bitburner",
"version": "2.6.3",
"version": "2.7.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "bitburner",
"version": "2.6.3",
"version": "2.7.0",
"dependencies": {
"electron-log": "^4.4.8",
"electron-store": "^8.1.0",

View File

@@ -1,6 +1,6 @@
{
"name": "bitburner",
"version": "2.6.3",
"version": "2.7.0",
"description": "A cyberpunk-themed programming incremental game",
"main": "main.js",
"author": "Daniel Xie, hydroflame, et al.",

View File

@@ -2,7 +2,7 @@ module.exports = {
roots: ["<rootDir>/src/", "<rootDir>/test/"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
transform: {
"^.+\\.(js|jsx|ts|tsx)$": "babel-jest",
"^.+\\.(js|jsx|ts|tsx|cjs|mjs)$": "<rootDir>/test/jest/config/babelTransform.js",
},
transformIgnorePatterns: ["node_modules/(?!react-markdown)/"],
testPathIgnorePatterns: [".cypress", "node_modules", "dist"],
@@ -15,7 +15,7 @@ module.exports = {
".*?raw$": "<rootDir>/test/__mocks__/fileMock.js",
"@player": "<rootDir>/src/Player",
"@enums": "<rootDir>/src/Enums",
"@nsdefs": "<rootDir>/src/ScriptEditor/NetscriptDefinitions",
"@nsdefs": "<rootDir>/src/ScriptEditor/NetscriptDefinitions.d.ts",
"^monaco-editor$": "<rootDir>/test/__mocks__/NullMock.js",
"^monaco-vim$": "<rootDir>/test/__mocks__/NullMock.js",
"/utils/Protections$": "<rootDir>/test/__mocks__/NullMock.js",

View File

@@ -4,6 +4,8 @@
## AutocompleteData.enums property
Netscript Enums
**Signature:**
```typescript

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AutocompleteData](./bitburner.autocompletedata.md) &gt; [filename](./bitburner.autocompletedata.filename.md)
## AutocompleteData.filename property
The filename of the script about to be run
**Signature:**
```typescript
filename: string;
```

View File

@@ -4,6 +4,8 @@
## AutocompleteData.flags() method
Parses the flags schema on the already inputted flags
**Signature:**
```typescript

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AutocompleteData](./bitburner.autocompletedata.md) &gt; [hostname](./bitburner.autocompletedata.hostname.md)
## AutocompleteData.hostname property
The hostname of the server the script would be running on
**Signature:**
```typescript
hostname: string;
```

View File

@@ -16,14 +16,17 @@ interface AutocompleteData
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [enums](./bitburner.autocompletedata.enums.md) | | [NSEnums](./bitburner.nsenums.md) | |
| [scripts](./bitburner.autocompletedata.scripts.md) | | string\[\] | |
| [servers](./bitburner.autocompletedata.servers.md) | | string\[\] | |
| [txts](./bitburner.autocompletedata.txts.md) | | string\[\] | |
| [enums](./bitburner.autocompletedata.enums.md) | | [NSEnums](./bitburner.nsenums.md) | Netscript Enums |
| [filename](./bitburner.autocompletedata.filename.md) | | string | The filename of the script about to be run |
| [hostname](./bitburner.autocompletedata.hostname.md) | | string | The hostname of the server the script would be running on |
| [processes](./bitburner.autocompletedata.processes.md) | | [ProcessInfo](./bitburner.processinfo.md)<!-- -->\[\] | The processes running on the host |
| [scripts](./bitburner.autocompletedata.scripts.md) | | string\[\] | All scripts on the current server |
| [servers](./bitburner.autocompletedata.servers.md) | | string\[\] | All server hostnames |
| [txts](./bitburner.autocompletedata.txts.md) | | string\[\] | All text files on the current server |
## Methods
| Method | Description |
| --- | --- |
| [flags(schema)](./bitburner.autocompletedata.flags.md) | |
| [flags(schema)](./bitburner.autocompletedata.flags.md) | Parses the flags schema on the already inputted flags |

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AutocompleteData](./bitburner.autocompletedata.md) &gt; [processes](./bitburner.autocompletedata.processes.md)
## AutocompleteData.processes property
The processes running on the host
**Signature:**
```typescript
processes: ProcessInfo[];
```

View File

@@ -4,6 +4,8 @@
## AutocompleteData.scripts property
All scripts on the current server
**Signature:**
```typescript

View File

@@ -4,6 +4,8 @@
## AutocompleteData.servers property
All server hostnames
**Signature:**
```typescript

View File

@@ -4,6 +4,8 @@
## AutocompleteData.txts property
All text files on the current server
**Signature:**
```typescript

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BaseTask](./bitburner.basetask.md) &gt; [cyclesWorked](./bitburner.basetask.cyclesworked.md)
## BaseTask.cyclesWorked property
The number of game engine cycles has passed since this task started. 1 engine cycle = 200ms.
**Signature:**
```typescript
cyclesWorked: number;
```

View File

@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BaseTask](./bitburner.basetask.md)
## BaseTask interface
Base interface of all tasks.
**Signature:**
```typescript
export interface BaseTask
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [cyclesWorked](./bitburner.basetask.cyclesworked.md) | | number | The number of game engine cycles has passed since this task started. 1 engine cycle = 200ms. |

View File

@@ -4,7 +4,7 @@
## BitNodeMultipliers.CodingContractMoney property
Influences the amount of money gained from completing Coding Contracts
Influences the amount of money gained from completing Coding Contracts.
**Signature:**

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) &gt; [CompanyWorkRepGain](./bitburner.bitnodemultipliers.companyworkrepgain.md)
## BitNodeMultipliers.CompanyWorkRepGain property
Influences how much rep the player gains when performing work for a company.
**Signature:**
```typescript
CompanyWorkRepGain: number;
```

View File

@@ -4,7 +4,7 @@
## BitNodeMultipliers.CorporationDivisions property
Influences the amount of divisions a corporation can have at the same time
Influences the amount of divisions a corporation can have at the same time.
**Signature:**

View File

@@ -4,7 +4,7 @@
## BitNodeMultipliers.CorporationSoftcap property
Influences the money gain from dividends of corporations created by the player.
Influences profits from corporation dividends and selling shares.
**Signature:**

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) &gt; [CrimeSuccessRate](./bitburner.bitnodemultipliers.crimesuccessrate.md)
## BitNodeMultipliers.CrimeSuccessRate property
Influences the success chance of committing crimes
**Signature:**
```typescript
CrimeSuccessRate: number;
```

View File

@@ -4,7 +4,7 @@
## BitNodeMultipliers.FactionWorkRepGain property
Influences how much rep the player gains when performing work for a faction.
Influences how much rep the player gains when performing work for a faction or donating to it.
**Signature:**

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) &gt; [GangUniqueAugs](./bitburner.bitnodemultipliers.ganguniqueaugs.md)
## BitNodeMultipliers.GangUniqueAugs property
Percentage of unique augs that the gang has.
**Signature:**
```typescript
GangUniqueAugs: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) &gt; [GoPower](./bitburner.bitnodemultipliers.gopower.md)
## BitNodeMultipliers.GoPower property
Percentage multiplier on the effect of the IPvGO rewards \*
**Signature:**
```typescript
GoPower: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) &gt; [HackingSpeedMultiplier](./bitburner.bitnodemultipliers.hackingspeedmultiplier.md)
## BitNodeMultipliers.HackingSpeedMultiplier property
Influences how quickly the player's hack(), grow() and weaken() calls run
**Signature:**
```typescript
HackingSpeedMultiplier: number;
```

View File

@@ -4,7 +4,7 @@
## BitNodeMultipliers.HacknetNodeMoney property
Influences how much money is produced by Hacknet Nodes and the hash rate of Hacknet Servers (unlocked in BitNode-9)
Influences how much money is produced by Hacknet Nodes. Influences the hash rate of Hacknet Servers (unlocked in BitNode-9)
**Signature:**

View File

@@ -23,26 +23,31 @@ interface BitNodeMultipliers
| [BladeburnerSkillCost](./bitburner.bitnodemultipliers.bladeburnerskillcost.md) | | number | Influences the cost of skill levels from Bladeburner. |
| [CharismaLevelMultiplier](./bitburner.bitnodemultipliers.charismalevelmultiplier.md) | | number | Influences how quickly the player's charisma level (not exp) scales |
| [ClassGymExpGain](./bitburner.bitnodemultipliers.classgymexpgain.md) | | number | Influences the experience gained for each ability when a player completes a class. |
| [CodingContractMoney](./bitburner.bitnodemultipliers.codingcontractmoney.md) | | number | Influences the amount of money gained from completing Coding Contracts |
| [CodingContractMoney](./bitburner.bitnodemultipliers.codingcontractmoney.md) | | number | Influences the amount of money gained from completing Coding Contracts. |
| [CompanyWorkExpGain](./bitburner.bitnodemultipliers.companyworkexpgain.md) | | number | Influences the experience gained for each ability when the player completes working their job. |
| [CompanyWorkMoney](./bitburner.bitnodemultipliers.companyworkmoney.md) | | number | Influences how much money the player earns when completing working their job. |
| [CorporationDivisions](./bitburner.bitnodemultipliers.corporationdivisions.md) | | number | Influences the amount of divisions a corporation can have at the same time |
| [CorporationSoftcap](./bitburner.bitnodemultipliers.corporationsoftcap.md) | | number | Influences the money gain from dividends of corporations created by the player. |
| [CompanyWorkRepGain](./bitburner.bitnodemultipliers.companyworkrepgain.md) | | number | Influences how much rep the player gains when performing work for a company. |
| [CorporationDivisions](./bitburner.bitnodemultipliers.corporationdivisions.md) | | number | Influences the amount of divisions a corporation can have at the same time. |
| [CorporationSoftcap](./bitburner.bitnodemultipliers.corporationsoftcap.md) | | number | Influences profits from corporation dividends and selling shares. |
| [CorporationValuation](./bitburner.bitnodemultipliers.corporationvaluation.md) | | number | Influences the valuation of corporations created by the player. |
| [CrimeExpGain](./bitburner.bitnodemultipliers.crimeexpgain.md) | | number | Influences the base experience gained for each ability when the player commits a crime. |
| [CrimeMoney](./bitburner.bitnodemultipliers.crimemoney.md) | | number | Influences the base money gained when the player commits a crime. |
| [CrimeSuccessRate](./bitburner.bitnodemultipliers.crimesuccessrate.md) | | number | Influences the success chance of committing crimes |
| [DaedalusAugsRequirement](./bitburner.bitnodemultipliers.daedalusaugsrequirement.md) | | number | Influences how many Augmentations you need in order to get invited to the Daedalus faction |
| [DefenseLevelMultiplier](./bitburner.bitnodemultipliers.defenselevelmultiplier.md) | | number | Influences how quickly the player's defense level (not exp) scales |
| [DexterityLevelMultiplier](./bitburner.bitnodemultipliers.dexteritylevelmultiplier.md) | | number | Influences how quickly the player's dexterity level (not exp) scales |
| [FactionPassiveRepGain](./bitburner.bitnodemultipliers.factionpassiverepgain.md) | | number | Influences how much rep the player gains in each faction simply by being a member. |
| [FactionWorkExpGain](./bitburner.bitnodemultipliers.factionworkexpgain.md) | | number | Influences the experience gained for each ability when the player completes work for a Faction. |
| [FactionWorkRepGain](./bitburner.bitnodemultipliers.factionworkrepgain.md) | | number | Influences how much rep the player gains when performing work for a faction. |
| [FactionWorkRepGain](./bitburner.bitnodemultipliers.factionworkrepgain.md) | | number | Influences how much rep the player gains when performing work for a faction or donating to it. |
| [FourSigmaMarketDataApiCost](./bitburner.bitnodemultipliers.foursigmamarketdataapicost.md) | | number | Influences how much it costs to unlock the stock market's 4S Market Data API |
| [FourSigmaMarketDataCost](./bitburner.bitnodemultipliers.foursigmamarketdatacost.md) | | number | Influences how much it costs to unlock the stock market's 4S Market Data (NOT API) |
| [GangSoftcap](./bitburner.bitnodemultipliers.gangsoftcap.md) | | number | Influences the respect gain and money gain of your gang. |
| [GangUniqueAugs](./bitburner.bitnodemultipliers.ganguniqueaugs.md) | | number | Percentage of unique augs that the gang has. |
| [GoPower](./bitburner.bitnodemultipliers.gopower.md) | | number | Percentage multiplier on the effect of the IPvGO rewards \* |
| [HackExpGain](./bitburner.bitnodemultipliers.hackexpgain.md) | | number | Influences the experienced gained when hacking a server. |
| [HackingLevelMultiplier](./bitburner.bitnodemultipliers.hackinglevelmultiplier.md) | | number | Influences how quickly the player's hacking level (not experience) scales |
| [HacknetNodeMoney](./bitburner.bitnodemultipliers.hacknetnodemoney.md) | | number | Influences how much money is produced by Hacknet Nodes and the hash rate of Hacknet Servers (unlocked in BitNode-9) |
| [HackingSpeedMultiplier](./bitburner.bitnodemultipliers.hackingspeedmultiplier.md) | | number | Influences how quickly the player's hack(), grow() and weaken() calls run |
| [HacknetNodeMoney](./bitburner.bitnodemultipliers.hacknetnodemoney.md) | | number | Influences how much money is produced by Hacknet Nodes. Influences the hash rate of Hacknet Servers (unlocked in BitNode-9) |
| [HomeComputerRamCost](./bitburner.bitnodemultipliers.homecomputerramcost.md) | | number | Influences how much money it costs to upgrade your home computer's RAM |
| [InfiltrationMoney](./bitburner.bitnodemultipliers.infiltrationmoney.md) | | number | Influences how much money is gained when the player infiltrates a company. |
| [InfiltrationRep](./bitburner.bitnodemultipliers.infiltrationrep.md) | | number | Influences how much rep the player can gain from factions when selling stolen documents and secrets |
@@ -50,17 +55,17 @@ interface BitNodeMultipliers
| [PurchasedServerCost](./bitburner.bitnodemultipliers.purchasedservercost.md) | | number | Influence how much it costs to purchase a server |
| [PurchasedServerLimit](./bitburner.bitnodemultipliers.purchasedserverlimit.md) | | number | Influences the maximum number of purchased servers you can have |
| [PurchasedServerMaxRam](./bitburner.bitnodemultipliers.purchasedservermaxram.md) | | number | Influences the maximum allowed RAM for a purchased server |
| [PurchasedServerSoftcap](./bitburner.bitnodemultipliers.purchasedserversoftcap.md) | | number | Influences cost of any purchased server at or above 128GB |
| [PurchasedServerSoftcap](./bitburner.bitnodemultipliers.purchasedserversoftcap.md) | | number | Influence how much it costs to purchase a server |
| [RepToDonateToFaction](./bitburner.bitnodemultipliers.reptodonatetofaction.md) | | number | Influences the minimum favor the player must have with a faction before they can donate to gain rep. |
| [ScriptHackMoney](./bitburner.bitnodemultipliers.scripthackmoney.md) | | number | Influences how much the money on a server can be reduced when a script performs a hack against it. |
| [ScriptHackMoneyGain](./bitburner.bitnodemultipliers.scripthackmoneygain.md) | | number | Influences how much of the money stolen by a scripted hack will be added to the player's money. |
| [ScriptHackMoney](./bitburner.bitnodemultipliers.scripthackmoney.md) | | number | Influences how much money can be stolen from a server when a script performs a hack against it. |
| [ScriptHackMoneyGain](./bitburner.bitnodemultipliers.scripthackmoneygain.md) | | number | The amount of money actually gained when a script hacks a server. This is different than the above because you can reduce the amount of money but not gain that same amount. |
| [ServerGrowthRate](./bitburner.bitnodemultipliers.servergrowthrate.md) | | number | Influences the growth percentage per cycle against a server. |
| [ServerMaxMoney](./bitburner.bitnodemultipliers.servermaxmoney.md) | | number | Influences the maximum money that a server can grow to. |
| [ServerStartingMoney](./bitburner.bitnodemultipliers.serverstartingmoney.md) | | number | Influences the initial money that a server starts with. |
| [ServerStartingSecurity](./bitburner.bitnodemultipliers.serverstartingsecurity.md) | | number | Influences the initial security level (hackDifficulty) of a server. |
| [ServerWeakenRate](./bitburner.bitnodemultipliers.serverweakenrate.md) | | number | Influences the weaken amount per invocation against a server. |
| [StaneksGiftExtraSize](./bitburner.bitnodemultipliers.staneksgiftextrasize.md) | | number | Influences the size of the gift |
| [StaneksGiftPowerMultiplier](./bitburner.bitnodemultipliers.staneksgiftpowermultiplier.md) | | number | Influences the power of the gift |
| [StaneksGiftExtraSize](./bitburner.bitnodemultipliers.staneksgiftextrasize.md) | | number | Influences the size of the gift. |
| [StaneksGiftPowerMultiplier](./bitburner.bitnodemultipliers.staneksgiftpowermultiplier.md) | | number | Influences the power of the gift. |
| [StrengthLevelMultiplier](./bitburner.bitnodemultipliers.strengthlevelmultiplier.md) | | number | Influences how quickly the player's strength level (not exp) scales |
| [WorldDaemonDifficulty](./bitburner.bitnodemultipliers.worlddaemondifficulty.md) | | number | Influences the hacking skill required to backdoor the world daemon. |

View File

@@ -4,7 +4,7 @@
## BitNodeMultipliers.PurchasedServerSoftcap property
Influences cost of any purchased server at or above 128GB
Influence how much it costs to purchase a server
**Signature:**

View File

@@ -4,7 +4,7 @@
## BitNodeMultipliers.ScriptHackMoney property
Influences how much the money on a server can be reduced when a script performs a hack against it.
Influences how much money can be stolen from a server when a script performs a hack against it.
**Signature:**

View File

@@ -4,7 +4,7 @@
## BitNodeMultipliers.ScriptHackMoneyGain property
Influences how much of the money stolen by a scripted hack will be added to the player's money.
The amount of money actually gained when a script hacks a server. This is different than the above because you can reduce the amount of money but not gain that same amount.
**Signature:**

View File

@@ -4,7 +4,7 @@
## BitNodeMultipliers.StaneksGiftExtraSize property
Influences the size of the gift
Influences the size of the gift.
**Signature:**

View File

@@ -4,7 +4,7 @@
## BitNodeMultipliers.StaneksGiftPowerMultiplier property
Influences the power of the gift
Influences the power of the gift.
**Signature:**

View File

@@ -9,15 +9,18 @@ Get whether an action is set to autolevel.
**Signature:**
```typescript
getActionAutolevel(type: string, name: string): boolean;
getActionAutolevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
**Returns:**

View File

@@ -9,15 +9,18 @@ Get action count remaining.
**Signature:**
```typescript
getActionCountRemaining(type: string, name: string): number;
getActionCountRemaining(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
**Returns:**

View File

@@ -9,15 +9,18 @@ Get the current level of an action.
**Signature:**
```typescript
getActionCurrentLevel(type: string, name: string): number;
getActionCurrentLevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
**Returns:**

View File

@@ -9,15 +9,19 @@ Get estimate success chance of an action.
**Signature:**
```typescript
getActionEstimatedSuccessChance(type: string, name: string, sleeveNumber?: number): [number, number];
getActionEstimatedSuccessChance(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
sleeveNumber?: number,
): [number, number];
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| sleeveNumber | number | _(Optional)_ Optional. Index of the sleeve to retrieve information. |
**Returns:**

View File

@@ -9,15 +9,18 @@ Get the maximum level of an action.
**Signature:**
```typescript
getActionMaxLevel(type: string, name: string): number;
getActionMaxLevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
**Returns:**

View File

@@ -9,15 +9,19 @@ Get the reputation gain of an action.
**Signature:**
```typescript
getActionRepGain(type: string, name: string, level?: number): number;
getActionRepGain(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
level?: number,
): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| level | number | _(Optional)_ Optional number. Action level at which to calculate the gain. Will be the action's current level if not given. |
**Returns:**

View File

@@ -9,15 +9,18 @@ Get action successes.
**Signature:**
```typescript
getActionSuccesses(type: string, name: string): number;
getActionSuccesses(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
**Returns:**

View File

@@ -9,15 +9,18 @@ Get the time to complete an action.
**Signature:**
```typescript
getActionTime(type: string, name: string): number;
getActionTime(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
**Returns:**

View File

@@ -9,17 +9,17 @@ List all black ops.
**Signature:**
```typescript
getBlackOpNames(): string[];
getBlackOpNames(): BladeburnerBlackOpName[];
```
**Returns:**
string\[\]
[BladeburnerBlackOpName](./bitburner.bladeburnerblackopname.md)<!-- -->\[\]
Array of strings containing the names of all Bladeburner Black Ops.
## Remarks
RAM cost: 0.4 GB
RAM cost: 0 GB
Returns an array of strings containing the names of all Bladeburner Black Ops.

View File

@@ -9,14 +9,14 @@ Get black op required rank.
**Signature:**
```typescript
getBlackOpRank(name: string): number;
getBlackOpRank(name: BladeburnerBlackOpName): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| name | string | Name of BlackOp. Must be an exact match. |
| name | [BladeburnerBlackOpName](./bitburner.bladeburnerblackopname.md) | Name of BlackOp. Must be an exact match. |
**Returns:**

View File

@@ -9,17 +9,17 @@ List all contracts.
**Signature:**
```typescript
getContractNames(): string[];
getContractNames(): BladeburnerContractName[];
```
**Returns:**
string\[\]
[BladeburnerContractName](./bitburner.bladeburnercontractname.md)<!-- -->\[\]
Array of strings containing the names of all Bladeburner contracts.
## Remarks
RAM cost: 0.4 GB
RAM cost: 0 GB
Returns an array of strings containing the names of all Bladeburner contracts.

View File

@@ -9,17 +9,17 @@ List all general actions.
**Signature:**
```typescript
getGeneralActionNames(): string[];
getGeneralActionNames(): BladeburnerGeneralActionName[];
```
**Returns:**
string\[\]
[BladeburnerGeneralActionName](./bitburner.bladeburnergeneralactionname.md)<!-- -->\[\]
Array of strings containing the names of all general Bladeburner actions.
## Remarks
RAM cost: 0.4 GB
RAM cost: 0 GB
Returns an array of strings containing the names of all general Bladeburner actions.

View File

@@ -9,11 +9,11 @@ Get an object with the name and rank requirement of the next BlackOp that can be
**Signature:**
```typescript
getNextBlackOp(): { name: string; rank: number } | null;
getNextBlackOp(): { name: BladeburnerBlackOpName; rank: number } | null;
```
**Returns:**
{ name: string; rank: number } \| null
{ name: [BladeburnerBlackOpName](./bitburner.bladeburnerblackopname.md)<!-- -->; rank: number } \| null
An object with the `.name` and `.rank` properties of the available BlackOp, or `null`<!-- -->.

View File

@@ -9,17 +9,17 @@ List all operations.
**Signature:**
```typescript
getOperationNames(): string[];
getOperationNames(): BladeburnerOperationName[];
```
**Returns:**
string\[\]
[BladeburnerOperationName](./bitburner.bladeburneroperationname.md)<!-- -->\[\]
Array of strings containing the names of all Bladeburner operations.
## Remarks
RAM cost: 0.4 GB
RAM cost: 0 GB
Returns an array of strings containing the names of all Bladeburner operations.

View File

@@ -9,14 +9,14 @@ Get skill level.
**Signature:**
```typescript
getSkillLevel(skillName: string): number;
getSkillLevel(skillName: BladeburnerSkillName | `${BladeburnerSkillName}`): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| skillName | string | Name of skill. Case-sensitive and must be an exact match. |
| skillName | [BladeburnerSkillName](./bitburner.bladeburnerskillname.md) \| \`${[BladeburnerSkillName](./bitburner.bladeburnerskillname.md)<!-- -->}\` | Name of skill. Case-sensitive and must be an exact match. |
**Returns:**

View File

@@ -9,17 +9,17 @@ List all skills.
**Signature:**
```typescript
getSkillNames(): string[];
getSkillNames(): BladeburnerSkillName[];
```
**Returns:**
string\[\]
[BladeburnerSkillName](./bitburner.bladeburnerskillname.md)<!-- -->\[\]
Array of strings containing the names of all general Bladeburner skills.
## Remarks
RAM cost: 0.4 GB
RAM cost: 0 GB
Returns an array of strings containing the names of all general Bladeburner skills.

View File

@@ -9,14 +9,14 @@ Get cost to upgrade skill.
**Signature:**
```typescript
getSkillUpgradeCost(skillName: string, count?: number): number;
getSkillUpgradeCost(skillName: BladeburnerSkillName | `${BladeburnerSkillName}`, count?: number): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| skillName | string | Name of skill. Case-sensitive and must be an exact match. |
| skillName | [BladeburnerSkillName](./bitburner.bladeburnerskillname.md) \| \`${[BladeburnerSkillName](./bitburner.bladeburnerskillname.md)<!-- -->}\` | Name of skill. Case-sensitive and must be an exact match. |
| count | number | _(Optional)_ Number of times to upgrade the skill. Defaults to 1 if not specified. |
**Returns:**
@@ -31,5 +31,11 @@ RAM cost: 4 GB
This function returns the number of skill points needed to upgrade the specified skill the specified number of times.
The function returns Infinity if the sum of the current level and count exceeds the maximum level.
The function may return 0 or Infinity in special cases:
- Return 0 if the current skill level is too high and the specified count is too small. In normal situations, you don't need to worry about this case. It only happens when involved numbers surpass Number.MAX\_SAFE\_INTEGER and be affected by the floating-point inaccuracy.
- Return Infinity if the sum of the current level and count exceeds the maximum level.
[skillMaxUpgradeCount](./bitburner.bladeburnerformulas.skillmaxupgradecount.md) is the inverse function of this one.

View File

@@ -9,15 +9,18 @@ Get team size.
**Signature:**
```typescript
getTeamSize(type?: string, name?: string): number;
getTeamSize(
type?: BladeburnerActionType | `${BladeburnerActionType}`,
name?: BladeburnerActionName | `${BladeburnerActionName}`,
): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | _(Optional)_ Type of action. |
| name | string | _(Optional)_ Name of action. Must be an exact match. |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | _(Optional)_ Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | _(Optional)_ Name of action. Must be an exact match. |
**Returns:**

View File

@@ -9,15 +9,19 @@ Set an action autolevel.
**Signature:**
```typescript
setActionAutolevel(type: string, name: string, autoLevel: boolean): void;
setActionAutolevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
autoLevel: boolean,
): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| autoLevel | boolean | Whether or not to autolevel this action |
**Returns:**

View File

@@ -9,15 +9,19 @@ Set the level of an action.
**Signature:**
```typescript
setActionLevel(type: string, name: string, level: number): void;
setActionLevel(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
level: number,
): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| level | number | Level to set this action to. |
**Returns:**

View File

@@ -9,16 +9,20 @@ Set team size.
**Signature:**
```typescript
setTeamSize(type: string, name: string, size: number): number;
setTeamSize(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
size: number,
): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match. |
| size | number | Number of team members to set. Will be converted using Math.round(). |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match. |
| size | number | Number of team members to set. Must be a non-negative integer. |
**Returns:**

View File

@@ -9,15 +9,18 @@ Start an action.
**Signature:**
```typescript
startAction(type: string, name: string): boolean;
startAction(
type: BladeburnerActionType | `${BladeburnerActionType}`,
name: BladeburnerActionName | `${BladeburnerActionName}`,
): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of action. |
| name | string | Name of action. Must be an exact match |
| type | [BladeburnerActionType](./bitburner.bladeburneractiontype.md) \| \`${[BladeburnerActionType](./bitburner.bladeburneractiontype.md)<!-- -->}\` | Type of action. |
| name | [BladeburnerActionName](./bitburner.bladeburneractionname.md) \| \`${[BladeburnerActionName](./bitburner.bladeburneractionname.md)<!-- -->}\` | Name of action. Must be an exact match |
**Returns:**

View File

@@ -9,14 +9,14 @@ Upgrade skill.
**Signature:**
```typescript
upgradeSkill(skillName: string, count?: number): boolean;
upgradeSkill(skillName: BladeburnerSkillName | `${BladeburnerSkillName}`, count?: number): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| skillName | string | Name of skill to be upgraded. Case-sensitive and must be an exact match. |
| skillName | [BladeburnerSkillName](./bitburner.bladeburnerskillname.md) \| \`${[BladeburnerSkillName](./bitburner.bladeburnerskillname.md)<!-- -->}\` | Name of skill to be upgraded. Case-sensitive and must be an exact match. |
| count | number | _(Optional)_ Number of times to upgrade the skill. Defaults to 1 if not specified. |
**Returns:**

View File

@@ -0,0 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerActionName](./bitburner.bladeburneractionname.md)
## BladeburnerActionName type
**Signature:**
```typescript
export type BladeburnerActionName =
| BladeburnerGeneralActionName
| BladeburnerContractName
| BladeburnerOperationName
| BladeburnerBlackOpName;
```
**References:** [BladeburnerGeneralActionName](./bitburner.bladeburnergeneralactionname.md)<!-- -->, [BladeburnerContractName](./bitburner.bladeburnercontractname.md)<!-- -->, [BladeburnerOperationName](./bitburner.bladeburneroperationname.md)<!-- -->, [BladeburnerBlackOpName](./bitburner.bladeburnerblackopname.md)

View File

@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerActionType](./bitburner.bladeburneractiontype.md)
## BladeburnerActionType enum
Action types of Bladeburner
**Signature:**
```typescript
declare enum BladeburnerActionType
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| BlackOp | <code>&quot;Black Operations&quot;</code> | |
| Contract | <code>&quot;Contracts&quot;</code> | |
| General | <code>&quot;General&quot;</code> | |
| Operation | <code>&quot;Operations&quot;</code> | |

View File

@@ -0,0 +1,16 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerActionTypeForSleeve](./bitburner.bladeburneractiontypeforsleeve.md)
## BladeburnerActionTypeForSleeve type
**Signature:**
```typescript
export type BladeburnerActionTypeForSleeve =
| Exclude<BladeburnerGeneralActionName, BladeburnerGeneralActionName.InciteViolence>
| SpecialBladeburnerActionTypeForSleeve;
```
**References:** [BladeburnerGeneralActionName](./bitburner.bladeburnergeneralactionname.md)<!-- -->, [BladeburnerGeneralActionName.InciteViolence](./bitburner.bladeburnergeneralactionname.md)<!-- -->, [SpecialBladeburnerActionTypeForSleeve](./bitburner.specialbladeburneractiontypeforsleeve.md)

View File

@@ -0,0 +1,40 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerBlackOpName](./bitburner.bladeburnerblackopname.md)
## BladeburnerBlackOpName enum
Black Operation names of Bladeburner
**Signature:**
```typescript
declare enum BladeburnerBlackOpName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| OperationAnnihilus | <code>&quot;Operation Annihilus&quot;</code> | |
| OperationArchangel | <code>&quot;Operation Archangel&quot;</code> | |
| OperationAres | <code>&quot;Operation Ares&quot;</code> | |
| OperationCenturion | <code>&quot;Operation Centurion&quot;</code> | |
| OperationDaedalus | <code>&quot;Operation Daedalus&quot;</code> | |
| OperationDeckard | <code>&quot;Operation Deckard&quot;</code> | |
| OperationHyron | <code>&quot;Operation Hyron&quot;</code> | |
| OperationIonStorm | <code>&quot;Operation Ion Storm&quot;</code> | |
| OperationJuggernaut | <code>&quot;Operation Juggernaut&quot;</code> | |
| OperationK | <code>&quot;Operation K&quot;</code> | |
| OperationMorpheus | <code>&quot;Operation Morpheus&quot;</code> | |
| OperationRedDragon | <code>&quot;Operation Red Dragon&quot;</code> | |
| OperationShoulderOfOrion | <code>&quot;Operation Shoulder of Orion&quot;</code> | |
| OperationTitan | <code>&quot;Operation Titan&quot;</code> | |
| OperationTyphoon | <code>&quot;Operation Typhoon&quot;</code> | |
| OperationTyrell | <code>&quot;Operation Tyrell&quot;</code> | |
| OperationUltron | <code>&quot;Operation Ultron&quot;</code> | |
| OperationVindictus | <code>&quot;Operation Vindictus&quot;</code> | |
| OperationWallace | <code>&quot;Operation Wallace&quot;</code> | |
| OperationX | <code>&quot;Operation X&quot;</code> | |
| OperationZero | <code>&quot;Operation Zero&quot;</code> | |

View File

@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerContractName](./bitburner.bladeburnercontractname.md)
## BladeburnerContractName enum
Contract names of Bladeburner
**Signature:**
```typescript
declare enum BladeburnerContractName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| BountyHunter | <code>&quot;Bounty Hunter&quot;</code> | |
| Retirement | <code>&quot;Retirement&quot;</code> | |
| Tracking | <code>&quot;Tracking&quot;</code> | |

View File

@@ -9,14 +9,18 @@ Calculate the number of times that you can upgrade a skill.
**Signature:**
```typescript
skillMaxUpgradeCount(name: string, level: number, skillPoints: number): number;
skillMaxUpgradeCount(
name: BladeburnerSkillName | `${BladeburnerSkillName}`,
level: number,
skillPoints: number,
): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| name | string | Skill name. It's case-sensitive and must be an exact match. |
| name | [BladeburnerSkillName](./bitburner.bladeburnerskillname.md) \| \`${[BladeburnerSkillName](./bitburner.bladeburnerskillname.md)<!-- -->}\` | Skill name. It's case-sensitive and must be an exact match. |
| level | number | Skill level. It must be a non-negative number. |
| skillPoints | number | Number of skill points to upgrade the skill. It must be a positive number. |

View File

@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerGeneralActionName](./bitburner.bladeburnergeneralactionname.md)
## BladeburnerGeneralActionName enum
General action names of Bladeburner
**Signature:**
```typescript
declare enum BladeburnerGeneralActionName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| Diplomacy | <code>&quot;Diplomacy&quot;</code> | |
| FieldAnalysis | <code>&quot;Field Analysis&quot;</code> | |
| HyperbolicRegen | <code>&quot;Hyperbolic Regeneration Chamber&quot;</code> | |
| InciteViolence | <code>&quot;Incite Violence&quot;</code> | |
| Recruitment | <code>&quot;Recruitment&quot;</code> | |
| Training | <code>&quot;Training&quot;</code> | |

View File

@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerOperationName](./bitburner.bladeburneroperationname.md)
## BladeburnerOperationName enum
Operation names of Bladeburner
**Signature:**
```typescript
declare enum BladeburnerOperationName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| Assassination | <code>&quot;Assassination&quot;</code> | |
| Investigation | <code>&quot;Investigation&quot;</code> | |
| Raid | <code>&quot;Raid&quot;</code> | |
| StealthRetirement | <code>&quot;Stealth Retirement Operation&quot;</code> | |
| Sting | <code>&quot;Sting Operation&quot;</code> | |
| Undercover | <code>&quot;Undercover Operation&quot;</code> | |

View File

@@ -0,0 +1,31 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BladeburnerSkillName](./bitburner.bladeburnerskillname.md)
## BladeburnerSkillName enum
Skill names type of Bladeburner
**Signature:**
```typescript
declare enum BladeburnerSkillName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| BladesIntuition | <code>&quot;Blade's Intuition&quot;</code> | |
| Cloak | <code>&quot;Cloak&quot;</code> | |
| CybersEdge | <code>&quot;Cyber's Edge&quot;</code> | |
| Datamancer | <code>&quot;Datamancer&quot;</code> | |
| DigitalObserver | <code>&quot;Digital Observer&quot;</code> | |
| EvasiveSystem | <code>&quot;Evasive System&quot;</code> | |
| HandsOfMidas | <code>&quot;Hands of Midas&quot;</code> | |
| Hyperdrive | <code>&quot;Hyperdrive&quot;</code> | |
| Overclock | <code>&quot;Overclock&quot;</code> | |
| Reaper | <code>&quot;Reaper&quot;</code> | |
| ShortCircuit | <code>&quot;Short-Circuit&quot;</code> | |
| Tracer | <code>&quot;Tracer&quot;</code> | |

View File

@@ -17,5 +17,5 @@ string\[\]
## Remarks
RAM cost: 2 GB
RAM cost: 0 GB

View File

@@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyWorkTask](./bitburner.companyworktask.md) &gt; [cyclesWorked](./bitburner.companyworktask.cyclesworked.md)
## CompanyWorkTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

View File

@@ -9,8 +9,9 @@ Company Work
**Signature:**
```typescript
export interface CompanyWorkTask
export interface CompanyWorkTask extends BaseTask
```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks
@@ -21,6 +22,5 @@ An object representing the current work for a company
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [companyName](./bitburner.companyworktask.companyname.md) | | [CompanyName](./bitburner.companyname.md) | |
| [cyclesWorked](./bitburner.companyworktask.cyclesworked.md) | | number | |
| [type](./bitburner.companyworktask.type.md) | | "COMPANY" | |

View File

@@ -4,7 +4,11 @@
## Corporation.bribe() method
Bribe a faction.
Bribe a faction. You must satisfy these conditions:
- The corporation valuation must be greater than or equal to a threshold. You can use [getCorporation](./bitburner.corporation.getcorporation.md) and [getConstants](./bitburner.corporation.getconstants.md) to get this information.
- The specified faction must offer at least 1 type of work. You can use [getFactionWorkTypes](./bitburner.singularity.getfactionworktypes.md) to get the list of work types of a faction.
**Signature:**

View File

@@ -0,0 +1,30 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Corporation](./bitburner.corporation.md) &gt; [canCreateCorporation](./bitburner.corporation.cancreatecorporation.md)
## Corporation.canCreateCorporation() method
Return whether the player can create a corporation. Does not require API access.
**Signature:**
```typescript
canCreateCorporation(selfFund: boolean): CreatingCorporationCheckResult;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| selfFund | boolean | true if you want to self-fund, false otherwise |
**Returns:**
[CreatingCorporationCheckResult](./bitburner.creatingcorporationcheckresult.md)
Result of the check
## Remarks
RAM cost: 0 GB

View File

@@ -4,7 +4,11 @@
## Corporation.createCorporation() method
Create a Corporation.
Create a Corporation. You should use [canCreateCorporation](./bitburner.corporation.cancreatecorporation.md) to check if you are unsure you can do it, because it throws an error in these cases:
- Use seed money outside BitNode 3.
- Be in a BitNode that has CorporationSoftcap (a BitNode modifier) less than 0.15.
**Signature:**
@@ -16,7 +20,7 @@ createCorporation(corporationName: string, selfFund: boolean): boolean;
| Parameter | Type | Description |
| --- | --- | --- |
| corporationName | string | Name of the corporation |
| corporationName | string | Name of the corporation. It must be a non-empty string. |
| selfFund | boolean | If you want to self-fund. Defaults to true, false will only work in BitNode 3. |
**Returns:**
@@ -29,9 +33,3 @@ true if created and false if not
RAM cost: 20 GB
This function throws an error if:
- Try to self-fund outside BitNode 3.
- Be in a BitNode that has CorporationSoftcap (a BN modifier) less than 0.15. Use [getBitNodeMultipliers](./bitburner.ns.getbitnodemultipliers.md) to get the value of this modifier.

View File

@@ -4,7 +4,7 @@
## Corporation.hasCorporation() method
Returns whether the player has a corporation. Does not require API access.
Return whether the player has a corporation. Does not require API access.
**Signature:**

View File

@@ -18,9 +18,10 @@ export interface Corporation extends WarehouseAPI, OfficeAPI
| Method | Description |
| --- | --- |
| [acceptInvestmentOffer()](./bitburner.corporation.acceptinvestmentoffer.md) | Accept the investment offer. The value of offer is based on current corporation valuation. |
| [bribe(factionName, amountCash)](./bitburner.corporation.bribe.md) | Bribe a faction. |
| [bribe(factionName, amountCash)](./bitburner.corporation.bribe.md) | <p>Bribe a faction. You must satisfy these conditions:</p><p>- The corporation valuation must be greater than or equal to a threshold. You can use [getCorporation](./bitburner.corporation.getcorporation.md) and [getConstants](./bitburner.corporation.getconstants.md) to get this information.</p><p>- The specified faction must offer at least 1 type of work. You can use [getFactionWorkTypes](./bitburner.singularity.getfactionworktypes.md) to get the list of work types of a faction.</p> |
| [buyBackShares(amount)](./bitburner.corporation.buybackshares.md) | Buyback shares. Spend money from the player's wallet to transfer shares from public traders to the CEO. |
| [createCorporation(corporationName, selfFund)](./bitburner.corporation.createcorporation.md) | Create a Corporation. |
| [canCreateCorporation(selfFund)](./bitburner.corporation.cancreatecorporation.md) | Return whether the player can create a corporation. Does not require API access. |
| [createCorporation(corporationName, selfFund)](./bitburner.corporation.createcorporation.md) | <p>Create a Corporation. You should use [canCreateCorporation](./bitburner.corporation.cancreatecorporation.md) to check if you are unsure you can do it, because it throws an error in these cases:</p><p>- Use seed money outside BitNode 3.</p><p>- Be in a BitNode that has CorporationSoftcap (a BitNode modifier) less than 0.15.</p> |
| [expandCity(divisionName, city)](./bitburner.corporation.expandcity.md) | Expand to a new city. |
| [expandIndustry(industryType, divisionName)](./bitburner.corporation.expandindustry.md) | Expand to a new industry. |
| [getBonusTime()](./bitburner.corporation.getbonustime.md) | Get bonus time. Bonus time is accumulated when the game is offline or if the game is inactive in the browser. Bonus time makes the corporation progress faster. |
@@ -34,7 +35,7 @@ export interface Corporation extends WarehouseAPI, OfficeAPI
| [getUpgradeLevel(upgradeName)](./bitburner.corporation.getupgradelevel.md) | Get the level of a levelable upgrade. |
| [getUpgradeLevelCost(upgradeName)](./bitburner.corporation.getupgradelevelcost.md) | Get the cost to unlock the next level of a levelable upgrade. |
| [goPublic(numShares)](./bitburner.corporation.gopublic.md) | Go public. |
| [hasCorporation()](./bitburner.corporation.hascorporation.md) | Returns whether the player has a corporation. Does not require API access. |
| [hasCorporation()](./bitburner.corporation.hascorporation.md) | Return whether the player has a corporation. Does not require API access. |
| [hasUnlock(upgradeName)](./bitburner.corporation.hasunlock.md) | Check if you have a one-time unlockable upgrade. |
| [issueDividends(rate)](./bitburner.corporation.issuedividends.md) | Issue dividends. |
| [issueNewShares(amount)](./bitburner.corporation.issuenewshares.md) | Issue new shares. |

View File

@@ -34,4 +34,5 @@ interface CorporationInfo
| [sharePrice](./bitburner.corporationinfo.shareprice.md) | | number | Price of the shares |
| [shareSaleCooldown](./bitburner.corporationinfo.sharesalecooldown.md) | | number | Cooldown until shares can be sold again |
| [totalShares](./bitburner.corporationinfo.totalshares.md) | | number | Total number of shares issued by this corporation. |
| [valuation](./bitburner.corporationinfo.valuation.md) | | number | Corporation valuation |

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [valuation](./bitburner.corporationinfo.valuation.md)
## CorporationInfo.valuation property
Corporation valuation
**Signature:**
```typescript
valuation: number;
```

View File

@@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CreateProgramWorkTask](./bitburner.createprogramworktask.md) &gt; [cyclesWorked](./bitburner.createprogramworktask.cyclesworked.md)
## CreateProgramWorkTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

View File

@@ -9,8 +9,9 @@ Create Program
**Signature:**
```typescript
export interface CreateProgramWorkTask
export interface CreateProgramWorkTask extends BaseTask
```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks
@@ -20,7 +21,6 @@ An object representing the status of the program being created
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [cyclesWorked](./bitburner.createprogramworktask.cyclesworked.md) | | number | |
| [programName](./bitburner.createprogramworktask.programname.md) | | string | |
| [type](./bitburner.createprogramworktask.type.md) | | "CREATE\_PROGRAM" | |

View File

@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CreatingCorporationCheckResult](./bitburner.creatingcorporationcheckresult.md)
## CreatingCorporationCheckResult enum
**Signature:**
```typescript
declare enum CreatingCorporationCheckResult
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| CorporationExists | <code>&quot;CorporationExists&quot;</code> | |
| DisabledBySoftCap | <code>&quot;DisabledBySoftCap&quot;</code> | |
| NoSf3OrDisabled | <code>&quot;NoSf3OrDisabled&quot;</code> | |
| Success | <code>&quot;Success&quot;</code> | |
| UseSeedMoneyOutsideBN3 | <code>&quot;UseSeedMoneyOutsideBN3&quot;</code> | |

View File

@@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CrimeTask](./bitburner.crimetask.md) &gt; [cyclesWorked](./bitburner.crimetask.cyclesworked.md)
## CrimeTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

View File

@@ -9,8 +9,9 @@ Crime
**Signature:**
```typescript
export interface CrimeTask
export interface CrimeTask extends BaseTask
```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks
@@ -21,6 +22,5 @@ An object representing the crime being committed
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [crimeType](./bitburner.crimetask.crimetype.md) | | [CrimeType](./bitburner.crimetype.md) | |
| [cyclesWorked](./bitburner.crimetask.cyclesworked.md) | | number | |
| [type](./bitburner.crimetask.type.md) | | "CRIME" | |

View File

@@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [FactionWorkTask](./bitburner.factionworktask.md) &gt; [cyclesWorked](./bitburner.factionworktask.cyclesworked.md)
## FactionWorkTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

View File

@@ -9,8 +9,9 @@ Faction Work
**Signature:**
```typescript
export interface FactionWorkTask
export interface FactionWorkTask extends BaseTask
```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks
@@ -20,7 +21,6 @@ An object representing the current work for a faction
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [cyclesWorked](./bitburner.factionworktask.cyclesworked.md) | | number | |
| [factionName](./bitburner.factionworktask.factionname.md) | | string | |
| [factionWorkType](./bitburner.factionworktask.factionworktype.md) | | [FactionWorkType](./bitburner.factionworktype.md) | |
| [type](./bitburner.factionworktask.type.md) | | "FACTION" | |

View File

@@ -19,7 +19,7 @@ Names of all Equipments/Augmentations.
## Remarks
RAM cost: 1 GB
RAM cost: 0 GB
Get the name of all possible equipment/upgrades you can purchase for your Gang Members. This includes Augmentations.

View File

@@ -19,7 +19,7 @@ All valid tasks that Gang members can be assigned to.
## Remarks
RAM cost: 1 GB
RAM cost: 0 GB
Get the name of all valid tasks that Gang members can be assigned to.

View File

@@ -8,15 +8,8 @@ Retrieves a simplified version of the board state. "X" represents black pieces,
For example, a 5x5 board might look like this:
```js
[
"XX.O.",
"X..OO",
".XO..",
"XXO.#",
".XO.#",
]
```
\[<br/> "XX.O.",<br/> "X..OO",<br/> ".XO..",<br/> "XXO.\#",<br/> ".XO.\#",<br/> \]
Each string represents a vertical column on the board, and each character in the string represents a point.
Traditional notation for Go is e.g. "B,1" referring to second ("B") column, first rank. This is the equivalent of index \[1\]\[0\].

View File

@@ -8,15 +8,7 @@ Returns all the prior moves in the current game, as an array of simple board sta
For example, a single 5x5 prior move board might look like this:
```js
[
"XX.O.",
"X..OO",
".XO..",
"XXO.#",
".XO.#",
]
```
\[<br/> "XX.O.",<br/> "X..OO",<br/> ".XO..",<br/> "XXO.\#",<br/> ".XO.\#",<br/> \]
**Signature:**

View File

@@ -23,33 +23,13 @@ export interface Go
| Method | Description |
| --- | --- |
| [getBoardState()](./bitburner.go.getboardstate.md) | <p>Retrieves a simplified version of the board state. "X" represents black pieces, "O" white, and "." empty points. "\#" are dead nodes that are not part of the subnet. (They are not territory nor open nodes.)</p><p>For example, a 5x5 board might look like this:</p>
```js
[
"XX.O.",
"X..OO",
".XO..",
"XXO.#",
".XO.#",
]
```
<p>Each string represents a vertical column on the board, and each character in the string represents a point.</p><p>Traditional notation for Go is e.g. "B,1" referring to second ("B") column, first rank. This is the equivalent of index \[1\]\[0\].</p><p>Note that the \[0\]\[0\] point is shown on the bottom-left on the visual board (as is traditional), and each string represents a vertical column on the board. In other words, the printed example above can be understood to be rotated 90 degrees clockwise compared to the board UI as shown in the IPvGO subnet tab.</p> |
| [getBoardState()](./bitburner.go.getboardstate.md) | <p>Retrieves a simplified version of the board state. "X" represents black pieces, "O" white, and "." empty points. "\#" are dead nodes that are not part of the subnet. (They are not territory nor open nodes.)</p><p>For example, a 5x5 board might look like this:</p><p>\[<br/> "XX.O.",<br/> "X..OO",<br/> ".XO..",<br/> "XXO.\#",<br/> ".XO.\#",<br/> \]</p><p>Each string represents a vertical column on the board, and each character in the string represents a point.</p><p>Traditional notation for Go is e.g. "B,1" referring to second ("B") column, first rank. This is the equivalent of index \[1\]\[0\].</p><p>Note that the \[0\]\[0\] point is shown on the bottom-left on the visual board (as is traditional), and each string represents a vertical column on the board. In other words, the printed example above can be understood to be rotated 90 degrees clockwise compared to the board UI as shown in the IPvGO subnet tab.</p> |
| [getCurrentPlayer()](./bitburner.go.getcurrentplayer.md) | Returns the color of the current player, or 'None' if the game is over. |
| [getGameState()](./bitburner.go.getgamestate.md) | Gets the status of the current game. Shows the current player, current score, and the previous move coordinates. Previous move coordinates will be \[-1, -1\] for a pass, or if there are no prior moves. |
| [getMoveHistory()](./bitburner.go.getmovehistory.md) | <p>Returns all the prior moves in the current game, as an array of simple board states.</p><p>For example, a single 5x5 prior move board might look like this:</p>
```js
[
"XX.O.",
"X..OO",
".XO..",
"XXO.#",
".XO.#",
]
```
|
| [getMoveHistory()](./bitburner.go.getmovehistory.md) | <p>Returns all the prior moves in the current game, as an array of simple board states.</p><p>For example, a single 5x5 prior move board might look like this:</p><p>\[<br/> "XX.O.",<br/> "X..OO",<br/> ".XO..",<br/> "XXO.\#",<br/> ".XO.\#",<br/> \]</p> |
| [getOpponent()](./bitburner.go.getopponent.md) | Returns the name of the opponent faction in the current subnet. |
| [makeMove(x, y)](./bitburner.go.makemove.md) | Make a move on the IPvGO subnet game board, and await the opponent's response. x:0 y:0 represents the bottom-left corner of the board in the UI. |
| [opponentNextTurn(logOpponentMove)](./bitburner.go.opponentnextturn.md) | Returns a promise that resolves with the success or failure state of your last move, and the AI's response, if applicable. x:0 y:0 represents the bottom-left corner of the board in the UI. |
| [passTurn()](./bitburner.go.passturn.md) | <p>Pass the player's turn rather than making a move, and await the opponent's response. This ends the game if the opponent passed on the previous turn, or if the opponent passes on their following turn.</p><p>This can also be used if you pick up the game in a state where the opponent needs to play next. For example: if BitBurner was closed while waiting for the opponent to make a move, you may need to call passTurn() to get them to play their move on game start.</p> |
| [resetBoardState(opponent, boardSize)](./bitburner.go.resetboardstate.md) | <p>Gets new IPvGO subnet with the specified size owned by the listed faction, ready for the player to make a move. This will reset your win streak if the current game is not complete and you have already made moves.</p><p>Note that some factions will have a few routers on the subnet at this state.</p><p>opponent is "Netburners" or "Slum Snakes" or "The Black Hand" or "Tetrads" or "Daedalus" or "Illuminati" or "????????????" or "No AI",</p> |
| [resetBoardState(opponent, boardSize)](./bitburner.go.resetboardstate.md) | <p>Gets new IPvGO subnet with the specified size owned by the listed faction, ready for the player to make a move. This will reset your win streak if the current game is not complete and you have already made moves.</p><p>Note that some factions will have a few routers already on the subnet after a reset.</p><p>opponent is "Netburners" or "Slum Snakes" or "The Black Hand" or "Tetrads" or "Daedalus" or "Illuminati" or "????????????" or "No AI",</p> |

View File

@@ -6,7 +6,7 @@
Gets new IPvGO subnet with the specified size owned by the listed faction, ready for the player to make a move. This will reset your win streak if the current game is not complete and you have already made moves.
Note that some factions will have a few routers on the subnet at this state.
Note that some factions will have a few routers already on the subnet after a reset.
opponent is "Netburners" or "Slum Snakes" or "The Black Hand" or "Tetrads" or "Daedalus" or "Illuminati" or "????????????" or "No AI",

View File

@@ -6,25 +6,24 @@
Returns an ID for each point. All points that share an ID are part of the same network (or "chain"). Empty points are also given chain IDs to represent continuous empty space. Dead nodes are given the value `null.`
Takes an optional boardState argument; by default uses the current board state.
The data from getChains() can be used with the data from getBoardState() to see which player (or empty) each chain is
For example, a 5x5 board might look like this. There is a large chain \#1 on the left side, smaller chains 2 and 3 on the right, and a large chain 0 taking up the center of the board.
```js
[
[ 0,0,0,3,4],
[ 1,0,0,3,3],
[ 1,1,0,0,0],
[null,1,0,2,2],
[null,1,0,2,5],
]
```
For example, a 5x5 board might look like this. There is a large chain \#1 on the left side, smaller chains 2 and 3 on the right, and a large chain 0 taking up the center of the board. <pre lang="javascript"> \[ \[ 0,0,0,3,4\], \[ 1,0,0,3,3\], \[ 1,1,0,0,0\], \[null,1,0,2,2\], \[null,1,0,2,5\], \] </pre>
**Signature:**
```typescript
getChains(): (number | null)[][];
getChains(boardState?: string[]): (number | null)[][];
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| boardState | string\[\] | _(Optional)_ |
**Returns:**
(number \| null)\[\]\[\]

View File

@@ -4,27 +4,26 @@
## GoAnalysis.getControlledEmptyNodes() method
Returns 'X', 'O', or '?' for each empty point to indicate which player controls that empty point. If no single player fully encircles the empty space, it is shown as contested with '?'. "\#" are dead nodes that are not part of the subnet.
Returns 'X' for black, 'O' for white, or '?' for each empty point to indicate which player controls that empty point. If no single player fully encircles the empty space, it is shown as contested with '?'. "\#" are dead nodes that are not part of the subnet.
Takes an optional boardState argument; by default uses the current board state.
Filled points of any color are indicated with '.'
In this example, white encircles some space in the top-left, black encircles some in the top-right, and between their routers is contested space in the center:
```js
[
"OO..?",
"OO.?.",
"O.?.X",
".?.XX",
"?..X#",
]
```
In this example, white encircles some space in the top-left, black encircles some in the top-right, and between their routers is contested space in the center: <pre lang="javascript"> \[ "OO..?", "OO.?.", "O.?.X", ".?.XX", "?..X\#", \] </pre>
**Signature:**
```typescript
getControlledEmptyNodes(): string[];
getControlledEmptyNodes(boardState?: string[]): string[];
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| boardState | string\[\] | _(Optional)_ |
**Returns:**
string\[\]

View File

@@ -6,23 +6,22 @@
Returns a number for each point, representing how many open nodes its network/chain is connected to. Empty nodes and dead nodes are shown as -1 liberties.
For example, a 5x5 board might look like this. The chain in the top-left touches 5 total empty nodes, and the one in the center touches four. The group in the bottom-right only has one liberty; it is in danger of being captured!
Takes an optional boardState argument; by default uses the current board state.
```js
[
[-1, 5,-1,-1, 2],
[ 5, 5,-1,-1,-1],
[-1,-1, 4,-1,-1],
[ 3,-1,-1, 3, 1],
[ 3,-1,-1, 3, 1],
]
```
For example, a 5x5 board might look like this. The chain in the top-left touches 5 total empty nodes, and the one in the center touches four. The group in the bottom-right only has one liberty; it is in danger of being captured! <pre lang="javascript"> \[ \[-1, 5,-1,-1, 2\], \[ 5, 5,-1,-1,-1\], \[-1,-1, 4,-1,-1\], \[ 3,-1,-1, 3, 1\], \[ 3,-1,-1, 3, 1\], \] </pre>
**Signature:**
```typescript
getLiberties(): number[][];
getLiberties(boardState?: string[]): number[][];
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| boardState | string\[\] | _(Optional)_ |
**Returns:**
number\[\]\[\]

View File

@@ -8,19 +8,7 @@ Displays the game history, captured nodes, and gained bonuses for each opponent
The details are keyed by opponent name, in this structure:
```js
{
<OpponentName>: {
wins: number,
losses: number,
winStreak: number,
highestWinStreak: number,
favor: number,
bonusPercent: number,
bonusDescription: string,
}
}
```
<pre lang="javascript"> { <OpponentName>: { wins: number, losses: number, winStreak: number, highestWinStreak: number, favor: number, bonusPercent: number, bonusDescription: string, } } </pre>
**Signature:**

View File

@@ -4,7 +4,7 @@
## GoAnalysis.getValidMoves() method
Shows if each point on the board is a valid move for the player.
Shows if each point on the board is a valid move for the player. By default, analyzes the current board state. Takes an optional boardState (and an optional prior-move boardState, if desired) to analyze a custom board.
The true/false validity of each move can be retrieved via the X and Y coordinates of the move. `const validMoves = ns.go.analysis.getValidMoves();`
@@ -12,11 +12,21 @@ The true/false validity of each move can be retrieved via the X and Y coordinate
Note that the \[0\]\[0\] point is shown on the bottom-left on the visual board (as is traditional), and each string represents a vertical column on the board. In other words, the printed example above can be understood to be rotated 90 degrees clockwise compared to the board UI as shown in the IPvGO subnet tab.
Also note that, when given a custom board state, only one prior move can be analyzed. This means that the superko rules (no duplicate board states in the full game history) is not supported; you will have to implement your own analysis for that.
**Signature:**
```typescript
getValidMoves(): boolean[][];
getValidMoves(boardState?: string[], priorBoardState?: string[]): boolean[][];
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| boardState | string\[\] | _(Optional)_ |
| priorBoardState | string\[\] | _(Optional)_ |
**Returns:**
boolean\[\]\[\]

View File

@@ -16,53 +16,9 @@ export interface GoAnalysis
| Method | Description |
| --- | --- |
| [getChains()](./bitburner.goanalysis.getchains.md) | <p>Returns an ID for each point. All points that share an ID are part of the same network (or "chain"). Empty points are also given chain IDs to represent continuous empty space. Dead nodes are given the value <code>null.</code></p><p>The data from getChains() can be used with the data from getBoardState() to see which player (or empty) each chain is</p><p>For example, a 5x5 board might look like this. There is a large chain \#1 on the left side, smaller chains 2 and 3 on the right, and a large chain 0 taking up the center of the board.</p>
```js
[
[ 0,0,0,3,4],
[ 1,0,0,3,3],
[ 1,1,0,0,0],
[null,1,0,2,2],
[null,1,0,2,5],
]
```
|
| [getControlledEmptyNodes()](./bitburner.goanalysis.getcontrolledemptynodes.md) | <p>Returns 'X', 'O', or '?' for each empty point to indicate which player controls that empty point. If no single player fully encircles the empty space, it is shown as contested with '?'. "\#" are dead nodes that are not part of the subnet.</p><p>Filled points of any color are indicated with '.'</p><p>In this example, white encircles some space in the top-left, black encircles some in the top-right, and between their routers is contested space in the center:</p>
```js
[
"OO..?",
"OO.?.",
"O.?.X",
".?.XX",
"?..X#",
]
```
|
| [getLiberties()](./bitburner.goanalysis.getliberties.md) | <p>Returns a number for each point, representing how many open nodes its network/chain is connected to. Empty nodes and dead nodes are shown as -1 liberties.</p><p>For example, a 5x5 board might look like this. The chain in the top-left touches 5 total empty nodes, and the one in the center touches four. The group in the bottom-right only has one liberty; it is in danger of being captured!</p>
```js
[
[-1, 5,-1,-1, 2],
[ 5, 5,-1,-1,-1],
[-1,-1, 4,-1,-1],
[ 3,-1,-1, 3, 1],
[ 3,-1,-1, 3, 1],
]
```
|
| [getStats()](./bitburner.goanalysis.getstats.md) | <p>Displays the game history, captured nodes, and gained bonuses for each opponent you have played against.</p><p>The details are keyed by opponent name, in this structure:</p>
```js
{
<OpponentName>: {
wins: number,
losses: number,
winStreak: number,
highestWinStreak: number,
favor: number,
bonusPercent: number,
bonusDescription: string,
}
}
```
|
| [getValidMoves()](./bitburner.goanalysis.getvalidmoves.md) | <p>Shows if each point on the board is a valid move for the player.</p><p>The true/false validity of each move can be retrieved via the X and Y coordinates of the move. <code>const validMoves = ns.go.analysis.getValidMoves();</code></p><p><code>const moveIsValid = validMoves[x][y];</code></p><p>Note that the \[0\]\[0\] point is shown on the bottom-left on the visual board (as is traditional), and each string represents a vertical column on the board. In other words, the printed example above can be understood to be rotated 90 degrees clockwise compared to the board UI as shown in the IPvGO subnet tab.</p> |
| [getChains(boardState)](./bitburner.goanalysis.getchains.md) | <p>Returns an ID for each point. All points that share an ID are part of the same network (or "chain"). Empty points are also given chain IDs to represent continuous empty space. Dead nodes are given the value <code>null.</code></p><p>Takes an optional boardState argument; by default uses the current board state.</p><p>The data from getChains() can be used with the data from getBoardState() to see which player (or empty) each chain is</p><p>For example, a 5x5 board might look like this. There is a large chain \#1 on the left side, smaller chains 2 and 3 on the right, and a large chain 0 taking up the center of the board. <pre lang="javascript"> \[ \[ 0,0,0,3,4\], \[ 1,0,0,3,3\], \[ 1,1,0,0,0\], \[null,1,0,2,2\], \[null,1,0,2,5\], \] </pre></p> |
| [getControlledEmptyNodes(boardState)](./bitburner.goanalysis.getcontrolledemptynodes.md) | <p>Returns 'X' for black, 'O' for white, or '?' for each empty point to indicate which player controls that empty point. If no single player fully encircles the empty space, it is shown as contested with '?'. "\#" are dead nodes that are not part of the subnet.</p><p>Takes an optional boardState argument; by default uses the current board state.</p><p>Filled points of any color are indicated with '.'</p><p>In this example, white encircles some space in the top-left, black encircles some in the top-right, and between their routers is contested space in the center: <pre lang="javascript"> \[ "OO..?", "OO.?.", "O.?.X", ".?.XX", "?..X\#", \] </pre></p> |
| [getLiberties(boardState)](./bitburner.goanalysis.getliberties.md) | <p>Returns a number for each point, representing how many open nodes its network/chain is connected to. Empty nodes and dead nodes are shown as -1 liberties.</p><p>Takes an optional boardState argument; by default uses the current board state.</p><p>For example, a 5x5 board might look like this. The chain in the top-left touches 5 total empty nodes, and the one in the center touches four. The group in the bottom-right only has one liberty; it is in danger of being captured! <pre lang="javascript"> \[ \[-1, 5,-1,-1, 2\], \[ 5, 5,-1,-1,-1\], \[-1,-1, 4,-1,-1\], \[ 3,-1,-1, 3, 1\], \[ 3,-1,-1, 3, 1\], \] </pre></p> |
| [getStats()](./bitburner.goanalysis.getstats.md) | <p>Displays the game history, captured nodes, and gained bonuses for each opponent you have played against.</p><p>The details are keyed by opponent name, in this structure:</p><p><pre lang="javascript"> { <OpponentName>: { wins: number, losses: number, winStreak: number, highestWinStreak: number, favor: number, bonusPercent: number, bonusDescription: string, } } </pre></p> |
| [getValidMoves(boardState, priorBoardState)](./bitburner.goanalysis.getvalidmoves.md) | <p>Shows if each point on the board is a valid move for the player. By default, analyzes the current board state. Takes an optional boardState (and an optional prior-move boardState, if desired) to analyze a custom board.</p><p>The true/false validity of each move can be retrieved via the X and Y coordinates of the move. <code>const validMoves = ns.go.analysis.getValidMoves();</code></p><p><code>const moveIsValid = validMoves[x][y];</code></p><p>Note that the \[0\]\[0\] point is shown on the bottom-left on the visual board (as is traditional), and each string represents a vertical column on the board. In other words, the printed example above can be understood to be rotated 90 degrees clockwise compared to the board UI as shown in the IPvGO subnet tab.</p><p>Also note that, when given a custom board state, only one prior move can be analyzed. This means that the superko rules (no duplicate board states in the full game history) is not supported; you will have to implement your own analysis for that.</p> |

View File

@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GoCheat](./bitburner.gocheat.md) &gt; [getCheatCount](./bitburner.gocheat.getcheatcount.md)
## GoCheat.getCheatCount() method
Returns the number of times you've attempted to cheat in the current game.
**Signature:**
```typescript
getCheatCount(): number;
```
**Returns:**
number
## Remarks
RAM cost: 1 GB Requires BitNode 14.2 to use

View File

@@ -4,15 +4,22 @@
## GoCheat.getCheatSuccessChance() method
Returns your chance of successfully playing one of the special moves in the ns.go.cheat API. Scales with your crime success rate stat.
Returns your chance of successfully playing one of the special moves in the ns.go.cheat API. Scales up with your crime success rate stat. Scales down with the number of times you've attempted to cheat in the current game.
Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.
**Signature:**
```typescript
getCheatSuccessChance(): number;
getCheatSuccessChance(cheatCount?: number): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| cheatCount | number | _(Optional)_ Optional override for the number of cheats already attempted. Defaults to the number of cheats attempted in the current game. |
**Returns:**
number

View File

@@ -17,7 +17,8 @@ export interface GoCheat
| Method | Description |
| --- | --- |
| [destroyNode(x, y)](./bitburner.gocheat.destroynode.md) | <p>Attempts to destroy an empty node, leaving an offline dead space that does not count as territory or provide open node access to adjacent routers.</p><p>Success chance can be seen via ns.go.getCheatSuccessChance()</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
| [getCheatSuccessChance()](./bitburner.gocheat.getcheatsuccesschance.md) | <p>Returns your chance of successfully playing one of the special moves in the ns.go.cheat API. Scales with your crime success rate stat.</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
| [getCheatCount()](./bitburner.gocheat.getcheatcount.md) | Returns the number of times you've attempted to cheat in the current game. |
| [getCheatSuccessChance(cheatCount)](./bitburner.gocheat.getcheatsuccesschance.md) | <p>Returns your chance of successfully playing one of the special moves in the ns.go.cheat API. Scales up with your crime success rate stat. Scales down with the number of times you've attempted to cheat in the current game.</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
| [playTwoMoves(x1, y1, x2, y2)](./bitburner.gocheat.playtwomoves.md) | <p>Attempts to place two routers at once on empty nodes. Note that this ignores other move restrictions, so you can suicide your own routers if they have no access to empty ports and do not capture any enemy routers.</p><p>Success chance can be seen via ns.go.getCheatSuccessChance()</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
| [removeRouter(x, y)](./bitburner.gocheat.removerouter.md) | <p>Attempts to remove an existing router, leaving an empty node behind.</p><p>Success chance can be seen via ns.go.getCheatSuccessChance()</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
| [repairOfflineNode(x, y)](./bitburner.gocheat.repairofflinenode.md) | <p>Attempts to repair an offline node, leaving an empty playable node behind.</p><p>Success chance can be seen via ns.go.getCheatSuccessChance()</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |

View File

@@ -4,6 +4,8 @@
## GraftingTask.completion property
This promise resolves when the task is complete.
**Signature:**
```typescript

Some files were not shown because too many files have changed in this diff Show More