From da8b91594e147c1ee397fdc94e8599bc64b14024 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Thu, 25 Jun 2015 14:22:07 +0200 Subject: [PATCH 1/7] Removed reference to character helper --- rpg-docs/client/views/character/features/features.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpg-docs/client/views/character/features/features.js b/rpg-docs/client/views/character/features/features.js index 5a9fa705..3f68a6af 100644 --- a/rpg-docs/client/views/character/features/features.js +++ b/rpg-docs/client/views/character/features/features.js @@ -107,7 +107,8 @@ Template.resource.helpers({ return !valuePositive; }, getColor: function(){ - if (this.char.attributeValue(this.name) > 0){ + var value = Characters.calculate.attributeValue(this.char._id, this.name); + if (value > 0){ return this.color; } else { return "grey"; From 34f8e7402b59d2ee4b8baaf2c05b2bfae3daa451 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Mon, 29 Jun 2015 10:21:49 +0200 Subject: [PATCH 2/7] 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({ From 83a8eeef0fef927ccb5a535df78cdbef834faa94 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Mon, 29 Jun 2015 13:55:15 +0200 Subject: [PATCH 3/7] Fixed editing of multiple attacks --- .../views/character/attacks/attackEdit/attackEdit.html | 10 +++++----- .../views/character/attacks/attackEdit/attackEdit.js | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.html b/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.html index d742378d..a5cd8e03 100644 --- a/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.html +++ b/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.html @@ -3,26 +3,26 @@
- -
- - + {{#each damageTypes}} @@ -34,6 +34,6 @@
- + \ No newline at end of file diff --git a/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.js b/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.js index dd5fb174..295f0311 100644 --- a/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.js +++ b/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.js @@ -15,23 +15,23 @@ var damageTypes = [ ]; Template.attackEdit.events({ - "tap #deleteAttack": function(event, instance) { + "tap .deleteAttack": function(event, instance) { Attacks.softRemoveNode(this._id); GlobalUI.deletedToast(this._id, "Attacks", "Attack"); }, - "change #attackBonusInput": function(event) { + "change .attackBonusInput": function(event) { var value = event.currentTarget.value; Attacks.update(this._id, {$set: {attackBonus: value}}); }, - "change #damageInput": function(event) { + "change .damageInput": function(event) { var value = event.currentTarget.value; Attacks.update(this._id, {$set: {damage: value}}); }, - "change #detailInput": function(event) { + "change .detailInput": function(event) { var value = event.currentTarget.value; Attacks.update(this._id, {$set: {details: value}}); }, - "core-select #damageTypeDropdown": function(event) { + "core-select .damageTypeDropdown": function(event) { var detail = event.originalEvent.detail; if (!detail.isSelected) return; var value = detail.item.getAttribute("name"); From af070b15780860ca0f00cfb0b52c5b8a3ee8c971 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Mon, 29 Jun 2015 13:55:27 +0200 Subject: [PATCH 4/7] Attacks inherit spell names correctly --- rpg-docs/Model/Character/Spells.js | 1 + 1 file changed, 1 insertion(+) diff --git a/rpg-docs/Model/Character/Spells.js b/rpg-docs/Model/Character/Spells.js index 5234b321..f4759512 100644 --- a/rpg-docs/Model/Character/Spells.js +++ b/rpg-docs/Model/Character/Spells.js @@ -62,6 +62,7 @@ Spells.attachSchema(Schemas.Spell); Spells.attachBehaviour("softRemovable"); makeChild(Spells); //children of spell lists +makeParent(Spells, ["name", "enabled"]); //parents of attacks Spells.allow(CHARACTER_SUBSCHEMA_ALLOW); Spells.deny(CHARACTER_SUBSCHEMA_DENY); From a2fdee88b6df9af118277ed27363c37b9bff0508 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Mon, 29 Jun 2015 14:00:55 +0200 Subject: [PATCH 5/7] Ordered Character lists --- rpg-docs/Routes/Routes.js | 2 +- rpg-docs/client/views/characterList/characterSideList.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rpg-docs/Routes/Routes.js b/rpg-docs/Routes/Routes.js index 7a26c2cc..3eff3ff3 100644 --- a/rpg-docs/Routes/Routes.js +++ b/rpg-docs/Routes/Routes.js @@ -27,7 +27,7 @@ Router.map(function() { }, data: { characters: function(){ - return Characters.find({}, {fields: {_id: 1}}); + return Characters.find({}, {fields: {_id: 1}, sort: {name: 1}}); } }, onAfterAction: function() { diff --git a/rpg-docs/client/views/characterList/characterSideList.js b/rpg-docs/client/views/characterList/characterSideList.js index 956698cd..9bc9637a 100644 --- a/rpg-docs/client/views/characterList/characterSideList.js +++ b/rpg-docs/client/views/characterList/characterSideList.js @@ -13,7 +13,10 @@ Template.characterSideList.helpers({ {owner: userId}, ] }, - {fields: {name: 1}} + { + fields: {name: 1}, + sort: {name: 1}, + } ); } }); From d7852d640fde4063895ca9c3e9204a73e8eb819d Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Fri, 3 Jul 2015 13:21:26 +0200 Subject: [PATCH 6/7] Fixed Math using min and max incorrectly in skills --- rpg-docs/Model/Character/Characters.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpg-docs/Model/Character/Characters.js b/rpg-docs/Model/Character/Characters.js index efee22a4..65295462 100644 --- a/rpg-docs/Model/Character/Characters.js +++ b/rpg-docs/Model/Character/Characters.js @@ -345,8 +345,8 @@ Characters.calculate = { var value; var add = 0; var mul = 1; - var min = Math.NEGATIVE_INFINITY; - var max = Math.POSITIVE_INFINITY; + var min = Number.NEGATIVE_INFINITY; + var max = Number.POSITIVE_INFINITY; Effects.find({ charId: charId, From ed708bdde00876f7ee7a67bd267c0d84cd015e5c Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Mon, 6 Jul 2015 13:36:50 +0200 Subject: [PATCH 7/7] bumped version --- rpg-docs/private/changeLogs/changeLogs.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rpg-docs/private/changeLogs/changeLogs.js b/rpg-docs/private/changeLogs/changeLogs.js index a4346a1b..fddfd7d3 100644 --- a/rpg-docs/private/changeLogs/changeLogs.js +++ b/rpg-docs/private/changeLogs/changeLogs.js @@ -208,3 +208,14 @@ ChangeLogs.insert({ "Made dependency loops return NaN immediately, rather than looping indefinitely until a page refresh. Adding an effect that adds \"strength\" to Strength, won't cause Strength to constantly increase or freeze the browser, Strength just becomes NaN", ], }); + +ChangeLogs.insert({ + version: "0.6.4", + changes: [ + "Hit dice now has a \"+\" between the dice and the constitution modifier", + "Items with multiple attacks should have the damage type editable on all attacks now", + "Spell attacks should now correctly inherit changes to their spell's name", + "Character lists should now be ordered alphabetically", + "Skills should have correct min and max effects applied again", + ], +});