From 5b50f20128c2971960b881246ffbe1f0b26372c5 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Fri, 21 Jul 2017 12:49:04 +0200 Subject: [PATCH] Fixed spell attacks from library assignment of default attack bonus --- rpg-docs/client/views/character/spells/spells.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpg-docs/client/views/character/spells/spells.js b/rpg-docs/client/views/character/spells/spells.js index f943c276..d7b7bf2c 100644 --- a/rpg-docs/client/views/character/spells/spells.js +++ b/rpg-docs/client/views/character/spells/spells.js @@ -76,7 +76,7 @@ Template.spells.helpers({ } if (this.components.material){ components += components ? ", M" : "M"; - if (materialNeedsGp(this.components.material)) {components+="gp";} + if (materialNeedsGp(this.components.material)) {components += "gp";} } if (this.components.concentration){ components += components ? ", C" : "C"; @@ -275,7 +275,7 @@ Template.spells.events({ Spells.insert(spell); // Copy over attacks and effects _.each(result.attacks, (attack) => { - if (!(attackBonus in attack)) {attack.attackBonus = "attackBonus"} //if no attack bonus provided, use spell list's + if (!("attackBonus" in attack)) {attack.attackBonus = "attackBonus"} //if no attack bonus provided, use spell list's attack.charId = charId; attack.parent = {id: spellId, collection: "Spells"}; Attacks.insert(attack);