From 3c5e002f5bbdcdc45bb058f63f2cc10d26dbc94f Mon Sep 17 00:00:00 2001 From: Nick Eimers Date: Sun, 21 Jun 2020 11:49:14 -0700 Subject: [PATCH] disabled improvement checkbox for unnatural skill --- module/actor/actor.js | 14 +++++++++++++- templates/actor/actor-sheet.html | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/module/actor/actor.js b/module/actor/actor.js index d3e2bda..0521820 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -33,7 +33,19 @@ export class DeltaGreenActor extends Actor { // the x5 is just whatever the raw statistic is x 5 to turn it into a d100 percentile statistic.x5 = statistic.value * 5; } - //console.log(data.statistics); + + // The unnatural skill is sort of special + // It cannot be improved via failure, so add in a special property to reflect this + // Mostly to make it easy to deactivate the failure checkbox in the GUI + for (let [key, skill] of Object.entries(data.skills)){ + if(key === 'unnatural'){ + skill.cannotBeImprovedByFailure = true; + } + else{ + skill.cannotBeImprovedByFailure = false; + } + } + console.log(actorData); actorData.data.wp.max = actorData.data.statistics.pow.value; diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html index c75719d..ab1d7c1 100644 --- a/templates/actor/actor-sheet.html +++ b/templates/actor/actor-sheet.html @@ -99,7 +99,7 @@
- +
{{/each}}