28 lines
1.2 KiB
JSON
28 lines
1.2 KiB
JSON
{
|
|
"name": "Request Fear Check (MATT)",
|
|
"type": "script",
|
|
"author": "Aqnn9hCDQPbyTWiq",
|
|
"img": "icons/magic/death/skull-energy-light-white.webp",
|
|
"scope": "global",
|
|
"command": "// Will request a Fear from MATT's active token list when called from\n// Run Macro with these arguments:\n// 1. Fear penalty (\"0\" or \"-2\" for example)\n// 2. flavor text\nconst requestFearRollFromTokens = game.modules.get('swade-mb-helpers').api.requestFearRollFromTokens\nconst tokens = arguments[0].value.tokens.map(t => canvas.tokens.get(t.id))\nconst rolldata = args\n\nasync function main () {\n if (tokens.length < 1) {\n return\n }\n\n const fear = parseInt(args.shift() || 0)\n const flavor = args.join(\" \")\n const targetNumber = 4\n const options = { targetNumber, fear, flavor }\n\n requestFearRollFromTokens(tokens, options)\n}\n\nmain()",
|
|
"folder": null,
|
|
"ownership": {
|
|
"default": 0,
|
|
"Aqnn9hCDQPbyTWiq": 3
|
|
},
|
|
"flags": {
|
|
"core": {}
|
|
},
|
|
"_stats": {
|
|
"systemId": "swade",
|
|
"systemVersion": "3.2.5",
|
|
"coreVersion": "11.315",
|
|
"createdTime": 1703356535979,
|
|
"modifiedTime": 1707689111423,
|
|
"lastModifiedBy": "Aqnn9hCDQPbyTWiq"
|
|
},
|
|
"_id": "Pz2RZtjKvLAK6i6L",
|
|
"sort": 0,
|
|
"_key": "!macros!Pz2RZtjKvLAK6i6L"
|
|
}
|