diff --git a/rpg-docs/client/views/character/features/features.html b/rpg-docs/client/views/character/features/features.html index a3c6f1df..0b3e120a 100644 --- a/rpg-docs/client/views/character/features/features.html +++ b/rpg-docs/client/views/character/features/features.html @@ -133,6 +133,12 @@
{{title}}
+
+
+ Reset + Clear +
+
{{/if}} diff --git a/rpg-docs/client/views/character/features/features.js b/rpg-docs/client/views/character/features/features.js index 778f6cc1..3b997c67 100644 --- a/rpg-docs/client/views/character/features/features.js +++ b/rpg-docs/client/views/character/features/features.js @@ -111,6 +111,17 @@ Template.resource.helpers({ }); Template.resource.events({ + "click .resourceResetMax": function(event){ + var modifier = {$set: {}}; + modifier.$set[this.name + ".adjustment"] = 0; + Characters.update(this.char._id, modifier, {validate: false}); + }, + "click .resourceResetZero": function(event){ + var base = Characters.calculate.attributeBase(this.char._id, this.name); + var modifier = {$set: {}}; + modifier.$set[this.name + ".adjustment"] = -base; + Characters.update(this.char._id, modifier, {validate: false}); + }, "click .resourceUp": function(event){ var value = Characters.calculate.attributeValue(this.char._id, this.name); var base = Characters.calculate.attributeBase(this.char._id, this.name);