Neues GM-Makro: Korrumpierungstest

Fragt per Dialog die Schwere (Leicht/Mittel/Schwer) und die Art des
Kontakts (Ausdauer = körperlich, Besonnenheit = geistig) ab und wendet
den Korrumpierungstest auf alle aktuell ausgewählten Token an
(Fallback: eigener zugewiesener Charakter). Nutzt die eingebaute
actor.corruptionDialog()-Methode des wfrp4e-Systems.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
alzer
2026-09-28 16:16:47 +02:00
co-authored by Claude Sonnet 5
parent a518eaf4f5
commit 561b81a526
8 changed files with 35 additions and 18 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"id": "risikogruppe", "id": "risikogruppe",
"title": "Risikogruppe", "title": "Risikogruppe",
"version": "1.1.2", "version": "1.1.3",
"compatibility": { "compatibility": {
"minimum": "12", "minimum": "12",
"verified": "14" "verified": "14"
@@ -0,0 +1,27 @@
{
"name": "Korrumpierungstest",
"type": "script",
"flags": {},
"scope": "global",
"command": "/* GM-Makro: Korrumpierungstest auslösen\n * Fragt Schwere (Leicht/Mittel/Schwer) und Art des Kontakts (Ausdauer = körperlich,\n * Besonnenheit = geistig) ab und wendet den Test auf alle aktuell ausgewählten\n * Token an (Fallback: eigener zugewiesener Charakter, falls nichts ausgewählt ist).\n */\n\nlet actors = canvas.tokens.controlled.map(t => t.actor).filter(a => a);\nif (actors.length === 0 && game.user.character) actors = [game.user.character];\nif (actors.length === 0) {\n ui.notifications.warn(\"Bitte zuerst einen oder mehrere Token auswählen.\");\n return;\n}\n\nlet strength = await foundry.applications.api.DialogV2.wait({\n window: { title: \"Korrumpierungstest: Schwere\" },\n content: `<p>Wie schwer ist der Kontakt mit Verderbnis?</p>`,\n buttons: [\n { action: \"minor\", label: game.i18n.localize(\"CORRUPTION.Minor\") },\n { action: \"moderate\", label: game.i18n.localize(\"CORRUPTION.Moderate\") },\n { action: \"major\", label: game.i18n.localize(\"CORRUPTION.Major\") }\n ]\n});\nif (!strength) return;\n\nlet skill = await foundry.applications.api.DialogV2.wait({\n window: { title: \"Korrumpierungstest: Art\" },\n content: `<p>Handelt es sich um körperlichen oder geistigen Kontakt?</p>`,\n buttons: [\n { action: \"endurance\", label: `${game.i18n.localize(\"NAME.Endurance\")} (körperlich)` },\n { action: \"cool\", label: `${game.i18n.localize(\"NAME.Cool\")} (geistig)` }\n ]\n});\nif (!skill) return;\n\nfor (let actor of actors) {\n await actor.corruptionDialog(strength, skill);\n}\n",
"author": "mC699Qr7Z5o6lRTF",
"img": "icons/magic/unholy/silhouette-robe-evil-power.webp",
"_stats": {
"compendiumSource": null,
"duplicateSource": null,
"coreVersion": "14.368",
"systemId": "wfrp4e",
"systemVersion": "10.0.3",
"createdTime": 1759071600000,
"modifiedTime": 1759071600000,
"lastModifiedBy": "mC699Qr7Z5o6lRTF"
},
"folder": null,
"_id": "k8NFrPLMTrMKIfrx",
"sort": 0,
"ownership": {
"default": 0,
"mC699Qr7Z5o6lRTF": 3
},
"_key": "!macros!k8NFrPLMTrMKIfrx"
}
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
MANIFEST-000008 MANIFEST-000024
+3 -15
View File
@@ -1,15 +1,3 @@
2026/08/12-09:46:14.766482 70000e584000 Recovering log #7 2026/09/28-16:16:38.593842 700005c57000 Recovering log #23
2026/08/12-09:46:14.768322 70000e584000 Delete type=0 #7 2026/09/28-16:16:38.596736 700005c57000 Delete type=3 #22
2026/08/12-09:46:14.768396 70000e584000 Delete type=3 #6 2026/09/28-16:16:38.596876 700005c57000 Delete type=0 #23
2026/08/12-09:46:14.794387 70000ee0a000 Level-0 table #11: started
2026/08/12-09:46:14.795090 70000ee0a000 Level-0 table #11: 5180 bytes OK
2026/08/12-09:46:14.795379 70000ee0a000 Delete type=0 #9
2026/08/12-09:46:14.795624 70000ee0a000 Manual compaction at level-0 from '!macros!32bTlpw91xnXFMC2' @ 72057594037927935 : 1 .. '!macros!xsZ7SbiKR6Iwe36B' @ 0 : 0; will stop at (end)
2026/08/12-09:46:14.795683 70000ee0a000 Manual compaction at level-1 from '!macros!32bTlpw91xnXFMC2' @ 72057594037927935 : 1 .. '!macros!xsZ7SbiKR6Iwe36B' @ 0 : 0; will stop at '!macros!xsZ7SbiKR6Iwe36B' @ 28 : 1
2026/08/12-09:46:14.795705 70000ee0a000 Compacting 1@1 + 1@2 files
2026/08/12-09:46:14.796852 70000ee0a000 Generated table #12@1: 24 keys, 5180 bytes
2026/08/12-09:46:14.797188 70000ee0a000 Compacted 1@1 + 1@2 files => 5180 bytes
2026/08/12-09:46:14.797435 70000ee0a000 compacted to: files[ 0 0 1 0 0 0 0 ]
2026/08/12-09:46:14.797553 70000ee0a000 Delete type=2 #5
2026/08/12-09:46:14.797715 70000ee0a000 Delete type=2 #11
2026/08/12-09:46:14.797906 70000ee0a000 Manual compaction at level-1 from '!macros!xsZ7SbiKR6Iwe36B' @ 28 : 1 .. '!macros!xsZ7SbiKR6Iwe36B' @ 0 : 0; will stop at (end)
+3 -1
View File
@@ -1 +1,3 @@
2026/08/12-09:44:34.913666 700005fa3000 Delete type=3 #2 2026/09/28-16:15:52.654086 70000e2fc000 Recovering log #21
2026/09/28-16:15:52.655927 70000e2fc000 Delete type=3 #20
2026/09/28-16:15:52.656054 70000e2fc000 Delete type=0 #21
Binary file not shown.
Binary file not shown.