diff --git a/src/dndbeyond/base/monster.js b/src/dndbeyond/base/monster.js index c0ccc674..14e7f6d6 100644 --- a/src/dndbeyond/base/monster.js +++ b/src/dndbeyond/base/monster.js @@ -472,7 +472,7 @@ class Monster extends CharacterBase { hit = description.slice(hit_idx); // Using match with global modifier then map to regular match because RegExp.matchAll isn't available on every browser const damage_regexp = new RegExp(/([\w]* )(?:([0-9]+)(?!d))?(?: *\(?([0-9]*d[0-9]+(?:\s*[-+]\s*[0-9]+)?(?: plus [^\)]+)?)\)?)? ([\w ]+?) damage/) - const healing_regexp = new RegExp(/gains (?:([0-9]+)(?!d))?(?: *\(?([0-9]*d[0-9]+(?:\s*[-+]\s*[0-9]+)?)(?: plus [^\)]+)?\)?)? (?:temporary)?\s*hit points/) + const healing_regexp = new RegExp(/gains (?:([0-9]+)(?!d))?(?: *\(?([0-9]*d[0-9]+(?:\s*[-+]\s*[0-9]+)?)(?: plus [^\)]+)?\)?)? (temporary)?\s*hit points/) const damage_matches = reMatchAll(damage_regexp, hit) || []; const healing_matches = reMatchAll(healing_regexp, hit) || []; const damages = []; @@ -493,9 +493,10 @@ class Monster extends CharacterBase { } for (let dmg of healing_matches) { const damage = dmg[2] || dmg[1]; + const healingType = dmg[3] ? "Temp HP" : "Healing" if (damage) { damages.push(damage.replace("plus", "+")); - damage_types.push("Healing"); + damage_types.push(healingType); } } let save = null;