mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 01:23:49 +01:00
commit
30af70c4ab
183
dist/bitburner.d.ts
vendored
183
dist/bitburner.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
@ -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. |
|
||||
|
||||
|
6
markdown/bitburner.gangformulas.calculatemoneygain.md → markdown/bitburner.gangformulas.moneygain.md
6
markdown/bitburner.gangformulas.calculatemoneygain.md → markdown/bitburner.gangformulas.moneygain.md
@ -1,15 +1,15 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[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.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
calculateMoneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||
moneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||
```
|
||||
|
||||
## Parameters
|
@ -1,15 +1,15 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[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.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
calculateRespectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||
respectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||
```
|
||||
|
||||
## Parameters
|
@ -1,15 +1,15 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[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.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
calculateWantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||
wantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||
```
|
||||
|
||||
## Parameters
|
@ -1,15 +1,15 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[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.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
calculateWantedPenalty(gang: GangGenInfo): number;
|
||||
wantedPenalty(gang: GangGenInfo): number;
|
||||
```
|
||||
|
||||
## Parameters
|
@ -4,22 +4,26 @@
|
||||
|
||||
## HackingFormulas.growPercent() method
|
||||
|
||||
Calculate the percent a server would grow.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated grow percent.
|
||||
|
||||
|
@ -4,20 +4,24 @@
|
||||
|
||||
## HackingFormulas.growTime() method
|
||||
|
||||
Calculate grow time.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated grow time.
|
||||
|
||||
|
@ -4,20 +4,24 @@
|
||||
|
||||
## HackingFormulas.hackChance() method
|
||||
|
||||
Calculate hack chance.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated hack chance.
|
||||
|
||||
|
@ -4,20 +4,28 @@
|
||||
|
||||
## HackingFormulas.hackExp() method
|
||||
|
||||
Calculate hack exp for one thread.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated hack exp.
|
||||
|
||||
## Remarks
|
||||
|
||||
Multiply by thread to get total exp
|
||||
|
||||
|
@ -4,20 +4,28 @@
|
||||
|
||||
## HackingFormulas.hackPercent() method
|
||||
|
||||
Calculate hack percent for one thread.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated hack percent.
|
||||
|
||||
## Remarks
|
||||
|
||||
Multiply by thread to get total percent hacked.
|
||||
|
||||
|
@ -4,20 +4,24 @@
|
||||
|
||||
## HackingFormulas.hackTime() method
|
||||
|
||||
Calculate hack time.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated hack time.
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
## HackingFormulas interface
|
||||
|
||||
Hacking formulas
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
@ -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. |
|
||||
|
||||
|
@ -4,20 +4,24 @@
|
||||
|
||||
## HackingFormulas.weakenTime() method
|
||||
|
||||
Calculate weaken time.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated weaken time.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## HacknetNodesFormulas.constants() method
|
||||
|
||||
All constants used by the game.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
@ -13,3 +15,5 @@ constants(): number;
|
||||
|
||||
number
|
||||
|
||||
An object with all hacknet node constants used by the game.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## HacknetNodesFormulas.coreUpgradeCost() method
|
||||
|
||||
Calculate cost of upgrading hacknet node cores.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated cost.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## HacknetNodesFormulas.hacknetNodeCost() method
|
||||
|
||||
Calculate the cost of a hacknet node.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated cost.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## HacknetNodesFormulas.levelUpgradeCost() method
|
||||
|
||||
Calculate cost of upgrading hacknet node level.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated cost.
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
## HacknetNodesFormulas interface
|
||||
|
||||
Hacknet Node formulas
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
@ -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. |
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## HacknetNodesFormulas.moneyGainRate() method
|
||||
|
||||
Calculate money gain rate.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated money gain rate.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## HacknetNodesFormulas.ramUpgradeCost() method
|
||||
|
||||
Calculate cost of upgrading hacknet node ram.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated cost.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## HacknetServersFormulas.cacheUpgradeCost() method
|
||||
|
||||
Calculate cost of upgrading hacknet server cache.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated cost.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## HacknetServersFormulas.constants() method
|
||||
|
||||
All constants used by the game.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
@ -13,3 +15,5 @@ constants(): any;
|
||||
|
||||
any
|
||||
|
||||
An object with all hacknet server constants used by the game.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## HacknetServersFormulas.coreUpgradeCost() method
|
||||
|
||||
Calculate cost of upgrading hacknet server cores.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated cost.
|
||||
|
||||
|
@ -4,20 +4,24 @@
|
||||
|
||||
## HacknetServersFormulas.hacknetServerCost() method
|
||||
|
||||
Calculate the cost of a hacknet server.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated cost.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## HacknetServersFormulas.hashGainRate() method
|
||||
|
||||
Calculate hash gain rate.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated hash gain rate.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## HacknetServersFormulas.hashUpgradeCost() method
|
||||
|
||||
Calculate hash cost of an upgrade.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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 |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated hash cost.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## HacknetServersFormulas.levelUpgradeCost() method
|
||||
|
||||
Calculate cost of upgrading hacknet server level.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated cost.
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
## HacknetServersFormulas interface
|
||||
|
||||
Hacknet Server formulas
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
@ -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. |
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## HacknetServersFormulas.ramUpgradeCost() method
|
||||
|
||||
Calculate cost of upgrading hacknet server ram.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated cost.
|
||||
|
||||
|
@ -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. |
|
||||
|
@ -4,20 +4,24 @@
|
||||
|
||||
## SkillsFormulas.calculateExp() method
|
||||
|
||||
Calculate exp for skill level.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated exp required.
|
||||
|
||||
|
@ -4,20 +4,24 @@
|
||||
|
||||
## SkillsFormulas.calculateSkill() method
|
||||
|
||||
Calculate skill level.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```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. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated skill level.
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
## SkillsFormulas interface
|
||||
|
||||
Skills formulas
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
@ -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. |
|
||||
|
||||
|
@ -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);
|
||||
},
|
||||
|
174
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
174
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user