Fix Skill.maxLvl defaulting to 1
This commit is contained in:
Snarling 2024-03-29 14:27:36 -04:00
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;
} }