swade-mb-helpers/packs/helper-macros/_source/Damage_Roll__MATT__SHb2TCfZyKvbos6K.json

28 lines
1.3 KiB
JSON

{
"name": "Damage Roll (MATT)",
"type": "script",
"scope": "global",
"author": "Aqnn9hCDQPbyTWiq",
"img": "icons/sundries/gaming/dice-runed-brown.webp",
"command": "// This damage roll macro is meant to be called from MATT\n// Within MATT's Run Macro configuration, add the following arguments\n// 1. Dice formula (in double quotes)\n// 2. AP (should be a positive integer)\n// 3. Flavor text (in double quotes)\n// Example: A macro arguments box might have the following text:\n// \"1d4x[Strength] + 2d6[Blades]\" 2 \"The trap's blades slice!\"\n\nconst damageRoll = args.shift()\nconst ap = parseInt(args.shift())\nlet flavor = args.join(\" \")\nconst options = {};\nif (ap > 0) {\n flavor = `${flavor ? flavor + \" - \" : \"\"}AP: ${ap}`\n options.ap = ap;\n}\n// Perform the damage roll and send the message\nnew CONFIG.Dice.DamageRoll(damageRoll, null, options).toMessage({ flavor });",
"folder": null,
"ownership": {
"default": 0,
"Aqnn9hCDQPbyTWiq": 3
},
"flags": {
"core": {}
},
"_stats": {
"systemId": "swade",
"systemVersion": "3.2.5",
"coreVersion": "11.315",
"createdTime": 1702933790652,
"modifiedTime": 1707687307396,
"lastModifiedBy": "Aqnn9hCDQPbyTWiq"
},
"_id": "SHb2TCfZyKvbos6K",
"sort": 100000,
"_key": "!macros!SHb2TCfZyKvbos6K"
}