diff --git a/dist/bitburner.d.ts b/dist/bitburner.d.ts
index 9a8667978..3443efcc0 100644
--- a/dist/bitburner.d.ts
+++ b/dist/bitburner.d.ts
@@ -1270,7 +1270,7 @@ export declare interface GangFormulas {
* @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}
* @returns The calculated wanted penalty.
*/
- calculateWantedPenalty(gang: GangGenInfo): number;
+ wantedPenalty(gang: GangGenInfo): number;
/**
* Calculate respect gain per tick.
* @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}
@@ -1278,7 +1278,7 @@ export declare interface GangFormulas {
* @param task - Gang info from {@link Gang.getTaskStats | getTaskStats}
* @returns The calculated respect gain.
*/
- calculateRespectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
+ respectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
/**
* Calculate wanted gain per tick.
* @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}
@@ -1286,7 +1286,7 @@ export declare interface GangFormulas {
* @param task - Task info from {@link Gang.getTaskStats | getTaskStats}
* @returns The calculated wanted gain.
*/
- calculateWantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
+ wantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
/**
* Calculate money gain per tick.
* @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}
@@ -1294,7 +1294,7 @@ export declare interface GangFormulas {
* @param task - Task info from {@link Gang.getTaskStats | getTaskStats}
* @returns The calculated money gain.
*/
- calculateMoneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
+ moneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
}
/**
@@ -1471,16 +1471,65 @@ export declare interface GangTerritory {
}
/**
+ * Hacking formulas
* @public
*/
export declare interface HackingFormulas {
- hackChance(server: number, player: number): number;
- hackExp(server: number, player: number): number;
- hackPercent(server: number, player: number): number;
- growPercent(server: number, threads: number, player: number, cores?: number): number;
- hackTime(server: number, player: number): number;
- growTime(server: number, player: number): number;
- weakenTime(server: number, player: number): number;
+ /**
+ * Calculate hack chance.
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @returns The calculated hack chance.
+ */
+ hackChance(server: Server, player: Player): number;
+ /**
+ * Calculate hack exp for one thread.
+ * @remarks
+ * Multiply by thread to get total exp
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @returns The calculated hack exp.
+ */
+ hackExp(server: Server, player: Player): number;
+ /**
+ * Calculate hack percent for one thread.
+ * @remarks
+ * Multiply by thread to get total percent hacked.
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @returns The calculated hack percent.
+ */
+ hackPercent(server: Server, player: Player): number;
+ /**
+ * Calculate the percent a server would grow.
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param threads - Amount of thread.
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @param cores - Number of cores on the computer that will execute grow.
+ * @returns The calculated grow percent.
+ */
+ growPercent(server: Server, threads: number, player: Player, cores?: number): number;
+ /**
+ * Calculate hack time.
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @returns The calculated hack time.
+ */
+ hackTime(server: Server, player: Player): number;
+ /**
+ * Calculate grow time.
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @returns The calculated grow time.
+ */
+ growTime(server: Server, player: Player): number;
+ /**
+ * Calculate weaken time.
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @returns The calculated weaken time.
+ */
+ weakenTime(server: Server, player: Player): number;
}
/**
@@ -1834,28 +1883,121 @@ export declare interface HacknetMultipliers {
}
/**
+ * Hacknet Node formulas
* @public
*/
export declare interface HacknetNodesFormulas {
+ /**
+ * Calculate money gain rate.
+ * @param level - level of the node.
+ * @param ram - ram of the node.
+ * @param cores - cores of the node.
+ * @param mult - player production mult (default to 1)
+ * @returns The calculated money gain rate.
+ */
moneyGainRate(level: number, ram: number, cores: number, mult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet node level.
+ * @param startingLevel - starting level
+ * @param extraLevels - amount of level to purchase (defaults to 1)
+ * @param costMult - player cost reduction (default to 1)
+ * @returns The calculated cost.
+ */
levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet node ram.
+ * @param startingRam - starting ram
+ * @param extraLevels - amount of level of ram to purchase (defaults to 1)
+ * @param costMult - player cost reduction (default to 1)
+ * @returns The calculated cost.
+ */
ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet node cores.
+ * @param startingCore - starting cores
+ * @param extraCores - amount of cores to purchase (defaults to 1)
+ * @param costMult - player cost reduction (default to 1)
+ * @returns The calculated cost.
+ */
coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;
+ /**
+ * Calculate the cost of a hacknet node.
+ * @param n - number of the hacknet node
+ * @param mult - player cost reduction (defaults to 1)
+ * @returns The calculated cost.
+ */
hacknetNodeCost(n: number, mult: number): number;
+ /**
+ * All constants used by the game.
+ * @returns An object with all hacknet node constants used by the game.
+ */
constants(): number;
}
/**
+ * Hacknet Server formulas
* @public
*/
export declare interface HacknetServersFormulas {
+ /**
+ * Calculate hash gain rate.
+ * @param level - level of the server.
+ * @param ramUsed - ramUsed of the server.
+ * @param maxRam - maxRam of the server.
+ * @param cores - cores of the server.
+ * @param mult - player production mult (default to 1)
+ * @returns The calculated hash gain rate.
+ */
hashGainRate(level: number, ramUsed: number, maxRam: number, cores: number, mult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet server level.
+ * @param startingLevel - starting level
+ * @param extraLevels - amount of level to purchase (defaults to 1)
+ * @param costMult - player cost reduction (default to 1)
+ * @returns The calculated cost.
+ */
levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet server ram.
+ * @param startingRam - starting ram
+ * @param extraLevels - amount of level of ram to purchase (defaults to 1)
+ * @param costMult - player cost reduction (default to 1)
+ * @returns The calculated cost.
+ */
ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet server cores.
+ * @param startingCore - starting cores
+ * @param extraCores - amount of cores to purchase (defaults to 1)
+ * @param costMult - player cost reduction (default to 1)
+ * @returns The calculated cost.
+ */
coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet server cache.
+ * @param startingCache - starting cache level
+ * @param extraCache - amount of levels of cache to purchase (defaults to 1)
+ * @returns The calculated cost.
+ */
cacheUpgradeCost(startingCache: number, extraCache?: number): number;
+ /**
+ * Calculate hash cost of an upgrade.
+ * @param upgName - name of the upgrade
+ * @param level - level of the upgrade
+ * @returns The calculated hash cost.
+ */
hashUpgradeCost(upgName: number, level: number): number;
- hacknetServerCost(n: number, mult: number): number;
+ /**
+ * Calculate the cost of a hacknet server.
+ * @param n - number of the hacknet server
+ * @param mult - player cost reduction (defaults to 1)
+ * @returns The calculated cost.
+ */
+ hacknetServerCost(n: number, mult?: number): number;
+ /**
+ * All constants used by the game.
+ * @returns An object with all hacknet server constants used by the game.
+ */
constants(): any;
}
@@ -4550,11 +4692,24 @@ export declare interface Singularity {
}
/**
+ * Skills formulas
* @public
*/
export declare interface SkillsFormulas {
- calculateSkill(exp: number, mult?: number): number;
- calculateExp(skill: number, mult?: number): number;
+ /**
+ * Calculate skill level.
+ * @param exp - experience for that skill
+ * @param skillMult - Multiplier for that skill, defaults to 1.
+ * @returns The calculated skill level.
+ */
+ calculateSkill(exp: number, skillMult?: number): number;
+ /**
+ * Calculate exp for skill level.
+ * @param skill - target skill level
+ * @param skillMult - Multiplier for that skill, defaults to 1.
+ * @returns The calculated exp required.
+ */
+ calculateExp(skill: number, skillMult?: number): number;
}
/**
diff --git a/input/bitburner.api.json b/input/bitburner.api.json
index c3697693e..a93caa8b0 100644
--- a/input/bitburner.api.json
+++ b/input/bitburner.api.json
@@ -8575,12 +8575,12 @@
"members": [
{
"kind": "MethodSignature",
- "canonicalReference": "bitburner!GangFormulas#calculateMoneyGain:member(1)",
+ "canonicalReference": "bitburner!GangFormulas#moneyGain:member(1)",
"docComment": "/**\n * Calculate money gain per tick.\n *\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n *\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\n *\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\n *\n * @returns The calculated money gain.\n */\n",
"excerptTokens": [
{
"kind": "Content",
- "text": "calculateMoneyGain(gang: "
+ "text": "moneyGain(gang: "
},
{
"kind": "Reference",
@@ -8648,16 +8648,16 @@
}
}
],
- "name": "calculateMoneyGain"
+ "name": "moneyGain"
},
{
"kind": "MethodSignature",
- "canonicalReference": "bitburner!GangFormulas#calculateRespectGain:member(1)",
+ "canonicalReference": "bitburner!GangFormulas#respectGain:member(1)",
"docComment": "/**\n * Calculate respect gain per tick.\n *\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n *\n * @param member - Gang info from {@link Gang.getMemberInformation | getMemberInformation}\n *\n * @param task - Gang info from {@link Gang.getTaskStats | getTaskStats}\n *\n * @returns The calculated respect gain.\n */\n",
"excerptTokens": [
{
"kind": "Content",
- "text": "calculateRespectGain(gang: "
+ "text": "respectGain(gang: "
},
{
"kind": "Reference",
@@ -8725,16 +8725,16 @@
}
}
],
- "name": "calculateRespectGain"
+ "name": "respectGain"
},
{
"kind": "MethodSignature",
- "canonicalReference": "bitburner!GangFormulas#calculateWantedLevelGain:member(1)",
+ "canonicalReference": "bitburner!GangFormulas#wantedLevelGain:member(1)",
"docComment": "/**\n * Calculate wanted gain per tick.\n *\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n *\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\n *\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\n *\n * @returns The calculated wanted gain.\n */\n",
"excerptTokens": [
{
"kind": "Content",
- "text": "calculateWantedLevelGain(gang: "
+ "text": "wantedLevelGain(gang: "
},
{
"kind": "Reference",
@@ -8802,16 +8802,16 @@
}
}
],
- "name": "calculateWantedLevelGain"
+ "name": "wantedLevelGain"
},
{
"kind": "MethodSignature",
- "canonicalReference": "bitburner!GangFormulas#calculateWantedPenalty:member(1)",
+ "canonicalReference": "bitburner!GangFormulas#wantedPenalty:member(1)",
"docComment": "/**\n * Calculate the wanted penalty.\n *\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n *\n * @returns The calculated wanted penalty.\n */\n",
"excerptTokens": [
{
"kind": "Content",
- "text": "calculateWantedPenalty(gang: "
+ "text": "wantedPenalty(gang: "
},
{
"kind": "Reference",
@@ -8847,7 +8847,7 @@
}
}
],
- "name": "calculateWantedPenalty"
+ "name": "wantedPenalty"
}
],
"extendsTokenRanges": []
@@ -11159,7 +11159,7 @@
{
"kind": "Interface",
"canonicalReference": "bitburner!HackingFormulas:interface",
- "docComment": "/**\n * @public\n */\n",
+ "docComment": "/**\n * Hacking formulas\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -11172,15 +11172,16 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HackingFormulas#growPercent:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate the percent a server would grow.\n *\n * @param server - Server info from {@link NS.getServer | getServer}\n *\n * @param threads - Amount of thread.\n *\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n *\n * @param cores - Number of cores on the computer that will execute grow.\n *\n * @returns The calculated grow percent.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "growPercent(server: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Server",
+ "canonicalReference": "bitburner!Server:interface"
},
{
"kind": "Content",
@@ -11195,8 +11196,9 @@
"text": ", player: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Player",
+ "canonicalReference": "bitburner!Player:interface"
},
{
"kind": "Content",
@@ -11261,23 +11263,25 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HackingFormulas#growTime:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate grow time.\n *\n * @param server - Server info from {@link NS.getServer | getServer}\n *\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n *\n * @returns The calculated grow time.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "growTime(server: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Server",
+ "canonicalReference": "bitburner!Server:interface"
},
{
"kind": "Content",
"text": ", player: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Player",
+ "canonicalReference": "bitburner!Player:interface"
},
{
"kind": "Content",
@@ -11320,23 +11324,25 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HackingFormulas#hackChance:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate hack chance.\n *\n * @param server - Server info from {@link NS.getServer | getServer}\n *\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n *\n * @returns The calculated hack chance.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "hackChance(server: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Server",
+ "canonicalReference": "bitburner!Server:interface"
},
{
"kind": "Content",
"text": ", player: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Player",
+ "canonicalReference": "bitburner!Player:interface"
},
{
"kind": "Content",
@@ -11379,23 +11385,25 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HackingFormulas#hackExp:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate hack exp for one thread.\n *\n * @remarks\n *\n * Multiply by thread to get total exp\n *\n * @param server - Server info from {@link NS.getServer | getServer}\n *\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n *\n * @returns The calculated hack exp.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "hackExp(server: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Server",
+ "canonicalReference": "bitburner!Server:interface"
},
{
"kind": "Content",
"text": ", player: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Player",
+ "canonicalReference": "bitburner!Player:interface"
},
{
"kind": "Content",
@@ -11438,23 +11446,25 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HackingFormulas#hackPercent:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate hack percent for one thread.\n *\n * @remarks\n *\n * Multiply by thread to get total percent hacked.\n *\n * @param server - Server info from {@link NS.getServer | getServer}\n *\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n *\n * @returns The calculated hack percent.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "hackPercent(server: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Server",
+ "canonicalReference": "bitburner!Server:interface"
},
{
"kind": "Content",
"text": ", player: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Player",
+ "canonicalReference": "bitburner!Player:interface"
},
{
"kind": "Content",
@@ -11497,23 +11507,25 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HackingFormulas#hackTime:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate hack time.\n *\n * @param server - Server info from {@link NS.getServer | getServer}\n *\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n *\n * @returns The calculated hack time.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "hackTime(server: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Server",
+ "canonicalReference": "bitburner!Server:interface"
},
{
"kind": "Content",
"text": ", player: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Player",
+ "canonicalReference": "bitburner!Player:interface"
},
{
"kind": "Content",
@@ -11556,23 +11568,25 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HackingFormulas#weakenTime:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate weaken time.\n *\n * @param server - Server info from {@link NS.getServer | getServer}\n *\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n *\n * @returns The calculated weaken time.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "weakenTime(server: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Server",
+ "canonicalReference": "bitburner!Server:interface"
},
{
"kind": "Content",
"text": ", player: "
},
{
- "kind": "Content",
- "text": "number"
+ "kind": "Reference",
+ "text": "Player",
+ "canonicalReference": "bitburner!Player:interface"
},
{
"kind": "Content",
@@ -12788,7 +12802,7 @@
{
"kind": "Interface",
"canonicalReference": "bitburner!HacknetNodesFormulas:interface",
- "docComment": "/**\n * @public\n */\n",
+ "docComment": "/**\n * Hacknet Node formulas\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -12801,7 +12815,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetNodesFormulas#constants:member(1)",
- "docComment": "",
+ "docComment": "/**\n * All constants used by the game.\n *\n * @returns An object with all hacknet node constants used by the game.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -12829,7 +12843,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetNodesFormulas#coreUpgradeCost:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate cost of upgrading hacknet node cores.\n *\n * @param startingCore - starting cores\n *\n * @param extraCores - amount of cores to purchase (defaults to 1)\n *\n * @param costMult - player cost reduction (default to 1)\n *\n * @returns The calculated cost.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -12903,7 +12917,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetNodesFormulas#hacknetNodeCost:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate the cost of a hacknet node.\n *\n * @param n - number of the hacknet node\n *\n * @param mult - player cost reduction (defaults to 1)\n *\n * @returns The calculated cost.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -12962,7 +12976,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetNodesFormulas#levelUpgradeCost:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate cost of upgrading hacknet node level.\n *\n * @param startingLevel - starting level\n *\n * @param extraLevels - amount of level to purchase (defaults to 1)\n *\n * @param costMult - player cost reduction (default to 1)\n *\n * @returns The calculated cost.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -13036,7 +13050,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetNodesFormulas#moneyGainRate:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate money gain rate.\n *\n * @param level - level of the node.\n *\n * @param ram - ram of the node.\n *\n * @param cores - cores of the node.\n *\n * @param mult - player production mult (default to 1)\n *\n * @returns The calculated money gain rate.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -13125,7 +13139,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetNodesFormulas#ramUpgradeCost:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate cost of upgrading hacknet node ram.\n *\n * @param startingRam - starting ram\n *\n * @param extraLevels - amount of level of ram to purchase (defaults to 1)\n *\n * @param costMult - player cost reduction (default to 1)\n *\n * @returns The calculated cost.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -13202,7 +13216,7 @@
{
"kind": "Interface",
"canonicalReference": "bitburner!HacknetServersFormulas:interface",
- "docComment": "/**\n * @public\n */\n",
+ "docComment": "/**\n * Hacknet Server formulas\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -13215,7 +13229,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetServersFormulas#cacheUpgradeCost:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate cost of upgrading hacknet server cache.\n *\n * @param startingCache - starting cache level\n *\n * @param extraCache - amount of levels of cache to purchase (defaults to 1)\n *\n * @returns The calculated cost.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -13274,7 +13288,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetServersFormulas#constants:member(1)",
- "docComment": "",
+ "docComment": "/**\n * All constants used by the game.\n *\n * @returns An object with all hacknet server constants used by the game.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -13302,7 +13316,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetServersFormulas#coreUpgradeCost:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate cost of upgrading hacknet server cores.\n *\n * @param startingCore - starting cores\n *\n * @param extraCores - amount of cores to purchase (defaults to 1)\n *\n * @param costMult - player cost reduction (default to 1)\n *\n * @returns The calculated cost.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -13376,7 +13390,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetServersFormulas#hacknetServerCost:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate the cost of a hacknet server.\n *\n * @param n - number of the hacknet server\n *\n * @param mult - player cost reduction (defaults to 1)\n *\n * @returns The calculated cost.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -13388,7 +13402,7 @@
},
{
"kind": "Content",
- "text": ", mult: "
+ "text": ", mult?: "
},
{
"kind": "Content",
@@ -13435,7 +13449,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetServersFormulas#hashGainRate:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate hash gain rate.\n *\n * @param level - level of the server.\n *\n * @param ramUsed - ramUsed of the server.\n *\n * @param maxRam - maxRam of the server.\n *\n * @param cores - cores of the server.\n *\n * @param mult - player production mult (default to 1)\n *\n * @returns The calculated hash gain rate.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -13539,7 +13553,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetServersFormulas#hashUpgradeCost:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate hash cost of an upgrade.\n *\n * @param upgName - name of the upgrade\n *\n * @param level - level of the upgrade\n *\n * @returns The calculated hash cost.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -13598,7 +13612,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetServersFormulas#levelUpgradeCost:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate cost of upgrading hacknet server level.\n *\n * @param startingLevel - starting level\n *\n * @param extraLevels - amount of level to purchase (defaults to 1)\n *\n * @param costMult - player cost reduction (default to 1)\n *\n * @returns The calculated cost.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -13672,7 +13686,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!HacknetServersFormulas#ramUpgradeCost:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate cost of upgrading hacknet server ram.\n *\n * @param startingRam - starting ram\n *\n * @param extraLevels - amount of level of ram to purchase (defaults to 1)\n *\n * @param costMult - player cost reduction (default to 1)\n *\n * @returns The calculated cost.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -25825,7 +25839,7 @@
{
"kind": "Interface",
"canonicalReference": "bitburner!SkillsFormulas:interface",
- "docComment": "/**\n * @public\n */\n",
+ "docComment": "/**\n * Skills formulas\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -25838,7 +25852,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!SkillsFormulas#calculateExp:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate exp for skill level.\n *\n * @param skill - target skill level\n *\n * @param skillMult - Multiplier for that skill, defaults to 1.\n *\n * @returns The calculated exp required.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -25850,7 +25864,7 @@
},
{
"kind": "Content",
- "text": ", mult?: "
+ "text": ", skillMult?: "
},
{
"kind": "Content",
@@ -25885,7 +25899,7 @@
}
},
{
- "parameterName": "mult",
+ "parameterName": "skillMult",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
@@ -25897,7 +25911,7 @@
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!SkillsFormulas#calculateSkill:member(1)",
- "docComment": "",
+ "docComment": "/**\n * Calculate skill level.\n *\n * @param exp - experience for that skill\n *\n * @param skillMult - Multiplier for that skill, defaults to 1.\n *\n * @returns The calculated skill level.\n */\n",
"excerptTokens": [
{
"kind": "Content",
@@ -25909,7 +25923,7 @@
},
{
"kind": "Content",
- "text": ", mult?: "
+ "text": ", skillMult?: "
},
{
"kind": "Content",
@@ -25944,7 +25958,7 @@
}
},
{
- "parameterName": "mult",
+ "parameterName": "skillMult",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
diff --git a/markdown/bitburner.gangformulas.md b/markdown/bitburner.gangformulas.md
index 17a0111e6..76544524a 100644
--- a/markdown/bitburner.gangformulas.md
+++ b/markdown/bitburner.gangformulas.md
@@ -16,8 +16,8 @@ interface GangFormulas
| Method | Description |
| --- | --- |
-| [calculateMoneyGain(gang, member, task)](./bitburner.gangformulas.calculatemoneygain.md) | Calculate money gain per tick. |
-| [calculateRespectGain(gang, member, task)](./bitburner.gangformulas.calculaterespectgain.md) | Calculate respect gain per tick. |
-| [calculateWantedLevelGain(gang, member, task)](./bitburner.gangformulas.calculatewantedlevelgain.md) | Calculate wanted gain per tick. |
-| [calculateWantedPenalty(gang)](./bitburner.gangformulas.calculatewantedpenalty.md) | Calculate the wanted penalty. |
+| [moneyGain(gang, member, task)](./bitburner.gangformulas.moneygain.md) | Calculate money gain per tick. |
+| [respectGain(gang, member, task)](./bitburner.gangformulas.respectgain.md) | Calculate respect gain per tick. |
+| [wantedLevelGain(gang, member, task)](./bitburner.gangformulas.wantedlevelgain.md) | Calculate wanted gain per tick. |
+| [wantedPenalty(gang)](./bitburner.gangformulas.wantedpenalty.md) | Calculate the wanted penalty. |
diff --git a/markdown/bitburner.gangformulas.calculatemoneygain.md b/markdown/bitburner.gangformulas.moneygain.md
similarity index 75%
rename from markdown/bitburner.gangformulas.calculatemoneygain.md
rename to markdown/bitburner.gangformulas.moneygain.md
index 207a70750..4eec2828a 100644
--- a/markdown/bitburner.gangformulas.calculatemoneygain.md
+++ b/markdown/bitburner.gangformulas.moneygain.md
@@ -1,15 +1,15 @@
-[Home](./index.md) > [bitburner](./bitburner.md) > [GangFormulas](./bitburner.gangformulas.md) > [calculateMoneyGain](./bitburner.gangformulas.calculatemoneygain.md)
+[Home](./index.md) > [bitburner](./bitburner.md) > [GangFormulas](./bitburner.gangformulas.md) > [moneyGain](./bitburner.gangformulas.moneygain.md)
-## GangFormulas.calculateMoneyGain() method
+## GangFormulas.moneyGain() method
Calculate money gain per tick.
Signature:
```typescript
-calculateMoneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
+moneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
```
## Parameters
diff --git a/markdown/bitburner.gangformulas.calculaterespectgain.md b/markdown/bitburner.gangformulas.respectgain.md
similarity index 74%
rename from markdown/bitburner.gangformulas.calculaterespectgain.md
rename to markdown/bitburner.gangformulas.respectgain.md
index 7548a02de..3bc6e4f49 100644
--- a/markdown/bitburner.gangformulas.calculaterespectgain.md
+++ b/markdown/bitburner.gangformulas.respectgain.md
@@ -1,15 +1,15 @@
-[Home](./index.md) > [bitburner](./bitburner.md) > [GangFormulas](./bitburner.gangformulas.md) > [calculateRespectGain](./bitburner.gangformulas.calculaterespectgain.md)
+[Home](./index.md) > [bitburner](./bitburner.md) > [GangFormulas](./bitburner.gangformulas.md) > [respectGain](./bitburner.gangformulas.respectgain.md)
-## GangFormulas.calculateRespectGain() method
+## GangFormulas.respectGain() method
Calculate respect gain per tick.
Signature:
```typescript
-calculateRespectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
+respectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
```
## Parameters
diff --git a/markdown/bitburner.gangformulas.calculatewantedlevelgain.md b/markdown/bitburner.gangformulas.wantedlevelgain.md
similarity index 73%
rename from markdown/bitburner.gangformulas.calculatewantedlevelgain.md
rename to markdown/bitburner.gangformulas.wantedlevelgain.md
index e3a03e58f..f86d30fef 100644
--- a/markdown/bitburner.gangformulas.calculatewantedlevelgain.md
+++ b/markdown/bitburner.gangformulas.wantedlevelgain.md
@@ -1,15 +1,15 @@
-[Home](./index.md) > [bitburner](./bitburner.md) > [GangFormulas](./bitburner.gangformulas.md) > [calculateWantedLevelGain](./bitburner.gangformulas.calculatewantedlevelgain.md)
+[Home](./index.md) > [bitburner](./bitburner.md) > [GangFormulas](./bitburner.gangformulas.md) > [wantedLevelGain](./bitburner.gangformulas.wantedlevelgain.md)
-## GangFormulas.calculateWantedLevelGain() method
+## GangFormulas.wantedLevelGain() method
Calculate wanted gain per tick.
Signature:
```typescript
-calculateWantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
+wantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
```
## Parameters
diff --git a/markdown/bitburner.gangformulas.calculatewantedpenalty.md b/markdown/bitburner.gangformulas.wantedpenalty.md
similarity index 68%
rename from markdown/bitburner.gangformulas.calculatewantedpenalty.md
rename to markdown/bitburner.gangformulas.wantedpenalty.md
index 87e65a97e..966de0885 100644
--- a/markdown/bitburner.gangformulas.calculatewantedpenalty.md
+++ b/markdown/bitburner.gangformulas.wantedpenalty.md
@@ -1,15 +1,15 @@
-[Home](./index.md) > [bitburner](./bitburner.md) > [GangFormulas](./bitburner.gangformulas.md) > [calculateWantedPenalty](./bitburner.gangformulas.calculatewantedpenalty.md)
+[Home](./index.md) > [bitburner](./bitburner.md) > [GangFormulas](./bitburner.gangformulas.md) > [wantedPenalty](./bitburner.gangformulas.wantedpenalty.md)
-## GangFormulas.calculateWantedPenalty() method
+## GangFormulas.wantedPenalty() method
Calculate the wanted penalty.
Signature:
```typescript
-calculateWantedPenalty(gang: GangGenInfo): number;
+wantedPenalty(gang: GangGenInfo): number;
```
## Parameters
diff --git a/markdown/bitburner.hackingformulas.growpercent.md b/markdown/bitburner.hackingformulas.growpercent.md
index 2f5b41026..066e9fa8e 100644
--- a/markdown/bitburner.hackingformulas.growpercent.md
+++ b/markdown/bitburner.hackingformulas.growpercent.md
@@ -4,22 +4,26 @@
## HackingFormulas.growPercent() method
+Calculate the percent a server would grow.
+
Signature:
```typescript
-growPercent(server: number, threads: number, player: number, cores?: number): number;
+growPercent(server: Server, threads: number, player: Player, cores?: number): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| server | number | |
-| threads | number | |
-| player | number | |
-| cores | number | |
+| server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) |
+| threads | number | Amount of thread. |
+| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) |
+| cores | number | Number of cores on the computer that will execute grow. |
Returns:
number
+The calculated grow percent.
+
diff --git a/markdown/bitburner.hackingformulas.growtime.md b/markdown/bitburner.hackingformulas.growtime.md
index 619bbaf4b..8d9f9c2b0 100644
--- a/markdown/bitburner.hackingformulas.growtime.md
+++ b/markdown/bitburner.hackingformulas.growtime.md
@@ -4,20 +4,24 @@
## HackingFormulas.growTime() method
+Calculate grow time.
+
Signature:
```typescript
-growTime(server: number, player: number): number;
+growTime(server: Server, player: Player): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| server | number | |
-| player | number | |
+| server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) |
+| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) |
Returns:
number
+The calculated grow time.
+
diff --git a/markdown/bitburner.hackingformulas.hackchance.md b/markdown/bitburner.hackingformulas.hackchance.md
index 0f1ee84ae..7a455cf22 100644
--- a/markdown/bitburner.hackingformulas.hackchance.md
+++ b/markdown/bitburner.hackingformulas.hackchance.md
@@ -4,20 +4,24 @@
## HackingFormulas.hackChance() method
+Calculate hack chance.
+
Signature:
```typescript
-hackChance(server: number, player: number): number;
+hackChance(server: Server, player: Player): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| server | number | |
-| player | number | |
+| server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) |
+| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) |
Returns:
number
+The calculated hack chance.
+
diff --git a/markdown/bitburner.hackingformulas.hackexp.md b/markdown/bitburner.hackingformulas.hackexp.md
index 2988d2f4c..5992a5f94 100644
--- a/markdown/bitburner.hackingformulas.hackexp.md
+++ b/markdown/bitburner.hackingformulas.hackexp.md
@@ -4,20 +4,28 @@
## HackingFormulas.hackExp() method
+Calculate hack exp for one thread.
+
Signature:
```typescript
-hackExp(server: number, player: number): number;
+hackExp(server: Server, player: Player): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| server | number | |
-| player | number | |
+| server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) |
+| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) |
Returns:
number
+The calculated hack exp.
+
+## Remarks
+
+Multiply by thread to get total exp
+
diff --git a/markdown/bitburner.hackingformulas.hackpercent.md b/markdown/bitburner.hackingformulas.hackpercent.md
index 6df93676b..8c021dc0f 100644
--- a/markdown/bitburner.hackingformulas.hackpercent.md
+++ b/markdown/bitburner.hackingformulas.hackpercent.md
@@ -4,20 +4,28 @@
## HackingFormulas.hackPercent() method
+Calculate hack percent for one thread.
+
Signature:
```typescript
-hackPercent(server: number, player: number): number;
+hackPercent(server: Server, player: Player): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| server | number | |
-| player | number | |
+| server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) |
+| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) |
Returns:
number
+The calculated hack percent.
+
+## Remarks
+
+Multiply by thread to get total percent hacked.
+
diff --git a/markdown/bitburner.hackingformulas.hacktime.md b/markdown/bitburner.hackingformulas.hacktime.md
index 1b44a62c0..b1bcd35e0 100644
--- a/markdown/bitburner.hackingformulas.hacktime.md
+++ b/markdown/bitburner.hackingformulas.hacktime.md
@@ -4,20 +4,24 @@
## HackingFormulas.hackTime() method
+Calculate hack time.
+
Signature:
```typescript
-hackTime(server: number, player: number): number;
+hackTime(server: Server, player: Player): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| server | number | |
-| player | number | |
+| server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) |
+| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) |
Returns:
number
+The calculated hack time.
+
diff --git a/markdown/bitburner.hackingformulas.md b/markdown/bitburner.hackingformulas.md
index 71a8d6249..0f3eb2298 100644
--- a/markdown/bitburner.hackingformulas.md
+++ b/markdown/bitburner.hackingformulas.md
@@ -4,6 +4,7 @@
## HackingFormulas interface
+Hacking formulas
Signature:
@@ -15,11 +16,11 @@ interface HackingFormulas
| Method | Description |
| --- | --- |
-| [growPercent(server, threads, player, cores)](./bitburner.hackingformulas.growpercent.md) | |
-| [growTime(server, player)](./bitburner.hackingformulas.growtime.md) | |
-| [hackChance(server, player)](./bitburner.hackingformulas.hackchance.md) | |
-| [hackExp(server, player)](./bitburner.hackingformulas.hackexp.md) | |
-| [hackPercent(server, player)](./bitburner.hackingformulas.hackpercent.md) | |
-| [hackTime(server, player)](./bitburner.hackingformulas.hacktime.md) | |
-| [weakenTime(server, player)](./bitburner.hackingformulas.weakentime.md) | |
+| [growPercent(server, threads, player, cores)](./bitburner.hackingformulas.growpercent.md) | Calculate the percent a server would grow. |
+| [growTime(server, player)](./bitburner.hackingformulas.growtime.md) | Calculate grow time. |
+| [hackChance(server, player)](./bitburner.hackingformulas.hackchance.md) | Calculate hack chance. |
+| [hackExp(server, player)](./bitburner.hackingformulas.hackexp.md) | Calculate hack exp for one thread. |
+| [hackPercent(server, player)](./bitburner.hackingformulas.hackpercent.md) | Calculate hack percent for one thread. |
+| [hackTime(server, player)](./bitburner.hackingformulas.hacktime.md) | Calculate hack time. |
+| [weakenTime(server, player)](./bitburner.hackingformulas.weakentime.md) | Calculate weaken time. |
diff --git a/markdown/bitburner.hackingformulas.weakentime.md b/markdown/bitburner.hackingformulas.weakentime.md
index a0bcb3065..78190bb40 100644
--- a/markdown/bitburner.hackingformulas.weakentime.md
+++ b/markdown/bitburner.hackingformulas.weakentime.md
@@ -4,20 +4,24 @@
## HackingFormulas.weakenTime() method
+Calculate weaken time.
+
Signature:
```typescript
-weakenTime(server: number, player: number): number;
+weakenTime(server: Server, player: Player): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| server | number | |
-| player | number | |
+| server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) |
+| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) |
Returns:
number
+The calculated weaken time.
+
diff --git a/markdown/bitburner.hacknetnodesformulas.constants.md b/markdown/bitburner.hacknetnodesformulas.constants.md
index a2a56ec42..15c84f42d 100644
--- a/markdown/bitburner.hacknetnodesformulas.constants.md
+++ b/markdown/bitburner.hacknetnodesformulas.constants.md
@@ -4,6 +4,8 @@
## HacknetNodesFormulas.constants() method
+All constants used by the game.
+
Signature:
```typescript
@@ -13,3 +15,5 @@ constants(): number;
number
+An object with all hacknet node constants used by the game.
+
diff --git a/markdown/bitburner.hacknetnodesformulas.coreupgradecost.md b/markdown/bitburner.hacknetnodesformulas.coreupgradecost.md
index 25f37667a..3217b4cb7 100644
--- a/markdown/bitburner.hacknetnodesformulas.coreupgradecost.md
+++ b/markdown/bitburner.hacknetnodesformulas.coreupgradecost.md
@@ -4,6 +4,8 @@
## HacknetNodesFormulas.coreUpgradeCost() method
+Calculate cost of upgrading hacknet node cores.
+
Signature:
```typescript
@@ -14,11 +16,13 @@ coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): n
| Parameter | Type | Description |
| --- | --- | --- |
-| startingCore | number | |
-| extraCores | number | |
-| costMult | number | |
+| startingCore | number | starting cores |
+| extraCores | number | amount of cores to purchase (defaults to 1) |
+| costMult | number | player cost reduction (default to 1) |
Returns:
number
+The calculated cost.
+
diff --git a/markdown/bitburner.hacknetnodesformulas.hacknetnodecost.md b/markdown/bitburner.hacknetnodesformulas.hacknetnodecost.md
index d049f7b7d..7d88ecf86 100644
--- a/markdown/bitburner.hacknetnodesformulas.hacknetnodecost.md
+++ b/markdown/bitburner.hacknetnodesformulas.hacknetnodecost.md
@@ -4,6 +4,8 @@
## HacknetNodesFormulas.hacknetNodeCost() method
+Calculate the cost of a hacknet node.
+
Signature:
```typescript
@@ -14,10 +16,12 @@ hacknetNodeCost(n: number, mult: number): number;
| Parameter | Type | Description |
| --- | --- | --- |
-| n | number | |
-| mult | number | |
+| n | number | number of the hacknet node |
+| mult | number | player cost reduction (defaults to 1) |
Returns:
number
+The calculated cost.
+
diff --git a/markdown/bitburner.hacknetnodesformulas.levelupgradecost.md b/markdown/bitburner.hacknetnodesformulas.levelupgradecost.md
index a62f371ba..53ac8090c 100644
--- a/markdown/bitburner.hacknetnodesformulas.levelupgradecost.md
+++ b/markdown/bitburner.hacknetnodesformulas.levelupgradecost.md
@@ -4,6 +4,8 @@
## HacknetNodesFormulas.levelUpgradeCost() method
+Calculate cost of upgrading hacknet node level.
+
Signature:
```typescript
@@ -14,11 +16,13 @@ levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number)
| Parameter | Type | Description |
| --- | --- | --- |
-| startingLevel | number | |
-| extraLevels | number | |
-| costMult | number | |
+| startingLevel | number | starting level |
+| extraLevels | number | amount of level to purchase (defaults to 1) |
+| costMult | number | player cost reduction (default to 1) |
Returns:
number
+The calculated cost.
+
diff --git a/markdown/bitburner.hacknetnodesformulas.md b/markdown/bitburner.hacknetnodesformulas.md
index dcab4a1d9..90f7bc4ee 100644
--- a/markdown/bitburner.hacknetnodesformulas.md
+++ b/markdown/bitburner.hacknetnodesformulas.md
@@ -4,6 +4,7 @@
## HacknetNodesFormulas interface
+Hacknet Node formulas
Signature:
@@ -15,10 +16,10 @@ interface HacknetNodesFormulas
| Method | Description |
| --- | --- |
-| [constants()](./bitburner.hacknetnodesformulas.constants.md) | |
-| [coreUpgradeCost(startingCore, extraCores, costMult)](./bitburner.hacknetnodesformulas.coreupgradecost.md) | |
-| [hacknetNodeCost(n, mult)](./bitburner.hacknetnodesformulas.hacknetnodecost.md) | |
-| [levelUpgradeCost(startingLevel, extraLevels, costMult)](./bitburner.hacknetnodesformulas.levelupgradecost.md) | |
-| [moneyGainRate(level, ram, cores, mult)](./bitburner.hacknetnodesformulas.moneygainrate.md) | |
-| [ramUpgradeCost(startingRam, extraLevels, costMult)](./bitburner.hacknetnodesformulas.ramupgradecost.md) | |
+| [constants()](./bitburner.hacknetnodesformulas.constants.md) | All constants used by the game. |
+| [coreUpgradeCost(startingCore, extraCores, costMult)](./bitburner.hacknetnodesformulas.coreupgradecost.md) | Calculate cost of upgrading hacknet node cores. |
+| [hacknetNodeCost(n, mult)](./bitburner.hacknetnodesformulas.hacknetnodecost.md) | Calculate the cost of a hacknet node. |
+| [levelUpgradeCost(startingLevel, extraLevels, costMult)](./bitburner.hacknetnodesformulas.levelupgradecost.md) | Calculate cost of upgrading hacknet node level. |
+| [moneyGainRate(level, ram, cores, mult)](./bitburner.hacknetnodesformulas.moneygainrate.md) | Calculate money gain rate. |
+| [ramUpgradeCost(startingRam, extraLevels, costMult)](./bitburner.hacknetnodesformulas.ramupgradecost.md) | Calculate cost of upgrading hacknet node ram. |
diff --git a/markdown/bitburner.hacknetnodesformulas.moneygainrate.md b/markdown/bitburner.hacknetnodesformulas.moneygainrate.md
index fd0d181f7..deb51878f 100644
--- a/markdown/bitburner.hacknetnodesformulas.moneygainrate.md
+++ b/markdown/bitburner.hacknetnodesformulas.moneygainrate.md
@@ -4,6 +4,8 @@
## HacknetNodesFormulas.moneyGainRate() method
+Calculate money gain rate.
+
Signature:
```typescript
@@ -14,12 +16,14 @@ moneyGainRate(level: number, ram: number, cores: number, mult?: number): number;
| Parameter | Type | Description |
| --- | --- | --- |
-| level | number | |
-| ram | number | |
-| cores | number | |
-| mult | number | |
+| level | number | level of the node. |
+| ram | number | ram of the node. |
+| cores | number | cores of the node. |
+| mult | number | player production mult (default to 1) |
Returns:
number
+The calculated money gain rate.
+
diff --git a/markdown/bitburner.hacknetnodesformulas.ramupgradecost.md b/markdown/bitburner.hacknetnodesformulas.ramupgradecost.md
index ef60186a9..6be6a5c01 100644
--- a/markdown/bitburner.hacknetnodesformulas.ramupgradecost.md
+++ b/markdown/bitburner.hacknetnodesformulas.ramupgradecost.md
@@ -4,6 +4,8 @@
## HacknetNodesFormulas.ramUpgradeCost() method
+Calculate cost of upgrading hacknet node ram.
+
Signature:
```typescript
@@ -14,11 +16,13 @@ ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): nu
| Parameter | Type | Description |
| --- | --- | --- |
-| startingRam | number | |
-| extraLevels | number | |
-| costMult | number | |
+| startingRam | number | starting ram |
+| extraLevels | number | amount of level of ram to purchase (defaults to 1) |
+| costMult | number | player cost reduction (default to 1) |
Returns:
number
+The calculated cost.
+
diff --git a/markdown/bitburner.hacknetserversformulas.cacheupgradecost.md b/markdown/bitburner.hacknetserversformulas.cacheupgradecost.md
index 7e36640ea..cf7a00710 100644
--- a/markdown/bitburner.hacknetserversformulas.cacheupgradecost.md
+++ b/markdown/bitburner.hacknetserversformulas.cacheupgradecost.md
@@ -4,6 +4,8 @@
## HacknetServersFormulas.cacheUpgradeCost() method
+Calculate cost of upgrading hacknet server cache.
+
Signature:
```typescript
@@ -14,10 +16,12 @@ cacheUpgradeCost(startingCache: number, extraCache?: number): number;
| Parameter | Type | Description |
| --- | --- | --- |
-| startingCache | number | |
-| extraCache | number | |
+| startingCache | number | starting cache level |
+| extraCache | number | amount of levels of cache to purchase (defaults to 1) |
Returns:
number
+The calculated cost.
+
diff --git a/markdown/bitburner.hacknetserversformulas.constants.md b/markdown/bitburner.hacknetserversformulas.constants.md
index 1e281b86b..e0a224904 100644
--- a/markdown/bitburner.hacknetserversformulas.constants.md
+++ b/markdown/bitburner.hacknetserversformulas.constants.md
@@ -4,6 +4,8 @@
## HacknetServersFormulas.constants() method
+All constants used by the game.
+
Signature:
```typescript
@@ -13,3 +15,5 @@ constants(): any;
any
+An object with all hacknet server constants used by the game.
+
diff --git a/markdown/bitburner.hacknetserversformulas.coreupgradecost.md b/markdown/bitburner.hacknetserversformulas.coreupgradecost.md
index 522f7f159..82bcc923d 100644
--- a/markdown/bitburner.hacknetserversformulas.coreupgradecost.md
+++ b/markdown/bitburner.hacknetserversformulas.coreupgradecost.md
@@ -4,6 +4,8 @@
## HacknetServersFormulas.coreUpgradeCost() method
+Calculate cost of upgrading hacknet server cores.
+
Signature:
```typescript
@@ -14,11 +16,13 @@ coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): n
| Parameter | Type | Description |
| --- | --- | --- |
-| startingCore | number | |
-| extraCores | number | |
-| costMult | number | |
+| startingCore | number | starting cores |
+| extraCores | number | amount of cores to purchase (defaults to 1) |
+| costMult | number | player cost reduction (default to 1) |
Returns:
number
+The calculated cost.
+
diff --git a/markdown/bitburner.hacknetserversformulas.hacknetservercost.md b/markdown/bitburner.hacknetserversformulas.hacknetservercost.md
index 3cddc7380..55f7fd29a 100644
--- a/markdown/bitburner.hacknetserversformulas.hacknetservercost.md
+++ b/markdown/bitburner.hacknetserversformulas.hacknetservercost.md
@@ -4,20 +4,24 @@
## HacknetServersFormulas.hacknetServerCost() method
+Calculate the cost of a hacknet server.
+
Signature:
```typescript
-hacknetServerCost(n: number, mult: number): number;
+hacknetServerCost(n: number, mult?: number): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| n | number | |
-| mult | number | |
+| n | number | number of the hacknet server |
+| mult | number | player cost reduction (defaults to 1) |
Returns:
number
+The calculated cost.
+
diff --git a/markdown/bitburner.hacknetserversformulas.hashgainrate.md b/markdown/bitburner.hacknetserversformulas.hashgainrate.md
index 295fd320b..51c960448 100644
--- a/markdown/bitburner.hacknetserversformulas.hashgainrate.md
+++ b/markdown/bitburner.hacknetserversformulas.hashgainrate.md
@@ -4,6 +4,8 @@
## HacknetServersFormulas.hashGainRate() method
+Calculate hash gain rate.
+
Signature:
```typescript
@@ -14,13 +16,15 @@ hashGainRate(level: number, ramUsed: number, maxRam: number, cores: number, mult
| Parameter | Type | Description |
| --- | --- | --- |
-| level | number | |
-| ramUsed | number | |
-| maxRam | number | |
-| cores | number | |
-| mult | number | |
+| level | number | level of the server. |
+| ramUsed | number | ramUsed of the server. |
+| maxRam | number | maxRam of the server. |
+| cores | number | cores of the server. |
+| mult | number | player production mult (default to 1) |
Returns:
number
+The calculated hash gain rate.
+
diff --git a/markdown/bitburner.hacknetserversformulas.hashupgradecost.md b/markdown/bitburner.hacknetserversformulas.hashupgradecost.md
index c9ab42b12..0cc4ec42b 100644
--- a/markdown/bitburner.hacknetserversformulas.hashupgradecost.md
+++ b/markdown/bitburner.hacknetserversformulas.hashupgradecost.md
@@ -4,6 +4,8 @@
## HacknetServersFormulas.hashUpgradeCost() method
+Calculate hash cost of an upgrade.
+
Signature:
```typescript
@@ -14,10 +16,12 @@ hashUpgradeCost(upgName: number, level: number): number;
| Parameter | Type | Description |
| --- | --- | --- |
-| upgName | number | |
-| level | number | |
+| upgName | number | name of the upgrade |
+| level | number | level of the upgrade |
Returns:
number
+The calculated hash cost.
+
diff --git a/markdown/bitburner.hacknetserversformulas.levelupgradecost.md b/markdown/bitburner.hacknetserversformulas.levelupgradecost.md
index 5b4f37aa1..de10d2a62 100644
--- a/markdown/bitburner.hacknetserversformulas.levelupgradecost.md
+++ b/markdown/bitburner.hacknetserversformulas.levelupgradecost.md
@@ -4,6 +4,8 @@
## HacknetServersFormulas.levelUpgradeCost() method
+Calculate cost of upgrading hacknet server level.
+
Signature:
```typescript
@@ -14,11 +16,13 @@ levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number)
| Parameter | Type | Description |
| --- | --- | --- |
-| startingLevel | number | |
-| extraLevels | number | |
-| costMult | number | |
+| startingLevel | number | starting level |
+| extraLevels | number | amount of level to purchase (defaults to 1) |
+| costMult | number | player cost reduction (default to 1) |
Returns:
number
+The calculated cost.
+
diff --git a/markdown/bitburner.hacknetserversformulas.md b/markdown/bitburner.hacknetserversformulas.md
index 20cc00231..059e4ba39 100644
--- a/markdown/bitburner.hacknetserversformulas.md
+++ b/markdown/bitburner.hacknetserversformulas.md
@@ -4,6 +4,7 @@
## HacknetServersFormulas interface
+Hacknet Server formulas
Signature:
@@ -15,12 +16,12 @@ interface HacknetServersFormulas
| Method | Description |
| --- | --- |
-| [cacheUpgradeCost(startingCache, extraCache)](./bitburner.hacknetserversformulas.cacheupgradecost.md) | |
-| [constants()](./bitburner.hacknetserversformulas.constants.md) | |
-| [coreUpgradeCost(startingCore, extraCores, costMult)](./bitburner.hacknetserversformulas.coreupgradecost.md) | |
-| [hacknetServerCost(n, mult)](./bitburner.hacknetserversformulas.hacknetservercost.md) | |
-| [hashGainRate(level, ramUsed, maxRam, cores, mult)](./bitburner.hacknetserversformulas.hashgainrate.md) | |
-| [hashUpgradeCost(upgName, level)](./bitburner.hacknetserversformulas.hashupgradecost.md) | |
-| [levelUpgradeCost(startingLevel, extraLevels, costMult)](./bitburner.hacknetserversformulas.levelupgradecost.md) | |
-| [ramUpgradeCost(startingRam, extraLevels, costMult)](./bitburner.hacknetserversformulas.ramupgradecost.md) | |
+| [cacheUpgradeCost(startingCache, extraCache)](./bitburner.hacknetserversformulas.cacheupgradecost.md) | Calculate cost of upgrading hacknet server cache. |
+| [constants()](./bitburner.hacknetserversformulas.constants.md) | All constants used by the game. |
+| [coreUpgradeCost(startingCore, extraCores, costMult)](./bitburner.hacknetserversformulas.coreupgradecost.md) | Calculate cost of upgrading hacknet server cores. |
+| [hacknetServerCost(n, mult)](./bitburner.hacknetserversformulas.hacknetservercost.md) | Calculate the cost of a hacknet server. |
+| [hashGainRate(level, ramUsed, maxRam, cores, mult)](./bitburner.hacknetserversformulas.hashgainrate.md) | Calculate hash gain rate. |
+| [hashUpgradeCost(upgName, level)](./bitburner.hacknetserversformulas.hashupgradecost.md) | Calculate hash cost of an upgrade. |
+| [levelUpgradeCost(startingLevel, extraLevels, costMult)](./bitburner.hacknetserversformulas.levelupgradecost.md) | Calculate cost of upgrading hacknet server level. |
+| [ramUpgradeCost(startingRam, extraLevels, costMult)](./bitburner.hacknetserversformulas.ramupgradecost.md) | Calculate cost of upgrading hacknet server ram. |
diff --git a/markdown/bitburner.hacknetserversformulas.ramupgradecost.md b/markdown/bitburner.hacknetserversformulas.ramupgradecost.md
index ab153d74c..1cd2c4b43 100644
--- a/markdown/bitburner.hacknetserversformulas.ramupgradecost.md
+++ b/markdown/bitburner.hacknetserversformulas.ramupgradecost.md
@@ -4,6 +4,8 @@
## HacknetServersFormulas.ramUpgradeCost() method
+Calculate cost of upgrading hacknet server ram.
+
Signature:
```typescript
@@ -14,11 +16,13 @@ ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): nu
| Parameter | Type | Description |
| --- | --- | --- |
-| startingRam | number | |
-| extraLevels | number | |
-| costMult | number | |
+| startingRam | number | starting ram |
+| extraLevels | number | amount of level of ram to purchase (defaults to 1) |
+| costMult | number | player cost reduction (default to 1) |
Returns:
number
+The calculated cost.
+
diff --git a/markdown/bitburner.md b/markdown/bitburner.md
index 732ebe9ff..43a70c80d 100644
--- a/markdown/bitburner.md
+++ b/markdown/bitburner.md
@@ -37,12 +37,12 @@
| [GangOtherInfoObject](./bitburner.gangotherinfoobject.md) | |
| [GangTaskStats](./bitburner.gangtaskstats.md) | Object representing data representing a gang member task. |
| [GangTerritory](./bitburner.gangterritory.md) | |
-| [HackingFormulas](./bitburner.hackingformulas.md) | |
+| [HackingFormulas](./bitburner.hackingformulas.md) | Hacking formulas |
| [HackingMultipliers](./bitburner.hackingmultipliers.md) | Hack related multipliers. |
| [Hacknet](./bitburner.hacknet.md) | Hacknet API |
| [HacknetMultipliers](./bitburner.hacknetmultipliers.md) | Hacknet related multipliers. |
-| [HacknetNodesFormulas](./bitburner.hacknetnodesformulas.md) | |
-| [HacknetServersFormulas](./bitburner.hacknetserversformulas.md) | |
+| [HacknetNodesFormulas](./bitburner.hacknetnodesformulas.md) | Hacknet Node formulas |
+| [HacknetServersFormulas](./bitburner.hacknetserversformulas.md) | Hacknet Server formulas |
| [Material](./bitburner.material.md) | |
| [NodeStats](./bitburner.nodestats.md) | Object representing all the values related to a hacknet node. |
| [NS](./bitburner.ns.md) | Collection of all functions passed to scripts |
@@ -55,7 +55,7 @@
| [RunningScript](./bitburner.runningscript.md) | |
| [Server](./bitburner.server.md) | A single server. |
| [Singularity](./bitburner.singularity.md) | Singularity API |
-| [SkillsFormulas](./bitburner.skillsformulas.md) | |
+| [SkillsFormulas](./bitburner.skillsformulas.md) | Skills formulas |
| [Sleeve](./bitburner.sleeve.md) | Sleeve API |
| [SleeveInformation](./bitburner.sleeveinformation.md) | Object representing sleeve information. |
| [SleeveSkills](./bitburner.sleeveskills.md) | Object representing a sleeve stats. |
diff --git a/markdown/bitburner.skillsformulas.calculateexp.md b/markdown/bitburner.skillsformulas.calculateexp.md
index b4213e755..bf4dd7027 100644
--- a/markdown/bitburner.skillsformulas.calculateexp.md
+++ b/markdown/bitburner.skillsformulas.calculateexp.md
@@ -4,20 +4,24 @@
## SkillsFormulas.calculateExp() method
+Calculate exp for skill level.
+
Signature:
```typescript
-calculateExp(skill: number, mult?: number): number;
+calculateExp(skill: number, skillMult?: number): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| skill | number | |
-| mult | number | |
+| skill | number | target skill level |
+| skillMult | number | Multiplier for that skill, defaults to 1. |
Returns:
number
+The calculated exp required.
+
diff --git a/markdown/bitburner.skillsformulas.calculateskill.md b/markdown/bitburner.skillsformulas.calculateskill.md
index 01465e01d..09a1609d2 100644
--- a/markdown/bitburner.skillsformulas.calculateskill.md
+++ b/markdown/bitburner.skillsformulas.calculateskill.md
@@ -4,20 +4,24 @@
## SkillsFormulas.calculateSkill() method
+Calculate skill level.
+
Signature:
```typescript
-calculateSkill(exp: number, mult?: number): number;
+calculateSkill(exp: number, skillMult?: number): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| exp | number | |
-| mult | number | |
+| exp | number | experience for that skill |
+| skillMult | number | Multiplier for that skill, defaults to 1. |
Returns:
number
+The calculated skill level.
+
diff --git a/markdown/bitburner.skillsformulas.md b/markdown/bitburner.skillsformulas.md
index eb08414b6..223495210 100644
--- a/markdown/bitburner.skillsformulas.md
+++ b/markdown/bitburner.skillsformulas.md
@@ -4,6 +4,7 @@
## SkillsFormulas interface
+Skills formulas
Signature:
@@ -15,6 +16,6 @@ interface SkillsFormulas
| Method | Description |
| --- | --- |
-| [calculateExp(skill, mult)](./bitburner.skillsformulas.calculateexp.md) | |
-| [calculateSkill(exp, mult)](./bitburner.skillsformulas.calculateskill.md) | |
+| [calculateExp(skill, skillMult)](./bitburner.skillsformulas.calculateexp.md) | Calculate exp for skill level. |
+| [calculateSkill(exp, skillMult)](./bitburner.skillsformulas.calculateskill.md) | Calculate skill level. |
diff --git a/src/NetscriptFunctions/Formulas.ts b/src/NetscriptFunctions/Formulas.ts
index 28161f1d1..a3861b647 100644
--- a/src/NetscriptFunctions/Formulas.ts
+++ b/src/NetscriptFunctions/Formulas.ts
@@ -175,7 +175,7 @@ export function NetscriptFormulas(player: IPlayer, workerScript: WorkerScript, h
}
return upg.getCost(level);
},
- hacknetServerCost: function (n: any, mult: any): any {
+ hacknetServerCost: function (n: any, mult: any = 1): any {
checkFormulasAccess("hacknetServers.hacknetServerCost");
return HScalculateServerCost(n, mult);
},
diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts
index 0bed2c63c..c8d89384b 100644
--- a/src/ScriptEditor/NetscriptDefinitions.d.ts
+++ b/src/ScriptEditor/NetscriptDefinitions.d.ts
@@ -3308,35 +3308,137 @@ export interface Sleeve {
}
/**
+ * Skills formulas
* @public
*/
interface SkillsFormulas {
- calculateSkill(exp: number, mult?: number): number;
- calculateExp(skill: number, mult?: number): number;
+ /**
+ * Calculate skill level.
+ * @param exp - experience for that skill
+ * @param skillMult - Multiplier for that skill, defaults to 1.
+ * @returns The calculated skill level.
+ */
+ calculateSkill(exp: number, skillMult?: number): number;
+ /**
+ * Calculate exp for skill level.
+ * @param skill - target skill level
+ * @param skillMult - Multiplier for that skill, defaults to 1.
+ * @returns The calculated exp required.
+ */
+ calculateExp(skill: number, skillMult?: number): number;
}
/**
+ * Hacking formulas
* @public
*/
interface HackingFormulas {
- hackChance(server: number, player: number): number;
- hackExp(server: number, player: number): number;
- hackPercent(server: number, player: number): number;
- growPercent(server: number, threads: number, player: number, cores?: number): number;
- hackTime(server: number, player: number): number;
- growTime(server: number, player: number): number;
- weakenTime(server: number, player: number): number;
+ /**
+ * Calculate hack chance.
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @returns The calculated hack chance.
+ */
+ hackChance(server: Server, player: Player): number;
+ /**
+ * Calculate hack exp for one thread.
+ * @remarks
+ * Multiply by thread to get total exp
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @returns The calculated hack exp.
+ */
+ hackExp(server: Server, player: Player): number;
+ /**
+ * Calculate hack percent for one thread.
+ * @remarks
+ * Multiply by thread to get total percent hacked.
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @returns The calculated hack percent.
+ */
+ hackPercent(server: Server, player: Player): number;
+ /**
+ * Calculate the percent a server would grow.
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param threads - Amount of thread.
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @param cores - Number of cores on the computer that will execute grow.
+ * @returns The calculated grow percent.
+ */
+ growPercent(server: Server, threads: number, player: Player, cores?: number): number;
+ /**
+ * Calculate hack time.
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @returns The calculated hack time.
+ */
+ hackTime(server: Server, player: Player): number;
+ /**
+ * Calculate grow time.
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @returns The calculated grow time.
+ */
+ growTime(server: Server, player: Player): number;
+ /**
+ * Calculate weaken time.
+ * @param server - Server info from {@link NS.getServer | getServer}
+ * @param player - Player info from {@link NS.getPlayer | getPlayer}
+ * @returns The calculated weaken time.
+ */
+ weakenTime(server: Server, player: Player): number;
}
/**
+ * Hacknet Node formulas
* @public
*/
interface HacknetNodesFormulas {
+ /**
+ * Calculate money gain rate.
+ * @param level - level of the node.
+ * @param ram - ram of the node.
+ * @param cores - cores of the node.
+ * @param mult - player production mult (default to 1)
+ * @returns The calculated money gain rate.
+ */
moneyGainRate(level: number, ram: number, cores: number, mult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet node level.
+ * @param startingLevel - starting level
+ * @param extraLevels - amount of level to purchase (defaults to 1)
+ * @param costMult - player cost reduction (default to 1)
+ * @returns The calculated cost.
+ */
levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet node ram.
+ * @param startingRam - starting ram
+ * @param extraLevels - amount of level of ram to purchase (defaults to 1)
+ * @param costMult - player cost reduction (default to 1)
+ * @returns The calculated cost.
+ */
ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet node cores.
+ * @param startingCore - starting cores
+ * @param extraCores - amount of cores to purchase (defaults to 1)
+ * @param costMult - player cost reduction (default to 1)
+ * @returns The calculated cost.
+ */
coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;
+ /**
+ * Calculate the cost of a hacknet node.
+ * @param n - number of the hacknet node
+ * @param mult - player cost reduction (defaults to 1)
+ * @returns The calculated cost.
+ */
hacknetNodeCost(n: number, mult: number): number;
+ /**
+ * All constants used by the game.
+ * @returns An object with all hacknet node constants used by the game.
+ */
constants(): number;
}
@@ -3345,13 +3447,65 @@ interface HacknetNodesFormulas {
* @public
*/
interface HacknetServersFormulas {
+ /**
+ * Calculate hash gain rate.
+ * @param level - level of the server.
+ * @param ramUsed - ramUsed of the server.
+ * @param maxRam - maxRam of the server.
+ * @param cores - cores of the server.
+ * @param mult - player production mult (default to 1)
+ * @returns The calculated hash gain rate.
+ */
hashGainRate(level: number, ramUsed: number, maxRam: number, cores: number, mult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet server level.
+ * @param startingLevel - starting level
+ * @param extraLevels - amount of level to purchase (defaults to 1)
+ * @param costMult - player cost reduction (default to 1)
+ * @returns The calculated cost.
+ */
levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet server ram.
+ * @param startingRam - starting ram
+ * @param extraLevels - amount of level of ram to purchase (defaults to 1)
+ * @param costMult - player cost reduction (default to 1)
+ * @returns The calculated cost.
+ */
ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet server cores.
+ * @param startingCore - starting cores
+ * @param extraCores - amount of cores to purchase (defaults to 1)
+ * @param costMult - player cost reduction (default to 1)
+ * @returns The calculated cost.
+ */
coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;
+ /**
+ * Calculate cost of upgrading hacknet server cache.
+ * @param startingCache - starting cache level
+ * @param extraCache - amount of levels of cache to purchase (defaults to 1)
+ * @returns The calculated cost.
+ */
cacheUpgradeCost(startingCache: number, extraCache?: number): number;
+ /**
+ * Calculate hash cost of an upgrade.
+ * @param upgName - name of the upgrade
+ * @param level - level of the upgrade
+ * @returns The calculated hash cost.
+ */
hashUpgradeCost(upgName: number, level: number): number;
- hacknetServerCost(n: number, mult: number): number;
+ /**
+ * Calculate the cost of a hacknet server.
+ * @param n - number of the hacknet server
+ * @param mult - player cost reduction (defaults to 1)
+ * @returns The calculated cost.
+ */
+ hacknetServerCost(n: number, mult?: number): number;
+ /**
+ * All constants used by the game.
+ * @returns An object with all hacknet server constants used by the game.
+ */
constants(): any;
}