Fixed error that caused max force & tech points to evaluate to NaN

This commit is contained in:
Jacob Lucas 2021-07-02 02:48:55 +01:00
parent df44ad0635
commit e271c41239

View file

@ -616,12 +616,12 @@ export default class Actor5e extends Actor {
if (!isNPC) {
if (forceProgression.levels) {
ad.attributes.force.known.max = forceProgression.powersKnown;
ad.attributes.force.points.max = forceProgression.points + Math.max(ad.abilities.wis.mod, ad.abilities.cha.mod);
ad.attributes.force.points.max = forceProgression.points;
ad.attributes.force.level = forceProgression.levels;
}
if (techProgression.levels){
ad.attributes.tech.known.max = techProgression.powersKnown;
ad.attributes.tech.points.max = techProgression.points + ad.abilities.int.mod;
ad.attributes.tech.points.max = techProgression.points;
ad.attributes.tech.level = techProgression.levels;
}
}