From 561b81a526ccc37cc999406510c631030b82d1a4 Mon Sep 17 00:00:00 2001 From: alzer <> Date: Mon, 28 Sep 2026 16:16:47 +0200 Subject: [PATCH] Neues GM-Makro: Korrumpierungstest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- module.json | 2 +- .../Korrumpierungstest_k8NFrPLMTrMKIfrx.json | 27 ++++++++++++++++++ packs/macros/000016.ldb | Bin 0 -> 1517 bytes packs/macros/CURRENT | 2 +- packs/macros/LOG | 18 ++---------- packs/macros/LOG.old | 4 ++- packs/macros/MANIFEST-000008 | Bin 334 -> 0 bytes packs/macros/MANIFEST-000024 | Bin 0 -> 227 bytes 8 files changed, 35 insertions(+), 18 deletions(-) create mode 100644 packs-source/macros/Korrumpierungstest_k8NFrPLMTrMKIfrx.json create mode 100644 packs/macros/000016.ldb delete mode 100644 packs/macros/MANIFEST-000008 create mode 100644 packs/macros/MANIFEST-000024 diff --git a/module.json b/module.json index 3032fba..6d0699c 100644 --- a/module.json +++ b/module.json @@ -1,7 +1,7 @@ { "id": "risikogruppe", "title": "Risikogruppe", - "version": "1.1.2", + "version": "1.1.3", "compatibility": { "minimum": "12", "verified": "14" diff --git a/packs-source/macros/Korrumpierungstest_k8NFrPLMTrMKIfrx.json b/packs-source/macros/Korrumpierungstest_k8NFrPLMTrMKIfrx.json new file mode 100644 index 0000000..6c90200 --- /dev/null +++ b/packs-source/macros/Korrumpierungstest_k8NFrPLMTrMKIfrx.json @@ -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: `

Wie schwer ist der Kontakt mit Verderbnis?

`,\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: `

Handelt es sich um körperlichen oder geistigen Kontakt?

`,\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" +} diff --git a/packs/macros/000016.ldb b/packs/macros/000016.ldb new file mode 100644 index 0000000000000000000000000000000000000000..466fc972e192bc2d5a39221b7adc96cd136edf18 GIT binary patch literal 1517 zcmaJ>U1(fI6rQnJ-LwsCOF}H9ID3h8w`}h2Hffq{o5&_<+BDrXf3_vv(#+nS-JNFc z%w=Y7w@HjtL8P=op%uhGqFAsfB0_@?QYd{0B1ox-LiIuXprsGdArnAL^xv5G#6vnYbkEjyC>%*i?9O6$-MIMbo5 z8q17zQjT2=a7WB|ng=-6QxUXkoZRwC$}ygbbUa%Xsze3+^OWyXS%xs_o#a5Ft3VgD z%8}9I=p#ZyBW|r3CX15nB%_*EEt&CZb*33f9A@0B*>r(h%S3u6(*8-3gtAQX+LAIe zWL!y07px(Pd}zuvWSR_+g9z+(u|}Z&C6JNklpV;|eCLwnhd921thN*g>i= zH#am)yB=PRdEk`X7NQe}o;3>A9D1biQ+$6$gL7 ztrPjees}-2?B?VONo>E+l$@Xb9dGuO5(B^LlL!q*QuuhwZ9F@A6~`~`dI!fUN|VGZ zm!m{g@;9QuGXD?$(u;sfa{+QqN8(k?%kSYyrO=(c7Kiu2j zKc)A~?N+^FdUh0S+^>Rx13OLHr&aEyLs?T|F>Sc0sgMCE_Q~Cu0Vl?-8w4; z;CjkfYHwbyHC90Y0D0)os8D;bT4X3h$|;BE6NvS;qg7972GcY!E6A4Zal3o_Ac9$h zt>ce1mPoy#gC6E=Y2Drx%eWc0`{siV&0sR+S^oVH$?n#6%ORnZKl-nxcYU>SYs0G%3tf*cl~MBs2mk%>pxYb&vqeAnE^~il=Iu@G Rji>)V$NoHbp))*i_a7lO;1vJ> literal 0 HcmV?d00001 diff --git a/packs/macros/CURRENT b/packs/macros/CURRENT index d408ea0..1e21b78 100644 --- a/packs/macros/CURRENT +++ b/packs/macros/CURRENT @@ -1 +1 @@ -MANIFEST-000008 +MANIFEST-000024 diff --git a/packs/macros/LOG b/packs/macros/LOG index ac8e3a4..00a4b54 100644 --- a/packs/macros/LOG +++ b/packs/macros/LOG @@ -1,15 +1,3 @@ -2026/08/12-09:46:14.766482 70000e584000 Recovering log #7 -2026/08/12-09:46:14.768322 70000e584000 Delete type=0 #7 -2026/08/12-09:46:14.768396 70000e584000 Delete type=3 #6 -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) +2026/09/28-16:16:38.593842 700005c57000 Recovering log #23 +2026/09/28-16:16:38.596736 700005c57000 Delete type=3 #22 +2026/09/28-16:16:38.596876 700005c57000 Delete type=0 #23 diff --git a/packs/macros/LOG.old b/packs/macros/LOG.old index 5902195..d26a376 100644 --- a/packs/macros/LOG.old +++ b/packs/macros/LOG.old @@ -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 diff --git a/packs/macros/MANIFEST-000008 b/packs/macros/MANIFEST-000008 deleted file mode 100644 index f488aaa5bd2bc151f2917e5ca7856f67b417a9b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 334 zcmY!i_L-H;z{n_-lUkOVlai$8R9TW*o>`pgoS$2eSd>_jU&PMDx=TYrF*h-}D8E?I z*eEF^r=Z-@up%$Q&DYt8k%<8e;0h{=qs)VoGQES$Jj+v!&72r{AqsTE-p%D;U}WOt zWMJlEkx+VV8|V+@asjzKEC%e1+4z&Tpr-P&7_c(pb{13z8zVOx M6DvCt4>ha@0EV4VJpcdz diff --git a/packs/macros/MANIFEST-000024 b/packs/macros/MANIFEST-000024 new file mode 100644 index 0000000000000000000000000000000000000000..a84969bde05ca90762215d8cfde0482ae35173cf GIT binary patch literal 227 zcmc~_SbX{{10$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAei199f?{rBa#4PV_Dn0PU^IlNBB+3!iD!=n sT$Qm=QbCP_{PW+@g!0I9S*MgRZ+ literal 0 HcmV?d00001