diff --git a/src/Bladeburner/Bladeburner.tsx b/src/Bladeburner/Bladeburner.tsx index c0c0968f7..2fecb70f6 100644 --- a/src/Bladeburner/Bladeburner.tsx +++ b/src/Bladeburner/Bladeburner.tsx @@ -2299,14 +2299,13 @@ export class Bladeburner { } const skill = Skills[skillName]; - const currentLevel = this.skills[skillName]; - if (currentLevel == null) { - return skill.calculateCost(0, count); - } else if (currentLevel + count > skill.maxLvl) { + const currentLevel = this.skills[skillName] ?? 0; + + if (skill.maxLvl !== 0 && currentLevel + count > skill.maxLvl) { return Infinity; - } else { - return skill.calculateCost(currentLevel, count); } + + return skill.calculateCost(currentLevel, count); } upgradeSkillNetscriptFn(skillName: string, count: number, workerScript: WorkerScript): boolean {