Fixed spell attacks from library assignment of default attack bonus

This commit is contained in:
Stefan Zermatten
2017-07-21 12:49:04 +02:00
parent 52fa97c952
commit 5b50f20128

View File

@@ -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);