mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
Bugfix
Fix Skill.maxLvl defaulting to 1
This commit is contained in:
parent
c467daaf86
commit
12f9a2b24d
@ -19,10 +19,10 @@ export class Skill {
|
|||||||
name: BladeSkillName;
|
name: BladeSkillName;
|
||||||
desc: string;
|
desc: string;
|
||||||
// Cost is in Skill Points
|
// Cost is in Skill Points
|
||||||
baseCost = 1;
|
baseCost: number;
|
||||||
// Additive cost increase per level
|
// Additive cost increase per level
|
||||||
costInc = 1;
|
costInc: number;
|
||||||
maxLvl = Number.MAX_SAFE_INTEGER;
|
maxLvl: number;
|
||||||
mults: PartialRecord<BladeMultName, number> = {};
|
mults: PartialRecord<BladeMultName, number> = {};
|
||||||
|
|
||||||
constructor(params: SkillParams) {
|
constructor(params: SkillParams) {
|
||||||
@ -30,7 +30,7 @@ export class Skill {
|
|||||||
this.desc = params.desc;
|
this.desc = params.desc;
|
||||||
this.baseCost = params.baseCost ?? 1;
|
this.baseCost = params.baseCost ?? 1;
|
||||||
this.costInc = params.costInc ?? 1;
|
this.costInc = params.costInc ?? 1;
|
||||||
this.maxLvl = params.maxLvl ?? 1;
|
this.maxLvl = params.maxLvl ?? Number.MAX_SAFE_INTEGER;
|
||||||
for (const [multName, mult] of getRecordEntries(params.mults)) this.mults[multName] = mult;
|
for (const [multName, mult] of getRecordEntries(params.mults)) this.mults[multName] = mult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user