{ "name": "Quick Damage Roll", "type": "script", "scope": "global", "author": "sVoCvBU1knmXzoYe", "img": "icons/sundries/gaming/dice-runed-brown.webp", "command": "new Dialog({\n title: \"Damage Roll Configuration\",\n content: `\n
\n `,\n buttons: {\n ok: {\n label: \"Roll Damage\",\n callback: (html) => {\n const damageRoll = html.find('input[name=\"damageRoll\"]').val();\n let flavor = html.find('input[name=\"flavor\"]').val();\n const ap = parseInt(html.find('input[name=\"ap\"]').val()) || 0;\n const options = {};\n if (ap > 0) {\n flavor = `${flavor ? flavor + \" - \" : \"\"}AP: ${ap}`\n options.ap = ap;\n }\n // Perform the damage roll and send the message\n new CONFIG.Dice.DamageRoll(damageRoll, null, options).toMessage({ flavor });\n },\n },\n cancel: {\n label: \"Cancel\",\n },\n },\n}).render(true);", "folder": null, "ownership": { "default": 0, "sVoCvBU1knmXzoYe": 3 }, "flags": { "core": {} }, "_stats": { "systemId": "swade", "systemVersion": "3.2.5", "coreVersion": "11.315", "createdTime": 1702933790652, "modifiedTime": 1702934856387, "lastModifiedBy": "sVoCvBU1knmXzoYe" }, "_id": "NANSnFATVJntUfL7", "sort": 0, "_key": "!macros!NANSnFATVJntUfL7" }