D&D 5e - uc-533 - fix cantrip display (#5131)

* uc-533 fix cantrip display

* uc-533 remove console log
This commit is contained in:
Cassie Levett
2019-05-30 12:52:48 -05:00
committed by GitHub
parent 3aebad28e5
commit b228af6a43
@@ -8779,7 +8779,7 @@
//used in _atkdmgtype display
const dmgmag = (isNaN(atkmag) === false && atkmag != 0 && ((v[`${repeating_attack}_dmgflag`] && v[`${repeating_attack}_dmgflag`] != 0) || (v[`${repeating_attack}_dmg2flag`] && v[`${repeating_attack}_dmg2flag`] != 0))) ? `+ ${atkmag} Magic Bonus` : "";
//ATTACK checkbox inside settings for the repeating attack
const atkflag = v[`${repeating_attack}_atkflag`] || 0;
if (atkflag != 0) {
@@ -8821,12 +8821,13 @@
if (dmgflag1 != 0) {
if (spellattack === true && dmgbase.indexOf("[[round((@{level} + 1) / 6 + 0.5)]]") > -1) {
// SPECIAL CANTRIP DAMAGE
dmgdiestring = Math.round(((parseInt(v["level"], 10) + 1) / 6) + 0.5).toString()
dmgdiestring = Math.round(((parseInt(v["level"], 10) + 1) / 6) + 0.5).toString();
dmg = dmgdiestring + dmgbase.substring(dmgbase.lastIndexOf("d"));
//select & input to the right of damage
if (dmgattr + dmgmod != 0) {
dmg = dmg + "+" + (dmgattr + dmgmod);
dmg += `+${(dmgattr + dmgmod)}`;
}
dmg += dmg + " " + dmgtype;
dmg += ` ${dmgtype}`;
} else {
if (dmgbase === 0 && (dmgattr + dmgmod === 0)) {
dmg = 0;