From 34f8e7402b59d2ee4b8baaf2c05b2bfae3daa451 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Mon, 29 Jun 2015 10:21:49 +0200 Subject: [PATCH] Hit dice constitution now has a + sign when positive --- rpg-docs/client/views/character/stats/hitDice/hitDice.html | 2 +- rpg-docs/client/views/character/stats/hitDice/hitDice.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/rpg-docs/client/views/character/stats/hitDice/hitDice.html b/rpg-docs/client/views/character/stats/hitDice/hitDice.html index ac1b2af3..0cbfbab8 100644 --- a/rpg-docs/client/views/character/stats/hitDice/hitDice.html +++ b/rpg-docs/client/views/character/stats/hitDice/hitDice.html @@ -21,7 +21,7 @@ {{characterCalculate "attributeValue" ../_id name}}
- d{{diceNum}} {{characterCalculate "abilityMod" ../_id "constitution"}} + d{{diceNum}} {{conMod}}
diff --git a/rpg-docs/client/views/character/stats/hitDice/hitDice.js b/rpg-docs/client/views/character/stats/hitDice/hitDice.js index e6cd38e5..7399309d 100644 --- a/rpg-docs/client/views/character/stats/hitDice/hitDice.js +++ b/rpg-docs/client/views/character/stats/hitDice/hitDice.js @@ -8,6 +8,11 @@ Template.hitDice.helpers({ var value = Characters.calculate.attributeValue(this.char._id, this.name); return value <= 0; }, + conMod: function(){ + return signedString( + Characters.calculate.abilityMod(this.char._id, "constitution") + ); + }, }); Template.hitDice.events({