MonsterBlocks
MonsterBlocks copied to clipboard
Does not recognize 4.x enrichers
Great to see this updated, thanks! But it doesn't recognize 4.x enrichers.
The generated attacks are good, but if the enrichers are present, maybe forego the automated attack descriptions and use the enricher descriptions instead?
Is this the same issue as #230 or is there additional new stuff for 4.x?
At first glance, I believe the main fix here is to add a relativeTo to the enrichHTML call (currently at MonsterBlock5e.js:97).
- const value = await TextEditor.enrichHTML(item.system.description.value, { secrets: (data.owner && !data.flags["hidden-secrets"])});
+ const value = await TextEditor.enrichHTML(item.system.description.value, { relativeTo: item, secrets: (data.owner && !data.flags["hidden-secrets"])});
Didn't test it much yet, but should cover the basics.