Skip to content

Commit

Permalink
Update dnd5e macro matching patterns; Fixes #36
Browse files Browse the repository at this point in the history
  • Loading branch information
illandril committed Dec 5, 2022
1 parent e2119e2 commit 4514cf4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions module/scripts/item-systems/dnd5e.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import ItemSystem from './item-system.js';

const SYSTEM_ID = 'dnd5e';
const DEFAULT_MACRO_REGEX_ARRAY = [
// Legacy dnd5e system Roll Item macro
// Legacy dnd5e system Roll Item macros
/^\s*game\s*\.\s*dnd5e\s*\.\s*rollItemMacro\s*\(\s*(?<q>["'`])(?<itemName>.+)\k<q>\s*\)\s*;?\s*$/,
/^\s*game\s*\.\s*dnd5e\s*\.macros\s*\.\s*rollItem\s*\(\s*(?<q>["'`])(?<itemName>.+)\k<q>\s*\)\s*;?\s*$/,

// Standard dnd5e system Roll Item macro
/^\s*game\s*\.\s*dnd5e\s*\.macros\s*\.\s*rollItem\s*\(\s*(?<q>["'`])(?<itemName>.+)\k<q>\s*\)\s*;?\s*$/,
/^\s*dnd5e\s*\.\s*documents\s*\.macro\s*\.\s*rollItem\s*\(\s*(?<q>["'`])(?<itemName>.+)\k<q>\s*\)\s*;?\s*$/,

// MinorQOL.doRoll
/MinorQOL\.doRoll\(event, "(?<itemName>[^"]+)", {type: "(?<itemType>[^"]+)".*}\);?/,
Expand Down

0 comments on commit 4514cf4

Please sign in to comment.