Hit dice constitution now has a + sign when positive

This commit is contained in:
Stefan Zermatten
2015-06-29 10:21:49 +02:00
parent 1b7e2cd850
commit 34f8e7402b
2 changed files with 6 additions and 1 deletions

View File

@@ -21,7 +21,7 @@
{{characterCalculate "attributeValue" ../_id name}} {{characterCalculate "attributeValue" ../_id name}}
</div> </div>
<div class="title white-text"> <div class="title white-text">
d{{diceNum}} {{characterCalculate "abilityMod" ../_id "constitution"}} d{{diceNum}} {{conMod}}
</div> </div>
</div> </div>
</div> </div>

View File

@@ -8,6 +8,11 @@ Template.hitDice.helpers({
var value = Characters.calculate.attributeValue(this.char._id, this.name); var value = Characters.calculate.attributeValue(this.char._id, this.name);
return value <= 0; return value <= 0;
}, },
conMod: function(){
return signedString(
Characters.calculate.abilityMod(this.char._id, "constitution")
);
},
}); });
Template.hitDice.events({ Template.hitDice.events({