{ "name": "Mild Poison", "type": "script", "author": "sVoCvBU1knmXzoYe", "img": "icons/magic/acid/dissolve-pool-bubbles.webp", "scope": "global", "command": "const speaker = ChatMessage.implementation.getSpeaker();\ntoken = (canvas.ready ? canvas.tokens.get(speaker.token) : null);\nactor = token?.actor || game.actors.get(speaker.actor);\nif (!actor.status.isDistracted) {\n const dist = game.swade.util.getStatusEffectDataById('distracted')\n await actor.toggleActiveEffect(dist, {active: true})\n}\nconst poison = await Dialog.wait({\n title: `Apply Mild Poison to ${actor.name}`,\n content: `

What was the result of the vigor roll against the mild poison? (If ${actor.name} succeeded, you can close out of this dialog to cancel)

`,\n buttons: {\n fail: {\n icon: '',\n label: \"Failure\"\n },\n critFail: {\n icon: '',\n label: \"Critical Failure\"\n }\n }\n})\nconst fatigue = actor.system.fatigue\nconst p = poison === 'fail' ? 1 : 2\nactor.update({'system.fatigue.value': Math.min(fatigue.max, fatigue.value + p)})", "folder": "DbVwJ0fIfuijv8Nu", "ownership": { "default": 0, "sVoCvBU1knmXzoYe": 3 }, "flags": { "core": {}, "exportSource": { "world": "swade-test", "system": "swade", "coreVersion": "11.315", "systemVersion": "3.2.5" } }, "_stats": { "systemId": "swade", "systemVersion": "3.2.5", "coreVersion": "11.315", "createdTime": 1705988833306, "modifiedTime": 1705990319268, "lastModifiedBy": "sVoCvBU1knmXzoYe" }, "_id": "McmMNB2mI5xejauq", "sort": 100000, "_key": "!macros!McmMNB2mI5xejauq" }