bitburner-src/markdown/bitburner.bladeburner.getskillupgradecost.md

1.6 KiB

Home > bitburner > Bladeburner > getSkillUpgradeCost

Bladeburner.getSkillUpgradeCost() method

Get cost to upgrade skill.

Signature:

getSkillUpgradeCost(skillName: BladeburnerSkillName | `${BladeburnerSkillName}`, count?: number): number;

Parameters

Parameter Type Description
skillName BladeburnerSkillName | `${BladeburnerSkillName}` Name of skill. Case-sensitive and must be an exact match.
count number (Optional) Number of times to upgrade the skill. Defaults to 1 if not specified.

Returns:

number

Number of skill points needed to upgrade the specified skill.

Remarks

RAM cost: 4 GB

This function returns the number of skill points needed to upgrade the specified skill the specified number of times.

The function may return 0 or Infinity in special cases:

  • Return 0 if the current skill level is too high and the specified count is too small. In normal situations, you don't need to worry about this case. It only happens when involved numbers surpass Number.MAX_SAFE_INTEGER and be affected by the floating-point inaccuracy.

  • Return Infinity if the sum of the current level and count exceeds the maximum level.

skillMaxUpgradeCount is the inverse function of this one.