From 38d88c2f19216f0c7cf1e0488312eab881cd8a23 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Mon, 18 May 2026 07:23:40 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0jour=20vers=209.6.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module.json | 2 +- modules/loadScripts.js | 2 +- scripts/01VFjGVxkjb5P1ve.js | 2 +- scripts/0cNnOYQnj7nFL0mD.js | 1 + scripts/11QMAT1KYGJJmPlD.js | 18 + scripts/16c0m6PsDXWh86uN.js | 5 + scripts/190PHSHKGaJ74wsR.js | 51 +- scripts/19LL1oevrjmpD8DX.js | 21 + scripts/1PQPxFjmRlulHHzo.js | 2 +- scripts/24Zp9hEvULQsR3lN.js | 1 + scripts/2C6UtWujISe4jqgS.js | 1 + scripts/2p9IK6Y5Z4NQD6FY.js | 2 +- scripts/2sN4VHAs4bo4pOjD.js | 6 + scripts/39mmD9wOsHWas3cl.js | 10 + scripts/3D5ImpMgpOTPucvv.js | 2 +- scripts/3uIkDVzxNjzm5qIH.js | 7 + scripts/43W725G6C7QZ8rr6.js | 1 + scripts/4xqtTqMyOcrwVh63.js | 6 + scripts/5NE3teXZInHQXZ1K.js | 6 + scripts/5X8GbReUxUPWwXMT.js | 1 + scripts/63Yh0nrhCLLfzd14.js | 21 + scripts/65xE9OV5sA1ZWT7j.js | 2 +- scripts/6crZPdNEWptukssg.js | 27 + scripts/7F6aGxZJjwxm5e5P.js | 4 +- scripts/7IuX8wytm33iRGC3.js | 7 + scripts/7T3iXgrL72fea67C.js | 2 +- scripts/7ykah8fvh2Y0o2Hi.js | 4 + scripts/8hCdSTjZqeuVyBGV.js | 5 + scripts/8sJSsjq6wx4IxXWn.js | 10 + scripts/A97EV1Yju3aT7Sng.js | 9 + scripts/ACtDCTLZXmd5uXjX.js | 2 +- scripts/ARQbVHKYK39d8vKJ.js | 14 + scripts/AdawSWiB45Vu40rQ.js | 26 + scripts/AhV9QfteQNqqXVjv.js | 15 + scripts/B08DMbt9gcj8uCTc.js | 1 + scripts/BHbFqhJPzZI2txLs.js | 4 +- scripts/C9ARvMauPNwIHj6o.js | 6 + scripts/CUBpU1imu2eRS06C.js | 9 +- scripts/CWNGrg7se91RC95g.js | 17 +- scripts/Cjj4iLkdY1NaZRCi.js | 4 +- scripts/D5XmzrUGFa1JN0cl.js | 2 +- scripts/DBelNjOULhhAADVJ.js | 12 + scripts/DHzODnNNdZ24FNSg.js | 4 + scripts/FZFOC7bip0oiWEzk.js | 2 +- scripts/FiD3mvWIBHNNIuO9.js | 7 +- scripts/FjmtA9s13s75DTAY.js | 5 + scripts/FtSG8J2s95hhjUMn.js | 3 + scripts/H7BFq8m8vnkm4Yux.js | 2 + scripts/HiDcm1jhG3sU39ME.js | 27 + scripts/HmImVzvw6ecBy99l.js | 2 +- scripts/IdTjIw1yduvCdwdR.js | 5 + scripts/IupskvzvoGyD2H5o.js | 2 +- scripts/J5XafRL0FyZnBPl2.js | 1 + scripts/JTW6557K8nI5p9mL.js | 1 + scripts/JVQK6VW73KxfeJJi.js | 5 + scripts/KxM4zmhQRDHaRybM.js | 9 + scripts/L3ehj3ud1OgjcgSv.js | 3 + scripts/LLqAT9wEUGMLfDhU.js | 2 +- scripts/Lj9H0O9XUk830CBt.js | 16 + scripts/LxEhkvdSEQic8VZ6.js | 33 + scripts/MQAMuPF4QqXl76SZ.js | 1 + scripts/MeHXlZ66R3X8luFT.js | 6 + scripts/N0h848GEkBbRDK2x.js | 1 + scripts/N8oUaIkE2Ne571ia.js | 9 + scripts/NNytXz5XFPrEF6dw.js | 2 +- scripts/NO685xdEW0NtJCp7.js | 3 + scripts/NQSvFWhmBQAyx5Zz.js | 2 +- scripts/Nd1djAF6dLEiLfwV.js | 6 + scripts/NgKdPxwH3vr6mkNi.js | 1 + scripts/NkZrMO4YPiQf0N5Q.js | 7 + scripts/OAemeERMAeGv06pE.js | 3 + scripts/OUef2n36h6lbrsjx.js | 1 + scripts/PaiSiMxCKx9IWmn1.js | 2 + scripts/Pc98GFZjvokeyUcs.js | 6 + scripts/PjOi61gB2nSYooLs.js | 2 +- scripts/PkHrZiuFokN0OyXi.js | 4 + scripts/Q1trEhtqjIiDvFPF.js | 2 +- scripts/QLE6dDm6Bns2J5Tl.js | 5 + scripts/QPuS9YsWAm4LUZWd.js | 7 + scripts/Qo8q0P5j9OKEAP70.js | 7 + scripts/R6SnyF3y4Vsq6oga.js | 4 +- scripts/RKIFGN583PQnqHGk.js | 2 +- scripts/RRK91ySi5SzYCRvy.js | 2 +- scripts/RUpVgB0czqg95K1Q.js | 2 +- scripts/RZibsagclQO5U6o9.js | 1 + scripts/SDwuKuqTsCBZ6hnb.js | 9 + scripts/SO4Aa9argKbuO9rQ.js | 2 +- scripts/SVnclT81zDqRLE5E.js | 1 + scripts/SdZ7xAEzJGVDCsaI.js | 28 + scripts/SdrCM66oViwRFF8I.js | 2 + scripts/SwliIjjjFtZMnJH3.js | 2 +- scripts/UINefUJZN0GjcCbB.js | 6 + scripts/UbGzr86u3wqSEr2h.js | 9 + scripts/V1KCAPGMPvAz3F3g.js | 6 + scripts/V9zm2hKUVLVZtAcN.js | 82 +- scripts/VM2zbABURI9K3JwQ.js | 3 + scripts/VUFST9Tb3zL9vWvg.js | 1 + scripts/VYw9ipwoHArGVnyW.js | 12 + scripts/VswXxqDjU9IH8dX0.js | 1 + scripts/W9nyUNQStMr1pUHJ.js | 2 +- scripts/WDN1kNe7lMc3Zf3d.js | 8 + scripts/WP6opTZkvX3xwtJI.js | 2 + scripts/Wo4wQKUxSItAhRzZ.js | 4 +- scripts/YdiQFkm8j48Xs7gI.js | 2 +- scripts/YjKiWcx7d2nwPy4L.js | 6 + scripts/ZCrfdLPOxiNDCDSg.js | 2 +- scripts/ZCuOjLAeENKN1Q4L.js | 4 +- scripts/ZZb57zYE7bJy7rfU.js | 8 + scripts/aSFPODz31zynXho3.js | 1 + scripts/abLWYtNTu1UVDQAs.js | 2 +- scripts/b44tTtRjmI5jdihB.js | 1 + scripts/bBdXzBmxgFFBwMMS.js | 2 +- scripts/bHxGutf5lZy0kciK.js | 21 + scripts/bLkt8VpTTPoTxW0W.js | 2 +- scripts/bYXlyiRXtdRGYlm0.js | 6 + scripts/brNRqfpPqD2Ki0cM.js | 2 +- scripts/cBSy9CR5NZvcLRg8.js | 6 +- scripts/cOuukVo8WakDZIUj.js | 2 +- scripts/cPdtoRmvRC8PqH3x.js | 1 + scripts/ch5SD2XOQfcYo0X5.js | 2 +- scripts/chDtEQZoRMOrm2eE.js | 1 + scripts/chUpiI3el8IO8MSs.js | 4 +- scripts/chiUvs66IHiKTOcN.js | 4 + scripts/cysQDjlDzT8HdNeo.js | 2 +- scripts/dLlcg8m8eiaVBmTg.js | 37 + scripts/dM449AU0FQRnOc3l.js | 2 +- scripts/drolLZoNuAXQFuPH.js | 9 + scripts/dtHJFFp2mmVsfil3.js | 8 + scripts/dtQH7ZBKfzewtTsq.js | 6 + scripts/e7IxnxePdXSy6L4E.js | 2 +- scripts/egDtqMxe3iekc6hv.js | 2 +- scripts/f4vvAGQ8OGoEbrgy.js | 2 +- scripts/fFGuTi0HLjwneMcJ.js | 2 +- scripts/fSDFCHAo97RLpwGU.js | 20 +- scripts/fWNVINMVhEwf8k5b.js | 9 + scripts/fsvXI7tuL69Ukmec.js | 4 + scripts/g8Tmet9Ii3NvFqvf.js | 1 + scripts/gPQrszvIgGlW9yM4.js | 2 +- scripts/hcUCeoIFwWPKa5K1.js | 7 + scripts/hfFGFWEKFZXtMKWo.js | 7 + scripts/hpBjbxWg0qLlwX2K.js | 24 + scripts/iWqn1fVeQ8IwZorj.js | 3 + scripts/idiZBzbALb5fXIbz.js | 5 + scripts/iphjuYnLhMMNXpGG.js | 2 + scripts/iqwojL5Ku26wsgnI.js | 11 + scripts/jObJanFoev4N6ZRv.js | 2 +- scripts/jTgzivraRKrrCOjH.js | 3 + scripts/jvNuIbOtB46p0esq.js | 4 +- scripts/k7J96MkvfX2GO6JS.js | 4 + scripts/kWHKp2tw3HzkgWCy.js | 3 + scripts/kb2pwRZAjbUbZwcz.js | 6 + scripts/kbh9urTsUcLiwMLH.js | 1 + scripts/knxDGP1YLbnPk03o.js | 6 + scripts/lDfPgVtZf3ULFPjU.js | 8 + scripts/lUcx8NUadgq3oFTY.js | 1 + scripts/m58MpMZBblpq5LJu.js | 4 +- scripts/mujAsg7US4R7eXhv.js | 7 + scripts/n3bUmtYaVljPdcJW.js | 9 + scripts/nCfWscZucItTYObJ.js | 4 + scripts/nSXzktHyNjGUXjaw.js | 2 +- scripts/naF5EWr1CBkYRZTK.js | 2 +- scripts/njPP9wDAsdh4WHIj.js | 4 +- scripts/nlSJDfv4N9hrncHW.js | 1 + scripts/o0dJxmnrWAZVkGKM.js | 4 + scripts/pqpU9J1x23YLwWYG.js | 1 + scripts/qAEZgtu5CrfUkxhx.js | 4 +- scripts/qggycOtvFfaBr4Ax.js | 19 + scripts/qmOt7h17hGAKqQe0.js | 4 +- scripts/qu194dVXm9Vx1TGk.js | 2 +- scripts/r9N0cd9sp6iVG0es.js | 27 + scripts/rDexKQt0ctzdMKdR.js | 7 + scripts/rROfpTez9681wXWx.js | 1 + scripts/rXuOTYAOHCiW167c.js | 14 + scripts/sBXqivqv19SvN5cZ.js | 5 + scripts/sbK1a7txpSoXFzyB.js | 2 +- scripts/slSRg5p8h34Vot34.js | 1 + scripts/slzh77d2DPtvsXk0.js | 1 + scripts/ssuryRgATzt6XksC.js | 7 + scripts/surdCPFakh2JAAHa.js | 5 + scripts/tki0DhoTecjq3LyZ.js | 11 + scripts/tyQLkRLk1AXB4g2u.js | 2 +- scripts/u2TxLqkTdoK8aHTo.js | 6 + scripts/u4fKgGFEnOCnvvsv.js | 2 +- scripts/uEVSUTTam4Z96JJ2.js | 4 +- scripts/v5K5HaHTZmVSJBdr.js | 25 + scripts/vJT2UOO7Ov7a7Rx4.js | 1 + scripts/vJgjAfwq8MuwE2HL.js | 5 + scripts/vwsrPDuVxeNOtdhA.js | 1 + scripts/wIdpkqPBmeVwSSQS.js | 7 + scripts/wIqIF9B43SyDgGYv.js | 5 + scripts/wKIGVpPddx7Y3SQH.js | 21 + scripts/wagZ4VV7431N3Sm8.js | 1 + scripts/x9Ah9e5xAGqCNFO3.js | 5 + scripts/xIIkfmgWfh3teEfr.js | 2 + scripts/y7hk7prQ0lLTyv1Y.js | 2 +- scripts/yHAPfyaRfC4ijV6x.js | 7 + scripts/yMMzZ7daCqRlGT3N.js | 2 +- scripts/yQziCK8G8I1RYkTj.js | 4 +- scripts/z9NEbIUBsKMaTuCz.js | 2 +- scripts/zK38Rl5t9zbFi4Se.js | 2 +- tools/copy-new-scripts.log | 1156 ++------ tools/script-comparison-data.json | 4597 ++++++++++++++++------------- tools/script-comparison-report.md | 426 +-- tools/translate-scripts.js | 2 +- 204 files changed, 4123 insertions(+), 3343 deletions(-) create mode 100644 scripts/0cNnOYQnj7nFL0mD.js create mode 100644 scripts/11QMAT1KYGJJmPlD.js create mode 100644 scripts/16c0m6PsDXWh86uN.js create mode 100644 scripts/19LL1oevrjmpD8DX.js create mode 100644 scripts/24Zp9hEvULQsR3lN.js create mode 100644 scripts/2C6UtWujISe4jqgS.js create mode 100644 scripts/2sN4VHAs4bo4pOjD.js create mode 100644 scripts/39mmD9wOsHWas3cl.js create mode 100644 scripts/3uIkDVzxNjzm5qIH.js create mode 100644 scripts/43W725G6C7QZ8rr6.js create mode 100644 scripts/4xqtTqMyOcrwVh63.js create mode 100644 scripts/5NE3teXZInHQXZ1K.js create mode 100644 scripts/5X8GbReUxUPWwXMT.js create mode 100644 scripts/63Yh0nrhCLLfzd14.js create mode 100644 scripts/6crZPdNEWptukssg.js create mode 100644 scripts/7IuX8wytm33iRGC3.js create mode 100644 scripts/7ykah8fvh2Y0o2Hi.js create mode 100644 scripts/8hCdSTjZqeuVyBGV.js create mode 100644 scripts/8sJSsjq6wx4IxXWn.js create mode 100644 scripts/A97EV1Yju3aT7Sng.js create mode 100644 scripts/ARQbVHKYK39d8vKJ.js create mode 100644 scripts/AdawSWiB45Vu40rQ.js create mode 100644 scripts/AhV9QfteQNqqXVjv.js create mode 100644 scripts/B08DMbt9gcj8uCTc.js create mode 100644 scripts/C9ARvMauPNwIHj6o.js create mode 100644 scripts/DBelNjOULhhAADVJ.js create mode 100644 scripts/DHzODnNNdZ24FNSg.js create mode 100644 scripts/FjmtA9s13s75DTAY.js create mode 100644 scripts/FtSG8J2s95hhjUMn.js create mode 100644 scripts/H7BFq8m8vnkm4Yux.js create mode 100644 scripts/HiDcm1jhG3sU39ME.js create mode 100644 scripts/IdTjIw1yduvCdwdR.js create mode 100644 scripts/J5XafRL0FyZnBPl2.js create mode 100644 scripts/JTW6557K8nI5p9mL.js create mode 100644 scripts/JVQK6VW73KxfeJJi.js create mode 100644 scripts/KxM4zmhQRDHaRybM.js create mode 100644 scripts/L3ehj3ud1OgjcgSv.js create mode 100644 scripts/Lj9H0O9XUk830CBt.js create mode 100644 scripts/LxEhkvdSEQic8VZ6.js create mode 100644 scripts/MQAMuPF4QqXl76SZ.js create mode 100644 scripts/MeHXlZ66R3X8luFT.js create mode 100644 scripts/N0h848GEkBbRDK2x.js create mode 100644 scripts/N8oUaIkE2Ne571ia.js create mode 100644 scripts/NO685xdEW0NtJCp7.js create mode 100644 scripts/Nd1djAF6dLEiLfwV.js create mode 100644 scripts/NgKdPxwH3vr6mkNi.js create mode 100644 scripts/NkZrMO4YPiQf0N5Q.js create mode 100644 scripts/OAemeERMAeGv06pE.js create mode 100644 scripts/OUef2n36h6lbrsjx.js create mode 100644 scripts/PaiSiMxCKx9IWmn1.js create mode 100644 scripts/Pc98GFZjvokeyUcs.js create mode 100644 scripts/PkHrZiuFokN0OyXi.js create mode 100644 scripts/QLE6dDm6Bns2J5Tl.js create mode 100644 scripts/QPuS9YsWAm4LUZWd.js create mode 100644 scripts/Qo8q0P5j9OKEAP70.js create mode 100644 scripts/RZibsagclQO5U6o9.js create mode 100644 scripts/SDwuKuqTsCBZ6hnb.js create mode 100644 scripts/SVnclT81zDqRLE5E.js create mode 100644 scripts/SdZ7xAEzJGVDCsaI.js create mode 100644 scripts/SdrCM66oViwRFF8I.js create mode 100644 scripts/UINefUJZN0GjcCbB.js create mode 100644 scripts/UbGzr86u3wqSEr2h.js create mode 100644 scripts/V1KCAPGMPvAz3F3g.js create mode 100644 scripts/VM2zbABURI9K3JwQ.js create mode 100644 scripts/VUFST9Tb3zL9vWvg.js create mode 100644 scripts/VYw9ipwoHArGVnyW.js create mode 100644 scripts/VswXxqDjU9IH8dX0.js create mode 100644 scripts/WDN1kNe7lMc3Zf3d.js create mode 100644 scripts/WP6opTZkvX3xwtJI.js create mode 100644 scripts/YjKiWcx7d2nwPy4L.js create mode 100644 scripts/ZZb57zYE7bJy7rfU.js create mode 100644 scripts/aSFPODz31zynXho3.js create mode 100644 scripts/b44tTtRjmI5jdihB.js create mode 100644 scripts/bHxGutf5lZy0kciK.js create mode 100644 scripts/bYXlyiRXtdRGYlm0.js create mode 100644 scripts/cPdtoRmvRC8PqH3x.js create mode 100644 scripts/chDtEQZoRMOrm2eE.js create mode 100644 scripts/chiUvs66IHiKTOcN.js create mode 100644 scripts/dLlcg8m8eiaVBmTg.js create mode 100644 scripts/drolLZoNuAXQFuPH.js create mode 100644 scripts/dtHJFFp2mmVsfil3.js create mode 100644 scripts/dtQH7ZBKfzewtTsq.js create mode 100644 scripts/fWNVINMVhEwf8k5b.js create mode 100644 scripts/fsvXI7tuL69Ukmec.js create mode 100644 scripts/g8Tmet9Ii3NvFqvf.js create mode 100644 scripts/hcUCeoIFwWPKa5K1.js create mode 100644 scripts/hfFGFWEKFZXtMKWo.js create mode 100644 scripts/hpBjbxWg0qLlwX2K.js create mode 100644 scripts/iWqn1fVeQ8IwZorj.js create mode 100644 scripts/idiZBzbALb5fXIbz.js create mode 100644 scripts/iphjuYnLhMMNXpGG.js create mode 100644 scripts/iqwojL5Ku26wsgnI.js create mode 100644 scripts/jTgzivraRKrrCOjH.js create mode 100644 scripts/k7J96MkvfX2GO6JS.js create mode 100644 scripts/kWHKp2tw3HzkgWCy.js create mode 100644 scripts/kb2pwRZAjbUbZwcz.js create mode 100644 scripts/kbh9urTsUcLiwMLH.js create mode 100644 scripts/knxDGP1YLbnPk03o.js create mode 100644 scripts/lDfPgVtZf3ULFPjU.js create mode 100644 scripts/lUcx8NUadgq3oFTY.js create mode 100644 scripts/mujAsg7US4R7eXhv.js create mode 100644 scripts/n3bUmtYaVljPdcJW.js create mode 100644 scripts/nCfWscZucItTYObJ.js create mode 100644 scripts/nlSJDfv4N9hrncHW.js create mode 100644 scripts/o0dJxmnrWAZVkGKM.js create mode 100644 scripts/pqpU9J1x23YLwWYG.js create mode 100644 scripts/qggycOtvFfaBr4Ax.js create mode 100644 scripts/r9N0cd9sp6iVG0es.js create mode 100644 scripts/rDexKQt0ctzdMKdR.js create mode 100644 scripts/rROfpTez9681wXWx.js create mode 100644 scripts/rXuOTYAOHCiW167c.js create mode 100644 scripts/sBXqivqv19SvN5cZ.js create mode 100644 scripts/slSRg5p8h34Vot34.js create mode 100644 scripts/slzh77d2DPtvsXk0.js create mode 100644 scripts/ssuryRgATzt6XksC.js create mode 100644 scripts/surdCPFakh2JAAHa.js create mode 100644 scripts/tki0DhoTecjq3LyZ.js create mode 100644 scripts/u2TxLqkTdoK8aHTo.js create mode 100644 scripts/v5K5HaHTZmVSJBdr.js create mode 100644 scripts/vJT2UOO7Ov7a7Rx4.js create mode 100644 scripts/vJgjAfwq8MuwE2HL.js create mode 100644 scripts/vwsrPDuVxeNOtdhA.js create mode 100644 scripts/wIdpkqPBmeVwSSQS.js create mode 100644 scripts/wIqIF9B43SyDgGYv.js create mode 100644 scripts/wKIGVpPddx7Y3SQH.js create mode 100644 scripts/wagZ4VV7431N3Sm8.js create mode 100644 scripts/x9Ah9e5xAGqCNFO3.js create mode 100644 scripts/xIIkfmgWfh3teEfr.js create mode 100644 scripts/yHAPfyaRfC4ijV6x.js diff --git a/module.json b/module.json index 38c497c..3a1bb40 100644 --- a/module.json +++ b/module.json @@ -8,7 +8,7 @@ } ], "url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr", - "version": "9.4.3", + "version": "9.6.0", "esmodules": [ "wh4_fr.js", "modules/babele-register.js", diff --git a/modules/loadScripts.js b/modules/loadScripts.js index 2b33194..98cf3d3 100644 --- a/modules/loadScripts.js +++ b/modules/loadScripts.js @@ -1,5 +1,5 @@ export default function() { - mergeObject(game.wfrp4e.config.effectScripts, {"00ZCnahnTGvzG9KA":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.weczkAMPlTjX7lqU\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item])","01VFjGVxkjb5P1ve":"return args.item?.system?.isProjectiles && args.data.targets[0]?.actor?.sizeNum < 3","03mJu59V4iByWlsO":"// The imbiber immediately\n// takes 3 Poisoned Conditions that cannot be resisted at first,\nawait this.actor.addCondition(\"poisoned\", 3)\n\n// recovers a number of Wounds equal to their Toughness Bonus,\nawait this.actor.modifyWounds(this.actor.system.characteristics.t.bonus)\n\n// and acquires the Régénération Creature Trait.\nconst hasRégénération = this.actor.has(\"Régénération\")\nif (hasRégénération === undefined) {\n fromUuid(\"Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR\").then(trait => {\n let traitItem = trait.toObject()\n this.actor.createEmbeddedDocuments(\"Item\", [traitItem], {fromEffect: this.effect.id})\n })\n}\n\nthis.script.message(`

${this.actor.prototypeToken.name} a :\n

\n C’est à Ranald de décider si leur régénération peut dépasser leur empoisonnement.

\n

Lorsque tous les états Empoisonné sont perdus, la Régénération l’est aussi.

`,\n { whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true })\n","04bAiHISSW53w94Y":"this.actor.addCondition(\"blinded\", 3)","06IaVCOC0RCJbxEf":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.8piWcBKFlQ2J1E3A\")\nlet data = item.toObject();\ndata.system.location.key= this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data])","07tvKnPT8ICtv2us":"if (args.test.result.misfire && args.test.result.roll !== 100) {\n delete args.test.result.misfire\n}","08S8Ozi5b4EdwZp5":"args.fields.slBonus += this.actor.system.characteristics.wp.bonus;","09sSpnW8z2zcVEdf":"if (!args.flags.quietenedApplied)\n{\n args.fields.modifier += 10;\n args.flags.quietenedApplied = true\n}","0BP5l7bIkf744G1k":"return !args.context.terror && !args.extendedTest?.flags.wfrp4e?.fear","0FNOq4J1AdPd2A0q":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Row\")) && !args.skill?.name.includes(game.i18n.localize(\"NAME.Sail\"));","0FWto1oEr3jbWggw":"let spells = await warhammer.utility.findAllItems(\"spell\", \"Chargement des sorts\", true, [\"system.lore.value\"])\n\nlet text = (await game.wfrp4e.tables.rollTable(\"random-caster\", {hideDSN: true})).result\n\nlore = Array.from(text.matchAll(/{(.+?)}/gm))[0][1]\n\nif (text == \"GM's Choice\")\n{\n return this.script.notification(text)\n}\n\nif (spellsWithLore.length > 0)\n{\n let spellsWithLore = spells.filter(i => game.wfrp4e.config.magicLores[i.system.lore.value] == lore)\n let selectedSpell = spellsWithLore[Math.floor(CONFIG.Dice.randomUniform() * spellsWithLore.length)]\n this.script.notification(selectedSpell.name);\n this.actor.createEmbeddedDocuments(\"Item\", [(await fromUuid(selectedSpell)).toObject()])\n}\nelse\n{\n ui.notifications.notify(`Impossible de trouver le sort ${lore}. Essayez à nouveau`)\n}","0H2syk6qc0sCY0pj":"if ( args.actor.has(game.i18n.localize(\"NAME.AA\"), \"talent\") ||\nargs.actor.has(game.i18n.localize(\"NAME.SecondSight\"), \"talent\") ) {\n\targs.modifiers.other.push({label : this.effect.name, value : 5, details : \"La Cible possède Harmonisation Aethyrique ou Seconde Vue\"});\n}","0IAc5VFR2ogXOaGE":"return args.characteristic != \"int\" || args.type != \"characteristic\"","0J1yHP1jkGR9y89H":"if (!this.item.system.properties.qualities.fast) \n this.item.system.qualities.value.push({name : 'fast'});\nif (!this.item.system.properties.qualities.magical) \n this.item.system.qualities.value.push({name : 'magical'});","0KG3HoTNoZhaINIj":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.4CMKeDTDrRQZbPIJ\")\nlet fixation = (await game.wfrp4e.tables.rollTable(\"fixations\"))\nlet data = item.toObject();\ndata.system.specification.value = fixation.result;\nthis.item.updateSource({name : this.item.name += ` (${fixation.result})`});\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","0LCQtsiK2aUfYRmD":"return ![\"t\", \"wp\"].includes(args.characteristic)","0NAD1LNcVyAZ1fC7":"return args.skill?.name !== game.i18n.localize(\"NAME.Cool\") && args.skill?.name !== game.i18n.localize(\"NAME.Résistance\");","0PzfGjGhHQbxEwlb":"this.item.update({\"system.AP\" : {lArm : 0, rArm : 0, lLeg : 0, rLeg: 0}});","0R0QAr3D024kWPfo":"let table = game.wfrp4e.tables.findTable(\"mutatephys\");\nif (!table)\n{\n\treturn ui.notifications.error(\"Table de Mutation introuvable, veuillez vous assurer qu'une table avec la clé `mutatephys` est importée dans le monde.\")\n}\nlet result = (await table.roll()).results[0];\nlet uuid = `Compendium.${result.documentCollection}.${result.documentId}`\nlet item = await fromUuid(uuid);\n\nif (item)\n{\n this.script.notification(`${item.name} added`)\n this.actor.createEmbeddedDocuments(\"Item\", [item])\n}\nelse\n{\n ui.notifications.error(\"Impossible de trouver l'objet : \" + uuid)\n}","0Uly7OmkH0zqYbxQ":"let location = this.item.system.location.key;\n\nif (location)\n{\n let dropped = this.item.system.weaponsAtLocation;\n\n if (dropped.length)\n {\n this.script.notification(`Lache ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}\n\nlet roll = await new Roll(\"max(1, 1d10 - @system.characteristics.t.bonus)\", this.actor).roll()\n\nroll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Durée)`}));\n\nthis.effect.updateSource({\"duration.rounds\" : roll.total})","0YKQGbsKdHSmYGE7":"if (args.skill?.name != game.i18n.localize(\"NAME.Gossip\"))\n{\n\treturn true;\n}\nelse \n{\n\targs.data.reversal = {allowed : true, if: \"success\"}; // Kind of a kludge here, the talent Tests has a specific condition, but the description simply says \"any gossip test can be reversed\" so check it here instead of submission\n}\n ","0abwNjpzo3SbEOeO":"if (args.applyAP && args.modifiers.ap.metal)\n{\n args.modifiers.ap.ignored += args.modifiers.ap.metal\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignorer Métal (\" + args.modifiers.ap.metal + \")\");\n args.modifiers.ap.metal = 0\n}","0amHqfjTRp5ff6Op":"let wounds = this.effect.sourceActor.system.characteristics.wp.bonus;\nthis.actor.modifyWounds(wounds);\nthis.script.message(`Soigne ${wounds} Blessures`);","0e0UZT2FodOJDdgW":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.GbDyBCu8ZjDp6dkj\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","0e7OkamNAaAk4Oit":"let item1 = await fromUuid(\"Compendium.wfrp4e-core.items.3S4OYOZLauXctmev\")\nlet item2 = await fromUuid(\"Compendium.wfrp4e-core.items.7mCcI3q7hgWcmbBU\")\n\nlet data1 = item1.toObject();\ndata1.system.location.key = this.item.system.location.key\n\nlet data2 = item2.toObject();\ndata2.system.location.key = this.item.system.location.key\n\nthis.actor.createEmbeddedDocuments(\"Item\", [data1, data2], {fromEffect: this.effect.id})\n","0hAbiNR1nFkpFMRz":"if (!this.actor.has(game.i18n.localize(\"NAME.SecondSight\"),\"talent\")) this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.OEjUvJKi0xmBwbS2\", this.effect)","0hgTyeaEhMBLwzUn":"let fearCounter = this.item.effects.filter(i => i.name == this.effect.name).length;\n\nfearCounter += Number(this.actor.has(\"Peur\")?.system.specification.value) || 0\n\ngame.wfrp4e.utility.postPeur(fearCounter || 1, this.effect.name)","0iTLDgFHO9Rgc010":"args.fields.modifier -= 20;","0jTqyz0wRlK6XPF7":"if (args.test.spell)\n{\n\targs.test.result.other.push(`${this.effect.name}: Echec Automatique`)\n}","0kUalAsb4OhtYbaJ":"return args.item?.system?.attackType == \"ranged\" && !this.actor.system.canFly.effects.filter(e => e.name == \"Flying\")[0].disabled","0mrUnxzufYgsR0Ph":"this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => {\n await test.roll()\n if (test.failed)\n {\n this.actor.addCondition(\"stunned\")\n }\n})\n","0uUxvBLJC76WIIBC":"let species = await ValueDialog.create({text : \"Saisir l'espèce cible (singulier)\", title : this.effect.name})\n\nthis.effect.updateSource({name : this.effect.setSpecifier(species)});","0vaYwAlMWTmOBl8k":"if (!args.flags.strikeToStun)\n{\n args.flags.strikeToStun = true\n args.fields.modifier += 20;\n args.fields.hitLocation = \"head\";\n}\nargs.fields.successBonus++;","0wR0LWpfhLFA240I":"let value = await ValueDialog.create({\n title : this.script.label, \n text: \"Notes de Victoire pour le Journal d'Expérience\"\n});\nvalue \n ? this.actor.system.awardExp(50, value) \n : this.actor.system.awardExp(50, this.script.label)","0wmIC2MssUX6LW3N":"if (args.test.options.doomboltRolled)\n{\n\targs.test.result.damage += 4;\n}","0yyofYHeDRQlFliO":"return args.context.terror || args.extendedTest?.flags.wfrp4e?.fear","11ir8nibM5HD69na":"const balanced = game.i18n.localize(\"WFRP4E.YenluiBalanced\");\nconst light = game.i18n.localize(\"WFRP4E.YenluiLight\");\nconst dark = game.i18n.localize(\"WFRP4E.YenluiDark\");\n\nlet newName, newDescription;\n\nif (this.effect.name === game.i18n.localize(\"WFRP4E.YenluiDark\")) {\n newName = game.i18n.localize(\"WFRP4E.YenluiBalanced\");\n newDescription = game.i18n.localize(\"WFRP4E.YenluiBalancedDesc\");\n} else if (this.effect.name === game.i18n.localize(\"WFRP4E.YenluiBalanced\")) {\n newName = game.i18n.localize(\"WFRP4E.YenluiLight\");\n newDescription = game.i18n.localize(\"WFRP4E.YenluiLightDesc\");\n}\n\nif (newName) {\n await this.effect.update({name: newName});\n await this.item.update({name: newName, \"system.description.value\": newDescription});\n}","11uCC0mK2uL783al":"let type = this.item.getFlag(\"wfrp4e\", \"breath\");\n\nif ([\"fire\", \"electricity\", \"poison\"].includes(type))\n{\n args.applyAP = false;\n}","15C6LbCUmQgPEoDM":"await args.actor.addCondition(\"ablaze\");","16nCOByUaSFDym1V":"args.fields.modifier -= 20\n","18MeEQ0As3JvER71":"let state = !this.effect.disabled;\nthis.effect.update({\"disabled\": state});\n\nif (state)\n return ui.notifications.info(\"Effet.CreatureBackInWater\", {localize: true})\n\nreturn ui.notifications.info(\"Effet.CreatureOutOfWater\", {localize: true});","190PHSHKGaJ74wsR":"if (!this.item.name.includes(\"(\") || this.item.system.tests.value.includes(\"Terrain\") || this.item.system.tests.value.toLowerCase().includes(\"(any)\")) {\n let tests = this.item.system.tests.value\n let name = this.item.name\n\n // If name already specifies, make sure Tests value reflects that\n if (name.includes(\"(\") && !name.toLowerCase().includes(\"(any)\")) {\n let terrain = name.split(\"(\")[1].split(\")\")[0]\n tests = tests.replace(\"the Terrain\", terrain)\n }\n else // If no sense specified, provide dialog choice\n {\n let choice = await ItemDialog.create(ItemDialog.objectToArray({\n coastal: \"Littoral\",\n deserts: \"Déserts\",\n marshes: \"Marécages\",\n rocky: \"Rocailleux\",\n tundra: \"Toundra\",\n woodlands: \"Régions boisées\"\n }, this.item.img), 1, \"Choisissez un Terrain\");\n if (choice[0]) {\n name = `${name.split(\"(\")[0].trim()} (${choice[0].name})`\n tests = tests.replace(\"Terrain\", choice[0].name + \" Terrain\")\n }\n }\n\n this.effect.updateSource({ name })\n this.item.updateSource({ name, \"system.tests.value\": tests })\n}","1A87vGLh2PXH0rG0":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Language\"));","1BT0MWM2cbhlEnrn":" let characteristics = {\n \"ws\" : 5,\n \"bs\" : 5,\n \"s\" : 5,\n \"t\" : 0,\n \"i\" : 5,\n \"ag\" : 5,\n \"dex\" : 5,\n \"int\" : 0,\n \"wp\" : 5,\n \"fel\" : 5\n }\n let items = []\n\n let updateObj = this.actor.toObject();\n\n let talents = (await Promise.all([game.wfrp4e.tables.rollTable(\"talents\"), game.wfrp4e.tables.rollTable(\"talents\"), game.wfrp4e.tables.rollTable(\"talents\")])).map(i => i.text)\n\n for (let ch in characteristics)\n {\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n }\n\n for (let talent of talents)\n {\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n }\n\n\n await this.actor.update(updateObj)\n this.actor.createEmbeddedDocuments(\"Item\", items);\n","1CeYp5MlPcH68UIw":"let characteristics = {\n \"ws\" : 15,\n \"bs\" : 10,\n \"s\" : 10,\n \"t\" : 15,\n \"i\" : 10,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 10,\n \"wp\" : 10,\n \"fel\" : 10\n}\nlet skills = [\"Intimidation\", \"Commandement\", \"Perception\"]\nlet skillAdvancements = [10, 10, 10]\nlet talents = [\"Vigilance\", \"Coude-à-coude\", \"Menaçant\", \"Robuste\"]\nlet trappings = [\"Arme simple\", \"Cotte de Mailles\", \"Chausses de Mailles\"]\nlet specialItems = [\n]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","1Du4e27M8WgP2iui":"if (args.equipped === true && this.actor.name !== \"Kurgorn Three-eyes\")\n{\n this.actor.addCondition(\"blinded\", 1, {\"statuses\" : [\"blinded\", \"blind\"]})\n this.script.notification(`Aveuglé en portant ${this.item.name}`);\n}\n\nif (args.equipped === false && this.actor.name !== \"Kurgorn Three-eyes\")\n{\n this.actor.removeCondition(\"blinded\")\n}","1E47r2ba6IGe8uFK":"return args.characteristic != \"t\"","1IodsW9ImamYoEYz":"args.actor.details.move.run += 4","1JwxZujbDcueLWBL":"await this.actor.addCondition(\"ablaze\", 2)\nawait this.script.message(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg: true}))","1LDSzXeO5CzXgTOc":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) || args.skill?.name == `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`","1LDm3OB32skZe6Xv":"return args.characteristic != \"wp\"","1MDOKny7IirJPoI6":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` ${this.effect.name}`})\nawait test.roll()\nif (test.succeeded)\n{\n this.effect.delete();\n}\n","1OpT3CXs07XFWWCT":"args.context.cardsharp = true;","1PPh4vHd5sPKtudZ":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.eowbsW6oHGSNJmxV\", this.effect)","1PQPxFjmRlulHHzo":"if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 2);\n}\n ","1UalUmNzjB4rp3SZ":"return [\"ws\", \"bs\", \"s\", \"ag\", \"t\", \"dex\"].includes(args.characteristic)","1UvL0XA1EpQtjDNn":"let effects = this.item.effects.contents.filter(i => i.id != this.effect.id);\n\nlet choice = await ItemDialog.create(effects, 1, {title : this.effect.name, text: \"Choisissez une Rune\"});\n\nif (choice[0])\n{\n choice[0].performEffectApplication();\n}","1XAilPQEyMWVPA5z":"const qualities = foundry.utils.deepClone(args.item.system.qualities.value);\nqualities.push({name:\"fine\", value: 1});\nargs.item?.update({\"system.qualities.value\": qualities});","1ZArMNUI8qqH6zkX":"let test = await args.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : \" - \" + this.effect.name, context : {failure: \"Gain de 1 état Sonné\"}})\nawait test.roll();\nif (test.failed)\n{\n args.actor.addCondition(\"stunned\")\n}\n","1ZrzpfVwPJHdwp23":"this.actor.status.addArmour(1, {source: this.effect, magical : true})","1exiWlVUHsXDLLAH":"this.script.notification(`Impossible d'entrer dans ${this.effect.name} !`);","1fQr1Dg7DX0vfz3r":"let healed = parseInt(this.effect.sourceTest.result.SL)\nthis.actor.modifyWounds(healed)\nthis.script.message(`Soin de ${healed} Blessures`)","1jQq9v8fXK8zuEBU":"let damage = this.effect.sourceActor.hasCondition(\"fatigued\") ? 6 : 10;\n\nlet loc = \"body\"\n\nlet APatLoc = this.actor.system.status.armour[loc];\n\nlet metalAP = APatLoc.layers.reduce((metal, layer) => metal += ((layer.metal && !layer.magical) ? layer.value : 0), 0)\n\nlet APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at location;\n\ndamage -= (APused + this.actor.system.characteristics.t.bonus)\n\nlet msg = await this.actor.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\nmsg += ` (Ignore ${metalAP} PA de métal sur ${game.wfrp4e.config.locations[loc]})`\nthis.script.message(msg)\n\nlet Test = await this.actor.setupSkill(\"Résistance\", {fields : {difficulty : \"difficult\"}, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nif (test.failed)\n\tthis.actor.addCondition(\"stunned\");","1kB2su7hLRYDhZ2H":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name})\nawait test.roll();\nif (!test.succeeded)\n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.ZhMADOqoo0y8Q9bx\")\n let data = item.toObject();\n if (this.item.system.location.key == \"rLeg\")\n {\n data.system.location.value = \"Orteil Droit\"\n\t data.system.location.key = \"rToe\";\n }\n else if (this.item.system.location.key == \"lLeg\")\n {\n data.system.location.value = \"Orteil Gauche\"\n\tdata.system.location.key = \"lToe\";\n }\n this.actor.createEmbeddedDocuments(\"Item\", [data])\n}\nthis.effect.delete();","1l7Jz2ZHbAWko7Vm":"args.context.ballockKnife = true;","1mNkLj9JYNr3ofC6":"this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => {\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"stunned\", 3)\n }\n})","1wEjrgff7ASxKVmy":"if (args.effect.conditionId == \"bleeding\")\n args.data.damage -= 1","1wKVvxRTHOyV4Qdv":"return !args.skill?.name?.includes(game.i18n.localize(\"NAME.Sail\"))","1wrPvP6lJwIAfmsl":"let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations), 1, \"Choisir la localisation\");\n\nlet location = choice[0].id;\n\nlet itemTargeted = this.actor.items.get(this.effect.getFlag(\"wfrp4e\", \"itemTargets\")[0])\n\nif (itemTargeted)\n{\n itemTargeted.update({[`system.APdamage.${location}`] : itemTargeted.system.APdamage[location] + 1})\n}","1yOvw74jzFfaI87b":"return args.context.reload\n","20fvE9nJmcfGYVzw":"if ( args.totalWoundLoss > 0 ) {\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {difficulty: \"average\"})\n await test.roll();\n if (!test.succeeded)\n { \n this.actor.addSystemEffect(\"gangrene\");\n }\n}","22PMOW0G5MWiBQmg":"let fear = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nfear = fear.toObject();\nfear.system.specification.value = 1;\nawait this.actor.createEmbeddedDocuments(\"Item\", [fear], {fromEffect : this.effect.id})","22bW97lkvCqisfHX":"return args.type != \"channelling\" && !args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\"))","23HgjCB1oecxANvA":"if (args.item.range && args.item.range.bands)\n{\nargs.item.range.bands[game.i18n.localize(\"Long Range\")].modifier = 0\nargs.item.range.bands[game.i18n.localize(\"Extreme\")].modifier /= 2\n}","23PDHNZEnihcEvdK":"if (args.test.result.castOutcome == \"success\" && args.test.spell.system.lore.value.includes(\"high\"))\n{\n this.effect.update({name: this.effect.setSpecifier(parseInt(this.effect.specifier - 1))})\n\n this.script.message(\"La valeur de Protection est maintenant de \" + (this.effect.specifier - 1), {flavor: this.effect.sourceItem.name})\n}","23vWiHUjxtRQ3Efz":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.eWPN3CV2Eddwz8aM\")\nlet data = item.toObject();\ndata.system.location.value = \"Back\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","29wHhLMnuoVjfQtN":"const sl = this.effect.getFlag(\"wfrp4e-archives3\", \"sl\");\nargs.item.system.damage.value += `+${sl}`;","2AOo7KUyzMrgIlgM":"CorruptionMessageModel.createCorruptionMessage(this.item.system.specification.value, {speaker : {alias: this.actor.prototypeToken.name}})","2AdSBXw7IwCiqawQ":"return args.skill?.name == game.i18n.localize(\"NAME.Bribery\") || args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"));","2Cw5j0iGAnFNegWr":"return args.item?.system.attackType\n","2EAYX5G9Fh3HJwiP":"let broken = this.actor.hasCondition(\"broken\");\n\nif (broken) {\n broken.delete();\n this.script.notification(\"Etat Brisé supprimé.\");\n}","2Ej6LUqn8frTRURo":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {difficulty: \"hard\"})\nawait test.roll();\nif (!test.succeeded)\n{\n await this.actor.addCondition(\"unconscious\");\n}","2GYAd4OC888oQFBp":"return ![\"fel\"].includes(args.characteristic)","2IPTF0akWw9y48br":"return !this.item.equipped.value \n || !args?.weapon\n || !([\"goblin\"].includes(args.target.Species.toLowerCase()))","2NLINicPQWbuvp2n":"return args.item?.name != game.i18n.localize(\"NAME.Navigation\")","2OqLHRqEBEjBm2LW":"args.fields.slBonus += this.actor.system.characteristics.wp.bonus","2QB0LjueuJcIaHaC":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = this.item.specifier;\n if (!value)\n {\n value = await ValueDialog.create({text : \"Entrez la valeur d'Armure\", title : this.effect.name});\n }\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value, name : this.item.baseName});\n }\n}","2Qi1hwLYhdE6v6Hs":"if (![\"rLeg\", \"lLeg\"].includes(this.effect.getFlag(\"wfrp4e\", \"location\")))\n\treturn true;\n\nif (args.context.dodge)\n{\n\targs.abort = true;\n\tthis.script.scriptNotification(\"Impossible d'Esquiver!\")\n}\nreturn [\"t\", \"int\", \"wp\", \"fel\"].includes(args.characteristic)","2S6XlGCdRlXuaaVw":"this.actor.system.status.corruption.value += 1","2VNnVrtktdGUqXEV":"if (args.totalWoundLoss > 0)\n{\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed && parseInt(args.sourceTest?.result.SL) > 0)\n {\n args.actor.addCondition(\"stunned\", parseInt(args.sourceTest?.attackerTest.result.SL))\n }\n} ","2W9uMTT6iJhfQ044":"let skill = `${game.i18n.localize(\"NAME.Trade\")} (${this.item.parenthesesText})`\nlet currentCareer = this.actor.system.currentCareer;\nlet existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill);\n\nif (!currentCareer) return\n\n\nlet inCurrentCareer = currentCareer.system.skills.concat(currentCareer.system.addedSkills).includes(skill);\nlet craftsmanAdded = this.actor.getFlag(\"wfrp4e\", \"craftsmanAdded\") || {};\nif (existingSkill && inCurrentCareer && !craftsmanAdded[existingSkill.name])\n{\n\texistingSkill.system.advances.costModifier = -5;\n}\nelse \n{\n\tcraftsmanAdded[skill] = true;\n\tcurrentCareer.system.addedSkills.push(skill);\n\tfoundry.utils.setProperty(this.actor, \"flags.wfrp4e.craftsmanAdded\", craftsmanAdded)\n}","2WBq5gW780C6zfCp":"if (args.weapon && this.item.system.usesLocation(args.weapon))\n{\n args.bleedingHand = true;\n let success = await this.effect.manualScripts[0].execute({actor: this.actor})\n if (!success)\n {\n args.abort = true;\n }\n}","2WSN306tL4apjRtD":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS\")\nlet data = item.toObject();\ndata.name = data.name += ` (${game.i18n.localize(\"SPEC.Hearing\")})`\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","2XXqxAF5s5Sws6qj":"this.actor.system.status.corruption.value += 2","2XaJNYUMQAmSOsqi":"const {targetUuid} = this.effect.flags.wfrp4e;\n\nif (args.attacker.uuid !== targetUuid) return;\n\nlet recordedWounds = this.effect.getFlag(\"wfrp4e\", \"damageToReturn\") ?? 0;\n\nrecordedWounds += args.totalWoundLoss;\n\nthis.effect.setFlag(\"wfrp4e\", \"damageToReturn\", recordedWounds);","2Yh4vQm0ZJukRH1x":"return !args.skill?.name.includes(\"Focalisation\");","2cKarG9ToyW2ptCd":"if (this.item.system.quantity.value)\n{\n\tthis.item.update({\"system.quantity.value\" : this.item.system.quantity.value - 0.25})\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","2hzDv8ROulOe1elK":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Lore\"));","2kRwCc31fuZgrsy8":"CorruptionMessageModel.createCorruptionMessage(\"major\", this.script.getChatData());","2mFNelLOAQ6iJsZl":"if (args.test.isFumble)\n{\n args.test.result.other.push(\"@Table[doomrocket-fumble]\")\n}","2miWWeRrEpq1beG4":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.qn4ZpvTQIX4rcJDl\");\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n","2p9IK6Y5Z4NQD6FY":"args.prefillModifiers.difficulty = \"hard\"","2rzxQlL7A9ujZ9uK":"if (args.opposedTest.result.winner == \"attacker\") {\n if (args.opposedTest.defenderTest.weapon && args.opposedTest.defenderTest.item.properties.qualities.shield) {\n ui.notifications.notify(`${this.effect.name}: Gain de ${this.item.Advances} Avantage(s)`)\n this.actor.setAdvantage(this.item.Advances)\n }\n}","2sDH6RvoOAR40oqH":"\n\nif (![\"Goblin\", \"Orc\"].includes(this.actor.system.details.species.value)) {\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), { appendTitle: ` - ${this.effect.name}` })\n await test.roll();\n if (test.failed) {\n let infection = await fromUuid(\"Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg\")\n this.actor.createEmbeddedDocuments(\"Item\", [infection])\n }\n}\n\n// Since wounds change when the effect is deleted, need to wait until after \n// the max wounds have been recalculated to apply damage\nwarhammer.utility.sleep(1000).then(async () => {\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n\n roll.toMessage(this.script.getChatData());\n this.script.message(await this.actor.applyBasicDamage(roll.total, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true }))\n\n})","2uyajbon5QX1CewS":"return args.skill?.name == \"Voile (Aéronavale)\"","2vTVR0quRZQtjNfQ":"let currentCareer = this.actor.system.currentCareer;\nif (!currentCareer)\n{\n return;\n}\n\nlet talents = [game.i18n.localize(\"NAME.AA\"),\n`${game.i18n.localize(\"NAME.ArcaneMagic\")} (${game.i18n.localize(\"SPEC.Any\")})`,\ngame.i18n.localize(\"NAME.ChaosMagic\") + \" \" + \"(Tzeentch)\",\ngame.i18n.localize(\"NAME.FastHands\"),\ngame.i18n.localize(\"NAME.ID\"),\ngame.i18n.localize(\"NAME.MagicalSense\"),\ngame.i18n.localize(\"NAME.PettyMagic\"),\ngame.i18n.localize(\"NAME.SecondSight\"),\ngame.i18n.localize(\"NAME.WarWizard\"),\ngame.i18n.localize(\"NAME.Witch\")].filter(t => !currentCareer.system.talents.includes(t))\n\ncurrentCareer.system.talents = currentCareer.system.talents.concat(talents)","2wk0yrRPlPsdqr3L":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.9GNpAqgsKzxZKJpp\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","2yW0kuwLfgRzJR2S":"const duration = 3600 * (1 + Number(this.effect.sourceTest.result.SL));\nthis.effect.update({\"duration.seconds\": duration});","2yctEihGmdCfTTVx":"args.data.reversal = {allowed : true, if: \"success\"};\nargs.context.fieldDressing = true;","2z6DazIpsfiRZHdl":"const qualities = foundry.utils.deepClone(args.item.system.qualities.value);\nqualities.push({name:\"lightweight\"});\nargs.item?.update({\"system.qualities.value\": qualities});","2zeP2nMSURjxrqYz":"let wounds = this.actor.system.status.wounds\nif (wounds.value == 0)\n return this.script.notification(\"Aucun effet à 0 Blessures\", \"error\")\n\nthis.script.notification(`Soin de ${this.actor.characteristics.t.bonus} Blessures`)\nawait this.actor.modifyWounds(this.actor.characteristics.t.bonus)","2zpYzKVDNE5y9RLL":"return !args.actor?.has(game.i18n.localize(\"NAME.Swarm\")) ||\n ![game.wfrp4e.config.actorSizeNums.tiny, game.wfrp4e.config.actorSizeNums.ltl]\n .includes(args.actor?.sizeNum)","32EPIAz7Qm71ut3m":"if (Number(this.actor.system.details.age.value) > 870) {\n if ([\"t\", \"wp\", \"fel\"].includes(args.characteristic))\n args.fields.slBonus -= 3;\n if ([\"ag\", \"dex\", \"int\"].includes(args.characteristic))\n args.fields.slBonus -= 2;\n} else if (Number(this.actor.system.details.age.value) > 350) {\n if ([\"t\", \"wp\"].includes(args.characteristic))\n args.fields.slBonus -= 2;\n if ([\"fel\"].includes(args.characteristic))\n args.fields.slBonus -= 1;\n} else {\n if ([\"t\", \"wp\"].includes(args.characteristic))\n args.fields.slBonus -= 1;\n}","33PWizq5F7pkKnQT":"if (args.item.type == \"spell\")\n{\n args.item.cn.value = Math.floor(args.item.cn.value / 2)\n}","33US8YRgaMqYu2We":"return !args.context.handling","37UN17gb8suFeZIW":"this.script.message(await this.actor.applyBasicDamage(8, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))","3AbonnSVfoSlGye8":"this.effect.updateSource({name: this.effect.setSpecifier(\"9\")});","3CdYFcInQVCIBUiE":"args.actor.system.details.move.value += 2;\nargs.actor.system.status.carries.max = Math.floor(args.actor.system.status.carries.max * 0.5);\nargs.actor.system.details.price.gc *= 1.1;","3CeKfDcMEVgQlcXm":"await this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN\", this.effect, {name: \"Haine (Tous les ennemis)\"});","3Cn2TlRahlm5LkSj":"args.fields.successBonus += 1;","3D5ImpMgpOTPucvv":"if (args.test.options.cardsharp && args.test.succeeded)\n{\n\nlet SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\nlet ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.Test.result.other.push(`${this.effect.name}: ${ones + args.test.successBonus + args.test.slBonus} DR`)\n}","3IGO7xEjRjat937X":"let fatigue = this.actor.hasCondition(\"fatigued\")\nif (fatigue)\n{\n this.script.notification(\"Etat Extenué - Suppression de la condition Extenué, effet désactivé\")\n this.effect.update({disabled : true})\n await this.actor.removeCondition(\"fatigued\")\n}","3JEzEzF1SeYA9lsV":"let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations, this.effect.img), 1, \"Choose Location\");\nif (choice[0])\n{\n this.effect.updateSource({name : `${this.effect.name} (${choice[0].name})`})\nthis.effect.updateSource({\"flags.wfrp4e.location\" : choice[0].id})\n}\n\nlet location = choice[0].id;\n\nif ([\"lArm\", \"rArm\"].includes(location))\n{\n let dropped = this.actor.itemTypes.weapon.filter(i => i.isEquipped & i.system.usesHands.includes(location));\n\n if (dropped.length)\n {\n this.script.notification(`Dropped ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}\n\nif (location == \"body\")\n{\n await this.actor.addCondition(\"fatigued\");\n test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"hard\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"prone\");\n }\n}\n\nif (location == \"head\")\n{\n await this.actor.addCondition(\"stunned\");\n test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"average\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"unconscious\");\n }\n}","3KH6OE7L7uJESI2Z":"if ([\"dragon\"].includes(args.opposedTest.defender.details.species.value.toLowerCase()))\n {\n args.applyTB = false;\n args.opposedTest.result.other.push(\"Wyrmslayer: Ignore le BE contre les Dragons\")\n }","3LLiSgj6KGtgqcmo":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Language\"));","3R6Y4NpNTqPc83wh":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.IPKRMGry6WotuS1G\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","3SuLF6SImYWEHMo2":"args.context.doombolt = true;","3TesBGh8HnlGuafu":"let modifier = this.effect.sourceTest?.result.overcast.usage.other.current || 0\n\nlet test = await this.actor.setupCharacteristic(\"dex\", {fields: {modifier}, skipTargets: true, appendTitle : \" - \" + this.script.label});\n\ntest.roll();","3Vbe6gdW8N0bIvXJ":"if (args.item.type == \"weapon\" || args.item.type == \"trait\")\n{\n args.item.qualities.value.push({name : \"penetrating\"})\n args.item.qualities.value.push({name : \"impale\"})\n}","3VhUyqNY18PzeMKG":"args.abort = true;\nthis.script.notification(\"Impossible d'attaquer cette cible !\");","3aEzK0DehSHtVykd":"this.effect.manualScripts[0].execute({actor : this.actor});","3eSaX0BeaUalNkEP":"return args.context.mutate","3fdCQ3h3iVuhdDs9":"args.fields.slBonus += this.actor.characteristics.ag.bonus;","3hfMQkUKYI4rCuBy":"return args.skill?.name != game.i18n.localize(\"NAME.CharmAnimal\") && !args.skill?.name.includes(game.i18n.localize(\"NAME.AnimalTraining\"));","3ixqbsEMfSSTzAXU":"const test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {\n difficulty: \"challenging\",\n context: {\n failure: \"Subi l'état @Condition[Fatigued] à cause de cauchemars.\",\n success: \"A souffert de cauchemars, mais a assez bien dormi.\"\n }\n});\nawait test.roll();\n\nif (test.failed) {\n await this.actor.addCondition(\"fatigued\");\n}","3j8yybMaAZSwzxIE":"let weaponData = await this.effect.setFlag(\"wfrp4e\", \"weaponData\", this.item.system.toObject());\n\ntry {\n\n\n await this.item.update({\n system: {\n \"weaponGroup.value\": \"throwing\",\n \"qualities.value\": this.item.system.qualities.value.concat([{ name: \"accurate\" }]),\n \"range.value\": \"SB * 3\",\n \"consumesAmmo.value\" : false\n }\n })\n\n let test = await this.actor.setupWeapon(this.item, {}, {resolveClose : true});\n await test?.roll();\n this.item.update({ system: this.effect.getFlag(\"wfrp4e\", \"weaponData\") })\n}\ncatch (e) {\n this.item.update({ system: this.effect.getFlag(\"wfrp4e\", \"weaponData\") })\n}","3jm0NoYpgB6ZuUSl":"args.context.useOnesAttractive = true;","3l7MQSa10Kve2K3P":"this.script.message(await this.actor.applyBasicDamage(Math.ceil(CONFIG.Dice.randomUniform() * 10) + 6, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}))\nthis.actor.addCondition(\"ablaze\");","3nTSOcCmNZpQWK8b":"this.actor.addCondition(\"blinded\", 3);","3na3lnAt3bfysvcD":"const blinded = this.actor.hasCondition(\"blinded\");\nif (!blinded)\n this.actor.addCondition(\"blinded\");","3plV9WFqs2prfAdp":"return ![\"NAME.Evaluate\", \"NAME.Gamble\"].map(i => game.i18n.localize(i)).includes(args.skill?.name)","3sfD1nedXLzuYoXJ":"if (this.actor.hasCondition(\"surprised\"))\n{\n this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"average\"}, skipTargets: true, appendTitle : \" - \" + this.effect.name}).then(test => test.roll())\n}\n","3tE8gFSl28EhCmo5":"await args.actor.addCondition(\"ablaze\")\nawait args.actor.addCondition(\"prone\")","3z3m1pmw03DbQzcb":"return this.effect.name !== game.i18n.localize(\"WFRP4E.YenluiLight\")","42UATqzohYML6a9t":"if ( !this.actor.hasCondition(\"poisoned\") ) {\n\tthis.effect.delete();\n}","454x3Q95pLvZm0Kx":"return args.skill?.name == game.i18n.localize(\"NAME.ConsumeAlcohol\");","49smPAj5J0INSFPI":"return args.item?.system.isRanged;","4AO7Fowek5sSmE4g":"const venomUUID = \"Compendium.wfrp4e-core.items.gFkRm9wS65qe18Xv\";\nconst venom = this.actor.itemTags.trait.find(t => t.name === \"Venin\");\n\nif (venom) {\n await this.effect.setFlag(\"wfrp4e-tribes\", \"venom\", {\n _id: venom.id,\n \"system.specification.value\": venom.system.specification.value\n });\n await venom.update({\"system.specification.value\": \"Difficult\"});\n} else {\n await this.actor.addEffectItems(venomUUID, this.effect, {\n \"system.specification.value\": \"Challenging\"\n });\n}","4FGKZk2f0xrmIDnp":"return args.skill?.name != game.i18n.localize(\"NAME.Research\") && !args.skill?.name?.includes(game.i18n.localize(\"NAME.Language\"));","4HN98hMdQJxM35pA":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.gz2xy41OSVZ8YBgI\");\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data])\n","4JVIy5xtVwvadoqv":"this.actor.details.move.run *= 2","4KYraZSHAEYmL6xx":"if (this.item.equipped.value && args.totalWoundLoss > 10) {\n args.totalWoundLoss = Math.min(10, args.totalWoundLoss)\n args.extraMessages.push(`${this.effect.name}: Perte de Blessures limitée à 10`)\n}","4MQ7u4INxp51oyyR":"let characteristics = {\n \"ws\" : 25,\n \"bs\" : 10,\n \"s\" : 15,\n \"t\" : 15,\n \"i\" : 25,\n \"ag\" : 20,\n \"dex\" : 0,\n \"int\" : 10,\n \"wp\" : 25,\n \"fel\" : 10\n}\nlet skills = [\"Calme\", \"Esquive\", \"Intimidation\", \"Intuition\", \"Commandement\", \"Savoir (Guerre)\", \"Perception\"]\nlet skillAdvancements = [15, 15, 15, 15, 15, 10, 10]\nlet talents = [\"Vigilance\", \"Combat Instinctif\", \"Feinte\", \"Inspiring\", \"Déterminé\", \"Seigneur de guerre\"]\nlet trappings = [\"Arme simple\", \"Bouclier\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","4OlwxU60UqKg81yb":"const target = args.actor;\n\nif (target.has(\"Éthéré\") || target.has(\"Corruption\")) {\n args.totalWoundLoss += 6;\n args.modifiers.other.push({label: this.effect.name, value: 6})\n}","4Q3Mp04O2sMgKv9x":"return !args.title.includes(\"Spellbreaking\")","4QoxhoekgVeZcQA7":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.M5QSWOYt2Rbv2yxW\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","4WQ25VsJSUZ2DeRB":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.EO05HX7jql0g605A\", this.effect, {\"system.specification.value\": this.actor.system.characteristics.ag.value});","4XrAeL2DitxE8OaK":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.0hn6UaKq8CoZP2zD\")\nlet data = item.toObject(); \nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});","4ZR7p8G3OzOBWx0L":"return args.skill?.name !== game.i18n.localize(\"NAME.Endurance\");","4cOZzUvu1nytcqNn":"args.initiative = \"-10\"","4cumLUlcuJ7m8C6t":"let item = args.actor.items.find(i => i.name.includes(\"Smoothing\"));\nlet smoothing = item?.effects.find(e => e.name === \"Smoothing\");\nif (smoothing)\n smoothing.disabled = true;","4drWKXjMgasxY7Jy":"args.actor.system.details.price.gc += Math.floor(args.actor.system.details.price.gc * 0.1);","4fnTKgl0HW9ZrWyJ":"this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty : \"average\"}}).then(async test =>\n{\n await test.roll()\n if (test.failed)\n {\n let char = Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? \"s\" : \"t\";\n this.script.message(`${this.actor.name} perd 1 point de ${game.wfrp4e.config.characteristics[char]}`)\n this.actor.update({[`system.characteristics.${char}.initial`] : this.actor.system.characteristics[char].initial - 1})\n }\n})","4gkz3LR7CK1b8ulK":"return args.item?.system.attackType != \"ranged\" || this.actor.uuid != this.effect.sourceActor.uuid","4iu3CmOI19soOYuA":"let characteristics = {\n \"ws\" : -10,\n \"bs\" : -10,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : -10,\n \"ag\" : -10,\n \"dex\" : 0,\n \"int\" : -200,\n \"wp\" : -200,\n \"fel\" : -200\n}\nlet traits = [ {name:\"Armure\", value: 2}, {name:\"Fabriqué\"}, {name:\"Vision dans l'obscurité\"}, {name:\"Peur\", value: 2}, {name:\"Insensible à la douleur\"},{name:\"Mort-vivant\"},{name:\"Instable\"} ];\nlet items = [];\n\nlet updateObj = this.actor.toObject();\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nupdateObj.system.characteristics.int.initial = 0;\nupdateObj.system.characteristics.wp.initial = 0;\nupdateObj.system.characteristics.fel.initial = 0;\n\nfor (let trait of traits)\n{\n let traitItem = await game.wfrp4e.utility.find(trait.name, \"trait\")\n if (traitItem)\n {\n let t = traitItem.toObject();\n t.system.specification.value = trait.value;\n if (trait.disabled)\n {\n t.system.disabled = true;\n }\n items.push(t);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trait.name}`, {permanent : true})\n }\n}\n\n\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","4iuTz0uInAfMaoGl":"return args.skill?.name?.includes(game.i18n.localize(\"NAME.Language\")) || args.type == \"cast\"","4jLe2XZQVUB8LztP":"args.fields.slBonus += this.effect.getFlag(\"wfrp4e\", \"slBonus\") || 0;","4otpLq2TnDdgzpvc":"args.actor.system.details.man -= 3;","4pQW4WLyhjbZR85k":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"average\"}, context : {failure: \"1 Corruption Point Gained\"}})\nawait test.roll();\nif (test.failed && this.actor.type == \"character\")\n{\n this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + 1})\n this.script.message(\"Gain de 1 point de Corruption\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","4rTmV3TNxctUe0ly":"let test = await this.actor.setupCharacteristic(\"ag\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"bleeding\");\n}\n","4rb7LfMq9CTnlrpn":"if (args.totalWoundLoss > 0)\n{\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name})\n await test.roll();\n if (test.failed)\n {\n args.totalWoundLoss += 5;\n args.modifiers.other.push({label : this.effect.name, value : 5})\n }\n}","4rhxLzau7jZ4SDxg":"await args.actor.addCondition(\"grappling\")\nawait args.actor.addCondition(\"entangled\")","4uAUUZmLgxBKSmXA":"if (args.totalWoundLoss > 0) \n this.effect.delete();","4ylzjgUdHY5D0yVh":"let characteristics = {\n \"ws\" : 25,\n \"bs\" : 10,\n \"s\" : 15,\n \"t\" : 15,\n \"i\" : 25,\n \"ag\" : 20,\n \"dex\" : 0,\n \"int\" : 10,\n \"wp\" : 25,\n \"fel\" : 10\n}\nlet skills = [\"Calme\", \"Esquive\", \"Intimidation\", \"Intuition\", \"Langue (Bataille)\", \"Commandement\", \"Savoir (Guerre)\", \"Perception\"]\nlet skillAdvancements = [15, 15, 15, 15, 10, 15, 10, 10]\n\nlet talents = [\"Vigilance\", \"Maîtrise du combat\", \"Combat Instinctif\", \"Inspiring\", \"Déterminé\", \"Seigneur de guerre\"]\nlet trappings = [\"Arme simple\", \"Bouclier\", \"Plastron d'acier\", \"Brassards\", \"Heaume\", \"Jambières d'acier\"]\nlet specialItems = []\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nlet filters = [\n {\n property : \"type\",\n value : \"weapon\"\n },\n {\n property : \"system.weaponGroup.value\",\n value : [\"twohanded\", \"polearm\"]\n }\n]\n\nitems = items.concat(await ItemDialog.createFromFilters(filters, 1, {text : \"Choisissez une arme d'hast ou une arme à deux mains appropriée\"}))\n\nlet ride = await foundry.applications.api.DialogV2.confirm({title : \"Compétence\", content : \"Ajouter Chaos Steed et +20 en Monte (Cheval) ?\", window : {title : this.effect.name}})\n\nif (ride)\n{\n let skill = await game.wfrp4e.utility.findSkill(\"Monte (Cheval)\")\n skill = skill.toObject();\n skill.system.advances.value = 20;\n items = items.concat({name : \"Chaos Steed\", type: \"trapping\", \"system.trappingType.value\" : \"misc\"}, skill)\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","52kbfuWrOh6dsTtd":"if (!this.actor.hasCondition(\"blinded\"))\n\tthis.actor.addCondition(\"blinded\", 1, {\"flags.wfrp4e.flockOfDoom\" : true})","52mwb33mGrQjq89B":"return args.skill?.name != game.i18n.localize(\"NAME.Research\");","53HFDNuMnX1Aw1a4":"return [\"ws\", \"bs\", \"s\", \"ag\", \"dex\", \"int\", \"wp\", \"fel\"].includes(args.characteristic)","55eYGvSXetDMK80S":"const diseaseIds = this.actor.items.filter(i => i.type == \"disease\").map(i => i.id)\nthis.actor.deleteEmbeddedDocuments(\"Item\", diseaseIds)","58rFc9HiBoX66J6p":"let sourceActor = this.effect.sourceActor;\nlet damage = args.totalWoundLoss;\nlet tb = sourceActor.system.characteristics.t.bonus\nargs.abort = `${this.effect.name}: Dégâts appliqués à ${sourceActor.name}`;\n\nlet message = await sourceActor.applyBasicDamage(damage - tb, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})\n\nthis.script.message(message.replace(`${tb} TB`, `${tb} × 2 TB`))\nargs.abort = true;","5DI6cHAg1LHo54Yv":"if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == \"attacker\")\n{\n this.actor.update({\"system.status.fortune.value\" : Math.max(0, (this.actor.system.status.fortune?.value - 1) || 0)})\n this.script.message(`1 Point de Chance volé à ${this.actor.name}`, {blind : true, whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n\n}","5Fe1ELaS6Gnvy0Cj":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) || args.type == \"channelling\" || args.skill?.name == game.i18n.localize(\"NAME.Charm\") || args.skill?.name.includes(`${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`) || args.type == \"cast\"","5GHQxfxlmjyt1fNq":"let item1 = await fromUuid(\"Compendium.wfrp4e-core.items.Item.EO05HX7jql0g605A\")\nlet item2 = await fromUuid(\"Compendium.wfrp4e-core.items.Item.Bvd2aZ0gQUXHfCTh\")\nlet ids = await this.actor.createEmbeddedDocuments(\"Item\", [item1, item2], {fromEffect : this.effect.id})\nthis.actor.updateEmbeddedDocuments('Item', [ {_id: ids[0].id, 'system.specification.value': 16} ] )","5GP9UJMvBZv6kWtI":"this.script.message(await this.actor.applyBasicDamage(8, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))\n\n\nlet msg = ``\nlet weapons = args.actor.itemTypes.weapon.filter(i => !i.system.location.value);\nlet armour = args.actor.itemTags.armour.filter(i => !i.system.location.value);\nfor(let item of weapons)\n{\n\tif (item.system.properties.qualities.shield)\n\t{\n\t\tawait item.system.damageItem(1, \"shield\");\n\t}\n\telse\n\t{\n\t\tawait item.system.damageItem(1);\n\t}\n\tmsg += `

${item.name} endommagé de 1

`\n}\nfor(let item of armour)\n{\n\tawait item.system.damageItem(1);\n\tmsg += `

${item.name} endommagé de 1

`\n}\nif (msg)\n{\n\tthis.script.message(msg, {speaker : {alias : args.actor.name}});\n}","5IoYTyedCMYwt3ys":"args.fields.slBonus += 2;","5JWC0l3JEpOsqbR9":"let characteristics = {\n \"ws\" : 0,\n \"bs\" : 5,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : 10,\n \"ag\" : 10,\n \"dex\" : 0,\n \"int\" : 0,\n \"wp\" : 5,\n \"fel\" : 0\n}\nlet skills = [\"Esquive\", \"Perception\"]\nlet skillAdvancements = [10, 10]\nlet talents = [\"Fuite !\", \"Tireur de précision\"]\nlet trappings = [\"Arme simple\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","5JvKJZPcd6Hz5zvn":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 0,\n \"s\" : 10,\n \"t\" : 10,\n \"i\" : 20,\n \"ag\" : 10,\n \"dex\" : 0,\n \"int\" : 0,\n \"wp\" : 15,\n \"fel\" : 0\n}\nlet skills = [\"Calme\", \"Esquive\", \"Intimidation\", \"Commandement\"]\nlet skillAdvancements = [15, 15, 10, 5]\nlet talents = [\"Vigilance\", \"Combat Instinctif\", \"Feinte\", \"Déterminé\"]\nlet trappings = [\"Cotte de Mailles\", \"Chausses de Mailles\", \"Coiffe de Mailles\", \"Arme simple\", \"Bouclier\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = this.effect.name + \" \" + updateObj.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","5KIozV7HxyGvskeD":"args.data.reversal = {allowed : true, if: \"worse\"};","5KVslRqhqzuFLyk4":"if (!this.actor.has(\"Béni (Taal)\", \"talent\")) return;\n\nthis.actor.system.characteristics.wp.modifier += 15;","5LdJCKfQem1AQK24":"\nif (!args.flags.howlingWarpGale)\n{\n args.fields.modifier -= 10;\n args.flags.howlingWarpGale = true; // prevent double application\n}","5M6IgCUncCwyxHok":"let etiquette = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP\")).toObject();\netiquette.name += ` (Suivants de Tzeentch)`;\n\nlet animosity = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f\")).toObject();\nanimosity.system.specification.value = \"Suivants de Nurgle\";\n\nlet roll = await new Roll(\"ceil(1d10 / 3)\").roll({allowInteractive : false});\n\nroll.toMessage(this.script.getChatData());\n\nlet mutations = [];\nlet msg = `

Mutations Acquises

`\nfor(let i = 0; i < roll.total; i++)\n{\n let item;\n let uuid;\n let result;\n if (i % 2 == 0)\n {\n result = await game.wfrp4e.tables.rollTable(\"mutatemental\", {hideDSN: true}, \"Tzeentch\")\n }\n else\n {\n result = await game.wfrp4e.tables.rollTable(\"mutatephys\", {hideDSN: true}, \"Tzeentch\")\n }\n uuid = `Compendium.${result.object.documentCollection}.${result.object.documentId}`;\n item = await fromUuid(uuid);\n if (item)\n {\n msg += `

@UUID[${uuid}]{${item.name}}

`\n mutations.push(item.toObject());\n }\n}\nthis.actor.createEmbeddedDocuments(\"Item\", mutations.concat([etiquette, animosity]), {fromEffect : this.effect.id})\nthis.script.message(msg);","5MxRDXzUBPfp2KKD":"args.context.useOnesSupportive = true;","5QR83whGk4ZyuJcA":"await this.effect.update({duration:{rounds: this.actor.system.characteristics.ws.bonus}});","5QjaPBFbv5rIYpla":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"average\"}, appendTitle : \" - Wounded\"})\n await test.roll();\n if (test.failed)\n {\n fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\").then(disease => {\n this.actor.createEmbeddedDocuments(\"Item\", [disease.toObject()])\n this.script.scriptNotification(\"Gain de \" + disease.name)\n })\n }","5ScjIdRUOxblHdWS":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'challenging';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","5XAYjiq1i4M7Ky7j":"const trait = this.actor.itemTags.trait.find(t => t.name === \"Régénération\");\nconst name = \"Régénération Pourrie\";\n\nif (!trait) return;\n\nconst effect = trait.effects.find(e => e.name === \"Régénération\");\nconst scriptData = effect.system.scriptData;\n\nscriptData[0].script = `\n let chatData = {whisper: ChatMessage.getWhisperRecipients(\"GM\")};\n let message = \"\";\n\n let wounds = foundry.utils.duplicate(this.actor.status.wounds);\n let regenRoll = await new Roll(\"1d10\").roll({allowInteractive : false});\n let regen = regenRoll.total;\n\n if (wounds.value >= wounds.max)\n return;\n\n if (wounds.value > 0) {\n wounds.value += Math.floor(regen / 2);\n if (wounds.value > wounds.max) {\n wounds.value = wounds.max;\n }\n message += \\`\\${this.actor.name} regagne \\${regen} Blessures.\\`;\n\n if (regen === 10) {\n message += \"
De plus, il régénère une Blessure Critique.\";\n }\n } else if (regen >= 8) {\n message += \\`\\${this.actor.name} a obtenu un \\${regen} et regagne 1 Blessure.\\`;\n wounds.value += 1;\n if (regen === 10) {\n message += \"
De plus, il régénère une Blessure Critique.\";\n }\n } else {\n message += \\`\\${this.actor.name} Résultat de régénération de \\${regen} - Aucun effet.\\`;\n }\n\n await this.actor.update({\"system.status.wounds\": wounds});\n this.script.message(message, {whisper: ChatMessage.getWhisperRecipients(\"GM\")});\n`\n\nawait effet.update({\n name,\n \"system.scriptData\": scriptData\n});\n\nawait trait.update({ name });","5Zxc13GBaJaxCf48":"const visor = this.item.getFlag('wfrp4e', 'visor');\n\nif (!visor)\n args.fields.modifier -= 10;\nelse\n args.fields.modifier -= 20;","5dR7Erj3nwsxLAV7":"let characteristics = {\n \"ws\" : 35,\n \"bs\" : 10,\n \"s\" : 25,\n \"t\" : 30,\n \"i\" : 30,\n \"ag\" : 25,\n \"dex\" : 0,\n \"int\" : 15,\n \"wp\" : 35,\n \"fel\" : 15\n}\nlet skills = [\"Calme\", \"Esquive\", \"Intimidation\", \"Intuition\", \"Commandement\", \"Savoir (Guerre)\", \"Perception\"]\nlet skillAdvancements = [25, 15, 25, 25, 30, 20, 20]\nlet talents = [\"Vigilance\", \"Combat Instinctif\", \"Feinte\", \"Inspiring\", \"Chanceux\", \"Déterminé\", \"Inébranlable\", \"Seigneur de guerre\"]\nlet trappings = [\"Arme simple\", \"Bouclier\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","5gPAT5Bb2FvQwYNQ":"args.test.preData.reversal = {allowed : true, if: \"better\"};\nthis.effect.delete();","5lc1eHIYQNpSRWip":"if ([\"death\", \"necromancy\"].includes(args.spell?.system.lore.value))\n{\n args.fields.successBonus += 1\n}\nelse if([\"life\", \"light\", \"heavens\"].includes(args.spell?.system.lore.value))\n{\n args.fields.modifier -= 10;\n}","5lpR78CLhYH6Mjnu":"if (this.actor.has(\"Arboricole\",\"trait\")) return\n\nthis.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.rOV2s6PQBBrhpMOv\", this.effect)","5o1XiceC4rutjMms":"return !args.item?.name.includes(game.i18n.localize(\"NAME.Stealth\"))","5rlneScoI5feQ3Di":"const traits = this.actor.itemTypes.trait.filter(t => [\"bestial\", \"skittish\"].includes(s.name.toLowerCase()));\ntrait.system.disabled = true;","5sI9iYh5j2nx2XyT":"return !([game.i18n.localize(\"NAME.AnimalCare\"), game.i18n.localize(\"NAME.CharmAnimal\")].includes(args.item?.name) || args.item?.name.includes(game.i18n.localize(\"NAME.Ride\")) || args.item?.name.includes(game.i18n.localize(\"NAME.AnimalTraining\")));","5sYpJkT2WXIe0gIZ":"const rating = parseInt(this.effect.name.match(/\\d+/)?.[0]) || 1;\n\nlet crewList = foundry.utils.duplicate(this.actor.system.passengers.list);\nlet selectedCrew = [];\n\nwhile (selectedCrew.length < rating && crewList.length) {\n selectedCrew.push(crewList.splice(crewList.length * Math.random() | 0, 1)[0]);\n} \n\nfor (let member of selectedCrew) {\n let actor = game.actors.get(member.id);\n actor.applyBasicDamage(9, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.NORMAL, \n minimumOne: true, \n loc: \"roll\", \n suppressMsg: false, \n hideDSN: false \n });\n}","5uokSqQsjgMapnCi":"if (\n this.item == args.defenderTest.item\n && args.defenderTest.succeeded\n && args.defenderTest.item?.system?.attackType == 'melee'\n && (args.attackerTest.item.properties.qualities?.magical || args.attackerTest.item.properties.unusedQualities?.magical)\n)\n{\n args.opposedTest.result.other.push(`${this.effect.name}: détruit magique ${args.attackerTest.item.name}.`)\n}","5z5nGwZC5RIwokev":"this.script.message(await this.actor.applyBasicDamage(12, {suppressMsg: true, loc: \"roll\"}))","6136BMmiGLwZ16H1":"return !!args.skill","62Ky6bC1EnTllSJA":"if (this.effect.sourceActor.uuid != args.actor.uuid)\n{\n this.script.message(await this.actor.applyBasicDamage(this.effect.sourceTest.result.overcast.usage.other.current, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true}));\n}","64aJznxPMUHAuf7F":"if (this.item.flags.runeOfLuck || this.actor.type != \"character\") return\n\nconst currentFortune = this.actor.status.fortune.value\nconst runesOfLuck = this.item.effects.contents.filter(e => e.name == this.effect.name)\nconst runeFortune = parseInt(runesOfLuck.length)\n\nif (args.equipped) {\n this.item.flags.runeOfLuck = true\n await this.actor.update({\"system.status.fortune.value\" : runeFortune + currentFortune})\n this.script.message(`Points de Chance augmentés de ${currentFortune} à ${runeFortune + currentFortune}.`)\n}\nelse\n{\n this.item.flags.runeOfLuck = true\n await this.actor.update({\"system.status.fortune.value\" : Math.max(0, currentFortune - runeFortune)})\n this.script.message(`Points de Chance réduits à ${Math.max(0, currentFortune - runeFortune)}.`)\n}","65o8pQj6oGNnXce6":"let ch = this.effect.getFlag(\"wfrp4e\", \"characteristic\")\nthis.actor.system.characteristics[ch].modifier += 10;","65xE9OV5sA1ZWT7j":"if (args.test.options.diceman && args.test.succeeded)\n{\n\nlet SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\nlet ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.Test.result.other.push(`${this.effect.name}: ${ones + args.test.successBonus + args.test.slBonus} DR`)\n}","6A6ddQDJo23oOWtK":"const SL = this.effect.getFlag(\"wfrp4e\", \"SL\") ?? 0;\n\nargs.fields.slBonus += SL;","6Aqq4F4Xui923sc6":"// Imbibing this substance grants the user the utilisateur d Creature Trait.\nconst hasColdBlooded = this.actor.has(\"À Sang Froid\")\nif (hasColdBlooded === undefined)\n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.mCh1KK9jomwFZcLB\")\n let data = item.toObject()\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n\n this.script.message(`

${this.actor.prototypeToken.name} a acquis le Trait de Créature À Sang Froid et peut annuler tout test de Volonté raté.

\n

Si ils gagnent une Condition Surpris, cette Condition n'est pas perdue la première fois qu'elle devrait l'être (ce qui est généralement à la fin du Round ou si la victime est attaquée).

`,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true })\n}","6AsCMHZ4IYPq7Uxf":"return args.skill?.name.includes(\"Focalisation\");","6BmvV9c03FkfisnE":"// Apply changes when the mask is worn\n\nif (args.equipped) {\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [this.item.effects.contents[1]?.convertToApplied()])\n this.script.message(`${this.actor.name} porte le ${this.item.name}.
\n Ils gagnent +1 point de Corruption si un Test d'exposition échoue, ce qui devra être appliqué manuellement.
S'ils portent le masque pendant plus d'une heure ou bénéficient de l'un de ses effets, ils sont exposés à @Corruption[modérée]{Corruption Modérée}\n `,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n\n// Notify of lingering effects when mask is Retiré\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Utilisé)\"})\n this.script.message(`${this.item.name} porté par ${this.actor.name} a été retiré et perd ses propriétés. Cependant, les effets durent [[1d10+4]] jours, après quoi ils doivent être retirés manuellement.`,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n )\n\n}","6EXkbVTRBhKTEu81":"if (!args.flags.bothEyes)\n{\n\targs.flags.bothEyes = true;\n\targs.fields.modifier -= 30\n}","6Fe8M5MdklKS2olx":"return args.characteristic != \"fel\"","6H6vNjzvMGl2ZqCR":"if (args.totalWoundLoss > 0)\n this.script.message(`Blade of Nurglitch: ${args.actor.name} doit réussir un Test d'Résistance de Difficulté (-10) ou recevoir une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Blessure Purulente}`, {whisper: ChatMessage.getWhisperRecipients(\"GM\") })","6HfCvw24X6oEe2vn":"if ([\"t\", \"s\"].includes(args.characteristic))\n{\n\targs.fields.modifier += 10;\n}","6JrUjs3g5x6bFnj3":"let bite = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet sense = await fromUuid(\"Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS\")\nlet biteData = bite.toObject();\nlet senseData = sense.toObject();\n\nbiteData.system.specification.value = 6 - this.actor.characteristics.s.bonus;\nsenseData.name = senseData.name += game.i18n.localize(\"SPEC.Smell\")\nthis.actor.createEmbeddedDocuments(\"Item\", [biteData, senseData], {fromEffect : this.effect.id})","6LMzIdmCSYctgmGx":"const stupid = this.actor.items.find(i => i.name === \"Stupidee\");\n\nif (!stupid) return;\n\nawait stupid.update({\"system.disabled\": true});","6MSodMuZ5xk2JJJ9":"if (!this.actor.hasCondition(\"ablaze\"))\n{\n this.effect.delete();\n}","6Mjy0jDqczA8BxhS":"return ![\"roll\", \"none\"].includes(args.fields.hitLocation)","6P2QNPKfwQ1xwxZT":"args.fields.slBonus ++","6QZUX7ZrFxOzqI0b":"let regenerate = this.actor.items.getName('Régénération')\n\nif (regenerate)\n{\n let effect = regenerate.effects.contents[0]\n let scriptData = effect.system.scriptData;\n \n scriptData[0].script = scriptData[0].script.replace(\"1d10\", \"1d10 * 2\")\n}","6U8xox4mBrn5eYIp":"if (args.totalWoundLoss > 0)\n args.actor.addCondition(\"ablaze\")","6V3qHON3mcerlBlB":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\");\n}","6Ws3ieQ7pG5poUyT":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = await ValueDialog.create({text : \"Entrez le Savoir d'Incantation\", title : this.effect.name}, \"\", Object.values(game.wfrp4e.config.magicLores));\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","6XWJWOUQPgKMsFul":"return args.item?.system.attackType != \"ranged\" || args.flags.howlingWarpGale","6ZS1rQLkNvMDO0Fp":"let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)\nif (args.test.isFumble && roll == 1 && !args.test.result.misfire)\n{\n args.test.result.misfire = game.i18n.localize(\"Misfire\") + \" (Rolled 1)\"\n args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage)\n}\nelse if (args.test.isFumble && roll != 1)\n{\n args.test.result.other.push(\"Misfire Roll: \" + roll)\n}\n\n","6a5nBENmfxy93vGY":"const deduct = this.effect.setFlag(\"wfrp4e\", \"failed\");\n\nif (!deduct) return;\n\nthis.actor.system.characteristics.ws.modifier -= 20;\nthis.actor.system.characteristics.bs.modifier -= 20;","6elUNF58TaiYjxcx":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : \" - \" + this.effect.name, context : {failure: \"GAin d'1 état Sonné\"}})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\");\n}","6fElmBxTjdAaubbK":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"average\"}});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}\n","6frithfMs7Nbv0IZ":"args.fields.slBonus += this.effect.sourceActor.system.characteristics.fel.bonus;","6gRixT3zIOAberJb":"const disease = await fromUuid(\"Compendium.wfrp4e-soc.items.Item.8Q9JYtR1y3B5J6UH\");\nconst data = disease.toObject();\ndata.system.incubation.value = 0;\ndata.system.duration.active = true;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id});","6hAgggYpNR3r4QWC":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Q2MCUrG2HppMcvN0\")\nitem = item.toObject()\nlet species = args.actor.Species || \" de votre espèce\"\nitem.name = `Animosité (tous sauf ${species})`\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","6jcTzK1XEuWqAacN":"args.abort = true;\nthis.script.notification(`Impossible d'utiliser ${game.wfrp4e.config.locations[this.effect.getFlag(\"wfrp4e\", \"location\")]}!`, \"error\")","6jp8slPU33oBQe1V":"return args.context.crewTest?.system.handling !== true;","6kifXp2jXEaQVJsg":"let useWard = await foundry.applications.api.DialogV2.confirm({\n\tcontent : `

Utiliser la Protection fournie par ${this.effect.name}?`,\n\twindow : {\n\t\ttitle : this.effect.name,\n\t}\n})\n\nif (useWard)\n\targs.ward = 9;","6maNAmREdataXmo4":"if (this.actor.system.status?.ward?.value) {\n this.actor.system.status.ward.value = Math.max(7, this.actor.system.status.ward.value-1);\n} else {\n this.actor.system.status.ward.value = 9;\n}","6mpw9cGseG4W4eyd":"if (this.actor.system.status.advantage.value >= 2)\n{\n await this.actor.modifyAdvantage(-2);\n this.script.notification(\"Avantage retiré\")\n}\nelse\n{\n return this.script.notification(\"Pas assez d'Avantage!\", \"error\")\n}\n\nlet test = await this.actor.setupTrait(this.item)\nawait test.roll();","6nA5LPXneAahHX2W":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tlet sourceActor = this.effect.sourceActor;\n\tthis.script.message(await this.actor.applyBasicDamage(4 + sourceActor.system.characteristics.s.bonus, {suppressMsg : true}))\n}","6oSs8qKFNFz2lSmh":"if (args.actor.system.details.move.sail.value > 0)\n args.actor.system.details.move.sail.value = 0;\n","6qJP0hpShEM43ohx":"const actor = args.actor;\n\nif (actor.itemTypes.skill.find(s => s.name === \"Savoir (Océans)\")) {\n const loreTest = await actor.setupSkill('Savoir (Océans)', {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'hard'},\n characteristic: 'int',\n });\n await loreTest.roll();\n\n if (loreTest.succeeded) {\n loreTest.result.other.push(`${actor.name} reconnaît l'attrait du Léviathan.`);\n loreTest.renderRollCard();\n return;\n }\n}\n\nlet Test = await actor.setupSkill('Calme', {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'easy'},\n characteristic: 'wp',\n});\nawait test.roll();\n\nif (!Test.succeeded) {\n Test.result.other.push(`${actor.name} est devenu @Condition[Stunned] par la vue.`);\n test.renderRollCard();\n actor.addCondition(\"stunned\");\n}","6qUKKep5vhFYmo1J":"return args.type == \"channelling\" || args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\"))","6tjn0RH4VyOPFneS":"return [\"NAME.Row\", \"NAME.Swim\"].map(i => game.i18n.localize(i)).includes(args.skill?.name);","6ubojp9zwbfJnosT":"args.actor.system.details.move.value += 1;","6uldpFvKOCoW92cC":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.uqGxFOEqeurwkAO3\")\nitem = item.toObject()\n\nitem.system.specification.value = 10;\nitem.name += \" (Fire)\"\nfoundry.utils.setProperty(item, \"flags.wfrp4e.breath\", \"fire\")\n\nItem.create(item, {parent : this.actor, fromEffect: this.effect.id})","6xTtJEhRc4OjcDTf":"if (foundry.utils.getProperty(args.data, \"system.status.fortune.value\"))\n{\n\tthis.script.scriptNotification(\"Impossible de mettre à jour la Chance\");\n\tdelete args.data.system.status.wounds.value;\n}","713v1T8HNste94pr":"args.context.grudge = true;","715G1Bf0haOHvmYQ":"return !(args.skill?.name == game.i18n.localize(\"NAME.Bribery\") || args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\")))","71DmrxCTKGYL4Z7X":"return [\"fel\"].includes(args.characteristic)","7BgJe9YkbHTh3ucm":"if (args.totalWoundLoss <= 0) return;\n\nconst test = await this.actor.setupSkill(\n game.i18n.localize(\"NAME.Endurance\"),\n {\n fields: {difficulty: \"difficult\"},\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n },\n);\n\nawait test.roll();\n\nif (test.failed) {\n const item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.kKccDTGzWzSXCBOb\");\n const data = item.toObject();\n\n data.system.duration.active = true;\n\n args.actor.createEmbeddedDocuments(\"Item\", [data]);\n}","7Ck0fkzE4WQ62qVe":"if (args.item.type == \"skill\" && args.item.name == `${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Basic\")})`)\n{\n args.item.system.modifier.value += 20;\n}","7F3miqRA0ceMUBIu":"return args.characteristic != \"int\" || args.skill","7F6aGxZJjwxm5e5P":"if (args.test.result.castOutcome == \"failure\")\n{\n ValueDialog.create({text : \"Entrez les Blessures Perdues pour gagner des DR\", title : this.effect.name}, \"0\").then(async value => {\n value = Math.clamp(value, 0, 3)\n if (value == 0)\n {\n return;\n }\n else if (Number.isNumeric(value))\n {\n this.script.notification(`Lost ${value} Wounds`)\n this.actor.modifyWounds(-1 * value)\n await this.item.system.toggleEquip();\n args.Test.addSL(value);\n args.Test.preData.other.push(`${this.effect.name}: +${value} SL`)\n }\n })\n}","7H6wYyJ6cpaoc2QQ":"return args.skill?.name == game.i18n.localize(\"NAME.Cool\");","7JW9t8AYSDkkzG2V":"// Apply changes when the mask is worn\n\nif (args.equipped)\n{\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [this.item.effects.contents[1]?.convertToApplied()])\n this.script.message(`${this.actor.name} porte le ${this.item.name}.
\n S'ils portent le masque pendant plus d'une heure ou bénéficient de l'un de ses effets, ils sont exposés à @Corruption[moderate]{Corruption Modérée}.\n `,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n\n// Notify of lingering effects when mask is Retiré\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Used)\"})\n this.script.message(`${this.item.name} sur ${this.actor.name} a été retiré et perd ses propriétés. Cependant, les effets durent [[1d10+4]] jours, après quoi ils doivent être retirés manuellement.`,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n )\n\n}","7OmrMjaU48o2FEZi":"\nthis.actor.characteristics.t.bonus = 10\n\nthis.actor.details.move.value = 0;\nthis.actor.details.move.walk= 0;\nthis.actor.details.move.run = 0;","7ScfB4o1QhXnNUfq":"return ![\"int\", \"wp\"].includes(args.characteristic)","7T3iXgrL72fea67C":"const bloodyFluxUUID = \"Compendium.wfrp4e-core.items.Item.herUmN51D9TiL2Vn\";\n\nconst test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"easy\"},\n context: {\n success: `Butcher est soigné.`,\n failure: `Butcher contracte @UUID[${bloodyFluxUUID}].`\n }\n});\n\nawait test.roll();\n\nif (test.failed) {\n await this.actor.addEffectItems(bloodyFluxUUID, this.effet);\n} else {\n const SL = test.result.SL;\n const heal = 1 + SL;\n await this.actor.modifyWounds(heal);\n this.script.message(`Butcher a soigné ${heal} Blessures.`);\n}","7UUS0gX2Pbi0HHiz":"return args.skill?.name !== game.i18n.localize(\"NAME.Swim\");","7VAhXHov6pR1SkgD":"return args.item?.name == game.i18n.localize(\"NAME.Endurance\");","7WR2hJjHPhHhHxAq":"let poisoned = args.actor.hasCondition(\"poisoned\")\nif (poisoned)\n{\n this.script.notification(`SSuppression de ${poisoned.conditionValue} états Empoisonnés`)\n poisoned.delete();\n}\nelse\n this.script.notification(`Aucun état Empoisonné à supprimer.`)","7ZoFUMDG2WJd8RMg":"this.script.message(`Bonus utilisé : ${this.effect.name}`);","7ateEtT5HXg1vObY":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.AcnFuDKRemLI9ey7\", // Nose for Trouble\n \"Compendium.wfrp4e-core.items.Item.WoXShzaYkV5F6c48\", // Master of Disguise\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","7e8FgQUF2oANANmx":"return args.skill?.name == game.i18n.localize(\"NAME.MeleeBrawling\") || args.item?.weaponGroup?.value == \"brawling\"","7f6OsttTzE7Hvzfk":"if (this.actor.statuses.has(\"infighting\") && !args.flags.infighter) \n{\n args.fields.modifier += 10;\n args.flags.infighter = true;\n}\n\nargs.fields.successBonus += 1; ","7n3SEAGRA5ESK8gV":"args.context.disarm = true;","7szLG4VALuuy1cPm":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"easy\"}})\nawait test.roll();\nif (test.failed)\n{ \n await this.actor.addCondition(\"fatigued\")\n} ","7w7QA7GBhzZ98OS0":"const sin = this.effect.sourceActor.system.status.sin.value;\nconst result = await WFRP_Tables.rollTable(\"manann-mood-made-meaningless\", sin);\nlet match = result.description.match(/b>([^<]+)/i);\nlet key = match[1];\nlet roll = new Roll(\"5d10\");\nlet value = undefined;\n\nawait this.script.message(result.description, {flavor: result.title});\n\nswitch (key) {\n case 'Triopmhe de Stromfels!':\n value = 0;\n break;\n case 'Stromfels monte!':\n await roll.evaluate();\n if (this.actor.system.status.mood.value > 0)\n value = -roll.total;\n else if (this.actor.system.status.mood.value < 0)\n value = roll.total;\n break;\n case 'Aucun effet.':\n break;\n case 'Manann est provoqué!':\n await roll.evaluate();\n value = -roll.total;\n break;\n}\n\nif (roll._evaluated)\n await roll.toMessage();\n\nawait this.effect.setFlag(\"wfrp4e-soc\", \"m4result\", {result: key, value});","7wBWUw05q0igh508":"// Imbibing this substance grants the user the Painless Creature Trait.\nconst hasPainless = this.actor.has(\"Insensible à la douleur\");\nif (hasPainless === undefined)\n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr\");\n let data = item.toObject()\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n\n this.script.scriptMessage(\n `

${this.actor.prototypeToken.name} a acquis le Trait de Créature Insensible à la douleur. Cet\n effet dure une heure, après quoi il se dissipe et l'effet complet\n de toutes les blessures du buveur s'abat d'un coup.

\n

Notez que cela n'empêche pas l'utilisateur d'acquérir une Blessure Critique\n ou d'en mourir. Cela leur permet simplement d'ignorer la plupart\n de leurs effets.

`,\n { whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true})\n}","7y89OcMmGbjRMgTg":"return !this.item.equipped.value \n || !args?.skill\n || !([game.i18n.localize(\"NAME.Charm\"), \n game.i18n.localize(\"NAME.Intimidate\"), \n game.i18n.localize(\"NAME.Leadership\")].includes(args.skill.name))","84IB8CWa55XzoAkv":"return ([game.i18n.localize(\"NAME.AnimalCare\"), game.i18n.localize(\"NAME.CharmAnimal\")].includes(args.item?.name) || args.item?.name.includes(game.i18n.localize(\"NAME.Ride\")) || args.item?.name.includes(game.i18n.localize(\"NAME.AnimalTraining\")));","86ivOsBQAuu0UmFg":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"hard\"}, appendTitle : ` - ${this.effect.name}`, skipTargets: true});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"poisoned\");\n}","873KaarAnJ2qf1r2":"args.modifiers.other.push({label : this.effect.name, details : \"Augmentation des Dégâts\", value : 1})","87rrZ3ojHrXa3lCn":"this.actor.modifyWounds(1)","8AoA4bnstBtglRGZ":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","8BCzpjFU0GeA17Wp":"args.fields.modifier +=20;","8ByuHnUZ4RNTdGVv":"let strLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10)\nlet tghLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n\nif (!this.actor.has(\"Undead\") && !this.actor.has(\"Daemonic\"))\n{\n this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), { appendTitle: \" - \" + this.effect.name, fields: { difficulty: \"average\" }, context: { failure: `Lost ${strLoss} Strength and ${tghLoss} Toughness` } }).then(async test => {\n await test.roll();\n if (test.failed) {\n this.actor.update({ \"system.characteristics.s.initial\": this.actor.system.characteristics.s.initial - strLoss, \"system.characteristics.t.initial\": this.actor.system.characteristics.t.initial - tghLoss })\n }\n })\n\n}\nelse {\n this.script.notification(`${this.actor.name} est immunisé contre ${this.effect.name}`)\n}\n","8Gan2EeGExBFSxmp":"let damage = this.effect.sourceTest.result.damage;\n\nif (this.actor.sizeNum >= game.wfrp4e.config.actorSizeNums.lrg)\n damage += 7; // goes from +8 to +15;\n\nif (this.actor.has(game.i18n.localize(\"NAME.Unstable\"))) \n damage *= 2;\n\nthis.actor.applyDamage(damage, {\n loc: \"roll\",\n createMessage: this.script.getChatData()\n});","8GyJgdHVBaLrHCY8":"let type = this.item.getFlag(\"wfrp4e\", \"breath\")\nlet types = {\n none : \"None\",\n cold : \"Froid\",\n corrosion : \"Corrosion\",\n fire : \"Feu\",\n electricity : \"Électricité\",\n poison : \"Poison\",\n smoke : \"Fumée\",\n various : \"Divers\"\n}\nif (!type)\n{\n type = (await ItemDialog.create(ItemDialog.objectToArray(types, this.item.img), 1, \"Choisir Souffle\"))[0]?.id;\n this.item.updateSource({\"flags.wfrp4e.breath\" : type})\n}\n\nif (!this.item.name.includes(\"(\") && types[type] && type != \"none\")\n{\n this.item.updateSource({name : this.item.name += ` (${types[type]})`, \"system.specification.value\" : this.item.system.specification.value.replace(\"(Type)\", \"\").trim()})\n}","8K9tpCwvFC9INk5V":"if ([\"t\", \"wp\"].includes(args.characteristic))\n{\n\targs.fields.modifier += 10;\n}\nelse if ([\"ag\", \"i\", \"int\"].includes(args.characteristic))\n{\n\targs.fields.modifier -= 10;\n}","8LmUVQxOwTLSeabg":"return args.data.targets.length > 0 || !args.weapon?.system.qualities.value.find(i => i.name == \"shield\") // Should count even if they don't have the skill","8N3Uqjq1ZxPxo4pk":"return !args.skill?.name?.includes(game.i18n.localize(\"NAME.Lore\"))","8OwUgwZI8hOJt2hG":"args.fields.modifier += ((this.effect.sourceTest?.result.slOver * 10) || 10)","8R7O63iC0yANtkJ9":"if (this.item.equipped.value && this.actor.hasCondition(\"ablaze\"))\n{\n await this.actor.removeCondition(\"ablaze\")\n this.script.notification(`Ne peut recevoir un état En Flammes`,\"info\");\n}","8RNziYGGb4sp3BGQ":"if (!args.test.weapon?.name.includes(\"Drakefire\"))\n{\n args.test.result.misfire = game.i18n.localize(\"Misfire\");\n args.test.result.misfireDamage = (0, eval)(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.weapon.system.Damage);\n}","8ShLVT0bK1eQpinj":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.k00PimCWkff11IA0\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data])","8TRiAJ8thIKE4IoL":"\nlet SL = Number(foundry.utils.getProperty(this.item, \"flags.wfrp4e.sourceTest.result.SL\") || 1)\n\nargs.actor.characteristics.i.modifier += 10 * SL\nargs.actor.characteristics.ag.modifier += 10 * SL","8ThudCYRqkjQIwJH":"if (args.opposedTest.attackerTest.result.critical)\n{\n args.actor.addCondition(\"ablaze\")\n}","8WJsecxdndaHRxxS":"this.actor.status.addArmour(this.actor.characteristics.wp.bonus, {source: this.effect, magical : true})","8WeYU5e5LN9UeWFs":"if (args.item.type == \"spell\")\n{\n let range = parseInt(args.item.Range)\n if (Number.isNumeric(range))\n {\n args.item.system.range.value = \"2 * \" + args.item.system.range.value\n }\n}","8ZAUBSH9CM9OTpTL":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Perception\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"easy\"}});\nawait test.roll();\n\nif (test.succeeded)\n{\n this.actor.addCondition(\"stunned\") \n}\nelse if (test.failed)\n{\n this.actor.addCondition(\"poisoned\", 2);\n}","8araLuwmBq8GKEw3":"let APIgnored = args.AP.layers.reduce((prev, current) => prev + ((current.weakpoints && !current.ignored) ? current.value : 0), 0)\n\nif (APIgnored)\n{\n args.modifiers.ap.ignored += APIgnored\n args.modifiers.ap.details.push(`${this.effect.name}: Ignore les PA avec des points faibles (${APIgnored})`)\n}","8fefDfiYKFOWdPER":"args.update({texture : {scaleX : 2, scaleY: 2, src: \"modules/wfrp4e-core/tokens/popout/gor.webp\"}});","8g2iitsgaJarKQpr":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.V0c3qBU1CMm8bmsW\")\nlet data = item.toObject()\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n","8gCja0mfKt4nYVZc":"args.fields.slBonus += 2 ","8hIyWDyfbgGAig65":"return [\"ws\", \"bs\", \"s\", \"t\", \"ag\", \"dex\"].includes(args.characteristic)","8jvEVPUCg3rKG48Y":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.9fq6p9Q6H02LjaSi\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","8noxHUQKR55Kx1YN":"this.actor.system.status.corruption.max += 1","8oE0DTzz0krOfFlV":"args.item.system.qualities.value.push({name : \"magical\"})\nargs.item.system.qualities.value.push({name : \"impact\"})\n","8pbVGsVFlDebu2Ac":"args.wounds += 2;","8qOGotfGFA0HYQ6W":"let resistances = this.actor.itemTags.talent.filter(i => i.name == game.i18n.localize(\"NAME.MagicResistanceTalent\"));\n\nfor(let talent of resistances)\n{\n talent.system.max.value = \"custom\";\n talent.system.max.formula = \"@characteristics.t.bonus + 2\"\n}","8rq4GL5d5nCn4kO7":"let caster = this.effect.sourceActor\nif (caster)\n{\n let healed= caster.characteristics.wp.bonus\n this.actor.modifyWounds(healed);\n this.script.message(`${this.actor.prototypeToken.name} regagne ${healed} Blessures`)\n}","8tyMXDfHR8AJBdDu":"let weakpointsAP = args.AP.layers.filter(i => !i.ignored && i.weakpoints).reduce((ap, layer) => ap + layer.value, 0);\n\nif (weakpointsAP > 0)\n{\n args.modifiers.ap.ignored += weakpointsAP;\n args.modifiers.ap.details.push(`${this.effect.name} - Ignore les points faibles (${weakpointsAP})`);\n}","8vpAtJ93GIeye1qj":"return args.type == \"cast\"","8wG9l4T9fc1bM0TN":"let item = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.kJNAY1YRaCy9IgmT\")).toObject();\nitem.system.specification.value = 1;\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","8xqYrBIf1Zhlwizg":"const repaired_message = `

Ancre terminée.

`;\nconst test = 'Strength';\nconst difficulty = 'vhard';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","8yBr6VbdKcrWUuqw":"this.actor.characteristics.i.value= \"-\"\nthis.actor.characteristics.int.value= \"-\"\nthis.actor.characteristics.wp.value= \"-\"\nthis.actor.characteristics.fel.value = \"-\"","8zTkDVziBPaNbMQX":"let filters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"petty\"\n }\n]\n\nlet petty = await ItemDialog.createFromFilters(filters, 6, {text : \"Choisissez 6 Sorts Mineurs\"})\n\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"\"\n }\n]\n\nlet arcane = await ItemDialog.createFromFilters(filters, 9, {text : \"Choisissez 9 Sorts d'Arcane\"})\n\nlet items = petty.concat(arcane).map(i => i.toObject())\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","91S2GnBFYFbxmOCK":"this.actor.characteristics.s.bonus += 1\nthis.actor.characteristics.s.calculationBonusModifier -= 1","93K85NnVwjVNXlZq":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Trade\"));","94eDAi6pkMhG3Ex9":"this.actor.deleteEmbeddedDocuments(\"ActiveEffect\", [this.effect.id]);","956dUb5sd6OtbWZR":"args.fields.successBonus++;","96Y1yIH1lRjTs5hL":"if (args.test.failed && args.test.characteristicKey == \"wp\")\n{\n this.actor.addCondition(\"broken\")\n}","97yDvwmUqkwHktQj":"let data = this.effect.getFlag(\"wfrp4e\", \"handOfGlory\");\nlet changes = [];\n\nif (!data)\n{\n return;\n}\n\nif (data.characteristic == \"movement\")\n{\n changes = [{key: \"system.details.move.value\", mode: 2, value: 2}]\n}\nelse \n{\n let currentTotal = this.actor.system.characteristics[data.characteristic].value;\n let newTotal = this.actor.system.characteristics[data.characteristic].value + data.roll;\n let bonusOffset = Math.floor(currentTotal / 10) - Math.floor(newTotal / 10); // e.g. 37 + 15 bonus = 52, calculation bonus modifier should be -2\n\n changes = changes.concat({\n key: `system.characteristics.${data.characteristic}.modifier`,\n mode: 2,\n value: data.roll\n }, \n {\n key: `system.characteristics.${data.characteristic}.calculationBonusModifier`,\n mode: 2,\n value: bonusOffset\n })\n}\n \nthis.effect.updateSource({changes});","98nKfcimlaPeM9h5":"await this.actor.addCondition(\"bleeding\")\nawait this.script.message(await this.actor.applyBasicDamage(10, {suppressMsg : true}));","9A7rYY3FKi5XLihG":"fromUuid(\"Compendium.wfrp4e-core.items.5QcrpLQWWrsbKR79\").then(item => {\n let data = item.toObject();\n data.system.tests.value = data.system.tests.value.replace(\"coins\", \"metal objects\");\n data.system.description.value += \"

Ce talent s'applique à tout objet métallique en raison de Affinité Métallique

\"\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n})","9AMoFRATTAfdKlKN":"const test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"challenging\"},\n context: {\n failure: `Gain de 1 état @Condition[Poisoned].`\n }\n});\n\nawait test.roll();\n\nif (test.failed) {\n args.actor.addCondition(\"poisoned\");\n const speaker = ChatMessage.getSpeaker({actor: args.actor});\n this.script.message(`

${speaker.alias} a reçu 1 état @Condition[Poisoned] de Venin d'Araignée.

Les victimes réduites à 0 blessures et qui souffrent d'un état @Condition[Poisoned] de ces flèches deviennent @Condition[Unconcious], mais ne risquent pas la mort à cause des états @Condition[Poisoned] restants comme ce serait normalement le cas.

`);\n}","9EVj4bmZJex45Mt7":"return args.skill?.name != game.i18n.localize(\"NAME.Athletics\");","9HWEDsnNxSykqbF5":"args.actor.system.details.move.value += 3;\nargs.actor.system.status.carries.max = Math.floor(args.actor.system.status.carries.max * 0.25);\nargs.actor.system.details.price.gc *= 1.1;","9JnPK1jNUEso7Pv8":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS\")\nlet data = item.toObject();\ndata.name += ` (${game.i18n.localize(\"SPEC.Smell\")})`\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","9MDi3ok9gPwtbALf":"args.actor.details.move.value /= 2","9MwRUzRinhq1IjhG":"args.actor.addCondition(\"grappling\");","9RFoasDcFnYZ1txR":"return args.skill?.name == game.i18n.localize(\"NAME.Perception\");","9VfeubiCV83LN9iY":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM\")\nlet data = item.toObject();\ndata.name += ` (En charge)`\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","9WZa63lr0K3SsP4G":"let sourceItem = this.effect.sourceItem;\n\nif (sourceItem)\n{\n\tthis.actor.applyEffect({effectUuids : [sourceItem.effects.contents[2].uuid]})\n\tthis.script.notification(\"Effets secondaires appliqués\");\n}","9Yn9uViEjcuaESJ2":"if (this.item.getFlag(\"wfrp4e\", \"failedCool\"))\n{\n this.item.name += \" (No AP)\"\n this.item.system.AP = {\n \"head\": 0,\n \"lArm\": 0,\n \"rArm\": 0,\n \"lLeg\": 0,\n \"rLeg\": 0,\n \"body\": 0\n }\n}","9ZFPDCk8M2TQxh7x":"args.fields.modifier += 20\n","9bJGJrLqslV5lBya":" return args.characteristic == \"bs\"","9eL5JbQQmCY030ba":"this.actor.addCondition(\"poisoned\");","9eWR4mdaoCSQawDT":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.GlShFJF2TpsNh1FX\");\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n","9fK07tqqZyPg7dpx":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty: \"veasy\"}})\nawait test.roll();\nif (test.failed)\n{\n this.script.notification(\"Gained a Festering Wound\")\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\")\n this.actor.createEmbeddedDocuments(\"Item\", [item.toObject()])\n}\nelse \n{\n this.script.notification(\"Avoided a Festering Wound\")\n}\n","9fNHye2N2DORR0A3":"return !args.item.name.includes(\"Arme\")","9nroaZDkW3WXNkB7":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.4MJJCiOKPkBByYwW\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","9ob2lPnk3PDot9Tx":"this.actor.addCondition(\"blinded\", this.effect.sourceTest.result.SL)","9qWUuEF8F5nehF1y":"args.item.system.qualities.value = args.item.system.qualities.value.concat([{name : \"magical\"}, {name : \"unbreakable\"}])\nargs.item.system.damage.value += ` + ${this.effect.sourceActor.system.characteristics.wp.bonus}`","A0OK0qAMmnf8iNJf":"if (args.test.result.SL < 0)\n{\n this.script.message(`Gain de ${Math.abs(args.test.result.SL)} Points de Corruption`, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n if (args.test.failed && this.actor.type == \"character\")\n {\n this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + Math.abs(args.test.result.SL)})\n }\n}","A1odAcuRbq9797ZB":"let choice1 = [\n {\n type : \"skill\",\n name : \"Mêlée (Base)\",\n diff : {\n system : {\n advances : {\n value : 10\n }\n }\n }\n }\n]\nlet choice2 = [\n {\n type : \"skill\",\n name : \"Mêlée (arme d'hast)\",\n diff : {\n system : {\n advances : {\n value : 10\n }\n }\n }\n }\n]\n\nlet choice = await foundry.applications.api.DialogV2.wait({\n window : {\n title : \"Choix\"\n },\n content :\n `

\n Sélectionnez votre choix\n

\n
    \n
  1. Mêlée (Base)
  2. \n
  3. Mêlée (arme d'hast)
  4. \n
\n `,\n buttons : [\n {\n label : \"Base\",\n callback : () => {\n return choice1;\n }\n },\n {\n label : \"Arme d'hast\",\n callback : () => {\n return choice2;\n }\n }\n ]\n})\n\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n let equip = item.system.tags.has(\"equippable\");\n item = item.toObject()\n if (equip)\n {\n item.system.equipped.value = true;\n }\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","A3MW0UksYrHGa0Qw":"return [\"fel\", \"wp\", \"int\", \"t\"].includes(args.characteristic);","A3XrFB7SvV2vcg1a":"if (args.applyAP) \n{\n args.applyAP = false;\n}","A3fvV69RS1lYgma0":"if (this.actor.type == \"character\") \n this.actor.corruptionDialog(\"minor\")\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name})\nawait test.roll();\nif(test.failed)\n{\n await this.actor.addCondition(\"unconscious\");\n let secondTest = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"easy\"}, skipTargets: true, appendTitle : \" - Despair\"})\n await secondTest.roll();\n if(secondTest.failed)\n {\n await this.actor.addCondition(\"fatigued\");\n }\n}","A6DcKPzAGntzSCil":"let roll = await new Roll(\"1d10\").roll()\n\nroll.toMessage(this.script.getChatData({flavor : `Lâche ${dropped.map(i => i.name).join(\", \")}!`}));\n\nthis.effect.updateSource({\"duration.rounds\" : roll.total})","ACgKpKrEEHoNGG0h":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) && args.type != \"channelling\"","ACtDCTLZXmd5uXjX":"let halve;\nif (args.opposedTest.attackerTest.item?.type != \"spell\")\n{\n halve = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : \"Diviser les dégâts par deux ? (Divise tous les dégâts sauf le feu, le froid et la magie)\"})\n}\nelse\n{\n halve = false;\n}\n\nif (halve)\n{\n args.totalWoundLoss /= 2;\n args.modifiers.other.push({label : this.effect.name, details : \"Divisé par deux\", value : \"× 0.5\"})\n}","AFiB20FaOBmBv2Kz":"if (args.actorsystem.details.move.sail.value > 0)\n args.actor.system.details.move.sail.value = Math.floor(args.actor.system.details.move.sail.value * .5);\n","AGD7zCyV4zruvnWu":"return args.type != \"cast\" || ![\"death\", \"necromancy\", \"life\", \"light\", \"heavens\"].includes(args.spell?.system.lore.value)","AHZ8f7dfN8jNsYk6":"let token = this.actor.getActiveTokens()[0];\nlet target = args.data.targets[0];\nlet weapon = args.weapon;\n\nif(!target || !token)\n{\n return;\n}\n\nlet distance = canvas.grid.measureDistances([{ ray: new foundry.canvas.geometry.Ray({ x: token.center.x, y: token.center.y }, { x: target.center.x, y: target.center.y }) }], { gridSpaces: true })[0]\nlet currentBand\n\nfor (let band in weapon.range.bands) \n{\n if (distance >= weapon.range.bands[band].range[0] && distance <= weapon.range.bands[band].range[1]) \n {\n currentBand = band;\n break;\n }\n}\n\nreturn [game.i18n.localize(\"Long Range\"), game.i18n.localize(\"Extreme\")].includes(currentBand)","AHt3D7EHKWBcL3vu":"if (this.item.system.protects[args.loc] && (args.sourceItem?.system.isMagical || args.sourceItem?.type == \"trait\"))\n{\n const heatBased = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : \"Apply protection from heat-based attacks?\"})\n\n if (heatBased) \n {\n args.applyAP = true;\n args.modifiers.other.push({label : this.effect.name, value : -1 * this.item.system.currentAP[args.loc], details : this.item.name});\n }\n}","AI6bFrjWk4NH9FBd":"this.actor.addCondition(\"entangled\", this.effect.sourceTest.result.overcast.usage.other.current)","AI7iVbQMPzXMP5on":"const hours = new Roll(\"2d10\");\nawait hours.toMessage({flavor: this.effect.name + \" (heures)\"});\n\nconst bonus = new Roll(\"2d10\");\nawait bonus.toMessage({flavor: this.effect.name + \" (heures)\"});\n\n\nawait this.effect.update({\n \"duration.seconds\": hours.total * 3600\n});\nawait this.effect.setFlag(\"wfrp4e-tribes\", \"bonus\", bonus.total);","ALuPRzf85dmkEfLo":"return args.skill?.name == game.i18n.localize(\"NAME.Intuition\");","AMI2wDJqsIZsoq1e":"if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == \"attacker\")\n{ \n this.script.message(`Emits a cloud of foul-smelling blackpowder. Enable the Fellowship Penalty Active Effect on @UUID[${this.actor.uuid}].`, {blind : true, whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","AMxezwtYnWCF6Oza":"return args.skill?.name == `${game.i18n.localize(\"NAME.Ranged\")} (${game.i18n.localize(\"SPEC.Blackpowder\")})`","AS7CstSosuCrwZ19":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 20,\n \"bright\": 10,\n \"angle\": 360,\n \"alpha\": 0.4,\n \"animation\": {\n \"speed\": 3,\n \"intensity\": 3,\n \"type\": \"torch\",\n },\n \"color\": \"#ffcc66\",\n }}));","AV2Kj6jgmIc45zKi":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"));","AVROqafFhKjN6TPR":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.DrNUTPeodEgpWTnT\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","AWgZnm9xLyIWCDnp":"let robust = args.modifiers.other.find(i => i.key == \"robust\")\nif (robust)\n{\n\trobust.value--;\n}\nelse \n{\n\targs.modifiers.other.push({key: \"robust\", label : this.effect.name, value : -1})\n}\n","AYEiCx2Es3QtMY28":"let choice1 = [\n {\n type: \"trait\",\n name: \"Bestial\",\n },\n {\n type: \"trait\",\n name: \"Regeneration\",\n },\n {\n type: \"trait\",\n name: \"Taille (Large)\",\n },\n {\n type: \"trait\",\n name: \"Territorial\",\n }\n]\n\nlet updateObj;\nlet actor;\n\nasync function addTrait(c) {\n let items = [];\n let existing;\n if (c.type == \"trait\") {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type);\n }\n if (!existing) {\n let item = await game.wfrp4e.utility.find(c.name, c.type);\n if (item) {\n item = item.toObject();\n items.push(item);\n }\n else\n ui.notifications.warn(`Impossible de trouver ${c}`, { permanent: true });\n }\n console.log(\"WISH LIST2\", choice1, items);\n actor.createEmbeddedDocuments(\"Item\", items);\n}\n\nasync function dialogChoice() {\n for (let c of choice1)\n {\n if (await foundry.applications.api.DialogV2.confirm({window : {title: \"Option\"}, content:`

Add Option?

  1. ${c.name}
`}))\n {\n addTrait(c)\n c.valid = true;\n }\n }\n}\n\nupdateObj = this.actor.toObject();\nactor = this.actor\nawait dialogChoice();\n","AZGXrZOQ4EzjxRL9":"return true;","AaPPmnv7AtxsRVUs":"args.actor.details.move.value = 1;","Adgs6Zs0FdefO6qx":"if (args.test.options.pilot && args.test.result.reversed)\n{\n\targs.test.data.result.SL = \"+\" + Math.min(1, Number(args.test.data.result.SL))\n\targs.test.result.other.push(`${this.effect.name}: SL limited to 1`)\n}","Ah2wyywkL8hjJNXM":"args.context.healWounds = true;","AjC4dsiuhVCOnRGI":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF\")\nlet data = item.toObject(); \nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});","AmOMCUaWLJ2iJAt5":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.IFKWu98qmWpaSfUi\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","AmpDbT0BkDHeaRzf":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\");\nlet data = item.toObject();\ndata.system.specification.value = 1;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","ApaLcUhuty3EzJoP":"let fortunePoints = this.effect.sourceTest.result.overcast.usage.other.current\nlet current = this.actor.status.fortune.value\n\nthis.actor.update({\"system.status.fortune.value\" : fortunePoints + current})\n\nthis.script.message(`${this.actor.prototypeToken.name} fortune points increased from ${current} to ${fortunePoints + current}`)","AqHLHp4kH6KULk3e":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n let effectData = this.item.effects.contents[0].convertToApplied();\n\teffectData.system.sourceData.item = this.item.uuid\n\tactor.applyEffect({effectData : [effectData]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","AvRbjpBfTX3mn3bz":"if (this.actor.effects.contents.filter(e => e.name === \"Liquid Fortification\").length === 0) {\n let effectData = this.item.effects.contents[0].convertToApplied();\n effectData.duration.seconds = 3600\n this.actor.applyEffect({effectData : [effectData]});\n this.script.notification(\"Durée de l'effet Liquid Fortification réglée à 1 heure.\");\n}\nelse {\n let effect = this.actor.effects.contents.filter(e => e.name === \"Liquid Fortification\")[0];\n effect.update({duration: {seconds: 3600}});\n this.script.notification(\"Durée de l'effet Liquid Fortification réinitialisée à 1 heure.\");\n}","AyNb5sj6FD2Z3Q5T":"this.actor.addCondition(\"dead\")\nthis.actor.setWounds(0);\nthis.script.message(await game.wfrp4e.tables.formatChatRoll(\"scatter\"))","AyS3iLljxHRKsHg4":"let broken = this.actor.hasCondition(\"broken\");\nlet fatigued = this.actor.hasCondition(\"fatigued\");\nawait broken?.delete();\nawait fatigued?.delete()\nlet drilled = await fromUuid(\"Compendium.wfrp4e-core.items.Item.J9MK0AIaTbvd5oF6\")\nlet fearless = await fromUuid(\"Compendium.wfrp4e-core.items.Item.8pVzgPkgWpTJvfhG\")\nlet stout = await fromUuid(\"Compendium.wfrp4e-core.items.Item.IogM5gnsoOX63w7j\")\nthis.actor.createEmbeddedDocuments(\"Item\", [drilled, fearless, stout], {fromEffect : this.effect.id})","B063u4vrbvzMaCQt":"args.item.system.flaws.value = args.item.system.flaws.value.concat([{name : \"bulky\"}, {name : \"unreliable\"}])","B1xgRS00RcTIZLnO":"return [\"cast\", \"channelling\"].includes(args.type) && this.actor.hasCondition(\"fatigued\")","B6ZbY3bxTPg6nCng":"return args.skill?.name == game.i18n.localize(\"NAME.Bribery\");","B87v1twc65qyvUWi":"args.fields.modifier += 10 * this.effect.conditionValue","B950b0XnIUYCdVwu":"let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name})\nawait test.roll();\n\nif (test.succeeded)\n{\n if (args.totalWoundLoss <= parseInt(test.result.SL))\n {\n args.abort = `${this.effect.name}: Attaque déviée et retournée contre l'attaquant !`\n }\n args.modifiers.other.push({label : this.effect.name, value : -1 * parseInt(test.result.SL)})\n}","BAOv7moTxsKlT3JS":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"easy\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"broken\")\n}","BD7bVTU2pVoRSRBe":"let symptoms = {\n convulsions : \"Convulsions\",\n coughsandsneezes : \"Toux et Éternuements\",\n fever : \"Fièvre\",\n flux : \"FMalaiselux\",\n nausea : \"Nausée\"\n}\n\nlet roll = await (new Roll(`max(0, 1d10 - ${this.actor.characteristics.wp.bonus})`).roll())\nroll.toMessage(this.script.getChatData());\n\nlet choices = await ItemDialog.create(ItemDialog.objectToArray(symptoms), roll.total, \"Choisir Symptômes\");\n\nif (choices.length)\n{\n let symptomEffects = foundry.utils.duplicate(game.wfrp4e.config.symptomEffects)\n let added = []\n for(let choice of choices)\n {\n let symptom = symptomEffects[choice.id];\n symptom.origin = this.effect.uuid;\n added.push(symptom);\n }\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", added)\n}\nelse\n{\n this.effect.delete();\n}\n","BEEvU2hE5ymcNOH9":"let fatigued = this.actor.hasCondition(\"fatigued\")\n if (!fatigued)\n {\n this.actor.addCondition(\"fatigued\")\n ui.notifications.notify(\"Etat Exténué ajouté à \" + this.actor.name + \" qui est impossible à retirer tant que le symptôme de Malaise est présent.\")\n }","BHbFqhJPzZI2txLs":"let lore = this.effect.name.split(\"(\")[1].split(\")\")[0].toLowerCase();\n\n// If channelling corresponding lore\nif (args.type == \"channelling\" && args.spell.system.lore.value == lore)\n args.prefillModifiers.slBonus += 2\n// If channelling or casting different lore\nelse if (args.spell.system.lore.value != lore && args.spell.system.lore.value != \"petty\")\n args.prefillModifiers.slBonus -= 1","BNJRV66jlrp51qZK":"args.abort = true;\nthis.script.notification(game.i18n.localize(\"SCRIPT.Sightstep\"));","BVNKF9omCppWPLys":"let actor = game.user.character ?? canvas.tokens.controlled[0]?.actor;\nif (!actor || !(actor.system instanceof StandardActorModel))\n return ui.notifications.warn(\"Vous devez contrôler un acteur capable d'effectuer un test de Force\");\n\nlet test = await actor.setupCharacteristic(\"s\", {\n skipTargets: true,\n appendTitle: \" - Évacuation\",\n fields: {\n difficulty: \"challenging\"\n },\n context: {\n success: \"Réduction du niveau de Perforation !\"\n }\n});\n\nawait test.roll();\nif (test.succeeded) {\n let SL = parseInt(test.result.SL);\n let name = this.effect.name.replace(/\\d+/, rating => parseInt(rating) - SL);\n await this.effect.update({name});\n}\n\nlet rating = parseInt(this.effect.name.match(/\\d+/)?.[0]);\nif (rating <= 1) {\n const scriptData = this.effect.system.scriptData\n scriptData[2].trigger = '';\n await this.effect.update({disabled: true, \"system.scriptData\": scriptData});\n}","BY4feKp244bQOWlB":"args.test.result.canDualWield = true;","BZETMpgrI5k1ol5b":"// If the creature currently has a Surprised, Unconscious, or Entangled Condition, it does not gain this Advantage.\nconst surprised = this.actor.hasCondition(\"surprised\")\nconst unconscious = this.actor.hasCondition(\"unconscious\")\nconst entangled = this.actor.hasCondition(\"entangled\")\nif (entangled || unconscious || surprised) return\n\n// If, at the beginning of its turn, this creature does not have at least Rating Advantage points, its Advantage pool immediately increases to Rating.\nconst grimRating = parseInt(this.item.specification.value) || 1\nif (grimRating > this.actor.status.advantage.value) {\n this.actor.setAdvantage(grimRating)\n}\n","BcXTujburrHpjpwa":"args.fields.slBonus -= 3;","Be5rdfnZorbILhpC":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet data = item.toObject();\ndata.system.specification.value = 3 - this.actor.characteristics.s.bonus\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","Bexspr5viPhHiFmU":"let fatigued = this.actor.hasCondition(\"fatigued\");\nlet value = fatigued?.conditionValue || 0;\nargs.fields.modifier += value * 10;","Bj6bxItlgtI2sXVN":"let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\nroll.toMessage(this.script.getChatData());\nargs.totalWoundLoss = Math.max(0, args.totalWoundLoss - roll.total)\nargs.modifiers.other.push({label: this.effect.name, value : -1 * roll.total})\nthis.effect.update({disabled : true})","BtyFhdGMKiMamGhM":"let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nlet damage = parseInt(this.effect.sourceTest.result.SL)\n\nif (test.succeded)\n{\n damage = damage + 8 - parseInt(test.result.SL)\n}\n\nelse \n{\n damage = damage + 10\n this.actor.addCondition(\"entangled\", 3)\n}\nthis.script.message(await this.actor.applyBasicDamage(damage, {loc : \"roll\", suppressMsg: true}))\n","Bu0KUpGvfmFF7LJs":"let test = await this.actor.setupCharacteristic(\"s\", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"difficult\"}});\n\nawait test.roll();\n\nif (test.failed)\n{\n\n if (test.isCriticalFumble == \"fumble\")\n {\n\t return this.script.message(`${this.actor.name} meurt alors qu'il est entraîné dans l'Aethyr (à moins qu'il ne dépense un point de Destinée pour éviter cela).`);\n }\n\n await this.script.message(await this.actor.applyBasicDamage(3, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true }))\n\n}","Bv3431tnG3VKaTJr":"if (args.test.result.castOutcome == \"success\")\n{\n args.test.result.other.push(`@Peur[2,${this.actor.name}]`);\n}","ByhEa1BxQOyrOmqg":"return args.item?.attackType == 'melee'","BzDLuxBNw1QNIacg":"if (args.item.type == \"skill\")\n args.item.system.advances.value = 0\n\nif (args.item.type == \"talent\")\n args.item.system.tests.value = \"\"\n\nif (args.item.type == \"weapon\") \n args.item.system.qualities.value = []","C4LZnaX0MYgwrszj":"return args.type !== \"channelling\" && !args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) && args.skill?.name !== `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})` && args.skill?.name !== game.i18n.localize(\"NAME.OutdoorSurvival\");","C5NIkJwXL85Qbpe7":"args.weaponProperties.impale = true;","C69xngEMghfwUx13":"let easier = ['challenging', 'average', 'easy', 'veasy'];\nif (easier.includes(args.fields.difficulty))\n args.fields.difficulty = \"difficult\";","C8Q4jf6LSyA3lQHS":"let damage = this.effect.sourceTest.result.damage;\n\ndamage += 7; // goes from +8 to +15;\n\nif (this.actor.sizeNum >= game.wfrp4e.config.actorSizeNums.lrg)\n damage += 22; // goes from +15 to +30;\n\nif (this.actor.has(game.i18n.localize(\"NAME.Unstable\"))) \n damage *= 2;\n\nthis.actor.applyDamage(damage, {\n loc: \"roll\",\n createMessage: this.script.getChatData()\n});","CCK1iIfPmB398ziT":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Athletics\"), {fields : {difficulty : \"difficult\"}, skipTargets: true, appendTitle : \" - Walking\"})\ntest.roll();","CCwuu3bPLCpVGAmb":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\n\n","CD4RnDpXZ9hnqVPQ":"if (!this.actor.hasCondition(\"entangled\"))\n this.actor.addCondition(\"entangled\");","CDASLC4fWKSGQKf9":"let blinded = this.actor.hasCondition(\"blinded\");\nif (blinded?.getFlag(\"wfrp4e\", \"flockOfDoom\"))\n{\n blinded.delete();\n}","CHnaBPHk6HdFS512":"let arm = await fromUuid(\"Compendium.wfrp4e-core.items.MnMZv7ZXoRqoH9dS\");\nlet leg = await fromUuid(\"Compendium.wfrp4e-core.items.k00PimCWkff11IA0\");\n\nlet choice = await ItemDialog.create([arm, leg], 1, \"Choisir le membre\")\n\nthis.actor.createEmbeddedDocuments(\"Item\", choice, {fromEffect: this.effect.id})","CIxZYkHggBQ6EsHP":"this.script.notification(\"Effet utilisé\");\nthis.effect.delete();","CM43kvw5mIIE1OsB":"let key = this.item.system.location.key\n\nlet lostFingers = this.actor.flags.useless[key] || 0;\n\nlostFingers += 1\n\nthis.actor.flags.useless[key] = lostFingers;\n\nif (lostFingers >= 4)\n{\n\tthis.actor.flags.useless[key[0] + \"Arm\"] = true;\n}","CMUFtmNA1kkD1ay7":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 30,\n \"bright\": 20,\n \"angle\": 90,\n \"alpha\": 0.6,\n \"animation\": {\n \"speed\": 3,\n \"intensity\": 3,\n \"type\": \"torch\",\n },\n \"color\": \"#ffcc66\",\n }}));","CPQoK7NjzOwVTFXS":"for(let effect of this.actor.effects.filter(e => e.isCondition))\n{\n if (effect.isCondition)\n {\n effect.delete();\n }\n}","CS6O7UUjQcUJoOUP":"if (args.test.failed)\n {\n let SL = Number(args.test.result.SL)\n if (SL <= -2 && SL > -4)\n this.actor.addCondition(\"stunned\")\n else if (SL <= -4 && SL > -6)\n this.script.message(this.actor.prototypeToken.name + \" Doit réaliser un test a FM être @Condition[Prone].\")\n else if (SL <= -6)\n this.actor.addCondition(\"unconscious\")\n }","CUBpU1imu2eRS06C":"if (args.opposedTest.attackerTest.weapon?.system.properties?.qualities.hack && !args.hackReminder)\n{\n args.hackReminder = true;\n args.opposedTest.result.other.push(`${this.effect.name}: Hack causes ${this.item.Advances} extra damage`)\n}","CW5Vlr57OaMkKJ8Q":"if (this.actor.system.status.advantage.value >= 3)\n{\n this.actor.modifyAdvantage(-3);\n this.script.notification(\"Avantage retiré\")\n}\nelse \n{\n return this.script.notification(\"Avantage retiré\", \"error\")\n}\n\nlet test = await this.actor.setupTrait(this.item)\nawait test.roll();","CWNGrg7se91RC95g":"if (args.totalWoundLoss > 0) {\n args.opposedTest.result.other.push(\n `@Corruption[minor]{Moderate Exposure to Corruption}`\n )\n this.script.message(`${this.effect.name}: \n @Corruption[moderate]{Moderate Exposure to Corruption}
\n ${args.actor.prototypeToken.name} must take an \n Corruption (Moderate) Test`, \n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n )\n}","Ca1fXHTA1e2QLx0D":"args.fields.modifier += 50;","CbfUDhUr5R4UnPPq":"if (this.actor && this.actor?.name !== \"Kurgorn Three-eyes\" && !this.actor.hasCondition(\"blinded\") && !args.itemUpdated)\n{\n this.script.notification(`Impossible de supprimer l'état Aveuglé.`);\n await this.actor.addCondition(\"blinded\", 1, {statuses : [\"blinded\", \"blind\"]})\n}","CcR9i3UzUXx7ieep":"args.fields.modifier +=10;","CiFeduksZJ6PRulx":"return args.skill?.name == `${game.i18n.localize(\"NAME.Ride\")} (${game.i18n.localize(\"SPEC.Horse\")})` || (args.context.dodge && this.actor.isMounted);","CicQ5REu9tbsc8wW":"const locations = [];\n\nfor (let [key, loc] of Object.entries(args.AP)) {\n if (loc.layers?.some(i => !i.metal && i.source?.system.tags?.has(\"armour\")))\n locations.push(key);\n}\n\nthis.actor.status.addArmour(1, {source: this.effect, magical: true, locations})","Cjj4iLkdY1NaZRCi":"if ((args.opposedTest.attackerTest.item && args.opposedTest.attackerTest.item.isMelee) || (args.opposedTest.attackerTest.item && !args.opposedTest.attackerTest.item.name.includes(\"Projectiles\")))\n{\n let choice = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : `

Apply damage with ${this.effect.name} to attacker?`})\n\n if (choice)\n {\n this.script.message(await args.attacker.applyBasicDamage(this.actor.system.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}));\n }\n}","CkE8NZOhzPkuRrKJ":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.MnMZv7ZXoRqoH9dS\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data])\n\n\n\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty: \"hard\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tthis.actor.addCondition(\"unconscious\")\n}","ClkT2WG2UjVwQ97T":"if (args.actor.has(\"Démoniaque\")) {\n args.totalWoundLoss += 3;\n args.modifiers.other.push({label: this.effect.name, value: 3});\n}\n\nlet test = await args.actor.setupSkill(\"Résistance\", {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n characteristic: 't',\n context: {\n failure: \"Reçoit 1 État Aveuglé\"\n }\n});\nawait test.roll();\n\nif (test.failed) {\n args.actor.addCondition(\"blinded\");\n}","CoImIH9OCMx9DfQZ":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.nbhn2wX35b7Jrcbg\")\nlet data = item.toObject();\ndata.system.location.value = \"Jaw\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","Cri5Q7ux6ni7zNVS":"// Cannot be Surprised in combat.\n\nif (this.actor.hasCondition(\"surprised\"))\n{\n this.actor.removeCondition(\"surprised\")\n ui.notifications.notify(`${this.effect.name}: Cannot be surprised`);\n}","CxsKWGwQqtAaQdzX":"return args.characteristic === \"fel\";","CynUM4ZEiB9QbNQq":"const bonus = game.settings.get(\"wfrp4e\", \"homebrew\").advantageBonus;\n\nargs.fields.modifier += 2 * bonus;","D5XmzrUGFa1JN0cl":"args.prefillModifiers.modifier += 10\n\n","DANLE5HxrkTNelhl":"args.wounds += 4;","DBafsY1HrclJRTtA":"return args.type != \"cast\"","DHxUKY9LMyifFgCi":"return args.skill?.name == \"Métier (Apothicaire)\" || args.skill?.name == \"Trade (Alchemist)\"","DL9vYNft9aXdV2aW":"let tooth = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\ntooth = tooth.toObject()\ntooth.system.specification.value = 3\ntooth.system.qualities.value = [{name : \"magical\"}]\n \nlet claw = await fromUuid(\"Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM\")\nclaw = claw.toObject()\nclaw.system.specification.value = 4\nclaw.system.qualities.value = [{name : \"magical\"}]\nclaw.name = \"Claw\"\n\nthis.actor.createEmbeddedDocuments(\"Item\", [tooth, claw], {fromEffect : this.effect.id})","DMQ0taEpBUJU5njV":"args.actor.status.fortune.value = 0","DTiHS6RfwhF4THbf":"return args.skill?.name != game.i18n.localize(\"NAME.Drive\") && !args.skill?.name.includes(game.i18n.localize(\"NAME.Ride\"));","DUFSlDO38fQWclBE":"// Characters wounded by the ravens gain the ability to read, understand and speak rudimentary Classical. \n// This ability does not last beyond this adventure.\n\nthis.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.61L9aX2z164cjm7K\", this.effect)\n\nthis.script.message(`${args.actor.name} gains the ability to read, understand and speak rudimentary @UUID[Compendium.wfrp4e-core.items.Item.61L9aX2z164cjm7K]{Classical}. This ability does not last beyond this adventure.`)","DVlZGbiuMIHEQOnM":"if (this.actor.getFlag(\"wfrp4e\", \"isAttached\")) \n{\n\tlet roll = await new Roll(\"1d10\").roll()\n\tawait roll.toMessage(this.script.getChatData());\n\tif (roll.total == 9 || roll.total == 10)\n\t{\n\t this.script.message(`${this.actor.name} attached to ${this.actor.getFlag(\"wfrp4e\", \"isAttached\")} gorges and falls off.`)\n\t await this.actor.unsetFlag(\"wfrp4e\", \"isAttached\") \n\t}\n }","DWBxvzfWGcG7PVNP":"let letter = this.item.system.location.key[0]; // \"l\" or \"r\";\n\nthis.item.updateSource({\"system.location.key\" : letter + \"Doigt\"})\n\n// We want the location to be Right or Left Hand, but the key to be rFinger or lFinger","DcSJNRBXE9ZBBY7T":"this.actor.addCondition(\"blinded\", Math.max(0, this.effect.sourceTest.result.SL))","Dew3Ks9yC4DynSMi":"return args.characteristic === \"s\" || args.characteristic === \"t\" || args.weapon?.system?.attackType === \"melee\";","DhZqJso1JWYtGrKk":"this.actor.addCondition(\"ablaze\")\nlet damage = this.effect.sourceTest.result.damage + this.effect.sourceTest.result.additionalDamage\nthis.script.message(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))","Dk4VF4UXSMK5SaVP":"this.script.message(\"Activé pour annulé les Échecs critiques / Echecs\")\nthis.effect.update({disabled: true})","DmbWR9s5I8LHBwxB":"let column = await ValueDialog.create({text : \"Sélectionnez la colonne de lancer pour déterminer la Tête de Bête\", title : \"Sélectionnez une Colonne\"}, \"\", [\"Undivided\", \"Khorne\", \"Nurgle\", \"Slaanesh\", \"Tzeentch\"]);\n\nif (column)\n{\n let result = await game.wfrp4e.tables.rollTable(\"beasthead\", {}, column);\n this.script.message(`${result.title}
${result.result}`);\n let uuid = `Compendium.${result.object.documentCollection}.${result.object.documentId}`;\n let item = await fromUuid(uuid);\n if (item)\n {\n this.actor.createEmbeddedDocuments(\"Item\", [item])\n this.item.delete();\n }\n}","DpdSEHM6NMN1ey6h":"if (parseInt(this.item.system.specification.value) > 0)\n{\n\tthis.actor.system.status.ward.value = parseInt(this.item.system.specification.value);\n}","DqJFo74trI916qXN":"let fatigued = args.actor.hasCondition(\"fatigued\")\nif (fatigued)\n{\n fatigued.system.scriptData = fatigued.system.scriptData.filter(s => s.trigger != \"dialog\")\n fatigued.system._scripts = null;\n}","DsE6rTSzxEn6uWMz":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"average\"}})\nawait test.roll();\nif (test.failed)\n{ \n await this.actor.addCondition(\"blinded\");\n await this.actor.addCondition(\"fatigued\")\n} ","DuM5l2Yb4bdvDeaG":"return args.skill?.name != game.i18n.localize(\"NAME.Athletics\")","DvJvHsjgkzIfFaks":"if (!args.test.preData.options?.runeOfParrying) return\nif (!this.item.equipped.value || !args.test.item) return;\nargs.test.preData.canReverse = true","DxM3NRgQYc7moMPc":"this.actor.reset()","DxQnamsb2AuW0p2e":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Lore\"));","Dy67jQmeGwHwV9NY":"args.fields.modifier -=10;","DyZ1jH88EAp1ueOK":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.GlShFJF2TpsNh1FX\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\ndata.system.location.value = data.system.location.value.replace(\"Arm\", \"Wrist\")\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n","Dzi2CKpYapRGwNVr":"if (args.actor.system instanceof StandardActorModel) {\n args.actor.addCondition(\"unconscious\");\n}","E0HHBSdQR3oH8KaL":"if (args.totalWoundLoss > 0) {\n let frenzy = await fromUuid(\"Compendium.wfrp4e-core.items.Item.DrNUTPeodEgpWTnT\");\n frenzy = frenzy.toObject(); \n frenzy.effects[0].disabled = false;\n this.actor.createEmbeddedDocuments(\"Item\", [frenzy], {fromEffect : this.effect.id}); \n this.script.scriptMessage(\"Carnosaur gains Frenzy\");\n}","E0OhL9ZO8vb8A4qq":"args.actor.system.characteristics.t.initial += 30;","E1Xo4RVuN1YRRxg7":"return args.item?.attackType != \"ranged\"","E1vUepgop09FF5wy":"if (this.actor.system.status.advantage.value == 0)\n{\n return this.script.notification(\"Avantage retiré\", \"error\")\n}\n\nlet hatred = await fromUuid(\"Compendium.wfrp4e-core.items.Item.aE3pyW20Orvdjzj0\")\nlet frenzy = await fromUuid(\"Compendium.wfrp4e-core.items.Item.yRhhOlt18COq4e1q\");\n\nif (this.actor.system.status.advantage.value >= 3)\n{\n this.script.notification(`Ajout de ${frenzy.name}`)\n this.actor.setAdvantage(0)\n this.actor.createEmbeddedDocuments(\"Item\", [frenzy])\n}\nelse if (this.actor.system.status.advantage.value >= 1)\n{\n let data = hatred.toObject();\n data.system.specification.value = \"Opposants au corps à corps\"\n this.script.notification(`Ajout de ${hatred.name}`)\n this.actor.setAdvantage(0)\n this.actor.createEmbeddedDocuments(\"Item\", [data])\n}","E2FhOfZzu2CqTSeA":"let damage = this.effect.sourceTest.result.damage;\n\nawait this.actor.applyDamage(damage - 3, {\n loc: \"roll\",\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP,\n createMessage: this.script.getChatData(),\n});\n\nawait this.actor.addCondition(\"ablaze\", 1);","E2VfOVuju67qO3VL":"let blinded = this.actor.hasCondition(\"blinded\");\nif (blinded.getFlag(\"wfrp4e\", \"nightshroud\"))\n{\n blinded.delete()\n}","E33J9JixYVGxaktQ":"if (this.effect.getFlag(\"wfrp4e\", \"fistsOfGork\") && args.item.type == \"skill\" && args.item.name == \"Corps à corps (Bagarre)\") {\n\targs.item.system.modifier.value += this.effect.getFlag(\"wfrp4e\", \"fistsOfGork\")\n}","E3om295BMQojnM2F":"let fatigued = this.actor.hasCondition(\"fatigued\")\nif (fatigued)\n{\n fatigued.delete();\n this.script.notification(\"Retiré Exténué\")\n}","E4CHDe1xfmcV3oGv":"return args.skill?.name == game.i18n.localize(\"NAME.Navigation\");","E6DMqfDeczqmVMFV":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"average\"}})\n\nawait test.roll();","E6v4YZrvFikbdXoO":"const locations = [];\n\nfor (let [key, loc] of Object.entries(args.AP)) {\n if (loc.layers?.some(i => i.metal))\n locations.push(key);\n}\n\nthis.actor.status.addArmour(1, {source: this.effect, magical: true, locations})","E7D4bxz8gy4e1wL7":"return [`${game.i18n.localize(\"NAME.Stealth\")} (${game.i18n.localize(\"SPEC.Rural\")})`, game.i18n.localize(\"NAME.Track\"), game.i18n.localize(\"NAME.OutdoorSurvival\"), game.i18n.localize(\"NAME.Swim\"), game.i18n.localize(\"NAME.Perception\"), game.i18n.localize(\"NAME.Intuition\")].includes(args.item?.name);","E7ksDLhihkJN4Vpt":"return args.characteristic != \"s\" || args.type != \"characteristic\"","EBNrA6FNX4d05EUx":"return !args.context.crewTest;","EC8cZmqrE095cDc2":"const actor = args.actor;\n\nif (actor.itemTypes.skill.find(s => s.name === \"Savoir (Voies fluviales)\")) {\n const loreTest = await actor.setupSkill('Savoir (Voies fluviales)', {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'hard'},\n characteristic: 'int',\n });\n await loreTest.roll();\n\n if (loreTest.succeeded) {\n loreTest.result.other.push(`${actor.name} reconnaît les leurres des Lurkerfish.`);\n loreTest.renderRollCard();\n return;\n }\n}\n\nlet Test = await actor.setupSkill('Calme', {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'easy'},\n characteristic: 'wp',\n});\nawait test.roll();\n\nif (!Test.succeeded) {\n Test.result.other.push(`${actor.name} est devenu fasciné par la vue et incapable d'effectuer une quelconque action autre que de se déplacer vers la lumière.`);\n Test.renderRollCard();\n actor.addCondition(\"unconscious\");\n}","ECUIJLcKt2TCSFS3":"return !args.weapon?.system?.attackType || game.settings.get(\"wfrp4e\", \"useGroupAdvantage\")","EDAMEOzdBfkoKHxP":"return args.skill?.name !== game.i18n.localize(\"NAME.Navigation\");","EGWF3LHav3e2zFL4":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Ranged\")) || args.item?.isRanged || args.item?.name == game.i18n.localize(\"NAME.Charm\");","EHfOyVwYhFGWNjw1":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {difficulty: \"difficult\"})\n await test.roll();\n if (!test.succeeded)\n {\n await this.actor.addCondition(\"poisoned\");\n }","EJObiSth3WdcJOXN":"if (args.test.characteristicKey == \"wp\" && args.test.failed && args.test.result.SL <= -3)\n{\n this.script.notification(\"Ajout de A Terre\");\n this.actor.addCondition(\"prone\")\n}","EJaBfqADqlo92Fx6":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.oGbDwnLOn3isPJpO\")\nlet data = item.toObject();\ndata.name += \" (Au choix)\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","EKkdyp51Wf4csw2B":"return this.actor.statuses.has(\"frenzy\");","ENGmwaItRXO5s0XY":"await this.actor.modifyWounds(this.actor.system.characteristics.t.bonus * 3)\nthis.script.message(`Heals ${this.actor.system.characteristics.t.bonus * 3} Wounds`)\n\nthis.actor.hasCondition(\"bleeding\")?.delete()\nthis.actor.hasCondition(\"fatigued\")?.delete()\n","EQ5dtGW5kQhtAb87":"await this.actor.addCondition(\"prone\")\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"hard\"}, skipTargets: true, appendTitle : \" - \" + this.effect.name})\nawait test.roll();\nif (test.failed)\n{\n\tawait this.actor.addCondition(\"stunned\")\n}","ERxrWzSpw8qwxFVi":"this.script.notification(`Impossible d'entrer dans ${this.effect.name} !`); this.actor.addCondition(\"broken\");","ETfmit2Cx0Py77ai":"let characteristics = {\n \"ws\" : -10,\n \"bs\" : 0,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : -25,\n \"ag\" : -20,\n \"dex\" : 0,\n \"int\" : -200,\n \"wp\" : -200,\n \"fel\" : -200\n}\nlet traits = [ {name:\"Fabriqué\"}, {name:\"Vision dans l'obscurité\"}, {name:\"Peur\", value: 2}, {name:\"Insensible à la douleur\"},{name:\"Mort-vivant\"},{name:\"Instable\"} ];\nlet items = [];\n\nlet updateObj = this.actor.toObject();\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nupdateObj.system.characteristics.int.initial = 0;\nupdateObj.system.characteristics.wp.initial = 0;\nupdateObj.system.characteristics.fel.initial = 0;\n\nfor (let trait of traits)\n{\n let traitItem = await game.wfrp4e.utility.find(trait.name, \"trait\")\n if (traitItem)\n { \n let t = traitItem.toObject();\n t.system.specification.value = trait.value;\n items.push(t);\n }\n else \n {\n ui.notifications.warn(`: -200\n}\nlet traits = [ {name:`, {permanent : true})\n }\n}\n\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n\n","ETrfkHI0B9YjJqM2":"return this.item.equipped.value && this.actor.isOpposing && this.actor.attacker.test.item.attackType == \"melee\"","EU5j0hnDTG9Z6d1e":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}})\nawait test.roll();\nif(test.failed)\n{\n this.actor.addCondition(\"stunned\", 2)\n}","EVBSHEC5nmmj2X41":"return args.skill?.name != game.i18n.localize(\"NAME.Climb\") && !args.skill?.name?.includes(game.i18n.localize(\"NAME.Stealth\"));","EXiqepAIXmbqMiKa":"if (args.opposedTest?.attackerTest?.weapon?.name.toLowerCase().includes(\"unarmed\")) {\n const sl = this.effect.getFlag(\"wfrp4e-archives3\", \"sl\");\n args.totalWoundLoss += sl;\n args.modifiers.other.push({label: this.effect.name, value: sl});\n}","EYny6z5oTOhxGDfb":"args.fields.modifier -= 10;\n","EaSNOmXUxAkUHnm5":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","Eay7GpDyfsEE40jT":"if (args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"ablaze\")\n}","EdTChmSouS0MSmk5":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.succeeded)\n{\n this.script.message(\"Peut réaliser une Action ou un Déplacement (choisissez-en un)\")\n}\nelse\n{\n this.script.message(\"Ne peut pas réaliser une Action ou un Déplacement ce tour-ci\")\n}","EiLaZW4b4ypw5sLV":"// can't use Damage application type because that checks if wounds were dealt\nargs.actor.applyEffect({effectUuids : this.item.effects.contents[0].uuid})","ElHBPMMx37SZMvOC":"this.actor.addCondition(\"ablaze\");\nthis.script.scriptMessage(`${this.actor.name} has a received a @Condition[Ablaze]`)","EmXwcuycEH8slEn5":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}})\nawait test.roll();\nif(test.failed)\n{\n this.actor.addCondition(\"unconscious\")\n}","EmmG49pMOPHRwDzR":" let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n if (args.test.isFumble && roll == 1 && !args.test.result.misfire)\n {\n args.test.result.misfire = game.i18n.localize(\"Misfire\") + \" (Rolled 1)\"\n args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage)\n }\n else if (args.test.isFumble && roll != 1)\n args.test.result.other.push(\"Jet Misfire: \" + roll)\n","EpdMj9d9SYPeP44q":"return args.characteristic != \"ag\" && args.item?.id != this.item?.id","ErgOwSiVnm9VLVHN":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.DrNUTPeodEgpWTnT\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","EsZx8cY34quYG4MQ":"let runes = this.actor.itemTypes[\"wfrp4e-dwarfs.rune\"]\nif (runes.length === 0) return ui.notifications.error(\"Cet acteur ne connaît aucune rune.\")\n\nlet rune = await ItemDialog.create(this.actor.itemTypes[\"wfrp4e-dwarfs.rune\"], 1, {text: \"Sélectionnez une Rune\", title: this.effect.name})\nrune[0].system.use({initialTooltip: \"Bonus Enclume de la Destinée\", fields: {modifier: 20}})","Et4tPHlrkueLqP3T":"if (args.item.type == \"skill\") args.item.system.modifier.value -= 10","Ew3C2WmLCtc1KT46":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\")) || args.item?.id == this.item?.id","EwD053Fyy46b59ZI":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.6l3jvIAvrKxt0lA9\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","Eye6dranWpNsILjm":"if (this.actor.system.status.wounds.value <= 1)\n{\n this.effect.delete();\n}","F2u4L4o0r1LTWeWK":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = await ValueDialog.create({text : \"Entrez la valeur de Terreur\", title : this.effect.name});\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","F4aGsdzJ9SYcX57F":"if (args.equipped)\n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.HpFkVJ2lYPAWumUL\")\n let data = item.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n}\nelse \n{\n this.effect.deleteCreatedItems(); \n}","F7BHb4a7fqWMnYxH":"args.test.data.result.other.push(`You may not use Fortune Points because of ${this.effect.name}`);","F7E0Dr3sT7kkc2p7":"return this.actor.hasCondition(\"fatigued\")","F8Bmh6w01YvKsBIO":"for (const weapon of args.actor.itemTags.weapon) {\n weapon.system.qualities.value.push(\n {name: \"impale\", value: null},\n {name: \"penetrating\", value: null},\n );\n}","F9P8Nh4AKnqSGg8C":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.bxbTiLzbaz4vdukT\", // Hunter's Eye\n \"Compendium.wfrp4e-core.items.Item.XSb3QVB9ipPBFt56\", // Shadow\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","FAB12eLcSCAOOQwk":"this.script.scriptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true}));\n","FAf4iXj5LkdvukS2":"fromUuid(\"Compendium.wfrp4e-wom.items.0Xdm4r7l2EwC4fcg\").then(item => Item.create(item.toObject(), {fromEffect : this.effect.id, parent : this.actor}))","FGIHAkNdYXbTnewG":"if (!game.settings.get(\"wfrp4e\", \"useGroupAdvantage\"))\n return;\n\n\nawait this.actor.modifyAdvantage(1);\nthis.effect.delete();","FKEH7DeqU0FH4dkk":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {fields : {difficulty : \"hard\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nif (test.failed) {\n \tthis.script.scriptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true}));\n this.script.scriptMessage(`${this.actor.name} est victime de @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.WCivInLZrqEtZzF4#drowning-and-suffocation]{Suffocation}`);\n}","FMA16PvoObBV8vDl":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.EO05HX7jql0g605A\")\nitem = item.toObject()\nitem.system.specification.value = 20\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})\nthis.script.notification(item.name + \" added\")","FMSN5uRskkATexzB":"game.wfrp4e.tables.rollToChat(\"crithead\")","FPQp6XfbUH1BMafj":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Athletics\"), {fields : {difficulty : \"vhard\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tthis.actor.addCondition(\"prone\");\n this.script.scriptMessage(\"Impossible de se déplacer ou d'agir ce tour\");\n}","FPYNcxm21678boLT":"if (args.attackerTest.data.preData.rollClass !== \"CharacteristicTest\") return;\nif (args.attackerTest.data.preData.characteristic !== \"s\") return;\n\nconst SL = args.opposedTest.data.opposeResult.differenceSL;\n\nconst targetId = this.effect.getFlag(\"wfrp4e\", \"target\");\nconst target = canvas.scene.tokens.get(targetId);\n\nif (SL > 4) {\n args.opposedTest.data.opposeResult.other.push(`${args.defenderTest.actor.name} a été forcé de laisser partir ${target.name}.`);\n return await this.effect.delete();\n}\n\nif (SL > 0) {\n args.opposedTest.data.opposeResult.other.push(`${args.defenderTest.actor.name} a été empêché de serrer ${target.name} pendant un tour.`);\n let turns = this.effect.getFlag(\"wfrp4e\", \"turns\");\n this.effect.setFlag(\"wfrp4e\", \"turns\", turns + 1);\n}","FSqUqSByMiztYOQM":"if (args.totalWoundLoss > 0)\n this.script.message(`Infected: ${args.actor.name} must pass an Easy (+40) Résistance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients(\"GM\") })","FUgCtIoj1Stgqxt7":"return ![\"ws\", \"bs\", \"s\", \"ag\", \"t\", \"dex\"].includes(args.characteristic)","FX8ILw0VgbNxkObA":"const uuid = \"Compendium.wfrp4e-core.items.Item.mCvZAj5F6hfUZhzR\";\nconst item = await fromUuid(uuid);\nconst data = item.toObject();\ndata.name = this.effect.name;\ndata.type = 'trapping';\ndata.system.trappingType = {value: 'clothingAccessories'};\ndata.system.equipped = {value: true};\n\nconst effectData = this.effect.sourceItem.effects.find(e => e.disabled).toObject();\neffectData.disabled = false;\neffectData.system.transferData.equipTransfer = true;\ndata.effects = [effectData];\n\nconst dagger = await this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id});","FXuyiJoXdAh6WhRK":"return args.skill?.name == `${game.i18n.localize(\"NAME.Ride\")} (${game.i18n.localize(\"SPEC.Horse\")})` && game.combat?.active","FXwfqF0jpXlBQ9Y3":"return args.item?.system?.isMelee && this.actor.attacker","FYMLsxxg63nHNGAe":"this.actor.system.characteristics.int.modifier += 20;\nthis.actor.system.characteristics.int.calculationBonusModifier -= 2;\nthis.actor.system.characteristics.wp.modifier += 20;\nthis.actor.system.characteristics.wp.calculationBonusModifier -= 2;","FYUPfYyTYZkxRLFT":"return ![\"NAME.Endurance\", \"NAME.Cool\"].map(i => game.i18n.localize(i)).includes(args.skill?.name)","FZFOC7bip0oiWEzk":"if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 2);\n this.script.notification(\"Etat Hémorragique ajouté\")\n}","FbfJjYUyp0ArtZMb":"args.fields.modifier += 15","FceC4TNNBvRnA7JM":"this.actor.system.characteristics.s.modifier += 60;\nthis.actor.system.characteristics.s.calculationBonusModifier -= 6;","FciJSTq7dZsZIPgl":"if (args.equipped)\n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR\")\n let data = item.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n}\nelse \n{\n this.effect.deleteCreatedItems(); \n}","FfTqCPxCoxwGDTQs":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr\")\nlet data = item.toObject()\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n","FiD3mvWIBHNNIuO9":"if (args.opposedTest.result.hitloc.value == \"body\")\n{\n if ((await new Roll(\"1d2\").roll()).total == 1)\n {\n args.opposedTest.result.hitloc.value = \"head\"\n this.script.message(`Localisation du coup changé pour la tête`)\n }\n}","Fk14eUaTRvIoCBB1":"return !args.context.dispel","FkTwk8hfHpRLbAp2":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}","FmLx9pwOkzqqU7Ph":"return args.skill?.name == game.i18n.localize(\"NAME.Track\");","FqevMs0ukQ9WuUHl":"// Each time the blade is used, the GM should secretly roll a d10.\n// On a 1, its poison has run dry, \n// and the next time it is employed it will shatter.\n\nif (this.item.getFlag(\"wfrp4e\", \"brittle\"))\n{\n ChatMessage.create({content: `${this.item.name} shatters!`})\n this.item.update({name : `${this.item.name} (Shattered)`})\n}","FtZf56VI6Qsspu0D":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","FttdVBQiNssDAARh":"return args.data.targets[0]?.actor?.hasCondition(\"entangled\")","Fu8DTvSgLufcB5mr":"async function rollTable(characteristics, formula, name) {\n const roll = new Roll(formula);\n await roll.toMessage({flavor: name});\n\n const values = roll.dice[0].values;\n\n for (const value of values) {\n let characteristic;\n switch (value) {\n case 1: case 2: characteristic = \"ws\"; break;\n case 3: case 4: characteristic = \"i\"; break;\n case 5: case 6: characteristic = \"int\"; break;\n case 7: case 8: characteristic = \"fel\"; break;\n case 9: case 10: characteristic = \"*\"; break;\n default: continue;\n }\n\n if (characteristics.has(characteristic)) {\n await rollTable(characteristics, \"1d10\", name);\n } else {\n characteristics.add(characteristic);\n }\n }\n}\n\nconst characteristics = new Set();\nawait rollTable(characteristics, \"2d10\", this.effect.name)\n\nif (characteristics.has(\"*\")) {\n characteristics.delete(\"*\");\n const availableChoices = foundry.utils.duplicate(game.wfrp4e.config.characteristics);\n\n for (const ch of characteristics) delete availableChoices[ch];\n\n const result = warhammer.apps.ValueDialog.create({\n text: \"Choisissez une caractéristique\",\n }, \"\", availableChoices);\n\n if (!result) return;\n\n characteristics.add(result);\n}\n\nthis.effect.setFlag(\"wfrp4e\", \"characteristicsToSwap\", Array.from(characteristics));","Fvlc4RkeF4dHjW3m":"let caster = this.effect.sourceActor\nif (caster && (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))) {\n let wp = caster.system.characteristics.wp.value\n if (wp > this.actor.system.characteristics.t.value) {\n if (this.actor.has(game.i18n.localize(\"NAME.Unstable\"))) {\n this.actor.update({ \"system.status.wounds.value\": 0 })\n this.actor.addCondition(\"dead\")\n }\n else {\n fromUuid(\"Compendium.wfrp4e-core.items.D0ImWEIMSDgElsnl\").then(item => {\n this.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], { fromEffect: this.effect.id })\n ChatMessage.create({ content: `Added Unstable to ${this.actor.prototypeToken.name}`, speaker: { alias: caster.name } })\n })\n }\n }\n}","Fwk8WA8NfRivLFWJ":"return args.skill?.name === \"Divertissement (Chant)\";","G1RletYc6BzigJrK":"let ablaze = parseInt(this.effect.sourceTest.result.SL) + 5\nargs.actor.addCondition(\"ablaze\", ablaze)","G7sFEnJlXZvfXL3V":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n let effectData = this.item.effects.contents[1].convertToApplied();\n\teffectData.system.sourceData.item = this.item.uuid\n\tactor.applyEffect({effectData : [effectData]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","G9ZPojp8qdjiXKZ5":"if (!args.test.preData.options?.masterslayer) return\nif (!this.item.equipped.value || !args.test.item) return;\nargs.test.preData.canReverse = true","GAO8AozttWOyRkta":"if (!args.flags.lostHand)\n{\n\targs.fields.lostHand = true;\n\targs.fields.modifier += -20;\n}","GEfWIFBSrXt0ldBM":"(await new Roll(\"1d10\").roll()).toMessage(this.script.getChatData())\nawait this.actor.addCondition(\"dead\")","GFaTz8f6PBNWrlad":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure : `Confused: Determine behaviour by @Table[bewilder] Table.`}})\nawait test.roll();\nreturn test.failed","GFkVnx4m9OwYsKGH":"args.actor.flags.ambi+= 1","GNgMG95jfabBeIwy":"if (!this.item.system.qualities.value.find(i => i.name == \"fast\"))\n{\n this.item.system.qualities.value.push({name : \"fast\"}) \n}","GNl5Zk7BZ2jhRV1I":"if (args.item.type == \"armour\")\n{\n args.item.system.AP.head = 0;\n}","GOq4TcnWbfyfCo2V":"this.script.notification(`Healed ${this.actor.characteristics.t.bonus * 2} Wounds`)\nawait this.actor.modifyWounds(this.actor.characteristics.t.bonus * 2)\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - Side Effects`,fields : {difficulty : \"difficult\"}})\nawait test.roll();\nif (test.failed)\n{\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n await roll.toMessage(this.script.getChatData())\n if (roll.total <= 3)\n {\n this.actor.addCondition(\"blinded\", 3)\n }\n else if (roll.total <= 6)\n {\n this.actor.addCondition(\"broken\");\n }\n else if (roll.total <= 9)\n {\n this.actor.addCondition(\"stunned\");\n }\n else if (roll.total == 10)\n {\n this.actor.addConditon(\"unconscious\")\n }\n}","GRfCxtYzmEx2LYU7":"if (args.totalWoundLoss >= 1)\n{\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n await roll.toMessage(this.script.getChatData());\n if (roll.total == 9)\n {\n this.script.message(`Two @UUID[Compendium.wfrp4e-eis.actors.iDy8SDTwJSlCzZMl]{Blue Horror of Tzeentch} claw their way out of ${this.actor.name}'s screaming flesh, killing them in the process.`, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n }\n}","GTZUO73pUJKpM1JB":" let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n game.dice3d?.showForRoll(roll);\n this.script.message(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))\n","GUkpYdPwoC5pc9BT":"return !args.weapon?.system.properties.flaws.crewed","GYhPhHIVrhx4pkgF":"if (args.combat.combatant.actor.uuid === this.effect.sourceItem.parent.uuid) \n{\n this.effect.delete();\n}","GZFsuynUhgZqwTGo":"if (args.totalWoundLoss >= 1)\n{\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: \"Gained a Poisoned Condition\", success: \"Resisted the poison\" }})\n await test.roll();\n if (test.failed)\n {\n args.actor.addCondition(\"poisoned\");\n }\n}\n ","GbPEy22VuCNzlNv2":"return !this.actor.isMounted || (!args.skill?.name?.includes(game.i18n.localize(\"NAME.Ride\")) && !args.context.dodge)","Gc8S5TYlVdV8NnOT":"let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name, context: { failure: \"Gained a Broken Condition\", success: \"Resisted the Broken Condition\" } })\n\n await test.roll();\n\n if (!test.succeeded)\n {\n args.actor.addCondition(\"broken\");\n }","GcIQtshex11AMmh2":"if (this.item.system.isEquipped)\n{\n let removeRepeater = false\n if(!this.item.system.offhand.value) // main\n {\n let offhandUsed = this.actor.itemTypes.weapon.find(i => i.system.isEquipped && i.system.offhand.value)\n if (offhandUsed)\n {\n removeRepeater = true;\n }\n }\n else // offhand\n {\n let mainhandUsed = this.actor.itemTypes.weapon.find(i => i.system.isEquipped && !i.system.offhand.value)\n if (mainhandUsed)\n {\n removeRepeater = true;\n }\n }\n \n if (removeRepeater)\n {\n this.item.system.qualities.value = this.item.system.qualities.value.filter(i => i.name != \"repeater\")\n }\n}","GePFbu5kp2ymGYEQ":"await this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.IAWyzDfC286a9MPz\", this.effect);","Gh7OidY6UdpWBS1g":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.KII1gWnxIZ8HzmU5\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","GjUD5L4h8FXGVgGQ":"args.initiative += \"+30\";","GjkxWj9wCAclM9WA":"let effects = foundry.utils.deepClone(this.item.effects.contents.filter(e => e.active));\n\neffects.splice(effects.length - 1);\n\nif (effects.length == 0)\n{\n return this.script.notification(\"Tous les effets ont été utilisés. Réinitialisez pour les sélectionner à nouveau\")\n}\nlet choice = await ItemDialog.create(effects, 1, \"Choisir un effet à gagner\");\n\nif (choice[0])\n{\n choice[0].update({disabled : true})\n let effect = choice[0].convertToApplied();\n effect.name += ` (${this.effect.name})`\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [effect]);\n}","GrF6tQ08jgKmUH4i":"return ![\"ws\", \"bs\", \"s\", \"ag\", \"i\"].includes(args.characteristic)","GsAyB5xnK3ASeoah":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'easy';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","Gsilp71BmIyHHce6":"args.context.masterslayer = true","GtfHQA9T1ip463le":"return ![\"ws\", \"bs\"].includes(args.characteristic)","GuSIY4Zqhc68qVEH":"if (!args.messageSent)\n{ \n args.messageSent = true;\n let runes = this.item.effects.contents.filter(i => i.name == this.effect.name);\n this.script.message(`${args.attacker.speaker.alias} reduce Run speed by ${runes.length * 4} yds.`)\n}","GuUCErVbk5hrFzR3":"args.multiplier.tb += 1","GuxbvztcvzJz2oH1":"args.item.system.qualities.value = [];","GzSFlqL1YrIK1dxh":"let items = await Promise.all([\"Compendium.wfrp4e-wom.items.Item.EjGYZ4CgX2jZW7Ot\",\n\"Compendium.wfrp4e-wom.items.Item.O2v9RQiFf0obskP5\",\n\"Compendium.wfrp4e-wom.items.Item.2cv6hhZ57iV6z5Il\",\n\"Compendium.wfrp4e-wom.items.Item.YgDEUO0G0XcqQJqg\",\n\"Compendium.wfrp4e-wom.items.Item.J6K5TPxI8qIGQKKH\",\n\"Compendium.wfrp4e-wom.items.Item.K9FPtiDLwTkC7FuO\",\n\"Compendium.wfrp4e-wom.items.Item.CkMYRYCLrkMnyVm5\",\n\"Compendium.wfrp4e-wom.items.Item.0Xdm4r7l2EwC4fcg\"].map(fromUuid));\n\nlet choice = await game.wfrp4e.apps.ItemDialog.create(items, 1, \"Sélectionner un Vent\")\n//this.actor.createEmbeddedDocuments(\"Item\", items);\n\nthis.item.update(choice[0]?.toObject(), {diff: false, recursive : false});\n\n//this.actor.items.getName(this.effect.item.name).delete() // For some reason this.effect.item.delete() throws an error\n","GzsuEg7gZy1f0ljy":"let bleeding = this.actor.hasCondition(\"bleeding\")\nif (bleeding)\n{\n this.script.notification(`Suppression de ${bleeding.conditionValue} états Hémorragique`)\n Saignement.delete();\n}\nelse\n{\n this.script.notification(`Aucun état Hémorragique`)\n}","H06Ysj7oPiemW7S6":"if (args.test.options.income && !args.test.options.criminal)\n{\n args.test.options.criminal = true;\n let currentCareer = args.test.actor.system.currentCareer;\n let coin = {1 : \"b\", 2 : \"s\", 3 : \"s\", 4 : \"g\"}[currentCareer.system.level.value] // b, s, or g maps to 2d10, 1d10, or 1 respectively (takes the first letter)\n let term = {1 : \"bp\", 2 : \"ss\", 3 : \"ss\", 4 : \"gc\"}[currentCareer.system.level.value] // b, s, or g maps to 2d10, 1d10, or 1 respectively (takes the first letter)\n let dieAmount = {1 : \"2d10\", 2 : \"1d10\", 3 : \"2d10\", 4 : \"1\"}[currentCareer.system.level.value] // b, s, or g maps to 2d10, 1d10, or 1 respectively (takes the first letter)\n dieAmount = parseInt(dieAmount[0]) * this.item.system.Advances; // Multilpy that first letter by your standing (Brass 4 = 8d10 pennies)\n if (coin != \"g\") // Don't roll for gold, just use standing value\n {\n dieAmount = dieAmount + \"d10\";\n }\n let moneyEarned = (await new Roll(dieAmount.toString()).roll()).total;\n let moneyString = `${moneyEarned}${coin}`\n let transactionString = `${moneyEarned}${term}`\n\n this.script.message(`Gain additionnel de ${game.wfrp4e.market.amountToString(game.wfrp4e.market.parseMoneyTransactionString(transactionString))}`, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","H1z3nWW7Rj3Oisxy":"return args.type != \"channelling\"","H2CJvApKMnfGNNoo":" if (args.test.item?.type == \"skill\" && args.test.item.name.includes(game.i18n.localize(\"NAME.Stealth\")))\n{ \n args.test.result.description = \"Astounding Failure\";\n args.test.result.outcome = \"failure\";\n ChatMessage.create({content : \"SQUEAK\", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true})\n AudioHelper.play({ src: `${game.settings.get(\"wfrp4e\", \"soundPath\")}squeek.wav` }, true);\n}","H3Wls12aVWAWTp9J":"this.actor.setupCharacteristic(\"i\", {skipTargets: true, appendTitle : \" - \" + this.effect.name}).then(test => {\n test.roll();\n})","H3pZ9UeIzIz3luKh":"args.actor.addCondition(\"bleeding\")\n\nthis.actor.setFlag(\"wfrp4e\", \"isAttached\", args.actor.name)\n\nthis.script.message(`Attaches to ${args.actor.name}`)","H7lcCU24gFDp7zK7":"let amount = this.effect.sourceTest.result.baseSL;\nargs.fields.successBonus += amount;","H85k4L3yICm7cfIk":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Voile';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","H8jDtK1Ewn4hL3A1":"args.fields.slBonus += 4;","HASsi6wYHVALExWq":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: \"1 Corruption Point Gained\" } })\nawait test.roll();\n\nif (test.failed && args.actor.type == \"character\") \n{\n let msg = \"\"\n msg += `

${this.actor.prototypeToken.name} gained a Corruption point

`\n if (test.result.roll % 11 == 0 || test.result.roll == 100)\n {\n msg += `${args.actor.prototypeToken.name} gains a mutation (@Table[expandedmutatephys]{Physical} or @Table[expandedmutatemental]{Mental}) and gains @UUID[Compendium.wfrp4e-core.items.hiU7vhBOVpVI8c7C]{Chaos Magic (Tzeentch)}`\n }\n this.script.message(msg, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n await this.actor.update({ \"system.status.corruption.value\": parseInt(args.actor.status.corruption.value) + 1 })\n}","HG2fKOfruT5QV3A4":"let lore = await ValueDialog.create({text : \"Choisissez un Savoir\", title : \"Savoir\"}, \"\", {\"fire\" : \"Fire\", \"death\" : \"Death\", \"metal\" : \"Metal\", \"shadow\" : \"Discret\"});\n\nlet filters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"petty\"\n }\n]\n\nlet petty = await ItemDialog.createFromFilters(filters, 3, {text: \"Choisissez 3 Sorts Mineurs\"})\n\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : [\"\"]\n }\n]\n\nlet arcane = await ItemDialog.createFromFilters(filters, 6, {text: \"Choisissez 6 Sorts d'Arcane\"})\n\nlet items = petty.map(i => i.toObject()).concat(arcane.map(i => {\n let spell = i.toObject();\n spell.img = `modules/wfrp4e-core/icons/spells/${lore}.png`\n spell.system.lore.value = lore;\n return spell;\n}));\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","HGVGO217uW1k5YDh":"args.fields.slBonus -= 4;","HJ2X4ZtXei0BXbxf":" let choices = await Promise.all([warhammer.utility.findItemId(\"PzimjNx9Ojq4g6mV\"), warhammer.utility.findItemId(\"rOPmyLWa37e7s9v6\")])\n let items = await game.wfrp4e.apps.ItemDialog.create(choices, 1, \"Choisir une Compétence\")\n\n items = items.map(i => i.toObject())\n items.forEach(i => i.system.advances.value = 20)\n\nitems.forEach(i => i.system.equipped.value = true)\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","HKhyn0kijKfzW6cw":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}})\nawait test.roll();\nthis.item.updateSource({\"flags.wfrp4e.passed\" : test.succeeded})","HMC6hPND9DWLFfZE":"if (this.item.name.includes(\"(\"))\n{\n\treturn;\n}\n\nlet index = game.packs\n.filter(i => i.metadata.type == \"Item\")\n.reduce((acc, pack) => acc.concat(pack.index.contents), [])\n.filter(i => i.type == \"skill\" && i.name.includes(game.i18n.localize(\"NAME.Lore\")))\n.map(i => {\n\ti.id = i._id\n\treturn i\n})\n\nlet choice = await ItemDialog.create(index, 1, \"Choose a Lore\")\nlet text;\nif (!choice[0])\n{\n let custom = await ValueDialog.create({text : \"Enter Lore\", title : this.effect.name});\n text = custom || \"\";\n}\nelse \n{\n text = game.wfrp4e.utility.extractParenthesesText(choice[0].name)\n}\n\nawait this.item.updateSource({name : this.item.name + ` (${text})`, \"system.tests.value\" : this.item.system.tests.value.replace(\"chosen Lore\", text)})\nawait this.effect.updateSource({name : this.effect.name + ` (${text})`})","HOt2hHOiHDZ7oBgW":"if ([\"rLeg\", \"lLeg\"].includes(this.effect.getFlag(\"wfrp4e\", \"location\")))\n{\n\targs.actor.details.move.value /= 2\n}\n","HUKzssLxeQo1wbx9":"\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"average\"}, appendTitle : \" - Wounded\"})\n await test.roll();\n if (test.failed)\n {\n fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\").then(disease => {\n this.actor.createEmbeddedDocuments(\"Item\", [disease.toObject()])\n this.script.notification(\"Gained \" + disease.name)\n })\n }\n ","HX6CjNapYdC0VmQ8":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.epPBu7x6BRWp2PHG\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","HXJKkmpfxQUOnWOS":"if (!this.item.system.twohanded.value)\n{\n this.item.system.flaws.value = this.item.system.flaws.value.concat([{name : \"tiring\"}, {name : \"slow\"}])\n}","HYrl5aNMm8BAdqH7":"\n let modifier = 0\n if (this.effect.name.includes(\"Moderate\"))\n modifier = -20\n else\n modifier = -10\n args.fields.modifier += modifier\n ","Hcpn1gU58DIKIhty":"if (args.item.type == \"skill\" && args.item.name == `${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Flail\")})`)\n{\n args.item.system.modifier.value += 10;\n}","HdTuY2IGhdlMDOy3":"if (this.actor.system.details.experience.current < 100) {\n return this.script.notification(game.i18n.localize(\"SCRIPT.NotEnoughXP\"))\n}\n\nlet item = await game.wfrp4e.utility.findItem(\"Animal Telepathy\", \"trait\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item]);\nlet expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);\nexpLog.push({amount : 100, reason: item.name, spent: this.actor.details.experience.spent + 100, total: this.actor.details.experience.total, type: \"spent\"});\nthis.actor.update({\n \"system.details.experience.spent\": this.actor.details.experience.spent + 100,\n \"system.details.experience.log\": expLog\n });","HfCxNd7mFGZH4s9Y":"// An opponent that takes more than a single Wound from a Warp Blade strike \n// in melee combat must make an Average (+20) Endurance Test \n// or take a Stunned Condition\n\n\nif (args.totalWoundLoss > 1) {\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"average\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if(test.failed)\n {\n await args.actor.addCondition(\"stunned\");\n }\n}","HfZAQWoY8n3clLlo":"if (!args.itemCreated) return;\nif (args.itemCreated.type !== \"critical\") return;\nif (args.itemCreated.system.location.value.toLowerCase() !== \"head\") return;\nif (Number(args.itemCreated.system.wounds.value) > 0) {\n this.script.message(game.i18n.format(\"SCRIPT.Sallet\", {name: args.itemCreated.parent.name, wounds: args.itemCreated.system.wounds.value}))\n}","HgzIi6m6dkXbVWHp":"if (args.test.skill?.name == \"Calme\")\n{\n args.test.preData.roll = 1;\n args.test.preData.other.push(this.effect.name)\n}","Hi005w1Ul17Q8Uty":"let test = this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"average\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.succeeded)\n{\n\tthis.effect.delete()\n}","HiMBS6GeOwEydWYN":"return args.skill?.name != game.i18n.localize(\"NAME.Climb\");","HmImVzvw6ecBy99l":"if (args.opposedTest.result.hitloc.value == \"body\" && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 2)\n this.script.notification(\"Etat Hémmoragique appliqué : 2 niveaux de saignement\")\n}","HoNTnPphrJISSQr1":"ChatMessage.create({content : \"Parle et fais toi connaître\", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true})","Hq1G30lhJYvtOSNb":" \n if (args.test.failed)\n {\n let applicableCharacteristics = [\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"];\n if (applicableCharacteristics.includes(args.preData.characteristic))\n {\n this.actor.addCondition(\"stunned\");\n }\n }","HrOBAXsEX073ReKl":"let skill = `${game.i18n.localize(\"NAME.Entertain\")} (${game.i18n.localize(\"SPEC.Singing\")})`;\nlet currentCareer = this.actor.system.currentCareer;\nlet existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill);\n\nif (!currentCareer) return\n\n\nlet inCurrentCareer = currentCareer.system.skills.concat(currentCareer.system.addedSkills).includes(skill);\nlet perfectPitchAdded = this.actor.getFlag(\"wfrp4e\", \"perfectPitchAdded\") || {};\nif (existingSkill && inCurrentCareer && !perfectPitchAdded[existingSkill.name])\n{\n\texistingSkill.system.advances.costModifier = -5;\n}\nelse \n{\n\tperfectPitchAdded[skill] = true;\n\tcurrentCareer.system.addedSkills.push(skill);\n\tfoundry.utils.setProperty(this.actor, \"flags.wfrp4e.perfectPitchAdded\", perfectPitchAdded)\n}\n\n\n","HrYchgkdZBiu1yPF":"return args.skill?.name == game.i18n.localize(\"NAME.Climb\");","HwbgUIbpX0D8JLOR":"if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == \"attacker\")\n this.actor.addCondition(\"bleeding\")","I0Jo6cbNAJtXUloc":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.J9MK0AIaTbvd5oF6\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], {fromEffect : this.effect.id});","I0oRZ7AWde5KI5jw":"return ![\"t\", \"int\"].includes(args.characteristic)","I1J2m5uud84N50Lk":"if ([\"cast\", \"channelling\", \"pray\"].includes(args.type))\n{\n\targs.abort = true;\n\tthis.script.scriptNotification(\"Impossible d'incanter un Sort ou d'utiliser un Prière\");\n}\nelse return true;","I2I4ZJjN3EUSow0t":"return args.item?.system?.attackType != \"ranged\"\n || this.item != args.item\n || this.actor.isOpposing","I5DqzmfuTGwyFWLY":"return ![game.i18n.localize(\"NAME.Intimidate\"), game.i18n.localize(\"NAME.Leadership\")].includes(args.skill?.name);","I67tdJctEqXSQPE0":"this.effect.update({\"disabled\": false})","I79D8V8OFzMCtL40":"const target = await ValueDialog.create({title: \"Sélectionnez une Cible\", text: \"Sélectionnez une Cible pour la Haine\"}, \"Target\");\nawait this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN\", this.effect, {name: `Hatred (${target})`});","I7ieW0hNYvvX0KFg":"return args.skill?.name != game.i18n.localize(\"NAME.Heal\");","I8JS4z90PtWIG2nb":"return this.actor.hasCondition(\"prone\")","I93i49wI9ZrDHT4n":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.jt0DmVK9IiF6Sd2h\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","I9QAPKbaXwMMMBT4":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty: \"average\"}, skipTargets: true, appendTitle : \" - \" + this.effect.name})\nawait test.roll();\nif(test.failed)\n{\n await this.actor.addCondition(\"stunned\");\n let secondTest = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty: \"easy\"}, skipTargets: true, appendTitle : \" - Despair\"})\n await secondTest.roll();\n if(secondTest.failed)\n {\n this.effect.updateSource({name : \"Taste of Death\"})\n await this.actor.addCondition(\"fatigued\");\n }\n else \n {\n return false;\n }\n}","IAGla7HJlYN0wa4H":"if (args.test.characteristicKey == \"wp\")\n{\n if (args.test.failed)\n {\n this.actor.addSystemEffect(\"convulsions\")\n this.script.message(`Test de FM échoué, ${this.actor.prototypeToken.name} reçoit @Symptom[Convulsions] pour [[1d10]] heures`)\n }\n}","ID8mCcjkl7PCQhDq":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nif(test.failed)\n{\n let damage = this.effect.sourceItem.system.computeSpellDamage(\"3\", true);\n this.script.message(await this.actor.applyBasicDamage(damage, {suppressMsg: true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP}))\n}","IDvpVMkR2HXoNpPp":"return args.skill?.name !== \"Esquive\";","IEDJHIYaZLhmrK4X":"return ![\"weapon\", \"cast\"].includes(args.type) || (!this.item.equipped.value)","IFXsTRAVDUeVvcRc":"let roll = await new Roll(\"1d100\")\nawait roll.evaluate()\nawait roll.toMessage({\"flavor\": `Wyssan's Dice Reversal`})\n\nif (roll.result % 11 === 0 || roll.result === 100) {\n await this.item.setFlag(\"world\", \"inert\", true)\n}","IG4zYqtN9fRSYE7q":"args.actor.addCondition(\"ablaze\");","IKiZv9YSFmKmHo6a":"return args.spell?.system.lore.value == \"fire\"","ILqHxk7deotgI3KD":"if (args.item.type != \"weapon\")\n return\n\nlet reach = args.item.reach.value\nlet reachNum = game.wfrp4e.config.reachNum[reach]\nreachNum = Math.min(reachNum + 2, 7)\n\nlet key = warhammer.utility.findKey(reachNum, game.wfrp4e.config.reachNum)\n\nargs.item.reach.value = key","IM8nRo6Jx2I8RJ0L":"return (args.item?.skillToUse?.name == args.skill?.name)","IN4ZFOPooqJtNuIQ":"return args.characteristic !== \"s\" && args.characteristic !== \"t\" && args.weapon?.system?.attackType !== \"melee\";","IOroJBqTsWvoakJN":"if (args.actorsystem.details.move.oars.value > 0)\n args.actor.system.details.move.oars.value -= 2;\n","IPPDvZdE8kn3H9z7":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\n\nif (test.failed)\n{\n await this.actor.addCondition(\"grappling\")\n}","IR5URcjnCuWBFMoN":"// If a full dose is imbibed, \n// the victim must pass a Hard (-20) Endurance Test.\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty: \"hard\"}})\nawait test.roll()\nif (test.failed)\n{\n this.script.message(`

${this.actor.prototypeToken.name} notices nothing amiss save that they become tired a little earlier than usual. At this point it is still possible to save the victim via a powerful antidote or magical means.

\n

Once they fall asleep however, it is almost impossible. At this point the victim must make a Hard (-20) Endurance Test. If they fail, they never awaken.

`, \n {\n whisper: ChatMessage.getWhisperRecipients(\"GM\"), \n blind: true \n })\n}\nreturn test.failed;","IR86DuMbVdbGOJYt":"this.actor.addCondition(\"blinded\")","IXXrxNSLqXEqtuDU":"if (args.actor.details.move.value > 1) {\n args.actor.details.move.value -= 1 \n}","IfEu1hO8sKEZBpvg":"let value = parseInt(this.item.specification.value)\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM && game.user.targets.size)\n{\n game.user.targets.forEach(t => {\n t.actor.applyPeur(value, name)\n })\n game.canvas.tokens.setTargets([])\n\n}\nelse \n{\n game.wfrp4e.utility.postPeur(value, name)\n}","IhoCoul5okDx0jBa":"if (args.test.weapon.properties.qualities?.blast) {\n args.test.weapon.properties.qualities.blast.value ++;\n if (args.test.options.shortfuse) {\n args.test.result.other.push (`${this.effect.name}: Blast Rating increased`)\n }\n args.test.options.shortfuse = true\n}","IkGegSuQwwVPhrjF":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn\")\nlet data = item.toObject();\ndata.system.specification.value = 1\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","IkVcIRmmgQjsBUUf":"let roll = await new Roll(\"1d100\")\nawait roll.evaluate()\nawait roll.toMessage({\"flavor\": `Wyssan's Dice Reversal`})\n\nif (roll.result % 11 === 0 || roll.result === 100) {\n await this.item.setFlag(\"world\", \"inert\", true)\n this.script.message(`${this.item.name} loses its magical properties`, {blind: true, whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}","Ip8sctF9SIE1Z2vF":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.UnJ25lL8aUzem5JO\")\nlet data = item.toObject();\ndata.system.specification.value = 3\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","IpoOOjYJs6RmVrpb":"if (args.totalWoundLoss > 0)\n{\n args.attacker.applyEffect({effectUuids : this.effect.sourceItem.effects.contents[1].uuid})\n}","IrkWq7IiFS65bTvC":"if (this.actor.flags.holed.half !== true) return;\nif (this.actor.flags.holed.reminded === true) return;\n\nconst speaker = ChatMessage.getSpeaker({actor: this.actor});\nthis.script.message(`

${speaker.alias} sits heavily in the water. Unless the cargo is waterproof, it loses [[d10]]% of its value.

`);\n\nthis.actor.flags.holed.reminded = true;","IsLAvY9ikR1cOJWw":"return ![\"NAME.Row\", \"NAME.Swim\"].map(i => game.i18n.localize(i)).includes(args.skill?.name);","IslMfFgpgQq2brpu":"if (this.actor.hasCondition(\"broken\"))\n{\n this.actor.removeCondition(\"broken\")\n this.script.scriptNotification(`Impossible de supprimer l'état Brisé`);\n}","IukS0clr1yAleacc":"this.actor.system.characteristics.ag.modifier -= parseInt(this.item.system.location.value) || 1\n\nthis.actor.system.characteristics.ws.modifier -= parseInt(this.item.system.location.value) || 1","IupskvzvoGyD2H5o":"if (this.actor.type != \"character\")\n{\n return;\n}\n\nlet god = await ValueDialog.create({text : \"Choisissez un Dieu\", title : \"Béni\"})\n\nif (god)\n{\n let prayers = await warhammer.utility.findAllItems(\"prayer\", \"Chargement des Prières\", true, [\"system.type.value\", \"system.god.value\"])\n let blessings = prayers.filter(p => p.system.god.value.split(\",\").map(i => i.trim().toLowerCase()).includes(god.toLowerCase()) && p.system.type.value == \"blessing\")\n let configBlessings = await Promise.all((game.wfrp4e.config.godBlessings[god.toLowerCase()] || []).map(fromUuid));\n if (god == \"Foi Antique\")\n {\n blessings = await ItemDialog.create(prayers.filter(i => i.system.type.value == \"blessing\"), 6, {text : \"Sélectionnez 6 Bénédictions\", title : \"Béni\"})\n }\n if (configBlessings.length)\n {\n // Combine blessings defined by config with actual blessing items found that specify this god, avoiding duplicates\n blessings = blessings.concat(\n configBlessings.map(i => {return {uuid : i.uuid, name : i.name}})\n .filter(bls => !(blessings.find(i => i.uuid == bls.uuid)))\n );\n }\n if (blessings.length)\n {\n this.script.scriptNotification(\"Ajout de \" + blessings.map(i => i.name).join(\", \"))\n await this.actor.addEffectItems(blessings.map(i => i.uuid), this.effet)\n }\n else\n {\n this.script.scriptNotification(`Impossible de trouver des Bénédictions associées à ${god}.`)\n }\n if (this.item.name.includes(\"Au choix\"))\n this.item.updateSource({name: this.item.name.replace(\"Au choix\", god)});\n else\n this.item.updateSource({name: this.item.name + ` (${god})`});\n await this.actor.update({\"system.details.god.value\": god})\n}","IurWrdbjsmMtTWuq":"return !this.actor.hasCondition(\"prone\")","IuxMr6SFdJhqFtVD":"this.actor.system.status.corruption.value += 3","IzZcsSngI8TZH4d8":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.fjd1u9VAgiYzhBRp\");\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","IzoOmDywGLqLNljN":"let skill = `Language (Magick)`\nlet currentCareer = this.actor.system.currentCareer;\nlet existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill);\n\nif (!currentCareer) return\n\n\nlet inCurrentCareer = currentCareer.system.skills.concat(currentCareer.system.addedSkills).includes(skill);\nlet witchAdded = this.actor.getFlag(\"wfrp4e\", \"witchAdded\") || {};\nif (existingSkill && inCurrentCareer && !witchAdded[existingSkill.name])\n{\n\texistingSkill.system.advances.costModifier = -5;\n}\nelse \n{\n\twitchAdded[skill] = true;\n\tcurrentCareer.system.addedSkills.push(skill);\n\tfoundry.utils.setProperty(this.actor, \"flags.wfrp4e.witchAdded\", witchAdded)\n}","J0IWUhxada2ONowP":"return args.skill?.name == `${game.i18n.localize(\"NAME.Entertain\")} (${game.i18n.localize(\"SPEC.Sing\")})` || args.skill?.name == `${game.i18n.localize(\"NAME.Entertain\")} (${game.i18n.localize(\"SPEC.Singing\")})` || args.skill?.name.includes(game.i18n.localize(\"SPEC.Magick\")) || args.skill?.name.includes(game.i18n.localize(\"SPEC.Eltharin\") || args.skill?.name.includes(game.i18n.localize(\"SPEC.Cathayan\")));","J1FPDdrXGctKDTZz":"if (args.equipped)\n{\n let ward = await fromUuid(\"Compendium.wfrp4e-core.items.Bvd2aZ0gQUXHfCTh\")\n wardData = ward.toObject()\n wardData.system.specification.value = \"8\"\n \n let mr = await fromUuid(\"Compendium.wfrp4e-core.items.yrkI7ATjqLPDTFmZ\")\n mrData = mr.toObject()\n mrData.system.specification.value = 2\n \n this.actor.createEmbeddedDocuments(\"Item\", [wardData, mrData], {fromEffect : this.effect.id})\n}\nelse\n{\n this.effect.deleteCreatedItems()\n}","J60gMzmsNau8j53K":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nawait this.effect.update({duration:{rounds: this.actor.system.characteristics.ag.bonus + excessSL}});","J8aPichsl25t1QZ9":"this.actor.addCondition(\"entangled\", this.effect.sourceTest.result.SL)","J8k4ahQdZhXDfU1l":"return args.skill?.name == \"Runesmithing\"","JBoKPBr27C3PMoSD":"return args.skill?.name === game.i18n.localize(\"NAME.Navigation\");","JEbs0WlqhKNDOo5A":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"unconscious\")\n}\n","JFgXyb6bKjZJLmF8":"return args.characteristic == \"ag\"","JKpC9pVATysq8k4G":"let damage = this.effect.sourceItem.system.Damage;\nconst flying = this.actor.has(game.i18n.localize(\"NAME.Flight\"));\n\nif (flying) damage++;\n\nawait this.actor.applyDamage(damage, {\n loc: \"roll\",\n createMessage: this.script.getChatData(),\n});\n\nconst test = await this.actor.setupSkill(\n game.i18n.localize(\"NAME.Athletics\"),\n {\n fields: {\n slBonus: flying ? -1 : 0,\n difficulty: \"average\"\n },\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n },\n);\n\nawait test.roll();\n\nthis.effect.setFlag(\"wfrp4e\", \"failed\", !!test.failed);","JLn1B9eL53nSUq88":"if (args.test.isCritical || args.test.isFumble)\n args.test.result.tables.miscast = {\n label : game.i18n.localize(\"ROLL.MinorMis\"),\n class : \"fumble-roll\",\n key : \"minormis\",\n }\ndelete args.test.result.critical;\ndelete args.test.result.tables.critical;","JQruHprM5R5vZ9DA":"let caster = this.effect.sourceActor;\nif (caster)\n{\n let healed= caster.system.characteristics.wp.bonus + caster.system.characteristics.int.bonus\n await this.actor.modifyWounds(healed);\n this.script.message(`${this.actor.prototypeToken.name} regains ${healed} Wounds`)\n}\n \n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"vhard\"}, context : {success : \"1 Corruption point that was gained within the last hour is removed.\", failure: \"Nothing happens\"}})\n await test.roll();","JToUa1mDQ2h3ILKF":"const test = await actor.setupSkill('Cool', {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'difficult'},\n characteristic: 'wp',\n context: {\n failure: \"You became beguiled by the eerie singing and unable to perform any action except moving towards the Oceanid. You count as Helpless.\"\n }\n});\nawait test.roll();","JWEY8OS0ns1fNsQV":"let extra = this.effect.getFlag(\"wfrp4e\", \"extra\")\nif (!this.item.system.properties.qualities[extra]) \n{ \n this.item.system.qualities.value.push({name : extra});\n}","JXBUE0XuJOJNG7zE":"if (args.totalWoundLoss <= 7) return;\n\nlet options = {\n appendTitle : \" – \" + this.effect.name,\n skipTargets: true,\n fields: {difficulty: 'average'},\n characteristic: 'wp',\n}\n\nlet Test = await args.actor.setupSkill('Calme', options);\nawait test.roll();\n\nif (!test.succeeded) {\n const targetId = this.effect.getFlag(\"wfrp4e\", \"target\");\n const target = canvas.scene.tokens.get(targetId);\n await this.effect.delete();\n args.extraMessages.push(`${args.actor.name} perd ${args.totalWoundLoss} Points de Blessures lors de l'attaque, ce qui l'a forcé à lâcher ${target.name}.`);\n}","JZIn1dsKHFE3smJU":"let ablaze = parseInt(this.effect.sourceTest.result.SL) + 1\nargs.actor.addCondition(\"ablaze\", ablaze)","JaiC5P6nIgctOacH":"if (args.actor.system.details.species?.value?.toLowerCase() == \"dwarf\")\n{\n args.weaponProperties.flaws.undamaging = true;\n}","JavuFNZ9Pj5elVLc":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet data = item.toObject();\ndata.system.specification.value = 4 - this.actor.characteristics.s.bonus\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","JeThJbOf6Xmbtgo1":"this.script.message(await this.actor.applyBasicDamage(8 + parseInt(this.effect.sourceTest.result.SL), {suppressMsg : true}))\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Athletics\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}","JfOodll9a2Lw0fWg":"let blinded = args.actor.hasCondition(\"blinded\")\nif (blinded)\n{\n blinded.system.scriptData = blinded.system.scriptData.filter(s => s.trigger != \"dialog\")\n blinded.system._scripts = null;\n}","JgCcgDVZX54slrWx":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Melee\")) || args.item?.isMelee || args.context.corruption","JhCMYHHYA860Kka8":"return !this.actor.attacker || args.item?.system?.attackType !== \"melee\" || args.skill?.name !== game.i18n.localize(\"NAME.Dodge\");","JhbZWZhOJ23yOBmG":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'hard';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","JibNjuQrJRnY0yf9":"return this.actor.flags.useless.rEye && this.actor.flags.useless.lEye && ([\"ws\", \"bs\"].includes(args.characteristic) || args.skill?.name?.includes(game.i18n.localize(\"NAME.Ride\")) || args.weapon || args.context.dodge)","JjDzMnUxaWQePIYh":"return args.characteristic != \"int\"","JjiPprLSlSmmB5Ga":"args.item.system.damage.value += \" + 1\"","Jjq3oPYbI26zjxME":"let location = this.item.system.location.key;\n\nif (location)\n{\n let dropped = this.item.system.weaponsAtLocation;\n\n if (dropped.length)\n {\n this.script.notification(`Lâche ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}\n\nlet roll = await new Roll(\"1d10\").roll()\n\nroll.toMessage(this.script.getChatData({flavor : `Lâche ${dropped.map(i => i.name).join(\", \")}!`}));\n\nthis.effect.updateSource({\"duration.rounds\" : roll.total})","Jk7OHqx06oCUVAzb":"return ![`${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`, `${game.i18n.localize(\"NAME.Channelling\")} (Hysh)`].includes(args.skill?.name)","JmZQRvdWjm9ykYfn":"if (this.actor.hasCondition(\"surprised\"))\n{\n this.actor.removeCondition(\"surprised\")\n this.script.message(`Impossible d'être surpris`);\n}","Jnp5c09sPzDD61EK":"this.script.notification(`${args.actor.prototypeToken.name} must pass an Average (+20) Willpower Test to attack this target!`)\n\nreturn true; // No need to show this in the dialog","JstrA46EYSEuRSy5":"if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) && this.actor.has(game.i18n.localize(\"NAME.Construct\")))\n this.actor.addCondition(\"dead\")","JwYZJGkZMSM2M3Si":"if (args.totalWoundLoss > 0)\n{\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\n await test.roll()\n if (test.failed)\n {\n args.totalWoundLoss += this.effect.sourceActor.system.characteristics.wp.bonus\n args.modifiers.other.push({label : this.effect.name, value : this.effect.sourceActor.system.characteristics.wp.bonus})\n }\n}","JwgFQmPQtXWAP94i":"this.actor.addCondition(\"fatigued\");","JyTxUG5dNW670Sf7":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.7mCcI3q7hgWcmbBU\")\nlet data = item.toObject();\ndata.system.location.key= this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n \nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\")\n}","K06v93N4FXb70mB7":"args.item.system.encumbrance.value = Math.max(0, args.item.system.encumbrance.value - 1);","K54XxyNJa5PIWDEH":"args.modifiers.other.push({label : this.effect.name, details : \"Blessures Doublées + 4\", value : args.totalWoundLoss + 4 });\nargs.totalWoundLoss = args.totalWoundLoss * 2 +4;","KD4nCSdSXJVJmk0R":"this.script.message(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg : true}))\nawait this.actor.addCondition(\"ablaze\")","KF69WqF4PSEtpdb2":"args.fields.slBonus += 2;\n ","KG4TxnXiLLpfWOQO":"args.fields.difficulty = \"average\"","KGK9vL1Yl0qmCeCN":"let specification = this.item.system.specification.value;\nlet choice = [];\n\nif (!specification || specification == \"Compétences Entraînées\")\n{\n choice = await ItemDialog.create(ItemDialog.objectToArray({\n broken: \"Broken\",\n drive: \"Conduite d'attelage\",\n entertain: \"Divertissement\",\n fetch: \"Fetch\",\n guard: \"Garde\",\n home: \"Home\",\n magic: \"Magic\",\n mount: \"Mount\",\n war: \"War\"\n }, this.effect.img), \"unlimited\", \"Choisir un Entraînement\");\n}\nelse\n{\n choice = specification.split(\", \").map(i => {\n return {\n id : i.toLowerCase(),\n name : i\n }\n });\n}\n\nif (choice.length)\n{\n let changes = foundry.utils.deepClone(this.effect.changes);\n\n for(let training of choice)\n {\n switch(training.id)\n {\n case \"broken\" :\n let roll = await new Roll(\"2d10\").roll({allowInteractive : false});\n roll.toMessage(this.script.getChatData());\n changes.push({value : roll.total, mode : 2, key : \"system.characteristics.fel.modifier\"})\n\n if (this.actor.type == \"creature\")\n {\n let bestial = this.actor.itemTypes.trait.find(i => i.name == \"Bestial\");\n if (bestial)\n {\n bestial.update({\"system.disabled\" : true})\n }\n }\n break;\n\n case \"drive\" :\n\n break;\n\n case \"entertain\" :\n\n break;\n\n case \"fetch\" :\n\n break;\n\n case \"guard\" :\n let territorial = await fromUuid(\"Compendium.wfrp4e-core.items.Item.JIAe7i7dqTQBu4do\");\n await this.actor.createEmbeddedDocuments(\"Item\", [territorial], {fromEffect: this.effect.id})\n foundry.utils.setProperty(args, \"options.keepId\", true);\n break;\n\n case \"home\" :\n\n break;\n\n case \"magic\" :\n\n break;\n\n case \"mount\" :\n\n break;\n\n case \"war\" :\n changes.push({value : 10, mode : 2, key : \"system.characteristics.ws.modifier\"})\n break;\n }\n }\n this.effect.updateSource({name : `${this.effect.name} (${choice.map(i => i.name).join(\", \")})`, changes, \"flags.wfrp4e.trained\" : choice.map(i => i.id)})\n this.item.updateSource({\"system.specification.value\" : `${choice.map(i => i.name).join(\", \")}`})\n}","KICZPwLvbUSxbDrE":"let table = game.wfrp4e.tables.findTable(\"mutatemental\");\nif (!table)\n{\n\tui.notifications.error(\"Impossible de trouver la table des Mutations Mentales\")\n}\nlet result = (await table.roll()).results[0];\nlet uuid = `Compendium.${result.documentCollection}.${result.documentId}`\nlet item = await fromUuid(uuid);\n\nif (item)\n{\n this.script.notification(`${item.name} added`)\n this.actor.createEmbeddedDocuments(\"Item\", [item])\n}\nelse\n{\n ui.notifications.error(\"Impossible de trouver l'objet : \" + uuid)\n}","KIoVBinAZK8sMOqD":"\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"average\"}, skipTargets: true, appendTitle : \" - Wounded\"})\n await test.roll();\n if (test.failed)\n {\n fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\").then(disease => {\n this.actor.createEmbeddedDocuments(\"Item\", [disease.toObject()])\n this.script.notification(\"Gained \" + disease.name)\n })\n }\n ","KJLAan0glJlyOyqF":" this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 10,\n \"bright\": 5,\n \"alpha\": 0.5,\n \"animation\": {\n \"speed\": 4,\n \"intensity\": 4,\n \"type\": \"flame\",\n },\n \"color\": \"#ac9e6c\",\n }}));","KOR8aafB3D4FLoh6":"return args.item?.name !== game.i18n.localize(\"NAME.Stealth\")","KPQfupKuaf4LCv4R":"const talents = await Promise.all([game.i18n.localize(\"NAME.Schemer\"), game.i18n.localize(\"NAME.SecondSight\")].map(game.wfrp4e.utility.findTalent))\nthis.actor.createEmbeddedDocuments(\"Item\", talents, {fromEffect : this.effect.id})","KQmb5B27eJ1lkbVL":"return this.item.system.quantity.value > 0 && args.type != \"channelling\"","KQzbrpb0T5a7it4k":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.vMYEkrWj0ip6ZOdv\");\nlet data = item.toObject();\ndata.name += ` (Disease)`;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","KSGIwJxR0qn10RLX":"this.actor.itemTags.template.find(t => t.name === \"Hungry Troll\").delete();","KSjsDlsx3DD6cT16":"return args.skill?.name != game.i18n.localize(\"NAME.Bribery\");","KT670CjGBEprx2fO":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.RWJrupj9seau0w31\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","KTBVDHUndI3qDOXM":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"))\nawait test.roll();\nif (!test.succeeded)\n{\n args.actor.addCondition(\"stunned\")\n}","KUx0deSF3xNzMucL":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Art\"));","KVpDUEjHhd3nLa0f":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.script.message(await game.wfrp4e.tables.formatChatRoll(\"enrage-beast\"))\n}","KVuPduDztyMZQNt9":"args.fields.slBonus += this.actor.system.characteristics.ag.bonus","KXzDe7cN2vynHjJO":"this.actor.hasCondition(\"blinded\")?.delete();\nthis.actor.hasCondition(\"deafened\")?.delete()\nthis.actor.hasCondition(\"unconscious\")?.delete()","KkE8DtsTDYDyk1gN":"args.data.reversal = {allowed : true, if: \"better\"};","KkjkYAGI9Em1NgiQ":"if (this.item.system.quantity.value) \n{\n this.item.system.reduceQuantity();\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Heal\"), { appendTitle: ` - ${this.effect.name}`, skipTargets: true })\n await test.roll();\n if (test.succeeded) \n {\n let actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n actor.applyEffect({ effectData: [this.item.effects.contents[0].convertToApplied()] })\n }\n else \n {\n this.script.notification(\"Heal Test failed!\", \"error\")\n }\n}\nelse \n{\n this.script.notification(\"None left!\", \"error\")\n}","KmngDrPD72xn22kZ":"if (this.actor.Species.toLowerCase() != \"skaven\") {\n this.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - Utilise ${this.effect.name}`, fields: { difficulty: \"difficult\" } }).then(async Test => {\n await test.roll()\n if (test.failed)\n {\n let toughnessLost = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n this.actor.update({ \"system.characteristics.t.initial\": this.actor.characteristics.t.initial - toughnessLost })\n this.script.message(`${this.actor.prototypeToken.name} Perte de ${toughnessLost} Endurance`)\n }\n })\n }","KnwYZbeRSBA94hfl":"if (!args.flags.lostFingers)\n{\n\targs.flags.lostFingers = true;\n\targs.fields.modifier -= 5 * this.actor.flags.useless[this.item.system.location.key]\n}","KoQJTwqoC7foST6v":"return args.type === \"cast\" && args.spell?.system.lore.value === \"high\";","KuUkUmOOLf05I4Bp":"this.actor.hasCondition(\"broken\")?.delete();\n","KuuWAhoSzk0rCxxw":"args.fields.modifier += -20;","KxIRA51YA0rktcSP":"return args.characteristic === \"fel\"","KyUPYV1RXJxPOfyA":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"veasy\"}})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"fatigued\");\n}","KyswmGj1uG3QS3ng":"args.applyAP = false;","L1RMLvKtRPFtnczI":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.MGEPI4jNhymNIRVz\");\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","L2cdQppcPwxz24hN":"return !args.weapon","L41ao2Mw1miE0yri":"let roll = await new Roll(\"15\").roll();\nroll.toMessage(this.script.getChatData());","L89UcafRHqUfxoux":"let injury = await fromUuid(\"Compendium.wfrp4e-core.items.3S4OYOZLauXctmev\")\ninjury.updateSource({\"system.location.key\" : this.item.system.location.key})\nthis.actor.createEmbeddedDocuments(\"Item\", [injury], {fromEffect: this.effect.id})","L9eAtDyaoHvqryk4":"return args.skill?.name != game.i18n.localize(\"NAME.Intimidate\");","L9pUSX8Z4y2zIAn7":"this.actor.system.characteristics.int.value = 50","LAyLbcC0lOPwZP3U":"this.actor.addCondition(\"ablaze\", parseInt(this.effect.sourceTest.result.SL))","LHUUXfZVLBhWqRvb":"this.actor.status.addArmour(5, {magical: true, source : this.effect})","LLqAT9wEUGMLfDhU":"return !args.item?.system.isProjectiles","LNxKkPI37im0bSjy":"const ablaze = Number(args.opposedTest.result.differenceSL) + 1\nargs.actor.addCondition(\"ablaze\", ablaze)\nargs.extraMessages.push(\n \"\" + this.effect.name + \": \"\n + ablaze + \" @Condition[Ablaze] Conditions\")","LOL2TGf8p8KxP14D":"let wind = this.effect.name.split(\" \")[2]\nreturn args.type != \"cast\" || game.wfrp4e.config.magicWind[args.item.system.lore.value] != wind;","LQEWSN5KnHHATPsf":"if (args.totalWoundLoss > 0)\n{\n this.script.message(`${args.actor.name} must pass an Easy (+40) Résistance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}","LXEUhHuXe8keEPI9":"let test = await this.actor.setupCharacteristic(\"wp\", {fields: {difficulty : \"average\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tlet stuns = Math.max(1, Math.abs(test.result.SL))\n\tthis.actor.addCondition(\"stunned\", stuns)\n}","LYwio2f6xTiKg9dN":"if (args.test.failed)\n {\n let applicableCharacteristics = [\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"];\n if (applicableCharacteristics.includes(args.test.characteristicKey))\n {\n this.actor.addCondition(\"stunned\");\n }\n }","LeKLtvEDrWh4yHsx":"return args.skill?.name == game.i18n.localize(\"NAME.CharmAnimal\") || args.skill?.name.includes(game.i18n.localize(\"NAME.AnimalTraining\"));","LedRsrVo2f7lm3Ix":"return args.skill?.name == game.i18n.localize(\"NAME.Intimidate\");","Lg1oRg4oNRvucsvi":"return !(args.skill?.name == game.i18n.localize(\"NAME.Climb\") || args.skill?.name == game.i18n.localize(\"NAME.Athletics\"))","LgYyLg0Y2AQ1SKcS":"let amount = this.effect.sourceTest.result.overcast.usage.other.current ?? 0;\n\nargs.fields.successBonus += 2 + amount;","Lh3Ccqx3utIu6w0d":"if (!args.ablazeApplied)\n{\n args.ablazeApplied = true;\n await args.actor.addCondition(\"ablaze\");\n}","LjXPlgdXBdllnA3i":"return ![\"s\", \"t\"].includes(args.characteristic)","LjfScVGBf0Egr70E":"let animalCare = this.actor.itemTypes.skill.find(s => s.name === game.i18n.localize(\"NAME.AnimalCare\"));\nlet animalTrainings = this.actor.itemTypes.skill.filter(s => s.name.includes(game.i18n.localize(\"NAME.AnimalTraining\")));\n\nif (animalCare) \n animalCare.system.modifier.value += 20;\n\nfor (let training of animalTrainings) {\n training.system.modifier.value += 30;\n}","LjpuZam0IYIbOhFs":"const test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Navigation\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"vhard\"},\n context: {\n failure: \"Can't perform an action other than wander in a random direction at normal walking pace.\",\n success: \"Can act normally.\"\n }\n});\n\nawait test.roll();","LkPtgN9A36OI6Frh":"return args.skill?.name == game.i18n.localize(\"NAME.Leadership\");","LlRhPGorLl5qJCU8":"if (this.actor.hasCondition(\"prone\")) \n{\n this.actor.addCondition(\"unconscious\");\n}\nelse \n{\n this.actor.addCondition(\"prone\");\n}","Lm9IBkc918Duw3US":"let career = this.actor.itemTypes.career.find(c => c.getFlag(\"wfrp4e\", \"doubleLife\"))\n\nif(career)\n{\n career.system.current.value = true;\n}","Lp261O9fgEXmgPf3":"// If this actor wins a defending test, swap the test\nif (!args.opposedTest.result.swapped && args.opposedTest.result.winner == \"defender\" && args.opposedTest.attackerTest.result.damage)\n{\n await args.opposedTest.swap(this.effect.name);\n}","Lpv2N9LK9loeumiW":"if (this.actor.uuid != this.effect.sourceActor.uuid)\n{\n this.actor.setupSkill(game.i18n.localize(\"NAME.Athletics\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty: \"hard\"}, context : {failure : `${this.effect.name}: cannot move or take actions`}}).then(test => {\n test.roll();\n })\n}","Lrb1S2aK7SFVD0C7":"if (args.totalWoundLoss > 0)\n{\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed)\n {\n await args.actor.addCondition(\"fatigued\");\n }\n}","Lu27iXtJVkrJ8bOx":"return !args.skill?.name?.includes(game.i18n.localize(\"NAME.Stealth\"))","LxdLkPxH3SFvYrCJ":"if (args.effect.conditionId == \"ablaze\")\n{\n args.data.formula += ` - ${this.actor.system.characteristics.t.bonus}`\n}","LyAK0dVDS5L09yq2":"let caster = this.effect.sourceActor\n\nif (caster)\n{\n let bonus = caster.system.characteristics.wp.bonus\n this.actor.modifyWounds(bonus)\n\n this.script.message(`${this.actor.prototypeToken.name} regains ${bonus} Wounds`)\n}","M0XhKnWjG14pk3iH":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) && args.type != \"channelling\" && args.skill?.name != game.i18n.localize(\"NAME.Charm\") && !args.skill?.name.includes(`${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`) && args.type != \"cast\"","M0eOB2Jg9KzcN1gz":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.Nj3tC8A5fZ3zEdMR\", // Holy Visions\n \"Compendium.wfrp4e-core.items.Item.mNoCuaVbFBflfO6X\", // Sixth Sense\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","M2FshTX4PjKFVU8y":"args.flags.earCount = Number.isNumeric(args.flags.earCount) ? args.flags.earCount+1 : 1;\nif (args.characteristic == \"fel\")\n{\n\targs.fields.modifier -= 5;\n}\nif (args.flags.earCount == 2 && args.skill?.name == game.i18n.localize(\"NAME.Perception\"))\n{\n\targs.fields.modifier -= 20;\n}\n","M5bh0heeafA2fQQ8":"if (args.test.spell?.getFlag(\"wfrp4e\", \"boonOfTzeentch\"))\n{\n if (args.test.result.minormis || args.test.result.majormis || args.test.result.catastrophicmis)\n {\n this.script.message(`${this.effect.name} quits your mind in disgust and erases itself from your grimoire!`)\n this.effect.sourceItem.delete();\n }\n}","M6sb1yAdEAMlIvac":"return args.item?.system?.attackType == \"ranged\" && this.item.equipped.value","M9VgeYGiUO97ZUW4":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.hCadFsTRvLN9faaY\")\nlet data = item.toObject();\ndata.system.location.value = \"Jaw\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (!test.succeeded)\n{\n\targs.actor.addCondition(\"unconscious\")\n}\n\n","MB058H6OslhfBmxR":"console.log(args)\nreturn args.item?.system?.attackType == \"melee\"","MCK6WyjwYT28lsTN":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.u0CFf3xwiyidD9T5\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","MDLttXplnNthncGr":"return args.type == \"cast\" && [\"death\", \"necromancy\", \"life\", \"light\", \"heavens\"].includes(args.spell?.system.lore.value)","MECRxo8X0cfZh1rx":"return args.skill?.name !== game.i18n.localize(\"NAME.Dodge\");","MFKhU9vp8bQpHP3I":"let value = parseInt(this.item.specification.value)\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM && game.user.targets.size)\n{\n game.user.targets.forEach(t => {\n t.actor.applyTerror(value, name)\n })\n game.canvas.tokens.setTargets([])\n}\nelse \n{\n game.wfrp4e.utility.postTerror(value, name)\n}","MI2GgNi3fZtUCtQD":"return [\"int\", \"wp\"].includes(args.characteristic)","MIhYSuJ6MI9B65UT":"let specification = Number(this.item.specification.value) || 1;\nargs.actor.system.status.wounds.max += Math.floor(args.actor.system.status.wounds.max * 0.3 * specification);\nargs.actor.system.status.carries.max -= Math.floor(args.actor.system.status.carries.max * 0.1 * specification);\nargs.actor.system.details.price.gc += Math.floor(args.actor.system.details.price.gc * 0.2 * specification);","MJB6WbZSF6Briz30":"return args.item?.name == game.i18n.localize(\"NAME.Leadership\")","MKxYbHOrv0UuA7JB":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {fields: {difficulty : \"average\"}, appendTitle : \" - Blessé\"})\n await test.roll();\n if (test.failed)\n {\n fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\").then(disease => {\n this.actor.createEmbeddedDocuments(\"Item\", [disease.toObject()])\n this.script.scriptNotification(\"Contraction de \" + disease.name)\n })\n }","MMv2B8TH7jxNCtdl":"let actor = this.actor;\n let effect = this.effect;\n let bleedingAmt;\n let bleedingRoll;\n let msg = \"\"\n\n let damage = effect.conditionValue;\n let scriptArgs = {msg, damage};\n await Promise.all(actor.runScripts(\"preApplyCondition\", {effect, data : scriptArgs}))\n msg = scriptArgs.msg;\n damage = scriptArgs.damage;\n msg += await actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, minimumOne : false, suppressMsg : true})\n\n if (actor.status.wounds.value == 0 && !actor.hasCondition(\"unconscious\"))\n {\n await actor.addCondition(\"unconscious\")\n msg += \"
\" + game.i18n.format(\"BleedUnc\", {name: actor.prototypeToken.name })\n }\n\n if (actor.hasCondition(\"unconscious\"))\n {\n bleedingAmt = effect.conditionValue;\n bleedingRoll = (await new Roll(\"1d100\").roll()).total;\n if (bleedingRoll <= bleedingAmt * 10)\n {\n msg += \"
\" + game.i18n.format(\"BleedFail\", {name: actor.prototypeToken.name}) + \" (\" + game.i18n.localize(\"Rolled\") + \" \" + bleedingRoll + \")\";\n await actor.addCondition(\"dead\")\n }\n else if (bleedingRoll % 11 == 0)\n {\n msg += \"
\" + game.i18n.format(\"BleedCrit\", { name: actor.prototypeToken.name } ) + \" (\" + game.i18n.localize(\"Rolled\") + bleedingRoll + \")\"\n await actor.removeCondition(\"bleeding\")\n }\n else\n {\n msg += \"
\" + game.i18n.localize(\"BleedRoll\") + \": \" + bleedingRoll;\n }\n }\n\n await Promise.all(actor.runScripts(\"applyCondition\", {effect, data : {bleedingRoll}}))\n if (args.suppressMessage)\n {\n let messageData = game.wfrp4e.utility.chatDataSetup(msg);\n messageData.speaker = {alias: this.effect.name}\n messageData.flavor = this.effect.name;\n return messageData\n }\n else\n {\n return this.script.message(msg)\n }\n ","MMx8f5uJ15XOgJGg":"return args.skill?.name !== game.i18n.localize(\"NAME.Row\") && args.skill?.name !== game.i18n.localize(\"NAME.Swim\") && !args.skill?.name.includes(game.i18n.localize(\"NAME.Sail\"));","MOZn375tGD2060cC":"const diff = foundry.utils.diffObject(this.item.toObject(), args.data);\nif (args.data?.system?.APdamage?.head > this.item.system.APdamage.head) {\n const result = await game.wfrp4e.tables.rollTable('armet-damage');\n this.script.message(result.result);\n if (result.total > 5) \n delete args.data.system.APdamage.head;\n}","MPK7U4HLmIAsjdqs":"if (args.applyAP)\n{\n args.modifiers.ap.ignored += 2\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignore 2 PA\");\n}","MRH5rTTgUPdqo7SO":"return !args.item?.system.isRanged;","MSJWJEUrX7ZmMvAD":"return !(args.skill?.name.includes(game.i18n.localize(\"NAME.Ranged\")) || args.item?.isRanged || args.item?.name == game.i18n.localize(\"NAME.Charm\"))","MWtT4Mhf7F1hqemx":"let damage = this.effect.sourceTest.result.damage;\n\nawait this.actor.applyDamage(damage, {\n loc: \"roll\",\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP,\n createMessage: this.script.getChatData(),\n});\n\nawait this.actor.addCondition(\"ablaze\", 2);\n\nconst test = await this.actor.setupSkill(\n game.i18n.localize(\"NAME.Dodge\"),\n {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n },\n);\n\nawait test.roll();\n\nif (test.failed) {\n await this.actor.addCondition(\"prone\");\n await this.actor.addCondition(\"stunned\");\n}","McLR9YcgVUG3MooC":"args.applyTB = false;","Me1wS5XdqUEy7OGt":"let loc = (await game.wfrp4e.tables.rollTable(\"hitloc\")).result;\nlet critTable = `crit${this.generalizeTable(loc)}`;\nlet crit = (await game.wfrp4e.tables.rollTable(critTable)).result;\n\nthis.script.message(`{this.actor.name} suffers a ${crit} (location : ${loc}). Do not apply bleeding or any additonnal wounds.`);","MfxWXZwaZUjGSBqw":"if (this.actor.hasCondition(\"ablaze\"))\n{\n this.script.notification(\"Immunisé à l'état En Flames\")\n await this.actor.hasCondition(\"ablaze\")?.delete()\n}","MfxzwJz2o9ho2hOM":"return args.skill?.name == \"Lore (Apothecary)\"","MgMMoC4Umpg7fmNI":"// Apply changes when the mask is worn\n\nif (args.equipped) {\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [this.item.effects.contents[1]?.convertToApplied()])\n this.script.message(`${this.actor.name} porte le ${this.item.name}.
\n Ils ne peuvent pas lancer de sorts ni prier pour des Bénédictions et des Miracles.
\n S'ils portent le masque pendant plus d'une heure ou bénéficient de l'un de ses effets, ils sont exposés à @Corruption[modérée]{Corruption modérée}.\n `,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n\n// Notify of lingering effects when mask is Retiré\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Usagé)\"})\n this.script.message(`${this.item.name} sur ${this.actor.name} a été retiré et perd ses propriétés. Cependant, les effets durent [[1d10+4]] jours, après quoi ils doivent être manuellement retirés.`,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n )\n\n}\n","MgTqCMRjxhezT73T":"return args.fields.hitLocation == \"head\" && args.weapon?.system.properties.qualities.pummel","MgZreqq3Jua10c8s":"return ![\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"].includes(args.characteristic)","Mhb67xufvA9uWO21":"let actorTaille = game.wfrp4e.config.actorTailleNums[args.actor.details.size.value]\nlet attackerTaille = game.wfrp4e.config.actorTailleNums[args.attacker.details.size.value]\n\nif (attackerTaille > actorTaille)\n{\n args.actor.addCondition(\"prone\")\n this.script.message(`Tail Attack: ${args.actor.prototypeToken.name} is now Prone`)\n}","Mir4FMHQRdVqazAF":"let actorTaille = game.wfrp4e.config.actorTailleNums[args.actor.details.size.value]\nlet attackerTaille = game.wfrp4e.config.actorTailleNums[args.attacker.details.size.value]\n\nif (attackerTaille > actorTaille)\n{\n let msg = `Attaque de Langue: ${args.actor.prototypeToken.name} est maintenant @Condition[Entangled]`;\n await args.actor.addCondition(\"entangled\");\n if (actorTaille <= 2)\n {\n msg += `et @Condition[Engaged]`\n }\n this.script.message(msg, {speaker : {alias: args.attacker.prototypeToken.name}})\n}","MkEcdViivk7abf1x":"args.actor.flags.meleeDamageIncrease += 1","MnXny8SCh6OceJc9":"return args.characteristic == \"int\"","MnqQkXVp20Lw84I1":"let test = await this.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"difficult\"}})\nawait test.roll();\nif (test.failed)\n{\n this.script.message(await this.actor.applyBasicDamage(3, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))\n}","Mp8UjuCLa9jdzhBS":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nif (test.failed)\n{\n if (!this.actor.hasCondition(\"fatigued\"))\n {\n await this.actor.addCondition(\"fatigued\");\n }\n else\n {\n await this.actor.addCondition(\"blinded\");\n await this.actor.addCondition(\"deafened\");\n }\n \n if (((this.actor.hasCondition(\"blinded\").conditionValue || 0) + (this.actor.hasCondition(\"deafened\").conditionValue || 0)) > this.actor.system.characteristics.i.bonus)\n {\n await this.actor.addCondition(\"unconscious\"); \n }\n}","Mqbjr3t7IXwFnfCv":"if (this.item.flags.runeOfIron) return\n\n\nconst runesOfIron = this.item.effects.contents.filter(e => e.name == this.effect.name)\nconst ironWounds = parseInt(runesOfIron.length * 2)\nconst currentWounds = this.actor.system.status.wounds.value\n\nif (args.equipped) {\n this.item.flags.runeOfIron = true\n this.actor.modifyWounds(ironWounds)\n}\nelse\n{\n this.item.flags.runeOfIron = true\n this.actor.modifyWounds(-ironWounds)\n if (ironWounds > currentWounds) {\n this.script.message(`You have removed ${ironWounds} Wounds by unequipping Runic Armoour, but you only had ${currentWounds} Wounds remaining. This may trigger a critical injury.`)\n }\n}","Msygc7oQQPB5fw0b":"let test = this.effect.sourceTest;\nif (test.failed && (test.result.roll % 11 == 0 || test.result.roll == 100))\n{\n\tlet points = await new Roll(\"1d10\").roll({allowInteractive : false});\n\tgame.dice3d?.showForRoll(points)\n\tthis.actor.update({\"system.status.corruption.value\" : this.actor.system.status.corruption.value + points.total})\n\tthis.script.message(`Gain de ${points.total} Corruption`)\n}\nelse\n{\n\tlet points = this.effect.sourceTest.result.overcast.usage.other.current;\n\tthis.actor.update({\"system.status.corruption.value\" : this.actor.system.status.corruption.value - points})\n\tthis.script.message(`Perd de ${points} de Corruption`)\n}","MwUzyAgd0yPnmZCH":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.klCJX0mNpXYH5AIx\")\nlet data = item.toObject(); \ndata.name = data.name.replace(\"Target\", \"Strangers\");\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});","Myl1Ishu9GBraYUZ":"this.actor.removeCondition(\"bleeding\")","N2MeOlf0GjPiRcSb":"let test = await this.actor.setupCharacteristic(\"dex\", {context : {failure : \"Lâche l'objet\"}})\nawait test.roll();","N6E9Jsd8n2ubCfz8":"for(let key in this.item.system.AP)\n{\n this.item.system.AP[key]++;\n}","N7nGncsPrTz2ZbDA":"return !args.context.dodge || !this.actor.isMounted","N8hA6ysHCTlLd8Kj":"let characteristics = {\n \"ws\" : 0,\n \"bs\" : 0,\n \"s\" : 0,\n \"t\" : 5,\n \"i\" : 15,\n \"ag\" : 0,\n \"dex\" : 10,\n \"int\" : 15,\n \"wp\" : 15,\n \"fel\" : 0\n}\nlet skills = [\"Focalisation\", \"Calme\", \"Esquive\", \"Divertissement (Narration)\", \"Intuition\", \"Langue (Magick)\", \"Savoir (Magie)\" , \"Perception\"]\nlet skillAdvancements = [5, 15, 10, 10, 15, 10, 10, 20]\nlet talents = [\"Magie des Arcanes\", \"Magie Mineure\", \"Seconde Vue\"]\nlet trappings = [\"Arme simple\", \"(2M) Bâton de combat\", \"Ritual Dress incorporating many ingredients and fetishes\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n items.push({name : trapping, type : \"trapping\", \"system.trappingType.value\" : \"clothingAccessories\"})\n //ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","N9kA46ZQ9LiRjy6T":"return args.skill?.name == game.i18n.localize(\"NAME.Haggle\") || args.skill?.name == game.i18n.localize(\"NAME.Gossip\");","NDvNGATDM2xPFJK0":"brokenbone = await fromUuid(\"Compendium.wfrp4e-core.items.hCadFsTRvLN9faaY\")\nteeth = await fromUuid(\"Compendium.wfrp4e-core.items.fBcZhOBn8IpoVqQ1\")\ntongue = await fromUuid(\"Compendium.wfrp4e-core.items.rkJA1DlK51QuRlJy\")\nbrokenbone = brokenbone.toObject();\nteeth = teeth.toObject();\ntongue = tongue.toObject();\n\n\nlet roll = await new Roll(\"1d10\").roll({allowInteractive : false});\nroll.toMessage(this.script.getChatData({flavor : \"Teeth Lost\"}))\n\nteeth.system.location.value = `${roll.total} ${teeth.system.location.value}`\nbrokenbone.system.location.value = \"Jaw\"\nthis.actor.createEmbeddedDocuments(\"Item\", [brokenbone, teeth, tongue])\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"vhard\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"unconscious\")\n}","NEKLTgJJsayC7tpF":"return [\"ws\", \"ag\"].includes(args.characteristic);","NI3ZzIAlpQfVSjvf":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = await ValueDialog.create({text : \"Entrez la valeur de Peur\", title : this.effect.name});\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","NMZ3Fb164tUfwChF":"return !args.data.targets[0]?.actor?.hasCondition(\"entangled\")","NNytXz5XFPrEF6dw":"if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 1);\n}\n ","NQSvFWhmBQAyx5Zz":"return args.item?.isProjectiles","NTFpkiGyBpOtrV0s":"if (this.actor.uuid == this.effect.sourceActor.uuid)\n{\n\treturn;\n}\n\nif (this.actor.has(\"À Sang Froid\") && !this.actor.hasSystemEffect(\"nausea\")) {\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {appendTitle : `- ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\n let myRoll = await new Roll(\"1d10\").roll({allowInteractive : false});\n let duration = myRoll.total\n this.actor.addSystemEffect(\"nausea\");\n this.script.scriptMessage(`Symptome Nausée ajouté, durée : ${duration} heures`);\n}\n}\nreturn false;","NX9fApO15NQuTipW":"return [\"ws\", \"bs\"].includes(args.characteristic)","Na7Nanl9YmxZlTo7":"return args.type != \"cast\" && args.type != \"channelling\"","NdquQqyuOkGCj8Uo":"let darkvision = await fromUuid(\"Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc\")\nlet fear = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nlet acutesense = await fromUuid(\"Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS\")\nfear = fear.toObject();\nfear.system.specification.value = 1;\nacutesense = acutesense.toObject();\nacutesense.name += \" (Smell)\";\nthis.actor.createEmbeddedDocuments(\"Item\", [darkvision, fear, acutesense], {fromEffect : this.effect.id})","NheyFTaMKupOgRJb":"await this.actor.addEffectItems([\"Compendium.wfrp4e-core.items.Item.0LdHytqyNmg2pcAX\", \"Compendium.wfrp4e-core.items.Item.4AqSkJnFPqNuTkos\", \"Compendium.wfrp4e-core.items.Item.x8jsChg17VQ9XgiK\"], this.effect)","Nk6qAalTmc6UI2XQ":"const message = game.messages.get(args.options.message);\nconst sl = message.system.sl;\nthis.effect.setFlag(\"wfrp4e-archives3\", \"sl\", sl);","NkqtQaLEGYst0PUO":"if (this.actor.has(game.i18n.localize(\"NAME.MagicResistanceTalent\"), \"talent\")) \n return\n\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.eowbsW6oHGSNJmxV\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","NnA4zpuO6iUXKhH7":"if ((args.sourceItem && args.sourceItem.isMelee) || (args.sourceItem && !args.sourceItem.name.includes(game.i18n.localize(\"NAME.Ranged\"))))\n{\n let AP = parseInt(this.effect.sourceTest.result.SL)\n args.modifiers.ap.value += AP;\n args.modifiers.ap.magical += AP;\n args.modifiers.ap.details.push(`${this.effect.name} (${AP})`)\n}","NnDq4miIPNEtZUWb":"args.test.result.critModifier = args.test.result.critModifier || 0;\nargs.test.result.critModifier += 20;\n\nif (args.test.result.critical)\n{\n args.test.result.critical = `${game.i18n.localize(\"Critical\")} (+${args.test.result.critModifier})`\n}","Np25JqEiaoqerEk8":"if (test.result.tables.miscast) {\n test.result.other.push(`${this.effect.name}: You may reroll any result from the @Table[waaagh-miscast]{Waaagh! Miscast Table}.`);\n}","Np8P8IPT2GYlrh6G":"return args.skill?.name !== `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})` && args.type !== \"channelling\";","NqFvdCKDLqIXaE9m":"return args.weapon?.system.isMelee;","NrVFrIXM8GnIbojv":"args.item.system.damage.value += `+ ${this.actor.system.characteristics.fel.bonus}`;","Nuth9S5UHIhpEuIC":"args.fields.modifier -= 20","NvaPNfZt5d9RqKSE":"if (args.test.isCritical) {\n args.test.result.tables.critical.modifier \n = (typeof args.test.result.tables.critical.modifier ==='undefined') \n ? 20 \n : args.test.result.tables.critical.modifier + 20\n}","O1FwJHbDqZHwaYK8":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();","O45vpR4jDbQQnmvJ":"let items = [];\n\nlet etiquette = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP\")).toObject();\netiquette.name += \" (Suivants de Khorne)\";\n\nitems.push(etiquette);\n\nlet animosity = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.Q2MCUrG2HppMcvN0\")).toObject();\nanimosity.name = animosity.name.replace(\"(Target)\", \"(Suivants de Slaanesh)\");\n\nitems.push(animosity);\n\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect : this.effect.id});\n","O7lXFZLrLdFaShGR":"args.context.catfall = true;","O9fc0hLHdkTgSuLg":"let bite = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet venom = await fromUuid(\"Compendium.wfrp4e-core.items.gFkRm9wS65qe18Xv\")\nlet biteData = bite.toObject();\nlet venomData = venom.toObject();\n\nbiteData.system.specification.value = 3 - this.actor.characteristics.s.bonus;\nvenomData.system.specification.value = \"Average\"\nthis.actor.createEmbeddedDocuments(\"Item\", [biteData, venomData], {fromEffect : this.effect.id})","OBF6r2CsMOEokAsS":"args.weaponProperties.damaging = true;\nargs.weaponProperties.impale = true;","OCFrGXAYfo9OYnhc":"return args.item?.system.magicMissile?.value || args.item?.system.attackType","OEy2lxvic37dRBEt":"let filters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"petty\"\n }\n]\n\nlet petty = await ItemDialog.createFromFilters(filters, 3, {text : \"Choisissez 3 Sorts Mineurs\"})\n\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"\"\n }\n]\n\nlet arcane = await ItemDialog.createFromFilters(filters, 3, {text : \"Choisissez 3 Sorts d'Arcane\"})\n\nlet items = petty.concat(arcane).map(i => i.toObject())\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","OF4sSVOvHoKuPk7L":"if (this.item.flags.burning) return\nconst runesOfBurning = this.item.effects.contents.filter(e => e.name == this.effect.name)\nconst ablaze = runesOfBurning.length\nargs.actor.addCondition(\"ablaze\", ablaze)\nargs.extraMessages.push(\n \"\" + this.effect.name + \": \"\n + ablaze + \" @Condition[Ablaze] Conditions\")\nthis.item.flags.burning = true","OFViRemr1cpnO3af":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {fields : {difficulty : \"difficult\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (!test.succeeded)\n{\n await this.actor.addCondition(\"bleeding\");\n}","OGX4BneaYAnV25TO":"let chatData = { whisper: ChatMessage.getWhisperRecipients(\"GM\") }\nlet message = \"\"\n\nlet wounds = foundry.utils.duplicate(this.actor.status.wounds)\nlet regenRoll = await new Roll(\"1d10\").roll({allowInteractive : false});\nlet regen = regenRoll.total;\n\nif (wounds.value >= wounds.max)\n return\n\nif (wounds.value > 0)\n{\n wounds.value += regen\n if (wounds.value > wounds.max)\n {\n wounds.value = wounds.max\n }\n message += `${this.actor.name} regagne ${regen} Point de Blessures.`\n\n if (regen == 10)\n {\n message += `
De plus, il guérit d'une Blessure Critique.`\n }\n}\nelse if (regen >= 8)\n{\n message += `${this.actor.name} a fait un ${regen} et regagne 1 Point de Blessures.`\n wounds.value += 1\n if (regen == 10)\n {\n message += `
De plus, il guérit d'une Blessure Critique.`\n }\n}\nelse\n{\n message += `${this.actor.name} a fait un ${regen} et ne régénère pas de Point de Blessures.`\n}\n\nawait this.actor.update({ \"system.status.wounds\": wounds })\nthis.script.message(message, { whisper: ChatMessage.getWhisperRecipients(\"GM\") })","OJMgS8ZQv0j4tEFf":"return [\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"].includes(args.characteristic)","OKivTxfbKZw5Lj3V":"return args.type === \"cast\" && [\"daemonology\", \"necromancy\"].includes(args.spell?.system.lore.value);","OMAUX1fnHyIpplul":"return ![\"fel\", \"dex\"].includes(args.characteristic)","OXoqtpOdfkURZbuL":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.yRhhOlt18COq4e1q\")\nlet data = item.toObject()\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n","OYLqLl6vikJD8flg":"const crowd = this.effect.getFlag(\"wfrp4e\", \"crowd\") ?? 0;\nconst bonus = 2 + Math.floor(crowd * 0.1);\n\nargs.fields.slBonus += bonus ;","OYRUSP7Q0Je0jdCY":"let species = await ValueDialog.create({text : \"Entrez l'Espèce Cible\", title : this.effect.name})\n\nthis.effect.updateSource({name : this.effect.setSpecifier(species)});","Oa9FmLXRRZRpLrrq":"let test = await this.actor.setupTrait(this.item); \nawait test.roll();","OcQe0zfksf1DCJYe":"args.actor.system.characteristics.s.value += 30\nargs.actor.system.characteristics.t.value += 30\n\nargs.actor.system.characteristics.s.bonus += 3\nargs.actor.system.characteristics.t.bonus += 3\n\nif (args.actor.system.characteristics.s.value > 100)\n{\n args.actor.system.characteristics.s.value = 100\n args.actor.system.characteristics.s.bonus = 10\n}\n\nif (args.actor.system.characteristics.t.value > 100)\n{\n args.actor.system.characteristics.t.value = 100\nargs.actor.system.characteristics.t.bonus = 10\n}","OeCgX3hIsfLfmGvC":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Perception\"))\nawait test.roll();\nif (test.succeeded)\n{\n this.actor.removeCondition(\"surprised\");\n}","OeKeQAAcJhdI4Qky":"if (this.actor.hasCondition(\"stunned\") || this.actor.hasCondition(\"unconscious\"))\n{\n\tthis.script.notification(\"Disabled!\");\n\tawait this.effect.update({\"disabled\" : true})\n}","Ofn6vDbP3fZ4UlSc":"args.fields.modifier += -20;\n ","OgSI0Z6SHjYuqKIz":"let blows = this.item.getFlag(\"wfrp4e\", \"blows\") || 0\nlet difficulties = Object.keys(game.wfrp4e.config.difficultyLabels)\n\nblows = Math.clamp(blows, 0, difficulties.length - 1)\nif (this.item.system.protects[args.loc])\n{\n let difficulty = difficulties[blows];\n this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields: {difficulty}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => {\n await test.roll();\n if (test.failed)\n {\n this.script.message(`${this.actor.name} must break from combat and flee until they pass a Challenging (+0) Willpower Test`);\n this.item.setFlag(\"wfrp4e\", \"failedCool\", true);\n }\n })\n}","OicQSEVZBbqLtrcf":"let choice = await ItemDialog.create(this.actor.itemTypes.critical, (this.effect.sourceTest.result.overcast.usage.other.current || 1), \"Choisir the Critique Blessures to heal (Impossible de reattach body parts)\")\n\nthis.script.message(`Soin de ${choice.map(i => i.name).join(`, `)}`);\nthis.actor.deleteEmbeddedDocuments(\"Item\", choice.map(i => i.id))","On1itZhp0AOzNyyc":"let test = await this.actor.setupSkill(\"Runesmithing\", {appendTitle: ` - ${this.effect.name}`});\nawait test.roll();\nthis.effect.update({\"disabled\" : true});","OnkEe4ISru1hjJWP":"this.actor.flags.useless[this.item.system.location.key] = true;","Op88kMtimSEWlY2h":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","OqLKL0PiCvYH2QxW":"if (args.test.options.wallcrawler)\n{\n\tif (parseInt(args.test.result.SL) < 0 || args.test.failed)\n\t{\n\t\tif (parseInt(args.test.result.SL) < 0)\n\t\t{\n\t\t\targs.test.result.SL = \"+0\";\n\t\t\targs.test.result.description = game.i18n.localize(\"ROLL.MarginalSuccess\");\n\t\t}\n\t\targs.test.result.outcome = \"success\"\n args.test.result.other.push(`${this.effect.name}: Minimum +0 SL`)\n\t}\n}","OqxeuZfZDfm9ax6h":"this.actor.system.status.addArmour(1, {locations : \"head\", source : this.effect})","OsLXutfXyQCAkhAf":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Voile';\nconst difficulty = 'average';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n \n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","OvIELZLvnlN2H2uw":"args.update({light : {\n \"dim\": 2,\n \"bright\": 1,\n \"alpha\": 0.5,\n \"animation\": {\n \"speed\": 4,\n \"intensity\": 4,\n \"type\": \"pulse\",\n },\n \"color\": \"#949bff\",\n}});","OxsBnnVI3Smpknpb":"if (this.actor.status.advantage.value && !this.actor.sameSideAs(this.effect.sourceActor))\n{\n this.actor.modifyAdvantage(-1);\n this.script.notification(`${this.actor.name} loses 1 Advantage`);\n}","Oz7pWF9mEc1pQypj":"let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\nroll.toMessage({flavor : this.effect.name, speaker : {alias : this.actor.prototypeToken.name}})\nthis.actor.addCondition(\"stunned\", roll.total)","P29tT1eMMdAw3CPF":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.3S4OYOZLauXctmev\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty: \"hard\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tthis.actor.addCondition(\"unconscious\")\n}","PBW6IZtwawNHxB6y":"return args.context.dodge && this.actor.isMounted","PGHvFHBIygB5pnWT":"args.actor.addCondition(\"ablaze\", 1)\nargs.extraMessages.push(\n \"\" + this.effect.name + \": Ajout d'1 état @Condition[Ablaze]\")","PI1QNaKFeqood6d7":"if (args.attackerTest.weapon && args.defenderTest.weapon)\n{\n\n let attackerReach = game.wfrp4e.config.reachNum[args.attackerTest.weapon.reach.value]\n let defenderReach = game.wfrp4e.config.reachNum[args.defenderTest.weapon.reach.value]\n \n if (attackerReach == defenderReach)\n attackerReach = attackerReach < 7 ? attackerReach + 1 : attackerReach\n\n attackerReach = warhammer.utility.findKey(attackerReach, game.wfrp4e.config.reachNum)\n defenderReach = warhammer.utility.findKey(defenderReach, game.wfrp4e.config.reachNum)\n\n args.attackerTest.weapon.reach.value = attackerReach\n args.defenderTest.weapon.reach.value = defenderReach\n}","PMISUsaEDBA7D3od":"// After consumption, the user gains the Magic Resistance 3 Creature Trait, \n// reducing the SL of any spell affecting it by 3. \n// This effect lasts for one hour.\nconst hasMagicResistance = this.actor.has(\"Magic Resistance\")\n\nif (hasMagicResistance === undefined) {\n fromUuid(\"Compendium.wfrp4e-core.items.yrkI7ATjqLPDTFmZ\").then(trait => {\n let traitItem = trait.toObject()\n traitItem.system.specification.value = 2\n this.actor.createEmbeddedDocuments(\"Item\", [traitItem], {fromEffect: this.effect.id})\n })\n this.script.message(`

${this.actor.prototypeToken.name} has gained the Magic Resistance Trait. This effect lasts for one hour.

`, {whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true }) \n}\n\nif (hasMagicResistance) {\n // Multiple doses may be consumed at once, with each one adding an additional 1 to the Magic Resistance rating and increasing the duration by one hour. \n let msg = `

${this.actor.prototypeToken.name} has enhanced their Magic Resistance by 1 to Rating ${parseInt(hasMagicResistance.system.specification.value)}. This effect lasts for one hour.

`\n\n // Resist toxic effect\n this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {\n fields: {difficulty: \"challenging\"}\n }).then(async test => {\n await test.roll()\n\n // If they fail ...\n if (!test.succeeded) {\n msg += `

However, they begin to ooze the thick, poisonous slime that coats every Dreadmaw. They have gained 1 Poisoned Condition now and should continue to receive an additional @Condition[Poisoned] Condition at the end of each of the round.

\n

If they are still alive at the end of 10 rounds, the effect ends and all Poisoned Conditions gained from ${this.effect.name} are removed.

`\n this.actor.addCondition(\"poisoned\", 1)\n }\n this.script.message(msg, {whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true })\n })\n}\n","PMNjdEAusVBfam09":"return args.skill?.name === game.i18n.localize(\"NAME.Charm\");","PVjaKAHTKDA0rA9J":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();","PWHKisZTZEgCANd8":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tlet sourceActor = this.effect.sourceActor;\n\tthis.script.message(await this.actor.applyBasicDamage(4 + sourceActor.system.characteristics.s.bonus, {suppressMsg : true}))\n}","PdClojv7yNgQpOUc":"return args.skill?.name != game.i18n.localize(\"NAME.Endurance\");","PeZYj8b0vedyJj00":"// This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor\n\nlet mainEffect = this.item.effects.contents[0];\nif (mainEffect.name.includes(\"(Savoir)\"))\n{\n let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, \"Choisir Lore\");\n if (choice.length)\n {\n mainEffect.update({name : mainEffect.name.replace(\"Savoir\", choice[0].name)})\n this.item.update({name : this.item.name += ` (${choice[0].name})`})\n }\n}\n\nthis.effect.delete();","Pg9C6nJX5QHIdqa9":"return !args.item?.system.attackType\n","Ph3TdQw1lGiFr049":" if (!args.test.context.phantasmal && \n (this.actor.isOpposing || args.test.context.defending) && \n args.test.result.roll % 11 == 0 && \n args.test.succeeded && \n [\"Langue (Magick)\", \"Esquive\"].includes(args.test.item?.name))\n {\n args.test.context.phantasmal = true; // Flag so items aren't readded if test is edited\n let text = `${this.effect.name}: Adding Unstable and Ward`\n args.test.result.other.push(text) \n this.script.notification(text);\n \n let ward = await fromUuid(\"Compendium.wfrp4e-core.items.Bvd2aZ0gQUXHfCTh\")\n let wardData = ward.toObject();\n wardData.system.specification.value = 9;\n \n let unstable = await fromUuid(\"Compendium.wfrp4e-core.items.D0ImWEIMSDgElsnl\")\n let unstableData = unstable.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [wardData, unstableData], {fromEffect: this.effect.id})\n }\n","PjOi61gB2nSYooLs":"return this.sourceActor.uuid === this.actor.uuid || !args.item?.system?.isProjectiles;","PjRxGuUDKGmSmVDc":"fromUuid(\"Compendium.wfrp4e-core.items.EO05HX7jql0g605A\").then(item => {\n item = item.toObject()\n item.system.specification.value = this.actor.characteristics.ag.value\n this.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})\n})","PmELrzD3RmF9qKkO":"if (this.item.system.specification.value == \"Taille\")\n{\n let size = this.item.specifier;\n if (!size)\n {\n let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.actorTailles, this.item.img), 1, \"Choisir Taille\");\n if (choice[0])\n {\n size = choice[0]?.name;\n }\n }\n this.item.updateSource({\"system.specification.value\" : size, name : this.item.baseName})\n this.effect.updateSource({name : this.effect.name + ` (${size})`})\n}","Pn5fekTbkwlr61XU":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Ingénieur)';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n \n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","PoNnT5EqvLj2r5yf":"return args.skill?.name != game.i18n.localize(\"NAME.OutdoorSurvival\") && args.skill?.name != game.i18n.localize(\"NAME.Track\");","PsO7aTdELJt35eHP":"let morale = await new Roll(\"-1d10\").roll({allowInteractive : false});\nlet mood = await new Roll(\"-2d10\").roll({allowInteractive : false});\n\nmorale.toMessage(this.script.getChatData({flavor : \"Morale\"}));\nmood.toMessage(this.script.getChatData({flavor : \"Manann's Mood\"}));\n\nawait this.actor.system.status.morale.addEntry(\"Albatross Died\", morale.total)\nawait this.actor.system.status.mood.addEntry(\"Albatross Died\", mood.total);\n\nthis.effect.delete();","Puv2wLrSVe6b1jLf":"if (args.sizeDiff < 0 ) {\n args.damage += 3\n args.breakdown.other.push({label : this.effect.name, value : 3});\n}","PwqTmw7rsG8hzqCS":"if (args.test.result.critical && args.test.result.roll % 10 == 0) \n{\n game.wfrp4e.tables.findTable(\"knuckleduster-diseases\").roll().then(roll => {\n let results = roll.results[0]\n\n this.script.message(`${this.actor.name} contracts @UUID[Compendium.${results.documentCollection}.${results.documentId}]{${results.text}}`, {blind : true, whisper: ChatMessage.getWhisperRecipients(\"GM\") })\n })\n\n }\n\n","Q1kUE8jcG7id3MHT":"let criticals = this.actor.itemTypes.critical;\n\nif (criticals.length)\n{\n let choice = await ItemDialog.create(criticals, 1, {title: this.effect.name, text: \"Choose Critical to Heal\"})\n\n if (choice[0])\n {\n this.script.message(`Healed ${choice[0].name}`);\n choice[0].delete();\n }\n}\nelse \n{\n this.script.notification(\"No Critical Wounds!\")\n}","Q1trEhtqjIiDvFPF":"args.prefillModifiers.modifier -= 10 * this.effect.system.condition.value","Q4EQgP4gZR8TTm7S":"let penalty = 0\nif (args.item?.system.attackType)\n{\n penalty -= 30\n}\nif (args.actor.has(game.i18n.localize(\"NAME.SecondSight\"), \"talent\"))\n penalty += 10\n\nargs.fields.modifier += penalty","Q5gh5Y9dCdclcwsD":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) && args.skill?.name != `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`","Q68WiUWY7GxiXBbT":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.9GNpAqgsKzxZKJpp\")\nlet data = item.toObject();\ndata.system.specification.value = \"Lorsque Seul\";\ndata.effects[0].disabled = true;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","Q7eULXQ9AfDRmUGO":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n \n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","Q9EmlWmuDac83cJw":"return args.skill?.name == game.i18n.localize(\"NAME.Climb\") || args.skill?.name?.includes(game.i18n.localize(\"NAME.Stealth\"));","QBBrzcSAe8QqE4WP":"const SL = this.effect.sourceTest.result.SL;\nconst damage = 8 + SL;\n\nawait this.actor.applyBasicDamage(damage, {loc: \"roll\"});\n\nconst test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {\n skipTargets: true,\n appendTitle: ` - ${this.effect.name}`,\n fields: {difficulty: \"challenging\"},\n context: {\n failure: `Reçoit 1 état @Condition[Ablaze].`\n }\n})\n\nawait test.roll();\nif (test.failed) {\n await this.actor.addCondition(\"ablaze\");\n}","QF8LanKNoAlTkQG0":"this.actor.system.status.encumbrance.max += 2","QHQ7XmFOjT9wXgw1":"if (args.actorsystem.details.move.oars.value > 0)\n args.actor.system.details.move.oars.value -= 1;\n\nargs.actor.system.details.man -= 2;","QKTA2TqZ77pvHWSJ":" this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 0,\n \"bright\": 0,\n \"alpha\": 0.5,\n \"animation\": {\n \"type\": \"\",\n },\n \"color\": \"#000000\",\n }}));","QKjR6P1WEHXf4K77":"args.fields.slBonus -= 2\n","QKt9ZYpVpznncfJ1":"for(let key in this.item.system.AP)\n{\n if (this.item.system.AP[key])\n {\n this.item.system.AP[key]++;\n }\n}","QLBxcP85duX1Z7LX":"if (!args.item.actor?.has(\"Béni (Taal)\", \"talent\")) return;\n\nargs.item.system.AP.head = 3;","QLUaOkwuSPvBp7jU":"this.script.scriptNotification(\"Impossible d'attaquer des cibles qui ne sont pas Empêtrée\")\nargs.abort = true;","QNxmImpLTou6WdMQ":"let test = args.test\nif (test.result.minormis || test.result.majormis || test.result.catastrophicmis)\n test.result.other.push(\"Possibilité de faire un test de FM Difficile (-10) pour prévenir la Maladresse\")","QPVVDPcJ4Xi5FmQl":"if(this.actor.hasCondition(\"fatigued\") && args.loc == \"head\" && (args.opposedTest?.attackerTest.result.critical || args.actor.status.wounds.value - args.totalWoundLoss < 0))\n{\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), { fields: { difficulty: \"average\" }, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"unconscious\")\n }\n}","QQ2gHThZHdO4yLLX":"return args.skill?.name == game.i18n.localize(\"NAME.Swim\");","QQPiREc50HT5W2Tr":"if (args.item.type == \"weapon\" && args.item.weaponGroup.value == \"brawling\")\n args.item.damage.value += \" + 1\"","QRSACifDrvojIXHB":"if (!this.actor.effects.find(e => e.isCondition))\n{\n\treturn this.script.notification(\"Aucun état sur cet acteur\")\n}\n\nlet choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, \"Choisir un état\")\n\nif (choice[0])\n{\n\tthis.actor.removeCondition(choice[0].conditionId)\n}\n","QaEUhlvxFPzowH0v":"args.actor.characteristics.ag.modifier -= 10;\n\n if (args.actor.details.move.value > 3)\n {\n args.actor.details.move.value -= 1;\n if (args.actor.details.move.value < 3)\n args.actor.details.move.value = 3\n }","QaGNsqKm2Nf0zGVm":"return [\"t\", \"int\", \"wp\", \"fel\"].includes(args.characteristic)","QbIYnshWeP1U8SUy":"args.applyAP = false;\nargs.applyTB = false;","QfTBRGXVfwQSghmd":"fromUuid(this.effect.origin).then(caster => {\n if (caster) {\n if (actor.items.find(it => it.name == game.i18n.localize(\"Bestial\"))) {\n let healed = caster.characteristics.wp.bonus\n let wounds = foundry.utils.duplicate(args.actor.status.wounds)\n wounds.value += healed\n\n if (wounds.value > wounds.max)\n wounds.value = wounds.max\n\n args.actor.update({ \"system.status.wounds\": wounds })\n ChatMessage.create({ content: `${this.actor.prototypeToken.name} regains ${healed} Wounds`, speaker: { alias: this.effect.name } })\n } else {\n ui.notifications.warn(\"Target actor has no Bestial trait\")\n }\n }\n})\n\n","Qgn92fZyc3Psn8QJ":"if (args.test.options.useOnesAttractive && (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target)) {\n\n let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\n let ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\n if (ones == 0) {\n ones = 10;\n }\n\n if (ones > SL) {\n args.test.result.SL = \"+\" + (ones + args.test.successBonus + args.test.slBonus)\n args.test.result.other.push(`${this.effect.name}: Unité du dé utilisée comme DR`)\n }\n}","QjlGijPHAwAEX3mf":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.Bvd2aZ0gQUXHfCTh\", this.effect, {\"system.specification.value\" : 9})","Qk7t2l5ep9RDVpgE":"args.context.diceman= true;","QoEOxRruQXYrZrv3":"let filters = [\n {\n property : \"type\",\n value : \"skill\"\n },\n {\n property : \"name\",\n value : /Melee/gm,\n regex: true\n }\n]\n\nlet items = await ItemDialog.createFromFilters(filters, 2, {text: \"Choisissez 2 Compétences pour ajouter +20\"})\nitems = items.map(i => i.toObject())\nitems.forEach(i => i.system.advances.value = 20)\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","QqkE7rlqhkeRohFD":"return !([\"cast\", \"channelling\"].includes(args.type) && this.actor.hasCondition(\"fatigued\"))","QqybHxNCzPEzG1Qh":"return args.context.dualWieldOffhand","QwHoqu2oO8QO8Mad":"let content = `${this.effect.name}: All targets engaged with ${this.actor.prototypeToken.name} take [[/r 1d10]] Damage, modified by TB and AP.`\n\nthis.script.message(content)","R32U01LBjBrK1pns":" const templateMap = {\n 'P2e7Yx98bK3u110a' : \"\",\n 'iuMp3KLaMT2WCmie' : \"4s01nHFKVKTEZd3B\",\n 'RBuYcT5tppwcmnC5' : \"h3yuJDWnixliXeBG\",\n 'vcGpNwNbhvfzVveQ' : \"7QrsbofccMOE1YsF\",\n 'jmhKZy0w9TzkEK9c' : \"scVTPVyDDbli4WZL\",\n '9Byj6k7SmdTYis2V' : \"4Cd7Dknee2WjReOo\",\n 'laJwc2l9tzJPgaaJ' : \"2hJ2a5YjbwZWWYrd\",\n }\n let template = (await game.wfrp4e.tables.rollTable(\"hireling-templates\", {hideDSN: true})).object;\n let physicalQuirk = (await game.wfrp4e.tables.rollTable(\"physical-quirks\", {hideDSN: true})).text;\n let workEthic = (await game.wfrp4e.tables.rollTable(\"work-ethic\", {hideDSN: true})).text;\n let personalityQuirk = (await game.wfrp4e.tables.rollTable(\"personality-quirks\", {hideDSN: true})).text;\n\n\n let templateItem = await warhammer.utility.findItemId(templateMap[template._id]);\n\n let bio =\n `\n

Template: ${template.text}

\n

Particularité physique: ${physicalQuirk}

\n

Éthique de travail: ${workEthic}

\n

Particularité de personnalité: ${personalityQuirk}

\n `\n\n this.script.message(bio, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n\n await this.actor.update({\"system.details.gmnotes.value\" : bio})\n\n if (templateItem)\n {\n this.actor.createEmbeddedDocuments(\"Item\", [templateItem.toObject()])\n }","R3OfRdi6xv0e9mzB":"return args.item.name.includes(\"Arme\")","R4A2ozuhFbrjr6nj":"await this.actor.hasCondition(\"broken\")?.delete();","R5dOZWFxE2n6tooX":"return this.item.system.usesLocation(args.weapon)","R6SnyF3y4Vsq6oga":"let lore = this.effect.name.split(\"(\")[1].split(\")\")[0].toLowerCase();\n\n// If channelling corresponding lore\nif (args.type == \"channelling\" && args.spell.system.lore.value == lore)\n args.prefillModifiers.slBonus += 1\n// If channelling or casting different lore\nelse if (args.spell.system.lore.value != lore && args.spell.system.lore.value != \"petty\")\n args.prefillModifiers.slBonus -= 1","R8FBHZaaARA3z9pB":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'hard';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","R8ecKGRzOr4ThvVa":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Maintenance Crew Test';\nconst difficulty = 'hard';\nconst target = 80;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","R95pDZMHnD9iHAl8":"return args.skill?.name.includes(this.item.system.tests.value);","RDtJXji3hgcKnEBk":"let as = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS\")).toObject();\nlet hv = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.Nj3tC8A5fZ3zEdMR\")).toObject();\nlet ms = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.6w30u0VPsAicrqb5\")).toObject();\nlet ss = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.OEjUvJKi0xmBwbS2\")).toObject();\n\nas.name += ` (${game.i18n.localize(\"SPEC.Sight\")})`;\n\nlet roll = (await new Roll(\"1d10\").roll());\nroll.toMessage(this.script.getChatData())\nlet items = []\n\nif (roll.total <= 2)\n{\n items = items.concat([as]);\n}\nelse if (roll.total <= 4)\n{\n items = items.concat([hv]);\n}\nelse if (roll.total <= 6)\n{\n items = items.concat([ms]);\n}\nelse if (roll.total <= 8)\n{\n items = items.concat([ss]);\n}\nelse if (roll.total <= 10)\n{\n items = items.concat([as, hv, ms, ss]);\n}\n\nthis.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id})","RHyBLYT5oHf7EPnG":"let skills = this.actor.itemTypes.skill.filter(i => i.name.includes(game.i18n.localize(\"NAME.Melee\")))\n\nlet skill = await ItemDialog.create(skills, 1, \"Select the skill used by the weapon\")\nlet group = game.wfrp4e.utility.extractParenthesesText(skill[0]?.name)\nlet groupKey = warhammer.utility.findKey(group, game.wfrp4e.config.weaponGroups)\n\nlet weapon = {\n\tname : this.effect.name,\n\ttype : \"weapon\",\n\timg : this.effect.img,\n\tsystem : {\n\t\t\"damage.value\" : this.actor.system.characteristics.wp.bonus,\n\t\t\"weaponGroup.value\" : groupKey || \"basic\",\n\t\t\"twohanded.value\" : [\"polearm\", \"twohanded\"].includes(groupKey),\n\t\t\"reach.value\" : \"average\",\n\t\t\"qualities.value\" : [{name : \"magical\"}]\n\t},\n}\n\nItem.implementation.create(foundry.utils.expandObject(weapon), {parent : this.actor, fromEffect : this.effect.id})\nthis.script.notification(\"Item created. Further customization must be done manually within the Item's sheet\");","RI8crJxeD8JLDwMh":"return args.weapon?.system?.weaponGroup?.value != \"fencing\"","RJpglw5eVRM1f9t0":"args.wounds *= 5","RKIFGN583PQnqHGk":"if (args.opposedTest.result.hitloc.value == \"body\" && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 2)\n this.script.message(\"Gain de 2 états Hémorragique\")\n}","RNHrSTfMLXm5sXkC":"return [\"ws\", \"bs\", \"s\", \"ag\"].includes(args.characteristic)","RNr9CwyvLhlnwD2h":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Sail\"));","ROXCqAFSTLouJniL":"if (args.test.spell.name == \"Warp Lightning\")\n{\n if (args.test.result.minormis || args.test.result.majormis || args.test.result.catastrophicmis)\n {\n this.script.message(`${this.item.name} Overloads!`)\n }\n}","RPqgRUkiLY5thVbC":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Strength';\nconst difficulty = 'average';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n \n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","RQPe7k09QdAyws67":"return this.effect.name !== game.i18n.localize(\"WFRP4E.YenluiDark\")","RRK91ySi5SzYCRvy":"return args.weapon?.system.isProjectiles","RSsGiDFibuqg3sHr":"let diseaseIndex = game.packs\n.filter(i => i.metadata.type == \"Item\")\n.reduce((acc, pack) => acc.concat(pack.index.contents), [])\n.filter(i => i.type == \"disease\")\n.map(i => {\n\ti.id = i._id\n\treturn i\n})\n\nlet choice = await ItemDialog.create(diseaseIndex , 1, \"Choisir une maladie\")\n\nif (choice[0])\n{\n\tawait this.item.updateSource({\"system.specification.value\" : choice[0].name})\n}","RUpVgB0czqg95K1Q":"if (this.item.system.protects[args.opposedTest.result.hitloc.value])\n{\n args.weaponProperties.qualities.penetrating = false;\n}","RZlMkxJz5apn0mUj":"return args.item?.system.attackType != \"ranged\"","ReJpL0IVesKUbXgj":"args.fields.slBonus -= 8;","RgNdS87nO7RVawuw":"this.actor.removeCondition(\"fatigued\", 1);","RjcHrQ9inlFj9cUU":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nconst weapon = this.effect.sourceActor.items.find(i => i.equipped && i.system.tags.has(\"weapon\"));\nlet damage = weapon.Damage;\ndamage += excessSL;\nthis.actor.applyDamage(damage, {\n loc: \"roll\",\n weaponProperties: {qualities: {penetrating: true}},\n createMessage: this.script.getChatData(),\n});","RlVvlmhOfscaJqCd":"const deletes = this.actor.itemTags.armour.map(a => {\n return {_id: a._id}\n});\nconst armourTrait = this.actor.itemTags.trait.find(t => t.name === game.i18n.localize(\"NAME.TraitArmour\"));\n\nif (armourTrait)\n deletes.push({_id: armourTrait._id});\n\nthis.actor.deleteEmbeddedDocuments(\"Item\", deletes);","RlhOAKfN0ghrrooR":"let holed = this.actor.appliedEffects.filter(e => e.name.includes(\"Holed\"));\n\nfor (let effect of holed) {\n await effect.update({name: effect.name.replace(/\\d+/, rating => parseInt(rating) * 2)});\n}\n\nthis.script.notification(`Holed Ratings of ${this.actor.name} have been doubled.`);","Rmk3UwD0zz4HlTHR":"return args.item?.name === game.i18n.localize(\"NAME.Stealth\")","Rnpw6UQdJifLeuna":"this.effect.updateSource({\"system.transferData.type\" : \"crew\"})","RprZWlnopSqZt7KZ":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"));","RqWnhnwFxaHubgiA":"await args.actor.addCondition(\"blinded\");\nawait args.actor.addCondition(\"deafened\");\nawait args.actor.addCondition(\"stunned\");","Rr82rh79nCkKHcBD":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.IAWyzDfC286a9MPz\", this.effect)","RrchOMpEdIvceJxl":"return args.skill?.name == `${game.i18n.localize(\"NAME.Stealth\")} (${game.i18n.localize(\"SPEC.Rural\")})`","RsWXCcYHONf3ANlD":"this.actor.addCondition(\"stunned\", 1);\n","RuW1PWUFxIbbSlIm":"return ![\"t\", \"wp\", \"ag\", \"i\", \"int\"].includes(args.characteristic)","RvipIYj9H7n4UDMe":"let characteristics = {\n \"ws\" : -10,\n \"bs\" : -10,\n \"s\" : -5,\n \"t\" : -5,\n \"i\" : -10,\n \"ag\" : -10,\n \"dex\" : -10,\n \"int\" : 0,\n \"wp\" : 0,\n \"fel\" : 0\n}\nlet skills = []\nlet skillAdvancements = []\nlet talents = []\nlet trappings = []\nlet items = []\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let Compétence = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == Compétence && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(Compétence)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","RwMw848y13Jq2L4f":"let test = await this.actor.setupSkill(\"Résistance\", {fields : {difficulty : \"difficult\"}, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nif (test.failed)\n{\n\tawait this.actor.addCondition(\"blinded\");\n}\n\nlet msg = ``\nlet armour = args.actor.itemTags.armour.filter(i => i.system.isMetal && i.system.isEquipped);\nfor(let item of armour)\n{\n\tfor(let key in item.system.AP)\n\t{\n\t\tlet AP = item.system.AP[key]\n\t\tlet damage = Math.floor(AP / 2);\n\t\tawait item.system.damageItem(damage, [key]);\n\t}\n\tmsg += `

${item.name} PA divisé par deux

`\n}\nif (msg)\n{\n\tthis.script.message(msg, {speaker : {alias : args.actor.name}});\n}","RyQtuiRykUCQ6Xag":"if (!this.item.actor.name.includes(\"Brunner\")) return;\n\nargs.actor.addCondition(\"ablaze\");","S1QihXuvdEVzeRtB":"let dice = await new Roll(\"1d10\").roll()\nlet roll = dice.total\nlet talent \nlet message\nlet modifier = 0\n\nif (roll <= 3)\n{\n item = await fromUuid(\"Compendium.wfrp4e-core.items.mNoCuaVbFBflfO6X\")\n}\n\nelse if (roll <= 6)\n{\n item = await fromUuid(\"Compendium.wfrp4e-core.items.OEjUvJKi0xmBwbS2\")\n modifier = -3\n}\n\nelse if (roll <= 9)\n{\n item = await fromUuid(\"Compendium.wfrp4e-core.items.mdPGZsn2396dEpOf\")\n modifier = -3\n}\n\nelse if (roll = 10)\n{\n item = await fromUuid(\"Compendium.wfrp4e-core.items.qdMbxW09FUoYBzmB\")\n modifier = -5\n}\n\nmessage = `${roll} Rolled, gain ${item.name}, ${modifier} Strength`\ndice.toMessage(this.script.getChatData())\n\nlet changes = foundry.utils.duplicate(this.effect.changes)\nchanges[0].value = modifier\n\nthis.effect.updateSource({changes})\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], {fromEffect : this.effect.id})\n\nthis.script.notification(message)","S1SQe0Do7ZcuNV5j":"if (![\"roll\", \"none\"].includes(args.fields.hitLocation))\n{\n args.fields.modifier += 20;\n}","S3DCTw4yJ85eSaKp":"this.actor.setupCharacteristic(\"s\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(test => test.roll())","S3Dev4hleOYqDNe9":"if (args.test.options.healWounds) {\n if (args.test.succeeded)\n {\n let wounds = this.actor.characteristics.int.bonus + Number(args.test.result.SL)\n if (args.test.options.fieldDressing && args.test.result.reversed)\n {\n wounds = this.actor.characteristics.int.bonus + Math.min(1, Number(args.test.result.SL))\n }\n\targs.test.result.woundsHealed = wounds\n\targs.test.result.other.push(`${this.actor.name} guéri ${wounds} Blessures du patient.`)\n }\n else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0)\n {\n args.test.result.other.push(`Le patient contracte une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`)\n }\n}","S4793DLFhjMxpM8x":"return ![\"ws\", \"bs\"].includes(args.characteristic) && !args.item?.system.attackType && !args.context.dodge","S6tUyFJvGMV19mvP":"this.actor.status.addArmour(2, {source: this.effect})","S95QqpX1cZyIVCPy":"if (parseInt(this.item.system.specification.value) > 0)\n{\n\tthis.actor.system.status.ward.value = parseInt(this.item.system.specification.value);\n}\n\n","SGr50Hq1AHIEzIFN":"let choice = await ItemDialog.create(ItemDialog.objectToArray({\n int : game.wfrp4e.config.characteristics.int,\n fel : game.wfrp4e.config.characteristics.fel\n}, this.effect.img), 1, \"Choisir une caractéristique\");\n\nthis.effect.updateSource({\"flags.wfrp4e.characteristic\" : choice[0].id})","SK8paBvnvc5YLFI1":"if (args.test.options.doombolt && !args.test.options.doomboltRolled)\n{\n\targs.test.options.doomboltRolled = true;\n\n\tlet test = await this.actor.setupSkill(`${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`, {fields : {difficulty : \"hard\"}, context : {failure : \"@Table[majormis]{Major Miscast}\"}});\n\tawait test.roll();\n\n\tif (test.succeeded)\n\t{\n\t\targs.test.preData.additionalDamage = 4;\n\t}\n}","SKn61f2ykhzuwMdw":"if ((args.test.result.roll % 11 == 0 || args.test.result.roll == 100) && args.test.failed)\n{\n delete args.test.result.misfire;\n args.test.result.tables.misfire = {\n label : \"Raté\",\n class : \"fumble-roll\",\n modifier : 0,\n key : \"artillery-misfires\"\n }\n}","SLy1Fs3oXcHgFgjK":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nlet data = item.toObject();\nlet value = foundry.utils.getProperty(this.effect.sourceTest, \"result.overcast.usage.other.current\") || 1\ndata.system.specification.value = value\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","SNjG7IvgQzvCGczR":"if (this.actor.system.details.experience.current < 100) {\n return this.script.notification(game.i18n.localize(\"SCRIPT.NotEnoughXP\"))\n}\n\nlet item = await game.wfrp4e.utility.findItem(\"Messenger\", \"trait\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item]);\nlet expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);\nexpLog.push({amount : 100, reason: item.name, spent: this.actor.details.experience.spent + 100, total: this.actor.details.experience.total, type: \"spent\"});\nthis.actor.update({\n \"system.details.experience.spent\": this.actor.details.experience.spent + 100,\n \"system.details.experience.log\": expLog\n });","SO4Aa9argKbuO9rQ":"args.prefillModifiers.modifier -= 20","SPOkFWZWziZk5b7A":"return args.item?.system?.attackType != \"melee\"","SRmfstEs278bP9Pz":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.yRhhOlt18COq4e1q\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","SSqGxyN9hw0HDmED":"this.actor.addCondition(\"prone\");","SThruXFhxUdNKCG4":"const test = await this.actor.setupCharacteristic(\"int\", {fields: {difficulty: \"easy\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\n\nif (test.failed) {\n this.actor.addCondition('stunned');\n}\n\nthis.script.scriptNotification(`${this.actor.name} échou au test d'INT et reçoit un état Sonné!`);","SUfCkHdJg7rttdM1":"let amount = this.effect.sourceActor.system.characteristics.fel.bonus;\nargs.actor.addCondition(\"blinded\", amount);","SWIJjM2RCmzfr64u":"if (args.test.result.hitloc.result == \"head\" && args.test.result.critical)\n{\n args.test.result.critModifier = args.test.result.critModifier ? args.test.result.critModifier + 40 : 40\n\n args.test.result.critical += ` (+${args.test.result.critModifier})`\n}\n","SefcrhXsdYGFcCW6":"args.actor.system.details.move.value -= 3;\nargs.actor.system.details.man -= 2;\nargs.actor.system.status.carries.max *= 2;","SjDNjLBGsd9fYObo":"args.applyAP = false;","SlrslcNdnYONcSH3":"let weapon = this.actor.itemTags[\"weapon\"].find(i => i.system.isEquipped);\nif (!weapon)\n{\n this.script.notification(\"Aucune arme équipée!\", \"error\");\n return;\n}\n\nif (await this.actor.spend(\"system.status.fortune.value\", 1))\n{\n let test = await this.actor.setupWeapon(weapon, {appendTitle : ` - ${this.effect.name}`, whirlwind: true});\n test.roll();\n}\nelse\n{\n this.script.notification(\"Pas assez de Chance!\", \"error\");\n}","SlzPn7ONIKab9URj":"if (game.combat.combatant?.actor?.uuid == this.actor.uuid)\n{\n \nthis.script.message(await this.actor.applyBasicDamage(2, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))\n}","SrCHfOJFZwDickqa":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"average\"}});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}","SreM9Jyj2XZjoezH":"return args.item?.system?.attackType == \"ranged\"","Ssn21dxoMQiqD1y4":"return args.type == \"cast\" && args.item.lore.value == \"fire\"","StAderQaQQsxb6Rv":"let target = await game.wfrp4e.tables.rollTable(\"fixations\")\nif (target)\n{\n this.script.notification(target.result);\n let hatred = this.actor.items.find(i => i.getFlag(\"wfrp4e\", \"fromEffect\") == this.effect.id)\n if (hatred)\n {\n hatred.update({\"system.specification.value\" : target.result})\n }\n}","SvFKt9hMcFQjeILA":"args.actor.addCondition(\"entangled\", this.effect.sourceTest.result.overcast.usage.other.current)","SwliIjjjFtZMnJH3":"return !args.weapon?.system.properties.qualities.hack || args.weapon?.system?.isProjectiles","T0KBl8iEkcPq08RI":"if (args.applyAP && args.modifiers.ap.magical)\n{\n args.modifiers.ap.ignored += args.modifiers.ap.magical\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignore les PA magiques (\" + args.modifiers.ap.magical + \")\");\n}","T3RfSt3VMEat3iDD":"return args.skill?.name !== game.i18n.localize(\"NAME.Perception\");","T4JEEDYCEIUbVHv4":"let fatigued = this.actor.hasCondition(\"fatigued\")\n if (!fatigued)\n {\n this.actor.addCondition(\"fatigued\")\n ui.notifications.notify(\"Etat Extenué ajouté à \" + this.actor.name + \" qui est impossible à retirer tant que le symptôme de Malaise est présent.\")\n }","T5fiTzhXEQAv9Drf":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.rlDZZTj5PXjuRXa2\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key;\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n\nlet location = this.item.system.location.key;\n\nif (location)\n{\n let dropped = this.item.system.weaponsAtLocation;\n\n if (dropped.length)\n {\n this.script.notification(`Dropped ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}","T74FEjfFrh3f6MKv":"args.wpb = args.sb;","TAw9vXnfyIAl5DGs":"if (this.item.system.quantity.value)\n{\n CorruptionMessageModel.createCorruptionMessage(\"minor\", this.script.getChatData());\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","TBpNFRL5uehs0fze":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectData : [this.item.effects.contents[0]]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","TCgEBuMPPd5SLAsc":"args.fields.modifier -= 15","TCtXPvDpbfz1yrVZ":"let choice1 = [\n {\n type : \"skill\",\n name : \"Corps à corps (Base)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\nlet choice2 = [\n {\n type : \"skill\",\n name : \"Corps à corps (A deux mains)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\n\n let choice = await foundry.applications.api.DialogV2.wait({\n window : {title : \"Choix\"},\n content :\n `

\n Sélectionnez votre choix\n

\n
    \n
  1. Corps à corps (Base)
  2. \n
  3. Corps à corps (A deux mains)
  4. \n
\n `,\n buttons : [\n {\n action : \"basic\",\n label : \"Base\",\n callback : () => {\n return choice1\n }\n },\n {\n action : \"twoHanded\",\n label : \"A deux mains\",\n callback : () => {\n return choice2\n }\n }\n ]\n })\n\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n item = item.toObject()\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${c.name}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","TEiNj5FgkoD3YbhS":"this.actor.hasCondition(\"bleeding\")?.delete()","TGN070HeJLl3gSMY":"let test = await this.actor.setupCharacteristic(\"ag\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: \"Goes Prone\" }})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\");\n}","TIoUbjOtj7PTK2t8":"const test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"challenging\"},\n context: {\n failure: `Butcher perd des dents.`\n }\n});\n\nawait test.roll();\n\nif (test.failed) {\n const SL = Number(test.result.SL);\n this.script.message(`Butcher perd ${SL} dents.`);\n}","TKjBb75exjae87fa":"args.modifiers.other.push({label : this.effect.name, details : \"Augmentation des Dégâts\", value : 2})","TNWmIkuubqBn38he":"this.effect.deleteCreatedItems();","TOyQLrugFGzwc5nY":"return !(args.skill?.name.includes(game.i18n.localize(\"NAME.Melee\")) || args.item?.isMelee || args.context.corruption);","TQRL4mZhZohXg1Au":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\ntest.roll();","TSsHcn4EDulD03RU":"return !this.actor.hasCondition(\"fatigued\")","TU2xjbJ0zFtytF3J":"return args.skill?.name == game.i18n.localize(\"NAME.CharmAnimal\");","TXBg7zWxPfWxFmUB":"if (args.type == \"effect\" && args.options.action == \"create\" && [\"ablaze\"].some(i => args.document.statuses.has(i)))\n{\n this.script.notification(\"Immune to \" + args.document.name);\n return false;\n}","TXce477AiXHKbepk":"return args.type !== \"pray\" || args.item?.system?.type?.value !== \"miracle\" || args.item?.system?.god?.value?.toLowerCase() !== \"taal\";","TY0xSQ00XXyEr49r":"args.fields.slBonus += 1;","TcqumwUFAL6V0cty":"if (this.item.getFlag(\"wfrp4e\", \"failedCool\"))\n{\n this.item.system.AP = {\n \"head\": 0,\n \"lArm\": 0,\n \"rArm\": 0,\n \"lLeg\": 0,\n \"rLeg\": 0,\n \"body\": 0\n }\n}","Td8M5K1P92GbM2IA":"if (!args.messageSent)\n{ \n args.messageSent = true;\n let runes = this.actor.effects.contents.filter(i => i.name == this.effect.name);\n this.script.message(`${args.attacker.speaker.alias} reduce Run speed by ${runes.length * 4} yds.`)\n}","TdjlJro0RRVSh8g8":"return args.skill?.name != game.i18n.localize(\"NAME.Gamble\") && args.skill?.name != game.i18n.localize(\"NAME.SleightOfHand\");","TmaS8o33825QUMrx":"let stomp = game.wfrp4e.config.systemItems.stomp;\nlet test = await this.actor.setupTrait(stomp)\nawait test.roll();","TnFobCxG4pxlYmKr":"let gorCharacteristics = {\n \"ws\": 45,\n \"bs\": 30,\n \"s\": 35,\n \"t\": 45,\n \"i\": 30,\n \"ag\": 35,\n \"dex\": 25,\n \"int\": 25,\n \"wp\": 30,\n \"fel\": 25\n}\nfor (let char in this.actor.characteristics) {\n if (this.actor.characteristics[char].initial < gorCharacteristics[char])\n this.actor.characteristics[char].initial = gorCharacteristics[char]\n}","ToKlHDAjJOsC51ag":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.GlShFJF2TpsNh1FX\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n \nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}});\nawait test.roll();\nif (test.failed)\n{\n args.actor.addCondition(\"unconscious\")\n}","TpZItJ5Ugbazaobd":"let locations = [];\n\nwhile (locations.length < 2)\n{\n let loc = await game.wfrp4e.tables.rollTable(\"hitloc\", {hideDSN : true})\n if (!locations.includes(loc.result))\n {\n locations.push(loc.result);\n }\n}\n\nlocationText = locations.map(i => game.wfrp4e.config.locations[i]).join(\", \")\n\nthis.item.updateSource({name : this.item.name += ` (${locationText})`, \"flags.wfrp4e.locations\" : locations})\nthis.effect.updateSource({\"flags.wfrp4e.locations\" : locations})","TpgK2aAe93ui3Rbs":"if (args.test.isFumble && args.test.options.supercharge) {\n args.test.result.tables.misfire = {\n label : \"Raté (Surchargé)\",\n class : \"fumble-roll\",\n modifier : 0,\n key : \"artillery-misfires\"\n } \n}","Tq45Nd8J3eTvHT41":"return args.skill?.name != game.i18n.localize(\"NAME.Perception\") && args.skill?.name != game.i18n.localize(\"NAME.SetTrap\");","TrIYdcG3jDER4WgY":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.xsGbDFqK2qh7lsIj\")\nlet data = item.toObject();\ndata.system.specification.value = game.i18n.localize(\"Minor\");\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","TwgdEucxcHloc4cX":"let choice1 = [\n {\n type : \"armour\",\n name : \"Chausses de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Cotte de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Coiffe de Mailles\"\n },\n]\nlet choice2 = [\n {\n type : \"armour\",\n name : \"Chausses de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Cotte de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Coiffe de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Jambières de cuir\"\n },\n {\n type : \"armour\",\n name : \"Calotte de cuir\"\n },\n {\n type : \"armour\",\n name : \"Veste de cuir\"\n },\n]\nlet choice3 = [\n {\n type : \"armour\",\n name : \"Plastron d'acier\"\n },\n {\n type : \"armour\",\n name : \"Brassards\"\n },\n {\n type : \"armour\",\n name : \"Heaume\"\n },\n {\n type : \"armour\",\n name : \"Jambières d'acier\"\n },\n]\n\n\nlet choice = await foundry.applications.api.DialogV2.wait({\n window : {title : \"Choix\"},\n content :\n `

\n Sélectionnez votre choix\n

\n
    \n
  1. Mailles
  2. \n
  3. Mailles et Cuir
  4. \n
  5. Plaques
  6. \n
\n `,\n buttons : [\n {\n action : 1,\n label : \"Mailles\",\n callback : () => {\n return choice1\n }\n },\n {\n action : 2,\n label : \"Mailles et Cuir\",\n callback : () => {\n return choice2\n }\n },\n {\n action : 3,\n label : \"Plaques\",\n callback : () => {\n return choice3\n }\n }\n ]\n})\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n let equip = item.system.tags.has(\"equippable\");\n item = item.toObject()\n if (equip)\n {\n item.system.equipped.value = true;\n }\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${c.name}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","TwwKxFjK6TNGKbRB":"this.script.message(await this.actor.applyBasicDamage(12, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}))\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty: \"hard\"}})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addSystemEffect(\"cold1\")\n}\n\n","TxfmxDGBj04AQQpt":"let weapon = args.opposedTest.defenderTest.weapon\nif (\n !args.opposedTest.result.swapped && \n args.opposedTest.result.winner == \"defender\" && \n args.opposedTest.attackerTest.result.damage && \n weapon && \n weapon?.system.properties.qualities.fast\n )\n{\n await args.opposedTest.swap(this.effect.name);\n}","TzgmYRXFXRspIo1i":"this.effect.delete();","U1RUcgP8LD2qeGTm":"return !args.context.reload","U1UpSRJOSjPpO4HS":"let mutations = await warhammer.utility.findAllItems(\"mutation\", \"Loading Mutations\", true)\n\nlet roll = Math.floor(CONFIG.Dice.randomUniform() * mutations.length);\n\nthis.actor.createEmbeddedDocuments(\"Item\", [(await fromUuid(mutations[roll].uuid)).toObject()]);\nthis.script.notification(`Added ${mutations[roll].name}`)","U26XMie3Kjoddisj":"let stunned = this.actor.hasCondition(\"stunned\")\nif (stunned)\n{\n this.script.notification(`Suppression d'1 état 1 Sonné`)\n this.actor.removeCondition(\"stunned\");\n}\nelse\n{\n\tthis.script.notification(`Aucune état Sonné à supprimer`)\n}","U2xKn7R1gm8kiQm8":"this.actor.hasCondition(\"broken\")?.delete();\n\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.8pVzgPkgWpTJvfhG\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","U4A8FDNmwBGTuQZO":"if (args.attacker.has(game.i18n.localize(\"NAME.Undead\")) && !args.attacker.has(game.i18n.localize(\"NAME.Ethereal\")))\n{\n args.totalWoundLoss = Math.floor(args.totalWoundLoss / 2)\n args.modifiers.other.push({label : this.effect.name, details : game.i18n.localize(\"Halved\"), value : \"× 0.5\"})\n}","U5ndCwcJ1s3Ns26w":"args.item.system.qualities.value.push({name : \"magical\"});\nargs.item.system.damage.value += ` + ${parseInt(this.effect.sourceTest.result.SL)}`;\nargs.item.name += ` (${this.effect.name})`","U78c4oUjKwyUu6jT":"return (args.skill?.name != game.i18n.localize(\"NAME.Perception\") && args.characteristic != \"fel\")","U7lRf56BFaTfsC6B":"const type = await ValueDialog.create({\n title: game.i18n.localize(\"SCRIPT.FellstaveDialogTitle\"),\n text: game.i18n.localize(\"SCRIPT.FellstaveDialogText\")\n}, \"\");\n\nawait this.effect.item.update({name: `${this.effect.item.name} (${type})`});\nconst updates = this.effect.item.effects.map(e => {\n return {_id: e.id, name: e.name + ` (${type})`}\n});\nthis.effect.item.updateEmbeddedDocuments(\"ActiveEffect\", updates);","U9xh2wriSqCosugW":"if (args.test.options.stag)\n{\n\tif (parseInt(args.test.result.SL) < 0 || args.test.failed)\n\t{\n\t\tif (parseInt(args.test.result.SL) < 0)\n\t\t{\n\t\t\targs.test.result.SL = \"+0\";\n\t\t\targs.test.result.description = game.i18n.localize(\"ROLL.MarginalSuccess\");\n\t\t}\n\t\targs.test.result.outcome = \"success\"\n args.test.result.other.push(`${this.effect.name}: Minimum +0 SL`)\n\t}\n}","UC6G3pFQwzUhrw6F":"return args.skill?.name != game.i18n.localize(\"NAME.CharmAnimal\");","UDPsaymtZf39UsMk":"\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (!fatigued)\n {\n this.actor.addCondition(\"fatigued\")\n ui.notifications.notify(\"Etat Extenué ajouté à \" + this.actor.name + \" ce qui est impossible à retirer tant que le symptôme de Malaise est présent.\")\n }","UH5MIzqi2MvEqTwj":"if (args.totalWoundLoss > 0)\n{\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n roll.toMessage(this.script.getChatData());\n args.totalWoundLoss += roll.total;\n args.modifiers.other.push({label : this.effect.name, value : roll.total})\n}","ULmZMLezDamerN04":"let spells = await warhammer.utility.findAllItems(\"spell\", \"Loading Spells\", true, [\"system.lore.value\"])\n\nlet lore = (await game.wfrp4e.tables.rollTable(\"random-caster\", {hideDSN: true})).text\nthis.script.notification(lore)\nif (lore == \"GM's Choice\") {\n return\n}\n\nelse if (lore == \"Magie des Arcanes (Domaine)\") {\n lore = \"Arcane\"\n}\n\nelse if (lore == \"Magie Mineure\") {\n lore = \"petty\"\n}\n\nelse {\n lore = lore.toLowerCase();\n}\n\nlet spellsWithLore = []\nif (lore == \"Arcane\") {\n spellsWithLore = spells.filter(i => !i.system.lore.value)\n}\nelse {\n spellsWithLore = spells.filter(i => i.system.lore.value == lore)\n}\n\nlet selectedSpell = spellsWithLore[Math.floor(CONFIG.Dice.randomUniform() * spellsWithLore.length)]\nItem.implementation.create(selectedSpell.toObject(), { parent: this.actor}).then(item => {\n this.actor.setupCast(item).then(test => test.roll());\n})","UQtXuQmUlTyDKqhe":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 20,\n \"s\" : 0,\n \"t\" : 10,\n \"i\" : 15,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 40,\n \"wp\" : 45,\n \"fel\" : 10\n}\nlet skills = [\"Focalisation\", \"Calme\", \"Intimidation\", \"Langue (Magick)\", \"Language (Nehekharan)\", \"Savoir (Magie)\", \"Perception\"]\nlet skillAdvancements = [10, 20, 15, 15, 10, 10, 10]\nlet talents = [\"Magie des Arcanes (Domaine)\", \"Dur à cuire\", \"Menaçant\", \"Magie Mineure\", \"Lire/Écrire\", \"Seconde Vue\"]\nlet trappings = [\"Arme simple\"]\nlet specialItems = [ \n {name: \"Mouldering Robes\", type: \"trapping\", trappingType: \"clothingAccessories\" }, \n {name: \"Pouches containing ritual components\", type: \"trapping\", trappingType: \"clothingAccessories\" }, \n {name: \"Staff\", type: \"weapon\", damage: \"SB+2\"}, \n {name: \"Magie Noire (Nécromancie)\", type: \"talent\"},\n] \nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWfrp4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else \n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else \n {\n ui.notifications.warn(`Could not find ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings) \n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else \n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nlet filters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"petty\"\n }\n]\n\nlet petty = (await ItemDialog.createFromFilters(filters, 3, {text: \"Choisissez 3 Sorts Mineurs\"})).map(i => i.toObject());\n\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"\"\n }\n]\n\nlet arcane = (await ItemDialog.createFromFilters(filters, 2, {text : \"Choisissez 2 Sorts d'Arcane\"})).map(i => i.toObject());\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"name\",\n value: /^((?!\\().)*$/gm, // Remove tout spells with parentheses (tout arcane spells spells)\n regex: true\n },\n {\n property : \"system.lore.value\",\n value : \"necromancy\"\n }\n]\n\nlet necromancy = (await ItemDialog.createFromFilters(filters, 1, {text : \"Choisissez 1 Sort de Nécromancie\"})).map(i => i.toObject());\n\narcane.forEach(i => {\n i.img = \"modules/wfrp4e-core/icons/spells/necromancy.png\";\n i.system.lore.value = \"necromancy\";\n})\nlet spells = [...petty, ...necromancy, ...arcane];\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items.concat(spells));\n","UTlgF4azrGQZsoDv":"const talents = await Promise.all([game.i18n.localize(\"NAME.Ambi\"), game.i18n.localize(\"NAME.Distract\")].map(game.wfrp4e.utility.findTalent))\nthis.actor.createEmbeddedDocuments(\"Item\", talents, {fromEffect : this.effect.id})","UUHQRPRrrRSr9MIA":"const venomFlag = this.effect.getFlag(\"wfrp4e-tribes\", \"venom\");\n\nif (venomFlag) {\n this.actor.updateEmbeddedDocuments(\"Item\", [venomFlag]);\n}","UWrzokgabRKUpnkG":"return [\"t\", \"wp\", \"ag\", \"i\", \"int\"].includes(args.characteristic)","UXdlnmwVgjc1QpF2":"args.actor.system.details.move.value += 1;\nargs.actor.system.status.carries.max = Math.floor(args.actor.system.status.carries.max * 0.75);","UYLXm2W6jVn21Age":"args.fields.modifier += 40;","UaImulhbPURkLJg2":"return this.actor.attacker && (args.skill?.name == `${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Basic\")})` || (args.type == \"weapon\" && args.item?.system.weaponGroup.value == \"basic\"))","UfkysrAftCs09Fct":"return args.skill.name !== game.i18n.localize(\"NAME.Gamble\")","UgQW0UMPOZ0jwfVJ":"let current = this.actor.status.fortune.value\n\nthis.actor.update({\"system.status.fortune.value\" : 1 + current})\n\nthis.script.message(`${this.actor.prototypeToken.name} fortune points increased from ${current} to ${1 + current}`)","UlRSaZG4ZUU6fMND":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'challenging';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n \n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","UlygtNPSDlWPIFCI":"args.fields.slBonus++;\n","Um6xMMiUftLXJxEt":"return [\"fel\", \"dex\"].includes(args.characteristic)","UnqnWi0dZYLf5fTT":"let choice1 = [\n {\n type : \"armour\",\n name : \"Chausses de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Cotte de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Coiffe de Mailles\"\n },\n]\nlet choice2 = [\n {\n type : \"armour\",\n name : \"Chausses de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Cotte de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Coiffe de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Jambières de cuir\"\n },\n {\n type : \"armour\",\n name : \"Calotte de cuir\"\n },\n {\n type : \"armour\",\n name : \"Veste de cuir\"\n },\n]\nlet choice3 = [\n {\n type : \"armour\",\n name : \"Plastron d'acier\"\n },\n {\n type : \"armour\",\n name : \"Brassards\"\n },\n {\n type : \"armour\",\n name : \"Heaume\"\n },\n {\n type : \"armour\",\n name : \"Jambières d'acier\"\n },\n]\n\nlet choice = await foundry.applications.api.DialogV2.wait({\n window : {title : \"Choix\"},\n content :\n `

\n Sélectionnez votre choix\n

\n
    \n
  1. Mailles
  2. \n
  3. Mailles et Cuir
  4. \n
  5. Plaques
  6. \n
\n `,\n buttons : [\n {\n action : 1,\n label : \"Mailles\",\n callback : () => {\n return choice1\n }\n },\n {\n action : 2,\n label : \"Mailles et Cuir\",\n callback : () => {\n return choice2\n }\n },\n {\n action : 3,\n label : \"Plaques\",\n callback : () => {\n return choice3\n }\n }\n ]\n})\n\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n let equip = item.system.tags.has(\"equippable\");\n item = item.toObject()\n if (equip)\n {\n item.system.equipped.value = true;\n }\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${c.name}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","UsAHQecRlWL5PhP6":"this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty : \"average\"}}).then(async test =>\n{\n await test.roll()\n if (test.failed)\n {\n this.actor.corruptionDialog(\"moderate\") \n }\n})","UsuwsmU1TUQLQVM2":"let lore = this.effect.name.split(\"(\")[1].split(\")\")[0].toLowerCase();\nreturn !args.spell || (args.type == \"cast\" && [\"petty\", lore].includes(args.spell.system.lore.value));","UtqUthabeQ4rHDLQ":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.tNWrJUOArwfWXsPw\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id});","Uvk1X7sEhvv77YkD":"if (!args.flags.distractingApplied)\n{\n args.fields.modifier -= 20;\n args.flags.distractingApplied = true;\n}","UvycHOjSPm5Zv9KJ":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nlet baseDamage = \"4\";\nif (test.succeeded)\n baseDamage = \"0\";\n \nlet damage = this.effect.sourceItem.system.computeSpellDamage(baseDamage, true) + parseInt(this.effect.sourceTest.result.SL);\n\nthis.script.message(await this.actor.applyBasicDamage(damage, {suppressMsg : true}))\nthis.actor.addCondition(\"ablaze\")","UwjkHRAQHESdYXJs":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 2,\n \"bright\": 1,\n \"alpha\": 0.5,\n \"animation\": {\n \"speed\": 4,\n \"intensity\": 4,\n \"type\": \"pulse\",\n },\n \"color\": \"#949bff\",\n}}));","Ux4buMc7llF1Kg8p":"if (!this.actor.hasCondition(\"stunned\") && !this.actor.hasCondition(\"unconcscious\"))\n{\n this.effect.delete();\n}","Ux7L2VL2fYfITST6":"if (args.test.isCriticalFumble && args.test.context.dispel)\n{\n\tif (parseInt(args.test.result.SL) > 0 || args.test.succeeded)\n\t{\n\t\tif (parseInt(args.test.result.SL) > 0)\n\t\t{\n\t\t\targs.test.result.SL = \"-0\";\n\t\t\targs.test.result.description = game.i18n.localize(\"ROLL.MarginalFailure\");\n\t\t}\n\t\targs.test.result.outcome = \"failure\"\n args.test.result.other.push(`${this.effect.name}: Automatic Failure`)\n\t}\n\n}","UxVfVoH7cbC9ESDr":"const test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"challenging\"},\n context: {\n failure: `Gain d'1 état @Condition[Stunned].`\n }\n});\n\nawait test.roll();\n\nif (test.failed)\n args.actor.addCondition(\"stunned\");","V0b4yLTawjCnm9ke":"if (args.opposedTest.attackerTest.result.critical\n || (args.totalWoundLoss > 0 && args.totalWoundLoss > args.actor.system.status.wounds.value))\n{\n await args.actor.corruptionDialog(\"minor\")\n}","V1D2Uo3WDKYQePU3":"let damage = this.effect.sourceTest.result.damage;\n \nlet loc = \"head\"\nlet APatLoc = this.actor.system.status.armour[loc];\n\nlet metalAP = APatLoc.layers.reduce((metal, layer) => metal += (layer.metal ? layer.value : 0), 0)\n\nlet APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at location;\n\ndamage -= (APused + this.actor.system.characteristics.t.bonus)\n\nlet msg = await this.actor.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\nmsg += ` (Ignore ${metalAP} PA de métal sur ${game.wfrp4e.config.locations[loc]})`\nthis.script.message(msg)\n","V2lsVTi6q28eL5jl":"args.fields.slBonus += parseInt(this.effect.sourceTest.result.SL)","V4PcjtHde941wv6J":"await this.actor.addCondition(\"prone\");\nconst SL = this.effect.sourceTest.result.slOver;\nconst stunned = 1 + SL;\nawait this.actor.addCondition(\"stunned\", stunned);\n\nif (stunned > this.actor.system.characteristics.t.bonus) {\n const crit = ` Critique`;\n\n const Test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {\n skipTargets: true,\n appendTitle: ` - ${this.effect.name}`,\n fields: {difficulty: \"average\"},\n context: {failure: `Encaisse ${crit} à la tête.`}\n })\n\n await test.roll();\n}","V7qmFwUMCY2tfziH":"this.actor.addCondition(\"stunned\")","V9wD9FWHWxZUOGSI":"let roll = await (new Roll(`max(0, 1d10 - ${this.actor.characteristics.wp.bonus})`).roll())\nlet fatigued = roll.total\nroll.toMessage(this.script.getChatData());\nif (fatigued > this.actor.characteristics.wp.bonus)\n{\n this.actor.addCondition(\"unconscious\")\n this.script.notification(`Tombe inconscient\" `)\n}\nelse\n{\n fatigued = Math.max(0, fatigued)\n if (fatigued)\n this.actor.addCondition(\"fatigued\", fatigued)\n this.script.notification(`Reçoit ${fatigued} états Extenué`)\n}","V9xm4X1x3lPYTQaI":"if (args.extendedTest?.getFlag(\"wfrp4e\", \"fear\"))\n{\n\tthis.script.notification(\"Immunisté à la Peur\");\n\targs.extendedTest.delete();\n\targs.abort = true;\n}","V9zm2hKUVLVZtAcN":"let characteristics = {\n \"ws\" : -10,\n \"bs\" : -10,\n \"s\" : 0,\n \"t\" : 15,\n \"i\" : 15,\n \"ag\" : -20,\n \"dex\" : 0,\n \"int\" : 20,\n \"wp\" : 10,\n \"fel\" : 10\n}\nlet skills = [\"Charme\", \"Focalisation\", \"Entertain (Prophecy)\", \"Intuition\"]\nlet skillAdvancements = [0, 0, 20, 10]\nlet talents = [\"Détection d’artefact\", \"Menaçant\", \"Sixième Sens\"]\nlet traits = [\"Condamné\", \"Spellcaster (Lore of Life)\", \"Protection\"]\nlet trappings = []\nlet items = [];\nlet spells = [\"Forêt d'épines\"];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let Compétence = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == Compétence && i.type == \"Compétence\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else \n {\n skillItem = await game.wfrp4e.utility.findSkill(Compétence)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else \n {\n ui.notifications.warn(`Could not find ${talent}`, {permanent : true})\n }\n}\n\nconst traitRegex = /(?:,?(.+?)(\\+?\\d{1,2}\\+?)?\\s*?(?:\\((.+?)\\)\\s*(\\+?\\d{1,2})?|,|$))/gm\nfor (let trait of traits)\n{\n let traitMatches = trait.matchAll(traitRegex).next().value\n let traitName = traitMatches[1]\n let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there'}`).trim()\n }\n else\n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells)\n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name +='Arme','Cornes','Tail','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;\n traitItem.name = (traitItem.name + ` ${traitSpec ? \"(\"+ traitSpec + \")\" : \"\"}`).trim()\n }\n else\n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells)\n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","VAPsww9x3HAw1sKP":"return !args.context.dodge","VAs1nXvicdQK18Do":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Language\"));","VCnNWmRBH28Rx0JH":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"))","VGuZMIR1lE8I1F1y":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"difficult\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed) {\n this.actor.addCondition(\"stunned\");\n}","VINX6TBAJQznhVcN":"const repaired_message = `

Le remplacement de ${this.item.name} par un équipement de fortune est terminé.

`;\nconst Test = 'Test de l\\'équipe de maintenance';\nconst difficulty = 'difficile';\nconst target = 80;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","VJe23auRmrmZxdKM":"this.item.system.qualities.value.push({name: \"magical\"})\n\nthis.item.system.damage.value += \" + 1\"","VKpKq4RSbI1KkUQK":"this.actor.flags.useless[this.effect.getFlag(\"wfrp4e\", \"location\")] = true;","VLdF2HPnCrNIgp7a":"let items = [];\n\nlet etiquette = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP\")).toObject();\netiquette.name += \" (Followers of Khorne)\";\n\nitems.push(etiquette);\n\nlet animosity = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f\")).toObject();\n animosity.system.specification.value = \"Followers of Slaanesh\";\n\nitems.push(animosity);\n\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect : this.effect.id});\n","VNOKTzCrFbZ6PJUj":"return ![game.i18n.localize(\"NAME.CharmAnimal\"), game.i18n.localize(\"NAME.Endurance\"), game.i18n.localize(\"NAME.OutdoorSurvival\")].includes(args.skill?.name)","VOc9sKag2Vy4vGGZ":"let specifier = this.item.specifier;\nlet rune;\nlet categories = [];\nif (specifier && specifier.toLowerCase() != \"toutes formes\")\n{\n if (specifier.includes(\"Talisman\"))\n {\n categories.push(\"talisman\");\n }\n if (specifier.includes(\"Protection\"))\n {\n categories.push(\"protection\");\n }\n if (specifier.includes(\"Arme\"))\n {\n categories.push(\"weapon\");\n }\n if (specifier.includes(\"Armure\"))\n {\n categories.push(\"armour\");\n }\n if (specifier.includes(\"Engineering\"))\n {\n categories.push(\"engineering\");\n }\n\n if (categories.length)\n {\n let runes = await warhammer.utility.findAllItems(\"wfrp4e-dwarfs.rune\", null, true, [\"system.category\", \"system.master\"]);\n let choices = runes.filter(i => categories.includes(i.system.category) && i.system.master);\n\n if (choices.length)\n {\n rune = (await ItemDialog.create(choices, 1, {title : this.effect.name, text : specifier, indexed: true}))[0]\n } \n else \n {\n rune = await DragDialog.create({text : `Provide Master Rune to learn (${specifier})`, title : this.effect.name, filter: (item) => item.type == \"wfrp4e-dwarfs.rune\" && item.system.master, onError: \"Doit fournir une Rune Maîtresse\"});\n }\n }\n else \n {\n rune = await DragDialog.create({text : `Provide Master Rune to learn (${specifier})`, title : this.effect.name, filter: (item) => item.type == \"wfrp4e-dwarfs.rune\" && item.system.master, onError: \"Doit fournir une Rune Maîtresse\"});\n }\n}\nelse \n{\n rune = await DragDialog.create({text : `Provide Master Rune to learn`, title : this.effect.name, filter: (item) => item.type == \"wfrp4e-dwarfs.rune\" && item.system.master, onError: \"Doit fournir une Rune Maîtresse\"});\n}\n\nthis.actor.addEffectItems(rune.uuid, this.effect)\n\nlet talents = this.actor.itemTags.talent.filter(i => i.baseName == this.item.baseName);\nlet xpCost = talents.length * 100\n\nif (this.actor.type == \"character\" && (await foundry.applications.api.DialogV2.confirm({window: {title: this.effect.name}, content: `

Spend ${xpCost} XP for learning ${this.item.name}?

`})))\n{\n this.actor.update({\"system.details.experience.log\" : this.actor.system.addToExpLog(xpCost, this.item.name, this.actor.system.details.experience.spent + xpCost)})\n}","VQaC6ynouW5EQCbC":"let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n\nawait roll.toMessage(this.script.getChatData());\n\nthis.script.message(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}));\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name});\nawait test.roll();\n\nif (test.succeeded)\n{\n return false;\n}","VRDS4lkwSAzbtvm4":"if (args.totalWoundLoss > this.actor.system.status.wounds.value || args.opposedTest?.attackerTest.result.critical)\n{\n args.extraMessages.push(`${this.effect.name}: Can reverse Critical Wound roll`)\n}","VTS4RzbmReI87K9a":"args.fields.slBonus = Math.floor(this.item.system.total.value * 0.1);","VTzpExK3QSCaFQPf":"if (args.equipped) \n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.SfUUdOGjdYpr3KSR\")\n let regen = item.toObject();\n item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.kJNAY1YRaCy9IgmT\");\n let terror = item.toObject();\n terror.system.specification.value = 2;\n this.actor.createEmbeddedDocuments(\"Item\", [regen, terror], {fromEffect : this.effect.id});\n} \nelse \n{\n this.effect.deleteCreatedItems();\n}","VXERNoc5IazQGuGO":"if (args.applyAP && args.modifiers.ap.metal)\n{\n args.modifiers.ap.ignored += args.modifiers.ap.metal\n args.modifiers.other.push({value : args.modifiers.ap.metal, label : this.effect.name, details : \"Ajouter PA de métal aux Dégâts\" })\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignorer Métal (\" + args.modifiers.ap.metal + \")\");\n args.modifiers.ap.metal = 0\n}","Vb7rgl8T4VRswbnZ":"this.actor.status.addArmour(parseInt(this.item.system.specification.value) || 0, {source: this.effect, damage : this.item.getFlag(\"wfrp4e\", \"APdamage\")})","VbI0Al6rJfypV3qY":"const failure = game.i18n.localize(\"ROLL.ImpressiveFailure\");\nconst success = game.i18n.localize(\"ROLL.AstoundingSuccess\");\n\nargs.test.result.description = args.test.succeeded ? success : failure;","VbL0TgaBAmYjrezZ":"const talents = await Promise.all([game.i18n.localize(\"NAME.Hardy\")].map(game.wfrp4e.utility.findTalent))\nthis.actor.createEmbeddedDocuments(\"Item\", talents, {fromEffect : this.effect.id})","VcE8Hie2jbpuyuM3":"const vomit = this.actor.itemTags.trait.find(t => t.name === \"Vomissement\");\nconst name = \"Bileful rollTest\";\n\nif (!vomit) return;\n\nconst effect = vomit.effects.find(e => e.name === \"Vomissement\");\nconst scriptData = effect.system.scriptData;\n\n// REMINDER\n\nscriptData.push({\n label: 'Rappel des règles du sort',\n trigger: 'rollTest',\n script: `\n args.test.result.other.push(\"This rollTest attack follows the rules for the Lore of Nurgle spell @UUID[Compendium.wfrp4e-core.items.Item.XhyZ140R1iA1J7wZ].\");\n `\n});\n\n// /REMINDER\n\n// update Effect's name\nawait effet.update({\n name,\n \"system.scriptData\": scriptData\n});\n\n\n// update Trait's name\nawait vomit.update({name});\n\n// copy effect from Stream of Corruption spell\nconst effectData = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.XhyZ140R1iA1J7wZ.ActiveEffect.KAXAHr5NdusLTz6k\")).toObject();\n\nawait vomit.createEmbeddedDocuments(\"ActiveEffect\", [effectData]);","Vkuu70BZV4DPYO2Q":"return args.item?.system?.attackType != \"ranged\"","VlFUDaKUYoBYKYn0":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure: \"1 Corruption Point Gained\"}})\nawait test.roll();\nif (test.failed && this.actor.type == \"character\")\n{\n this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + 1})\n this.script.message(\"Gained a Corruption point\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","VlHuDIAvPr8JM1P5":"return args.skill?.name !== game.i18n.localize(\"NAME.Row\");","VneW4jhf2nXdMpuV":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nconst weapon = this.effect.sourceActor.items.find(i => i.equipped && i.system.tags.has(\"weapon\"));\nlet damage = weapon?.Damage + 4;\ndamage += excessSL;\nthis.actor.applyDamage(damage, {\n loc: \"roll\",\n createMessage: this.script.getChatData(),\n});","Vns6WrafVq8NjX7t":"return args.skill?.name != game.i18n.localize(\"NAME.Heal\")","VqTrKPtxv9hpn0Hr":"return args.skill?.name != `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`","VtCzyfSnO1im0dgX":"args.actor.system.status.carries.max = Math.floor(args.actor.system.status.carries.max * 1.25);","VuE1mhrB6X6MYTzg":"return args.characteristic == \"fel\"","VurA2XNqC0d9U49C":"this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test =>\n{\n await test.roll()\n if (test.failed)\n {\n this.actor.addCondition(\"fatigued\") \n }\n})","VzO0ZDcTWvaBn4vm":"if (args.test.preData.skillName?.includes(game.i18n.localize(\"NAME.Language\")) || args.test instanceof game.wfrp4e.rolls.CastTest)\n{\n\tif (parseInt(args.test.result.SL) > 0 || args.test.succeeded)\n\t{\n\t\tif (parseInt(args.test.result.SL) > 0)\n\t\t{\n\t\t\targs.test.result.SL = \"-0\";\n\t\t\targs.test.result.description = game.i18n.localize(\"ROLL.MarginalFailure\");\n\t\t}\n\t\targs.test.result.outcome = \"failure\"\n args.test.result.other.push(`${this.effect.name}: Maximum -0 SL`)\n\t}\n}","VzgTGb5QXKoyPNh3":"if (args.attackerTest.weapon && args.defenderTest.weapon)\n{\n let attackerReach = game.wfrp4e.config.reachNum[args.attackerTest.weapon.reach.value]\n let defenderReach = game.wfrp4e.config.reachNum[args.defenderTest.weapon.reach.value]\n \n if (attackerReach == defenderReach)\n defenderReach = defenderReach < 7 ? defenderReach + 1 : defenderReach \n\n attackerReach = warhammer.utility.findKey(attackerReach, game.wfrp4e.config.reachNum)\n defenderReach = warhammer.utility.findKey(defenderReach, game.wfrp4e.config.reachNum)\n\n args.attackerTest.weapon.reach.value = attackerReach\n args.defenderTest.weapon.reach.value = defenderReach\n}","W2rdTwflbUVxFyfd":"let difficulty = \"\"\n if (this.effect.name.includes(\"Moderate\"))\n difficulty = \"easy\"\n else if (this.effect.name.includes(\"Severe\"))\n difficulty = \"average\"\n else\n difficulty = \"veasy\"\n\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {context : {failure : this.actor.name + \" meurt de la Pourriture\"}, fields: {difficulty}, appendTitle : \" - Pourriture\"})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"dead\");\n }","W5qtA7Ul5cOj18Nd":"this.item.update({\"system.AP\" : {lArm : 3, rArm : 3, lLeg : 3, rLeg: 3}});","W9nyUNQStMr1pUHJ":"if (args.opposedTest.result.hitloc.value == this.item.system.location.key)\n{\n args.actor.addCondition(\"bleeding\", 1);\n this.script.notification(\"Etat Hémorragique ajouté\")\n}","WB6sIpLEPC8YPX67":"if (args.context.dodge)\n{\n\targs.abort = true;\n\tthis.script.notification(\"Impossible d'Esquiver!\")\n}\nreturn [\"t\", \"int\", \"wp\", \"fel\"].includes(args.characteristic)","WJkwIrdj4NceOYe8":"return args.characteristic !== 'fel';","WKXyVHQwQCNTfSKv":"if ((args.item.type == \"weapon\" || args.item.system.attackType) && !args.item.isMagical )\n{\n args.item.system.qualities.value.push({name : \"magical\"})\n}","WO5n7Vbx8AgoVrwC":"let characteristics = {\n \"ws\" : 0,\n \"bs\" : 0,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : 10,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 10,\n \"wp\" : 5,\n \"fel\" : 5\n}\nlet skills = [\"Intuition\", \"Savoir (Local)\", \"Perception\"]\nlet skillAdvancements = [10, 10, 10]\nlet talents = []\nlet trappings = [\"Cotte de Mailles\", \"Chausses de Mailles\", \"Coiffe de Mailles\", \"Arme simple\"]\nlet items = []\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","WOpRJluHKER1MdgI":"let difficulty = \"\"\n if (this.effect.name.includes(\"Moderate\"))\n difficulty = \"easy\"\n else if (this.effect.name.includes(\"Severe\"))\n difficulty = \"average\"\n else\n difficulty = \"veasy\"\n\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {context : {failure : this.actor.name + \" meurt de la Pourriture\"}, fields: {difficulty}, appendTitle : \" - Pourriture\"})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"dead\");\n }","WPQbVpD1uwSLAXq1":"if (this.actor.system.status.wounds.value == 0)\n{\n\tthis.actor.addCondition(\"dead\");\n}","WR0Kqn8CF5iwToak":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Tailor)';\nconst difficulty = 'difficult';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","WRe1eGmGVGejPcS8":"let wind = this.effect.name.split(\" \")[2]\nreturn args.type == \"cast\" && game.wfrp4e.config.magicWind[args.item.system.lore.value] == wind;","WTRYAEzwxRuGENyI":" // Every living creature within 10 yards, other than the wielder of the hammer,\n // must make a Challenging (+0) Endurance Test \n\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {\n skipTargets: true, appendTitle : \" - \" + this.effect.name,\n fields: {difficulty: \"challenging\"}\n })\n \n await test.roll();\n if (test.failed)\n {\n // or gain a Deafened Condition \n this.actor.addCondition(\"deafened\");\n // and suffer 1d10 Wounds which bypass armour but not Toughness Bonus.\n let damage = (await new Roll(\"1d10\").roll());\n await damage.toMessage(this.script.getChatData());\n this.script.message(await this.actor.applyBasicDamage(damage.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))\n }","WY3DajPRGcMNt158":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], {fromEffect : this.effect.id})","WaeL2I8VVJmBBKHk":"const vomit = this.actor.itemTags.trait.find(t => t.name === \"Vomissement\");\nconst name = \"Test de Corruption\";\n\nif (!vomit) return;\n\nconst effect = vomit.effects.find(e => e.name === \"Vomissement\");\nconst scriptData = effect.system.scriptData;\n\nscriptData[0].script = `\nargs.actor.addCondition(\"stunned\");\nargs.actor.corruptionDialog(\"moderate\");\n`\n\nawait effect.update({\n name,\n \"system.scriptData\": scriptData\n});\n\nawait vomit.update({name});","WeTlTniskT3Ej6vg":"args.modifiers.other.push({label : this.effect.name, value : 2})","Wh1VV3javfzcV3bP":"let spells = await warhammer.utility.findAllItems(\"spell\", \"Loading Spells\", true, [\"system.lore.value\"]);\n\nspells = spells.filter(i => [\"dark\", \"light\", \"fire\", \"life\", \"beasts\", \"shadows\", \"death\", \"heavens\", \"metal\"].includes(i.system.lore.value)).sort((a, b) => a.name > b.name ? 1 : -1);\n\nlet choices = await ItemDialog.create(spells, 7, {text : \"Choisissez 7 Sorts parmi toute combinaison de Magie de Couleur, Sorcellerie ou Magie Noire\", title : this.effect.name})\n\nthis.actor.addEffectItems(choices.map(i => i.uuid), this.effect)","WiYtNU2Y5BJfIpeM":"let location = this.item.system.location.key;\n\nif (location)\n{\n let dropped = this.item.system.weaponsAtLocation;\n\n if (dropped.length)\n {\n this.script.notification(`Dropped ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}","WnWA0e0bgqBsZp2L":"this.item.update({\"system.twohanded.value\" : !this.item.system.twohanded.value})","Wo4wQKUxSItAhRzZ":"let lore = this.effect.name.split(\"(\")[1].split(\")\")[0].toLowerCase();\n\n// If channelling corresponding lore\nif (args.type == \"channelling\" && args.spell.system.lore.value == lore)\n args.prefillModifiers.slBonus += 3\n// If channelling or casting different lore\nelse if (args.spell.system.lore.value != lore && args.spell.system.lore.value != \"petty\")\n args.prefillModifiers.slBonus -= 1","Wqff6ICWYzvLDYC8":"if (this.actor.system.details.experience.current < 100) {\n return this.script.notification(game.i18n.localize(\"SCRIPT.NotEnoughXP\"))\n}\n\nlet item = await game.wfrp4e.utility.findItem(\"Sensory Sharing\", \"trait\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item]);\nlet expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);\nexpLog.push({amount : 100, reason: item.name, spent: this.actor.details.experience.spent + 100, total: this.actor.details.experience.total, type: \"spent\"});\nthis.actor.update({\n \"system.details.experience.spent\": this.actor.details.experience.spent + 100,\n \"system.details.experience.log\": expLog\n });","WsN2R1qOzuLa2qyB":"let specifier = this.item.specifier;\nlet rune;\nlet categories = [];\nif (specifier && specifier.toLowerCase() != \"toutes formes\")\n{\n if (specifier.includes(\"Talisman\"))\n {\n categories.push(\"talisman\");\n }\n if (specifier.includes(\"Protection\"))\n {\n categories.push(\"protection\");\n }\n if (specifier.includes(\"Arme\"))\n {\n categories.push(\"weapon\");\n }\n if (specifier.includes(\"Armure\"))\n {\n categories.push(\"armour\");\n }\n if (specifier.includes(\"Engineering\"))\n {\n categories.push(\"engineering\");\n }\n\n if (categories.length)\n {\n let runes = await warhammer.utility.findAllItems(\"wfrp4e-dwarfs.rune\", null, true, [\"system.category\", \"system.master\"]);\n let choices = runes.filter(i => categories.includes(i.system.category) && !i.system.master);\n\n if (choices.length)\n {\n rune = (await ItemDialog.create(choices, 1, {title : this.effect.name, text : specifier, indexed: true}))[0]\n } \n else \n {\n rune = await DragDialog.create({text : `Provide Rune to learn (${specifier})`, title : this.effect.name, filter: (item) => item.type == \"wfrp4e-dwarfs.rune\" && !item.system.master, onError: \"Doit fournir une Rune (non-Maîtresse)\"});\n }\n }\n else \n {\n rune = await DragDialog.create({text : `Provide Rune to learn (${specifier})`, title : this.effect.name, filter: (item) => item.type == \"wfrp4e-dwarfs.rune\" && !item.system.master, onError: \"Doit fournir une Rune (non-Maîtresse)\"});\n }\n}\nelse \n{\n rune = await DragDialog.create({text : `Provide Rune to learn`, title : this.effect.name, filter: (item) => item.type == \"wfrp4e-dwarfs.rune\" && !item.system.master, onError: \"Doit fournir une Rune (non-Maîtresse)\"});\n}\n\nthis.actor.addEffectItems(rune.uuid, this.effect)\n\nlet talents = this.actor.itemTags.talent.filter(i => i.baseName == this.item.baseName);\nlet xpCost = talents.length * 100\n\nif (this.actor.type == \"character\" && (await foundry.applications.api.DialogV2.confirm({window: {title: this.effect.name}, content: `

Spend ${xpCost} XP for learning ${this.item.name}?

`})))\n{\n this.actor.update({\"system.details.experience.log\" : this.actor.system.addToExpLog(xpCost, this.item.name, this.actor.system.details.experience.spent + xpCost)})\n}","WtbSIghR0q4euE7J":"if (args.effect.conditionId == \"ablaze\")\n{\n args.data.formula = `(${args.data.formula}) * 2`;\n}","WwxXgsNxlccmqTze":"this.actor.addCondition(\"dead\")","WzMmwjZbhyCbHxyZ":"this.actor.status.encumbrance.state += 2\nthis.actor.status.encumbrance.pct = 100;","X08401eOhKJrhNf1":"const grim = this.actor.items.find(i => i.type === \"trait\" && i.name.includes(\"Grim\"));\n\nif (args.options?.deltaAdv > 0 && this.actor.hasCondition(\"engaged\") && grim.specification.value !== 4) {\n grim.update({\"system.specification.value\": 4});\n}\n\nif (!this.actor.hasCondition(\"engaged\") && grim.specification.value !== 2) {\n grim.update({\"system.specification.value\": 2});\n}","X3bLbOfcJAftOMa7":"return [\"ws\", \"bs\", \"ag\"].includes(args.characteristic)","X3vpmNUj9SL2CDnF":"let item = args.actor.items.find(i => i.name.includes(\"Flying Jib\"));\nitem.name += ` (Disabled by ${this.item.name})`;","X7ikFOGKYzTMr4d1":"args.fields.difficulty = \"difficult\"","XCAfy460IotarQek":"return false;","XClTZOjuhcxWLF51":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty: \"difficult\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\")\n}\n\n\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.4lj1ik958mbgAlaF\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n","XO9m2AvFRAAeEuty":"if (args.test.options.fieldDressing && args.test.result.reversed)\n{\n\targs.test.data.result.SL = \"+\" + Math.min(1, Number(args.test.data.result.SL))\n\targs.test.result.other.push(`${this.effect.name}: SL limited to 1`)\n}","XPpHYTTT0hqYuSfa":"fromUuid(\"Compendium.wfrp4e-core.items.IAWyzDfC286a9MPz\").then(item => {\n item = item.toObject()\n this.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})\n})","XPxAKqPpPYE4E6B5":"args.fields.modifier -= 10 * this.effect.conditionValue","XRrGBbplNLZpXnCH":"let item;\nlet items = []\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.rOV2s6PQBBrhpMOv\")\n{\n let data = item.toObject();\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.VUJUZVN3VYhOaPjj\")\n{\n let data = item.toObject();\n data.system.specification.value = 2\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.GbDyBCu8ZjDp6dkj\")\n{\n let data = item.toObject();\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.a8MC97PLzl10WocT\")\n{\n let data = item.toObject();\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\n{\n let data = item.toObject();\n data.system.specification.value = 1;\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn\")\n{\n let data = item.toObject();\n data.system.specification.value = 1;\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.fjd1u9VAgiYzhBRp\")\n{\n let data = item.toObject();\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.mDgEMOoJpi8DkRYb\")\n{\n let data = item.toObject();\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM\")\n{\n let data = item.toObject();\n data.system.specification.value = 2;\n items.push(data)\n}\n\nthis.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect : this.effect.id})\n","XSbQKrrbjsN15Zp9":"if (!args.messageSent)\n{\n args.messageSent = true;\n let advantage = this.item.effects.filter(i => i.name == this.effect.name).length;\n this.actor.setAdvantage(advantage)\n this.script.message(`Allies within 12 yards gain ${advantage} Advantage`)\n}","XWbpSJrduXAhXAAV":"await this.actor.applyDamage(this.effect.sourceTest.result.damage, {sourceItem: this.effect.sourceItem, sourceTest: this.effect.sourceTest, createMessage: this.script.getChatData()})\nawait this.actor.addCondition(\"ablaze\");","XXnzUdsIYQ9Wjyu0":"return args.item?.system.attackType != \"ranged\" || args.flags.howlingWarpGale || this.actor.sameSideAs(this.effect.sourceActor)","XYaYeiVkc5GKYTjC":"return args.spell?.system.lore.value != \"fire\"","XcvDYNZgJ2rpAdDV":"\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (!fatigued)\n {\n this.actor.addCondition(\"fatigued\")\n ui.notifications.notify(\"Etat Extenué ajouté à \" + this.actor.name + \" qui est impossible à retirer tant que le symptôme de malaise est présent.\")\n }","Xe8ijqWU3bbtq7ZY":"if (args.opposedTest.defenderTest.actor.Species.toLowerCase().includes(\"skaven\"))\n{\n args.addImpact = true;\n args.opposedTest.result.other.push(\"Impact against Skaven\")\n}","Xf4FcZ4ZLdWmOXBa":"return args.skill?.name != game.i18n.localize(\"NAME.Perception\") && !args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"));","XfRvVBTVIuAm8RaZ":"return args.item?.name != game.i18n.localize(\"NAME.CharmAnimal\")","XfSxXatjEYlPEbaK":"const broken = this.actor.hasCondition(\"broken\");\n\n//broken?.delete();","Xg4qHLsyXGuUZfT8":"this.actor.hasCondition(\"ablaze\")?.delete();","XjUXxUA0hbwjUatW":"if (this.actor.hasCondition(\"engaged\") && this.effect.disabled)\n{\n this.effect.update({\"disabled\" : false})\n this.item.effects.contents[1].update({\"disabled\" : false});\n this.script.notification(\"Enabled\")\n}\nelse if (this.effect.active && !this.actor.hasCondition(\"engaged\"))\n{\n this.effect.update({\"disabled\" : true})\n this.item.effects.contents[1].update({\"disabled\" : true});\n \n}","Xk9XPklxxTvFlwpI":"args.context.useOnesArgumentative = true;","XthZ3GCC3WhsEI2g":"args.update({light : {\n \"dim\": 10,\n \"bright\": 5,\n \"alpha\": 0.5,\n \"animation\": {\n \"speed\": 4,\n \"intensity\": 4,\n \"type\": \"flame\",\n },\n \"color\": \"#ac9e6c\",\n}});","Xu5cED1MhT4ba7da":"args.fields.modifier += 10\n","XuFxKPYheYF4WMmQ":"return args.skill?.name != game.i18n.localize(\"NAME.Cool\");","XzJotwVUIuQu6b0G":"return !args.context.whirlwind || !args.weapon || !this.actor.has(game.i18n.localize(\"NAME.DualWielder\"), \"talent\") || this.actor.noOffhand","Y27MmN5KFw45d5vQ":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {difficulty: \"challenging\"})\nawait test.roll();\nif (!test.succeeded)\n{ \n let rollResult = await (await fromUuid(\"RollTable.GL7rKOEThauPUK0E\")).roll({allowInteractive : false});\n let diseaseId = rollResult.results[0].documentId;\n let disease = await fromUuid(\"Item.\"+diseaseId);\n obj = disease.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [obj]);\n}","Y43z8YCohJMA8Ia7":"if (!args.test.preData.options?.giantbane) return\nif (!this.item.equipped.value || !args.test.item) return;\nargs.test.preData.canReverse = true","Y6ppJBerpM3TtSic":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.g4Q6AtzZuo5iIvD4\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], {fromEffect : this.effect.id});","Y7McxsHFeGhwQx0J":"this.actor.createEmbeddedDocuments(\"Item\", [foundry.utils.expandObject({\n name : \"Ghostly Flame\",\n type : \"weapon\",\n img : this.effect.img,\n system : {\n \"weaponGroup.value\" : \"throwing\",\n \"damage.value\" : \"SB + WPB\",\n \"qualities.value\" : [{name : \"magical\"}],\n \"equipped\" : true\n }\n})], {fromEffect: this.effect.id})","Y8J66v8VTKUASGuK":"if (!this.actor.effects.find(e => e.isCondition))\n{\n\treturn this.script.notification(\"Aucun état sur cet acteur\")\n}\n\nlet choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, \"Choisir un état\")\n\nif (choice[0])\n{\n\tawait this.actor.removeCondition(choice[0].conditionId)\n}\n\nif (this.actor.effects.find(e => e.isCondition))\n{\n return false; // Delete the effect if there are still conditions, otherwise, effect remains and provides the bonus\n}","YDANERWYHyJ2ACeo":"args.fields.modifier -= 25","YDqpKJVy8ijEKdLX":"return !(this.actor.attacker && (args.skill?.name.includes == `${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Basic\")})` || (args.type == \"weapon\" && args.item?.system.weaponGroup.value == \"basic\")))","YEBw2CzHYxsTpTy5":"return args.skill?.name == game.i18n.localize(\"NAME.Haggle\");","YFSgWRXel0bWE3EE":"return [\"ag\", \"ws\", \"bs\"].includes(args.characteristic) || args.skill?.name == game.i18n.localize(\"NAME.Climb\");","YHEIkBKWXKNPqglh":"if (args.test.result.castOutcome == \"success\")\n{\n CorruptionMessageModel.createCorruptionMessage(\"moderate\", this.script.getChatData())\n}\n","YJX7WnxzXXIVdH6P":"let lore = await ValueDialog.create({text : \"Choisissez un Savoir\", title: \"Savoir\"}, \"\", {\"fire\" : \"Fire\", \"death\" : \"Death\", \"metal\" : \"Metal\", \"shadow\" : \"Discret\"});\n\nlet filters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"petty\"\n }\n]\n\nlet petty = await ItemDialog.createFromFilters(filters, 6, {title : this.effect.name, text : \"Choisissez 6 Sorts Mineurs\"})\n\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : [\"\"]\n }\n]\n\nlet arcane = await ItemDialog.createFromFilters(filters, 12, {title : this.effect.name, text : \"Choisissez 12 Sorts d'Arcane\"})\n\nlet items = petty.map(i => i.toObject()).concat(arcane.map(i => {\n let spell = i.toObject();\n spell.img = `modules/wfrp4e-core/icons/spells/${lore}.png`\n spell.system.lore.value = lore;\n return spell;\n}));\n\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","YMaxpXnml01bLGpO":"return args.item?.name.includes(game.i18n.localize(\"NAME.Stealth\"))","YN8719gme9AxYtyY":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 0,\n \"s\" : 5,\n \"t\" : 15,\n \"i\" : 20,\n \"ag\" : 15,\n \"dex\" : 20,\n \"int\" : 35,\n \"wp\" : 30,\n \"fel\" : 10\n}\nlet skills = [\"Focalisation\", \"Calme\", \"Esquive\", \"Divertissement (Narration)\", \"Intuition\", \"Langue (Magick)\", \"Commandement\", \"Savoir (Magie)\", \"Savoir (Théologie)\", \"Perception\"]\nlet skillAdvancements = [20, 25, 20, 25, 30, 25, 15, 20, 10, 30]\n\nlet talents = [\"Harmonisation Aethyrique\", \"Diction Instinctive\", \"Diction Instinctive\", \"Chanceux\", \"Perception de la magie\", \"Menaçant\", \"Magie des Arcanes (Domaine)\", \"Magie Mineure\", \"Seconde Vue\", \"Sixième Sens\"]\nlet trappings = [\"Arme simple\", \"Robes\", \"(2M) Bâton de combat\"]\nlet specialItems = [ \n {name: \"Magic Item\", type: \"trapping\", trappingType: \"misc\" }, \n] \nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else \n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else \n {\n ui.notifications.warn(`Could not find ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings) \n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else \n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nlet ride = await foundry.applications.api.DialogV2.confirm({window : {title : \"Compétence\"}, content : \"Add Chaos Steed and +20 Ride (Horse)?\"})\n\nif (ride)\n{\n let skill = await game.wfrp4e.utility.findSkill(\"Chevaucher (Cheval)\")\n skill = skill.toObject();\n skill.system.advances.value = 20;\n items = items.concat({name : \"Chaos Steed\", type: \"trapping\", \"system.trappingType.value\" : \"misc\"}, skill)\n}\n\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","YOKoZFlBEpFavfOS":"return args.type == \"channelling\"","YQ2LnLxp0xgy3meI":"if (args.test.preData.options?.corruption && args.test.failed) {\n args.test?.result?.other.push(\"Gain de +1 Corruption supplémentaire de \" + this.effect.name)\n}","YRUTliBzAQvncGNX":"this.actor.addCondition(\"fatigued\");\nthis.script.notification(\"Etat Exténué ajouté\")","YaKnYEbmmZZtByJc":"if (args.opposedTest.attackerTest.options.ballockKnife)\n{\n args.weaponProperties.impale = true;\n args.extraMessages.push(`${this.item.name}: Impale Added`)\n}","YdiQFkm8j48Xs7gI":"if (args.totalWoundLoss > 0 && args.opposedTest.attackerTest.result.critical && args.opposedTest.result.hitloc.value == \"head\") {\n let brainRot = await fromUuid(\"Compendium.wfrp4e-lustria.items.Item.IsNQH867Y58pZgq6\");\n args.test.targets[0].createEmbeddedDocuments(\"Item\", [brainRot], {fromEffect : this.effect.id});\n this.script.scriptMessage(`${args.test.targets[0].name} has been infected by Brain Rot`);\n}","Yf2MmOzazzMdmoPU":"let armour = await fromUuid(\"Compendium.wfrp4e-core.items.VUJUZVN3VYhOaPjj\")\nlet armourData = armour.toObject()\narmourData.system.specification.value = 1\n \nlet fury = await fromUuid(\"Compendium.wfrp4e-core.items.fjd1u9VAgiYzhBRp\");\nlet furyData = fury.toObject();\n\nlet horns = await fromUuid(\"Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW\")\nlet hornsData = horns.toObject()\nhornsData.system.specification.value = 6\n\nthis.actor.createEmbeddedDocuments(\"Item\", [armourData, furyData, hornsData], {fromEffect : this.effect.id})","YfRPSgJjvHvl50HW":"return args.skill?.name != \"Runesmithing\"","YhhiWEQbox3WZA3Q":"return args.skill?.name == game.i18n.localize(\"NAME.Heal\") && game.combat?.active","YjAIsFlxKTJvYs60":"this.item.system.reduceQuantity();","YjJcRdytVRm88qLn":"args.context.additionalDamage = 1","YrXhk2YJaWSChMhp":"// Brawling management\nlet base = this.actor.characteristics.ws.value;\nlet melee = this.actor.has(\"Corps à corps (Bagarre)\", \"skill\");\nif (!melee) {\n melee = await fromUuid(\"Compendium.wfrp4e-core.items.Item.jLyoyqwmBVPjRjhM\");\n melee = melee.toObject();\n melee.system.modifier.value = 55 - base;\n await this.actor.createEmbeddedDocuments(\"Item\", [melee], {fromEffect : this.effect.id});\n} else {\n //this.actor.updateEmbeddedDocuments(\"Item\", { _id: melee.id, 'system.modifier.value': 55-base});\n await this.effect.update({\"flags.wfrp4e.fistsOfGork\" : 55 - base})\n}\n\n// Weapon management\nbase = this.actor.characteristics.s.bonus;\nweapon = await fromUuid(\"Compendium.wfrp4e-core.items.Item.AtpAudHA4ybXVlWM\");\nweapon = weapon.toObject();\nweapon.name = \"Fists of Gork\";\nweapon.img = this.effect.img;\nweapon.system.rollable.skill = \"Corps à corps (Bagarre)\";\nweapon.system.specification.value = 9 - base;\nawait this.actor.createEmbeddedDocuments(\"Item\", [weapon], {fromEffect : this.effect.id});\n\n//this.script.scriptMessage(`${this.actor.name} now has Melee (Brawling) 55 and Weapon (Fists) +9`);","YsS2RZsl2ZsqjhWV":"return !args.fields.charging","YsUdMhQ2AArcJIqy":"let choice1 = [\n {\n type: \"trait\",\n name: \"Corruption (Mineure)\",\n diff : {\n system : {\n specification : {\n value : \"Minor\"\n }\n }\n }\n },\n {\n type: \"trait\",\n name: \"Infecté\",\n },\n {\n type: \"trait\",\n name: \"Territorial\",\n }\n]\n\nlet updateObj;\nlet actor;\n\nasync function addTrait(c) {\n let items = [];\n let existing;\n if (c.type == \"trait\") {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type);\n }\n if (!existing) {\n let item = await game.wfrp4e.utility.find(c.name, c.type);\n if (item) {\n item = item.toObject();\n foundry.utils.mergeObject(item, c.diff);\n items.push(item);\n }\n else\n ui.notifications.warn(`Impossible de trouver ${c}`, { permanent: true });\n }\n actor.createEmbeddedDocuments(\"Item\", items);\n}\n\nasync function dialogChoice() {\n for (let c of choice1)\n {\n if (await foundry.applications.api.DialogV2.confirm({window : {title: \"Option\"}, content:`

Add Option?

  1. ${c.name}
`}))\n {\n addTrait(c)\n c.valid = true;\n }\n }\n}\nupdateObj = this.actor.toObject();\nactor = this.actor\nawait dialogChoice();\n","YwLEw4BiKq4EMy57":"let i_gain = (await new Roll(\"2d10\").roll()).total\nlet fel_gain = 0\nif (args.actor.characteristics.fel.value <= 0)\n{\n fel_gain += (await new Roll(\"2d10\").roll()).total\n}\n\nlet msg = `${this.actor.prototypeToken.name} gains ${i_gain} Intelligence`\n\nif (fel_gain)\n msg += ` and ${fel_gain} Fellowship`\n\n\nlet newInt = i_gain + args.actor.characteristics.int.modifier\nlet newFel = fel_gain + args.actor.characteristics.fel.modifier\n\nargs.actor.update({\"system.characteristics.int.modifier\" : newInt, \"system.characteristics.fel.modifier\" : newFel})\n\nthis.script.message(msg)","YyKU2rIRmFSCqSlW":"let newEffect = this.effect.sourceItem.effects?.contents[1]\n\nif (newEffect)\n{\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [newEffect.convertToApplied()]);\n}","YySjPfSAPdMAfjsh":"let talents = [\"Charge Berserk\", \"Vigilance\", \"Combat Instinctif\", \"Assaut féroce\", \"Endurci\", \"Résistance à la Magie\", \"Resistance (Magic)\", \"Déterminé\", \"Coup puissant\", \"Guerrier né\"];\nlet currentCareer = this.actor.system.currentCareer;\n\nif (!currentCareer) return;\n\nfor (let talent of talents) {\n if (currentCareer.system.talents.includes(talent))\n continue;\n currentCareer.system.talents.push(talent);\t\n}\n\n","Z1zriXibT0mAmdhb":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW\")\nitem = item.toObject()\nitem.name = this.effect.name\nitem.system.specification.value = this.actor.characteristics.s.bonus\nitem.system.description.value = \"\"\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","Z30zYayPryXOjT5N":"args.item.system.damage.value = \"SB + 6\";","Z41L3MwOpJdAjVaj":"if (args.actorsystem.details.move.sail.value > 0)\n args.actor.system.details.move.sail.value -= 2;\n","Z4WrrlVGpPY4iUbG":"await this.actor.addCondition(\"ablaze\")","Z52yZDm6lP6fOP3O":"let ablaze = this.actor.hasCondition(\"ablaze\")\nif (ablaze)\n{\n this.script.notification(\"Immunisé au feu\");\n ablaze.delete()\n}","Z6OmmC0irJzxSnMH":"let chatData = { whisper: ChatMessage.getWhisperRecipients(\"GM\") }\nlet message = \"\"\n\nlet wounds = foundry.utils.duplicate(this.actor.status.wounds)\nlet regenRoll = await new Roll(\"1d10\").roll({allowInteractive : false});\nlet regen = regenRoll.total;\n\nif (wounds.value >= wounds.max)\n return\n\nif (wounds.value > 0) \n{\n wounds.value += regen\n if (wounds.value > wounds.max)\n {\n wounds.value = wounds.max\n }\n message += `${this.actor.name} regains ${regen} Wounds.`\n\n if (regen == 10)\n {\n message += `
Additionally, they regenerate a Critical Wound.`\n }\n}\nelse if (regen >= 8) \n{\n message += `${this.actor.name} rolled a ${regen} and regains 1 Wound.`\n wounds.value += 1\n if (regen == 10)\n {\n message += `
Additionally, they regenerate a Critical Wound.`\n }\n}\nelse \n{\n message += `${this.actor.name} Regenerate roll of ${regen} - No effect.`\n}\n\nawait this.actor.update({ \"system.status.wounds\": wounds })\nthis.script.message(message, { whisper: ChatMessage.getWhisperRecipients(\"GM\") })\n\nif (this.actor.Species?.toLowerCase() != \"ogre\")\n{\n this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name, fields : {difficulty : \"average\"}}).then(test => {\n test.roll()\n })\n}\n\n\n\n\n\n\n\n\n\n\n\n\n","Z6jNlyZMECkW4Hon":"let spells = await warhammer.utility.findAllItems(\"spell\", \"Loading Spells\", true);\n\nlet choice = await ItemDialog.create(spells, 1);\n\nif (choice[0])\n{\n this.script.message(`Chose @UUID[${choice[0].uuid}]{${choice[0].name}}`)\n let spell = (await fromUuid(choice[0].uuid)).toObject(); // Might be an index so retrieve item object for sure\n foundry.utils.setProperty(spell, \"flags.wfrp4e.boonOfTzeentch\", true);\n spell.system.wind.value = \"Focalisation (Dhar)\";\n spell.system.memorized.value = true;\n this.actor.createEmbeddedDocuments(\"Item\", [spell], {fromEffect: this.effect.id})\n}","ZCBcwbVFHFTFRntb":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","ZCExF4uNFmHkGEbb":"this.actor.deleteEmbeddedDocuments(\"Item\", [this.effect.getFlag(\"wfrp4e\", \"disease\")].filter(i => i));","ZCkYe5XMVY1RWMXG":"args.context.wallcrawler = true;","ZCrfdLPOxiNDCDSg":"this.actor.effects.get(this.effect.id).delete(); // can't use this.effet because it thinks it's parent is the item, but it actually is the actor","ZCuOjLAeENKN1Q4L":"let halve;\nif (args.opposedTest.attackerTest.item?.type != \"spell\")\n{\n halve = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : \"Divisé les dégats par deux? (Divise les dégats de tout feu par deux)\"})\n}\nelse\n{\n halve = args.opposedTest.attackerTest.item?.system.lore?.value == \"fire\";\n}\n\nif (halve)\n{\n args.totalWoundLoss /= 2;\n args.modifiers.other.push({label : this.effect.name, details : \"Divisé par deux\", value : \"× 0.5\"})\n}","ZEXhYJqqxF6QAixX":"return args.context.terror || args.extendedTest?.getFlag(\"wfrp4e\", \"fear\");","ZEdDcBka21rnMuz5":"let initiativeSetting = game.settings.get(\"wfrp4e\", \"initiativeRule\")\n\nswitch (initiativeSetting) {\n case \"default\":\n args.initiative += \"+10\"\n break;\n\n case \"sl\":\n args.initiative += \"+1\"\n break;\n\n case \"d10Init\":\n args.initiative += \"+10\"\n break;\n\n case \"d10InitAgi\":\n args.initiative += \"+1\"\n break;\n}","ZGlJnrIemqul24j7":"let infected = await fromUuid(\"Compendium.wfrp4e-core.items.V0c3qBU1CMm8bmsW\")\nlet bite = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet biteData = bite.toObject();\nlet infectedData = infected.toObject();\n\nbiteData.system.specification.value = 4 - this.actor.characteristics.s.bonus\n\nthis.actor.createEmbeddedDocuments(\"Item\", [biteData, infectedData], {fromEffect : this.effect.id})","ZI2YnAAGoLpmVDIL":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.aE3pyW20Orvdjzj0\")\nlet data = item.toObject();\ndata.system.specification.value = \"Religion\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","ZJy2rvpKmUHXGrAi":"args.actor.details.move.run *= 1.5","ZLspFT2I3ZdWWr2H":"return args.skill?.name !== game.i18n.localize(\"NAME.Leadership\");","ZMwJad6v4G13SgjR":"return args.type == \"cast\" || args.type == \"channelling\"","ZNW3ubbKIYXAyE48":"let wounds = this.actor.itemTypes.disease.filter(i => i.name == \"Festering Wound\" && i.system.duration.active);\nlet selected;\nif (wounds.length == 0)\n{\n return this.script.notification(\"No Festering Wounds!\");\n}\nelse if (wounds.length == 1)\n{\n selected = wounds[0];\n}\nelse if (wounds.length >= 2)\n{\n selected = (await ItemDialog.create(wounds, 1))[0];\n}\n\nif (selected)\n{\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"average\"}})\n await test.roll();\n if (test.succeeded)\n {\n let SL = parseInt(test.result.SL);\n if (SL >= 0)\n {\n selected.update({\"system.duration.value\" : selected.system.duration.value - SL})\n this.script.message(`${selected.name} duration reduced by ${SL}!`)\n }\n }\n}","ZNu4B0OdjkM9lmtu":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS\")\nlet data = item.toObject();\ndata.name = data.name += \" (Vision)\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","ZOgtDW3mkTfeyc5M":"args.actor.system.details.price.gc += args.actor.system.details.price.gc * 0.1;","ZRoG7GiMDQWso6gN":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'difficult';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","ZTE8LdRblyG4yYoE":"if (args.test.result.castOutcome == \"success\")\n{\n // Wait till after chat card is posted\n warhammer.utility.sleep(500).then(() => {\n game.wfrp4e.utility.postTerror(1, this.effect.name)\n game.wfrp4e.utility.postTerror(2, this.effect.name)\n })\n}","ZURBQYTYcP5jci5k":"const broken = this.actor.hasCondition(\"broken\");\n\nbroken?.delete();","ZYsMgB4BwXBJcpYf":"// The wearer of the cloak causes Peur 2 \n// in Wolves, Lions, Goats, and Chimeras.\ngame.wfrp4e.utility.postPeur(2, this.effect.name)\n","ZbuW8y7t9Y8oUFWq":"return !((args.type == \"weapon\" && (args.item.system.weaponGroup.value == \"blackpowder\" || args.item.system.weaponGroup.value == \"engineering\")) || (args.type == \"cast\" && args.item.system.lore.value == \"fire\"))","ZdHvGvSJBsIuPphF":"return !args.data.dualWieldingOption && !args.context.dualWieldOffhand","Ze9E2zR1GFGWGMVH":"return [game.i18n.localize(\"NAME.PickLock\"), game.i18n.localize(\"NAME.SleightOfHand\"), `${game.i18n.localize(\"NAME.Channelling\")} (Ulgu)`].includes(args.skill?.name)","ZfOhDMHPyEkThjEk":"foundry.utils.setProperty(args, \"context.context.failure\", [`${this.effect.name}: Can Reroll!`])","ZfgPAtNKA5KrETer":"return args.type == \"cast\";","ZgF1sYdbAKaOuHmK":"return args.skill?.name !== game.i18n.localize(\"NAME.Charm\");","ZhuitY1KOU1Xe7cP":"return !args.weapon?.system.properties.qualities.pummel","Znz4g56UH23SSCg7":"if (!args.messageSent)\n{\n args.messageSent = true;\n let advantage = this.item.effects.filter(i => i.name == this.effect.name).length;\n this.actor.setAdvantage(advantage)\n this.script.message(`Allies within 6 yards gain ${advantage} Advantage`)\n}","ZqTW093qENOwGONP":"let msg = \"\"\n\nlet SL = parseInt(this.effect.sourceTest.result.SL);\n\nfor(let i = 0; i < SL; i++)\n{\n msg += `

${await this.actor.applyBasicDamage(3, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP})}

`\n}\n\nthis.script.message(msg);","ZrePyV2spv3v65Tg":"return args.type != \"weapon\" && !this.actor.statuses.has(\"infighting\")","ZsOHDb7XwmuUUWPL":"return args.characteristic === 'fel';","ZsQR3AVKi0v5U593":"args.actor.addCondition(\"ablaze\", 2)","ZuoIVv3nmlGhhdx0":"let rating = parseInt(this.effect.name.match(/\\d+/)?.[0]) || 1;\nlet holed = this.actor.flags.holed || {holed: 0};\nholed.holed += rating;\nthis.actor.flags.holed = holed;\n","ZvbBM4gTJHPdU8jU":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\nawait test.roll();\nreturn test.failed","Zxh4RAENoaAQAaNg":"return !this.actor.flags.useless.rEye || !this.actor.flags.useless.lEye || [\"wp\", \"t\", \"s\"].includes(args.characteristic)","ZxtOdwsM2Sqj9Zam":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM\")\nlet data = item.toObject();\ndata.system.specification.value = 0\ndata.name = this.effect.name;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","a02tlRCXpaoaDjSN":"let careers = await warhammer.utility.findAllItems(\"career\", \"Loading Careers\", true);\ncareers.forEach(c => {\n if (!c.id)\n {\n c.id = c._id;\n }\n});\nlet choice = await ItemDialog.create(careers, 1, {text : \"Choisissez une Carrière de Double Vie\", title : this.effect.name, indexed : true});\nif (choice[0])\n{\n let career = choice[0];\n let data = career.toObject();\n foundry.utils.setProperty(data, \"flags.wfrp4e.doubleLife\", true);\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n this.effect.updateSource({name : this.effect.setSpecifier(data.name)})\n}\n","a0YU3whUm16wGBNu":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"average\"}})\nawait test.roll();\n\nif (test.failed)\n{\n this.actor.addCondition(\"fatigued\");\n}","a4Aza4a9v8JMU8dC":"const talents = await Promise.all([game.i18n.localize(\"NAME.Frenzy\"), game.i18n.localize(\"NAME.MagicResistanceTalent\")].map(game.wfrp4e.utility.findTalent))\nthis.actor.createEmbeddedDocuments(\"Item\", talents, {fromEffect : this.effect.id})","a4Q7RJpW0sqvfATw":"let fatigued = this.actor.hasCondition(\"fatigued\")\n if (!fatigued)\n {\n this.actor.addCondition(\"fatigued\")\n ui.notifications.notify(\"Exténué ajouté à \" + this.actor.name + \" qui ne peut pas être retiré tant que le symptôme de Malaise est présent.\")\n }","a5WEJ2oxlcdOFWlL":"args.actor.system.characteristics.t.initial += 20;","a6gacHsvgwtsIFSQ":"if (args.test.item && args.test.item.name == game.i18n.localize(\"NAME.Research\"))\n args.test.preData.reversal = {allowed : true, if: \"success\"};\n","a7pEvCycVnFBXGAQ":"let test = await this.actor.setupCharacteristic(\"i\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"easy\"}})\nawait test.roll();\n\nif (!test.succeeded)\n{\n\tthis.actor.addCondition(\"stunned\");\n}","a81IMxqmMtHgYnIF":"return !args.weapon?.system.isMelee;","a8RabrnJ08O07rDX":"if (args.totalWoundLoss > 0)\n{\n // I'm assuming the endurance test specified is for the end-round check\n await args.actor.addCondition(\"poisoned\", 2);\n}","a8i0sA1RBnD8nHZt":"let caster = this.effect.sourceActor\nlet targetedItem = this.effect.system.itemTargets[0];\n\nlet qualities = foundry.utils.deepClone(game.wfrp4e.config.itemQualities);\nlet flaws = foundry.utils.deepClone(game.wfrp4e.config.itemFlaws);\n\nif (targetedItem.type == \"weapon\")\n{\n foundry.utils.mergeObject(qualities, game.wfrp4e.config.weaponQualities)\n foundry.utils.mergeObject(flaws, game.wfrp4e.config.weaponFlaws)\n}\nelse if (targetedItem.type == \"armour\")\n{\n foundry.utils.mergeObject(qualities, game.wfrp4e.config.armorQualities)\n foundry.utils.mergeObject(flaws, game.wfrp4e.config.armorFlaws)\n}\n\nfor(let q in qualities)\n{\n // If the weapon already has a flaw, don't put it in the dialog\n if (targetedItem.system.properties.qualities[q])\n {\n delete qualities[q]\n }\n}\nfor(let f in flaws)\n{\n // If a weapon doesn't have a flaw, don't put it in the dialog\n if (!targetedItem.system.properties.flaws[f])\n {\n delete flaws[f]\n }\n}\n\nlet added = await ItemDialog.create(ItemDialog.objectToArray(qualities), \"unlimited\", \"Choisir les Qualités à ajouter\");\nlet removed = []\nif (!foundry.utils.isEmpty(flaws))\n{\n removed = await ItemDialog.create(ItemDialog.objectToArray(flaws), \"unlimited\", \"Choisir les Défauts à retirer\");\n}\n\nthis.effect.updateSource({\"flags.wfrp4e.propertiesChanged\" : {added : added.map(i => i.id), removed : removed.map(i => i.id)}})\n","aAvJrAKLzXhS9qN6":"return args.item?.name == game.i18n.localize(\"NAME.Climb\")","aCVtaW8ag1WibcAr":"args.attacker.modifyWounds(1)\nthis.script.message(`${args.attacker.prototypeToken.name} recovers 1 Wound.`)","aFwNs7TMVF90i9JF":"let tireless = this.item.Advances + 1\nlet fatigued = this.actor.hasCondition(\"fatigued\").conditionValue\nif (args.flags?.tireless == undefined) {\n args.fields.modifier += 10 * (Math.min(tireless, fatigued));\n args.flags.tireless = true\n}","aIYUsBIDKWJ3CEtj":"this.script.message(await this.actor.applyBasicDamage(20, {suppressMsg: true}));","aMHGjWyn6BXCI4pw":"let frenzy = await fromUuid(\"Compendium.wfrp4e-core.items.Item.hXcfygzujgyMN1uI\");\nthis.actor.createEmbeddedDocuments(\"Item\", [frenzy], {fromEffect: this.effect.id})","aPZiVhgwR0Xql6AM":"let effectsToEnable = this.actor.items.filter(i => i.type == \"disease\").reduce((effects, item) => effects.concat(item.effects.contents), []).concat(this.actor.effects.contents.filter(i => i.isCondition)).filter(i => i.disabled);\n\nif (effectsToEnable.length)\n{\n this.script.notification(`Re-enabling ${effectsToEnable.map(i => i.name).join(\", \")}.`);\n effectsToEnable.forEach(i => i.update({disabled : false}))\n}","aRvJUcgYqhRmmWYC":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.e3McIND4Rrsn5cE6\", this.effect, {\"system.advances.value\" : 1}, {skipExperienceChecks : true})","abLWYtNTu1UVDQAs":"if (args.opposedTest.result.hitloc.value == this.effect.flags.wfrp4e.location) // e.g. 'head', rLeg, 'lArm'\n{\n this.message(`Gains a @Condition[Blinded] condition as their ${this.item.name} was hit`);\n this.actor.addCondition(\"blinded\");\n}","abVIvJBzuskNzCQv":"let amount = this.effect.sourceTest.result.overcast.usage.other.current;\n\nlet sss = await fromUuid(\"Compendium.wfrp4e-core.items.MGEPI4jNhymNIRVz\");\nlet strider = await fromUuid(\"Compendium.wfrp4e-core.items.1dUizIgLBgn4jICC\");\n\nlet items = Array(amount).fill(sss).concat(Array(amount).fill(strider))\n\nthis.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id})","abcQMF1LW27qA98R":"return args.skill?.name === game.i18n.localize(\"NAME.Dodge\");","aeBetniKqq5SD9Ou":"let characteristics = {\n \"ws\" : 30,\n \"bs\" : 20,\n \"s\" : 20,\n \"t\" : 25,\n \"i\" : 20,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 30,\n \"wp\" : 40,\n \"fel\" : 30\n}\nlet skills = [\"Intimidation\", \"Langue (Classique)\", \"Commandement\", \"Savoir (Guerre)\", \"Savoir (Histoire)\", \"Perception\"]\nlet skillAdvancements = [20, 30, 20, 30, 20, 20]\nlet talents = [\"Vigilance\", \"Combat Instinctif\", \"Coude-à-coude\", \"Menaçant\", \"Robuste\", \"Coup puissant\", \"Coup puissant\", \"Seigneur de guerre\"]\nlet trappings = [\"Arme simple\", \"Plastron d'acier\", \"Heaume\", \"Jambières d'acier\"]\nlet specialItems = [\n]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(\">>>>>>><\", items)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","aedzdFyjI80Ah3qC":"return !this.item.equipped.value \n || !args?.weapon\n || !([\"giant\"].includes(args.target.Species.toLowerCase()))","afdmOvPGMpEdZvCb":"return (args.skill?.name == game.i18n.localize(\"NAME.Perception\") || args.characteristic == \"fel\")","agsm3NI1NDtHRG4y":"this.actor.getActiveTokens().forEach(t => t.document.update({texture : this.actor.prototypeToken.texture}, {animate : false}));","ahbA7o5G9dzMFl76":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.SfUUdOGjdYpr3KSR\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","alJgj25l3239h2SW":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.hTgrGkWnmIR4xhVe\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","araS9qYWOAVrV8F7":"args.actor.system.details.man -= 3;\nargs.actor.system.details.move.value -= 2;","ayIbw2Vw2t9xg33P":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.EaqlLRQigwnsEAXX\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","b1zMefdoZYtzCm7i":"return [\"roll\", \"none\"].includes(args.fields.hitLocation) || args.item?.attackType != \"ranged\"","b2Kb4IuD22RhKhR0":"let actor = Array.from(game.user.targets)[0]?.actor;\n\nif (actor)\n{\n actor.applyEffect({effectUuids : this.effect.sourceItem.effects.contents[0].uuid})\n}\nelse\n{\n this.script.notification(\"Aucune cible!\", \"error\")\n}","b2WaqRna5CFXmbDG":"args.context.stag = true;","b4CIeJF2L4E1qikC":"return !args.skill","b5DfAWtpV1x2R8If":"this.script.message(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg: true}))","b5prg1FLjCAvBjLy":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.zyocWSzEZEC826NS\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data])\n\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty: \"hard\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n await this.actor.addCondition(\"prone\")\n await this.actor.addCondition(\"stunned\")\n}","b787rIfyHF5LnALd":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.HbrwGhUl0ZXz4kLA\")\nlet hardy = item.toObject();\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.VUJUZVN3VYhOaPjj\")\nlet armour = item.toObject();\narmour.system.specification.value = 1;\nthis.actor.createEmbeddedDocuments(\"Item\", [armour, hardy], {fromEffect : this.effect.id});","b8G4cjfn3RG2tEYX":"this.actor.addCondition(\"ablaze\", 3);","b8XFmEUu1d2YNQ7F":"const {targetUuid, characteristicsToSwap} = this.effect.flags.wfrp4e;\n\nif (!characteristicsToSwap) return;\n\nconst target = fromUuidSync(targetUuid);\n\nif (!target) return;\n\nfor (const char of characteristicsToSwap) {\n args.actor.system.characteristics[char].advances = target.system.characteristics[char].advances;\n args.actor.system.characteristics[char].bonus = target.system.characteristics[char].bonus;\n args.actor.system.characteristics[char].bonusMod = target.system.characteristics[char].bonusMod;\n args.actor.system.characteristics[char].calculationBonusModifier = target.system.characteristics[char].calculationBonusModifier;\n args.actor.system.characteristics[char].initial = target.system.characteristics[char].initial;\n args.actor.system.characteristics[char].modifier = target.system.characteristics[char].modifier;\n args.actor.system.characteristics[char].value = target.system.characteristics[char].value;\n}","bBdXzBmxgFFBwMMS":"if(args.opposedTest.attackerTest.item?.isProjectiles && args.applyAP && !args.sureShot)\n{\n if (args.modifiers.ap.value)\n {\n args.sureShot = true;\n args.modifiers.ap.details.push(`${this.effect.name} (Ignore ${this.item.Advances})`)\n args.modifiers.ap.ignored += this.item.Advances;\n }\n}","bDS62ctjfnTU4xIu":"return args.skill.name !== game.i18n.localize(\"NAME.Leadership\")","bEVlJOOA1kLlzpWx":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 0,\n \"s\" : 5,\n \"t\" : 15,\n \"i\" : 20,\n \"ag\" : 15,\n \"dex\" : 20,\n \"int\" : 35,\n \"wp\" : 30,\n \"fel\" : 10\n}\nlet skills = [\"Focalisation\", \"Calme\", \"Esquive\", \"Divertissement (Narration)\", \"Intuition\", \"Langue (Magick)\", \"Commandement\" , \"Savoir (Magie)\" , \"Savoir (Théologie)\", \"Perception\"]\nlet skillAdvancements = [20, 25, 20, 25, 30, 25, 15, 20, 10, 30]\nlet talents = [\"Harmonisation Aethyrique\", \"Magie des Arcanes\", \"Diction Instinctive\", \"Diction Instinctive\", \"Chance\", \"Sens de la Magie\", \"Menaçant\", \"Magie Mineure\", \"Seconde Vue\", \"Sixième Sens\"]\nlet trappings = [\"Arme simple\", \"(2M) Bâton de combat\", \"Ritual Dress incorporating many ingredients and fetishes\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n items.push({name : trapping, type : \"trapping\", \"system.trappingType.value\" : \"clothingAccessories\"})\n //ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","bL98Sr1TRLMPEdlk":"if (args.test.failed)\n{\n\tthis.actor.addCondition(\"fatigued\");\n}","bLkt8VpTTPoTxW0W":"if (args.opposedTest.result.hitloc.value == \"body\" && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 1);\n this.script.notification(\"Etat Hémorragique ajouté\")\n}\n","bMEFHPCei2evnZZw":"// Victims that take at least 1 Wound from a Fell Dagger\n// immediately take a Poisoned Condition \n// resisted with a Difficult (-10) Résistance Test. \n\n// TODO: Add Venin strength to message\n\nif (args.totalWoundLoss > 0) \n{\n args.actor.addCondition(\"poisoned\")\n this.script.message(`\n ${this.effect.name}:
\n ${args.actor.name} has been given a @Condition[Poisoned] Condition, which can be resisted with a Difficult (-10) Résistance Test.`, \n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n","bNhpJPWwoHLq68zD":"let actor = await DragDialog.create({title : this.effect.name, text : \"Fournissez un Acteur tatoueur (fermer pour ignorer les Tests)\"})\n\nif (!actor)\n{\n this.script.notification(\"Tests ignorés pour appliquer les tatouages\");\n if (await foundry.applications.api.Dialog.confirm({\n window: {title: this.effect.name},\n content : \"

Apply Ward of Grimnir effet?

\"\n }))\n {\n return;\n }\n else \n {\n return false;\n }\n}\n\n\nlet failed = false;\nif (this.actor.itemTags.skill.find(i => i.name == \"Savoir (Théologie)\"))\n{\n let test = await this.actor.setupSkill(\"Savoir (Théologie)\", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"vhard\"}})\n await test.roll();\n if (test.failed)\n {\n failed = true;\n }\n}\nelse \n{\n this.script.notification(\"Compétence Savoir (Théologie) introuvable, impossible de continuer.\")\n failed = true;\n}\n\nif (this.actor.itemTags.skill.find(i => i.name == \"Lore (Runes)\"))\n {\n let test = await this.actor.setupSkill(\"Lore (Runes)\", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\n await test.roll();\n if (test.failed)\n {\n failed = true;\n }\n }\n else \n {\n this.script.notification(\"Compétence Savoir (Runes) introuvable, impossible de continuer.\")\n failed = true;\n }\n\n\n let test = await this.actor.setupSkill(\"Art (Tattooing)\", {appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed)\n {\n failed = true;\n }\n\n if (failed)\n {\n this.script.message(\"Un ou plusieurs Tests pour appliquer les tatouages ont échoué.\")\n return false;\n }\n else\n {\n return true;\n }","bQyVajMN1ETwlzvM":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.aE3pyW20Orvdjzj0\")\nlet data = item.toObject();\nlet target = await game.wfrp4e.tables.rollTable(\"fixations\")\nif (target)\n{\n data.system.specification.value = target.result\n this.script.notification(target.result);\n}\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","bRiFHPC1StKxqNIC":"if (isNaN(parseInt(this.item.system.specification.value))) {\n let value = await ValueDialog.create({title : \"Valeur de Robustesse\", text : \"Entrez la valeur de Robustesse\"});\n if (value) {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","bRtZH0xRh8dgqMeW":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW\")\nlet data = item.toObject();\ndata.system.specification.value = 7 - this.actor.characteristics.s.bonus\ndata.name = item.name.replace(\"(Feature)\", \"\");\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","bT4gLrE3W36DIP4k":"if (args.applyAP && args.modifiers.ap.metal && args.alreadyPenetrating)\n {\n args.modifiers.ap.ignored += 1\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignore +1 PA d'armure en métal\");\n args.modifiers.ap.metal--;\n }","bWr8leucbWslBCYG":"return args.characteristic != \"s\"","bgLeMqihLya2iobP":"const river = this.actor.itemTags.template.find(t => t.name === \"River Troll\");\n\nif (!river) {\n args.options.abortItemCreation = true;\n this.script.notification(\"Peut seulement être appliqué à un Troll des Rivières.\", 'warning');\n}","bh2qDCKiAIWM0UPi":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"))","bhXUW7IJtEaUGAoV":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll(); \nif (test.failed)\n{\n this.actor.addCondition(\"prone\");\n}\n ","bidoOQSAofp4NPf6":"return args?.skill?.name !== game.i18n.localize(\"NAME.Cool\")","bkbWgG9COvZWZbAX":"args.context.addChargingDice = true;","brNRqfpPqD2Ki0cM":"args.prefillModifiers.modifier -= 10","btPrQkGRKUkhNe3N":"return args.skill?.name == \"Métier (Apothicaire)\"","bwtQOSWn120NICkf":"let test = await this.actor.setupCharacteristic(\"ag\", {fields : {difficulty : \"hard\"}});\nawait test.roll();\n\nif (test.failed)\n{\n await this.actor.addCondition(\"bleeding\")\n await this.actor.addCondition(\"entangled\")\n}","bwx9wuEOJPF7btD1":"return args.skill?.name != game.i18n.localize(\"NAME.Navigation\");","bzaoWcieMFaU5B5l":"return !this.actor.flags.useless[this.item.system.location.key] || [\"fel\", \"wp\", \"int\", \"t\"].includes(args.characteristic)","c31hjp7k0hlpdGBC":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.yRhhOlt18COq4e1q\");\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","c3KA1knL2NYNUEww":"return args.skill?.name != game.i18n.localize(\"NAME.Evaluate\");","c7HTWfg3CbjN9e1M":"this.actor.name = this.actor.name.replace(\"Common Troll\", \"Troll\");","c9xxdOCaQSwooK8n":"if (!this.actor.has(\"Bénédiction de Bataille\",\"prayer\")) this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.ElmLfnrXliStS9CP\", this.effect)","cAKqUBuJBsU85erO":"return args.skill?.name !== game.i18n.localize(\"NAME.Stealth\");","cAioHYtlxuOCwRLh":"let ablaze = Number(args.opposedTest.attackerTest.result.SL) + 1\nargs.actor.addCondition(\"ablaze\", ablaze)","cApfxL7Ic0NKdoSr":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.rOV2s6PQBBrhpMOv\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","cBSy9CR5NZvcLRg8":"\n args.prefillModifiers.modifier += 0;\n args.prefillModifiers.slBonus += 0;\n args.prefillModifiers.successBonus += 0;\n ","cC7jjJDSVPi5BJUq":"if (this.item.equipped.value) {\n this.actor.system.status.addArmour(1, {source: this.effect})\n}","cDBhmHn5kjgWBAlT":"let num = (this.effect.sourceTest.result.overcast.usage.other.current || 1)\n\nthis.actor.addCondition(\"entangled\", num)","cEg09bnvZD6Ysnpc":"let item = await fromUuid(\"Compendium.wfrp4e-archives2.items.anIlqJXFOIEzIOo1\")\nlet data = item.toObject();\ndata.name = this.item.name;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","cJFDnq1HI4gXWcJo":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = await ValueDialog.create({text: \"Entrez la valeur de Protection\", title : this.effect.name});\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","cK1Jysfu5IMUUH0C":"if (!args.ward)\n{\n\targs.ward = (this.effect.getFlag(\"wfrp4e\", \"ward\") || 0);\n\tif (args.wardRoll >= args.ward && args.ward > 3)\n {\n let newWard = Math.max(3, args.ward - 1)\n this.script.message(\"Protection améliorée à \" + newWard)\n this.effect.setFlag(\"wfrp4e\", \"ward\", newWard)\n }\n\n}","cOuukVo8WakDZIUj":"args.prefillModifiers.slBonus += 1","cTYNaKbepMwqYsZ8":"\n let difficulty = \"\"\n if (this.effect.name.includes(\"Moderate\"))\n difficulty = \"easy\"\n else if (this.effect.name.includes(\"Severe\"))\n difficulty = \"average\"\n else\n difficulty = \"veasy\"\n \n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {context : {failure : this.actor.name + \" dies from Blight\"}, fields: {difficulty}, appendTitle : \" - Blight\"})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"dead\");\n }\n ","cUFCL02JoaZObRcX":"let sl = this.effect.sourceTest.result.slOver;\n\nthis.actor.system.characteristics.s.modifier += sl * 10;\nthis.actor.system.characteristics.s.calculationBonusModifier -= sl;","cUnbADgOQ4fMKgrH":"let group\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN\");\nlet data = item.toObject();\n\nif (this.item.name.includes(\"(\"))\n{\n\tgroup = this.item.parenthesesText\n}\n\nelse\n{\n\tgroup = await ValueDialog.create({text : \"Entrez le Groupe de Haine\", title : \"Groupe de Haine\"})\n\n\tthis.item.updateSource({name : this.item.name + ` (${group})`, \"system.tests.value\" : this.item.system.tests.value.replace(\"Group\", group)})\n\tthis.effect.updateSource({name : this.effect.name + ` (${group})`})\n}\n\n\ndata.name = data.name.replace(\"Cible\", group);\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id});","cV9JiAgUPOeUHKnS":"args.fields.successBonus++;\nif (args.skill?.name != game.i18n.localize(\"NAME.SleightOfHand\"))\n{\n args.fields.modifier += 10;\n}","cW8ZuQ9YIUG5uvhf":"return args.characteristic != \"t\";","cYPIXzl86a3LFsTE":"if (args.item.type == \"spell\")\n{\n args.item.cn.value -=2\n if (args.item.cn.value < 0)\n args.item.cn.value = 0\n}","cZVrzR4fxV86lxNW":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.yrkI7ATjqLPDTFmZ\")\nlet res = item.toObject();\nres.system.specification.value = 1;\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.mNoCuaVbFBflfO6X\")\nlet ss = item.toObject();\nawait this.actor.createEmbeddedDocuments(\"Item\", [res, ss], {fromEffect : this.effect.id})","cgmA2N0MkjA7qIZy":"return args.type != \"cast\" || args.item?.system.lore?.value != \"shadow\"","ch5SD2XOQfcYo0X5":"if (args.sizeDiff <= -2 && args.opposedTest.attackerTest.result.critical)\n args.damageMultiplier = Math.abs(args.sizeDiff)\n\n let sBonusDiff = args.opposedTest.defenderTest.actor.characteristics.t.bonus - args.opposedTest.attackerTest.actor.characteristics.s.bonus\n let weapon = args.opposedTest.attackerTest.item\n if (sBonusDiff > 0 && weapon && weapon.damage.value.includes(\"SB\"))\n {\n args.damage += sBonusDiff\n args.breakdown.other.push({label : this.effect.name, value : sBonusDiff});\n }","chUpiI3el8IO8MSs":"if (args.opposedTest.attackerTest.item?.name.includes(\"Morsure\"))\n{\n let woundsGained = args.totalWoundLoss;\n this.script.message(`Gains ${woundsGained} Wounds`, { whisper: ChatMessage.getWhisperRecipients(\"GM\") })\n this.actor.modifyWounds(woundsGained)\n}","cipTp0OS2bfKLjZS":"if (args.totalWoundLoss > 0) {\n await args.actor.addCondition(\"bleeding\")\n await args.actor.addCondition(\"poisoned\")\n}","ckKbPfaTiQ2qBZdR":"console.log(\"DAMAGE\", this)","clO7l82UYMJ4XVks":"args.context.giantbane = true","cqYgZQk1C3kMARy5":"return args.skill?.name !== game.i18n.localize(\"NAME.Haggle\");","csLKDJKZaUK9vwLT":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.7rBhIRo96Mydo0Cv\")\nlet data = item.toObject();\ndata.system.location.value = \"Back\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n","ct6WGaRMfrcnHhyv":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nlet data = item.toObject();\ndata.system.specification.value = 2;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","cuqCtQsfLBBAGjnu":"args.fields.slBonus -= (Number(this.item.specification.value) || 0)","cxgGYbuiXM3NxIOI":"if (args.test.options.flags.skewering)\n{\n args.test.preData.roll = 1;\n}","cysQDjlDzT8HdNeo":" args.prefillModifiers.slBonus += 1","czZI8S09By0Mqlsr":"return (args.skill?.name == undefined || args.item?.skillToUse?.name != args.skill?.name)","d29mu8vRt9AQUm0L":"this.actor.characteristics.i.value = Math.min(this.actor.characteristics.i.value, 10);\nthis.actor.characteristics.i.bonus = 1;\n\nfor(let skill of this.actor.itemTypes.skill.filter(i => i.system.characteristic.value == \"i\"))\n{\n skill.system.total.value= Math.min(skill.system.total.value, 10)\n}","d6mVm08o8SeklAcW":"this.actor.system.status.ward.value = 9;","d90GpOWwleOgTbOS":"this.actor.system.status.addArmour(5, {source: this.effect})","d9iU08yvqcffF026":"return args.weapon.system.usesHands.includes(this.effect.getFlag(\"wfrp4e\", \"location\"))","dAMtbn3uQwF8KpKU":"return args.skill?.name != game.i18n.localize(\"NAME.Charm\") && args.skill?.name != game.i18n.localize(\"NAME.Gossip\");","dEx8xfG7VLbN69Ha":"if (!this.item.system.properties.flaws.reload) return;\n\nconst minReload = this.item.system.properties.qualities?.salvo ? 1 : 0;\nconst originalReload = this.item.system.properties.flaws.reload.value;\nconst runesOfReloading = Number(this.item.effects.contents.filter(e => e.name == this.effect.name).length);\nconst newReload = Math.max(originalReload - (2 * runesOfReloading), minReload);\n\nif (newReload) {\n this.item.system.properties.flaws.reload.value = newReload;\n this.item.system.properties.flaws.reload.display = `${game.i18n.localize(\"PROPERTY.Reload\")} ${newReload}`;\n}\nelse {\n delete this.item.system.properties.flaws.reload\n}","dIxYt421K010eogY":"\n let modifier = 0\n if (this.effect.name.includes(\"Moderate\"))\n modifier = -20\n else\n modifier = -10\n args.fields.modifier += modifier\n ","dM449AU0FQRnOc3l":"if (args.opposedTest.result.hitloc.value == \"head\")\n{\n args.abort = \"Missed - Headless\"\n}","dM8FbRH2V8CpOkXw":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.QluSTTTq3viHJJUh\")\nlet data = item.toObject();\ndata.system.location.value = \"Ribs\";\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","dMeSZGdvw7zlnUKh":"return args.characteristic != \"wp\" && !args.context.terror && !args.extendedTest?.flags.wfrp4e?.fear","dSie82gBJoln1V2i":"await this.actor.hasCondition(\"broken\")?.delete();\nawait this.actor.hasCondition(\"fatigued\")?.delete();\n\nlet healed = this.effect.getFlag(\"wfrp4e\", \"handOfGlory\")?.roll || 0;\nthis.actor.modifyWounds(healed)\nthis.script.message(`Healed ${healed} Wounds`)","dSmRhZ6o1bUcOSF9":"return args.skill?.name != game.i18n.localize(\"NAME.Leadership\");","dULCkRxtisuzQyuK":"if (args.options.condition) \n this.effect.delete();","dVF5ywnzeiZQx9ke":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {fields : {difficulty : \"hard\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed) \n{\n\tthis.script.scriptMessage(await this.actor.applyBasicDamage(15, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))\n}","dWr3tkFoIzsAgelu":"let injury = this.effect.itemTargets[0]\nif (injury && this.effect.sourceTest.result.outcome == \"success\") {\n let days = new Roll(injury.system.duration.value).evaluateSync().total\n let num = 1 + Number(this.effect.sourceTest.result.SL);\n let roll = await new Roll(num+'d10').roll()\n await roll.toMessage(this.script.getChatData())\n let newDays = Math.max(days - roll.total, 1)\n this.actor.updateEmbeddedDocuments(\"Item\", [{_id: injury.id, 'system.duration.value': newDays} ])\n let message = \"Blessure réduite à \"+newDays+\" (-\" + roll.total + \") au lieu de \"+days\n this.script.message(message)\n}\n","dXGosSxdoYbET2O8":"await this.actor.addCondition(\"fatigued\");\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"))\n\nawait test.roll();\n\nif (!test.succeeded)\n{\n await this.actor.addCondition(\"fatigued\");\n await this.actor.addCondition(\"broken\");\n}","dZ4c5pKDqQV02aIK":"if (args.effect.conditionId == \"ablaze\")\n{\n args.data.formula += ` + parseInt(this.effect.sourceTest.result.SL)`\n}","dbHv7dAXgB2Oy1Fg":"let nbBleeding = 1 + Number(this.effect.sourceTest.result.SL);\nthis.actor.removeCondition(\"bleeding\", nbBleeding);\nconsole.log(this.actor);\n","dbOSvpgcPjsc2uvq":"let menacing = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.0hn6UaKq8CoZP2zD\")).toObject();\nlet sense = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS\")).toObject();\n\nsense.name += \" (Sight)\";\nsense.system.tests.value = sense.system.tests.value.replace(\"Sense\", \"Sight\")\n\nthis.actor.createEmbeddedDocuments(\"Item\", [menacing, sense], {fromEffect : this.effect.id})","dbYjr4oG67Z880To":"if (args.test.isFumble)\n{\n args.test.result.other.push(\"@Table[warpfire-thrower-fumble]\")\n}","dcwY8dCd3PNCEzk6":"let current = this.actor.status.fate.value\n\nthis.actor.update({\"system.status.fate.value\" : current + 1})\n\nthis.script.message(`${this.actor.prototypeToken.name} fate points increased from ${current} to ${current + 1}`)","dfEgat3jz4EtWszH":"return args.skill?.name == `${game.i18n.localize(\"NAME.Stealth\")} (${game.i18n.localize(\"SPEC.Urban\")})`","dfnCK8jCPXNLM7Gh":"let aoeDamage = this.effect.sourceTest.result.damage - 5 // Easily handle magic missile damage by just subtracting 5 from the item's (which has +10 base)\n\nthis.script.message(await this.actor.applyBasicDamage(aoeDamage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}))\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - Ablaze`})\n\nawait test.roll();\n\nif (!test.succeeded)\n{\n this.actor.addCondition(\"ablaze\");\n}","dh5mAlaOOLCBC0YQ":"args.actor.system.details.length.value += args.actor.system.details.length.value * 0.1;","dk02qSJfJaIo3Geh":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.EO05HX7jql0g605A\");\nlet data = item.toObject();\ndata.system.specification.value = this.actor.characteristics.ag.value\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","dkY7WRYjFVh8GB0m":"return ['ws', 'bs', 'ag'].includes(args.characteristic)","dkiNmwFXztIVbuxg":"let currentCareer = this.actor.system.currentCareer;\n\nif (!currentCareer || currentCareer.system.talents.includes(game.i18n.localize(\"NAME.Frenzy\")))\n{\n return\n}\n\ncurrentCareer.system.talents.push(game.i18n.localize(\"NAME.Frenzy\"));","dqvHDMlcitLx1pUx":"this.actor.system.details.move.value /= 2;","dr9VJKGY3TeGuzXj":"this.script.message(`Allies of ${this.actor.name} gain +20 Initiative for the first round.`)","dsXGavzXLerXR8Xg":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Sail\")) && !args.skill?.name.includes(game.i18n.localize(\"NAME.Row\"))","dt85W8pzZ09w1QLi":"if (this.actor.sameSideAs(this.effect.sourceActor))\n args.fields.slBonus += 2;\nelse\n args.fields.slBonus -= 2;","dtFvpY96RPzNnphq":"return !(args.skill?.name == `${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Basic\")})` || (args.type == \"weapon\" && args.item?.system.weaponGroup.value == \"basic\"))","dwSgcFxKN3S0hLJL":"return args.skill?.name != game.i18n.localize(\"NAME.MeleeBrawling\") && args.item?.weaponGroup?.value != \"brawling\"","dxt3p07po06J9fO1":"const metal = () => {\n for (const [key, loc] of Object.entries(this.actor.armour)) {\n if (!loc.layers) continue;\n\n for (const layer of loc.layers) {\n if (layer.metal)\n return true;\n }\n }\n\n return false;\n};\n\nargs.fields.slBonus -= metal() ? 2 : 1;","dxxDFXNNqUsuMyUD":"args.fields.slBonus += 1","e0TuMgYuI7ZtGoQr":"args.applyAP = false;\n\nawait args.actor.addCondition(\"ablaze\", 2);\nawait args.actor.addCondition(\"prone\");","e0eKVlOSk3Vw1HiD":"return args.characteristic != \"wp\" || args.type != \"characteristic\"","e2JlsKoW8oaFjn6Y":"const roll = new Roll(\"1d10\");\n\nawait roll.evaluate();\nroll.toMessage();\n\nconst slBonus = Number(this.effect.sourceTest.result.SL) + roll.total;\n\nthis.effect.setFlag(\"wfrp4e\", \"slBonus\", slBonus);","e34s1XxHckAWfwHt":"if (args.test.options.beatBlade && (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target))\n{\n args.test.result.other.push(`${this.effect.name}: Opponent loses ${Number(args.test.result.SL) + 1} Advantage`)\n}","e3dBud1keWyhw6nw":"const stupid = this.actor.items.find(i => i.name === \"Stupidee\");\n\nif (!stupid) return;\n\n\nif (this.item.system.disabled) {\n await stupid.update({\"system.disabled\": false});\n} else {\n await stupid.update({\"system.disabled\": true});\n}","e4HotRnEiyXR0pIu":"this.actor.applyEffect({effectUuids : this.item.effects.contents[1].uuid})","e7IxnxePdXSy6L4E":"if (args.opposedTest.result.hitloc.value == \"head\")\n{\n this.script.message(`${this.actor.prototypeToken.name} receives a @Table[crithead]{Critical Wound} if one was not caused already.`)\n}","eAtqyBd1HsDWuBuI":"this.actor.system.characteristics.fel.modifier -= parseInt(this.item.system.location.value) || 1","eC61buStv62b3sN9":"args.fields.slBonus += 8;","eFVDAqG80veYmhpi":"if (Number(this.actor.system.details.age.value) > 870) {\n if ([\"t\", \"i\", \"fel\"].includes(args.characteristic))\n args.fields.slBonus -= 3;\n if ([\"ws\", \"bs\", \"s\"].includes(args.characteristic))\n args.fields.slBonus -= 2;\n} else if (Number(this.actor.system.details.age.value) > 350) {\n if ([\"t\", \"i\"].includes(args.characteristic))\n args.fields.slBonus -= 2;\n if ([\"fel\"].includes(args.characteristic))\n args.fields.slBonus -= 1;\n} else {\n if ([\"t\", \"i\"].includes(args.characteristic))\n args.fields.slBonus -= 1;\n}","eGQAyzCFZAEQhyJl":"const roll = new Roll(\"2d10\");\nawait roll.evaluate();\nconst money = game.wfrp4e.market.addMoneyTo(this.actor, `${roll.total}b`);\nawait this.actor.updateEmbeddedDocuments(\"Item\", money);\nthis.script.message(game.i18n.format(\"SCRIPT.Silvertide\", {name: this.actor.name, pennies: roll.total}));","eHRv7f2BTtle6Y1K":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.sJ3yX1kvzu2hgNq5\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","eHgk3HZ6eyLFTZ9o":"return !args.item?.system.magicMissile?.value && !args.item?.system.attackType","eIiiDhJohYez26qY":"const {targetUuid} = this.effect.flags.wfrp4e;\n\nif (args.actor.uuid !== targetUuid) return;\n\nconst recordedWounds = this.effect.getFlag(\"wfrp4e\", \"damageToReturn\");\n\nif (!recordedWounds) return;\n\nargs.modifiers.other.push({label: this.effect.name, value: recordedWounds});\nargs.totalWoundLoss += recordedWounds\n\nthis.effect.unsetFlag(\"wfrp4e\", \"damageToReturn\");","eLxdRg8LX3AdYSEq":"let sumArmour = 0;\nfor (let key in this.actor.system.status.armour) {\n let armour = this.actor.system.status.armour[key];\n sumArmour += Number(armour?.value || 0);\n}\nlet damage = Math.floor(Number(sumArmour)/2);\nif (damage > 0 ) { \n\tthis.script.scriptMessage(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))\n}","ePPgxQOqL1Uhz2k9":"let addOption = await foundry.applications.api.DialogV2.confirm({\n window : {title : \"Option\"},\n content :\n `\n Ajouter une option?\n

\n Projectile (Arc) +10 et un Arc long avec 12 flèches\n

\n `,\n})\n\nlet choice = []\n\nif (addOption)\n{\n choice = [\n {\n type : \"skill\",\n name : \"Projectile (Arc)\",\n diff : {\n system : {\n advances : {\n value : 10\n }\n }\n }\n },\n {\n type : \"weapon\",\n name : \"Arc long\",\n },\n {\n type : \"ammunition\",\n name : \"Flèche\",\n }\n ];\n}\n\n\n\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n let equip = item.system.tags.has(\"equippable\");\n item = item.toObject()\n if (equip)\n {\n item.system.equipped.value = true;\n }\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","ePv2YYcr4lz3AkGu":"args.item.range.bands[game.i18n.localize(\"Long Range\")].modifier = 0\nargs.item.range.bands[game.i18n.localize(\"Extreme\")].modifier = 0","eRVVn8YtU8nnOW2q":"await this.actor.addCondition(\"prone\");\n\nconst test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {\n skipTargets: true,\n appendTitle: ` - ${this.effect.name}`,\n fields: {difficulty: \"difficult\"},\n context: {\n failure: `Encaisse 8 dégâts.`,\n success: `Encaisse 4 dégâts.`\n }\n})\n\nawait test.roll();\nconst damage = test.failed ? 8 : 4;\n\nawait this.actor.applyBasicDamage(damage, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, loc: \"roll\"});","eTHJSRutCEpuyPkR":"return args.weapon?.system?.attackType !== \"melee\" || game.settings.get(\"wfrp4e\", \"useGroupAdvantage\")","eViKAYOtuaOqo6c7":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.ConsumeAlcohol\"))","eWWLmA2xINR321aK":"args.item.system.qualities.value.push({name : \"magical\"})","eWvHTkxsjKuH2IKm":"const luck = Number(this.item.qualities.value.filter(v => v.key == \"luck\")[0].description)\n\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.u0CFf3xwiyidD9T5\")\n\nfor (let i = 0; i < luck; i++) {\n let data = item.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n}","eb69QPmNQEJXtk4l":" return args.characteristic != \"bs\"","ebDQH0MdGAG02CHl":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.SYjWiKDzMS6CtROJ\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nif (this.item.system.location.key == \"rArm\")\n{\n\tdata.system.location.value = \"Right Hand\"\n\tdata.system.location.key = \"rHand\"\n}\nelse if (this.item.system.location.key == \"lArm\")\n{\n\tdata.system.location.value = \"Left Hand\"\n\tdata.system.location.key = \"lHand\"\n}\nthis.actor.createEmbeddedDocuments(\"Item\", [data])","ecpD6KWtNjMCvuyn":"if (args.test.isCritical || args.test.isFumble)\n args.test.result.tables.miscast = {\n label : game.i18n.localize(\"ROLL.MajorMis\"),\n class : \"fumble-roll\",\n key : \"majormis\",\n }\ndelete args.test.result.critical;\ndelete args.test.result.tables.critical;","ed7Sud9HM3uB2j6b":"ChatMessage.create({content : \"Yield or die!\", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true})\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn\")\nlet data = item.toObject();\ndata.system.specification.value = 2;\nthis.script.notification(\"Ajout de \" + data.name);\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id});\ngame.wfrp4e.utility.postPeur(2, this.actor.prototypeToken.name)","egDtqMxe3iekc6hv":"let trait = args.opposedTest.attackerTest.item\nlet woundLossEffect = this.item.effects.get(\"7Amhi75wLv0PvGjd\")\nif (trait && trait.name.includes(\"Morsure\") && woundLossEffect)\n{\n args.actor.applyEffect({effectUuids : woundLossEffect.uuid})\n}","egc02UIueJgEQMqx":"args.context.kingship = true","eh1J3s0s4A2AxoFp":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.8pVzgPkgWpTJvfhG\");\nlet data = item.toObject();\ndata.name += \" (Ennemi)\";\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","eieFcF4BxIvDTN3C":"args.abort = `Cannot perform Projectiles Attacks within ${this.effect.name}`;","ekjJQHyMbZT2vqdc":"let uses = this.item.getFlag(\"wfrp4e\", \"uses\") || 0;\nuses++;\nthis.script.notification(`Utilisé ${uses} fois`)\nthis.item.setFlag(\"wfrp4e\", \"uses\", uses);\nif (uses >= 3)\n{\n\tthis.effect.update({\"system.transferData.type\" : \"other\"})\n\tthis.script.notification(`Utilisé`);\n}\n","eq32dKXeTAbKhhLf":"if (args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"ablaze\", Math.max(1, parseInt(args.opposedTest.attackerTest.result.SL) + 1))\n}","eqxE7nBO13yJS7hc":"let roll = (await new Roll(\"1d10\").roll())\nroll.toMessage({flavor: \"Blessures soignées\", speaker : {alias : this.actor.name}})\n\nthis.actor.modifyWounds(roll.total)\n\nthis.actor.hasCondition(\"bleeding\")?.delete();","esuLwq4g5T8k1kLT":"await args.actor.addCondition(\"ablaze\"); await args.actor.addCondition(\"prone\");","eu4mHsdZukvUEAGJ":"let token = this.actor.getActiveTokens()[0]?.document;\nif (!token) {\n token = this.actor.prototypeToken\n}\nif (args.equipped) {\n this.effect.setFlag(\"wfrp4e\", \"lightData\", token.light);\n token.update({\n light: {\n \"alpha\": 0.8,\n \"angle\": 360,\n \"bright\": 5,\n \"color\": \"#a33c0f\",\n \"coloration\": 1,\n \"dim\": 20,\n \"attenuation\": 0.5,\n \"luminosity\": 0.5,\n \"saturation\": 0,\n \"contrast\": 0,\n \"shadows\": 0,\n \"animation\": {\n \"type\": \"torch\",\n \"speed\": 8,\n \"intensity\": 4,\n \"reverse\": false\n }\n }\n })\n}\nelse {\n token.update({light: this.effect.getFlag(\"wfrp4e\", \"lightData\")});\n}","eyrUJQAuHvdllCwi":"args.context.flags.skewering = true;\nthis.effect.update({disabled: true});","ezGqDoC9hNRBnFTB":"let choices = await Promise.all([warhammer.utility.findItemId(\"1zaqojk0Oq1m8vYv\"), warhammer.utility.findItemId(\"zIuarD5mB0EF0ji0\")])\nlet items = await game.wfrp4e.apps.ItemDialog.create(choices, 1, \"Choisir une arme\")\nitems = items.map(i => i.toObject())\n\nitems.forEach(i => i.system.equipped.value = true);\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","f062aa2BNClx08D6":"let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed) \n {\n let toughnessLost = parseInt(this.effect.sourceTest.result.SL)\n\n let currentModifier = this.actor.characteristics.t.modifier\n\n await this.actor.update({ \"system.characteristics.t.modifier\": currentModifier - toughnessLost })\n this.script.message(`${this.actor.prototypeToken.name} lost ${toughnessLost} Toughness`)\n if (this.actor.system.characteristics.t.value <= 0)\n {\n this.actor.addCondition(\"dead\");\n }\n\n }","f29Pv6TQtgILxt1h":"if (args.test.options.healWounds) {\n if (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target) {\n let wounds = this.actor.characteristics.int.bonus + ~~args.test.result.SL\n if (args.test.options.fieldDressing && args.test.result.reversed)\n wounds = this.actor.characteristics.int.bonus + Math.min(1, Number(args.test.result.SL))\n\targs.test.result.woundsHealed = wounds\n\targs.test.result.other.push(`${this.actor.name} guéri ${wounds} Blessures du patient.`)\n }\n else if (this.actor.characteristics.int.bonus + args.test.result.SL < 0)\n args.test.result.other.push(`The patient contracts a @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Minor Infection}.`)\n}","f3rXusHh6VIpVPUl":"return !args.skill?.name?.includes(game.i18n.localize(\"NAME.Language\")) && args.type != \"cast\"","f4vvAGQ8OGoEbrgy":"let SL = args.opposedTest.attackerTest.result.SL - args.opposedTest.attackerTest.item.cn.value\nlet difficulty = \"challenging\"\nif (SL >= 1)\n difficulty = \"difficult\"\nif (SL >= 2)\n difficulty = \"hard\"\nif (SL >= 3)\n difficulty = \"vhard\"\n\n\nlet test = await args.actor.setupCharacteristic(\"wp\", {fields: {difficulty}, skipTargets: true, appendTitle : \" - \" + this.effect.name, context : {failure: \"Reçoit un état Sonné\"}})\nawait test.roll();\nif (test.failed)\n{\n args.actor.addCondition(\"stunned\");\n}","f5Mp3kXwCFdPkW6N":"return args.skill?.name != `${game.i18n.localize(\"NAME.Entertain\")} (${game.i18n.localize(\"SPEC.Sing\")})` && args.skill?.name != `${game.i18n.localize(\"NAME.Entertain\")} (${game.i18n.localize(\"SPEC.Singing\")})` && !args.skill?.name.includes(game.i18n.localize(\"NAME.Language\"));","f6WnrJvoNkfoNN9Y":"return args.item?.attackType != 'melee'","f7WZvYle9iqefRsh":"return args.weapon?.system?.attackType != \"melee\"","f8cnfvGKJH3bYVGN":"return [\"s\", \"t\"].includes(args.characteristic)","fA1dIV1ANo4RVEqy":"if (args.equipped) \n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.4mF5Sp3t09kZhBYc\");\n let champion = item.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [champion], {fromEffect : this.effect.id})\n} \nelse \n{\n this.effect.deleteCreatedItems();\n}","fC4KcY9S6V30IJyX":"args.context.supercharge = true;","fEFfHFeJxkR0aIJK":"if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 3 && args.opposedTest.result.winner == \"attacker\")\n{\n this.script.message(`Quiconque dans un rayon de 6 mètres per 1 Blessure and doit effectuer un test Difficile (-10) de Résistance ou recevoir un état @Condition[Deafened]`, {blind : true, whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}\n","fEyKQqCjDwml3DXO":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.M8XyRs9DN12XsFTQ\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","fFGuTi0HLjwneMcJ":"return args.item?.system.isProjectiles","fFi9JD4uCY9DPC5B":"let specification = Number(this.item.specification.value) || 1;\nargs.actor.system.characteristics.t.initial += 10 * specification;\nargs.actor.system.status.carries.max -= Math.floor(args.actor.system.status.carries.max * 0.1 * specification);\nargs.actor.system.details.price.gc += Math.floor(args.actor.system.details.price.gc * 0.1 * specification);","fIUxKZMWJ8HMPmH9":"return [\"wp\", \"ag\", \"i\", \"int\"].includes(args.characteristic)","fKzlu6fFE2th9uIJ":"return args.item?.name == game.i18n.localize(\"NAME.ConsumeAlcohol\")","fLg90csmdOOKmEE6":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.EO05HX7jql0g605A\")\nlet data = item.toObject();\ndata.system.specification.value = 16\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.Bvd2aZ0gQUXHfCTh\")\nlet data = item.toObject();\ndata.system.specification.value = 8\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","fNUiKELi9e1vg7KY":"args.actor.removeCondition(\"fatigued\", 99);\nargs.actor.removeCondition(\"bleeding\", 99);","fP2edYbj6QjPPAjL":"return [game.i18n.localize(\"NAME.CharmAnimal\"), game.i18n.localize(\"NAME.Endurance\"), game.i18n.localize(\"NAME.OutdoorSurvival\")].includes(args.skill?.name)","fPKYkBllp7Et62lX":"if (args.test.spell.name == \"Warp Lightning\")\n{\n args.test.preData.reversal = {allowed : true, if: \"better\"};\n}","fSDFCHAo97RLpwGU":"const hitLocation = args.test.hitloc.result\nconst hitLocationArmour = args.test.targets[0].armour[hitLocation]\n\nif (hitLocationArmour.layers.length > 0) {\n hitLocationArmour.layers.forEach(layer => {\n layer.source.system.qualities.value = [];\n layer.impenetrable = false;\n });\n}","fSTjJIqg5tvbwxKt":"const uuid = \"Compendium.wfrp4e-core.items.Item.ahlxlfIl8xUhBkic\";\nconst item = await fromUuid(uuid);\nconst data = item.toObject();\ndata.name = this.effect.name;\ndata.system.equipped.value = true;\n\nconst effectData = this.effect.sourceItem.effects.find(e => e.disabled).toObject();\neffectData.disabled = false;\ndata.effects = [effectData];\n\nconst dagger = await this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id});","fTw3mpSUOlkqVVUC":"this.actor.applyEffect({effectUuids : this.item.effects.contents[0].uuid})","fUD4gMdKe6P3sFdJ":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.Zh68gzYMLW8vZgVo\", this.effect)","fY0TsQwnU14fdPl2":"args.fields.modifier += 30;","fYLSe6CrYciap5y8":"let characteristics = {\n \"ws\" : 0,\n \"bs\" : 0,\n \"s\" : 10,\n \"t\" : 10,\n \"i\" : 0,\n \"ag\" : 10,\n \"dex\" : 0,\n \"int\" : 0,\n \"wp\" : 0,\n \"fel\" : 0\n}\nlet skills = [game.i18n.localize(\"NAME.ConsumeAlcohol\"), game.i18n.localize(\"NAME.Row\"), game.i18n.localize(\"NAME.Sail\"), game.i18n.localize(\"NAME.Swim\")]\nlet skillAdvancements = [10, 10, 10, 10]\nlet talents = []\nlet trappings = []\nlet items = []\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","faRFSsrQylQRZFLk":"return args.bleedingHand || !args.weapon || !this.actor.hasCondition(\"bleeding\")","fcY3pa72dELnOFXV":"return !args.context.reload\n","feMPZhhFeXRtKdKY":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectUuids : this.item.effects.contents[0]?.uuid})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","ffvcCEazZBinHlUX":"args.update({texture : {tint : \"#FFD700\"}});\n","fiF9sM5UpcHMYa33":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.vMYEkrWj0ip6ZOdv\");\nlet data = item.toObject();\ndata.name += \" (Poison, Disease, Chaos)\"\nthis.actor.createEmbeddedDocuments(\"Item\", Array(this.effect.sourceTest.result.overcast.usage.other.current).fill(data), {fromEffect: this.effect.id})","fkFmNcesqqNTMhVn":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.2iult41Jehz0F1O8\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key;\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","fl762icfKrt9ear2":"this.actor.removeCondition(\"broken\", parseInt(this.effect.sourceTest.result.SL)+1)","fq2fqlWlrVfitkcB":"let characteristics = {\n \"ws\" : 0,\n \"bs\" : -200,\n \"s\" : 20,\n \"t\" : 20,\n \"i\" : 0,\n \"ag\" : -5,\n \"dex\" : -5,\n \"int\" : 0,\n \"wp\" : 0,\n \"fel\" : 0\n}\nlet traits = [ {name:\"Corruption\"}, {name:\"Insensible à la douleur\"}, {name:\"Stupidee\"}, {name:\"Nuée\"}, {name:\"Bestial\", disabled : true}, {name:\"Régénération\", disabled : true}, {name:\"Taille\", value: \"Large\", disabled : true}, {name:\"Territorial\", disabled: true} ];\nlet items = [];\n\nlet updateObj = this.actor.toObject();\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let trait of traits)\n{\n let traitItem = await game.wfrp4e.utility.find(trait.name, \"trait\")\n if (traitItem)\n { \n let t = traitItem.toObject();\n t.system.specification.value = trait.value;\n if (trait.disabled)\n {\n t.system.disabled = true;\n }\n items.push(t);\n }\n else \n {\n ui.notifications.warn(`: -200\n}\nlet traits = [ {name:`, {permanent : true})\n }\n}\n\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n\n","ft0LaRWZT5WtnptP":"let advantage = this.actor.system.status.advantage.value;\nif (advantage > 0)\n{\n await this.actor.setAdvantage(0);\n this.script.notification(\"Avantage retiré\")\n}\nelse \n{\n return this.script.notification(\"Avantage retiré\", \"error\")\n}\n\nlet test = await this.actor.setupTrait(this.item, {fields : {slBonus : advantage}})\nawait test.roll();","fve7tiyF5X9B7mHJ":"args.fields.slBonus -= 2;","fwiBeetIsvpXKtUc":"scatter = await game.wfrp4e.tables.rollTable(\"scatter\");\n\nif (scatter.roll == 9 || scatter.roll == 10)\n{\n this.script.message(`${scatter.roll}: Failed to Scatter`);\n}\nelse \n{\n this.script.message(scatter.result);\n}","fyjYWg7ekj8JJcmq":"if (args.test.result.misfire || args.test.result.fumble)\n{\n args.test.result.other.push(`${this.effect.name}: can be used to Negate Fumble / Raté Effects`)\n}","fzTB7t3x4bLmAXji":"let roll = await new Roll(\"1d10 + 1\").roll()\nawait roll.toMessage(this.script.getChatData());\nthis.script.notification(`Healed ${roll.total} Wounds`)\nthis.actor.corruptionDialog(\"moderate\")\nawait this.actor.modifyWounds(roll.total)","g07HI7vyqiFXPB0o":"// A Drinker must take a Difficult (-10) Endurance Test.\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"difficult\"}})\nawait test.roll()\n// If they fail, they acquire 2 Poisoned Conditions.\nif (test.failed)\n{\n this.actor.addCondition(\"poisoned\", 2)\n this.script.message(`

${this.actor.prototypeToken.name} a reçu 2 états @Condition[Poisoned].

\n

N'importe quelle créature possédant le trait de créature bestiale qui les mord et subit des dégâts ne les mordra pas à nouveau lors d'une rencontre hostile, bien que la créature puisse toujours les attaquer d'autres manières.

`,\n {\n whisper: ChatMessage.getWhisperRecipients(\"GM\"),\n blind: true\n })\n}\n // If they succeed, for a number of rounds equal to 3+ their SL, they have the Corrosive Blood Creature Trait.\nelse if (test.succeeded)\n{\n // Don't attempt to add Corrosive Blood if actor already has it\n const hasCorrosiveBlood = this.actor.has(\"Corrosive Blood\")\n if (hasCorrosiveBlood !== undefined) return\n\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.M5QSWOYt2Rbv2yxW\")\n let data = item.toObject()\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n\n const duration = 3 + parseInt(test.result.SL)\n this.script.message(`

${this.actor.prototypeToken.name} a reçu le trait de créature Sang Corrosif pour ${duration} tours.

`,\n { whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true })\n}","g0SzfsLyW7aD2F19":"if (this.item.system.tests.value.includes(\"(Groupe social)\"))\n{\n let tests = this.item.system.tests.value\n let name = this.item.name\n\n // If name already specifies, make sure tests value reflects that\n if (name.includes(\"(\") && !name.toLowerCase().includes(\"(any)\"))\n {\n let group = name.split(\"(\")[1].split(\")\")[0]\n tests = `${tests.split(\"(\")[0].trim()} (${group})`\n }\n else\n {\n let value = await ValueDialog.create({text : \"Entrez le Groupe d'Étiquette\", title : this.effect.name});\n if (value)\n {\n name = `${name.split(\"(\")[0].trim()} (${value})`\n tests = this.item.system.tests.value.replace(\"Groupe social\", value);\n }\n }\n this.item.updateSource({name, \"system.tests.value\" : tests})\n}","g1L8OYO9nCOhdKGL":"// Everything within Fellowship Bonus yards \n// of the target point is splashed with mystic poison, \n// suffering 1d10 + SL damage which ignores Armour Points\n\nlet damage = (await new Roll(`1d10 + ${parseInt(this.effect.sourceTest.result.SL)}`).roll())\n\nawait damage.toMessage(this.script.getChatData())\n\nthis.script.message(await args.actor.applyBasicDamage(\n damage.total,\n {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}\n))\n\n// ... and gains the Poisoned Condition\n\nthis.actor.addCondition(\"poisoned\")","g4t56A09yrpZaJQ2":" let amberTalons = foundry.utils.deepClone(game.wfrp4e.config.systemItems.unarmed);\n amberTalons.name = \"Serres d'ambre\";\n amberTalons.img = this.effect.img;\n amberTalons.system.damage.value = \"SB + WPB\"\n amberTalons.system.equipped = true;\n amberTalons.system.qualities.value.push({name : \"magical\"})\n amberTalons.effects.push({\n name : \"Serres d'ambre\",\n transfer: false,\n img : \"modules/wfrp4e-core/icons/spells/amber-talons.png\" ,\n system: {\n transferData : {\n documentType : \"Item\"\n },\n scriptData : [{\n trigger : \"applyDamage\",\n script : \"if (args.totalWoundLoss >= 1)\\n{ \\n args.actor.addCondition(\\\"bleeding\\\")\\n}\"\n }]\n }\n })\n this.actor.createEmbeddedDocuments(\"Item\", [amberTalons], {fromEffect: this.effect.id})","g5y0tdoHCDs7cBy7":"return ![\"NAME.Résistance\", \"NAME.Cool\"].map(i => game.i18n.localize(i)).includes(args.skill?.name) \n || !this.actor.sameSideAs(this.effect.sourceActor)\n || this.actor.system.details.status.tier !== \"b\"","gFUXBbTskQBKjxqm":"if (this.actor.hasCondition(\"entangled\"))\n{\n this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"average\"}}).then(async test => {\n await test.roll();\n if (test.failed)\n this.actor.addCondition(\"fatigued\") \n })\n}","gKIPujyuFSn0No9v":"for(let e of this.item.effects.contents)\n{\n e.update({disabled: false})\n}\nthis.script.notification(\"Reset Powers\")","gKPL3t4vlZAsvtGr":"return args.skill?.name == `${game.i18n.localize(\"NAME.Stealth\")} (${game.i18n.localize(\"SPEC.Underground\")})`","gL0ftUnK5TNXBRRt":"return this.effect.sourceActor.uuid == args.actor.uuid","gMIenSmLklAkB2Zm":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = await ValueDialog.create({text : \"Entrez la Force du Venin\", title : this.effect.name}, \"\", Object.values(game.wfrp4e.config.difficultyNames));\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","gOm8utR3HLQBT5hA":"let {value} = this.effect.getFlag(\"wfrp4e-soc\", \"m4result\") || {};\n\nif (value === 0)\n args.actor.system.status.mood.value = 0;\nelse if (value !== undefined)\n args.actor.system.status.mood.value += value;","gPQrszvIgGlW9yM4":"if (args.test.characteristicKey == \"wp\")\n args.Test.preData.reversal = {allowed: true, if: \"better\"};","gPt4hUnaNqE5rVYF":"if (args.test.isCriticalFumble && !args.test.spell)\n{\n\tif (parseInt(args.test.result.SL) > 0 || args.test.succeeded)\n\t{\n\t\tif (parseInt(args.test.result.SL) > 0)\n\t\t{\n\t\t\targs.test.result.SL = \"-0\";\n\t\t\targs.test.result.description = game.i18n.localize(\"ROLL.MarginalFailure\");\n\t\t}\n\t\targs.test.result.outcome = \"failure\"\n args.test.result.other.push(`${this.effect.name}: Automatic Failure`)\n\t}\n\n}","gQ610vjGKmowl0rj":"let data = this.effect.getFlag(\"wfrp4e\", \"handOfGlory\");\nlet changes = [];\n\nif (!data)\n{\n return;\n}\n\nfor(let characteristic of [\"ws\", \"bs\", \"s\", \"t\", \"i\", \"ag\"])\n{\n\n let currentTotal = this.actor.system.characteristics[characteristic].value;\n let newTotal = this.actor.system.characteristics[characteristic].value + data.roll;\n let bonusOffset = Math.floor(currentTotal / 10) - Math.floor(newTotal / 10); // e.g. 37 + 15 bonus = 52, calculation bonus modifier should be -2\n\n changes = changes.concat({\n key: `system.characteristics.${characteristic}.modifier`,\n mode: 2,\n value: data.roll\n }, \n {\n key: `system.characteristics.${characteristic}.calculationBonusModifier`,\n mode: 2,\n value: bonusOffset\n })\n}\n\nchanges.push({key: \"system.details.move.value\", mode: 2, value: 2});\n\n \nthis.effect.updateSource({changes});","gQJJaxbN83KSgi36":"if (!args.totalWoundLoss) return\n\nconst roll = await new Roll(\"2d10\").roll();\nroll.toMessage(this.script.getChatData());\n\nargs.attacker.applyBasicDamage(Number(roll.total), { loc: \"roll\" })","gSDhsSB8573joL64":"if (args.equipped) {\n const spell = await game.wfrp4e.utility.findItem(\"Vindictive Glare\", \"spell\");\n const skillUUID = \"Compendium.wfrp4e-core.items.Item.e3McIND4Rrsn5cE6\";\n\n await this.actor.addEffectItems([skillUUID, spell.uuid], this.effect, [{\n \"system.advances.value\": 75 - this.actor.system.characteristics.int.value\n}, {}]);\n} else {\n this.effect.deleteCreatedItems();\n}","gVpFUka7qfGiEC1v":" this.actor.getActiveTokens().forEach(t => t.document.update({texture : {tint : \"#FFD700\"}}));\n","ga6bQzPuoIiQQrKg":"if (args.totalWoundLoss > 0)\n{\n \n let test = await args.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\n await test.roll()\n if (test.failed)\n {\n args.totalWoundLoss += this.effect.sourceActor.system.characteristics.wp.bonus\n args.modifiers.other.push({label : this.effect.name, value : this.effect.sourceActor.system.characteristics.wp.bonus})\n }\n}","gbhxWXboV9CytWNU":"await this.actor.addCondition(\"blinded\", 2)","gh2KS1prBKcsSK6M":"if (args.opposedTest.attackerTest.result.critical)\n args.actor.addCondition(\"ablaze\")","gnVpxOeBZpNF4HIF":"if (args.test.result.roll.toString().includes(\"9\") || args.test.result.roll.toString().includes(\"8\"))\n{\n args.test.result.fumble = game.i18n.localize(\"Fumble\")\n}","goz8yTlMozlsz3uY":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Strength';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","gpPaCe6yER79l4u8":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","gpuBg3y9rocJL7yT":"this.actor.status.addArmour(1, {locations: [\"head\"], source: this.effect})","gqZLfIr6svrtdwdC":"return args.skill?.name != game.i18n.localize(\"NAME.SleightOfHand\") && args.skill?.name != game.i18n.localize(\"NAME.MeleeBrawling\") && args.weapon?.system?.weaponGroup?.value != \"brawling\"","groEX1wJ9l00PkDF":"let turns = this.effect.getFlag(\"wfrp4e\", \"turns\");\nif (turns <= 0) return;\nturns--;\n\nconst speaker = ChatMessage.getSpeaker({actor: this.actor});\nconst targetId = this.effect.getFlag(\"wfrp4e\", \"target\");\nconst target = canvas.scene.tokens.get(targetId);\n\nif (turns > 0) {\n this.effect.setFlag(\"wfrp4e\", \"turns\", turns);\n\n return this.script.message(`

${speaker.alias} continue de s'enrouler autour de ${target.name}. Il pourra commencer à écraser dans ${turns} tours.

`);\n}\n\nif (this.actor.items.find(i => i.type === \"extendedTest\" && i.name === this.effect.name)) {\n this.script.message(`

${speaker.alias} peut reprendre l'écrasement de ${target.name} avec le Test Étendu.

`);\n return;\n}\n\nconst extendedTestData = {\n name: this.effect.name,\n type: \"extendedTest\",\n img: this.effect.img,\n system: {\n SL: {\n current: 0,\n target: target.actor.system.status.Blessures.value\n },\n Test: {\n value: 'Strength'\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: \"challenging\"\n }\n }\n};\n\nconst extendedTests = await this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\nconst extendedTest = extendedTests[0];\n\nthis.script.message(`

${speaker.alias} a fini de s'enrouler autour de ${target.name}. Il peut maintenant commencer à écraser via le Test Étendu @UUID[${extendedTest.uuid}].

`);\n\nlet effet = {\n name: extendedTest.name,\n img: extendedTest.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: extendedTest.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.effects.find(e => e.id === id);\n const speaker = ChatMessage.getSpeaker({actor: this.actor});\n const targetId = effect.getFlag(\"wfrp4e\", \"target\");\n const target = canvas.scene.tokens.get(targetId);\n this.script.message(\\`

${speaker.alias} a écrasé ${target.name}. Le bateau se brise, réduit à un amas d'épaves.

\\`);\n await effet.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n}\n\nawait extendedTests[0].createEmbeddedDocuments(\"ActiveEffect\", [effect]);","gsCnd3mf1vXFU2ei":"this.actor.system.status.ward.value = 4;","gu72JaTs9GrSiVTd":"return !(args.skill?.name == game.i18n.localize(\"NAME.Haggle\") || args.skill?.name == game.i18n.localize(\"NAME.Gossip\"))","gull3qgCahzk2xYu":"this.actor.addCondition(\"fatigued\", parseInt(this.effect.sourceTest.result.SL))\n\nlet test = await this.actor.setupSkill(\"Calme\", {fields : {difficulty: \"challenging\"}, appendTitle : ` - ${this.effect.name}`});\n\nawait test.roll();\n\nif (test.failed)\n{\n\tthis.actor.addCondition(\"broken\");\n}","gxuBeGHwjZ7WfPeu":"let specification = Number(this.item.specification.value) || 1;\nargs.fields.slBonus -= specification;","h0DfPwUUOBjyAHMZ":"return args.skill?.name != game.i18n.localize(\"NAME.Perception\");","h1XKoMuVnS0bagRO":"return args.item?.name != game.i18n.localize(\"NAME.Endurance\");","h2GSoiCQ2ZSlTjf7":"const uuid = \"Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc\";\nconst item = await fromUuid(uuid);\nawait this.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id});","h4lnexDYAhyQuiR5":"if (args.test.isCritical && args.test.weapon.properties?.qualities?.impale) {\n let targets = args.test.targets.filter(t => t.system.details.move.value > 1);\n if (targets.length > 0) {\n targets.forEach(target => {\n target.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]})\n });\n args.test.result.other.push (`${this.effect.name}: Target Move Reduced by 1`)\n }\n}","h766UvswLCsxcMow":"let characteristics = {\n \"ws\" : 5,\n \"bs\" : 0,\n \"s\" : -15,\n \"t\" : 0,\n \"i\" : 20,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 5,\n \"wp\" : 10,\n \"fel\" : 10\n}\nlet skills = [\"Charme\", \"Intimidation\", \"Mêlée (Base)\"]\nlet skillAdvancements = [7, 60, 7]\nlet talents = [\"Menaçant\", \"Discret\"]\nlet traits = [\"Perturbant\"]\nlet trappings = []\nlet items = [];\nlet spells = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nconst traitRegex = /(?:,?(.+?)(\\+?\\d{1,2}\\+?)?\\s*?(?:\\((.+?)\\)\\s*(\\+?\\d{1,2})?|,|$))/gm\nfor (let trait of traits)\n{\n let traitMatches = trait.matchAll(traitRegex).next().value\n let traitName = traitMatches[1]\n let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there's a specialization\n let traitSpec = traitMatches[3]\n\n let traitItem;\n try {\n traitItem = await WFRP_Utility.findItem(traitName, \"trait\")\n }\n catch { }\n if (!traitItem) {\n ui.notifications.warn(`Impossible de trouver ${trait}`, {permanent : true})\n }\n traitItem = traitItem.toObject()\n\n if (Number.isNumeric(traitVal))\n {\n traitItem.system.specification.value = traitName.includes('Arme','Cornes','Tail','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;\n traitItem.name = (traitItem.name + ` ${traitSpec ? \"(\"+ traitSpec + \")\" : \"\"}`).trim()\n }\n else\n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells)\n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","h8JqPMh2mM2uhpxk":"if (args.item.system.tags.has(\"armour\"))\n{\n \nfor(let key in args.item.system.AP)\n{\n if (args.item.system.AP[key])\n {\n args.item.system.AP[key] += 2;\n }\n }\n}","hA8PzeiCsHqqlUZm":"this.actor.createEmbeddedDocuments(\"ActiveEffect\", [game.wfrp4e.config.symptomEffects[\"nausea\"]])\nthis.script.message(`Recoit l'état @Condition[Nausea] pour [[1d10]] heures`, {whisper: ChatMessage.getWhisperRecipients(\"GM\")})","hCzxUyO6mjLNIpaM":"let woundsGained = Math.min(args.totalWoundLoss, args.actor.status.wounds.value)\n\nwoundsGained = Math.floor(woundsGained / 2)\n\nargs.attacker.update({ \"system.status.wounds.value\": args.attacker.status.wounds.value + woundsGained })\n\nthis.script.message(`Gains ${woundsGained} Wounds`)","hDC6lroDEPVBituR":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nif (test.failed)\n{\n this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + 1})\n this.script.message(\"Gained a Corruption point\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n if (test.result.roll % 11 == 0 || test.result.roll == 100)\n {\n this.script.message(`Fumble: immediately gain 1 @Table[mutatemental]{Mental Mutation}, and may not take a Short-term Ambition for the next [[1d10]] weeks.`, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n }\n}","hEDuYAgc1O1zG3Rr":"return args.targets[0].actor.appliedEffects.filter(e => e.name == game.i18n.localize(\"Flying\")).length > 0","hK0YMJfYbpbJZizO":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 0,\n \"bright\": 0,\n \"angle\": 360,\n \"alpha\": 0.5,\n \"animation\": {\n \"speed\": 0,\n \"intensity\": 0,\n \"type\": \"none\",\n },\n \"color\": \"\",\n }}));","hL3JUSY3xMA4zj2Q":"if (this.sourceActor.uuid === this.actor.uuid) return;\n\nconst test = await this.actor.setupCharacteristic(\"t\", {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {\n difficulty: \"difficult\"\n },\n context: {\n success: \"Est capable de se relever !\",\n failure: \"Est tombé à terre !\",\n }\n});\n\nawait test.roll();\nif (test.failure) {\n await this.actor.addCondition(\"prone\");\n}","hO2CFW9hygGSYuJ2":"return args.target?.Species == this.effect.specifier;","hObTbWi4ZdwXimIW":"if (args.item.type == \"spell\")\n{\n args.item.system.cn.value = Math.floor(args.item.system.cn.value / 2);\n}","hOgha3ir8K9TVphO":"return args.characteristic !== \"fel\";","hR1qD2kpFHF8JT8h":"return args.skill?.name == `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`","hSImyYjL0CENTvXf":"let test = await this.actor.setupSkill(\"Résistance\", {fields : {difficulty : \"difficult\", appendTitle : ` - ${this.effect.name}`}});\nawait test.roll();\nif (test.failed)\n{\n\tawait this.actor.addCondition(\"blinded\");\n}\n\nlet msg = ``\nlet armour = args.actor.itemTags.armour.filter(i => i.system.isMetal && i.system.isEquipped);\nfor(let item of armour)\n{\n\tfor(let key in item.system.AP)\n\t{\n\t\tlet AP = item.system.AP[key]\n\t\tlet damage = Math.floor(AP / 2);\n\t\tawait item.system.damageItem(damage, [key]);\n\t}\n\tmsg += `

${item.name} PA réduit de moitié

`\n}\nif (msg)\n{\n\tthis.script.message(msg, {speaker : {alias : args.actor.name}});\n}","hSlEY2oh8quVmdXR":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn\")\nlet data = item.toObject();\ndata.system.specification.value = 2\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","hTsnYKgw0kK10PiC":"args.fields.modifier += 5","hWWvkPbgIN3lxz1u":"return args.item?.system?.attackType !== \"melee\";","hYNWp75ggWSTht55":"if (args.test.result.hitloc.value != \"head\" && args.test.result.critical)\n{\n\twarhammer.utility.sleep(200).then(() => {\n\t\tthis.script.message(\"Tirage possible sur la table @Table[crithead]{Coups critiques à la tête} au lieu de de la localisation normale.\")\n\n\t})\n}","hZAax4emLahEEqcZ":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW\")\nlet data = item.toObject();\ndata.system.specification.value = 7 - this.actor.characteristics.s.bonus\ndata.name = item.name.replace(\"(Feature)\", \"(Tusks)\")\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","hadXFC43VKyrE9jC":"this.actor.addEffectItems([\"Compendium.wfrp4e-core.items.Item.eowbsW6oHGSNJmxV\", \"Compendium.wfrp4e-core.items.Item.eowbsW6oHGSNJmxV\"], this.effect);","hfO4INH3EeETDTFt":"this.actor.status.addArmour(1, {locations: this.effect.flags.wfrp4e.locations, source: this.effect})","hg89FU1NAp8tIsgO":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Trade\"))","hhCs5VBKx50S5IsY":"return !args.context.mutate","hhv7PrRdlf9sfC82":"let characteristics = {\n \"ws\" : 5,\n \"bs\" : 0,\n \"s\" : 5,\n \"t\" : 5,\n \"i\" : 10,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 0,\n \"wp\" : 0,\n \"fel\" : 0\n}\nlet skills = [\"Calme\", \"Esquive\"]\nlet skillAdvancements = [10, 10]\nlet talents = [\"Réflexes de Combat\"]\nlet trappings = [\"Veste en cuir\", \"Casque en cuir\", \"Jambières en cuir\", \"Bouclier\"]\nlet items = []\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","hj7tI212neKIu9dh":"this.actor.system.status.ward.value = 7;","hlHKeFWrOA8CsLr9":"args.data.reversal = {allowed : true, if: \"success\"};\nargs.context.pilot = true;","hluehsCuBZYc1Ejt":"return args.characterisic != \"fel\"","hmk8zV1LTElHUI8A":"let msg = `${this.actor.prototypeToken.name} loses 1 Wound.
`\n if (this.actor.status.wounds.value <= 1)\n {\n msg += `${this.actor.prototypeToken.name} goes unconscious.
`\n await this.actor.addCondition(\"unconscious\")\n }\n this.script.message(msg)\n this.actor.modifyWounds(-1)","hnsmzvcuiUYB065I":"this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {appendTitle: ` - ${this.effect.name}`, context: { failure : \"May not flee Combat\"}}).then(test => test.roll())","hpbraeEbjkXnmD75":"args.fields.hitLocation = \"lLeg\"\nargs.fields.modifier += 20;","hpwJRAhCsXTp9bd9":"let choice1 = [\n {\n type : \"skill\",\n name : \"Corps à corps (Base)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\nlet choice2 = [\n {\n type : \"skill\",\n name : \"Corps à corps (Armes d'hast)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\n\nlet choice3 = [\n {\n type : \"skill\",\n name : \"Corps à corps (A deux mains)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\n\nlet choice = await foundry.applications.api.DialogV2.wait({\n window : {title : \"Choix\"},\n content :\n `

\n Sélectionnez votre choix\n

\n
    \n
  1. Corps à corps (Base)
  2. \n
  3. Corps à corps (Armes d'hast)
  4. \n
  5. Corps à corps (A deux mains)
  6. \n
\n `,\n buttons : [\n {\n label : \"Base\",\n action : \"basic\",\n callback : () => {\n return choice1\n }\n },\n {\n label : \"Armesd'hast\",\n action : \"polearm\",\n callback : () => {\n return choice2\n }\n },\n {\n label : \"A deux mains\",\n action : \"two-handed\",\n callback : () => {\n return choice3\n }\n }\n ]\n})\n\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n let equip = item.system.tags.has(\"equippable\");\n item = item.toObject()\n if (equip)\n {\n item.system.equipped.value = true;\n }\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","hqMwzPozAVTzoCxa":"if ((args.test.result.roll % 11 == 0 || args.test.result.roll == 100) && args.test.failed)\n{\n delete args.test.result.misfire;\n args.test.result.tables.misfire = {\n label : \"Raté\",\n class : \"fumble-roll\",\n modifier : 0,\n key : \"torpedo\"\n }\n}","ht7csu1KImHzpzL5":"return args.item?.actor?.type !== \"vehicle\" || args.item?.type !== \"weapon\" || !args.item.name.includes(\"Cannon\");","huJcVpVn6Q7sQkFC":"if (args.actorsystem.details.move.sail.value > 0)\n args.actor.system.details.move.sail.value -= 1;\n","hwHpIunCq3ifk2QU":"if (args.item.type == \"spell\")\n{\n let range = parseInt(args.item.Duration)\n if (Number.isNumeric(range))\n {\n args.item.system.duration.value = \"2 * \" + args.item.system.duration.value\n }\n}","hwOZxgt7e65iWvYz":"let test = await this.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n let damage = this.effect.sourceTest.result.damage\n\n this.script.message(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))\n}","hxmwtw5zAHyS2upG":"this.script.message(await game.wfrp4e.tables.formatChatRoll(\"giftofthebeast\"))","i59IpmZNLJEPWZ3L":"return args.spell","i5AN97A7IOeygEFA":"if (args.applyAP && args.modifiers.ap.metal) \n{\n args.modifiers.ap.ignored += args.modifiers.ap.metal\n args.modifiers.other.push({value : args.modifiers.ap.metal, label : this.effect.name, details : \"Ajouter PA de métal aux Dégâts\" })\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignorer Métal (\" + args.modifiers.ap.metal + \")\");\n args.modifiers.ap.metal = 0\n}","i7xl0jNpLnBT2h2l":"args.actor.characteristics.dex.value = 0","i93PGV1lDSdi3BJu":"let effectsToDisable = this.actor.items.filter(i => i.type == \"disease\").reduce((effects, item) => effects.concat(item.effects.contents), []).concat(this.actor.effects.contents.filter(i => i.isCondition)).filter(i => i.active);\n\nif (effectsToDisable.length)\n{\n this.script.notification(`Disabling ${effectsToDisable.map(i => i.name).join(\", \")}.`);\n effectsToDisable.forEach(i => i.update({disabled : true}))\n}","iAo3wxMLA64rsKjj":"this.script.message(await game.wfrp4e.tables.formatChatRoll(\"skavenbrew\"))","iBEPQ3NwtI9DfkEy":"let locations = [];\n\nwhile (locations.length < 2)\n{\n let loc = await game.wfrp4e.tables.rollTable(\"hitloc\", {hideDSN : true})\n if (!locations.includes(loc.result))\n {\n locations.push(loc.result);\n }\n}\n\nlocationText = locations.map(i => game.wfrp4e.config.locations[i]).join(\", \")\n\nthis.item.updateSource({name : this.item.name += ` (${locationText})`})","iH9o7t8vGDn6pm1d":"if (args.test.result.misfire && args.test.result.roll % 2 == 1 && args.test.result.roll % 11 == 0) {\n delete args.test.result.misfire\n}\nelse if (args.test.result.misfire)\n{\n delete args.test.result.misfire;\n args.test.result.tables.misfire = {\n label : \"Raté\",\n class : \"fumble-roll\",\n modifier : 0,\n key : \"artillery-misfires\"\n }\n}","iHn3YzvqNfbwzjZz":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM\")\nlet data = item.toObject();\ndata.system.specification.value = this.actor.characteristics.s.bonus\ndata.system.description.value = \"\"\ndata.name = this.effect.name;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","iLpq4yCFN6YACrYA":"if (args.test.result.castOutcome == \"success\")\n{\n this.script.message(await game.wfrp4e.tables.formatChatRoll(\"demonic-mien\"))\n}","iM4B3IZ4VtpZsl09":"args.size = \"sml\"","iM6JLF8jDXMViReZ":"return ![game.i18n.localize(\"Name.PickLock\"), game.i18n.localize(\"NAME.SleightOfHand\"), `${game.i18n.localize(\"NAME.Channelling\") (Ulgu)}`].includes(args.skill?.name)\n","iMDZLr7ueJWBnilj":"args.actor.flags.rangedDamageIncrease += 1","iMu8BZ7eHMAbPEO1":"let healed = args.totalWoundLoss\n\nthis.script.message(`this.actor.prototypeToken.name healed ${healed} Wounds`);\n\nthis.actor.modifyWounds(healed)","iNAQJa5HyaEckknX":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\n\nlet opposedResult = test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result\n\nif (opposedResult?.winner == \"attacker\")\n{\n let spells = this.actor.itemTypes.spell;\n if (spells.length)\n {\n let chosen = spells[Math.floor(CONFIG.Dice.randomUniform() * spells.length)]\n this.script.message(`Perd l'accès à ${chosen.name}`)\n chosen.update({name : chosen.name += \" (PERDU)\"})\n }\n}\n","iO2hCDwyQ7v4qrOI":"if (args.test.options.staunchBleeding) {\n if (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target) {\n let staunch = ~~args.test.result.SL + 1\n if (args.test.options.fieldDressing && args.test.result.reversed)\n staunch = Math.min(1, Number(args.test.result.SL)) + 1\n args.test.result.other.push(`${this.actor.name} guérit ${staunch} états Hémmoragie du patient.`)\n }\n else if (this.actor.characteristics.int.bonus + args.test.result.SL < 0)\n args.test.result.other.push(`Le patient contracte une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`)\n}","iT0h3VZLEBQnn5Bx":"return args.skill?.name != game.i18n.localize(\"NAME.Charm\") && args.skill?.name != game.i18n.localize(\"NAME.Gossip\") && args.skill?.name != game.i18n.localize(\"NAME.ConsumeAlcohol\");","iT3C15fMyQrj1RmG":"if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) && this.actor.has(game.i18n.localize(\"NAME.Ethereal\")))\n{\n this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name}).then(async test => {\n await test.roll();\n if(test.failed)\n this.actor.addCondition(\"stunned\")\n })\n}","iVhi3Z6zPaf1bf8g":"return [\"t\", \"i\", \"ag\", \"dex\", \"int\", \"wp\"].includes(args.characteristic)","iX0ctHYHg12pjaCU":"let result = await game.wfrp4e.tables.rollTable(\"gift-of-slaanesh\")\n\nif (result.object.documentId && result.object.documentCollection)\n{\n let item = await fromUuid(`Compendium.${result.object.documentCollection}.${result.object.documentId}`);\n if (item)\n { \n let data = item.toObject();\n // Some items need sourceTest for their effects\n foundry.utils.setProperty(data, \"flags.wfrp4e.sourceTest\", this.effect.sourceTest);\n await this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});\n }\n}\n\nthis.script.message(game.wfrp4e.tables.formatChatRoll(\"gift-of-slaanesh\", {lookup : result.roll, hideDSN: true}));","id9ZdkERMZnZTWXt":"if (args.extendedTest?.getFlag(\"wfrp4e\", \"fear\"))\n{\n\tthis.script.notification(\"Immunisté à la Peur\");\n\targs.extendedTest.delete();\n\targs.abort = true;\n}\nreturn args.context.terror || args.extendedTest?.getFlag(\"wfrp4e\", \"fear\")","igVAVU7DOuzhNG14":"return args.item?.system.isMelee","ij3BLXzNk7eZ3V95":"return ![\"s\",\"t\",\"wp\",\"fel\"].includes(args.fields.characteristic)","ikaQXTvTWI5nAmUV":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nlet slToSpend = excessSL;\n\nlet levels = 0;\nlet duration = 0;\n\nwhile (slToSpend > 0) {\n let content = `

You achieved ${excessSL} and you still have ${slToSpend} SL to spend on enhancing your Sword Dance.

`;\n content += `

So far you selected ${levels} additional levels in War Leader and +${duration} Rounds of duration.

`;\n await foundry.applications.api.DialogV2.confirm({\n yes: {label: \"Additional War Leader\", icon: \"fas fa-person\", callback: () => levels++},\n no: {label: \"+1 Round Duration\", icon: \"fas fa-clock\", callback: () => duration++},\n content,\n });\n\n slToSpend--;\n}\n\nawait this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.vCgEAetBMngR53aT\", this.effect, {\"system.advances.value\": 1 + levels});\nawait this.effect.update({duration:{rounds: this.actor.system.characteristics.wp.bonus + duration}});","imKVsCy8rya2gkwO":"// Any Characteristic penalties due to failed Consume Alcohol Tests\n// or the state of being Stinking Drunk are eliminated.\nawait this.actor.removeSystemEffect(\"consumealcohol1\")\nawait this.actor.removeSystemEffect(\"consumealcohol2\")\nawait this.actor.removeSystemEffect(\"consumealcohol3\")\nawait this.actor.removeSystemEffect(\"stinkingdrunk1\")\n\n// The drinker is thereafter Fatigued\n// for a number of hours equal to 10 minus their Toughness Bonus —\n// nothing but time and rest can eliminate this penalty.\nawait this.actor.addCondition(\"fatigued\")\nconst duration = 10 - parseInt(this.actor.system.characteristics.t.bonus)\nthis.effect.updateSource({\"duration.rounds\" : duration});\nthis.script.message(`

${this.actor.prototypeToken.name} n'a plus de pénalités liées à l'alcool et gagne l'état Extenué pendant ${duration} heures.

`,\n{\n whisper: ChatMessage.getWhisperRecipients(\"GM\"),\n blind: true\n})","inPxRSx0CDj1nwAm":"if (args.test.result.fumble && !this.actor.itemTypes.talent.find(i => i.name == \"Magie des Arcanes (Feu)\"))\n{\n this.actor.addCondition(\"ablaze\");\n}","ioeTj5mx8jlA5EX5":"args.actor.addCondition(\"stunned\")","ipkkRffJh61WE7zR":"if (!args.flags.amputatedFootOrLeg)\n{\n\targs.flags.amputatedFootOrLeg= true;\n\targs.fields.modifier -= 20;\n}","iqUvV1Vu81M3WyZ4":"let SL = Number(this.effect.sourceTest.result.SL);\nfor (let i=0; i [\"fire\", \"heavens\", \"beasts\", \"shadow\", \"light\", \"life\", \"death\", \"metal\"].includes(s.system.lore.value)).sort((a, b) => a.system.lore.value > b.system.lore.value ? 1 : -1)\n\nlet choice = await ItemDialog.create(spells, 1, {text : \"Choisissez un Sort\", title : this.effect.name});\nif (choice[0])\n{\n this.actor.addEffectItems(choice.map(i => i.uuid), this.effect)\n}\n","iuYuf05BNuZ5fllI":"if (args.test.isFumble)\n{\n args.test.result.other.push(\"@Table[poisoned-wind-globe]\")\n}","iuoVkjFdL1rHdbqR":"return this.item.equipped.value && [\"weapon\", \"cast\"].includes(args.type)","ivxpmCKu3pEMG05c":"if (this.actor.inCombat)\n{\n\tthis.actor.characteristics.s.bonus += 2\t\t\n\tthis.actor.characteristics.s.calculationBonusModifier -= 2\n}","j1AmrY1SxFJQyapo":"if (this.actor.status.advantage.value > 0 && args.item.system.attackType)\n{\n args.item.system.qualities.value.push({name : \"penetrating\"})\n}","j3c6Y5aeA7nlFr9F":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.wBhPFggGqIXwbx1r\", // Alley Cat\n \"Compendium.wfrp4e-core.items.Item.q58lK4kULJZB5GjE\", // Rover\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","j3zDMWkns32Yrxn3":"this.effect.updateSource({\"flags.wfrp4e.ward\" : 9})","j6Bf1iivH8cqSnnK":"let target = args.data.targets[0]\nreturn target?.actor.hasCondition(\"prone\") || target.hasCondition(\"surprised\")","j98hvy6r9G2Vjmid":"if (args.totalWoundLoss > 0) \n{\n args.opposedTest.result.other.push(\n `@Corruption[minor]{Minor Exposure to Corruption}`\n )\n this.script.message(\n `${this.effect.name}: \n @Corruption[minor]{Minor Exposure to Corruption}
\n ${args.actor.prototypeToken.name} must take an \n Average (+20%) Corruption (Minor) Test`, \n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}","jC8o5PbnqEvOoZ9N":"this.actor.addCondition(\"poisoned\", 2)","jFKnf2UdoxAQx76R":"if (args.equipped)\n{ \n this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.URwIDtInCsxOoGqM\", this.effect);\n}\nelse \n{\n this.effect.deleteCreatedItems();\n}","jFwema0iwzBphxie":"let woundsGained = Math.min(args.actor.status.wounds.value, args.totalWoundLoss)\nwoundsGained = Math.ceil(woundsGained / 2)\n\nargs.attacker.update({\"system.status.wounds.value\" : args.attacker.system.status.wounds.value + woundsGained})\n\nargs.actor.addCondition(\"fatigued\")\nargs.attacker.hasCondition(\"fatigued\")?.delete();\n\nthis.script.message(`${args.attacker.prototypeToken.name} gains ${woundsGained} Wounds`);","jGDk7avWFSnyFoql":"let broken = this.actor.hasCondition(\"broken\");\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.IAWyzDfC286a9MPz\");\n\nif (broken && !broken.getFlag(\"wfrp4e\", \"blasted-mind\") && !this.actor.has(item.name))\n{\n await broken.delete();\n this.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})\n this.script.notification(`Removed ${broken.name}, added ${item.name} (${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds)`)\n}","jHgxpe6TJDlP3oTn":"let spells = await warhammer.utility.findAllItems(\"spell\", \"Chargement des sorts\", true, [\"system.lore.value\"])\nspells = spells.filter(s => [\"slaanesh\"].includes(s.system.lore.value))\n\nlet choice = await ItemDialog.create(spells, 1, {text : \"Choisissez un Sort\", title : this.effect.name});\nif (choice[0])\n{\n this.item.updateSource({name : this.item.name + ` (${choice[0].name})`})\n this.actor.addEffectItems(choice.map(i => i.uuid), this.effect)\n}\n","jLsL4KRI6LEG9Ii2":"if (args.test.result.critical && ['rLeg', 'lLeg'].includes(args.test.result.hitloc.result))\n{\n args.test.result.critModifier = args.test.result.critModifier ? args.test.result.critModifier + 20 : 20\n args.test.result.critical += ` (+${args.test.result.critModifier})`\n}","jOCLEsjNzERyVLsP":"if(args.test.result.majormis)\n{\n args.test.result.nullmajormis = game.i18n.localize(\"ROLL.MajorMis\")\n args.test.minormis = game.i18n.localize(\"ROLL.MinorMis\")\n}","jOSCsBRUO117spv8":"args.abort = `Only gunpowder or artillery weapons can attack targets within the ${this.effect.name}`;","jObJanFoev4N6ZRv":"if (!args.opposedTest.attackerTest.item?.system?.isMagical)\n\targs.abort = `${this.effect.name}: Ignored`","jOm7RxGFm1y6mCpN":"return args.context.crewTest.name.includes(\"Batten Down\");","jRSgPhpfN7MH7TTp":"if (args.totalWoundLoss > 0)\n{\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: \"1 Poisoned Condition Gained\", success: \"Resisted Poisoned Condition\" } })\n await test.roll();\n if (test.failed)\n { \n args.actor.addCondition(\"poisoned\");\n if (args.actor.system.status.wounds.value - args.totalWoundLoss <= 0)\n {\n args.actor.addCondition(\"unconscious\")\n }\n }\n}\n\n // else\n // this.actor.setupCharacteristic(\"t\", { context: { failure: \"1 @Condition[Poisoned] Condition Gained\", success: \"Resisted @Condition[Poisoned] Condition\" } }).then(testCallback)\n","jW87rmQLtROdVEhW":" if ([\"orc\", \"ork\", \"goblin\", \"hobgoblin\", \"snotling\", \"greenskin\"].includes(args.opposedTest.defender.details.species.value.toLowerCase()))\n {\n args.addImpact = true\n args.opposedTest.result.other.push(\"Rune of Goblin Bane: Impact Ajouté\")\n }","jWkfoVpHLiRaHTza":"if (args.test.succeeded)\n{\n args.test.result.other.push(`${this.effect.name}: @Terror[1,${this.actor.prototypeToken.name}]`)\n}","jXbrIGxznqf1SNxZ":"const speaker = ChatMessage.getSpeaker({actor: this.actor});\n\nthis.script.message(`

${speaker.alias} is Immersed within a Sea Elemental and suffers from @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.WCivInLZrqEtZzF4#drowning-and-suffocation]{Suffocation}

They may attempt to escape by freeing themselves from the @Condition[Entangled} Condition as if they were @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.wmA76Q2zJJ9HrkvA#grappling]{Grappled} by the Sea Elemental, making an Opposed Strength Test against its Strength of 59.

`);","jYJRO5XPyG7y6fih":"await this.actor.addCondition(\"blinded\")\nawait this.actor.addCondition(\"deafened\")\nawait this.actor.addCondition(\"fatigued\")","jb1ouw0eIBVy3Wwg":"if (\n this.item == args.attackerTest.item\n && args.attackerTest.succeeded \n && args.defenderTest.item?.system?.attackType == 'melee'\n && (args.defenderTest.item.properties.qualities?.magical || args.defenderTest.item.properties.unusedQualities?.magical)\n) \n{\n args.opposedTest.result.other.push(`${this.effect.name}: destroys magical ${args.defenderTest.item.name}.`)\n}","jbZPLb4wuqJpHLUx":"this.item.system.flaws.value.push({name : \"dangerous\"})","jdS2u1tQPYeO55WI":"let type = this.item.getFlag(\"wfrp4e\", \"breath\");\n\nif (type == \"cold\")\n{\n\tlet stunned = Math.max(1, Math.trunc(args.totalWoundLoss / 5))\n\tawait args.actor.addCondition(\"stunned\", stunned);\n}\n\nif (type == \"corrosion\")\n{\n let damageItems = await foundry.applications.api.DialogV2.confirm({window: {title : this.item.name}, content : `

Endommage tous les objets portés ?

`})\n\tif (damageItems)\n\t{\n\t\tlet msg = ``\n\t\tlet weapons = args.actor.itemTypes.weapon.filter(i => i.isEquipped);\n\t\tlet armour = args.actor.itemTags.armour.filter(i => i.isEquipped);\n\t\tlet trappings = args.actor.itemTypes.trapping.filter(i => i.isEquipped);\n\t\tfor(let item of weapons)\n\t\t{\n\t\t\tif (item.system.properties.qualities.shield)\n\t\t\t{\n\t\t\t\tawait item.system.damageItem(1, \"shield\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tawait item.system.damageItem(1);\n\t\t\t}\n\t\t\tmsg += `

${item.name} endommagé de 1

`\n\t\t}\n\t\tfor(let item of armour)\n\t\t{\n\t\t\tawait item.system.damageItem(1);\n\t\t\tmsg += `

${item.name} endommagé de 1

`\n\t\t}\n\t\tfor(let item of trappings)\n\t\t{\n\t\t\tawait item.system.damageItem(1);\n\t\t\tmsg += `

${item.name} endommagé de 1

`\n\t\t}\n\t\tif (msg)\n\t\t{\n\t\t\tthis.script.message(msg, {speaker : {alias : args.actor.name}});\n\t\t}\n\t}\n}\n\nif (type == \"fire\")\n{\n\tawait args.actor.addCondition(\"ablaze\");\n}\n\nif (type == \"electricity\")\n{\n\tawait args.actor.addCondition(\"stunned\");\n}\n\nif (type == \"poison\")\n{\n\tawait args.actor.addCondition(\"poisoned\");\n}\n\nif (type == \"warpfire\")\n{\n\tawait this.actor.corruptionDialog(\"moderate\")\n\tthis.actor.applyEffect({effectUuids : this.item.effects.getName(\"Warpfire\").uuid})\n}","jfk5VDKMTIf4ee0v":"if (args.totalWoundLoss > 0)\n args.actor.addCondition(\"poisoned\")","jgO1Kf60Ctt6R0qO":"return args.item?.name != game.i18n.localize(\"NAME.Leadership\")","jmxlpyLrIuoxQtvU":" this.actor.getActiveTokens().forEach(t => t.document.update({texture : {scaleX : 2, scaleY: 2, src: \"modules/wfrp4e-core/tokens/popout/gor.webp\"}}));\n","jpcU8FFWSlQ3gD0L":"return !args.skill?.name?.includes(game.i18n.localize(\"NAME.Trade\"))","jrvj7bRyMBB9LixP":"this.actor.addCondition(\"fatigued\", 3)","jsgLEVYvMieyYT6L":"let tokenImg = \"\"; // Put path to token image here, inbetween the quotation marks\nif (tokenImg)\n{\n if (this.effect.getFlag(\"wfrp4e\", \"transformed\"))\n {\n await this.effect.setFlag(\"wfrp4e\", \"transformed\", false);\n this.actor.getActiveTokens().forEach(t => t.document.update({texture : {src: this.actor.prototypeToken.texture.src}}));\n }\n else\n {\n await this.effect.setFlag(\"wfrp4e\", \"transformed\", true);\n this.actor.getActiveTokens().forEach(t => t.document.update({texture : {src: tokenImg}}));\n }\n}\nelse\n{\n this.script.notification(\"Aucun chemin d'image de token configuré. Le chemin de l'image doit être défini dans la première ligne de ce script.\", \"error\");\n}","jt8vTQBoMOMUccEt":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nawait this.effect.update({duration:{rounds: this.actor.system.characteristics.i.bonus + excessSL}});","jvNuIbOtB46p0esq":"if (args.test.item?.system?.attackType == \"melee\")\n{\n\tif (parseInt(args.test.result.SL) < 0 || args.test.failed)\n\t{\n\t\tif (parseInt(args.test.result.SL) < 0)\n\t\t{\n\t\t\targs.test.result.SL = \"+0\";\n\t\t\targs.Test.result.description = \"Succès marginal\";\n\t\t}\n\t\targs.Test.result.outcome = \"success\"\n args.test.result.other.push(`${this.effect.name}: Minimum +0 SL`)\n\t}\n}","k0AkkBLtE8oZhBwn":"if (isNaN(parseInt(this.item.system.specification.value))) {\n let value = await ValueDialog.create({title : \"Valeur d'Armure\", text : \"Entrez la valeur d'Armure\"});\n if (value) {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","k1Wdehpgdc0hP63E":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.aE3pyW20Orvdjzj0\")\nlet hatred = item.toObject();\nhatred.system.specification.value = \"Skaven\"\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.3wCtgMDNnu8MFmyk\")\nlet immunity = item.toObject();\nimmunity.system.specification.value = \"Poison\"\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.oRx92ByVNEBN6YkK\")\nlet berserk = item.toObject();\nawait this.actor.createEmbeddedDocuments(\"Item\", [hatred, immunity, berserk], {fromEffect : this.effect.id})","k3FqFgsF6a3TkxAD":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\ntest.roll();\nreturn true;","k465TgRelwcSUdS2":"if (this.actor.has(\"Métier (Ingénieur)\", \"skill\"))\n{\n let aim = await this.actor.setupSkill(\"Métier (Ingénieur)\", {appendTitle : ` - Aim ${this.item.name}`});\n await aim.roll();\n let SL = Number(aim.result.SL);\n let context = {}\n if (SL < 0)\n {\n context.fields = {modifier : 10 * SL};\n context.initialTooltip = \"Échoué Métier (Ingénieur)\";\n }\n\n let fire = await this.actor.setupWeapon(this.item, context)\n fire.roll();\n}\nelse\n{\n this.script.notification(\"Cet acteur n'a pas le Métier (Ingénieur)!\", \"error\");\n}","k5792iKWEqKmVZMk":"return args.weapon || args.skill?.name === \"Esquive\";","k7ldJfyW201HgRFh":"args.item.system.qualities.value.push({name : \"magical\"});","k8TC0yzp4xfOXD2n":"if (args.totalWoundLoss > 0)\n{\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\n await test.roll();\n if (test.failed)\n {\n\t args.actor.addCondition(\"stunned\");\n }\n\targs.actor.hasCondition(\"bleeding\")?.delete()\n}","k9SvH4Lm3ZuI8S1N":"return ![\"wp\", \"ag\", \"i\", \"int\"].includes(args.characteristic)","kBXVEnSWzaQZLkJH":"if(args.test.result.critical)\n{\n args.test.result.damage +=1 \n args.test.result.additionalDamage += 1\n}","kEaBLoIHt1FpQVKq":"if (this.actor.system.details.experience.current < 100) {\n return this.script.notification(game.i18n.localize(\"SCRIPT.NotEnoughXP\"))\n}\n\nlet item = await game.wfrp4e.utility.findItem(\"Invisibility\", \"trait\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item]);\nlet expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);\nexpLog.push({amount : 100, reason: item.name, spent: this.actor.details.experience.spent + 100, total: this.actor.details.experience.total, type: \"spent\"});\nthis.actor.update({\n \"system.details.experience.spent\": this.actor.details.experience.spent + 100,\n \"system.details.experience.log\": expLog\n });","kIM4Fs1lFVV7TSnj":"this.actor.modifyAdvantage(1);","kMSdRskYDI2J1gnp":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"average\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll(); \nif (test.failed)\n{\n this.actor.addCondition(\"prone\");\n}\n ","kUyVy3bfEZAGTeru":"args.modifiers.ap.ignored += 1\nargs.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignore AP (1)\");","kWynO1lQzjiSs8RK":"return args.skill?.name != game.i18n.localize(\"NAME.Haggle\");","kY50G53IXdNXX9Sc":"for(let e of this.item.effects)\n{\n if (e.name.toLowerCase().includes(\"rune\") && e.system.transferData.type == \"aura\" && e.system.transferData.area.radius == \"6\")\n {\n e.system.transferData.area.radius = \"12\"\n }\n}","kYTEqcs8JpO2OmB9":"if (args.equipped)\n await this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.Bvd2aZ0gQUXHfCTh\", this.effect, {\"system.specification.value\": \"10\"});\nelse\n await this.effect.deleteCreatedItems()","kYiDBPRKIokFkr4Z":"if (args.item.type == \"skill\" && args.item.name == `${game.i18n.localize(\"NAME.Ranged\")} (${game.i18n.localize(\"SPEC.Bow\")})`)\n{\n args.item.system.modifier.value += 20;\n}","kYmscP2HuXjDovBD":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"))\n","kbXDGAmWWD4CZJHB":"const sin = this.effect.sourceActor.system.status.sin.value;\nconst roll = new Roll(`2d10 - ${sin}`);\nawait roll.evaluate();\nawait roll.toMessage({flavor: `${this.effect.name}`});\nthis.actor.system.status.mood.addEntry(`${this.effect.name} (${this.effect.sourceActor.name})`, roll.total);","kiJ6AiaYVUjt6aV6":"teeth = await fromUuid(\"Compendium.wfrp4e-core.items.fBcZhOBn8IpoVqQ1\")\nteeth = teeth.toObject();\n\nlet roll = await new Roll(\"1d10\").roll({allowInteractive : false});\nroll.toMessage(this.script.getChatData({flavor : \"Dents perdues\"}))\nteeth.system.location.value = `${roll.total} ${teeth.system.location.value}`\nthis.actor.createEmbeddedDocuments(\"Item\", [teeth])","kiolpXGbkmxfPiuI":"let test = this.actor.attacker?.test\nif (test && this.item.system.protects[test.result.hitloc.result] && test.result.critical)\n{\n this.script.message(`${this.item.name}: Blocked Critical Hit`)\n}","kkC5EhqA05U6U0gU":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\n// Kind of insane but whatever\nlet opposedResult = test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result\n\nif (opposedResult?.winner == \"attacker\")\n{\n if (opposedResult.differenceSL < 6)\n {\n this.actor.addCondition(\"fatigued\", Math.floor(opposedResult.differenceSL / 2))\n }\n else if (opposedResult.differenceSL >= 6)\n {\n this.actor.addCondition(\"broken\");\n }\n}","kmsGLWGxCY8Z8jVG":"return args.skill?.name != game.i18n.localize(\"NAME.Intuition\");","knq8lNYLw0v757dQ":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.9fq6p9Q6H02LjaSi\")\nlet data = item.toObject();\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});","kvaN100w0nBUlLbj":"let poisoned = this.actor.hasCondition(\"poisoned\")\nif (poisoned)\n{\n this.script.message(\"Immunisé à l'empoisonnement\")\n poisoned.delete()\n}","kvnZz8yqdTZbErkr":"args.actor.system.details.move.value -= 2;\nargs.actor.system.details.man -= 1;\nargs.actor.system.status.carries.max *= 1.5;","kvqJbHBvFr6iGLcI":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.3wCtgMDNnu8MFmyk\",null,[{\"system.specification.value\":\"Poison\"}])","l1ntrpa8RE3Lg5xE":"return args.skill?.name === game.i18n.localize(\"NAME.Perception\");","l8qFKSnMpy4P7XQR":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"));","lCOdnKz8XpnkDs6Q":"let test = await this.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();","lDIWlQvD6MGyP3QP":"return this.effect.sourceActor.effects.filter(i => i.isCondition).length > 0","lFO6XdfUODmFArqx":"args.actor.addCondition(\"bleeding\")","lG5lfAzNuM4t0rpM":"return args.skill?.name === \"Esquive\";","lII4KMRblqwFBlsV":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 0,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : 10,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 20,\n \"wp\" : 10,\n \"fel\" : 15\n}\nlet skills = [\"Focalisation\", \"Charme\", \"Représentation (Danse)\"]\nlet skillAdvancements = [0, 6, 3]\nlet talents = [\"Attirant\", \"Distraire\", \"Imitation\"]\nlet traits = [\"Perturbant\", \"Flight (6)\", \"Spellcaster (Petty)\"]\nlet trappings = []\nlet items = [];\nlet spells = [\"Feux follets\", \"Sommeil\"];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nconst traitRegex = /(?:,?(.+?)(\\+?\\d{1,2}\\+?)?\\s*?(?:\\((.+?)\\)\\s*(\\+?\\d{1,2})?|,|$))/gm\nfor (let trait of traits)\n{\n let traitMatches = trait.matchAll(traitRegex).next().value\n let traitName = traitMatches[1]\n let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there's a specialization\n let traitSpec = traitMatches[3]\n\n let traitItem;\n try {\n traitItem = await WFRP_Utility.findItem(traitName, \"trait\")\n }\n catch { }\n if (!traitItem) {\n ui.notifications.warn(`Impossible de trouver ${trait}`, {permanent : true})\n }\n traitItem = traitItem.toObject()\n\n if (Number.isNumeric(traitVal))\n {\n traitItem.system.specification.value = traitName.includes('Arme','Cornes','Tail','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;\n traitItem.name = (traitItem.name + ` ${traitSpec ? \"(\"+ traitSpec + \")\" : \"\"}`).trim()\n }\n else\n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells)\n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","lMRsQRgjMexY9dxE":"return [\"NAME.Résistance\", \"NAME.Cool\"].map(i => game.i18n.localize(i)).includes(args.skill?.name)","lOIHiAIDtj91kllN":"const chanties = await warhammer.utility.findAllItems('wfrp4e-soc.chanty', \"Loading Chanties\", true);\nlet choice = await ItemDialog.create(chanties, 1, {text : \"Choisissez un Chant\", title : this.effect.name});\nif (choice.length) \n{\n this.actor.addEffectItems(choice.map(i => i.uuid), this.effect)\n}","lOzkngzye4RmvALp":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.DrNUTPeodEgpWTnT\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id});\nthis.script.notification(\"Added \" + item.name)","lPudo1grrVp05i7a":"let loc = Math.floor(CONFIG.Dice.randomUniform() * 2) == 0 ? \"head\" : \"body\"\nlet damage = this.actor.system.characteristics.s.bonus + 6\n\n this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name}).then(async test => {\n await test.roll();\n if(test.failed)\n {\n await this.actor.addCondition(\"stunned\")\n this.script.message(await this.actor.applyBasicDamage(damage, {loc, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))\n }\n })","lQJ68n3y1xDyNicE":"return !args.context.sizeModifier && args.item?.system?.attackType != \"ranged\"","lQOu46YmOiQNhCZR":"const balanced = game.i18n.localize(\"WFRP4E.YenluiBalanced\");\nconst light = game.i18n.localize(\"WFRP4E.YenluiLight\");\nconst dark = game.i18n.localize(\"WFRP4E.YenluiDark\");\n\nlet newName;\n\nif (this.effect.name === game.i18n.localize(\"WFRP4E.YenluiBalanced\")) {\n newName = game.i18n.localize(\"WFRP4E.YenluiDark\");\n newDescription = game.i18n.localize(\"WFRP4E.YenluiDarkDesc\");\n} else if (this.effect.name === game.i18n.localize(\"WFRP4E.YenluiLight\")) {\n newName = game.i18n.localize(\"WFRP4E.YenluiBalanced\");\n newDescription = game.i18n.localize(\"WFRP4E.YenluiBalancedDesc\");\n}\n\nif (newName) {\n await this.effect.update({name: newName});\n await this.item.update({name: newName, \"system.description.value\": newDescription});\n}","lRZhkh8pcu93QTKz":"if (args.test.spell)\n{\n\targs.test.preData.SL = -10\n}","lSOAZ4FG44bT4jh1":"let infected = await fromUuid(\"Compendium.wfrp4e-core.items.V0c3qBU1CMm8bmsW\")\nlet fear = await fromUuid(\"Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn\")\n\nlet infectedData = infected.toObject();\nlet fearData = fear.toObject();\nfearData.system.specification.value = 2;\nthis.actor.createEmbeddedDocuments(\"Item\", [fearData, infectedData], {fromEffect : this.effect.id})","lU4s3UTtBkU38djI":"this.actor.addCondition(\"entangled\")\nlet msg = `${this.actor.prototypeToken.name} loses 1 Wound and gains 1 Entangled Condition.`\nthis.script.message(msg)\nthis.actor.modifyWounds(-1)","lYYkGzqNshiYc7WI":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"poisoned\")\n}","lZuavewrJzOehrJQ":"let test = await this.actor.setupSkill('Résistance', {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'easy'},\n characteristic: 't',\n context: {failure: \"Mast shattered!\"}\n});\nawait test.roll();\n\nif (test.failed) {\n let crit = await fromUuid(\"Item.d4bCnR1zINTNF9VC\");\n await this.actor.createEmbeddedDocuments(\"Item\", [crit]);\n this.effect.update({disabled: true});\n}","laWHBP2jLrVxcgp9":"this.script.message(await this.actor.applyBasicDamage(2, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))","laptAldsT0Fm1rDt":"let blunt = await foundry.applications.api.DialogV2.confirm({window: {title : this.effect.name}, content :`

Appliquer la réduction des dégâts contondants ? (-3)

`})\n\nif (blunt)\n{\n args.modifiers.other.push({label : this.effect.name, details : \"Réduction des Dégâts Contondants\", value : -3})\n}","lbcIoWiXgY07OJpi":"let wounds = this.effect.sourceActor.system.characteristics.wp.bonus * (1 + (Math.floor(this.effect.sourceTest?.result.slOver / 3) || 0));\nthis.actor.modifyWounds(wounds);\nthis.script.message(`Healed ${wounds} Wounds`);","lhemR8EP5tGNKout":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields: {difficulty : \"average\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure : \"Suffer Creeping Irrationality\"}})\nawait test.roll();\nif (test.failed)\n{\n msg = `

@UUID[${this.effect.sourceItem.uuid}]{Creeping Irratitonality} Roll: ${Math.ceil(CONFIG.Dice.randomUniform() * 10)}

`\n if (test.result.roll % 11 == 0 || test.result.roll == 100)\n {\n msg += `

${this.actor.prototypeToken.name} also gained 1 Corruption Point. If mutating, this results in a @Table[mutatemental]{Mental Corruption}

`\n let newCorruption = Number(this.actor.status.corruption.value) + 1\n this.actor.update({\"system.status.corruption.value\" : newCorruption})\n }\n\n this.script.message(msg);\n}\n","lj7vOpa6tHHZ9bBB":"return this.actor.attacker","ljGX2w8hCTyLAjRp":"let specification = Number(this.item.specification.value) || 1;\nargs.actor.system.details.price.gc -= Math.floor(args.actor.system.details.price.gc * 0.1 * specification);","ljpM7muMyxGD04EX":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","lmBAZCtofsC8hHHG":"let SL = 1;\n\ndo {\n const signedSL = SL >= 0 ? `+${SL}` : \"SL\";\n const content = `\n
\n

Vous avez augmenté ${signedSL} ${SL > 1 ? \"DRs\" : \"SL\"}. Voulez-vous lancer un d10 ?

\n

1–6: ajoutez +1 DR

\n

7–10: perdez tous les DR accumulés et effectuez le test suivant à –1 DR

\n
\n`;\n const choice = await foundry.applications.api.DialogV2.confirm({\n yes: {label: \"Lancer\", icon: \"fas fa-dice\"},\n no: {label: `Keep ${signedSL} DR`, icon: \"fas fa-check\"},\n content,\n });\n\n if (!choice) break;\n\n const roll = new Roll(\"1d10\");\n await roll.toMessage({flavor: this.effect.name});\n\n if (roll.total >= 7) {\n SL = -1;\n break;\n }\n\n SL++;\n} while (true);\n\nthis.effect.setFlag(\"wfrp4e\", \"SL\", SL);","lol5J6h0pErzM71s":"return args.weapon?.system.properties.flaws.crewed","luEuwzYCUrch58Bp":"if (args.opposedTest.attackerTest.options?.grudge) {\n args.modifiers.other.push({label : this.effect.name, details : \"Augmentation des Dégâts\", value : 1}) \n}","lvjcddwRiN9iGruy":"let test = await this.actor.setupCharacteristic(\"t\", { appendTitle: ` - ${this.effect.name}`, fields: { difficulty: \"challenging\" } })\nawait test.roll();\n\nif (test.failed)\n{\n let ageAdded = Math.ceil(CONFIG.Dice.randomUniform() * 10) + Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let ws = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let bs = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let s = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let t = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let ag = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let dex = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n\n let currentAge = parseInt(this.actor.system.details.age.value)\n\n let inline = `@ROLL`\n let msg =\n `

${this.actor.prototypeToken.name} ages by ${inline.replace(\"@ROLL\", ageAdded).replace(\"@TT\", \"2d10\")} and loses

\n

${inline.replace(\"@ROLL\", ws).replace(\"@TT\", \"1d10\")} Compétence de Combat

\n

${inline.replace(\"@ROLL\", bs).replace(\"@TT\", \"1d10\")} Compétence de Tir

\n

${inline.replace(\"@ROLL\", s).replace(\"@TT\", \"1d10\")} Force

\n

${inline.replace(\"@ROLL\", t).replace(\"@TT\", \"1d10\")} Endurance

\n

${inline.replace(\"@ROLL\", ag).replace(\"@TT\", \"1d10\")} Agilité

\n

${inline.replace(\"@ROLL\", dex).replace(\"@TT\", \"1d10\")} Dextérité

\n `\n this.script.message(msg);\n\n let characteristics = foundry.utils.duplicate(this.actor.system.characteristics)\n\n characteristics.ws.initial -= ws\n characteristics.bs.initial -= bs\n characteristics.s.initial -= s\n characteristics.t.initial -= t\n characteristics.ag.initial -= ag\n characteristics.dex.initial -= dex\n\n this.actor.update({ \"system.characteristics\": characteristics, \"data.details.age.value\": ageAdded + currentAge })\n}","lwVhn4bSXJ3eoT9q":"if (this.item.system.weaponGroup.value == \"basic\")\n{\n let slash = this.item.system.qualities.value.find(i => i.name == \"slash\")\n if (slash)\n {\n slash.value = \"2A\"\n }\n}","m3qEVO5fseV6KHXa":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.qn4ZpvTQIX4rcJDl\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","m4eagTrVOXtotonR":"// Get the size\nlet size = this.actor.sizeNum \nlet diff = \"difficult\";\nif (size < 5) { // 5 = Monstrous\n diff = \"hard\";\n}\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : diff}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed) {\n this.actor.addSystemEffect(\"fear\")\n}","m58MpMZBblpq5LJu":"args.prefillModifiers.slBonus++;\nargs.prefillModifiers.successBonus++;\n","m84kG5cEPEByqHdd":"const uuid = \"Compendium.wfrp4e-core.items.Item.SfUUdOGjdYpr3KSR\";\nconst item = await fromUuid(uuid);\nawait this.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id});","m8qBlbH7ROoqa22o":"return args.context.reload","mBcLf11upaHS8AQq":"this.actor.status.addArmour(1, {source: this.effect})","mGHKBkDp4omSaBlD":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 20,\n \"bright\": 10,\n \"angle\": 360,\n \"alpha\": 0.4,\n \"animation\": {\n \"speed\": 3,\n \"intensity\": 3,\n \"type\": \"torch\",\n },\n \"color\": \"#ffcc66\",\n }}));","mJ9eMPub4epJSf00":"return args.weapon?.system.qualities.value.find(i => i.name == \"shield\") && this.actor.attacker","mPxmCsXYirAIT913":"let key = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.characteristics, this.effect.img), 1, \"Choisir la Caractéristique\");\n\nthis.effect.updateSource({changes : [{key : `system.characteristics.${key[0].id}.modifier`, mode : 2, value : 10}]})","mRvLsSVxNyt8LVZb":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.GRRN3XAKIpEVCY7z\")\nlet data = item.toObject();\ndata.name += \" (Au choix)\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","mT7PDcjF3cJTDbjR":"args.actor.system.details.move.value -= 1;\nargs.actor.system.status.carries.max *= 1.25;","mTnmPcjWmvScIBWY":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) || args.type == \"channelling\"","mV4Tmc0yfpL09KV7":"args.actor.addCondition(\"entangled\")","mXvtf3qhJjshpopX":"return [\"weapon\", \"cast\", \"channelling\"].includes(args.type)","mYL4i1vNlMl4vFYy":"return args.skill?.name != game.i18n.localize(\"NAME.Perception\") && args.skill?.name != game.i18n.localize(\"NAME.Track\");","ma0sWhebqwdRHWvY":"if (!args.flags.trained)\n{\n args.flags.trained = true;\n args.fields.modifier += 10;\n}","maKr58mvvyKxFyC3":"if (args.item.type == \"prayer\" && (args.item.damage.value || args.item.damage.dice))\n args.item.damage.value += \"+1\"","masOBNgSi5HYkf3m":"return args.type != \"cast\" && args.type != \"channelling\"","mgLGN1XPzPE4dReN":"args.fields.slBonus--;","mlulnXQo8XU8vKLD":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = await ValueDialog.create({text : \"Entrer la valeur\", title : this.effect.name});\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","mnvczEiu7gUSWvuV":"if (args.test.options.flags.skewering)\n{\n args.test.result.tables.critical = {\n label : \"Critique (si attaque réussie)\",\n class : \"critical-roll\",\n modifier : args.test.result.critModifier || 0,\n key: `crit${args.test.result.hitloc.result}`\n\n }\n}","mr8qm5Bg6k1idZ6Q":"return args.item?.name == `${game.i18n.localize(\"NAME.Play\")} (${game.i18n.localize(\"SPEC.Lute\")})`","mziJBUYcsrhkdcCJ":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{ \n this.actor.addCondition(\"prone\")\n}","n5RJqJL9fdRIxkuN":"if (this.actor.system.status.advantage.value > 0)\n{\n await this.actor.modifyAdvantage(-1);\n this.script.notification(\"Avantage retiré\")\n}\nelse \n{\n return this.script.notification(\"Avantage retiré\", \"error\")\n}\n\nlet test = await this.actor.setupTrait(this.item)\nawait test.roll();","n5wowuDE8Dz1uBZn":"let damage = this.effect.sourceActor.characteristics.int.bonus + 6;\nif (this.actor.has(game.i18n.localize(\"NAME.Mort-vivant\")) || this.actor.has(game.i18n.localize(\"NAME.Démoniaque\"))) { \n damage += 6\n}\nthis.script.scriptMessage(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}));\n\nlet test = await this.actor.setupCharacteristic(\"int\", {fields : {difficulty : \"average\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed) {\n\tthis.actor.addCondition(\"stunned\");\n}","n8X4Vgmrs4M5pyHK":"return !this.actor.isOpposing || this.actor.attacker.test.item.attackType != \"melee\" || !this.item.equipped.value","n99CqhPx3uABCU15":"if (args.test.result.critical && args.test.preData.reversal.allowed)\n{\n args.test.result.other.push(`${this.effect.name}: can reverse Critical Hit roll`)\n}","nCWAflBj7Si2BI1Q":"if (args.item.type == \"spell\" && args.item.system.lore.value != \"petty\")\n{\n args.item.cn.value = Math.max(4, args.item.cn.value * 2)\n}","nD2QVg3DrPK3foMf":"args.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), { fields: { difficulty: \"average\" } }).then(async test => {\n await test.roll();\n if (test.failed) {\n await args.actor.addCondition(\"bleeding\")\n await args.actor.addCondition(\"entangled\")\n }\n })","nEaF3jbCiVYD8jia":"return args.skill?.name != game.i18n.localize(\"NAME.Charm\") && !args.skill?.name.includes(game.i18n.localize(\"NAME.Lore\"));","nGTxNWBUBgTr87wU":"if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == \"attacker\")\n{ \n this.script.message(`Becomes lodged in the armour or flesh of the opponent. See @UUID[${this.item.uuid}]{${this.item.name}}.`, {speaker : {alias : this.item.name}, blind: true, whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}\n ","nHJdlqbOP0ECgywb":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.CnydL8p3PVAuF98w\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","nIOeK0BrtdZeZW8X":"console.log(\"SKILL\", this)\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"challenging\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nlet rollD10 = await new Roll(\"1d10\").roll()\nrollD10.toMessage(this.script.getChatData())\n\n\nif (test.succeeded)\n{\n //...\n}\nelse if (test.failed)\n{\n //...\n}\n","nNwAFEURKlFhPcvA":"CorruptionMessageModel.createCorruptionMessage(\"minor\", this.script.getChatData());","nSXzktHyNjGUXjaw":"return args.item?.system.isProjectiles","nYtAjSArsNbrU2ob":"if ([\"ag\", \"i\", \"int\"].includes(args.characteristic))\n{\n args.fields.modifier -= 10;\n}\nelse if ([\"wp\"].includes(args.characteristic))\n{\n args.fields.modifier += 10;\n}","nZtN0zM49xTuG86V":"if (this.actor.system.status.advantage.value >= 2)\n{\n await this.actor.modifyAdvantage(-2);\n this.script.notification(\"Avantage retiré\")\n}\nelse \n{\n return this.script.notification(\"Avantage retiré\", \"error\")\n}\n\nlet test = await this.actor.setupTrait(this.item)\nawait test.roll();","naF5EWr1CBkYRZTK":"if (args.opposedTest?.attackerTest?.item?.system?.isProjectiles)\n{\n let choice = await foundry.applications.api.DialogV2.confirm({window: {title : this.item.name}, content : `

Annuler les dégâts avec ${this.effect.name}?

`})\n\n if (choice)\n {\n args.abort = `${this.effect.name}: Dégats annulés.`;\n }\n}","ncIjDE6TFx88IQA1":"return args.skill?.name == game.i18n.localize(\"NAME.Climb\") || args.skill?.name == game.i18n.localize(\"NAME.Athletics\");","neaaVy6D6tfcst5P":"args.fields.slBonus += this.actor.characteristics.i.bonus;\n","ngMm7SgtVqVovFJG":"if (args.test.result.critical && args.test.result.critical != \"Total Power\")\n{\n args.test.result.other.push(` Bonecrusher Critical (+20) (only if Critical Cast selected)`)\n}","njPP9wDAsdh4WHIj":"if (args.totalWoundLoss > 0 && [\"trait\", \"weapon\"].includes(args.opposedTest.attackerTest.item?.type))\n{\n this.script.message(`Infected: ${args.actor.name} must pass an Easy (+40) Résistance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}","njmMhHf9qjPBCcNn":"args.targets.slBonus -= 3;","nkSmu7v9WiAaK4vq":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Tailor)';\nconst difficulty = 'easy';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n \n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","nkbTnaeBpthyhw4J":"let fortunePoints = this.effect.sourceTest.result.overcast.usage.other.current\nlet current = this.actor.status.fortune.value\n\nthis.actor.update({\"system.status.fortune.value\" : fortunePoints + current})\n\nthis.script.message(`${this.actor.prototypeToken.name} fortune points increased from ${current} to ${fortunePoints + current}`)","nkdKBJ8ItqWiRAWL":"// Apply changes when the mask is worn\n\nif (args.equipped) {\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [this.item.effects.contents[1]?.convertToApplied()])\n this.script.message(`${this.actor.name} porte le ${this.item.name}.
\n Ils gagnent +50 aux tests de natation et peuvent respirer sous l'eau.
\n S'ils portent le masque pendant plus d'une heure ou bénéficient de l'un de ses effets, ils sont exposés à @Corruption[moderate]{Corruption modérée}.\n `,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n\n// Notify of lingering effects when mask is Retiré\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Usagé)\"})\n this.script.message(`${this.item.name} sur ${this.actor.name} a été retiré et perd ses propriétés. Cependant, les effets durent [[1d10+4]] jours, après quoi ils doivent être manuellement retirés.`,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n )\n\n}\n","nlQA0shW8FCXjY7u":"return args.type != \"cast\" || args.item.lore.value != \"fire\"","nqWu0ZplxzRiUEAg":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\n// Kind of insane but whatever\nlet opposedResult = test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result\n\nreturn opposedResult?.winner == \"attacker\";","nuIpPD4uaZRuJni8":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.qdMbxW09FUoYBzmB\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","nvrFhHHVq3KzirlR":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"))\n","nvrT2HhsiGSycaff":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nlet damage = 10;\ndamage += excessSL;\nawait this.actor.applyDamage(damage, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP,\n loc: \"roll\",\n createMessage: this.script.getChatData(),\n});\nawait this.actor.addCondition('deafened', 2);","nxNqWmmF6mJTnrLo":"return args.weapon?.system.usesHands.includes(this.item.system.location.key);","nzh8d46l1ikhkz8Q":"return (args.type == \"weapon\" && (args.item.system.weaponGroup.value == \"blackpowder\" || args.item.system.weaponGroup.value == \"engineering\")) || (args.type == \"cast\" && args.item.system.lore.value == \"fire\")","o1zD8mej9TWKNxUq":"args.fields.slBonus -= 1;","o2QhtiLAmUEpDgBX":"return args.skill?.name != \"Voile (Aéronavale)\"","o3JUBKLvE6bBxK2n":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), { fields: { difficulty: \"average\" } })\nawait test.roll();\nif (test.failed) \n{\n await this.actor.addCondition(\"prone\")\n let injury = await fromUuid(\"Compendium.wfrp4e-core.items.ZhMADOqoo0y8Q9bx\");\n injury = injury.toObject()\n let toes = Math.clamp(Math.abs(test.result.SL) + 1, 1, 5)\n injury.system.location.key = this.item.system.location.key[0] + injury.system.location.value\n if (injury.system.location.key[0] == \"r\")\n {\n injury.system.location.value = `${toes} Right ${injury.system.location.value}s`\n }\n else if (injury.system.location.key[0] == \"l\")\n {\n injury.system.location.value = `${toes} Left ${injury.system.location.value}s`\n }\n foundry.utils.setProperty(injury, \"system.wfrp4e.count\", toes)\n this.actor.createEmbeddedDocuments(\"Item\", [injury])\n}","o478K0vsLGzY8YTK":"return args.context.dispel","o88xuUConwt0vFLw":"let points = this.effect.sourceTest.result.overcast.usage.other.current;\n\nthis.actor.update({\"system.status.fortune.value\" : this.actor.system.status.fortune.value + points});\n\nthis.script.message(`Gained ${points} Fortune Points`)","oA197GIqHpU5WR9V":"if (args.test.options.corruption || args.test.options.mutation)\n{ \n args.test.preData.canReverse = true;\n}","oDNfCNyt5KaUYmg2":"if(args.opposedTest.result.winner == \"defender\")\n{\n let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let msg = `Rolled ${roll}.`\n if (roll >= 7)\n {\n msg = `Attack hits with an SL of ${roll - 6}.`\n }\n this.script.message(msg, {blind: true, whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","oEsUsI74yGTZ9CwU":"return args.item?.name == game.i18n.localize(\"NAME.CharmAnimal\")","oGdsGPgJWcyWkiWl":"this.actor.addCondition(\"broken\")\n\nif (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n{\n this.script.message(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true}))\n}","oHenUKtaS3jT5xQn":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.4xF7M6ylIiGntekh\")\nitem = item.toObject()\nitem.name = this.effect.name\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})\n","oHmtdXWVwm7y7BtO":"args.fields.difficulty = \"hard\";","oPg4se8iQRD14kmB":"let filters = [\n {\n property : \"type\",\n value : \"weapon\"\n },\n {\n property : \"system.weaponGroup.value\",\n value : [\"twohanded\", \"polearm\"]\n }\n]\n\nlet items = await ItemDialog.createFromFilters(filters, 1, {text : \"Choisissez une arme d'hast ou une arme à deux mains appropriée\"})\nitems = items.map(i => i.toObject())\n\nitems.forEach(i => i.system.equipped.value = true);\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","oQI06eh8mJ9UqETO":"if (this.item.system.disabled) {\n await this.effect.deleteCreatedItems();\n} else if (!this.actor.items.find(i => i.name === \"Furtif\")) {\n await this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.OzwDT6kzoLYeeR2d\", this.effect);\n}","oTXPA6rbPnYOKNmo":"let characteristics = {\n \"ws\" : 35,\n \"bs\" : 10,\n \"s\" : 25,\n \"t\" : 30,\n \"i\" : 30,\n \"ag\" : 25,\n \"dex\" : 0,\n \"int\" : 15,\n \"wp\" : 35,\n \"fel\" : 15\n}\nlet skills = [\"Calme\", \"Esquive\", \"Intimidation\", \"Intuition\", \"Langue (Battle)\", \"Commandement\" , \"Savoir (Guerre)\", \"Perception\"]\nlet skillAdvancements = [25, 15, 25, 25, 15, 30, 20, 20]\n\nlet talents = [\"Vigilance\", \"Maîtrise du combat\", \"Combat Instinctif\", \"Inspiring\", \"Chance\", \"Déterminé\", \"Inébranlable\", \"Seigneur de guerre\"]\nlet trappings = [\"Arme simple\", \"Bouclier\", \"Plastron d'acier\", \"Brassards\", \"Heaume\", \"Jambières d'acier\"]\nlet specialItems = [\n {name: \"Two Handed Weapon\", type: \"trapping\", trappingType: \"clothingAccessories\" },\n]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nlet filters = [\n {\n property : \"type\",\n value : \"weapon\"\n },\n {\n property : \"system.weaponGroup.value\",\n value : [\"twohanded\", \"polearm\"]\n }\n]\n\nitems = items.concat(await ItemDialog.createFromFilters(filters, 1, {text: \"Choisissez une arme d'hast ou une arme à deux mains appropriée\"}))\n\nlet ride = await foundry.applications.api.DialogV2.confirm({window : {title : \"Compétence\"}, content : \"Ajouter Chaos Steed et +20 Conduite (Cheval) ?\"})\n\nif (ride)\n{\n let skill = await game.wfrp4e.utility.findSkill(\"Chevaucher (Cheval)\")\n skill = skill.toObject();\n skill.system.advances.value = 20;\n items = items.concat({name : \"Chaos Steed\", type: \"trapping\", \"system.trappingType.value\" : \"misc\"}, skill)\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(\">>>>>>><\", items)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","oV81zgbZsuTFG6L2":"let caster = this.effect.sourceActor;\n\nthis.actor.modifyWounds(caster.system.characteristics.fel.bonus);\n\nthis.script.message(`Healed ${caster.system.characteristics.fel.bonus} Wounds`);","oW1gtYVT5nrxDjM7":"return args.characteristic != \"ag\"","oWM43EdUiyHgUlfW":"if (args.test.item && args.test.item.name == game.i18n.localize(\"NAME.ConsumeAlcohol\"))\n args.test.preData.reversal = {allowed : true, if: \"success\"};\n","oWa7RkScnl6lR5vd":"if (args.test.characteristicKey == \"wp\")\n{\n if (args.test.failed)\n {\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP\")\n let data = item.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [data])\n\n this.script.message(`Test de FM échoué, ${this.actor.prototypeToken.name} gain de @UUID[Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP] pour [[1d10]] heures`)\n }\n}","obIXhQXKFyyQoNNV":"this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {appendTitle: ` - ${this.effect.name}`, fields: { difficulty: \"average\" } }).then(async test => {\n await test.roll()\n if (test.failed) {\n this.actor.modifyWounds(-1);\n this.script.message(\"Takes 1 Damage\")\n }\n})","ocBW3osTFnb5JCfe":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF\")\nlet data = item.toObject()\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n","ofddAHvzn1xUueSG":"args.AP.head.value -= tinDifference(args.AP.head.layers)\nargs.AP.body.value -= tinDifference(args.AP.body.layers)\nargs.AP.lArm.value -= tinDifference(args.AP.lArm.layers)\nargs.AP.rArm.value -= tinDifference(args.AP.rArm.layers)\nargs.AP.rLeg.value -= tinDifference(args.AP.rLeg.layers)\nargs.AP.lLeg.value -= tinDifference(args.AP.lLeg.layers)\n\nfunction tinDifference(layers)\n{ \n let metalAP = layers.filter(i => i.metal).reduce((prev, current) => prev + current.value, 0)\n\n let tinAP = layers.filter(i => i.metal).reduce((prev, current) => prev + Math.max(0, current.value - 2), 0)\n\n return metalAP - tinAP;\n}","ofijDpDzoLphIp8R":"this.actor.addEffectItems(\"Compendium.wfrp4e-helf.items.Item.PfqCi0tJN1ZxtwVi\");","ogJBAXTXyhTqACPO":"return args.item?.system.attackType != \"melee\"","ohl803m0tUwNfKAk":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet data = item.toObject();\ndata.system.specification.value = 5 - this.actor.characteristics.s.bonus\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","okW06V9UiPC4Vcrn":"let characteristics = {\n \"ws\" : 5,\n \"bs\" : 0,\n \"s\" : 5,\n \"t\" : 5,\n \"i\" : 10,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 0,\n \"wp\" : 5,\n \"fel\" : 5\n}\nlet skills = [\"Calme\", \"Esquive\"]\nlet skillAdvancements = [10, 10]\nlet talents = [\"Combat Instinctif\", \"Déterminé\"]\nlet trappings = [\"Veste de cuir\", \"Jambières de cuir\", \"Calotte de cuir\", \"Arme simple\", \"Lance\", \"Bouclier\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","okr3TtzpFoefUuJS":"let item = await fromUuid('Compendium.wfrp4e-core.items.EaqlLRQigwnsEAXX')\nlet data = item.toObject();\ndata.system.location.value = \"Collar Bone\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","oqgd9G6oI1ncPYLw":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.CV9btQn09S9Fn8Jk\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], {fromEffect : this.effect.id});","p222EiR8RRtlPm31":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\nawait test.roll();\nreturn test.failed;","p7NJB1PsY6X5q8OO":"if (this.actor.system.details.experience.current < 100) {\n return this.script.notification(game.i18n.localize(\"SCRIPT.NotEnoughXP\"))\n}\n\nlet traits = await warhammer.utility.findAllItems(\"trait\", null, true);\ntraits = traits.filter(t => t.name.includes(\"Companion Trait\"));\n\nlet items = await ItemDialog.create(traits);\nthis.actor.createEmbeddedDocuments(\"Item\", items);\nlet expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);\nexpLog.push({amount : 100, reason: items[0].name, spent: this.actor.details.experience.spent + 100, total: this.actor.details.experience.total, type: \"spent\"});\nthis.actor.update({\n \"system.details.experience.spent\": this.actor.details.experience.spent + 100,\n \"system.details.experience.log\": expLog\n });","pAgiAGyaLJY10894":"return args.skill?.name == game.i18n.localize(\"NAME.Charm\");","pBMioPUtDn1mk9f5":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.5KP9sOoLSGvj9EXp\")\nlet data = item.toObject(); \nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});","pG5OVokZzCRHIrwz":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.mgeiaDZXei7JBEgo\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","pHyXdPnWwoFrUA5n":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Entertain\"));","pLKv4moua6XhNdmA":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.1dUizIgLBgn4jICC\");\nlet data = item.toObject();\ndata.name += \" (Woodlands)\";\nthis.actor.createEmbeddedDocuments(\"Item\", Array(this.effect.sourceTest.result.overcast.usage.other.current).fill(data), {fromEffect : this.effect.id})","pNPjXEoQGHLKzq0r":"let talent = this.actor.has(\"Arcane Magic (Light)\", \"talent\")\nlet demon = this.actor.has(game.i18n.localize(\"NAME.Daemonic\"))\n\nif (!talent)\n{\n await this.actor.addCondition(\"blinded\")\n}\n\nif (demon)\n{\n await this.actor.addCondition(\"stunned\")\n}","pPV9oEydXb7oi6jX":" if (args.totalWoundLoss > 0)\n {\n args.actor.addCondition('ablaze')\n }","pR4Q2OnPxXtwRVli":"let criticals = this.actor.itemTypes.critical;\n\nif (criticals.length)\n{\n this.script.notification(\"Impossible de recevoir une Blessure Critique \");\n this.actor.deleteEmbeddedDocuments(\"Item\", criticals.map(i => i.id))\n}\n\nif (foundry.utils.getProperty(args.data, \"system.status.wounds.value\") == 0)\n{\n this.script.notification(`Endormi pendant ${Math.ceil(CONFIG.Dice.randomUniform() * 10)} tours`)\n}","pRp6hoBJ0JQa4NNG":"return args.item?.system?.attackType != \"ranged\" || this.actor.system.canFly.effects.filter(e => e.name != \"Flying\")[0].disabled","pSfA9mBk9Uw8QMLj":"return args.weapon?.system.isRanged;","pVSnn4Zw6y1EBDhv":"args.actor.system.details.man -= 1;\nargs.actor.system.details.move.value -= 1;","pdvCwjxHI56EmxuU":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.sJ3yX1kvzu2hgNq5\")\nlet amphibious = item.toObject();\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS\")\nlet as = item.toObject();\nas.name += \" (Sight)\";\nawait this.actor.createEmbeddedDocuments(\"Item\", [amphibious, as], {fromEffect : this.effect.id})","pj7gjxHrnrZonC6U":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.8pVzgPkgWpTJvfhG\")\nlet data = item.toObject();\ndata.name = `${data.name} (Mort-vivant, Warm-bloods)`;\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","pkKpxVqRHIzywerL":"const ablaze = this.actor.hasCondition(\"ablaze\");\n\nif (ablaze) {\n ablaze.delete();\n this.script.notification(\"Résistance à l'état En Flammes\");\n}","pnB9TzSEytkxk3Rb":"return this.actor.hasSystemEffect(\"infighting\")","ppc8L3WtIx6JzlAd":"if (args.equipped) {\n await this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.mDgEMOoJpi8DkRYb\", this.effect);\n} else {\n this.effect.deleteCreatedItems()\n}","pq1YQffxtOcqCRTn":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {appendTitle: ` - ${this.effect.name}`})\nawait test.roll();\nif (!test.succeeded)\n{\n this.actor.addCondition(\"prone\")\n}","pqQkeUVpuZ0jOKnZ":"const tables = [\n game.wfrp4e.tables.findTable(\"mutatephys\"),\n game.wfrp4e.tables.findTable(\"mutatephys\", \"Khorne\"),\n];\n\nif (!tables.length) {\n return ui.notifications.error(\"Table de Mutation introuvable, veuillez vous assurer qu'une table avec la clé `mutatephys` est importée dans le monde.\");\n}\n\nconst values = {}\n\nlet i = 0;\nfor (const table of tables) {\n values[i] = table.name;\n i++;\n}\n\nconst key = await ValueDialog.create({}, null, values);\nconst table = tables[key];\n\nconst results = (await table.drawMany(2)).results;\nconst uuids = results.map(result => `Compendium.${result.documentCollection}.${result.documentId}`);\n\nawait this.actor.addEffectItems(uuids, this.effect);\nthis.script.notification(\"TTirage de mutation effectué et appliqué\");","pvTcazVvW4v04otW":"if (args.totalWoundLoss > 0) {\n await 0rgs.actor.addCondition(\"poisoned\", 2)\n}","pvk5OhTNdVgwXoUa":"args.fields.successBonus += 2;","px7eEdhOEt7zOTrq":"return [\"int\", \"t\", \"wp\", \"i\"].includes(args.characteristic)","pzimrxrqpv282Oqb":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.TaYriYcJkFuIdBKp\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id});\n","pzknBcJtZWeliE27":"return args.item?.name == game.i18n.localize(\"NAME.Leadership\") || args.item?.name == game.i18n.localize(\"NAME.Cool\")","q0LvphC8RDSyR0oY":"let choice = await ItemDialog.create(ItemDialog.objectToArray({\n ws : game.wfrp4e.config.characteristics.ws,\n t : game.wfrp4e.config.characteristics.t,\n ag : game.wfrp4e.config.characteristics.ag,\n wp : game.wfrp4e.config.characteristics.wp\n}, this.effect.img), 1, \"Choisir la caractéristique\");\n\nthis.effect.updateSource({\"flags.wfrp4e.characteristic\" : choice[0].id})","q3nRyXaxksdCiLFM":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.j6v78dnOOdCB6c3d\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","q5RgoYr12kBF6FA5":"return args.item?.system?.attackType == \"ranged\" && this.item == args.item && !this.actor.isOpposing","q8lOAWr2970sZeTw":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'challenging';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","qAEZgtu5CrfUkxhx":"if (args.test.options.staunchBleeding)\n{\n if (args.test.succeeded)\n {\n let staunch = Number(args.test.result.SL) + 1\n if (args.test.options.fieldDressing && args.test.result.reversed)\n {\n staunch = Math.min(1, Number(args.test.result.SL)) + 1\n }\n args.test.result.other.push(`${this.actor.name} enlève ${staunch} Etats Hémmoragie du patient.`)\n }\n else if (this.actor.characteristics.int.bonus + Number(args.Test.result.SL) < 0)\n {\n args.Test.result.other.push(`Le patient contracte une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`)\n }\n}","qDYJnO2JosPJrjpz":"if (args.totalWoundLoss <= 0) return;\n\n// Poisoned handled by Venin trait\n\nconst test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"average\"},\n context: {\n failure: `Gain de 1 Point de Corruption.`\n }\n});\n\nawait test.roll();\n\nif (test.failed && args.actor.type === \"character\")\n args.actor.update({\"system.status.corruption.value\": args.actor.system.status.corruption.value + 1});\n\n\nawait args.actor.applyEffect({effects : this.item.effects.getName(\"Morsure du Crâne Pourpre\")})","qITSQMvvkgj81fW1":"return ![\"t\", \"s\"].includes(args.characteristic)","qK4q4o6cQhcGzFX3":"let fear = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nlet leader = await fromUuid(\"Compendium.wfrp4e-core.items.Item.vCgEAetBMngR53aT\")\nlet fearData = fear.toObject();\nlet leaderData = leader.toObject();\nfearData.system.specification.value = this.effect.sourceTest.result.overcast.usage.other.current; \ntalents = new Array(1 + this.effect.sourceTest.result.overcast.available).fill(leaderData); // Assume any unused overcast is for war leader\nthis.actor.createEmbeddedDocuments(\"Item\", [fearData].concat(talents), {fromEffect : this.effect.id})","qSwCYMMiIHmSV1X5":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n let effectData = this.item.effects.contents[0].convertToApplied();\n\t effectData.system.sourceData.item = this.item.uuid\n effectData.duration.seconds = 10800\n\tactor.applyEffect({effectData : [effectData]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","qT0WBPxLMMO9gvCd":"if (!this.actor.has(\"Vision Nocturne\") && !this.actor.has(\"Vision Nocturne\", \"talent\") && !this.actor.hasCondition(\"blinded\"))\n{\n this.actor.addCondition(\"blinded\", 1, {\"flags.wfrp4e.nightshroud\" : true})\n}","qTcK1TSjLTi0jNQK":"let AP = args.actor.status.armour;\n\nAP[\"head\"].value += 1;\nAP[\"rArm\"].value += 1;\nAP[\"lArm\"].value += 1;\nAP[\"body\"].value += 1;\nAP[\"lLeg\"].value += 1;\nAP[\"rLeg\"].value += 1;","qTk96NKh14YOIShf":"return args.skill?.name === game.i18n.localize(\"NAME.Haggle\");","qUwnVlWpsmDom3RK":"args.fields.modifier -= 5;","qZ8TBagp2d4dJAqI":"return !args.weapon || args.weapon?.system.isMelee","qZschZU0nee0kJlk":"args.fields.modifier -= 30;","qaVde0sTuMBRi2nl":"return [\"NAME.Evaluate\", \"NAME.Gamble\"].map(i => game.i18n.localize(i)).includes(args.skill?.name)","qcyl98GYD55BkJsD":"this.actor.status.encumbrance.state = 0;\nthis.actor.status.encumbrance.pct = 0;","qhjU1QdsfqA8h5iI":"return args.item?.system?.attackType != \"ranged\" || !this.item.equipped.value","qijgjcOBCDmhglRX":"return args.skill?.name == game.i18n.localize(\"NAME.SleightOfHand\");","qjli5evn8UA9uTeZ":"return args.actor.uuid == this.effect.sourceActor.uuid;","qmGwT929EiZ3lW2x":"if (args.weaponProperties.qualities.penetrating)\n{\n args.alreadyPenetrating = true;\n}\nelse \n{\n args.weaponProperties.qualities.penetrating = true;\n}","qmH61HmrEJcmQTiu":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.tNWrJUOArwfWXsPw\");\nitem = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id});","qmOt7h17hGAKqQe0":"\n\nif (!args.opposedTest.attackerTest.item?.system?.isMelee) \n{\n let choice = await foundry.applications.api.DialogV2.confirm({ window: { title: this.effect.name }, content: `

${this.effect.name}: Is this a ranged or magical attack that orignates outside the Dome?

` })\n\n if (choice) \n {\n args.ward = 6;\n }\n}\n","qnJu82zgnfOsnqZV":"let closed = !this.item.getFlag(\"wfrp4e-soc\", \"gunport\") || false;\n\nawait this.item.setFlag(\"wfrp4e-soc\", \"gunport\", closed);\nlet scriptData = this.effect.system.scriptData;\n\nif (closed) {\n scriptData[0].label = \"Open\";\n} else {\n scriptData[0].label = \"Close\";\n}\n\nawait this.effect.update({\"system.scriptData\": scriptData});","qu194dVXm9Vx1TGk":"if (args.test.options.useOnesSupportive && (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target)) {\n\n let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\n let ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\n if (ones > SL) {\n args.Test.data.result.SL = \"+\" + (ones + args.test.successBonus + args.test.slBonus)\n args.test.result.other.push(`${this.effect.name}: Valeur d'unité utilisée comme DR`)\n }\n}","quPcuKsq2fcild4a":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"easy\"}, context: {failure : `${this.effect.name}: Vomit!`} })\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}","qxzhPtysAjPWspKf":"if (this.actor.has(\"Mort-vivant\") || this.actor.has(\"Démoniaque\"))\n{\n this.script.notification(`Impossible d'entrer dans ${this.effect.name} !`);\n}","qyBmkCJo5606o4J9":"this.item.system.flaws.value = this.item.system.flaws.value.filter(i => i.name != \"weakpoints\")","qzGPJflVW7c2Ciim":"return args.skill?.name !== game.i18n.localize(\"NAME.Cool\");","r6hi5vMdLhTaaPfb":"args.actor.details.move.value += this.effect.sourceTest.result.overcast.usage.other.current","rBAoyhzeU3Q8MVSk":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 50;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n \n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","rCh3ltUrUMovd2Kc":"if (this.actor.hasCondition(\"surprised\"))\n{\n this.script.notification(\"Impossible d'être surpris\");\n this.actor.removeCondition(\"surprised\");\n}","rF0Z3hTUUnSxL3Mq":"let armour = (await fromUuid(\"Compendium.wfrp4e-core.items.VUJUZVN3VYhOaPjj\")).toObject()\nlet bite = (await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")).toObject()\nlet fear = (await fromUuid(\"Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn\")).toObject()\nlet nightVision = (await fromUuid(\"Compendium.wfrp4e-core.items.FmHDbCOy3pH8yKhm\")).toObject()\nlet tracker = (await fromUuid(\"Compendium.wfrp4e-core.items.ClOlztW6hH8rslbp\")).toObject()\nlet weapon = (await fromUuid(\"Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM\")).toObject()\n\narmour.name = \"Armour (Hide)\"\narmour.system.specification.value = 2\nbite.system.specification.value = 3\nfear.system.specification.value = 2\nweapon.system.specification.value = 4\nlet items = [armour, bite, fear, nightVision, tracker, weapon]\n\n\nlet belligerent = (await fromUuid(\"Compendium.wfrp4e-core.items.GbDyBCu8ZjDp6dkj\")).toObject()//{Belligerent}\nlet bestial = (await fromUuid(\"Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP\")).toObject()//{Bestial}\nlet big = (await fromUuid(\"Compendium.wfrp4e-core.items.a8MC97PLzl10WocT\")).toObject()//{Big}\nlet blessed = (await fromUuid(\"Compendium.wfrp4e-core.items.5muSFXd6oc760uVj\")).toObject()//{Blessed (Ulric)}\nlet champion = (await fromUuid(\"Compendium.wfrp4e-core.items.4mF5Sp3t09kZhBYc\")).toObject()//{Champion}\nlet die = (await fromUuid(\"Compendium.wfrp4e-core.items.UsJ2uIOOtHA7JqD5\")).toObject()//{Die Hard}\nlet fast = (await fromUuid(\"Compendium.wfrp4e-core.items.9MjH4xyVrd3Inzak\")).toObject()//{Fast}\nlet frenzy = (await fromUuid(\"Compendium.wfrp4e-core.items.yRhhOlt18COq4e1q\")).toObject()//{Frenzy}\nlet immunity = (await fromUuid(\"Compendium.wfrp4e-core.items.IAWyzDfC286a9MPz\")).toObject()//{Immunité Psychologique}\nlet regenerate = (await fromUuid(\"Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR\")).toObject()//{Régénération}\nlet size = (await fromUuid(\"Compendium.wfrp4e-core.items.8slW8CJ2oVTxeQ6q\")).toObject()//{Taille (Large)}\n\nblessed.system.specification.value = \"Ulric\"\nsize.system.specification.value = \"Large\"\n\nlet optional = [belligerent, bestial, big, blessed, champion, die, fast, frenzy, immunity, regenerate, size];\n\nlet chosen = await ItemDialog.create(optional, \"unlimited\", \"Choisir des Traits Optionnels\");\n\nitems = items.concat(chosen || [])\nthis.script.notification(`Adding ${items.map(i => i.name).join(\", \")}`);\nthis.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect : this.effect.id})\n","rIISfbCShejmJNKw":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.oRx92ByVNEBN6YkK\")\nlet data = item.toObject()\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n","rJ8pspSekyDLkiqG":"return args.skill.name === game.i18n.localize(\"NAME.Cool\")","rLMaVNEGdZ6xj5Au":"return ![\"i\", \"int\", \"fel\"].includes(args.characteristic)","rRfff55c7elyvbCb":"return this.actor.flags.useless[this.item.system.location.key] && args.weapon?.system.usesHands.includes(this.item.system.location.key[0] + \"Arm\")","rUGSx06BuBvX9kgf":"if (args.test.result.charging)\n{\n args.test.result.damage += 1\n args.test.result.additionalDamage += 1\n if (!args.test.result.resolute) {\n args.test.result.breakdown.damage.other.push({label : this.effect.name, value : this.item.Advances});\n args.test.result.resolute = true // Prevent duplicate messages\n }\n}\n","rVRDoxiWILo7d8FF":"let specification = Number(this.item.specification.value) || 1;\nargs.actor.system.status.wounds.max += Math.floor(args.actor.system.status.wounds.max * 0.3 * specification);\nargs.actor.system.status.carries.max -= Math.floor(args.actor.system.status.carries.max * 0.1 * specification);\nargs.actor.system.details.price.gc += args.actor.system.details.price.gc * 0.2 * specification;","rVpPNILEzWL9lj6b":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.kJNAY1YRaCy9IgmT\")\nlet terrorTraitItem = item.toObject()\nterrorTraitItem.system.specification.value = Number(this.effect.item.system.specification.value) \nthis.actor.createEmbeddedDocuments(\"Item\", [terrorTraitItem]);","rX8FTinyTMj9WJri":"if (!this.actor.flags.holed) return;\nif (this.actor.flags.holed.applied === true) return;\nif (this.actor.hasCondition(\"dead\")) return;\n\nconst currentHoled = this.actor.flags.holed.holed || 0;\n\nconst openGunPorts = this.actor.itemTypes.vehicleMod.reduce((acc, m) => {\n if (!m.name.toLowerCase().includes(\"gun port\"))\n return acc;\n\n let closed = m.getFlag(\"wfrp4e-soc\", \"gunport\");\n if (!closed) acc++;\n\n return acc;\n}, 0);\n\nconst totalHoled = currentHoled + openGunPorts;\nconst toughness = this.actor.system.characteristics.t.value;\nthis.actor.flags.holed.total = totalHoled;\n\nif (totalHoled >= toughness) {\n const speaker = ChatMessage.getSpeaker({actor: this.actor});\n this.script.message(`\n

${speaker.alias} coule en raison d'un score Percé (${totalHoled}) égal ou supérieur à sa Robustesse (${toughness })

\n

\n Percé en raison de dégâts critiques : ${currentHoled}
\n Percé en raison de sabords ouverts : ${openGunPorts}\n

\n `, { flavor: this.effect.name.split(\"(\")[0]});\n this.actor.addCondition(\"dead\");\n} else if (totalHoled >= (toughness * 0.5)) {\n this.actor.system.details.move.value -= 1;\n this.actor.system.details.man -= 1;\n this.actor.flags.holed.half = true;\n}\n\nthis.actor.flags.holed.applied = true;","rXMylpnEtZpwou6x":"this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty : \"average\"}}).then(async test =>\n{\n await test.roll()\n if (test.failed)\n {\n this.actor.addCondition(\"fatigued\") \n }\n})","ramav4ymrDDkPKK4":"if (this.actor.hasCondition(\"bleeding\"))\n{\n this.actor.removeCondition(\"bleeding\");\n this.script.notification(\"Retiré 1 Etat Hémmoragie\")\n}\nelse\n{\n this.script.notification(\"Aucun Etat Hémmoragie\");\n}","ratP9ByLjQPiLlFK":"args.data.reversal = {allowed : true, if: \"success\"};","rdD6Ra954TlkzQCu":"const knownTechniques = this.actor.itemTypes[\"wfrp4e-helf.technique\"].length;\nconst xpCost = knownTechniques * 100;\n\nif (this.actor.system.details.experience.current < xpCost) {\n return this.script.notification(game.i18n.localize(\"SCRIPT.NotEnoughXP\"));\n}\n\nconst techniques = await warhammer.utility.findAllItems(\"wfrp4e-helf.technique\", \"Loading Techniques\", true);\nconst choice = await ItemDialog.create(techniques, 1, {text: \"Choose Sword Dance\", title: this.effect.name});\nif (choice.length) {\n this.actor.addEffectItems(choice.map(i => i.uuid), this.effect);\n let expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);\n expLog.push({\n amount: xpCost,\n reason: `${game.i18n.localize(\"WFRP4E.SwordDance\")}: ${choice[0].name}`,\n spent: this.actor.details.experience.spent + xpCost,\n total: this.actor.details.experience.total,\n type: \"spent\",\n });\n this.actor.update({\n \"system.details.experience.spent\": this.actor.details.experience.spent + xpCost,\n \"system.details.experience.log\": expLog,\n });\n}","rdaMhMyHrJjQ6vVC":"game.wfrp4e.utility.postPeur(this.item.Advances, this.actor.name)","re1UFtxvRRjpPB7Z":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.nF5z1OEhpi4t6a6S\");\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nif (data.system.location.key[0] == \"r\")\n{\n\tdata.system.location.value = \"Cheville droite\"\n}\nelse if (data.system.location.key[0] == \"l\")\n{\n\tdata.system.location.value = \"Cheville gauche\"\n}\n\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {skipLocationValue : true, fromEffect: this.effect.id})\n","red2bt4PGgIWAdTR":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n let effectData = this.item.effects.contents[0].convertToApplied();\n let minutes = Math.ceil(CONFIG.Dice.randomUniform() * 10) * 10;\n effectData.duration.seconds = 60 * minutes\n this.script.message(`${game.i18n.localize(\"Duration\")}: ${minutes} ${game.i18n.localize(\"Minutes\")}`, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n\tactor.applyEffect({effectData : [effectData]})\n}\nelse\n{\n\tthis.script.notification(\"None left!\", \"error\")\n}","rgSwSeB3shIMVMb6":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.x0WMGwuQzReXcQrs\")\nlet data = item.toObject(); \nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});","rgnGu3IQrS8Vj9Op":"const bonus = game.settings.get(\"wfrp4e\", \"homebrew\").advantageBonus;\n\nargs.fields.modifier += bonus;","rlTvhnDpj4lzfusf":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Sail\")) && args.skill?.name !== game.i18n.localize(\"NAME.Climb\");","rly9iBUy8EX7NhQT":"if (game.user.targets.size !== 1)\n return ui.notifications.warn(\"Vous devez cibler exactement un seul Bateau.\");\n\nconst target = game.user.targets.first();\nconst vehicle = target.actor;\n\nif (!(vehicle.system instanceof VehicleModel))\n return ui.notifications.warn(\"Vous ne pouvez Constrict qu'un Bateau\");\n\nif (vehicle.size > 3)\n return ui.notifications.warn(\"Vous ne pouvez Constrict que des navires de Taille Large ou plus petits\");\n\nconst turns = Math.ceil(vehicle.system.details.length.value / 10);\n\nconst mainEffect = this.item.effects.contents[0];\nconst effectData = mainEffect.toObject();\n\neffectData.statuses = [effectData.name.slugify()];\n\nfoundry.utils.setProperty(effectData, \"flags.wfrp4e.target\", target.id);\nfoundry.utils.setProperty(effectData, \"flags.wfrp4e.turns\", turns);\n\nawait this.actor.applyEffect({effectData: [effectData]});\n\nconst speaker = ChatMessage.getSpeaker({actor: this.actor});\n\nthis.script.message(`${speaker.alias} a commencé à s'enrouler autour du ${target.name} et pourra commencer à l'écraser après ${turns} tours.`);","rnioLwiJP7ps5Jwy":"if (args.item.type == \"skill\" && args.item.name == `${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Basic\")})`)\n{\n args.item.system.modifier.value += 30;\n}","roKvPHDSpX4IV11C":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Perform\")) && args.characteristic != \"ag\"","roYVcP5Zqcsa8jVw":"args.actor.system.details.move.value -= 1;","rpxQU26BU7nwjtqY":"let location = this.item.system.location.key\nlet test = await this.actor.setupCharacteristic(\"dex\", {context : {failure : `${this.effect.name}: Lâchez l'objet!`}, skipTargets: true, appendTitle : \" - \" + this.effect.name, fields : {difficulty : \"average\"}})\nawait test.roll();\n\n\nif (location && test.failed)\n{\n let dropped = this.item.system.weaponsAtLocation;\n\n if (dropped.length)\n {\n this.script.notification(`Vous lâchez ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}\n\nreturn test.succeeded","rqTT8yOyK4bUwbdm":"let test = args.test\nif (test.spell.lore.value == \"fire\")\n{\n if (test.result.overcast.usage.target?.AoE)\n {\n test.result.overcast.usage.target.current += test.actor.characteristics.wp.bonus\n test.result.overcast.usage.target.initial += test.actor.characteristics.wp.bonus\n }\n if (test.result.overcast.usage.range)\n {\n test.result.overcast.usage.range.current *= 2\n test.result.overcast.usage.range.initial *= 2\n }\n \n}","rr4htuVq45onXdRG":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {appendTitle: ` - ${this.effect.name}`, fields : {difficulty : \"average\"}})\ntest.roll();","rxB1AqfVMDqTRieE":"return ![\"ws\", \"bs\", \"ag\"].includes(args.characteristic) && args.skill?.name != game.i18n.localize(\"NAME.Perception\")","s07GKMPCvQ8Heorc":"const value = this.effect.sourceActor.system.characteristics.wp.bonus;\nthis.script.message(await args.actor.applyBasicDamage(value, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true}));","s0kTuDE0qv68V2KI":" this.actor.getActiveTokens().forEach(t => t.document.update({texture : {tint : \"#FFBF00\"}}));\n","s3Wg2xd6AlJ4sz3n":"let damage = this.actor.itemTypes.mutation * 6;\n\nif (!damage)\n{\n return \n}\n\nawait this.actor.applyDamage(damage, {\n loc: \"roll\",\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL,\n createMessage: this.script.getChatData(),\n});","s5bO0Sf0qpS27Tve":"await args.actor.addCondition(\"ablaze\", 3)\nawait args.actor.addCondition(\"prone\");","s6eZXfZkC1My6EXl":"let lore = this.effect.name.split(\" \")[2].toLowerCase();\nif (args.item.type == \"spell\" && args.item.system.lore.value == lore)\n{\n args.item.system.cn.value = Math.max(0, args.item.system.cn.value - 1);\n}\n","s7gJQdzuM3fz2zQK":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.QluSTTTq3viHJJUh\")\nlet data = item.toObject();\ndata.system.location.value = \"Hip\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n \nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}","s7kW3lm2eU5IPrLP":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc\")\nlet dv = item.toObject();\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.OzwDT6kzoLYeeR2d\")\nlet stealthy = item.toObject();\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.XSb3QVB9ipPBFt56\")\nlet shadow = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [dv, stealthy, shadow], {fromEffect : this.effect.id});","s8idWt9YdMTRfnjV":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW\")\nlet data = item.toObject();\ndata.system.specification.value = 4 - this.actor.characteristics.s.bonus\ndata.name = item.name.replace(\"(Feature)\", \"\");\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","s8xU6OOZbbfo6VIw":"args.fields.slBonus += this.actor.system.characteristics.ag.bonus\n","s94yKZ4o5XN4JWM1":"// Any attack with such ammunition which inflicts at least one Wound,\n// also inflicts one Bleeding Condition.\n\nif (args.totalWoundLoss > 0) {\n args.actor.addCondition(\"bleeding\")\n}\n","s9J1TUkpGdvSWvPO":"this.actor.addCondition(\"blinded\");","s9KcytRE7i0cU06n":"if ([\"dragon\"].includes(args.opposedTest.defender.details.species.value.toLowerCase()))\n {\n args.modifiers.other.push({label : this.effect.name, details : \"Blessures Doublées vs Dragons\", value : args.totalWoundLoss});\n args.totalWoundLoss *=2;\n }","sAVpm7hFRHpbCLXm":"return [\"ws\", \"bs\", \"s\", \"t\", \"ag\", \"i\"].includes(args.characteristic)","sB4KB9bT3nQhAoqG":"// This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor\n\nlet mainEffect = this.item.effects.contents[0];\nif (mainEffect.name.includes(\"\"))\n{\n let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, \"Choisir le Savoir\");\n if (choice.length)\n {\n mainEffect.update({name : mainEffect.name.replace(\"\", choice[0].name)})\n this.item.update({name : this.item.name += ` (${choice[0].name})`})\n }\n}\n\nthis.effect.delete();","sHVLKIdPbzLVItCa":"if (args.actorsystem.details.move.oars.value > 0)\n args.actor.system.details.move.oars.value -= 1;","sHfkTRqTWPg2JAGN":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","sKO8TcLIkCTnFvXu":"args.abort = true;\nthis.script.notification(`Cannot use ${this.item.system.location.value}!`, \"error\")","sNSfDBIA2k17hPYI":"let ablaze = this.actor.hasCondition(\"ablaze\");\nif (ablaze)\n{\n\tablaze?.delete();\n\tthis.script.notification(\"État En Flammes ignoré\");\n}\n","sPvfYQEnyAYNpIhF":"let shouldDamage = await foundry.applications.api.DialogV2.confirm({\n window : {title: this.effect.name + \" - \" + args.actor.name},\n content: \"Êtes-vous une créature humanoïde qui n'a pas fait de sacrifice à Rhya (ou à une autre divinité de la nature ou esprit puissant de la nature auquel le culte de Rhya est bien disposé, comme Isha ou Taal) depuis le dernier équinoxe de printemps ?\"\n});\n\nif (shouldDamage) {\n let damage = 1 + this.effect.sourceTest.result.baseSL;\n await args.actor.applyBasicDamage(damage, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n args.actor.addCondition(\"fatigued\");\n}","sQDh3g11pWchxpW9":"return true","sSMg43ZjnNmpytfj":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name});\nawait test.roll();\n","sT3t7huqUVWpbCt3":"if (Number(this.actor.system.details.age.value) > 870) {\n args.fields.slBonus -= 4;\n} else if (Number(this.actor.system.details.age.value) > 350) {\n args.fields.slBonus -= 3;\n} else {\n args.fields.slBonus -= 2;\n}","sUHuj00IpoZ7Gd03":"return args.skill?.name != game.i18n.localize(\"NAME.Swim\");","sWyO1DNaqb2EdHoW":"if (!this.actor.items.getName(game.i18n.localize(\"NAME.Frenzy\"))) // Either frenzy trait or psychology\n{\n // Add Frenzy psychology\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.DrNUTPeodEgpWTnT\")\n let data = item.toObject();\n data.effects[0].disabled = false;\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n}\n\nthis.script.message(`

By imbibing this potion, ${this.actor.prototypeToken.name} has becomes subject to Frenzy. This Frenzy lasts [[1d10]] Rounds, and may not be ended sooner.

`, \n {whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true }) ","sYlGRLApZ3Ub24ea":"this.actor.system.status.addArmour(3, {source: this.effect.name, magical: true})","sZwLitzwKBTaFca3":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN\")\nlet data = item.toObject();\ndata.name = data.name.replace(\"Target\", \"Greenskins, Mort-vivant, Chaos\")\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","sagKJM6oDFlw4ED2":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nreturn test.failed;","sbK1a7txpSoXFzyB":"if (args.test.options.useOnesArgumentative && (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target)) {\n\n let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\n let ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\n if (ones == 0) {\n ones = 10;\n }\n\n\n if (ones > SL) {\n args.Test.data.result.SL = \"+\" + (ones + args.test.successBonus + args.test.slBonus)\n args.test.result.other.push(`${this.effect.name}: Utilisation de l'unité des dés comme DR`)\n }\n}","scfm5iWWBxWI6QaK":"let darkvision = await fromUuid(\"Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc\")\nlet fear = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nlet acutesense = await fromUuid(\"Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS\")\nfear = fear.toObject();\nfear.system.specification.value = 1;\nthis.actor.createEmbeddedDocuments(\"Item\", [darkvision, fear, acutesense], {fromEffect : this.effect.id})","sgS9rblPkQB36C8S":"if (this.item.name.includes(\"(\"))\n{\n\tlet trade = this.item.parenthesesText;\n\tif (trade?.toLowerCase() != \"any\")\n\t return this.item.updateSource({\"system.tests.value\" : this.item.system.tests.value.replace(\"any one\", trade)})\n}\n\nlet index = game.packs\n.filter(i => i.metadata.type == \"Item\")\n.reduce((acc, pack) => acc.concat(pack.index.contents), [])\n.filter(i => i.type == \"skill\" && i.name.includes(game.i18n.localize(\"NAME.Trade\")))\n.map(i => {\n\ti.id = i._id\n\treturn i\n})\n\nlet choice = await ItemDialog.create(index, 1, {text : \"Choose a Trade Skill, or select none to enter manually.\", title : this.effect.name})\nlet text;\nif (!choice[0])\n{\n let custom = await ValueDialog.create({text : \"Enter Custom Trade Skill\", title : \"Custom Trade\"}); \n text = custom || \"\"\n}\nelse \n{\n text = game.wfrp4e.utility.extractParenthesesText(choice[0].name)\n}\n\nawait this.item.updateSource({name : this.item.name.replace(\"(Any)\", \"\").replace(\"(any)\", \"\").trim() + ` (${text})`, \"system.tests.value\" : this.item.system.tests.value.replace(\"any one\", text)});","shkBUtUuMPDKvFm7":"let test = await this.actor.setupSkill(\"Esquive\", {fields : {difficulty : \"average\"}})\nlet caster = this.effect.sourceActor\n\nlet fallen = this.effect.sourceTest.result.SL + caster.characteristics.wp.bonus\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n this.script.message(`${this.actor.prototypeToken.name} falls ${fallen} yards`)\n}","sjnoYbWpAugyDilW":"let test = await args.actor.setupSkill(\"Charme\", {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'average'},\n characteristic: 'fel',\n context: {\n success: \"L'animal devient docile envers les Humains, les Elfes qui honorent Isha, et des alliés similaires.\"\n }\n});\nawait test.roll();","skVq3eDEYKFF2iZp":"// I'm assuming the endurance test specified is for the end-round check\nawait this.actor.addCondition(\"poisoned\", 4);\n","sm9d5lk6cM0OuUkf":"this.actor.applyPeur(Math.min(4, this.effect.sourceTest.result.overcast.usage.other.current))","svCqdytEOtqFXCcs":"let characteristics = {\n \"ws\" : 0,\n \"bs\" : 0,\n \"s\" : 0,\n \"t\" : 10,\n \"i\" : 15,\n \"ag\" : 0,\n \"dex\" : 10,\n \"int\" : 20,\n \"wp\" : 20,\n \"fel\" : 10\n}\nlet skills = [\"Focalisation\", \"Calme\", \"Esquive\", \"Divertissement (Narration)\", \"Intuition\", \"Langue (Magick)\", \"Savoir (Magie)\" , \"Perception\"]\nlet skillAdvancements = [5, 15, 10, 10, 15, 10, 10, 20]\n\nlet talents = [\"Magie des Arcanes\", \"Magie Mineure\", \"Seconde Vue\"]\nlet trappings = [\"Arme simple\", \"Robes\", \"(2M) Bâton de combat\"]\nlet specialItems = [\n {name: \"Objet magique\", type: \"trapping\", trappingType: \"misc\" },\n]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWfrp4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Could not find ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nlet ride = await foundry.applications.api.DialogV2.confirm({window : {title : \"Compétence\"}, content : \"Add Chaos Steed and +20 Ride (Horse)?\"})\n\nif (ride)\n{\n let skill = await game.wfrp4e.utility.findSkill(\"Chevaucher (Cheval)\")\n skill = skill.toObject();\n skill.system.advances.value = 20;\n items = items.concat({name : \"Chaos Steed\", type: \"trapping\", \"system.trappingType.value\" : \"misc\"}, skill)\n}\n\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","sx7Ikn8WW00gBFb4":"let location = (Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? \"r\" : \"l\") + \"Arm\"\n\nif (location == \"lArm\")\n{\n\tthis.script.notification(\"Bras Gauche\")\n}\nelse if (location == \"rArm\")\n{\n\tthis.script.notification(\"Bras Droit\")\n}\n\nthis.effect.updateSource({\"flags.wfrp4e.location\" : location});\n\nif (location)\n{\n let dropped = this.actor.itemTypes.weapon.filter(i => i.isEquipped & i.system.usesHands.includes(location));\n\n if (dropped.length)\n {\n this.script.notification(`Lâche ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}\n\nlet roll = await new Roll(\"1d10\").roll()\n\nroll.toMessage(this.script.getChatData({flavor : `Lâche ${dropped.map(i => i.name).join(\", \")}!`}));\n\nthis.effect.updateSource({\"duration.rounds\" : roll.total})","syBgPp7rOymCZejX":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\")\n}","syRJs8P4aBFB5USD":"if (this.actor?.system?.details?.god?.value !== \"Sigmar\") return\nif (this.actor?.currentCareer?.careergroup?.value !== \"Prêtre\" \n && this.actor?.currentCareer?.careergroup?.value !== \"Prêtre Guerrier\" ) return\n \nlet currentSin = this.actor.system.status.sin.value \nlet updatedSin = currentSin + 2\nawait this.actor.update({\"system.status.sin.value\": updatedSin})","syqqBkyP5tGqZ78t":"this.actor.has(\"Immunité Psychologique\")?.delete();\n\nlet roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n\nroll.toMessage(this.script.getChatData());\n\nthis.script.notification(`Removed Immunité Psychologique, Adding ${roll.total} Broken Conditions`)\nthis.actor.addCondition(\"broken\", roll.total, {\"flags.wfrp4e.blasted-mind\" : true})","sz0PqS1kroMOzUZk":"let characteristics = {\n \"ws\" : -15,\n \"bs\" : -30,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : -10,\n \"ag\" : -10,\n \"dex\" : 0,\n \"int\" : -20,\n \"wp\" : 15,\n \"fel\" : -20\n}\nlet skills = [\"Corps à corps (Bagarre)\"]\nlet skillAdvancements = [10]\n\nlet talents = [\"Peurless (Everything)\", \"Frénésie\", \"Endurci\"]\nlet trappings = [\"Plastron d'acier\", \"Brassards\", \"Heaume\", \"Jambières d'acier\"]\nlet specialItems = []\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWfrp4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(\">>>>>>><\", items)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","t48hkacYdOpzWvK9":"args.context.beatBlade = true;","t56mnblo1kv3gM1M":"return args.skill?.name.includes(`${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Basic\")})`) || (args.type == \"weapon\" && args.item?.system.weaponGroup.value == \"basic\");","t8LYOuN5peEdWeXP":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.mNoCuaVbFBflfO6X\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","tCIT1a12Gt6k2ohA":"let resistance\nif (this.item.name.includes(\"(\") && !this.item.name.toLowerCase().includes(\"(any)\"))\n{\n\tresistance = this.item.parenthesesText\n}\nelse\n{\n resistance = await ValueDialog.create({text : \"Entrez la Résistance\", title : \"Résistance\"})\n\n if (resistance)\n {\n this.item.updateSource({name : `${this.item.name.split(\"(\")[0].trim()} (${resistance})`})\n this.effect.updateSource({name : this.effect.name + ` (${resistance})`})\n }\n}\nthis.item.updateSource({\"system.tests.value\" : this.item.system.tests.value?.replace(\"la Menace associée\", resistance) || resistance})\n\nif (resistance && !this.effect.name.includes(\"(\"))\n{\n this.effect.updateSource({name : this.effect.name += ` (${resistance})`})\n}","tDrs0aNIYmZPsOoS":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}\n","tFAKRRRfTjQfdQz3":"this.actor.getActiveTokens().forEach(t => t.document.update({\"texture.tint\" : \"\"}));","tG1qGqzBLmAR3WHm":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed) \n{\n let add = 0\n\n if (test.result.roll % 11 == 0 || test.result.roll == 100) \n {\n add = 1 // can't use isFumble if no hit location\n }\n\n await this.actor.addCondition(\"stunned\", Math.max(1, Math.abs(test.result.SL)) + add)\n await this.actor.addCondition(\"blinded\", Math.max(1, Math.abs(test.result.SL)))\n\n}","tGVEV6TLl310mFLP":"let nonmagical = args.modifiers.ap.value - args.modifiers.ap.magical\nif (args.applyAP && nonmagical)\n{\n let nonmagical = args.modifiers.ap.value - args.modifiers.ap.magical\n args.modifiers.ap.ignored += nonmagical\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignore les PA non-magiques (\" + nonmagical + \")\");\n}","tHBlC7SpYiQ7SUGo":"return args.characteristic !== \"t\";","tKBq1nGZo8t6vvQ6":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.5hH73j2NgPdsLCZN\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], {fromEffect : this.effect.id})","tNTO1LVN7JqHf4YN":"if (args.test.characteristicKey == \"wp\")\n{\n if (args.test.failed)\n {\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [game.wfrp4e.config.symptomEffects[\"malaise\"]])\n this.script.message(`Test de FM échoué, ${this.actor.prototypeToken.name} gains @Condition[Malaise] for [[1d10]] hours`, {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n }\n}","tUwP7TjrOOOnaCYJ":"let fatigued = this.actor.hasCondition(\"fatigued\")\nif (fatigued)\n{\n this.script.notification(`Suppression de ${fatigued.conditionValue} états Extenué`)\n fatigued.delete();\n}\nelse\n{\n\tthis.script.notification(`Aucun état Extenué`)\n}","tcZug8ehU6lyYBd9":"return args.skill?.name != `${game.i18n.localize(\"NAME.Ranged\")} (${game.i18n.localize(\"SPEC.Blackpowder\")})`","tdICiJ26rJrDbxT6":"return args.characteristic != \"i\"","tg9N6aUo8WRPKj3H":"// If the creature currently has a Surprised, Unconscious, or Entangled Condition, it does not gain this Advantage.\nconst surprised = this.actor.hasCondition(\"surprised\")\nconst unconscious = this.actor.hasCondition(\"unconscious\")\nconst entangled = this.actor.hasCondition(\"entangled\")\nif (entangled || unconscious || surprised) return\n\n// If, at the beginning of its turn, this creature does not have at least Rating Advantage points, its Advantage pool immediately increases to Rating.\nconst grimRating = parseInt(this.item.specification.value) || 1\nif (grimRating > this.actor.status.advantage.value) {\n this.actor.setAdvantage(grimRating)\n}","thxlWeZbow8iE7xA":"const uuid = \"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\";\nconst item = await fromUuid(uuid);\nconst data = item.toObject();\ndata.system.specification.value = 1;\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id});","tkZ8Ybqu518LQYEn":"await args.actor.addCondition(\"ablaze\");\n\targs.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.4CMKeDTDrRQZbPIJ\", this.effect, [{\"system.specification.value\": \"Krezok Soulflayer\"}])","tn6SwmjAuNzqE6dx":"let damage = 0\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\n\nif (test.succeeded)\n{\n damage = 10;\n}\nelse if (test.failed)\n{\n damage = 20;\n}\n\nthis.script.message(await this.actor.applyBasicDamage(damage, {loc : \"roll\", hideDSN: true, suppressMsg : true}))","tnE8LF6E3svIlLca":"return args.skill?.name == game.i18n.localize(\"NAME.Research\");","tnilBagajWM8UGQt":"return args.item?.name != game.i18n.localize(\"NAME.ConsumeAlcohol\")","toSrgcvWq9b5eN0K":"let location = await game.wfrp4e.tables.rollTable(\"hitloc\", {hideDSN: true})\n\nthis.item.updateSource({name : `${this.item.name} (${location.description})`})\nthis.script.message(`Localisation: ${location.description}`, { whisper: ChatMessage.getWhisperRecipients(\"GM\") })","tolkNN5P7oOC8GKZ":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"difficult\"}})\nawait test.roll();\n\nif (test.failed)\n{\n let sourceActor = this.effect.sourceActor;\n if (sourceActor)\n {\n this.script.message(await this.actor.applyBasicDamage(sourceActor.system.characteristics.wp.bonus, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL}))\n }\n}","tpz88eQFTjWHdFL5":"return args.item?.system?.attackType != \"ranged\" || this.item != args.item || this.actor.isOpposing","tuIsytv3jl2yAIb2":"return args.skill?.name !== game.i18n.localize(\"NAME.Charm\") && args.skill?.name !== game.i18n.localize(\"NAME.Intimidate\") && args.skill?.name !== game.i18n.localize(\"NAME.Leadership\")","tyQLkRLk1AXB4g2u":"if (args.test.succeeded) {\n args.test.result.critical = \"Critical\"\n\n args.test.result.tables.critical = {\n label : args.test.result.critical,\n class : \"Critique-roll\",\n modifier : args.test.result.critModifier,\n key: `crit${args.test.result.hitloc.result}`\n }\n\n args.Test.result.other.push (`${this.effect.name}: Tout les succès sont des Critiques.`)\n\n}","u3olS2p7Ls1JXfAH":"this.script.message(await game.wfrp4e.tables.formatChatRoll(\"mutatephys\", {}, \"Tzeentch\"));","u46KnlxCjP42F6QY":"let table = await fromUuid(\"RollTable.uATmVS40DQLC1woJ\");\n\nif (table)\n{\n table.roll();\n}\nelse\n{\n this.script.notification(\"Table des Traits de personnalité introuvable\", \"error\");\n}","u4fKgGFEnOCnvvsv":"return args.item?.system?.isProjectiles;","u5dNZ0s3lWfL8KFb":"return args.fields.charging","u6CYMSZADrfXd48Q":"args.fields.modifier += 20;","uA5qaat5EXzkzltq":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {fields : {difficulty : \"difficult\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (!test.succeeded)\n{\n let plague = await fromUuid(\"Compendium.wfrp4e-core.items.Item.aKiuGzlVO51JvsjV\")\n let obj = plague.toObject();\n await this.actor.createEmbeddedDocuments(\"Item\", [obj]);\n}\n\nthis.effect.delete();","uACa6u4JLNMRgFlr":"const talents = await Promise.all([game.i18n.localize(\"NAME.FuriousAssault\"), game.i18n.localize(\"NAME.SeaLegsTalent\")].map(game.wfrp4e.utility.findTalent))\nthis.actor.createEmbeddedDocuments(\"Item\", talents, {fromEffect : this.effect.id})","uAy4w7y8Uu9POF8C":"args.item.system.qualities.value.push({name : \"impact\"})","uCJk19rijMPRU8jg":"return this.item.equipped.value \n && args?.weapon\n && ([\"giant\"].includes(args.target.Species.toLowerCase()))","uEVSUTTam4Z96JJ2":"if (this.item.equipped.value\n && args.opposedTest.attackerTest.item \n && (args.opposedTest.attackerTest.item.isProjectiles || args.opposedTest.attackerTest?.spell)\n ) \n{\n args.modifiers.other.push({label : this.effect.name, details : \"Réduction des Dégâts\", value : -2})\n}","uLBDnWC3S0lRitbj":"let test = await this.actor.setupCharacteristic(\"int\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nlet opposedResult = test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result\n\nif (opposedResult?.winner == \"attacker\")\n{\n if (test.failed && (test.result.roll % 11 == 0 || test.result.roll == 100))\n {\n this.actor.addCondition(\"unconscious\")\n await this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + 1})\n this.script.message(\"Gain de 1 Point de Corruption\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n }\n else\n {\n await this.actor.addCondition(\"stunned\", 1 + opposedResult.differenceSL);\n }\n}\nelse\n{\n return false;\n}","uMvD2HWFNGqCmrBM":"if (args.test.options.addChargingDice)\n{\n\targs.test.result.diceDamage = {formula: \"1d10\", value : Math.ceil(CONFIG.Dice.randomUniform() * 10) }\n\targs.test.result.additionalDamage += args.test.result.diceDamage.value;\n}","uNYstk3eXmWamhzs":"args.actor.addCondition(\"blinded\")","uOHAsKlkFuIaAmjb":"args.actor.modifyWounds(1)","uRiAvo9fb3U7FIIy":"if (!this.actor.has(\"Bénédiction de Puissance\",\"prayer\")) this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.KSDrXcieyRc37YI7\", this.effect)","uSwkYENTOcnfRrqA":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Melee\")) && args.weapon?.system?.attackType != \"melee\"","uZeNKQ24fToJ7qtY":"let addWounds = 0\nswitch (args.actor.system.details.size.value) {\n case \"lrg\": \n addWounds = 5\n break\n case \"enor\":\n addWounds = 10\n break\n case \"mnst\":\n addWounds = 15\n break\n}\nif (addWounds > 0) {\n args.modifiers.other.push({label : this.effect.name, details : \"Augmentation des Dégâts\", value : addWounds})\n}","ucF4aiJ1gpDB333G":"if (args.test.options.catfall && (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target) && !args.test.result.catfall)\n{\n args.test.result.other.push(`${this.effect.name}: Fall distance damage reduced by ${Number(args.test.result.SL) + 1} yards`)\n args.test.result.catfall = true; // Prevent duplicate messages\n}","ugL5IBB6R2yWyMWd":"if (args.totalWoundLoss > 0)\n{\n let apply = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : `

Appliquer les dégats de ${this.effect.name} ? L'attaquant doit avoir utilisé ses mains nues ou une arme de mêlée en métal.`})\n if (apply)\n {\n\n let damage = 5 + this.actor.characteristics.wp.bonus;\n\n let loc = args.opposedTest.attackerTest.weapon?.system.usesHands[0] || \"rArm\";\n\n let APatLoc = args.opposedTest.attacker.system.status.armour[loc];\n\n let metalAP = APatLoc.layers.reduce((metal, layer) => metal += (layer.metal ? layer.value : 0), 0)\n\n let APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at location;\n\n damage -= (APused + args.opposedTest.attacker.system.characteristics.t.bonus)\n\n let msg = await args.opposedTest.attacker.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n msg += ` (Ignore ${metalAP} PA de métal sur ${game.wfrp4e.config.locations[loc]})`\n this.script.message(msg)\n }\n}","uhCq5NwjQ2a2idPn":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Tailor)';\nconst difficulty = 'easy';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n \n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","ulXfbycWUu36vdmS":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"difficult\", slBonus : -1 * this.effect.sourceTest.result.SL}})\nawait test.roll();\nif (test.succeeded)\n{\n\tthis.script.notification(`Résistance à ${this.effect.name}`);\n}\nreturn test.failed;","upfK6GM33qZCZjll":"return args.item?.name != `${game.i18n.localize(\"NAME.Play\")} (${game.i18n.localize(\"SPEC.Lute\")})`","ur2HAWDGSGvyAynU":"if (args.combat.combatant.actor.uuid === this.effect.sourceActor.uuid) {\n this.effect.delete();\n}","uwdQvZtzy2HVeEzx":"if (args.totalWoundLoss > 0)\n{\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n roll.toMessage(this.script.getChatData());\n args.modifiers.other.push({label : this.effect.name, value : roll.total})\n \n args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"hard\"}, skipTargets: true, appendTitle : \" - \" + this.effect.name}).then(async test => {\n await test.roll();\n if (test.failed)\n {\n this.script.message(\"\" + args.actor.name + \" takes a @Table[critbody]{Critical Hit} to the torse\", {whisper: ChatMessage.getWhisperRecipients(\"GM\")}) \n }\n })\n}\n","ux3jaLpAUhZ5YqA6":"return args.item?.name != game.i18n.localize(\"NAME.Leadership\") && args.item?.name != game.i18n.localize(\"NAME.Cool\")","v00nVCRKqqRvY28t":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\", 3)\n}\n","v18mmwUmuKiVfwzQ":"let test = await this.actor.setupTest(game.i18n.localize(\"NAME.Résistance\"), {appendTitle : ` - ${this.effect.name}`, skipTargets: true});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\");\n}","v4CCxVaVGf9i8U7X":"let cured = await ValueDialog.create({text : \"Entrez le nombre de maladies/poisons soignés\", title : this.effect.name})\n\nlet damage = 0;\n\nlet rolls = new Array(cured).fill(\"\").map(i => `max(0, 1d10 - ${this.actor.system.characteristics.fel.bonus})`)\n\nlet Test = new Roll(`${rolls.join(\" + \")}`);\nawait test.roll();\ntest.toMessage({speaker : {alias : this.actor.name}, flavor : this.effect.name});\nthis.script.message(await this.actor.applyBasicDamage(test.total, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true }))","v4ITTsSY9EvCbhZP":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","v5aUWYPlFHKWnZ5Y":"let damageCounter = this.effect.getFlag(\"wfrp4e\", \"damage\") || 0;\nawait this.actor.applyDamage(this.effect.sourceTest.result.damage + damageCounter, {sourceItem: this.effect.sourceItem, sourceTest: this.effect.sourceTest, createMessage: this.script.getChatData()})\ndamageCounter++;\nthis.effect.setFlag(\"wfrp4e\", \"damage\", damageCounter);\nawait this.actor.addCondition(\"ablaze\");","v5xrDWcrTNFJkyQB":"let addOption = await foundry.applications.api.DialogV2.confirm({\n window : {title : \"Option\"},\n content :\n `\n Ajouter une option?\n

\n Projectiles (Arc) +10 et un Arc long avec 12 flèches\n

\n `,\n})\n\nlet choice = []\n\nif (addOption)\n{\n choice = [\n {\n type : \"skill\",\n name : \"Projectiles (Arc)\",\n diff : {\n system : {\n advances : {\n value : 10\n }\n }\n }\n },\n {\n type : \"weapon\",\n name : \"(2M) Arc long\",\n },\n {\n type : \"ammunition\",\n name : \"Flèche (12)\",\n }\n ];\n}\n\n\n\n\n\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n let equip = item.system.tags.has(\"equippable\");\n item = item.toObject()\n if (equip)\n {\n item.system.equipped.value = true;\n }\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","v6LIG7EwWYALxCpP":"return !this.effect.getFlag(\"wfrp4e\", \"trained\")?.includes(\"entertain\") || (!args.skill?.name.includes(game.i18n.localize(\"NAME.Entertain\")) && !args.skill?.name.includes(game.i18n.localize(\"NAME.Perform\")) && !args.skill?.name.includes(game.i18n.localize(\"NAME.Play\")))","vBqrydNzHmEHClqZ":"let maxWounds = this.actor.system.status.wounds.max\nthis.actor.update({\"system.status.wounds.value\": maxWounds})","vFUVWZ1l8wpTjLcx":"if (!this.actor.has(game.i18n.localize(\"NAME.Démoniaque\")))\n return\n\nlet caster = this.effect.sourceActor;\nif (caster)\n{\n let wp = caster.system.characteristics.wp\n if (this.actor.system.characteristics.wp.value >= wp.value)\n {\n this.script.notification(\"La cible a une FM supérieure, pas d'effet\")\n return\n }\n this.actor.applyBasicDamage(wp.bonus, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL })\n}","vJQRBxDfPwHens0a":"if (args.totalWoundLoss > 0) \n{\n args.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: { difficulty: \"difficult\" } }).then(async Test => {\n await test.roll();\n if (test.failed) \n {\n await args.actor.addCondition(\"poisoned\")\n this.script.message(await args.actor.applyBasicDamage(3, {suppressMsg : true, damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL }))\n }\n })\n}","vM2BPwYhHQaBAt2C":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.KII1gWnxIZ8HzmU5\");\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","vNUGuypkhx2P5YIA":"return args.characteristic !== \"fel\"","vNp9wgdSvnNEjZyS":"args.fields.slBonus -= 2; ","vPG4rV640aSzKzxe":"return !this.actor.flags.useless[this.item.system.location.key[0] + \"Arm\"] || [\"fel\", \"wp\", \"int\", \"t\"].includes(args.characteristic)","vS2D9QUslR7ZtXXm":"let test = await this.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\nawait test.roll();\nif (test.failed)\n{\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n roll.toMessage(this.script.getChatData())\n\n this.script.message(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}))\n}","vSDMygIT9nNvEGWG":"// Each time the blade is used, the GM should secretly roll a d10.\n// On a 1, its poison has run dry, \n// and the next time it is employed it will shatter.\n\nif (Math.ceil(CONFIG.Dice.randomUniform() * 10) == 1) {\n this.item.setFlag(\"wfrp4e\", \"brittle\", true)\n ChatMessage.create({\n content: `\n ${this.item.name} has run out of poison. It will shatter the next time it is used.`, \n whisper: ChatMessage.getWhisperRecipients(\"GM\"),\n blind: true\n })\n}\n","vTebTUzXortx1Qut":"let specification = Number(this.item.specification.value) || 1;\nargs.actor.system.characteristics.t.initial += 10 * specification;\nargs.actor.system.status.carries.max -= Math.floor(args.actor.system.status.carries.max * 0.1 * specification);\nargs.actor.system.details.price.gc += args.actor.system.details.price.gc * 0.1 * specification;","vUpMQlbwDiYfMCNS":"this.actor.addCondition(\"ablaze\");","vY3xeTTL3ghPrJpN":"this.actor.addCondition(\"entangled\");","vZ5HCrhY8e4R1TrG":"let eye = await fromUuid(\"Compendium.wfrp4e-core.items.weczkAMPlTjX7lqU\")\nlet nose = await fromUuid(\"Compendium.wfrp4e-core.items.SpPRZZRHxly7uo2G\")\nthis.actor.createEmbeddedDocuments(\"Item\", [eye, nose]);","vc4bELo0cWYoILfB":"let choice = await ItemDialog.create(this.actor.itemTypes.disease, 1, \"Choisir une maladie à guérir (contractée naturellement)\")\n\nthis.script.message(`Guéri ${choice[0]?.name}`);\nchoice[0].delete()","vc8eVKtyjtOGvWlK":"if (!this.actor.hasCondition(\"entangled\"))\n{\n this.effect.delete();\n}","vcM0IgsYVmfWrlO3":"fromUuid(\"Compendium.wfrp4e-core.items.rOV2s6PQBBrhpMOv\").then(item => {\n this.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id});\n})","ve3RcfTi49rdYZU0":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {fields: {difficulty : \"average\"}, appendTitle : \" - Wounded\"})\n await test.roll();\n if (test.failed)\n {\n fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\").then(disease => {\n this.actor.createEmbeddedDocuments(\"Item\", [disease.toObject()])\n this.script.scriptNotification(\"Gain de \" + disease.name)\n })\n }","vejhfB9aI58iF1vr":"let choice1 = [\n {\n type: \"trait\",\n name: \"Maladie\",\n },\n {\n type: \"trait\",\n name: \"Infecté\",\n },\n {\n type: \"trait\",\n name: \"Perturbant\",\n },\n {\n type: \"trait\",\n name: \"Parasité\",\n },\n {\n type: \"trait\",\n name: \"Territorial\",\n }\n]\n\nlet updateObj;\nlet actor;\n\nasync function addTrait(c) {\n let items = [];\n console.log(\"TEST1\", c);\n let existing;\n if (c.type == \"trait\") {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type);\n }\n console.log(\"TEST\", existing);\n if (!existing) {\n let item = await game.wfrp4e.utility.find(c.name, c.type);\n if (item) {\n item = item.toObject();\n items.push(item);\n }\n else\n ui.notifications.warn(`Impossible de trouver ${c}`, { permanent: true });\n }\n console.log(\"WISH LIST2\", choice1, items);\n actor.createEmbeddedDocuments(\"Item\", items);\n}\n\nasync function dialogChoice() {\n for (let c of choice1)\n {\n if (await foundry.applications.api.DialogV2.confirm({window : {title: \"Option\"}, content:`

Add Option?

  1. ${c.name}
`}))\n {\n addTrait(c)\n c.valid = true;\n }\n }\n}\n\nupdateObj = this.actor.toObject();\nactor = this.actor\nawait dialogChoice();\n","vgfs0DXvF5iKrz1M":"return args.characteristic != \"ag\" || this.item.getFlag(\"wfrp4e\", \"passed\")","vj3zArmX27vCxYJW":"return ![\"NAME.Perception\", \"NAME.Navigation\"].map(i => game.i18n.localize(i)).includes(args.skill?.name)","vjyTKcNrJzX4XWnS":"let SL = parseInt(this.effect.sourceTest.result.SL)\nif (SL < 0)\n SL = 0\nthis.actor.addCondition(\"fatigued\", 1 + SL)","vn13U388mwquGN9y":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.wGTD2LezlI6Atyy0\");\nlet leader = item.toObject();\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.u0CFf3xwiyidD9T5\");\nlet luck = item.toObject();\nawait this.actor.createEmbeddedDocuments(\"Item\", [leader, luck], {fromEffect : this.effect.id});","vphNSTVxfZjApblV":"const bonus = this.effect.getFlag(\"wfrp4e-tribes\", \"bonus\");\n\nargs.fields.modifier += bonus;","vtXJI2VGlU9vODXz":"args.initiative += \"+10\";","vuzRRj5d9XdNYx3o":"let broken = this.actor.hasCondition(\"broken\")\nif (broken)\n{\n broken.delete();\n this.script.notification(\"Etat Brisé supprimée\")\n}","vvVhAqreedtmOR9b":"args.totalWoundLoss = Math.max(0, args.totalWoundLoss - 1)\nargs.modifiers.other.push({label : this.effect.name, value : -1})","vvdo1NxjmGVkmFCT":"await this.actor.addCondition(\"stunned\");\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"hard\"}, skipTargets: true, appendTitle : \" - \" + this.effect.name})\nawait test.roll();\nif (test.failed)\n{\n\tawait this.actor.addCondition(\"prone\")\n\tawait this.actor.addCondition(\"stunned\")\n}\n \nlet location = this.item.system.location.key;\n\nif (location)\n{\n let dropped = this.item.system.weaponsAtLocation;\n\n if (dropped.length)\n {\n this.script.notification(`Dropped ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}","vzMxIDjRlQSxXtCW":"// Remove the miscast if doubles rolled and succeeded\n// Decrement the major miscast to minor miscast\nif(args.test.succeeded && args.test.result.tables.miscast && args.test.result.roll % 11 == 0)\n{\n if (args.test.result.tables.miscast.key == \"minormis\")\n {\n delete args.test.result.tables.miscast;\n }\n else if (args.test.result.tables.miscast.key == \"majormis\")\n {\n args.test.result.tables.miscast.key = \"minormis\"\n args.test.result.tables.miscast.label = game.i18n.localize(\"ROLL.MinorMis\");\n }\n}","vzSj3vvPryp02EVC":"if (args.test.failed)\n {\n let applicableCharacteristics = [\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"];\n if (applicableCharacteristics.includes(args.test.characteristicKey))\n {\n this.actor.addCondition(\"stunned\");\n }\n }","w3r54pKZQKaH2Yer":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nlet data = item.toObject();\nlet slOver = this.effect.sourceTest.result.slOver;\nlet overcast = this.effect.sourceTest.result.overcast\nslOver -= ((overcast.total - overcast.available) * 2) // If they used an overcast, subtract 2 SL for each one\nlet added = Math.floor(slOver / 3) || 0\ndata.system.specification.value = 1 + added; // For each +3 SL, add 1 specification\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","w4JKuTECFmu3YmTR":"return !args.skill?.name?.includes(game.i18n.localize(\"NAME.Ride\"))","w4RuGIfseGoxXA3k":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'challenging';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","w4zubIHP0XgMXsFe":"return !args.context.terror && !args.extendedTest?.getFlag(\"wfrp4e\", \"fear\");","w6tr8mWy0ZSUkHLt":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.77p3QRKgFWakkndF\", // Blather\n \"Compendium.wfrp4e-core.items.Item.b4x1qEWcevX7xK58\", // Schemer\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","w7K0lbxQKJ2tsc6f":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.EO05HX7jql0g605A\")\nlet data = item.toObject();\ndata.system.specification.value = 60\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","w8s2RUzA1jmyu7vy":"if (args.test.isCritical && args.test.weapon.weaponGroup.value == \"crossbow\") {\n args.test.result.tables.critical.modifier \n = (typeof args.test.result.tables.critical.modifier ==='undefined') \n ? 10 \n : args.test.result.tables.critical.modifier + 10\n}","wAETU6aTRr9d4oCU":"args.fields.slBonus++;","wAntJhgb8Og5vJXh":"args.context.staunchBleeding = true;","wBc8XvkAnv3j93vR":"if (Number(args.actor.system.status.fate.value) > 0) {\n args.actor.update({\"system.status.fate.value\": Math.max(args.actor.system.status.fate.value - 1, 0)});\n args.actor.update({\"system.status.fortune.value\": Math.max(args.actor.system.status.fortune.value - 1, 0)});\n this.script.message(`Réduction du Destin et de la Chance de 1`);\n}\nelse if (Number(args.actor.system.status.resilience.value) > 0)\n{\n args.actor.update({\"system.status.resilience.value\": Math.max(args.actor.system.status.resilience.value - 1, 0)});\n args.actor.update({\"system.status.resolve.value\": Math.max(args.actor.system.status.resolve.value - 1, 0)});\n this.script.message(`Réduction de la Résilience et de la Détermination de 1`);\n}","wFHjQyCR6Wzn6TeQ":"this.actor.system.status.addArmour(1, {source: this.effect, magical: true});","wLg8LbPAPbQgUg0Z":"return (args.item?.system?.attackType != \"melee\" \n || this.actor.attacker != undefined \n || args.target?.hasCondition(\"surprised\") == undefined)","wRxgpGmlUpe7nwzJ":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 0,\n \"bright\": 0,\n \"angle\": 360,\n \"alpha\": 0.5,\n \"animation\": {\n \"speed\": 0,\n \"intensity\": 0,\n \"type\": \"none\",\n },\n \"color\": \"\",\n }}));","wS6OIR3QN4mOUHn0":"if (args.totalWoundLoss > args.actor.characteristics.t.bonus)\n{\n args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\")).then(async test => {\n await test.roll()\n if (test.failed) {\n let disease = await fromUuid(\"Compendium.wfrp4e-core.items.M8XyRs9DN12XsFTQ\")\n disease = disease.toObject()\n disease.system.duration.active = true\n args.actor.createEmbeddedDocuments(\"Item\", [disease])\n }\n })\n}","wUlYLBT59Efys5aS":"args.actor.addCondition(\"prone\");","wb1DpSdIhSqYG5cp":"args.fields.slBonus = -1 * parseInt(this.effect.sourceTest.result.SL)","wbM7tpw4TxvadcWm":"let items = this.effect.itemTargets;\nlet msg = \"\";\nfor(let item of items)\n{\n if (item.system.properties.qualities.durable)\n {\n await item.update({\"system.qualities.value\" : []});\n msg += `

${item.name} perd toutes ses Qualités

`\n }\n else\n {\n msg += `

${item.name} se désintègre en poussière !

`\n await item.update({name : item.name + \" (Poussière)\"})\n }\n}\nif(msg)\n{\n this.script.message(msg);\n}","we6JUzDvybekAbtn":"return args.type !== \"channelling\" && !args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) && args.skill?.name !== `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`","weDTna1dLMwHsNlJ":"args.modifiers.other.push({label : this.effect.name, details : \"Réduction des Dégâts\", value : -4})","whUSkaR1yem21bXp":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 5,\n \"s\" : 0,\n \"t\" : 5,\n \"i\" : 10,\n \"ag\" : 0,\n \"dex\" : 6,\n \"int\" : -5,\n \"wp\" : 0,\n \"fel\" : 10\n}\nlet skills = [\"Corps à corps (Base)\", \"Pistage\"]\nlet skillAdvancements = [8, 7]\nlet talents = [\"Charge Berserk\", \"Frappe précise\", \"Frappe blessante\"]\nlet traits = [\"Flight (8)\", \"Rage\", \"Nuée\", \"Pisteur\"]\nlet trappings = []\nlet items = [];\nlet spells = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else \n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else \n {\n ui.notifications.warn(`Could not find ${talent}`, {permanent : true})\n }\n}\n\nconst traitRegex = /(?:,?(.+?)(\\+?\\d{1,2}\\+?)?\\s*?(?:\\((.+?)\\)\\s*(\\+?\\d{1,2})?|,|$))/gm\nfor (let trait of traits)\n{\n let traitMatches = trait.matchAll(traitRegex).next().value\n let traitName = traitMatches[1]\n let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there'}`).trim()\n }\n else\n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells)\n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name +='Arme','Cornes','Tail','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;\n traitItem.name = (traitItem.name + ` ${traitSpec ? \"(\"+ traitSpec + \")\" : \"\"}`).trim()\n }\n else\n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells)\n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","wkY4Uj2NjT8mQNT4":"args.item.system.damage.value = \"+6\";\nargs.item.system.qualities.value.push({name : \"magical\"});","wsqNM4NHnwaAAQym":" args.applyAP = false;\n\n this.script.notification(\"This test only applies to criminals, otherwise close the dialog.\");\n this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"average\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => \n {\n await test.roll();\n if (test.failed)\n {\n args.actor.addCondition(\"unconscious\");\n }\n });","wyTCozh9qGTx6yK0":"if (args.context.terror || args.extendedTest?.getFlag(\"wfrp4e\", \"fear\"))\n{\n\targs.abort = true;\n\tthis.script.notification(\"N'a pas besoin de faire de tests de Peur ou de Terreur\");\n}","wzkxiKjxVEeNS1di":"let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\nthis.script.message(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true}))\n\nawait this.actor.addCondition(\"deafened\", 3)\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty: \"average\" }, skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure: \"Gain a Broken Condition\", success : \"Avoided Broken Condition\"}})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"broken\")\n}","x1Ecj6MXY94kpcQq":"if (!this.item.equipped.value) {\n return this.script.notification(`Vous devez équiper le ${this.item.name} pour récupérer des points de blessures.`,\"info\")\n}\n\nconst runesOfRestoration = this.item.effects.contents.filter(e => e.name == this.effect.name)\nconst restorationWounds = parseInt(runesOfRestoration.length * this.actor.system.characteristics.t.bonus)\n\nthis.actor.modifyWounds(restorationWounds)\nthis.script.message(`Vous avez récupéré ${restorationWounds} blessures avec ${this.script.label}.`)","x2RLUUNB7BiIDYCP":"\n let difficulty = \"\"\n if (this.effect.name.includes(\"Moderate\"))\n difficulty = \"easy\"\n else if (this.effect.name.includes(\"Severe\"))\n difficulty = \"average\"\n else\n difficulty = \"veasy\"\n \n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {context : {failure : this.actor.name + \" dies from Blight\"}, fields: {difficulty}, skipTargets: true, appendTitle : \" - Blight\"})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"dead\");\n }\n ","x76tKw4L8dX00ikE":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.uqGxFOEqeurwkAO3\")\nlet data = item.toObject();\nfoundry.utils.setProperty(data, \"flags.wfrp4e.breath\", \"fire\")\ndata.system.specification.value = 5\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","x8XK2fzzXCnSwfjt":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Athletics\"))\nawait test.roll();\n\nif (test.succeeded)\n{\n\tthis.actor.removeCondition(\"prone\");\n}","x9G6Du5EWV6byf4C":"if (parseInt(this.effect.sourceTest.result.SL) >= 3)\n{\n this.actor.modifyWounds(this.actor.system.characteristics.t.bonus * 2)\n}\nelse \n{\n this.actor.modifyWounds(this.actor.system.characteristics.t.bonus)\n}","x9iKFYYc4Ocy8PTS":"let item = this.effect.getCreatedItems()?.[0];\nChatMessage.create({content : \"La grâce dépasse le style\", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true})\n\nlet choice = await ItemDialog.create(ItemDialog.objectToArray({\n \"nobles\" : \"Nobles\",\n \"guilders\" : \"Membres de Guilde\",\n \"servants\" : \"Serviteurs\"\n}), 1, \"Choisir Group\")\n\nlet name = choice[0]?.name\n\nif (!name)\n{\n return;\n}\n\nif (item)\n{\n item.update({\n name : item.name.split(\"(\")[0] + ` (${name})`,\n \"system.tests.value\" : item.system.tests.value.split(\"(\")[0] + ` (${name}`\n })\n}\nelse\n{\n item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP\");\n let data = item.toObject();\n data.name += ` (${name})`\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n}","xBpLQa7yBPczDMY8":" let scythe = (await fromUuid(\"Compendium.wfrp4e-core.items.CXg7XOFJwu4LZ9LM\")).toObject();\n scythe.name = \"La Faux de Shyish\";\n scythe.system.damage.value = \"WPB + 3\"\n scythe.system.equipped = true;\n scythe.img = this.effect.img;\n scythe.system.qualities.value.push({name : \"magical\"})\n this.actor.createEmbeddedDocuments(\"Item\", [scythe], {fromEffect : this.effect.id})","xEE0ymsaH2tn2M99":"return args.type != \"cast\";","xIRU2SaqLeWmqGDI":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.vMYEkrWj0ip6ZOdv\")\nlet data = item.toObject();\ndata.name += \" (Disease)\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","xJZKVGE04o84Gibo":"if (!this.item.actor.name.includes(\"Brunner\")) return;\n\nargs.item.system.damage.value += \"+1\";","xL4S0H1RP8hhXW7c":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.xneBqGOs1QS7kfUr\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","xLKAuD6yzwjAL6tJ":"return !args.weapon || args.weapon?.system.properties?.qualities.shield || !this.item.system.usesLocation(args.weapon)","xMhhVol8Is3DJ3gb":"if (this.effect.sourceTest.succeeded)\n{\n let blinded = 1 + this.effect.sourceTest.result.overcast.usage.other.count\n this.actor.addCondition(\"blinded\", blinded)\n}","xPDMpOvC1ZBVxrNg":"args.fields.modifier += 10;","xPwa3NftkpMBc2AO":"return ![\"ws\", \"s\", \"ag\"].includes(args.characteristic)","xQ3xR2Wf0wHFa76H":"return [\"ws\", \"bs\", \"fel\", \"dex\"].includes(args.characteristic) || args.weapon","xQnoRTHotZKrwPrx":"return args.type == \"cast\" && args.item?.system.lore?.value == \"shadow\"","xRTmMwNfdirjsi8X":"this.actor.addCondition(\"ablaze\");\n\nthis.actor.applyBasicDamage(this.effect.sourceTest.result.damage)","xRd6oA1QWLVpfoBm":"if (!this.actor.has(game.i18n.localize(\"NAME.NightVision\")))\n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.FmHDbCOy3pH8yKhm\");\n let data = item.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n}","xS2su09zcza9du09":"if ([game.i18n.localize(\"CORRUPTION.Minor\"), game.i18n.localize(\"CORRUPTION.Moderate\"), game.i18n.localize(\"CORRUPTION.Major\")].includes(this.item.system.specification.value))\n{\n\treturn\n}\n\nlet choice = await ItemDialog.create(ItemDialog.objectToArray({minor : game.i18n.localize(\"CORRUPTION.Minor\"), moderate : game.i18n.localize(\"CORRUPTION.Moderate\"), major : game.i18n.localize(\"CORRUPTION.Major\")}, this.item.img), 1, \"Choose Corruption Severity\");\n\nthis.item.updateSource({\"system.specification.value\" : choice[0]?.name || \"\"})","xUpKYT7BZCSmAfUy":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectData : [this.item.effects.contents[0].convertToApplied()]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","xVYVegD692CCv8Yl":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"hard\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nlet newFortune = Math.max(0, this.actor.status.fortune.value - 1)\nthis.actor.update({ \"system.status.fortune.value\": newFortune });\n\nif (test.failed)\n{ \n let char = this.effect.sourceActor.characteristics;\n let duration = Math.floor((char.wp.initial + char.wp.advances)/10) ;\n this.script.message(\"Fatethief has been applied for \" + duration + \" days\"); \n}","xWPgIZOQLba5nZ23":"let nbFatigue = 1 + Number(this.effect.sourceTest.result.SL);\nthis.actor.addCondition(\"fatigued\", nbFatigue); \n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"hard\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nif (test.succeeded)\n{\n this.script.notification(this.actor.name + \"resisted !\")\n}\nelse if (test.failed)\n{\n this.actor.addCondition(\"unconscious\", 1);\n}","xYTkj8jhSVOSoLbC":"this.actor.flags.useless[this.item.system.location.key[0] + \"Arm\"] = true;","xcny1zYAphdfrKv9":"args.fields.modifier -=20;","xcy5GOUSZ0meIejZ":"if (args.test.isFumble)\n{\n args.test.result.other.push(\"@Table[warp-grinder-fumble]\")\n}","xgdhf0wlNP2cHIQx":"await this.actor.addCondition(\"entangled\", this.effect.sourceTest.result.overcast.usage.other.current)","xgplXZMs459X7XXM":"// Apply changes when the mask is worn\n\nif (args.equipped) {\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [this.item.effects.contents[1]?.convertToApplied()])\n this.script.message(`${this.actor.name} porte le ${this.item.name}.
\n Ils subissent –20 à toutes les tentatives de résistance aux maladies.
\n S'ils portent le masque pendant plus d'une heure ou bénéficient de l'un de ses effets, ils sont exposés à @Corruption[moderate]{Corruption modérée}.\n `,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n\n// Notify of lingering effects when mask is Retiré\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Usagé)\"})\n this.script.message(`${this.item.name} sur ${this.actor.name} a été retiré et perd ses propriétés. Cependant, les effets durent [[1d10+4]] jours, après quoi ils doivent être manuellement retirés.`,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n )\n\n}\n","xihniGjgqOhuaKWc":" \n if (args.test.failed)\n {\n let applicableCharacteristics = [\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"];\n if (applicableCharacteristics.includes(args.test.characteristicKey))\n {\n this.actor.addCondition(\"stunned\");\n }\n }","xiyQSXozoLxt0MZs":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.wMwSRDmgiF2IdCJr\", // utilisateur d\n \"Compendium.wfrp4e-core.items.Item.IAWyzDfC286a9MPz\", // Immunité Psychologique\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","xkdQhZ9KKqmocNLO":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.tXKX29QZBdHmyMc7\")\nlet data = item.toObject();\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","xklncIMwQIespDxS":"let test = await this.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"vhard\"}});\nawait test.roll();\nCorruptionMessageModel.createCorruptionMessage(\"minor\", this.script.getChatData())\n\nif (test.failed)\n{\n this.actor.addCondition(\"unconscious\");\n}","xnHobI9HojObLHMp":"args.applyTB = false;\nargs.applyAP = false;","xobGBJbgFjQCrwvq":"let roll;\nif (this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) || this.actor.has(game.i18n.localize(\"NAME.Undead\")) || [\"Goblin\", \"Orc\", \"Undead\"].includes(this.actor.system.details.species.value))\n{\n roll = await new Roll(`1d10 + ${this.effect.sourceTest.result.overcast.usage.other.current}`).roll()\n}\nelse \n{\n roll = await new Roll(`1d10`).roll()\n}\n\nroll.toMessage(this.script.getChatData())\nawait this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true})\n\nif (this.actor.has(\"Undead\") || args.actor.has(\"Daemonic\"))\n{\n this.actor.addCondition(\"ablaze\")\n}","xot4JWCRzLkobHtL":"args.actor.removeCondition(\"broken\", 1);","xpgXWoK2zDnG1uiF":" let stunned = args.actor.hasCondition(\"stunned\")\n if (stunned)\n {\n stunned.system.scriptData = stunned.system.scriptData.filter(s => s.trigger != \"dialog\")\n stunned.system._scripts = null;\n }\n\n\n\n let poisoned = args.actor.hasCondition(\"poisoned\")\n if (poisoned)\n {\n poisoned.system.scriptData = poisoned.system.scriptData.filter(s => s.trigger != \"dialog\")\n poisoned.system._scripts = null;\n }\n\n\n\n let deafened = args.actor.hasCondition(\"deafened\")\n if (deafened)\n {\n deafened.system.scriptData = deafened.system.scriptData.filter(s => s.trigger != \"dialog\")\n deafened.system._scripts = null;\n }\n\n\n\n\n let entangled = args.actor.hasCondition(\"entangled\")\n if (entangled)\n {\n entangled.system.scriptData = entangled.system.scriptData.filter(s => s.trigger != \"dialog\")\n entangled.system._scripts = null;\n }\n\n\n\n\n let fatigued = args.actor.hasCondition(\"fatigued\")\n if (fatigued)\n {\n fatigued.system.scriptData = fatigued.system.scriptData.filter(s => s.trigger != \"dialog\")\n fatigued.system._scripts = null;\n }\n\n\n\n let blinded = args.actor.hasCondition(\"blinded\")\n if (blinded)\n {\n blinded.system.scriptData = blinded.system.scriptData.filter(s => s.trigger != \"dialog\")\n blinded.system._scripts = null;\n }\n\n\n\n let broken = args.actor.hasCondition(\"broken\")\n if (broken)\n {\n broken.system.scriptData = broken.system.scriptData.filter(s => s.trigger != \"dialog\")\n broken.system._scripts = null;\n }\n\n\n\n let prone = args.actor.hasCondition(\"prone\")\n if (prone)\n {\n prone.system.scriptData = prone.system.scriptData.filter(s => s.trigger != \"dialog\")\n prone.system._scripts = null;\n }\n\n","xq3RANOtmPhy77ne":"args.update({texture : {tint : \"#FFBF00\"}});","xqWxV9w5ezBQdJkZ":"return args.context.corruption;","xvGxwv7X0Vq3vNqb":"args.fields.modifier -= 10;","xvH4PKJasHcehOZz":"return args.skill?.name == `${game.i18n.localize(\"NAME.Lore\")} (${this.item.parenthesesText})`","y3F1K1sYBymPZCjz":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 0,\n \"s\" : 5,\n \"t\" : 0,\n \"i\" : 5,\n \"ag\" : 10,\n \"dex\" : 0,\n \"int\" : 0,\n \"wp\" : 0,\n \"fel\" : 0\n}\nlet skills = [\"Athlétisme\", \"Soin aux animaux\", \"Langue (Bataille)\", \"Corps à corps (Base)\", \"Corps à corps (Cavalerie)\", \"Chevaucher\"]\nlet skillAdvancements = [10,10, 10, 10, 10, 20]\n\nlet talents = [\"Cavalier émérite\", \"Coup puissant\"]\nlet trappings = [\"Arme simple\", \"Bouclier\", \"Lance de cavalerie\", \"Plastron d'acier\", \"Brassards\", \"Heaume\", \"Jambières d'acier\"]\nlet specialItems = [\n {name: \"Chaos Steed\", type: \"trapping\", trappingType: \"misc\" },\n]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(\">>>>>>><\", items)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","y3agVFVBR8tVqWyx":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();","y7hk7prQ0lLTyv1Y":"return args.item?.system?.isProjectiles && (args.item.system.weaponGroup.value !== \"blackpowder\" || args.item.system.weaponGroup.value !== \"engineering\")","y9fwuiqn44t13WAq":"return this.item.equipped.value \n && args?.weapon\n && ([\"goblin\"].includes(args.target.Species.toLowerCase()))","yAL0YwZWVm8o1nxa":"if (this.actor.hasCondition(\"dead\") && !this.actor.gardenOfCorpses)\n{\n this.script.message(\"[[3d10]] @UUID[Compendium.wfrp4e-core.actors.T79RqnDOAQLn3I1s]{zombies} spring forth from the remains.\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n this.actor.gardenOfCorpses = true;\n // local storage is sufficient to prevent multiple messages\n}","yCgH3N9AurIiAv0i":"if (!this.item.name.includes(\"(\") || this.item.system.tests.value.includes(\"(Sense)\") || this.item.system.tests.value.toLowerCase().includes(\"(any)\"))\n{\n let tests = this.item.system.tests.value\n let name = this.item.name\n\n // If name already specifies, make sure Tests value reflects that\n if (name.includes(\"(\") && !name.toLowerCase().includes(\"(any)\"))\n {\n let sense = name.split(\"(\")[1].split(\")\")[0]\n tests = `${tests.split(\"(\")[0].trim()} (${sense})`;\n }\n else // If no sense specified, provide dialog choice\n {\n let choice = await ItemDialog.create(ItemDialog.objectToArray({\n taste : \"Goût\",\n sight : \"Vue\",\n smell : \"Odorat\",\n hearing : \"Ouïe\",\n touch : \"Toucher\"\n }, this.item.img), 1, {title : this.item.name, text : \"Choisissez un Sens\"});\n if (choice[0])\n {\n name = `${name.split(\"(\")[0].trim()} (${choice[0].name})`\n tests = `${tests.split(\"(\")[0].trim()} (${choice[0].name})`\n }\n }\n\n this.item.updateSource({name, \"system.tests.value\" : tests})\n}","yDvxF9llUYwJg0sE":"if (getProperty(args.data, \"system.loaded.value\") == true)\n{\n let repeaterValue = Math.ceil(CONFIG.Dice.randomUniform() * 10);\n let qualities = foundry.utils.deepClone(this.item.system.qualities.value);\n let repeater = qualities.find(i => i.name == \"repeater\")\n if (repeater)\n {\n repeater.value = repeaterValue\n }\n else \n {\n qualities.push({name : \"repeater\", value : repeaterValue})\n }\n foundry.utils.setProperty(args.data, \"system.loaded.amt\", repeaterValue)\n this.item.update({\"system.qualities.value\" : qualities});\n this.script.notification(\"Repeater \" + repeaterValue);\n}\nelse if (foundry.utils.getProperty(args.data, \"system.loaded.value\") == false)\n{\n let qualities = foundry.utils.deepClone(this.item.system.qualities.value).filter(i => i.name != \"repeater\");\n this.item.update({\"system.qualities.value\" : qualities});\n}","yFMvxecXAZ6T2O0S":"if (args.totalWoundLoss >= 1)\n{\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n await roll.toMessage(this.script.getChatData());\n if (roll.total == 9)\n {\n this.script.message(`Two @UUID[Compendium.wfrp4e-eis.actors.cLOGeMqUty61nYB9]{Blue Horror of Tzeentch} claw their way out of ${this.actor.name}'s screaming flesh, killing them in the process.`, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n }\n}","yIGItnshXI4W46cp":"return args.skill?.name != game.i18n.localize(\"NAME.Charm\");","yJuEWH4wVYuPZMvL":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nargs.fields.slBonus += 1 + excessSL;","yMMzZ7daCqRlGT3N":"let item = args.opposedTest.attackerTest.item;\nif (!item.isMagical && (item.type == \"weapon\" || item.type == \"trait\"))\n{\n args.modifiers.other.push({label : this.effect.name, details : \"Retirer l'Indice de Dégâts\", value : -1 * (args.totalWoundLoss - args.opposedTest.result.differenceSL)})\n}\n","yPxYRObUiqAIhlNB":"this.actor.system.status.encumbrance.max += 1","yQziCK8G8I1RYkTj":"let add;\nif (args.opposedTest?.attackerTest?.weapon?.isProjectiles && args.opposedTest?.result.hitloc?.value === \"head\") {\n add = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : \"Add 1 AP? Bascinet provides 4 AP instead of 3 against missile attacks from the front\"})\n}\n\nif (add) {\n\n args.modifiers.ap.metal++;\n args.modifiers.ap.used++;\n args.modifiers.ap.value++;\n args.modifiers.ap.details.push(\"+1 PA contre les attaques à distance de face\");\n}","yRRzSKlcN3L7rEEe":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Entertain\")) || args.skill?.name.includes(game.i18n.localize(\"NAME.Perform\")) || args.skill?.name.includes(game.i18n.localize(\"NAME.Play\"));","yTmRoUstxHMso91c":"if (args.item.name == game.i18n.localize(\"NAME.MagicResistanceTrait\") && args.item.type == \"trait\")\n{\n args.item.system.specification.value = Number(args.item.system.specification.value) + 1\n}","yXUPiWuQ5o0JBY4i":"return args.skill?.name == game.i18n.localize(\"NAME.Endurance\") || args.characteristic == \"int\"","yYNBZjmBnytXpRn3":"this.actor.reset();","yamap8V6Gx2Z9Smu":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.nWLsoWQBCjPRKxYx\", // Robust\n \"Compendium.wfrp4e-core.items.Item.jviOQmy0luQOySC2\", // Tenacious\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","yatUu0cd7iKs50rq":"return args.skill?.name != game.i18n.localize(\"NAME.Track\");","ybxDG2ezvRx02LYx":"return !args.context.corruption","ynNCBAYwJFkTiXV1":"this.actor.system.status.addArmour(4, {source : this.effect})","ynV7tz0OdCwlsQp6":"let msg = \"\"\nmsg += `

${await this.actor.applyBasicDamage(8, {loc : \"roll\", suppressMsg: true, hideDSN: true})}

`\nmsg += `

${await this.actor.applyBasicDamage(8, {loc : \"roll\", suppressMsg: true, hideDSN: true})}

`\nmsg += `

${await this.actor.applyBasicDamage(8, {loc : \"roll\", suppressMsg: true, hideDSN: true})}

`\n\nthis.script.message(msg);","ynoHNXXCGRS6fTqF":"let msg = \"\"\n\nlet i_gain = (await new Roll(\"1d10\").roll()).total\n\nif (args.actor.characteristics.i.value <= 0)\n{\n i_gain += (await new Roll(\"2d10\").roll()).total\n}\n\nmsg = `${this.actor.prototypeToken.name} gagne ${i_gain} Initiative`\n\nlet newValue = i_gain + args.actor.characteristics.i.modifier\n\nthis.actor.update({\"system.characteristics.i.modifier\" : newValue})\n\n\nlet hitloc = await game.wfrp4e.tables.rollTable(\"hitloc\")\n\nlet value = hitloc.result\nlet desc = hitloc.description\n\nthis.effect.updateSource({\"flags.wfrp4e.location\" : value})\n\nmsg += ` alors que des yeux sortent de leur ${desc}`\n\nthis.script.message(msg)","yr1FmaTY18JXWa8s":"return [\"witchcraft\", \"necromancy\", \"daemonology\", \"slaanesh\", \"nurgle\", \"tzeentch\", \"undivided\"].includes(args.spell?.system.lore.value);","yvtF2t9aibxibAIM":"const test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Perception\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"challenging\"},\n context: {\n failure: `Gain de l'état @Condition[Prone].`,\n success: `Capable de bouger.`\n }\n});\n\nawait test.roll();\n\nif (test.failed)\n this.actor.addCondition(\"prone\");","yzN7ZNlgCiSVJqsU":"let sourceItem = this.effect.sourceItem;\n\nif (sourceItem)\n{\n\tthis.actor.applyEffect({effectUuids : [sourceItem.effects.contents[1].uuid]})\n\tthis.script.notification(\"Effets secondaires appliqués\");\n}","z14Tb2YKCjiE5ZTU":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 30,\n \"bright\": 20,\n \"angle\": 90,\n \"alpha\": 0.6,\n \"animation\": {\n \"speed\": 3,\n \"intensity\": 3,\n \"type\": \"torch\",\n },\n \"color\": \"#ffcc66\",\n }}));","z5HfNUrHy5MS3K7a":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure: \"1 Corruption Point Gained\"}})\nawait test.roll();\nif (test.failed && this.actor.type == \"character\")\n{\n this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + 1})\n this.script.message(\"Gained a Corruption point\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","z8W5PAwBR0PXY6ty":" await args.actor.addCondition(\"ablaze\");\n await args.actor.addCondition(\"blinded\");\n await args.actor.addCondition(\"poisoned\", 2);","z8mwLihZQu0JtUHY":"\nlet characteristics = {\n \"ws\" : 20,\n \"bs\" : 20,\n \"s\" : 0,\n \"t\" : 20,\n \"i\" : 30,\n \"ag\" : 0,\n \"dex\" : 10,\n \"int\" : 65,\n \"wp\" : 70,\n \"fel\" : 20\n}\nlet skills = [\"Focalisation\", \"Calme\", \"Intimidation\", \"Langue (Magick)\", \"Language (Nehekharan)\", \"Commandement\", \"Savoir (Magie)\", \"Perception\"]\nlet skillAdvancements = [20, 30, 25, 30, 20, 20, 30, 20]\nlet talents = [\"Harmonisation Aethyrique\", \"Magie des Arcanes (Domaine)\", \"Dur à cuire\", \"Diction Instinctive\", \"Perception de la magie\", \"Menaçant\", \"Menaçant\", \"Magie Mineure\", \"Lire/Écrire\", \"Seconde Vue\", \"Mage de guerre\"]\nlet trappings = [\"Arme simple\"]\nlet specialItems = [ \n {name: \"Mouldering Robes\", type: \"trapping\", trappingType: \"clothingAccessories\" }, \n {name: \"Pouches containing ritual components\", type: \"trapping\", trappingType: \"clothingAccessories\" }, \n {name: \"Staff\", type: \"weapon\", damage: \"SB+2\"}, \n {name: \"Magie Noire (Nécromancie)\", type: \"talent\"},\n] \nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else \n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else \n {\n ui.notifications.warn(`Could not find ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings) \n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else \n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(\">>>>>>><\", items)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","z926Cl2vxUfyLY0V":"if (![\"rArm\", \"lArm\"].includes(this.effect.getFlag(\"wfrp4e\", \"location\")))\n\treturn true\n\nreturn [\"fel\", \"wp\", \"int\", \"t\"].includes(args.characteristic)","z9NEbIUBsKMaTuCz":"if (args.opposedTest.result.hitloc && args.opposedTest.result.hitloc.value == \"head\") \n{\n args.actor.addCondition(\"entangled\")\n}","zA6TDttpwMSMl7D8":"// An imbiber must take a Consume Alcohol Test.\nthis.actor.setupSkill(game.i18n.localize(\"NAME.ConsumeAlcohol\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => {\n await test.roll()\n // If they succeed, \n // as a result of whatever potential futures they glimpse, \n // they can spend a Fortune Point within the next hour to reverse the dice of any failed Test.\n if (test.succeeded) {\n this.script.message(`As a result of whatever potential futures they glimpse, ${this.actor.prototypeToken.name} can spend a Fortune Point within the next hour to reverse the dice of any failed Test.`, \n {\n whisper: ChatMessage.getWhisperRecipients(\"GM\"), \n blind: true \n }) \n }\n})","zBHTIBU8OlYj1YIO":"args.fields.modifier += this.effect.sourceActor?.system.characteristics.wp.value;","zF1IKmobCB8ea58M":"return this.sourceActor.uuid === this.actor.uuid || ![\"ws\", \"ag\"].includes(args.characteristic);","zFYCaGR0wbFWjl4T":"return args.skill?.name != game.i18n.localize(\"NAME.OutdoorSurvival\");","zGwtyjTUBeSQ110p":"if (args.opposedTest.attackerTest.preData.charging) \n{\n let mostProtectedLoc;\n let mostProtectedValue = 0;\n for (let loc in this.actor.status.armour) \n {\n if (this.actor.status.armour[loc].value != undefined && this.actor.status.armour[loc].value > mostProtectedValue) \n {\n mostProtectedLoc = loc;\n mostProtectedValue = this.actor.status.armour[loc].value;\n }\n }\n if (mostProtectedValue)\n {\n args.modifiers.other.push({label: this.effect.name, value : mostProtectedValue});\n }\n}","zI5hXv2NLGWqnmDD":"if (args.totalWoundLoss > 0)\n{\n\targs.actor.applyEffect({effectUuids : this.item.effects.contents[0].uuid})\n}","zIErcRiBmIZRbary":"if (args.test.failed)\n {\n let applicableCharacteristics = [\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"];\n if (applicableCharacteristics.includes(args.test.characteristicKey))\n {\n this.actor.addCondition(\"stunned\");\n }\n }","zIpl3SkWv8zzlr2D":"let filters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"petty\"\n }\n]\n\nlet petty = (await ItemDialog.createFromFilters(filters, 4, {text : \"Choisissez 4 Sorts Mineurs\"})).map(i => i.toObject());\n\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : [\"death\"]\n }\n]\n\nlet arcane = (await ItemDialog.createFromFilters(filters, 8, {text : \"Choisissez 8 Sorts d'Arcane et Savoir de la Mort\"})).map(i => i.toObject());\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"name\",\n value: /^((?!\\().)*$/gm, // Remove all spells with parentheses (all arcane spells spells)\n regex: true\n },\n {\n property : \"system.lore.value\",\n value : \"necromancy\"\n }\n]\n\nlet necromancy = (await ItemDialog.createFromFilters(filters, 3, {text : \"Choisissez 3 dans le Savoir de Nécromancie\"})).map(i => i.toObject());\n\nlet items = [...necromancy, ...petty, ...arcane]\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","zK38Rl5t9zbFi4Se":"if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 1);\n this.script.notification(\"Hémorragique ajouté\")\n}","zL7ECmBBMAqf5Esn":"let hasMagazine = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content: \"

Le navire a-t-il un magasin ou tout autre type de réserve pour la poudre noire ?

\"});\n\nif (!hasMagazine) return;\n\nlet roll = new Roll(\"d10\");\nawait roll.evaluate();\n// await roll.toMessage();\nlet anchor = roll.toAnchor();\n\nlet crits = [];\n\nfor (let i = 0; i < roll.total; i++) {\n let result = await WFRP_Tables.rollTable('crithull');\n let collection = game.packs.get(result.object.documentCollection)\n\n if (collection)\n await collection.getDocuments()\n\n if (!collection)\n collection = game.items;\n\n let item = collection.get(result.object.documentId)\n if (item)\n crits.push(item);\n}\n\nconst items = await this.actor.createEmbeddedDocuments(\"Item\", crits);\nconst speaker = ChatMessage.getSpeaker({actor: this.actor});\nconst uuids = items.map(i => `@UUID[${i.uuid}]`);\nthis.script.message(`

${this.item.name} provoque un nombre supplémentaire de ${anchor.outerHTML} Coups Critiques à la Coque!

  • ${uuids.join('
  • ')}
`)","zLBLEDl3aGcAxai2":"const hasTraits = args.actor.has(\"Daemonic\") || args.actor.has(\"Undead\") || args.actor.has(\"Spellcaster\");\nconst hasSinOrCorruption = args.actor.status.sin.value > 0 || args.actor.status.corruption.value > 0;\nconst isSpellcaster = args.actor.itemTags.talent.some(i =>\n i.name.includes(game.i18n.localize(\"NAME.ArcaneMagic\")) ||\n i.name.includes(game.i18n.localize(\"NAME.ChaosMagic\")) ||\n i.name.includes(game.i18n.localize(\"NAME.PettyMagic\"))\n );\nconst shouldDamage = hasTraits || hasSinOrCorruption || isSpellcaster;\n\nif (shouldDamage) {\n const roll = new Roll(\"1d10\");\n await roll.evaluate();\n let damage = roll.total;\n await roll.toMessage();\n await this.script.message(await this.actor.applyBasicDamage(damage, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true}));\n}","zR4WAjzXHTZuiu5G":"let actor = this.actor;\n let effect = this.effect;\n let bleedingAmt;\n let bleedingRoll;\n let msg = \"\"\n\n let damage = effect.conditionValue;\n let scriptArgs = {msg, damage};\n await Promise.all(actor.runScripts(\"preApplyCondition\", {effect, data : scriptArgs}))\n msg = scriptArgs.msg;\n damage = scriptArgs.damage;\n msg += await actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, minimumOne : false, suppressMsg : true})\n\n if (actor.status.wounds.value == 0 && !actor.hasCondition(\"unconscious\"))\n {\n await actor.addCondition(\"unconscious\")\n msg += \"
\" + game.i18n.format(\"BleedUnc\", {name: actor.prototypeToken.name })\n }\n\n if (actor.hasCondition(\"unconscious\"))\n {\n bleedingAmt = effect.conditionValue;\n bleedingRoll = (await new Roll(\"1d100\").roll()).total;\n if (bleedingRoll <= bleedingAmt * 10)\n {\n msg += \"
\" + game.i18n.format(\"BleedFail\", {name: actor.prototypeToken.name}) + \" (\" + game.i18n.localize(\"Rolled\") + \" \" + bleedingRoll + \")\";\n await actor.addCondition(\"dead\")\n }\n else if (bleedingRoll % 11 == 0)\n {\n msg += \"
\" + game.i18n.format(\"BleedCrit\", { name: actor.prototypeToken.name } ) + \" (\" + game.i18n.localize(\"Rolled\") + bleedingRoll + \")\"\n await actor.removeCondition(\"bleeding\")\n }\n else\n {\n msg += \"
\" + game.i18n.localize(\"BleedRoll\") + \": \" + bleedingRoll;\n }\n }\n\n await Promise.all(actor.runScripts(\"applyCondition\", {effect, data : {bleedingRoll}}))\n if (args.suppressMessage)\n {\n let messageData = game.wfrp4e.utility.chatDataSetup(msg);\n messageData.speaker = {alias: this.effect.name}\n messageData.flavor = this.effect.name;\n return messageData\n }\n else\n {\n return this.script.message(msg)\n }\n ","zUv9e0A3OEXWY9Mv":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet data = item.toObject();\ndata.system.specification.value = 9 - this.actor.system.characteristics.s.bonus\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","zWZG8OmxqTpzHjFV":"args.actor.characteristics.ag.modifier -= 10;\n\n if (args.actor.details.move.value > 3)\n {\n args.actor.details.move.value -= 1;\n if (args.actor.details.move.value < 3)\n args.actor.details.move.value = 3\n }","zXh8rgMxWoCLTxVd":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Voile';\nconst difficulty = 'challenging';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","zY4ZjY7uyKIKMYmX":"this.script.message(await game.wfrp4e.tables.formatChatRoll(\"fleshy-curse\"))\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\nawait test.roll();\nif (test.succeeded)\n{\n this.effect.delete()\n}","zadppy7FEbXvgUON":" let characteristics = {\n \"ws\" : 5,\n \"bs\" : 0,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : 0,\n \"ag\" : 10,\n \"dex\" : 10,\n \"int\" : 0,\n \"wp\" : 0,\n \"fel\" : 5\n}\nlet skills = [\"Perception\", \"Escamotage\", \"Discrétion (Urbaine)\"]\nlet skillAdvancements = [10, 10, 10]\nlet talents = [\"Criminel\", \"Etiquette (Criminals)\"]\nlet trappings = [\"Corde, 10 mètres\", \"Lockpick\", \"Masque\"]\nlet items = []\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","zasFOZohkrdFIBwr":"let modifier = 0\n if (this.effect.name.includes(\"Moderate\"))\n modifier = -20\n else\n modifier = -10\n args.fields.modifier += modifier","zdGAvfL7zJ7wpYxG":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'easy';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","zi8Z3NlwVj3IfgAW":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectData : [this.item.effects.contents[3].convertToApplied()]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","ziG9H5Kdb7xC3dFE":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Art\"));","zjTEhJuLcFVkzory":"if (!args.test.preData.options?.kingship) return\n\nif (!this.item.equipped.value || !args.test.item) return;\nif ([game.i18n.localize(\"NAME.Charm\"), \n game.i18n.localize(\"NAME.Intimidate\"), \n game.i18n.localize(\"NAME.Leadership\")].includes(args.test.item.name))\n{\n args.test.preData.canReverse = true\n}","zk44dFEGkylB7kW6":" let modifier; let target = args.data.targets[0]\n if (target.actor.details.size.value == \"tiny\")\n modifier = 30\n if (target.actor.details.size.value == \"ltl\")\n modifier = 20\n if (target.actor.details.size.value == \"sml\")\n modifier = 10\n\t\n args.fields.modifier += (modifier || 0); // Offset size modifier ","zkc1gIPLj0VoAONT":"let AP = args.actor.status.armour;\n\nAP[\"head\"].value += 2;\nAP[\"rArm\"].value += 2;\nAP[\"lArm\"].value += 2;\nAP[\"body\"].value += 2;\nAP[\"lLeg\"].value += 2;\nAP[\"rLeg\"].value += 2;","zphxI8VSWbNQCMBy":"args.size = \"lrg\"","zqShIJnrRReGgP94":"let {added, removed} = this.effect.getFlag(\"wfrp4e\", \"propertiesChanged\");\n\nfor(let property of (added || []))\n{\n let hasValue = game.wfrp4e.config.propertyHasValue[property];\n if (!args.item.system.qualities.value.find(i => i.name == property))\n {\n args.item.system.qualities.value.push({name : property, value : (hasValue ? 2 : null)})\n }\n}\n\nfor(let property of (removed || []))\n{\n args.item.system.flaws.value = args.item.system.flaws.value.filter(i => i.name != property)\n}","zsiV6XEHlCNGLLPl":"return args.skill?.name == game.i18n.localize(\"NAME.SetTrap\");","zsoTVkHe4nHY1M52":"this.script.message(await this.actor.applyBasicDamage(10 + parseInt(this.effect.sourceTest.result.SL), {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP}))","ztIkD5Zt6ko9D4Ca":"args.fields.modifier -= 10","zxG5KbliWE9xWNQD":"this.script.message(\"Réussit automatiquement tout \" + this.script.label);\nargs.abort = true;","zzk2uRSFjFHB5kjw":"\n let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n if (args.test.isFumble && roll == 1 && !args.test.result.misfire)\n {\n args.test.result.misfire = game.i18n.localize(\"Misfire\") + \" (Rolled 1)\"\n args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage)\n }\n else if (args.test.isFumble && roll != 1)\n args.test.result.other.push(\"Misfire Roll: \" + roll)"}); + mergeObject(game.wfrp4e.config.effectScripts, {"00ZCnahnTGvzG9KA":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.weczkAMPlTjX7lqU\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item])","01VFjGVxkjb5P1ve":"return args.item?.system?.isRanged && args.data.targets[0]?.actor?.sizeNum < 3","03mJu59V4iByWlsO":"// The imbiber immediately\n// takes 3 Poisoned Conditions that cannot be resisted at first,\nawait this.actor.addCondition(\"poisoned\", 3)\n\n// recovers a number of Wounds equal to their Toughness Bonus,\nawait this.actor.modifyWounds(this.actor.system.characteristics.t.bonus)\n\n// and acquires the Régénération Creature Trait.\nconst hasRégénération = this.actor.has(\"Régénération\")\nif (hasRégénération === undefined) {\n fromUuid(\"Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR\").then(trait => {\n let traitItem = trait.toObject()\n this.actor.createEmbeddedDocuments(\"Item\", [traitItem], {fromEffect: this.effect.id})\n })\n}\n\nthis.script.message(`

${this.actor.prototypeToken.name} a :\n

    \n
  • Acquis 3 états Empoisonné qui ne peuvent pas être résistés au début du round.
  • \n
  • Récupération de ${this.actor.system.characteristics.t.bonus} Blessures
  • \n
  • Acquisition du Trait de Créature Régénération.
  • \n
\n C’est à Ranald de décider si leur régénération peut dépasser leur empoisonnement.

\n

Lorsque tous les états Empoisonné sont perdus, la Régénération l’est aussi.

`,\n { whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true })\n","04bAiHISSW53w94Y":"this.actor.addCondition(\"blinded\", 3)","06IaVCOC0RCJbxEf":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.8piWcBKFlQ2J1E3A\")\nlet data = item.toObject();\ndata.system.location.key= this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data])","07tvKnPT8ICtv2us":"if (args.test.result.misfire && args.test.result.roll !== 100) {\n delete args.test.result.misfire\n}","08S8Ozi5b4EdwZp5":"args.fields.slBonus += this.actor.system.characteristics.wp.bonus;","09sSpnW8z2zcVEdf":"if (!args.flags.quietenedApplied)\n{\n args.fields.modifier += 10;\n args.flags.quietenedApplied = true\n}","0BP5l7bIkf744G1k":"return !args.context.terror && !args.extendedTest?.flags.wfrp4e?.fear","0FNOq4J1AdPd2A0q":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Row\")) && !args.skill?.name.includes(game.i18n.localize(\"NAME.Sail\"));","0FWto1oEr3jbWggw":"let spells = await warhammer.utility.findAllItems(\"spell\", \"Chargement des sorts\", true, [\"system.lore.value\"])\n\nlet text = (await game.wfrp4e.tables.rollTable(\"random-caster\", {hideDSN: true})).result\n\nlore = Array.from(text.matchAll(/{(.+?)}/gm))[0][1]\n\nif (text == \"GM's Choice\")\n{\n return this.script.notification(text)\n}\n\nif (spellsWithLore.length > 0)\n{\n let spellsWithLore = spells.filter(i => game.wfrp4e.config.magicLores[i.system.lore.value] == lore)\n let selectedSpell = spellsWithLore[Math.floor(CONFIG.Dice.randomUniform() * spellsWithLore.length)]\n this.script.notification(selectedSpell.name);\n this.actor.createEmbeddedDocuments(\"Item\", [(await fromUuid(selectedSpell)).toObject()])\n}\nelse\n{\n ui.notifications.notify(`Impossible de trouver le sort ${lore}. Essayez à nouveau`)\n}","0H2syk6qc0sCY0pj":"if ( args.actor.has(game.i18n.localize(\"NAME.AA\"), \"talent\") ||\nargs.actor.has(game.i18n.localize(\"NAME.SecondSight\"), \"talent\") ) {\n\targs.modifiers.other.push({label : this.effect.name, value : 5, details : \"La Cible possède Harmonisation Aethyrique ou Seconde Vue\"});\n}","0IAc5VFR2ogXOaGE":"return args.characteristic != \"int\" || args.type != \"characteristic\"","0J1yHP1jkGR9y89H":"if (!this.item.system.properties.qualities.fast) \n this.item.system.qualities.value.push({name : 'fast'});\nif (!this.item.system.properties.qualities.magical) \n this.item.system.qualities.value.push({name : 'magical'});","0KG3HoTNoZhaINIj":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.4CMKeDTDrRQZbPIJ\")\nlet fixation = (await game.wfrp4e.tables.rollTable(\"fixations\"))\nlet data = item.toObject();\ndata.system.specification.value = fixation.result;\nthis.item.updateSource({name : this.item.name += ` (${fixation.result})`});\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","0LCQtsiK2aUfYRmD":"return ![\"t\", \"wp\"].includes(args.characteristic)","0NAD1LNcVyAZ1fC7":"return args.skill?.name !== game.i18n.localize(\"NAME.Cool\") && args.skill?.name !== game.i18n.localize(\"NAME.Résistance\");","0PzfGjGhHQbxEwlb":"this.item.update({\"system.AP\" : {lArm : 0, rArm : 0, lLeg : 0, rLeg: 0}});","0R0QAr3D024kWPfo":"let table = game.wfrp4e.tables.findTable(\"mutatephys\");\nif (!table)\n{\n\treturn ui.notifications.error(\"Table de Mutation introuvable, veuillez vous assurer qu'une table avec la clé `mutatephys` est importée dans le monde.\")\n}\nlet result = (await table.roll()).results[0];\nlet uuid = `Compendium.${result.documentCollection}.${result.documentId}`\nlet item = await fromUuid(uuid);\n\nif (item)\n{\n this.script.notification(`${item.name} added`)\n this.actor.createEmbeddedDocuments(\"Item\", [item])\n}\nelse\n{\n ui.notifications.error(\"Impossible de trouver l'objet : \" + uuid)\n}","0Uly7OmkH0zqYbxQ":"let location = this.item.system.location.key;\n\nif (location)\n{\n let dropped = this.item.system.weaponsAtLocation;\n\n if (dropped.length)\n {\n this.script.notification(`Lache ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}\n\nlet roll = await new Roll(\"max(1, 1d10 - @system.characteristics.t.bonus)\", this.actor).roll()\n\nroll.toMessage(this.script.getChatData({flavor : `${this.effect.name} (Durée)`}));\n\nthis.effect.updateSource({\"duration.rounds\" : roll.total})","0YKQGbsKdHSmYGE7":"if (args.skill?.name != game.i18n.localize(\"NAME.Gossip\"))\n{\n\treturn true;\n}\nelse \n{\n\targs.data.reversal = {allowed : true, if: \"success\"}; // Kind of a kludge here, the talent Tests has a specific condition, but the description simply says \"any gossip test can be reversed\" so check it here instead of submission\n}\n ","0abwNjpzo3SbEOeO":"if (args.applyAP && args.modifiers.ap.metal)\n{\n args.modifiers.ap.ignored += args.modifiers.ap.metal\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignorer Métal (\" + args.modifiers.ap.metal + \")\");\n args.modifiers.ap.metal = 0\n}","0amHqfjTRp5ff6Op":"let wounds = this.effect.sourceActor.system.characteristics.wp.bonus;\nthis.actor.modifyWounds(wounds);\nthis.script.message(`Soigne ${wounds} Blessures`);","0cNnOYQnj7nFL0mD":"this.item.system.encumbrance.value = Math.max(0, this.item.system.encumbrance.value - 1)","0e0UZT2FodOJDdgW":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.GbDyBCu8ZjDp6dkj\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","0e7OkamNAaAk4Oit":"let item1 = await fromUuid(\"Compendium.wfrp4e-core.items.3S4OYOZLauXctmev\")\nlet item2 = await fromUuid(\"Compendium.wfrp4e-core.items.7mCcI3q7hgWcmbBU\")\n\nlet data1 = item1.toObject();\ndata1.system.location.key = this.item.system.location.key\n\nlet data2 = item2.toObject();\ndata2.system.location.key = this.item.system.location.key\n\nthis.actor.createEmbeddedDocuments(\"Item\", [data1, data2], {fromEffect: this.effect.id})\n","0hAbiNR1nFkpFMRz":"if (!this.actor.has(game.i18n.localize(\"NAME.SecondSight\"),\"talent\")) this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.OEjUvJKi0xmBwbS2\", this.effect)","0hgTyeaEhMBLwzUn":"let fearCounter = this.item.effects.filter(i => i.name == this.effect.name).length;\n\nfearCounter += Number(this.actor.has(\"Peur\")?.system.specification.value) || 0\n\ngame.wfrp4e.utility.postPeur(fearCounter || 1, this.effect.name)","0iTLDgFHO9Rgc010":"args.fields.modifier -= 20;","0jTqyz0wRlK6XPF7":"if (args.test.spell)\n{\n\targs.test.result.other.push(`${this.effect.name}: Echec Automatique`)\n}","0kUalAsb4OhtYbaJ":"return args.item?.system?.attackType == \"ranged\" && !this.actor.system.canFly.effects.filter(e => e.name == \"Flying\")[0].disabled","0mrUnxzufYgsR0Ph":"this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => {\n await test.roll()\n if (test.failed)\n {\n this.actor.addCondition(\"stunned\")\n }\n})\n","0uUxvBLJC76WIIBC":"let species = await ValueDialog.create({text : \"Saisir l'espèce cible (singulier)\", title : this.effect.name})\n\nthis.effect.updateSource({name : this.effect.setSpecifier(species)});","0vaYwAlMWTmOBl8k":"if (!args.flags.strikeToStun)\n{\n args.flags.strikeToStun = true\n args.fields.modifier += 20;\n args.fields.hitLocation = \"head\";\n}\nargs.fields.successBonus++;","0wR0LWpfhLFA240I":"let value = await ValueDialog.create({\n title : this.script.label, \n text: \"Notes de Victoire pour le Journal d'Expérience\"\n});\nvalue \n ? this.actor.system.awardExp(50, value) \n : this.actor.system.awardExp(50, this.script.label)","0wmIC2MssUX6LW3N":"if (args.test.options.doomboltRolled)\n{\n\targs.test.result.damage += 4;\n}","0yyofYHeDRQlFliO":"return args.context.terror || args.extendedTest?.flags.wfrp4e?.fear","11QMAT1KYGJJmPlD":"let melee = [\"Compendium.wfrp4e-core.items.Item.4MJJCiOKPkBByYwW\", \"Compendium.wfrp4e-core.items.Item.RWJrupj9seau0w31\", \"Compendium.wfrp4e-core.items.Item.jt0DmVK9IiF6Sd2h\"];\nlet ranged = [\"Compendium.wfrp4e-core.items.Item.5eDd6iFeR9G6cCfz\", \"Compendium.wfrp4e-core.items.Item.jrYW2OyDHd1Md2my\", \"Compendium.wfrp4e-core.items.Item.cygaI9gq4BQJvbB5\"];\n\nif (args.equipped)\n{\n if (this.item.system.isMelee)\n {\n this.actor.addEffectItems(melee, this.effect);\n }\n else\n {\n this.actor.addEffectItems(ranged, this.effect);\n }\n}\nelse \n{\n this.effect.deleteCreatedItems();\n}","11ir8nibM5HD69na":"const balanced = game.i18n.localize(\"WFRP4E.YenluiBalanced\");\nconst light = game.i18n.localize(\"WFRP4E.YenluiLight\");\nconst dark = game.i18n.localize(\"WFRP4E.YenluiDark\");\n\nlet newName, newDescription;\n\nif (this.effect.name === game.i18n.localize(\"WFRP4E.YenluiDark\")) {\n newName = game.i18n.localize(\"WFRP4E.YenluiBalanced\");\n newDescription = game.i18n.localize(\"WFRP4E.YenluiBalancedDesc\");\n} else if (this.effect.name === game.i18n.localize(\"WFRP4E.YenluiBalanced\")) {\n newName = game.i18n.localize(\"WFRP4E.YenluiLight\");\n newDescription = game.i18n.localize(\"WFRP4E.YenluiLightDesc\");\n}\n\nif (newName) {\n await this.effect.update({name: newName});\n await this.item.update({name: newName, \"system.description.value\": newDescription});\n}","11uCC0mK2uL783al":"let type = this.item.getFlag(\"wfrp4e\", \"breath\");\n\nif ([\"fire\", \"electricity\", \"poison\"].includes(type))\n{\n args.applyAP = false;\n}","15C6LbCUmQgPEoDM":"await args.actor.addCondition(\"ablaze\");","16c0m6PsDXWh86uN":"let property = this.effect.getFlag(\"wfrp4e\", \"property\");\nif (property && !this.item.system.flaws.value.find(i => i.name == property));\n{\n this.item.system.flaws.value.push({name : property});\n}","16nCOByUaSFDym1V":"args.fields.modifier -= 20\n","18MeEQ0As3JvER71":"let state = !this.effect.disabled;\nthis.effect.update({\"disabled\": state});\n\nif (state)\n return ui.notifications.info(\"Effet.CreatureBackInWater\", {localize: true})\n\nreturn ui.notifications.info(\"Effet.CreatureOutOfWater\", {localize: true});","190PHSHKGaJ74wsR":"if (!this.item.name.includes(\"(\") || this.item.system.tests.value.includes(\"Terrain\") || this.item.system.tests.value.toLowerCase().includes(\"(any)\"))\n{\n let tests = this.item.system.tests.value\n let name = this.item.name\n\n // Si le nom précise déjà un terrain, on met à jour la valeur de tests\n if (name.includes(\"(\") && !name.toLowerCase().includes(\"(any)\"))\n {\n let terrain = name.split(\"(\")[1].split(\")\")[0]\n tests = tests.replace(\"the Terrain\", terrain)\n }\n else // Sinon, on propose un choix par dialogue\n {\n let choice = await ItemDialog.create(ItemDialog.objectToArray({\n coastal : \"Littoral\",\n deserts : \"Déserts\",\n marshes : \"Marécages\",\n rocky : \"Rocailleux\",\n tundra : \"Toundra\",\n woodlands : \"Régions boisées\"\n }, this.item.img), 1, \"Choisissez un Terrain\");\n if (choice[0])\n {\n name = `${name.split(\"(\")[0].trim()} (${choice[0].name})`\n tests = tests.replace(\"the Terrain\", choice[0].name + \" Terrain\")\n }\n }\n\n this.effect.updateSource({name})\n this.item.updateSource({name, \"system.tests.value\" : tests})\n}","19LL1oevrjmpD8DX":"let damage = await new Roll(\"1d10\").roll();\ndamage.toMessage(this.script.getChatData());\nthis.actor.applyDamage(damage.total, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL,\n createMessage: this.script.getChatData()\n});\n\nconst test = await this.actor.setupSkill(\n game.i18n.localize(\"NAME.Endurance\"),\n {\n fields: {difficulty: \"average\"},\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n },\n);\n\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\");\n}","1A87vGLh2PXH0rG0":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Language\"));","1BT0MWM2cbhlEnrn":" let characteristics = {\n \"ws\" : 5,\n \"bs\" : 5,\n \"s\" : 5,\n \"t\" : 0,\n \"i\" : 5,\n \"ag\" : 5,\n \"dex\" : 5,\n \"int\" : 0,\n \"wp\" : 5,\n \"fel\" : 5\n }\n let items = []\n\n let updateObj = this.actor.toObject();\n\n let talents = (await Promise.all([game.wfrp4e.tables.rollTable(\"talents\"), game.wfrp4e.tables.rollTable(\"talents\"), game.wfrp4e.tables.rollTable(\"talents\")])).map(i => i.text)\n\n for (let ch in characteristics)\n {\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n }\n\n for (let talent of talents)\n {\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n }\n\n\n await this.actor.update(updateObj)\n this.actor.createEmbeddedDocuments(\"Item\", items);\n","1CeYp5MlPcH68UIw":"let characteristics = {\n \"ws\" : 15,\n \"bs\" : 10,\n \"s\" : 10,\n \"t\" : 15,\n \"i\" : 10,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 10,\n \"wp\" : 10,\n \"fel\" : 10\n}\nlet skills = [\"Intimidation\", \"Commandement\", \"Perception\"]\nlet skillAdvancements = [10, 10, 10]\nlet talents = [\"Vigilance\", \"Coude-à-coude\", \"Menaçant\", \"Robuste\"]\nlet trappings = [\"Arme simple\", \"Cotte de Mailles\", \"Chausses de Mailles\"]\nlet specialItems = [\n]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","1Du4e27M8WgP2iui":"if (args.equipped === true && this.actor.name !== \"Kurgorn Three-eyes\")\n{\n this.actor.addCondition(\"blinded\", 1, {\"statuses\" : [\"blinded\", \"blind\"]})\n this.script.notification(`Aveuglé en portant ${this.item.name}`);\n}\n\nif (args.equipped === false && this.actor.name !== \"Kurgorn Three-eyes\")\n{\n this.actor.removeCondition(\"blinded\")\n}","1E47r2ba6IGe8uFK":"return args.characteristic != \"t\"","1IodsW9ImamYoEYz":"args.actor.details.move.run += 4","1JwxZujbDcueLWBL":"await this.actor.addCondition(\"ablaze\", 2)\nawait this.script.message(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg: true}))","1LDSzXeO5CzXgTOc":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) || args.skill?.name == `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`","1LDm3OB32skZe6Xv":"return args.characteristic != \"wp\"","1MDOKny7IirJPoI6":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` ${this.effect.name}`})\nawait test.roll()\nif (test.succeeded)\n{\n this.effect.delete();\n}\n","1OpT3CXs07XFWWCT":"args.context.cardsharp = true;","1PPh4vHd5sPKtudZ":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.eowbsW6oHGSNJmxV\", this.effect)","1PQPxFjmRlulHHzo":"if (args.loc == this.item.system.location.key && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 2);\n}\n ","1UalUmNzjB4rp3SZ":"return [\"ws\", \"bs\", \"s\", \"ag\", \"t\", \"dex\"].includes(args.characteristic)","1UvL0XA1EpQtjDNn":"let effects = this.item.effects.contents.filter(i => i.id != this.effect.id);\n\nlet choice = await ItemDialog.create(effects, 1, {title : this.effect.name, text: \"Choisissez une Rune\"});\n\nif (choice[0])\n{\n choice[0].performEffectApplication();\n}","1XAilPQEyMWVPA5z":"const qualities = foundry.utils.deepClone(args.item.system.qualities.value);\nqualities.push({name:\"fine\", value: 1});\nargs.item?.update({\"system.qualities.value\": qualities});","1ZArMNUI8qqH6zkX":"let test = await args.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : \" - \" + this.effect.name, context : {failure: \"Gain de 1 état Sonné\"}})\nawait test.roll();\nif (test.failed)\n{\n args.actor.addCondition(\"stunned\")\n}\n","1ZrzpfVwPJHdwp23":"this.actor.status.addArmour(1, {source: this.effect, magical : true})","1exiWlVUHsXDLLAH":"this.script.notification(`Impossible d'entrer dans ${this.effect.name} !`);","1fQr1Dg7DX0vfz3r":"let healed = parseInt(this.effect.sourceTest.result.SL)\nthis.actor.modifyWounds(healed)\nthis.script.message(`Soin de ${healed} Blessures`)","1jQq9v8fXK8zuEBU":"let damage = this.effect.sourceActor.hasCondition(\"fatigued\") ? 6 : 10;\n\nlet loc = \"body\"\n\nlet APatLoc = this.actor.system.status.armour[loc];\n\nlet metalAP = APatLoc.layers.reduce((metal, layer) => metal += ((layer.metal && !layer.magical) ? layer.value : 0), 0)\n\nlet APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at location;\n\ndamage -= (APused + this.actor.system.characteristics.t.bonus)\n\nlet msg = await this.actor.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\nmsg += ` (Ignore ${metalAP} PA de métal sur ${game.wfrp4e.config.locations[loc]})`\nthis.script.message(msg)\n\nlet Test = await this.actor.setupSkill(\"Résistance\", {fields : {difficulty : \"difficult\"}, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nif (test.failed)\n\tthis.actor.addCondition(\"stunned\");","1kB2su7hLRYDhZ2H":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name})\nawait test.roll();\nif (!test.succeeded)\n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.ZhMADOqoo0y8Q9bx\")\n let data = item.toObject();\n if (this.item.system.location.key == \"rLeg\")\n {\n data.system.location.value = \"Orteil Droit\"\n\t data.system.location.key = \"rToe\";\n }\n else if (this.item.system.location.key == \"lLeg\")\n {\n data.system.location.value = \"Orteil Gauche\"\n\tdata.system.location.key = \"lToe\";\n }\n this.actor.createEmbeddedDocuments(\"Item\", [data])\n}\nthis.effect.delete();","1l7Jz2ZHbAWko7Vm":"args.context.ballockKnife = true;","1mNkLj9JYNr3ofC6":"this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => {\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"stunned\", 3)\n }\n})","1wEjrgff7ASxKVmy":"if (args.effect.conditionId == \"bleeding\")\n args.data.damage -= 1","1wKVvxRTHOyV4Qdv":"return !args.skill?.name?.includes(game.i18n.localize(\"NAME.Sail\"))","1wrPvP6lJwIAfmsl":"let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations), 1, \"Choisir la localisation\");\n\nlet location = choice[0].id;\n\nlet itemTargeted = this.actor.items.get(this.effect.getFlag(\"wfrp4e\", \"itemTargets\")[0])\n\nif (itemTargeted)\n{\n itemTargeted.update({[`system.APdamage.${location}`] : itemTargeted.system.APdamage[location] + 1})\n}","1yOvw74jzFfaI87b":"return args.context.reload\n","20fvE9nJmcfGYVzw":"if ( args.totalWoundLoss > 0 ) {\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {difficulty: \"average\"})\n await test.roll();\n if (!test.succeeded)\n { \n this.actor.addSystemEffect(\"gangrene\");\n }\n}","22PMOW0G5MWiBQmg":"let fear = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nfear = fear.toObject();\nfear.system.specification.value = 1;\nawait this.actor.createEmbeddedDocuments(\"Item\", [fear], {fromEffect : this.effect.id})","22bW97lkvCqisfHX":"return args.type != \"channelling\" && !args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\"))","23HgjCB1oecxANvA":"if (args.item.range && args.item.range.bands)\n{\nargs.item.range.bands[game.i18n.localize(\"Long Range\")].modifier = 0\nargs.item.range.bands[game.i18n.localize(\"Extreme\")].modifier /= 2\n}","23PDHNZEnihcEvdK":"if (args.test.result.castOutcome == \"success\" && args.test.spell.system.lore.value.includes(\"high\"))\n{\n this.effect.update({name: this.effect.setSpecifier(parseInt(this.effect.specifier - 1))})\n\n this.script.message(\"La valeur de Protection est maintenant de \" + (this.effect.specifier - 1), {flavor: this.effect.sourceItem.name})\n}","23vWiHUjxtRQ3Efz":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.eWPN3CV2Eddwz8aM\")\nlet data = item.toObject();\ndata.system.location.value = \"Back\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","24Zp9hEvULQsR3lN":"if (!this.item.system.properties.qualities.pummel) this.item.system.qualities.value.push({name : 'pummel'});if (!this.item.system.properties.qualities.hack) this.item.system.qualities.value.push({name : 'hack'})","29wHhLMnuoVjfQtN":"const sl = this.effect.getFlag(\"wfrp4e-archives3\", \"sl\");\nargs.item.system.damage.value += `+${sl}`;","2AOo7KUyzMrgIlgM":"CorruptionMessageModel.createCorruptionMessage(this.item.system.specification.value, {speaker : {alias: this.actor.prototypeToken.name}})","2AdSBXw7IwCiqawQ":"return args.skill?.name == game.i18n.localize(\"NAME.Bribery\") || args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"));","2C6UtWujISe4jqgS":"return game.messages.get(args.context.dispel)?.system.test.spell.system.magicMissile.value;","2Cw5j0iGAnFNegWr":"return args.item?.system.attackType\n","2EAYX5G9Fh3HJwiP":"let broken = this.actor.hasCondition(\"broken\");\n\nif (broken) {\n broken.delete();\n this.script.notification(\"Etat Brisé supprimé.\");\n}","2Ej6LUqn8frTRURo":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {difficulty: \"hard\"})\nawait test.roll();\nif (!test.succeeded)\n{\n await this.actor.addCondition(\"unconscious\");\n}","2GYAd4OC888oQFBp":"return ![\"fel\"].includes(args.characteristic)","2IPTF0akWw9y48br":"return !this.item.equipped.value \n || !args?.weapon\n || !([\"goblin\"].includes(args.target.Species.toLowerCase()))","2NLINicPQWbuvp2n":"return args.item?.name != game.i18n.localize(\"NAME.Navigation\")","2OqLHRqEBEjBm2LW":"args.fields.slBonus += this.actor.system.characteristics.wp.bonus","2QB0LjueuJcIaHaC":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = this.item.specifier;\n if (!value)\n {\n value = await ValueDialog.create({text : \"Entrez la valeur d'Armure\", title : this.effect.name});\n }\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value, name : this.item.baseName});\n }\n}","2Qi1hwLYhdE6v6Hs":"if (![\"rLeg\", \"lLeg\"].includes(this.effect.getFlag(\"wfrp4e\", \"location\")))\n\treturn true;\n\nif (args.context.dodge)\n{\n\targs.abort = true;\n\tthis.script.scriptNotification(\"Impossible d'Esquiver!\")\n}\nreturn [\"t\", \"int\", \"wp\", \"fel\"].includes(args.characteristic)","2S6XlGCdRlXuaaVw":"this.actor.system.status.corruption.value += 1","2VNnVrtktdGUqXEV":"if (args.totalWoundLoss > 0)\n{\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed && parseInt(args.sourceTest?.result.SL) > 0)\n {\n args.actor.addCondition(\"stunned\", parseInt(args.sourceTest?.attackerTest.result.SL))\n }\n} ","2W9uMTT6iJhfQ044":"let skill = `${game.i18n.localize(\"NAME.Trade\")} (${this.item.parenthesesText})`\nlet currentCareer = this.actor.system.currentCareer;\nlet existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill);\n\nif (!currentCareer) return\n\n\nlet inCurrentCareer = currentCareer.system.skills.concat(currentCareer.system.addedSkills).includes(skill);\nlet craftsmanAdded = this.actor.getFlag(\"wfrp4e\", \"craftsmanAdded\") || {};\nif (existingSkill && inCurrentCareer && !craftsmanAdded[existingSkill.name])\n{\n\texistingSkill.system.advances.costModifier = -5;\n}\nelse \n{\n\tcraftsmanAdded[skill] = true;\n\tcurrentCareer.system.addedSkills.push(skill);\n\tfoundry.utils.setProperty(this.actor, \"flags.wfrp4e.craftsmanAdded\", craftsmanAdded)\n}","2WBq5gW780C6zfCp":"if (args.weapon && this.item.system.usesLocation(args.weapon))\n{\n args.bleedingHand = true;\n let success = await this.effect.manualScripts[0].execute({actor: this.actor})\n if (!success)\n {\n args.abort = true;\n }\n}","2WSN306tL4apjRtD":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS\")\nlet data = item.toObject();\ndata.name = data.name += ` (${game.i18n.localize(\"SPEC.Hearing\")})`\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","2XXqxAF5s5Sws6qj":"this.actor.system.status.corruption.value += 2","2XaJNYUMQAmSOsqi":"const {targetUuid} = this.effect.flags.wfrp4e;\n\nif (args.attacker.uuid !== targetUuid) return;\n\nlet recordedWounds = this.effect.getFlag(\"wfrp4e\", \"damageToReturn\") ?? 0;\n\nrecordedWounds += args.totalWoundLoss;\n\nthis.effect.setFlag(\"wfrp4e\", \"damageToReturn\", recordedWounds);","2Yh4vQm0ZJukRH1x":"return !args.skill?.name.includes(\"Focalisation\");","2cKarG9ToyW2ptCd":"if (this.item.system.quantity.value)\n{\n\tthis.item.update({\"system.quantity.value\" : this.item.system.quantity.value - 0.25})\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","2hzDv8ROulOe1elK":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Lore\"));","2kRwCc31fuZgrsy8":"CorruptionMessageModel.createCorruptionMessage(\"major\", this.script.getChatData());","2mFNelLOAQ6iJsZl":"if (args.test.isFumble)\n{\n args.test.result.other.push(\"@Table[doomrocket-fumble]\")\n}","2miWWeRrEpq1beG4":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.qn4ZpvTQIX4rcJDl\");\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n","2p9IK6Y5Z4NQD6FY":"args.fields.difficulty = \"hard\"","2rzxQlL7A9ujZ9uK":"if (args.opposedTest.result.winner == \"attacker\") {\n if (args.opposedTest.defenderTest.weapon && args.opposedTest.defenderTest.item.properties.qualities.shield) {\n ui.notifications.notify(`${this.effect.name}: Gain de ${this.item.Advances} Avantage(s)`)\n this.actor.setAdvantage(this.item.Advances)\n }\n}","2sDH6RvoOAR40oqH":"\n\nif (![\"Goblin\", \"Orc\"].includes(this.actor.system.details.species.value)) {\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), { appendTitle: ` - ${this.effect.name}` })\n await test.roll();\n if (test.failed) {\n let infection = await fromUuid(\"Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg\")\n this.actor.createEmbeddedDocuments(\"Item\", [infection])\n }\n}\n\n// Since wounds change when the effect is deleted, need to wait until after \n// the max wounds have been recalculated to apply damage\nwarhammer.utility.sleep(1000).then(async () => {\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n\n roll.toMessage(this.script.getChatData());\n this.script.message(await this.actor.applyBasicDamage(roll.total, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true }))\n\n})","2sN4VHAs4bo4pOjD":"let damage = await new Roll(\"1d10 + 1\").roll();\ndamage.toMessage(this.script.getChatData());\nthis.actor.applyDamage(damage.total, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP,\n createMessage: this.script.getChatData()\n});","2uyajbon5QX1CewS":"return args.skill?.name == \"Voile (Aéronavale)\"","2vTVR0quRZQtjNfQ":"let currentCareer = this.actor.system.currentCareer;\nif (!currentCareer)\n{\n return;\n}\n\nlet talents = [game.i18n.localize(\"NAME.AA\"),\n`${game.i18n.localize(\"NAME.ArcaneMagic\")} (${game.i18n.localize(\"SPEC.Any\")})`,\ngame.i18n.localize(\"NAME.ChaosMagic\") + \" \" + \"(Tzeentch)\",\ngame.i18n.localize(\"NAME.FastHands\"),\ngame.i18n.localize(\"NAME.ID\"),\ngame.i18n.localize(\"NAME.MagicalSense\"),\ngame.i18n.localize(\"NAME.PettyMagic\"),\ngame.i18n.localize(\"NAME.SecondSight\"),\ngame.i18n.localize(\"NAME.WarWizard\"),\ngame.i18n.localize(\"NAME.Witch\")].filter(t => !currentCareer.system.talents.includes(t))\n\ncurrentCareer.system.talents = currentCareer.system.talents.concat(talents)","2wk0yrRPlPsdqr3L":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.9GNpAqgsKzxZKJpp\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","2yW0kuwLfgRzJR2S":"const duration = 3600 * (1 + Number(this.effect.sourceTest.result.SL));\nthis.effect.update({\"duration.seconds\": duration});","2yctEihGmdCfTTVx":"args.data.reversal = {allowed : true, if: \"success\"};\nargs.context.fieldDressing = true;","2z6DazIpsfiRZHdl":"const qualities = foundry.utils.deepClone(args.item.system.qualities.value);\nqualities.push({name:\"lightweight\"});\nargs.item?.update({\"system.qualities.value\": qualities});","2zeP2nMSURjxrqYz":"let wounds = this.actor.system.status.wounds\nif (wounds.value == 0)\n return this.script.notification(\"Aucun effet à 0 Blessures\", \"error\")\n\nthis.script.notification(`Soin de ${this.actor.characteristics.t.bonus} Blessures`)\nawait this.actor.modifyWounds(this.actor.characteristics.t.bonus)","2zpYzKVDNE5y9RLL":"return !args.actor?.has(game.i18n.localize(\"NAME.Swarm\")) ||\n ![game.wfrp4e.config.actorSizeNums.tiny, game.wfrp4e.config.actorSizeNums.ltl]\n .includes(args.actor?.sizeNum)","32EPIAz7Qm71ut3m":"if (Number(this.actor.system.details.age.value) > 870) {\n if ([\"t\", \"wp\", \"fel\"].includes(args.characteristic))\n args.fields.slBonus -= 3;\n if ([\"ag\", \"dex\", \"int\"].includes(args.characteristic))\n args.fields.slBonus -= 2;\n} else if (Number(this.actor.system.details.age.value) > 350) {\n if ([\"t\", \"wp\"].includes(args.characteristic))\n args.fields.slBonus -= 2;\n if ([\"fel\"].includes(args.characteristic))\n args.fields.slBonus -= 1;\n} else {\n if ([\"t\", \"wp\"].includes(args.characteristic))\n args.fields.slBonus -= 1;\n}","33PWizq5F7pkKnQT":"if (args.item.type == \"spell\")\n{\n args.item.cn.value = Math.floor(args.item.cn.value / 2)\n}","33US8YRgaMqYu2We":"return !args.context.handling","37UN17gb8suFeZIW":"this.script.message(await this.actor.applyBasicDamage(8, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))","39mmD9wOsHWas3cl":"if (args.type == \"effect\" && args.options.action == \"delete\" && [\"prone\"].some(i => args.document.statuses.has(i)))\n{\n this.script.notification(\"Impossible de retirer \" + args.document.name);\n let resist = await this.effect.resistEffect();\n if (resist)\n {\n this.effect.delete();\n }\n return resist;\n}","3AbonnSVfoSlGye8":"this.effect.updateSource({name: this.effect.setSpecifier(\"9\")});","3CdYFcInQVCIBUiE":"args.actor.system.details.move.value += 2;\nargs.actor.system.status.carries.max = Math.floor(args.actor.system.status.carries.max * 0.5);\nargs.actor.system.details.price.gc *= 1.1;","3CeKfDcMEVgQlcXm":"await this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN\", this.effect, {name: \"Haine (Tous les ennemis)\"});","3Cn2TlRahlm5LkSj":"args.fields.successBonus += 1;","3D5ImpMgpOTPucvv":"if (args.test.options.cardsharp && args.test.succeeded)\n{\n\nlet SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\nlet ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.test.result.other.push(`${this.effect.name}: ${ones + args.test.successBonus + args.test.slBonus} DR`)\n}","3IGO7xEjRjat937X":"let fatigue = this.actor.hasCondition(\"fatigued\")\nif (fatigue)\n{\n this.script.notification(\"Etat Extenué - Suppression de la condition Extenué, effet désactivé\")\n this.effect.update({disabled : true})\n await this.actor.removeCondition(\"fatigued\")\n}","3JEzEzF1SeYA9lsV":"let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations, this.effect.img), 1, \"Choose Location\");\nif (choice[0])\n{\n this.effect.updateSource({name : `${this.effect.name} (${choice[0].name})`})\nthis.effect.updateSource({\"flags.wfrp4e.location\" : choice[0].id})\n}\n\nlet location = choice[0].id;\n\nif ([\"lArm\", \"rArm\"].includes(location))\n{\n let dropped = this.actor.itemTypes.weapon.filter(i => i.isEquipped & i.system.usesHands.includes(location));\n\n if (dropped.length)\n {\n this.script.notification(`Dropped ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}\n\nif (location == \"body\")\n{\n await this.actor.addCondition(\"fatigued\");\n test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"hard\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"prone\");\n }\n}\n\nif (location == \"head\")\n{\n await this.actor.addCondition(\"stunned\");\n test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"average\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"unconscious\");\n }\n}","3KH6OE7L7uJESI2Z":"if ([\"dragon\"].includes(args.opposedTest.defender.details.species.value.toLowerCase()))\n {\n args.applyTB = false;\n args.opposedTest.result.other.push(\"Wyrmslayer: Ignore le BE contre les Dragons\")\n }","3LLiSgj6KGtgqcmo":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Language\"));","3R6Y4NpNTqPc83wh":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.IPKRMGry6WotuS1G\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","3SuLF6SImYWEHMo2":"args.context.doombolt = true;","3TesBGh8HnlGuafu":"let modifier = this.effect.sourceTest?.result.overcast.usage.other.current || 0\n\nlet test = await this.actor.setupCharacteristic(\"dex\", {fields: {modifier}, skipTargets: true, appendTitle : \" - \" + this.script.label});\n\ntest.roll();","3Vbe6gdW8N0bIvXJ":"if (args.item.type == \"weapon\" || args.item.type == \"trait\")\n{\n args.item.qualities.value.push({name : \"penetrating\"})\n args.item.qualities.value.push({name : \"impale\"})\n}","3VhUyqNY18PzeMKG":"args.abort = true;\nthis.script.notification(\"Impossible d'attaquer cette cible !\");","3aEzK0DehSHtVykd":"this.effect.manualScripts[0].execute({actor : this.actor});","3eSaX0BeaUalNkEP":"return args.context.mutate","3fdCQ3h3iVuhdDs9":"args.fields.slBonus += this.actor.characteristics.ag.bonus;","3hfMQkUKYI4rCuBy":"return args.skill?.name != game.i18n.localize(\"NAME.CharmAnimal\") && !args.skill?.name.includes(game.i18n.localize(\"NAME.AnimalTraining\"));","3ixqbsEMfSSTzAXU":"const test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {\n difficulty: \"challenging\",\n context: {\n failure: \"Subi l'état @Condition[Fatigued] à cause de cauchemars.\",\n success: \"A souffert de cauchemars, mais a assez bien dormi.\"\n }\n});\nawait test.roll();\n\nif (test.failed) {\n await this.actor.addCondition(\"fatigued\");\n}","3j8yybMaAZSwzxIE":"let weaponData = await this.effect.setFlag(\"wfrp4e\", \"weaponData\", this.item.system.toObject());\n\ntry {\n\n\n await this.item.update({\n system: {\n \"weaponGroup.value\": \"throwing\",\n \"qualities.value\": this.item.system.qualities.value.concat([{ name: \"accurate\" }]),\n \"range.value\": \"SB * 3\",\n \"consumesAmmo.value\" : false\n }\n })\n\n let test = await this.actor.setupWeapon(this.item, {}, {resolveClose : true});\n await test?.roll();\n this.item.update({ system: this.effect.getFlag(\"wfrp4e\", \"weaponData\") })\n}\ncatch (e) {\n this.item.update({ system: this.effect.getFlag(\"wfrp4e\", \"weaponData\") })\n}","3jm0NoYpgB6ZuUSl":"args.context.useOnesAttractive = true;","3l7MQSa10Kve2K3P":"this.script.message(await this.actor.applyBasicDamage(Math.ceil(CONFIG.Dice.randomUniform() * 10) + 6, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}))\nthis.actor.addCondition(\"ablaze\");","3nTSOcCmNZpQWK8b":"this.actor.addCondition(\"blinded\", 3);","3na3lnAt3bfysvcD":"const blinded = this.actor.hasCondition(\"blinded\");\nif (!blinded)\n this.actor.addCondition(\"blinded\");","3plV9WFqs2prfAdp":"return ![\"NAME.Evaluate\", \"NAME.Gamble\"].map(i => game.i18n.localize(i)).includes(args.skill?.name)","3sfD1nedXLzuYoXJ":"if (this.actor.hasCondition(\"surprised\"))\n{\n this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"average\"}, skipTargets: true, appendTitle : \" - \" + this.effect.name}).then(test => test.roll())\n}\n","3tE8gFSl28EhCmo5":"await args.actor.addCondition(\"ablaze\")\nawait args.actor.addCondition(\"prone\")","3uIkDVzxNjzm5qIH":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Pray\"), {appendTitle: ` - ${this.effect.name}`});\nawait test.roll();\n\nif (test.succeeded)\n{\n this.actor.removeCondition(\"blinded\", 1 + parseInt(test.result.SL));\n}","3z3m1pmw03DbQzcb":"return this.effect.name !== game.i18n.localize(\"WFRP4E.YenluiLight\")","42UATqzohYML6a9t":"if ( !this.actor.hasCondition(\"poisoned\") ) {\n\tthis.effect.delete();\n}","43W725G6C7QZ8rr6":"args.options.terror","454x3Q95pLvZm0Kx":"return args.skill?.name == game.i18n.localize(\"NAME.ConsumeAlcohol\");","49smPAj5J0INSFPI":"return args.item?.system.isRanged;","4AO7Fowek5sSmE4g":"const venomUUID = \"Compendium.wfrp4e-core.items.gFkRm9wS65qe18Xv\";\nconst venom = this.actor.itemTags.trait.find(t => t.name === \"Venin\");\n\nif (venom) {\n await this.effect.setFlag(\"wfrp4e-tribes\", \"venom\", {\n _id: venom.id,\n \"system.specification.value\": venom.system.specification.value\n });\n await venom.update({\"system.specification.value\": \"Difficult\"});\n} else {\n await this.actor.addEffectItems(venomUUID, this.effect, {\n \"system.specification.value\": \"Challenging\"\n });\n}","4FGKZk2f0xrmIDnp":"return args.skill?.name != game.i18n.localize(\"NAME.Research\") && !args.skill?.name?.includes(game.i18n.localize(\"NAME.Language\"));","4HN98hMdQJxM35pA":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.gz2xy41OSVZ8YBgI\");\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data])\n","4JVIy5xtVwvadoqv":"this.actor.details.move.run *= 2","4KYraZSHAEYmL6xx":"if (this.item.equipped.value && args.totalWoundLoss > 10) {\n args.totalWoundLoss = Math.min(10, args.totalWoundLoss)\n args.extraMessages.push(`${this.effect.name}: Perte de Blessures limitée à 10`)\n}","4MQ7u4INxp51oyyR":"let characteristics = {\n \"ws\" : 25,\n \"bs\" : 10,\n \"s\" : 15,\n \"t\" : 15,\n \"i\" : 25,\n \"ag\" : 20,\n \"dex\" : 0,\n \"int\" : 10,\n \"wp\" : 25,\n \"fel\" : 10\n}\nlet skills = [\"Calme\", \"Esquive\", \"Intimidation\", \"Intuition\", \"Commandement\", \"Savoir (Guerre)\", \"Perception\"]\nlet skillAdvancements = [15, 15, 15, 15, 15, 10, 10]\nlet talents = [\"Vigilance\", \"Combat Instinctif\", \"Feinte\", \"Inspiring\", \"Déterminé\", \"Seigneur de guerre\"]\nlet trappings = [\"Arme simple\", \"Bouclier\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","4OlwxU60UqKg81yb":"const target = args.actor;\n\nif (target.has(\"Éthéré\") || target.has(\"Corruption\")) {\n args.totalWoundLoss += 6;\n args.modifiers.other.push({label: this.effect.name, value: 6})\n}","4Q3Mp04O2sMgKv9x":"return !args.title.includes(\"Spellbreaking\")","4QoxhoekgVeZcQA7":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.M5QSWOYt2Rbv2yxW\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","4WQ25VsJSUZ2DeRB":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.EO05HX7jql0g605A\", this.effect, {\"system.specification.value\": this.actor.system.characteristics.ag.value});","4XrAeL2DitxE8OaK":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.0hn6UaKq8CoZP2zD\")\nlet data = item.toObject(); \nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});","4ZR7p8G3OzOBWx0L":"return args.skill?.name !== game.i18n.localize(\"NAME.Endurance\");","4cOZzUvu1nytcqNn":"args.initiative = \"-10\"","4cumLUlcuJ7m8C6t":"let item = args.actor.items.find(i => i.name.includes(\"Smoothing\"));\nlet smoothing = item?.effects.find(e => e.name === \"Smoothing\");\nif (smoothing)\n smoothing.disabled = true;","4drWKXjMgasxY7Jy":"args.actor.system.details.price.gc += Math.floor(args.actor.system.details.price.gc * 0.1);","4fnTKgl0HW9ZrWyJ":"this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty : \"average\"}}).then(async test =>\n{\n await test.roll()\n if (test.failed)\n {\n let char = Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? \"s\" : \"t\";\n this.script.message(`${this.actor.name} perd 1 point de ${game.wfrp4e.config.characteristics[char]}`)\n this.actor.update({[`system.characteristics.${char}.initial`] : this.actor.system.characteristics[char].initial - 1})\n }\n})","4gkz3LR7CK1b8ulK":"return args.item?.system.attackType != \"ranged\" || this.actor.uuid != this.effect.sourceActor.uuid","4iu3CmOI19soOYuA":"let characteristics = {\n \"ws\" : -10,\n \"bs\" : -10,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : -10,\n \"ag\" : -10,\n \"dex\" : 0,\n \"int\" : -200,\n \"wp\" : -200,\n \"fel\" : -200\n}\nlet traits = [ {name:\"Armure\", value: 2}, {name:\"Fabriqué\"}, {name:\"Vision dans l'obscurité\"}, {name:\"Peur\", value: 2}, {name:\"Insensible à la douleur\"},{name:\"Mort-vivant\"},{name:\"Instable\"} ];\nlet items = [];\n\nlet updateObj = this.actor.toObject();\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nupdateObj.system.characteristics.int.initial = 0;\nupdateObj.system.characteristics.wp.initial = 0;\nupdateObj.system.characteristics.fel.initial = 0;\n\nfor (let trait of traits)\n{\n let traitItem = await game.wfrp4e.utility.find(trait.name, \"trait\")\n if (traitItem)\n {\n let t = traitItem.toObject();\n t.system.specification.value = trait.value;\n if (trait.disabled)\n {\n t.system.disabled = true;\n }\n items.push(t);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trait.name}`, {permanent : true})\n }\n}\n\n\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","4iuTz0uInAfMaoGl":"return args.skill?.name?.includes(game.i18n.localize(\"NAME.Language\")) || args.type == \"cast\"","4jLe2XZQVUB8LztP":"args.fields.slBonus += this.effect.getFlag(\"wfrp4e\", \"slBonus\") || 0;","4otpLq2TnDdgzpvc":"args.actor.system.details.man -= 3;","4pQW4WLyhjbZR85k":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"average\"}, context : {failure: \"1 Corruption Point Gained\"}})\nawait test.roll();\nif (test.failed && this.actor.type == \"character\")\n{\n this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + 1})\n this.script.message(\"Gain de 1 point de Corruption\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","4rTmV3TNxctUe0ly":"let test = await this.actor.setupCharacteristic(\"ag\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"bleeding\");\n}\n","4rb7LfMq9CTnlrpn":"if (args.totalWoundLoss > 0)\n{\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name})\n await test.roll();\n if (test.failed)\n {\n args.totalWoundLoss += 5;\n args.modifiers.other.push({label : this.effect.name, value : 5})\n }\n}","4rhxLzau7jZ4SDxg":"await args.actor.addCondition(\"grappling\")\nawait args.actor.addCondition(\"entangled\")","4uAUUZmLgxBKSmXA":"if (args.totalWoundLoss > 0) \n this.effect.delete();","4xqtTqMyOcrwVh63":"let roll = await new Roll(\"2d10 + @sin\", {sin: this.actor.system.status.sin.value || 0}).roll();\nroll.toMessage(this.script.getChatData());\nthis.effect.updateSource({duration: {\n value: roll.total,\n units: \"days\"\n}});","4ylzjgUdHY5D0yVh":"let characteristics = {\n \"ws\" : 25,\n \"bs\" : 10,\n \"s\" : 15,\n \"t\" : 15,\n \"i\" : 25,\n \"ag\" : 20,\n \"dex\" : 0,\n \"int\" : 10,\n \"wp\" : 25,\n \"fel\" : 10\n}\nlet skills = [\"Calme\", \"Esquive\", \"Intimidation\", \"Intuition\", \"Langue (Bataille)\", \"Commandement\", \"Savoir (Guerre)\", \"Perception\"]\nlet skillAdvancements = [15, 15, 15, 15, 10, 15, 10, 10]\n\nlet talents = [\"Vigilance\", \"Maîtrise du combat\", \"Combat Instinctif\", \"Inspiring\", \"Déterminé\", \"Seigneur de guerre\"]\nlet trappings = [\"Arme simple\", \"Bouclier\", \"Plastron d'acier\", \"Brassards\", \"Heaume\", \"Jambières d'acier\"]\nlet specialItems = []\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nlet filters = [\n {\n property : \"type\",\n value : \"weapon\"\n },\n {\n property : \"system.weaponGroup.value\",\n value : [\"twohanded\", \"polearm\"]\n }\n]\n\nitems = items.concat(await ItemDialog.createFromFilters(filters, 1, {text : \"Choisissez une arme d'hast ou une arme à deux mains appropriée\"}))\n\nlet ride = await foundry.applications.api.DialogV2.confirm({title : \"Compétence\", content : \"Ajouter Chaos Steed et +20 en Monte (Cheval) ?\", window : {title : this.effect.name}})\n\nif (ride)\n{\n let skill = await game.wfrp4e.utility.findSkill(\"Monte (Cheval)\")\n skill = skill.toObject();\n skill.system.advances.value = 20;\n items = items.concat({name : \"Chaos Steed\", type: \"trapping\", \"system.trappingType.value\" : \"misc\"}, skill)\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","52kbfuWrOh6dsTtd":"if (!this.actor.hasCondition(\"blinded\"))\n\tthis.actor.addCondition(\"blinded\", 1, {\"flags.wfrp4e.flockOfDoom\" : true})","52mwb33mGrQjq89B":"return args.skill?.name != game.i18n.localize(\"NAME.Research\");","53HFDNuMnX1Aw1a4":"return [\"ws\", \"bs\", \"s\", \"ag\", \"dex\", \"int\", \"wp\", \"fel\"].includes(args.characteristic)","55eYGvSXetDMK80S":"const diseaseIds = this.actor.items.filter(i => i.type == \"disease\").map(i => i.id)\nthis.actor.deleteEmbeddedDocuments(\"Item\", diseaseIds)","58rFc9HiBoX66J6p":"let sourceActor = this.effect.sourceActor;\nlet damage = args.totalWoundLoss;\nlet tb = sourceActor.system.characteristics.t.bonus\nargs.abort = `${this.effect.name}: Dégâts appliqués à ${sourceActor.name}`;\n\nlet message = await sourceActor.applyBasicDamage(damage - tb, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})\n\nthis.script.message(message.replace(`${tb} TB`, `${tb} × 2 TB`))\nargs.abort = true;","5DI6cHAg1LHo54Yv":"if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == \"attacker\")\n{\n this.actor.update({\"system.status.fortune.value\" : Math.max(0, (this.actor.system.status.fortune?.value - 1) || 0)})\n this.script.message(`1 Point de Chance volé à ${this.actor.name}`, {blind : true, whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n\n}","5Fe1ELaS6Gnvy0Cj":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) || args.type == \"channelling\" || args.skill?.name == game.i18n.localize(\"NAME.Charm\") || args.skill?.name.includes(`${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`) || args.type == \"cast\"","5GHQxfxlmjyt1fNq":"let item1 = await fromUuid(\"Compendium.wfrp4e-core.items.Item.EO05HX7jql0g605A\")\nlet item2 = await fromUuid(\"Compendium.wfrp4e-core.items.Item.Bvd2aZ0gQUXHfCTh\")\nlet ids = await this.actor.createEmbeddedDocuments(\"Item\", [item1, item2], {fromEffect : this.effect.id})\nthis.actor.updateEmbeddedDocuments('Item', [ {_id: ids[0].id, 'system.specification.value': 16} ] )","5GP9UJMvBZv6kWtI":"this.script.message(await this.actor.applyBasicDamage(8, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))\n\n\nlet msg = ``\nlet weapons = args.actor.itemTypes.weapon.filter(i => !i.system.location.value);\nlet armour = args.actor.itemTags.armour.filter(i => !i.system.location.value);\nfor(let item of weapons)\n{\n\tif (item.system.properties.qualities.shield)\n\t{\n\t\tawait item.system.damageItem(1, \"shield\");\n\t}\n\telse\n\t{\n\t\tawait item.system.damageItem(1);\n\t}\n\tmsg += `

${item.name} endommagé de 1

`\n}\nfor(let item of armour)\n{\n\tawait item.system.damageItem(1);\n\tmsg += `

${item.name} endommagé de 1

`\n}\nif (msg)\n{\n\tthis.script.message(msg, {speaker : {alias : args.actor.name}});\n}","5IoYTyedCMYwt3ys":"args.fields.slBonus += 2;","5JWC0l3JEpOsqbR9":"let characteristics = {\n \"ws\" : 0,\n \"bs\" : 5,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : 10,\n \"ag\" : 10,\n \"dex\" : 0,\n \"int\" : 0,\n \"wp\" : 5,\n \"fel\" : 0\n}\nlet skills = [\"Esquive\", \"Perception\"]\nlet skillAdvancements = [10, 10]\nlet talents = [\"Fuite !\", \"Tireur de précision\"]\nlet trappings = [\"Arme simple\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","5JvKJZPcd6Hz5zvn":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 0,\n \"s\" : 10,\n \"t\" : 10,\n \"i\" : 20,\n \"ag\" : 10,\n \"dex\" : 0,\n \"int\" : 0,\n \"wp\" : 15,\n \"fel\" : 0\n}\nlet skills = [\"Calme\", \"Esquive\", \"Intimidation\", \"Commandement\"]\nlet skillAdvancements = [15, 15, 10, 5]\nlet talents = [\"Vigilance\", \"Combat Instinctif\", \"Feinte\", \"Déterminé\"]\nlet trappings = [\"Cotte de Mailles\", \"Chausses de Mailles\", \"Coiffe de Mailles\", \"Arme simple\", \"Bouclier\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = this.effect.name + \" \" + updateObj.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","5KIozV7HxyGvskeD":"args.data.reversal = {allowed : true, if: \"worse\"};","5KVslRqhqzuFLyk4":"if (!this.actor.has(\"Béni (Taal)\", \"talent\")) return;\n\nthis.actor.system.characteristics.wp.modifier += 15;","5LdJCKfQem1AQK24":"\nif (!args.flags.howlingWarpGale)\n{\n args.fields.modifier -= 10;\n args.flags.howlingWarpGale = true; // prevent double application\n}","5M6IgCUncCwyxHok":"let etiquette = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP\")).toObject();\netiquette.name += ` (Suivants de Tzeentch)`;\n\nlet animosity = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f\")).toObject();\nanimosity.system.specification.value = \"Suivants de Nurgle\";\n\nlet roll = await new Roll(\"ceil(1d10 / 3)\").roll({allowInteractive : false});\n\nroll.toMessage(this.script.getChatData());\n\nlet mutations = [];\nlet msg = `

Mutations Acquises

`\nfor(let i = 0; i < roll.total; i++)\n{\n let item;\n let uuid;\n let result;\n if (i % 2 == 0)\n {\n result = await game.wfrp4e.tables.rollTable(\"mutatemental\", {hideDSN: true}, \"Tzeentch\")\n }\n else\n {\n result = await game.wfrp4e.tables.rollTable(\"mutatephys\", {hideDSN: true}, \"Tzeentch\")\n }\n uuid = `Compendium.${result.object.documentCollection}.${result.object.documentId}`;\n item = await fromUuid(uuid);\n if (item)\n {\n msg += `

@UUID[${uuid}]{${item.name}}

`\n mutations.push(item.toObject());\n }\n}\nthis.actor.createEmbeddedDocuments(\"Item\", mutations.concat([etiquette, animosity]), {fromEffect : this.effect.id})\nthis.script.message(msg);","5MxRDXzUBPfp2KKD":"args.context.useOnesSupportive = true;","5NE3teXZInHQXZ1K":"let roll = await new Roll(\"2d10 + @sin\", {sin: this.actor.system.status.sin.value || 0}).roll();\nroll.toMessage(this.script.getChatData());\nthis.effect.updateSource({duration: {\n value: roll.total,\n units: \"rounds\"\n}});","5QR83whGk4ZyuJcA":"await this.effect.update({duration:{rounds: this.actor.system.characteristics.ws.bonus}});","5QjaPBFbv5rIYpla":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"average\"}, appendTitle : \" - Wounded\"})\n await test.roll();\n if (test.failed)\n {\n fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\").then(disease => {\n this.actor.createEmbeddedDocuments(\"Item\", [disease.toObject()])\n this.script.scriptNotification(\"Gain de \" + disease.name)\n })\n }","5ScjIdRUOxblHdWS":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'challenging';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","5X8GbReUxUPWwXMT":"this.actor.modifyWounds(-1);","5XAYjiq1i4M7Ky7j":"const trait = this.actor.itemTags.trait.find(t => t.name === \"Régénération\");\nconst name = \"Régénération Pourrie\";\n\nif (!trait) return;\n\nconst effect = trait.effects.find(e => e.name === \"Régénération\");\nconst scriptData = effect.system.scriptData;\n\nscriptData[0].script = `\n let chatData = {whisper: ChatMessage.getWhisperRecipients(\"GM\")};\n let message = \"\";\n\n let wounds = foundry.utils.duplicate(this.actor.status.wounds);\n let regenRoll = await new Roll(\"1d10\").roll({allowInteractive : false});\n let regen = regenRoll.total;\n\n if (wounds.value >= wounds.max)\n return;\n\n if (wounds.value > 0) {\n wounds.value += Math.floor(regen / 2);\n if (wounds.value > wounds.max) {\n wounds.value = wounds.max;\n }\n message += \\`\\${this.actor.name} regagne \\${regen} Blessures.\\`;\n\n if (regen === 10) {\n message += \"
De plus, il régénère une Blessure Critique.\";\n }\n } else if (regen >= 8) {\n message += \\`\\${this.actor.name} a obtenu un \\${regen} et regagne 1 Blessure.\\`;\n wounds.value += 1;\n if (regen === 10) {\n message += \"
De plus, il régénère une Blessure Critique.\";\n }\n } else {\n message += \\`\\${this.actor.name} Résultat de régénération de \\${regen} - Aucun effet.\\`;\n }\n\n await this.actor.update({\"system.status.wounds\": wounds});\n this.script.message(message, {whisper: ChatMessage.getWhisperRecipients(\"GM\")});\n`\n\nawait effet.update({\n name,\n \"system.scriptData\": scriptData\n});\n\nawait trait.update({ name });","5Zxc13GBaJaxCf48":"const visor = this.item.getFlag('wfrp4e', 'visor');\n\nif (!visor)\n args.fields.modifier -= 10;\nelse\n args.fields.modifier -= 20;","5dR7Erj3nwsxLAV7":"let characteristics = {\n \"ws\" : 35,\n \"bs\" : 10,\n \"s\" : 25,\n \"t\" : 30,\n \"i\" : 30,\n \"ag\" : 25,\n \"dex\" : 0,\n \"int\" : 15,\n \"wp\" : 35,\n \"fel\" : 15\n}\nlet skills = [\"Calme\", \"Esquive\", \"Intimidation\", \"Intuition\", \"Commandement\", \"Savoir (Guerre)\", \"Perception\"]\nlet skillAdvancements = [25, 15, 25, 25, 30, 20, 20]\nlet talents = [\"Vigilance\", \"Combat Instinctif\", \"Feinte\", \"Inspiring\", \"Chanceux\", \"Déterminé\", \"Inébranlable\", \"Seigneur de guerre\"]\nlet trappings = [\"Arme simple\", \"Bouclier\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","5gPAT5Bb2FvQwYNQ":"args.test.preData.reversal = {allowed : true, if: \"better\"};\nthis.effect.delete();","5lc1eHIYQNpSRWip":"if ([\"death\", \"necromancy\"].includes(args.spell?.system.lore.value))\n{\n args.fields.successBonus += 1\n}\nelse if([\"life\", \"light\", \"heavens\"].includes(args.spell?.system.lore.value))\n{\n args.fields.modifier -= 10;\n}","5lpR78CLhYH6Mjnu":"if (this.actor.has(\"Arboricole\",\"trait\")) return\n\nthis.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.rOV2s6PQBBrhpMOv\", this.effect)","5o1XiceC4rutjMms":"return !args.item?.name.includes(game.i18n.localize(\"NAME.Stealth\"))","5rlneScoI5feQ3Di":"const traits = this.actor.itemTypes.trait.filter(t => [\"bestial\", \"skittish\"].includes(s.name.toLowerCase()));\ntrait.system.disabled = true;","5sI9iYh5j2nx2XyT":"return !([game.i18n.localize(\"NAME.AnimalCare\"), game.i18n.localize(\"NAME.CharmAnimal\")].includes(args.item?.name) || args.item?.name.includes(game.i18n.localize(\"NAME.Ride\")) || args.item?.name.includes(game.i18n.localize(\"NAME.AnimalTraining\")));","5sYpJkT2WXIe0gIZ":"const rating = parseInt(this.effect.name.match(/\\d+/)?.[0]) || 1;\n\nlet crewList = foundry.utils.duplicate(this.actor.system.passengers.list);\nlet selectedCrew = [];\n\nwhile (selectedCrew.length < rating && crewList.length) {\n selectedCrew.push(crewList.splice(crewList.length * Math.random() | 0, 1)[0]);\n} \n\nfor (let member of selectedCrew) {\n let actor = game.actors.get(member.id);\n actor.applyBasicDamage(9, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.NORMAL, \n minimumOne: true, \n loc: \"roll\", \n suppressMsg: false, \n hideDSN: false \n });\n}","5uokSqQsjgMapnCi":"if (\n this.item == args.defenderTest.item\n && args.defenderTest.succeeded\n && args.defenderTest.item?.system?.attackType == 'melee'\n && (args.attackerTest.item.properties.qualities?.magical || args.attackerTest.item.properties.unusedQualities?.magical)\n)\n{\n args.opposedTest.result.other.push(`${this.effect.name}: détruit magique ${args.attackerTest.item.name}.`)\n}","5z5nGwZC5RIwokev":"this.script.message(await this.actor.applyBasicDamage(12, {suppressMsg: true, loc: \"roll\"}))","6136BMmiGLwZ16H1":"return !!args.skill","62Ky6bC1EnTllSJA":"if (this.effect.sourceActor.uuid != args.actor.uuid)\n{\n this.script.message(await this.actor.applyBasicDamage(this.effect.sourceTest.result.overcast.usage.other.current, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true}));\n}","63Yh0nrhCLLfzd14":"let damage = await new Roll(\"1d10 + @sin\", {sin: this.actor.system.status.sin.value || 0}).roll();\ndamage.toMessage(this.script.getChatData());\nthis.actor.applyDamage(damage.total, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL,\n createMessage: this.script.getChatData()\n});\n\nconst test = await this.actor.setupSkill(\n game.i18n.localize(\"NAME.Endurance\"),\n {\n fields: {difficulty: \"difficult\"},\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n },\n);\n\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\");\n}","64aJznxPMUHAuf7F":"if (this.item.flags.runeOfLuck || this.actor.type != \"character\") return\n\nconst currentFortune = this.actor.status.fortune.value\nconst runesOfLuck = this.item.effects.contents.filter(e => e.name == this.effect.name)\nconst runeFortune = parseInt(runesOfLuck.length)\n\nif (args.equipped) {\n this.item.flags.runeOfLuck = true\n await this.actor.update({\"system.status.fortune.value\" : runeFortune + currentFortune})\n this.script.message(`Points de Chance augmentés de ${currentFortune} à ${runeFortune + currentFortune}.`)\n}\nelse\n{\n this.item.flags.runeOfLuck = true\n await this.actor.update({\"system.status.fortune.value\" : Math.max(0, currentFortune - runeFortune)})\n this.script.message(`Points de Chance réduits à ${Math.max(0, currentFortune - runeFortune)}.`)\n}","65o8pQj6oGNnXce6":"let ch = this.effect.getFlag(\"wfrp4e\", \"characteristic\")\nthis.actor.system.characteristics[ch].modifier += 10;","65xE9OV5sA1ZWT7j":"if (args.test.options.diceman && args.test.succeeded)\n{\n\nlet SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\nlet ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.test.result.other.push(`${this.effect.name}: ${ones + args.test.successBonus + args.test.slBonus} DR`)\n}","6A6ddQDJo23oOWtK":"const SL = this.effect.getFlag(\"wfrp4e\", \"SL\") ?? 0;\n\nargs.fields.slBonus += SL;","6Aqq4F4Xui923sc6":"// Imbibing this substance grants the user the utilisateur d Creature Trait.\nconst hasColdBlooded = this.actor.has(\"À Sang Froid\")\nif (hasColdBlooded === undefined)\n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.mCh1KK9jomwFZcLB\")\n let data = item.toObject()\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n\n this.script.message(`

${this.actor.prototypeToken.name} a acquis le Trait de Créature À Sang Froid et peut annuler tout test de Volonté raté.

\n

Si ils gagnent une Condition Surpris, cette Condition n'est pas perdue la première fois qu'elle devrait l'être (ce qui est généralement à la fin du Round ou si la victime est attaquée).

`,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true })\n}","6AsCMHZ4IYPq7Uxf":"return args.skill?.name.includes(\"Focalisation\");","6BmvV9c03FkfisnE":"// Apply changes when the mask is worn\n\nif (args.equipped) {\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [this.item.effects.contents[1]?.convertToApplied()])\n this.script.message(`${this.actor.name} porte le ${this.item.name}.
\n Ils gagnent +1 point de Corruption si un Test d'exposition échoue, ce qui devra être appliqué manuellement.
S'ils portent le masque pendant plus d'une heure ou bénéficient de l'un de ses effets, ils sont exposés à @Corruption[modérée]{Corruption Modérée}\n `,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n\n// Notify of lingering effects when mask is Retiré\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Utilisé)\"})\n this.script.message(`${this.item.name} porté par ${this.actor.name} a été retiré et perd ses propriétés. Cependant, les effets durent [[1d10+4]] jours, après quoi ils doivent être retirés manuellement.`,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n )\n\n}","6EXkbVTRBhKTEu81":"if (!args.flags.bothEyes)\n{\n\targs.flags.bothEyes = true;\n\targs.fields.modifier -= 30\n}","6Fe8M5MdklKS2olx":"return args.characteristic != \"fel\"","6H6vNjzvMGl2ZqCR":"if (args.totalWoundLoss > 0)\n this.script.message(`Blade of Nurglitch: ${args.actor.name} doit réussir un Test d'Résistance de Difficulté (-10) ou recevoir une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Blessure Purulente}`, {whisper: ChatMessage.getWhisperRecipients(\"GM\") })","6HfCvw24X6oEe2vn":"if ([\"t\", \"s\"].includes(args.characteristic))\n{\n\targs.fields.modifier += 10;\n}","6JrUjs3g5x6bFnj3":"let bite = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet sense = await fromUuid(\"Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS\")\nlet biteData = bite.toObject();\nlet senseData = sense.toObject();\n\nbiteData.system.specification.value = 6 - this.actor.characteristics.s.bonus;\nsenseData.name = senseData.name += game.i18n.localize(\"SPEC.Smell\")\nthis.actor.createEmbeddedDocuments(\"Item\", [biteData, senseData], {fromEffect : this.effect.id})","6LMzIdmCSYctgmGx":"const stupid = this.actor.items.find(i => i.name === \"Stupidee\");\n\nif (!stupid) return;\n\nawait stupid.update({\"system.disabled\": true});","6MSodMuZ5xk2JJJ9":"if (!this.actor.hasCondition(\"ablaze\"))\n{\n this.effect.delete();\n}","6Mjy0jDqczA8BxhS":"return ![\"roll\", \"none\"].includes(args.fields.hitLocation)","6P2QNPKfwQ1xwxZT":"args.fields.slBonus ++","6QZUX7ZrFxOzqI0b":"let regenerate = this.actor.items.getName('Régénération')\n\nif (regenerate)\n{\n let effect = regenerate.effects.contents[0]\n let scriptData = effect.system.scriptData;\n \n scriptData[0].script = scriptData[0].script.replace(\"1d10\", \"1d10 * 2\")\n}","6U8xox4mBrn5eYIp":"if (args.totalWoundLoss > 0)\n args.actor.addCondition(\"ablaze\")","6V3qHON3mcerlBlB":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\");\n}","6Ws3ieQ7pG5poUyT":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = await ValueDialog.create({text : \"Entrez le Savoir d'Incantation\", title : this.effect.name}, \"\", Object.values(game.wfrp4e.config.magicLores));\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","6XWJWOUQPgKMsFul":"return args.item?.system.attackType != \"ranged\" || args.flags.howlingWarpGale","6ZS1rQLkNvMDO0Fp":"let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)\nif (args.test.isFumble && roll == 1 && !args.test.result.misfire)\n{\n args.test.result.misfire = game.i18n.localize(\"Misfire\") + \" (Rolled 1)\"\n args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage)\n}\nelse if (args.test.isFumble && roll != 1)\n{\n args.test.result.other.push(\"Misfire Roll: \" + roll)\n}\n\n","6a5nBENmfxy93vGY":"const deduct = this.effect.setFlag(\"wfrp4e\", \"failed\");\n\nif (!deduct) return;\n\nthis.actor.system.characteristics.ws.modifier -= 20;\nthis.actor.system.characteristics.bs.modifier -= 20;","6crZPdNEWptukssg":"let roll = await new Roll(\"1d10\").roll();\n\nroll.toMessage(this.script.getChatData());\n\nif (roll.total == 1)\n{\n this.item.updateSource({\"system.description.value\" : this.item.system.description.value += `

${this.effect.name}: The weapon counts as a @Corruption[minor]{minor source of Corruption}.

`});\n}\nelse if (roll.total <= 5)\n{\n let quirks = await fromUuid(\"Compendium.wfrp4e-archives2.tables.RollTable.LbNZOF6Ov7xKHS5Z\");\n if (quirks)\n {\n let quirkRoll = await new Roll(\"1d100 + 40\").roll();\n quirkRoll.toMessage(this.script.getChatData());\n let quirkResult = (await quirks.roll({roll: quirkRoll})).results[0].text;\n this.item.updateSource({\"system.description.value\" : this.item.system.description.value += `

${this.effect.name}: ${quirkResult.replace(\"

\", \"\")}

`});\n }\n else \n {\n this.item.updateSource({\"system.description.value\" : this.item.system.description.value += `

${this.effect.name}: Generate an additional Quirk or Curse by rolling on the @UUID[Compendium.wfrp4e-archives2.tables.RollTable.LbNZOF6Ov7xKHS5Z]{Quirks and Curses} Table and adding +40 to the result.

`});\n }\n}\nelse\n{\n this.item.updateSource({\"system.description.value\" : this.item.system.description.value += `

${this.effect.name}: People who recognise the weapon are subject to @UUID[Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f]{Animosity} towards the bearer.

`});\n}","6elUNF58TaiYjxcx":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : \" - \" + this.effect.name, context : {failure: \"GAin d'1 état Sonné\"}})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\");\n}","6fElmBxTjdAaubbK":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"average\"}});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}\n","6frithfMs7Nbv0IZ":"args.fields.slBonus += this.effect.sourceActor.system.characteristics.fel.bonus;","6gRixT3zIOAberJb":"const disease = await fromUuid(\"Compendium.wfrp4e-soc.items.Item.8Q9JYtR1y3B5J6UH\");\nconst data = disease.toObject();\ndata.system.incubation.value = 0;\ndata.system.duration.active = true;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id});","6hAgggYpNR3r4QWC":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Q2MCUrG2HppMcvN0\")\nitem = item.toObject()\nlet species = args.actor.Species || \" de votre espèce\"\nitem.name = `Animosité (tous sauf ${species})`\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","6jcTzK1XEuWqAacN":"args.abort = true;\nthis.script.notification(`Impossible d'utiliser ${game.wfrp4e.config.locations[this.effect.getFlag(\"wfrp4e\", \"location\")]}!`, \"error\")","6jp8slPU33oBQe1V":"return args.context.crewTest?.system.handling !== true;","6kifXp2jXEaQVJsg":"let useWard = await foundry.applications.api.DialogV2.confirm({\n\tcontent : `

Utiliser la Protection fournie par ${this.effect.name}?`,\n\twindow : {\n\t\ttitle : this.effect.name,\n\t}\n})\n\nif (useWard)\n\targs.ward = 9;","6maNAmREdataXmo4":"if (this.actor.system.status?.ward?.value) {\n this.actor.system.status.ward.value = Math.max(7, this.actor.system.status.ward.value-1);\n} else {\n this.actor.system.status.ward.value = 9;\n}","6mpw9cGseG4W4eyd":"if (this.actor.system.status.advantage.value >= 2)\n{\n await this.actor.modifyAdvantage(-2);\n this.script.notification(\"Avantage retiré\")\n}\nelse\n{\n return this.script.notification(\"Pas assez d'Avantage!\", \"error\")\n}\n\nlet test = await this.actor.setupTrait(this.item)\nawait test.roll();","6nA5LPXneAahHX2W":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tlet sourceActor = this.effect.sourceActor;\n\tthis.script.message(await this.actor.applyBasicDamage(4 + sourceActor.system.characteristics.s.bonus, {suppressMsg : true}))\n}","6oSs8qKFNFz2lSmh":"if (args.actor.system.details.move.sail.value > 0)\n args.actor.system.details.move.sail.value = 0;\n","6qJP0hpShEM43ohx":"const actor = args.actor;\n\nif (actor.itemTypes.skill.find(s => s.name === \"Savoir (Océans)\")) {\n const loreTest = await actor.setupSkill('Savoir (Océans)', {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'hard'},\n characteristic: 'int',\n });\n await loreTest.roll();\n\n if (loreTest.succeeded) {\n loreTest.result.other.push(`${actor.name} reconnaît l'attrait du Léviathan.`);\n loreTest.renderRollCard();\n return;\n }\n}\n\nlet Test = await actor.setupSkill('Calme', {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'easy'},\n characteristic: 'wp',\n});\nawait test.roll();\n\nif (!Test.succeeded) {\n Test.result.other.push(`${actor.name} est devenu @Condition[Stunned] par la vue.`);\n test.renderRollCard();\n actor.addCondition(\"stunned\");\n}","6qUKKep5vhFYmo1J":"return args.type == \"channelling\" || args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\"))","6tjn0RH4VyOPFneS":"return [\"NAME.Row\", \"NAME.Swim\"].map(i => game.i18n.localize(i)).includes(args.skill?.name);","6ubojp9zwbfJnosT":"args.actor.system.details.move.value += 1;","6uldpFvKOCoW92cC":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.uqGxFOEqeurwkAO3\")\nitem = item.toObject()\n\nitem.system.specification.value = 10;\nitem.name += \" (Fire)\"\nfoundry.utils.setProperty(item, \"flags.wfrp4e.breath\", \"fire\")\n\nItem.create(item, {parent : this.actor, fromEffect: this.effect.id})","6xTtJEhRc4OjcDTf":"if (foundry.utils.getProperty(args.data, \"system.status.fortune.value\"))\n{\n\tthis.script.scriptNotification(\"Impossible de mettre à jour la Chance\");\n\tdelete args.data.system.status.wounds.value;\n}","713v1T8HNste94pr":"args.context.grudge = true;","715G1Bf0haOHvmYQ":"return !(args.skill?.name == game.i18n.localize(\"NAME.Bribery\") || args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\")))","71DmrxCTKGYL4Z7X":"return [\"fel\"].includes(args.characteristic)","7BgJe9YkbHTh3ucm":"if (args.totalWoundLoss <= 0) return;\n\nconst test = await this.actor.setupSkill(\n game.i18n.localize(\"NAME.Endurance\"),\n {\n fields: {difficulty: \"difficult\"},\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n },\n);\n\nawait test.roll();\n\nif (test.failed) {\n const item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.kKccDTGzWzSXCBOb\");\n const data = item.toObject();\n\n data.system.duration.active = true;\n\n args.actor.createEmbeddedDocuments(\"Item\", [data]);\n}","7Ck0fkzE4WQ62qVe":"if (args.item.type == \"skill\" && args.item.name == `${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Basic\")})`)\n{\n args.item.system.modifier.value += 20;\n}","7F3miqRA0ceMUBIu":"return args.characteristic != \"int\" || args.skill","7F6aGxZJjwxm5e5P":"if (args.test.result.castOutcome == \"failure\")\n{\n ValueDialog.create({text : \"Entrez les Blessures Perdues pour gagner des DR\", title : this.effect.name}, \"0\").then(async value => {\n value = Math.clamp(value, 0, 3)\n if (value == 0)\n {\n return;\n }\n else if (Number.isNumeric(value))\n {\n this.script.notification(`Lost ${value} Wounds`)\n this.actor.modifyWounds(-1 * value)\n await this.item.system.toggleEquip();\n args.test.addSL(value);\n args.test.preData.other.push(`${this.effect.name}: +${value} SL`)\n }\n })\n}","7H6wYyJ6cpaoc2QQ":"return args.skill?.name == game.i18n.localize(\"NAME.Cool\");","7IuX8wytm33iRGC3":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed && this.actor.type == \"character\")\n{\n this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + 1})\n this.script.message(\"Gagné un point de Corruption\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","7JW9t8AYSDkkzG2V":"// Apply changes when the mask is worn\n\nif (args.equipped)\n{\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [this.item.effects.contents[1]?.convertToApplied()])\n this.script.message(`${this.actor.name} porte le ${this.item.name}.
\n S'ils portent le masque pendant plus d'une heure ou bénéficient de l'un de ses effets, ils sont exposés à @Corruption[moderate]{Corruption Modérée}.\n `,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n\n// Notify of lingering effects when mask is Retiré\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Used)\"})\n this.script.message(`${this.item.name} sur ${this.actor.name} a été retiré et perd ses propriétés. Cependant, les effets durent [[1d10+4]] jours, après quoi ils doivent être retirés manuellement.`,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n )\n\n}","7OmrMjaU48o2FEZi":"\nthis.actor.characteristics.t.bonus = 10\n\nthis.actor.details.move.value = 0;\nthis.actor.details.move.walk= 0;\nthis.actor.details.move.run = 0;","7ScfB4o1QhXnNUfq":"return ![\"int\", \"wp\"].includes(args.characteristic)","7T3iXgrL72fea67C":"const bloodyFluxUUID = \"Compendium.wfrp4e-core.items.Item.herUmN51D9TiL2Vn\";\n\nconst test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"easy\"},\n context: {\n success: `Butcher est soigné.`,\n failure: `Butcher contracte @UUID[${bloodyFluxUUID}].`\n }\n});\n\nawait test.roll();\n\nif (test.failed) {\n await this.actor.addEffectItems(bloodyFluxUUID, this.effect);\n} else {\n const SL = test.result.SL;\n const heal = 1 + SL;\n await this.actor.modifyWounds(heal);\n this.script.message(`Butcher a soigné ${heal} Blessures.`);\n}","7UUS0gX2Pbi0HHiz":"return args.skill?.name !== game.i18n.localize(\"NAME.Swim\");","7VAhXHov6pR1SkgD":"return args.item?.name == game.i18n.localize(\"NAME.Endurance\");","7WR2hJjHPhHhHxAq":"let poisoned = args.actor.hasCondition(\"poisoned\")\nif (poisoned)\n{\n this.script.notification(`SSuppression de ${poisoned.conditionValue} états Empoisonnés`)\n poisoned.delete();\n}\nelse\n this.script.notification(`Aucun état Empoisonné à supprimer.`)","7ZoFUMDG2WJd8RMg":"this.script.message(`Bonus utilisé : ${this.effect.name}`);","7ateEtT5HXg1vObY":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.AcnFuDKRemLI9ey7\", // Nose for Trouble\n \"Compendium.wfrp4e-core.items.Item.WoXShzaYkV5F6c48\", // Master of Disguise\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","7e8FgQUF2oANANmx":"return args.skill?.name == game.i18n.localize(\"NAME.MeleeBrawling\") || args.item?.weaponGroup?.value == \"brawling\"","7f6OsttTzE7Hvzfk":"if (this.actor.statuses.has(\"infighting\") && !args.flags.infighter) \n{\n args.fields.modifier += 10;\n args.flags.infighter = true;\n}\n\nargs.fields.successBonus += 1; ","7n3SEAGRA5ESK8gV":"args.context.disarm = true;","7szLG4VALuuy1cPm":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"easy\"}})\nawait test.roll();\nif (test.failed)\n{ \n await this.actor.addCondition(\"fatigued\")\n} ","7w7QA7GBhzZ98OS0":"const sin = this.effect.sourceActor.system.status.sin.value;\nconst result = await WFRP_Tables.rollTable(\"manann-mood-made-meaningless\", sin);\nlet match = result.description.match(/b>([^<]+)/i);\nlet key = match[1];\nlet roll = new Roll(\"5d10\");\nlet value = undefined;\n\nawait this.script.message(result.description, {flavor: result.title});\n\nswitch (key) {\n case 'Triopmhe de Stromfels!':\n value = 0;\n break;\n case 'Stromfels monte!':\n await roll.evaluate();\n if (this.actor.system.status.mood.value > 0)\n value = -roll.total;\n else if (this.actor.system.status.mood.value < 0)\n value = roll.total;\n break;\n case 'Aucun effet.':\n break;\n case 'Manann est provoqué!':\n await roll.evaluate();\n value = -roll.total;\n break;\n}\n\nif (roll._evaluated)\n await roll.toMessage();\n\nawait this.effect.setFlag(\"wfrp4e-soc\", \"m4result\", {result: key, value});","7wBWUw05q0igh508":"// Imbibing this substance grants the user the Painless Creature Trait.\nconst hasPainless = this.actor.has(\"Insensible à la douleur\");\nif (hasPainless === undefined)\n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr\");\n let data = item.toObject()\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n\n this.script.scriptMessage(\n `

${this.actor.prototypeToken.name} a acquis le Trait de Créature Insensible à la douleur. Cet\n effet dure une heure, après quoi il se dissipe et l'effet complet\n de toutes les blessures du buveur s'abat d'un coup.

\n

Notez que cela n'empêche pas l'utilisateur d'acquérir une Blessure Critique\n ou d'en mourir. Cela leur permet simplement d'ignorer la plupart\n de leurs effets.

`,\n { whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true})\n}","7y89OcMmGbjRMgTg":"return !this.item.equipped.value \n || !args?.skill\n || !([game.i18n.localize(\"NAME.Charm\"), \n game.i18n.localize(\"NAME.Intimidate\"), \n game.i18n.localize(\"NAME.Leadership\")].includes(args.skill.name))","7ykah8fvh2Y0o2Hi":"this.actor.addCondition(\"blinded\");\nlet roll = await new Roll(\"1d10\").roll();\nroll.toMessage(this.script.getChatData());\nthis.effect.updateSource({duration: {value: roll.total, units: \"hours\"}});","84IB8CWa55XzoAkv":"return ([game.i18n.localize(\"NAME.AnimalCare\"), game.i18n.localize(\"NAME.CharmAnimal\")].includes(args.item?.name) || args.item?.name.includes(game.i18n.localize(\"NAME.Ride\")) || args.item?.name.includes(game.i18n.localize(\"NAME.AnimalTraining\")));","86ivOsBQAuu0UmFg":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"hard\"}, appendTitle : ` - ${this.effect.name}`, skipTargets: true});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"poisoned\");\n}","873KaarAnJ2qf1r2":"args.modifiers.other.push({label : this.effect.name, details : \"Augmentation des Dégâts\", value : 1})","87rrZ3ojHrXa3lCn":"this.actor.modifyWounds(1)","8AoA4bnstBtglRGZ":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","8BCzpjFU0GeA17Wp":"args.fields.modifier +=20;","8ByuHnUZ4RNTdGVv":"let strLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10)\nlet tghLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n\nif (!this.actor.has(\"Undead\") && !this.actor.has(\"Daemonic\"))\n{\n this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), { appendTitle: \" - \" + this.effect.name, fields: { difficulty: \"average\" }, context: { failure: `Lost ${strLoss} Strength and ${tghLoss} Toughness` } }).then(async test => {\n await test.roll();\n if (test.failed) {\n this.actor.update({ \"system.characteristics.s.initial\": this.actor.system.characteristics.s.initial - strLoss, \"system.characteristics.t.initial\": this.actor.system.characteristics.t.initial - tghLoss })\n }\n })\n\n}\nelse {\n this.script.notification(`${this.actor.name} est immunisé contre ${this.effect.name}`)\n}\n","8Gan2EeGExBFSxmp":"let damage = this.effect.sourceTest.result.damage;\n\nif (this.actor.sizeNum >= game.wfrp4e.config.actorSizeNums.lrg)\n damage += 7; // goes from +8 to +15;\n\nif (this.actor.has(game.i18n.localize(\"NAME.Unstable\"))) \n damage *= 2;\n\nthis.actor.applyDamage(damage, {\n loc: \"roll\",\n createMessage: this.script.getChatData()\n});","8GyJgdHVBaLrHCY8":"let type = this.item.getFlag(\"wfrp4e\", \"breath\")\nlet types = {\n none : \"None\",\n cold : \"Froid\",\n corrosion : \"Corrosion\",\n fire : \"Feu\",\n electricity : \"Électricité\",\n poison : \"Poison\",\n smoke : \"Fumée\",\n various : \"Divers\"\n}\nif (!type)\n{\n type = (await ItemDialog.create(ItemDialog.objectToArray(types, this.item.img), 1, \"Choisir Souffle\"))[0]?.id;\n this.item.updateSource({\"flags.wfrp4e.breath\" : type})\n}\n\nif (!this.item.name.includes(\"(\") && types[type] && type != \"none\")\n{\n this.item.updateSource({name : this.item.name += ` (${types[type]})`, \"system.specification.value\" : this.item.system.specification.value.replace(\"(Type)\", \"\").trim()})\n}","8K9tpCwvFC9INk5V":"if ([\"t\", \"wp\"].includes(args.characteristic))\n{\n\targs.fields.modifier += 10;\n}\nelse if ([\"ag\", \"i\", \"int\"].includes(args.characteristic))\n{\n\targs.fields.modifier -= 10;\n}","8LmUVQxOwTLSeabg":"return args.data.targets.length > 0 || !args.weapon?.system.qualities.value.find(i => i.name == \"shield\") // Should count even if they don't have the skill","8N3Uqjq1ZxPxo4pk":"return !args.skill?.name?.includes(game.i18n.localize(\"NAME.Lore\"))","8OwUgwZI8hOJt2hG":"args.fields.modifier += ((this.effect.sourceTest?.result.slOver * 10) || 10)","8R7O63iC0yANtkJ9":"if (this.item.equipped.value && this.actor.hasCondition(\"ablaze\"))\n{\n await this.actor.removeCondition(\"ablaze\")\n this.script.notification(`Ne peut recevoir un état En Flammes`,\"info\");\n}","8RNziYGGb4sp3BGQ":"if (!args.test.weapon?.name.includes(\"Drakefire\"))\n{\n args.test.result.misfire = game.i18n.localize(\"Misfire\");\n args.test.result.misfireDamage = (0, eval)(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.weapon.system.Damage);\n}","8ShLVT0bK1eQpinj":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.k00PimCWkff11IA0\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data])","8TRiAJ8thIKE4IoL":"\nlet SL = Number(foundry.utils.getProperty(this.item, \"flags.wfrp4e.sourceTest.result.SL\") || 1)\n\nargs.actor.characteristics.i.modifier += 10 * SL\nargs.actor.characteristics.ag.modifier += 10 * SL","8ThudCYRqkjQIwJH":"if (args.opposedTest.attackerTest.result.critical)\n{\n args.actor.addCondition(\"ablaze\")\n}","8WJsecxdndaHRxxS":"this.actor.status.addArmour(this.actor.characteristics.wp.bonus, {source: this.effect, magical : true})","8WeYU5e5LN9UeWFs":"if (args.item.type == \"spell\")\n{\n let range = parseInt(args.item.Range)\n if (Number.isNumeric(range))\n {\n args.item.system.range.value = \"2 * \" + args.item.system.range.value\n }\n}","8ZAUBSH9CM9OTpTL":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Perception\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"easy\"}});\nawait test.roll();\n\nif (test.succeeded)\n{\n this.actor.addCondition(\"stunned\") \n}\nelse if (test.failed)\n{\n this.actor.addCondition(\"poisoned\", 2);\n}","8araLuwmBq8GKEw3":"let APIgnored = args.AP.layers.reduce((prev, current) => prev + ((current.weakpoints && !current.ignored) ? current.value : 0), 0)\n\nif (APIgnored)\n{\n args.modifiers.ap.ignored += APIgnored\n args.modifiers.ap.details.push(`${this.effect.name}: Ignore les PA avec des points faibles (${APIgnored})`)\n}","8fefDfiYKFOWdPER":"args.update({texture : {scaleX : 2, scaleY: 2, src: \"modules/wfrp4e-core/tokens/popout/gor.webp\"}});","8g2iitsgaJarKQpr":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.V0c3qBU1CMm8bmsW\")\nlet data = item.toObject()\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n","8gCja0mfKt4nYVZc":"args.fields.slBonus += 2 ","8hCdSTjZqeuVyBGV":"if (args.sourceTest.options.doubleDamage)\n{ \n args.modifiers.other.push({label: this.effect.name, value: args.totalWoundLoss});\n args.totalWoundLoss *= 2;\n}","8hIyWDyfbgGAig65":"return [\"ws\", \"bs\", \"s\", \"t\", \"ag\", \"dex\"].includes(args.characteristic)","8jvEVPUCg3rKG48Y":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.9fq6p9Q6H02LjaSi\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","8noxHUQKR55Kx1YN":"this.actor.system.status.corruption.max += 1","8oE0DTzz0krOfFlV":"args.item.system.qualities.value.push({name : \"magical\"})\nargs.item.system.qualities.value.push({name : \"impact\"})\n","8pbVGsVFlDebu2Ac":"args.wounds += 2;","8qOGotfGFA0HYQ6W":"let resistances = this.actor.itemTags.talent.filter(i => i.name == game.i18n.localize(\"NAME.MagicResistanceTalent\"));\n\nfor(let talent of resistances)\n{\n talent.system.max.value = \"custom\";\n talent.system.max.formula = \"@characteristics.t.bonus + 2\"\n}","8rq4GL5d5nCn4kO7":"let caster = this.effect.sourceActor\nif (caster)\n{\n let healed= caster.characteristics.wp.bonus\n this.actor.modifyWounds(healed);\n this.script.message(`${this.actor.prototypeToken.name} regagne ${healed} Blessures`)\n}","8sJSsjq6wx4IxXWn":"let test = args.test\nif (test && test.spell?.system.magicMissile.value)\n{\n let roll = await new Roll(\"1d100\").roll();\n roll.toMessage(this.script.getChatData());\n if (roll.total <= 30)\n {\n this.script.message(`${this.item.name} : Le sort échoue !`)\n }\n}","8tyMXDfHR8AJBdDu":"let weakpointsAP = args.AP.layers.filter(i => !i.ignored && i.weakpoints).reduce((ap, layer) => ap + layer.value, 0);\n\nif (weakpointsAP > 0)\n{\n args.modifiers.ap.ignored += weakpointsAP;\n args.modifiers.ap.details.push(`${this.effect.name} - Ignore les points faibles (${weakpointsAP})`);\n}","8vpAtJ93GIeye1qj":"return args.type == \"cast\"","8wG9l4T9fc1bM0TN":"let item = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.kJNAY1YRaCy9IgmT\")).toObject();\nitem.system.specification.value = 1;\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","8xqYrBIf1Zhlwizg":"const repaired_message = `

Ancre terminée.

`;\nconst test = 'Strength';\nconst difficulty = 'vhard';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n test: {\n value: test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","8yBr6VbdKcrWUuqw":"this.actor.characteristics.i.value= \"-\"\nthis.actor.characteristics.int.value= \"-\"\nthis.actor.characteristics.wp.value= \"-\"\nthis.actor.characteristics.fel.value = \"-\"","8zTkDVziBPaNbMQX":"let filters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"petty\"\n }\n]\n\nlet petty = await ItemDialog.createFromFilters(filters, 6, {text : \"Choisissez 6 Sorts Mineurs\"})\n\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"\"\n }\n]\n\nlet arcane = await ItemDialog.createFromFilters(filters, 9, {text : \"Choisissez 9 Sorts d'Arcane\"})\n\nlet items = petty.concat(arcane).map(i => i.toObject())\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","91S2GnBFYFbxmOCK":"this.actor.characteristics.s.bonus += 1\nthis.actor.characteristics.s.calculationBonusModifier -= 1","93K85NnVwjVNXlZq":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Trade\"));","94eDAi6pkMhG3Ex9":"this.actor.deleteEmbeddedDocuments(\"ActiveEffect\", [this.effect.id]);","956dUb5sd6OtbWZR":"args.fields.successBonus++;","96Y1yIH1lRjTs5hL":"if (args.test.failed && args.test.characteristicKey == \"wp\")\n{\n this.actor.addCondition(\"broken\")\n}","97yDvwmUqkwHktQj":"let data = this.effect.getFlag(\"wfrp4e\", \"handOfGlory\");\nlet changes = [];\n\nif (!data)\n{\n return;\n}\n\nif (data.characteristic == \"movement\")\n{\n changes = [{key: \"system.details.move.value\", mode: 2, value: 2}]\n}\nelse \n{\n let currentTotal = this.actor.system.characteristics[data.characteristic].value;\n let newTotal = this.actor.system.characteristics[data.characteristic].value + data.roll;\n let bonusOffset = Math.floor(currentTotal / 10) - Math.floor(newTotal / 10); // e.g. 37 + 15 bonus = 52, calculation bonus modifier should be -2\n\n changes = changes.concat({\n key: `system.characteristics.${data.characteristic}.modifier`,\n mode: 2,\n value: data.roll\n }, \n {\n key: `system.characteristics.${data.characteristic}.calculationBonusModifier`,\n mode: 2,\n value: bonusOffset\n })\n}\n \nthis.effect.updateSource({changes});","98nKfcimlaPeM9h5":"await this.actor.addCondition(\"bleeding\")\nawait this.script.message(await this.actor.applyBasicDamage(10, {suppressMsg : true}));","9A7rYY3FKi5XLihG":"fromUuid(\"Compendium.wfrp4e-core.items.5QcrpLQWWrsbKR79\").then(item => {\n let data = item.toObject();\n data.system.tests.value = data.system.tests.value.replace(\"coins\", \"metal objects\");\n data.system.description.value += \"

Ce talent s'applique à tout objet métallique en raison de Affinité Métallique

\"\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n})","9AMoFRATTAfdKlKN":"const test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"challenging\"},\n context: {\n failure: `Gain de 1 état @Condition[Poisoned].`\n }\n});\n\nawait test.roll();\n\nif (test.failed) {\n args.actor.addCondition(\"poisoned\");\n const speaker = ChatMessage.getSpeaker({actor: args.actor});\n this.script.message(`

${speaker.alias} a reçu 1 état @Condition[Poisoned] de Venin d'Araignée.

Les victimes réduites à 0 blessures et qui souffrent d'un état @Condition[Poisoned] de ces flèches deviennent @Condition[Unconcious], mais ne risquent pas la mort à cause des états @Condition[Poisoned] restants comme ce serait normalement le cas.

`);\n}","9EVj4bmZJex45Mt7":"return args.skill?.name != game.i18n.localize(\"NAME.Athletics\");","9HWEDsnNxSykqbF5":"args.actor.system.details.move.value += 3;\nargs.actor.system.status.carries.max = Math.floor(args.actor.system.status.carries.max * 0.25);\nargs.actor.system.details.price.gc *= 1.1;","9JnPK1jNUEso7Pv8":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS\")\nlet data = item.toObject();\ndata.name += ` (${game.i18n.localize(\"SPEC.Smell\")})`\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","9MDi3ok9gPwtbALf":"args.actor.details.move.value /= 2","9MwRUzRinhq1IjhG":"args.actor.addCondition(\"grappling\");","9RFoasDcFnYZ1txR":"return args.skill?.name == game.i18n.localize(\"NAME.Perception\");","9VfeubiCV83LN9iY":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM\")\nlet data = item.toObject();\ndata.name += ` (En charge)`\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","9WZa63lr0K3SsP4G":"let sourceItem = this.effect.sourceItem;\n\nif (sourceItem)\n{\n\tthis.actor.applyEffect({effectUuids : [sourceItem.effects.contents[2].uuid]})\n\tthis.script.notification(\"Effets secondaires appliqués\");\n}","9Yn9uViEjcuaESJ2":"if (this.item.getFlag(\"wfrp4e\", \"failedCool\"))\n{\n this.item.name += \" (No AP)\"\n this.item.system.AP = {\n \"head\": 0,\n \"lArm\": 0,\n \"rArm\": 0,\n \"lLeg\": 0,\n \"rLeg\": 0,\n \"body\": 0\n }\n}","9ZFPDCk8M2TQxh7x":"args.fields.modifier += 20\n","9bJGJrLqslV5lBya":" return args.characteristic == \"bs\"","9eL5JbQQmCY030ba":"this.actor.addCondition(\"poisoned\");","9eWR4mdaoCSQawDT":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.GlShFJF2TpsNh1FX\");\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n","9fK07tqqZyPg7dpx":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty: \"veasy\"}})\nawait test.roll();\nif (test.failed)\n{\n this.script.notification(\"Gained a Festering Wound\")\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\")\n this.actor.createEmbeddedDocuments(\"Item\", [item.toObject()])\n}\nelse \n{\n this.script.notification(\"Avoided a Festering Wound\")\n}\n","9fNHye2N2DORR0A3":"return !args.item.name.includes(\"Arme\")","9nroaZDkW3WXNkB7":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.4MJJCiOKPkBByYwW\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","9ob2lPnk3PDot9Tx":"this.actor.addCondition(\"blinded\", this.effect.sourceTest.result.SL)","9qWUuEF8F5nehF1y":"args.item.system.qualities.value = args.item.system.qualities.value.concat([{name : \"magical\"}, {name : \"unbreakable\"}])\nargs.item.system.damage.value += ` + ${this.effect.sourceActor.system.characteristics.wp.bonus}`","A0OK0qAMmnf8iNJf":"if (args.test.result.SL < 0)\n{\n this.script.message(`Gain de ${Math.abs(args.test.result.SL)} Points de Corruption`, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n if (args.test.failed && this.actor.type == \"character\")\n {\n this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + Math.abs(args.test.result.SL)})\n }\n}","A1odAcuRbq9797ZB":"let choice1 = [\n {\n type : \"skill\",\n name : \"Mêlée (Base)\",\n diff : {\n system : {\n advances : {\n value : 10\n }\n }\n }\n }\n]\nlet choice2 = [\n {\n type : \"skill\",\n name : \"Mêlée (arme d'hast)\",\n diff : {\n system : {\n advances : {\n value : 10\n }\n }\n }\n }\n]\n\nlet choice = await foundry.applications.api.DialogV2.wait({\n window : {\n title : \"Choix\"\n },\n content :\n `

\n Sélectionnez votre choix\n

\n
    \n
  1. Mêlée (Base)
  2. \n
  3. Mêlée (arme d'hast)
  4. \n
\n `,\n buttons : [\n {\n label : \"Base\",\n callback : () => {\n return choice1;\n }\n },\n {\n label : \"Arme d'hast\",\n callback : () => {\n return choice2;\n }\n }\n ]\n})\n\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n let equip = item.system.tags.has(\"equippable\");\n item = item.toObject()\n if (equip)\n {\n item.system.equipped.value = true;\n }\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","A3MW0UksYrHGa0Qw":"return [\"fel\", \"wp\", \"int\", \"t\"].includes(args.characteristic);","A3XrFB7SvV2vcg1a":"if (args.applyAP) \n{\n args.applyAP = false;\n}","A3fvV69RS1lYgma0":"if (this.actor.type == \"character\") \n this.actor.corruptionDialog(\"minor\")\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name})\nawait test.roll();\nif(test.failed)\n{\n await this.actor.addCondition(\"unconscious\");\n let secondTest = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"easy\"}, skipTargets: true, appendTitle : \" - Despair\"})\n await secondTest.roll();\n if(secondTest.failed)\n {\n await this.actor.addCondition(\"fatigued\");\n }\n}","A6DcKPzAGntzSCil":"let roll = await new Roll(\"1d10\").roll()\n\nroll.toMessage(this.script.getChatData({flavor : `Lâche ${dropped.map(i => i.name).join(\", \")}!`}));\n\nthis.effect.updateSource({\"duration.rounds\" : roll.total})","A97EV1Yju3aT7Sng":"if (args.test.skill?.name == game.i18n.localize(\"NAME.Pray\") || args.test.prayer)\n{\n if (parseInt(args.test.result.SL) > 0)\n {\n args.test.result.SL = \"+0\";\n args.test.result.description = game.i18n.localize(\"ROLL.MarginalSuccess\");\n args.test.result.other.push(`${this.effect.name}: Maximum +0 SL`)\n }\n}","ACgKpKrEEHoNGG0h":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) && args.type != \"channelling\"","ACtDCTLZXmd5uXjX":"let halve;\nif (args.sourceItem?.type != \"spell\")\n{\n halve = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : \"Diviser les dégâts par deux ? (Divise tous les dégâts sauf le feu, le froid et la magie)\"})\n}\nelse\n{\n halve = false;\n}\n\nif (halve)\n{\n args.totalWoundLoss /= 2;\n args.modifiers.other.push({label : this.effect.name, details : \"Divisé par deux\", value : \"× 0.5\"})\n}","AFiB20FaOBmBv2Kz":"if (args.actorsystem.details.move.sail.value > 0)\n args.actor.system.details.move.sail.value = Math.floor(args.actor.system.details.move.sail.value * .5);\n","AGD7zCyV4zruvnWu":"return args.type != \"cast\" || ![\"death\", \"necromancy\", \"life\", \"light\", \"heavens\"].includes(args.spell?.system.lore.value)","AHZ8f7dfN8jNsYk6":"let token = this.actor.getActiveTokens()[0];\nlet target = args.data.targets[0];\nlet weapon = args.weapon;\n\nif(!target || !token)\n{\n return;\n}\n\nlet distance = canvas.grid.measureDistances([{ ray: new foundry.canvas.geometry.Ray({ x: token.center.x, y: token.center.y }, { x: target.center.x, y: target.center.y }) }], { gridSpaces: true })[0]\nlet currentBand\n\nfor (let band in weapon.range.bands) \n{\n if (distance >= weapon.range.bands[band].range[0] && distance <= weapon.range.bands[band].range[1]) \n {\n currentBand = band;\n break;\n }\n}\n\nreturn [game.i18n.localize(\"Long Range\"), game.i18n.localize(\"Extreme\")].includes(currentBand)","AHt3D7EHKWBcL3vu":"if (this.item.system.protects[args.loc] && (args.sourceItem?.system.isMagical || args.sourceItem?.type == \"trait\"))\n{\n const heatBased = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : \"Apply protection from heat-based attacks?\"})\n\n if (heatBased) \n {\n args.applyAP = true;\n args.modifiers.other.push({label : this.effect.name, value : -1 * this.item.system.currentAP[args.loc], details : this.item.name});\n }\n}","AI6bFrjWk4NH9FBd":"this.actor.addCondition(\"entangled\", this.effect.sourceTest.result.overcast.usage.other.current)","AI7iVbQMPzXMP5on":"const hours = new Roll(\"2d10\");\nawait hours.toMessage({flavor: this.effect.name + \" (heures)\"});\n\nconst bonus = new Roll(\"2d10\");\nawait bonus.toMessage({flavor: this.effect.name + \" (heures)\"});\n\n\nawait this.effect.update({\n \"duration.seconds\": hours.total * 3600\n});\nawait this.effect.setFlag(\"wfrp4e-tribes\", \"bonus\", bonus.total);","ALuPRzf85dmkEfLo":"return args.skill?.name == game.i18n.localize(\"NAME.Intuition\");","AMI2wDJqsIZsoq1e":"if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == \"attacker\")\n{ \n this.script.message(`Emits a cloud of foul-smelling blackpowder. Enable the Fellowship Penalty Active Effect on @UUID[${this.actor.uuid}].`, {blind : true, whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","AMxezwtYnWCF6Oza":"return args.skill?.name == `${game.i18n.localize(\"NAME.Ranged\")} (${game.i18n.localize(\"SPEC.Blackpowder\")})`","ARQbVHKYK39d8vKJ":"let properties = {\n fine : \"Fine\",\n durable : \"Durable\",\n lightweight : \"Lightweight\",\n practical : \"Practical\"\n};\n\n\nlet choice = await ItemDialog.create(ItemDialog.objectToArray(properties), 1, {title: this.effect.name, text: \"Select Property\"});\n\nif (choice[0])\n{\n this.effect.updateSource({\"flags.wfrp4e.property\" : choice[0].id, name : this.effect.setSpecifier(choice[0].name)});\n}","AS7CstSosuCrwZ19":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 20,\n \"bright\": 10,\n \"angle\": 360,\n \"alpha\": 0.4,\n \"animation\": {\n \"speed\": 3,\n \"intensity\": 3,\n \"type\": \"torch\",\n },\n \"color\": \"#ffcc66\",\n }}));","AV2Kj6jgmIc45zKi":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"));","AVROqafFhKjN6TPR":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.DrNUTPeodEgpWTnT\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","AWgZnm9xLyIWCDnp":"let robust = args.modifiers.other.find(i => i.key == \"robust\")\nif (robust)\n{\n\trobust.value--;\n}\nelse \n{\n\targs.modifiers.other.push({key: \"robust\", label : this.effect.name, value : -1})\n}\n","AYEiCx2Es3QtMY28":"let choice1 = [\n {\n type: \"trait\",\n name: \"Bestial\",\n },\n {\n type: \"trait\",\n name: \"Regeneration\",\n },\n {\n type: \"trait\",\n name: \"Taille (Large)\",\n },\n {\n type: \"trait\",\n name: \"Territorial\",\n }\n]\n\nlet updateObj;\nlet actor;\n\nasync function addTrait(c) {\n let items = [];\n let existing;\n if (c.type == \"trait\") {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type);\n }\n if (!existing) {\n let item = await game.wfrp4e.utility.find(c.name, c.type);\n if (item) {\n item = item.toObject();\n items.push(item);\n }\n else\n ui.notifications.warn(`Impossible de trouver ${c}`, { permanent: true });\n }\n console.log(\"WISH LIST2\", choice1, items);\n actor.createEmbeddedDocuments(\"Item\", items);\n}\n\nasync function dialogChoice() {\n for (let c of choice1)\n {\n if (await foundry.applications.api.DialogV2.confirm({window : {title: \"Option\"}, content:`

Add Option?

  1. ${c.name}
`}))\n {\n addTrait(c)\n c.valid = true;\n }\n }\n}\n\nupdateObj = this.actor.toObject();\nactor = this.actor\nawait dialogChoice();\n","AZGXrZOQ4EzjxRL9":"return true;","AaPPmnv7AtxsRVUs":"args.actor.details.move.value = 1;","AdawSWiB45Vu40rQ":"let colors = {\n fire : \"#b22222\",\n heavens : \"#87ceeb\",\n metal : \"#ee9b3a\",\n shadow : \"#808080\",\n life : \"#008000\",\n beasts : \"#a52a2a\",\n light : \"#f0ffff\",\n death : \"#800080\",\n necromancy : \"#800080\",\n daemonology : \"#8b0000\"\n};\n\nlet spell = this.actor.itemTypes.spell.find(i => Object.keys(colors).includes(i.system.lore.value[0]));\n\nlet color;\nif (spell)\n{\n color = colors[spell.system.lore.value[0]];\n}\nelse \n{\n color = Object.values(colors)[Math.ceil(CONFIG.Dice.randomUniform() * 10)];\n}\n\nthis.effect.updateSource({changes: this.effect.changes.concat({key: \"token.light.color\", type: \"override\", value: color})});","Adgs6Zs0FdefO6qx":"if (args.test.options.pilot && args.test.result.reversed)\n{\n\targs.test.data.result.SL = \"+\" + Math.min(1, Number(args.test.data.result.SL))\n\targs.test.result.other.push(`${this.effect.name}: SL limited to 1`)\n}","Ah2wyywkL8hjJNXM":"args.context.healWounds = true;","AhV9QfteQNqqXVjv":"let qualities = {\n fast : \"Rapide\",\n hack : \"Tranchant\",\n impale : \"Empalant\",\n penetrating : \"Pénétrant\",\n precise : \"Précis\"\n}\n\nlet choice = await ItemDialog.create(ItemDialog.objectToArray(qualities, this.item.img), 1, {text: \"Choisissez une qualité\", title: this.effect.name});\n\nif (choice[0])\n{\n this.script.message(choice[0].name);\n this.effect.setFlag(\"wfrp4e\", \"quality\", choice[0].id);\n}","AjC4dsiuhVCOnRGI":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF\")\nlet data = item.toObject(); \nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});","AmOMCUaWLJ2iJAt5":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.IFKWu98qmWpaSfUi\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","AmpDbT0BkDHeaRzf":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\");\nlet data = item.toObject();\ndata.system.specification.value = 1;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","ApaLcUhuty3EzJoP":"let fortunePoints = this.effect.sourceTest.result.overcast.usage.other.current\nlet current = this.actor.status.fortune.value\n\nthis.actor.update({\"system.status.fortune.value\" : fortunePoints + current})\n\nthis.script.message(`${this.actor.prototypeToken.name} fortune points increased from ${current} to ${fortunePoints + current}`)","AqHLHp4kH6KULk3e":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n let effectData = this.item.effects.contents[0].convertToApplied();\n\teffectData.system.sourceData.item = this.item.uuid\n\tactor.applyEffect({effectData : [effectData]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","AvRbjpBfTX3mn3bz":"if (this.actor.effects.contents.filter(e => e.name === \"Liquid Fortification\").length === 0) {\n let effectData = this.item.effects.contents[0].convertToApplied();\n effectData.duration.seconds = 3600\n this.actor.applyEffect({effectData : [effectData]});\n this.script.notification(\"Durée de l'effet Liquid Fortification réglée à 1 heure.\");\n}\nelse {\n let effect = this.actor.effects.contents.filter(e => e.name === \"Liquid Fortification\")[0];\n effect.update({duration: {seconds: 3600}});\n this.script.notification(\"Durée de l'effet Liquid Fortification réinitialisée à 1 heure.\");\n}","AyNb5sj6FD2Z3Q5T":"this.actor.addCondition(\"dead\")\nthis.actor.setWounds(0);\nthis.script.message(await game.wfrp4e.tables.formatChatRoll(\"scatter\"))","AyS3iLljxHRKsHg4":"let broken = this.actor.hasCondition(\"broken\");\nlet fatigued = this.actor.hasCondition(\"fatigued\");\nawait broken?.delete();\nawait fatigued?.delete()\nlet drilled = await fromUuid(\"Compendium.wfrp4e-core.items.Item.J9MK0AIaTbvd5oF6\")\nlet fearless = await fromUuid(\"Compendium.wfrp4e-core.items.Item.8pVzgPkgWpTJvfhG\")\nlet stout = await fromUuid(\"Compendium.wfrp4e-core.items.Item.IogM5gnsoOX63w7j\")\nthis.actor.createEmbeddedDocuments(\"Item\", [drilled, fearless, stout], {fromEffect : this.effect.id})","B063u4vrbvzMaCQt":"args.item.system.flaws.value = args.item.system.flaws.value.concat([{name : \"bulky\"}, {name : \"unreliable\"}])","B08DMbt9gcj8uCTc":"if (args.totalWoundLoss > 0) args.actor.addCondition('ablaze')","B1xgRS00RcTIZLnO":"return [\"cast\", \"channelling\"].includes(args.type) && this.actor.hasCondition(\"fatigued\")","B6ZbY3bxTPg6nCng":"return args.skill?.name == game.i18n.localize(\"NAME.Bribery\");","B87v1twc65qyvUWi":"args.fields.modifier += 10 * this.effect.conditionValue","B950b0XnIUYCdVwu":"let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name})\nawait test.roll();\n\nif (test.succeeded)\n{\n if (args.totalWoundLoss <= parseInt(test.result.SL))\n {\n args.abort = `${this.effect.name}: Attaque déviée et retournée contre l'attaquant !`\n }\n args.modifiers.other.push({label : this.effect.name, value : -1 * parseInt(test.result.SL)})\n}","BAOv7moTxsKlT3JS":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"easy\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"broken\")\n}","BD7bVTU2pVoRSRBe":"let symptoms = {\n convulsions : \"Convulsions\",\n coughsandsneezes : \"Toux et Éternuements\",\n fever : \"Fièvre\",\n flux : \"FMalaiselux\",\n nausea : \"Nausée\"\n}\n\nlet roll = await (new Roll(`max(0, 1d10 - ${this.actor.characteristics.wp.bonus})`).roll())\nroll.toMessage(this.script.getChatData());\n\nlet choices = await ItemDialog.create(ItemDialog.objectToArray(symptoms), roll.total, \"Choisir Symptômes\");\n\nif (choices.length)\n{\n let symptomEffects = foundry.utils.duplicate(game.wfrp4e.config.symptomEffects)\n let added = []\n for(let choice of choices)\n {\n let symptom = symptomEffects[choice.id];\n symptom.origin = this.effect.uuid;\n added.push(symptom);\n }\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", added)\n}\nelse\n{\n this.effect.delete();\n}\n","BEEvU2hE5ymcNOH9":"let fatigued = this.actor.hasCondition(\"fatigued\")\n if (!fatigued)\n {\n this.actor.addCondition(\"fatigued\")\n ui.notifications.notify(\"Etat Exténué ajouté à \" + this.actor.name + \" qui est impossible à retirer tant que le symptôme de Malaise est présent.\")\n }","BHbFqhJPzZI2txLs":"let lore = this.effect.name.split(\"(\")[1].split(\")\")[0].toLowerCase();\n\n// If channelling corresponding lore\nif (args.type == \"channelling\" && args.spell.system.lore.value == lore)\n args.fields.slBonus += 2\n// If channelling or casting different lore\nelse if (args.spell.system.lore.value != lore && args.spell.system.lore.value != \"petty\")\n args.fields.slBonus -= 1","BNJRV66jlrp51qZK":"args.abort = true;\nthis.script.notification(game.i18n.localize(\"SCRIPT.Sightstep\"));","BVNKF9omCppWPLys":"let actor = game.user.character ?? canvas.tokens.controlled[0]?.actor;\nif (!actor || !(actor.system instanceof StandardActorModel))\n return ui.notifications.warn(\"Vous devez contrôler un acteur capable d'effectuer un test de Force\");\n\nlet test = await actor.setupCharacteristic(\"s\", {\n skipTargets: true,\n appendTitle: \" - Évacuation\",\n fields: {\n difficulty: \"challenging\"\n },\n context: {\n success: \"Réduction du niveau de Perforation !\"\n }\n});\n\nawait test.roll();\nif (test.succeeded) {\n let SL = parseInt(test.result.SL);\n let name = this.effect.name.replace(/\\d+/, rating => parseInt(rating) - SL);\n await this.effect.update({name});\n}\n\nlet rating = parseInt(this.effect.name.match(/\\d+/)?.[0]);\nif (rating <= 1) {\n const scriptData = this.effect.system.scriptData\n scriptData[2].trigger = '';\n await this.effect.update({disabled: true, \"system.scriptData\": scriptData});\n}","BY4feKp244bQOWlB":"args.test.result.canDualWield = true;","BZETMpgrI5k1ol5b":"// If the creature currently has a Surprised, Unconscious, or Entangled Condition, it does not gain this Advantage.\nconst surprised = this.actor.hasCondition(\"surprised\")\nconst unconscious = this.actor.hasCondition(\"unconscious\")\nconst entangled = this.actor.hasCondition(\"entangled\")\nif (entangled || unconscious || surprised) return\n\n// If, at the beginning of its turn, this creature does not have at least Rating Advantage points, its Advantage pool immediately increases to Rating.\nconst grimRating = parseInt(this.item.specification.value) || 1\nif (grimRating > this.actor.status.advantage.value) {\n this.actor.setAdvantage(grimRating)\n}\n","BcXTujburrHpjpwa":"args.fields.slBonus -= 3;","Be5rdfnZorbILhpC":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet data = item.toObject();\ndata.system.specification.value = 3 - this.actor.characteristics.s.bonus\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","Bexspr5viPhHiFmU":"let fatigued = this.actor.hasCondition(\"fatigued\");\nlet value = fatigued?.conditionValue || 0;\nargs.fields.modifier += value * 10;","Bj6bxItlgtI2sXVN":"let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\nroll.toMessage(this.script.getChatData());\nargs.totalWoundLoss = Math.max(0, args.totalWoundLoss - roll.total)\nargs.modifiers.other.push({label: this.effect.name, value : -1 * roll.total})\nthis.effect.update({disabled : true})","BtyFhdGMKiMamGhM":"let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nlet damage = parseInt(this.effect.sourceTest.result.SL)\n\nif (test.succeded)\n{\n damage = damage + 8 - parseInt(test.result.SL)\n}\n\nelse \n{\n damage = damage + 10\n this.actor.addCondition(\"entangled\", 3)\n}\nthis.script.message(await this.actor.applyBasicDamage(damage, {loc : \"roll\", suppressMsg: true}))\n","Bu0KUpGvfmFF7LJs":"let test = await this.actor.setupCharacteristic(\"s\", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"difficult\"}});\n\nawait test.roll();\n\nif (test.failed)\n{\n\n if (test.isCriticalFumble == \"fumble\")\n {\n\t return this.script.message(`${this.actor.name} meurt alors qu'il est entraîné dans l'Aethyr (à moins qu'il ne dépense un point de Destinée pour éviter cela).`);\n }\n\n await this.script.message(await this.actor.applyBasicDamage(3, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true }))\n\n}","Bv3431tnG3VKaTJr":"if (args.test.result.castOutcome == \"success\")\n{\n args.test.result.other.push(`@Peur[2,${this.actor.name}]`);\n}","ByhEa1BxQOyrOmqg":"return args.item?.attackType == 'melee'","BzDLuxBNw1QNIacg":"if (args.item.type == \"skill\")\n args.item.system.advances.value = 0\n\nif (args.item.type == \"talent\")\n args.item.system.tests.value = \"\"\n\nif (args.item.type == \"weapon\") \n args.item.system.qualities.value = []","C4LZnaX0MYgwrszj":"return args.type !== \"channelling\" && !args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) && args.skill?.name !== `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})` && args.skill?.name !== game.i18n.localize(\"NAME.OutdoorSurvival\");","C5NIkJwXL85Qbpe7":"args.weaponProperties.impale = true;","C69xngEMghfwUx13":"let easier = ['challenging', 'average', 'easy', 'veasy'];\nif (easier.includes(args.fields.difficulty))\n args.fields.difficulty = \"difficult\";","C8Q4jf6LSyA3lQHS":"let damage = this.effect.sourceTest.result.damage;\n\ndamage += 7; // goes from +8 to +15;\n\nif (this.actor.sizeNum >= game.wfrp4e.config.actorSizeNums.lrg)\n damage += 22; // goes from +15 to +30;\n\nif (this.actor.has(game.i18n.localize(\"NAME.Unstable\"))) \n damage *= 2;\n\nthis.actor.applyDamage(damage, {\n loc: \"roll\",\n createMessage: this.script.getChatData()\n});","C9ARvMauPNwIHj6o":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}, context : {failure: \"Gain Broken\"}});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"broken\");\n}","CCK1iIfPmB398ziT":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Athletics\"), {fields : {difficulty : \"difficult\"}, skipTargets: true, appendTitle : \" - Walking\"})\ntest.roll();","CCwuu3bPLCpVGAmb":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\n\n","CD4RnDpXZ9hnqVPQ":"if (!this.actor.hasCondition(\"entangled\"))\n this.actor.addCondition(\"entangled\");","CDASLC4fWKSGQKf9":"let blinded = this.actor.hasCondition(\"blinded\");\nif (blinded?.getFlag(\"wfrp4e\", \"flockOfDoom\"))\n{\n blinded.delete();\n}","CHnaBPHk6HdFS512":"let arm = await fromUuid(\"Compendium.wfrp4e-core.items.MnMZv7ZXoRqoH9dS\");\nlet leg = await fromUuid(\"Compendium.wfrp4e-core.items.k00PimCWkff11IA0\");\n\nlet choice = await ItemDialog.create([arm, leg], 1, \"Choisir le membre\")\n\nthis.actor.createEmbeddedDocuments(\"Item\", choice, {fromEffect: this.effect.id})","CIxZYkHggBQ6EsHP":"this.script.notification(\"Effet utilisé\");\nthis.effect.delete();","CM43kvw5mIIE1OsB":"let key = this.item.system.location.key\n\nlet lostFingers = this.actor.flags.useless[key] || 0;\n\nlostFingers += 1\n\nthis.actor.flags.useless[key] = lostFingers;\n\nif (lostFingers >= 4)\n{\n\tthis.actor.flags.useless[key[0] + \"Arm\"] = true;\n}","CMUFtmNA1kkD1ay7":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 30,\n \"bright\": 20,\n \"angle\": 90,\n \"alpha\": 0.6,\n \"animation\": {\n \"speed\": 3,\n \"intensity\": 3,\n \"type\": \"torch\",\n },\n \"color\": \"#ffcc66\",\n }}));","CPQoK7NjzOwVTFXS":"for(let effect of this.actor.effects.filter(e => e.isCondition))\n{\n if (effect.isCondition)\n {\n effect.delete();\n }\n}","CS6O7UUjQcUJoOUP":"if (args.test.failed)\n {\n let SL = Number(args.test.result.SL)\n if (SL <= -2 && SL > -4)\n this.actor.addCondition(\"stunned\")\n else if (SL <= -4 && SL > -6)\n this.script.message(this.actor.prototypeToken.name + \" Doit réaliser un test a FM être @Condition[Prone].\")\n else if (SL <= -6)\n this.actor.addCondition(\"unconscious\")\n }","CUBpU1imu2eRS06C":"if (args.sourceItem?.system.properties?.qualities.hack && !args.hackReminder)\n{\n args.hackReminder = true;\n if (args.opposedTest)\n {\n args.opposedTest.result.other.push(`${this.effect.name} : Tranchant inflige ${this.item.Advances} dégâts supplémentaires`)\n }\n}\n","CW5Vlr57OaMkKJ8Q":"if (this.actor.system.status.advantage.value >= 3)\n{\n this.actor.modifyAdvantage(-3);\n this.script.notification(\"Avantage retiré\")\n}\nelse \n{\n return this.script.notification(\"Avantage retiré\", \"error\")\n}\n\nlet test = await this.actor.setupTrait(this.item)\nawait test.roll();","CWNGrg7se91RC95g":"if (args.totalWoundLoss > 0) {\n if (args.opposedTest)\n {\n args.opposedTest.result.other.push(\n `@Corruption[minor]{Exposition modérée à la Corruption}`\n )\n }\n this.script.message(`${this.effect.name}: \n @Corruption[moderate]{Exposition modérée à la Corruption}
\n ${args.actor.prototypeToken.name} doit effectuer un \n Test de Corruption (Modéré)`, \n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n )\n}\n","Ca1fXHTA1e2QLx0D":"args.fields.modifier += 50;","CbfUDhUr5R4UnPPq":"if (this.actor && this.actor?.name !== \"Kurgorn Three-eyes\" && !this.actor.hasCondition(\"blinded\") && !args.itemUpdated)\n{\n this.script.notification(`Impossible de supprimer l'état Aveuglé.`);\n await this.actor.addCondition(\"blinded\", 1, {statuses : [\"blinded\", \"blind\"]})\n}","CcR9i3UzUXx7ieep":"args.fields.modifier +=10;","CiFeduksZJ6PRulx":"return args.skill?.name == `${game.i18n.localize(\"NAME.Ride\")} (${game.i18n.localize(\"SPEC.Horse\")})` || (args.context.dodge && this.actor.isMounted);","CicQ5REu9tbsc8wW":"const locations = [];\n\nfor (let [key, loc] of Object.entries(args.AP)) {\n if (loc.layers?.some(i => !i.metal && i.source?.system.tags?.has(\"armour\")))\n locations.push(key);\n}\n\nthis.actor.status.addArmour(1, {source: this.effect, magical: true, locations})","Cjj4iLkdY1NaZRCi":"if ((args.sourceItem && args.sourceItem.isMelee) || (args.sourceItem && !args.sourceItem.name.includes(\"Projectiles\")))\n{\n let choice = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : `

Appliquer les dégâts avec ${this.effect.name} à l'attaquant ?`})\n\n if (choice)\n {\n this.script.message(await args.attacker.applyBasicDamage(this.actor.system.characteristics.wp.bonus, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}));\n }\n}","CkE8NZOhzPkuRrKJ":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.MnMZv7ZXoRqoH9dS\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data])\n\n\n\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty: \"hard\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tthis.actor.addCondition(\"unconscious\")\n}","ClkT2WG2UjVwQ97T":"if (args.actor.has(\"Démoniaque\")) {\n args.totalWoundLoss += 3;\n args.modifiers.other.push({label: this.effect.name, value: 3});\n}\n\nlet test = await args.actor.setupSkill(\"Résistance\", {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n characteristic: 't',\n context: {\n failure: \"Reçoit 1 État Aveuglé\"\n }\n});\nawait test.roll();\n\nif (test.failed) {\n args.actor.addCondition(\"blinded\");\n}","CoImIH9OCMx9DfQZ":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.nbhn2wX35b7Jrcbg\")\nlet data = item.toObject();\ndata.system.location.value = \"Jaw\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","Cri5Q7ux6ni7zNVS":"// Cannot be Surprised in combat.\n\nif (this.actor.hasCondition(\"surprised\"))\n{\n this.actor.removeCondition(\"surprised\")\n ui.notifications.notify(`${this.effect.name}: Cannot be surprised`);\n}","CxsKWGwQqtAaQdzX":"return args.characteristic === \"fel\";","CynUM4ZEiB9QbNQq":"const bonus = game.settings.get(\"wfrp4e\", \"homebrew\").advantageBonus;\n\nargs.fields.modifier += 2 * bonus;","D5XmzrUGFa1JN0cl":"args.fields.modifier += 10\n\n","DANLE5HxrkTNelhl":"args.wounds += 4;","DBafsY1HrclJRTtA":"return args.type != \"cast\"","DBelNjOULhhAADVJ":"let properties = {\n ugly : \"Ugly\",\n shoddy : \"Shoddy\",\n unreliable : \"Unreliable\"\n};\n\nlet choice = await ItemDialog.create(ItemDialog.objectToArray(properties), 1, {title: this.effect.name, text: \"Select Property\"});\n\nif (choice[0])\n{\n this.effect.updateSource({\"flags.wfrp4e.property\" : choice[0].id, name : this.effect.setSpecifier(choice[0].name)});\n}","DHxUKY9LMyifFgCi":"return args.skill?.name == \"Métier (Apothicaire)\" || args.skill?.name == \"Trade (Alchemist)\"","DHzODnNNdZ24FNSg":"let skills = this.actor.itemTypes.skill.filter(s => (this.effect.getFlag(\"wfrp4e\", \"skills\") || []).includes(s.name));\nskills.forEach(s => {\n s.system.modifier.value -= 10;\n})","DL9vYNft9aXdV2aW":"let tooth = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\ntooth = tooth.toObject()\ntooth.system.specification.value = 3\ntooth.system.qualities.value = [{name : \"magical\"}]\n \nlet claw = await fromUuid(\"Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM\")\nclaw = claw.toObject()\nclaw.system.specification.value = 4\nclaw.system.qualities.value = [{name : \"magical\"}]\nclaw.name = \"Claw\"\n\nthis.actor.createEmbeddedDocuments(\"Item\", [tooth, claw], {fromEffect : this.effect.id})","DMQ0taEpBUJU5njV":"args.actor.status.fortune.value = 0","DTiHS6RfwhF4THbf":"return args.skill?.name != game.i18n.localize(\"NAME.Drive\") && !args.skill?.name.includes(game.i18n.localize(\"NAME.Ride\"));","DUFSlDO38fQWclBE":"// Characters wounded by the ravens gain the ability to read, understand and speak rudimentary Classical. \n// This ability does not last beyond this adventure.\n\nthis.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.61L9aX2z164cjm7K\", this.effect)\n\nthis.script.message(`${args.actor.name} gains the ability to read, understand and speak rudimentary @UUID[Compendium.wfrp4e-core.items.Item.61L9aX2z164cjm7K]{Classical}. This ability does not last beyond this adventure.`)","DVlZGbiuMIHEQOnM":"if (this.actor.getFlag(\"wfrp4e\", \"isAttached\")) \n{\n\tlet roll = await new Roll(\"1d10\").roll()\n\tawait roll.toMessage(this.script.getChatData());\n\tif (roll.total == 9 || roll.total == 10)\n\t{\n\t this.script.message(`${this.actor.name} attached to ${this.actor.getFlag(\"wfrp4e\", \"isAttached\")} gorges and falls off.`)\n\t await this.actor.unsetFlag(\"wfrp4e\", \"isAttached\") \n\t}\n }","DWBxvzfWGcG7PVNP":"let letter = this.item.system.location.key[0]; // \"l\" or \"r\";\n\nthis.item.updateSource({\"system.location.key\" : letter + \"Doigt\"})\n\n// We want the location to be Right or Left Hand, but the key to be rFinger or lFinger","DcSJNRBXE9ZBBY7T":"this.actor.addCondition(\"blinded\", Math.max(0, this.effect.sourceTest.result.SL))","Dew3Ks9yC4DynSMi":"return args.characteristic === \"s\" || args.characteristic === \"t\" || args.weapon?.system?.attackType === \"melee\";","DhZqJso1JWYtGrKk":"this.actor.addCondition(\"ablaze\")\nlet damage = this.effect.sourceTest.result.damage + this.effect.sourceTest.result.additionalDamage\nthis.script.message(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))","Dk4VF4UXSMK5SaVP":"this.script.message(\"Activé pour annulé les Échecs critiques / Echecs\")\nthis.effect.update({disabled: true})","DmbWR9s5I8LHBwxB":"let column = await ValueDialog.create({text : \"Sélectionnez la colonne de lancer pour déterminer la Tête de Bête\", title : \"Sélectionnez une Colonne\"}, \"\", [\"Undivided\", \"Khorne\", \"Nurgle\", \"Slaanesh\", \"Tzeentch\"]);\n\nif (column)\n{\n let result = await game.wfrp4e.tables.rollTable(\"beasthead\", {}, column);\n this.script.message(`${result.title}
${result.result}`);\n let uuid = `Compendium.${result.object.documentCollection}.${result.object.documentId}`;\n let item = await fromUuid(uuid);\n if (item)\n {\n this.actor.createEmbeddedDocuments(\"Item\", [item])\n this.item.delete();\n }\n}","DpdSEHM6NMN1ey6h":"if (parseInt(this.item.system.specification.value) > 0)\n{\n\tthis.actor.system.status.ward.value = parseInt(this.item.system.specification.value);\n}","DqJFo74trI916qXN":"let fatigued = args.actor.hasCondition(\"fatigued\")\nif (fatigued)\n{\n fatigued.system.scriptData = fatigued.system.scriptData.filter(s => s.trigger != \"dialog\")\n fatigued.system._scripts = null;\n}","DsE6rTSzxEn6uWMz":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"average\"}})\nawait test.roll();\nif (test.failed)\n{ \n await this.actor.addCondition(\"blinded\");\n await this.actor.addCondition(\"fatigued\")\n} ","DuM5l2Yb4bdvDeaG":"return args.skill?.name != game.i18n.localize(\"NAME.Athletics\")","DvJvHsjgkzIfFaks":"if (!args.test.preData.options?.runeOfParrying) return\nif (!this.item.equipped.value || !args.test.item) return;\nargs.test.preData.canReverse = true","DxM3NRgQYc7moMPc":"this.actor.reset()","DxQnamsb2AuW0p2e":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Lore\"));","Dy67jQmeGwHwV9NY":"args.fields.modifier -=10;","DyZ1jH88EAp1ueOK":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.GlShFJF2TpsNh1FX\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\ndata.system.location.value = data.system.location.value.replace(\"Arm\", \"Wrist\")\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n","Dzi2CKpYapRGwNVr":"if (args.actor.system instanceof StandardActorModel) {\n args.actor.addCondition(\"unconscious\");\n}","E0HHBSdQR3oH8KaL":"if (args.totalWoundLoss > 0) {\n let frenzy = await fromUuid(\"Compendium.wfrp4e-core.items.Item.DrNUTPeodEgpWTnT\");\n frenzy = frenzy.toObject(); \n frenzy.effects[0].disabled = false;\n this.actor.createEmbeddedDocuments(\"Item\", [frenzy], {fromEffect : this.effect.id}); \n this.script.scriptMessage(\"Carnosaur gains Frenzy\");\n}","E0OhL9ZO8vb8A4qq":"args.actor.system.characteristics.t.initial += 30;","E1Xo4RVuN1YRRxg7":"return args.item?.attackType != \"ranged\"","E1vUepgop09FF5wy":"if (this.actor.system.status.advantage.value == 0)\n{\n return this.script.notification(\"Avantage retiré\", \"error\")\n}\n\nlet hatred = await fromUuid(\"Compendium.wfrp4e-core.items.Item.aE3pyW20Orvdjzj0\")\nlet frenzy = await fromUuid(\"Compendium.wfrp4e-core.items.Item.yRhhOlt18COq4e1q\");\n\nif (this.actor.system.status.advantage.value >= 3)\n{\n this.script.notification(`Ajout de ${frenzy.name}`)\n this.actor.setAdvantage(0)\n this.actor.createEmbeddedDocuments(\"Item\", [frenzy])\n}\nelse if (this.actor.system.status.advantage.value >= 1)\n{\n let data = hatred.toObject();\n data.system.specification.value = \"Opposants au corps à corps\"\n this.script.notification(`Ajout de ${hatred.name}`)\n this.actor.setAdvantage(0)\n this.actor.createEmbeddedDocuments(\"Item\", [data])\n}","E2FhOfZzu2CqTSeA":"let damage = this.effect.sourceTest.result.damage;\n\nawait this.actor.applyDamage(damage - 3, {\n loc: \"roll\",\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP,\n createMessage: this.script.getChatData(),\n});\n\nawait this.actor.addCondition(\"ablaze\", 1);","E2VfOVuju67qO3VL":"let blinded = this.actor.hasCondition(\"blinded\");\nif (blinded.getFlag(\"wfrp4e\", \"nightshroud\"))\n{\n blinded.delete()\n}","E33J9JixYVGxaktQ":"if (this.effect.getFlag(\"wfrp4e\", \"fistsOfGork\") && args.item.type == \"skill\" && args.item.name == \"Corps à corps (Bagarre)\") {\n\targs.item.system.modifier.value += this.effect.getFlag(\"wfrp4e\", \"fistsOfGork\")\n}","E3om295BMQojnM2F":"let fatigued = this.actor.hasCondition(\"fatigued\")\nif (fatigued)\n{\n fatigued.delete();\n this.script.notification(\"Retiré Exténué\")\n}","E4CHDe1xfmcV3oGv":"return args.skill?.name == game.i18n.localize(\"NAME.Navigation\");","E6DMqfDeczqmVMFV":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"average\"}})\n\nawait test.roll();","E6v4YZrvFikbdXoO":"const locations = [];\n\nfor (let [key, loc] of Object.entries(args.AP)) {\n if (loc.layers?.some(i => i.metal))\n locations.push(key);\n}\n\nthis.actor.status.addArmour(1, {source: this.effect, magical: true, locations})","E7D4bxz8gy4e1wL7":"return [`${game.i18n.localize(\"NAME.Stealth\")} (${game.i18n.localize(\"SPEC.Rural\")})`, game.i18n.localize(\"NAME.Track\"), game.i18n.localize(\"NAME.OutdoorSurvival\"), game.i18n.localize(\"NAME.Swim\"), game.i18n.localize(\"NAME.Perception\"), game.i18n.localize(\"NAME.Intuition\")].includes(args.item?.name);","E7ksDLhihkJN4Vpt":"return args.characteristic != \"s\" || args.type != \"characteristic\"","EBNrA6FNX4d05EUx":"return !args.context.crewTest;","EC8cZmqrE095cDc2":"const actor = args.actor;\n\nif (actor.itemTypes.skill.find(s => s.name === \"Savoir (Voies fluviales)\")) {\n const loreTest = await actor.setupSkill('Savoir (Voies fluviales)', {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'hard'},\n characteristic: 'int',\n });\n await loreTest.roll();\n\n if (loreTest.succeeded) {\n loreTest.result.other.push(`${actor.name} reconnaît les leurres des Lurkerfish.`);\n loreTest.renderRollCard();\n return;\n }\n}\n\nlet Test = await actor.setupSkill('Calme', {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'easy'},\n characteristic: 'wp',\n});\nawait test.roll();\n\nif (!Test.succeeded) {\n Test.result.other.push(`${actor.name} est devenu fasciné par la vue et incapable d'effectuer une quelconque action autre que de se déplacer vers la lumière.`);\n Test.renderRollCard();\n actor.addCondition(\"unconscious\");\n}","ECUIJLcKt2TCSFS3":"return !args.weapon?.system?.attackType || game.settings.get(\"wfrp4e\", \"useGroupAdvantage\")","EDAMEOzdBfkoKHxP":"return args.skill?.name !== game.i18n.localize(\"NAME.Navigation\");","EGWF3LHav3e2zFL4":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Ranged\")) || args.item?.isRanged || args.item?.name == game.i18n.localize(\"NAME.Charm\");","EHfOyVwYhFGWNjw1":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {difficulty: \"difficult\"})\n await test.roll();\n if (!test.succeeded)\n {\n await this.actor.addCondition(\"poisoned\");\n }","EJObiSth3WdcJOXN":"if (args.test.characteristicKey == \"wp\" && args.test.failed && args.test.result.SL <= -3)\n{\n this.script.notification(\"Ajout de A Terre\");\n this.actor.addCondition(\"prone\")\n}","EJaBfqADqlo92Fx6":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.oGbDwnLOn3isPJpO\")\nlet data = item.toObject();\ndata.name += \" (Au choix)\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","EKkdyp51Wf4csw2B":"return this.actor.statuses.has(\"frenzy\");","ENGmwaItRXO5s0XY":"await this.actor.modifyWounds(this.actor.system.characteristics.t.bonus * 3)\nthis.script.message(`Heals ${this.actor.system.characteristics.t.bonus * 3} Wounds`)\n\nthis.actor.hasCondition(\"bleeding\")?.delete()\nthis.actor.hasCondition(\"fatigued\")?.delete()\n","EQ5dtGW5kQhtAb87":"await this.actor.addCondition(\"prone\")\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"hard\"}, skipTargets: true, appendTitle : \" - \" + this.effect.name})\nawait test.roll();\nif (test.failed)\n{\n\tawait this.actor.addCondition(\"stunned\")\n}","ERxrWzSpw8qwxFVi":"this.script.notification(`Impossible d'entrer dans ${this.effect.name} !`); this.actor.addCondition(\"broken\");","ETfmit2Cx0Py77ai":"let characteristics = {\n \"ws\" : -10,\n \"bs\" : 0,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : -25,\n \"ag\" : -20,\n \"dex\" : 0,\n \"int\" : -200,\n \"wp\" : -200,\n \"fel\" : -200\n}\nlet traits = [ {name:\"Fabriqué\"}, {name:\"Vision dans l'obscurité\"}, {name:\"Peur\", value: 2}, {name:\"Insensible à la douleur\"},{name:\"Mort-vivant\"},{name:\"Instable\"} ];\nlet items = [];\n\nlet updateObj = this.actor.toObject();\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nupdateObj.system.characteristics.int.initial = 0;\nupdateObj.system.characteristics.wp.initial = 0;\nupdateObj.system.characteristics.fel.initial = 0;\n\nfor (let trait of traits)\n{\n let traitItem = await game.wfrp4e.utility.find(trait.name, \"trait\")\n if (traitItem)\n { \n let t = traitItem.toObject();\n t.system.specification.value = trait.value;\n items.push(t);\n }\n else \n {\n ui.notifications.warn(`: -200\n}\nlet traits = [ {name:`, {permanent : true})\n }\n}\n\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n\n","ETrfkHI0B9YjJqM2":"return this.item.equipped.value && this.actor.isOpposing && this.actor.attacker.test.item.attackType == \"melee\"","EU5j0hnDTG9Z6d1e":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}})\nawait test.roll();\nif(test.failed)\n{\n this.actor.addCondition(\"stunned\", 2)\n}","EVBSHEC5nmmj2X41":"return args.skill?.name != game.i18n.localize(\"NAME.Climb\") && !args.skill?.name?.includes(game.i18n.localize(\"NAME.Stealth\"));","EXiqepAIXmbqMiKa":"if (args.opposedTest?.attackerTest?.weapon?.name.toLowerCase().includes(\"unarmed\")) {\n const sl = this.effect.getFlag(\"wfrp4e-archives3\", \"sl\");\n args.totalWoundLoss += sl;\n args.modifiers.other.push({label: this.effect.name, value: sl});\n}","EYny6z5oTOhxGDfb":"args.fields.modifier -= 10;\n","EaSNOmXUxAkUHnm5":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","Eay7GpDyfsEE40jT":"if (args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"ablaze\")\n}","EdTChmSouS0MSmk5":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.succeeded)\n{\n this.script.message(\"Peut réaliser une Action ou un Déplacement (choisissez-en un)\")\n}\nelse\n{\n this.script.message(\"Ne peut pas réaliser une Action ou un Déplacement ce tour-ci\")\n}","EiLaZW4b4ypw5sLV":"// can't use Damage application type because that checks if wounds were dealt\nargs.actor.applyEffect({effectUuids : this.item.effects.contents[0].uuid})","ElHBPMMx37SZMvOC":"this.actor.addCondition(\"ablaze\");\nthis.script.scriptMessage(`${this.actor.name} has a received a @Condition[Ablaze]`)","EmXwcuycEH8slEn5":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}})\nawait test.roll();\nif(test.failed)\n{\n this.actor.addCondition(\"unconscious\")\n}","EmmG49pMOPHRwDzR":" let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n if (args.test.isFumble && roll == 1 && !args.test.result.misfire)\n {\n args.test.result.misfire = game.i18n.localize(\"Misfire\") + \" (Rolled 1)\"\n args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage)\n }\n else if (args.test.isFumble && roll != 1)\n args.test.result.other.push(\"Jet Misfire: \" + roll)\n","EpdMj9d9SYPeP44q":"return args.characteristic != \"ag\" && args.item?.id != this.item?.id","ErgOwSiVnm9VLVHN":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.DrNUTPeodEgpWTnT\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","EsZx8cY34quYG4MQ":"let runes = this.actor.itemTypes[\"wfrp4e-dwarfs.rune\"]\nif (runes.length === 0) return ui.notifications.error(\"Cet acteur ne connaît aucune rune.\")\n\nlet rune = await ItemDialog.create(this.actor.itemTypes[\"wfrp4e-dwarfs.rune\"], 1, {text: \"Sélectionnez une Rune\", title: this.effect.name})\nrune[0].system.use({initialTooltip: \"Bonus Enclume de la Destinée\", fields: {modifier: 20}})","Et4tPHlrkueLqP3T":"if (args.item.type == \"skill\") args.item.system.modifier.value -= 10","Ew3C2WmLCtc1KT46":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\")) || args.item?.id == this.item?.id","EwD053Fyy46b59ZI":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.6l3jvIAvrKxt0lA9\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","Eye6dranWpNsILjm":"if (this.actor.system.status.wounds.value <= 1)\n{\n this.effect.delete();\n}","F2u4L4o0r1LTWeWK":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = await ValueDialog.create({text : \"Entrez la valeur de Terreur\", title : this.effect.name});\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","F4aGsdzJ9SYcX57F":"if (args.equipped)\n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.HpFkVJ2lYPAWumUL\")\n let data = item.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n}\nelse \n{\n this.effect.deleteCreatedItems(); \n}","F7BHb4a7fqWMnYxH":"args.test.data.result.other.push(`You may not use Fortune Points because of ${this.effect.name}`);","F7E0Dr3sT7kkc2p7":"return this.actor.hasCondition(\"fatigued\")","F8Bmh6w01YvKsBIO":"for (const weapon of args.actor.itemTags.weapon) {\n weapon.system.qualities.value.push(\n {name: \"impale\", value: null},\n {name: \"penetrating\", value: null},\n );\n}","F9P8Nh4AKnqSGg8C":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.bxbTiLzbaz4vdukT\", // Hunter's Eye\n \"Compendium.wfrp4e-core.items.Item.XSb3QVB9ipPBFt56\", // Shadow\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","FAB12eLcSCAOOQwk":"this.script.scriptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true}));\n","FAf4iXj5LkdvukS2":"fromUuid(\"Compendium.wfrp4e-wom.items.0Xdm4r7l2EwC4fcg\").then(item => Item.create(item.toObject(), {fromEffect : this.effect.id, parent : this.actor}))","FGIHAkNdYXbTnewG":"if (!game.settings.get(\"wfrp4e\", \"useGroupAdvantage\"))\n return;\n\n\nawait this.actor.modifyAdvantage(1);\nthis.effect.delete();","FKEH7DeqU0FH4dkk":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {fields : {difficulty : \"hard\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nif (test.failed) {\n \tthis.script.scriptMessage(await this.actor.applyBasicDamage(20, {suppressMsg: true}));\n this.script.scriptMessage(`${this.actor.name} est victime de @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.WCivInLZrqEtZzF4#drowning-and-suffocation]{Suffocation}`);\n}","FMA16PvoObBV8vDl":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.EO05HX7jql0g605A\")\nitem = item.toObject()\nitem.system.specification.value = 20\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})\nthis.script.notification(item.name + \" added\")","FMSN5uRskkATexzB":"game.wfrp4e.tables.rollToChat(\"crithead\")","FPQp6XfbUH1BMafj":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Athletics\"), {fields : {difficulty : \"vhard\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tthis.actor.addCondition(\"prone\");\n this.script.scriptMessage(\"Impossible de se déplacer ou d'agir ce tour\");\n}","FPYNcxm21678boLT":"if (args.attackerTest.data.preData.rollClass !== \"CharacteristicTest\") return;\nif (args.attackerTest.data.preData.characteristic !== \"s\") return;\n\nconst SL = args.opposedTest.data.opposeResult.differenceSL;\n\nconst targetId = this.effect.getFlag(\"wfrp4e\", \"target\");\nconst target = canvas.scene.tokens.get(targetId);\n\nif (SL > 4) {\n args.opposedTest.data.opposeResult.other.push(`${args.defenderTest.actor.name} a été forcé de laisser partir ${target.name}.`);\n return await this.effect.delete();\n}\n\nif (SL > 0) {\n args.opposedTest.data.opposeResult.other.push(`${args.defenderTest.actor.name} a été empêché de serrer ${target.name} pendant un tour.`);\n let turns = this.effect.getFlag(\"wfrp4e\", \"turns\");\n this.effect.setFlag(\"wfrp4e\", \"turns\", turns + 1);\n}","FSqUqSByMiztYOQM":"if (args.totalWoundLoss > 0)\n this.script.message(`Infected: ${args.actor.name} must pass an Easy (+40) Résistance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients(\"GM\") })","FUgCtIoj1Stgqxt7":"return ![\"ws\", \"bs\", \"s\", \"ag\", \"t\", \"dex\"].includes(args.characteristic)","FX8ILw0VgbNxkObA":"const uuid = \"Compendium.wfrp4e-core.items.Item.mCvZAj5F6hfUZhzR\";\nconst item = await fromUuid(uuid);\nconst data = item.toObject();\ndata.name = this.effect.name;\ndata.type = 'trapping';\ndata.system.trappingType = {value: 'clothingAccessories'};\ndata.system.equipped = {value: true};\n\nconst effectData = this.effect.sourceItem.effects.find(e => e.disabled).toObject();\neffectData.disabled = false;\neffectData.system.transferData.equipTransfer = true;\ndata.effects = [effectData];\n\nconst dagger = await this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id});","FXuyiJoXdAh6WhRK":"return args.skill?.name == `${game.i18n.localize(\"NAME.Ride\")} (${game.i18n.localize(\"SPEC.Horse\")})` && game.combat?.active","FXwfqF0jpXlBQ9Y3":"return args.item?.system?.isMelee && this.actor.attacker","FYMLsxxg63nHNGAe":"this.actor.system.characteristics.int.modifier += 20;\nthis.actor.system.characteristics.int.calculationBonusModifier -= 2;\nthis.actor.system.characteristics.wp.modifier += 20;\nthis.actor.system.characteristics.wp.calculationBonusModifier -= 2;","FYUPfYyTYZkxRLFT":"return ![\"NAME.Endurance\", \"NAME.Cool\"].map(i => game.i18n.localize(i)).includes(args.skill?.name)","FZFOC7bip0oiWEzk":"if (args.loc == this.item.system.location.key && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 2);\n this.script.notification(\"Etat Hémorragique ajouté\")\n}","FbfJjYUyp0ArtZMb":"args.fields.modifier += 15","FceC4TNNBvRnA7JM":"this.actor.system.characteristics.s.modifier += 60;\nthis.actor.system.characteristics.s.calculationBonusModifier -= 6;","FciJSTq7dZsZIPgl":"if (args.equipped)\n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR\")\n let data = item.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n}\nelse \n{\n this.effect.deleteCreatedItems(); \n}","FfTqCPxCoxwGDTQs":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.wMwSRDmgiF2IdCJr\")\nlet data = item.toObject()\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n","FiD3mvWIBHNNIuO9":"if (args.loc == \"body\")\n{\n if ((await new Roll(\"1d2\").roll()).total == 1)\n {\n args.loc = \"head\"\n args.AP = foundry.utils.deepClone(args.actor.status.armour[args.loc]);\n this.script.message(`Localisation du coup changée pour la tête`)\n }\n}","FjmtA9s13s75DTAY":"let locs = Object.keys(this.actor.system.status.armour);\n\nlet location = locs[Math.floor(CONFIG.Dice.randomUniform() * (locs.length))];\n\ngame.wfrp4e.tables.formatChatRoll(`crit${location}`, {criticalLocation: location, showRoll: true});","Fk14eUaTRvIoCBB1":"return !args.context.dispel","FkTwk8hfHpRLbAp2":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}","FmLx9pwOkzqqU7Ph":"return args.skill?.name == game.i18n.localize(\"NAME.Track\");","FqevMs0ukQ9WuUHl":"// Each time the blade is used, the GM should secretly roll a d10.\n// On a 1, its poison has run dry, \n// and the next time it is employed it will shatter.\n\nif (this.item.getFlag(\"wfrp4e\", \"brittle\"))\n{\n ChatMessage.create({content: `${this.item.name} shatters!`})\n this.item.update({name : `${this.item.name} (Shattered)`})\n}","FtSG8J2s95hhjUMn":"let roll = await new Roll(\"1d10\").roll();\nroll.toMessage(this.script.getChatData());\nthis.effect.updateSource({duration: {value: roll.total, units: \"hours\"}});","FtZf56VI6Qsspu0D":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","FttdVBQiNssDAARh":"return args.data.targets[0]?.actor?.hasCondition(\"entangled\")","Fu8DTvSgLufcB5mr":"async function rollTable(characteristics, formula, name) {\n const roll = new Roll(formula);\n await roll.toMessage({flavor: name});\n\n const values = roll.dice[0].values;\n\n for (const value of values) {\n let characteristic;\n switch (value) {\n case 1: case 2: characteristic = \"ws\"; break;\n case 3: case 4: characteristic = \"i\"; break;\n case 5: case 6: characteristic = \"int\"; break;\n case 7: case 8: characteristic = \"fel\"; break;\n case 9: case 10: characteristic = \"*\"; break;\n default: continue;\n }\n\n if (characteristics.has(characteristic)) {\n await rollTable(characteristics, \"1d10\", name);\n } else {\n characteristics.add(characteristic);\n }\n }\n}\n\nconst characteristics = new Set();\nawait rollTable(characteristics, \"2d10\", this.effect.name)\n\nif (characteristics.has(\"*\")) {\n characteristics.delete(\"*\");\n const availableChoices = foundry.utils.duplicate(game.wfrp4e.config.characteristics);\n\n for (const ch of characteristics) delete availableChoices[ch];\n\n const result = warhammer.apps.ValueDialog.create({\n text: \"Choisissez une caractéristique\",\n }, \"\", availableChoices);\n\n if (!result) return;\n\n characteristics.add(result);\n}\n\nthis.effect.setFlag(\"wfrp4e\", \"characteristicsToSwap\", Array.from(characteristics));","Fvlc4RkeF4dHjW3m":"let caster = this.effect.sourceActor\nif (caster && (this.actor.has(game.i18n.localize(\"NAME.Undead\")) || this.actor.has(game.i18n.localize(\"NAME.Daemonic\")))) {\n let wp = caster.system.characteristics.wp.value\n if (wp > this.actor.system.characteristics.t.value) {\n if (this.actor.has(game.i18n.localize(\"NAME.Unstable\"))) {\n this.actor.update({ \"system.status.wounds.value\": 0 })\n this.actor.addCondition(\"dead\")\n }\n else {\n fromUuid(\"Compendium.wfrp4e-core.items.D0ImWEIMSDgElsnl\").then(item => {\n this.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], { fromEffect: this.effect.id })\n ChatMessage.create({ content: `Added Unstable to ${this.actor.prototypeToken.name}`, speaker: { alias: caster.name } })\n })\n }\n }\n}","Fwk8WA8NfRivLFWJ":"return args.skill?.name === \"Divertissement (Chant)\";","G1RletYc6BzigJrK":"let ablaze = parseInt(this.effect.sourceTest.result.SL) + 5\nargs.actor.addCondition(\"ablaze\", ablaze)","G7sFEnJlXZvfXL3V":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n let effectData = this.item.effects.contents[1].convertToApplied();\n\teffectData.system.sourceData.item = this.item.uuid\n\tactor.applyEffect({effectData : [effectData]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","G9ZPojp8qdjiXKZ5":"if (!args.test.preData.options?.masterslayer) return\nif (!this.item.equipped.value || !args.test.item) return;\nargs.test.preData.canReverse = true","GAO8AozttWOyRkta":"if (!args.flags.lostHand)\n{\n\targs.fields.lostHand = true;\n\targs.fields.modifier += -20;\n}","GEfWIFBSrXt0ldBM":"(await new Roll(\"1d10\").roll()).toMessage(this.script.getChatData())\nawait this.actor.addCondition(\"dead\")","GFaTz8f6PBNWrlad":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure : `Confused: Determine behaviour by @Table[bewilder] Table.`}})\nawait test.roll();\nreturn test.failed","GFkVnx4m9OwYsKGH":"args.actor.flags.ambi+= 1","GNgMG95jfabBeIwy":"if (!this.item.system.qualities.value.find(i => i.name == \"fast\"))\n{\n this.item.system.qualities.value.push({name : \"fast\"}) \n}","GNl5Zk7BZ2jhRV1I":"if (args.item.type == \"armour\")\n{\n args.item.system.AP.head = 0;\n}","GOq4TcnWbfyfCo2V":"this.script.notification(`Healed ${this.actor.characteristics.t.bonus * 2} Wounds`)\nawait this.actor.modifyWounds(this.actor.characteristics.t.bonus * 2)\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - Side Effects`,fields : {difficulty : \"difficult\"}})\nawait test.roll();\nif (test.failed)\n{\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n await roll.toMessage(this.script.getChatData())\n if (roll.total <= 3)\n {\n this.actor.addCondition(\"blinded\", 3)\n }\n else if (roll.total <= 6)\n {\n this.actor.addCondition(\"broken\");\n }\n else if (roll.total <= 9)\n {\n this.actor.addCondition(\"stunned\");\n }\n else if (roll.total == 10)\n {\n this.actor.addConditon(\"unconscious\")\n }\n}","GRfCxtYzmEx2LYU7":"if (args.totalWoundLoss >= 1)\n{\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n await roll.toMessage(this.script.getChatData());\n if (roll.total == 9)\n {\n this.script.message(`Two @UUID[Compendium.wfrp4e-eis.actors.iDy8SDTwJSlCzZMl]{Blue Horror of Tzeentch} claw their way out of ${this.actor.name}'s screaming flesh, killing them in the process.`, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n }\n}","GTZUO73pUJKpM1JB":" let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n game.dice3d?.showForRoll(roll);\n this.script.message(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))\n","GUkpYdPwoC5pc9BT":"return !args.weapon?.system.properties.flaws.crewed","GYhPhHIVrhx4pkgF":"if (args.combat.combatant.actor.uuid === this.effect.sourceItem.parent.uuid) \n{\n this.effect.delete();\n}","GZFsuynUhgZqwTGo":"if (args.totalWoundLoss >= 1)\n{\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: \"Gained a Poisoned Condition\", success: \"Resisted the poison\" }})\n await test.roll();\n if (test.failed)\n {\n args.actor.addCondition(\"poisoned\");\n }\n}\n ","GbPEy22VuCNzlNv2":"return !this.actor.isMounted || (!args.skill?.name?.includes(game.i18n.localize(\"NAME.Ride\")) && !args.context.dodge)","Gc8S5TYlVdV8NnOT":"let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name, context: { failure: \"Gained a Broken Condition\", success: \"Resisted the Broken Condition\" } })\n\n await test.roll();\n\n if (!test.succeeded)\n {\n args.actor.addCondition(\"broken\");\n }","GcIQtshex11AMmh2":"if (this.item.system.isEquipped)\n{\n let removeRepeater = false\n if(!this.item.system.offhand.value) // main\n {\n let offhandUsed = this.actor.itemTypes.weapon.find(i => i.system.isEquipped && i.system.offhand.value)\n if (offhandUsed)\n {\n removeRepeater = true;\n }\n }\n else // offhand\n {\n let mainhandUsed = this.actor.itemTypes.weapon.find(i => i.system.isEquipped && !i.system.offhand.value)\n if (mainhandUsed)\n {\n removeRepeater = true;\n }\n }\n \n if (removeRepeater)\n {\n this.item.system.qualities.value = this.item.system.qualities.value.filter(i => i.name != \"repeater\")\n }\n}","GePFbu5kp2ymGYEQ":"await this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.IAWyzDfC286a9MPz\", this.effect);","Gh7OidY6UdpWBS1g":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.KII1gWnxIZ8HzmU5\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","GjUD5L4h8FXGVgGQ":"args.initiative += \"+30\";","GjkxWj9wCAclM9WA":"let effects = foundry.utils.deepClone(this.item.effects.contents.filter(e => e.active));\n\neffects.splice(effects.length - 1);\n\nif (effects.length == 0)\n{\n return this.script.notification(\"Tous les effets ont été utilisés. Réinitialisez pour les sélectionner à nouveau\")\n}\nlet choice = await ItemDialog.create(effects, 1, \"Choisir un effet à gagner\");\n\nif (choice[0])\n{\n choice[0].update({disabled : true})\n let effect = choice[0].convertToApplied();\n effect.name += ` (${this.effect.name})`\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [effect]);\n}","GrF6tQ08jgKmUH4i":"return ![\"ws\", \"bs\", \"s\", \"ag\", \"i\"].includes(args.characteristic)","GsAyB5xnK3ASeoah":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'easy';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","Gsilp71BmIyHHce6":"args.context.masterslayer = true","GtfHQA9T1ip463le":"return ![\"ws\", \"bs\"].includes(args.characteristic)","GuSIY4Zqhc68qVEH":"if (!args.messageSent)\n{ \n args.messageSent = true;\n let runes = this.item.effects.contents.filter(i => i.name == this.effect.name);\n this.script.message(`${args.attacker.speaker.alias} reduce Run speed by ${runes.length * 4} yds.`)\n}","GuUCErVbk5hrFzR3":"args.multiplier.tb += 1","GuxbvztcvzJz2oH1":"args.item.system.qualities.value = [];","GzSFlqL1YrIK1dxh":"let items = await Promise.all([\"Compendium.wfrp4e-wom.items.Item.EjGYZ4CgX2jZW7Ot\",\n\"Compendium.wfrp4e-wom.items.Item.O2v9RQiFf0obskP5\",\n\"Compendium.wfrp4e-wom.items.Item.2cv6hhZ57iV6z5Il\",\n\"Compendium.wfrp4e-wom.items.Item.YgDEUO0G0XcqQJqg\",\n\"Compendium.wfrp4e-wom.items.Item.J6K5TPxI8qIGQKKH\",\n\"Compendium.wfrp4e-wom.items.Item.K9FPtiDLwTkC7FuO\",\n\"Compendium.wfrp4e-wom.items.Item.CkMYRYCLrkMnyVm5\",\n\"Compendium.wfrp4e-wom.items.Item.0Xdm4r7l2EwC4fcg\"].map(fromUuid));\n\nlet choice = await game.wfrp4e.apps.ItemDialog.create(items, 1, \"Sélectionner un Vent\")\n//this.actor.createEmbeddedDocuments(\"Item\", items);\n\nthis.item.update(choice[0]?.toObject(), {diff: false, recursive : false});\n\n//this.actor.items.getName(this.effect.item.name).delete() // For some reason this.effect.item.delete() throws an error\n","GzsuEg7gZy1f0ljy":"let bleeding = this.actor.hasCondition(\"bleeding\")\nif (bleeding)\n{\n this.script.notification(`Suppression de ${bleeding.conditionValue} états Hémorragique`)\n Saignement.delete();\n}\nelse\n{\n this.script.notification(`Aucun état Hémorragique`)\n}","H06Ysj7oPiemW7S6":"if (args.test.options.income && !args.test.options.criminal)\n{\n args.test.options.criminal = true;\n let currentCareer = args.test.actor.system.currentCareer;\n let coin = {1 : \"b\", 2 : \"s\", 3 : \"s\", 4 : \"g\"}[currentCareer.system.level.value] // b, s, or g maps to 2d10, 1d10, or 1 respectively (takes the first letter)\n let term = {1 : \"bp\", 2 : \"ss\", 3 : \"ss\", 4 : \"gc\"}[currentCareer.system.level.value] // b, s, or g maps to 2d10, 1d10, or 1 respectively (takes the first letter)\n let dieAmount = {1 : \"2d10\", 2 : \"1d10\", 3 : \"2d10\", 4 : \"1\"}[currentCareer.system.level.value] // b, s, or g maps to 2d10, 1d10, or 1 respectively (takes the first letter)\n dieAmount = parseInt(dieAmount[0]) * this.item.system.Advances; // Multilpy that first letter by your standing (Brass 4 = 8d10 pennies)\n if (coin != \"g\") // Don't roll for gold, just use standing value\n {\n dieAmount = dieAmount + \"d10\";\n }\n let moneyEarned = (await new Roll(dieAmount.toString()).roll()).total;\n let moneyString = `${moneyEarned}${coin}`\n let transactionString = `${moneyEarned}${term}`\n\n this.script.message(`Gain additionnel de ${game.wfrp4e.market.amountToString(game.wfrp4e.market.parseMoneyTransactionString(transactionString))}`, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","H1z3nWW7Rj3Oisxy":"return args.type != \"channelling\"","H2CJvApKMnfGNNoo":" if (args.test.item?.type == \"skill\" && args.test.item.name.includes(game.i18n.localize(\"NAME.Stealth\")))\n{ \n args.test.result.description = \"Astounding Failure\";\n args.test.result.outcome = \"failure\";\n ChatMessage.create({content : \"SQUEAK\", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true})\n AudioHelper.play({ src: `${game.settings.get(\"wfrp4e\", \"soundPath\")}squeek.wav` }, true);\n}","H3Wls12aVWAWTp9J":"this.actor.setupCharacteristic(\"i\", {skipTargets: true, appendTitle : \" - \" + this.effect.name}).then(test => {\n test.roll();\n})","H3pZ9UeIzIz3luKh":"args.actor.addCondition(\"bleeding\")\n\nthis.actor.setFlag(\"wfrp4e\", \"isAttached\", args.actor.name)\n\nthis.script.message(`Attaches to ${args.actor.name}`)","H7BFq8m8vnkm4Yux":"let skill = this.actor.itemTypes.skill.find(s => s.name === game.i18n.localize(\"NAME.Pray\"));\nskill.system.modifier.value -= 10;","H7lcCU24gFDp7zK7":"let amount = this.effect.sourceTest.result.baseSL;\nargs.fields.successBonus += amount;","H85k4L3yICm7cfIk":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Voile';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","H8jDtK1Ewn4hL3A1":"args.fields.slBonus += 4;","HASsi6wYHVALExWq":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: \"1 Corruption Point Gained\" } })\nawait test.roll();\n\nif (test.failed && args.actor.type == \"character\") \n{\n let msg = \"\"\n msg += `

${this.actor.prototypeToken.name} gained a Corruption point

`\n if (test.result.roll % 11 == 0 || test.result.roll == 100)\n {\n msg += `${args.actor.prototypeToken.name} gains a mutation (@Table[expandedmutatephys]{Physical} or @Table[expandedmutatemental]{Mental}) and gains @UUID[Compendium.wfrp4e-core.items.hiU7vhBOVpVI8c7C]{Chaos Magic (Tzeentch)}`\n }\n this.script.message(msg, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n await this.actor.update({ \"system.status.corruption.value\": parseInt(args.actor.status.corruption.value) + 1 })\n}","HG2fKOfruT5QV3A4":"let lore = await ValueDialog.create({text : \"Choisissez un Savoir\", title : \"Savoir\"}, \"\", {\"fire\" : \"Fire\", \"death\" : \"Death\", \"metal\" : \"Metal\", \"shadow\" : \"Discret\"});\n\nlet filters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"petty\"\n }\n]\n\nlet petty = await ItemDialog.createFromFilters(filters, 3, {text: \"Choisissez 3 Sorts Mineurs\"})\n\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : [\"\"]\n }\n]\n\nlet arcane = await ItemDialog.createFromFilters(filters, 6, {text: \"Choisissez 6 Sorts d'Arcane\"})\n\nlet items = petty.map(i => i.toObject()).concat(arcane.map(i => {\n let spell = i.toObject();\n spell.img = `modules/wfrp4e-core/icons/spells/${lore}.png`\n spell.system.lore.value = lore;\n return spell;\n}));\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","HGVGO217uW1k5YDh":"args.fields.slBonus -= 4;","HJ2X4ZtXei0BXbxf":" let choices = await Promise.all([warhammer.utility.findItemId(\"PzimjNx9Ojq4g6mV\"), warhammer.utility.findItemId(\"rOPmyLWa37e7s9v6\")])\n let items = await game.wfrp4e.apps.ItemDialog.create(choices, 1, \"Choisir une Compétence\")\n\n items = items.map(i => i.toObject())\n items.forEach(i => i.system.advances.value = 20)\n\nitems.forEach(i => i.system.equipped.value = true)\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","HKhyn0kijKfzW6cw":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}})\nawait test.roll();\nthis.item.updateSource({\"flags.wfrp4e.passed\" : test.succeeded})","HMC6hPND9DWLFfZE":"if (this.item.name.includes(\"(\"))\n{\n\treturn;\n}\n\nlet index = game.packs\n.filter(i => i.metadata.type == \"Item\")\n.reduce((acc, pack) => acc.concat(pack.index.contents), [])\n.filter(i => i.type == \"skill\" && i.name.includes(game.i18n.localize(\"NAME.Lore\")))\n.map(i => {\n\ti.id = i._id\n\treturn i\n})\n\nlet choice = await ItemDialog.create(index, 1, \"Choose a Lore\")\nlet text;\nif (!choice[0])\n{\n let custom = await ValueDialog.create({text : \"Enter Lore\", title : this.effect.name});\n text = custom || \"\";\n}\nelse \n{\n text = game.wfrp4e.utility.extractParenthesesText(choice[0].name)\n}\n\nawait this.item.updateSource({name : this.item.name + ` (${text})`, \"system.tests.value\" : this.item.system.tests.value.replace(\"chosen Lore\", text)})\nawait this.effect.updateSource({name : this.effect.name + ` (${text})`})","HOt2hHOiHDZ7oBgW":"if ([\"rLeg\", \"lLeg\"].includes(this.effect.getFlag(\"wfrp4e\", \"location\")))\n{\n\targs.actor.details.move.value /= 2\n}\n","HUKzssLxeQo1wbx9":"\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"average\"}, appendTitle : \" - Wounded\"})\n await test.roll();\n if (test.failed)\n {\n fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\").then(disease => {\n this.actor.createEmbeddedDocuments(\"Item\", [disease.toObject()])\n this.script.notification(\"Gained \" + disease.name)\n })\n }\n ","HX6CjNapYdC0VmQ8":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.epPBu7x6BRWp2PHG\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","HXJKkmpfxQUOnWOS":"if (!this.item.system.twohanded.value)\n{\n this.item.system.flaws.value = this.item.system.flaws.value.concat([{name : \"tiring\"}, {name : \"slow\"}])\n}","HYrl5aNMm8BAdqH7":"\n let modifier = 0\n if (this.effect.name.includes(\"Moderate\"))\n modifier = -20\n else\n modifier = -10\n args.fields.modifier += modifier\n ","Hcpn1gU58DIKIhty":"if (args.item.type == \"skill\" && args.item.name == `${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Flail\")})`)\n{\n args.item.system.modifier.value += 10;\n}","HdTuY2IGhdlMDOy3":"if (this.actor.system.details.experience.current < 100) {\n return this.script.notification(game.i18n.localize(\"SCRIPT.NotEnoughXP\"))\n}\n\nlet item = await game.wfrp4e.utility.findItem(\"Animal Telepathy\", \"trait\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item]);\nlet expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);\nexpLog.push({amount : 100, reason: item.name, spent: this.actor.details.experience.spent + 100, total: this.actor.details.experience.total, type: \"spent\"});\nthis.actor.update({\n \"system.details.experience.spent\": this.actor.details.experience.spent + 100,\n \"system.details.experience.log\": expLog\n });","HfCxNd7mFGZH4s9Y":"// An opponent that takes more than a single Wound from a Warp Blade strike \n// in melee combat must make an Average (+20) Endurance Test \n// or take a Stunned Condition\n\n\nif (args.totalWoundLoss > 1) {\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"average\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if(test.failed)\n {\n await args.actor.addCondition(\"stunned\");\n }\n}","HfZAQWoY8n3clLlo":"if (!args.itemCreated) return;\nif (args.itemCreated.type !== \"critical\") return;\nif (args.itemCreated.system.location.value.toLowerCase() !== \"head\") return;\nif (Number(args.itemCreated.system.wounds.value) > 0) {\n this.script.message(game.i18n.format(\"SCRIPT.Sallet\", {name: args.itemCreated.parent.name, wounds: args.itemCreated.system.wounds.value}))\n}","HgzIi6m6dkXbVWHp":"if (args.test.skill?.name == \"Calme\")\n{\n args.test.preData.roll = 1;\n args.test.preData.other.push(this.effect.name)\n}","Hi005w1Ul17Q8Uty":"let test = this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"average\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.succeeded)\n{\n\tthis.effect.delete()\n}","HiDcm1jhG3sU39ME":"this.actor.addCondition(\"ablaze\");\nlet colors = {\n fire : \"#b22222\",\n heavens : \"#87ceeb\",\n metal : \"#ee9b3a\",\n shadow : \"#808080\",\n life : \"#008000\",\n beasts : \"#a52a2a\",\n light : \"#f0ffff\",\n death : \"#800080\",\n necromancy : \"#800080\",\n daemonology : \"#8b0000\"\n};\n\nlet spell = this.actor.itemTypes.spell.find(i => Object.keys(colors).includes(i.system.lore.value[0]));\n\nlet color;\nif (spell)\n{\n color = colors[spell.system.lore.value[0]];\n}\nelse \n{\n color = Object.values(colors)[Math.ceil(CONFIG.Dice.randomUniform() * 10)];\n}\n\nthis.effect.updateSource({changes: this.effect.changes.concat({key: \"token.light.color\", type: \"override\", value: color})});","HiMBS6GeOwEydWYN":"return args.skill?.name != game.i18n.localize(\"NAME.Climb\");","HmImVzvw6ecBy99l":"if (args.loc == \"body\" && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 2)\n this.script.notification(\"Etat Hémmoragique appliqué : 2 niveaux de saignement\")\n}","HoNTnPphrJISSQr1":"ChatMessage.create({content : \"Parle et fais toi connaître\", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true})","Hq1G30lhJYvtOSNb":" \n if (args.test.failed)\n {\n let applicableCharacteristics = [\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"];\n if (applicableCharacteristics.includes(args.preData.characteristic))\n {\n this.actor.addCondition(\"stunned\");\n }\n }","HrOBAXsEX073ReKl":"let skill = `${game.i18n.localize(\"NAME.Entertain\")} (${game.i18n.localize(\"SPEC.Singing\")})`;\nlet currentCareer = this.actor.system.currentCareer;\nlet existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill);\n\nif (!currentCareer) return\n\n\nlet inCurrentCareer = currentCareer.system.skills.concat(currentCareer.system.addedSkills).includes(skill);\nlet perfectPitchAdded = this.actor.getFlag(\"wfrp4e\", \"perfectPitchAdded\") || {};\nif (existingSkill && inCurrentCareer && !perfectPitchAdded[existingSkill.name])\n{\n\texistingSkill.system.advances.costModifier = -5;\n}\nelse \n{\n\tperfectPitchAdded[skill] = true;\n\tcurrentCareer.system.addedSkills.push(skill);\n\tfoundry.utils.setProperty(this.actor, \"flags.wfrp4e.perfectPitchAdded\", perfectPitchAdded)\n}\n\n\n","HrYchgkdZBiu1yPF":"return args.skill?.name == game.i18n.localize(\"NAME.Climb\");","HwbgUIbpX0D8JLOR":"if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == \"attacker\")\n this.actor.addCondition(\"bleeding\")","I0Jo6cbNAJtXUloc":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.J9MK0AIaTbvd5oF6\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], {fromEffect : this.effect.id});","I0oRZ7AWde5KI5jw":"return ![\"t\", \"int\"].includes(args.characteristic)","I1J2m5uud84N50Lk":"if ([\"cast\", \"channelling\", \"pray\"].includes(args.type))\n{\n\targs.abort = true;\n\tthis.script.scriptNotification(\"Impossible d'incanter un Sort ou d'utiliser un Prière\");\n}\nelse return true;","I2I4ZJjN3EUSow0t":"return args.item?.system?.attackType != \"ranged\"\n || this.item != args.item\n || this.actor.isOpposing","I5DqzmfuTGwyFWLY":"return ![game.i18n.localize(\"NAME.Intimidate\"), game.i18n.localize(\"NAME.Leadership\")].includes(args.skill?.name);","I67tdJctEqXSQPE0":"this.effect.update({\"disabled\": false})","I79D8V8OFzMCtL40":"const target = await ValueDialog.create({title: \"Sélectionnez une Cible\", text: \"Sélectionnez une Cible pour la Haine\"}, \"Target\");\nawait this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN\", this.effect, {name: `Hatred (${target})`});","I7ieW0hNYvvX0KFg":"return args.skill?.name != game.i18n.localize(\"NAME.Heal\");","I8JS4z90PtWIG2nb":"return this.actor.hasCondition(\"prone\")","I93i49wI9ZrDHT4n":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.jt0DmVK9IiF6Sd2h\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","I9QAPKbaXwMMMBT4":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty: \"average\"}, skipTargets: true, appendTitle : \" - \" + this.effect.name})\nawait test.roll();\nif(test.failed)\n{\n await this.actor.addCondition(\"stunned\");\n let secondTest = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty: \"easy\"}, skipTargets: true, appendTitle : \" - Despair\"})\n await secondTest.roll();\n if(secondTest.failed)\n {\n this.effect.updateSource({name : \"Taste of Death\"})\n await this.actor.addCondition(\"fatigued\");\n }\n else \n {\n return false;\n }\n}","IAGla7HJlYN0wa4H":"if (args.test.characteristicKey == \"wp\")\n{\n if (args.test.failed)\n {\n this.actor.addSystemEffect(\"convulsions\")\n this.script.message(`Test de FM échoué, ${this.actor.prototypeToken.name} reçoit @Symptom[Convulsions] pour [[1d10]] heures`)\n }\n}","ID8mCcjkl7PCQhDq":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nif(test.failed)\n{\n let damage = this.effect.sourceItem.system.computeSpellDamage(\"3\", true);\n this.script.message(await this.actor.applyBasicDamage(damage, {suppressMsg: true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP}))\n}","IDvpVMkR2HXoNpPp":"return args.skill?.name !== \"Esquive\";","IEDJHIYaZLhmrK4X":"return ![\"weapon\", \"cast\"].includes(args.type) || (!this.item.equipped.value)","IFXsTRAVDUeVvcRc":"let roll = await new Roll(\"1d100\")\nawait roll.evaluate()\nawait roll.toMessage({\"flavor\": `Wyssan's Dice Reversal`})\n\nif (roll.result % 11 === 0 || roll.result === 100) {\n await this.item.setFlag(\"world\", \"inert\", true)\n}","IG4zYqtN9fRSYE7q":"args.actor.addCondition(\"ablaze\");","IKiZv9YSFmKmHo6a":"return args.spell?.system.lore.value == \"fire\"","ILqHxk7deotgI3KD":"if (args.item.type != \"weapon\")\n return\n\nlet reach = args.item.reach.value\nlet reachNum = game.wfrp4e.config.reachNum[reach]\nreachNum = Math.min(reachNum + 2, 7)\n\nlet key = warhammer.utility.findKey(reachNum, game.wfrp4e.config.reachNum)\n\nargs.item.reach.value = key","IM8nRo6Jx2I8RJ0L":"return (args.item?.skillToUse?.name == args.skill?.name)","IN4ZFOPooqJtNuIQ":"return args.characteristic !== \"s\" && args.characteristic !== \"t\" && args.weapon?.system?.attackType !== \"melee\";","IOroJBqTsWvoakJN":"if (args.actorsystem.details.move.oars.value > 0)\n args.actor.system.details.move.oars.value -= 2;\n","IPPDvZdE8kn3H9z7":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\n\nif (test.failed)\n{\n await this.actor.addCondition(\"grappling\")\n}","IR5URcjnCuWBFMoN":"// If a full dose is imbibed, \n// the victim must pass a Hard (-20) Endurance Test.\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty: \"hard\"}})\nawait test.roll()\nif (test.failed)\n{\n this.script.message(`

${this.actor.prototypeToken.name} notices nothing amiss save that they become tired a little earlier than usual. At this point it is still possible to save the victim via a powerful antidote or magical means.

\n

Once they fall asleep however, it is almost impossible. At this point the victim must make a Hard (-20) Endurance Test. If they fail, they never awaken.

`, \n {\n whisper: ChatMessage.getWhisperRecipients(\"GM\"), \n blind: true \n })\n}\nreturn test.failed;","IR86DuMbVdbGOJYt":"this.actor.addCondition(\"blinded\")","IXXrxNSLqXEqtuDU":"if (args.actor.details.move.value > 1) {\n args.actor.details.move.value -= 1 \n}","IdTjIw1yduvCdwdR":"if (args.type == \"effect\" && args.options.action == \"delete\" && [\"blinded\"].some(i => args.document.statuses.has(i)))\n{\n this.script.notification(\"Impossible de retirer \" + args.document.name);\n return false;\n}","IfEu1hO8sKEZBpvg":"let value = parseInt(this.item.specification.value)\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM && game.user.targets.size)\n{\n game.user.targets.forEach(t => {\n t.actor.applyPeur(value, name)\n })\n game.canvas.tokens.setTargets([])\n\n}\nelse \n{\n game.wfrp4e.utility.postPeur(value, name)\n}","IhoCoul5okDx0jBa":"if (args.test.weapon.properties.qualities?.blast) {\n args.test.weapon.properties.qualities.blast.value ++;\n if (args.test.options.shortfuse) {\n args.test.result.other.push (`${this.effect.name}: Blast Rating increased`)\n }\n args.test.options.shortfuse = true\n}","IkGegSuQwwVPhrjF":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn\")\nlet data = item.toObject();\ndata.system.specification.value = 1\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","IkVcIRmmgQjsBUUf":"let roll = await new Roll(\"1d100\")\nawait roll.evaluate()\nawait roll.toMessage({\"flavor\": `Wyssan's Dice Reversal`})\n\nif (roll.result % 11 === 0 || roll.result === 100) {\n await this.item.setFlag(\"world\", \"inert\", true)\n this.script.message(`${this.item.name} loses its magical properties`, {blind: true, whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}","Ip8sctF9SIE1Z2vF":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.UnJ25lL8aUzem5JO\")\nlet data = item.toObject();\ndata.system.specification.value = 3\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","IpoOOjYJs6RmVrpb":"if (args.totalWoundLoss > 0)\n{\n args.attacker.applyEffect({effectUuids : this.effect.sourceItem.effects.contents[1].uuid})\n}","IrkWq7IiFS65bTvC":"if (this.actor.flags.holed.half !== true) return;\nif (this.actor.flags.holed.reminded === true) return;\n\nconst speaker = ChatMessage.getSpeaker({actor: this.actor});\nthis.script.message(`

${speaker.alias} sits heavily in the water. Unless the cargo is waterproof, it loses [[d10]]% of its value.

`);\n\nthis.actor.flags.holed.reminded = true;","IsLAvY9ikR1cOJWw":"return ![\"NAME.Row\", \"NAME.Swim\"].map(i => game.i18n.localize(i)).includes(args.skill?.name);","IslMfFgpgQq2brpu":"if (this.actor.hasCondition(\"broken\"))\n{\n this.actor.removeCondition(\"broken\")\n this.script.scriptNotification(`Impossible de supprimer l'état Brisé`);\n}","IukS0clr1yAleacc":"this.actor.system.characteristics.ag.modifier -= parseInt(this.item.system.location.value) || 1\n\nthis.actor.system.characteristics.ws.modifier -= parseInt(this.item.system.location.value) || 1","IupskvzvoGyD2H5o":"if (this.actor.type != \"character\")\n{\n return;\n}\n\nlet god = await ValueDialog.create({text : \"Choisissez un Dieu\", title : \"Béni\"})\n\nif (god)\n{\n let prayers = await warhammer.utility.findAllItems(\"prayer\", \"Chargement des Prières\", true, [\"system.type.value\", \"system.god.value\"])\n let blessings = prayers.filter(p => p.system.god.value.split(\",\").map(i => i.trim().toLowerCase()).includes(god.toLowerCase()) && p.system.type.value == \"blessing\")\n let configBlessings = await Promise.all((game.wfrp4e.config.godBlessings[god.toLowerCase()] || []).map(fromUuid));\n if (god == \"Foi Antique\")\n {\n blessings = await ItemDialog.create(prayers.filter(i => i.system.type.value == \"blessing\"), 6, {text : \"Sélectionnez 6 Bénédictions\", title : \"Béni\"})\n }\n if (configBlessings.length)\n {\n // Combine blessings defined by config with actual blessing items found that specify this god, avoiding duplicates\n blessings = blessings.concat(\n configBlessings.map(i => {return {uuid : i.uuid, name : i.name}})\n .filter(bls => !(blessings.find(i => i.uuid == bls.uuid)))\n );\n }\n if (blessings.length)\n {\n this.script.scriptNotification(\"Ajout de \" + blessings.map(i => i.name).join(\", \"))\n await this.actor.addEffectItems(blessings.map(i => i.uuid), this.effect)\n }\n else\n {\n this.script.scriptNotification(`Impossible de trouver des Bénédictions associées à ${god}.`)\n }\n if (this.item.name.includes(\"Au choix\"))\n this.item.updateSource({name: this.item.name.replace(\"Au choix\", god)});\n else\n this.item.updateSource({name: this.item.name + ` (${god})`});\n await this.actor.update({\"system.details.god.value\": god})\n}","IurWrdbjsmMtTWuq":"return !this.actor.hasCondition(\"prone\")","IuxMr6SFdJhqFtVD":"this.actor.system.status.corruption.value += 3","IzZcsSngI8TZH4d8":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.fjd1u9VAgiYzhBRp\");\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","IzoOmDywGLqLNljN":"let skill = `Language (Magick)`\nlet currentCareer = this.actor.system.currentCareer;\nlet existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill);\n\nif (!currentCareer) return\n\n\nlet inCurrentCareer = currentCareer.system.skills.concat(currentCareer.system.addedSkills).includes(skill);\nlet witchAdded = this.actor.getFlag(\"wfrp4e\", \"witchAdded\") || {};\nif (existingSkill && inCurrentCareer && !witchAdded[existingSkill.name])\n{\n\texistingSkill.system.advances.costModifier = -5;\n}\nelse \n{\n\twitchAdded[skill] = true;\n\tcurrentCareer.system.addedSkills.push(skill);\n\tfoundry.utils.setProperty(this.actor, \"flags.wfrp4e.witchAdded\", witchAdded)\n}","J0IWUhxada2ONowP":"return args.skill?.name == `${game.i18n.localize(\"NAME.Entertain\")} (${game.i18n.localize(\"SPEC.Sing\")})` || args.skill?.name == `${game.i18n.localize(\"NAME.Entertain\")} (${game.i18n.localize(\"SPEC.Singing\")})` || args.skill?.name.includes(game.i18n.localize(\"SPEC.Magick\")) || args.skill?.name.includes(game.i18n.localize(\"SPEC.Eltharin\") || args.skill?.name.includes(game.i18n.localize(\"SPEC.Cathayan\")));","J1FPDdrXGctKDTZz":"if (args.equipped)\n{\n let ward = await fromUuid(\"Compendium.wfrp4e-core.items.Bvd2aZ0gQUXHfCTh\")\n wardData = ward.toObject()\n wardData.system.specification.value = \"8\"\n \n let mr = await fromUuid(\"Compendium.wfrp4e-core.items.yrkI7ATjqLPDTFmZ\")\n mrData = mr.toObject()\n mrData.system.specification.value = 2\n \n this.actor.createEmbeddedDocuments(\"Item\", [wardData, mrData], {fromEffect : this.effect.id})\n}\nelse\n{\n this.effect.deleteCreatedItems()\n}","J5XafRL0FyZnBPl2":"this.actor.addCondition(\"deafened\");","J60gMzmsNau8j53K":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nawait this.effect.update({duration:{rounds: this.actor.system.characteristics.ag.bonus + excessSL}});","J8aPichsl25t1QZ9":"this.actor.addCondition(\"entangled\", this.effect.sourceTest.result.SL)","J8k4ahQdZhXDfU1l":"return args.skill?.name == \"Runesmithing\"","JBoKPBr27C3PMoSD":"return args.skill?.name === game.i18n.localize(\"NAME.Navigation\");","JEbs0WlqhKNDOo5A":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"unconscious\")\n}\n","JFgXyb6bKjZJLmF8":"return args.characteristic == \"ag\"","JKpC9pVATysq8k4G":"let damage = this.effect.sourceItem.system.Damage;\nconst flying = this.actor.has(game.i18n.localize(\"NAME.Flight\"));\n\nif (flying) damage++;\n\nawait this.actor.applyDamage(damage, {\n loc: \"roll\",\n createMessage: this.script.getChatData(),\n});\n\nconst test = await this.actor.setupSkill(\n game.i18n.localize(\"NAME.Athletics\"),\n {\n fields: {\n slBonus: flying ? -1 : 0,\n difficulty: \"average\"\n },\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n },\n);\n\nawait test.roll();\n\nthis.effect.setFlag(\"wfrp4e\", \"failed\", !!test.failed);","JLn1B9eL53nSUq88":"if (args.test.isCritical || args.test.isFumble)\n args.test.result.tables.miscast = {\n label : game.i18n.localize(\"ROLL.MinorMis\"),\n class : \"fumble-roll\",\n key : \"minormis\",\n }\ndelete args.test.result.critical;\ndelete args.test.result.tables.critical;","JQruHprM5R5vZ9DA":"let caster = this.effect.sourceActor;\nif (caster)\n{\n let healed= caster.system.characteristics.wp.bonus + caster.system.characteristics.int.bonus\n await this.actor.modifyWounds(healed);\n this.script.message(`${this.actor.prototypeToken.name} regains ${healed} Wounds`)\n}\n \n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"vhard\"}, context : {success : \"1 Corruption point that was gained within the last hour is removed.\", failure: \"Nothing happens\"}})\n await test.roll();","JTW6557K8nI5p9mL":"game.wfrp4e.tables.formatChatRoll(`mutatephys`, {showRoll: true});","JToUa1mDQ2h3ILKF":"const test = await actor.setupSkill('Cool', {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'difficult'},\n characteristic: 'wp',\n context: {\n failure: \"You became beguiled by the eerie singing and unable to perform any action except moving towards the Oceanid. You count as Helpless.\"\n }\n});\nawait test.roll();","JVQK6VW73KxfeJJi":"if (args.totalWoundLoss > 0)\n {\n args.modifiers.other.push({label : this.effect.name, value : args.totalWoundLoss + 4})\n args.totalWoundLoss = (args.totalWoundLoss * 2) + 4\n }","JWEY8OS0ns1fNsQV":"let extra = this.effect.getFlag(\"wfrp4e\", \"extra\")\nif (!this.item.system.properties.qualities[extra]) \n{ \n this.item.system.qualities.value.push({name : extra});\n}","JXBUE0XuJOJNG7zE":"if (args.totalWoundLoss <= 7) return;\n\nlet options = {\n appendTitle : \" – \" + this.effect.name,\n skipTargets: true,\n fields: {difficulty: 'average'},\n characteristic: 'wp',\n}\n\nlet Test = await args.actor.setupSkill('Calme', options);\nawait test.roll();\n\nif (!test.succeeded) {\n const targetId = this.effect.getFlag(\"wfrp4e\", \"target\");\n const target = canvas.scene.tokens.get(targetId);\n await this.effect.delete();\n args.extraMessages.push(`${args.actor.name} perd ${args.totalWoundLoss} Points de Blessures lors de l'attaque, ce qui l'a forcé à lâcher ${target.name}.`);\n}","JZIn1dsKHFE3smJU":"let ablaze = parseInt(this.effect.sourceTest.result.SL) + 1\nargs.actor.addCondition(\"ablaze\", ablaze)","JaiC5P6nIgctOacH":"if (args.actor.system.details.species?.value?.toLowerCase() == \"dwarf\")\n{\n args.weaponProperties.flaws.undamaging = true;\n}","JavuFNZ9Pj5elVLc":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet data = item.toObject();\ndata.system.specification.value = 4 - this.actor.characteristics.s.bonus\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","JeThJbOf6Xmbtgo1":"this.script.message(await this.actor.applyBasicDamage(8 + parseInt(this.effect.sourceTest.result.SL), {suppressMsg : true}))\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Athletics\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}","JfOodll9a2Lw0fWg":"let blinded = args.actor.hasCondition(\"blinded\")\nif (blinded)\n{\n blinded.system.scriptData = blinded.system.scriptData.filter(s => s.trigger != \"dialog\")\n blinded.system._scripts = null;\n}","JgCcgDVZX54slrWx":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Melee\")) || args.item?.isMelee || args.context.corruption","JhCMYHHYA860Kka8":"return !this.actor.attacker || args.item?.system?.attackType !== \"melee\" || args.skill?.name !== game.i18n.localize(\"NAME.Dodge\");","JhbZWZhOJ23yOBmG":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'hard';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","JibNjuQrJRnY0yf9":"return this.actor.flags.useless.rEye && this.actor.flags.useless.lEye && ([\"ws\", \"bs\"].includes(args.characteristic) || args.skill?.name?.includes(game.i18n.localize(\"NAME.Ride\")) || args.weapon || args.context.dodge)","JjDzMnUxaWQePIYh":"return args.characteristic != \"int\"","JjiPprLSlSmmB5Ga":"args.item.system.damage.value += \" + 1\"","Jjq3oPYbI26zjxME":"let location = this.item.system.location.key;\n\nif (location)\n{\n let dropped = this.item.system.weaponsAtLocation;\n\n if (dropped.length)\n {\n this.script.notification(`Lâche ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}\n\nlet roll = await new Roll(\"1d10\").roll()\n\nroll.toMessage(this.script.getChatData({flavor : `Lâche ${dropped.map(i => i.name).join(\", \")}!`}));\n\nthis.effect.updateSource({\"duration.rounds\" : roll.total})","Jk7OHqx06oCUVAzb":"return ![`${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`, `${game.i18n.localize(\"NAME.Channelling\")} (Hysh)`].includes(args.skill?.name)","JmZQRvdWjm9ykYfn":"if (this.actor.hasCondition(\"surprised\"))\n{\n this.actor.removeCondition(\"surprised\")\n this.script.message(`Impossible d'être surpris`);\n}","Jnp5c09sPzDD61EK":"this.script.notification(`${args.actor.prototypeToken.name} must pass an Average (+20) Willpower Test to attack this target!`)\n\nreturn true; // No need to show this in the dialog","JstrA46EYSEuRSy5":"if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) && this.actor.has(game.i18n.localize(\"NAME.Construct\")))\n this.actor.addCondition(\"dead\")","JwYZJGkZMSM2M3Si":"if (args.totalWoundLoss > 0)\n{\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\n await test.roll()\n if (test.failed)\n {\n args.totalWoundLoss += this.effect.sourceActor.system.characteristics.wp.bonus\n args.modifiers.other.push({label : this.effect.name, value : this.effect.sourceActor.system.characteristics.wp.bonus})\n }\n}","JwgFQmPQtXWAP94i":"this.actor.addCondition(\"fatigued\");","JyTxUG5dNW670Sf7":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.7mCcI3q7hgWcmbBU\")\nlet data = item.toObject();\ndata.system.location.key= this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n \nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\")\n}","K06v93N4FXb70mB7":"args.item.system.encumbrance.value = Math.max(0, args.item.system.encumbrance.value - 1);","K54XxyNJa5PIWDEH":"args.modifiers.other.push({label : this.effect.name, details : \"Blessures Doublées + 4\", value : args.totalWoundLoss + 4 });\nargs.totalWoundLoss = args.totalWoundLoss * 2 +4;","KD4nCSdSXJVJmk0R":"this.script.message(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg : true}))\nawait this.actor.addCondition(\"ablaze\")","KF69WqF4PSEtpdb2":"args.fields.slBonus += 2;\n ","KG4TxnXiLLpfWOQO":"args.fields.difficulty = \"average\"","KGK9vL1Yl0qmCeCN":"let specification = this.item.system.specification.value;\nlet choice = [];\n\nif (!specification || specification == \"Compétences Entraînées\")\n{\n choice = await ItemDialog.create(ItemDialog.objectToArray({\n broken: \"Broken\",\n drive: \"Conduite d'attelage\",\n entertain: \"Divertissement\",\n fetch: \"Fetch\",\n guard: \"Garde\",\n home: \"Home\",\n magic: \"Magic\",\n mount: \"Mount\",\n war: \"War\"\n }, this.effect.img), \"unlimited\", \"Choisir un Entraînement\");\n}\nelse\n{\n choice = specification.split(\", \").map(i => {\n return {\n id : i.toLowerCase(),\n name : i\n }\n });\n}\n\nif (choice.length)\n{\n let changes = foundry.utils.deepClone(this.effect.changes);\n\n for(let training of choice)\n {\n switch(training.id)\n {\n case \"broken\" :\n let roll = await new Roll(\"2d10\").roll({allowInteractive : false});\n roll.toMessage(this.script.getChatData());\n changes.push({value : roll.total, mode : 2, key : \"system.characteristics.fel.modifier\"})\n\n if (this.actor.type == \"creature\")\n {\n let bestial = this.actor.itemTypes.trait.find(i => i.name == \"Bestial\");\n if (bestial)\n {\n bestial.update({\"system.disabled\" : true})\n }\n }\n break;\n\n case \"drive\" :\n\n break;\n\n case \"entertain\" :\n\n break;\n\n case \"fetch\" :\n\n break;\n\n case \"guard\" :\n let territorial = await fromUuid(\"Compendium.wfrp4e-core.items.Item.JIAe7i7dqTQBu4do\");\n await this.actor.createEmbeddedDocuments(\"Item\", [territorial], {fromEffect: this.effect.id})\n foundry.utils.setProperty(args, \"options.keepId\", true);\n break;\n\n case \"home\" :\n\n break;\n\n case \"magic\" :\n\n break;\n\n case \"mount\" :\n\n break;\n\n case \"war\" :\n changes.push({value : 10, mode : 2, key : \"system.characteristics.ws.modifier\"})\n break;\n }\n }\n this.effect.updateSource({name : `${this.effect.name} (${choice.map(i => i.name).join(\", \")})`, changes, \"flags.wfrp4e.trained\" : choice.map(i => i.id)})\n this.item.updateSource({\"system.specification.value\" : `${choice.map(i => i.name).join(\", \")}`})\n}","KICZPwLvbUSxbDrE":"let table = game.wfrp4e.tables.findTable(\"mutatemental\");\nif (!table)\n{\n\tui.notifications.error(\"Impossible de trouver la table des Mutations Mentales\")\n}\nlet result = (await table.roll()).results[0];\nlet uuid = `Compendium.${result.documentCollection}.${result.documentId}`\nlet item = await fromUuid(uuid);\n\nif (item)\n{\n this.script.notification(`${item.name} added`)\n this.actor.createEmbeddedDocuments(\"Item\", [item])\n}\nelse\n{\n ui.notifications.error(\"Impossible de trouver l'objet : \" + uuid)\n}","KIoVBinAZK8sMOqD":"\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"average\"}, skipTargets: true, appendTitle : \" - Wounded\"})\n await test.roll();\n if (test.failed)\n {\n fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\").then(disease => {\n this.actor.createEmbeddedDocuments(\"Item\", [disease.toObject()])\n this.script.notification(\"Gained \" + disease.name)\n })\n }\n ","KJLAan0glJlyOyqF":" this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 10,\n \"bright\": 5,\n \"alpha\": 0.5,\n \"animation\": {\n \"speed\": 4,\n \"intensity\": 4,\n \"type\": \"flame\",\n },\n \"color\": \"#ac9e6c\",\n }}));","KOR8aafB3D4FLoh6":"return args.item?.name !== game.i18n.localize(\"NAME.Stealth\")","KPQfupKuaf4LCv4R":"const talents = await Promise.all([game.i18n.localize(\"NAME.Schemer\"), game.i18n.localize(\"NAME.SecondSight\")].map(game.wfrp4e.utility.findTalent))\nthis.actor.createEmbeddedDocuments(\"Item\", talents, {fromEffect : this.effect.id})","KQmb5B27eJ1lkbVL":"return this.item.system.quantity.value > 0 && args.type != \"channelling\"","KQzbrpb0T5a7it4k":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.vMYEkrWj0ip6ZOdv\");\nlet data = item.toObject();\ndata.name += ` (Disease)`;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","KSGIwJxR0qn10RLX":"this.actor.itemTags.template.find(t => t.name === \"Hungry Troll\").delete();","KSjsDlsx3DD6cT16":"return args.skill?.name != game.i18n.localize(\"NAME.Bribery\");","KT670CjGBEprx2fO":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.RWJrupj9seau0w31\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","KTBVDHUndI3qDOXM":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"))\nawait test.roll();\nif (!test.succeeded)\n{\n args.actor.addCondition(\"stunned\")\n}","KUx0deSF3xNzMucL":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Art\"));","KVpDUEjHhd3nLa0f":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.script.message(await game.wfrp4e.tables.formatChatRoll(\"enrage-beast\"))\n}","KVuPduDztyMZQNt9":"args.fields.slBonus += this.actor.system.characteristics.ag.bonus","KXzDe7cN2vynHjJO":"this.actor.hasCondition(\"blinded\")?.delete();\nthis.actor.hasCondition(\"deafened\")?.delete()\nthis.actor.hasCondition(\"unconscious\")?.delete()","KkE8DtsTDYDyk1gN":"args.data.reversal = {allowed : true, if: \"better\"};","KkjkYAGI9Em1NgiQ":"if (this.item.system.quantity.value) \n{\n this.item.system.reduceQuantity();\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Heal\"), { appendTitle: ` - ${this.effect.name}`, skipTargets: true })\n await test.roll();\n if (test.succeeded) \n {\n let actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n actor.applyEffect({ effectData: [this.item.effects.contents[0].convertToApplied()] })\n }\n else \n {\n this.script.notification(\"Heal Test failed!\", \"error\")\n }\n}\nelse \n{\n this.script.notification(\"None left!\", \"error\")\n}","KmngDrPD72xn22kZ":"if (this.actor.Species.toLowerCase() != \"skaven\") {\n this.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - Utilise ${this.effect.name}`, fields: { difficulty: \"difficult\" } }).then(async Test => {\n await test.roll()\n if (test.failed)\n {\n let toughnessLost = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n this.actor.update({ \"system.characteristics.t.initial\": this.actor.characteristics.t.initial - toughnessLost })\n this.script.message(`${this.actor.prototypeToken.name} Perte de ${toughnessLost} Endurance`)\n }\n })\n }","KnwYZbeRSBA94hfl":"if (!args.flags.lostFingers)\n{\n\targs.flags.lostFingers = true;\n\targs.fields.modifier -= 5 * this.actor.flags.useless[this.item.system.location.key]\n}","KoQJTwqoC7foST6v":"return args.type === \"cast\" && args.spell?.system.lore.value === \"high\";","KuUkUmOOLf05I4Bp":"this.actor.hasCondition(\"broken\")?.delete();\n","KuuWAhoSzk0rCxxw":"args.fields.modifier += -20;","KxIRA51YA0rktcSP":"return args.characteristic === \"fel\"","KxM4zmhQRDHaRybM":"await this.actor.addCondition(\"blinded\");\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {appendTitle: ` - ${this.effect.name}`, skipTargets: true});\nawait test.roll();\n\nif (test.failed)\n{\n await this.actor.addCondition(\"blinded\");\n}","KyUPYV1RXJxPOfyA":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"veasy\"}})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"fatigued\");\n}","KyswmGj1uG3QS3ng":"args.applyAP = false;","L1RMLvKtRPFtnczI":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.MGEPI4jNhymNIRVz\");\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","L2cdQppcPwxz24hN":"return !args.weapon","L3ehj3ud1OgjcgSv":"if (!this.item.system.properties.qualities.fast) this.item.system.qualities.value.push({name : 'fast'});\n if (!this.item.system.properties.qualities.precise) this.item.system.qualities.value.push({name : 'precise'})\n if (!this.item.system.properties.qualities.penetrating) this.item.system.qualities.value.push({name : 'penetrating'})","L41ao2Mw1miE0yri":"let roll = await new Roll(\"15\").roll();\nroll.toMessage(this.script.getChatData());","L89UcafRHqUfxoux":"let injury = await fromUuid(\"Compendium.wfrp4e-core.items.3S4OYOZLauXctmev\")\ninjury.updateSource({\"system.location.key\" : this.item.system.location.key})\nthis.actor.createEmbeddedDocuments(\"Item\", [injury], {fromEffect: this.effect.id})","L9eAtDyaoHvqryk4":"return args.skill?.name != game.i18n.localize(\"NAME.Intimidate\");","L9pUSX8Z4y2zIAn7":"this.actor.system.characteristics.int.value = 50","LAyLbcC0lOPwZP3U":"this.actor.addCondition(\"ablaze\", parseInt(this.effect.sourceTest.result.SL))","LHUUXfZVLBhWqRvb":"this.actor.status.addArmour(5, {magical: true, source : this.effect})","LLqAT9wEUGMLfDhU":"return !args.item?.system.isRanged","LNxKkPI37im0bSjy":"const ablaze = Number(args.opposedTest.result.differenceSL) + 1\nargs.actor.addCondition(\"ablaze\", ablaze)\nargs.extraMessages.push(\n \"\" + this.effect.name + \": \"\n + ablaze + \" @Condition[Ablaze] Conditions\")","LOL2TGf8p8KxP14D":"let wind = this.effect.name.split(\" \")[2]\nreturn args.type != \"cast\" || game.wfrp4e.config.magicWind[args.item.system.lore.value] != wind;","LQEWSN5KnHHATPsf":"if (args.totalWoundLoss > 0)\n{\n this.script.message(`${args.actor.name} must pass an Easy (+40) Résistance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}","LXEUhHuXe8keEPI9":"let test = await this.actor.setupCharacteristic(\"wp\", {fields: {difficulty : \"average\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tlet stuns = Math.max(1, Math.abs(test.result.SL))\n\tthis.actor.addCondition(\"stunned\", stuns)\n}","LYwio2f6xTiKg9dN":"if (args.test.failed)\n {\n let applicableCharacteristics = [\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"];\n if (applicableCharacteristics.includes(args.test.characteristicKey))\n {\n this.actor.addCondition(\"stunned\");\n }\n }","LeKLtvEDrWh4yHsx":"return args.skill?.name == game.i18n.localize(\"NAME.CharmAnimal\") || args.skill?.name.includes(game.i18n.localize(\"NAME.AnimalTraining\"));","LedRsrVo2f7lm3Ix":"return args.skill?.name == game.i18n.localize(\"NAME.Intimidate\");","Lg1oRg4oNRvucsvi":"return !(args.skill?.name == game.i18n.localize(\"NAME.Climb\") || args.skill?.name == game.i18n.localize(\"NAME.Athletics\"))","LgYyLg0Y2AQ1SKcS":"let amount = this.effect.sourceTest.result.overcast.usage.other.current ?? 0;\n\nargs.fields.successBonus += 2 + amount;","Lh3Ccqx3utIu6w0d":"if (!args.ablazeApplied)\n{\n args.ablazeApplied = true;\n await args.actor.addCondition(\"ablaze\");\n}","Lj9H0O9XUk830CBt":"scatter = await game.wfrp4e.tables.rollTable(\"scatter\");\nthis.script.message(scatter.result);\n\nlet distance = await new Roll(\"1d10\").roll();\n\ndistance.toMessage(this.script.getChatData({flavor: \"Distance (yds.)\"}));\n\nlet damage = await new Roll(\"1d10\").roll();\ndamage.toMessage(this.script.getChatData({flavor: \"Dégâts\"}));\nthis.actor.applyDamage(damage.total, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP,\n createMessage: this.script.getChatData()\n});\n\n\nthis.actor.addCondition(\"prone\");","LjXPlgdXBdllnA3i":"return ![\"s\", \"t\"].includes(args.characteristic)","LjfScVGBf0Egr70E":"let animalCare = this.actor.itemTypes.skill.find(s => s.name === game.i18n.localize(\"NAME.AnimalCare\"));\nlet animalTrainings = this.actor.itemTypes.skill.filter(s => s.name.includes(game.i18n.localize(\"NAME.AnimalTraining\")));\n\nif (animalCare) \n animalCare.system.modifier.value += 20;\n\nfor (let training of animalTrainings) {\n training.system.modifier.value += 30;\n}","LjpuZam0IYIbOhFs":"const test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Navigation\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"vhard\"},\n context: {\n failure: \"Can't perform an action other than wander in a random direction at normal walking pace.\",\n success: \"Can act normally.\"\n }\n});\n\nawait test.roll();","LkPtgN9A36OI6Frh":"return args.skill?.name == game.i18n.localize(\"NAME.Leadership\");","LlRhPGorLl5qJCU8":"if (this.actor.hasCondition(\"prone\")) \n{\n this.actor.addCondition(\"unconscious\");\n}\nelse \n{\n this.actor.addCondition(\"prone\");\n}","Lm9IBkc918Duw3US":"let career = this.actor.itemTypes.career.find(c => c.getFlag(\"wfrp4e\", \"doubleLife\"))\n\nif(career)\n{\n career.system.current.value = true;\n}","Lp261O9fgEXmgPf3":"// If this actor wins a defending test, swap the test\nif (!args.opposedTest.result.swapped && args.opposedTest.result.winner == \"defender\" && args.opposedTest.attackerTest.result.damage)\n{\n await args.opposedTest.swap(this.effect.name);\n}","Lpv2N9LK9loeumiW":"if (this.actor.uuid != this.effect.sourceActor.uuid)\n{\n this.actor.setupSkill(game.i18n.localize(\"NAME.Athletics\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty: \"hard\"}, context : {failure : `${this.effect.name}: cannot move or take actions`}}).then(test => {\n test.roll();\n })\n}","Lrb1S2aK7SFVD0C7":"if (args.totalWoundLoss > 0)\n{\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed)\n {\n await args.actor.addCondition(\"fatigued\");\n }\n}","Lu27iXtJVkrJ8bOx":"return !args.skill?.name?.includes(game.i18n.localize(\"NAME.Stealth\"))","LxEhkvdSEQic8VZ6":"let ingredients = this.actor.itemTypes.trapping.filter(i => i.system.trappingType.value == \"ingredient\");\n\nif (ingredients.length == 0)\n{\n return this.script.notification(\"Aucun ingrédient !\");\n}\nthis.script.notification(\"Affecté : \" + ingredients.map(i => i.name).join(\", \"));\n\nfor(let i of ingredients)\n{\n await i.update({\n name: i.setSpecifier(\"Souillé\"),\n effects: [{\n name: \"Souillé\",\n img: i.img,\n system: {\n transferData :{\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: \"Influence Maléfique\",\n script: \"args.fields.malignantInfluence = true;\",\n trigger: \"dialog\",\n options: {\n activateScript: \"return true;\"\n }\n }\n ]\n }\n }] \n });\n}","LxdLkPxH3SFvYrCJ":"if (args.effect.conditionId == \"ablaze\")\n{\n args.data.formula += ` - ${this.actor.system.characteristics.t.bonus}`\n}","LyAK0dVDS5L09yq2":"let caster = this.effect.sourceActor\n\nif (caster)\n{\n let bonus = caster.system.characteristics.wp.bonus\n this.actor.modifyWounds(bonus)\n\n this.script.message(`${this.actor.prototypeToken.name} regains ${bonus} Wounds`)\n}","M0XhKnWjG14pk3iH":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) && args.type != \"channelling\" && args.skill?.name != game.i18n.localize(\"NAME.Charm\") && !args.skill?.name.includes(`${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`) && args.type != \"cast\"","M0eOB2Jg9KzcN1gz":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.Nj3tC8A5fZ3zEdMR\", // Holy Visions\n \"Compendium.wfrp4e-core.items.Item.mNoCuaVbFBflfO6X\", // Sixth Sense\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","M2FshTX4PjKFVU8y":"args.flags.earCount = Number.isNumeric(args.flags.earCount) ? args.flags.earCount+1 : 1;\nif (args.characteristic == \"fel\")\n{\n\targs.fields.modifier -= 5;\n}\nif (args.flags.earCount == 2 && args.skill?.name == game.i18n.localize(\"NAME.Perception\"))\n{\n\targs.fields.modifier -= 20;\n}\n","M5bh0heeafA2fQQ8":"if (args.test.spell?.getFlag(\"wfrp4e\", \"boonOfTzeentch\"))\n{\n if (args.test.result.minormis || args.test.result.majormis || args.test.result.catastrophicmis)\n {\n this.script.message(`${this.effect.name} quits your mind in disgust and erases itself from your grimoire!`)\n this.effect.sourceItem.delete();\n }\n}","M6sb1yAdEAMlIvac":"return args.item?.system?.attackType == \"ranged\" && this.item.equipped.value","M9VgeYGiUO97ZUW4":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.hCadFsTRvLN9faaY\")\nlet data = item.toObject();\ndata.system.location.value = \"Jaw\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (!test.succeeded)\n{\n\targs.actor.addCondition(\"unconscious\")\n}\n\n","MB058H6OslhfBmxR":"console.log(args)\nreturn args.item?.system?.attackType == \"melee\"","MCK6WyjwYT28lsTN":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.u0CFf3xwiyidD9T5\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","MDLttXplnNthncGr":"return args.type == \"cast\" && [\"death\", \"necromancy\", \"life\", \"light\", \"heavens\"].includes(args.spell?.system.lore.value)","MECRxo8X0cfZh1rx":"return args.skill?.name !== game.i18n.localize(\"NAME.Dodge\");","MFKhU9vp8bQpHP3I":"let value = parseInt(this.item.specification.value)\nlet name = this.actor.prototypeToken.name\n\nif (game.user.isGM && game.user.targets.size)\n{\n game.user.targets.forEach(t => {\n t.actor.applyTerror(value, name)\n })\n game.canvas.tokens.setTargets([])\n}\nelse \n{\n game.wfrp4e.utility.postTerror(value, name)\n}","MI2GgNi3fZtUCtQD":"return [\"int\", \"wp\"].includes(args.characteristic)","MIhYSuJ6MI9B65UT":"let specification = Number(this.item.specification.value) || 1;\nargs.actor.system.status.wounds.max += Math.floor(args.actor.system.status.wounds.max * 0.3 * specification);\nargs.actor.system.status.carries.max -= Math.floor(args.actor.system.status.carries.max * 0.1 * specification);\nargs.actor.system.details.price.gc += Math.floor(args.actor.system.details.price.gc * 0.2 * specification);","MJB6WbZSF6Briz30":"return args.item?.name == game.i18n.localize(\"NAME.Leadership\")","MKxYbHOrv0UuA7JB":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {fields: {difficulty : \"average\"}, appendTitle : \" - Blessé\"})\n await test.roll();\n if (test.failed)\n {\n fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\").then(disease => {\n this.actor.createEmbeddedDocuments(\"Item\", [disease.toObject()])\n this.script.scriptNotification(\"Contraction de \" + disease.name)\n })\n }","MMv2B8TH7jxNCtdl":"let actor = this.actor;\n let effect = this.effect;\n let bleedingAmt;\n let bleedingRoll;\n let msg = \"\"\n\n let damage = effect.conditionValue;\n let scriptArgs = {msg, damage};\n await Promise.all(actor.runScripts(\"preApplyCondition\", {effect, data : scriptArgs}))\n msg = scriptArgs.msg;\n damage = scriptArgs.damage;\n msg += await actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, minimumOne : false, suppressMsg : true})\n\n if (actor.status.wounds.value == 0 && !actor.hasCondition(\"unconscious\"))\n {\n await actor.addCondition(\"unconscious\")\n msg += \"
\" + game.i18n.format(\"BleedUnc\", {name: actor.prototypeToken.name })\n }\n\n if (actor.hasCondition(\"unconscious\"))\n {\n bleedingAmt = effect.conditionValue;\n bleedingRoll = (await new Roll(\"1d100\").roll()).total;\n if (bleedingRoll <= bleedingAmt * 10)\n {\n msg += \"
\" + game.i18n.format(\"BleedFail\", {name: actor.prototypeToken.name}) + \" (\" + game.i18n.localize(\"Rolled\") + \" \" + bleedingRoll + \")\";\n await actor.addCondition(\"dead\")\n }\n else if (bleedingRoll % 11 == 0)\n {\n msg += \"
\" + game.i18n.format(\"BleedCrit\", { name: actor.prototypeToken.name } ) + \" (\" + game.i18n.localize(\"Rolled\") + bleedingRoll + \")\"\n await actor.removeCondition(\"bleeding\")\n }\n else\n {\n msg += \"
\" + game.i18n.localize(\"BleedRoll\") + \": \" + bleedingRoll;\n }\n }\n\n await Promise.all(actor.runScripts(\"applyCondition\", {effect, data : {bleedingRoll}}))\n if (args.suppressMessage)\n {\n let messageData = game.wfrp4e.utility.chatDataSetup(msg);\n messageData.speaker = {alias: this.effect.name}\n messageData.flavor = this.effect.name;\n return messageData\n }\n else\n {\n return this.script.message(msg)\n }\n ","MMx8f5uJ15XOgJGg":"return args.skill?.name !== game.i18n.localize(\"NAME.Row\") && args.skill?.name !== game.i18n.localize(\"NAME.Swim\") && !args.skill?.name.includes(game.i18n.localize(\"NAME.Sail\"));","MOZn375tGD2060cC":"const diff = foundry.utils.diffObject(this.item.toObject(), args.data);\nif (args.data?.system?.APdamage?.head > this.item.system.APdamage.head) {\n const result = await game.wfrp4e.tables.rollTable('armet-damage');\n this.script.message(result.result);\n if (result.total > 5) \n delete args.data.system.APdamage.head;\n}","MPK7U4HLmIAsjdqs":"if (args.applyAP)\n{\n args.modifiers.ap.ignored += 2\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignore 2 PA\");\n}","MQAMuPF4QqXl76SZ":"this.actor.addCondition(\"surprised\");","MRH5rTTgUPdqo7SO":"return !args.item?.system.isRanged;","MSJWJEUrX7ZmMvAD":"return !(args.skill?.name.includes(game.i18n.localize(\"NAME.Ranged\")) || args.item?.isRanged || args.item?.name == game.i18n.localize(\"NAME.Charm\"))","MWtT4Mhf7F1hqemx":"let damage = this.effect.sourceTest.result.damage;\n\nawait this.actor.applyDamage(damage, {\n loc: \"roll\",\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP,\n createMessage: this.script.getChatData(),\n});\n\nawait this.actor.addCondition(\"ablaze\", 2);\n\nconst test = await this.actor.setupSkill(\n game.i18n.localize(\"NAME.Dodge\"),\n {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n },\n);\n\nawait test.roll();\n\nif (test.failed) {\n await this.actor.addCondition(\"prone\");\n await this.actor.addCondition(\"stunned\");\n}","McLR9YcgVUG3MooC":"args.applyTB = false;","Me1wS5XdqUEy7OGt":"let loc = (await game.wfrp4e.tables.rollTable(\"hitloc\")).result;\nlet critTable = `crit${this.generalizeTable(loc)}`;\nlet crit = (await game.wfrp4e.tables.rollTable(critTable)).result;\n\nthis.script.message(`{this.actor.name} suffers a ${crit} (location : ${loc}). Do not apply bleeding or any additonnal wounds.`);","MeHXlZ66R3X8luFT":"let modifier = 0\n if (this.effect.name.includes(\"Moderate\"))\n modifier = -20\n else\n modifier = -10\n args.fields.modifier += modifier","MfxWXZwaZUjGSBqw":"if (this.actor.hasCondition(\"ablaze\"))\n{\n this.script.notification(\"Immunisé à l'état En Flames\")\n await this.actor.hasCondition(\"ablaze\")?.delete()\n}","MfxzwJz2o9ho2hOM":"return args.skill?.name == \"Lore (Apothecary)\"","MgMMoC4Umpg7fmNI":"// Apply changes when the mask is worn\n\nif (args.equipped) {\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [this.item.effects.contents[1]?.convertToApplied()])\n this.script.message(`${this.actor.name} porte le ${this.item.name}.
\n Ils ne peuvent pas lancer de sorts ni prier pour des Bénédictions et des Miracles.
\n S'ils portent le masque pendant plus d'une heure ou bénéficient de l'un de ses effets, ils sont exposés à @Corruption[modérée]{Corruption modérée}.\n `,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n\n// Notify of lingering effects when mask is Retiré\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Usagé)\"})\n this.script.message(`${this.item.name} sur ${this.actor.name} a été retiré et perd ses propriétés. Cependant, les effets durent [[1d10+4]] jours, après quoi ils doivent être manuellement retirés.`,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n )\n\n}\n","MgTqCMRjxhezT73T":"return args.fields.hitLocation == \"head\" && args.weapon?.system.properties.qualities.pummel","MgZreqq3Jua10c8s":"return ![\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"].includes(args.characteristic)","Mhb67xufvA9uWO21":"let actorTaille = game.wfrp4e.config.actorTailleNums[args.actor.details.size.value]\nlet attackerTaille = game.wfrp4e.config.actorTailleNums[args.attacker.details.size.value]\n\nif (attackerTaille > actorTaille)\n{\n args.actor.addCondition(\"prone\")\n this.script.message(`Tail Attack: ${args.actor.prototypeToken.name} is now Prone`)\n}","Mir4FMHQRdVqazAF":"let actorTaille = game.wfrp4e.config.actorTailleNums[args.actor.details.size.value]\nlet attackerTaille = game.wfrp4e.config.actorTailleNums[args.attacker.details.size.value]\n\nif (attackerTaille > actorTaille)\n{\n let msg = `Attaque de Langue: ${args.actor.prototypeToken.name} est maintenant @Condition[Entangled]`;\n await args.actor.addCondition(\"entangled\");\n if (actorTaille <= 2)\n {\n msg += `et @Condition[Engaged]`\n }\n this.script.message(msg, {speaker : {alias: args.attacker.prototypeToken.name}})\n}","MkEcdViivk7abf1x":"args.actor.flags.meleeDamageIncrease += 1","MnXny8SCh6OceJc9":"return args.characteristic == \"int\"","MnqQkXVp20Lw84I1":"let test = await this.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"difficult\"}})\nawait test.roll();\nif (test.failed)\n{\n this.script.message(await this.actor.applyBasicDamage(3, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))\n}","Mp8UjuCLa9jdzhBS":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nif (test.failed)\n{\n if (!this.actor.hasCondition(\"fatigued\"))\n {\n await this.actor.addCondition(\"fatigued\");\n }\n else\n {\n await this.actor.addCondition(\"blinded\");\n await this.actor.addCondition(\"deafened\");\n }\n \n if (((this.actor.hasCondition(\"blinded\").conditionValue || 0) + (this.actor.hasCondition(\"deafened\").conditionValue || 0)) > this.actor.system.characteristics.i.bonus)\n {\n await this.actor.addCondition(\"unconscious\"); \n }\n}","Mqbjr3t7IXwFnfCv":"if (this.item.flags.runeOfIron) return\n\n\nconst runesOfIron = this.item.effects.contents.filter(e => e.name == this.effect.name)\nconst ironWounds = parseInt(runesOfIron.length * 2)\nconst currentWounds = this.actor.system.status.wounds.value\n\nif (args.equipped) {\n this.item.flags.runeOfIron = true\n this.actor.modifyWounds(ironWounds)\n}\nelse\n{\n this.item.flags.runeOfIron = true\n this.actor.modifyWounds(-ironWounds)\n if (ironWounds > currentWounds) {\n this.script.message(`You have removed ${ironWounds} Wounds by unequipping Runic Armoour, but you only had ${currentWounds} Wounds remaining. This may trigger a critical injury.`)\n }\n}","Msygc7oQQPB5fw0b":"let test = this.effect.sourceTest;\nif (test.failed && (test.result.roll % 11 == 0 || test.result.roll == 100))\n{\n\tlet points = await new Roll(\"1d10\").roll({allowInteractive : false});\n\tgame.dice3d?.showForRoll(points)\n\tthis.actor.update({\"system.status.corruption.value\" : this.actor.system.status.corruption.value + points.total})\n\tthis.script.message(`Gain de ${points.total} Corruption`)\n}\nelse\n{\n\tlet points = this.effect.sourceTest.result.overcast.usage.other.current;\n\tthis.actor.update({\"system.status.corruption.value\" : this.actor.system.status.corruption.value - points})\n\tthis.script.message(`Perd de ${points} de Corruption`)\n}","MwUzyAgd0yPnmZCH":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.klCJX0mNpXYH5AIx\")\nlet data = item.toObject(); \ndata.name = data.name.replace(\"Target\", \"Strangers\");\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});","Myl1Ishu9GBraYUZ":"this.actor.removeCondition(\"bleeding\")","N0h848GEkBbRDK2x":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.MVI0lXcg6vvtooAF\", this.effect);","N2MeOlf0GjPiRcSb":"let test = await this.actor.setupCharacteristic(\"dex\", {context : {failure : \"Lâche l'objet\"}})\nawait test.roll();","N6E9Jsd8n2ubCfz8":"for(let key in this.item.system.AP)\n{\n this.item.system.AP[key]++;\n}","N7nGncsPrTz2ZbDA":"return !args.context.dodge || !this.actor.isMounted","N8hA6ysHCTlLd8Kj":"let characteristics = {\n \"ws\" : 0,\n \"bs\" : 0,\n \"s\" : 0,\n \"t\" : 5,\n \"i\" : 15,\n \"ag\" : 0,\n \"dex\" : 10,\n \"int\" : 15,\n \"wp\" : 15,\n \"fel\" : 0\n}\nlet skills = [\"Focalisation\", \"Calme\", \"Esquive\", \"Divertissement (Narration)\", \"Intuition\", \"Langue (Magick)\", \"Savoir (Magie)\" , \"Perception\"]\nlet skillAdvancements = [5, 15, 10, 10, 15, 10, 10, 20]\nlet talents = [\"Magie des Arcanes\", \"Magie Mineure\", \"Seconde Vue\"]\nlet trappings = [\"Arme simple\", \"(2M) Bâton de combat\", \"Ritual Dress incorporating many ingredients and fetishes\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n items.push({name : trapping, type : \"trapping\", \"system.trappingType.value\" : \"clothingAccessories\"})\n //ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","N8oUaIkE2Ne571ia":"let roll = await new Roll(\"1d10 + @sin\", {sin: this.actor.system.status.sin.value || 0}).roll();\nroll.toMessage(this.script.getChatData());\n\nlet skills = await ItemDialog.create(this.actor.itemTypes.skill, \"unlimited\", {text: \"Select penalized Skills\", title: this.effect.name})\nlet names = skills?.map(i => i.name) || [];\nthis.effect.updateSource({name: this.effect.setSpecifier(names.join(\", \")), \"flags.wfrp4e.skills\" : names, duration: {\n value: roll.total,\n units: \"hours\"\n}});","N9kA46ZQ9LiRjy6T":"return args.skill?.name == game.i18n.localize(\"NAME.Haggle\") || args.skill?.name == game.i18n.localize(\"NAME.Gossip\");","NDvNGATDM2xPFJK0":"brokenbone = await fromUuid(\"Compendium.wfrp4e-core.items.hCadFsTRvLN9faaY\")\nteeth = await fromUuid(\"Compendium.wfrp4e-core.items.fBcZhOBn8IpoVqQ1\")\ntongue = await fromUuid(\"Compendium.wfrp4e-core.items.rkJA1DlK51QuRlJy\")\nbrokenbone = brokenbone.toObject();\nteeth = teeth.toObject();\ntongue = tongue.toObject();\n\n\nlet roll = await new Roll(\"1d10\").roll({allowInteractive : false});\nroll.toMessage(this.script.getChatData({flavor : \"Teeth Lost\"}))\n\nteeth.system.location.value = `${roll.total} ${teeth.system.location.value}`\nbrokenbone.system.location.value = \"Jaw\"\nthis.actor.createEmbeddedDocuments(\"Item\", [brokenbone, teeth, tongue])\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"vhard\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"unconscious\")\n}","NEKLTgJJsayC7tpF":"return [\"ws\", \"ag\"].includes(args.characteristic);","NI3ZzIAlpQfVSjvf":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = await ValueDialog.create({text : \"Entrez la valeur de Peur\", title : this.effect.name});\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","NMZ3Fb164tUfwChF":"return !args.data.targets[0]?.actor?.hasCondition(\"entangled\")","NNytXz5XFPrEF6dw":"if (args.loc == this.item.system.location.key && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 1);\n}\n ","NO685xdEW0NtJCp7":"let roll = await new Roll(\"1d10\").roll();\nroll.toMessage(this.script.getChatData());\nthis.effect.updateSource({\"duration\" : {value: roll.total, units: \"rounds\"}})","NQSvFWhmBQAyx5Zz":"return args.item?.isRanged","NTFpkiGyBpOtrV0s":"if (this.actor.uuid == this.effect.sourceActor.uuid)\n{\n\treturn;\n}\n\nif (this.actor.has(\"À Sang Froid\") && !this.actor.hasSystemEffect(\"nausea\")) {\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {appendTitle : `- ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\n let myRoll = await new Roll(\"1d10\").roll({allowInteractive : false});\n let duration = myRoll.total\n this.actor.addSystemEffect(\"nausea\");\n this.script.scriptMessage(`Symptome Nausée ajouté, durée : ${duration} heures`);\n}\n}\nreturn false;","NX9fApO15NQuTipW":"return [\"ws\", \"bs\"].includes(args.characteristic)","Na7Nanl9YmxZlTo7":"return args.type != \"cast\" && args.type != \"channelling\"","Nd1djAF6dLEiLfwV":"let roll = await new Roll(\"1d10 + @sin\", {sin: this.actor.system.status.sin.value || 0}).roll();\nroll.toMessage(this.script.getChatData());\nthis.effect.updateSource({duration: {\n value: roll.total,\n units: \"rounds\"\n}});","NdquQqyuOkGCj8Uo":"let darkvision = await fromUuid(\"Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc\")\nlet fear = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nlet acutesense = await fromUuid(\"Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS\")\nfear = fear.toObject();\nfear.system.specification.value = 1;\nacutesense = acutesense.toObject();\nacutesense.name += \" (Smell)\";\nthis.actor.createEmbeddedDocuments(\"Item\", [darkvision, fear, acutesense], {fromEffect : this.effect.id})","NgKdPxwH3vr6mkNi":"args.fields.slBonus += 3;","NheyFTaMKupOgRJb":"await this.actor.addEffectItems([\"Compendium.wfrp4e-core.items.Item.0LdHytqyNmg2pcAX\", \"Compendium.wfrp4e-core.items.Item.4AqSkJnFPqNuTkos\", \"Compendium.wfrp4e-core.items.Item.x8jsChg17VQ9XgiK\"], this.effect)","Nk6qAalTmc6UI2XQ":"const message = game.messages.get(args.options.message);\nconst sl = message.system.sl;\nthis.effect.setFlag(\"wfrp4e-archives3\", \"sl\", sl);","NkZrMO4YPiQf0N5Q":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"average\"}, context : {failure: \"1 point de Corruption gagné\"}})\nawait test.roll();\nif (test.failed && this.actor.type == \"character\")\n{\n this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + 1})\n this.script.message(\"Gagné un point de Corruption\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","NkqtQaLEGYst0PUO":"if (this.actor.has(game.i18n.localize(\"NAME.MagicResistanceTalent\"), \"talent\")) \n return\n\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.eowbsW6oHGSNJmxV\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","NnA4zpuO6iUXKhH7":"if ((args.sourceItem && args.sourceItem.isMelee) || (args.sourceItem && !args.sourceItem.name.includes(game.i18n.localize(\"NAME.Ranged\"))))\n{\n let AP = parseInt(this.effect.sourceTest.result.SL)\n args.modifiers.ap.value += AP;\n args.modifiers.ap.magical += AP;\n args.modifiers.ap.details.push(`${this.effect.name} (${AP})`)\n}","NnDq4miIPNEtZUWb":"args.test.result.critModifier = args.test.result.critModifier || 0;\nargs.test.result.critModifier += 20;\n\nif (args.test.result.critical)\n{\n args.test.result.critical = `${game.i18n.localize(\"Critical\")} (+${args.test.result.critModifier})`\n}","Np25JqEiaoqerEk8":"if (test.result.tables.miscast) {\n test.result.other.push(`${this.effect.name}: You may reroll any result from the @Table[waaagh-miscast]{Waaagh! Miscast Table}.`);\n}","Np8P8IPT2GYlrh6G":"return args.skill?.name !== `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})` && args.type !== \"channelling\";","NqFvdCKDLqIXaE9m":"return args.weapon?.system.isMelee;","NrVFrIXM8GnIbojv":"args.item.system.damage.value += `+ ${this.actor.system.characteristics.fel.bonus}`;","Nuth9S5UHIhpEuIC":"args.fields.modifier -= 20","NvaPNfZt5d9RqKSE":"if (args.test.isCritical) {\n args.test.result.tables.critical.modifier \n = (typeof args.test.result.tables.critical.modifier ==='undefined') \n ? 20 \n : args.test.result.tables.critical.modifier + 20\n}","O1FwJHbDqZHwaYK8":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();","O45vpR4jDbQQnmvJ":"let items = [];\n\nlet etiquette = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP\")).toObject();\netiquette.name += \" (Suivants de Khorne)\";\n\nitems.push(etiquette);\n\nlet animosity = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.Q2MCUrG2HppMcvN0\")).toObject();\nanimosity.name = animosity.name.replace(\"(Target)\", \"(Suivants de Slaanesh)\");\n\nitems.push(animosity);\n\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect : this.effect.id});\n","O7lXFZLrLdFaShGR":"args.context.catfall = true;","O9fc0hLHdkTgSuLg":"let bite = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet venom = await fromUuid(\"Compendium.wfrp4e-core.items.gFkRm9wS65qe18Xv\")\nlet biteData = bite.toObject();\nlet venomData = venom.toObject();\n\nbiteData.system.specification.value = 3 - this.actor.characteristics.s.bonus;\nvenomData.system.specification.value = \"Average\"\nthis.actor.createEmbeddedDocuments(\"Item\", [biteData, venomData], {fromEffect : this.effect.id})","OAemeERMAeGv06pE":"let roll = await new Roll(\"1d5\").roll();\nroll.toMessage(this.script.getChatData());\nthis.actor.addCondition(\"ablaze\", roll.total);","OBF6r2CsMOEokAsS":"args.weaponProperties.damaging = true;\nargs.weaponProperties.impale = true;","OCFrGXAYfo9OYnhc":"return args.item?.system.magicMissile?.value || args.item?.system.attackType","OEy2lxvic37dRBEt":"let filters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"petty\"\n }\n]\n\nlet petty = await ItemDialog.createFromFilters(filters, 3, {text : \"Choisissez 3 Sorts Mineurs\"})\n\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"\"\n }\n]\n\nlet arcane = await ItemDialog.createFromFilters(filters, 3, {text : \"Choisissez 3 Sorts d'Arcane\"})\n\nlet items = petty.concat(arcane).map(i => i.toObject())\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","OF4sSVOvHoKuPk7L":"if (this.item.flags.burning) return\nconst runesOfBurning = this.item.effects.contents.filter(e => e.name == this.effect.name)\nconst ablaze = runesOfBurning.length\nargs.actor.addCondition(\"ablaze\", ablaze)\nargs.extraMessages.push(\n \"\" + this.effect.name + \": \"\n + ablaze + \" @Condition[Ablaze] Conditions\")\nthis.item.flags.burning = true","OFViRemr1cpnO3af":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {fields : {difficulty : \"difficult\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (!test.succeeded)\n{\n await this.actor.addCondition(\"bleeding\");\n}","OGX4BneaYAnV25TO":"let chatData = { whisper: ChatMessage.getWhisperRecipients(\"GM\") }\nlet message = \"\"\n\nlet wounds = foundry.utils.duplicate(this.actor.status.wounds)\nlet regenRoll = await new Roll(\"1d10\").roll({allowInteractive : false});\nlet regen = regenRoll.total;\n\nif (wounds.value >= wounds.max)\n return\n\nif (wounds.value > 0)\n{\n wounds.value += regen\n if (wounds.value > wounds.max)\n {\n wounds.value = wounds.max\n }\n message += `${this.actor.name} regagne ${regen} Point de Blessures.`\n\n if (regen == 10)\n {\n message += `
De plus, il guérit d'une Blessure Critique.`\n }\n}\nelse if (regen >= 8)\n{\n message += `${this.actor.name} a fait un ${regen} et regagne 1 Point de Blessures.`\n wounds.value += 1\n if (regen == 10)\n {\n message += `
De plus, il guérit d'une Blessure Critique.`\n }\n}\nelse\n{\n message += `${this.actor.name} a fait un ${regen} et ne régénère pas de Point de Blessures.`\n}\n\nawait this.actor.update({ \"system.status.wounds\": wounds })\nthis.script.message(message, { whisper: ChatMessage.getWhisperRecipients(\"GM\") })","OJMgS8ZQv0j4tEFf":"return [\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"].includes(args.characteristic)","OKivTxfbKZw5Lj3V":"return args.type === \"cast\" && [\"daemonology\", \"necromancy\"].includes(args.spell?.system.lore.value);","OMAUX1fnHyIpplul":"return ![\"fel\", \"dex\"].includes(args.characteristic)","OUef2n36h6lbrsjx":"if (!this.item.system.properties.qualities.precise) this.item.system.qualities.value.push({name : 'precise'})","OXoqtpOdfkURZbuL":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.yRhhOlt18COq4e1q\")\nlet data = item.toObject()\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n","OYLqLl6vikJD8flg":"const crowd = this.effect.getFlag(\"wfrp4e\", \"crowd\") ?? 0;\nconst bonus = 2 + Math.floor(crowd * 0.1);\n\nargs.fields.slBonus += bonus ;","OYRUSP7Q0Je0jdCY":"let species = await ValueDialog.create({text : \"Entrez l'Espèce Cible\", title : this.effect.name})\n\nthis.effect.updateSource({name : this.effect.setSpecifier(species)});","Oa9FmLXRRZRpLrrq":"let test = await this.actor.setupTrait(this.item); \nawait test.roll();","OcQe0zfksf1DCJYe":"args.actor.system.characteristics.s.value += 30\nargs.actor.system.characteristics.t.value += 30\n\nargs.actor.system.characteristics.s.bonus += 3\nargs.actor.system.characteristics.t.bonus += 3\n\nif (args.actor.system.characteristics.s.value > 100)\n{\n args.actor.system.characteristics.s.value = 100\n args.actor.system.characteristics.s.bonus = 10\n}\n\nif (args.actor.system.characteristics.t.value > 100)\n{\n args.actor.system.characteristics.t.value = 100\nargs.actor.system.characteristics.t.bonus = 10\n}","OeCgX3hIsfLfmGvC":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Perception\"))\nawait test.roll();\nif (test.succeeded)\n{\n this.actor.removeCondition(\"surprised\");\n}","OeKeQAAcJhdI4Qky":"if (this.actor.hasCondition(\"stunned\") || this.actor.hasCondition(\"unconscious\"))\n{\n\tthis.script.notification(\"Disabled!\");\n\tawait this.effect.update({\"disabled\" : true})\n}","Ofn6vDbP3fZ4UlSc":"args.fields.modifier += -20;\n ","OgSI0Z6SHjYuqKIz":"let blows = this.item.getFlag(\"wfrp4e\", \"blows\") || 0\nlet difficulties = Object.keys(game.wfrp4e.config.difficultyLabels)\n\nblows = Math.clamp(blows, 0, difficulties.length - 1)\nif (this.item.system.protects[args.loc])\n{\n let difficulty = difficulties[blows];\n this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields: {difficulty}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => {\n await test.roll();\n if (test.failed)\n {\n this.script.message(`${this.actor.name} must break from combat and flee until they pass a Challenging (+0) Willpower Test`);\n this.item.setFlag(\"wfrp4e\", \"failedCool\", true);\n }\n })\n}","OicQSEVZBbqLtrcf":"let choice = await ItemDialog.create(this.actor.itemTypes.critical, (this.effect.sourceTest.result.overcast.usage.other.current || 1), \"Choisir the Critique Blessures to heal (Impossible de reattach body parts)\")\n\nthis.script.message(`Soin de ${choice.map(i => i.name).join(`, `)}`);\nthis.actor.deleteEmbeddedDocuments(\"Item\", choice.map(i => i.id))","On1itZhp0AOzNyyc":"let test = await this.actor.setupSkill(\"Runesmithing\", {appendTitle: ` - ${this.effect.name}`});\nawait test.roll();\nthis.effect.update({\"disabled\" : true});","OnkEe4ISru1hjJWP":"this.actor.flags.useless[this.item.system.location.key] = true;","Op88kMtimSEWlY2h":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","OqLKL0PiCvYH2QxW":"if (args.test.options.wallcrawler)\n{\n\tif (parseInt(args.test.result.SL) < 0 || args.test.failed)\n\t{\n\t\tif (parseInt(args.test.result.SL) < 0)\n\t\t{\n\t\t\targs.test.result.SL = \"+0\";\n\t\t\targs.test.result.description = game.i18n.localize(\"ROLL.MarginalSuccess\");\n\t\t}\n\t\targs.test.result.outcome = \"success\"\n args.test.result.other.push(`${this.effect.name}: Minimum +0 SL`)\n\t}\n}","OqxeuZfZDfm9ax6h":"this.actor.system.status.addArmour(1, {locations : \"head\", source : this.effect})","OsLXutfXyQCAkhAf":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Voile';\nconst difficulty = 'average';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n \n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","OvIELZLvnlN2H2uw":"args.update({light : {\n \"dim\": 2,\n \"bright\": 1,\n \"alpha\": 0.5,\n \"animation\": {\n \"speed\": 4,\n \"intensity\": 4,\n \"type\": \"pulse\",\n },\n \"color\": \"#949bff\",\n}});","OxsBnnVI3Smpknpb":"if (this.actor.status.advantage.value && !this.actor.sameSideAs(this.effect.sourceActor))\n{\n this.actor.modifyAdvantage(-1);\n this.script.notification(`${this.actor.name} loses 1 Advantage`);\n}","Oz7pWF9mEc1pQypj":"let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\nroll.toMessage({flavor : this.effect.name, speaker : {alias : this.actor.prototypeToken.name}})\nthis.actor.addCondition(\"stunned\", roll.total)","P29tT1eMMdAw3CPF":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.3S4OYOZLauXctmev\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty: \"hard\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tthis.actor.addCondition(\"unconscious\")\n}","PBW6IZtwawNHxB6y":"return args.context.dodge && this.actor.isMounted","PGHvFHBIygB5pnWT":"args.actor.addCondition(\"ablaze\", 1)\nargs.extraMessages.push(\n \"\" + this.effect.name + \": Ajout d'1 état @Condition[Ablaze]\")","PI1QNaKFeqood6d7":"if (args.attackerTest.weapon && args.defenderTest.weapon)\n{\n\n let attackerReach = game.wfrp4e.config.reachNum[args.attackerTest.weapon.reach.value]\n let defenderReach = game.wfrp4e.config.reachNum[args.defenderTest.weapon.reach.value]\n \n if (attackerReach == defenderReach)\n attackerReach = attackerReach < 7 ? attackerReach + 1 : attackerReach\n\n attackerReach = warhammer.utility.findKey(attackerReach, game.wfrp4e.config.reachNum)\n defenderReach = warhammer.utility.findKey(defenderReach, game.wfrp4e.config.reachNum)\n\n args.attackerTest.weapon.reach.value = attackerReach\n args.defenderTest.weapon.reach.value = defenderReach\n}","PMISUsaEDBA7D3od":"// After consumption, the user gains the Magic Resistance 3 Creature Trait, \n// reducing the SL of any spell affecting it by 3. \n// This effect lasts for one hour.\nconst hasMagicResistance = this.actor.has(\"Magic Resistance\")\n\nif (hasMagicResistance === undefined) {\n fromUuid(\"Compendium.wfrp4e-core.items.yrkI7ATjqLPDTFmZ\").then(trait => {\n let traitItem = trait.toObject()\n traitItem.system.specification.value = 2\n this.actor.createEmbeddedDocuments(\"Item\", [traitItem], {fromEffect: this.effect.id})\n })\n this.script.message(`

${this.actor.prototypeToken.name} has gained the Magic Resistance Trait. This effect lasts for one hour.

`, {whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true }) \n}\n\nif (hasMagicResistance) {\n // Multiple doses may be consumed at once, with each one adding an additional 1 to the Magic Resistance rating and increasing the duration by one hour. \n let msg = `

${this.actor.prototypeToken.name} has enhanced their Magic Resistance by 1 to Rating ${parseInt(hasMagicResistance.system.specification.value)}. This effect lasts for one hour.

`\n\n // Resist toxic effect\n this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {\n fields: {difficulty: \"challenging\"}\n }).then(async test => {\n await test.roll()\n\n // If they fail ...\n if (!test.succeeded) {\n msg += `

However, they begin to ooze the thick, poisonous slime that coats every Dreadmaw. They have gained 1 Poisoned Condition now and should continue to receive an additional @Condition[Poisoned] Condition at the end of each of the round.

\n

If they are still alive at the end of 10 rounds, the effect ends and all Poisoned Conditions gained from ${this.effect.name} are removed.

`\n this.actor.addCondition(\"poisoned\", 1)\n }\n this.script.message(msg, {whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true })\n })\n}\n","PMNjdEAusVBfam09":"return args.skill?.name === game.i18n.localize(\"NAME.Charm\");","PVjaKAHTKDA0rA9J":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();","PWHKisZTZEgCANd8":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n\tlet sourceActor = this.effect.sourceActor;\n\tthis.script.message(await this.actor.applyBasicDamage(4 + sourceActor.system.characteristics.s.bonus, {suppressMsg : true}))\n}","PaiSiMxCKx9IWmn1":"this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.system.status.corruption.value) + 1});\nthis.script.notification(\"Corruption ajoutée\");","Pc98GFZjvokeyUcs":"let roll = await new Roll(\"1d10\").roll();\nroll.toMessage(this.script.getChatData());\nthis.effect.updateSource({duration: {\n value: roll.total,\n units: \"rounds\"\n}});","PdClojv7yNgQpOUc":"return args.skill?.name != game.i18n.localize(\"NAME.Endurance\");","PeZYj8b0vedyJj00":"// This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor\n\nlet mainEffect = this.item.effects.contents[0];\nif (mainEffect.name.includes(\"(Savoir)\"))\n{\n let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, \"Choisir Lore\");\n if (choice.length)\n {\n mainEffect.update({name : mainEffect.name.replace(\"Savoir\", choice[0].name)})\n this.item.update({name : this.item.name += ` (${choice[0].name})`})\n }\n}\n\nthis.effect.delete();","Pg9C6nJX5QHIdqa9":"return !args.item?.system.attackType\n","Ph3TdQw1lGiFr049":" if (!args.test.context.phantasmal && \n (this.actor.isOpposing || args.test.context.defending) && \n args.test.result.roll % 11 == 0 && \n args.test.succeeded && \n [\"Langue (Magick)\", \"Esquive\"].includes(args.test.item?.name))\n {\n args.test.context.phantasmal = true; // Flag so items aren't readded if test is edited\n let text = `${this.effect.name}: Adding Unstable and Ward`\n args.test.result.other.push(text) \n this.script.notification(text);\n \n let ward = await fromUuid(\"Compendium.wfrp4e-core.items.Bvd2aZ0gQUXHfCTh\")\n let wardData = ward.toObject();\n wardData.system.specification.value = 9;\n \n let unstable = await fromUuid(\"Compendium.wfrp4e-core.items.D0ImWEIMSDgElsnl\")\n let unstableData = unstable.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [wardData, unstableData], {fromEffect: this.effect.id})\n }\n","PjOi61gB2nSYooLs":"return this.sourceActor.uuid === this.actor.uuid || !args.item?.system?.isRanged;","PjRxGuUDKGmSmVDc":"fromUuid(\"Compendium.wfrp4e-core.items.EO05HX7jql0g605A\").then(item => {\n item = item.toObject()\n item.system.specification.value = this.actor.characteristics.ag.value\n this.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})\n})","PkHrZiuFokN0OyXi":"if (args.test.result.critical)\n{ \n args.test.result.other.push(`${this.effect.name}: Can reverse Critical Wound roll`)\n}","PmELrzD3RmF9qKkO":"if (this.item.system.specification.value == \"Taille\")\n{\n let size = this.item.specifier;\n if (!size)\n {\n let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.actorTailles, this.item.img), 1, \"Choisir Taille\");\n if (choice[0])\n {\n size = choice[0]?.name;\n }\n }\n this.item.updateSource({\"system.specification.value\" : size, name : this.item.baseName})\n this.effect.updateSource({name : this.effect.name + ` (${size})`})\n}","Pn5fekTbkwlr61XU":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Ingénieur)';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n \n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","PoNnT5EqvLj2r5yf":"return args.skill?.name != game.i18n.localize(\"NAME.OutdoorSurvival\") && args.skill?.name != game.i18n.localize(\"NAME.Track\");","PsO7aTdELJt35eHP":"let morale = await new Roll(\"-1d10\").roll({allowInteractive : false});\nlet mood = await new Roll(\"-2d10\").roll({allowInteractive : false});\n\nmorale.toMessage(this.script.getChatData({flavor : \"Morale\"}));\nmood.toMessage(this.script.getChatData({flavor : \"Manann's Mood\"}));\n\nawait this.actor.system.status.morale.addEntry(\"Albatross Died\", morale.total)\nawait this.actor.system.status.mood.addEntry(\"Albatross Died\", mood.total);\n\nthis.effect.delete();","Puv2wLrSVe6b1jLf":"if (args.sizeDiff < 0 ) {\n args.damage += 3\n args.breakdown.other.push({label : this.effect.name, value : 3});\n}","PwqTmw7rsG8hzqCS":"if (args.test.result.critical && args.test.result.roll % 10 == 0) \n{\n game.wfrp4e.tables.findTable(\"knuckleduster-diseases\").roll().then(roll => {\n let results = roll.results[0]\n\n this.script.message(`${this.actor.name} contracts @UUID[Compendium.${results.documentCollection}.${results.documentId}]{${results.text}}`, {blind : true, whisper: ChatMessage.getWhisperRecipients(\"GM\") })\n })\n\n }\n\n","Q1kUE8jcG7id3MHT":"let criticals = this.actor.itemTypes.critical;\n\nif (criticals.length)\n{\n let choice = await ItemDialog.create(criticals, 1, {title: this.effect.name, text: \"Choose Critical to Heal\"})\n\n if (choice[0])\n {\n this.script.message(`Healed ${choice[0].name}`);\n choice[0].delete();\n }\n}\nelse \n{\n this.script.notification(\"No Critical Wounds!\")\n}","Q1trEhtqjIiDvFPF":"args.fields.modifier -= 10 * this.effect.system.condition.value","Q4EQgP4gZR8TTm7S":"let penalty = 0\nif (args.item?.system.attackType)\n{\n penalty -= 30\n}\nif (args.actor.has(game.i18n.localize(\"NAME.SecondSight\"), \"talent\"))\n penalty += 10\n\nargs.fields.modifier += penalty","Q5gh5Y9dCdclcwsD":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) && args.skill?.name != `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`","Q68WiUWY7GxiXBbT":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.9GNpAqgsKzxZKJpp\")\nlet data = item.toObject();\ndata.system.specification.value = \"Lorsque Seul\";\ndata.effects[0].disabled = true;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","Q7eULXQ9AfDRmUGO":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n \n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","Q9EmlWmuDac83cJw":"return args.skill?.name == game.i18n.localize(\"NAME.Climb\") || args.skill?.name?.includes(game.i18n.localize(\"NAME.Stealth\"));","QBBrzcSAe8QqE4WP":"const SL = this.effect.sourceTest.result.SL;\nconst damage = 8 + SL;\n\nawait this.actor.applyBasicDamage(damage, {loc: \"roll\"});\n\nconst test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {\n skipTargets: true,\n appendTitle: ` - ${this.effect.name}`,\n fields: {difficulty: \"challenging\"},\n context: {\n failure: `Reçoit 1 état @Condition[Ablaze].`\n }\n})\n\nawait test.roll();\nif (test.failed) {\n await this.actor.addCondition(\"ablaze\");\n}","QF8LanKNoAlTkQG0":"this.actor.system.status.encumbrance.max += 2","QHQ7XmFOjT9wXgw1":"if (args.actorsystem.details.move.oars.value > 0)\n args.actor.system.details.move.oars.value -= 1;\n\nargs.actor.system.details.man -= 2;","QKTA2TqZ77pvHWSJ":" this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 0,\n \"bright\": 0,\n \"alpha\": 0.5,\n \"animation\": {\n \"type\": \"\",\n },\n \"color\": \"#000000\",\n }}));","QKjR6P1WEHXf4K77":"args.fields.slBonus -= 2\n","QKt9ZYpVpznncfJ1":"for(let key in this.item.system.AP)\n{\n if (this.item.system.AP[key])\n {\n this.item.system.AP[key]++;\n }\n}","QLBxcP85duX1Z7LX":"if (!args.item.actor?.has(\"Béni (Taal)\", \"talent\")) return;\n\nargs.item.system.AP.head = 3;","QLE6dDm6Bns2J5Tl":"let property = this.effect.getFlag(\"wfrp4e\", \"property\");\nif (property && !this.item.system.qualities.value.find(i => i.name == property));\n{\n this.item.system.qualities.value.push({name : property});\n}","QLUaOkwuSPvBp7jU":"this.script.scriptNotification(\"Impossible d'attaquer des cibles qui ne sont pas Empêtrée\")\nargs.abort = true;","QNxmImpLTou6WdMQ":"let test = args.test\nif (test.result.minormis || test.result.majormis || test.result.catastrophicmis)\n test.result.other.push(\"Possibilité de faire un test de FM Difficile (-10) pour prévenir la Maladresse\")","QPVVDPcJ4Xi5FmQl":"if(this.actor.hasCondition(\"fatigued\") && args.loc == \"head\" && (args.opposedTest?.attackerTest.result.critical || args.actor.status.wounds.value - args.totalWoundLoss < 0))\n{\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), { fields: { difficulty: \"average\" }, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"unconscious\")\n }\n}","QPuS9YsWAm4LUZWd":"let skills = this.actor.itemTypes.skill.filter(i => i.name == \"Language (Magick)\" || i.name.includes(\"Channelling\"))\nfor(let skill of skills)\n{\n await skill.update({\"system.modifier.value\" : -1 * skill.system.total.value})\n}\n\nthis.script.notification(\"Modificateurs ajoutés aux compétences : \" + skills.map(i => i.name).join(\", \"), \"info\", true);","QQ2gHThZHdO4yLLX":"return args.skill?.name == game.i18n.localize(\"NAME.Swim\");","QQPiREc50HT5W2Tr":"if (args.item.type == \"weapon\" && args.item.weaponGroup.value == \"brawling\")\n args.item.damage.value += \" + 1\"","QRSACifDrvojIXHB":"if (!this.actor.effects.find(e => e.isCondition))\n{\n\treturn this.script.notification(\"Aucun état sur cet acteur\")\n}\n\nlet choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, \"Choisir un état\")\n\nif (choice[0])\n{\n\tthis.actor.removeCondition(choice[0].conditionId)\n}\n","QaEUhlvxFPzowH0v":"args.actor.characteristics.ag.modifier -= 10;\n\n if (args.actor.details.move.value > 3)\n {\n args.actor.details.move.value -= 1;\n if (args.actor.details.move.value < 3)\n args.actor.details.move.value = 3\n }","QaGNsqKm2Nf0zGVm":"return [\"t\", \"int\", \"wp\", \"fel\"].includes(args.characteristic)","QbIYnshWeP1U8SUy":"args.applyAP = false;\nargs.applyTB = false;","QfTBRGXVfwQSghmd":"fromUuid(this.effect.origin).then(caster => {\n if (caster) {\n if (actor.items.find(it => it.name == game.i18n.localize(\"Bestial\"))) {\n let healed = caster.characteristics.wp.bonus\n let wounds = foundry.utils.duplicate(args.actor.status.wounds)\n wounds.value += healed\n\n if (wounds.value > wounds.max)\n wounds.value = wounds.max\n\n args.actor.update({ \"system.status.wounds\": wounds })\n ChatMessage.create({ content: `${this.actor.prototypeToken.name} regains ${healed} Wounds`, speaker: { alias: this.effect.name } })\n } else {\n ui.notifications.warn(\"Target actor has no Bestial trait\")\n }\n }\n})\n\n","Qgn92fZyc3Psn8QJ":"if (args.test.options.useOnesAttractive && (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target)) {\n\n let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\n let ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\n if (ones == 0) {\n ones = 10;\n }\n\n if (ones > SL) {\n args.test.result.SL = \"+\" + (ones + args.test.successBonus + args.test.slBonus)\n args.test.result.other.push(`${this.effect.name}: Unité du dé utilisée comme DR`)\n }\n}","QjlGijPHAwAEX3mf":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.Bvd2aZ0gQUXHfCTh\", this.effect, {\"system.specification.value\" : 9})","Qk7t2l5ep9RDVpgE":"args.context.diceman= true;","Qo8q0P5j9OKEAP70":"let locs = Object.values(this.actor.system.status.armour).map(i => i.label).filter(i => i);\n\nlet location = locs[Math.floor(CONFIG.Dice.randomUniform() * (locs.length))];\n\nthis.script.notification(location);\n\nthis.effect.updateSource({name: this.effect.setSpecifier(location)});","QoEOxRruQXYrZrv3":"let filters = [\n {\n property : \"type\",\n value : \"skill\"\n },\n {\n property : \"name\",\n value : /Melee/gm,\n regex: true\n }\n]\n\nlet items = await ItemDialog.createFromFilters(filters, 2, {text: \"Choisissez 2 Compétences pour ajouter +20\"})\nitems = items.map(i => i.toObject())\nitems.forEach(i => i.system.advances.value = 20)\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","QqkE7rlqhkeRohFD":"return !([\"cast\", \"channelling\"].includes(args.type) && this.actor.hasCondition(\"fatigued\"))","QqybHxNCzPEzG1Qh":"return args.context.dualWieldOffhand","QwHoqu2oO8QO8Mad":"let content = `${this.effect.name}: All targets engaged with ${this.actor.prototypeToken.name} take [[/r 1d10]] Damage, modified by TB and AP.`\n\nthis.script.message(content)","R32U01LBjBrK1pns":" const templateMap = {\n 'P2e7Yx98bK3u110a' : \"\",\n 'iuMp3KLaMT2WCmie' : \"4s01nHFKVKTEZd3B\",\n 'RBuYcT5tppwcmnC5' : \"h3yuJDWnixliXeBG\",\n 'vcGpNwNbhvfzVveQ' : \"7QrsbofccMOE1YsF\",\n 'jmhKZy0w9TzkEK9c' : \"scVTPVyDDbli4WZL\",\n '9Byj6k7SmdTYis2V' : \"4Cd7Dknee2WjReOo\",\n 'laJwc2l9tzJPgaaJ' : \"2hJ2a5YjbwZWWYrd\",\n }\n let template = (await game.wfrp4e.tables.rollTable(\"hireling-templates\", {hideDSN: true})).object;\n let physicalQuirk = (await game.wfrp4e.tables.rollTable(\"physical-quirks\", {hideDSN: true})).text;\n let workEthic = (await game.wfrp4e.tables.rollTable(\"work-ethic\", {hideDSN: true})).text;\n let personalityQuirk = (await game.wfrp4e.tables.rollTable(\"personality-quirks\", {hideDSN: true})).text;\n\n\n let templateItem = await warhammer.utility.findItemId(templateMap[template._id]);\n\n let bio =\n `\n

Template: ${template.text}

\n

Particularité physique: ${physicalQuirk}

\n

Éthique de travail: ${workEthic}

\n

Particularité de personnalité: ${personalityQuirk}

\n `\n\n this.script.message(bio, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n\n await this.actor.update({\"system.details.gmnotes.value\" : bio})\n\n if (templateItem)\n {\n this.actor.createEmbeddedDocuments(\"Item\", [templateItem.toObject()])\n }","R3OfRdi6xv0e9mzB":"return args.item.name.includes(\"Arme\")","R4A2ozuhFbrjr6nj":"await this.actor.hasCondition(\"broken\")?.delete();","R5dOZWFxE2n6tooX":"return this.item.system.usesLocation(args.weapon)","R6SnyF3y4Vsq6oga":"let lore = this.effect.name.split(\"(\")[1].split(\")\")[0].toLowerCase();\n\n// If channelling corresponding lore\nif (args.type == \"channelling\" && args.spell.system.lore.value == lore)\n args.fields.slBonus += 1\n// If channelling or casting different lore\nelse if (args.spell.system.lore.value != lore && args.spell.system.lore.value != \"petty\")\n args.fields.slBonus -= 1","R8FBHZaaARA3z9pB":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'hard';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","R8ecKGRzOr4ThvVa":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Maintenance Crew Test';\nconst difficulty = 'hard';\nconst target = 80;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","R95pDZMHnD9iHAl8":"return args.skill?.name.includes(this.item.system.tests.value);","RDtJXji3hgcKnEBk":"let as = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS\")).toObject();\nlet hv = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.Nj3tC8A5fZ3zEdMR\")).toObject();\nlet ms = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.6w30u0VPsAicrqb5\")).toObject();\nlet ss = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.OEjUvJKi0xmBwbS2\")).toObject();\n\nas.name += ` (${game.i18n.localize(\"SPEC.Sight\")})`;\n\nlet roll = (await new Roll(\"1d10\").roll());\nroll.toMessage(this.script.getChatData())\nlet items = []\n\nif (roll.total <= 2)\n{\n items = items.concat([as]);\n}\nelse if (roll.total <= 4)\n{\n items = items.concat([hv]);\n}\nelse if (roll.total <= 6)\n{\n items = items.concat([ms]);\n}\nelse if (roll.total <= 8)\n{\n items = items.concat([ss]);\n}\nelse if (roll.total <= 10)\n{\n items = items.concat([as, hv, ms, ss]);\n}\n\nthis.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id})","RHyBLYT5oHf7EPnG":"let skills = this.actor.itemTypes.skill.filter(i => i.name.includes(game.i18n.localize(\"NAME.Melee\")))\n\nlet skill = await ItemDialog.create(skills, 1, \"Select the skill used by the weapon\")\nlet group = game.wfrp4e.utility.extractParenthesesText(skill[0]?.name)\nlet groupKey = warhammer.utility.findKey(group, game.wfrp4e.config.weaponGroups)\n\nlet weapon = {\n\tname : this.effect.name,\n\ttype : \"weapon\",\n\timg : this.effect.img,\n\tsystem : {\n\t\t\"damage.value\" : this.actor.system.characteristics.wp.bonus,\n\t\t\"weaponGroup.value\" : groupKey || \"basic\",\n\t\t\"twohanded.value\" : [\"polearm\", \"twohanded\"].includes(groupKey),\n\t\t\"reach.value\" : \"average\",\n\t\t\"qualities.value\" : [{name : \"magical\"}]\n\t},\n}\n\nItem.implementation.create(foundry.utils.expandObject(weapon), {parent : this.actor, fromEffect : this.effect.id})\nthis.script.notification(\"Item created. Further customization must be done manually within the Item's sheet\");","RI8crJxeD8JLDwMh":"return args.weapon?.system?.weaponGroup?.value != \"fencing\"","RJpglw5eVRM1f9t0":"args.wounds *= 5","RKIFGN583PQnqHGk":"if (args.loc == \"body\" && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 2)\n this.script.message(\"Gain de 2 états Hémorragique\")\n}","RNHrSTfMLXm5sXkC":"return [\"ws\", \"bs\", \"s\", \"ag\"].includes(args.characteristic)","RNr9CwyvLhlnwD2h":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Sail\"));","ROXCqAFSTLouJniL":"if (args.test.spell.name == \"Warp Lightning\")\n{\n if (args.test.result.minormis || args.test.result.majormis || args.test.result.catastrophicmis)\n {\n this.script.message(`${this.item.name} Overloads!`)\n }\n}","RPqgRUkiLY5thVbC":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Strength';\nconst difficulty = 'average';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n \n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","RQPe7k09QdAyws67":"return this.effect.name !== game.i18n.localize(\"WFRP4E.YenluiDark\")","RRK91ySi5SzYCRvy":"return args.weapon?.system.isRanged","RSsGiDFibuqg3sHr":"let diseaseIndex = game.packs\n.filter(i => i.metadata.type == \"Item\")\n.reduce((acc, pack) => acc.concat(pack.index.contents), [])\n.filter(i => i.type == \"disease\")\n.map(i => {\n\ti.id = i._id\n\treturn i\n})\n\nlet choice = await ItemDialog.create(diseaseIndex , 1, \"Choisir une maladie\")\n\nif (choice[0])\n{\n\tawait this.item.updateSource({\"system.specification.value\" : choice[0].name})\n}","RUpVgB0czqg95K1Q":"if (this.item.system.protects[args.loc])\n{\n args.weaponProperties.qualities.penetrating = false;\n}","RZibsagclQO5U6o9":"this.actor.modifyAdvantage(1)","RZlMkxJz5apn0mUj":"return args.item?.system.attackType != \"ranged\"","ReJpL0IVesKUbXgj":"args.fields.slBonus -= 8;","RgNdS87nO7RVawuw":"this.actor.removeCondition(\"fatigued\", 1);","RjcHrQ9inlFj9cUU":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nconst weapon = this.effect.sourceActor.items.find(i => i.equipped && i.system.tags.has(\"weapon\"));\nlet damage = weapon.Damage;\ndamage += excessSL;\nthis.actor.applyDamage(damage, {\n loc: \"roll\",\n weaponProperties: {qualities: {penetrating: true}},\n createMessage: this.script.getChatData(),\n});","RlVvlmhOfscaJqCd":"const deletes = this.actor.itemTags.armour.map(a => {\n return {_id: a._id}\n});\nconst armourTrait = this.actor.itemTags.trait.find(t => t.name === game.i18n.localize(\"NAME.TraitArmour\"));\n\nif (armourTrait)\n deletes.push({_id: armourTrait._id});\n\nthis.actor.deleteEmbeddedDocuments(\"Item\", deletes);","RlhOAKfN0ghrrooR":"let holed = this.actor.appliedEffects.filter(e => e.name.includes(\"Holed\"));\n\nfor (let effect of holed) {\n await effect.update({name: effect.name.replace(/\\d+/, rating => parseInt(rating) * 2)});\n}\n\nthis.script.notification(`Holed Ratings of ${this.actor.name} have been doubled.`);","Rmk3UwD0zz4HlTHR":"return args.item?.name === game.i18n.localize(\"NAME.Stealth\")","Rnpw6UQdJifLeuna":"this.effect.updateSource({\"system.transferData.type\" : \"crew\"})","RprZWlnopSqZt7KZ":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"));","RqWnhnwFxaHubgiA":"await args.actor.addCondition(\"blinded\");\nawait args.actor.addCondition(\"deafened\");\nawait args.actor.addCondition(\"stunned\");","Rr82rh79nCkKHcBD":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.IAWyzDfC286a9MPz\", this.effect)","RrchOMpEdIvceJxl":"return args.skill?.name == `${game.i18n.localize(\"NAME.Stealth\")} (${game.i18n.localize(\"SPEC.Rural\")})`","RsWXCcYHONf3ANlD":"this.actor.addCondition(\"stunned\", 1);\n","RuW1PWUFxIbbSlIm":"return ![\"t\", \"wp\", \"ag\", \"i\", \"int\"].includes(args.characteristic)","RvipIYj9H7n4UDMe":"let characteristics = {\n \"ws\" : -10,\n \"bs\" : -10,\n \"s\" : -5,\n \"t\" : -5,\n \"i\" : -10,\n \"ag\" : -10,\n \"dex\" : -10,\n \"int\" : 0,\n \"wp\" : 0,\n \"fel\" : 0\n}\nlet skills = []\nlet skillAdvancements = []\nlet talents = []\nlet trappings = []\nlet items = []\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let Compétence = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == Compétence && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(Compétence)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","RwMw848y13Jq2L4f":"let test = await this.actor.setupSkill(\"Résistance\", {fields : {difficulty : \"difficult\"}, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nif (test.failed)\n{\n\tawait this.actor.addCondition(\"blinded\");\n}\n\nlet msg = ``\nlet armour = args.actor.itemTags.armour.filter(i => i.system.isMetal && i.system.isEquipped);\nfor(let item of armour)\n{\n\tfor(let key in item.system.AP)\n\t{\n\t\tlet AP = item.system.AP[key]\n\t\tlet damage = Math.floor(AP / 2);\n\t\tawait item.system.damageItem(damage, [key]);\n\t}\n\tmsg += `

${item.name} PA divisé par deux

`\n}\nif (msg)\n{\n\tthis.script.message(msg, {speaker : {alias : args.actor.name}});\n}","RyQtuiRykUCQ6Xag":"if (!this.item.actor.name.includes(\"Brunner\")) return;\n\nargs.actor.addCondition(\"ablaze\");","S1QihXuvdEVzeRtB":"let dice = await new Roll(\"1d10\").roll()\nlet roll = dice.total\nlet talent \nlet message\nlet modifier = 0\n\nif (roll <= 3)\n{\n item = await fromUuid(\"Compendium.wfrp4e-core.items.mNoCuaVbFBflfO6X\")\n}\n\nelse if (roll <= 6)\n{\n item = await fromUuid(\"Compendium.wfrp4e-core.items.OEjUvJKi0xmBwbS2\")\n modifier = -3\n}\n\nelse if (roll <= 9)\n{\n item = await fromUuid(\"Compendium.wfrp4e-core.items.mdPGZsn2396dEpOf\")\n modifier = -3\n}\n\nelse if (roll = 10)\n{\n item = await fromUuid(\"Compendium.wfrp4e-core.items.qdMbxW09FUoYBzmB\")\n modifier = -5\n}\n\nmessage = `${roll} Rolled, gain ${item.name}, ${modifier} Strength`\ndice.toMessage(this.script.getChatData())\n\nlet changes = foundry.utils.duplicate(this.effect.changes)\nchanges[0].value = modifier\n\nthis.effect.updateSource({changes})\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], {fromEffect : this.effect.id})\n\nthis.script.notification(message)","S1SQe0Do7ZcuNV5j":"if (![\"roll\", \"none\"].includes(args.fields.hitLocation))\n{\n args.fields.modifier += 20;\n}","S3DCTw4yJ85eSaKp":"this.actor.setupCharacteristic(\"s\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(test => test.roll())","S3Dev4hleOYqDNe9":"if (args.test.options.healWounds) {\n if (args.test.succeeded)\n {\n let wounds = this.actor.characteristics.int.bonus + Number(args.test.result.SL)\n if (args.test.options.fieldDressing && args.test.result.reversed)\n {\n wounds = this.actor.characteristics.int.bonus + Math.min(1, Number(args.test.result.SL))\n }\n\targs.test.result.woundsHealed = wounds\n\targs.test.result.other.push(`${this.actor.name} guéri ${wounds} Blessures du patient.`)\n }\n else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0)\n {\n args.test.result.other.push(`Le patient contracte une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`)\n }\n}","S4793DLFhjMxpM8x":"return ![\"ws\", \"bs\"].includes(args.characteristic) && !args.item?.system.attackType && !args.context.dodge","S6tUyFJvGMV19mvP":"this.actor.status.addArmour(2, {source: this.effect})","S95QqpX1cZyIVCPy":"if (parseInt(this.item.system.specification.value) > 0)\n{\n\tthis.actor.system.status.ward.value = parseInt(this.item.system.specification.value);\n}\n\n","SDwuKuqTsCBZ6hnb":"if (args.totalWoundLoss > 0 && this.item.protects[args.loc])\n{\n let roll = await new Roll(\"1d10\").roll();\n roll.toMessage(this.script.getChatData())\n if (roll.total == 10)\n {\n args.abort = this.effect.name\n }\n}","SGr50Hq1AHIEzIFN":"let choice = await ItemDialog.create(ItemDialog.objectToArray({\n int : game.wfrp4e.config.characteristics.int,\n fel : game.wfrp4e.config.characteristics.fel\n}, this.effect.img), 1, \"Choisir une caractéristique\");\n\nthis.effect.updateSource({\"flags.wfrp4e.characteristic\" : choice[0].id})","SK8paBvnvc5YLFI1":"if (args.test.options.doombolt && !args.test.options.doomboltRolled)\n{\n\targs.test.options.doomboltRolled = true;\n\n\tlet test = await this.actor.setupSkill(`${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`, {fields : {difficulty : \"hard\"}, context : {failure : \"@Table[majormis]{Major Miscast}\"}});\n\tawait test.roll();\n\n\tif (test.succeeded)\n\t{\n\t\targs.test.preData.additionalDamage = 4;\n\t}\n}","SKn61f2ykhzuwMdw":"if ((args.test.result.roll % 11 == 0 || args.test.result.roll == 100) && args.test.failed)\n{\n delete args.test.result.misfire;\n args.test.result.tables.misfire = {\n label : \"Raté\",\n class : \"fumble-roll\",\n modifier : 0,\n key : \"artillery-misfires\"\n }\n}","SLy1Fs3oXcHgFgjK":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nlet data = item.toObject();\nlet value = foundry.utils.getProperty(this.effect.sourceTest, \"result.overcast.usage.other.current\") || 1\ndata.system.specification.value = value\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","SNjG7IvgQzvCGczR":"if (this.actor.system.details.experience.current < 100) {\n return this.script.notification(game.i18n.localize(\"SCRIPT.NotEnoughXP\"))\n}\n\nlet item = await game.wfrp4e.utility.findItem(\"Messenger\", \"trait\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item]);\nlet expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);\nexpLog.push({amount : 100, reason: item.name, spent: this.actor.details.experience.spent + 100, total: this.actor.details.experience.total, type: \"spent\"});\nthis.actor.update({\n \"system.details.experience.spent\": this.actor.details.experience.spent + 100,\n \"system.details.experience.log\": expLog\n });","SO4Aa9argKbuO9rQ":"args.fields.modifier -= 20","SPOkFWZWziZk5b7A":"return args.item?.system?.attackType != \"melee\"","SRmfstEs278bP9Pz":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.yRhhOlt18COq4e1q\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","SSqGxyN9hw0HDmED":"this.actor.addCondition(\"prone\");","SThruXFhxUdNKCG4":"const test = await this.actor.setupCharacteristic(\"int\", {fields: {difficulty: \"easy\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\n\nif (test.failed) {\n this.actor.addCondition('stunned');\n}\n\nthis.script.scriptNotification(`${this.actor.name} échou au test d'INT et reçoit un état Sonné!`);","SUfCkHdJg7rttdM1":"let amount = this.effect.sourceActor.system.characteristics.fel.bonus;\nargs.actor.addCondition(\"blinded\", amount);","SVnclT81zDqRLE5E":"args.test.result.other.push(`${this.effect.name}: @Fear[1,${this.actor.prototypeToken.name}]`)","SWIJjM2RCmzfr64u":"if (args.test.result.hitloc.result == \"head\" && args.test.result.critical)\n{\n args.test.result.critModifier = args.test.result.critModifier ? args.test.result.critModifier + 40 : 40\n\n args.test.result.critical += ` (+${args.test.result.critModifier})`\n}\n","SdZ7xAEzJGVDCsaI":"let damage = await new Roll(\"2d10 + @sin\", {sin: this.actor.system.status.sin.value || 0}).roll();\ndamage.toMessage(this.script.getChatData());\nthis.actor.applyDamage(damage.total, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL,\n createMessage: this.script.getChatData()\n});\n\nconst test = await this.actor.setupSkill(\n game.i18n.localize(\"NAME.Endurance\"),\n {\n fields: {difficulty: \"hard\"},\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n },\n);\n\nawait test.roll();\nif (test.failed)\n{\n if (parseInt(test.result.SL) <= -4)\n {\n this.actor.addCondition(\"unconscious\");\n }\n else \n {\n this.actor.addCondition(\"stunned\");\n }\n}","SdrCM66oViwRFF8I":"await this.actor.addCondition(\"prone\");\nawait this.actor.addCondition(\"blinded\", 1 + this.actor.system.status.sin?.value || 0)","SefcrhXsdYGFcCW6":"args.actor.system.details.move.value -= 3;\nargs.actor.system.details.man -= 2;\nargs.actor.system.status.carries.max *= 2;","SjDNjLBGsd9fYObo":"args.applyAP = false;","SlrslcNdnYONcSH3":"let weapon = this.actor.itemTags[\"weapon\"].find(i => i.system.isEquipped);\nif (!weapon)\n{\n this.script.notification(\"Aucune arme équipée!\", \"error\");\n return;\n}\n\nif (await this.actor.spend(\"system.status.fortune.value\", 1))\n{\n let test = await this.actor.setupWeapon(weapon, {appendTitle : ` - ${this.effect.name}`, whirlwind: true});\n test.roll();\n}\nelse\n{\n this.script.notification(\"Pas assez de Chance!\", \"error\");\n}","SlzPn7ONIKab9URj":"if (game.combat.combatant?.actor?.uuid == this.actor.uuid)\n{\n \nthis.script.message(await this.actor.applyBasicDamage(2, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))\n}","SrCHfOJFZwDickqa":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"average\"}});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}","SreM9Jyj2XZjoezH":"return args.item?.system?.attackType == \"ranged\"","Ssn21dxoMQiqD1y4":"return args.type == \"cast\" && args.item.lore.value == \"fire\"","StAderQaQQsxb6Rv":"let target = await game.wfrp4e.tables.rollTable(\"fixations\")\nif (target)\n{\n this.script.notification(target.result);\n let hatred = this.actor.items.find(i => i.getFlag(\"wfrp4e\", \"fromEffect\") == this.effect.id)\n if (hatred)\n {\n hatred.update({\"system.specification.value\" : target.result})\n }\n}","SvFKt9hMcFQjeILA":"args.actor.addCondition(\"entangled\", this.effect.sourceTest.result.overcast.usage.other.current)","SwliIjjjFtZMnJH3":"return !args.weapon?.system.properties.qualities.hack || args.weapon?.system?.isRanged","T0KBl8iEkcPq08RI":"if (args.applyAP && args.modifiers.ap.magical)\n{\n args.modifiers.ap.ignored += args.modifiers.ap.magical\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignore les PA magiques (\" + args.modifiers.ap.magical + \")\");\n}","T3RfSt3VMEat3iDD":"return args.skill?.name !== game.i18n.localize(\"NAME.Perception\");","T4JEEDYCEIUbVHv4":"let fatigued = this.actor.hasCondition(\"fatigued\")\n if (!fatigued)\n {\n this.actor.addCondition(\"fatigued\")\n ui.notifications.notify(\"Etat Extenué ajouté à \" + this.actor.name + \" qui est impossible à retirer tant que le symptôme de Malaise est présent.\")\n }","T5fiTzhXEQAv9Drf":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.rlDZZTj5PXjuRXa2\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key;\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n\nlet location = this.item.system.location.key;\n\nif (location)\n{\n let dropped = this.item.system.weaponsAtLocation;\n\n if (dropped.length)\n {\n this.script.notification(`Dropped ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}","T74FEjfFrh3f6MKv":"args.wpb = args.sb;","TAw9vXnfyIAl5DGs":"if (this.item.system.quantity.value)\n{\n CorruptionMessageModel.createCorruptionMessage(\"minor\", this.script.getChatData());\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","TBpNFRL5uehs0fze":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectData : [this.item.effects.contents[0]]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","TCgEBuMPPd5SLAsc":"args.fields.modifier -= 15","TCtXPvDpbfz1yrVZ":"let choice1 = [\n {\n type : \"skill\",\n name : \"Corps à corps (Base)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\nlet choice2 = [\n {\n type : \"skill\",\n name : \"Corps à corps (A deux mains)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\n\n let choice = await foundry.applications.api.DialogV2.wait({\n window : {title : \"Choix\"},\n content :\n `

\n Sélectionnez votre choix\n

\n
    \n
  1. Corps à corps (Base)
  2. \n
  3. Corps à corps (A deux mains)
  4. \n
\n `,\n buttons : [\n {\n action : \"basic\",\n label : \"Base\",\n callback : () => {\n return choice1\n }\n },\n {\n action : \"twoHanded\",\n label : \"A deux mains\",\n callback : () => {\n return choice2\n }\n }\n ]\n })\n\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n item = item.toObject()\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${c.name}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","TEiNj5FgkoD3YbhS":"this.actor.hasCondition(\"bleeding\")?.delete()","TGN070HeJLl3gSMY":"let test = await this.actor.setupCharacteristic(\"ag\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: \"Goes Prone\" }})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\");\n}","TIoUbjOtj7PTK2t8":"const test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"challenging\"},\n context: {\n failure: `Butcher perd des dents.`\n }\n});\n\nawait test.roll();\n\nif (test.failed) {\n const SL = Number(test.result.SL);\n this.script.message(`Butcher perd ${SL} dents.`);\n}","TKjBb75exjae87fa":"args.modifiers.other.push({label : this.effect.name, details : \"Augmentation des Dégâts\", value : 2})","TNWmIkuubqBn38he":"this.effect.deleteCreatedItems();","TOyQLrugFGzwc5nY":"return !(args.skill?.name.includes(game.i18n.localize(\"NAME.Melee\")) || args.item?.isMelee || args.context.corruption);","TQRL4mZhZohXg1Au":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\ntest.roll();","TSsHcn4EDulD03RU":"return !this.actor.hasCondition(\"fatigued\")","TU2xjbJ0zFtytF3J":"return args.skill?.name == game.i18n.localize(\"NAME.CharmAnimal\");","TXBg7zWxPfWxFmUB":"if (args.type == \"effect\" && args.options.action == \"create\" && [\"ablaze\"].some(i => args.document.statuses.has(i)))\n{\n this.script.notification(\"Immune to \" + args.document.name);\n return false;\n}","TXce477AiXHKbepk":"return args.type !== \"pray\" || args.item?.system?.type?.value !== \"miracle\" || args.item?.system?.god?.value?.toLowerCase() !== \"taal\";","TY0xSQ00XXyEr49r":"args.fields.slBonus += 1;","TcqumwUFAL6V0cty":"if (this.item.getFlag(\"wfrp4e\", \"failedCool\"))\n{\n this.item.system.AP = {\n \"head\": 0,\n \"lArm\": 0,\n \"rArm\": 0,\n \"lLeg\": 0,\n \"rLeg\": 0,\n \"body\": 0\n }\n}","Td8M5K1P92GbM2IA":"if (!args.messageSent)\n{ \n args.messageSent = true;\n let runes = this.actor.effects.contents.filter(i => i.name == this.effect.name);\n this.script.message(`${args.attacker.speaker.alias} reduce Run speed by ${runes.length * 4} yds.`)\n}","TdjlJro0RRVSh8g8":"return args.skill?.name != game.i18n.localize(\"NAME.Gamble\") && args.skill?.name != game.i18n.localize(\"NAME.SleightOfHand\");","TmaS8o33825QUMrx":"let stomp = game.wfrp4e.config.systemItems.stomp;\nlet test = await this.actor.setupTrait(stomp)\nawait test.roll();","TnFobCxG4pxlYmKr":"let gorCharacteristics = {\n \"ws\": 45,\n \"bs\": 30,\n \"s\": 35,\n \"t\": 45,\n \"i\": 30,\n \"ag\": 35,\n \"dex\": 25,\n \"int\": 25,\n \"wp\": 30,\n \"fel\": 25\n}\nfor (let char in this.actor.characteristics) {\n if (this.actor.characteristics[char].initial < gorCharacteristics[char])\n this.actor.characteristics[char].initial = gorCharacteristics[char]\n}","ToKlHDAjJOsC51ag":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.GlShFJF2TpsNh1FX\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n \nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}});\nawait test.roll();\nif (test.failed)\n{\n args.actor.addCondition(\"unconscious\")\n}","TpZItJ5Ugbazaobd":"let locations = [];\n\nwhile (locations.length < 2)\n{\n let loc = await game.wfrp4e.tables.rollTable(\"hitloc\", {hideDSN : true})\n if (!locations.includes(loc.result))\n {\n locations.push(loc.result);\n }\n}\n\nlocationText = locations.map(i => game.wfrp4e.config.locations[i]).join(\", \")\n\nthis.item.updateSource({name : this.item.name += ` (${locationText})`, \"flags.wfrp4e.locations\" : locations})\nthis.effect.updateSource({\"flags.wfrp4e.locations\" : locations})","TpgK2aAe93ui3Rbs":"if (args.test.isFumble && args.test.options.supercharge) {\n args.test.result.tables.misfire = {\n label : \"Raté (Surchargé)\",\n class : \"fumble-roll\",\n modifier : 0,\n key : \"artillery-misfires\"\n } \n}","Tq45Nd8J3eTvHT41":"return args.skill?.name != game.i18n.localize(\"NAME.Perception\") && args.skill?.name != game.i18n.localize(\"NAME.SetTrap\");","TrIYdcG3jDER4WgY":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.xsGbDFqK2qh7lsIj\")\nlet data = item.toObject();\ndata.system.specification.value = game.i18n.localize(\"Minor\");\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","TwgdEucxcHloc4cX":"let choice1 = [\n {\n type : \"armour\",\n name : \"Chausses de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Cotte de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Coiffe de Mailles\"\n },\n]\nlet choice2 = [\n {\n type : \"armour\",\n name : \"Chausses de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Cotte de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Coiffe de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Jambières de cuir\"\n },\n {\n type : \"armour\",\n name : \"Calotte de cuir\"\n },\n {\n type : \"armour\",\n name : \"Veste de cuir\"\n },\n]\nlet choice3 = [\n {\n type : \"armour\",\n name : \"Plastron d'acier\"\n },\n {\n type : \"armour\",\n name : \"Brassards\"\n },\n {\n type : \"armour\",\n name : \"Heaume\"\n },\n {\n type : \"armour\",\n name : \"Jambières d'acier\"\n },\n]\n\n\nlet choice = await foundry.applications.api.DialogV2.wait({\n window : {title : \"Choix\"},\n content :\n `

\n Sélectionnez votre choix\n

\n
    \n
  1. Mailles
  2. \n
  3. Mailles et Cuir
  4. \n
  5. Plaques
  6. \n
\n `,\n buttons : [\n {\n action : 1,\n label : \"Mailles\",\n callback : () => {\n return choice1\n }\n },\n {\n action : 2,\n label : \"Mailles et Cuir\",\n callback : () => {\n return choice2\n }\n },\n {\n action : 3,\n label : \"Plaques\",\n callback : () => {\n return choice3\n }\n }\n ]\n})\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n let equip = item.system.tags.has(\"equippable\");\n item = item.toObject()\n if (equip)\n {\n item.system.equipped.value = true;\n }\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${c.name}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","TwwKxFjK6TNGKbRB":"this.script.message(await this.actor.applyBasicDamage(12, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}))\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty: \"hard\"}})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addSystemEffect(\"cold1\")\n}\n\n","TxfmxDGBj04AQQpt":"let weapon = args.opposedTest.defenderTest.weapon\nif (\n !args.opposedTest.result.swapped && \n args.opposedTest.result.winner == \"defender\" && \n args.opposedTest.attackerTest.result.damage && \n weapon && \n weapon?.system.properties.qualities.fast\n )\n{\n await args.opposedTest.swap(this.effect.name);\n}","TzgmYRXFXRspIo1i":"this.effect.delete();","U1RUcgP8LD2qeGTm":"return !args.context.reload","U1UpSRJOSjPpO4HS":"let mutations = await warhammer.utility.findAllItems(\"mutation\", \"Loading Mutations\", true)\n\nlet roll = Math.floor(CONFIG.Dice.randomUniform() * mutations.length);\n\nthis.actor.createEmbeddedDocuments(\"Item\", [(await fromUuid(mutations[roll].uuid)).toObject()]);\nthis.script.notification(`Added ${mutations[roll].name}`)","U26XMie3Kjoddisj":"let stunned = this.actor.hasCondition(\"stunned\")\nif (stunned)\n{\n this.script.notification(`Suppression d'1 état 1 Sonné`)\n this.actor.removeCondition(\"stunned\");\n}\nelse\n{\n\tthis.script.notification(`Aucune état Sonné à supprimer`)\n}","U2xKn7R1gm8kiQm8":"this.actor.hasCondition(\"broken\")?.delete();\n\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.8pVzgPkgWpTJvfhG\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","U4A8FDNmwBGTuQZO":"if (args.attacker.has(game.i18n.localize(\"NAME.Undead\")) && !args.attacker.has(game.i18n.localize(\"NAME.Ethereal\")))\n{\n args.totalWoundLoss = Math.floor(args.totalWoundLoss / 2)\n args.modifiers.other.push({label : this.effect.name, details : game.i18n.localize(\"Halved\"), value : \"× 0.5\"})\n}","U5ndCwcJ1s3Ns26w":"args.item.system.qualities.value.push({name : \"magical\"});\nargs.item.system.damage.value += ` + ${parseInt(this.effect.sourceTest.result.SL)}`;\nargs.item.name += ` (${this.effect.name})`","U78c4oUjKwyUu6jT":"return (args.skill?.name != game.i18n.localize(\"NAME.Perception\") && args.characteristic != \"fel\")","U7lRf56BFaTfsC6B":"const type = await ValueDialog.create({\n title: game.i18n.localize(\"SCRIPT.FellstaveDialogTitle\"),\n text: game.i18n.localize(\"SCRIPT.FellstaveDialogText\")\n}, \"\");\n\nawait this.effect.item.update({name: `${this.effect.item.name} (${type})`});\nconst updates = this.effect.item.effects.map(e => {\n return {_id: e.id, name: e.name + ` (${type})`}\n});\nthis.effect.item.updateEmbeddedDocuments(\"ActiveEffect\", updates);","U9xh2wriSqCosugW":"if (args.test.options.stag)\n{\n\tif (parseInt(args.test.result.SL) < 0 || args.test.failed)\n\t{\n\t\tif (parseInt(args.test.result.SL) < 0)\n\t\t{\n\t\t\targs.test.result.SL = \"+0\";\n\t\t\targs.test.result.description = game.i18n.localize(\"ROLL.MarginalSuccess\");\n\t\t}\n\t\targs.test.result.outcome = \"success\"\n args.test.result.other.push(`${this.effect.name}: Minimum +0 SL`)\n\t}\n}","UC6G3pFQwzUhrw6F":"return args.skill?.name != game.i18n.localize(\"NAME.CharmAnimal\");","UDPsaymtZf39UsMk":"\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (!fatigued)\n {\n this.actor.addCondition(\"fatigued\")\n ui.notifications.notify(\"Etat Extenué ajouté à \" + this.actor.name + \" ce qui est impossible à retirer tant que le symptôme de Malaise est présent.\")\n }","UH5MIzqi2MvEqTwj":"if (args.totalWoundLoss > 0)\n{\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n roll.toMessage(this.script.getChatData());\n args.totalWoundLoss += roll.total;\n args.modifiers.other.push({label : this.effect.name, value : roll.total})\n}","UINefUJZN0GjcCbB":"if (args.type == \"cast\")\n{\n args.abort = true;\n this.script.notification(\"Impossible de lancer des sorts !\");\n}\nreturn true;","ULmZMLezDamerN04":"let spells = await warhammer.utility.findAllItems(\"spell\", \"Loading Spells\", true, [\"system.lore.value\"])\n\nlet lore = (await game.wfrp4e.tables.rollTable(\"random-caster\", {hideDSN: true})).text\nthis.script.notification(lore)\nif (lore == \"GM's Choice\") {\n return\n}\n\nelse if (lore == \"Magie des Arcanes (Domaine)\") {\n lore = \"Arcane\"\n}\n\nelse if (lore == \"Magie Mineure\") {\n lore = \"petty\"\n}\n\nelse {\n lore = lore.toLowerCase();\n}\n\nlet spellsWithLore = []\nif (lore == \"Arcane\") {\n spellsWithLore = spells.filter(i => !i.system.lore.value)\n}\nelse {\n spellsWithLore = spells.filter(i => i.system.lore.value == lore)\n}\n\nlet selectedSpell = spellsWithLore[Math.floor(CONFIG.Dice.randomUniform() * spellsWithLore.length)]\nItem.implementation.create(selectedSpell.toObject(), { parent: this.actor}).then(item => {\n this.actor.setupCast(item).then(test => test.roll());\n})","UQtXuQmUlTyDKqhe":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 20,\n \"s\" : 0,\n \"t\" : 10,\n \"i\" : 15,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 40,\n \"wp\" : 45,\n \"fel\" : 10\n}\nlet skills = [\"Focalisation\", \"Calme\", \"Intimidation\", \"Langue (Magick)\", \"Language (Nehekharan)\", \"Savoir (Magie)\", \"Perception\"]\nlet skillAdvancements = [10, 20, 15, 15, 10, 10, 10]\nlet talents = [\"Magie des Arcanes (Domaine)\", \"Dur à cuire\", \"Menaçant\", \"Magie Mineure\", \"Lire/Écrire\", \"Seconde Vue\"]\nlet trappings = [\"Arme simple\"]\nlet specialItems = [ \n {name: \"Mouldering Robes\", type: \"trapping\", trappingType: \"clothingAccessories\" }, \n {name: \"Pouches containing ritual components\", type: \"trapping\", trappingType: \"clothingAccessories\" }, \n {name: \"Staff\", type: \"weapon\", damage: \"SB+2\"}, \n {name: \"Magie Noire (Nécromancie)\", type: \"talent\"},\n] \nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWfrp4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else \n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else \n {\n ui.notifications.warn(`Could not find ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings) \n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else \n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nlet filters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"petty\"\n }\n]\n\nlet petty = (await ItemDialog.createFromFilters(filters, 3, {text: \"Choisissez 3 Sorts Mineurs\"})).map(i => i.toObject());\n\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"\"\n }\n]\n\nlet arcane = (await ItemDialog.createFromFilters(filters, 2, {text : \"Choisissez 2 Sorts d'Arcane\"})).map(i => i.toObject());\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"name\",\n value: /^((?!\\().)*$/gm, // Remove tout spells with parentheses (tout arcane spells spells)\n regex: true\n },\n {\n property : \"system.lore.value\",\n value : \"necromancy\"\n }\n]\n\nlet necromancy = (await ItemDialog.createFromFilters(filters, 1, {text : \"Choisissez 1 Sort de Nécromancie\"})).map(i => i.toObject());\n\narcane.forEach(i => {\n i.img = \"modules/wfrp4e-core/icons/spells/necromancy.png\";\n i.system.lore.value = \"necromancy\";\n})\nlet spells = [...petty, ...necromancy, ...arcane];\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items.concat(spells));\n","UTlgF4azrGQZsoDv":"const talents = await Promise.all([game.i18n.localize(\"NAME.Ambi\"), game.i18n.localize(\"NAME.Distract\")].map(game.wfrp4e.utility.findTalent))\nthis.actor.createEmbeddedDocuments(\"Item\", talents, {fromEffect : this.effect.id})","UUHQRPRrrRSr9MIA":"const venomFlag = this.effect.getFlag(\"wfrp4e-tribes\", \"venom\");\n\nif (venomFlag) {\n this.actor.updateEmbeddedDocuments(\"Item\", [venomFlag]);\n}","UWrzokgabRKUpnkG":"return [\"t\", \"wp\", \"ag\", \"i\", \"int\"].includes(args.characteristic)","UXdlnmwVgjc1QpF2":"args.actor.system.details.move.value += 1;\nargs.actor.system.status.carries.max = Math.floor(args.actor.system.status.carries.max * 0.75);","UYLXm2W6jVn21Age":"args.fields.modifier += 40;","UaImulhbPURkLJg2":"return this.actor.attacker && (args.skill?.name == `${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Basic\")})` || (args.type == \"weapon\" && args.item?.system.weaponGroup.value == \"basic\"))","UbGzr86u3wqSEr2h":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"average\"}, appendTitle : \" - Wounded\"})\n await test.roll();\n if (test.failed)\n {\n fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\").then(disease => {\n this.actor.createEmbeddedDocuments(\"Item\", [disease.toObject()])\n this.script.scriptNotification(\"Gained \" + disease.name)\n })\n }","UfkysrAftCs09Fct":"return args.skill.name !== game.i18n.localize(\"NAME.Gamble\")","UgQW0UMPOZ0jwfVJ":"let current = this.actor.status.fortune.value\n\nthis.actor.update({\"system.status.fortune.value\" : 1 + current})\n\nthis.script.message(`${this.actor.prototypeToken.name} fortune points increased from ${current} to ${1 + current}`)","UlRSaZG4ZUU6fMND":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'challenging';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n \n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","UlygtNPSDlWPIFCI":"args.fields.slBonus++;\n","Um6xMMiUftLXJxEt":"return [\"fel\", \"dex\"].includes(args.characteristic)","UnqnWi0dZYLf5fTT":"let choice1 = [\n {\n type : \"armour\",\n name : \"Chausses de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Cotte de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Coiffe de Mailles\"\n },\n]\nlet choice2 = [\n {\n type : \"armour\",\n name : \"Chausses de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Cotte de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Coiffe de Mailles\"\n },\n {\n type : \"armour\",\n name : \"Jambières de cuir\"\n },\n {\n type : \"armour\",\n name : \"Calotte de cuir\"\n },\n {\n type : \"armour\",\n name : \"Veste de cuir\"\n },\n]\nlet choice3 = [\n {\n type : \"armour\",\n name : \"Plastron d'acier\"\n },\n {\n type : \"armour\",\n name : \"Brassards\"\n },\n {\n type : \"armour\",\n name : \"Heaume\"\n },\n {\n type : \"armour\",\n name : \"Jambières d'acier\"\n },\n]\n\nlet choice = await foundry.applications.api.DialogV2.wait({\n window : {title : \"Choix\"},\n content :\n `

\n Sélectionnez votre choix\n

\n
    \n
  1. Mailles
  2. \n
  3. Mailles et Cuir
  4. \n
  5. Plaques
  6. \n
\n `,\n buttons : [\n {\n action : 1,\n label : \"Mailles\",\n callback : () => {\n return choice1\n }\n },\n {\n action : 2,\n label : \"Mailles et Cuir\",\n callback : () => {\n return choice2\n }\n },\n {\n action : 3,\n label : \"Plaques\",\n callback : () => {\n return choice3\n }\n }\n ]\n})\n\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n let equip = item.system.tags.has(\"equippable\");\n item = item.toObject()\n if (equip)\n {\n item.system.equipped.value = true;\n }\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${c.name}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","UsAHQecRlWL5PhP6":"this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty : \"average\"}}).then(async test =>\n{\n await test.roll()\n if (test.failed)\n {\n this.actor.corruptionDialog(\"moderate\") \n }\n})","UsuwsmU1TUQLQVM2":"let lore = this.effect.name.split(\"(\")[1].split(\")\")[0].toLowerCase();\nreturn !args.spell || (args.type == \"cast\" && [\"petty\", lore].includes(args.spell.system.lore.value));","UtqUthabeQ4rHDLQ":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.tNWrJUOArwfWXsPw\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id});","Uvk1X7sEhvv77YkD":"if (!args.flags.distractingApplied)\n{\n args.fields.modifier -= 20;\n args.flags.distractingApplied = true;\n}","UvycHOjSPm5Zv9KJ":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nlet baseDamage = \"4\";\nif (test.succeeded)\n baseDamage = \"0\";\n \nlet damage = this.effect.sourceItem.system.computeSpellDamage(baseDamage, true) + parseInt(this.effect.sourceTest.result.SL);\n\nthis.script.message(await this.actor.applyBasicDamage(damage, {suppressMsg : true}))\nthis.actor.addCondition(\"ablaze\")","UwjkHRAQHESdYXJs":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 2,\n \"bright\": 1,\n \"alpha\": 0.5,\n \"animation\": {\n \"speed\": 4,\n \"intensity\": 4,\n \"type\": \"pulse\",\n },\n \"color\": \"#949bff\",\n}}));","Ux4buMc7llF1Kg8p":"if (!this.actor.hasCondition(\"stunned\") && !this.actor.hasCondition(\"unconcscious\"))\n{\n this.effect.delete();\n}","Ux7L2VL2fYfITST6":"if (args.test.isCriticalFumble && args.test.context.dispel)\n{\n\tif (parseInt(args.test.result.SL) > 0 || args.test.succeeded)\n\t{\n\t\tif (parseInt(args.test.result.SL) > 0)\n\t\t{\n\t\t\targs.test.result.SL = \"-0\";\n\t\t\targs.test.result.description = game.i18n.localize(\"ROLL.MarginalFailure\");\n\t\t}\n\t\targs.test.result.outcome = \"failure\"\n args.test.result.other.push(`${this.effect.name}: Automatic Failure`)\n\t}\n\n}","UxVfVoH7cbC9ESDr":"const test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"challenging\"},\n context: {\n failure: `Gain d'1 état @Condition[Stunned].`\n }\n});\n\nawait test.roll();\n\nif (test.failed)\n args.actor.addCondition(\"stunned\");","V0b4yLTawjCnm9ke":"if (args.opposedTest.attackerTest.result.critical\n || (args.totalWoundLoss > 0 && args.totalWoundLoss > args.actor.system.status.wounds.value))\n{\n await args.actor.corruptionDialog(\"minor\")\n}","V1D2Uo3WDKYQePU3":"let damage = this.effect.sourceTest.result.damage;\n \nlet loc = \"head\"\nlet APatLoc = this.actor.system.status.armour[loc];\n\nlet metalAP = APatLoc.layers.reduce((metal, layer) => metal += (layer.metal ? layer.value : 0), 0)\n\nlet APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at location;\n\ndamage -= (APused + this.actor.system.characteristics.t.bonus)\n\nlet msg = await this.actor.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\nmsg += ` (Ignore ${metalAP} PA de métal sur ${game.wfrp4e.config.locations[loc]})`\nthis.script.message(msg)\n","V1KCAPGMPvAz3F3g":"let roll = await new Roll(\"1d10 + @sin\", {sin: this.actor.system.status.sin.value || 0}).roll();\nroll.toMessage(this.script.getChatData());\nthis.effect.updateSource({duration: {\n value: roll.total,\n units: \"days\"\n}});","V2lsVTi6q28eL5jl":"args.fields.slBonus += parseInt(this.effect.sourceTest.result.SL)","V4PcjtHde941wv6J":"await this.actor.addCondition(\"prone\");\nconst SL = this.effect.sourceTest.result.slOver;\nconst stunned = 1 + SL;\nawait this.actor.addCondition(\"stunned\", stunned);\n\nif (stunned > this.actor.system.characteristics.t.bonus) {\n const crit = ` Critique`;\n\n const Test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {\n skipTargets: true,\n appendTitle: ` - ${this.effect.name}`,\n fields: {difficulty: \"average\"},\n context: {failure: `Encaisse ${crit} à la tête.`}\n })\n\n await test.roll();\n}","V7qmFwUMCY2tfziH":"this.actor.addCondition(\"stunned\")","V9wD9FWHWxZUOGSI":"let roll = await (new Roll(`max(0, 1d10 - ${this.actor.characteristics.wp.bonus})`).roll())\nlet fatigued = roll.total\nroll.toMessage(this.script.getChatData());\nif (fatigued > this.actor.characteristics.wp.bonus)\n{\n this.actor.addCondition(\"unconscious\")\n this.script.notification(`Tombe inconscient\" `)\n}\nelse\n{\n fatigued = Math.max(0, fatigued)\n if (fatigued)\n this.actor.addCondition(\"fatigued\", fatigued)\n this.script.notification(`Reçoit ${fatigued} états Extenué`)\n}","V9xm4X1x3lPYTQaI":"if (args.extendedTest?.getFlag(\"wfrp4e\", \"fear\"))\n{\n\tthis.script.notification(\"Immunisté à la Peur\");\n\targs.extendedTest.delete();\n\targs.abort = true;\n}","V9zm2hKUVLVZtAcN":"let characteristics = {\n \"ws\" : -10,\n \"bs\" : -10,\n \"s\" : 0,\n \"t\" : 15,\n \"i\" : 15,\n \"ag\" : -20,\n \"dex\" : 0,\n \"int\" : 20,\n \"wp\" : 10,\n \"fel\" : 10\n}\nlet skills = [\"Charme\", \"Focalisation\", \"Entertain (Prophétie)\", \"Intuition\"]\nlet skillAdvancements = [0, 0, 20, 10]\nlet talents = [\"Détection d'artefact\", \"Menaçant\", \"Sixième Sens\"]\nlet traits = [\"Condamné\", \"Lanceur de sorts (Voie de la vie)\", \"Protection\"]\nlet trappings = []\nlet items = [];\nlet spells = [\"Forêt d'épines\"];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else \n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else \n {\n ui.notifications.warn(`Introuvable : ${talent}`, {permanent : true})\n }\n}\n\nconst traitRegex = /(?:,?(.+?)(\\+?\\d{1,2}\\+?)?\\s*?(?:\\((.+?)\\)\\s*(\\+?\\d{1,2})?|,|$))/gm\nfor (let trait of traits)\n{\n let traitMatches = trait.matchAll(traitRegex).next().value\n let traitName = traitMatches[1]\n let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there's a specialization\n let traitSpec = traitMatches[3]\n\n let traitItem;\n try {\n traitItem = await WFRP_Utility.findItem(traitName, \"trait\")\n }\n catch { }\n if (!traitItem) {\n ui.notifications.warn(`Introuvable : ${trait}`, {permanent : true})\n }\n traitItem = traitItem.toObject()\n\n if (Number.isNumeric(traitVal))\n {\n traitItem.system.specification.value = traitName.includes('Arme','Cornes','Queue','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;\n traitItem.name = (traitItem.name + ` ${traitSpec ? \"(\"+ traitSpec + \")\" : \"\"}`).trim()\n }\n else \n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings) \n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else \n {\n ui.notifications.warn(`Introuvable : ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells) \n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else \n {\n ui.notifications.warn(`Introuvable : ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","VAPsww9x3HAw1sKP":"return !args.context.dodge","VAs1nXvicdQK18Do":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Language\"));","VCnNWmRBH28Rx0JH":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"))","VGuZMIR1lE8I1F1y":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"difficult\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed) {\n this.actor.addCondition(\"stunned\");\n}","VINX6TBAJQznhVcN":"const repaired_message = `

Le remplacement de ${this.item.name} par un équipement de fortune est terminé.

`;\nconst Test = 'Test de l\\'équipe de maintenance';\nconst difficulty = 'difficile';\nconst target = 80;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","VJe23auRmrmZxdKM":"this.item.system.qualities.value.push({name: \"magical\"})\n\nthis.item.system.damage.value += \" + 1\"","VKpKq4RSbI1KkUQK":"this.actor.flags.useless[this.effect.getFlag(\"wfrp4e\", \"location\")] = true;","VLdF2HPnCrNIgp7a":"let items = [];\n\nlet etiquette = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP\")).toObject();\netiquette.name += \" (Followers of Khorne)\";\n\nitems.push(etiquette);\n\nlet animosity = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f\")).toObject();\n animosity.system.specification.value = \"Followers of Slaanesh\";\n\nitems.push(animosity);\n\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect : this.effect.id});\n","VM2zbABURI9K3JwQ":"if (!this.item.system.properties.qualities.pummel) this.item.system.qualities.value.push({name : 'pummel'});\n if (!this.item.system.properties.qualities.impale) this.item.system.qualities.value.push({name : 'impale'})\n if (!this.item.system.properties.qualities.penetrating) this.item.system.qualities.value.push({name : 'penetrating'})","VNOKTzCrFbZ6PJUj":"return ![game.i18n.localize(\"NAME.CharmAnimal\"), game.i18n.localize(\"NAME.Endurance\"), game.i18n.localize(\"NAME.OutdoorSurvival\")].includes(args.skill?.name)","VOc9sKag2Vy4vGGZ":"let specifier = this.item.specifier;\nlet rune;\nlet categories = [];\nif (specifier && specifier.toLowerCase() != \"toutes formes\")\n{\n if (specifier.includes(\"Talisman\"))\n {\n categories.push(\"talisman\");\n }\n if (specifier.includes(\"Protection\"))\n {\n categories.push(\"protection\");\n }\n if (specifier.includes(\"Arme\"))\n {\n categories.push(\"weapon\");\n }\n if (specifier.includes(\"Armure\"))\n {\n categories.push(\"armour\");\n }\n if (specifier.includes(\"Engineering\"))\n {\n categories.push(\"engineering\");\n }\n\n if (categories.length)\n {\n let runes = await warhammer.utility.findAllItems(\"wfrp4e-dwarfs.rune\", null, true, [\"system.category\", \"system.master\"]);\n let choices = runes.filter(i => categories.includes(i.system.category) && i.system.master);\n\n if (choices.length)\n {\n rune = (await ItemDialog.create(choices, 1, {title : this.effect.name, text : specifier, indexed: true}))[0]\n } \n else \n {\n rune = await DragDialog.create({text : `Provide Master Rune to learn (${specifier})`, title : this.effect.name, filter: (item) => item.type == \"wfrp4e-dwarfs.rune\" && item.system.master, onError: \"Doit fournir une Rune Maîtresse\"});\n }\n }\n else \n {\n rune = await DragDialog.create({text : `Provide Master Rune to learn (${specifier})`, title : this.effect.name, filter: (item) => item.type == \"wfrp4e-dwarfs.rune\" && item.system.master, onError: \"Doit fournir une Rune Maîtresse\"});\n }\n}\nelse \n{\n rune = await DragDialog.create({text : `Provide Master Rune to learn`, title : this.effect.name, filter: (item) => item.type == \"wfrp4e-dwarfs.rune\" && item.system.master, onError: \"Doit fournir une Rune Maîtresse\"});\n}\n\nthis.actor.addEffectItems(rune.uuid, this.effect)\n\nlet talents = this.actor.itemTags.talent.filter(i => i.baseName == this.item.baseName);\nlet xpCost = talents.length * 100\n\nif (this.actor.type == \"character\" && (await foundry.applications.api.DialogV2.confirm({window: {title: this.effect.name}, content: `

Spend ${xpCost} XP for learning ${this.item.name}?

`})))\n{\n this.actor.update({\"system.details.experience.log\" : this.actor.system.addToExpLog(xpCost, this.item.name, this.actor.system.details.experience.spent + xpCost)})\n}","VQaC6ynouW5EQCbC":"let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n\nawait roll.toMessage(this.script.getChatData());\n\nthis.script.message(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}));\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name});\nawait test.roll();\n\nif (test.succeeded)\n{\n return false;\n}","VRDS4lkwSAzbtvm4":"if (args.totalWoundLoss > this.actor.system.status.wounds.value || args.opposedTest?.attackerTest.result.critical)\n{\n args.extraMessages.push(`${this.effect.name}: Can reverse Critical Wound roll`)\n}","VTS4RzbmReI87K9a":"args.fields.slBonus = Math.floor(this.item.system.total.value * 0.1);","VTzpExK3QSCaFQPf":"if (args.equipped) \n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.SfUUdOGjdYpr3KSR\")\n let regen = item.toObject();\n item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.kJNAY1YRaCy9IgmT\");\n let terror = item.toObject();\n terror.system.specification.value = 2;\n this.actor.createEmbeddedDocuments(\"Item\", [regen, terror], {fromEffect : this.effect.id});\n} \nelse \n{\n this.effect.deleteCreatedItems();\n}","VUFST9Tb3zL9vWvg":"if (this.item.attackType == \"ranged\") args.initiative += \"+10\"","VXERNoc5IazQGuGO":"if (args.applyAP && args.modifiers.ap.metal)\n{\n args.modifiers.ap.ignored += args.modifiers.ap.metal\n args.modifiers.other.push({value : args.modifiers.ap.metal, label : this.effect.name, details : \"Ajouter PA de métal aux Dégâts\" })\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignorer Métal (\" + args.modifiers.ap.metal + \")\");\n args.modifiers.ap.metal = 0\n}","VYw9ipwoHArGVnyW":"if (args.equipped)\n{ \n this.script.notification(\"Frénésie !\")\n let frenzy = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.yRhhOlt18COq4e1q.ActiveEffect.ydTMvbmqv6BZ4u6d\")).toObject();\n frenzy.statuses = [\"frenzy\"];\n frenzy.disabled = false;\n ActiveEffect.implementation.create(frenzy, {parent: this.actor});\n}\nelse \n{\n this.actor.effects.find(e => e.statuses.has(\"frenzy\"))?.delete();\n}","Vb7rgl8T4VRswbnZ":"this.actor.status.addArmour(parseInt(this.item.system.specification.value) || 0, {source: this.effect, damage : this.item.getFlag(\"wfrp4e\", \"APdamage\")})","VbI0Al6rJfypV3qY":"const failure = game.i18n.localize(\"ROLL.ImpressiveFailure\");\nconst success = game.i18n.localize(\"ROLL.AstoundingSuccess\");\n\nargs.test.result.description = args.test.succeeded ? success : failure;","VbL0TgaBAmYjrezZ":"const talents = await Promise.all([game.i18n.localize(\"NAME.Hardy\")].map(game.wfrp4e.utility.findTalent))\nthis.actor.createEmbeddedDocuments(\"Item\", talents, {fromEffect : this.effect.id})","VcE8Hie2jbpuyuM3":"const vomit = this.actor.itemTags.trait.find(t => t.name === \"Vomissement\");\nconst name = \"Bileful rollTest\";\n\nif (!vomit) return;\n\nconst effect = vomit.effects.find(e => e.name === \"Vomissement\");\nconst scriptData = effect.system.scriptData;\n\n// REMINDER\n\nscriptData.push({\n label: 'Rappel des règles du sort',\n trigger: 'rollTest',\n script: `\n args.test.result.other.push(\"This rollTest attack follows the rules for the Lore of Nurgle spell @UUID[Compendium.wfrp4e-core.items.Item.XhyZ140R1iA1J7wZ].\");\n `\n});\n\n// /REMINDER\n\n// update Effect's name\nawait effet.update({\n name,\n \"system.scriptData\": scriptData\n});\n\n\n// update Trait's name\nawait vomit.update({name});\n\n// copy effect from Stream of Corruption spell\nconst effectData = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.XhyZ140R1iA1J7wZ.ActiveEffect.KAXAHr5NdusLTz6k\")).toObject();\n\nawait vomit.createEmbeddedDocuments(\"ActiveEffect\", [effectData]);","Vkuu70BZV4DPYO2Q":"return args.item?.system?.attackType != \"ranged\"","VlFUDaKUYoBYKYn0":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure: \"1 Corruption Point Gained\"}})\nawait test.roll();\nif (test.failed && this.actor.type == \"character\")\n{\n this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + 1})\n this.script.message(\"Gained a Corruption point\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","VlHuDIAvPr8JM1P5":"return args.skill?.name !== game.i18n.localize(\"NAME.Row\");","VneW4jhf2nXdMpuV":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nconst weapon = this.effect.sourceActor.items.find(i => i.equipped && i.system.tags.has(\"weapon\"));\nlet damage = weapon?.Damage + 4;\ndamage += excessSL;\nthis.actor.applyDamage(damage, {\n loc: \"roll\",\n createMessage: this.script.getChatData(),\n});","Vns6WrafVq8NjX7t":"return args.skill?.name != game.i18n.localize(\"NAME.Heal\")","VqTrKPtxv9hpn0Hr":"return args.skill?.name != `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`","VswXxqDjU9IH8dX0":"this.actor.addCondition(\"broken\", 1 + this.actor.system.status.sin?.value || 0)","VtCzyfSnO1im0dgX":"args.actor.system.status.carries.max = Math.floor(args.actor.system.status.carries.max * 1.25);","VuE1mhrB6X6MYTzg":"return args.characteristic == \"fel\"","VurA2XNqC0d9U49C":"this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test =>\n{\n await test.roll()\n if (test.failed)\n {\n this.actor.addCondition(\"fatigued\") \n }\n})","VzO0ZDcTWvaBn4vm":"if (args.test.preData.skillName?.includes(game.i18n.localize(\"NAME.Language\")) || args.test instanceof game.wfrp4e.rolls.CastTest)\n{\n\tif (parseInt(args.test.result.SL) > 0 || args.test.succeeded)\n\t{\n\t\tif (parseInt(args.test.result.SL) > 0)\n\t\t{\n\t\t\targs.test.result.SL = \"-0\";\n\t\t\targs.test.result.description = game.i18n.localize(\"ROLL.MarginalFailure\");\n\t\t}\n\t\targs.test.result.outcome = \"failure\"\n args.test.result.other.push(`${this.effect.name}: Maximum -0 SL`)\n\t}\n}","VzgTGb5QXKoyPNh3":"if (args.attackerTest.weapon && args.defenderTest.weapon)\n{\n let attackerReach = game.wfrp4e.config.reachNum[args.attackerTest.weapon.reach.value]\n let defenderReach = game.wfrp4e.config.reachNum[args.defenderTest.weapon.reach.value]\n \n if (attackerReach == defenderReach)\n defenderReach = defenderReach < 7 ? defenderReach + 1 : defenderReach \n\n attackerReach = warhammer.utility.findKey(attackerReach, game.wfrp4e.config.reachNum)\n defenderReach = warhammer.utility.findKey(defenderReach, game.wfrp4e.config.reachNum)\n\n args.attackerTest.weapon.reach.value = attackerReach\n args.defenderTest.weapon.reach.value = defenderReach\n}","W2rdTwflbUVxFyfd":"let difficulty = \"\"\n if (this.effect.name.includes(\"Moderate\"))\n difficulty = \"easy\"\n else if (this.effect.name.includes(\"Severe\"))\n difficulty = \"average\"\n else\n difficulty = \"veasy\"\n\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {context : {failure : this.actor.name + \" meurt de la Pourriture\"}, fields: {difficulty}, appendTitle : \" - Pourriture\"})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"dead\");\n }","W5qtA7Ul5cOj18Nd":"this.item.update({\"system.AP\" : {lArm : 3, rArm : 3, lLeg : 3, rLeg: 3}});","W9nyUNQStMr1pUHJ":"if (args.loc == this.item.system.location.key)\n{\n args.actor.addCondition(\"bleeding\", 1);\n this.script.notification(\"Etat Hémorragique ajouté\")\n}","WB6sIpLEPC8YPX67":"if (args.context.dodge)\n{\n\targs.abort = true;\n\tthis.script.notification(\"Impossible d'Esquiver!\")\n}\nreturn [\"t\", \"int\", \"wp\", \"fel\"].includes(args.characteristic)","WDN1kNe7lMc3Zf3d":"if (args.equipped)\n{\n this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\", this.effect, {\"system.specification.value\" : 1})\n}\nelse\n{\n this.effect.deleteCreatedItems();\n}","WJkwIrdj4NceOYe8":"return args.characteristic !== 'fel';","WKXyVHQwQCNTfSKv":"if ((args.item.type == \"weapon\" || args.item.system.attackType) && !args.item.isMagical )\n{\n args.item.system.qualities.value.push({name : \"magical\"})\n}","WO5n7Vbx8AgoVrwC":"let characteristics = {\n \"ws\" : 0,\n \"bs\" : 0,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : 10,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 10,\n \"wp\" : 5,\n \"fel\" : 5\n}\nlet skills = [\"Intuition\", \"Savoir (Local)\", \"Perception\"]\nlet skillAdvancements = [10, 10, 10]\nlet talents = []\nlet trappings = [\"Cotte de Mailles\", \"Chausses de Mailles\", \"Coiffe de Mailles\", \"Arme simple\"]\nlet items = []\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","WOpRJluHKER1MdgI":"let difficulty = \"\"\n if (this.effect.name.includes(\"Moderate\"))\n difficulty = \"easy\"\n else if (this.effect.name.includes(\"Severe\"))\n difficulty = \"average\"\n else\n difficulty = \"veasy\"\n\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {context : {failure : this.actor.name + \" meurt de la Pourriture\"}, fields: {difficulty}, appendTitle : \" - Pourriture\"})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"dead\");\n }","WP6opTZkvX3xwtJI":"this.actor.setWounds(0);\nthis.actor.addCondition(\"ablaze\");","WPQbVpD1uwSLAXq1":"if (this.actor.system.status.wounds.value == 0)\n{\n\tthis.actor.addCondition(\"dead\");\n}","WR0Kqn8CF5iwToak":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Tailor)';\nconst difficulty = 'difficult';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","WRe1eGmGVGejPcS8":"let wind = this.effect.name.split(\" \")[2]\nreturn args.type == \"cast\" && game.wfrp4e.config.magicWind[args.item.system.lore.value] == wind;","WTRYAEzwxRuGENyI":" // Every living creature within 10 yards, other than the wielder of the hammer,\n // must make a Challenging (+0) Endurance Test \n\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {\n skipTargets: true, appendTitle : \" - \" + this.effect.name,\n fields: {difficulty: \"challenging\"}\n })\n \n await test.roll();\n if (test.failed)\n {\n // or gain a Deafened Condition \n this.actor.addCondition(\"deafened\");\n // and suffer 1d10 Wounds which bypass armour but not Toughness Bonus.\n let damage = (await new Roll(\"1d10\").roll());\n await damage.toMessage(this.script.getChatData());\n this.script.message(await this.actor.applyBasicDamage(damage.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))\n }","WY3DajPRGcMNt158":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], {fromEffect : this.effect.id})","WaeL2I8VVJmBBKHk":"const vomit = this.actor.itemTags.trait.find(t => t.name === \"Vomissement\");\nconst name = \"Test de Corruption\";\n\nif (!vomit) return;\n\nconst effect = vomit.effects.find(e => e.name === \"Vomissement\");\nconst scriptData = effect.system.scriptData;\n\nscriptData[0].script = `\nargs.actor.addCondition(\"stunned\");\nargs.actor.corruptionDialog(\"moderate\");\n`\n\nawait effect.update({\n name,\n \"system.scriptData\": scriptData\n});\n\nawait vomit.update({name});","WeTlTniskT3Ej6vg":"args.modifiers.other.push({label : this.effect.name, value : 2})","Wh1VV3javfzcV3bP":"let spells = await warhammer.utility.findAllItems(\"spell\", \"Loading Spells\", true, [\"system.lore.value\"]);\n\nspells = spells.filter(i => [\"dark\", \"light\", \"fire\", \"life\", \"beasts\", \"shadows\", \"death\", \"heavens\", \"metal\"].includes(i.system.lore.value)).sort((a, b) => a.name > b.name ? 1 : -1);\n\nlet choices = await ItemDialog.create(spells, 7, {text : \"Choisissez 7 Sorts parmi toute combinaison de Magie de Couleur, Sorcellerie ou Magie Noire\", title : this.effect.name})\n\nthis.actor.addEffectItems(choices.map(i => i.uuid), this.effect)","WiYtNU2Y5BJfIpeM":"let location = this.item.system.location.key;\n\nif (location)\n{\n let dropped = this.item.system.weaponsAtLocation;\n\n if (dropped.length)\n {\n this.script.notification(`Dropped ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}","WnWA0e0bgqBsZp2L":"this.item.update({\"system.twohanded.value\" : !this.item.system.twohanded.value})","Wo4wQKUxSItAhRzZ":"let lore = this.effect.name.split(\"(\")[1].split(\")\")[0].toLowerCase();\n\n// If channelling corresponding lore\nif (args.type == \"channelling\" && args.spell.system.lore.value == lore)\n args.fields.slBonus += 3\n// If channelling or casting different lore\nelse if (args.spell.system.lore.value != lore && args.spell.system.lore.value != \"petty\")\n args.fields.slBonus -= 1","Wqff6ICWYzvLDYC8":"if (this.actor.system.details.experience.current < 100) {\n return this.script.notification(game.i18n.localize(\"SCRIPT.NotEnoughXP\"))\n}\n\nlet item = await game.wfrp4e.utility.findItem(\"Sensory Sharing\", \"trait\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item]);\nlet expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);\nexpLog.push({amount : 100, reason: item.name, spent: this.actor.details.experience.spent + 100, total: this.actor.details.experience.total, type: \"spent\"});\nthis.actor.update({\n \"system.details.experience.spent\": this.actor.details.experience.spent + 100,\n \"system.details.experience.log\": expLog\n });","WsN2R1qOzuLa2qyB":"let specifier = this.item.specifier;\nlet rune;\nlet categories = [];\nif (specifier && specifier.toLowerCase() != \"toutes formes\")\n{\n if (specifier.includes(\"Talisman\"))\n {\n categories.push(\"talisman\");\n }\n if (specifier.includes(\"Protection\"))\n {\n categories.push(\"protection\");\n }\n if (specifier.includes(\"Arme\"))\n {\n categories.push(\"weapon\");\n }\n if (specifier.includes(\"Armure\"))\n {\n categories.push(\"armour\");\n }\n if (specifier.includes(\"Engineering\"))\n {\n categories.push(\"engineering\");\n }\n\n if (categories.length)\n {\n let runes = await warhammer.utility.findAllItems(\"wfrp4e-dwarfs.rune\", null, true, [\"system.category\", \"system.master\"]);\n let choices = runes.filter(i => categories.includes(i.system.category) && !i.system.master);\n\n if (choices.length)\n {\n rune = (await ItemDialog.create(choices, 1, {title : this.effect.name, text : specifier, indexed: true}))[0]\n } \n else \n {\n rune = await DragDialog.create({text : `Provide Rune to learn (${specifier})`, title : this.effect.name, filter: (item) => item.type == \"wfrp4e-dwarfs.rune\" && !item.system.master, onError: \"Doit fournir une Rune (non-Maîtresse)\"});\n }\n }\n else \n {\n rune = await DragDialog.create({text : `Provide Rune to learn (${specifier})`, title : this.effect.name, filter: (item) => item.type == \"wfrp4e-dwarfs.rune\" && !item.system.master, onError: \"Doit fournir une Rune (non-Maîtresse)\"});\n }\n}\nelse \n{\n rune = await DragDialog.create({text : `Provide Rune to learn`, title : this.effect.name, filter: (item) => item.type == \"wfrp4e-dwarfs.rune\" && !item.system.master, onError: \"Doit fournir une Rune (non-Maîtresse)\"});\n}\n\nthis.actor.addEffectItems(rune.uuid, this.effect)\n\nlet talents = this.actor.itemTags.talent.filter(i => i.baseName == this.item.baseName);\nlet xpCost = talents.length * 100\n\nif (this.actor.type == \"character\" && (await foundry.applications.api.DialogV2.confirm({window: {title: this.effect.name}, content: `

Spend ${xpCost} XP for learning ${this.item.name}?

`})))\n{\n this.actor.update({\"system.details.experience.log\" : this.actor.system.addToExpLog(xpCost, this.item.name, this.actor.system.details.experience.spent + xpCost)})\n}","WtbSIghR0q4euE7J":"if (args.effect.conditionId == \"ablaze\")\n{\n args.data.formula = `(${args.data.formula}) * 2`;\n}","WwxXgsNxlccmqTze":"this.actor.addCondition(\"dead\")","WzMmwjZbhyCbHxyZ":"this.actor.status.encumbrance.state += 2\nthis.actor.status.encumbrance.pct = 100;","X08401eOhKJrhNf1":"const grim = this.actor.items.find(i => i.type === \"trait\" && i.name.includes(\"Grim\"));\n\nif (args.options?.deltaAdv > 0 && this.actor.hasCondition(\"engaged\") && grim.specification.value !== 4) {\n grim.update({\"system.specification.value\": 4});\n}\n\nif (!this.actor.hasCondition(\"engaged\") && grim.specification.value !== 2) {\n grim.update({\"system.specification.value\": 2});\n}","X3bLbOfcJAftOMa7":"return [\"ws\", \"bs\", \"ag\"].includes(args.characteristic)","X3vpmNUj9SL2CDnF":"let item = args.actor.items.find(i => i.name.includes(\"Flying Jib\"));\nitem.name += ` (Disabled by ${this.item.name})`;","X7ikFOGKYzTMr4d1":"args.fields.difficulty = \"difficult\"","XCAfy460IotarQek":"return false;","XClTZOjuhcxWLF51":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty: \"difficult\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\")\n}\n\n\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.4lj1ik958mbgAlaF\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n","XO9m2AvFRAAeEuty":"if (args.test.options.fieldDressing && args.test.result.reversed)\n{\n\targs.test.data.result.SL = \"+\" + Math.min(1, Number(args.test.data.result.SL))\n\targs.test.result.other.push(`${this.effect.name}: SL limited to 1`)\n}","XPpHYTTT0hqYuSfa":"fromUuid(\"Compendium.wfrp4e-core.items.IAWyzDfC286a9MPz\").then(item => {\n item = item.toObject()\n this.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})\n})","XPxAKqPpPYE4E6B5":"args.fields.modifier -= 10 * this.effect.conditionValue","XRrGBbplNLZpXnCH":"let item;\nlet items = []\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.rOV2s6PQBBrhpMOv\")\n{\n let data = item.toObject();\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.VUJUZVN3VYhOaPjj\")\n{\n let data = item.toObject();\n data.system.specification.value = 2\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.GbDyBCu8ZjDp6dkj\")\n{\n let data = item.toObject();\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.a8MC97PLzl10WocT\")\n{\n let data = item.toObject();\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\n{\n let data = item.toObject();\n data.system.specification.value = 1;\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn\")\n{\n let data = item.toObject();\n data.system.specification.value = 1;\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.fjd1u9VAgiYzhBRp\")\n{\n let data = item.toObject();\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.mDgEMOoJpi8DkRYb\")\n{\n let data = item.toObject();\n items.push(data)\n}\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM\")\n{\n let data = item.toObject();\n data.system.specification.value = 2;\n items.push(data)\n}\n\nthis.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect : this.effect.id})\n","XSbQKrrbjsN15Zp9":"if (!args.messageSent)\n{\n args.messageSent = true;\n let advantage = this.item.effects.filter(i => i.name == this.effect.name).length;\n this.actor.setAdvantage(advantage)\n this.script.message(`Allies within 12 yards gain ${advantage} Advantage`)\n}","XWbpSJrduXAhXAAV":"await this.actor.applyDamage(this.effect.sourceTest.result.damage, {sourceItem: this.effect.sourceItem, sourceTest: this.effect.sourceTest, createMessage: this.script.getChatData()})\nawait this.actor.addCondition(\"ablaze\");","XXnzUdsIYQ9Wjyu0":"return args.item?.system.attackType != \"ranged\" || args.flags.howlingWarpGale || this.actor.sameSideAs(this.effect.sourceActor)","XYaYeiVkc5GKYTjC":"return args.spell?.system.lore.value != \"fire\"","XcvDYNZgJ2rpAdDV":"\n let fatigued = this.actor.hasCondition(\"fatigued\")\n if (!fatigued)\n {\n this.actor.addCondition(\"fatigued\")\n ui.notifications.notify(\"Etat Extenué ajouté à \" + this.actor.name + \" qui est impossible à retirer tant que le symptôme de malaise est présent.\")\n }","Xe8ijqWU3bbtq7ZY":"if (args.opposedTest.defenderTest.actor.Species.toLowerCase().includes(\"skaven\"))\n{\n args.addImpact = true;\n args.opposedTest.result.other.push(\"Impact against Skaven\")\n}","Xf4FcZ4ZLdWmOXBa":"return args.skill?.name != game.i18n.localize(\"NAME.Perception\") && !args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"));","XfRvVBTVIuAm8RaZ":"return args.item?.name != game.i18n.localize(\"NAME.CharmAnimal\")","XfSxXatjEYlPEbaK":"const broken = this.actor.hasCondition(\"broken\");\n\n//broken?.delete();","Xg4qHLsyXGuUZfT8":"this.actor.hasCondition(\"ablaze\")?.delete();","XjUXxUA0hbwjUatW":"if (this.actor.hasCondition(\"engaged\") && this.effect.disabled)\n{\n this.effect.update({\"disabled\" : false})\n this.item.effects.contents[1].update({\"disabled\" : false});\n this.script.notification(\"Enabled\")\n}\nelse if (this.effect.active && !this.actor.hasCondition(\"engaged\"))\n{\n this.effect.update({\"disabled\" : true})\n this.item.effects.contents[1].update({\"disabled\" : true});\n \n}","Xk9XPklxxTvFlwpI":"args.context.useOnesArgumentative = true;","XthZ3GCC3WhsEI2g":"args.update({light : {\n \"dim\": 10,\n \"bright\": 5,\n \"alpha\": 0.5,\n \"animation\": {\n \"speed\": 4,\n \"intensity\": 4,\n \"type\": \"flame\",\n },\n \"color\": \"#ac9e6c\",\n}});","Xu5cED1MhT4ba7da":"args.fields.modifier += 10\n","XuFxKPYheYF4WMmQ":"return args.skill?.name != game.i18n.localize(\"NAME.Cool\");","XzJotwVUIuQu6b0G":"return !args.context.whirlwind || !args.weapon || !this.actor.has(game.i18n.localize(\"NAME.DualWielder\"), \"talent\") || this.actor.noOffhand","Y27MmN5KFw45d5vQ":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {difficulty: \"challenging\"})\nawait test.roll();\nif (!test.succeeded)\n{ \n let rollResult = await (await fromUuid(\"RollTable.GL7rKOEThauPUK0E\")).roll({allowInteractive : false});\n let diseaseId = rollResult.results[0].documentId;\n let disease = await fromUuid(\"Item.\"+diseaseId);\n obj = disease.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [obj]);\n}","Y43z8YCohJMA8Ia7":"if (!args.test.preData.options?.giantbane) return\nif (!this.item.equipped.value || !args.test.item) return;\nargs.test.preData.canReverse = true","Y6ppJBerpM3TtSic":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.g4Q6AtzZuo5iIvD4\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], {fromEffect : this.effect.id});","Y7McxsHFeGhwQx0J":"this.actor.createEmbeddedDocuments(\"Item\", [foundry.utils.expandObject({\n name : \"Ghostly Flame\",\n type : \"weapon\",\n img : this.effect.img,\n system : {\n \"weaponGroup.value\" : \"throwing\",\n \"damage.value\" : \"SB + WPB\",\n \"qualities.value\" : [{name : \"magical\"}],\n \"equipped\" : true\n }\n})], {fromEffect: this.effect.id})","Y8J66v8VTKUASGuK":"if (!this.actor.effects.find(e => e.isCondition))\n{\n\treturn this.script.notification(\"Aucun état sur cet acteur\")\n}\n\nlet choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, \"Choisir un état\")\n\nif (choice[0])\n{\n\tawait this.actor.removeCondition(choice[0].conditionId)\n}\n\nif (this.actor.effects.find(e => e.isCondition))\n{\n return false; // Delete the effect if there are still conditions, otherwise, effect remains and provides the bonus\n}","YDANERWYHyJ2ACeo":"args.fields.modifier -= 25","YDqpKJVy8ijEKdLX":"return !(this.actor.attacker && (args.skill?.name.includes == `${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Basic\")})` || (args.type == \"weapon\" && args.item?.system.weaponGroup.value == \"basic\")))","YEBw2CzHYxsTpTy5":"return args.skill?.name == game.i18n.localize(\"NAME.Haggle\");","YFSgWRXel0bWE3EE":"return [\"ag\", \"ws\", \"bs\"].includes(args.characteristic) || args.skill?.name == game.i18n.localize(\"NAME.Climb\");","YHEIkBKWXKNPqglh":"if (args.test.result.castOutcome == \"success\")\n{\n CorruptionMessageModel.createCorruptionMessage(\"moderate\", this.script.getChatData())\n}\n","YJX7WnxzXXIVdH6P":"let lore = await ValueDialog.create({text : \"Choisissez un Savoir\", title: \"Savoir\"}, \"\", {\"fire\" : \"Fire\", \"death\" : \"Death\", \"metal\" : \"Metal\", \"shadow\" : \"Discret\"});\n\nlet filters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"petty\"\n }\n]\n\nlet petty = await ItemDialog.createFromFilters(filters, 6, {title : this.effect.name, text : \"Choisissez 6 Sorts Mineurs\"})\n\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : [\"\"]\n }\n]\n\nlet arcane = await ItemDialog.createFromFilters(filters, 12, {title : this.effect.name, text : \"Choisissez 12 Sorts d'Arcane\"})\n\nlet items = petty.map(i => i.toObject()).concat(arcane.map(i => {\n let spell = i.toObject();\n spell.img = `modules/wfrp4e-core/icons/spells/${lore}.png`\n spell.system.lore.value = lore;\n return spell;\n}));\n\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","YMaxpXnml01bLGpO":"return args.item?.name.includes(game.i18n.localize(\"NAME.Stealth\"))","YN8719gme9AxYtyY":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 0,\n \"s\" : 5,\n \"t\" : 15,\n \"i\" : 20,\n \"ag\" : 15,\n \"dex\" : 20,\n \"int\" : 35,\n \"wp\" : 30,\n \"fel\" : 10\n}\nlet skills = [\"Focalisation\", \"Calme\", \"Esquive\", \"Divertissement (Narration)\", \"Intuition\", \"Langue (Magick)\", \"Commandement\", \"Savoir (Magie)\", \"Savoir (Théologie)\", \"Perception\"]\nlet skillAdvancements = [20, 25, 20, 25, 30, 25, 15, 20, 10, 30]\n\nlet talents = [\"Harmonisation Aethyrique\", \"Diction Instinctive\", \"Diction Instinctive\", \"Chanceux\", \"Perception de la magie\", \"Menaçant\", \"Magie des Arcanes (Domaine)\", \"Magie Mineure\", \"Seconde Vue\", \"Sixième Sens\"]\nlet trappings = [\"Arme simple\", \"Robes\", \"(2M) Bâton de combat\"]\nlet specialItems = [ \n {name: \"Magic Item\", type: \"trapping\", trappingType: \"misc\" }, \n] \nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else \n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else \n {\n ui.notifications.warn(`Could not find ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings) \n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else \n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nlet ride = await foundry.applications.api.DialogV2.confirm({window : {title : \"Compétence\"}, content : \"Add Chaos Steed and +20 Ride (Horse)?\"})\n\nif (ride)\n{\n let skill = await game.wfrp4e.utility.findSkill(\"Chevaucher (Cheval)\")\n skill = skill.toObject();\n skill.system.advances.value = 20;\n items = items.concat({name : \"Chaos Steed\", type: \"trapping\", \"system.trappingType.value\" : \"misc\"}, skill)\n}\n\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","YOKoZFlBEpFavfOS":"return args.type == \"channelling\"","YQ2LnLxp0xgy3meI":"if (args.test.preData.options?.corruption && args.test.failed) {\n args.test?.result?.other.push(\"Gain de +1 Corruption supplémentaire de \" + this.effect.name)\n}","YRUTliBzAQvncGNX":"this.actor.addCondition(\"fatigued\");\nthis.script.notification(\"Etat Exténué ajouté\")","YaKnYEbmmZZtByJc":"if (args.opposedTest.attackerTest.options.ballockKnife)\n{\n args.weaponProperties.impale = true;\n args.extraMessages.push(`${this.item.name}: Impale Added`)\n}","YdiQFkm8j48Xs7gI":"if (args.totalWoundLoss > 0 && args.opposedTest.attackerTest.result.critical && args.loc == \"head\") {\n let brainRot = await fromUuid(\"Compendium.wfrp4e-lustria.items.Item.IsNQH867Y58pZgq6\");\n args.test.targets[0].createEmbeddedDocuments(\"Item\", [brainRot], {fromEffect : this.effect.id});\n this.script.scriptMessage(`${args.test.targets[0].name} has been infected by Brain Rot`);\n}","Yf2MmOzazzMdmoPU":"let armour = await fromUuid(\"Compendium.wfrp4e-core.items.VUJUZVN3VYhOaPjj\")\nlet armourData = armour.toObject()\narmourData.system.specification.value = 1\n \nlet fury = await fromUuid(\"Compendium.wfrp4e-core.items.fjd1u9VAgiYzhBRp\");\nlet furyData = fury.toObject();\n\nlet horns = await fromUuid(\"Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW\")\nlet hornsData = horns.toObject()\nhornsData.system.specification.value = 6\n\nthis.actor.createEmbeddedDocuments(\"Item\", [armourData, furyData, hornsData], {fromEffect : this.effect.id})","YfRPSgJjvHvl50HW":"return args.skill?.name != \"Runesmithing\"","YhhiWEQbox3WZA3Q":"return args.skill?.name == game.i18n.localize(\"NAME.Heal\") && game.combat?.active","YjAIsFlxKTJvYs60":"this.item.system.reduceQuantity();","YjJcRdytVRm88qLn":"args.context.additionalDamage = 1","YjKiWcx7d2nwPy4L":"if (args.applyAP) \n{\n let nonmagical = args.modifiers.ap.value - args.modifiers.ap.magical\n args.modifiers.ap.ignored += nonmagical\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignore Non-Magical AP (\" + nonmagical + \")\");\n}","YrXhk2YJaWSChMhp":"// Brawling management\nlet base = this.actor.characteristics.ws.value;\nlet melee = this.actor.has(\"Corps à corps (Bagarre)\", \"skill\");\nif (!melee) {\n melee = await fromUuid(\"Compendium.wfrp4e-core.items.Item.jLyoyqwmBVPjRjhM\");\n melee = melee.toObject();\n melee.system.modifier.value = 55 - base;\n await this.actor.createEmbeddedDocuments(\"Item\", [melee], {fromEffect : this.effect.id});\n} else {\n //this.actor.updateEmbeddedDocuments(\"Item\", { _id: melee.id, 'system.modifier.value': 55-base});\n await this.effect.update({\"flags.wfrp4e.fistsOfGork\" : 55 - base})\n}\n\n// Weapon management\nbase = this.actor.characteristics.s.bonus;\nweapon = await fromUuid(\"Compendium.wfrp4e-core.items.Item.AtpAudHA4ybXVlWM\");\nweapon = weapon.toObject();\nweapon.name = \"Fists of Gork\";\nweapon.img = this.effect.img;\nweapon.system.rollable.skill = \"Corps à corps (Bagarre)\";\nweapon.system.specification.value = 9 - base;\nawait this.actor.createEmbeddedDocuments(\"Item\", [weapon], {fromEffect : this.effect.id});\n\n//this.script.scriptMessage(`${this.actor.name} now has Melee (Brawling) 55 and Weapon (Fists) +9`);","YsS2RZsl2ZsqjhWV":"return !args.fields.charging","YsUdMhQ2AArcJIqy":"let choice1 = [\n {\n type: \"trait\",\n name: \"Corruption (Mineure)\",\n diff : {\n system : {\n specification : {\n value : \"Minor\"\n }\n }\n }\n },\n {\n type: \"trait\",\n name: \"Infecté\",\n },\n {\n type: \"trait\",\n name: \"Territorial\",\n }\n]\n\nlet updateObj;\nlet actor;\n\nasync function addTrait(c) {\n let items = [];\n let existing;\n if (c.type == \"trait\") {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type);\n }\n if (!existing) {\n let item = await game.wfrp4e.utility.find(c.name, c.type);\n if (item) {\n item = item.toObject();\n foundry.utils.mergeObject(item, c.diff);\n items.push(item);\n }\n else\n ui.notifications.warn(`Impossible de trouver ${c}`, { permanent: true });\n }\n actor.createEmbeddedDocuments(\"Item\", items);\n}\n\nasync function dialogChoice() {\n for (let c of choice1)\n {\n if (await foundry.applications.api.DialogV2.confirm({window : {title: \"Option\"}, content:`

Add Option?

  1. ${c.name}
`}))\n {\n addTrait(c)\n c.valid = true;\n }\n }\n}\nupdateObj = this.actor.toObject();\nactor = this.actor\nawait dialogChoice();\n","YwLEw4BiKq4EMy57":"let i_gain = (await new Roll(\"2d10\").roll()).total\nlet fel_gain = 0\nif (args.actor.characteristics.fel.value <= 0)\n{\n fel_gain += (await new Roll(\"2d10\").roll()).total\n}\n\nlet msg = `${this.actor.prototypeToken.name} gains ${i_gain} Intelligence`\n\nif (fel_gain)\n msg += ` and ${fel_gain} Fellowship`\n\n\nlet newInt = i_gain + args.actor.characteristics.int.modifier\nlet newFel = fel_gain + args.actor.characteristics.fel.modifier\n\nargs.actor.update({\"system.characteristics.int.modifier\" : newInt, \"system.characteristics.fel.modifier\" : newFel})\n\nthis.script.message(msg)","YyKU2rIRmFSCqSlW":"let newEffect = this.effect.sourceItem.effects?.contents[1]\n\nif (newEffect)\n{\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [newEffect.convertToApplied()]);\n}","YySjPfSAPdMAfjsh":"let talents = [\"Charge Berserk\", \"Vigilance\", \"Combat Instinctif\", \"Assaut féroce\", \"Endurci\", \"Résistance à la Magie\", \"Resistance (Magic)\", \"Déterminé\", \"Coup puissant\", \"Guerrier né\"];\nlet currentCareer = this.actor.system.currentCareer;\n\nif (!currentCareer) return;\n\nfor (let talent of talents) {\n if (currentCareer.system.talents.includes(talent))\n continue;\n currentCareer.system.talents.push(talent);\t\n}\n\n","Z1zriXibT0mAmdhb":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW\")\nitem = item.toObject()\nitem.name = this.effect.name\nitem.system.specification.value = this.actor.characteristics.s.bonus\nitem.system.description.value = \"\"\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","Z30zYayPryXOjT5N":"args.item.system.damage.value = \"SB + 6\";","Z41L3MwOpJdAjVaj":"if (args.actorsystem.details.move.sail.value > 0)\n args.actor.system.details.move.sail.value -= 2;\n","Z4WrrlVGpPY4iUbG":"await this.actor.addCondition(\"ablaze\")","Z52yZDm6lP6fOP3O":"let ablaze = this.actor.hasCondition(\"ablaze\")\nif (ablaze)\n{\n this.script.notification(\"Immunisé au feu\");\n ablaze.delete()\n}","Z6OmmC0irJzxSnMH":"let chatData = { whisper: ChatMessage.getWhisperRecipients(\"GM\") }\nlet message = \"\"\n\nlet wounds = foundry.utils.duplicate(this.actor.status.wounds)\nlet regenRoll = await new Roll(\"1d10\").roll({allowInteractive : false});\nlet regen = regenRoll.total;\n\nif (wounds.value >= wounds.max)\n return\n\nif (wounds.value > 0) \n{\n wounds.value += regen\n if (wounds.value > wounds.max)\n {\n wounds.value = wounds.max\n }\n message += `${this.actor.name} regains ${regen} Wounds.`\n\n if (regen == 10)\n {\n message += `
Additionally, they regenerate a Critical Wound.`\n }\n}\nelse if (regen >= 8) \n{\n message += `${this.actor.name} rolled a ${regen} and regains 1 Wound.`\n wounds.value += 1\n if (regen == 10)\n {\n message += `
Additionally, they regenerate a Critical Wound.`\n }\n}\nelse \n{\n message += `${this.actor.name} Regenerate roll of ${regen} - No effect.`\n}\n\nawait this.actor.update({ \"system.status.wounds\": wounds })\nthis.script.message(message, { whisper: ChatMessage.getWhisperRecipients(\"GM\") })\n\nif (this.actor.Species?.toLowerCase() != \"ogre\")\n{\n this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name, fields : {difficulty : \"average\"}}).then(test => {\n test.roll()\n })\n}\n\n\n\n\n\n\n\n\n\n\n\n\n","Z6jNlyZMECkW4Hon":"let spells = await warhammer.utility.findAllItems(\"spell\", \"Loading Spells\", true);\n\nlet choice = await ItemDialog.create(spells, 1);\n\nif (choice[0])\n{\n this.script.message(`Chose @UUID[${choice[0].uuid}]{${choice[0].name}}`)\n let spell = (await fromUuid(choice[0].uuid)).toObject(); // Might be an index so retrieve item object for sure\n foundry.utils.setProperty(spell, \"flags.wfrp4e.boonOfTzeentch\", true);\n spell.system.wind.value = \"Focalisation (Dhar)\";\n spell.system.memorized.value = true;\n this.actor.createEmbeddedDocuments(\"Item\", [spell], {fromEffect: this.effect.id})\n}","ZCBcwbVFHFTFRntb":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","ZCExF4uNFmHkGEbb":"this.actor.deleteEmbeddedDocuments(\"Item\", [this.effect.getFlag(\"wfrp4e\", \"disease\")].filter(i => i));","ZCkYe5XMVY1RWMXG":"args.context.wallcrawler = true;","ZCrfdLPOxiNDCDSg":"this.actor.effects.get(this.effect.id).delete(); // can't use this.effect because it thinks it's parent is the item, but it actually is the actor","ZCuOjLAeENKN1Q4L":"let halve;\nif (args.sourceItem?.type != \"spell\")\n{\n halve = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : \"Divisé les dégats par deux? (Divise les dégats de tout feu par deux)\"})\n}\nelse\n{\n halve = args.sourceItem?.system.lore?.value == \"fire\";\n}\n\nif (halve)\n{\n args.totalWoundLoss /= 2;\n args.modifiers.other.push({label : this.effect.name, details : \"Divisé par deux\", value : \"× 0.5\"})\n}","ZEXhYJqqxF6QAixX":"return args.context.terror || args.extendedTest?.getFlag(\"wfrp4e\", \"fear\");","ZEdDcBka21rnMuz5":"let initiativeSetting = game.settings.get(\"wfrp4e\", \"initiativeRule\")\n\nswitch (initiativeSetting) {\n case \"default\":\n args.initiative += \"+10\"\n break;\n\n case \"sl\":\n args.initiative += \"+1\"\n break;\n\n case \"d10Init\":\n args.initiative += \"+10\"\n break;\n\n case \"d10InitAgi\":\n args.initiative += \"+1\"\n break;\n}","ZGlJnrIemqul24j7":"let infected = await fromUuid(\"Compendium.wfrp4e-core.items.V0c3qBU1CMm8bmsW\")\nlet bite = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet biteData = bite.toObject();\nlet infectedData = infected.toObject();\n\nbiteData.system.specification.value = 4 - this.actor.characteristics.s.bonus\n\nthis.actor.createEmbeddedDocuments(\"Item\", [biteData, infectedData], {fromEffect : this.effect.id})","ZI2YnAAGoLpmVDIL":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.aE3pyW20Orvdjzj0\")\nlet data = item.toObject();\ndata.system.specification.value = \"Religion\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","ZJy2rvpKmUHXGrAi":"args.actor.details.move.run *= 1.5","ZLspFT2I3ZdWWr2H":"return args.skill?.name !== game.i18n.localize(\"NAME.Leadership\");","ZMwJad6v4G13SgjR":"return args.type == \"cast\" || args.type == \"channelling\"","ZNW3ubbKIYXAyE48":"let wounds = this.actor.itemTypes.disease.filter(i => i.name == \"Festering Wound\" && i.system.duration.active);\nlet selected;\nif (wounds.length == 0)\n{\n return this.script.notification(\"No Festering Wounds!\");\n}\nelse if (wounds.length == 1)\n{\n selected = wounds[0];\n}\nelse if (wounds.length >= 2)\n{\n selected = (await ItemDialog.create(wounds, 1))[0];\n}\n\nif (selected)\n{\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"average\"}})\n await test.roll();\n if (test.succeeded)\n {\n let SL = parseInt(test.result.SL);\n if (SL >= 0)\n {\n selected.update({\"system.duration.value\" : selected.system.duration.value - SL})\n this.script.message(`${selected.name} duration reduced by ${SL}!`)\n }\n }\n}","ZNu4B0OdjkM9lmtu":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS\")\nlet data = item.toObject();\ndata.name = data.name += \" (Vision)\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","ZOgtDW3mkTfeyc5M":"args.actor.system.details.price.gc += args.actor.system.details.price.gc * 0.1;","ZRoG7GiMDQWso6gN":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'difficult';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","ZTE8LdRblyG4yYoE":"if (args.test.result.castOutcome == \"success\")\n{\n // Wait till after chat card is posted\n warhammer.utility.sleep(500).then(() => {\n game.wfrp4e.utility.postTerror(1, this.effect.name)\n game.wfrp4e.utility.postTerror(2, this.effect.name)\n })\n}","ZURBQYTYcP5jci5k":"const broken = this.actor.hasCondition(\"broken\");\n\nbroken?.delete();","ZYsMgB4BwXBJcpYf":"// The wearer of the cloak causes Peur 2 \n// in Wolves, Lions, Goats, and Chimeras.\ngame.wfrp4e.utility.postPeur(2, this.effect.name)\n","ZZb57zYE7bJy7rfU":"let damage = await new Roll(\"1d10\").roll();\ndamage.toMessage(this.script.getChatData());\nthis.actor.applyDamage(damage.total, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL,\n createMessage: this.script.getChatData()\n});\n\nthis.actor.addCondition(\"prone\");","ZbuW8y7t9Y8oUFWq":"return !((args.type == \"weapon\" && (args.item.system.weaponGroup.value == \"blackpowder\" || args.item.system.weaponGroup.value == \"engineering\")) || (args.type == \"cast\" && args.item.system.lore.value == \"fire\"))","ZdHvGvSJBsIuPphF":"return !args.data.dualWieldingOption && !args.context.dualWieldOffhand","Ze9E2zR1GFGWGMVH":"return [game.i18n.localize(\"NAME.PickLock\"), game.i18n.localize(\"NAME.SleightOfHand\"), `${game.i18n.localize(\"NAME.Channelling\")} (Ulgu)`].includes(args.skill?.name)","ZfOhDMHPyEkThjEk":"foundry.utils.setProperty(args, \"context.context.failure\", [`${this.effect.name}: Can Reroll!`])","ZfgPAtNKA5KrETer":"return args.type == \"cast\";","ZgF1sYdbAKaOuHmK":"return args.skill?.name !== game.i18n.localize(\"NAME.Charm\");","ZhuitY1KOU1Xe7cP":"return !args.weapon?.system.properties.qualities.pummel","Znz4g56UH23SSCg7":"if (!args.messageSent)\n{\n args.messageSent = true;\n let advantage = this.item.effects.filter(i => i.name == this.effect.name).length;\n this.actor.setAdvantage(advantage)\n this.script.message(`Allies within 6 yards gain ${advantage} Advantage`)\n}","ZqTW093qENOwGONP":"let msg = \"\"\n\nlet SL = parseInt(this.effect.sourceTest.result.SL);\n\nfor(let i = 0; i < SL; i++)\n{\n msg += `

${await this.actor.applyBasicDamage(3, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP})}

`\n}\n\nthis.script.message(msg);","ZrePyV2spv3v65Tg":"return args.type != \"weapon\" && !this.actor.statuses.has(\"infighting\")","ZsOHDb7XwmuUUWPL":"return args.characteristic === 'fel';","ZsQR3AVKi0v5U593":"args.actor.addCondition(\"ablaze\", 2)","ZuoIVv3nmlGhhdx0":"let rating = parseInt(this.effect.name.match(/\\d+/)?.[0]) || 1;\nlet holed = this.actor.flags.holed || {holed: 0};\nholed.holed += rating;\nthis.actor.flags.holed = holed;\n","ZvbBM4gTJHPdU8jU":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\nawait test.roll();\nreturn test.failed","Zxh4RAENoaAQAaNg":"return !this.actor.flags.useless.rEye || !this.actor.flags.useless.lEye || [\"wp\", \"t\", \"s\"].includes(args.characteristic)","ZxtOdwsM2Sqj9Zam":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM\")\nlet data = item.toObject();\ndata.system.specification.value = 0\ndata.name = this.effect.name;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","a02tlRCXpaoaDjSN":"let careers = await warhammer.utility.findAllItems(\"career\", \"Loading Careers\", true);\ncareers.forEach(c => {\n if (!c.id)\n {\n c.id = c._id;\n }\n});\nlet choice = await ItemDialog.create(careers, 1, {text : \"Choisissez une Carrière de Double Vie\", title : this.effect.name, indexed : true});\nif (choice[0])\n{\n let career = choice[0];\n let data = career.toObject();\n foundry.utils.setProperty(data, \"flags.wfrp4e.doubleLife\", true);\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n this.effect.updateSource({name : this.effect.setSpecifier(data.name)})\n}\n","a0YU3whUm16wGBNu":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"average\"}})\nawait test.roll();\n\nif (test.failed)\n{\n this.actor.addCondition(\"fatigued\");\n}","a4Aza4a9v8JMU8dC":"const talents = await Promise.all([game.i18n.localize(\"NAME.Frenzy\"), game.i18n.localize(\"NAME.MagicResistanceTalent\")].map(game.wfrp4e.utility.findTalent))\nthis.actor.createEmbeddedDocuments(\"Item\", talents, {fromEffect : this.effect.id})","a4Q7RJpW0sqvfATw":"let fatigued = this.actor.hasCondition(\"fatigued\")\n if (!fatigued)\n {\n this.actor.addCondition(\"fatigued\")\n ui.notifications.notify(\"Exténué ajouté à \" + this.actor.name + \" qui ne peut pas être retiré tant que le symptôme de Malaise est présent.\")\n }","a5WEJ2oxlcdOFWlL":"args.actor.system.characteristics.t.initial += 20;","a6gacHsvgwtsIFSQ":"if (args.test.item && args.test.item.name == game.i18n.localize(\"NAME.Research\"))\n args.test.preData.reversal = {allowed : true, if: \"success\"};\n","a7pEvCycVnFBXGAQ":"let test = await this.actor.setupCharacteristic(\"i\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"easy\"}})\nawait test.roll();\n\nif (!test.succeeded)\n{\n\tthis.actor.addCondition(\"stunned\");\n}","a81IMxqmMtHgYnIF":"return !args.weapon?.system.isMelee;","a8RabrnJ08O07rDX":"if (args.totalWoundLoss > 0)\n{\n // I'm assuming the endurance test specified is for the end-round check\n await args.actor.addCondition(\"poisoned\", 2);\n}","a8i0sA1RBnD8nHZt":"let caster = this.effect.sourceActor\nlet targetedItem = this.effect.system.itemTargets[0];\n\nlet qualities = foundry.utils.deepClone(game.wfrp4e.config.itemQualities);\nlet flaws = foundry.utils.deepClone(game.wfrp4e.config.itemFlaws);\n\nif (targetedItem.type == \"weapon\")\n{\n foundry.utils.mergeObject(qualities, game.wfrp4e.config.weaponQualities)\n foundry.utils.mergeObject(flaws, game.wfrp4e.config.weaponFlaws)\n}\nelse if (targetedItem.type == \"armour\")\n{\n foundry.utils.mergeObject(qualities, game.wfrp4e.config.armorQualities)\n foundry.utils.mergeObject(flaws, game.wfrp4e.config.armorFlaws)\n}\n\nfor(let q in qualities)\n{\n // If the weapon already has a flaw, don't put it in the dialog\n if (targetedItem.system.properties.qualities[q])\n {\n delete qualities[q]\n }\n}\nfor(let f in flaws)\n{\n // If a weapon doesn't have a flaw, don't put it in the dialog\n if (!targetedItem.system.properties.flaws[f])\n {\n delete flaws[f]\n }\n}\n\nlet added = await ItemDialog.create(ItemDialog.objectToArray(qualities), \"unlimited\", \"Choisir les Qualités à ajouter\");\nlet removed = []\nif (!foundry.utils.isEmpty(flaws))\n{\n removed = await ItemDialog.create(ItemDialog.objectToArray(flaws), \"unlimited\", \"Choisir les Défauts à retirer\");\n}\n\nthis.effect.updateSource({\"flags.wfrp4e.propertiesChanged\" : {added : added.map(i => i.id), removed : removed.map(i => i.id)}})\n","aAvJrAKLzXhS9qN6":"return args.item?.name == game.i18n.localize(\"NAME.Climb\")","aCVtaW8ag1WibcAr":"args.attacker.modifyWounds(1)\nthis.script.message(`${args.attacker.prototypeToken.name} recovers 1 Wound.`)","aFwNs7TMVF90i9JF":"let tireless = this.item.Advances + 1\nlet fatigued = this.actor.hasCondition(\"fatigued\").conditionValue\nif (args.flags?.tireless == undefined) {\n args.fields.modifier += 10 * (Math.min(tireless, fatigued));\n args.flags.tireless = true\n}","aIYUsBIDKWJ3CEtj":"this.script.message(await this.actor.applyBasicDamage(20, {suppressMsg: true}));","aMHGjWyn6BXCI4pw":"let frenzy = await fromUuid(\"Compendium.wfrp4e-core.items.Item.hXcfygzujgyMN1uI\");\nthis.actor.createEmbeddedDocuments(\"Item\", [frenzy], {fromEffect: this.effect.id})","aPZiVhgwR0Xql6AM":"let effectsToEnable = this.actor.items.filter(i => i.type == \"disease\").reduce((effects, item) => effects.concat(item.effects.contents), []).concat(this.actor.effects.contents.filter(i => i.isCondition)).filter(i => i.disabled);\n\nif (effectsToEnable.length)\n{\n this.script.notification(`Re-enabling ${effectsToEnable.map(i => i.name).join(\", \")}.`);\n effectsToEnable.forEach(i => i.update({disabled : false}))\n}","aRvJUcgYqhRmmWYC":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.e3McIND4Rrsn5cE6\", this.effect, {\"system.advances.value\" : 1}, {skipExperienceChecks : true})","aSFPODz31zynXho3":"let char = this.item.attackType == \"melee\" ? \"ws\" : \"bs\"; args.actor.system.characteristics[char].modifier += 20","abLWYtNTu1UVDQAs":"if (args.loc == this.effect.flags.wfrp4e.location) // e.g. 'head', rLeg, 'lArm'\n{\n this.message(`Gains a @Condition[Blinded] condition as their ${this.item.name} was hit`);\n this.actor.addCondition(\"blinded\");\n}","abVIvJBzuskNzCQv":"let amount = this.effect.sourceTest.result.overcast.usage.other.current;\n\nlet sss = await fromUuid(\"Compendium.wfrp4e-core.items.MGEPI4jNhymNIRVz\");\nlet strider = await fromUuid(\"Compendium.wfrp4e-core.items.1dUizIgLBgn4jICC\");\n\nlet items = Array(amount).fill(sss).concat(Array(amount).fill(strider))\n\nthis.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id})","abcQMF1LW27qA98R":"return args.skill?.name === game.i18n.localize(\"NAME.Dodge\");","aeBetniKqq5SD9Ou":"let characteristics = {\n \"ws\" : 30,\n \"bs\" : 20,\n \"s\" : 20,\n \"t\" : 25,\n \"i\" : 20,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 30,\n \"wp\" : 40,\n \"fel\" : 30\n}\nlet skills = [\"Intimidation\", \"Langue (Classique)\", \"Commandement\", \"Savoir (Guerre)\", \"Savoir (Histoire)\", \"Perception\"]\nlet skillAdvancements = [20, 30, 20, 30, 20, 20]\nlet talents = [\"Vigilance\", \"Combat Instinctif\", \"Coude-à-coude\", \"Menaçant\", \"Robuste\", \"Coup puissant\", \"Coup puissant\", \"Seigneur de guerre\"]\nlet trappings = [\"Arme simple\", \"Plastron d'acier\", \"Heaume\", \"Jambières d'acier\"]\nlet specialItems = [\n]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(\">>>>>>><\", items)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","aedzdFyjI80Ah3qC":"return !this.item.equipped.value \n || !args?.weapon\n || !([\"giant\"].includes(args.target.Species.toLowerCase()))","afdmOvPGMpEdZvCb":"return (args.skill?.name == game.i18n.localize(\"NAME.Perception\") || args.characteristic == \"fel\")","agsm3NI1NDtHRG4y":"this.actor.getActiveTokens().forEach(t => t.document.update({texture : this.actor.prototypeToken.texture}, {animate : false}));","ahbA7o5G9dzMFl76":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.SfUUdOGjdYpr3KSR\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","alJgj25l3239h2SW":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.hTgrGkWnmIR4xhVe\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","araS9qYWOAVrV8F7":"args.actor.system.details.man -= 3;\nargs.actor.system.details.move.value -= 2;","ayIbw2Vw2t9xg33P":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.EaqlLRQigwnsEAXX\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","b1zMefdoZYtzCm7i":"return [\"roll\", \"none\"].includes(args.fields.hitLocation) || args.item?.attackType != \"ranged\"","b2Kb4IuD22RhKhR0":"let actor = Array.from(game.user.targets)[0]?.actor;\n\nif (actor)\n{\n actor.applyEffect({effectUuids : this.effect.sourceItem.effects.contents[0].uuid})\n}\nelse\n{\n this.script.notification(\"Aucune cible!\", \"error\")\n}","b2WaqRna5CFXmbDG":"args.context.stag = true;","b44tTtRjmI5jdihB":"let shield = this.item.system.qualities.value.find(q => q.name == 'shield'); shield.value++","b4CIeJF2L4E1qikC":"return !args.skill","b5DfAWtpV1x2R8If":"this.script.message(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {suppressMsg: true}))","b5prg1FLjCAvBjLy":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.zyocWSzEZEC826NS\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data])\n\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty: \"hard\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n await this.actor.addCondition(\"prone\")\n await this.actor.addCondition(\"stunned\")\n}","b787rIfyHF5LnALd":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.HbrwGhUl0ZXz4kLA\")\nlet hardy = item.toObject();\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.VUJUZVN3VYhOaPjj\")\nlet armour = item.toObject();\narmour.system.specification.value = 1;\nthis.actor.createEmbeddedDocuments(\"Item\", [armour, hardy], {fromEffect : this.effect.id});","b8G4cjfn3RG2tEYX":"this.actor.addCondition(\"ablaze\", 3);","b8XFmEUu1d2YNQ7F":"const {targetUuid, characteristicsToSwap} = this.effect.flags.wfrp4e;\n\nif (!characteristicsToSwap) return;\n\nconst target = fromUuidSync(targetUuid);\n\nif (!target) return;\n\nfor (const char of characteristicsToSwap) {\n args.actor.system.characteristics[char].advances = target.system.characteristics[char].advances;\n args.actor.system.characteristics[char].bonus = target.system.characteristics[char].bonus;\n args.actor.system.characteristics[char].bonusMod = target.system.characteristics[char].bonusMod;\n args.actor.system.characteristics[char].calculationBonusModifier = target.system.characteristics[char].calculationBonusModifier;\n args.actor.system.characteristics[char].initial = target.system.characteristics[char].initial;\n args.actor.system.characteristics[char].modifier = target.system.characteristics[char].modifier;\n args.actor.system.characteristics[char].value = target.system.characteristics[char].value;\n}","bBdXzBmxgFFBwMMS":"if(args.sourceItem?.isRanged && args.applyAP && !args.sureShot)\n{\n if (args.modifiers.ap.value)\n {\n args.sureShot = true;\n args.modifiers.ap.details.push(`${this.effect.name} (Ignore ${this.item.Advances})`)\n args.modifiers.ap.ignored += this.item.Advances;\n }\n}","bDS62ctjfnTU4xIu":"return args.skill.name !== game.i18n.localize(\"NAME.Leadership\")","bEVlJOOA1kLlzpWx":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 0,\n \"s\" : 5,\n \"t\" : 15,\n \"i\" : 20,\n \"ag\" : 15,\n \"dex\" : 20,\n \"int\" : 35,\n \"wp\" : 30,\n \"fel\" : 10\n}\nlet skills = [\"Focalisation\", \"Calme\", \"Esquive\", \"Divertissement (Narration)\", \"Intuition\", \"Langue (Magick)\", \"Commandement\" , \"Savoir (Magie)\" , \"Savoir (Théologie)\", \"Perception\"]\nlet skillAdvancements = [20, 25, 20, 25, 30, 25, 15, 20, 10, 30]\nlet talents = [\"Harmonisation Aethyrique\", \"Magie des Arcanes\", \"Diction Instinctive\", \"Diction Instinctive\", \"Chance\", \"Sens de la Magie\", \"Menaçant\", \"Magie Mineure\", \"Seconde Vue\", \"Sixième Sens\"]\nlet trappings = [\"Arme simple\", \"(2M) Bâton de combat\", \"Ritual Dress incorporating many ingredients and fetishes\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n items.push({name : trapping, type : \"trapping\", \"system.trappingType.value\" : \"clothingAccessories\"})\n //ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","bHxGutf5lZy0kciK":"if (!(await this.script.dialog(\"Ce processus est irréversible, continuer ?\")))\n{\n return;\n}\n\nlet items = [this.actor.itemTypes.talent.find(i => i.baseName == \"Bless\"), this.actor.itemTypes.talent.find(i => i.baseName == \"Invoke\")].filter(i => i);\nlet skill = this.actor.itemTypes.skill.find(i => i.name == game.i18n.localize(\"NAME.Pray\"));\n\nthis.script.notification(\"Suppression de \" + items.map(i => i.name).join(\", \"));\nawait Promise.all(items.map(i => i.delete()));\n\nif (skill)\n{ \n this.script.notification(`Suppression des avances de Prière (${skill.system.advances.value})`)\n skill.update({\"system.advances.value\" : 0}, {skipExperienceChecks : true})\n}\n\nfor(let i of this.actor.itemTypes.prayer)\n{\n i.delete();\n}","bL98Sr1TRLMPEdlk":"if (args.test.failed)\n{\n\tthis.actor.addCondition(\"fatigued\");\n}","bLkt8VpTTPoTxW0W":"if (args.loc == \"body\" && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 1);\n this.script.notification(\"Etat Hémorragique ajouté\")\n}\n","bMEFHPCei2evnZZw":"// Victims that take at least 1 Wound from a Fell Dagger\n// immediately take a Poisoned Condition \n// resisted with a Difficult (-10) Résistance Test. \n\n// TODO: Add Venin strength to message\n\nif (args.totalWoundLoss > 0) \n{\n args.actor.addCondition(\"poisoned\")\n this.script.message(`\n ${this.effect.name}:
\n ${args.actor.name} has been given a @Condition[Poisoned] Condition, which can be resisted with a Difficult (-10) Résistance Test.`, \n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n","bNhpJPWwoHLq68zD":"let actor = await DragDialog.create({title : this.effect.name, text : \"Fournissez un Acteur tatoueur (fermer pour ignorer les Tests)\"})\n\nif (!actor)\n{\n this.script.notification(\"Tests ignorés pour appliquer les tatouages\");\n if (await foundry.applications.api.Dialog.confirm({\n window: {title: this.effect.name},\n content : \"

Apply Ward of Grimnir effet?

\"\n }))\n {\n return;\n }\n else \n {\n return false;\n }\n}\n\n\nlet failed = false;\nif (this.actor.itemTags.skill.find(i => i.name == \"Savoir (Théologie)\"))\n{\n let test = await this.actor.setupSkill(\"Savoir (Théologie)\", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"vhard\"}})\n await test.roll();\n if (test.failed)\n {\n failed = true;\n }\n}\nelse \n{\n this.script.notification(\"Compétence Savoir (Théologie) introuvable, impossible de continuer.\")\n failed = true;\n}\n\nif (this.actor.itemTags.skill.find(i => i.name == \"Lore (Runes)\"))\n {\n let test = await this.actor.setupSkill(\"Lore (Runes)\", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\n await test.roll();\n if (test.failed)\n {\n failed = true;\n }\n }\n else \n {\n this.script.notification(\"Compétence Savoir (Runes) introuvable, impossible de continuer.\")\n failed = true;\n }\n\n\n let test = await this.actor.setupSkill(\"Art (Tattooing)\", {appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed)\n {\n failed = true;\n }\n\n if (failed)\n {\n this.script.message(\"Un ou plusieurs Tests pour appliquer les tatouages ont échoué.\")\n return false;\n }\n else\n {\n return true;\n }","bQyVajMN1ETwlzvM":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.aE3pyW20Orvdjzj0\")\nlet data = item.toObject();\nlet target = await game.wfrp4e.tables.rollTable(\"fixations\")\nif (target)\n{\n data.system.specification.value = target.result\n this.script.notification(target.result);\n}\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","bRiFHPC1StKxqNIC":"if (isNaN(parseInt(this.item.system.specification.value))) {\n let value = await ValueDialog.create({title : \"Valeur de Robustesse\", text : \"Entrez la valeur de Robustesse\"});\n if (value) {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","bRtZH0xRh8dgqMeW":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW\")\nlet data = item.toObject();\ndata.system.specification.value = 7 - this.actor.characteristics.s.bonus\ndata.name = item.name.replace(\"(Feature)\", \"\");\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","bT4gLrE3W36DIP4k":"if (args.applyAP && args.modifiers.ap.metal && args.alreadyPenetrating)\n {\n args.modifiers.ap.ignored += 1\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignore +1 PA d'armure en métal\");\n args.modifiers.ap.metal--;\n }","bWr8leucbWslBCYG":"return args.characteristic != \"s\"","bYXlyiRXtdRGYlm0":"let quality = this.effect.getFlag(\"wfrp4e\", \"quality\");\n\nif (quality)\n{\n this.item.system.qualities.value.push({name : quality})\n}","bgLeMqihLya2iobP":"const river = this.actor.itemTags.template.find(t => t.name === \"River Troll\");\n\nif (!river) {\n args.options.abortItemCreation = true;\n this.script.notification(\"Peut seulement être appliqué à un Troll des Rivières.\", 'warning');\n}","bh2qDCKiAIWM0UPi":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"))","bhXUW7IJtEaUGAoV":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll(); \nif (test.failed)\n{\n this.actor.addCondition(\"prone\");\n}\n ","bidoOQSAofp4NPf6":"return args?.skill?.name !== game.i18n.localize(\"NAME.Cool\")","bkbWgG9COvZWZbAX":"args.context.addChargingDice = true;","brNRqfpPqD2Ki0cM":"args.fields.modifier -= 10","btPrQkGRKUkhNe3N":"return args.skill?.name == \"Métier (Apothicaire)\"","bwtQOSWn120NICkf":"let test = await this.actor.setupCharacteristic(\"ag\", {fields : {difficulty : \"hard\"}});\nawait test.roll();\n\nif (test.failed)\n{\n await this.actor.addCondition(\"bleeding\")\n await this.actor.addCondition(\"entangled\")\n}","bwx9wuEOJPF7btD1":"return args.skill?.name != game.i18n.localize(\"NAME.Navigation\");","bzaoWcieMFaU5B5l":"return !this.actor.flags.useless[this.item.system.location.key] || [\"fel\", \"wp\", \"int\", \"t\"].includes(args.characteristic)","c31hjp7k0hlpdGBC":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.yRhhOlt18COq4e1q\");\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","c3KA1knL2NYNUEww":"return args.skill?.name != game.i18n.localize(\"NAME.Evaluate\");","c7HTWfg3CbjN9e1M":"this.actor.name = this.actor.name.replace(\"Common Troll\", \"Troll\");","c9xxdOCaQSwooK8n":"if (!this.actor.has(\"Bénédiction de Bataille\",\"prayer\")) this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.ElmLfnrXliStS9CP\", this.effect)","cAKqUBuJBsU85erO":"return args.skill?.name !== game.i18n.localize(\"NAME.Stealth\");","cAioHYtlxuOCwRLh":"let ablaze = Number(args.opposedTest.attackerTest.result.SL) + 1\nargs.actor.addCondition(\"ablaze\", ablaze)","cApfxL7Ic0NKdoSr":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.rOV2s6PQBBrhpMOv\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","cBSy9CR5NZvcLRg8":"\n args.fields.modifier += 0;\n args.fields.slBonus += 0;\n args.fields.successBonus += 0;\n ","cC7jjJDSVPi5BJUq":"if (this.item.equipped.value) {\n this.actor.system.status.addArmour(1, {source: this.effect})\n}","cDBhmHn5kjgWBAlT":"let num = (this.effect.sourceTest.result.overcast.usage.other.current || 1)\n\nthis.actor.addCondition(\"entangled\", num)","cEg09bnvZD6Ysnpc":"let item = await fromUuid(\"Compendium.wfrp4e-archives2.items.anIlqJXFOIEzIOo1\")\nlet data = item.toObject();\ndata.name = this.item.name;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","cJFDnq1HI4gXWcJo":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = await ValueDialog.create({text: \"Entrez la valeur de Protection\", title : this.effect.name});\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","cK1Jysfu5IMUUH0C":"if (!args.ward)\n{\n\targs.ward = (this.effect.getFlag(\"wfrp4e\", \"ward\") || 0);\n\tif (args.wardRoll >= args.ward && args.ward > 3)\n {\n let newWard = Math.max(3, args.ward - 1)\n this.script.message(\"Protection améliorée à \" + newWard)\n this.effect.setFlag(\"wfrp4e\", \"ward\", newWard)\n }\n\n}","cOuukVo8WakDZIUj":"args.fields.slBonus += 1","cPdtoRmvRC8PqH3x":"if (!this.item.system.properties.qualities.fast) this.item.system.qualities.value.push({name : 'fast'})","cTYNaKbepMwqYsZ8":"\n let difficulty = \"\"\n if (this.effect.name.includes(\"Moderate\"))\n difficulty = \"easy\"\n else if (this.effect.name.includes(\"Severe\"))\n difficulty = \"average\"\n else\n difficulty = \"veasy\"\n \n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {context : {failure : this.actor.name + \" dies from Blight\"}, fields: {difficulty}, appendTitle : \" - Blight\"})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"dead\");\n }\n ","cUFCL02JoaZObRcX":"let sl = this.effect.sourceTest.result.slOver;\n\nthis.actor.system.characteristics.s.modifier += sl * 10;\nthis.actor.system.characteristics.s.calculationBonusModifier -= sl;","cUnbADgOQ4fMKgrH":"let group\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN\");\nlet data = item.toObject();\n\nif (this.item.name.includes(\"(\"))\n{\n\tgroup = this.item.parenthesesText\n}\n\nelse\n{\n\tgroup = await ValueDialog.create({text : \"Entrez le Groupe de Haine\", title : \"Groupe de Haine\"})\n\n\tthis.item.updateSource({name : this.item.name + ` (${group})`, \"system.tests.value\" : this.item.system.tests.value.replace(\"Group\", group)})\n\tthis.effect.updateSource({name : this.effect.name + ` (${group})`})\n}\n\n\ndata.name = data.name.replace(\"Cible\", group);\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id});","cV9JiAgUPOeUHKnS":"args.fields.successBonus++;\nif (args.skill?.name != game.i18n.localize(\"NAME.SleightOfHand\"))\n{\n args.fields.modifier += 10;\n}","cW8ZuQ9YIUG5uvhf":"return args.characteristic != \"t\";","cYPIXzl86a3LFsTE":"if (args.item.type == \"spell\")\n{\n args.item.cn.value -=2\n if (args.item.cn.value < 0)\n args.item.cn.value = 0\n}","cZVrzR4fxV86lxNW":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.yrkI7ATjqLPDTFmZ\")\nlet res = item.toObject();\nres.system.specification.value = 1;\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.mNoCuaVbFBflfO6X\")\nlet ss = item.toObject();\nawait this.actor.createEmbeddedDocuments(\"Item\", [res, ss], {fromEffect : this.effect.id})","cgmA2N0MkjA7qIZy":"return args.type != \"cast\" || args.item?.system.lore?.value != \"shadow\"","ch5SD2XOQfcYo0X5":"if (args.sizeDiff <= -2 && args.opposedTest.attackerTest.result.critical)\n args.damageMultiplier = Math.abs(args.sizeDiff)\n\n let sBonusDiff = args.opposedTest.defenderTest.actor.characteristics.t.bonus - args.opposedTest.attackerTest.actor.characteristics.s.bonus\n let weapon = args.sourceItem\n if (sBonusDiff > 0 && weapon && weapon.damage.value.includes(\"SB\"))\n {\n args.damage += sBonusDiff\n args.breakdown.other.push({label : this.effect.name, value : sBonusDiff});\n }","chDtEQZoRMOrm2eE":"this.actor.addCondition(\"bleeding\");","chUpiI3el8IO8MSs":"if (args.sourceItem?.name.includes(\"Morsure\"))\n{\n let woundsGained = args.totalWoundLoss;\n this.script.message(`Gagne ${woundsGained} Blessures`, { whisper: ChatMessage.getWhisperRecipients(\"GM\") })\n this.actor.modifyWounds(woundsGained)\n}","chiUvs66IHiKTOcN":"if (args.totalWoundLoss > 0)\n {\n this.script.scriptMessage(\"All wounds caused by this weapon are @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wounds}\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n }","cipTp0OS2bfKLjZS":"if (args.totalWoundLoss > 0) {\n await args.actor.addCondition(\"bleeding\")\n await args.actor.addCondition(\"poisoned\")\n}","ckKbPfaTiQ2qBZdR":"console.log(\"DAMAGE\", this)","clO7l82UYMJ4XVks":"args.context.giantbane = true","cqYgZQk1C3kMARy5":"return args.skill?.name !== game.i18n.localize(\"NAME.Haggle\");","csLKDJKZaUK9vwLT":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.7rBhIRo96Mydo0Cv\")\nlet data = item.toObject();\ndata.system.location.value = \"Back\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n","ct6WGaRMfrcnHhyv":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nlet data = item.toObject();\ndata.system.specification.value = 2;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","cuqCtQsfLBBAGjnu":"args.fields.slBonus -= (Number(this.item.specification.value) || 0)","cxgGYbuiXM3NxIOI":"if (args.test.options.flags.skewering)\n{\n args.test.preData.roll = 1;\n}","cysQDjlDzT8HdNeo":" args.fields.slBonus += 1","czZI8S09By0Mqlsr":"return (args.skill?.name == undefined || args.item?.skillToUse?.name != args.skill?.name)","d29mu8vRt9AQUm0L":"this.actor.characteristics.i.value = Math.min(this.actor.characteristics.i.value, 10);\nthis.actor.characteristics.i.bonus = 1;\n\nfor(let skill of this.actor.itemTypes.skill.filter(i => i.system.characteristic.value == \"i\"))\n{\n skill.system.total.value= Math.min(skill.system.total.value, 10)\n}","d6mVm08o8SeklAcW":"this.actor.system.status.ward.value = 9;","d90GpOWwleOgTbOS":"this.actor.system.status.addArmour(5, {source: this.effect})","d9iU08yvqcffF026":"return args.weapon.system.usesHands.includes(this.effect.getFlag(\"wfrp4e\", \"location\"))","dAMtbn3uQwF8KpKU":"return args.skill?.name != game.i18n.localize(\"NAME.Charm\") && args.skill?.name != game.i18n.localize(\"NAME.Gossip\");","dEx8xfG7VLbN69Ha":"if (!this.item.system.properties.flaws.reload) return;\n\nconst minReload = this.item.system.properties.qualities?.salvo ? 1 : 0;\nconst originalReload = this.item.system.properties.flaws.reload.value;\nconst runesOfReloading = Number(this.item.effects.contents.filter(e => e.name == this.effect.name).length);\nconst newReload = Math.max(originalReload - (2 * runesOfReloading), minReload);\n\nif (newReload) {\n this.item.system.properties.flaws.reload.value = newReload;\n this.item.system.properties.flaws.reload.display = `${game.i18n.localize(\"PROPERTY.Reload\")} ${newReload}`;\n}\nelse {\n delete this.item.system.properties.flaws.reload\n}","dIxYt421K010eogY":"\n let modifier = 0\n if (this.effect.name.includes(\"Moderate\"))\n modifier = -20\n else\n modifier = -10\n args.fields.modifier += modifier\n ","dLlcg8m8eiaVBmTg":"if (this.effect.sourceActor)\n{\n this.effect.updateSource({\"system.changes\": null});\n return;\n}\n\nlet colors = {\n fire : \"#b22222\",\n heavens : \"#87ceeb\",\n metal : \"#ee9b3a\",\n shadow : \"#808080\",\n life : \"#008000\",\n beasts : \"#a52a2a\",\n light : \"#f0ffff\",\n death : \"#800080\",\n necromancy : \"#800080\",\n daemonology : \"#8b0000\"\n};\n\nlet spell = this.actor.itemTypes.spell.find(i => Object.keys(colors).includes(i.system.lore.value[0]));\n\nlet color;\nif (spell)\n{\n color = colors[spell.system.lore.value[0]];\n}\nelse \n{\n color = Object.values(colors)[Math.ceil(CONFIG.Dice.randomUniform() * 10)];\n}\n\nthis.effect.updateSource({\"system.changes\": [\n {key: \"token.light.animation.type\", type: \"override\", value: \"flame\"}, \n {key: \"token.light.dim\", type: \"override\", value: 30}, \n {key: \"token.light.bright\", type: \"override\", value: this.actor.system.characteristics.wp.bonus}, \n {key: \"token.light.color\", type: \"override\", value: color}\n]});","dM449AU0FQRnOc3l":"if (args.loc == \"head\")\n{\n args.abort = \"Missed - Headless\"\n}","dM8FbRH2V8CpOkXw":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.QluSTTTq3viHJJUh\")\nlet data = item.toObject();\ndata.system.location.value = \"Ribs\";\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","dMeSZGdvw7zlnUKh":"return args.characteristic != \"wp\" && !args.context.terror && !args.extendedTest?.flags.wfrp4e?.fear","dSie82gBJoln1V2i":"await this.actor.hasCondition(\"broken\")?.delete();\nawait this.actor.hasCondition(\"fatigued\")?.delete();\n\nlet healed = this.effect.getFlag(\"wfrp4e\", \"handOfGlory\")?.roll || 0;\nthis.actor.modifyWounds(healed)\nthis.script.message(`Healed ${healed} Wounds`)","dSmRhZ6o1bUcOSF9":"return args.skill?.name != game.i18n.localize(\"NAME.Leadership\");","dULCkRxtisuzQyuK":"if (args.options.condition) \n this.effect.delete();","dVF5ywnzeiZQx9ke":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {fields : {difficulty : \"hard\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed) \n{\n\tthis.script.scriptMessage(await this.actor.applyBasicDamage(15, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))\n}","dWr3tkFoIzsAgelu":"let injury = this.effect.itemTargets[0]\nif (injury && this.effect.sourceTest.result.outcome == \"success\") {\n let days = new Roll(injury.system.duration.value).evaluateSync().total\n let num = 1 + Number(this.effect.sourceTest.result.SL);\n let roll = await new Roll(num+'d10').roll()\n await roll.toMessage(this.script.getChatData())\n let newDays = Math.max(days - roll.total, 1)\n this.actor.updateEmbeddedDocuments(\"Item\", [{_id: injury.id, 'system.duration.value': newDays} ])\n let message = \"Blessure réduite à \"+newDays+\" (-\" + roll.total + \") au lieu de \"+days\n this.script.message(message)\n}\n","dXGosSxdoYbET2O8":"await this.actor.addCondition(\"fatigued\");\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"))\n\nawait test.roll();\n\nif (!test.succeeded)\n{\n await this.actor.addCondition(\"fatigued\");\n await this.actor.addCondition(\"broken\");\n}","dZ4c5pKDqQV02aIK":"if (args.effect.conditionId == \"ablaze\")\n{\n args.data.formula += ` + parseInt(this.effect.sourceTest.result.SL)`\n}","dbHv7dAXgB2Oy1Fg":"let nbBleeding = 1 + Number(this.effect.sourceTest.result.SL);\nthis.actor.removeCondition(\"bleeding\", nbBleeding);\nconsole.log(this.actor);\n","dbOSvpgcPjsc2uvq":"let menacing = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.0hn6UaKq8CoZP2zD\")).toObject();\nlet sense = (await fromUuid(\"Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS\")).toObject();\n\nsense.name += \" (Sight)\";\nsense.system.tests.value = sense.system.tests.value.replace(\"Sense\", \"Sight\")\n\nthis.actor.createEmbeddedDocuments(\"Item\", [menacing, sense], {fromEffect : this.effect.id})","dbYjr4oG67Z880To":"if (args.test.isFumble)\n{\n args.test.result.other.push(\"@Table[warpfire-thrower-fumble]\")\n}","dcwY8dCd3PNCEzk6":"let current = this.actor.status.fate.value\n\nthis.actor.update({\"system.status.fate.value\" : current + 1})\n\nthis.script.message(`${this.actor.prototypeToken.name} fate points increased from ${current} to ${current + 1}`)","dfEgat3jz4EtWszH":"return args.skill?.name == `${game.i18n.localize(\"NAME.Stealth\")} (${game.i18n.localize(\"SPEC.Urban\")})`","dfnCK8jCPXNLM7Gh":"let aoeDamage = this.effect.sourceTest.result.damage - 5 // Easily handle magic missile damage by just subtracting 5 from the item's (which has +10 base)\n\nthis.script.message(await this.actor.applyBasicDamage(aoeDamage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}))\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - Ablaze`})\n\nawait test.roll();\n\nif (!test.succeeded)\n{\n this.actor.addCondition(\"ablaze\");\n}","dh5mAlaOOLCBC0YQ":"args.actor.system.details.length.value += args.actor.system.details.length.value * 0.1;","dk02qSJfJaIo3Geh":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.EO05HX7jql0g605A\");\nlet data = item.toObject();\ndata.system.specification.value = this.actor.characteristics.ag.value\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","dkY7WRYjFVh8GB0m":"return ['ws', 'bs', 'ag'].includes(args.characteristic)","dkiNmwFXztIVbuxg":"let currentCareer = this.actor.system.currentCareer;\n\nif (!currentCareer || currentCareer.system.talents.includes(game.i18n.localize(\"NAME.Frenzy\")))\n{\n return\n}\n\ncurrentCareer.system.talents.push(game.i18n.localize(\"NAME.Frenzy\"));","dqvHDMlcitLx1pUx":"this.actor.system.details.move.value /= 2;","dr9VJKGY3TeGuzXj":"this.script.message(`Allies of ${this.actor.name} gain +20 Initiative for the first round.`)","drolLZoNuAXQFuPH":"if (args.totalWoundLoss > 0 && this.item.protects[args.loc])\n{\n let roll = await new Roll(\"1d10\").roll();\n roll.toMessage(this.script.getChatData())\n if (roll.total >= 9)\n {\n args.abort = this.effect.name\n }\n}","dsXGavzXLerXR8Xg":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Sail\")) && !args.skill?.name.includes(game.i18n.localize(\"NAME.Row\"))","dt85W8pzZ09w1QLi":"if (this.actor.sameSideAs(this.effect.sourceActor))\n args.fields.slBonus += 2;\nelse\n args.fields.slBonus -= 2;","dtFvpY96RPzNnphq":"return !(args.skill?.name == `${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Basic\")})` || (args.type == \"weapon\" && args.item?.system.weaponGroup.value == \"basic\"))","dtHJFFp2mmVsfil3":"if (args.test.failed)\n {\n let applicableCharacteristics = [\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"];\n if (applicableCharacteristics.includes(args.test.characteristicKey))\n {\n this.actor.addCondition(\"stunned\");\n }\n }","dtQH7ZBKfzewtTsq":"let damage = await new Roll(\"1d10 + 4\").roll();\ndamage.toMessage(this.script.getChatData());\nthis.actor.applyDamage(damage.total, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP,\n createMessage: this.script.getChatData()\n});","dwSgcFxKN3S0hLJL":"return args.skill?.name != game.i18n.localize(\"NAME.MeleeBrawling\") && args.item?.weaponGroup?.value != \"brawling\"","dxt3p07po06J9fO1":"const metal = () => {\n for (const [key, loc] of Object.entries(this.actor.armour)) {\n if (!loc.layers) continue;\n\n for (const layer of loc.layers) {\n if (layer.metal)\n return true;\n }\n }\n\n return false;\n};\n\nargs.fields.slBonus -= metal() ? 2 : 1;","dxxDFXNNqUsuMyUD":"args.fields.slBonus += 1","e0TuMgYuI7ZtGoQr":"args.applyAP = false;\n\nawait args.actor.addCondition(\"ablaze\", 2);\nawait args.actor.addCondition(\"prone\");","e0eKVlOSk3Vw1HiD":"return args.characteristic != \"wp\" || args.type != \"characteristic\"","e2JlsKoW8oaFjn6Y":"const roll = new Roll(\"1d10\");\n\nawait roll.evaluate();\nroll.toMessage();\n\nconst slBonus = Number(this.effect.sourceTest.result.SL) + roll.total;\n\nthis.effect.setFlag(\"wfrp4e\", \"slBonus\", slBonus);","e34s1XxHckAWfwHt":"if (args.test.options.beatBlade && (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target))\n{\n args.test.result.other.push(`${this.effect.name}: Opponent loses ${Number(args.test.result.SL) + 1} Advantage`)\n}","e3dBud1keWyhw6nw":"const stupid = this.actor.items.find(i => i.name === \"Stupidee\");\n\nif (!stupid) return;\n\n\nif (this.item.system.disabled) {\n await stupid.update({\"system.disabled\": false});\n} else {\n await stupid.update({\"system.disabled\": true});\n}","e4HotRnEiyXR0pIu":"this.actor.applyEffect({effectUuids : this.item.effects.contents[1].uuid})","e7IxnxePdXSy6L4E":"if (args.loc == \"head\")\n{\n this.script.message(`${this.actor.prototypeToken.name} receives a @Table[crithead]{Critical Wound} if one was not caused already.`)\n}","eAtqyBd1HsDWuBuI":"this.actor.system.characteristics.fel.modifier -= parseInt(this.item.system.location.value) || 1","eC61buStv62b3sN9":"args.fields.slBonus += 8;","eFVDAqG80veYmhpi":"if (Number(this.actor.system.details.age.value) > 870) {\n if ([\"t\", \"i\", \"fel\"].includes(args.characteristic))\n args.fields.slBonus -= 3;\n if ([\"ws\", \"bs\", \"s\"].includes(args.characteristic))\n args.fields.slBonus -= 2;\n} else if (Number(this.actor.system.details.age.value) > 350) {\n if ([\"t\", \"i\"].includes(args.characteristic))\n args.fields.slBonus -= 2;\n if ([\"fel\"].includes(args.characteristic))\n args.fields.slBonus -= 1;\n} else {\n if ([\"t\", \"i\"].includes(args.characteristic))\n args.fields.slBonus -= 1;\n}","eGQAyzCFZAEQhyJl":"const roll = new Roll(\"2d10\");\nawait roll.evaluate();\nconst money = game.wfrp4e.market.addMoneyTo(this.actor, `${roll.total}b`);\nawait this.actor.updateEmbeddedDocuments(\"Item\", money);\nthis.script.message(game.i18n.format(\"SCRIPT.Silvertide\", {name: this.actor.name, pennies: roll.total}));","eHRv7f2BTtle6Y1K":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.sJ3yX1kvzu2hgNq5\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","eHgk3HZ6eyLFTZ9o":"return !args.item?.system.magicMissile?.value && !args.item?.system.attackType","eIiiDhJohYez26qY":"const {targetUuid} = this.effect.flags.wfrp4e;\n\nif (args.actor.uuid !== targetUuid) return;\n\nconst recordedWounds = this.effect.getFlag(\"wfrp4e\", \"damageToReturn\");\n\nif (!recordedWounds) return;\n\nargs.modifiers.other.push({label: this.effect.name, value: recordedWounds});\nargs.totalWoundLoss += recordedWounds\n\nthis.effect.unsetFlag(\"wfrp4e\", \"damageToReturn\");","eLxdRg8LX3AdYSEq":"let sumArmour = 0;\nfor (let key in this.actor.system.status.armour) {\n let armour = this.actor.system.status.armour[key];\n sumArmour += Number(armour?.value || 0);\n}\nlet damage = Math.floor(Number(sumArmour)/2);\nif (damage > 0 ) { \n\tthis.script.scriptMessage(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))\n}","ePPgxQOqL1Uhz2k9":"let addOption = await foundry.applications.api.DialogV2.confirm({\n window : {title : \"Option\"},\n content :\n `\n Ajouter une option?\n

\n Projectile (Arc) +10 et un Arc long avec 12 flèches\n

\n `,\n})\n\nlet choice = []\n\nif (addOption)\n{\n choice = [\n {\n type : \"skill\",\n name : \"Projectile (Arc)\",\n diff : {\n system : {\n advances : {\n value : 10\n }\n }\n }\n },\n {\n type : \"weapon\",\n name : \"Arc long\",\n },\n {\n type : \"ammunition\",\n name : \"Flèche\",\n }\n ];\n}\n\n\n\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n let equip = item.system.tags.has(\"equippable\");\n item = item.toObject()\n if (equip)\n {\n item.system.equipped.value = true;\n }\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","ePv2YYcr4lz3AkGu":"args.item.range.bands[game.i18n.localize(\"Long Range\")].modifier = 0\nargs.item.range.bands[game.i18n.localize(\"Extreme\")].modifier = 0","eRVVn8YtU8nnOW2q":"await this.actor.addCondition(\"prone\");\n\nconst test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {\n skipTargets: true,\n appendTitle: ` - ${this.effect.name}`,\n fields: {difficulty: \"difficult\"},\n context: {\n failure: `Encaisse 8 dégâts.`,\n success: `Encaisse 4 dégâts.`\n }\n})\n\nawait test.roll();\nconst damage = test.failed ? 8 : 4;\n\nawait this.actor.applyBasicDamage(damage, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, loc: \"roll\"});","eTHJSRutCEpuyPkR":"return args.weapon?.system?.attackType !== \"melee\" || game.settings.get(\"wfrp4e\", \"useGroupAdvantage\")","eViKAYOtuaOqo6c7":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.ConsumeAlcohol\"))","eWWLmA2xINR321aK":"args.item.system.qualities.value.push({name : \"magical\"})","eWvHTkxsjKuH2IKm":"const luck = Number(this.item.qualities.value.filter(v => v.key == \"luck\")[0].description)\n\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.u0CFf3xwiyidD9T5\")\n\nfor (let i = 0; i < luck; i++) {\n let data = item.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n}","eb69QPmNQEJXtk4l":" return args.characteristic != \"bs\"","ebDQH0MdGAG02CHl":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.SYjWiKDzMS6CtROJ\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nif (this.item.system.location.key == \"rArm\")\n{\n\tdata.system.location.value = \"Right Hand\"\n\tdata.system.location.key = \"rHand\"\n}\nelse if (this.item.system.location.key == \"lArm\")\n{\n\tdata.system.location.value = \"Left Hand\"\n\tdata.system.location.key = \"lHand\"\n}\nthis.actor.createEmbeddedDocuments(\"Item\", [data])","ecpD6KWtNjMCvuyn":"if (args.test.isCritical || args.test.isFumble)\n args.test.result.tables.miscast = {\n label : game.i18n.localize(\"ROLL.MajorMis\"),\n class : \"fumble-roll\",\n key : \"majormis\",\n }\ndelete args.test.result.critical;\ndelete args.test.result.tables.critical;","ed7Sud9HM3uB2j6b":"ChatMessage.create({content : \"Yield or die!\", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true})\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn\")\nlet data = item.toObject();\ndata.system.specification.value = 2;\nthis.script.notification(\"Ajout de \" + data.name);\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id});\ngame.wfrp4e.utility.postPeur(2, this.actor.prototypeToken.name)","egDtqMxe3iekc6hv":"let trait = args.sourceItem\nlet woundLossEffect = this.item.effects.get(\"7Amhi75wLv0PvGjd\")\nif (trait && trait.name.includes(\"Morsure\") && woundLossEffect)\n{\n args.actor.applyEffect({effectUuids : woundLossEffect.uuid})\n}","egc02UIueJgEQMqx":"args.context.kingship = true","eh1J3s0s4A2AxoFp":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.8pVzgPkgWpTJvfhG\");\nlet data = item.toObject();\ndata.name += \" (Ennemi)\";\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","eieFcF4BxIvDTN3C":"args.abort = `Cannot perform Projectiles Attacks within ${this.effect.name}`;","ekjJQHyMbZT2vqdc":"let uses = this.item.getFlag(\"wfrp4e\", \"uses\") || 0;\nuses++;\nthis.script.notification(`Utilisé ${uses} fois`)\nthis.item.setFlag(\"wfrp4e\", \"uses\", uses);\nif (uses >= 3)\n{\n\tthis.effect.update({\"system.transferData.type\" : \"other\"})\n\tthis.script.notification(`Utilisé`);\n}\n","eq32dKXeTAbKhhLf":"if (args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"ablaze\", Math.max(1, parseInt(args.opposedTest.attackerTest.result.SL) + 1))\n}","eqxE7nBO13yJS7hc":"let roll = (await new Roll(\"1d10\").roll())\nroll.toMessage({flavor: \"Blessures soignées\", speaker : {alias : this.actor.name}})\n\nthis.actor.modifyWounds(roll.total)\n\nthis.actor.hasCondition(\"bleeding\")?.delete();","esuLwq4g5T8k1kLT":"await args.actor.addCondition(\"ablaze\"); await args.actor.addCondition(\"prone\");","eu4mHsdZukvUEAGJ":"let token = this.actor.getActiveTokens()[0]?.document;\nif (!token) {\n token = this.actor.prototypeToken\n}\nif (args.equipped) {\n this.effect.setFlag(\"wfrp4e\", \"lightData\", token.light);\n token.update({\n light: {\n \"alpha\": 0.8,\n \"angle\": 360,\n \"bright\": 5,\n \"color\": \"#a33c0f\",\n \"coloration\": 1,\n \"dim\": 20,\n \"attenuation\": 0.5,\n \"luminosity\": 0.5,\n \"saturation\": 0,\n \"contrast\": 0,\n \"shadows\": 0,\n \"animation\": {\n \"type\": \"torch\",\n \"speed\": 8,\n \"intensity\": 4,\n \"reverse\": false\n }\n }\n })\n}\nelse {\n token.update({light: this.effect.getFlag(\"wfrp4e\", \"lightData\")});\n}","eyrUJQAuHvdllCwi":"args.context.flags.skewering = true;\nthis.effect.update({disabled: true});","ezGqDoC9hNRBnFTB":"let choices = await Promise.all([warhammer.utility.findItemId(\"1zaqojk0Oq1m8vYv\"), warhammer.utility.findItemId(\"zIuarD5mB0EF0ji0\")])\nlet items = await game.wfrp4e.apps.ItemDialog.create(choices, 1, \"Choisir une arme\")\nitems = items.map(i => i.toObject())\n\nitems.forEach(i => i.system.equipped.value = true);\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","f062aa2BNClx08D6":"let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\n await test.roll();\n if (test.failed) \n {\n let toughnessLost = parseInt(this.effect.sourceTest.result.SL)\n\n let currentModifier = this.actor.characteristics.t.modifier\n\n await this.actor.update({ \"system.characteristics.t.modifier\": currentModifier - toughnessLost })\n this.script.message(`${this.actor.prototypeToken.name} lost ${toughnessLost} Toughness`)\n if (this.actor.system.characteristics.t.value <= 0)\n {\n this.actor.addCondition(\"dead\");\n }\n\n }","f29Pv6TQtgILxt1h":"if (args.test.options.healWounds) {\n if (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target) {\n let wounds = this.actor.characteristics.int.bonus + ~~args.test.result.SL\n if (args.test.options.fieldDressing && args.test.result.reversed)\n wounds = this.actor.characteristics.int.bonus + Math.min(1, Number(args.test.result.SL))\n\targs.test.result.woundsHealed = wounds\n\targs.test.result.other.push(`${this.actor.name} guéri ${wounds} Blessures du patient.`)\n }\n else if (this.actor.characteristics.int.bonus + args.test.result.SL < 0)\n args.test.result.other.push(`The patient contracts a @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Minor Infection}.`)\n}","f3rXusHh6VIpVPUl":"return !args.skill?.name?.includes(game.i18n.localize(\"NAME.Language\")) && args.type != \"cast\"","f4vvAGQ8OGoEbrgy":"let SL = args.opposedTest.attackerTest.result.SL - args.sourceItem.cn.value\nlet difficulty = \"challenging\"\nif (SL >= 1)\n difficulty = \"difficult\"\nif (SL >= 2)\n difficulty = \"hard\"\nif (SL >= 3)\n difficulty = \"vhard\"\n\n\nlet test = await args.actor.setupCharacteristic(\"wp\", {fields: {difficulty}, skipTargets: true, appendTitle : \" - \" + this.effect.name, context : {failure: \"Reçoit un état Sonné\"}})\nawait test.roll();\nif (test.failed)\n{\n args.actor.addCondition(\"stunned\");\n}","f5Mp3kXwCFdPkW6N":"return args.skill?.name != `${game.i18n.localize(\"NAME.Entertain\")} (${game.i18n.localize(\"SPEC.Sing\")})` && args.skill?.name != `${game.i18n.localize(\"NAME.Entertain\")} (${game.i18n.localize(\"SPEC.Singing\")})` && !args.skill?.name.includes(game.i18n.localize(\"NAME.Language\"));","f6WnrJvoNkfoNN9Y":"return args.item?.attackType != 'melee'","f7WZvYle9iqefRsh":"return args.weapon?.system?.attackType != \"melee\"","f8cnfvGKJH3bYVGN":"return [\"s\", \"t\"].includes(args.characteristic)","fA1dIV1ANo4RVEqy":"if (args.equipped) \n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.4mF5Sp3t09kZhBYc\");\n let champion = item.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [champion], {fromEffect : this.effect.id})\n} \nelse \n{\n this.effect.deleteCreatedItems();\n}","fC4KcY9S6V30IJyX":"args.context.supercharge = true;","fEFfHFeJxkR0aIJK":"if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 3 && args.opposedTest.result.winner == \"attacker\")\n{\n this.script.message(`Quiconque dans un rayon de 6 mètres per 1 Blessure and doit effectuer un test Difficile (-10) de Résistance ou recevoir un état @Condition[Deafened]`, {blind : true, whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}\n","fEyKQqCjDwml3DXO":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.M8XyRs9DN12XsFTQ\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})","fFGuTi0HLjwneMcJ":"return args.item?.system.isRanged","fFi9JD4uCY9DPC5B":"let specification = Number(this.item.specification.value) || 1;\nargs.actor.system.characteristics.t.initial += 10 * specification;\nargs.actor.system.status.carries.max -= Math.floor(args.actor.system.status.carries.max * 0.1 * specification);\nargs.actor.system.details.price.gc += Math.floor(args.actor.system.details.price.gc * 0.1 * specification);","fIUxKZMWJ8HMPmH9":"return [\"wp\", \"ag\", \"i\", \"int\"].includes(args.characteristic)","fKzlu6fFE2th9uIJ":"return args.item?.name == game.i18n.localize(\"NAME.ConsumeAlcohol\")","fLg90csmdOOKmEE6":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.EO05HX7jql0g605A\")\nlet data = item.toObject();\ndata.system.specification.value = 16\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.Bvd2aZ0gQUXHfCTh\")\nlet data = item.toObject();\ndata.system.specification.value = 8\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","fNUiKELi9e1vg7KY":"args.actor.removeCondition(\"fatigued\", 99);\nargs.actor.removeCondition(\"bleeding\", 99);","fP2edYbj6QjPPAjL":"return [game.i18n.localize(\"NAME.CharmAnimal\"), game.i18n.localize(\"NAME.Endurance\"), game.i18n.localize(\"NAME.OutdoorSurvival\")].includes(args.skill?.name)","fPKYkBllp7Et62lX":"if (args.test.spell.name == \"Warp Lightning\")\n{\n args.test.preData.reversal = {allowed : true, if: \"better\"};\n}","fSDFCHAo97RLpwGU":"const hitLocation = args.test.hitloc.result\nconst hitLocationArmour = args.test.targets[0]?.armour[hitLocation]\n\nif (hitLocationArmour)\n{\n let qualities = [];\n for (let layer of hitLocationArmour.layers) \n {\n qualities = qualities.concat(layer.source.system.qualities.value);\n }\n\n qualities = new Set(qualities); // supprimer les doublons\n\n this.script.message(`Ignore ${Array.from(qualities).map(i => game.wfrp4e.config.armorQualities[i.name]).join(\", \")}`);\n}\n","fSTjJIqg5tvbwxKt":"const uuid = \"Compendium.wfrp4e-core.items.Item.ahlxlfIl8xUhBkic\";\nconst item = await fromUuid(uuid);\nconst data = item.toObject();\ndata.name = this.effect.name;\ndata.system.equipped.value = true;\n\nconst effectData = this.effect.sourceItem.effects.find(e => e.disabled).toObject();\neffectData.disabled = false;\ndata.effects = [effectData];\n\nconst dagger = await this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id});","fTw3mpSUOlkqVVUC":"this.actor.applyEffect({effectUuids : this.item.effects.contents[0].uuid})","fUD4gMdKe6P3sFdJ":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.Zh68gzYMLW8vZgVo\", this.effect)","fWNVINMVhEwf8k5b":"this.actor.addCondition(\"stunned\");\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {appendTitle: ` - ${this.effect.name}`, skipTargets: true, fields: {difficulty: \"vhard\"}});\n\nawait test.roll();\n\nif (test.failed)\n{\n this.actor.addCondition(\"prone\");\n}","fY0TsQwnU14fdPl2":"args.fields.modifier += 30;","fYLSe6CrYciap5y8":"let characteristics = {\n \"ws\" : 0,\n \"bs\" : 0,\n \"s\" : 10,\n \"t\" : 10,\n \"i\" : 0,\n \"ag\" : 10,\n \"dex\" : 0,\n \"int\" : 0,\n \"wp\" : 0,\n \"fel\" : 0\n}\nlet skills = [game.i18n.localize(\"NAME.ConsumeAlcohol\"), game.i18n.localize(\"NAME.Row\"), game.i18n.localize(\"NAME.Sail\"), game.i18n.localize(\"NAME.Swim\")]\nlet skillAdvancements = [10, 10, 10, 10]\nlet talents = []\nlet trappings = []\nlet items = []\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","faRFSsrQylQRZFLk":"return args.bleedingHand || !args.weapon || !this.actor.hasCondition(\"bleeding\")","fcY3pa72dELnOFXV":"return !args.context.reload\n","feMPZhhFeXRtKdKY":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectUuids : this.item.effects.contents[0]?.uuid})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","ffvcCEazZBinHlUX":"args.update({texture : {tint : \"#FFD700\"}});\n","fiF9sM5UpcHMYa33":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.vMYEkrWj0ip6ZOdv\");\nlet data = item.toObject();\ndata.name += \" (Poison, Disease, Chaos)\"\nthis.actor.createEmbeddedDocuments(\"Item\", Array(this.effect.sourceTest.result.overcast.usage.other.current).fill(data), {fromEffect: this.effect.id})","fkFmNcesqqNTMhVn":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.2iult41Jehz0F1O8\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key;\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","fl762icfKrt9ear2":"this.actor.removeCondition(\"broken\", parseInt(this.effect.sourceTest.result.SL)+1)","fq2fqlWlrVfitkcB":"let characteristics = {\n \"ws\" : 0,\n \"bs\" : -200,\n \"s\" : 20,\n \"t\" : 20,\n \"i\" : 0,\n \"ag\" : -5,\n \"dex\" : -5,\n \"int\" : 0,\n \"wp\" : 0,\n \"fel\" : 0\n}\nlet traits = [ {name:\"Corruption\"}, {name:\"Insensible à la douleur\"}, {name:\"Stupidee\"}, {name:\"Nuée\"}, {name:\"Bestial\", disabled : true}, {name:\"Régénération\", disabled : true}, {name:\"Taille\", value: \"Large\", disabled : true}, {name:\"Territorial\", disabled: true} ];\nlet items = [];\n\nlet updateObj = this.actor.toObject();\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let trait of traits)\n{\n let traitItem = await game.wfrp4e.utility.find(trait.name, \"trait\")\n if (traitItem)\n { \n let t = traitItem.toObject();\n t.system.specification.value = trait.value;\n if (trait.disabled)\n {\n t.system.disabled = true;\n }\n items.push(t);\n }\n else \n {\n ui.notifications.warn(`: -200\n}\nlet traits = [ {name:`, {permanent : true})\n }\n}\n\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n\n","fsvXI7tuL69Ukmec":"if (args.item.type == \"skill\" && (args.item.name == \"Language (Magick)\" || args.item.name.includes(\"Channelling\")))\n{\n args.item.system.modifier.value -= Math.floor(args.item.system.advances.value / 2)\n}","ft0LaRWZT5WtnptP":"let advantage = this.actor.system.status.advantage.value;\nif (advantage > 0)\n{\n await this.actor.setAdvantage(0);\n this.script.notification(\"Avantage retiré\")\n}\nelse \n{\n return this.script.notification(\"Avantage retiré\", \"error\")\n}\n\nlet test = await this.actor.setupTrait(this.item, {fields : {slBonus : advantage}})\nawait test.roll();","fve7tiyF5X9B7mHJ":"args.fields.slBonus -= 2;","fwiBeetIsvpXKtUc":"scatter = await game.wfrp4e.tables.rollTable(\"scatter\");\n\nif (scatter.roll == 9 || scatter.roll == 10)\n{\n this.script.message(`${scatter.roll}: Failed to Scatter`);\n}\nelse \n{\n this.script.message(scatter.result);\n}","fyjYWg7ekj8JJcmq":"if (args.test.result.misfire || args.test.result.fumble)\n{\n args.test.result.other.push(`${this.effect.name}: can be used to Negate Fumble / Raté Effects`)\n}","fzTB7t3x4bLmAXji":"let roll = await new Roll(\"1d10 + 1\").roll()\nawait roll.toMessage(this.script.getChatData());\nthis.script.notification(`Healed ${roll.total} Wounds`)\nthis.actor.corruptionDialog(\"moderate\")\nawait this.actor.modifyWounds(roll.total)","g07HI7vyqiFXPB0o":"// A Drinker must take a Difficult (-10) Endurance Test.\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"difficult\"}})\nawait test.roll()\n// If they fail, they acquire 2 Poisoned Conditions.\nif (test.failed)\n{\n this.actor.addCondition(\"poisoned\", 2)\n this.script.message(`

${this.actor.prototypeToken.name} a reçu 2 états @Condition[Poisoned].

\n

N'importe quelle créature possédant le trait de créature bestiale qui les mord et subit des dégâts ne les mordra pas à nouveau lors d'une rencontre hostile, bien que la créature puisse toujours les attaquer d'autres manières.

`,\n {\n whisper: ChatMessage.getWhisperRecipients(\"GM\"),\n blind: true\n })\n}\n // If they succeed, for a number of rounds equal to 3+ their SL, they have the Corrosive Blood Creature Trait.\nelse if (test.succeeded)\n{\n // Don't attempt to add Corrosive Blood if actor already has it\n const hasCorrosiveBlood = this.actor.has(\"Corrosive Blood\")\n if (hasCorrosiveBlood !== undefined) return\n\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.M5QSWOYt2Rbv2yxW\")\n let data = item.toObject()\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n\n const duration = 3 + parseInt(test.result.SL)\n this.script.message(`

${this.actor.prototypeToken.name} a reçu le trait de créature Sang Corrosif pour ${duration} tours.

`,\n { whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true })\n}","g0SzfsLyW7aD2F19":"if (this.item.system.tests.value.includes(\"(Groupe social)\"))\n{\n let tests = this.item.system.tests.value\n let name = this.item.name\n\n // If name already specifies, make sure tests value reflects that\n if (name.includes(\"(\") && !name.toLowerCase().includes(\"(any)\"))\n {\n let group = name.split(\"(\")[1].split(\")\")[0]\n tests = `${tests.split(\"(\")[0].trim()} (${group})`\n }\n else\n {\n let value = await ValueDialog.create({text : \"Entrez le Groupe d'Étiquette\", title : this.effect.name});\n if (value)\n {\n name = `${name.split(\"(\")[0].trim()} (${value})`\n tests = this.item.system.tests.value.replace(\"Groupe social\", value);\n }\n }\n this.item.updateSource({name, \"system.tests.value\" : tests})\n}","g1L8OYO9nCOhdKGL":"// Everything within Fellowship Bonus yards \n// of the target point is splashed with mystic poison, \n// suffering 1d10 + SL damage which ignores Armour Points\n\nlet damage = (await new Roll(`1d10 + ${parseInt(this.effect.sourceTest.result.SL)}`).roll())\n\nawait damage.toMessage(this.script.getChatData())\n\nthis.script.message(await args.actor.applyBasicDamage(\n damage.total,\n {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}\n))\n\n// ... and gains the Poisoned Condition\n\nthis.actor.addCondition(\"poisoned\")","g4t56A09yrpZaJQ2":" let amberTalons = foundry.utils.deepClone(game.wfrp4e.config.systemItems.unarmed);\n amberTalons.name = \"Serres d'ambre\";\n amberTalons.img = this.effect.img;\n amberTalons.system.damage.value = \"SB + WPB\"\n amberTalons.system.equipped = true;\n amberTalons.system.qualities.value.push({name : \"magical\"})\n amberTalons.effects.push({\n name : \"Serres d'ambre\",\n transfer: false,\n img : \"modules/wfrp4e-core/icons/spells/amber-talons.png\" ,\n system: {\n transferData : {\n documentType : \"Item\"\n },\n scriptData : [{\n trigger : \"applyDamage\",\n script : \"if (args.totalWoundLoss >= 1)\\n{ \\n args.actor.addCondition(\\\"bleeding\\\")\\n}\"\n }]\n }\n })\n this.actor.createEmbeddedDocuments(\"Item\", [amberTalons], {fromEffect: this.effect.id})","g5y0tdoHCDs7cBy7":"return ![\"NAME.Résistance\", \"NAME.Cool\"].map(i => game.i18n.localize(i)).includes(args.skill?.name) \n || !this.actor.sameSideAs(this.effect.sourceActor)\n || this.actor.system.details.status.tier !== \"b\"","g8Tmet9Ii3NvFqvf":"this.actor.addCondition(\"bleeding\", 1 + this.actor.system.status.sin?.value || 0)","gFUXBbTskQBKjxqm":"if (this.actor.hasCondition(\"entangled\"))\n{\n this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"average\"}}).then(async test => {\n await test.roll();\n if (test.failed)\n this.actor.addCondition(\"fatigued\") \n })\n}","gKIPujyuFSn0No9v":"for(let e of this.item.effects.contents)\n{\n e.update({disabled: false})\n}\nthis.script.notification(\"Reset Powers\")","gKPL3t4vlZAsvtGr":"return args.skill?.name == `${game.i18n.localize(\"NAME.Stealth\")} (${game.i18n.localize(\"SPEC.Underground\")})`","gL0ftUnK5TNXBRRt":"return this.effect.sourceActor.uuid == args.actor.uuid","gMIenSmLklAkB2Zm":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = await ValueDialog.create({text : \"Entrez la Force du Venin\", title : this.effect.name}, \"\", Object.values(game.wfrp4e.config.difficultyNames));\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","gOm8utR3HLQBT5hA":"let {value} = this.effect.getFlag(\"wfrp4e-soc\", \"m4result\") || {};\n\nif (value === 0)\n args.actor.system.status.mood.value = 0;\nelse if (value !== undefined)\n args.actor.system.status.mood.value += value;","gPQrszvIgGlW9yM4":"if (args.test.characteristicKey == \"wp\")\n args.test.preData.reversal = {allowed: true, if: \"better\"};","gPt4hUnaNqE5rVYF":"if (args.test.isCriticalFumble && !args.test.spell)\n{\n\tif (parseInt(args.test.result.SL) > 0 || args.test.succeeded)\n\t{\n\t\tif (parseInt(args.test.result.SL) > 0)\n\t\t{\n\t\t\targs.test.result.SL = \"-0\";\n\t\t\targs.test.result.description = game.i18n.localize(\"ROLL.MarginalFailure\");\n\t\t}\n\t\targs.test.result.outcome = \"failure\"\n args.test.result.other.push(`${this.effect.name}: Automatic Failure`)\n\t}\n\n}","gQ610vjGKmowl0rj":"let data = this.effect.getFlag(\"wfrp4e\", \"handOfGlory\");\nlet changes = [];\n\nif (!data)\n{\n return;\n}\n\nfor(let characteristic of [\"ws\", \"bs\", \"s\", \"t\", \"i\", \"ag\"])\n{\n\n let currentTotal = this.actor.system.characteristics[characteristic].value;\n let newTotal = this.actor.system.characteristics[characteristic].value + data.roll;\n let bonusOffset = Math.floor(currentTotal / 10) - Math.floor(newTotal / 10); // e.g. 37 + 15 bonus = 52, calculation bonus modifier should be -2\n\n changes = changes.concat({\n key: `system.characteristics.${characteristic}.modifier`,\n mode: 2,\n value: data.roll\n }, \n {\n key: `system.characteristics.${characteristic}.calculationBonusModifier`,\n mode: 2,\n value: bonusOffset\n })\n}\n\nchanges.push({key: \"system.details.move.value\", mode: 2, value: 2});\n\n \nthis.effect.updateSource({changes});","gQJJaxbN83KSgi36":"if (!args.totalWoundLoss) return\n\nconst roll = await new Roll(\"2d10\").roll();\nroll.toMessage(this.script.getChatData());\n\nargs.attacker.applyBasicDamage(Number(roll.total), { loc: \"roll\" })","gSDhsSB8573joL64":"if (args.equipped) {\n const spell = await game.wfrp4e.utility.findItem(\"Vindictive Glare\", \"spell\");\n const skillUUID = \"Compendium.wfrp4e-core.items.Item.e3McIND4Rrsn5cE6\";\n\n await this.actor.addEffectItems([skillUUID, spell.uuid], this.effect, [{\n \"system.advances.value\": 75 - this.actor.system.characteristics.int.value\n}, {}]);\n} else {\n this.effect.deleteCreatedItems();\n}","gVpFUka7qfGiEC1v":" this.actor.getActiveTokens().forEach(t => t.document.update({texture : {tint : \"#FFD700\"}}));\n","ga6bQzPuoIiQQrKg":"if (args.totalWoundLoss > 0)\n{\n \n let test = await args.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\n await test.roll()\n if (test.failed)\n {\n args.totalWoundLoss += this.effect.sourceActor.system.characteristics.wp.bonus\n args.modifiers.other.push({label : this.effect.name, value : this.effect.sourceActor.system.characteristics.wp.bonus})\n }\n}","gbhxWXboV9CytWNU":"await this.actor.addCondition(\"blinded\", 2)","gh2KS1prBKcsSK6M":"if (args.opposedTest.attackerTest.result.critical)\n args.actor.addCondition(\"ablaze\")","gnVpxOeBZpNF4HIF":"if (args.test.result.roll.toString().includes(\"9\") || args.test.result.roll.toString().includes(\"8\"))\n{\n args.test.result.fumble = game.i18n.localize(\"Fumble\")\n}","goz8yTlMozlsz3uY":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Strength';\nconst difficulty = 'easy';\nconst target = 10;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","gpPaCe6yER79l4u8":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","gpuBg3y9rocJL7yT":"this.actor.status.addArmour(1, {locations: [\"head\"], source: this.effect})","gqZLfIr6svrtdwdC":"return args.skill?.name != game.i18n.localize(\"NAME.SleightOfHand\") && args.skill?.name != game.i18n.localize(\"NAME.MeleeBrawling\") && args.weapon?.system?.weaponGroup?.value != \"brawling\"","groEX1wJ9l00PkDF":"let turns = this.effect.getFlag(\"wfrp4e\", \"turns\");\nif (turns <= 0) return;\nturns--;\n\nconst speaker = ChatMessage.getSpeaker({actor: this.actor});\nconst targetId = this.effect.getFlag(\"wfrp4e\", \"target\");\nconst target = canvas.scene.tokens.get(targetId);\n\nif (turns > 0) {\n this.effect.setFlag(\"wfrp4e\", \"turns\", turns);\n\n return this.script.message(`

${speaker.alias} continue de s'enrouler autour de ${target.name}. Il pourra commencer à écraser dans ${turns} tours.

`);\n}\n\nif (this.actor.items.find(i => i.type === \"extendedTest\" && i.name === this.effect.name)) {\n this.script.message(`

${speaker.alias} peut reprendre l'écrasement de ${target.name} avec le Test Étendu.

`);\n return;\n}\n\nconst extendedTestData = {\n name: this.effect.name,\n type: \"extendedTest\",\n img: this.effect.img,\n system: {\n SL: {\n current: 0,\n target: target.actor.system.status.Blessures.value\n },\n Test: {\n value: 'Strength'\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: \"challenging\"\n }\n }\n};\n\nconst extendedTests = await this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\nconst extendedTest = extendedTests[0];\n\nthis.script.message(`

${speaker.alias} a fini de s'enrouler autour de ${target.name}. Il peut maintenant commencer à écraser via le Test Étendu @UUID[${extendedTest.uuid}].

`);\n\nlet effet = {\n name: extendedTest.name,\n img: extendedTest.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: extendedTest.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.effects.find(e => e.id === id);\n const speaker = ChatMessage.getSpeaker({actor: this.actor});\n const targetId = effect.getFlag(\"wfrp4e\", \"target\");\n const target = canvas.scene.tokens.get(targetId);\n this.script.message(\\`

${speaker.alias} a écrasé ${target.name}. Le bateau se brise, réduit à un amas d'épaves.

\\`);\n await effet.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n}\n\nawait extendedTests[0].createEmbeddedDocuments(\"ActiveEffect\", [effect]);","gsCnd3mf1vXFU2ei":"this.actor.system.status.ward.value = 4;","gu72JaTs9GrSiVTd":"return !(args.skill?.name == game.i18n.localize(\"NAME.Haggle\") || args.skill?.name == game.i18n.localize(\"NAME.Gossip\"))","gull3qgCahzk2xYu":"this.actor.addCondition(\"fatigued\", parseInt(this.effect.sourceTest.result.SL))\n\nlet test = await this.actor.setupSkill(\"Calme\", {fields : {difficulty: \"challenging\"}, appendTitle : ` - ${this.effect.name}`});\n\nawait test.roll();\n\nif (test.failed)\n{\n\tthis.actor.addCondition(\"broken\");\n}","gxuBeGHwjZ7WfPeu":"let specification = Number(this.item.specification.value) || 1;\nargs.fields.slBonus -= specification;","h0DfPwUUOBjyAHMZ":"return args.skill?.name != game.i18n.localize(\"NAME.Perception\");","h1XKoMuVnS0bagRO":"return args.item?.name != game.i18n.localize(\"NAME.Endurance\");","h2GSoiCQ2ZSlTjf7":"const uuid = \"Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc\";\nconst item = await fromUuid(uuid);\nawait this.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id});","h4lnexDYAhyQuiR5":"if (args.test.isCritical && args.test.weapon.properties?.qualities?.impale) {\n let targets = args.test.targets.filter(t => t.system.details.move.value > 1);\n if (targets.length > 0) {\n targets.forEach(target => {\n target.applyEffect({effectData : [this.item.effects.contents[1].convertToApplied()]})\n });\n args.test.result.other.push (`${this.effect.name}: Target Move Reduced by 1`)\n }\n}","h766UvswLCsxcMow":"let characteristics = {\n \"ws\" : 5,\n \"bs\" : 0,\n \"s\" : -15,\n \"t\" : 0,\n \"i\" : 20,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 5,\n \"wp\" : 10,\n \"fel\" : 10\n}\nlet skills = [\"Charme\", \"Intimidation\", \"Mêlée (Base)\"]\nlet skillAdvancements = [7, 60, 7]\nlet talents = [\"Menaçant\", \"Discret\"]\nlet traits = [\"Perturbant\"]\nlet trappings = []\nlet items = [];\nlet spells = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nconst traitRegex = /(?:,?(.+?)(\\+?\\d{1,2}\\+?)?\\s*?(?:\\((.+?)\\)\\s*(\\+?\\d{1,2})?|,|$))/gm\nfor (let trait of traits)\n{\n let traitMatches = trait.matchAll(traitRegex).next().value\n let traitName = traitMatches[1]\n let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there's a specialization\n let traitSpec = traitMatches[3]\n\n let traitItem;\n try {\n traitItem = await WFRP_Utility.findItem(traitName, \"trait\")\n }\n catch { }\n if (!traitItem) {\n ui.notifications.warn(`Impossible de trouver ${trait}`, {permanent : true})\n }\n traitItem = traitItem.toObject()\n\n if (Number.isNumeric(traitVal))\n {\n traitItem.system.specification.value = traitName.includes('Arme','Cornes','Tail','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;\n traitItem.name = (traitItem.name + ` ${traitSpec ? \"(\"+ traitSpec + \")\" : \"\"}`).trim()\n }\n else\n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells)\n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","h8JqPMh2mM2uhpxk":"if (args.item.system.tags.has(\"armour\"))\n{\n \nfor(let key in args.item.system.AP)\n{\n if (args.item.system.AP[key])\n {\n args.item.system.AP[key] += 2;\n }\n }\n}","hA8PzeiCsHqqlUZm":"this.actor.createEmbeddedDocuments(\"ActiveEffect\", [game.wfrp4e.config.symptomEffects[\"nausea\"]])\nthis.script.message(`Recoit l'état @Condition[Nausea] pour [[1d10]] heures`, {whisper: ChatMessage.getWhisperRecipients(\"GM\")})","hCzxUyO6mjLNIpaM":"let woundsGained = Math.min(args.totalWoundLoss, args.actor.status.wounds.value)\n\nwoundsGained = Math.floor(woundsGained / 2)\n\nargs.attacker.update({ \"system.status.wounds.value\": args.attacker.status.wounds.value + woundsGained })\n\nthis.script.message(`Gains ${woundsGained} Wounds`)","hDC6lroDEPVBituR":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nif (test.failed)\n{\n this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + 1})\n this.script.message(\"Gained a Corruption point\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n if (test.result.roll % 11 == 0 || test.result.roll == 100)\n {\n this.script.message(`Fumble: immediately gain 1 @Table[mutatemental]{Mental Mutation}, and may not take a Short-term Ambition for the next [[1d10]] weeks.`, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n }\n}","hEDuYAgc1O1zG3Rr":"return args.targets[0].actor.appliedEffects.filter(e => e.name == game.i18n.localize(\"Flying\")).length > 0","hK0YMJfYbpbJZizO":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 0,\n \"bright\": 0,\n \"angle\": 360,\n \"alpha\": 0.5,\n \"animation\": {\n \"speed\": 0,\n \"intensity\": 0,\n \"type\": \"none\",\n },\n \"color\": \"\",\n }}));","hL3JUSY3xMA4zj2Q":"if (this.sourceActor.uuid === this.actor.uuid) return;\n\nconst test = await this.actor.setupCharacteristic(\"t\", {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {\n difficulty: \"difficult\"\n },\n context: {\n success: \"Est capable de se relever !\",\n failure: \"Est tombé à terre !\",\n }\n});\n\nawait test.roll();\nif (test.failure) {\n await this.actor.addCondition(\"prone\");\n}","hO2CFW9hygGSYuJ2":"return args.target?.Species == this.effect.specifier;","hObTbWi4ZdwXimIW":"if (args.item.type == \"spell\")\n{\n args.item.system.cn.value = Math.floor(args.item.system.cn.value / 2);\n}","hOgha3ir8K9TVphO":"return args.characteristic !== \"fel\";","hR1qD2kpFHF8JT8h":"return args.skill?.name == `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`","hSImyYjL0CENTvXf":"let test = await this.actor.setupSkill(\"Résistance\", {fields : {difficulty : \"difficult\", appendTitle : ` - ${this.effect.name}`}});\nawait test.roll();\nif (test.failed)\n{\n\tawait this.actor.addCondition(\"blinded\");\n}\n\nlet msg = ``\nlet armour = args.actor.itemTags.armour.filter(i => i.system.isMetal && i.system.isEquipped);\nfor(let item of armour)\n{\n\tfor(let key in item.system.AP)\n\t{\n\t\tlet AP = item.system.AP[key]\n\t\tlet damage = Math.floor(AP / 2);\n\t\tawait item.system.damageItem(damage, [key]);\n\t}\n\tmsg += `

${item.name} PA réduit de moitié

`\n}\nif (msg)\n{\n\tthis.script.message(msg, {speaker : {alias : args.actor.name}});\n}","hSlEY2oh8quVmdXR":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn\")\nlet data = item.toObject();\ndata.system.specification.value = 2\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","hTsnYKgw0kK10PiC":"args.fields.modifier += 5","hWWvkPbgIN3lxz1u":"return args.item?.system?.attackType !== \"melee\";","hYNWp75ggWSTht55":"if (args.test.result.hitloc.value != \"head\" && args.test.result.critical)\n{\n\twarhammer.utility.sleep(200).then(() => {\n\t\tthis.script.message(\"Tirage possible sur la table @Table[crithead]{Coups critiques à la tête} au lieu de de la localisation normale.\")\n\n\t})\n}","hZAax4emLahEEqcZ":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW\")\nlet data = item.toObject();\ndata.system.specification.value = 7 - this.actor.characteristics.s.bonus\ndata.name = item.name.replace(\"(Feature)\", \"(Tusks)\")\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","hadXFC43VKyrE9jC":"this.actor.addEffectItems([\"Compendium.wfrp4e-core.items.Item.eowbsW6oHGSNJmxV\", \"Compendium.wfrp4e-core.items.Item.eowbsW6oHGSNJmxV\"], this.effect);","hcUCeoIFwWPKa5K1":"let fatigued = this.actor.hasCondition(\"fatigued\");\n if (fatigued)\n {\n foundry.utils.setProperty(fatigued, \"flags.wfrp4e.scriptData\", foundry.utils.getProperty(fatigued, \"flags.wfrp4e.scriptData\").filter(s => s.trigger != \"dialog\"))\n }\n \n if (!this.item.system.properties.qualities.unbreakable) this.item.system.qualities.value.push({name : 'unbreakable'})","hfFGFWEKFZXtMKWo":"let corruption = await new Roll(\"1d10\").roll();\ncorruption.toMessage(this.script.getChatData());\n\nthis.actor.addCondition(\"stunned\", corruption.total);\n\nthis.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.system.status.corruption.value) + corruption.total});\nthis.script.notification(\"Corruption ajoutée\");","hfO4INH3EeETDTFt":"this.actor.status.addArmour(1, {locations: this.effect.flags.wfrp4e.locations, source: this.effect})","hg89FU1NAp8tIsgO":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Trade\"))","hhCs5VBKx50S5IsY":"return !args.context.mutate","hhv7PrRdlf9sfC82":"let characteristics = {\n \"ws\" : 5,\n \"bs\" : 0,\n \"s\" : 5,\n \"t\" : 5,\n \"i\" : 10,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 0,\n \"wp\" : 0,\n \"fel\" : 0\n}\nlet skills = [\"Calme\", \"Esquive\"]\nlet skillAdvancements = [10, 10]\nlet talents = [\"Réflexes de Combat\"]\nlet trappings = [\"Veste en cuir\", \"Casque en cuir\", \"Jambières en cuir\", \"Bouclier\"]\nlet items = []\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","hj7tI212neKIu9dh":"this.actor.system.status.ward.value = 7;","hlHKeFWrOA8CsLr9":"args.data.reversal = {allowed : true, if: \"success\"};\nargs.context.pilot = true;","hluehsCuBZYc1Ejt":"return args.characterisic != \"fel\"","hmk8zV1LTElHUI8A":"let msg = `${this.actor.prototypeToken.name} loses 1 Wound.
`\n if (this.actor.status.wounds.value <= 1)\n {\n msg += `${this.actor.prototypeToken.name} goes unconscious.
`\n await this.actor.addCondition(\"unconscious\")\n }\n this.script.message(msg)\n this.actor.modifyWounds(-1)","hnsmzvcuiUYB065I":"this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {appendTitle: ` - ${this.effect.name}`, context: { failure : \"May not flee Combat\"}}).then(test => test.roll())","hpBjbxWg0qLlwX2K":"let lores = [\n {id: \"beasts\", name: \"Ghur\", table: \"ghur-marks\", img: \"modules/wfrp4e-core/icons/spells/beasts.png\"},\n {id: \"death\", name: \"Shyish\", table: \"shyish-marks\", img: \"modules/wfrp4e-core/icons/spells/death.png\"},\n {id: \"fire\", name: \"Aqshy\", table: \"aqshy-marks\", img: \"modules/wfrp4e-core/icons/spells/fire.png\"},\n {id: \"heavens\", name: \"Azyr\", table: \"azyr-marks\", img: \"modules/wfrp4e-core/icons/spells/heavens.png\"},\n {id: \"life\", name: \"Ghyran\", table: \"ghyran-marks\", img: \"modules/wfrp4e-core/icons/spells/life.png\"},\n {id: \"light\", name: \"Hysh\", table: \"hysh-marks\", img: \"modules/wfrp4e-core/icons/spells/light.png\"},\n {id: \"metal\", name: \"Chamon\", table: \"chamon-marks\", img: \"modules/wfrp4e-core/icons/spells/metal.png\"},\n {id: \"shadow\", name: \"Ulgu\", table: \"ulgu-marks\", img: \"modules/wfrp4e-core/icons/spells/shadow.png\"},\n];\n\nlet ownedLores = this.actor.itemTypes.spell.reduce((owned, spell) => owned.concat(spell.system.lore.value.filter(l => lores.map(i => i.id).includes(l))), []);\n\nif (ownedLores.length != 0)\n{\n lores = lores.filter(i => ownedLores.includes(i.id));\n}\n\nlet chosen = await ItemDialog.create(lores, 1, {text: \"Select Arcane Mark Table\", title: this.effect.name})\n\nif (chosen[0])\n{\n game.wfrp4e.tables.formatChatRoll(chosen[0].table, {showRoll: true});\n}","hpbraeEbjkXnmD75":"args.fields.hitLocation = \"lLeg\"\nargs.fields.modifier += 20;","hpwJRAhCsXTp9bd9":"let choice1 = [\n {\n type : \"skill\",\n name : \"Corps à corps (Base)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\nlet choice2 = [\n {\n type : \"skill\",\n name : \"Corps à corps (Armes d'hast)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\n\nlet choice3 = [\n {\n type : \"skill\",\n name : \"Corps à corps (A deux mains)\",\n diff : {\n system : {\n advances : {\n value : 20\n }\n }\n }\n }\n]\n\nlet choice = await foundry.applications.api.DialogV2.wait({\n window : {title : \"Choix\"},\n content :\n `

\n Sélectionnez votre choix\n

\n
    \n
  1. Corps à corps (Base)
  2. \n
  3. Corps à corps (Armes d'hast)
  4. \n
  5. Corps à corps (A deux mains)
  6. \n
\n `,\n buttons : [\n {\n label : \"Base\",\n action : \"basic\",\n callback : () => {\n return choice1\n }\n },\n {\n label : \"Armesd'hast\",\n action : \"polearm\",\n callback : () => {\n return choice2\n }\n },\n {\n label : \"A deux mains\",\n action : \"two-handed\",\n callback : () => {\n return choice3\n }\n }\n ]\n})\n\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n let equip = item.system.tags.has(\"equippable\");\n item = item.toObject()\n if (equip)\n {\n item.system.equipped.value = true;\n }\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","hqMwzPozAVTzoCxa":"if ((args.test.result.roll % 11 == 0 || args.test.result.roll == 100) && args.test.failed)\n{\n delete args.test.result.misfire;\n args.test.result.tables.misfire = {\n label : \"Raté\",\n class : \"fumble-roll\",\n modifier : 0,\n key : \"torpedo\"\n }\n}","ht7csu1KImHzpzL5":"return args.item?.actor?.type !== \"vehicle\" || args.item?.type !== \"weapon\" || !args.item.name.includes(\"Cannon\");","huJcVpVn6Q7sQkFC":"if (args.actorsystem.details.move.sail.value > 0)\n args.actor.system.details.move.sail.value -= 1;\n","hwHpIunCq3ifk2QU":"if (args.item.type == \"spell\")\n{\n let range = parseInt(args.item.Duration)\n if (Number.isNumeric(range))\n {\n args.item.system.duration.value = \"2 * \" + args.item.system.duration.value\n }\n}","hwOZxgt7e65iWvYz":"let test = await this.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n let damage = this.effect.sourceTest.result.damage\n\n this.script.message(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))\n}","hxmwtw5zAHyS2upG":"this.script.message(await game.wfrp4e.tables.formatChatRoll(\"giftofthebeast\"))","i59IpmZNLJEPWZ3L":"return args.spell","i5AN97A7IOeygEFA":"if (args.applyAP && args.modifiers.ap.metal) \n{\n args.modifiers.ap.ignored += args.modifiers.ap.metal\n args.modifiers.other.push({value : args.modifiers.ap.metal, label : this.effect.name, details : \"Ajouter PA de métal aux Dégâts\" })\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignorer Métal (\" + args.modifiers.ap.metal + \")\");\n args.modifiers.ap.metal = 0\n}","i7xl0jNpLnBT2h2l":"args.actor.characteristics.dex.value = 0","i93PGV1lDSdi3BJu":"let effectsToDisable = this.actor.items.filter(i => i.type == \"disease\").reduce((effects, item) => effects.concat(item.effects.contents), []).concat(this.actor.effects.contents.filter(i => i.isCondition)).filter(i => i.active);\n\nif (effectsToDisable.length)\n{\n this.script.notification(`Disabling ${effectsToDisable.map(i => i.name).join(\", \")}.`);\n effectsToDisable.forEach(i => i.update({disabled : true}))\n}","iAo3wxMLA64rsKjj":"this.script.message(await game.wfrp4e.tables.formatChatRoll(\"skavenbrew\"))","iBEPQ3NwtI9DfkEy":"let locations = [];\n\nwhile (locations.length < 2)\n{\n let loc = await game.wfrp4e.tables.rollTable(\"hitloc\", {hideDSN : true})\n if (!locations.includes(loc.result))\n {\n locations.push(loc.result);\n }\n}\n\nlocationText = locations.map(i => game.wfrp4e.config.locations[i]).join(\", \")\n\nthis.item.updateSource({name : this.item.name += ` (${locationText})`})","iH9o7t8vGDn6pm1d":"if (args.test.result.misfire && args.test.result.roll % 2 == 1 && args.test.result.roll % 11 == 0) {\n delete args.test.result.misfire\n}\nelse if (args.test.result.misfire)\n{\n delete args.test.result.misfire;\n args.test.result.tables.misfire = {\n label : \"Raté\",\n class : \"fumble-roll\",\n modifier : 0,\n key : \"artillery-misfires\"\n }\n}","iHn3YzvqNfbwzjZz":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM\")\nlet data = item.toObject();\ndata.system.specification.value = this.actor.characteristics.s.bonus\ndata.system.description.value = \"\"\ndata.name = this.effect.name;\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","iLpq4yCFN6YACrYA":"if (args.test.result.castOutcome == \"success\")\n{\n this.script.message(await game.wfrp4e.tables.formatChatRoll(\"demonic-mien\"))\n}","iM4B3IZ4VtpZsl09":"args.size = \"sml\"","iM6JLF8jDXMViReZ":"return ![game.i18n.localize(\"Name.PickLock\"), game.i18n.localize(\"NAME.SleightOfHand\"), `${game.i18n.localize(\"NAME.Channelling\") (Ulgu)}`].includes(args.skill?.name)\n","iMDZLr7ueJWBnilj":"args.actor.flags.rangedDamageIncrease += 1","iMu8BZ7eHMAbPEO1":"let healed = args.totalWoundLoss\n\nthis.script.message(`this.actor.prototypeToken.name healed ${healed} Wounds`);\n\nthis.actor.modifyWounds(healed)","iNAQJa5HyaEckknX":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\n\nlet opposedResult = test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result\n\nif (opposedResult?.winner == \"attacker\")\n{\n let spells = this.actor.itemTypes.spell;\n if (spells.length)\n {\n let chosen = spells[Math.floor(CONFIG.Dice.randomUniform() * spells.length)]\n this.script.message(`Perd l'accès à ${chosen.name}`)\n chosen.update({name : chosen.name += \" (PERDU)\"})\n }\n}\n","iO2hCDwyQ7v4qrOI":"if (args.test.options.staunchBleeding) {\n if (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target) {\n let staunch = ~~args.test.result.SL + 1\n if (args.test.options.fieldDressing && args.test.result.reversed)\n staunch = Math.min(1, Number(args.test.result.SL)) + 1\n args.test.result.other.push(`${this.actor.name} guérit ${staunch} états Hémmoragie du patient.`)\n }\n else if (this.actor.characteristics.int.bonus + args.test.result.SL < 0)\n args.test.result.other.push(`Le patient contracte une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`)\n}","iT0h3VZLEBQnn5Bx":"return args.skill?.name != game.i18n.localize(\"NAME.Charm\") && args.skill?.name != game.i18n.localize(\"NAME.Gossip\") && args.skill?.name != game.i18n.localize(\"NAME.ConsumeAlcohol\");","iT3C15fMyQrj1RmG":"if (this.actor.has(game.i18n.localize(\"NAME.Undead\")) && this.actor.has(game.i18n.localize(\"NAME.Ethereal\")))\n{\n this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name}).then(async test => {\n await test.roll();\n if(test.failed)\n this.actor.addCondition(\"stunned\")\n })\n}","iVhi3Z6zPaf1bf8g":"return [\"t\", \"i\", \"ag\", \"dex\", \"int\", \"wp\"].includes(args.characteristic)","iWqn1fVeQ8IwZorj":"let roll = await new Roll(\"1d10\").roll();\nroll.toMessage(this.script.getChatData());\nthis.effect.updateSource({duration: {value: roll.total, units: \"rounds\"}});","iX0ctHYHg12pjaCU":"let result = await game.wfrp4e.tables.rollTable(\"gift-of-slaanesh\")\n\nif (result.object.documentId && result.object.documentCollection)\n{\n let item = await fromUuid(`Compendium.${result.object.documentCollection}.${result.object.documentId}`);\n if (item)\n { \n let data = item.toObject();\n // Some items need sourceTest for their effects\n foundry.utils.setProperty(data, \"flags.wfrp4e.sourceTest\", this.effect.sourceTest);\n await this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});\n }\n}\n\nthis.script.message(game.wfrp4e.tables.formatChatRoll(\"gift-of-slaanesh\", {lookup : result.roll, hideDSN: true}));","id9ZdkERMZnZTWXt":"if (args.extendedTest?.getFlag(\"wfrp4e\", \"fear\"))\n{\n\tthis.script.notification(\"Immunisté à la Peur\");\n\targs.extendedTest.delete();\n\targs.abort = true;\n}\nreturn args.context.terror || args.extendedTest?.getFlag(\"wfrp4e\", \"fear\")","idiZBzbALb5fXIbz":"let test = this.actor.attacker?.test\nif (test && this.item.system.protects[test.result.hitloc.result] && test.result.critical)\n{\n this.script.message(`${this.item.name} : Coup critique bloqué`)\n}","igVAVU7DOuzhNG14":"return args.item?.system.isMelee","ij3BLXzNk7eZ3V95":"return ![\"s\",\"t\",\"wp\",\"fel\"].includes(args.fields.characteristic)","ikaQXTvTWI5nAmUV":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nlet slToSpend = excessSL;\n\nlet levels = 0;\nlet duration = 0;\n\nwhile (slToSpend > 0) {\n let content = `

You achieved ${excessSL} and you still have ${slToSpend} SL to spend on enhancing your Sword Dance.

`;\n content += `

So far you selected ${levels} additional levels in War Leader and +${duration} Rounds of duration.

`;\n await foundry.applications.api.DialogV2.confirm({\n yes: {label: \"Additional War Leader\", icon: \"fas fa-person\", callback: () => levels++},\n no: {label: \"+1 Round Duration\", icon: \"fas fa-clock\", callback: () => duration++},\n content,\n });\n\n slToSpend--;\n}\n\nawait this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.vCgEAetBMngR53aT\", this.effect, {\"system.advances.value\": 1 + levels});\nawait this.effect.update({duration:{rounds: this.actor.system.characteristics.wp.bonus + duration}});","imKVsCy8rya2gkwO":"// Any Characteristic penalties due to failed Consume Alcohol Tests\n// or the state of being Stinking Drunk are eliminated.\nawait this.actor.removeSystemEffect(\"consumealcohol1\")\nawait this.actor.removeSystemEffect(\"consumealcohol2\")\nawait this.actor.removeSystemEffect(\"consumealcohol3\")\nawait this.actor.removeSystemEffect(\"stinkingdrunk1\")\n\n// The drinker is thereafter Fatigued\n// for a number of hours equal to 10 minus their Toughness Bonus —\n// nothing but time and rest can eliminate this penalty.\nawait this.actor.addCondition(\"fatigued\")\nconst duration = 10 - parseInt(this.actor.system.characteristics.t.bonus)\nthis.effect.updateSource({\"duration.rounds\" : duration});\nthis.script.message(`

${this.actor.prototypeToken.name} n'a plus de pénalités liées à l'alcool et gagne l'état Extenué pendant ${duration} heures.

`,\n{\n whisper: ChatMessage.getWhisperRecipients(\"GM\"),\n blind: true\n})","inPxRSx0CDj1nwAm":"if (args.test.result.fumble && !this.actor.itemTypes.talent.find(i => i.name == \"Magie des Arcanes (Feu)\"))\n{\n this.actor.addCondition(\"ablaze\");\n}","ioeTj5mx8jlA5EX5":"args.actor.addCondition(\"stunned\")","iphjuYnLhMMNXpGG":"this.actor.setWounds(0);\nthis.actor.addCondition(\"unconscious\");","ipkkRffJh61WE7zR":"if (!args.flags.amputatedFootOrLeg)\n{\n\targs.flags.amputatedFootOrLeg= true;\n\targs.fields.modifier -= 20;\n}","iqUvV1Vu81M3WyZ4":"let SL = Number(this.effect.sourceTest.result.SL);\nfor (let i=0; i 0 && (await this.script.dialog(\"Dépenser un Destin ?\")))\n{\n await this.actor.spend(\"system.status.fate.value\");\n this.script.message(\"Destin dépensé\");\n await this.actor.addCondition(\"stunned\");\n this.actor.update({\"system.status.corruption.value\" : this.actor.system.status.corruption.value + 1});\n}\nelse \n{\n this.actor.addCondition(\"dead\");\n}","iuSoKntfJ4eAPafQ":"let spells = await warhammer.utility.findAllItems(\"spell\", \"Chargement des Sorts\", true, [\"system.lore.value\"])\nspells = spells.filter(s => [\"fire\", \"heavens\", \"beasts\", \"shadow\", \"light\", \"life\", \"death\", \"metal\"].includes(s.system.lore.value)).sort((a, b) => a.system.lore.value > b.system.lore.value ? 1 : -1)\n\nlet choice = await ItemDialog.create(spells, 1, {text : \"Choisissez un Sort\", title : this.effect.name});\nif (choice[0])\n{\n this.actor.addEffectItems(choice.map(i => i.uuid), this.effect)\n}\n","iuYuf05BNuZ5fllI":"if (args.test.isFumble)\n{\n args.test.result.other.push(\"@Table[poisoned-wind-globe]\")\n}","iuoVkjFdL1rHdbqR":"return this.item.equipped.value && [\"weapon\", \"cast\"].includes(args.type)","ivxpmCKu3pEMG05c":"if (this.actor.inCombat)\n{\n\tthis.actor.characteristics.s.bonus += 2\t\t\n\tthis.actor.characteristics.s.calculationBonusModifier -= 2\n}","j1AmrY1SxFJQyapo":"if (this.actor.status.advantage.value > 0 && args.item.system.attackType)\n{\n args.item.system.qualities.value.push({name : \"penetrating\"})\n}","j3c6Y5aeA7nlFr9F":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.wBhPFggGqIXwbx1r\", // Alley Cat\n \"Compendium.wfrp4e-core.items.Item.q58lK4kULJZB5GjE\", // Rover\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","j3zDMWkns32Yrxn3":"this.effect.updateSource({\"flags.wfrp4e.ward\" : 9})","j6Bf1iivH8cqSnnK":"let target = args.data.targets[0]\nreturn target?.actor.hasCondition(\"prone\") || target.hasCondition(\"surprised\")","j98hvy6r9G2Vjmid":"if (args.totalWoundLoss > 0) \n{\n args.opposedTest.result.other.push(\n `@Corruption[minor]{Minor Exposure to Corruption}`\n )\n this.script.message(\n `${this.effect.name}: \n @Corruption[minor]{Minor Exposure to Corruption}
\n ${args.actor.prototypeToken.name} must take an \n Average (+20%) Corruption (Minor) Test`, \n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}","jC8o5PbnqEvOoZ9N":"this.actor.addCondition(\"poisoned\", 2)","jFKnf2UdoxAQx76R":"if (args.equipped)\n{ \n this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.URwIDtInCsxOoGqM\", this.effect);\n}\nelse \n{\n this.effect.deleteCreatedItems();\n}","jFwema0iwzBphxie":"let woundsGained = Math.min(args.actor.status.wounds.value, args.totalWoundLoss)\nwoundsGained = Math.ceil(woundsGained / 2)\n\nargs.attacker.update({\"system.status.wounds.value\" : args.attacker.system.status.wounds.value + woundsGained})\n\nargs.actor.addCondition(\"fatigued\")\nargs.attacker.hasCondition(\"fatigued\")?.delete();\n\nthis.script.message(`${args.attacker.prototypeToken.name} gains ${woundsGained} Wounds`);","jGDk7avWFSnyFoql":"let broken = this.actor.hasCondition(\"broken\");\nlet item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.IAWyzDfC286a9MPz\");\n\nif (broken && !broken.getFlag(\"wfrp4e\", \"blasted-mind\") && !this.actor.has(item.name))\n{\n await broken.delete();\n this.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id})\n this.script.notification(`Removed ${broken.name}, added ${item.name} (${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds)`)\n}","jHgxpe6TJDlP3oTn":"let spells = await warhammer.utility.findAllItems(\"spell\", \"Chargement des sorts\", true, [\"system.lore.value\"])\nspells = spells.filter(s => [\"slaanesh\"].includes(s.system.lore.value))\n\nlet choice = await ItemDialog.create(spells, 1, {text : \"Choisissez un Sort\", title : this.effect.name});\nif (choice[0])\n{\n this.item.updateSource({name : this.item.name + ` (${choice[0].name})`})\n this.actor.addEffectItems(choice.map(i => i.uuid), this.effect)\n}\n","jLsL4KRI6LEG9Ii2":"if (args.test.result.critical && ['rLeg', 'lLeg'].includes(args.test.result.hitloc.result))\n{\n args.test.result.critModifier = args.test.result.critModifier ? args.test.result.critModifier + 20 : 20\n args.test.result.critical += ` (+${args.test.result.critModifier})`\n}","jOCLEsjNzERyVLsP":"if(args.test.result.majormis)\n{\n args.test.result.nullmajormis = game.i18n.localize(\"ROLL.MajorMis\")\n args.test.minormis = game.i18n.localize(\"ROLL.MinorMis\")\n}","jOSCsBRUO117spv8":"args.abort = `Only gunpowder or artillery weapons can attack targets within the ${this.effect.name}`;","jObJanFoev4N6ZRv":"if (!args.sourceItem?.system?.isMagical)\n\targs.abort = `${this.effect.name}: Ignored`","jOm7RxGFm1y6mCpN":"return args.context.crewTest.name.includes(\"Batten Down\");","jRSgPhpfN7MH7TTp":"if (args.totalWoundLoss > 0)\n{\n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: \"1 Poisoned Condition Gained\", success: \"Resisted Poisoned Condition\" } })\n await test.roll();\n if (test.failed)\n { \n args.actor.addCondition(\"poisoned\");\n if (args.actor.system.status.wounds.value - args.totalWoundLoss <= 0)\n {\n args.actor.addCondition(\"unconscious\")\n }\n }\n}\n\n // else\n // this.actor.setupCharacteristic(\"t\", { context: { failure: \"1 @Condition[Poisoned] Condition Gained\", success: \"Resisted @Condition[Poisoned] Condition\" } }).then(testCallback)\n","jTgzivraRKrrCOjH":"let roll = await new Roll(\"1d10\").roll();\nroll.toMessage(this.script.getChatData());\nthis.effect.updateSource({duration: {value: roll.total, units: \"minutes\"}});","jW87rmQLtROdVEhW":" if ([\"orc\", \"ork\", \"goblin\", \"hobgoblin\", \"snotling\", \"greenskin\"].includes(args.opposedTest.defender.details.species.value.toLowerCase()))\n {\n args.addImpact = true\n args.opposedTest.result.other.push(\"Rune of Goblin Bane: Impact Ajouté\")\n }","jWkfoVpHLiRaHTza":"if (args.test.succeeded)\n{\n args.test.result.other.push(`${this.effect.name}: @Terror[1,${this.actor.prototypeToken.name}]`)\n}","jXbrIGxznqf1SNxZ":"const speaker = ChatMessage.getSpeaker({actor: this.actor});\n\nthis.script.message(`

${speaker.alias} is Immersed within a Sea Elemental and suffers from @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.WCivInLZrqEtZzF4#drowning-and-suffocation]{Suffocation}

They may attempt to escape by freeing themselves from the @Condition[Entangled} Condition as if they were @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.wmA76Q2zJJ9HrkvA#grappling]{Grappled} by the Sea Elemental, making an Opposed Strength Test against its Strength of 59.

`);","jYJRO5XPyG7y6fih":"await this.actor.addCondition(\"blinded\")\nawait this.actor.addCondition(\"deafened\")\nawait this.actor.addCondition(\"fatigued\")","jb1ouw0eIBVy3Wwg":"if (\n this.item == args.attackerTest.item\n && args.attackerTest.succeeded \n && args.defenderTest.item?.system?.attackType == 'melee'\n && (args.defenderTest.item.properties.qualities?.magical || args.defenderTest.item.properties.unusedQualities?.magical)\n) \n{\n args.opposedTest.result.other.push(`${this.effect.name}: destroys magical ${args.defenderTest.item.name}.`)\n}","jbZPLb4wuqJpHLUx":"this.item.system.flaws.value.push({name : \"dangerous\"})","jdS2u1tQPYeO55WI":"let type = this.item.getFlag(\"wfrp4e\", \"breath\");\n\nif (type == \"cold\")\n{\n\tlet stunned = Math.max(1, Math.trunc(args.totalWoundLoss / 5))\n\tawait args.actor.addCondition(\"stunned\", stunned);\n}\n\nif (type == \"corrosion\")\n{\n let damageItems = await foundry.applications.api.DialogV2.confirm({window: {title : this.item.name}, content : `

Endommage tous les objets portés ?

`})\n\tif (damageItems)\n\t{\n\t\tlet msg = ``\n\t\tlet weapons = args.actor.itemTypes.weapon.filter(i => i.isEquipped);\n\t\tlet armour = args.actor.itemTags.armour.filter(i => i.isEquipped);\n\t\tlet trappings = args.actor.itemTypes.trapping.filter(i => i.isEquipped);\n\t\tfor(let item of weapons)\n\t\t{\n\t\t\tif (item.system.properties.qualities.shield)\n\t\t\t{\n\t\t\t\tawait item.system.damageItem(1, \"shield\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tawait item.system.damageItem(1);\n\t\t\t}\n\t\t\tmsg += `

${item.name} endommagé de 1

`\n\t\t}\n\t\tfor(let item of armour)\n\t\t{\n\t\t\tawait item.system.damageItem(1);\n\t\t\tmsg += `

${item.name} endommagé de 1

`\n\t\t}\n\t\tfor(let item of trappings)\n\t\t{\n\t\t\tawait item.system.damageItem(1);\n\t\t\tmsg += `

${item.name} endommagé de 1

`\n\t\t}\n\t\tif (msg)\n\t\t{\n\t\t\tthis.script.message(msg, {speaker : {alias : args.actor.name}});\n\t\t}\n\t}\n}\n\nif (type == \"fire\")\n{\n\tawait args.actor.addCondition(\"ablaze\");\n}\n\nif (type == \"electricity\")\n{\n\tawait args.actor.addCondition(\"stunned\");\n}\n\nif (type == \"poison\")\n{\n\tawait args.actor.addCondition(\"poisoned\");\n}\n\nif (type == \"warpfire\")\n{\n\tawait this.actor.corruptionDialog(\"moderate\")\n\tthis.actor.applyEffect({effectUuids : this.item.effects.getName(\"Warpfire\").uuid})\n}","jfk5VDKMTIf4ee0v":"if (args.totalWoundLoss > 0)\n args.actor.addCondition(\"poisoned\")","jgO1Kf60Ctt6R0qO":"return args.item?.name != game.i18n.localize(\"NAME.Leadership\")","jmxlpyLrIuoxQtvU":" this.actor.getActiveTokens().forEach(t => t.document.update({texture : {scaleX : 2, scaleY: 2, src: \"modules/wfrp4e-core/tokens/popout/gor.webp\"}}));\n","jpcU8FFWSlQ3gD0L":"return !args.skill?.name?.includes(game.i18n.localize(\"NAME.Trade\"))","jrvj7bRyMBB9LixP":"this.actor.addCondition(\"fatigued\", 3)","jsgLEVYvMieyYT6L":"let tokenImg = \"\"; // Put path to token image here, inbetween the quotation marks\nif (tokenImg)\n{\n if (this.effect.getFlag(\"wfrp4e\", \"transformed\"))\n {\n await this.effect.setFlag(\"wfrp4e\", \"transformed\", false);\n this.actor.getActiveTokens().forEach(t => t.document.update({texture : {src: this.actor.prototypeToken.texture.src}}));\n }\n else\n {\n await this.effect.setFlag(\"wfrp4e\", \"transformed\", true);\n this.actor.getActiveTokens().forEach(t => t.document.update({texture : {src: tokenImg}}));\n }\n}\nelse\n{\n this.script.notification(\"Aucun chemin d'image de token configuré. Le chemin de l'image doit être défini dans la première ligne de ce script.\", \"error\");\n}","jt8vTQBoMOMUccEt":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nawait this.effect.update({duration:{rounds: this.actor.system.characteristics.i.bonus + excessSL}});","jvNuIbOtB46p0esq":"if (args.test.item?.system?.attackType == \"melee\")\n{\n\tif (parseInt(args.test.result.SL) < 0 || args.test.failed)\n\t{\n\t\tif (parseInt(args.test.result.SL) < 0)\n\t\t{\n\t\t\targs.test.result.SL = \"+0\";\n\t\t\targs.test.result.description = \"Succès marginal\";\n\t\t}\n\t\targs.test.result.outcome = \"success\"\n args.test.result.other.push(`${this.effect.name}: Minimum +0 SL`)\n\t}\n}","k0AkkBLtE8oZhBwn":"if (isNaN(parseInt(this.item.system.specification.value))) {\n let value = await ValueDialog.create({title : \"Valeur d'Armure\", text : \"Entrez la valeur d'Armure\"});\n if (value) {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","k1Wdehpgdc0hP63E":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.aE3pyW20Orvdjzj0\")\nlet hatred = item.toObject();\nhatred.system.specification.value = \"Skaven\"\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.3wCtgMDNnu8MFmyk\")\nlet immunity = item.toObject();\nimmunity.system.specification.value = \"Poison\"\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.oRx92ByVNEBN6YkK\")\nlet berserk = item.toObject();\nawait this.actor.createEmbeddedDocuments(\"Item\", [hatred, immunity, berserk], {fromEffect : this.effect.id})","k3FqFgsF6a3TkxAD":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\ntest.roll();\nreturn true;","k465TgRelwcSUdS2":"if (this.actor.has(\"Métier (Ingénieur)\", \"skill\"))\n{\n let aim = await this.actor.setupSkill(\"Métier (Ingénieur)\", {appendTitle : ` - Aim ${this.item.name}`});\n await aim.roll();\n let SL = Number(aim.result.SL);\n let context = {}\n if (SL < 0)\n {\n context.fields = {modifier : 10 * SL};\n context.initialTooltip = \"Échoué Métier (Ingénieur)\";\n }\n\n let fire = await this.actor.setupWeapon(this.item, context)\n fire.roll();\n}\nelse\n{\n this.script.notification(\"Cet acteur n'a pas le Métier (Ingénieur)!\", \"error\");\n}","k5792iKWEqKmVZMk":"return args.weapon || args.skill?.name === \"Esquive\";","k7J96MkvfX2GO6JS":"this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.system.status.corruption.value) + 1});\nthis.script.notification(\"Corruption ajoutée\");\nawait this.actor.addCondition(\"prone\");\nawait this.actor.addCondition(\"fatigued\");","k7ldJfyW201HgRFh":"args.item.system.qualities.value.push({name : \"magical\"});","k8TC0yzp4xfOXD2n":"if (args.totalWoundLoss > 0)\n{\n let test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\n await test.roll();\n if (test.failed)\n {\n\t args.actor.addCondition(\"stunned\");\n }\n\targs.actor.hasCondition(\"bleeding\")?.delete()\n}","k9SvH4Lm3ZuI8S1N":"return ![\"wp\", \"ag\", \"i\", \"int\"].includes(args.characteristic)","kBXVEnSWzaQZLkJH":"if(args.test.result.critical)\n{\n args.test.result.damage +=1 \n args.test.result.additionalDamage += 1\n}","kEaBLoIHt1FpQVKq":"if (this.actor.system.details.experience.current < 100) {\n return this.script.notification(game.i18n.localize(\"SCRIPT.NotEnoughXP\"))\n}\n\nlet item = await game.wfrp4e.utility.findItem(\"Invisibility\", \"trait\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item]);\nlet expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);\nexpLog.push({amount : 100, reason: item.name, spent: this.actor.details.experience.spent + 100, total: this.actor.details.experience.total, type: \"spent\"});\nthis.actor.update({\n \"system.details.experience.spent\": this.actor.details.experience.spent + 100,\n \"system.details.experience.log\": expLog\n });","kIM4Fs1lFVV7TSnj":"this.actor.modifyAdvantage(1);","kMSdRskYDI2J1gnp":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"average\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll(); \nif (test.failed)\n{\n this.actor.addCondition(\"prone\");\n}\n ","kUyVy3bfEZAGTeru":"args.modifiers.ap.ignored += 1\nargs.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignore AP (1)\");","kWHKp2tw3HzkgWCy":"let duration = await new Roll(\"1d10\").roll();\nduration.toMessage(this.script.getChatData());\nthis.effect.updateSource({duration: {value: duration.total, units: \"hours\"}});","kWynO1lQzjiSs8RK":"return args.skill?.name != game.i18n.localize(\"NAME.Haggle\");","kY50G53IXdNXX9Sc":"for(let e of this.item.effects)\n{\n if (e.name.toLowerCase().includes(\"rune\") && e.system.transferData.type == \"aura\" && e.system.transferData.area.radius == \"6\")\n {\n e.system.transferData.area.radius = \"12\"\n }\n}","kYTEqcs8JpO2OmB9":"if (args.equipped)\n await this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.Bvd2aZ0gQUXHfCTh\", this.effect, {\"system.specification.value\": \"10\"});\nelse\n await this.effect.deleteCreatedItems()","kYiDBPRKIokFkr4Z":"if (args.item.type == \"skill\" && args.item.name == `${game.i18n.localize(\"NAME.Ranged\")} (${game.i18n.localize(\"SPEC.Bow\")})`)\n{\n args.item.system.modifier.value += 20;\n}","kYmscP2HuXjDovBD":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"))\n","kb2pwRZAjbUbZwcz":"if (args.actor.has(\"Bestial\")) \n{\n this.script.notification(`${args.actor.prototypeToken.name} doit réussir un test de Volonté Difficile (-10) pour attaquer cette cible !`); \n}\n\nreturn true; // No need to show this in the dialog","kbXDGAmWWD4CZJHB":"const sin = this.effect.sourceActor.system.status.sin.value;\nconst roll = new Roll(`2d10 - ${sin}`);\nawait roll.evaluate();\nawait roll.toMessage({flavor: `${this.effect.name}`});\nthis.actor.system.status.mood.addEntry(`${this.effect.name} (${this.effect.sourceActor.name})`, roll.total);","kbh9urTsUcLiwMLH":"return !this.actor.attacker || !this.item.properties.qualities.defensive","kiJ6AiaYVUjt6aV6":"teeth = await fromUuid(\"Compendium.wfrp4e-core.items.fBcZhOBn8IpoVqQ1\")\nteeth = teeth.toObject();\n\nlet roll = await new Roll(\"1d10\").roll({allowInteractive : false});\nroll.toMessage(this.script.getChatData({flavor : \"Dents perdues\"}))\nteeth.system.location.value = `${roll.total} ${teeth.system.location.value}`\nthis.actor.createEmbeddedDocuments(\"Item\", [teeth])","kiolpXGbkmxfPiuI":"let test = this.actor.attacker?.test\nif (test && this.item.system.protects[test.result.hitloc.result] && test.result.critical)\n{\n this.script.message(`${this.item.name}: Blocked Critical Hit`)\n}","kkC5EhqA05U6U0gU":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\n// Kind of insane but whatever\nlet opposedResult = test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result\n\nif (opposedResult?.winner == \"attacker\")\n{\n if (opposedResult.differenceSL < 6)\n {\n this.actor.addCondition(\"fatigued\", Math.floor(opposedResult.differenceSL / 2))\n }\n else if (opposedResult.differenceSL >= 6)\n {\n this.actor.addCondition(\"broken\");\n }\n}","kmsGLWGxCY8Z8jVG":"return args.skill?.name != game.i18n.localize(\"NAME.Intuition\");","knq8lNYLw0v757dQ":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.9fq6p9Q6H02LjaSi\")\nlet data = item.toObject();\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});","knxDGP1YLbnPk03o":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Athletics\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\");\n}","kvaN100w0nBUlLbj":"let poisoned = this.actor.hasCondition(\"poisoned\")\nif (poisoned)\n{\n this.script.message(\"Immunisé à l'empoisonnement\")\n poisoned.delete()\n}","kvnZz8yqdTZbErkr":"args.actor.system.details.move.value -= 2;\nargs.actor.system.details.man -= 1;\nargs.actor.system.status.carries.max *= 1.5;","kvqJbHBvFr6iGLcI":"this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.3wCtgMDNnu8MFmyk\",null,[{\"system.specification.value\":\"Poison\"}])","l1ntrpa8RE3Lg5xE":"return args.skill?.name === game.i18n.localize(\"NAME.Perception\");","l8qFKSnMpy4P7XQR":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"));","lCOdnKz8XpnkDs6Q":"let test = await this.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();","lDIWlQvD6MGyP3QP":"return this.effect.sourceActor.effects.filter(i => i.isCondition).length > 0","lDfPgVtZf3ULFPjU":"let locs = Object.keys(this.actor.system.status.armour);\n\nlet location = locs[Math.floor(CONFIG.Dice.randomUniform() * (locs.length))];\n\nlet roll = await new Roll(\"1d10 * 5\").roll();\nroll.toMessage(this.script.getChatData({flavor: \"Modifier\"}));\n\ngame.wfrp4e.tables.formatChatRoll(`crit${location}`, {criticalLocation: location, modifier: roll.total, showRoll: true});","lFO6XdfUODmFArqx":"args.actor.addCondition(\"bleeding\")","lG5lfAzNuM4t0rpM":"return args.skill?.name === \"Esquive\";","lII4KMRblqwFBlsV":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 0,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : 10,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 20,\n \"wp\" : 10,\n \"fel\" : 15\n}\nlet skills = [\"Focalisation\", \"Charme\", \"Représentation (Danse)\"]\nlet skillAdvancements = [0, 6, 3]\nlet talents = [\"Attirant\", \"Distraire\", \"Imitation\"]\nlet traits = [\"Perturbant\", \"Flight (6)\", \"Spellcaster (Petty)\"]\nlet trappings = []\nlet items = [];\nlet spells = [\"Feux follets\", \"Sommeil\"];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nconst traitRegex = /(?:,?(.+?)(\\+?\\d{1,2}\\+?)?\\s*?(?:\\((.+?)\\)\\s*(\\+?\\d{1,2})?|,|$))/gm\nfor (let trait of traits)\n{\n let traitMatches = trait.matchAll(traitRegex).next().value\n let traitName = traitMatches[1]\n let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there's a specialization\n let traitSpec = traitMatches[3]\n\n let traitItem;\n try {\n traitItem = await WFRP_Utility.findItem(traitName, \"trait\")\n }\n catch { }\n if (!traitItem) {\n ui.notifications.warn(`Impossible de trouver ${trait}`, {permanent : true})\n }\n traitItem = traitItem.toObject()\n\n if (Number.isNumeric(traitVal))\n {\n traitItem.system.specification.value = traitName.includes('Arme','Cornes','Tail','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;\n traitItem.name = (traitItem.name + ` ${traitSpec ? \"(\"+ traitSpec + \")\" : \"\"}`).trim()\n }\n else\n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells)\n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","lMRsQRgjMexY9dxE":"return [\"NAME.Résistance\", \"NAME.Cool\"].map(i => game.i18n.localize(i)).includes(args.skill?.name)","lOIHiAIDtj91kllN":"const chanties = await warhammer.utility.findAllItems('wfrp4e-soc.chanty', \"Loading Chanties\", true);\nlet choice = await ItemDialog.create(chanties, 1, {text : \"Choisissez un Chant\", title : this.effect.name});\nif (choice.length) \n{\n this.actor.addEffectItems(choice.map(i => i.uuid), this.effect)\n}","lOzkngzye4RmvALp":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.DrNUTPeodEgpWTnT\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id});\nthis.script.notification(\"Added \" + item.name)","lPudo1grrVp05i7a":"let loc = Math.floor(CONFIG.Dice.randomUniform() * 2) == 0 ? \"head\" : \"body\"\nlet damage = this.actor.system.characteristics.s.bonus + 6\n\n this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name}).then(async test => {\n await test.roll();\n if(test.failed)\n {\n await this.actor.addCondition(\"stunned\")\n this.script.message(await this.actor.applyBasicDamage(damage, {loc, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}))\n }\n })","lQJ68n3y1xDyNicE":"return !args.context.sizeModifier && args.item?.system?.attackType != \"ranged\"","lQOu46YmOiQNhCZR":"const balanced = game.i18n.localize(\"WFRP4E.YenluiBalanced\");\nconst light = game.i18n.localize(\"WFRP4E.YenluiLight\");\nconst dark = game.i18n.localize(\"WFRP4E.YenluiDark\");\n\nlet newName;\n\nif (this.effect.name === game.i18n.localize(\"WFRP4E.YenluiBalanced\")) {\n newName = game.i18n.localize(\"WFRP4E.YenluiDark\");\n newDescription = game.i18n.localize(\"WFRP4E.YenluiDarkDesc\");\n} else if (this.effect.name === game.i18n.localize(\"WFRP4E.YenluiLight\")) {\n newName = game.i18n.localize(\"WFRP4E.YenluiBalanced\");\n newDescription = game.i18n.localize(\"WFRP4E.YenluiBalancedDesc\");\n}\n\nif (newName) {\n await this.effect.update({name: newName});\n await this.item.update({name: newName, \"system.description.value\": newDescription});\n}","lRZhkh8pcu93QTKz":"if (args.test.spell)\n{\n\targs.test.preData.SL = -10\n}","lSOAZ4FG44bT4jh1":"let infected = await fromUuid(\"Compendium.wfrp4e-core.items.V0c3qBU1CMm8bmsW\")\nlet fear = await fromUuid(\"Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn\")\n\nlet infectedData = infected.toObject();\nlet fearData = fear.toObject();\nfearData.system.specification.value = 2;\nthis.actor.createEmbeddedDocuments(\"Item\", [fearData, infectedData], {fromEffect : this.effect.id})","lU4s3UTtBkU38djI":"this.actor.addCondition(\"entangled\")\nlet msg = `${this.actor.prototypeToken.name} loses 1 Wound and gains 1 Entangled Condition.`\nthis.script.message(msg)\nthis.actor.modifyWounds(-1)","lUcx8NUadgq3oFTY":"if (this.item.attackType == \"melee\" && !this.item.system.properties.qualities.fast) this.item.system.qualities.value.push({name : 'fast'})","lYYkGzqNshiYc7WI":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"poisoned\")\n}","lZuavewrJzOehrJQ":"let test = await this.actor.setupSkill('Résistance', {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'easy'},\n characteristic: 't',\n context: {failure: \"Mast shattered!\"}\n});\nawait test.roll();\n\nif (test.failed) {\n let crit = await fromUuid(\"Item.d4bCnR1zINTNF9VC\");\n await this.actor.createEmbeddedDocuments(\"Item\", [crit]);\n this.effect.update({disabled: true});\n}","laWHBP2jLrVxcgp9":"this.script.message(await this.actor.applyBasicDamage(2, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true}))","laptAldsT0Fm1rDt":"let blunt = await foundry.applications.api.DialogV2.confirm({window: {title : this.effect.name}, content :`

Appliquer la réduction des dégâts contondants ? (-3)

`})\n\nif (blunt)\n{\n args.modifiers.other.push({label : this.effect.name, details : \"Réduction des Dégâts Contondants\", value : -3})\n}","lbcIoWiXgY07OJpi":"let wounds = this.effect.sourceActor.system.characteristics.wp.bonus * (1 + (Math.floor(this.effect.sourceTest?.result.slOver / 3) || 0));\nthis.actor.modifyWounds(wounds);\nthis.script.message(`Healed ${wounds} Wounds`);","lhemR8EP5tGNKout":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields: {difficulty : \"average\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure : \"Suffer Creeping Irrationality\"}})\nawait test.roll();\nif (test.failed)\n{\n msg = `

@UUID[${this.effect.sourceItem.uuid}]{Creeping Irratitonality} Roll: ${Math.ceil(CONFIG.Dice.randomUniform() * 10)}

`\n if (test.result.roll % 11 == 0 || test.result.roll == 100)\n {\n msg += `

${this.actor.prototypeToken.name} also gained 1 Corruption Point. If mutating, this results in a @Table[mutatemental]{Mental Corruption}

`\n let newCorruption = Number(this.actor.status.corruption.value) + 1\n this.actor.update({\"system.status.corruption.value\" : newCorruption})\n }\n\n this.script.message(msg);\n}\n","lj7vOpa6tHHZ9bBB":"return this.actor.attacker","ljGX2w8hCTyLAjRp":"let specification = Number(this.item.specification.value) || 1;\nargs.actor.system.details.price.gc -= Math.floor(args.actor.system.details.price.gc * 0.1 * specification);","ljpM7muMyxGD04EX":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","lmBAZCtofsC8hHHG":"let SL = 1;\n\ndo {\n const signedSL = SL >= 0 ? `+${SL}` : \"SL\";\n const content = `\n
\n

Vous avez augmenté ${signedSL} ${SL > 1 ? \"DRs\" : \"SL\"}. Voulez-vous lancer un d10 ?

\n

1–6: ajoutez +1 DR

\n

7–10: perdez tous les DR accumulés et effectuez le test suivant à –1 DR

\n
\n`;\n const choice = await foundry.applications.api.DialogV2.confirm({\n yes: {label: \"Lancer\", icon: \"fas fa-dice\"},\n no: {label: `Keep ${signedSL} DR`, icon: \"fas fa-check\"},\n content,\n });\n\n if (!choice) break;\n\n const roll = new Roll(\"1d10\");\n await roll.toMessage({flavor: this.effect.name});\n\n if (roll.total >= 7) {\n SL = -1;\n break;\n }\n\n SL++;\n} while (true);\n\nthis.effect.setFlag(\"wfrp4e\", \"SL\", SL);","lol5J6h0pErzM71s":"return args.weapon?.system.properties.flaws.crewed","luEuwzYCUrch58Bp":"if (args.opposedTest.attackerTest.options?.grudge) {\n args.modifiers.other.push({label : this.effect.name, details : \"Augmentation des Dégâts\", value : 1}) \n}","lvjcddwRiN9iGruy":"let test = await this.actor.setupCharacteristic(\"t\", { appendTitle: ` - ${this.effect.name}`, fields: { difficulty: \"challenging\" } })\nawait test.roll();\n\nif (test.failed)\n{\n let ageAdded = Math.ceil(CONFIG.Dice.randomUniform() * 10) + Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let ws = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let bs = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let s = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let t = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let ag = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let dex = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n\n let currentAge = parseInt(this.actor.system.details.age.value)\n\n let inline = `@ROLL`\n let msg =\n `

${this.actor.prototypeToken.name} ages by ${inline.replace(\"@ROLL\", ageAdded).replace(\"@TT\", \"2d10\")} and loses

\n

${inline.replace(\"@ROLL\", ws).replace(\"@TT\", \"1d10\")} Compétence de Combat

\n

${inline.replace(\"@ROLL\", bs).replace(\"@TT\", \"1d10\")} Compétence de Tir

\n

${inline.replace(\"@ROLL\", s).replace(\"@TT\", \"1d10\")} Force

\n

${inline.replace(\"@ROLL\", t).replace(\"@TT\", \"1d10\")} Endurance

\n

${inline.replace(\"@ROLL\", ag).replace(\"@TT\", \"1d10\")} Agilité

\n

${inline.replace(\"@ROLL\", dex).replace(\"@TT\", \"1d10\")} Dextérité

\n `\n this.script.message(msg);\n\n let characteristics = foundry.utils.duplicate(this.actor.system.characteristics)\n\n characteristics.ws.initial -= ws\n characteristics.bs.initial -= bs\n characteristics.s.initial -= s\n characteristics.t.initial -= t\n characteristics.ag.initial -= ag\n characteristics.dex.initial -= dex\n\n this.actor.update({ \"system.characteristics\": characteristics, \"data.details.age.value\": ageAdded + currentAge })\n}","lwVhn4bSXJ3eoT9q":"if (this.item.system.weaponGroup.value == \"basic\")\n{\n let slash = this.item.system.qualities.value.find(i => i.name == \"slash\")\n if (slash)\n {\n slash.value = \"2A\"\n }\n}","m3qEVO5fseV6KHXa":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.qn4ZpvTQIX4rcJDl\")\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","m4eagTrVOXtotonR":"// Get the size\nlet size = this.actor.sizeNum \nlet diff = \"difficult\";\nif (size < 5) { // 5 = Monstrous\n diff = \"hard\";\n}\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : diff}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed) {\n this.actor.addSystemEffect(\"fear\")\n}","m58MpMZBblpq5LJu":"args.fields.slBonus++;\nargs.fields.successBonus++;\n","m84kG5cEPEByqHdd":"const uuid = \"Compendium.wfrp4e-core.items.Item.SfUUdOGjdYpr3KSR\";\nconst item = await fromUuid(uuid);\nawait this.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect: this.effect.id});","m8qBlbH7ROoqa22o":"return args.context.reload","mBcLf11upaHS8AQq":"this.actor.status.addArmour(1, {source: this.effect})","mGHKBkDp4omSaBlD":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 20,\n \"bright\": 10,\n \"angle\": 360,\n \"alpha\": 0.4,\n \"animation\": {\n \"speed\": 3,\n \"intensity\": 3,\n \"type\": \"torch\",\n },\n \"color\": \"#ffcc66\",\n }}));","mJ9eMPub4epJSf00":"return args.weapon?.system.qualities.value.find(i => i.name == \"shield\") && this.actor.attacker","mPxmCsXYirAIT913":"let key = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.characteristics, this.effect.img), 1, \"Choisir la Caractéristique\");\n\nthis.effect.updateSource({changes : [{key : `system.characteristics.${key[0].id}.modifier`, mode : 2, value : 10}]})","mRvLsSVxNyt8LVZb":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.GRRN3XAKIpEVCY7z\")\nlet data = item.toObject();\ndata.name += \" (Au choix)\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","mT7PDcjF3cJTDbjR":"args.actor.system.details.move.value -= 1;\nargs.actor.system.status.carries.max *= 1.25;","mTnmPcjWmvScIBWY":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) || args.type == \"channelling\"","mV4Tmc0yfpL09KV7":"args.actor.addCondition(\"entangled\")","mXvtf3qhJjshpopX":"return [\"weapon\", \"cast\", \"channelling\"].includes(args.type)","mYL4i1vNlMl4vFYy":"return args.skill?.name != game.i18n.localize(\"NAME.Perception\") && args.skill?.name != game.i18n.localize(\"NAME.Track\");","ma0sWhebqwdRHWvY":"if (!args.flags.trained)\n{\n args.flags.trained = true;\n args.fields.modifier += 10;\n}","maKr58mvvyKxFyC3":"if (args.item.type == \"prayer\" && (args.item.damage.value || args.item.damage.dice))\n args.item.damage.value += \"+1\"","masOBNgSi5HYkf3m":"return args.type != \"cast\" && args.type != \"channelling\"","mgLGN1XPzPE4dReN":"args.fields.slBonus--;","mlulnXQo8XU8vKLD":"if (isNaN(parseInt(this.item.system.specification.value)))\n{\n let value = await ValueDialog.create({text : \"Entrer la valeur\", title : this.effect.name});\n if (value)\n {\n this.item.updateSource({\"system.specification.value\" : value});\n }\n}","mnvczEiu7gUSWvuV":"if (args.test.options.flags.skewering)\n{\n args.test.result.tables.critical = {\n label : \"Critique (si attaque réussie)\",\n class : \"critical-roll\",\n modifier : args.test.result.critModifier || 0,\n key: `crit${args.test.result.hitloc.result}`\n\n }\n}","mr8qm5Bg6k1idZ6Q":"return args.item?.name == `${game.i18n.localize(\"NAME.Play\")} (${game.i18n.localize(\"SPEC.Lute\")})`","mujAsg7US4R7eXhv":"if (args.skill?.name == game.i18n.localize(\"NAME.Pray\") || args.prayer)\n{\n args.abort = true;\n this.script.notification(\"Impossible d'effectuer des Tests de Prière !\")\n}\n\nreturn true;","mziJBUYcsrhkdcCJ":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{ \n this.actor.addCondition(\"prone\")\n}","n3bUmtYaVljPdcJW":"let roll = await new Roll(\"1d10 + @sin\", {sin: this.actor.system.status.sin.value || 0}).roll();\nroll.toMessage(this.script.getChatData());\n\nlet skills = await ItemDialog.create(this.actor.itemTypes.skill, \"unlimited\", {text: \"Select penalized Skills\", title: this.effect.name})\nlet names = skills?.map(i => i.name) || [];\nthis.effect.updateSource({name: this.effect.setSpecifier(names.join(\", \")), \"flags.wfrp4e.skills\" : names, duration: {\n value: roll.total,\n units: \"days\"\n}});","n5RJqJL9fdRIxkuN":"if (this.actor.system.status.advantage.value > 0)\n{\n await this.actor.modifyAdvantage(-1);\n this.script.notification(\"Avantage retiré\")\n}\nelse \n{\n return this.script.notification(\"Avantage retiré\", \"error\")\n}\n\nlet test = await this.actor.setupTrait(this.item)\nawait test.roll();","n5wowuDE8Dz1uBZn":"let damage = this.effect.sourceActor.characteristics.int.bonus + 6;\nif (this.actor.has(game.i18n.localize(\"NAME.Mort-vivant\")) || this.actor.has(game.i18n.localize(\"NAME.Démoniaque\"))) { \n damage += 6\n}\nthis.script.scriptMessage(await this.actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg: true}));\n\nlet test = await this.actor.setupCharacteristic(\"int\", {fields : {difficulty : \"average\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed) {\n\tthis.actor.addCondition(\"stunned\");\n}","n8X4Vgmrs4M5pyHK":"return !this.actor.isOpposing || this.actor.attacker.test.item.attackType != \"melee\" || !this.item.equipped.value","n99CqhPx3uABCU15":"if (args.test.result.critical && args.test.preData.reversal.allowed)\n{\n args.test.result.other.push(`${this.effect.name}: can reverse Critical Hit roll`)\n}","nCWAflBj7Si2BI1Q":"if (args.item.type == \"spell\" && args.item.system.lore.value != \"petty\")\n{\n args.item.cn.value = Math.max(4, args.item.cn.value * 2)\n}","nCfWscZucItTYObJ":"if (args.item.type == \"ammunition\")\n{ \n args.item.system.damage.value += \" + 1\"\n}","nD2QVg3DrPK3foMf":"args.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), { fields: { difficulty: \"average\" } }).then(async test => {\n await test.roll();\n if (test.failed) {\n await args.actor.addCondition(\"bleeding\")\n await args.actor.addCondition(\"entangled\")\n }\n })","nEaF3jbCiVYD8jia":"return args.skill?.name != game.i18n.localize(\"NAME.Charm\") && !args.skill?.name.includes(game.i18n.localize(\"NAME.Lore\"));","nGTxNWBUBgTr87wU":"if (args.opposedTest.result.differenceSL >= 0 && args.opposedTest.result.differenceSL <= 2 && args.opposedTest.result.winner == \"attacker\")\n{ \n this.script.message(`Becomes lodged in the armour or flesh of the opponent. See @UUID[${this.item.uuid}]{${this.item.name}}.`, {speaker : {alias : this.item.name}, blind: true, whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}\n ","nHJdlqbOP0ECgywb":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.CnydL8p3PVAuF98w\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","nIOeK0BrtdZeZW8X":"console.log(\"SKILL\", this)\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {fields : {difficulty : \"challenging\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nlet rollD10 = await new Roll(\"1d10\").roll()\nrollD10.toMessage(this.script.getChatData())\n\n\nif (test.succeeded)\n{\n //...\n}\nelse if (test.failed)\n{\n //...\n}\n","nNwAFEURKlFhPcvA":"CorruptionMessageModel.createCorruptionMessage(\"minor\", this.script.getChatData());","nSXzktHyNjGUXjaw":"return args.item?.system.isRanged","nYtAjSArsNbrU2ob":"if ([\"ag\", \"i\", \"int\"].includes(args.characteristic))\n{\n args.fields.modifier -= 10;\n}\nelse if ([\"wp\"].includes(args.characteristic))\n{\n args.fields.modifier += 10;\n}","nZtN0zM49xTuG86V":"if (this.actor.system.status.advantage.value >= 2)\n{\n await this.actor.modifyAdvantage(-2);\n this.script.notification(\"Avantage retiré\")\n}\nelse \n{\n return this.script.notification(\"Avantage retiré\", \"error\")\n}\n\nlet test = await this.actor.setupTrait(this.item)\nawait test.roll();","naF5EWr1CBkYRZTK":"if (args.opposedTest?.attackerTest?.item?.system?.isRanged)\n{\n let choice = await foundry.applications.api.DialogV2.confirm({window: {title : this.item.name}, content : `

Annuler les dégâts avec ${this.effect.name}?

`})\n\n if (choice)\n {\n args.abort = `${this.effect.name}: Dégats annulés.`;\n }\n}","ncIjDE6TFx88IQA1":"return args.skill?.name == game.i18n.localize(\"NAME.Climb\") || args.skill?.name == game.i18n.localize(\"NAME.Athletics\");","neaaVy6D6tfcst5P":"args.fields.slBonus += this.actor.characteristics.i.bonus;\n","ngMm7SgtVqVovFJG":"if (args.test.result.critical && args.test.result.critical != \"Total Power\")\n{\n args.test.result.other.push(` Bonecrusher Critical (+20) (only if Critical Cast selected)`)\n}","njPP9wDAsdh4WHIj":"if (args.totalWoundLoss > 0 && [\"trait\", \"weapon\"].includes(args.sourceItem?.type))\n{\n this.script.message(`Infecté : ${args.actor.name} doit réussir un test de Résistance Facile (+40) ou gagner une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Plaie Purulente}`, {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}","njmMhHf9qjPBCcNn":"args.targets.slBonus -= 3;","nkSmu7v9WiAaK4vq":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Tailor)';\nconst difficulty = 'easy';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n \n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","nkbTnaeBpthyhw4J":"let fortunePoints = this.effect.sourceTest.result.overcast.usage.other.current\nlet current = this.actor.status.fortune.value\n\nthis.actor.update({\"system.status.fortune.value\" : fortunePoints + current})\n\nthis.script.message(`${this.actor.prototypeToken.name} fortune points increased from ${current} to ${fortunePoints + current}`)","nkdKBJ8ItqWiRAWL":"// Apply changes when the mask is worn\n\nif (args.equipped) {\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [this.item.effects.contents[1]?.convertToApplied()])\n this.script.message(`${this.actor.name} porte le ${this.item.name}.
\n Ils gagnent +50 aux tests de natation et peuvent respirer sous l'eau.
\n S'ils portent le masque pendant plus d'une heure ou bénéficient de l'un de ses effets, ils sont exposés à @Corruption[moderate]{Corruption modérée}.\n `,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n\n// Notify of lingering effects when mask is Retiré\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Usagé)\"})\n this.script.message(`${this.item.name} sur ${this.actor.name} a été retiré et perd ses propriétés. Cependant, les effets durent [[1d10+4]] jours, après quoi ils doivent être manuellement retirés.`,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n )\n\n}\n","nlQA0shW8FCXjY7u":"return args.type != \"cast\" || args.item.lore.value != \"fire\"","nlSJDfv4N9hrncHW":"this.actor.addCondition(\"stunned\");","nqWu0ZplxzRiUEAg":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\n// Kind of insane but whatever\nlet opposedResult = test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result\n\nreturn opposedResult?.winner == \"attacker\";","nuIpPD4uaZRuJni8":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.qdMbxW09FUoYBzmB\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","nvrFhHHVq3KzirlR":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Stealth\"))\n","nvrT2HhsiGSycaff":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nlet damage = 10;\ndamage += excessSL;\nawait this.actor.applyDamage(damage, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP,\n loc: \"roll\",\n createMessage: this.script.getChatData(),\n});\nawait this.actor.addCondition('deafened', 2);","nxNqWmmF6mJTnrLo":"return args.weapon?.system.usesHands.includes(this.item.system.location.key);","nzh8d46l1ikhkz8Q":"return (args.type == \"weapon\" && (args.item.system.weaponGroup.value == \"blackpowder\" || args.item.system.weaponGroup.value == \"engineering\")) || (args.type == \"cast\" && args.item.system.lore.value == \"fire\")","o0dJxmnrWAZVkGKM":"if (args.opposedTest.attackerTest.weapon.attackType == \"ranged\" && args.opposedTest.defenderTest.weapon?.id == this.item.id)\n {\n args.modifiers.ap.shield += 2;\n }","o1zD8mej9TWKNxUq":"args.fields.slBonus -= 1;","o2QhtiLAmUEpDgBX":"return args.skill?.name != \"Voile (Aéronavale)\"","o3JUBKLvE6bBxK2n":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), { fields: { difficulty: \"average\" } })\nawait test.roll();\nif (test.failed) \n{\n await this.actor.addCondition(\"prone\")\n let injury = await fromUuid(\"Compendium.wfrp4e-core.items.ZhMADOqoo0y8Q9bx\");\n injury = injury.toObject()\n let toes = Math.clamp(Math.abs(test.result.SL) + 1, 1, 5)\n injury.system.location.key = this.item.system.location.key[0] + injury.system.location.value\n if (injury.system.location.key[0] == \"r\")\n {\n injury.system.location.value = `${toes} Right ${injury.system.location.value}s`\n }\n else if (injury.system.location.key[0] == \"l\")\n {\n injury.system.location.value = `${toes} Left ${injury.system.location.value}s`\n }\n foundry.utils.setProperty(injury, \"system.wfrp4e.count\", toes)\n this.actor.createEmbeddedDocuments(\"Item\", [injury])\n}","o478K0vsLGzY8YTK":"return args.context.dispel","o88xuUConwt0vFLw":"let points = this.effect.sourceTest.result.overcast.usage.other.current;\n\nthis.actor.update({\"system.status.fortune.value\" : this.actor.system.status.fortune.value + points});\n\nthis.script.message(`Gained ${points} Fortune Points`)","oA197GIqHpU5WR9V":"if (args.test.options.corruption || args.test.options.mutation)\n{ \n args.test.preData.canReverse = true;\n}","oDNfCNyt5KaUYmg2":"if(args.opposedTest.result.winner == \"defender\")\n{\n let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n let msg = `Rolled ${roll}.`\n if (roll >= 7)\n {\n msg = `Attack hits with an SL of ${roll - 6}.`\n }\n this.script.message(msg, {blind: true, whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","oEsUsI74yGTZ9CwU":"return args.item?.name == game.i18n.localize(\"NAME.CharmAnimal\")","oGdsGPgJWcyWkiWl":"this.actor.addCondition(\"broken\")\n\nif (this.actor.has(game.i18n.localize(\"NAME.Undead\")))\n{\n this.script.message(await this.actor.applyBasicDamage(this.effect.sourceTest.result.damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true}))\n}","oHenUKtaS3jT5xQn":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.4xF7M6ylIiGntekh\")\nitem = item.toObject()\nitem.name = this.effect.name\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})\n","oHmtdXWVwm7y7BtO":"args.fields.difficulty = \"hard\";","oPg4se8iQRD14kmB":"let filters = [\n {\n property : \"type\",\n value : \"weapon\"\n },\n {\n property : \"system.weaponGroup.value\",\n value : [\"twohanded\", \"polearm\"]\n }\n]\n\nlet items = await ItemDialog.createFromFilters(filters, 1, {text : \"Choisissez une arme d'hast ou une arme à deux mains appropriée\"})\nitems = items.map(i => i.toObject())\n\nitems.forEach(i => i.system.equipped.value = true);\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","oQI06eh8mJ9UqETO":"if (this.item.system.disabled) {\n await this.effect.deleteCreatedItems();\n} else if (!this.actor.items.find(i => i.name === \"Furtif\")) {\n await this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.OzwDT6kzoLYeeR2d\", this.effect);\n}","oTXPA6rbPnYOKNmo":"let characteristics = {\n \"ws\" : 35,\n \"bs\" : 10,\n \"s\" : 25,\n \"t\" : 30,\n \"i\" : 30,\n \"ag\" : 25,\n \"dex\" : 0,\n \"int\" : 15,\n \"wp\" : 35,\n \"fel\" : 15\n}\nlet skills = [\"Calme\", \"Esquive\", \"Intimidation\", \"Intuition\", \"Langue (Battle)\", \"Commandement\" , \"Savoir (Guerre)\", \"Perception\"]\nlet skillAdvancements = [25, 15, 25, 25, 15, 30, 20, 20]\n\nlet talents = [\"Vigilance\", \"Maîtrise du combat\", \"Combat Instinctif\", \"Inspiring\", \"Chance\", \"Déterminé\", \"Inébranlable\", \"Seigneur de guerre\"]\nlet trappings = [\"Arme simple\", \"Bouclier\", \"Plastron d'acier\", \"Brassards\", \"Heaume\", \"Jambières d'acier\"]\nlet specialItems = [\n {name: \"Two Handed Weapon\", type: \"trapping\", trappingType: \"clothingAccessories\" },\n]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nlet filters = [\n {\n property : \"type\",\n value : \"weapon\"\n },\n {\n property : \"system.weaponGroup.value\",\n value : [\"twohanded\", \"polearm\"]\n }\n]\n\nitems = items.concat(await ItemDialog.createFromFilters(filters, 1, {text: \"Choisissez une arme d'hast ou une arme à deux mains appropriée\"}))\n\nlet ride = await foundry.applications.api.DialogV2.confirm({window : {title : \"Compétence\"}, content : \"Ajouter Chaos Steed et +20 Conduite (Cheval) ?\"})\n\nif (ride)\n{\n let skill = await game.wfrp4e.utility.findSkill(\"Chevaucher (Cheval)\")\n skill = skill.toObject();\n skill.system.advances.value = 20;\n items = items.concat({name : \"Chaos Steed\", type: \"trapping\", \"system.trappingType.value\" : \"misc\"}, skill)\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(\">>>>>>><\", items)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","oV81zgbZsuTFG6L2":"let caster = this.effect.sourceActor;\n\nthis.actor.modifyWounds(caster.system.characteristics.fel.bonus);\n\nthis.script.message(`Healed ${caster.system.characteristics.fel.bonus} Wounds`);","oW1gtYVT5nrxDjM7":"return args.characteristic != \"ag\"","oWM43EdUiyHgUlfW":"if (args.test.item && args.test.item.name == game.i18n.localize(\"NAME.ConsumeAlcohol\"))\n args.test.preData.reversal = {allowed : true, if: \"success\"};\n","oWa7RkScnl6lR5vd":"if (args.test.characteristicKey == \"wp\")\n{\n if (args.test.failed)\n {\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP\")\n let data = item.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [data])\n\n this.script.message(`Test de FM échoué, ${this.actor.prototypeToken.name} gain de @UUID[Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP] pour [[1d10]] heures`)\n }\n}","obIXhQXKFyyQoNNV":"this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {appendTitle: ` - ${this.effect.name}`, fields: { difficulty: \"average\" } }).then(async test => {\n await test.roll()\n if (test.failed) {\n this.actor.modifyWounds(-1);\n this.script.message(\"Takes 1 Damage\")\n }\n})","ocBW3osTFnb5JCfe":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.MVI0lXcg6vvtooAF\")\nlet data = item.toObject()\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n","ofddAHvzn1xUueSG":"args.AP.head.value -= tinDifference(args.AP.head.layers)\nargs.AP.body.value -= tinDifference(args.AP.body.layers)\nargs.AP.lArm.value -= tinDifference(args.AP.lArm.layers)\nargs.AP.rArm.value -= tinDifference(args.AP.rArm.layers)\nargs.AP.rLeg.value -= tinDifference(args.AP.rLeg.layers)\nargs.AP.lLeg.value -= tinDifference(args.AP.lLeg.layers)\n\nfunction tinDifference(layers)\n{ \n let metalAP = layers.filter(i => i.metal).reduce((prev, current) => prev + current.value, 0)\n\n let tinAP = layers.filter(i => i.metal).reduce((prev, current) => prev + Math.max(0, current.value - 2), 0)\n\n return metalAP - tinAP;\n}","ofijDpDzoLphIp8R":"this.actor.addEffectItems(\"Compendium.wfrp4e-helf.items.Item.PfqCi0tJN1ZxtwVi\");","ogJBAXTXyhTqACPO":"return args.item?.system.attackType != \"melee\"","ohl803m0tUwNfKAk":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet data = item.toObject();\ndata.system.specification.value = 5 - this.actor.characteristics.s.bonus\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","okW06V9UiPC4Vcrn":"let characteristics = {\n \"ws\" : 5,\n \"bs\" : 0,\n \"s\" : 5,\n \"t\" : 5,\n \"i\" : 10,\n \"ag\" : 0,\n \"dex\" : 0,\n \"int\" : 0,\n \"wp\" : 5,\n \"fel\" : 5\n}\nlet skills = [\"Calme\", \"Esquive\"]\nlet skillAdvancements = [10, 10]\nlet talents = [\"Combat Instinctif\", \"Déterminé\"]\nlet trappings = [\"Veste de cuir\", \"Jambières de cuir\", \"Calotte de cuir\", \"Arme simple\", \"Lance\", \"Bouclier\"]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","okr3TtzpFoefUuJS":"let item = await fromUuid('Compendium.wfrp4e-core.items.EaqlLRQigwnsEAXX')\nlet data = item.toObject();\ndata.system.location.value = \"Collar Bone\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","oqgd9G6oI1ncPYLw":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.CV9btQn09S9Fn8Jk\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], {fromEffect : this.effect.id});","p222EiR8RRtlPm31":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\nawait test.roll();\nreturn test.failed;","p7NJB1PsY6X5q8OO":"if (this.actor.system.details.experience.current < 100) {\n return this.script.notification(game.i18n.localize(\"SCRIPT.NotEnoughXP\"))\n}\n\nlet traits = await warhammer.utility.findAllItems(\"trait\", null, true);\ntraits = traits.filter(t => t.name.includes(\"Companion Trait\"));\n\nlet items = await ItemDialog.create(traits);\nthis.actor.createEmbeddedDocuments(\"Item\", items);\nlet expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);\nexpLog.push({amount : 100, reason: items[0].name, spent: this.actor.details.experience.spent + 100, total: this.actor.details.experience.total, type: \"spent\"});\nthis.actor.update({\n \"system.details.experience.spent\": this.actor.details.experience.spent + 100,\n \"system.details.experience.log\": expLog\n });","pAgiAGyaLJY10894":"return args.skill?.name == game.i18n.localize(\"NAME.Charm\");","pBMioPUtDn1mk9f5":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.5KP9sOoLSGvj9EXp\")\nlet data = item.toObject(); \nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});","pG5OVokZzCRHIrwz":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.mgeiaDZXei7JBEgo\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","pHyXdPnWwoFrUA5n":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Entertain\"));","pLKv4moua6XhNdmA":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.1dUizIgLBgn4jICC\");\nlet data = item.toObject();\ndata.name += \" (Woodlands)\";\nthis.actor.createEmbeddedDocuments(\"Item\", Array(this.effect.sourceTest.result.overcast.usage.other.current).fill(data), {fromEffect : this.effect.id})","pNPjXEoQGHLKzq0r":"let talent = this.actor.has(\"Arcane Magic (Light)\", \"talent\")\nlet demon = this.actor.has(game.i18n.localize(\"NAME.Daemonic\"))\n\nif (!talent)\n{\n await this.actor.addCondition(\"blinded\")\n}\n\nif (demon)\n{\n await this.actor.addCondition(\"stunned\")\n}","pPV9oEydXb7oi6jX":" if (args.totalWoundLoss > 0)\n {\n args.actor.addCondition('ablaze')\n }","pR4Q2OnPxXtwRVli":"let criticals = this.actor.itemTypes.critical;\n\nif (criticals.length)\n{\n this.script.notification(\"Impossible de recevoir une Blessure Critique \");\n this.actor.deleteEmbeddedDocuments(\"Item\", criticals.map(i => i.id))\n}\n\nif (foundry.utils.getProperty(args.data, \"system.status.wounds.value\") == 0)\n{\n this.script.notification(`Endormi pendant ${Math.ceil(CONFIG.Dice.randomUniform() * 10)} tours`)\n}","pRp6hoBJ0JQa4NNG":"return args.item?.system?.attackType != \"ranged\" || this.actor.system.canFly.effects.filter(e => e.name != \"Flying\")[0].disabled","pSfA9mBk9Uw8QMLj":"return args.weapon?.system.isRanged;","pVSnn4Zw6y1EBDhv":"args.actor.system.details.man -= 1;\nargs.actor.system.details.move.value -= 1;","pdvCwjxHI56EmxuU":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.sJ3yX1kvzu2hgNq5\")\nlet amphibious = item.toObject();\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS\")\nlet as = item.toObject();\nas.name += \" (Sight)\";\nawait this.actor.createEmbeddedDocuments(\"Item\", [amphibious, as], {fromEffect : this.effect.id})","pj7gjxHrnrZonC6U":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.8pVzgPkgWpTJvfhG\")\nlet data = item.toObject();\ndata.name = `${data.name} (Mort-vivant, Warm-bloods)`;\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","pkKpxVqRHIzywerL":"const ablaze = this.actor.hasCondition(\"ablaze\");\n\nif (ablaze) {\n ablaze.delete();\n this.script.notification(\"Résistance à l'état En Flammes\");\n}","pnB9TzSEytkxk3Rb":"return this.actor.hasSystemEffect(\"infighting\")","ppc8L3WtIx6JzlAd":"if (args.equipped) {\n await this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.mDgEMOoJpi8DkRYb\", this.effect);\n} else {\n this.effect.deleteCreatedItems()\n}","pq1YQffxtOcqCRTn":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {appendTitle: ` - ${this.effect.name}`})\nawait test.roll();\nif (!test.succeeded)\n{\n this.actor.addCondition(\"prone\")\n}","pqQkeUVpuZ0jOKnZ":"const tables = [\n game.wfrp4e.tables.findTable(\"mutatephys\"),\n game.wfrp4e.tables.findTable(\"mutatephys\", \"Khorne\"),\n];\n\nif (!tables.length) {\n return ui.notifications.error(\"Table de Mutation introuvable, veuillez vous assurer qu'une table avec la clé `mutatephys` est importée dans le monde.\");\n}\n\nconst values = {}\n\nlet i = 0;\nfor (const table of tables) {\n values[i] = table.name;\n i++;\n}\n\nconst key = await ValueDialog.create({}, null, values);\nconst table = tables[key];\n\nconst results = (await table.drawMany(2)).results;\nconst uuids = results.map(result => `Compendium.${result.documentCollection}.${result.documentId}`);\n\nawait this.actor.addEffectItems(uuids, this.effect);\nthis.script.notification(\"TTirage de mutation effectué et appliqué\");","pqpU9J1x23YLwWYG":"this.item.system.encumbrance.value = Math.max(0, this.item.system.encumbrance.value - 2)","pvTcazVvW4v04otW":"if (args.totalWoundLoss > 0) {\n await 0rgs.actor.addCondition(\"poisoned\", 2)\n}","pvk5OhTNdVgwXoUa":"args.fields.successBonus += 2;","px7eEdhOEt7zOTrq":"return [\"int\", \"t\", \"wp\", \"i\"].includes(args.characteristic)","pzimrxrqpv282Oqb":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.TaYriYcJkFuIdBKp\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id});\n","pzknBcJtZWeliE27":"return args.item?.name == game.i18n.localize(\"NAME.Leadership\") || args.item?.name == game.i18n.localize(\"NAME.Cool\")","q0LvphC8RDSyR0oY":"let choice = await ItemDialog.create(ItemDialog.objectToArray({\n ws : game.wfrp4e.config.characteristics.ws,\n t : game.wfrp4e.config.characteristics.t,\n ag : game.wfrp4e.config.characteristics.ag,\n wp : game.wfrp4e.config.characteristics.wp\n}, this.effect.img), 1, \"Choisir la caractéristique\");\n\nthis.effect.updateSource({\"flags.wfrp4e.characteristic\" : choice[0].id})","q3nRyXaxksdCiLFM":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.j6v78dnOOdCB6c3d\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","q5RgoYr12kBF6FA5":"return args.item?.system?.attackType == \"ranged\" && this.item == args.item && !this.actor.isOpposing","q8lOAWr2970sZeTw":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Carpentry)';\nconst difficulty = 'challenging';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","qAEZgtu5CrfUkxhx":"if (args.test.options.staunchBleeding)\n{\n if (args.test.succeeded)\n {\n let staunch = Number(args.test.result.SL) + 1\n if (args.test.options.fieldDressing && args.test.result.reversed)\n {\n staunch = Math.min(1, Number(args.test.result.SL)) + 1\n }\n args.test.result.other.push(`${this.actor.name} enlève ${staunch} Etats Hémmoragie du patient.`)\n }\n else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0)\n {\n args.test.result.other.push(`Le patient contracte une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`)\n }\n}","qDYJnO2JosPJrjpz":"if (args.totalWoundLoss <= 0) return;\n\n// Poisoned handled by Venin trait\n\nconst test = await args.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"average\"},\n context: {\n failure: `Gain de 1 Point de Corruption.`\n }\n});\n\nawait test.roll();\n\nif (test.failed && args.actor.type === \"character\")\n args.actor.update({\"system.status.corruption.value\": args.actor.system.status.corruption.value + 1});\n\n\nawait args.actor.applyEffect({effects : this.item.effects.getName(\"Morsure du Crâne Pourpre\")})","qITSQMvvkgj81fW1":"return ![\"t\", \"s\"].includes(args.characteristic)","qK4q4o6cQhcGzFX3":"let fear = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nlet leader = await fromUuid(\"Compendium.wfrp4e-core.items.Item.vCgEAetBMngR53aT\")\nlet fearData = fear.toObject();\nlet leaderData = leader.toObject();\nfearData.system.specification.value = this.effect.sourceTest.result.overcast.usage.other.current; \ntalents = new Array(1 + this.effect.sourceTest.result.overcast.available).fill(leaderData); // Assume any unused overcast is for war leader\nthis.actor.createEmbeddedDocuments(\"Item\", [fearData].concat(talents), {fromEffect : this.effect.id})","qSwCYMMiIHmSV1X5":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n let effectData = this.item.effects.contents[0].convertToApplied();\n\t effectData.system.sourceData.item = this.item.uuid\n effectData.duration.seconds = 10800\n\tactor.applyEffect({effectData : [effectData]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","qT0WBPxLMMO9gvCd":"if (!this.actor.has(\"Vision Nocturne\") && !this.actor.has(\"Vision Nocturne\", \"talent\") && !this.actor.hasCondition(\"blinded\"))\n{\n this.actor.addCondition(\"blinded\", 1, {\"flags.wfrp4e.nightshroud\" : true})\n}","qTcK1TSjLTi0jNQK":"let AP = args.actor.status.armour;\n\nAP[\"head\"].value += 1;\nAP[\"rArm\"].value += 1;\nAP[\"lArm\"].value += 1;\nAP[\"body\"].value += 1;\nAP[\"lLeg\"].value += 1;\nAP[\"rLeg\"].value += 1;","qTk96NKh14YOIShf":"return args.skill?.name === game.i18n.localize(\"NAME.Haggle\");","qUwnVlWpsmDom3RK":"args.fields.modifier -= 5;","qZ8TBagp2d4dJAqI":"return !args.weapon || args.weapon?.system.isMelee","qZschZU0nee0kJlk":"args.fields.modifier -= 30;","qaVde0sTuMBRi2nl":"return [\"NAME.Evaluate\", \"NAME.Gamble\"].map(i => game.i18n.localize(i)).includes(args.skill?.name)","qcyl98GYD55BkJsD":"this.actor.status.encumbrance.state = 0;\nthis.actor.status.encumbrance.pct = 0;","qggycOtvFfaBr4Ax":"this.actor.applyDamage(1 + this.actor.system.status.sin?.value || 0, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL,\n createMessage: this.script.getChatData()\n});\n\nconst test = await this.actor.setupSkill(\n game.i18n.localize(\"NAME.Endurance\"),\n {\n fields: {difficulty: \"average\"},\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n },\n);\n\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\");\n}","qhjU1QdsfqA8h5iI":"return args.item?.system?.attackType != \"ranged\" || !this.item.equipped.value","qijgjcOBCDmhglRX":"return args.skill?.name == game.i18n.localize(\"NAME.SleightOfHand\");","qjli5evn8UA9uTeZ":"return args.actor.uuid == this.effect.sourceActor.uuid;","qmGwT929EiZ3lW2x":"if (args.weaponProperties.qualities.penetrating)\n{\n args.alreadyPenetrating = true;\n}\nelse \n{\n args.weaponProperties.qualities.penetrating = true;\n}","qmH61HmrEJcmQTiu":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.tNWrJUOArwfWXsPw\");\nitem = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id});","qmOt7h17hGAKqQe0":"\n\nif (!args.sourceItem?.system?.isMelee) \n{\n let choice = await foundry.applications.api.DialogV2.confirm({ window: { title: this.effect.name }, content: `

${this.effect.name} : S'agit-il d'une attaque à distance ou magique provenant de l'extérieur du Dôme ?

` })\n\n if (choice) \n {\n args.ward = 6;\n }\n}\n","qnJu82zgnfOsnqZV":"let closed = !this.item.getFlag(\"wfrp4e-soc\", \"gunport\") || false;\n\nawait this.item.setFlag(\"wfrp4e-soc\", \"gunport\", closed);\nlet scriptData = this.effect.system.scriptData;\n\nif (closed) {\n scriptData[0].label = \"Open\";\n} else {\n scriptData[0].label = \"Close\";\n}\n\nawait this.effect.update({\"system.scriptData\": scriptData});","qu194dVXm9Vx1TGk":"if (args.test.options.useOnesSupportive && (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target)) {\n\n let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\n let ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\n if (ones > SL) {\n args.test.data.result.SL = \"+\" + (ones + args.test.successBonus + args.test.slBonus)\n args.test.result.other.push(`${this.effect.name}: Valeur d'unité utilisée comme DR`)\n }\n}","quPcuKsq2fcild4a":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"easy\"}, context: {failure : `${this.effect.name}: Vomit!`} })\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}","qxzhPtysAjPWspKf":"if (this.actor.has(\"Mort-vivant\") || this.actor.has(\"Démoniaque\"))\n{\n this.script.notification(`Impossible d'entrer dans ${this.effect.name} !`);\n}","qyBmkCJo5606o4J9":"this.item.system.flaws.value = this.item.system.flaws.value.filter(i => i.name != \"weakpoints\")","qzGPJflVW7c2Ciim":"return args.skill?.name !== game.i18n.localize(\"NAME.Cool\");","r6hi5vMdLhTaaPfb":"args.actor.details.move.value += this.effect.sourceTest.result.overcast.usage.other.current","r9N0cd9sp6iVG0es":"let results = {\n 1 : \"Fimir\",\n 2 : \"Dark Elves\",\n 3 : \"Dragons\",\n 4 : \"Daemons\",\n 5 : \"The mortal followers of a particular Chaos God\",\n 6 : \"The mortal followers of a particular Chaos God\",\n 7 : \"Vampires and Necromancers\",\n 8 : \"Vampires and Necromancers\",\n 9 : \"Dwarfs\",\n 10 : \"Dwarfs\"\n};\n\nlet gods = [\n \"Tzeentch\",\n \"Slaanesh\",\n \"Nurgle\",\n \"Khorne\"\n];\n\nlet roll = await new Roll(\"1d10\").roll();\n\nroll.toMessage(this.script.getChatData());\n\nlet result = results[roll.total].replace(\"a particular Chaos God\", gods[Math.ceil(CONFIG.Dice.randomUniform() * 4)]);\n\nthis.effect.updateSource({name: this.effect.setSpecifier(result)});","rBAoyhzeU3Q8MVSk":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'difficult';\nconst target = 50;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n \n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","rCh3ltUrUMovd2Kc":"if (this.actor.hasCondition(\"surprised\"))\n{\n this.script.notification(\"Impossible d'être surpris\");\n this.actor.removeCondition(\"surprised\");\n}","rDexKQt0ctzdMKdR":"if (args.prayer)\n{\n args.abort = true;\n this.script.notification(\"Impossible d'utiliser Bénir ou Invoquer !\")\n}\n\nreturn true;","rF0Z3hTUUnSxL3Mq":"let armour = (await fromUuid(\"Compendium.wfrp4e-core.items.VUJUZVN3VYhOaPjj\")).toObject()\nlet bite = (await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")).toObject()\nlet fear = (await fromUuid(\"Compendium.wfrp4e-core.items.pTorrE0l3VybAbtn\")).toObject()\nlet nightVision = (await fromUuid(\"Compendium.wfrp4e-core.items.FmHDbCOy3pH8yKhm\")).toObject()\nlet tracker = (await fromUuid(\"Compendium.wfrp4e-core.items.ClOlztW6hH8rslbp\")).toObject()\nlet weapon = (await fromUuid(\"Compendium.wfrp4e-core.items.AtpAudHA4ybXVlWM\")).toObject()\n\narmour.name = \"Armour (Hide)\"\narmour.system.specification.value = 2\nbite.system.specification.value = 3\nfear.system.specification.value = 2\nweapon.system.specification.value = 4\nlet items = [armour, bite, fear, nightVision, tracker, weapon]\n\n\nlet belligerent = (await fromUuid(\"Compendium.wfrp4e-core.items.GbDyBCu8ZjDp6dkj\")).toObject()//{Belligerent}\nlet bestial = (await fromUuid(\"Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP\")).toObject()//{Bestial}\nlet big = (await fromUuid(\"Compendium.wfrp4e-core.items.a8MC97PLzl10WocT\")).toObject()//{Big}\nlet blessed = (await fromUuid(\"Compendium.wfrp4e-core.items.5muSFXd6oc760uVj\")).toObject()//{Blessed (Ulric)}\nlet champion = (await fromUuid(\"Compendium.wfrp4e-core.items.4mF5Sp3t09kZhBYc\")).toObject()//{Champion}\nlet die = (await fromUuid(\"Compendium.wfrp4e-core.items.UsJ2uIOOtHA7JqD5\")).toObject()//{Die Hard}\nlet fast = (await fromUuid(\"Compendium.wfrp4e-core.items.9MjH4xyVrd3Inzak\")).toObject()//{Fast}\nlet frenzy = (await fromUuid(\"Compendium.wfrp4e-core.items.yRhhOlt18COq4e1q\")).toObject()//{Frenzy}\nlet immunity = (await fromUuid(\"Compendium.wfrp4e-core.items.IAWyzDfC286a9MPz\")).toObject()//{Immunité Psychologique}\nlet regenerate = (await fromUuid(\"Compendium.wfrp4e-core.items.SfUUdOGjdYpr3KSR\")).toObject()//{Régénération}\nlet size = (await fromUuid(\"Compendium.wfrp4e-core.items.8slW8CJ2oVTxeQ6q\")).toObject()//{Taille (Large)}\n\nblessed.system.specification.value = \"Ulric\"\nsize.system.specification.value = \"Large\"\n\nlet optional = [belligerent, bestial, big, blessed, champion, die, fast, frenzy, immunity, regenerate, size];\n\nlet chosen = await ItemDialog.create(optional, \"unlimited\", \"Choisir des Traits Optionnels\");\n\nitems = items.concat(chosen || [])\nthis.script.notification(`Adding ${items.map(i => i.name).join(\", \")}`);\nthis.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect : this.effect.id})\n","rIISfbCShejmJNKw":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.oRx92ByVNEBN6YkK\")\nlet data = item.toObject()\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n","rJ8pspSekyDLkiqG":"return args.skill.name === game.i18n.localize(\"NAME.Cool\")","rLMaVNEGdZ6xj5Au":"return ![\"i\", \"int\", \"fel\"].includes(args.characteristic)","rROfpTez9681wXWx":"return this.actor.attacker && this.item.properties.qualities.defensive","rRfff55c7elyvbCb":"return this.actor.flags.useless[this.item.system.location.key] && args.weapon?.system.usesHands.includes(this.item.system.location.key[0] + \"Arm\")","rUGSx06BuBvX9kgf":"if (args.test.result.charging)\n{\n args.test.result.damage += 1\n args.test.result.additionalDamage += 1\n if (!args.test.result.resolute) {\n args.test.result.breakdown.damage.other.push({label : this.effect.name, value : this.item.Advances});\n args.test.result.resolute = true // Prevent duplicate messages\n }\n}\n","rVRDoxiWILo7d8FF":"let specification = Number(this.item.specification.value) || 1;\nargs.actor.system.status.wounds.max += Math.floor(args.actor.system.status.wounds.max * 0.3 * specification);\nargs.actor.system.status.carries.max -= Math.floor(args.actor.system.status.carries.max * 0.1 * specification);\nargs.actor.system.details.price.gc += args.actor.system.details.price.gc * 0.2 * specification;","rVpPNILEzWL9lj6b":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.kJNAY1YRaCy9IgmT\")\nlet terrorTraitItem = item.toObject()\nterrorTraitItem.system.specification.value = Number(this.effect.item.system.specification.value) \nthis.actor.createEmbeddedDocuments(\"Item\", [terrorTraitItem]);","rX8FTinyTMj9WJri":"if (!this.actor.flags.holed) return;\nif (this.actor.flags.holed.applied === true) return;\nif (this.actor.hasCondition(\"dead\")) return;\n\nconst currentHoled = this.actor.flags.holed.holed || 0;\n\nconst openGunPorts = this.actor.itemTypes.vehicleMod.reduce((acc, m) => {\n if (!m.name.toLowerCase().includes(\"gun port\"))\n return acc;\n\n let closed = m.getFlag(\"wfrp4e-soc\", \"gunport\");\n if (!closed) acc++;\n\n return acc;\n}, 0);\n\nconst totalHoled = currentHoled + openGunPorts;\nconst toughness = this.actor.system.characteristics.t.value;\nthis.actor.flags.holed.total = totalHoled;\n\nif (totalHoled >= toughness) {\n const speaker = ChatMessage.getSpeaker({actor: this.actor});\n this.script.message(`\n

${speaker.alias} coule en raison d'un score Percé (${totalHoled}) égal ou supérieur à sa Robustesse (${toughness })

\n

\n Percé en raison de dégâts critiques : ${currentHoled}
\n Percé en raison de sabords ouverts : ${openGunPorts}\n

\n `, { flavor: this.effect.name.split(\"(\")[0]});\n this.actor.addCondition(\"dead\");\n} else if (totalHoled >= (toughness * 0.5)) {\n this.actor.system.details.move.value -= 1;\n this.actor.system.details.man -= 1;\n this.actor.flags.holed.half = true;\n}\n\nthis.actor.flags.holed.applied = true;","rXMylpnEtZpwou6x":"this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty : \"average\"}}).then(async test =>\n{\n await test.roll()\n if (test.failed)\n {\n this.actor.addCondition(\"fatigued\") \n }\n})","rXuOTYAOHCiW167c":"let difficulty = \"\"\n if (this.effect.name.includes(\"Moderate\"))\n difficulty = \"easy\"\n else if (this.effect.name.includes(\"Severe\"))\n difficulty = \"average\"\n else\n difficulty = \"veasy\"\n \n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {context : {failure : this.actor.name + \" dies from Blight\"}, fields: {difficulty}, appendTitle : \" - Blight\"})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"dead\");\n }","ramav4ymrDDkPKK4":"if (this.actor.hasCondition(\"bleeding\"))\n{\n this.actor.removeCondition(\"bleeding\");\n this.script.notification(\"Retiré 1 Etat Hémmoragie\")\n}\nelse\n{\n this.script.notification(\"Aucun Etat Hémmoragie\");\n}","ratP9ByLjQPiLlFK":"args.data.reversal = {allowed : true, if: \"success\"};","rdD6Ra954TlkzQCu":"const knownTechniques = this.actor.itemTypes[\"wfrp4e-helf.technique\"].length;\nconst xpCost = knownTechniques * 100;\n\nif (this.actor.system.details.experience.current < xpCost) {\n return this.script.notification(game.i18n.localize(\"SCRIPT.NotEnoughXP\"));\n}\n\nconst techniques = await warhammer.utility.findAllItems(\"wfrp4e-helf.technique\", \"Loading Techniques\", true);\nconst choice = await ItemDialog.create(techniques, 1, {text: \"Choose Sword Dance\", title: this.effect.name});\nif (choice.length) {\n this.actor.addEffectItems(choice.map(i => i.uuid), this.effect);\n let expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);\n expLog.push({\n amount: xpCost,\n reason: `${game.i18n.localize(\"WFRP4E.SwordDance\")}: ${choice[0].name}`,\n spent: this.actor.details.experience.spent + xpCost,\n total: this.actor.details.experience.total,\n type: \"spent\",\n });\n this.actor.update({\n \"system.details.experience.spent\": this.actor.details.experience.spent + xpCost,\n \"system.details.experience.log\": expLog,\n });\n}","rdaMhMyHrJjQ6vVC":"game.wfrp4e.utility.postPeur(this.item.Advances, this.actor.name)","re1UFtxvRRjpPB7Z":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.nF5z1OEhpi4t6a6S\");\nlet data = item.toObject();\ndata.system.location.key = this.item.system.location.key\nif (data.system.location.key[0] == \"r\")\n{\n\tdata.system.location.value = \"Cheville droite\"\n}\nelse if (data.system.location.key[0] == \"l\")\n{\n\tdata.system.location.value = \"Cheville gauche\"\n}\n\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {skipLocationValue : true, fromEffect: this.effect.id})\n","red2bt4PGgIWAdTR":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n let effectData = this.item.effects.contents[0].convertToApplied();\n let minutes = Math.ceil(CONFIG.Dice.randomUniform() * 10) * 10;\n effectData.duration.seconds = 60 * minutes\n this.script.message(`${game.i18n.localize(\"Duration\")}: ${minutes} ${game.i18n.localize(\"Minutes\")}`, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n\tactor.applyEffect({effectData : [effectData]})\n}\nelse\n{\n\tthis.script.notification(\"None left!\", \"error\")\n}","rgSwSeB3shIMVMb6":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.x0WMGwuQzReXcQrs\")\nlet data = item.toObject(); \nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id});","rgnGu3IQrS8Vj9Op":"const bonus = game.settings.get(\"wfrp4e\", \"homebrew\").advantageBonus;\n\nargs.fields.modifier += bonus;","rlTvhnDpj4lzfusf":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Sail\")) && args.skill?.name !== game.i18n.localize(\"NAME.Climb\");","rly9iBUy8EX7NhQT":"if (game.user.targets.size !== 1)\n return ui.notifications.warn(\"Vous devez cibler exactement un seul Bateau.\");\n\nconst target = game.user.targets.first();\nconst vehicle = target.actor;\n\nif (!(vehicle.system instanceof VehicleModel))\n return ui.notifications.warn(\"Vous ne pouvez Constrict qu'un Bateau\");\n\nif (vehicle.size > 3)\n return ui.notifications.warn(\"Vous ne pouvez Constrict que des navires de Taille Large ou plus petits\");\n\nconst turns = Math.ceil(vehicle.system.details.length.value / 10);\n\nconst mainEffect = this.item.effects.contents[0];\nconst effectData = mainEffect.toObject();\n\neffectData.statuses = [effectData.name.slugify()];\n\nfoundry.utils.setProperty(effectData, \"flags.wfrp4e.target\", target.id);\nfoundry.utils.setProperty(effectData, \"flags.wfrp4e.turns\", turns);\n\nawait this.actor.applyEffect({effectData: [effectData]});\n\nconst speaker = ChatMessage.getSpeaker({actor: this.actor});\n\nthis.script.message(`${speaker.alias} a commencé à s'enrouler autour du ${target.name} et pourra commencer à l'écraser après ${turns} tours.`);","rnioLwiJP7ps5Jwy":"if (args.item.type == \"skill\" && args.item.name == `${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Basic\")})`)\n{\n args.item.system.modifier.value += 30;\n}","roKvPHDSpX4IV11C":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Perform\")) && args.characteristic != \"ag\"","roYVcP5Zqcsa8jVw":"args.actor.system.details.move.value -= 1;","rpxQU26BU7nwjtqY":"let location = this.item.system.location.key\nlet test = await this.actor.setupCharacteristic(\"dex\", {context : {failure : `${this.effect.name}: Lâchez l'objet!`}, skipTargets: true, appendTitle : \" - \" + this.effect.name, fields : {difficulty : \"average\"}})\nawait test.roll();\n\n\nif (location && test.failed)\n{\n let dropped = this.item.system.weaponsAtLocation;\n\n if (dropped.length)\n {\n this.script.notification(`Vous lâchez ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}\n\nreturn test.succeeded","rqTT8yOyK4bUwbdm":"let test = args.test\nif (test.spell.lore.value == \"fire\")\n{\n if (test.result.overcast.usage.target?.AoE)\n {\n test.result.overcast.usage.target.current += test.actor.characteristics.wp.bonus\n test.result.overcast.usage.target.initial += test.actor.characteristics.wp.bonus\n }\n if (test.result.overcast.usage.range)\n {\n test.result.overcast.usage.range.current *= 2\n test.result.overcast.usage.range.initial *= 2\n }\n \n}","rr4htuVq45onXdRG":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {appendTitle: ` - ${this.effect.name}`, fields : {difficulty : \"average\"}})\ntest.roll();","rxB1AqfVMDqTRieE":"return ![\"ws\", \"bs\", \"ag\"].includes(args.characteristic) && args.skill?.name != game.i18n.localize(\"NAME.Perception\")","s07GKMPCvQ8Heorc":"const value = this.effect.sourceActor.system.characteristics.wp.bonus;\nthis.script.message(await args.actor.applyBasicDamage(value, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true}));","s0kTuDE0qv68V2KI":" this.actor.getActiveTokens().forEach(t => t.document.update({texture : {tint : \"#FFBF00\"}}));\n","s3Wg2xd6AlJ4sz3n":"let damage = this.actor.itemTypes.mutation * 6;\n\nif (!damage)\n{\n return \n}\n\nawait this.actor.applyDamage(damage, {\n loc: \"roll\",\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL,\n createMessage: this.script.getChatData(),\n});","s5bO0Sf0qpS27Tve":"await args.actor.addCondition(\"ablaze\", 3)\nawait args.actor.addCondition(\"prone\");","s6eZXfZkC1My6EXl":"let lore = this.effect.name.split(\" \")[2].toLowerCase();\nif (args.item.type == \"spell\" && args.item.system.lore.value == lore)\n{\n args.item.system.cn.value = Math.max(0, args.item.system.cn.value - 1);\n}\n","s7gJQdzuM3fz2zQK":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.QluSTTTq3viHJJUh\")\nlet data = item.toObject();\ndata.system.location.value = \"Hip\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n \nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}","s7kW3lm2eU5IPrLP":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc\")\nlet dv = item.toObject();\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.OzwDT6kzoLYeeR2d\")\nlet stealthy = item.toObject();\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.XSb3QVB9ipPBFt56\")\nlet shadow = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [dv, stealthy, shadow], {fromEffect : this.effect.id});","s8idWt9YdMTRfnjV":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.BqPZn6q3VHn9HUrW\")\nlet data = item.toObject();\ndata.system.specification.value = 4 - this.actor.characteristics.s.bonus\ndata.name = item.name.replace(\"(Feature)\", \"\");\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","s8xU6OOZbbfo6VIw":"args.fields.slBonus += this.actor.system.characteristics.ag.bonus\n","s94yKZ4o5XN4JWM1":"// Any attack with such ammunition which inflicts at least one Wound,\n// also inflicts one Bleeding Condition.\n\nif (args.totalWoundLoss > 0) {\n args.actor.addCondition(\"bleeding\")\n}\n","s9J1TUkpGdvSWvPO":"this.actor.addCondition(\"blinded\");","s9KcytRE7i0cU06n":"if ([\"dragon\"].includes(args.opposedTest.defender.details.species.value.toLowerCase()))\n {\n args.modifiers.other.push({label : this.effect.name, details : \"Blessures Doublées vs Dragons\", value : args.totalWoundLoss});\n args.totalWoundLoss *=2;\n }","sAVpm7hFRHpbCLXm":"return [\"ws\", \"bs\", \"s\", \"t\", \"ag\", \"i\"].includes(args.characteristic)","sB4KB9bT3nQhAoqG":"// This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor\n\nlet mainEffect = this.item.effects.contents[0];\nif (mainEffect.name.includes(\"\"))\n{\n let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, \"Choisir le Savoir\");\n if (choice.length)\n {\n mainEffect.update({name : mainEffect.name.replace(\"\", choice[0].name)})\n this.item.update({name : this.item.name += ` (${choice[0].name})`})\n }\n}\n\nthis.effect.delete();","sBXqivqv19SvN5cZ":"if (args.skill?.name.includes(\"Language\"))\n{\n args.abort = true;\n this.script.notification(\"Impossible d'effectuer des Tests de Langue !\")\n}","sHVLKIdPbzLVItCa":"if (args.actorsystem.details.move.oars.value > 0)\n args.actor.system.details.move.oars.value -= 1;","sHfkTRqTWPg2JAGN":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","sKO8TcLIkCTnFvXu":"args.abort = true;\nthis.script.notification(`Cannot use ${this.item.system.location.value}!`, \"error\")","sNSfDBIA2k17hPYI":"let ablaze = this.actor.hasCondition(\"ablaze\");\nif (ablaze)\n{\n\tablaze?.delete();\n\tthis.script.notification(\"État En Flammes ignoré\");\n}\n","sPvfYQEnyAYNpIhF":"let shouldDamage = await foundry.applications.api.DialogV2.confirm({\n window : {title: this.effect.name + \" - \" + args.actor.name},\n content: \"Êtes-vous une créature humanoïde qui n'a pas fait de sacrifice à Rhya (ou à une autre divinité de la nature ou esprit puissant de la nature auquel le culte de Rhya est bien disposé, comme Isha ou Taal) depuis le dernier équinoxe de printemps ?\"\n});\n\nif (shouldDamage) {\n let damage = 1 + this.effect.sourceTest.result.baseSL;\n await args.actor.applyBasicDamage(damage, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n args.actor.addCondition(\"fatigued\");\n}","sQDh3g11pWchxpW9":"return true","sSMg43ZjnNmpytfj":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : \" - \" + this.effect.name});\nawait test.roll();\n","sT3t7huqUVWpbCt3":"if (Number(this.actor.system.details.age.value) > 870) {\n args.fields.slBonus -= 4;\n} else if (Number(this.actor.system.details.age.value) > 350) {\n args.fields.slBonus -= 3;\n} else {\n args.fields.slBonus -= 2;\n}","sUHuj00IpoZ7Gd03":"return args.skill?.name != game.i18n.localize(\"NAME.Swim\");","sWyO1DNaqb2EdHoW":"if (!this.actor.items.getName(game.i18n.localize(\"NAME.Frenzy\"))) // Either frenzy trait or psychology\n{\n // Add Frenzy psychology\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.DrNUTPeodEgpWTnT\")\n let data = item.toObject();\n data.effects[0].disabled = false;\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n}\n\nthis.script.message(`

By imbibing this potion, ${this.actor.prototypeToken.name} has becomes subject to Frenzy. This Frenzy lasts [[1d10]] Rounds, and may not be ended sooner.

`, \n {whisper: ChatMessage.getWhisperRecipients(\"GM\"), blind: true }) ","sYlGRLApZ3Ub24ea":"this.actor.system.status.addArmour(3, {source: this.effect.name, magical: true})","sZwLitzwKBTaFca3":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.5hH73j2NgPdsLCZN\")\nlet data = item.toObject();\ndata.name = data.name.replace(\"Target\", \"Greenskins, Mort-vivant, Chaos\")\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","sagKJM6oDFlw4ED2":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nreturn test.failed;","sbK1a7txpSoXFzyB":"if (args.test.options.useOnesArgumentative && (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target)) {\n\n let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\n let ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\n if (ones == 0) {\n ones = 10;\n }\n\n\n if (ones > SL) {\n args.test.data.result.SL = \"+\" + (ones + args.test.successBonus + args.test.slBonus)\n args.test.result.other.push(`${this.effect.name}: Utilisation de l'unité des dés comme DR`)\n }\n}","scfm5iWWBxWI6QaK":"let darkvision = await fromUuid(\"Compendium.wfrp4e-core.items.Item.JQa5DLnTs2SEzRrc\")\nlet fear = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nlet acutesense = await fromUuid(\"Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS\")\nfear = fear.toObject();\nfear.system.specification.value = 1;\nthis.actor.createEmbeddedDocuments(\"Item\", [darkvision, fear, acutesense], {fromEffect : this.effect.id})","sgS9rblPkQB36C8S":"if (this.item.name.includes(\"(\"))\n{\n\tlet trade = this.item.parenthesesText;\n\tif (trade?.toLowerCase() != \"any\")\n\t return this.item.updateSource({\"system.tests.value\" : this.item.system.tests.value.replace(\"any one\", trade)})\n}\n\nlet index = game.packs\n.filter(i => i.metadata.type == \"Item\")\n.reduce((acc, pack) => acc.concat(pack.index.contents), [])\n.filter(i => i.type == \"skill\" && i.name.includes(game.i18n.localize(\"NAME.Trade\")))\n.map(i => {\n\ti.id = i._id\n\treturn i\n})\n\nlet choice = await ItemDialog.create(index, 1, {text : \"Choose a Trade Skill, or select none to enter manually.\", title : this.effect.name})\nlet text;\nif (!choice[0])\n{\n let custom = await ValueDialog.create({text : \"Enter Custom Trade Skill\", title : \"Custom Trade\"}); \n text = custom || \"\"\n}\nelse \n{\n text = game.wfrp4e.utility.extractParenthesesText(choice[0].name)\n}\n\nawait this.item.updateSource({name : this.item.name.replace(\"(Any)\", \"\").replace(\"(any)\", \"\").trim() + ` (${text})`, \"system.tests.value\" : this.item.system.tests.value.replace(\"any one\", text)});","shkBUtUuMPDKvFm7":"let test = await this.actor.setupSkill(\"Esquive\", {fields : {difficulty : \"average\"}})\nlet caster = this.effect.sourceActor\n\nlet fallen = this.effect.sourceTest.result.SL + caster.characteristics.wp.bonus\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n this.script.message(`${this.actor.prototypeToken.name} falls ${fallen} yards`)\n}","sjnoYbWpAugyDilW":"let test = await args.actor.setupSkill(\"Charme\", {\n appendTitle: ` – ${this.effect.name}`,\n skipTargets: true,\n fields: {difficulty: 'average'},\n characteristic: 'fel',\n context: {\n success: \"L'animal devient docile envers les Humains, les Elfes qui honorent Isha, et des alliés similaires.\"\n }\n});\nawait test.roll();","skVq3eDEYKFF2iZp":"// I'm assuming the endurance test specified is for the end-round check\nawait this.actor.addCondition(\"poisoned\", 4);\n","slSRg5p8h34Vot34":"args.context.doubleDamage = true;","slzh77d2DPtvsXk0":"if (!this.item.system.properties.qualities.damaging) this.item.system.qualities.value.push({name : 'damaging'})","sm9d5lk6cM0OuUkf":"this.actor.applyPeur(Math.min(4, this.effect.sourceTest.result.overcast.usage.other.current))","ssuryRgATzt6XksC":"if (args.totalWoundLoss > 0)\n{\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n roll.toMessage(this.script.getChatData());\n args.totalWoundLoss += roll.total;\n args.modifiers.other.push({label : this.effect.name, value : roll.total})\n}","surdCPFakh2JAAHa":"let test = this.actor.attacker?.test\nif (test && this.item.system.protects[test.result.hitloc.result] && test.result.critical)\n{\n this.script.message(`${this.item.name} : Lancez les critiques deux fois et choisissez le résultat le plus bas.`)\n}","svCqdytEOtqFXCcs":"let characteristics = {\n \"ws\" : 0,\n \"bs\" : 0,\n \"s\" : 0,\n \"t\" : 10,\n \"i\" : 15,\n \"ag\" : 0,\n \"dex\" : 10,\n \"int\" : 20,\n \"wp\" : 20,\n \"fel\" : 10\n}\nlet skills = [\"Focalisation\", \"Calme\", \"Esquive\", \"Divertissement (Narration)\", \"Intuition\", \"Langue (Magick)\", \"Savoir (Magie)\" , \"Perception\"]\nlet skillAdvancements = [5, 15, 10, 10, 15, 10, 10, 20]\n\nlet talents = [\"Magie des Arcanes\", \"Magie Mineure\", \"Seconde Vue\"]\nlet trappings = [\"Arme simple\", \"Robes\", \"(2M) Bâton de combat\"]\nlet specialItems = [\n {name: \"Objet magique\", type: \"trapping\", trappingType: \"misc\" },\n]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWfrp4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Could not find ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nlet ride = await foundry.applications.api.DialogV2.confirm({window : {title : \"Compétence\"}, content : \"Add Chaos Steed and +20 Ride (Horse)?\"})\n\nif (ride)\n{\n let skill = await game.wfrp4e.utility.findSkill(\"Chevaucher (Cheval)\")\n skill = skill.toObject();\n skill.system.advances.value = 20;\n items = items.concat({name : \"Chaos Steed\", type: \"trapping\", \"system.trappingType.value\" : \"misc\"}, skill)\n}\n\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","sx7Ikn8WW00gBFb4":"let location = (Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? \"r\" : \"l\") + \"Arm\"\n\nif (location == \"lArm\")\n{\n\tthis.script.notification(\"Bras Gauche\")\n}\nelse if (location == \"rArm\")\n{\n\tthis.script.notification(\"Bras Droit\")\n}\n\nthis.effect.updateSource({\"flags.wfrp4e.location\" : location});\n\nif (location)\n{\n let dropped = this.actor.itemTypes.weapon.filter(i => i.isEquipped & i.system.usesHands.includes(location));\n\n if (dropped.length)\n {\n this.script.notification(`Lâche ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}\n\nlet roll = await new Roll(\"1d10\").roll()\n\nroll.toMessage(this.script.getChatData({flavor : `Lâche ${dropped.map(i => i.name).join(\", \")}!`}));\n\nthis.effect.updateSource({\"duration.rounds\" : roll.total})","syBgPp7rOymCZejX":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\")\n}","syRJs8P4aBFB5USD":"if (this.actor?.system?.details?.god?.value !== \"Sigmar\") return\nif (this.actor?.currentCareer?.careergroup?.value !== \"Prêtre\" \n && this.actor?.currentCareer?.careergroup?.value !== \"Prêtre Guerrier\" ) return\n \nlet currentSin = this.actor.system.status.sin.value \nlet updatedSin = currentSin + 2\nawait this.actor.update({\"system.status.sin.value\": updatedSin})","syqqBkyP5tGqZ78t":"this.actor.has(\"Immunité Psychologique\")?.delete();\n\nlet roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n\nroll.toMessage(this.script.getChatData());\n\nthis.script.notification(`Removed Immunité Psychologique, Adding ${roll.total} Broken Conditions`)\nthis.actor.addCondition(\"broken\", roll.total, {\"flags.wfrp4e.blasted-mind\" : true})","sz0PqS1kroMOzUZk":"let characteristics = {\n \"ws\" : -15,\n \"bs\" : -30,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : -10,\n \"ag\" : -10,\n \"dex\" : 0,\n \"int\" : -20,\n \"wp\" : 15,\n \"fel\" : -20\n}\nlet skills = [\"Corps à corps (Bagarre)\"]\nlet skillAdvancements = [10]\n\nlet talents = [\"Peurless (Everything)\", \"Frénésie\", \"Endurci\"]\nlet trappings = [\"Plastron d'acier\", \"Brassards\", \"Heaume\", \"Jambières d'acier\"]\nlet specialItems = []\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWfrp4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWfrp4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(\">>>>>>><\", items)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","t48hkacYdOpzWvK9":"args.context.beatBlade = true;","t56mnblo1kv3gM1M":"return args.skill?.name.includes(`${game.i18n.localize(\"NAME.Melee\")} (${game.i18n.localize(\"SPEC.Basic\")})`) || (args.type == \"weapon\" && args.item?.system.weaponGroup.value == \"basic\");","t8LYOuN5peEdWeXP":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.mNoCuaVbFBflfO6X\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","tCIT1a12Gt6k2ohA":"let resistance\nif (this.item.name.includes(\"(\") && !this.item.name.toLowerCase().includes(\"(any)\"))\n{\n\tresistance = this.item.parenthesesText\n}\nelse\n{\n resistance = await ValueDialog.create({text : \"Entrez la Résistance\", title : \"Résistance\"})\n\n if (resistance)\n {\n this.item.updateSource({name : `${this.item.name.split(\"(\")[0].trim()} (${resistance})`})\n this.effect.updateSource({name : this.effect.name + ` (${resistance})`})\n }\n}\nthis.item.updateSource({\"system.tests.value\" : this.item.system.tests.value?.replace(\"la Menace associée\", resistance) || resistance})\n\nif (resistance && !this.effect.name.includes(\"(\"))\n{\n this.effect.updateSource({name : this.effect.name += ` (${resistance})`})\n}","tDrs0aNIYmZPsOoS":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"prone\")\n}\n","tFAKRRRfTjQfdQz3":"this.actor.getActiveTokens().forEach(t => t.document.update({\"texture.tint\" : \"\"}));","tG1qGqzBLmAR3WHm":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (test.failed) \n{\n let add = 0\n\n if (test.result.roll % 11 == 0 || test.result.roll == 100) \n {\n add = 1 // can't use isFumble if no hit location\n }\n\n await this.actor.addCondition(\"stunned\", Math.max(1, Math.abs(test.result.SL)) + add)\n await this.actor.addCondition(\"blinded\", Math.max(1, Math.abs(test.result.SL)))\n\n}","tGVEV6TLl310mFLP":"let nonmagical = args.modifiers.ap.value - args.modifiers.ap.magical\nif (args.applyAP && nonmagical)\n{\n let nonmagical = args.modifiers.ap.value - args.modifiers.ap.magical\n args.modifiers.ap.ignored += nonmagical\n args.modifiers.ap.details.push(\"\" + this.effect.name + \": Ignore les PA non-magiques (\" + nonmagical + \")\");\n}","tHBlC7SpYiQ7SUGo":"return args.characteristic !== \"t\";","tKBq1nGZo8t6vvQ6":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.5hH73j2NgPdsLCZN\");\nthis.actor.createEmbeddedDocuments(\"Item\", [item.toObject()], {fromEffect : this.effect.id})","tNTO1LVN7JqHf4YN":"if (args.test.characteristicKey == \"wp\")\n{\n if (args.test.failed)\n {\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [game.wfrp4e.config.symptomEffects[\"malaise\"]])\n this.script.message(`Test de FM échoué, ${this.actor.prototypeToken.name} gains @Condition[Malaise] for [[1d10]] hours`, {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n }\n}","tUwP7TjrOOOnaCYJ":"let fatigued = this.actor.hasCondition(\"fatigued\")\nif (fatigued)\n{\n this.script.notification(`Suppression de ${fatigued.conditionValue} états Extenué`)\n fatigued.delete();\n}\nelse\n{\n\tthis.script.notification(`Aucun état Extenué`)\n}","tcZug8ehU6lyYBd9":"return args.skill?.name != `${game.i18n.localize(\"NAME.Ranged\")} (${game.i18n.localize(\"SPEC.Blackpowder\")})`","tdICiJ26rJrDbxT6":"return args.characteristic != \"i\"","tg9N6aUo8WRPKj3H":"// If the creature currently has a Surprised, Unconscious, or Entangled Condition, it does not gain this Advantage.\nconst surprised = this.actor.hasCondition(\"surprised\")\nconst unconscious = this.actor.hasCondition(\"unconscious\")\nconst entangled = this.actor.hasCondition(\"entangled\")\nif (entangled || unconscious || surprised) return\n\n// If, at the beginning of its turn, this creature does not have at least Rating Advantage points, its Advantage pool immediately increases to Rating.\nconst grimRating = parseInt(this.item.specification.value) || 1\nif (grimRating > this.actor.status.advantage.value) {\n this.actor.setAdvantage(grimRating)\n}","thxlWeZbow8iE7xA":"const uuid = \"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\";\nconst item = await fromUuid(uuid);\nconst data = item.toObject();\ndata.system.specification.value = 1;\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id});","tkZ8Ybqu518LQYEn":"await args.actor.addCondition(\"ablaze\");\n\targs.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.4CMKeDTDrRQZbPIJ\", this.effect, [{\"system.specification.value\": \"Krezok Soulflayer\"}])","tki0DhoTecjq3LyZ":"this.actor.applyDamage(1, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL,\n createMessage: this.script.getChatData()\n});\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {appendTitle: ` - ${this.effect.name}`, skipTargets: true});\nawait test.roll();\nif (test.failed)\n{ \n this.actor.addCondition(\"broken\");\n}","tn6SwmjAuNzqE6dx":"let damage = 0\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Dodge\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();\n\nif (test.succeeded)\n{\n damage = 10;\n}\nelse if (test.failed)\n{\n damage = 20;\n}\n\nthis.script.message(await this.actor.applyBasicDamage(damage, {loc : \"roll\", hideDSN: true, suppressMsg : true}))","tnE8LF6E3svIlLca":"return args.skill?.name == game.i18n.localize(\"NAME.Research\");","tnilBagajWM8UGQt":"return args.item?.name != game.i18n.localize(\"NAME.ConsumeAlcohol\")","toSrgcvWq9b5eN0K":"let location = await game.wfrp4e.tables.rollTable(\"hitloc\", {hideDSN: true})\n\nthis.item.updateSource({name : `${this.item.name} (${location.description})`})\nthis.script.message(`Localisation: ${location.description}`, { whisper: ChatMessage.getWhisperRecipients(\"GM\") })","tolkNN5P7oOC8GKZ":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"difficult\"}})\nawait test.roll();\n\nif (test.failed)\n{\n let sourceActor = this.effect.sourceActor;\n if (sourceActor)\n {\n this.script.message(await this.actor.applyBasicDamage(sourceActor.system.characteristics.wp.bonus, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL}))\n }\n}","tpz88eQFTjWHdFL5":"return args.item?.system?.attackType != \"ranged\" || this.item != args.item || this.actor.isOpposing","tuIsytv3jl2yAIb2":"return args.skill?.name !== game.i18n.localize(\"NAME.Charm\") && args.skill?.name !== game.i18n.localize(\"NAME.Intimidate\") && args.skill?.name !== game.i18n.localize(\"NAME.Leadership\")","tyQLkRLk1AXB4g2u":"if (args.test.succeeded) {\n args.test.result.critical = \"Critical\"\n\n args.test.result.tables.critical = {\n label : args.test.result.critical,\n class : \"Critique-roll\",\n modifier : args.test.result.critModifier,\n key: `crit${args.test.result.hitloc.result}`\n }\n\n args.test.result.other.push (`${this.effect.name}: Tout les succès sont des Critiques.`)\n\n}","u2TxLqkTdoK8aHTo":"let fatigued = this.actor.hasCondition(\"fatigued\")\n if (!fatigued)\n {\n this.actor.addCondition(\"fatigued\")\n ui.notifications.notify(\"Fatigued added to \" + this.actor.name + \" which cannot be removed until the Malaise symptom is gone.\")\n }","u3olS2p7Ls1JXfAH":"this.script.message(await game.wfrp4e.tables.formatChatRoll(\"mutatephys\", {}, \"Tzeentch\"));","u46KnlxCjP42F6QY":"let table = await fromUuid(\"RollTable.uATmVS40DQLC1woJ\");\n\nif (table)\n{\n table.roll();\n}\nelse\n{\n this.script.notification(\"Table des Traits de personnalité introuvable\", \"error\");\n}","u4fKgGFEnOCnvvsv":"return args.item?.system?.isRanged;","u5dNZ0s3lWfL8KFb":"return args.fields.charging","u6CYMSZADrfXd48Q":"args.fields.modifier += 20;","uA5qaat5EXzkzltq":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {fields : {difficulty : \"difficult\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\nif (!test.succeeded)\n{\n let plague = await fromUuid(\"Compendium.wfrp4e-core.items.Item.aKiuGzlVO51JvsjV\")\n let obj = plague.toObject();\n await this.actor.createEmbeddedDocuments(\"Item\", [obj]);\n}\n\nthis.effect.delete();","uACa6u4JLNMRgFlr":"const talents = await Promise.all([game.i18n.localize(\"NAME.FuriousAssault\"), game.i18n.localize(\"NAME.SeaLegsTalent\")].map(game.wfrp4e.utility.findTalent))\nthis.actor.createEmbeddedDocuments(\"Item\", talents, {fromEffect : this.effect.id})","uAy4w7y8Uu9POF8C":"args.item.system.qualities.value.push({name : \"impact\"})","uCJk19rijMPRU8jg":"return this.item.equipped.value \n && args?.weapon\n && ([\"giant\"].includes(args.target.Species.toLowerCase()))","uEVSUTTam4Z96JJ2":"if (this.item.equipped.value\n && args.sourceItem \n && (args.sourceItem.isRanged || args.opposedTest.attackerTest?.spell)\n ) \n{\n args.modifiers.other.push({label : this.effect.name, details : \"Réduction des Dégâts\", value : -2})\n}","uLBDnWC3S0lRitbj":"let test = await this.actor.setupCharacteristic(\"int\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nlet opposedResult = test.opposedMessages[0]?.system.opposedHandler?.resultMessage?.system.opposedTest?.result\n\nif (opposedResult?.winner == \"attacker\")\n{\n if (test.failed && (test.result.roll % 11 == 0 || test.result.roll == 100))\n {\n this.actor.addCondition(\"unconscious\")\n await this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + 1})\n this.script.message(\"Gain de 1 Point de Corruption\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n }\n else\n {\n await this.actor.addCondition(\"stunned\", 1 + opposedResult.differenceSL);\n }\n}\nelse\n{\n return false;\n}","uMvD2HWFNGqCmrBM":"if (args.test.options.addChargingDice)\n{\n\targs.test.result.diceDamage = {formula: \"1d10\", value : Math.ceil(CONFIG.Dice.randomUniform() * 10) }\n\targs.test.result.additionalDamage += args.test.result.diceDamage.value;\n}","uNYstk3eXmWamhzs":"args.actor.addCondition(\"blinded\")","uOHAsKlkFuIaAmjb":"args.actor.modifyWounds(1)","uRiAvo9fb3U7FIIy":"if (!this.actor.has(\"Bénédiction de Puissance\",\"prayer\")) this.actor.addEffectItems(\"Compendium.wfrp4e-core.items.Item.KSDrXcieyRc37YI7\", this.effect)","uSwkYENTOcnfRrqA":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Melee\")) && args.weapon?.system?.attackType != \"melee\"","uZeNKQ24fToJ7qtY":"let addWounds = 0\nswitch (args.actor.system.details.size.value) {\n case \"lrg\": \n addWounds = 5\n break\n case \"enor\":\n addWounds = 10\n break\n case \"mnst\":\n addWounds = 15\n break\n}\nif (addWounds > 0) {\n args.modifiers.other.push({label : this.effect.name, details : \"Augmentation des Dégâts\", value : addWounds})\n}","ucF4aiJ1gpDB333G":"if (args.test.options.catfall && (args.test.result.roll <= game.settings.get(\"wfrp4e\", \"automaticSuccess\") || args.test.result.roll <= args.test.target) && !args.test.result.catfall)\n{\n args.test.result.other.push(`${this.effect.name}: Fall distance damage reduced by ${Number(args.test.result.SL) + 1} yards`)\n args.test.result.catfall = true; // Prevent duplicate messages\n}","ugL5IBB6R2yWyMWd":"if (args.totalWoundLoss > 0)\n{\n let apply = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : `

Appliquer les dégats de ${this.effect.name} ? L'attaquant doit avoir utilisé ses mains nues ou une arme de mêlée en métal.`})\n if (apply)\n {\n\n let damage = 5 + this.actor.characteristics.wp.bonus;\n\n let loc = args.opposedTest.attackerTest.weapon?.system.usesHands[0] || \"rArm\";\n\n let APatLoc = args.opposedTest.attacker.system.status.armour[loc];\n\n let metalAP = APatLoc.layers.reduce((metal, layer) => metal += (layer.metal ? layer.value : 0), 0)\n\n let APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at location;\n\n damage -= (APused + args.opposedTest.attacker.system.characteristics.t.bonus)\n\n let msg = await args.opposedTest.attacker.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});\n msg += ` (Ignore ${metalAP} PA de métal sur ${game.wfrp4e.config.locations[loc]})`\n this.script.message(msg)\n }\n}","uhCq5NwjQ2a2idPn":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Trade (Tailor)';\nconst difficulty = 'easy';\nconst target = 30;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n \n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","ulXfbycWUu36vdmS":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"difficult\", slBonus : -1 * this.effect.sourceTest.result.SL}})\nawait test.roll();\nif (test.succeeded)\n{\n\tthis.script.notification(`Résistance à ${this.effect.name}`);\n}\nreturn test.failed;","upfK6GM33qZCZjll":"return args.item?.name != `${game.i18n.localize(\"NAME.Play\")} (${game.i18n.localize(\"SPEC.Lute\")})`","ur2HAWDGSGvyAynU":"if (args.combat.combatant.actor.uuid === this.effect.sourceActor.uuid) {\n this.effect.delete();\n}","uwdQvZtzy2HVeEzx":"if (args.totalWoundLoss > 0)\n{\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n roll.toMessage(this.script.getChatData());\n args.modifiers.other.push({label : this.effect.name, value : roll.total})\n \n args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"hard\"}, skipTargets: true, appendTitle : \" - \" + this.effect.name}).then(async test => {\n await test.roll();\n if (test.failed)\n {\n this.script.message(\"\" + args.actor.name + \" takes a @Table[critbody]{Critical Hit} to the torse\", {whisper: ChatMessage.getWhisperRecipients(\"GM\")}) \n }\n })\n}\n","ux3jaLpAUhZ5YqA6":"return args.item?.name != game.i18n.localize(\"NAME.Leadership\") && args.item?.name != game.i18n.localize(\"NAME.Cool\")","v00nVCRKqqRvY28t":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: \"hard\"}});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\", 3)\n}\n","v18mmwUmuKiVfwzQ":"let test = await this.actor.setupTest(game.i18n.localize(\"NAME.Résistance\"), {appendTitle : ` - ${this.effect.name}`, skipTargets: true});\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\");\n}","v4CCxVaVGf9i8U7X":"let cured = await ValueDialog.create({text : \"Entrez le nombre de maladies/poisons soignés\", title : this.effect.name})\n\nlet damage = 0;\n\nlet rolls = new Array(cured).fill(\"\").map(i => `max(0, 1d10 - ${this.actor.system.characteristics.fel.bonus})`)\n\nlet Test = new Roll(`${rolls.join(\" + \")}`);\nawait test.roll();\ntest.toMessage({speaker : {alias : this.actor.name}, flavor : this.effect.name});\nthis.script.message(await this.actor.applyBasicDamage(test.total, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true }))","v4ITTsSY9EvCbhZP":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS\")\nthis.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id})","v5K5HaHTZmVSJBdr":"let bane = this.effect.specifier;\nif (bane)\n return;\nif (await this.script.dialog(\"Lancer le Fléau ?\"))\n{\n let table = await fromUuid(\"Compendium.wfrp4e-archives2.tables.RollTable.wRfrOW5pRXRWM8Lb\");\n if (table)\n {\n bane = (await table.draw()).results[0].name;\n }\n else\n {\n this.script.notification(\"Table de créatures aléatoires introuvable !\", \"error\");\n }\n}\n\nif (!bane)\n{\n bane = await ValueDialog.create({text: \"Entrez le Fléau\", title: this.effect.name}) \n}\n\nif (bane)\n{\n this.effect.updateSource({name: this.effect.setSpecifier(bane)});\n}","v5aUWYPlFHKWnZ5Y":"let damageCounter = this.effect.getFlag(\"wfrp4e\", \"damage\") || 0;\nawait this.actor.applyDamage(this.effect.sourceTest.result.damage + damageCounter, {sourceItem: this.effect.sourceItem, sourceTest: this.effect.sourceTest, createMessage: this.script.getChatData()})\ndamageCounter++;\nthis.effect.setFlag(\"wfrp4e\", \"damage\", damageCounter);\nawait this.actor.addCondition(\"ablaze\");","v5xrDWcrTNFJkyQB":"let addOption = await foundry.applications.api.DialogV2.confirm({\n window : {title : \"Option\"},\n content :\n `\n Ajouter une option?\n

\n Projectiles (Arc) +10 et un Arc long avec 12 flèches\n

\n `,\n})\n\nlet choice = []\n\nif (addOption)\n{\n choice = [\n {\n type : \"skill\",\n name : \"Projectiles (Arc)\",\n diff : {\n system : {\n advances : {\n value : 10\n }\n }\n }\n },\n {\n type : \"weapon\",\n name : \"(2M) Arc long\",\n },\n {\n type : \"ammunition\",\n name : \"Flèche (12)\",\n }\n ];\n}\n\n\n\n\n\nlet updateObj = this.actor.toObject();\nlet items = []\nfor (let c of choice)\n{\n let existing\n if (c.type == \"skill\")\n {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)\n if (existing && c.diff?.system?.advances?.value)\n {\n existing.system.advances.value += c.diff.system.advances.value\n }\n }\n\n if (!existing)\n {\n let item = await game.wfrp4e.utility.find(c.name, c.type)\n if (item)\n {\n let equip = item.system.tags.has(\"equippable\");\n item = item.toObject()\n if (equip)\n {\n item.system.equipped.value = true;\n }\n items.push(foundry.utils.mergeObject(item, (c.diff || {})))\n }\n else\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n\n}\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","v6LIG7EwWYALxCpP":"return !this.effect.getFlag(\"wfrp4e\", \"trained\")?.includes(\"entertain\") || (!args.skill?.name.includes(game.i18n.localize(\"NAME.Entertain\")) && !args.skill?.name.includes(game.i18n.localize(\"NAME.Perform\")) && !args.skill?.name.includes(game.i18n.localize(\"NAME.Play\")))","vBqrydNzHmEHClqZ":"let maxWounds = this.actor.system.status.wounds.max\nthis.actor.update({\"system.status.wounds.value\": maxWounds})","vFUVWZ1l8wpTjLcx":"if (!this.actor.has(game.i18n.localize(\"NAME.Démoniaque\")))\n return\n\nlet caster = this.effect.sourceActor;\nif (caster)\n{\n let wp = caster.system.characteristics.wp\n if (this.actor.system.characteristics.wp.value >= wp.value)\n {\n this.script.notification(\"La cible a une FM supérieure, pas d'effet\")\n return\n }\n this.actor.applyBasicDamage(wp.bonus, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL })\n}","vJQRBxDfPwHens0a":"if (args.totalWoundLoss > 0) \n{\n args.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: { difficulty: \"difficult\" } }).then(async Test => {\n await test.roll();\n if (test.failed) \n {\n await args.actor.addCondition(\"poisoned\")\n this.script.message(await args.actor.applyBasicDamage(3, {suppressMsg : true, damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL }))\n }\n })\n}","vJT2UOO7Ov7a7Rx4":"if (args.totalWoundLoss > 0) this.actor.addCondition(\"surprised\")","vJgjAfwq8MuwE2HL":"let number = await new Roll(\"1d10\").roll();\nnumber.toMessage(this.script.getChatData());\n\nthis.actor.update({\"system.status.fortune.value\" : parseInt(this.actor.system.status.fortune.value) + number.total})\nthis.script.message(`Ajouté ${number.total} points de Fortune`, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})","vM2BPwYhHQaBAt2C":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.KII1gWnxIZ8HzmU5\");\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})","vNUGuypkhx2P5YIA":"return args.characteristic !== \"fel\"","vNp9wgdSvnNEjZyS":"args.fields.slBonus -= 2; ","vPG4rV640aSzKzxe":"return !this.actor.flags.useless[this.item.system.location.key[0] + \"Arm\"] || [\"fel\", \"wp\", \"int\", \"t\"].includes(args.characteristic)","vS2D9QUslR7ZtXXm":"let test = await this.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\nawait test.roll();\nif (test.failed)\n{\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n roll.toMessage(this.script.getChatData())\n\n this.script.message(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true}))\n}","vSDMygIT9nNvEGWG":"// Each time the blade is used, the GM should secretly roll a d10.\n// On a 1, its poison has run dry, \n// and the next time it is employed it will shatter.\n\nif (Math.ceil(CONFIG.Dice.randomUniform() * 10) == 1) {\n this.item.setFlag(\"wfrp4e\", \"brittle\", true)\n ChatMessage.create({\n content: `\n ${this.item.name} has run out of poison. It will shatter the next time it is used.`, \n whisper: ChatMessage.getWhisperRecipients(\"GM\"),\n blind: true\n })\n}\n","vTebTUzXortx1Qut":"let specification = Number(this.item.specification.value) || 1;\nargs.actor.system.characteristics.t.initial += 10 * specification;\nargs.actor.system.status.carries.max -= Math.floor(args.actor.system.status.carries.max * 0.1 * specification);\nargs.actor.system.details.price.gc += args.actor.system.details.price.gc * 0.1 * specification;","vUpMQlbwDiYfMCNS":"this.actor.addCondition(\"ablaze\");","vY3xeTTL3ghPrJpN":"this.actor.addCondition(\"entangled\");","vZ5HCrhY8e4R1TrG":"let eye = await fromUuid(\"Compendium.wfrp4e-core.items.weczkAMPlTjX7lqU\")\nlet nose = await fromUuid(\"Compendium.wfrp4e-core.items.SpPRZZRHxly7uo2G\")\nthis.actor.createEmbeddedDocuments(\"Item\", [eye, nose]);","vc4bELo0cWYoILfB":"let choice = await ItemDialog.create(this.actor.itemTypes.disease, 1, \"Choisir une maladie à guérir (contractée naturellement)\")\n\nthis.script.message(`Guéri ${choice[0]?.name}`);\nchoice[0].delete()","vc8eVKtyjtOGvWlK":"if (!this.actor.hasCondition(\"entangled\"))\n{\n this.effect.delete();\n}","vcM0IgsYVmfWrlO3":"fromUuid(\"Compendium.wfrp4e-core.items.rOV2s6PQBBrhpMOv\").then(item => {\n this.actor.createEmbeddedDocuments(\"Item\", [item], {fromEffect : this.effect.id});\n})","ve3RcfTi49rdYZU0":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Résistance\"), {fields: {difficulty : \"average\"}, appendTitle : \" - Wounded\"})\n await test.roll();\n if (test.failed)\n {\n fromUuid(\"Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb\").then(disease => {\n this.actor.createEmbeddedDocuments(\"Item\", [disease.toObject()])\n this.script.scriptNotification(\"Gain de \" + disease.name)\n })\n }","vejhfB9aI58iF1vr":"let choice1 = [\n {\n type: \"trait\",\n name: \"Maladie\",\n },\n {\n type: \"trait\",\n name: \"Infecté\",\n },\n {\n type: \"trait\",\n name: \"Perturbant\",\n },\n {\n type: \"trait\",\n name: \"Parasité\",\n },\n {\n type: \"trait\",\n name: \"Territorial\",\n }\n]\n\nlet updateObj;\nlet actor;\n\nasync function addTrait(c) {\n let items = [];\n console.log(\"TEST1\", c);\n let existing;\n if (c.type == \"trait\") {\n existing = updateObj.items.find(i => i.name == c.name && i.type == c.type);\n }\n console.log(\"TEST\", existing);\n if (!existing) {\n let item = await game.wfrp4e.utility.find(c.name, c.type);\n if (item) {\n item = item.toObject();\n items.push(item);\n }\n else\n ui.notifications.warn(`Impossible de trouver ${c}`, { permanent: true });\n }\n console.log(\"WISH LIST2\", choice1, items);\n actor.createEmbeddedDocuments(\"Item\", items);\n}\n\nasync function dialogChoice() {\n for (let c of choice1)\n {\n if (await foundry.applications.api.DialogV2.confirm({window : {title: \"Option\"}, content:`

Add Option?

  1. ${c.name}
`}))\n {\n addTrait(c)\n c.valid = true;\n }\n }\n}\n\nupdateObj = this.actor.toObject();\nactor = this.actor\nawait dialogChoice();\n","vgfs0DXvF5iKrz1M":"return args.characteristic != \"ag\" || this.item.getFlag(\"wfrp4e\", \"passed\")","vj3zArmX27vCxYJW":"return ![\"NAME.Perception\", \"NAME.Navigation\"].map(i => game.i18n.localize(i)).includes(args.skill?.name)","vjyTKcNrJzX4XWnS":"let SL = parseInt(this.effect.sourceTest.result.SL)\nif (SL < 0)\n SL = 0\nthis.actor.addCondition(\"fatigued\", 1 + SL)","vn13U388mwquGN9y":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.wGTD2LezlI6Atyy0\");\nlet leader = item.toObject();\n\nitem = await fromUuid(\"Compendium.wfrp4e-core.items.Item.u0CFf3xwiyidD9T5\");\nlet luck = item.toObject();\nawait this.actor.createEmbeddedDocuments(\"Item\", [leader, luck], {fromEffect : this.effect.id});","vphNSTVxfZjApblV":"const bonus = this.effect.getFlag(\"wfrp4e-tribes\", \"bonus\");\n\nargs.fields.modifier += bonus;","vtXJI2VGlU9vODXz":"args.initiative += \"+10\";","vuzRRj5d9XdNYx3o":"let broken = this.actor.hasCondition(\"broken\")\nif (broken)\n{\n broken.delete();\n this.script.notification(\"Etat Brisé supprimée\")\n}","vvVhAqreedtmOR9b":"args.totalWoundLoss = Math.max(0, args.totalWoundLoss - 1)\nargs.modifiers.other.push({label : this.effect.name, value : -1})","vvdo1NxjmGVkmFCT":"await this.actor.addCondition(\"stunned\");\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields: {difficulty : \"hard\"}, skipTargets: true, appendTitle : \" - \" + this.effect.name})\nawait test.roll();\nif (test.failed)\n{\n\tawait this.actor.addCondition(\"prone\")\n\tawait this.actor.addCondition(\"stunned\")\n}\n \nlet location = this.item.system.location.key;\n\nif (location)\n{\n let dropped = this.item.system.weaponsAtLocation;\n\n if (dropped.length)\n {\n this.script.notification(`Dropped ${dropped.map(i => i.name).join(\", \")}!`)\n for(let weapon of dropped)\n {\n await weapon.system.toggleEquip();\n }\n }\n}","vwsrPDuVxeNOtdhA":"return args.skill?.name != game.i18n.localize(\"NAME.Charm\")","vzMxIDjRlQSxXtCW":"// Remove the miscast if doubles rolled and succeeded\n// Decrement the major miscast to minor miscast\nif(args.test.succeeded && args.test.result.tables.miscast && args.test.result.roll % 11 == 0)\n{\n if (args.test.result.tables.miscast.key == \"minormis\")\n {\n delete args.test.result.tables.miscast;\n }\n else if (args.test.result.tables.miscast.key == \"majormis\")\n {\n args.test.result.tables.miscast.key = \"minormis\"\n args.test.result.tables.miscast.label = game.i18n.localize(\"ROLL.MinorMis\");\n }\n}","vzSj3vvPryp02EVC":"if (args.test.failed)\n {\n let applicableCharacteristics = [\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"];\n if (applicableCharacteristics.includes(args.test.characteristicKey))\n {\n this.actor.addCondition(\"stunned\");\n }\n }","w3r54pKZQKaH2Yer":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn\")\nlet data = item.toObject();\nlet slOver = this.effect.sourceTest.result.slOver;\nlet overcast = this.effect.sourceTest.result.overcast\nslOver -= ((overcast.total - overcast.available) * 2) // If they used an overcast, subtract 2 SL for each one\nlet added = Math.floor(slOver / 3) || 0\ndata.system.specification.value = 1 + added; // For each +3 SL, add 1 specification\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","w4JKuTECFmu3YmTR":"return !args.skill?.name?.includes(game.i18n.localize(\"NAME.Ride\"))","w4RuGIfseGoxXA3k":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'challenging';\nconst target = 20;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","w4zubIHP0XgMXsFe":"return !args.context.terror && !args.extendedTest?.getFlag(\"wfrp4e\", \"fear\");","w6tr8mWy0ZSUkHLt":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.77p3QRKgFWakkndF\", // Blather\n \"Compendium.wfrp4e-core.items.Item.b4x1qEWcevX7xK58\", // Schemer\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","w7K0lbxQKJ2tsc6f":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.EO05HX7jql0g605A\")\nlet data = item.toObject();\ndata.system.specification.value = 60\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","w8s2RUzA1jmyu7vy":"if (args.test.isCritical && args.test.weapon.weaponGroup.value == \"crossbow\") {\n args.test.result.tables.critical.modifier \n = (typeof args.test.result.tables.critical.modifier ==='undefined') \n ? 10 \n : args.test.result.tables.critical.modifier + 10\n}","wAETU6aTRr9d4oCU":"args.fields.slBonus++;","wAntJhgb8Og5vJXh":"args.context.staunchBleeding = true;","wBc8XvkAnv3j93vR":"if (Number(args.actor.system.status.fate.value) > 0) {\n args.actor.update({\"system.status.fate.value\": Math.max(args.actor.system.status.fate.value - 1, 0)});\n args.actor.update({\"system.status.fortune.value\": Math.max(args.actor.system.status.fortune.value - 1, 0)});\n this.script.message(`Réduction du Destin et de la Chance de 1`);\n}\nelse if (Number(args.actor.system.status.resilience.value) > 0)\n{\n args.actor.update({\"system.status.resilience.value\": Math.max(args.actor.system.status.resilience.value - 1, 0)});\n args.actor.update({\"system.status.resolve.value\": Math.max(args.actor.system.status.resolve.value - 1, 0)});\n this.script.message(`Réduction de la Résilience et de la Détermination de 1`);\n}","wFHjQyCR6Wzn6TeQ":"this.actor.system.status.addArmour(1, {source: this.effect, magical: true});","wIdpkqPBmeVwSSQS":"let roll = await new Roll(\"2d10\").roll();\nroll.toMessage(this.script.getChatData());\n\nthis.actor.applyDamage(roll.total, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL,\n createMessage: this.script.getChatData()\n});","wIqIF9B43SyDgGYv":"if (args.type == \"effect\" && args.options.action == \"delete\" && [\"fatigued\"].some(i => args.document.statuses.has(i)))\n{\n this.script.notification(\"Impossible de retirer \" + args.document.name);\n return false;\n}","wKIGVpPddx7Y3SQH":"let damage = await new Roll(\"1d10 + @sin\", {sin: this.actor.system.status.sin.value || 0}).roll();\ndamage.toMessage(this.script.getChatData());\nthis.actor.applyDamage(damage.total, {\n damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL,\n createMessage: this.script.getChatData()\n});\n\nconst test = await this.actor.setupSkill(\n game.i18n.localize(\"NAME.Endurance\"),\n {\n fields: {difficulty: \"challenging\"},\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n },\n);\n\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"stunned\");\n}","wLg8LbPAPbQgUg0Z":"return (args.item?.system?.attackType != \"melee\" \n || this.actor.attacker != undefined \n || args.target?.hasCondition(\"surprised\") == undefined)","wRxgpGmlUpe7nwzJ":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 0,\n \"bright\": 0,\n \"angle\": 360,\n \"alpha\": 0.5,\n \"animation\": {\n \"speed\": 0,\n \"intensity\": 0,\n \"type\": \"none\",\n },\n \"color\": \"\",\n }}));","wS6OIR3QN4mOUHn0":"if (args.totalWoundLoss > args.actor.characteristics.t.bonus)\n{\n args.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\")).then(async test => {\n await test.roll()\n if (test.failed) {\n let disease = await fromUuid(\"Compendium.wfrp4e-core.items.M8XyRs9DN12XsFTQ\")\n disease = disease.toObject()\n disease.system.duration.active = true\n args.actor.createEmbeddedDocuments(\"Item\", [disease])\n }\n })\n}","wUlYLBT59Efys5aS":"args.actor.addCondition(\"prone\");","wagZ4VV7431N3Sm8":"!args.options.terror","wb1DpSdIhSqYG5cp":"args.fields.slBonus = -1 * parseInt(this.effect.sourceTest.result.SL)","wbM7tpw4TxvadcWm":"let items = this.effect.itemTargets;\nlet msg = \"\";\nfor(let item of items)\n{\n if (item.system.properties.qualities.durable)\n {\n await item.update({\"system.qualities.value\" : []});\n msg += `

${item.name} perd toutes ses Qualités

`\n }\n else\n {\n msg += `

${item.name} se désintègre en poussière !

`\n await item.update({name : item.name + \" (Poussière)\"})\n }\n}\nif(msg)\n{\n this.script.message(msg);\n}","we6JUzDvybekAbtn":"return args.type !== \"channelling\" && !args.skill?.name.includes(game.i18n.localize(\"NAME.Channelling\")) && args.skill?.name !== `${game.i18n.localize(\"NAME.Language\")} (${game.i18n.localize(\"SPEC.Magick\")})`","weDTna1dLMwHsNlJ":"args.modifiers.other.push({label : this.effect.name, details : \"Réduction des Dégâts\", value : -4})","whUSkaR1yem21bXp":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 5,\n \"s\" : 0,\n \"t\" : 5,\n \"i\" : 10,\n \"ag\" : 0,\n \"dex\" : 6,\n \"int\" : -5,\n \"wp\" : 0,\n \"fel\" : 10\n}\nlet skills = [\"Corps à corps (Base)\", \"Pistage\"]\nlet skillAdvancements = [8, 7]\nlet talents = [\"Charge Berserk\", \"Frappe précise\", \"Frappe blessante\"]\nlet traits = [\"Flight (8)\", \"Rage\", \"Nuée\", \"Pisteur\"]\nlet trappings = []\nlet items = [];\nlet spells = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else \n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else \n {\n ui.notifications.warn(`Could not find ${talent}`, {permanent : true})\n }\n}\n\nconst traitRegex = /(?:,?(.+?)(\\+?\\d{1,2}\\+?)?\\s*?(?:\\((.+?)\\)\\s*(\\+?\\d{1,2})?|,|$))/gm\nfor (let trait of traits)\n{\n let traitMatches = trait.matchAll(traitRegex).next().value\n let traitName = traitMatches[1]\n let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there'}`).trim()\n }\n else\n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells)\n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name +='Arme','Cornes','Tail','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;\n traitItem.name = (traitItem.name + ` ${traitSpec ? \"(\"+ traitSpec + \")\" : \"\"}`).trim()\n }\n else\n traitItem.system.specification.value = traitSpec\n\n items.push(traitItem)\n\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nfor (let spell of spells)\n{\n let spellItem = await game.wfrp4e.utility.findItem(spell)\n if (spellItem)\n {\n spellItem = spellItem.toObject()\n\n items.push(spellItem);\n }\n else\n {\n ui.notifications.warn(`Could not find ${spell}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","wkY4Uj2NjT8mQNT4":"args.item.system.damage.value = \"+6\";\nargs.item.system.qualities.value.push({name : \"magical\"});","wsqNM4NHnwaAAQym":" args.applyAP = false;\n\n this.script.notification(\"This test only applies to criminals, otherwise close the dialog.\");\n this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"average\"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => \n {\n await test.roll();\n if (test.failed)\n {\n args.actor.addCondition(\"unconscious\");\n }\n });","wyTCozh9qGTx6yK0":"if (args.context.terror || args.extendedTest?.getFlag(\"wfrp4e\", \"fear\"))\n{\n\targs.abort = true;\n\tthis.script.notification(\"N'a pas besoin de faire de tests de Peur ou de Terreur\");\n}","wzkxiKjxVEeNS1di":"let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\nthis.script.message(await this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true}))\n\nawait this.actor.addCondition(\"deafened\", 3)\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty: \"average\" }, skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure: \"Gain a Broken Condition\", success : \"Avoided Broken Condition\"}})\nawait test.roll();\nif (test.failed)\n{\n this.actor.addCondition(\"broken\")\n}","x1Ecj6MXY94kpcQq":"if (!this.item.equipped.value) {\n return this.script.notification(`Vous devez équiper le ${this.item.name} pour récupérer des points de blessures.`,\"info\")\n}\n\nconst runesOfRestoration = this.item.effects.contents.filter(e => e.name == this.effect.name)\nconst restorationWounds = parseInt(runesOfRestoration.length * this.actor.system.characteristics.t.bonus)\n\nthis.actor.modifyWounds(restorationWounds)\nthis.script.message(`Vous avez récupéré ${restorationWounds} blessures avec ${this.script.label}.`)","x2RLUUNB7BiIDYCP":"\n let difficulty = \"\"\n if (this.effect.name.includes(\"Moderate\"))\n difficulty = \"easy\"\n else if (this.effect.name.includes(\"Severe\"))\n difficulty = \"average\"\n else\n difficulty = \"veasy\"\n \n let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {context : {failure : this.actor.name + \" dies from Blight\"}, fields: {difficulty}, skipTargets: true, appendTitle : \" - Blight\"})\n await test.roll();\n if (test.failed)\n {\n this.actor.addCondition(\"dead\");\n }\n ","x76tKw4L8dX00ikE":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.uqGxFOEqeurwkAO3\")\nlet data = item.toObject();\nfoundry.utils.setProperty(data, \"flags.wfrp4e.breath\", \"fire\")\ndata.system.specification.value = 5\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","x8XK2fzzXCnSwfjt":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Athletics\"))\nawait test.roll();\n\nif (test.succeeded)\n{\n\tthis.actor.removeCondition(\"prone\");\n}","x9Ah9e5xAGqCNFO3":"if (args.totalWoundLoss > 0)\n {\n args.totalWoundLoss += 2;\n args.modifiers.other.push({label : this.effect.name, value : 2})\n }","x9G6Du5EWV6byf4C":"if (parseInt(this.effect.sourceTest.result.SL) >= 3)\n{\n this.actor.modifyWounds(this.actor.system.characteristics.t.bonus * 2)\n}\nelse \n{\n this.actor.modifyWounds(this.actor.system.characteristics.t.bonus)\n}","x9iKFYYc4Ocy8PTS":"let item = this.effect.getCreatedItems()?.[0];\nChatMessage.create({content : \"La grâce dépasse le style\", speaker : ChatMessage.getSpeaker({token: this.actor.getActiveTokens()[0]?.document, actor: this.actor})}, {chatBubble : true})\n\nlet choice = await ItemDialog.create(ItemDialog.objectToArray({\n \"nobles\" : \"Nobles\",\n \"guilders\" : \"Membres de Guilde\",\n \"servants\" : \"Serviteurs\"\n}), 1, \"Choisir Group\")\n\nlet name = choice[0]?.name\n\nif (!name)\n{\n return;\n}\n\nif (item)\n{\n item.update({\n name : item.name.split(\"(\")[0] + ` (${name})`,\n \"system.tests.value\" : item.system.tests.value.split(\"(\")[0] + ` (${name}`\n })\n}\nelse\n{\n item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP\");\n let data = item.toObject();\n data.name += ` (${name})`\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect: this.effect.id})\n}","xBpLQa7yBPczDMY8":" let scythe = (await fromUuid(\"Compendium.wfrp4e-core.items.CXg7XOFJwu4LZ9LM\")).toObject();\n scythe.name = \"La Faux de Shyish\";\n scythe.system.damage.value = \"WPB + 3\"\n scythe.system.equipped = true;\n scythe.img = this.effect.img;\n scythe.system.qualities.value.push({name : \"magical\"})\n this.actor.createEmbeddedDocuments(\"Item\", [scythe], {fromEffect : this.effect.id})","xEE0ymsaH2tn2M99":"return args.type != \"cast\";","xIIkfmgWfh3teEfr":"if (this.item.system.armourType.value == 'mail' && !this.item.system.properties.qualities.impenetrable) this.item.system.qualities.value.push({name : 'impenetrable'});\n if (this.item.system.armourType.value == 'plate') this.item.system.qualities.value = this.item.system.qualities.value.filter(i => i.name != 'weakpoints')","xIRU2SaqLeWmqGDI":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.vMYEkrWj0ip6ZOdv\")\nlet data = item.toObject();\ndata.name += \" (Disease)\"\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","xJZKVGE04o84Gibo":"if (!this.item.actor.name.includes(\"Brunner\")) return;\n\nargs.item.system.damage.value += \"+1\";","xL4S0H1RP8hhXW7c":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.xneBqGOs1QS7kfUr\")\nlet data = item.toObject();\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","xLKAuD6yzwjAL6tJ":"return !args.weapon || args.weapon?.system.properties?.qualities.shield || !this.item.system.usesLocation(args.weapon)","xMhhVol8Is3DJ3gb":"if (this.effect.sourceTest.succeeded)\n{\n let blinded = 1 + this.effect.sourceTest.result.overcast.usage.other.count\n this.actor.addCondition(\"blinded\", blinded)\n}","xPDMpOvC1ZBVxrNg":"args.fields.modifier += 10;","xPwa3NftkpMBc2AO":"return ![\"ws\", \"s\", \"ag\"].includes(args.characteristic)","xQ3xR2Wf0wHFa76H":"return [\"ws\", \"bs\", \"fel\", \"dex\"].includes(args.characteristic) || args.weapon","xQnoRTHotZKrwPrx":"return args.type == \"cast\" && args.item?.system.lore?.value == \"shadow\"","xRTmMwNfdirjsi8X":"this.actor.addCondition(\"ablaze\");\n\nthis.actor.applyBasicDamage(this.effect.sourceTest.result.damage)","xRd6oA1QWLVpfoBm":"if (!this.actor.has(game.i18n.localize(\"NAME.NightVision\")))\n{\n let item = await fromUuid(\"Compendium.wfrp4e-core.items.FmHDbCOy3pH8yKhm\");\n let data = item.toObject();\n this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})\n}","xS2su09zcza9du09":"if ([game.i18n.localize(\"CORRUPTION.Minor\"), game.i18n.localize(\"CORRUPTION.Moderate\"), game.i18n.localize(\"CORRUPTION.Major\")].includes(this.item.system.specification.value))\n{\n\treturn\n}\n\nlet choice = await ItemDialog.create(ItemDialog.objectToArray({minor : game.i18n.localize(\"CORRUPTION.Minor\"), moderate : game.i18n.localize(\"CORRUPTION.Moderate\"), major : game.i18n.localize(\"CORRUPTION.Major\")}, this.item.img), 1, \"Choose Corruption Severity\");\n\nthis.item.updateSource({\"system.specification.value\" : choice[0]?.name || \"\"})","xUpKYT7BZCSmAfUy":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectData : [this.item.effects.contents[0].convertToApplied()]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","xVYVegD692CCv8Yl":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"hard\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nlet newFortune = Math.max(0, this.actor.status.fortune.value - 1)\nthis.actor.update({ \"system.status.fortune.value\": newFortune });\n\nif (test.failed)\n{ \n let char = this.effect.sourceActor.characteristics;\n let duration = Math.floor((char.wp.initial + char.wp.advances)/10) ;\n this.script.message(\"Fatethief has been applied for \" + duration + \" days\"); \n}","xWPgIZOQLba5nZ23":"let nbFatigue = 1 + Number(this.effect.sourceTest.result.SL);\nthis.actor.addCondition(\"fatigued\", nbFatigue); \n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Endurance\"), {fields : {difficulty : \"hard\"}, appendTitle : ` - ${this.effect.name}`})\nawait test.roll();\n\nif (test.succeeded)\n{\n this.script.notification(this.actor.name + \"resisted !\")\n}\nelse if (test.failed)\n{\n this.actor.addCondition(\"unconscious\", 1);\n}","xYTkj8jhSVOSoLbC":"this.actor.flags.useless[this.item.system.location.key[0] + \"Arm\"] = true;","xcny1zYAphdfrKv9":"args.fields.modifier -=20;","xcy5GOUSZ0meIejZ":"if (args.test.isFumble)\n{\n args.test.result.other.push(\"@Table[warp-grinder-fumble]\")\n}","xgdhf0wlNP2cHIQx":"await this.actor.addCondition(\"entangled\", this.effect.sourceTest.result.overcast.usage.other.current)","xgplXZMs459X7XXM":"// Apply changes when the mask is worn\n\nif (args.equipped) {\n this.actor.createEmbeddedDocuments(\"ActiveEffect\", [this.item.effects.contents[1]?.convertToApplied()])\n this.script.message(`${this.actor.name} porte le ${this.item.name}.
\n Ils subissent –20 à toutes les tentatives de résistance aux maladies.
\n S'ils portent le masque pendant plus d'une heure ou bénéficient de l'un de ses effets, ils sont exposés à @Corruption[moderate]{Corruption modérée}.\n `,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")})\n}\n\n// Notify of lingering effects when mask is Retiré\nelse if (!args.equipped)\n{\n await this.item.effects.contents[0].delete();\n await this.item.update({name : this.item.name += \" (Usagé)\"})\n this.script.message(`${this.item.name} sur ${this.actor.name} a été retiré et perd ses propriétés. Cependant, les effets durent [[1d10+4]] jours, après quoi ils doivent être manuellement retirés.`,\n {whisper: ChatMessage.getWhisperRecipients(\"GM\")}\n )\n\n}\n","xihniGjgqOhuaKWc":" \n if (args.test.failed)\n {\n let applicableCharacteristics = [\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"];\n if (applicableCharacteristics.includes(args.test.characteristicKey))\n {\n this.actor.addCondition(\"stunned\");\n }\n }","xiyQSXozoLxt0MZs":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.wMwSRDmgiF2IdCJr\", // utilisateur d\n \"Compendium.wfrp4e-core.items.Item.IAWyzDfC286a9MPz\", // Immunité Psychologique\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","xkdQhZ9KKqmocNLO":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.Item.tXKX29QZBdHmyMc7\")\nlet data = item.toObject();\nawait this.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","xklncIMwQIespDxS":"let test = await this.actor.setupCharacteristic(\"t\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"vhard\"}});\nawait test.roll();\nCorruptionMessageModel.createCorruptionMessage(\"minor\", this.script.getChatData())\n\nif (test.failed)\n{\n this.actor.addCondition(\"unconscious\");\n}","xnHobI9HojObLHMp":"args.applyTB = false;\nargs.applyAP = false;","xobGBJbgFjQCrwvq":"let roll;\nif (this.actor.has(game.i18n.localize(\"NAME.Daemonic\")) || this.actor.has(game.i18n.localize(\"NAME.Undead\")) || [\"Goblin\", \"Orc\", \"Undead\"].includes(this.actor.system.details.species.value))\n{\n roll = await new Roll(`1d10 + ${this.effect.sourceTest.result.overcast.usage.other.current}`).roll()\n}\nelse \n{\n roll = await new Roll(`1d10`).roll()\n}\n\nroll.toMessage(this.script.getChatData())\nawait this.actor.applyBasicDamage(roll.total, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg : true})\n\nif (this.actor.has(\"Undead\") || args.actor.has(\"Daemonic\"))\n{\n this.actor.addCondition(\"ablaze\")\n}","xot4JWCRzLkobHtL":"args.actor.removeCondition(\"broken\", 1);","xpgXWoK2zDnG1uiF":" let stunned = args.actor.hasCondition(\"stunned\")\n if (stunned)\n {\n stunned.system.scriptData = stunned.system.scriptData.filter(s => s.trigger != \"dialog\")\n stunned.system._scripts = null;\n }\n\n\n\n let poisoned = args.actor.hasCondition(\"poisoned\")\n if (poisoned)\n {\n poisoned.system.scriptData = poisoned.system.scriptData.filter(s => s.trigger != \"dialog\")\n poisoned.system._scripts = null;\n }\n\n\n\n let deafened = args.actor.hasCondition(\"deafened\")\n if (deafened)\n {\n deafened.system.scriptData = deafened.system.scriptData.filter(s => s.trigger != \"dialog\")\n deafened.system._scripts = null;\n }\n\n\n\n\n let entangled = args.actor.hasCondition(\"entangled\")\n if (entangled)\n {\n entangled.system.scriptData = entangled.system.scriptData.filter(s => s.trigger != \"dialog\")\n entangled.system._scripts = null;\n }\n\n\n\n\n let fatigued = args.actor.hasCondition(\"fatigued\")\n if (fatigued)\n {\n fatigued.system.scriptData = fatigued.system.scriptData.filter(s => s.trigger != \"dialog\")\n fatigued.system._scripts = null;\n }\n\n\n\n let blinded = args.actor.hasCondition(\"blinded\")\n if (blinded)\n {\n blinded.system.scriptData = blinded.system.scriptData.filter(s => s.trigger != \"dialog\")\n blinded.system._scripts = null;\n }\n\n\n\n let broken = args.actor.hasCondition(\"broken\")\n if (broken)\n {\n broken.system.scriptData = broken.system.scriptData.filter(s => s.trigger != \"dialog\")\n broken.system._scripts = null;\n }\n\n\n\n let prone = args.actor.hasCondition(\"prone\")\n if (prone)\n {\n prone.system.scriptData = prone.system.scriptData.filter(s => s.trigger != \"dialog\")\n prone.system._scripts = null;\n }\n\n","xq3RANOtmPhy77ne":"args.update({texture : {tint : \"#FFBF00\"}});","xqWxV9w5ezBQdJkZ":"return args.context.corruption;","xvGxwv7X0Vq3vNqb":"args.fields.modifier -= 10;","xvH4PKJasHcehOZz":"return args.skill?.name == `${game.i18n.localize(\"NAME.Lore\")} (${this.item.parenthesesText})`","y3F1K1sYBymPZCjz":"let characteristics = {\n \"ws\" : 10,\n \"bs\" : 0,\n \"s\" : 5,\n \"t\" : 0,\n \"i\" : 5,\n \"ag\" : 10,\n \"dex\" : 0,\n \"int\" : 0,\n \"wp\" : 0,\n \"fel\" : 0\n}\nlet skills = [\"Athlétisme\", \"Soin aux animaux\", \"Langue (Bataille)\", \"Corps à corps (Base)\", \"Corps à corps (Cavalerie)\", \"Chevaucher\"]\nlet skillAdvancements = [10,10, 10, 10, 10, 20]\n\nlet talents = [\"Cavalier émérite\", \"Coup puissant\"]\nlet trappings = [\"Arme simple\", \"Bouclier\", \"Lance de cavalerie\", \"Plastron d'acier\", \"Brassards\", \"Heaume\", \"Jambières d'acier\"]\nlet specialItems = [\n {name: \"Chaos Steed\", type: \"trapping\", trappingType: \"misc\" },\n]\nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(\">>>>>>><\", items)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","y3agVFVBR8tVqWyx":"let test = await this.actor.setupCharacteristic(\"wp\", {skipTargets: true, appendTitle : ` - ${this.effect.name}`});\nawait test.roll();","y7hk7prQ0lLTyv1Y":"return args.item?.system?.isRanged && (args.item.system.weaponGroup.value !== \"blackpowder\" || args.item.system.weaponGroup.value !== \"engineering\")","y9fwuiqn44t13WAq":"return this.item.equipped.value \n && args?.weapon\n && ([\"goblin\"].includes(args.target.Species.toLowerCase()))","yAL0YwZWVm8o1nxa":"if (this.actor.hasCondition(\"dead\") && !this.actor.gardenOfCorpses)\n{\n this.script.message(\"[[3d10]] @UUID[Compendium.wfrp4e-core.actors.T79RqnDOAQLn3I1s]{zombies} spring forth from the remains.\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n this.actor.gardenOfCorpses = true;\n // local storage is sufficient to prevent multiple messages\n}","yCgH3N9AurIiAv0i":"if (!this.item.name.includes(\"(\") || this.item.system.tests.value.includes(\"(Sense)\") || this.item.system.tests.value.toLowerCase().includes(\"(any)\"))\n{\n let tests = this.item.system.tests.value\n let name = this.item.name\n\n // If name already specifies, make sure Tests value reflects that\n if (name.includes(\"(\") && !name.toLowerCase().includes(\"(any)\"))\n {\n let sense = name.split(\"(\")[1].split(\")\")[0]\n tests = `${tests.split(\"(\")[0].trim()} (${sense})`;\n }\n else // If no sense specified, provide dialog choice\n {\n let choice = await ItemDialog.create(ItemDialog.objectToArray({\n taste : \"Goût\",\n sight : \"Vue\",\n smell : \"Odorat\",\n hearing : \"Ouïe\",\n touch : \"Toucher\"\n }, this.item.img), 1, {title : this.item.name, text : \"Choisissez un Sens\"});\n if (choice[0])\n {\n name = `${name.split(\"(\")[0].trim()} (${choice[0].name})`\n tests = `${tests.split(\"(\")[0].trim()} (${choice[0].name})`\n }\n }\n\n this.item.updateSource({name, \"system.tests.value\" : tests})\n}","yDvxF9llUYwJg0sE":"if (getProperty(args.data, \"system.loaded.value\") == true)\n{\n let repeaterValue = Math.ceil(CONFIG.Dice.randomUniform() * 10);\n let qualities = foundry.utils.deepClone(this.item.system.qualities.value);\n let repeater = qualities.find(i => i.name == \"repeater\")\n if (repeater)\n {\n repeater.value = repeaterValue\n }\n else \n {\n qualities.push({name : \"repeater\", value : repeaterValue})\n }\n foundry.utils.setProperty(args.data, \"system.loaded.amt\", repeaterValue)\n this.item.update({\"system.qualities.value\" : qualities});\n this.script.notification(\"Repeater \" + repeaterValue);\n}\nelse if (foundry.utils.getProperty(args.data, \"system.loaded.value\") == false)\n{\n let qualities = foundry.utils.deepClone(this.item.system.qualities.value).filter(i => i.name != \"repeater\");\n this.item.update({\"system.qualities.value\" : qualities});\n}","yFMvxecXAZ6T2O0S":"if (args.totalWoundLoss >= 1)\n{\n let roll = await new Roll(\"1d10\").roll({allowInteractive : false});\n await roll.toMessage(this.script.getChatData());\n if (roll.total == 9)\n {\n this.script.message(`Two @UUID[Compendium.wfrp4e-eis.actors.cLOGeMqUty61nYB9]{Blue Horror of Tzeentch} claw their way out of ${this.actor.name}'s screaming flesh, killing them in the process.`, {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n }\n}","yHAPfyaRfC4ijV6x":"let locs = Object.values(this.actor.system.status.armour).map(i => i.label).filter(i => i);\n\nlet location = locs[Math.floor(CONFIG.Dice.randomUniform() * (locs.length))];\n\nlet duration = await new Roll(\"1d10\").roll();\nduration.toMessage(this.script.getChatData());\nthis.effect.updateSource({name: this.effect.setSpecifier(location), duration: {value: duration.total, units: \"hours\"}});","yIGItnshXI4W46cp":"return args.skill?.name != game.i18n.localize(\"NAME.Charm\");","yJuEWH4wVYuPZMvL":"const excessSL = this.effect.sourceTest.result.baseSL - this.effect.sourceItem.system.sl;\nargs.fields.slBonus += 1 + excessSL;","yMMzZ7daCqRlGT3N":"let item = args.sourceItem;\nif (!item.isMagical && (item.type == \"weapon\" || item.type == \"trait\"))\n{\n args.modifiers.other.push({label : this.effect.name, details : \"Retirer l'Indice de Dégâts\", value : -1 * (args.totalWoundLoss - args.opposedTest.result.differenceSL)})\n}\n","yPxYRObUiqAIhlNB":"this.actor.system.status.encumbrance.max += 1","yQziCK8G8I1RYkTj":"let add;\nif (args.opposedTest?.attackerTest?.weapon?.isRanged && args.opposedTest?.result.hitloc?.value === \"head\") {\n add = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : \"Ajouter 1 PA ? Le Bascinet fournit 4 PA au lieu de 3 contre les attaques à distance de face\"})\n}\n\nif (add) {\n\n args.modifiers.ap.metal++;\n args.modifiers.ap.used++;\n args.modifiers.ap.value++;\n args.modifiers.ap.details.push(\"+1 PA contre les attaques à distance de face\");\n}","yRRzSKlcN3L7rEEe":"return args.skill?.name.includes(game.i18n.localize(\"NAME.Entertain\")) || args.skill?.name.includes(game.i18n.localize(\"NAME.Perform\")) || args.skill?.name.includes(game.i18n.localize(\"NAME.Play\"));","yTmRoUstxHMso91c":"if (args.item.name == game.i18n.localize(\"NAME.MagicResistanceTrait\") && args.item.type == \"trait\")\n{\n args.item.system.specification.value = Number(args.item.system.specification.value) + 1\n}","yXUPiWuQ5o0JBY4i":"return args.skill?.name == game.i18n.localize(\"NAME.Endurance\") || args.characteristic == \"int\"","yYNBZjmBnytXpRn3":"this.actor.reset();","yamap8V6Gx2Z9Smu":"const uuids = [\n \"Compendium.wfrp4e-core.items.Item.nWLsoWQBCjPRKxYx\", // Robust\n \"Compendium.wfrp4e-core.items.Item.jviOQmy0luQOySC2\", // Tenacious\n];\n\nconst items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));\nawait this.actor.createEmbeddedDocuments(\"Item\", items, {fromEffect: this.effect.id});","yatUu0cd7iKs50rq":"return args.skill?.name != game.i18n.localize(\"NAME.Track\");","ybxDG2ezvRx02LYx":"return !args.context.corruption","ynNCBAYwJFkTiXV1":"this.actor.system.status.addArmour(4, {source : this.effect})","ynV7tz0OdCwlsQp6":"let msg = \"\"\nmsg += `

${await this.actor.applyBasicDamage(8, {loc : \"roll\", suppressMsg: true, hideDSN: true})}

`\nmsg += `

${await this.actor.applyBasicDamage(8, {loc : \"roll\", suppressMsg: true, hideDSN: true})}

`\nmsg += `

${await this.actor.applyBasicDamage(8, {loc : \"roll\", suppressMsg: true, hideDSN: true})}

`\n\nthis.script.message(msg);","ynoHNXXCGRS6fTqF":"let msg = \"\"\n\nlet i_gain = (await new Roll(\"1d10\").roll()).total\n\nif (args.actor.characteristics.i.value <= 0)\n{\n i_gain += (await new Roll(\"2d10\").roll()).total\n}\n\nmsg = `${this.actor.prototypeToken.name} gagne ${i_gain} Initiative`\n\nlet newValue = i_gain + args.actor.characteristics.i.modifier\n\nthis.actor.update({\"system.characteristics.i.modifier\" : newValue})\n\n\nlet hitloc = await game.wfrp4e.tables.rollTable(\"hitloc\")\n\nlet value = hitloc.result\nlet desc = hitloc.description\n\nthis.effect.updateSource({\"flags.wfrp4e.location\" : value})\n\nmsg += ` alors que des yeux sortent de leur ${desc}`\n\nthis.script.message(msg)","yr1FmaTY18JXWa8s":"return [\"witchcraft\", \"necromancy\", \"daemonology\", \"slaanesh\", \"nurgle\", \"tzeentch\", \"undivided\"].includes(args.spell?.system.lore.value);","yvtF2t9aibxibAIM":"const test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Perception\"), {\n skipTargets: true,\n appendTitle: ` — ${this.effect.name}`,\n fields: {difficulty: \"challenging\"},\n context: {\n failure: `Gain de l'état @Condition[Prone].`,\n success: `Capable de bouger.`\n }\n});\n\nawait test.roll();\n\nif (test.failed)\n this.actor.addCondition(\"prone\");","yzN7ZNlgCiSVJqsU":"let sourceItem = this.effect.sourceItem;\n\nif (sourceItem)\n{\n\tthis.actor.applyEffect({effectUuids : [sourceItem.effects.contents[1].uuid]})\n\tthis.script.notification(\"Effets secondaires appliqués\");\n}","z14Tb2YKCjiE5ZTU":"this.actor.getActiveTokens().forEach(t => t.document.update({light : {\n \"dim\": 30,\n \"bright\": 20,\n \"angle\": 90,\n \"alpha\": 0.6,\n \"animation\": {\n \"speed\": 3,\n \"intensity\": 3,\n \"type\": \"torch\",\n },\n \"color\": \"#ffcc66\",\n }}));","z5HfNUrHy5MS3K7a":"let test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context : {failure: \"1 Corruption Point Gained\"}})\nawait test.roll();\nif (test.failed && this.actor.type == \"character\")\n{\n this.actor.update({\"system.status.corruption.value\" : parseInt(this.actor.status.corruption.value) + 1})\n this.script.message(\"Gained a Corruption point\", {whisper : ChatMessage.getWhisperRecipients(\"GM\")})\n}","z8W5PAwBR0PXY6ty":" await args.actor.addCondition(\"ablaze\");\n await args.actor.addCondition(\"blinded\");\n await args.actor.addCondition(\"poisoned\", 2);","z8mwLihZQu0JtUHY":"\nlet characteristics = {\n \"ws\" : 20,\n \"bs\" : 20,\n \"s\" : 0,\n \"t\" : 20,\n \"i\" : 30,\n \"ag\" : 0,\n \"dex\" : 10,\n \"int\" : 65,\n \"wp\" : 70,\n \"fel\" : 20\n}\nlet skills = [\"Focalisation\", \"Calme\", \"Intimidation\", \"Langue (Magick)\", \"Language (Nehekharan)\", \"Commandement\", \"Savoir (Magie)\", \"Perception\"]\nlet skillAdvancements = [20, 30, 25, 30, 20, 20, 30, 20]\nlet talents = [\"Harmonisation Aethyrique\", \"Magie des Arcanes (Domaine)\", \"Dur à cuire\", \"Diction Instinctive\", \"Perception de la magie\", \"Menaçant\", \"Menaçant\", \"Magie Mineure\", \"Lire/Écrire\", \"Seconde Vue\", \"Mage de guerre\"]\nlet trappings = [\"Arme simple\"]\nlet specialItems = [ \n {name: \"Mouldering Robes\", type: \"trapping\", trappingType: \"clothingAccessories\" }, \n {name: \"Pouches containing ritual components\", type: \"trapping\", trappingType: \"clothingAccessories\" }, \n {name: \"Staff\", type: \"weapon\", damage: \"SB+2\"}, \n {name: \"Magie Noire (Nécromancie)\", type: \"talent\"},\n] \nlet items = [];\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let item of specialItems) {\n let newItem\n if (item.type == \"weapon\") {\n newItem = new ItemWFRP4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })\n } else if (item.type == \"trapping\") {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )\n } else {\n newItem = new ItemWFRP4e({ img: \"systems/wfrp4e/icons/blank.png\", name: item.name, type: item.type })\n }\n items.push(newItem.toObject())\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else \n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else \n {\n ui.notifications.warn(`Could not find ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings) \n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else \n {\n ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})\n }\n}\n\nupdateObj.name = updateObj.name += \" \" + this.effect.name\n\nawait this.actor.update(updateObj)\nconsole.log(\">>>>>>><\", items)\nthis.actor.createEmbeddedDocuments(\"Item\", items);\n","z926Cl2vxUfyLY0V":"if (![\"rArm\", \"lArm\"].includes(this.effect.getFlag(\"wfrp4e\", \"location\")))\n\treturn true\n\nreturn [\"fel\", \"wp\", \"int\", \"t\"].includes(args.characteristic)","z9NEbIUBsKMaTuCz":"if (args.opposedTest.result.hitloc && args.loc == \"head\") \n{\n args.actor.addCondition(\"entangled\")\n}","zA6TDttpwMSMl7D8":"// An imbiber must take a Consume Alcohol Test.\nthis.actor.setupSkill(game.i18n.localize(\"NAME.ConsumeAlcohol\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => {\n await test.roll()\n // If they succeed, \n // as a result of whatever potential futures they glimpse, \n // they can spend a Fortune Point within the next hour to reverse the dice of any failed Test.\n if (test.succeeded) {\n this.script.message(`As a result of whatever potential futures they glimpse, ${this.actor.prototypeToken.name} can spend a Fortune Point within the next hour to reverse the dice of any failed Test.`, \n {\n whisper: ChatMessage.getWhisperRecipients(\"GM\"), \n blind: true \n }) \n }\n})","zBHTIBU8OlYj1YIO":"args.fields.modifier += this.effect.sourceActor?.system.characteristics.wp.value;","zF1IKmobCB8ea58M":"return this.sourceActor.uuid === this.actor.uuid || ![\"ws\", \"ag\"].includes(args.characteristic);","zFYCaGR0wbFWjl4T":"return args.skill?.name != game.i18n.localize(\"NAME.OutdoorSurvival\");","zGwtyjTUBeSQ110p":"if (args.opposedTest.attackerTest.preData.charging) \n{\n let mostProtectedLoc;\n let mostProtectedValue = 0;\n for (let loc in this.actor.status.armour) \n {\n if (this.actor.status.armour[loc].value != undefined && this.actor.status.armour[loc].value > mostProtectedValue) \n {\n mostProtectedLoc = loc;\n mostProtectedValue = this.actor.status.armour[loc].value;\n }\n }\n if (mostProtectedValue)\n {\n args.modifiers.other.push({label: this.effect.name, value : mostProtectedValue});\n }\n}","zI5hXv2NLGWqnmDD":"if (args.totalWoundLoss > 0)\n{\n\targs.actor.applyEffect({effectUuids : this.item.effects.contents[0].uuid})\n}","zIErcRiBmIZRbary":"if (args.test.failed)\n {\n let applicableCharacteristics = [\"ws\", \"bs\", \"s\", \"fel\", \"ag\", \"t\", \"dex\"];\n if (applicableCharacteristics.includes(args.test.characteristicKey))\n {\n this.actor.addCondition(\"stunned\");\n }\n }","zIpl3SkWv8zzlr2D":"let filters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : \"petty\"\n }\n]\n\nlet petty = (await ItemDialog.createFromFilters(filters, 4, {text : \"Choisissez 4 Sorts Mineurs\"})).map(i => i.toObject());\n\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"system.lore.value\",\n value : [\"death\"]\n }\n]\n\nlet arcane = (await ItemDialog.createFromFilters(filters, 8, {text : \"Choisissez 8 Sorts d'Arcane et Savoir de la Mort\"})).map(i => i.toObject());\n\nfilters = [\n {\n property : \"type\",\n value : \"spell\"\n },\n {\n property : \"name\",\n value: /^((?!\\().)*$/gm, // Remove all spells with parentheses (all arcane spells spells)\n regex: true\n },\n {\n property : \"system.lore.value\",\n value : \"necromancy\"\n }\n]\n\nlet necromancy = (await ItemDialog.createFromFilters(filters, 3, {text : \"Choisissez 3 dans le Savoir de Nécromancie\"})).map(i => i.toObject());\n\nlet items = [...necromancy, ...petty, ...arcane]\n\nthis.actor.createEmbeddedDocuments(\"Item\", items);","zK38Rl5t9zbFi4Se":"if (args.loc == this.item.system.location.key && args.totalWoundLoss > 0)\n{\n args.actor.addCondition(\"bleeding\", 1);\n this.script.notification(\"Hémorragique ajouté\")\n}","zL7ECmBBMAqf5Esn":"let hasMagazine = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content: \"

Le navire a-t-il un magasin ou tout autre type de réserve pour la poudre noire ?

\"});\n\nif (!hasMagazine) return;\n\nlet roll = new Roll(\"d10\");\nawait roll.evaluate();\n// await roll.toMessage();\nlet anchor = roll.toAnchor();\n\nlet crits = [];\n\nfor (let i = 0; i < roll.total; i++) {\n let result = await WFRP_Tables.rollTable('crithull');\n let collection = game.packs.get(result.object.documentCollection)\n\n if (collection)\n await collection.getDocuments()\n\n if (!collection)\n collection = game.items;\n\n let item = collection.get(result.object.documentId)\n if (item)\n crits.push(item);\n}\n\nconst items = await this.actor.createEmbeddedDocuments(\"Item\", crits);\nconst speaker = ChatMessage.getSpeaker({actor: this.actor});\nconst uuids = items.map(i => `@UUID[${i.uuid}]`);\nthis.script.message(`

${this.item.name} provoque un nombre supplémentaire de ${anchor.outerHTML} Coups Critiques à la Coque!

  • ${uuids.join('
  • ')}
`)","zLBLEDl3aGcAxai2":"const hasTraits = args.actor.has(\"Daemonic\") || args.actor.has(\"Undead\") || args.actor.has(\"Spellcaster\");\nconst hasSinOrCorruption = args.actor.status.sin.value > 0 || args.actor.status.corruption.value > 0;\nconst isSpellcaster = args.actor.itemTags.talent.some(i =>\n i.name.includes(game.i18n.localize(\"NAME.ArcaneMagic\")) ||\n i.name.includes(game.i18n.localize(\"NAME.ChaosMagic\")) ||\n i.name.includes(game.i18n.localize(\"NAME.PettyMagic\"))\n );\nconst shouldDamage = hasTraits || hasSinOrCorruption || isSpellcaster;\n\nif (shouldDamage) {\n const roll = new Roll(\"1d10\");\n await roll.evaluate();\n let damage = roll.total;\n await roll.toMessage();\n await this.script.message(await this.actor.applyBasicDamage(damage, {damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true}));\n}","zR4WAjzXHTZuiu5G":"let actor = this.actor;\n let effect = this.effect;\n let bleedingAmt;\n let bleedingRoll;\n let msg = \"\"\n\n let damage = effect.conditionValue;\n let scriptArgs = {msg, damage};\n await Promise.all(actor.runScripts(\"preApplyCondition\", {effect, data : scriptArgs}))\n msg = scriptArgs.msg;\n damage = scriptArgs.damage;\n msg += await actor.applyBasicDamage(damage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, minimumOne : false, suppressMsg : true})\n\n if (actor.status.wounds.value == 0 && !actor.hasCondition(\"unconscious\"))\n {\n await actor.addCondition(\"unconscious\")\n msg += \"
\" + game.i18n.format(\"BleedUnc\", {name: actor.prototypeToken.name })\n }\n\n if (actor.hasCondition(\"unconscious\"))\n {\n bleedingAmt = effect.conditionValue;\n bleedingRoll = (await new Roll(\"1d100\").roll()).total;\n if (bleedingRoll <= bleedingAmt * 10)\n {\n msg += \"
\" + game.i18n.format(\"BleedFail\", {name: actor.prototypeToken.name}) + \" (\" + game.i18n.localize(\"Rolled\") + \" \" + bleedingRoll + \")\";\n await actor.addCondition(\"dead\")\n }\n else if (bleedingRoll % 11 == 0)\n {\n msg += \"
\" + game.i18n.format(\"BleedCrit\", { name: actor.prototypeToken.name } ) + \" (\" + game.i18n.localize(\"Rolled\") + bleedingRoll + \")\"\n await actor.removeCondition(\"bleeding\")\n }\n else\n {\n msg += \"
\" + game.i18n.localize(\"BleedRoll\") + \": \" + bleedingRoll;\n }\n }\n\n await Promise.all(actor.runScripts(\"applyCondition\", {effect, data : {bleedingRoll}}))\n if (args.suppressMessage)\n {\n let messageData = game.wfrp4e.utility.chatDataSetup(msg);\n messageData.speaker = {alias: this.effect.name}\n messageData.flavor = this.effect.name;\n return messageData\n }\n else\n {\n return this.script.message(msg)\n }\n ","zUv9e0A3OEXWY9Mv":"let item = await fromUuid(\"Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv\")\nlet data = item.toObject();\ndata.system.specification.value = 9 - this.actor.system.characteristics.s.bonus\nthis.actor.createEmbeddedDocuments(\"Item\", [data], {fromEffect : this.effect.id})","zWZG8OmxqTpzHjFV":"args.actor.characteristics.ag.modifier -= 10;\n\n if (args.actor.details.move.value > 3)\n {\n args.actor.details.move.value -= 1;\n if (args.actor.details.move.value < 3)\n args.actor.details.move.value = 3\n }","zXh8rgMxWoCLTxVd":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Voile';\nconst difficulty = 'challenging';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","zY4ZjY7uyKIKMYmX":"this.script.message(await game.wfrp4e.tables.formatChatRoll(\"fleshy-curse\"))\n\nlet test = await this.actor.setupSkill(game.i18n.localize(\"NAME.Cool\"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : \"hard\"}})\nawait test.roll();\nif (test.succeeded)\n{\n this.effect.delete()\n}","zadppy7FEbXvgUON":" let characteristics = {\n \"ws\" : 5,\n \"bs\" : 0,\n \"s\" : 0,\n \"t\" : 0,\n \"i\" : 0,\n \"ag\" : 10,\n \"dex\" : 10,\n \"int\" : 0,\n \"wp\" : 0,\n \"fel\" : 5\n}\nlet skills = [\"Perception\", \"Escamotage\", \"Discrétion (Urbaine)\"]\nlet skillAdvancements = [10, 10, 10]\nlet talents = [\"Criminel\", \"Etiquette (Criminals)\"]\nlet trappings = [\"Corde, 10 mètres\", \"Lockpick\", \"Masque\"]\nlet items = []\n\nlet updateObj = this.actor.toObject();\n\nfor (let ch in characteristics)\n{\n updateObj.system.characteristics[ch].modifier += characteristics[ch];\n}\n\nfor (let index = 0; index < skills.length; index++)\n{\n let skill = skills[index]\n let skillItem;\n skillItem = updateObj.items.find(i => i.name == skill && i.type == \"skill\")\n if (skillItem)\n skillItem.system.advances.value += skillAdvancements[index]\n else\n {\n skillItem = await game.wfrp4e.utility.findSkill(skill)\n skillItem = skillItem.toObject();\n skillItem.system.advances.value = skillAdvancements[index];\n items.push(skillItem);\n }\n}\n\nfor (let talent of talents)\n{\n let talentItem = await game.wfrp4e.utility.findTalent(talent)\n if (talentItem)\n {\n items.push(talentItem.toObject());\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})\n }\n}\n\nfor (let trapping of trappings)\n{\n let trappingItem = await game.wfrp4e.utility.findItem(trapping)\n if (trappingItem)\n {\n trappingItem = trappingItem.toObject()\n\n trappingItem.system.equipped.value = true;\n\n items.push(trappingItem);\n }\n else\n {\n ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})\n }\n}\n\n\nawait this.actor.update(updateObj)\nthis.actor.createEmbeddedDocuments(\"Item\", items);","zasFOZohkrdFIBwr":"let modifier = 0\n if (this.effect.name.includes(\"Moderate\"))\n modifier = -20\n else\n modifier = -10\n args.fields.modifier += modifier","zdGAvfL7zJ7wpYxG":"const repaired_message = `

Réparation terminée ${this.item.name}.

`;\nconst Test = 'Métier (Charpentier)';\nconst difficulty = 'easy';\nconst target = 40;\n\nconst extendedTestData = {\n name: this.item.name,\n type: \"extendedTest\",\n img: this.item.img,\n system: {\n SL: {\n current: 0,\n target: target\n },\n Test: {\n value: Test\n },\n completion: {\n value: \"remove\"\n },\n difficulty: {\n value: difficulty\n }\n },\n effects: [\n {\n name: `Réparation de ${this.item.name}`,\n img: this.item.img,\n system: {\n transferData : {\n type: \"document\",\n documentType: \"Item\"\n },\n scriptData: [\n {\n label: this.item.name,\n script: `\n let id = this.item.flags.wfrp4e.fromEffect;\n let effect = this.actor.appliedEffects.find(e => e.id === id);\n this.script.message(\"${repaired_message}\");\n await effect.item.delete();\n `,\n trigger: \"deleteEffect\"\n }\n ]\n }\n \n }\n ]\n};\n\nawait this.actor.createEmbeddedDocuments(\"Item\", [extendedTestData], {fromEffect: this.effect.id});\n","zi8Z3NlwVj3IfgAW":"if (this.item.system.quantity.value)\n{\n\tthis.item.system.reduceQuantity();\n\tlet actor = Array.from(game.user.targets)[0]?.actor || this.actor;\n\tactor.applyEffect({effectData : [this.item.effects.contents[3].convertToApplied()]})\n}\nelse\n{\n\tthis.script.notification(\"Plus rien !\", \"error\")\n}","ziG9H5Kdb7xC3dFE":"return !args.skill?.name.includes(game.i18n.localize(\"NAME.Art\"));","zjTEhJuLcFVkzory":"if (!args.test.preData.options?.kingship) return\n\nif (!this.item.equipped.value || !args.test.item) return;\nif ([game.i18n.localize(\"NAME.Charm\"), \n game.i18n.localize(\"NAME.Intimidate\"), \n game.i18n.localize(\"NAME.Leadership\")].includes(args.test.item.name))\n{\n args.test.preData.canReverse = true\n}","zk44dFEGkylB7kW6":" let modifier; let target = args.data.targets[0]\n if (target.actor.details.size.value == \"tiny\")\n modifier = 30\n if (target.actor.details.size.value == \"ltl\")\n modifier = 20\n if (target.actor.details.size.value == \"sml\")\n modifier = 10\n\t\n args.fields.modifier += (modifier || 0); // Offset size modifier ","zkc1gIPLj0VoAONT":"let AP = args.actor.status.armour;\n\nAP[\"head\"].value += 2;\nAP[\"rArm\"].value += 2;\nAP[\"lArm\"].value += 2;\nAP[\"body\"].value += 2;\nAP[\"lLeg\"].value += 2;\nAP[\"rLeg\"].value += 2;","zphxI8VSWbNQCMBy":"args.size = \"lrg\"","zqShIJnrRReGgP94":"let {added, removed} = this.effect.getFlag(\"wfrp4e\", \"propertiesChanged\");\n\nfor(let property of (added || []))\n{\n let hasValue = game.wfrp4e.config.propertyHasValue[property];\n if (!args.item.system.qualities.value.find(i => i.name == property))\n {\n args.item.system.qualities.value.push({name : property, value : (hasValue ? 2 : null)})\n }\n}\n\nfor(let property of (removed || []))\n{\n args.item.system.flaws.value = args.item.system.flaws.value.filter(i => i.name != property)\n}","zsiV6XEHlCNGLLPl":"return args.skill?.name == game.i18n.localize(\"NAME.SetTrap\");","zsoTVkHe4nHY1M52":"this.script.message(await this.actor.applyBasicDamage(10 + parseInt(this.effect.sourceTest.result.SL), {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP}))","ztIkD5Zt6ko9D4Ca":"args.fields.modifier -= 10","zxG5KbliWE9xWNQD":"this.script.message(\"Réussit automatiquement tout \" + this.script.label);\nargs.abort = true;","zzk2uRSFjFHB5kjw":"\n let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)\n if (args.test.isFumble && roll == 1 && !args.test.result.misfire)\n {\n args.test.result.misfire = game.i18n.localize(\"Misfire\") + \" (Rolled 1)\"\n args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage)\n }\n else if (args.test.isFumble && roll != 1)\n args.test.result.other.push(\"Misfire Roll: \" + roll)"}); } \ No newline at end of file diff --git a/scripts/01VFjGVxkjb5P1ve.js b/scripts/01VFjGVxkjb5P1ve.js index 5091acb..fe302f4 100644 --- a/scripts/01VFjGVxkjb5P1ve.js +++ b/scripts/01VFjGVxkjb5P1ve.js @@ -1 +1 @@ -return args.item?.system?.isProjectiles && args.data.targets[0]?.actor?.sizeNum < 3 \ No newline at end of file +return args.item?.system?.isRanged && args.data.targets[0]?.actor?.sizeNum < 3 \ No newline at end of file diff --git a/scripts/0cNnOYQnj7nFL0mD.js b/scripts/0cNnOYQnj7nFL0mD.js new file mode 100644 index 0000000..9f4b861 --- /dev/null +++ b/scripts/0cNnOYQnj7nFL0mD.js @@ -0,0 +1 @@ +this.item.system.encumbrance.value = Math.max(0, this.item.system.encumbrance.value - 1) \ No newline at end of file diff --git a/scripts/11QMAT1KYGJJmPlD.js b/scripts/11QMAT1KYGJJmPlD.js new file mode 100644 index 0000000..54937ba --- /dev/null +++ b/scripts/11QMAT1KYGJJmPlD.js @@ -0,0 +1,18 @@ +let melee = ["Compendium.wfrp4e-core.items.Item.4MJJCiOKPkBByYwW", "Compendium.wfrp4e-core.items.Item.RWJrupj9seau0w31", "Compendium.wfrp4e-core.items.Item.jt0DmVK9IiF6Sd2h"]; +let ranged = ["Compendium.wfrp4e-core.items.Item.5eDd6iFeR9G6cCfz", "Compendium.wfrp4e-core.items.Item.jrYW2OyDHd1Md2my", "Compendium.wfrp4e-core.items.Item.cygaI9gq4BQJvbB5"]; + +if (args.equipped) +{ + if (this.item.system.isMelee) + { + this.actor.addEffectItems(melee, this.effect); + } + else + { + this.actor.addEffectItems(ranged, this.effect); + } +} +else +{ + this.effect.deleteCreatedItems(); +} \ No newline at end of file diff --git a/scripts/16c0m6PsDXWh86uN.js b/scripts/16c0m6PsDXWh86uN.js new file mode 100644 index 0000000..5a3ff31 --- /dev/null +++ b/scripts/16c0m6PsDXWh86uN.js @@ -0,0 +1,5 @@ +let property = this.effect.getFlag("wfrp4e", "property"); +if (property && !this.item.system.flaws.value.find(i => i.name == property)); +{ + this.item.system.flaws.value.push({name : property}); +} \ No newline at end of file diff --git a/scripts/190PHSHKGaJ74wsR.js b/scripts/190PHSHKGaJ74wsR.js index 5ce743f..13bd9b2 100644 --- a/scripts/190PHSHKGaJ74wsR.js +++ b/scripts/190PHSHKGaJ74wsR.js @@ -1,28 +1,31 @@ -if (!this.item.name.includes("(") || this.item.system.tests.value.includes("Terrain") || this.item.system.tests.value.toLowerCase().includes("(any)")) { - let tests = this.item.system.tests.value - let name = this.item.name +if (!this.item.name.includes("(") || this.item.system.tests.value.includes("Terrain") || this.item.system.tests.value.toLowerCase().includes("(any)")) +{ + let tests = this.item.system.tests.value + let name = this.item.name - // If name already specifies, make sure Tests value reflects that - if (name.includes("(") && !name.toLowerCase().includes("(any)")) { - let terrain = name.split("(")[1].split(")")[0] - tests = tests.replace("the Terrain", terrain) - } - else // If no sense specified, provide dialog choice - { - let choice = await ItemDialog.create(ItemDialog.objectToArray({ - coastal: "Littoral", - deserts: "Déserts", - marshes: "Marécages", - rocky: "Rocailleux", - tundra: "Toundra", - woodlands: "Régions boisées" - }, this.item.img), 1, "Choisissez un Terrain"); - if (choice[0]) { - name = `${name.split("(")[0].trim()} (${choice[0].name})` - tests = tests.replace("Terrain", choice[0].name + " Terrain") + // Si le nom précise déjà un terrain, on met à jour la valeur de tests + if (name.includes("(") && !name.toLowerCase().includes("(any)")) + { + let terrain = name.split("(")[1].split(")")[0] + tests = tests.replace("the Terrain", terrain) + } + else // Sinon, on propose un choix par dialogue + { + let choice = await ItemDialog.create(ItemDialog.objectToArray({ + coastal : "Littoral", + deserts : "Déserts", + marshes : "Marécages", + rocky : "Rocailleux", + tundra : "Toundra", + woodlands : "Régions boisées" + }, this.item.img), 1, "Choisissez un Terrain"); + if (choice[0]) + { + name = `${name.split("(")[0].trim()} (${choice[0].name})` + tests = tests.replace("the Terrain", choice[0].name + " Terrain") + } } - } - this.effect.updateSource({ name }) - this.item.updateSource({ name, "system.tests.value": tests }) + this.effect.updateSource({name}) + this.item.updateSource({name, "system.tests.value" : tests}) } \ No newline at end of file diff --git a/scripts/19LL1oevrjmpD8DX.js b/scripts/19LL1oevrjmpD8DX.js new file mode 100644 index 0000000..0209229 --- /dev/null +++ b/scripts/19LL1oevrjmpD8DX.js @@ -0,0 +1,21 @@ +let damage = await new Roll("1d10").roll(); +damage.toMessage(this.script.getChatData()); +this.actor.applyDamage(damage.total, { + damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, + createMessage: this.script.getChatData() +}); + +const test = await this.actor.setupSkill( + game.i18n.localize("NAME.Endurance"), + { + fields: {difficulty: "average"}, + skipTargets: true, + appendTitle: ` — ${this.effect.name}`, + }, +); + +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("stunned"); +} \ No newline at end of file diff --git a/scripts/1PQPxFjmRlulHHzo.js b/scripts/1PQPxFjmRlulHHzo.js index b3f0001..47d8a6c 100644 --- a/scripts/1PQPxFjmRlulHHzo.js +++ b/scripts/1PQPxFjmRlulHHzo.js @@ -1,4 +1,4 @@ -if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0) +if (args.loc == this.item.system.location.key && args.totalWoundLoss > 0) { args.actor.addCondition("bleeding", 2); } diff --git a/scripts/24Zp9hEvULQsR3lN.js b/scripts/24Zp9hEvULQsR3lN.js new file mode 100644 index 0000000..618023e --- /dev/null +++ b/scripts/24Zp9hEvULQsR3lN.js @@ -0,0 +1 @@ +if (!this.item.system.properties.qualities.pummel) this.item.system.qualities.value.push({name : 'pummel'});if (!this.item.system.properties.qualities.hack) this.item.system.qualities.value.push({name : 'hack'}) \ No newline at end of file diff --git a/scripts/2C6UtWujISe4jqgS.js b/scripts/2C6UtWujISe4jqgS.js new file mode 100644 index 0000000..c0d57d5 --- /dev/null +++ b/scripts/2C6UtWujISe4jqgS.js @@ -0,0 +1 @@ +return game.messages.get(args.context.dispel)?.system.test.spell.system.magicMissile.value; \ No newline at end of file diff --git a/scripts/2p9IK6Y5Z4NQD6FY.js b/scripts/2p9IK6Y5Z4NQD6FY.js index 2facb9d..36428f7 100644 --- a/scripts/2p9IK6Y5Z4NQD6FY.js +++ b/scripts/2p9IK6Y5Z4NQD6FY.js @@ -1 +1 @@ -args.prefillModifiers.difficulty = "hard" \ No newline at end of file +args.fields.difficulty = "hard" \ No newline at end of file diff --git a/scripts/2sN4VHAs4bo4pOjD.js b/scripts/2sN4VHAs4bo4pOjD.js new file mode 100644 index 0000000..994ba9a --- /dev/null +++ b/scripts/2sN4VHAs4bo4pOjD.js @@ -0,0 +1,6 @@ +let damage = await new Roll("1d10 + 1").roll(); +damage.toMessage(this.script.getChatData()); +this.actor.applyDamage(damage.total, { + damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, + createMessage: this.script.getChatData() +}); \ No newline at end of file diff --git a/scripts/39mmD9wOsHWas3cl.js b/scripts/39mmD9wOsHWas3cl.js new file mode 100644 index 0000000..d210680 --- /dev/null +++ b/scripts/39mmD9wOsHWas3cl.js @@ -0,0 +1,10 @@ +if (args.type == "effect" && args.options.action == "delete" && ["prone"].some(i => args.document.statuses.has(i))) +{ + this.script.notification("Impossible de retirer " + args.document.name); + let resist = await this.effect.resistEffect(); + if (resist) + { + this.effect.delete(); + } + return resist; +} \ No newline at end of file diff --git a/scripts/3D5ImpMgpOTPucvv.js b/scripts/3D5ImpMgpOTPucvv.js index 5d19d12..72bd340 100644 --- a/scripts/3D5ImpMgpOTPucvv.js +++ b/scripts/3D5ImpMgpOTPucvv.js @@ -5,5 +5,5 @@ let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / let ones = Number(args.test.result.roll.toString().split("").pop()) if (ones > SL) - args.Test.result.other.push(`${this.effect.name}: ${ones + args.test.successBonus + args.test.slBonus} DR`) + args.test.result.other.push(`${this.effect.name}: ${ones + args.test.successBonus + args.test.slBonus} DR`) } \ No newline at end of file diff --git a/scripts/3uIkDVzxNjzm5qIH.js b/scripts/3uIkDVzxNjzm5qIH.js new file mode 100644 index 0000000..1980ce4 --- /dev/null +++ b/scripts/3uIkDVzxNjzm5qIH.js @@ -0,0 +1,7 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Pray"), {appendTitle: ` - ${this.effect.name}`}); +await test.roll(); + +if (test.succeeded) +{ + this.actor.removeCondition("blinded", 1 + parseInt(test.result.SL)); +} \ No newline at end of file diff --git a/scripts/43W725G6C7QZ8rr6.js b/scripts/43W725G6C7QZ8rr6.js new file mode 100644 index 0000000..e8e89be --- /dev/null +++ b/scripts/43W725G6C7QZ8rr6.js @@ -0,0 +1 @@ +args.options.terror \ No newline at end of file diff --git a/scripts/4xqtTqMyOcrwVh63.js b/scripts/4xqtTqMyOcrwVh63.js new file mode 100644 index 0000000..574d3bc --- /dev/null +++ b/scripts/4xqtTqMyOcrwVh63.js @@ -0,0 +1,6 @@ +let roll = await new Roll("2d10 + @sin", {sin: this.actor.system.status.sin.value || 0}).roll(); +roll.toMessage(this.script.getChatData()); +this.effect.updateSource({duration: { + value: roll.total, + units: "days" +}}); \ No newline at end of file diff --git a/scripts/5NE3teXZInHQXZ1K.js b/scripts/5NE3teXZInHQXZ1K.js new file mode 100644 index 0000000..9e72ed4 --- /dev/null +++ b/scripts/5NE3teXZInHQXZ1K.js @@ -0,0 +1,6 @@ +let roll = await new Roll("2d10 + @sin", {sin: this.actor.system.status.sin.value || 0}).roll(); +roll.toMessage(this.script.getChatData()); +this.effect.updateSource({duration: { + value: roll.total, + units: "rounds" +}}); \ No newline at end of file diff --git a/scripts/5X8GbReUxUPWwXMT.js b/scripts/5X8GbReUxUPWwXMT.js new file mode 100644 index 0000000..57f960d --- /dev/null +++ b/scripts/5X8GbReUxUPWwXMT.js @@ -0,0 +1 @@ +this.actor.modifyWounds(-1); \ No newline at end of file diff --git a/scripts/63Yh0nrhCLLfzd14.js b/scripts/63Yh0nrhCLLfzd14.js new file mode 100644 index 0000000..e619b9d --- /dev/null +++ b/scripts/63Yh0nrhCLLfzd14.js @@ -0,0 +1,21 @@ +let damage = await new Roll("1d10 + @sin", {sin: this.actor.system.status.sin.value || 0}).roll(); +damage.toMessage(this.script.getChatData()); +this.actor.applyDamage(damage.total, { + damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, + createMessage: this.script.getChatData() +}); + +const test = await this.actor.setupSkill( + game.i18n.localize("NAME.Endurance"), + { + fields: {difficulty: "difficult"}, + skipTargets: true, + appendTitle: ` — ${this.effect.name}`, + }, +); + +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("stunned"); +} \ No newline at end of file diff --git a/scripts/65xE9OV5sA1ZWT7j.js b/scripts/65xE9OV5sA1ZWT7j.js index 68bc98e..7ece796 100644 --- a/scripts/65xE9OV5sA1ZWT7j.js +++ b/scripts/65xE9OV5sA1ZWT7j.js @@ -5,5 +5,5 @@ let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / let ones = Number(args.test.result.roll.toString().split("").pop()) if (ones > SL) - args.Test.result.other.push(`${this.effect.name}: ${ones + args.test.successBonus + args.test.slBonus} DR`) + args.test.result.other.push(`${this.effect.name}: ${ones + args.test.successBonus + args.test.slBonus} DR`) } \ No newline at end of file diff --git a/scripts/6crZPdNEWptukssg.js b/scripts/6crZPdNEWptukssg.js new file mode 100644 index 0000000..b210c8c --- /dev/null +++ b/scripts/6crZPdNEWptukssg.js @@ -0,0 +1,27 @@ +let roll = await new Roll("1d10").roll(); + +roll.toMessage(this.script.getChatData()); + +if (roll.total == 1) +{ + this.item.updateSource({"system.description.value" : this.item.system.description.value += `

${this.effect.name}: The weapon counts as a @Corruption[minor]{minor source of Corruption}.

`}); +} +else if (roll.total <= 5) +{ + let quirks = await fromUuid("Compendium.wfrp4e-archives2.tables.RollTable.LbNZOF6Ov7xKHS5Z"); + if (quirks) + { + let quirkRoll = await new Roll("1d100 + 40").roll(); + quirkRoll.toMessage(this.script.getChatData()); + let quirkResult = (await quirks.roll({roll: quirkRoll})).results[0].text; + this.item.updateSource({"system.description.value" : this.item.system.description.value += `

${this.effect.name}: ${quirkResult.replace("

", "")}

`}); + } + else + { + this.item.updateSource({"system.description.value" : this.item.system.description.value += `

${this.effect.name}: Generate an additional Quirk or Curse by rolling on the @UUID[Compendium.wfrp4e-archives2.tables.RollTable.LbNZOF6Ov7xKHS5Z]{Quirks and Curses} Table and adding +40 to the result.

`}); + } +} +else +{ + this.item.updateSource({"system.description.value" : this.item.system.description.value += `

${this.effect.name}: People who recognise the weapon are subject to @UUID[Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f]{Animosity} towards the bearer.

`}); +} \ No newline at end of file diff --git a/scripts/7F6aGxZJjwxm5e5P.js b/scripts/7F6aGxZJjwxm5e5P.js index d32ebb0..934d578 100644 --- a/scripts/7F6aGxZJjwxm5e5P.js +++ b/scripts/7F6aGxZJjwxm5e5P.js @@ -11,8 +11,8 @@ if (args.test.result.castOutcome == "failure") this.script.notification(`Lost ${value} Wounds`) this.actor.modifyWounds(-1 * value) await this.item.system.toggleEquip(); - args.Test.addSL(value); - args.Test.preData.other.push(`${this.effect.name}: +${value} SL`) + args.test.addSL(value); + args.test.preData.other.push(`${this.effect.name}: +${value} SL`) } }) } \ No newline at end of file diff --git a/scripts/7IuX8wytm33iRGC3.js b/scripts/7IuX8wytm33iRGC3.js new file mode 100644 index 0000000..ef475a5 --- /dev/null +++ b/scripts/7IuX8wytm33iRGC3.js @@ -0,0 +1,7 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (test.failed && this.actor.type == "character") +{ + this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1}) + this.script.message("Gagné un point de Corruption", {whisper : ChatMessage.getWhisperRecipients("GM")}) +} \ No newline at end of file diff --git a/scripts/7T3iXgrL72fea67C.js b/scripts/7T3iXgrL72fea67C.js index 6a237e9..608d920 100644 --- a/scripts/7T3iXgrL72fea67C.js +++ b/scripts/7T3iXgrL72fea67C.js @@ -13,7 +13,7 @@ const test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), await test.roll(); if (test.failed) { - await this.actor.addEffectItems(bloodyFluxUUID, this.effet); + await this.actor.addEffectItems(bloodyFluxUUID, this.effect); } else { const SL = test.result.SL; const heal = 1 + SL; diff --git a/scripts/7ykah8fvh2Y0o2Hi.js b/scripts/7ykah8fvh2Y0o2Hi.js new file mode 100644 index 0000000..8a790cf --- /dev/null +++ b/scripts/7ykah8fvh2Y0o2Hi.js @@ -0,0 +1,4 @@ +this.actor.addCondition("blinded"); +let roll = await new Roll("1d10").roll(); +roll.toMessage(this.script.getChatData()); +this.effect.updateSource({duration: {value: roll.total, units: "hours"}}); \ No newline at end of file diff --git a/scripts/8hCdSTjZqeuVyBGV.js b/scripts/8hCdSTjZqeuVyBGV.js new file mode 100644 index 0000000..2f13949 --- /dev/null +++ b/scripts/8hCdSTjZqeuVyBGV.js @@ -0,0 +1,5 @@ +if (args.sourceTest.options.doubleDamage) +{ + args.modifiers.other.push({label: this.effect.name, value: args.totalWoundLoss}); + args.totalWoundLoss *= 2; +} \ No newline at end of file diff --git a/scripts/8sJSsjq6wx4IxXWn.js b/scripts/8sJSsjq6wx4IxXWn.js new file mode 100644 index 0000000..e0073c9 --- /dev/null +++ b/scripts/8sJSsjq6wx4IxXWn.js @@ -0,0 +1,10 @@ +let test = args.test +if (test && test.spell?.system.magicMissile.value) +{ + let roll = await new Roll("1d100").roll(); + roll.toMessage(this.script.getChatData()); + if (roll.total <= 30) + { + this.script.message(`${this.item.name} : Le sort échoue !`) + } +} \ No newline at end of file diff --git a/scripts/A97EV1Yju3aT7Sng.js b/scripts/A97EV1Yju3aT7Sng.js new file mode 100644 index 0000000..3ca309f --- /dev/null +++ b/scripts/A97EV1Yju3aT7Sng.js @@ -0,0 +1,9 @@ +if (args.test.skill?.name == game.i18n.localize("NAME.Pray") || args.test.prayer) +{ + if (parseInt(args.test.result.SL) > 0) + { + args.test.result.SL = "+0"; + args.test.result.description = game.i18n.localize("ROLL.MarginalSuccess"); + args.test.result.other.push(`${this.effect.name}: Maximum +0 SL`) + } +} \ No newline at end of file diff --git a/scripts/ACtDCTLZXmd5uXjX.js b/scripts/ACtDCTLZXmd5uXjX.js index 0cb3fd8..af9fef4 100644 --- a/scripts/ACtDCTLZXmd5uXjX.js +++ b/scripts/ACtDCTLZXmd5uXjX.js @@ -1,5 +1,5 @@ let halve; -if (args.opposedTest.attackerTest.item?.type != "spell") +if (args.sourceItem?.type != "spell") { halve = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : "Diviser les dégâts par deux ? (Divise tous les dégâts sauf le feu, le froid et la magie)"}) } diff --git a/scripts/ARQbVHKYK39d8vKJ.js b/scripts/ARQbVHKYK39d8vKJ.js new file mode 100644 index 0000000..3138b83 --- /dev/null +++ b/scripts/ARQbVHKYK39d8vKJ.js @@ -0,0 +1,14 @@ +let properties = { + fine : "Fine", + durable : "Durable", + lightweight : "Lightweight", + practical : "Practical" +}; + + +let choice = await ItemDialog.create(ItemDialog.objectToArray(properties), 1, {title: this.effect.name, text: "Select Property"}); + +if (choice[0]) +{ + this.effect.updateSource({"flags.wfrp4e.property" : choice[0].id, name : this.effect.setSpecifier(choice[0].name)}); +} \ No newline at end of file diff --git a/scripts/AdawSWiB45Vu40rQ.js b/scripts/AdawSWiB45Vu40rQ.js new file mode 100644 index 0000000..4276a3f --- /dev/null +++ b/scripts/AdawSWiB45Vu40rQ.js @@ -0,0 +1,26 @@ +let colors = { + fire : "#b22222", + heavens : "#87ceeb", + metal : "#ee9b3a", + shadow : "#808080", + life : "#008000", + beasts : "#a52a2a", + light : "#f0ffff", + death : "#800080", + necromancy : "#800080", + daemonology : "#8b0000" +}; + +let spell = this.actor.itemTypes.spell.find(i => Object.keys(colors).includes(i.system.lore.value[0])); + +let color; +if (spell) +{ + color = colors[spell.system.lore.value[0]]; +} +else +{ + color = Object.values(colors)[Math.ceil(CONFIG.Dice.randomUniform() * 10)]; +} + +this.effect.updateSource({changes: this.effect.changes.concat({key: "token.light.color", type: "override", value: color})}); \ No newline at end of file diff --git a/scripts/AhV9QfteQNqqXVjv.js b/scripts/AhV9QfteQNqqXVjv.js new file mode 100644 index 0000000..ca195ec --- /dev/null +++ b/scripts/AhV9QfteQNqqXVjv.js @@ -0,0 +1,15 @@ +let qualities = { + fast : "Rapide", + hack : "Tranchant", + impale : "Empalant", + penetrating : "Pénétrant", + precise : "Précis" +} + +let choice = await ItemDialog.create(ItemDialog.objectToArray(qualities, this.item.img), 1, {text: "Choisissez une qualité", title: this.effect.name}); + +if (choice[0]) +{ + this.script.message(choice[0].name); + this.effect.setFlag("wfrp4e", "quality", choice[0].id); +} \ No newline at end of file diff --git a/scripts/B08DMbt9gcj8uCTc.js b/scripts/B08DMbt9gcj8uCTc.js new file mode 100644 index 0000000..5b6378d --- /dev/null +++ b/scripts/B08DMbt9gcj8uCTc.js @@ -0,0 +1 @@ +if (args.totalWoundLoss > 0) args.actor.addCondition('ablaze') \ No newline at end of file diff --git a/scripts/BHbFqhJPzZI2txLs.js b/scripts/BHbFqhJPzZI2txLs.js index abf139c..baf3465 100644 --- a/scripts/BHbFqhJPzZI2txLs.js +++ b/scripts/BHbFqhJPzZI2txLs.js @@ -2,7 +2,7 @@ let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase(); // If channelling corresponding lore if (args.type == "channelling" && args.spell.system.lore.value == lore) - args.prefillModifiers.slBonus += 2 + args.fields.slBonus += 2 // If channelling or casting different lore else if (args.spell.system.lore.value != lore && args.spell.system.lore.value != "petty") - args.prefillModifiers.slBonus -= 1 \ No newline at end of file + args.fields.slBonus -= 1 \ No newline at end of file diff --git a/scripts/C9ARvMauPNwIHj6o.js b/scripts/C9ARvMauPNwIHj6o.js new file mode 100644 index 0000000..f81d79c --- /dev/null +++ b/scripts/C9ARvMauPNwIHj6o.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}, context : {failure: "Gain Broken"}}); +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("broken"); +} \ No newline at end of file diff --git a/scripts/CUBpU1imu2eRS06C.js b/scripts/CUBpU1imu2eRS06C.js index 1a0a33e..f4acfd4 100644 --- a/scripts/CUBpU1imu2eRS06C.js +++ b/scripts/CUBpU1imu2eRS06C.js @@ -1,5 +1,8 @@ -if (args.opposedTest.attackerTest.weapon?.system.properties?.qualities.hack && !args.hackReminder) +if (args.sourceItem?.system.properties?.qualities.hack && !args.hackReminder) { args.hackReminder = true; - args.opposedTest.result.other.push(`${this.effect.name}: Hack causes ${this.item.Advances} extra damage`) -} \ No newline at end of file + if (args.opposedTest) + { + args.opposedTest.result.other.push(`${this.effect.name} : Tranchant inflige ${this.item.Advances} dégâts supplémentaires`) + } +} diff --git a/scripts/CWNGrg7se91RC95g.js b/scripts/CWNGrg7se91RC95g.js index 13d9446..22dfafa 100644 --- a/scripts/CWNGrg7se91RC95g.js +++ b/scripts/CWNGrg7se91RC95g.js @@ -1,11 +1,14 @@ if (args.totalWoundLoss > 0) { - args.opposedTest.result.other.push( - `@Corruption[minor]{Moderate Exposure to Corruption}` - ) + if (args.opposedTest) + { + args.opposedTest.result.other.push( + `@Corruption[minor]{Exposition modérée à la Corruption}` + ) + } this.script.message(`${this.effect.name}: - @Corruption[moderate]{Moderate Exposure to Corruption}
- ${args.actor.prototypeToken.name} must take an - Corruption (Moderate) Test`, + @Corruption[moderate]{Exposition modérée à la Corruption}
+ ${args.actor.prototypeToken.name} doit effectuer un + Test de Corruption (Modéré)`, {whisper: ChatMessage.getWhisperRecipients("GM")} ) -} \ No newline at end of file +} diff --git a/scripts/Cjj4iLkdY1NaZRCi.js b/scripts/Cjj4iLkdY1NaZRCi.js index 8b2de55..b1d6657 100644 --- a/scripts/Cjj4iLkdY1NaZRCi.js +++ b/scripts/Cjj4iLkdY1NaZRCi.js @@ -1,6 +1,6 @@ -if ((args.opposedTest.attackerTest.item && args.opposedTest.attackerTest.item.isMelee) || (args.opposedTest.attackerTest.item && !args.opposedTest.attackerTest.item.name.includes("Projectiles"))) +if ((args.sourceItem && args.sourceItem.isMelee) || (args.sourceItem && !args.sourceItem.name.includes("Projectiles"))) { - let choice = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : `

Apply damage with ${this.effect.name} to attacker?`}) + let choice = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : `

Appliquer les dégâts avec ${this.effect.name} à l'attaquant ?`}) if (choice) { diff --git a/scripts/D5XmzrUGFa1JN0cl.js b/scripts/D5XmzrUGFa1JN0cl.js index fe0c170..495338a 100644 --- a/scripts/D5XmzrUGFa1JN0cl.js +++ b/scripts/D5XmzrUGFa1JN0cl.js @@ -1,2 +1,2 @@ -args.prefillModifiers.modifier += 10 +args.fields.modifier += 10 diff --git a/scripts/DBelNjOULhhAADVJ.js b/scripts/DBelNjOULhhAADVJ.js new file mode 100644 index 0000000..93c49b5 --- /dev/null +++ b/scripts/DBelNjOULhhAADVJ.js @@ -0,0 +1,12 @@ +let properties = { + ugly : "Ugly", + shoddy : "Shoddy", + unreliable : "Unreliable" +}; + +let choice = await ItemDialog.create(ItemDialog.objectToArray(properties), 1, {title: this.effect.name, text: "Select Property"}); + +if (choice[0]) +{ + this.effect.updateSource({"flags.wfrp4e.property" : choice[0].id, name : this.effect.setSpecifier(choice[0].name)}); +} \ No newline at end of file diff --git a/scripts/DHzODnNNdZ24FNSg.js b/scripts/DHzODnNNdZ24FNSg.js new file mode 100644 index 0000000..9f970d8 --- /dev/null +++ b/scripts/DHzODnNNdZ24FNSg.js @@ -0,0 +1,4 @@ +let skills = this.actor.itemTypes.skill.filter(s => (this.effect.getFlag("wfrp4e", "skills") || []).includes(s.name)); +skills.forEach(s => { + s.system.modifier.value -= 10; +}) \ No newline at end of file diff --git a/scripts/FZFOC7bip0oiWEzk.js b/scripts/FZFOC7bip0oiWEzk.js index 700aee7..d1172c8 100644 --- a/scripts/FZFOC7bip0oiWEzk.js +++ b/scripts/FZFOC7bip0oiWEzk.js @@ -1,4 +1,4 @@ -if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0) +if (args.loc == this.item.system.location.key && args.totalWoundLoss > 0) { args.actor.addCondition("bleeding", 2); this.script.notification("Etat Hémorragique ajouté") diff --git a/scripts/FiD3mvWIBHNNIuO9.js b/scripts/FiD3mvWIBHNNIuO9.js index 181bb7e..093aa7f 100644 --- a/scripts/FiD3mvWIBHNNIuO9.js +++ b/scripts/FiD3mvWIBHNNIuO9.js @@ -1,8 +1,9 @@ -if (args.opposedTest.result.hitloc.value == "body") +if (args.loc == "body") { if ((await new Roll("1d2").roll()).total == 1) { - args.opposedTest.result.hitloc.value = "head" - this.script.message(`Localisation du coup changé pour la tête`) + args.loc = "head" + args.AP = foundry.utils.deepClone(args.actor.status.armour[args.loc]); + this.script.message(`Localisation du coup changée pour la tête`) } } \ No newline at end of file diff --git a/scripts/FjmtA9s13s75DTAY.js b/scripts/FjmtA9s13s75DTAY.js new file mode 100644 index 0000000..095042f --- /dev/null +++ b/scripts/FjmtA9s13s75DTAY.js @@ -0,0 +1,5 @@ +let locs = Object.keys(this.actor.system.status.armour); + +let location = locs[Math.floor(CONFIG.Dice.randomUniform() * (locs.length))]; + +game.wfrp4e.tables.formatChatRoll(`crit${location}`, {criticalLocation: location, showRoll: true}); \ No newline at end of file diff --git a/scripts/FtSG8J2s95hhjUMn.js b/scripts/FtSG8J2s95hhjUMn.js new file mode 100644 index 0000000..8395978 --- /dev/null +++ b/scripts/FtSG8J2s95hhjUMn.js @@ -0,0 +1,3 @@ +let roll = await new Roll("1d10").roll(); +roll.toMessage(this.script.getChatData()); +this.effect.updateSource({duration: {value: roll.total, units: "hours"}}); \ No newline at end of file diff --git a/scripts/H7BFq8m8vnkm4Yux.js b/scripts/H7BFq8m8vnkm4Yux.js new file mode 100644 index 0000000..8ef9117 --- /dev/null +++ b/scripts/H7BFq8m8vnkm4Yux.js @@ -0,0 +1,2 @@ +let skill = this.actor.itemTypes.skill.find(s => s.name === game.i18n.localize("NAME.Pray")); +skill.system.modifier.value -= 10; \ No newline at end of file diff --git a/scripts/HiDcm1jhG3sU39ME.js b/scripts/HiDcm1jhG3sU39ME.js new file mode 100644 index 0000000..f98ba9d --- /dev/null +++ b/scripts/HiDcm1jhG3sU39ME.js @@ -0,0 +1,27 @@ +this.actor.addCondition("ablaze"); +let colors = { + fire : "#b22222", + heavens : "#87ceeb", + metal : "#ee9b3a", + shadow : "#808080", + life : "#008000", + beasts : "#a52a2a", + light : "#f0ffff", + death : "#800080", + necromancy : "#800080", + daemonology : "#8b0000" +}; + +let spell = this.actor.itemTypes.spell.find(i => Object.keys(colors).includes(i.system.lore.value[0])); + +let color; +if (spell) +{ + color = colors[spell.system.lore.value[0]]; +} +else +{ + color = Object.values(colors)[Math.ceil(CONFIG.Dice.randomUniform() * 10)]; +} + +this.effect.updateSource({changes: this.effect.changes.concat({key: "token.light.color", type: "override", value: color})}); \ No newline at end of file diff --git a/scripts/HmImVzvw6ecBy99l.js b/scripts/HmImVzvw6ecBy99l.js index f285e08..8be0a8d 100644 --- a/scripts/HmImVzvw6ecBy99l.js +++ b/scripts/HmImVzvw6ecBy99l.js @@ -1,4 +1,4 @@ -if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0) +if (args.loc == "body" && args.totalWoundLoss > 0) { args.actor.addCondition("bleeding", 2) this.script.notification("Etat Hémmoragique appliqué : 2 niveaux de saignement") diff --git a/scripts/IdTjIw1yduvCdwdR.js b/scripts/IdTjIw1yduvCdwdR.js new file mode 100644 index 0000000..2ba2755 --- /dev/null +++ b/scripts/IdTjIw1yduvCdwdR.js @@ -0,0 +1,5 @@ +if (args.type == "effect" && args.options.action == "delete" && ["blinded"].some(i => args.document.statuses.has(i))) +{ + this.script.notification("Impossible de retirer " + args.document.name); + return false; +} \ No newline at end of file diff --git a/scripts/IupskvzvoGyD2H5o.js b/scripts/IupskvzvoGyD2H5o.js index 61ac871..306da23 100644 --- a/scripts/IupskvzvoGyD2H5o.js +++ b/scripts/IupskvzvoGyD2H5o.js @@ -25,7 +25,7 @@ if (god) if (blessings.length) { this.script.scriptNotification("Ajout de " + blessings.map(i => i.name).join(", ")) - await this.actor.addEffectItems(blessings.map(i => i.uuid), this.effet) + await this.actor.addEffectItems(blessings.map(i => i.uuid), this.effect) } else { diff --git a/scripts/J5XafRL0FyZnBPl2.js b/scripts/J5XafRL0FyZnBPl2.js new file mode 100644 index 0000000..03d82bb --- /dev/null +++ b/scripts/J5XafRL0FyZnBPl2.js @@ -0,0 +1 @@ +this.actor.addCondition("deafened"); \ No newline at end of file diff --git a/scripts/JTW6557K8nI5p9mL.js b/scripts/JTW6557K8nI5p9mL.js new file mode 100644 index 0000000..684bfe7 --- /dev/null +++ b/scripts/JTW6557K8nI5p9mL.js @@ -0,0 +1 @@ +game.wfrp4e.tables.formatChatRoll(`mutatephys`, {showRoll: true}); \ No newline at end of file diff --git a/scripts/JVQK6VW73KxfeJJi.js b/scripts/JVQK6VW73KxfeJJi.js new file mode 100644 index 0000000..596d912 --- /dev/null +++ b/scripts/JVQK6VW73KxfeJJi.js @@ -0,0 +1,5 @@ +if (args.totalWoundLoss > 0) + { + args.modifiers.other.push({label : this.effect.name, value : args.totalWoundLoss + 4}) + args.totalWoundLoss = (args.totalWoundLoss * 2) + 4 + } \ No newline at end of file diff --git a/scripts/KxM4zmhQRDHaRybM.js b/scripts/KxM4zmhQRDHaRybM.js new file mode 100644 index 0000000..13744b9 --- /dev/null +++ b/scripts/KxM4zmhQRDHaRybM.js @@ -0,0 +1,9 @@ +await this.actor.addCondition("blinded"); + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {appendTitle: ` - ${this.effect.name}`, skipTargets: true}); +await test.roll(); + +if (test.failed) +{ + await this.actor.addCondition("blinded"); +} \ No newline at end of file diff --git a/scripts/L3ehj3ud1OgjcgSv.js b/scripts/L3ehj3ud1OgjcgSv.js new file mode 100644 index 0000000..58b192b --- /dev/null +++ b/scripts/L3ehj3ud1OgjcgSv.js @@ -0,0 +1,3 @@ +if (!this.item.system.properties.qualities.fast) this.item.system.qualities.value.push({name : 'fast'}); + if (!this.item.system.properties.qualities.precise) this.item.system.qualities.value.push({name : 'precise'}) + if (!this.item.system.properties.qualities.penetrating) this.item.system.qualities.value.push({name : 'penetrating'}) \ No newline at end of file diff --git a/scripts/LLqAT9wEUGMLfDhU.js b/scripts/LLqAT9wEUGMLfDhU.js index 8cbf753..4102c46 100644 --- a/scripts/LLqAT9wEUGMLfDhU.js +++ b/scripts/LLqAT9wEUGMLfDhU.js @@ -1 +1 @@ -return !args.item?.system.isProjectiles \ No newline at end of file +return !args.item?.system.isRanged \ No newline at end of file diff --git a/scripts/Lj9H0O9XUk830CBt.js b/scripts/Lj9H0O9XUk830CBt.js new file mode 100644 index 0000000..57d3175 --- /dev/null +++ b/scripts/Lj9H0O9XUk830CBt.js @@ -0,0 +1,16 @@ +scatter = await game.wfrp4e.tables.rollTable("scatter"); +this.script.message(scatter.result); + +let distance = await new Roll("1d10").roll(); + +distance.toMessage(this.script.getChatData({flavor: "Distance (yds.)"})); + +let damage = await new Roll("1d10").roll(); +damage.toMessage(this.script.getChatData({flavor: "Dégâts"})); +this.actor.applyDamage(damage.total, { + damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, + createMessage: this.script.getChatData() +}); + + +this.actor.addCondition("prone"); \ No newline at end of file diff --git a/scripts/LxEhkvdSEQic8VZ6.js b/scripts/LxEhkvdSEQic8VZ6.js new file mode 100644 index 0000000..c5dff8c --- /dev/null +++ b/scripts/LxEhkvdSEQic8VZ6.js @@ -0,0 +1,33 @@ +let ingredients = this.actor.itemTypes.trapping.filter(i => i.system.trappingType.value == "ingredient"); + +if (ingredients.length == 0) +{ + return this.script.notification("Aucun ingrédient !"); +} +this.script.notification("Affecté : " + ingredients.map(i => i.name).join(", ")); + +for(let i of ingredients) +{ + await i.update({ + name: i.setSpecifier("Souillé"), + effects: [{ + name: "Souillé", + img: i.img, + system: { + transferData :{ + documentType: "Item" + }, + scriptData: [ + { + label: "Influence Maléfique", + script: "args.fields.malignantInfluence = true;", + trigger: "dialog", + options: { + activateScript: "return true;" + } + } + ] + } + }] + }); +} \ No newline at end of file diff --git a/scripts/MQAMuPF4QqXl76SZ.js b/scripts/MQAMuPF4QqXl76SZ.js new file mode 100644 index 0000000..10db4b5 --- /dev/null +++ b/scripts/MQAMuPF4QqXl76SZ.js @@ -0,0 +1 @@ +this.actor.addCondition("surprised"); \ No newline at end of file diff --git a/scripts/MeHXlZ66R3X8luFT.js b/scripts/MeHXlZ66R3X8luFT.js new file mode 100644 index 0000000..1a7830b --- /dev/null +++ b/scripts/MeHXlZ66R3X8luFT.js @@ -0,0 +1,6 @@ +let modifier = 0 + if (this.effect.name.includes("Moderate")) + modifier = -20 + else + modifier = -10 + args.fields.modifier += modifier \ No newline at end of file diff --git a/scripts/N0h848GEkBbRDK2x.js b/scripts/N0h848GEkBbRDK2x.js new file mode 100644 index 0000000..3770ffd --- /dev/null +++ b/scripts/N0h848GEkBbRDK2x.js @@ -0,0 +1 @@ +this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.MVI0lXcg6vvtooAF", this.effect); \ No newline at end of file diff --git a/scripts/N8oUaIkE2Ne571ia.js b/scripts/N8oUaIkE2Ne571ia.js new file mode 100644 index 0000000..0a2e9eb --- /dev/null +++ b/scripts/N8oUaIkE2Ne571ia.js @@ -0,0 +1,9 @@ +let roll = await new Roll("1d10 + @sin", {sin: this.actor.system.status.sin.value || 0}).roll(); +roll.toMessage(this.script.getChatData()); + +let skills = await ItemDialog.create(this.actor.itemTypes.skill, "unlimited", {text: "Select penalized Skills", title: this.effect.name}) +let names = skills?.map(i => i.name) || []; +this.effect.updateSource({name: this.effect.setSpecifier(names.join(", ")), "flags.wfrp4e.skills" : names, duration: { + value: roll.total, + units: "hours" +}}); \ No newline at end of file diff --git a/scripts/NNytXz5XFPrEF6dw.js b/scripts/NNytXz5XFPrEF6dw.js index ac177e6..3a2783d 100644 --- a/scripts/NNytXz5XFPrEF6dw.js +++ b/scripts/NNytXz5XFPrEF6dw.js @@ -1,4 +1,4 @@ -if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0) +if (args.loc == this.item.system.location.key && args.totalWoundLoss > 0) { args.actor.addCondition("bleeding", 1); } diff --git a/scripts/NO685xdEW0NtJCp7.js b/scripts/NO685xdEW0NtJCp7.js new file mode 100644 index 0000000..89833b6 --- /dev/null +++ b/scripts/NO685xdEW0NtJCp7.js @@ -0,0 +1,3 @@ +let roll = await new Roll("1d10").roll(); +roll.toMessage(this.script.getChatData()); +this.effect.updateSource({"duration" : {value: roll.total, units: "rounds"}}) \ No newline at end of file diff --git a/scripts/NQSvFWhmBQAyx5Zz.js b/scripts/NQSvFWhmBQAyx5Zz.js index 679b0b7..6f94648 100644 --- a/scripts/NQSvFWhmBQAyx5Zz.js +++ b/scripts/NQSvFWhmBQAyx5Zz.js @@ -1 +1 @@ -return args.item?.isProjectiles \ No newline at end of file +return args.item?.isRanged \ No newline at end of file diff --git a/scripts/Nd1djAF6dLEiLfwV.js b/scripts/Nd1djAF6dLEiLfwV.js new file mode 100644 index 0000000..201d280 --- /dev/null +++ b/scripts/Nd1djAF6dLEiLfwV.js @@ -0,0 +1,6 @@ +let roll = await new Roll("1d10 + @sin", {sin: this.actor.system.status.sin.value || 0}).roll(); +roll.toMessage(this.script.getChatData()); +this.effect.updateSource({duration: { + value: roll.total, + units: "rounds" +}}); \ No newline at end of file diff --git a/scripts/NgKdPxwH3vr6mkNi.js b/scripts/NgKdPxwH3vr6mkNi.js new file mode 100644 index 0000000..d44f74c --- /dev/null +++ b/scripts/NgKdPxwH3vr6mkNi.js @@ -0,0 +1 @@ +args.fields.slBonus += 3; \ No newline at end of file diff --git a/scripts/NkZrMO4YPiQf0N5Q.js b/scripts/NkZrMO4YPiQf0N5Q.js new file mode 100644 index 0000000..1533e7a --- /dev/null +++ b/scripts/NkZrMO4YPiQf0N5Q.js @@ -0,0 +1,7 @@ +let test = await this.actor.setupCharacteristic("wp", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "average"}, context : {failure: "1 point de Corruption gagné"}}) +await test.roll(); +if (test.failed && this.actor.type == "character") +{ + this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1}) + this.script.message("Gagné un point de Corruption", {whisper : ChatMessage.getWhisperRecipients("GM")}) +} \ No newline at end of file diff --git a/scripts/OAemeERMAeGv06pE.js b/scripts/OAemeERMAeGv06pE.js new file mode 100644 index 0000000..47b7077 --- /dev/null +++ b/scripts/OAemeERMAeGv06pE.js @@ -0,0 +1,3 @@ +let roll = await new Roll("1d5").roll(); +roll.toMessage(this.script.getChatData()); +this.actor.addCondition("ablaze", roll.total); \ No newline at end of file diff --git a/scripts/OUef2n36h6lbrsjx.js b/scripts/OUef2n36h6lbrsjx.js new file mode 100644 index 0000000..fc11f0d --- /dev/null +++ b/scripts/OUef2n36h6lbrsjx.js @@ -0,0 +1 @@ +if (!this.item.system.properties.qualities.precise) this.item.system.qualities.value.push({name : 'precise'}) \ No newline at end of file diff --git a/scripts/PaiSiMxCKx9IWmn1.js b/scripts/PaiSiMxCKx9IWmn1.js new file mode 100644 index 0000000..e61053c --- /dev/null +++ b/scripts/PaiSiMxCKx9IWmn1.js @@ -0,0 +1,2 @@ +this.actor.update({"system.status.corruption.value" : parseInt(this.actor.system.status.corruption.value) + 1}); +this.script.notification("Corruption ajoutée"); \ No newline at end of file diff --git a/scripts/Pc98GFZjvokeyUcs.js b/scripts/Pc98GFZjvokeyUcs.js new file mode 100644 index 0000000..e0869b1 --- /dev/null +++ b/scripts/Pc98GFZjvokeyUcs.js @@ -0,0 +1,6 @@ +let roll = await new Roll("1d10").roll(); +roll.toMessage(this.script.getChatData()); +this.effect.updateSource({duration: { + value: roll.total, + units: "rounds" +}}); \ No newline at end of file diff --git a/scripts/PjOi61gB2nSYooLs.js b/scripts/PjOi61gB2nSYooLs.js index 27d6865..983e697 100644 --- a/scripts/PjOi61gB2nSYooLs.js +++ b/scripts/PjOi61gB2nSYooLs.js @@ -1 +1 @@ -return this.sourceActor.uuid === this.actor.uuid || !args.item?.system?.isProjectiles; \ No newline at end of file +return this.sourceActor.uuid === this.actor.uuid || !args.item?.system?.isRanged; \ No newline at end of file diff --git a/scripts/PkHrZiuFokN0OyXi.js b/scripts/PkHrZiuFokN0OyXi.js new file mode 100644 index 0000000..3034123 --- /dev/null +++ b/scripts/PkHrZiuFokN0OyXi.js @@ -0,0 +1,4 @@ +if (args.test.result.critical) +{ + args.test.result.other.push(`${this.effect.name}: Can reverse Critical Wound roll`) +} \ No newline at end of file diff --git a/scripts/Q1trEhtqjIiDvFPF.js b/scripts/Q1trEhtqjIiDvFPF.js index b774017..99580b9 100644 --- a/scripts/Q1trEhtqjIiDvFPF.js +++ b/scripts/Q1trEhtqjIiDvFPF.js @@ -1 +1 @@ -args.prefillModifiers.modifier -= 10 * this.effect.system.condition.value \ No newline at end of file +args.fields.modifier -= 10 * this.effect.system.condition.value \ No newline at end of file diff --git a/scripts/QLE6dDm6Bns2J5Tl.js b/scripts/QLE6dDm6Bns2J5Tl.js new file mode 100644 index 0000000..b63f684 --- /dev/null +++ b/scripts/QLE6dDm6Bns2J5Tl.js @@ -0,0 +1,5 @@ +let property = this.effect.getFlag("wfrp4e", "property"); +if (property && !this.item.system.qualities.value.find(i => i.name == property)); +{ + this.item.system.qualities.value.push({name : property}); +} \ No newline at end of file diff --git a/scripts/QPuS9YsWAm4LUZWd.js b/scripts/QPuS9YsWAm4LUZWd.js new file mode 100644 index 0000000..b52f02a --- /dev/null +++ b/scripts/QPuS9YsWAm4LUZWd.js @@ -0,0 +1,7 @@ +let skills = this.actor.itemTypes.skill.filter(i => i.name == "Language (Magick)" || i.name.includes("Channelling")) +for(let skill of skills) +{ + await skill.update({"system.modifier.value" : -1 * skill.system.total.value}) +} + +this.script.notification("Modificateurs ajoutés aux compétences : " + skills.map(i => i.name).join(", "), "info", true); \ No newline at end of file diff --git a/scripts/Qo8q0P5j9OKEAP70.js b/scripts/Qo8q0P5j9OKEAP70.js new file mode 100644 index 0000000..d451879 --- /dev/null +++ b/scripts/Qo8q0P5j9OKEAP70.js @@ -0,0 +1,7 @@ +let locs = Object.values(this.actor.system.status.armour).map(i => i.label).filter(i => i); + +let location = locs[Math.floor(CONFIG.Dice.randomUniform() * (locs.length))]; + +this.script.notification(location); + +this.effect.updateSource({name: this.effect.setSpecifier(location)}); \ No newline at end of file diff --git a/scripts/R6SnyF3y4Vsq6oga.js b/scripts/R6SnyF3y4Vsq6oga.js index 9cb3f07..ebef6c4 100644 --- a/scripts/R6SnyF3y4Vsq6oga.js +++ b/scripts/R6SnyF3y4Vsq6oga.js @@ -2,7 +2,7 @@ let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase(); // If channelling corresponding lore if (args.type == "channelling" && args.spell.system.lore.value == lore) - args.prefillModifiers.slBonus += 1 + args.fields.slBonus += 1 // If channelling or casting different lore else if (args.spell.system.lore.value != lore && args.spell.system.lore.value != "petty") - args.prefillModifiers.slBonus -= 1 \ No newline at end of file + args.fields.slBonus -= 1 \ No newline at end of file diff --git a/scripts/RKIFGN583PQnqHGk.js b/scripts/RKIFGN583PQnqHGk.js index 865cf57..70e742e 100644 --- a/scripts/RKIFGN583PQnqHGk.js +++ b/scripts/RKIFGN583PQnqHGk.js @@ -1,4 +1,4 @@ -if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0) +if (args.loc == "body" && args.totalWoundLoss > 0) { args.actor.addCondition("bleeding", 2) this.script.message("Gain de 2 états Hémorragique") diff --git a/scripts/RRK91ySi5SzYCRvy.js b/scripts/RRK91ySi5SzYCRvy.js index bafc503..cd8a949 100644 --- a/scripts/RRK91ySi5SzYCRvy.js +++ b/scripts/RRK91ySi5SzYCRvy.js @@ -1 +1 @@ -return args.weapon?.system.isProjectiles \ No newline at end of file +return args.weapon?.system.isRanged \ No newline at end of file diff --git a/scripts/RUpVgB0czqg95K1Q.js b/scripts/RUpVgB0czqg95K1Q.js index cb6a162..2e870ce 100644 --- a/scripts/RUpVgB0czqg95K1Q.js +++ b/scripts/RUpVgB0czqg95K1Q.js @@ -1,4 +1,4 @@ -if (this.item.system.protects[args.opposedTest.result.hitloc.value]) +if (this.item.system.protects[args.loc]) { args.weaponProperties.qualities.penetrating = false; } \ No newline at end of file diff --git a/scripts/RZibsagclQO5U6o9.js b/scripts/RZibsagclQO5U6o9.js new file mode 100644 index 0000000..b8e4df1 --- /dev/null +++ b/scripts/RZibsagclQO5U6o9.js @@ -0,0 +1 @@ +this.actor.modifyAdvantage(1) \ No newline at end of file diff --git a/scripts/SDwuKuqTsCBZ6hnb.js b/scripts/SDwuKuqTsCBZ6hnb.js new file mode 100644 index 0000000..20f594f --- /dev/null +++ b/scripts/SDwuKuqTsCBZ6hnb.js @@ -0,0 +1,9 @@ +if (args.totalWoundLoss > 0 && this.item.protects[args.loc]) +{ + let roll = await new Roll("1d10").roll(); + roll.toMessage(this.script.getChatData()) + if (roll.total == 10) + { + args.abort = this.effect.name + } +} \ No newline at end of file diff --git a/scripts/SO4Aa9argKbuO9rQ.js b/scripts/SO4Aa9argKbuO9rQ.js index 2af913b..9338454 100644 --- a/scripts/SO4Aa9argKbuO9rQ.js +++ b/scripts/SO4Aa9argKbuO9rQ.js @@ -1 +1 @@ -args.prefillModifiers.modifier -= 20 \ No newline at end of file +args.fields.modifier -= 20 \ No newline at end of file diff --git a/scripts/SVnclT81zDqRLE5E.js b/scripts/SVnclT81zDqRLE5E.js new file mode 100644 index 0000000..6a3329b --- /dev/null +++ b/scripts/SVnclT81zDqRLE5E.js @@ -0,0 +1 @@ +args.test.result.other.push(`${this.effect.name}: @Fear[1,${this.actor.prototypeToken.name}]`) \ No newline at end of file diff --git a/scripts/SdZ7xAEzJGVDCsaI.js b/scripts/SdZ7xAEzJGVDCsaI.js new file mode 100644 index 0000000..7c7dc4b --- /dev/null +++ b/scripts/SdZ7xAEzJGVDCsaI.js @@ -0,0 +1,28 @@ +let damage = await new Roll("2d10 + @sin", {sin: this.actor.system.status.sin.value || 0}).roll(); +damage.toMessage(this.script.getChatData()); +this.actor.applyDamage(damage.total, { + damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, + createMessage: this.script.getChatData() +}); + +const test = await this.actor.setupSkill( + game.i18n.localize("NAME.Endurance"), + { + fields: {difficulty: "hard"}, + skipTargets: true, + appendTitle: ` — ${this.effect.name}`, + }, +); + +await test.roll(); +if (test.failed) +{ + if (parseInt(test.result.SL) <= -4) + { + this.actor.addCondition("unconscious"); + } + else + { + this.actor.addCondition("stunned"); + } +} \ No newline at end of file diff --git a/scripts/SdrCM66oViwRFF8I.js b/scripts/SdrCM66oViwRFF8I.js new file mode 100644 index 0000000..d087228 --- /dev/null +++ b/scripts/SdrCM66oViwRFF8I.js @@ -0,0 +1,2 @@ +await this.actor.addCondition("prone"); +await this.actor.addCondition("blinded", 1 + this.actor.system.status.sin?.value || 0) \ No newline at end of file diff --git a/scripts/SwliIjjjFtZMnJH3.js b/scripts/SwliIjjjFtZMnJH3.js index b736977..c5bb8b8 100644 --- a/scripts/SwliIjjjFtZMnJH3.js +++ b/scripts/SwliIjjjFtZMnJH3.js @@ -1 +1 @@ -return !args.weapon?.system.properties.qualities.hack || args.weapon?.system?.isProjectiles \ No newline at end of file +return !args.weapon?.system.properties.qualities.hack || args.weapon?.system?.isRanged \ No newline at end of file diff --git a/scripts/UINefUJZN0GjcCbB.js b/scripts/UINefUJZN0GjcCbB.js new file mode 100644 index 0000000..c3e1aa6 --- /dev/null +++ b/scripts/UINefUJZN0GjcCbB.js @@ -0,0 +1,6 @@ +if (args.type == "cast") +{ + args.abort = true; + this.script.notification("Impossible de lancer des sorts !"); +} +return true; \ No newline at end of file diff --git a/scripts/UbGzr86u3wqSEr2h.js b/scripts/UbGzr86u3wqSEr2h.js new file mode 100644 index 0000000..af9259e --- /dev/null +++ b/scripts/UbGzr86u3wqSEr2h.js @@ -0,0 +1,9 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty : "average"}, appendTitle : " - Wounded"}) + await test.roll(); + if (test.failed) + { + fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb").then(disease => { + this.actor.createEmbeddedDocuments("Item", [disease.toObject()]) + this.script.scriptNotification("Gained " + disease.name) + }) + } \ No newline at end of file diff --git a/scripts/V1KCAPGMPvAz3F3g.js b/scripts/V1KCAPGMPvAz3F3g.js new file mode 100644 index 0000000..e9f28eb --- /dev/null +++ b/scripts/V1KCAPGMPvAz3F3g.js @@ -0,0 +1,6 @@ +let roll = await new Roll("1d10 + @sin", {sin: this.actor.system.status.sin.value || 0}).roll(); +roll.toMessage(this.script.getChatData()); +this.effect.updateSource({duration: { + value: roll.total, + units: "days" +}}); \ No newline at end of file diff --git a/scripts/V9zm2hKUVLVZtAcN.js b/scripts/V9zm2hKUVLVZtAcN.js index 3b5230f..9c0d51b 100644 --- a/scripts/V9zm2hKUVLVZtAcN.js +++ b/scripts/V9zm2hKUVLVZtAcN.js @@ -10,10 +10,10 @@ let characteristics = { "wp" : 10, "fel" : 10 } -let skills = ["Charme", "Focalisation", "Entertain (Prophecy)", "Intuition"] +let skills = ["Charme", "Focalisation", "Entertain (Prophétie)", "Intuition"] let skillAdvancements = [0, 0, 20, 10] -let talents = ["Détection d’artefact", "Menaçant", "Sixième Sens"] -let traits = ["Condamné", "Spellcaster (Lore of Life)", "Protection"] +let talents = ["Détection d'artefact", "Menaçant", "Sixième Sens"] +let traits = ["Condamné", "Lanceur de sorts (Voie de la vie)", "Protection"] let trappings = [] let items = []; let spells = ["Forêt d'épines"]; @@ -27,14 +27,14 @@ for (let ch in characteristics) for (let index = 0; index < skills.length; index++) { - let Compétence = skills[index] + let skill = skills[index] let skillItem; - skillItem = updateObj.items.find(i => i.name == Compétence && i.type == "Compétence") + skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill") if (skillItem) skillItem.system.advances.value += skillAdvancements[index] else { - skillItem = await game.wfrp4e.utility.findSkill(Compétence) + skillItem = await game.wfrp4e.utility.findSkill(skill) skillItem = skillItem.toObject(); skillItem.system.advances.value = skillAdvancements[index]; items.push(skillItem); @@ -50,7 +50,7 @@ for (let talent of talents) } else { - ui.notifications.warn(`Could not find ${talent}`, {permanent : true}) + ui.notifications.warn(`Introuvable : ${talent}`, {permanent : true}) } } @@ -59,58 +59,32 @@ for (let trait of traits) { let traitMatches = trait.matchAll(traitRegex).next().value let traitName = traitMatches[1] - let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there'}`).trim() + let traitVal = traitMatches[2] || traitMatches[4] // could be match 2 or 4 depending on if there's a specialization + let traitSpec = traitMatches[3] + + let traitItem; + try { + traitItem = await WFRP_Utility.findItem(traitName, "trait") } - else - traitItem.system.specification.value = traitSpec + catch { } + if (!traitItem) { + ui.notifications.warn(`Introuvable : ${trait}`, {permanent : true}) + } + traitItem = traitItem.toObject() - items.push(traitItem) - -} - -for (let trapping of trappings) -{ - let trappingItem = await game.wfrp4e.utility.findItem(trapping) - if (trappingItem) + if (Number.isNumeric(traitVal)) { - trappingItem = trappingItem.toObject() - - trappingItem.system.equipped.value = true; - - items.push(trappingItem); - } - else - { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) - } -} - -for (let spell of spells) -{ - let spellItem = await game.wfrp4e.utility.findItem(spell) - if (spellItem) - { - spellItem = spellItem.toObject() - - items.push(spellItem); - } - else - { - ui.notifications.warn(`Could not find ${spell}`, {permanent : true}) - } -} - -updateObj.name = updateObj.name +='Arme','Cornes','Tail','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal; + traitItem.system.specification.value = traitName.includes('Arme','Cornes','Queue','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal; traitItem.name = (traitItem.name + ` ${traitSpec ? "("+ traitSpec + ")" : ""}`).trim() } - else + else traitItem.system.specification.value = traitSpec items.push(traitItem) } -for (let trapping of trappings) +for (let trapping of trappings) { let trappingItem = await game.wfrp4e.utility.findItem(trapping) if (trappingItem) @@ -121,13 +95,13 @@ for (let trapping of trappings) items.push(trappingItem); } - else + else { - ui.notifications.warn(`Could not find ${trapping}`, {permanent : true}) + ui.notifications.warn(`Introuvable : ${trapping}`, {permanent : true}) } } -for (let spell of spells) +for (let spell of spells) { let spellItem = await game.wfrp4e.utility.findItem(spell) if (spellItem) @@ -136,13 +110,13 @@ for (let spell of spells) items.push(spellItem); } - else + else { - ui.notifications.warn(`Could not find ${spell}`, {permanent : true}) + ui.notifications.warn(`Introuvable : ${spell}`, {permanent : true}) } } updateObj.name = updateObj.name += " " + this.effect.name await this.actor.update(updateObj) -this.actor.createEmbeddedDocuments("Item", items); \ No newline at end of file +this.actor.createEmbeddedDocuments("Item", items); diff --git a/scripts/VM2zbABURI9K3JwQ.js b/scripts/VM2zbABURI9K3JwQ.js new file mode 100644 index 0000000..f025155 --- /dev/null +++ b/scripts/VM2zbABURI9K3JwQ.js @@ -0,0 +1,3 @@ +if (!this.item.system.properties.qualities.pummel) this.item.system.qualities.value.push({name : 'pummel'}); + if (!this.item.system.properties.qualities.impale) this.item.system.qualities.value.push({name : 'impale'}) + if (!this.item.system.properties.qualities.penetrating) this.item.system.qualities.value.push({name : 'penetrating'}) \ No newline at end of file diff --git a/scripts/VUFST9Tb3zL9vWvg.js b/scripts/VUFST9Tb3zL9vWvg.js new file mode 100644 index 0000000..b81c5f9 --- /dev/null +++ b/scripts/VUFST9Tb3zL9vWvg.js @@ -0,0 +1 @@ +if (this.item.attackType == "ranged") args.initiative += "+10" \ No newline at end of file diff --git a/scripts/VYw9ipwoHArGVnyW.js b/scripts/VYw9ipwoHArGVnyW.js new file mode 100644 index 0000000..af41d14 --- /dev/null +++ b/scripts/VYw9ipwoHArGVnyW.js @@ -0,0 +1,12 @@ +if (args.equipped) +{ + this.script.notification("Frénésie !") + let frenzy = (await fromUuid("Compendium.wfrp4e-core.items.Item.yRhhOlt18COq4e1q.ActiveEffect.ydTMvbmqv6BZ4u6d")).toObject(); + frenzy.statuses = ["frenzy"]; + frenzy.disabled = false; + ActiveEffect.implementation.create(frenzy, {parent: this.actor}); +} +else +{ + this.actor.effects.find(e => e.statuses.has("frenzy"))?.delete(); +} \ No newline at end of file diff --git a/scripts/VswXxqDjU9IH8dX0.js b/scripts/VswXxqDjU9IH8dX0.js new file mode 100644 index 0000000..dd1c989 --- /dev/null +++ b/scripts/VswXxqDjU9IH8dX0.js @@ -0,0 +1 @@ +this.actor.addCondition("broken", 1 + this.actor.system.status.sin?.value || 0) \ No newline at end of file diff --git a/scripts/W9nyUNQStMr1pUHJ.js b/scripts/W9nyUNQStMr1pUHJ.js index fd0843c..60ba96f 100644 --- a/scripts/W9nyUNQStMr1pUHJ.js +++ b/scripts/W9nyUNQStMr1pUHJ.js @@ -1,4 +1,4 @@ -if (args.opposedTest.result.hitloc.value == this.item.system.location.key) +if (args.loc == this.item.system.location.key) { args.actor.addCondition("bleeding", 1); this.script.notification("Etat Hémorragique ajouté") diff --git a/scripts/WDN1kNe7lMc3Zf3d.js b/scripts/WDN1kNe7lMc3Zf3d.js new file mode 100644 index 0000000..34accb7 --- /dev/null +++ b/scripts/WDN1kNe7lMc3Zf3d.js @@ -0,0 +1,8 @@ +if (args.equipped) +{ + this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.pTorrE0l3VybAbtn", this.effect, {"system.specification.value" : 1}) +} +else +{ + this.effect.deleteCreatedItems(); +} \ No newline at end of file diff --git a/scripts/WP6opTZkvX3xwtJI.js b/scripts/WP6opTZkvX3xwtJI.js new file mode 100644 index 0000000..857d217 --- /dev/null +++ b/scripts/WP6opTZkvX3xwtJI.js @@ -0,0 +1,2 @@ +this.actor.setWounds(0); +this.actor.addCondition("ablaze"); \ No newline at end of file diff --git a/scripts/Wo4wQKUxSItAhRzZ.js b/scripts/Wo4wQKUxSItAhRzZ.js index 0923471..ec666c9 100644 --- a/scripts/Wo4wQKUxSItAhRzZ.js +++ b/scripts/Wo4wQKUxSItAhRzZ.js @@ -2,7 +2,7 @@ let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase(); // If channelling corresponding lore if (args.type == "channelling" && args.spell.system.lore.value == lore) - args.prefillModifiers.slBonus += 3 + args.fields.slBonus += 3 // If channelling or casting different lore else if (args.spell.system.lore.value != lore && args.spell.system.lore.value != "petty") - args.prefillModifiers.slBonus -= 1 \ No newline at end of file + args.fields.slBonus -= 1 \ No newline at end of file diff --git a/scripts/YdiQFkm8j48Xs7gI.js b/scripts/YdiQFkm8j48Xs7gI.js index d94a809..8698f92 100644 --- a/scripts/YdiQFkm8j48Xs7gI.js +++ b/scripts/YdiQFkm8j48Xs7gI.js @@ -1,4 +1,4 @@ -if (args.totalWoundLoss > 0 && args.opposedTest.attackerTest.result.critical && args.opposedTest.result.hitloc.value == "head") { +if (args.totalWoundLoss > 0 && args.opposedTest.attackerTest.result.critical && args.loc == "head") { let brainRot = await fromUuid("Compendium.wfrp4e-lustria.items.Item.IsNQH867Y58pZgq6"); args.test.targets[0].createEmbeddedDocuments("Item", [brainRot], {fromEffect : this.effect.id}); this.script.scriptMessage(`${args.test.targets[0].name} has been infected by Brain Rot`); diff --git a/scripts/YjKiWcx7d2nwPy4L.js b/scripts/YjKiWcx7d2nwPy4L.js new file mode 100644 index 0000000..123a76b --- /dev/null +++ b/scripts/YjKiWcx7d2nwPy4L.js @@ -0,0 +1,6 @@ +if (args.applyAP) +{ + let nonmagical = args.modifiers.ap.value - args.modifiers.ap.magical + args.modifiers.ap.ignored += nonmagical + args.modifiers.ap.details.push("" + this.effect.name + ": Ignore Non-Magical AP (" + nonmagical + ")"); +} \ No newline at end of file diff --git a/scripts/ZCrfdLPOxiNDCDSg.js b/scripts/ZCrfdLPOxiNDCDSg.js index 962ecfb..dfcbf82 100644 --- a/scripts/ZCrfdLPOxiNDCDSg.js +++ b/scripts/ZCrfdLPOxiNDCDSg.js @@ -1 +1 @@ -this.actor.effects.get(this.effect.id).delete(); // can't use this.effet because it thinks it's parent is the item, but it actually is the actor \ No newline at end of file +this.actor.effects.get(this.effect.id).delete(); // can't use this.effect because it thinks it's parent is the item, but it actually is the actor \ No newline at end of file diff --git a/scripts/ZCuOjLAeENKN1Q4L.js b/scripts/ZCuOjLAeENKN1Q4L.js index 4667394..bce559b 100644 --- a/scripts/ZCuOjLAeENKN1Q4L.js +++ b/scripts/ZCuOjLAeENKN1Q4L.js @@ -1,11 +1,11 @@ let halve; -if (args.opposedTest.attackerTest.item?.type != "spell") +if (args.sourceItem?.type != "spell") { halve = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : "Divisé les dégats par deux? (Divise les dégats de tout feu par deux)"}) } else { - halve = args.opposedTest.attackerTest.item?.system.lore?.value == "fire"; + halve = args.sourceItem?.system.lore?.value == "fire"; } if (halve) diff --git a/scripts/ZZb57zYE7bJy7rfU.js b/scripts/ZZb57zYE7bJy7rfU.js new file mode 100644 index 0000000..9872d27 --- /dev/null +++ b/scripts/ZZb57zYE7bJy7rfU.js @@ -0,0 +1,8 @@ +let damage = await new Roll("1d10").roll(); +damage.toMessage(this.script.getChatData()); +this.actor.applyDamage(damage.total, { + damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, + createMessage: this.script.getChatData() +}); + +this.actor.addCondition("prone"); \ No newline at end of file diff --git a/scripts/aSFPODz31zynXho3.js b/scripts/aSFPODz31zynXho3.js new file mode 100644 index 0000000..3e25c8d --- /dev/null +++ b/scripts/aSFPODz31zynXho3.js @@ -0,0 +1 @@ +let char = this.item.attackType == "melee" ? "ws" : "bs"; args.actor.system.characteristics[char].modifier += 20 \ No newline at end of file diff --git a/scripts/abLWYtNTu1UVDQAs.js b/scripts/abLWYtNTu1UVDQAs.js index 551994a..ac92738 100644 --- a/scripts/abLWYtNTu1UVDQAs.js +++ b/scripts/abLWYtNTu1UVDQAs.js @@ -1,4 +1,4 @@ -if (args.opposedTest.result.hitloc.value == this.effect.flags.wfrp4e.location) // e.g. 'head', rLeg, 'lArm' +if (args.loc == this.effect.flags.wfrp4e.location) // e.g. 'head', rLeg, 'lArm' { this.message(`Gains a @Condition[Blinded] condition as their ${this.item.name} was hit`); this.actor.addCondition("blinded"); diff --git a/scripts/b44tTtRjmI5jdihB.js b/scripts/b44tTtRjmI5jdihB.js new file mode 100644 index 0000000..29fa1c5 --- /dev/null +++ b/scripts/b44tTtRjmI5jdihB.js @@ -0,0 +1 @@ +let shield = this.item.system.qualities.value.find(q => q.name == 'shield'); shield.value++ \ No newline at end of file diff --git a/scripts/bBdXzBmxgFFBwMMS.js b/scripts/bBdXzBmxgFFBwMMS.js index 0ff3acd..308f7f6 100644 --- a/scripts/bBdXzBmxgFFBwMMS.js +++ b/scripts/bBdXzBmxgFFBwMMS.js @@ -1,4 +1,4 @@ -if(args.opposedTest.attackerTest.item?.isProjectiles && args.applyAP && !args.sureShot) +if(args.sourceItem?.isRanged && args.applyAP && !args.sureShot) { if (args.modifiers.ap.value) { diff --git a/scripts/bHxGutf5lZy0kciK.js b/scripts/bHxGutf5lZy0kciK.js new file mode 100644 index 0000000..f29f8d2 --- /dev/null +++ b/scripts/bHxGutf5lZy0kciK.js @@ -0,0 +1,21 @@ +if (!(await this.script.dialog("Ce processus est irréversible, continuer ?"))) +{ + return; +} + +let items = [this.actor.itemTypes.talent.find(i => i.baseName == "Bless"), this.actor.itemTypes.talent.find(i => i.baseName == "Invoke")].filter(i => i); +let skill = this.actor.itemTypes.skill.find(i => i.name == game.i18n.localize("NAME.Pray")); + +this.script.notification("Suppression de " + items.map(i => i.name).join(", ")); +await Promise.all(items.map(i => i.delete())); + +if (skill) +{ + this.script.notification(`Suppression des avances de Prière (${skill.system.advances.value})`) + skill.update({"system.advances.value" : 0}, {skipExperienceChecks : true}) +} + +for(let i of this.actor.itemTypes.prayer) +{ + i.delete(); +} \ No newline at end of file diff --git a/scripts/bLkt8VpTTPoTxW0W.js b/scripts/bLkt8VpTTPoTxW0W.js index b2cfafb..a1aead1 100644 --- a/scripts/bLkt8VpTTPoTxW0W.js +++ b/scripts/bLkt8VpTTPoTxW0W.js @@ -1,4 +1,4 @@ -if (args.opposedTest.result.hitloc.value == "body" && args.totalWoundLoss > 0) +if (args.loc == "body" && args.totalWoundLoss > 0) { args.actor.addCondition("bleeding", 1); this.script.notification("Etat Hémorragique ajouté") diff --git a/scripts/bYXlyiRXtdRGYlm0.js b/scripts/bYXlyiRXtdRGYlm0.js new file mode 100644 index 0000000..b455750 --- /dev/null +++ b/scripts/bYXlyiRXtdRGYlm0.js @@ -0,0 +1,6 @@ +let quality = this.effect.getFlag("wfrp4e", "quality"); + +if (quality) +{ + this.item.system.qualities.value.push({name : quality}) +} \ No newline at end of file diff --git a/scripts/brNRqfpPqD2Ki0cM.js b/scripts/brNRqfpPqD2Ki0cM.js index e7cf66e..22d98fa 100644 --- a/scripts/brNRqfpPqD2Ki0cM.js +++ b/scripts/brNRqfpPqD2Ki0cM.js @@ -1 +1 @@ -args.prefillModifiers.modifier -= 10 \ No newline at end of file +args.fields.modifier -= 10 \ No newline at end of file diff --git a/scripts/cBSy9CR5NZvcLRg8.js b/scripts/cBSy9CR5NZvcLRg8.js index 0605d32..cdf0a70 100644 --- a/scripts/cBSy9CR5NZvcLRg8.js +++ b/scripts/cBSy9CR5NZvcLRg8.js @@ -1,5 +1,5 @@ - args.prefillModifiers.modifier += 0; - args.prefillModifiers.slBonus += 0; - args.prefillModifiers.successBonus += 0; + args.fields.modifier += 0; + args.fields.slBonus += 0; + args.fields.successBonus += 0; \ No newline at end of file diff --git a/scripts/cOuukVo8WakDZIUj.js b/scripts/cOuukVo8WakDZIUj.js index 09d3397..b0dbc02 100644 --- a/scripts/cOuukVo8WakDZIUj.js +++ b/scripts/cOuukVo8WakDZIUj.js @@ -1 +1 @@ -args.prefillModifiers.slBonus += 1 \ No newline at end of file +args.fields.slBonus += 1 \ No newline at end of file diff --git a/scripts/cPdtoRmvRC8PqH3x.js b/scripts/cPdtoRmvRC8PqH3x.js new file mode 100644 index 0000000..d651eaa --- /dev/null +++ b/scripts/cPdtoRmvRC8PqH3x.js @@ -0,0 +1 @@ +if (!this.item.system.properties.qualities.fast) this.item.system.qualities.value.push({name : 'fast'}) \ No newline at end of file diff --git a/scripts/ch5SD2XOQfcYo0X5.js b/scripts/ch5SD2XOQfcYo0X5.js index bdb8570..8f9187e 100644 --- a/scripts/ch5SD2XOQfcYo0X5.js +++ b/scripts/ch5SD2XOQfcYo0X5.js @@ -2,7 +2,7 @@ if (args.sizeDiff <= -2 && args.opposedTest.attackerTest.result.critical) args.damageMultiplier = Math.abs(args.sizeDiff) let sBonusDiff = args.opposedTest.defenderTest.actor.characteristics.t.bonus - args.opposedTest.attackerTest.actor.characteristics.s.bonus - let weapon = args.opposedTest.attackerTest.item + let weapon = args.sourceItem if (sBonusDiff > 0 && weapon && weapon.damage.value.includes("SB")) { args.damage += sBonusDiff diff --git a/scripts/chDtEQZoRMOrm2eE.js b/scripts/chDtEQZoRMOrm2eE.js new file mode 100644 index 0000000..cd0c70e --- /dev/null +++ b/scripts/chDtEQZoRMOrm2eE.js @@ -0,0 +1 @@ +this.actor.addCondition("bleeding"); \ No newline at end of file diff --git a/scripts/chUpiI3el8IO8MSs.js b/scripts/chUpiI3el8IO8MSs.js index 755d158..9ec51ee 100644 --- a/scripts/chUpiI3el8IO8MSs.js +++ b/scripts/chUpiI3el8IO8MSs.js @@ -1,6 +1,6 @@ -if (args.opposedTest.attackerTest.item?.name.includes("Morsure")) +if (args.sourceItem?.name.includes("Morsure")) { let woundsGained = args.totalWoundLoss; - this.script.message(`Gains ${woundsGained} Wounds`, { whisper: ChatMessage.getWhisperRecipients("GM") }) + this.script.message(`Gagne ${woundsGained} Blessures`, { whisper: ChatMessage.getWhisperRecipients("GM") }) this.actor.modifyWounds(woundsGained) } \ No newline at end of file diff --git a/scripts/chiUvs66IHiKTOcN.js b/scripts/chiUvs66IHiKTOcN.js new file mode 100644 index 0000000..9e922cd --- /dev/null +++ b/scripts/chiUvs66IHiKTOcN.js @@ -0,0 +1,4 @@ +if (args.totalWoundLoss > 0) + { + this.script.scriptMessage("All wounds caused by this weapon are @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wounds}", {whisper : ChatMessage.getWhisperRecipients("GM")}) + } \ No newline at end of file diff --git a/scripts/cysQDjlDzT8HdNeo.js b/scripts/cysQDjlDzT8HdNeo.js index 05ab52f..d9faa21 100644 --- a/scripts/cysQDjlDzT8HdNeo.js +++ b/scripts/cysQDjlDzT8HdNeo.js @@ -1 +1 @@ - args.prefillModifiers.slBonus += 1 \ No newline at end of file + args.fields.slBonus += 1 \ No newline at end of file diff --git a/scripts/dLlcg8m8eiaVBmTg.js b/scripts/dLlcg8m8eiaVBmTg.js new file mode 100644 index 0000000..b708549 --- /dev/null +++ b/scripts/dLlcg8m8eiaVBmTg.js @@ -0,0 +1,37 @@ +if (this.effect.sourceActor) +{ + this.effect.updateSource({"system.changes": null}); + return; +} + +let colors = { + fire : "#b22222", + heavens : "#87ceeb", + metal : "#ee9b3a", + shadow : "#808080", + life : "#008000", + beasts : "#a52a2a", + light : "#f0ffff", + death : "#800080", + necromancy : "#800080", + daemonology : "#8b0000" +}; + +let spell = this.actor.itemTypes.spell.find(i => Object.keys(colors).includes(i.system.lore.value[0])); + +let color; +if (spell) +{ + color = colors[spell.system.lore.value[0]]; +} +else +{ + color = Object.values(colors)[Math.ceil(CONFIG.Dice.randomUniform() * 10)]; +} + +this.effect.updateSource({"system.changes": [ + {key: "token.light.animation.type", type: "override", value: "flame"}, + {key: "token.light.dim", type: "override", value: 30}, + {key: "token.light.bright", type: "override", value: this.actor.system.characteristics.wp.bonus}, + {key: "token.light.color", type: "override", value: color} +]}); \ No newline at end of file diff --git a/scripts/dM449AU0FQRnOc3l.js b/scripts/dM449AU0FQRnOc3l.js index 992c1e4..69aee6f 100644 --- a/scripts/dM449AU0FQRnOc3l.js +++ b/scripts/dM449AU0FQRnOc3l.js @@ -1,4 +1,4 @@ -if (args.opposedTest.result.hitloc.value == "head") +if (args.loc == "head") { args.abort = "Missed - Headless" } \ No newline at end of file diff --git a/scripts/drolLZoNuAXQFuPH.js b/scripts/drolLZoNuAXQFuPH.js new file mode 100644 index 0000000..fe46ec4 --- /dev/null +++ b/scripts/drolLZoNuAXQFuPH.js @@ -0,0 +1,9 @@ +if (args.totalWoundLoss > 0 && this.item.protects[args.loc]) +{ + let roll = await new Roll("1d10").roll(); + roll.toMessage(this.script.getChatData()) + if (roll.total >= 9) + { + args.abort = this.effect.name + } +} \ No newline at end of file diff --git a/scripts/dtHJFFp2mmVsfil3.js b/scripts/dtHJFFp2mmVsfil3.js new file mode 100644 index 0000000..3adc036 --- /dev/null +++ b/scripts/dtHJFFp2mmVsfil3.js @@ -0,0 +1,8 @@ +if (args.test.failed) + { + let applicableCharacteristics = ["ws", "bs", "s", "fel", "ag", "t", "dex"]; + if (applicableCharacteristics.includes(args.test.characteristicKey)) + { + this.actor.addCondition("stunned"); + } + } \ No newline at end of file diff --git a/scripts/dtQH7ZBKfzewtTsq.js b/scripts/dtQH7ZBKfzewtTsq.js new file mode 100644 index 0000000..2aadb3f --- /dev/null +++ b/scripts/dtQH7ZBKfzewtTsq.js @@ -0,0 +1,6 @@ +let damage = await new Roll("1d10 + 4").roll(); +damage.toMessage(this.script.getChatData()); +this.actor.applyDamage(damage.total, { + damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, + createMessage: this.script.getChatData() +}); \ No newline at end of file diff --git a/scripts/e7IxnxePdXSy6L4E.js b/scripts/e7IxnxePdXSy6L4E.js index 6b19fc6..ce97804 100644 --- a/scripts/e7IxnxePdXSy6L4E.js +++ b/scripts/e7IxnxePdXSy6L4E.js @@ -1,4 +1,4 @@ -if (args.opposedTest.result.hitloc.value == "head") +if (args.loc == "head") { this.script.message(`${this.actor.prototypeToken.name} receives a @Table[crithead]{Critical Wound} if one was not caused already.`) } \ No newline at end of file diff --git a/scripts/egDtqMxe3iekc6hv.js b/scripts/egDtqMxe3iekc6hv.js index d73942d..fb51509 100644 --- a/scripts/egDtqMxe3iekc6hv.js +++ b/scripts/egDtqMxe3iekc6hv.js @@ -1,4 +1,4 @@ -let trait = args.opposedTest.attackerTest.item +let trait = args.sourceItem let woundLossEffect = this.item.effects.get("7Amhi75wLv0PvGjd") if (trait && trait.name.includes("Morsure") && woundLossEffect) { diff --git a/scripts/f4vvAGQ8OGoEbrgy.js b/scripts/f4vvAGQ8OGoEbrgy.js index 292f8e5..13a3637 100644 --- a/scripts/f4vvAGQ8OGoEbrgy.js +++ b/scripts/f4vvAGQ8OGoEbrgy.js @@ -1,4 +1,4 @@ -let SL = args.opposedTest.attackerTest.result.SL - args.opposedTest.attackerTest.item.cn.value +let SL = args.opposedTest.attackerTest.result.SL - args.sourceItem.cn.value let difficulty = "challenging" if (SL >= 1) difficulty = "difficult" diff --git a/scripts/fFGuTi0HLjwneMcJ.js b/scripts/fFGuTi0HLjwneMcJ.js index 0f643a3..33216f3 100644 --- a/scripts/fFGuTi0HLjwneMcJ.js +++ b/scripts/fFGuTi0HLjwneMcJ.js @@ -1 +1 @@ -return args.item?.system.isProjectiles \ No newline at end of file +return args.item?.system.isRanged \ No newline at end of file diff --git a/scripts/fSDFCHAo97RLpwGU.js b/scripts/fSDFCHAo97RLpwGU.js index eea226d..9cd0d04 100644 --- a/scripts/fSDFCHAo97RLpwGU.js +++ b/scripts/fSDFCHAo97RLpwGU.js @@ -1,9 +1,15 @@ const hitLocation = args.test.hitloc.result -const hitLocationArmour = args.test.targets[0].armour[hitLocation] +const hitLocationArmour = args.test.targets[0]?.armour[hitLocation] -if (hitLocationArmour.layers.length > 0) { - hitLocationArmour.layers.forEach(layer => { - layer.source.system.qualities.value = []; - layer.impenetrable = false; - }); -} \ No newline at end of file +if (hitLocationArmour) +{ + let qualities = []; + for (let layer of hitLocationArmour.layers) + { + qualities = qualities.concat(layer.source.system.qualities.value); + } + + qualities = new Set(qualities); // supprimer les doublons + + this.script.message(`Ignore ${Array.from(qualities).map(i => game.wfrp4e.config.armorQualities[i.name]).join(", ")}`); +} diff --git a/scripts/fWNVINMVhEwf8k5b.js b/scripts/fWNVINMVhEwf8k5b.js new file mode 100644 index 0000000..0775e3d --- /dev/null +++ b/scripts/fWNVINMVhEwf8k5b.js @@ -0,0 +1,9 @@ +this.actor.addCondition("stunned"); +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {appendTitle: ` - ${this.effect.name}`, skipTargets: true, fields: {difficulty: "vhard"}}); + +await test.roll(); + +if (test.failed) +{ + this.actor.addCondition("prone"); +} \ No newline at end of file diff --git a/scripts/fsvXI7tuL69Ukmec.js b/scripts/fsvXI7tuL69Ukmec.js new file mode 100644 index 0000000..7c8e405 --- /dev/null +++ b/scripts/fsvXI7tuL69Ukmec.js @@ -0,0 +1,4 @@ +if (args.item.type == "skill" && (args.item.name == "Language (Magick)" || args.item.name.includes("Channelling"))) +{ + args.item.system.modifier.value -= Math.floor(args.item.system.advances.value / 2) +} \ No newline at end of file diff --git a/scripts/g8Tmet9Ii3NvFqvf.js b/scripts/g8Tmet9Ii3NvFqvf.js new file mode 100644 index 0000000..a7e28a5 --- /dev/null +++ b/scripts/g8Tmet9Ii3NvFqvf.js @@ -0,0 +1 @@ +this.actor.addCondition("bleeding", 1 + this.actor.system.status.sin?.value || 0) \ No newline at end of file diff --git a/scripts/gPQrszvIgGlW9yM4.js b/scripts/gPQrszvIgGlW9yM4.js index 15fbd6e..deb843b 100644 --- a/scripts/gPQrszvIgGlW9yM4.js +++ b/scripts/gPQrszvIgGlW9yM4.js @@ -1,2 +1,2 @@ if (args.test.characteristicKey == "wp") - args.Test.preData.reversal = {allowed: true, if: "better"}; \ No newline at end of file + args.test.preData.reversal = {allowed: true, if: "better"}; \ No newline at end of file diff --git a/scripts/hcUCeoIFwWPKa5K1.js b/scripts/hcUCeoIFwWPKa5K1.js new file mode 100644 index 0000000..4b6bd89 --- /dev/null +++ b/scripts/hcUCeoIFwWPKa5K1.js @@ -0,0 +1,7 @@ +let fatigued = this.actor.hasCondition("fatigued"); + if (fatigued) + { + foundry.utils.setProperty(fatigued, "flags.wfrp4e.scriptData", foundry.utils.getProperty(fatigued, "flags.wfrp4e.scriptData").filter(s => s.trigger != "dialog")) + } + + if (!this.item.system.properties.qualities.unbreakable) this.item.system.qualities.value.push({name : 'unbreakable'}) \ No newline at end of file diff --git a/scripts/hfFGFWEKFZXtMKWo.js b/scripts/hfFGFWEKFZXtMKWo.js new file mode 100644 index 0000000..59b127a --- /dev/null +++ b/scripts/hfFGFWEKFZXtMKWo.js @@ -0,0 +1,7 @@ +let corruption = await new Roll("1d10").roll(); +corruption.toMessage(this.script.getChatData()); + +this.actor.addCondition("stunned", corruption.total); + +this.actor.update({"system.status.corruption.value" : parseInt(this.actor.system.status.corruption.value) + corruption.total}); +this.script.notification("Corruption ajoutée"); \ No newline at end of file diff --git a/scripts/hpBjbxWg0qLlwX2K.js b/scripts/hpBjbxWg0qLlwX2K.js new file mode 100644 index 0000000..5c4c284 --- /dev/null +++ b/scripts/hpBjbxWg0qLlwX2K.js @@ -0,0 +1,24 @@ +let lores = [ + {id: "beasts", name: "Ghur", table: "ghur-marks", img: "modules/wfrp4e-core/icons/spells/beasts.png"}, + {id: "death", name: "Shyish", table: "shyish-marks", img: "modules/wfrp4e-core/icons/spells/death.png"}, + {id: "fire", name: "Aqshy", table: "aqshy-marks", img: "modules/wfrp4e-core/icons/spells/fire.png"}, + {id: "heavens", name: "Azyr", table: "azyr-marks", img: "modules/wfrp4e-core/icons/spells/heavens.png"}, + {id: "life", name: "Ghyran", table: "ghyran-marks", img: "modules/wfrp4e-core/icons/spells/life.png"}, + {id: "light", name: "Hysh", table: "hysh-marks", img: "modules/wfrp4e-core/icons/spells/light.png"}, + {id: "metal", name: "Chamon", table: "chamon-marks", img: "modules/wfrp4e-core/icons/spells/metal.png"}, + {id: "shadow", name: "Ulgu", table: "ulgu-marks", img: "modules/wfrp4e-core/icons/spells/shadow.png"}, +]; + +let ownedLores = this.actor.itemTypes.spell.reduce((owned, spell) => owned.concat(spell.system.lore.value.filter(l => lores.map(i => i.id).includes(l))), []); + +if (ownedLores.length != 0) +{ + lores = lores.filter(i => ownedLores.includes(i.id)); +} + +let chosen = await ItemDialog.create(lores, 1, {text: "Select Arcane Mark Table", title: this.effect.name}) + +if (chosen[0]) +{ + game.wfrp4e.tables.formatChatRoll(chosen[0].table, {showRoll: true}); +} \ No newline at end of file diff --git a/scripts/iWqn1fVeQ8IwZorj.js b/scripts/iWqn1fVeQ8IwZorj.js new file mode 100644 index 0000000..61884f1 --- /dev/null +++ b/scripts/iWqn1fVeQ8IwZorj.js @@ -0,0 +1,3 @@ +let roll = await new Roll("1d10").roll(); +roll.toMessage(this.script.getChatData()); +this.effect.updateSource({duration: {value: roll.total, units: "rounds"}}); \ No newline at end of file diff --git a/scripts/idiZBzbALb5fXIbz.js b/scripts/idiZBzbALb5fXIbz.js new file mode 100644 index 0000000..9981d95 --- /dev/null +++ b/scripts/idiZBzbALb5fXIbz.js @@ -0,0 +1,5 @@ +let test = this.actor.attacker?.test +if (test && this.item.system.protects[test.result.hitloc.result] && test.result.critical) +{ + this.script.message(`${this.item.name} : Coup critique bloqué`) +} \ No newline at end of file diff --git a/scripts/iphjuYnLhMMNXpGG.js b/scripts/iphjuYnLhMMNXpGG.js new file mode 100644 index 0000000..98f51e3 --- /dev/null +++ b/scripts/iphjuYnLhMMNXpGG.js @@ -0,0 +1,2 @@ +this.actor.setWounds(0); +this.actor.addCondition("unconscious"); \ No newline at end of file diff --git a/scripts/iqwojL5Ku26wsgnI.js b/scripts/iqwojL5Ku26wsgnI.js new file mode 100644 index 0000000..51c1e58 --- /dev/null +++ b/scripts/iqwojL5Ku26wsgnI.js @@ -0,0 +1,11 @@ +if (this.actor.system.status.fate?.value > 0 && (await this.script.dialog("Dépenser un Destin ?"))) +{ + await this.actor.spend("system.status.fate.value"); + this.script.message("Destin dépensé"); + await this.actor.addCondition("stunned"); + this.actor.update({"system.status.corruption.value" : this.actor.system.status.corruption.value + 1}); +} +else +{ + this.actor.addCondition("dead"); +} \ No newline at end of file diff --git a/scripts/jObJanFoev4N6ZRv.js b/scripts/jObJanFoev4N6ZRv.js index 4580414..e6cae3f 100644 --- a/scripts/jObJanFoev4N6ZRv.js +++ b/scripts/jObJanFoev4N6ZRv.js @@ -1,2 +1,2 @@ -if (!args.opposedTest.attackerTest.item?.system?.isMagical) +if (!args.sourceItem?.system?.isMagical) args.abort = `${this.effect.name}: Ignored` \ No newline at end of file diff --git a/scripts/jTgzivraRKrrCOjH.js b/scripts/jTgzivraRKrrCOjH.js new file mode 100644 index 0000000..1feebf6 --- /dev/null +++ b/scripts/jTgzivraRKrrCOjH.js @@ -0,0 +1,3 @@ +let roll = await new Roll("1d10").roll(); +roll.toMessage(this.script.getChatData()); +this.effect.updateSource({duration: {value: roll.total, units: "minutes"}}); \ No newline at end of file diff --git a/scripts/jvNuIbOtB46p0esq.js b/scripts/jvNuIbOtB46p0esq.js index ce08c05..21ebc0f 100644 --- a/scripts/jvNuIbOtB46p0esq.js +++ b/scripts/jvNuIbOtB46p0esq.js @@ -5,9 +5,9 @@ if (args.test.item?.system?.attackType == "melee") if (parseInt(args.test.result.SL) < 0) { args.test.result.SL = "+0"; - args.Test.result.description = "Succès marginal"; + args.test.result.description = "Succès marginal"; } - args.Test.result.outcome = "success" + args.test.result.outcome = "success" args.test.result.other.push(`${this.effect.name}: Minimum +0 SL`) } } \ No newline at end of file diff --git a/scripts/k7J96MkvfX2GO6JS.js b/scripts/k7J96MkvfX2GO6JS.js new file mode 100644 index 0000000..4055fae --- /dev/null +++ b/scripts/k7J96MkvfX2GO6JS.js @@ -0,0 +1,4 @@ +this.actor.update({"system.status.corruption.value" : parseInt(this.actor.system.status.corruption.value) + 1}); +this.script.notification("Corruption ajoutée"); +await this.actor.addCondition("prone"); +await this.actor.addCondition("fatigued"); \ No newline at end of file diff --git a/scripts/kWHKp2tw3HzkgWCy.js b/scripts/kWHKp2tw3HzkgWCy.js new file mode 100644 index 0000000..aecdde4 --- /dev/null +++ b/scripts/kWHKp2tw3HzkgWCy.js @@ -0,0 +1,3 @@ +let duration = await new Roll("1d10").roll(); +duration.toMessage(this.script.getChatData()); +this.effect.updateSource({duration: {value: duration.total, units: "hours"}}); \ No newline at end of file diff --git a/scripts/kb2pwRZAjbUbZwcz.js b/scripts/kb2pwRZAjbUbZwcz.js new file mode 100644 index 0000000..8a46c5f --- /dev/null +++ b/scripts/kb2pwRZAjbUbZwcz.js @@ -0,0 +1,6 @@ +if (args.actor.has("Bestial")) +{ + this.script.notification(`${args.actor.prototypeToken.name} doit réussir un test de Volonté Difficile (-10) pour attaquer cette cible !`); +} + +return true; // No need to show this in the dialog \ No newline at end of file diff --git a/scripts/kbh9urTsUcLiwMLH.js b/scripts/kbh9urTsUcLiwMLH.js new file mode 100644 index 0000000..9cd84e3 --- /dev/null +++ b/scripts/kbh9urTsUcLiwMLH.js @@ -0,0 +1 @@ +return !this.actor.attacker || !this.item.properties.qualities.defensive \ No newline at end of file diff --git a/scripts/knxDGP1YLbnPk03o.js b/scripts/knxDGP1YLbnPk03o.js new file mode 100644 index 0000000..b2e9267 --- /dev/null +++ b/scripts/knxDGP1YLbnPk03o.js @@ -0,0 +1,6 @@ +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Athletics"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}) +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("prone"); +} \ No newline at end of file diff --git a/scripts/lDfPgVtZf3ULFPjU.js b/scripts/lDfPgVtZf3ULFPjU.js new file mode 100644 index 0000000..a30c8a5 --- /dev/null +++ b/scripts/lDfPgVtZf3ULFPjU.js @@ -0,0 +1,8 @@ +let locs = Object.keys(this.actor.system.status.armour); + +let location = locs[Math.floor(CONFIG.Dice.randomUniform() * (locs.length))]; + +let roll = await new Roll("1d10 * 5").roll(); +roll.toMessage(this.script.getChatData({flavor: "Modifier"})); + +game.wfrp4e.tables.formatChatRoll(`crit${location}`, {criticalLocation: location, modifier: roll.total, showRoll: true}); \ No newline at end of file diff --git a/scripts/lUcx8NUadgq3oFTY.js b/scripts/lUcx8NUadgq3oFTY.js new file mode 100644 index 0000000..0395f63 --- /dev/null +++ b/scripts/lUcx8NUadgq3oFTY.js @@ -0,0 +1 @@ +if (this.item.attackType == "melee" && !this.item.system.properties.qualities.fast) this.item.system.qualities.value.push({name : 'fast'}) \ No newline at end of file diff --git a/scripts/m58MpMZBblpq5LJu.js b/scripts/m58MpMZBblpq5LJu.js index 6f85774..1bcf07b 100644 --- a/scripts/m58MpMZBblpq5LJu.js +++ b/scripts/m58MpMZBblpq5LJu.js @@ -1,2 +1,2 @@ -args.prefillModifiers.slBonus++; -args.prefillModifiers.successBonus++; +args.fields.slBonus++; +args.fields.successBonus++; diff --git a/scripts/mujAsg7US4R7eXhv.js b/scripts/mujAsg7US4R7eXhv.js new file mode 100644 index 0000000..6cb29fa --- /dev/null +++ b/scripts/mujAsg7US4R7eXhv.js @@ -0,0 +1,7 @@ +if (args.skill?.name == game.i18n.localize("NAME.Pray") || args.prayer) +{ + args.abort = true; + this.script.notification("Impossible d'effectuer des Tests de Prière !") +} + +return true; \ No newline at end of file diff --git a/scripts/n3bUmtYaVljPdcJW.js b/scripts/n3bUmtYaVljPdcJW.js new file mode 100644 index 0000000..bd1d408 --- /dev/null +++ b/scripts/n3bUmtYaVljPdcJW.js @@ -0,0 +1,9 @@ +let roll = await new Roll("1d10 + @sin", {sin: this.actor.system.status.sin.value || 0}).roll(); +roll.toMessage(this.script.getChatData()); + +let skills = await ItemDialog.create(this.actor.itemTypes.skill, "unlimited", {text: "Select penalized Skills", title: this.effect.name}) +let names = skills?.map(i => i.name) || []; +this.effect.updateSource({name: this.effect.setSpecifier(names.join(", ")), "flags.wfrp4e.skills" : names, duration: { + value: roll.total, + units: "days" +}}); \ No newline at end of file diff --git a/scripts/nCfWscZucItTYObJ.js b/scripts/nCfWscZucItTYObJ.js new file mode 100644 index 0000000..ce00061 --- /dev/null +++ b/scripts/nCfWscZucItTYObJ.js @@ -0,0 +1,4 @@ +if (args.item.type == "ammunition") +{ + args.item.system.damage.value += " + 1" +} \ No newline at end of file diff --git a/scripts/nSXzktHyNjGUXjaw.js b/scripts/nSXzktHyNjGUXjaw.js index 0f643a3..33216f3 100644 --- a/scripts/nSXzktHyNjGUXjaw.js +++ b/scripts/nSXzktHyNjGUXjaw.js @@ -1 +1 @@ -return args.item?.system.isProjectiles \ No newline at end of file +return args.item?.system.isRanged \ No newline at end of file diff --git a/scripts/naF5EWr1CBkYRZTK.js b/scripts/naF5EWr1CBkYRZTK.js index 066302b..7bce169 100644 --- a/scripts/naF5EWr1CBkYRZTK.js +++ b/scripts/naF5EWr1CBkYRZTK.js @@ -1,4 +1,4 @@ -if (args.opposedTest?.attackerTest?.item?.system?.isProjectiles) +if (args.opposedTest?.attackerTest?.item?.system?.isRanged) { let choice = await foundry.applications.api.DialogV2.confirm({window: {title : this.item.name}, content : `

Annuler les dégâts avec ${this.effect.name}?

`}) diff --git a/scripts/njPP9wDAsdh4WHIj.js b/scripts/njPP9wDAsdh4WHIj.js index dc8afe2..2349cca 100644 --- a/scripts/njPP9wDAsdh4WHIj.js +++ b/scripts/njPP9wDAsdh4WHIj.js @@ -1,4 +1,4 @@ -if (args.totalWoundLoss > 0 && ["trait", "weapon"].includes(args.opposedTest.attackerTest.item?.type)) +if (args.totalWoundLoss > 0 && ["trait", "weapon"].includes(args.sourceItem?.type)) { - this.script.message(`Infected: ${args.actor.name} must pass an Easy (+40) Résistance Test or gain a @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Festering Wound}`, {whisper: ChatMessage.getWhisperRecipients("GM")}) + this.script.message(`Infecté : ${args.actor.name} doit réussir un test de Résistance Facile (+40) ou gagner une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Plaie Purulente}`, {whisper: ChatMessage.getWhisperRecipients("GM")}) } \ No newline at end of file diff --git a/scripts/nlSJDfv4N9hrncHW.js b/scripts/nlSJDfv4N9hrncHW.js new file mode 100644 index 0000000..0b8c234 --- /dev/null +++ b/scripts/nlSJDfv4N9hrncHW.js @@ -0,0 +1 @@ +this.actor.addCondition("stunned"); \ No newline at end of file diff --git a/scripts/o0dJxmnrWAZVkGKM.js b/scripts/o0dJxmnrWAZVkGKM.js new file mode 100644 index 0000000..8d5a8c8 --- /dev/null +++ b/scripts/o0dJxmnrWAZVkGKM.js @@ -0,0 +1,4 @@ +if (args.opposedTest.attackerTest.weapon.attackType == "ranged" && args.opposedTest.defenderTest.weapon?.id == this.item.id) + { + args.modifiers.ap.shield += 2; + } \ No newline at end of file diff --git a/scripts/pqpU9J1x23YLwWYG.js b/scripts/pqpU9J1x23YLwWYG.js new file mode 100644 index 0000000..ea24bea --- /dev/null +++ b/scripts/pqpU9J1x23YLwWYG.js @@ -0,0 +1 @@ +this.item.system.encumbrance.value = Math.max(0, this.item.system.encumbrance.value - 2) \ No newline at end of file diff --git a/scripts/qAEZgtu5CrfUkxhx.js b/scripts/qAEZgtu5CrfUkxhx.js index 007d2e9..4ec0669 100644 --- a/scripts/qAEZgtu5CrfUkxhx.js +++ b/scripts/qAEZgtu5CrfUkxhx.js @@ -9,8 +9,8 @@ if (args.test.options.staunchBleeding) } args.test.result.other.push(`${this.actor.name} enlève ${staunch} Etats Hémmoragie du patient.`) } - else if (this.actor.characteristics.int.bonus + Number(args.Test.result.SL) < 0) + else if (this.actor.characteristics.int.bonus + Number(args.test.result.SL) < 0) { - args.Test.result.other.push(`Le patient contracte une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`) + args.test.result.other.push(`Le patient contracte une @UUID[Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg]{Infection Mineure}.`) } } \ No newline at end of file diff --git a/scripts/qggycOtvFfaBr4Ax.js b/scripts/qggycOtvFfaBr4Ax.js new file mode 100644 index 0000000..3c78982 --- /dev/null +++ b/scripts/qggycOtvFfaBr4Ax.js @@ -0,0 +1,19 @@ +this.actor.applyDamage(1 + this.actor.system.status.sin?.value || 0, { + damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, + createMessage: this.script.getChatData() +}); + +const test = await this.actor.setupSkill( + game.i18n.localize("NAME.Endurance"), + { + fields: {difficulty: "average"}, + skipTargets: true, + appendTitle: ` — ${this.effect.name}`, + }, +); + +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("stunned"); +} \ No newline at end of file diff --git a/scripts/qmOt7h17hGAKqQe0.js b/scripts/qmOt7h17hGAKqQe0.js index aa58aa4..16f4f77 100644 --- a/scripts/qmOt7h17hGAKqQe0.js +++ b/scripts/qmOt7h17hGAKqQe0.js @@ -1,8 +1,8 @@ -if (!args.opposedTest.attackerTest.item?.system?.isMelee) +if (!args.sourceItem?.system?.isMelee) { - let choice = await foundry.applications.api.DialogV2.confirm({ window: { title: this.effect.name }, content: `

${this.effect.name}: Is this a ranged or magical attack that orignates outside the Dome?

` }) + let choice = await foundry.applications.api.DialogV2.confirm({ window: { title: this.effect.name }, content: `

${this.effect.name} : S'agit-il d'une attaque à distance ou magique provenant de l'extérieur du Dôme ?

` }) if (choice) { diff --git a/scripts/qu194dVXm9Vx1TGk.js b/scripts/qu194dVXm9Vx1TGk.js index 2f4e988..e44d3ff 100644 --- a/scripts/qu194dVXm9Vx1TGk.js +++ b/scripts/qu194dVXm9Vx1TGk.js @@ -4,7 +4,7 @@ if (args.test.options.useOnesSupportive && (args.test.result.roll <= game.settin let ones = Number(args.test.result.roll.toString().split("").pop()) if (ones > SL) { - args.Test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus) + args.test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus) args.test.result.other.push(`${this.effect.name}: Valeur d'unité utilisée comme DR`) } } \ No newline at end of file diff --git a/scripts/r9N0cd9sp6iVG0es.js b/scripts/r9N0cd9sp6iVG0es.js new file mode 100644 index 0000000..1d52e7b --- /dev/null +++ b/scripts/r9N0cd9sp6iVG0es.js @@ -0,0 +1,27 @@ +let results = { + 1 : "Fimir", + 2 : "Dark Elves", + 3 : "Dragons", + 4 : "Daemons", + 5 : "The mortal followers of a particular Chaos God", + 6 : "The mortal followers of a particular Chaos God", + 7 : "Vampires and Necromancers", + 8 : "Vampires and Necromancers", + 9 : "Dwarfs", + 10 : "Dwarfs" +}; + +let gods = [ + "Tzeentch", + "Slaanesh", + "Nurgle", + "Khorne" +]; + +let roll = await new Roll("1d10").roll(); + +roll.toMessage(this.script.getChatData()); + +let result = results[roll.total].replace("a particular Chaos God", gods[Math.ceil(CONFIG.Dice.randomUniform() * 4)]); + +this.effect.updateSource({name: this.effect.setSpecifier(result)}); \ No newline at end of file diff --git a/scripts/rDexKQt0ctzdMKdR.js b/scripts/rDexKQt0ctzdMKdR.js new file mode 100644 index 0000000..1edf6ea --- /dev/null +++ b/scripts/rDexKQt0ctzdMKdR.js @@ -0,0 +1,7 @@ +if (args.prayer) +{ + args.abort = true; + this.script.notification("Impossible d'utiliser Bénir ou Invoquer !") +} + +return true; \ No newline at end of file diff --git a/scripts/rROfpTez9681wXWx.js b/scripts/rROfpTez9681wXWx.js new file mode 100644 index 0000000..8bdd70c --- /dev/null +++ b/scripts/rROfpTez9681wXWx.js @@ -0,0 +1 @@ +return this.actor.attacker && this.item.properties.qualities.defensive \ No newline at end of file diff --git a/scripts/rXuOTYAOHCiW167c.js b/scripts/rXuOTYAOHCiW167c.js new file mode 100644 index 0000000..4444e9c --- /dev/null +++ b/scripts/rXuOTYAOHCiW167c.js @@ -0,0 +1,14 @@ +let difficulty = "" + if (this.effect.name.includes("Moderate")) + difficulty = "easy" + else if (this.effect.name.includes("Severe")) + difficulty = "average" + else + difficulty = "veasy" + + let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {context : {failure : this.actor.name + " dies from Blight"}, fields: {difficulty}, appendTitle : " - Blight"}) + await test.roll(); + if (test.failed) + { + this.actor.addCondition("dead"); + } \ No newline at end of file diff --git a/scripts/sBXqivqv19SvN5cZ.js b/scripts/sBXqivqv19SvN5cZ.js new file mode 100644 index 0000000..03ab8e2 --- /dev/null +++ b/scripts/sBXqivqv19SvN5cZ.js @@ -0,0 +1,5 @@ +if (args.skill?.name.includes("Language")) +{ + args.abort = true; + this.script.notification("Impossible d'effectuer des Tests de Langue !") +} \ No newline at end of file diff --git a/scripts/sbK1a7txpSoXFzyB.js b/scripts/sbK1a7txpSoXFzyB.js index 1bacd08..95d25d4 100644 --- a/scripts/sbK1a7txpSoXFzyB.js +++ b/scripts/sbK1a7txpSoXFzyB.js @@ -9,7 +9,7 @@ if (args.test.options.useOnesArgumentative && (args.test.result.roll <= game.set if (ones > SL) { - args.Test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus) + args.test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus) args.test.result.other.push(`${this.effect.name}: Utilisation de l'unité des dés comme DR`) } } \ No newline at end of file diff --git a/scripts/slSRg5p8h34Vot34.js b/scripts/slSRg5p8h34Vot34.js new file mode 100644 index 0000000..738c792 --- /dev/null +++ b/scripts/slSRg5p8h34Vot34.js @@ -0,0 +1 @@ +args.context.doubleDamage = true; \ No newline at end of file diff --git a/scripts/slzh77d2DPtvsXk0.js b/scripts/slzh77d2DPtvsXk0.js new file mode 100644 index 0000000..559360a --- /dev/null +++ b/scripts/slzh77d2DPtvsXk0.js @@ -0,0 +1 @@ +if (!this.item.system.properties.qualities.damaging) this.item.system.qualities.value.push({name : 'damaging'}) \ No newline at end of file diff --git a/scripts/ssuryRgATzt6XksC.js b/scripts/ssuryRgATzt6XksC.js new file mode 100644 index 0000000..c45423e --- /dev/null +++ b/scripts/ssuryRgATzt6XksC.js @@ -0,0 +1,7 @@ +if (args.totalWoundLoss > 0) +{ + let roll = await new Roll("1d10").roll({allowInteractive : false}); + roll.toMessage(this.script.getChatData()); + args.totalWoundLoss += roll.total; + args.modifiers.other.push({label : this.effect.name, value : roll.total}) +} \ No newline at end of file diff --git a/scripts/surdCPFakh2JAAHa.js b/scripts/surdCPFakh2JAAHa.js new file mode 100644 index 0000000..cee9d04 --- /dev/null +++ b/scripts/surdCPFakh2JAAHa.js @@ -0,0 +1,5 @@ +let test = this.actor.attacker?.test +if (test && this.item.system.protects[test.result.hitloc.result] && test.result.critical) +{ + this.script.message(`${this.item.name} : Lancez les critiques deux fois et choisissez le résultat le plus bas.`) +} \ No newline at end of file diff --git a/scripts/tki0DhoTecjq3LyZ.js b/scripts/tki0DhoTecjq3LyZ.js new file mode 100644 index 0000000..74ae9a6 --- /dev/null +++ b/scripts/tki0DhoTecjq3LyZ.js @@ -0,0 +1,11 @@ +this.actor.applyDamage(1, { + damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, + createMessage: this.script.getChatData() +}); + +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {appendTitle: ` - ${this.effect.name}`, skipTargets: true}); +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("broken"); +} \ No newline at end of file diff --git a/scripts/tyQLkRLk1AXB4g2u.js b/scripts/tyQLkRLk1AXB4g2u.js index 4cdc5c6..26611f7 100644 --- a/scripts/tyQLkRLk1AXB4g2u.js +++ b/scripts/tyQLkRLk1AXB4g2u.js @@ -8,6 +8,6 @@ if (args.test.succeeded) { key: `crit${args.test.result.hitloc.result}` } - args.Test.result.other.push (`${this.effect.name}: Tout les succès sont des Critiques.`) + args.test.result.other.push (`${this.effect.name}: Tout les succès sont des Critiques.`) } \ No newline at end of file diff --git a/scripts/u2TxLqkTdoK8aHTo.js b/scripts/u2TxLqkTdoK8aHTo.js new file mode 100644 index 0000000..02de00c --- /dev/null +++ b/scripts/u2TxLqkTdoK8aHTo.js @@ -0,0 +1,6 @@ +let fatigued = this.actor.hasCondition("fatigued") + if (!fatigued) + { + this.actor.addCondition("fatigued") + ui.notifications.notify("Fatigued added to " + this.actor.name + " which cannot be removed until the Malaise symptom is gone.") + } \ No newline at end of file diff --git a/scripts/u4fKgGFEnOCnvvsv.js b/scripts/u4fKgGFEnOCnvvsv.js index 19822ee..d59717f 100644 --- a/scripts/u4fKgGFEnOCnvvsv.js +++ b/scripts/u4fKgGFEnOCnvvsv.js @@ -1 +1 @@ -return args.item?.system?.isProjectiles; \ No newline at end of file +return args.item?.system?.isRanged; \ No newline at end of file diff --git a/scripts/uEVSUTTam4Z96JJ2.js b/scripts/uEVSUTTam4Z96JJ2.js index b91829b..059c809 100644 --- a/scripts/uEVSUTTam4Z96JJ2.js +++ b/scripts/uEVSUTTam4Z96JJ2.js @@ -1,6 +1,6 @@ if (this.item.equipped.value - && args.opposedTest.attackerTest.item - && (args.opposedTest.attackerTest.item.isProjectiles || args.opposedTest.attackerTest?.spell) + && args.sourceItem + && (args.sourceItem.isRanged || args.opposedTest.attackerTest?.spell) ) { args.modifiers.other.push({label : this.effect.name, details : "Réduction des Dégâts", value : -2}) diff --git a/scripts/v5K5HaHTZmVSJBdr.js b/scripts/v5K5HaHTZmVSJBdr.js new file mode 100644 index 0000000..1fe1a9a --- /dev/null +++ b/scripts/v5K5HaHTZmVSJBdr.js @@ -0,0 +1,25 @@ +let bane = this.effect.specifier; +if (bane) + return; +if (await this.script.dialog("Lancer le Fléau ?")) +{ + let table = await fromUuid("Compendium.wfrp4e-archives2.tables.RollTable.wRfrOW5pRXRWM8Lb"); + if (table) + { + bane = (await table.draw()).results[0].name; + } + else + { + this.script.notification("Table de créatures aléatoires introuvable !", "error"); + } +} + +if (!bane) +{ + bane = await ValueDialog.create({text: "Entrez le Fléau", title: this.effect.name}) +} + +if (bane) +{ + this.effect.updateSource({name: this.effect.setSpecifier(bane)}); +} \ No newline at end of file diff --git a/scripts/vJT2UOO7Ov7a7Rx4.js b/scripts/vJT2UOO7Ov7a7Rx4.js new file mode 100644 index 0000000..2eb0a57 --- /dev/null +++ b/scripts/vJT2UOO7Ov7a7Rx4.js @@ -0,0 +1 @@ +if (args.totalWoundLoss > 0) this.actor.addCondition("surprised") \ No newline at end of file diff --git a/scripts/vJgjAfwq8MuwE2HL.js b/scripts/vJgjAfwq8MuwE2HL.js new file mode 100644 index 0000000..7728e42 --- /dev/null +++ b/scripts/vJgjAfwq8MuwE2HL.js @@ -0,0 +1,5 @@ +let number = await new Roll("1d10").roll(); +number.toMessage(this.script.getChatData()); + +this.actor.update({"system.status.fortune.value" : parseInt(this.actor.system.status.fortune.value) + number.total}) +this.script.message(`Ajouté ${number.total} points de Fortune`, {whisper : ChatMessage.getWhisperRecipients("GM")}) \ No newline at end of file diff --git a/scripts/vwsrPDuVxeNOtdhA.js b/scripts/vwsrPDuVxeNOtdhA.js new file mode 100644 index 0000000..06bb12a --- /dev/null +++ b/scripts/vwsrPDuVxeNOtdhA.js @@ -0,0 +1 @@ +return args.skill?.name != game.i18n.localize("NAME.Charm") \ No newline at end of file diff --git a/scripts/wIdpkqPBmeVwSSQS.js b/scripts/wIdpkqPBmeVwSSQS.js new file mode 100644 index 0000000..004e841 --- /dev/null +++ b/scripts/wIdpkqPBmeVwSSQS.js @@ -0,0 +1,7 @@ +let roll = await new Roll("2d10").roll(); +roll.toMessage(this.script.getChatData()); + +this.actor.applyDamage(roll.total, { + damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, + createMessage: this.script.getChatData() +}); \ No newline at end of file diff --git a/scripts/wIqIF9B43SyDgGYv.js b/scripts/wIqIF9B43SyDgGYv.js new file mode 100644 index 0000000..f3b4f33 --- /dev/null +++ b/scripts/wIqIF9B43SyDgGYv.js @@ -0,0 +1,5 @@ +if (args.type == "effect" && args.options.action == "delete" && ["fatigued"].some(i => args.document.statuses.has(i))) +{ + this.script.notification("Impossible de retirer " + args.document.name); + return false; +} \ No newline at end of file diff --git a/scripts/wKIGVpPddx7Y3SQH.js b/scripts/wKIGVpPddx7Y3SQH.js new file mode 100644 index 0000000..cb65115 --- /dev/null +++ b/scripts/wKIGVpPddx7Y3SQH.js @@ -0,0 +1,21 @@ +let damage = await new Roll("1d10 + @sin", {sin: this.actor.system.status.sin.value || 0}).roll(); +damage.toMessage(this.script.getChatData()); +this.actor.applyDamage(damage.total, { + damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, + createMessage: this.script.getChatData() +}); + +const test = await this.actor.setupSkill( + game.i18n.localize("NAME.Endurance"), + { + fields: {difficulty: "challenging"}, + skipTargets: true, + appendTitle: ` — ${this.effect.name}`, + }, +); + +await test.roll(); +if (test.failed) +{ + this.actor.addCondition("stunned"); +} \ No newline at end of file diff --git a/scripts/wagZ4VV7431N3Sm8.js b/scripts/wagZ4VV7431N3Sm8.js new file mode 100644 index 0000000..b90aa34 --- /dev/null +++ b/scripts/wagZ4VV7431N3Sm8.js @@ -0,0 +1 @@ +!args.options.terror \ No newline at end of file diff --git a/scripts/x9Ah9e5xAGqCNFO3.js b/scripts/x9Ah9e5xAGqCNFO3.js new file mode 100644 index 0000000..28489a0 --- /dev/null +++ b/scripts/x9Ah9e5xAGqCNFO3.js @@ -0,0 +1,5 @@ +if (args.totalWoundLoss > 0) + { + args.totalWoundLoss += 2; + args.modifiers.other.push({label : this.effect.name, value : 2}) + } \ No newline at end of file diff --git a/scripts/xIIkfmgWfh3teEfr.js b/scripts/xIIkfmgWfh3teEfr.js new file mode 100644 index 0000000..f089f91 --- /dev/null +++ b/scripts/xIIkfmgWfh3teEfr.js @@ -0,0 +1,2 @@ +if (this.item.system.armourType.value == 'mail' && !this.item.system.properties.qualities.impenetrable) this.item.system.qualities.value.push({name : 'impenetrable'}); + if (this.item.system.armourType.value == 'plate') this.item.system.qualities.value = this.item.system.qualities.value.filter(i => i.name != 'weakpoints') \ No newline at end of file diff --git a/scripts/y7hk7prQ0lLTyv1Y.js b/scripts/y7hk7prQ0lLTyv1Y.js index baff11d..a20e4ae 100644 --- a/scripts/y7hk7prQ0lLTyv1Y.js +++ b/scripts/y7hk7prQ0lLTyv1Y.js @@ -1 +1 @@ -return args.item?.system?.isProjectiles && (args.item.system.weaponGroup.value !== "blackpowder" || args.item.system.weaponGroup.value !== "engineering") \ No newline at end of file +return args.item?.system?.isRanged && (args.item.system.weaponGroup.value !== "blackpowder" || args.item.system.weaponGroup.value !== "engineering") \ No newline at end of file diff --git a/scripts/yHAPfyaRfC4ijV6x.js b/scripts/yHAPfyaRfC4ijV6x.js new file mode 100644 index 0000000..6281a05 --- /dev/null +++ b/scripts/yHAPfyaRfC4ijV6x.js @@ -0,0 +1,7 @@ +let locs = Object.values(this.actor.system.status.armour).map(i => i.label).filter(i => i); + +let location = locs[Math.floor(CONFIG.Dice.randomUniform() * (locs.length))]; + +let duration = await new Roll("1d10").roll(); +duration.toMessage(this.script.getChatData()); +this.effect.updateSource({name: this.effect.setSpecifier(location), duration: {value: duration.total, units: "hours"}}); \ No newline at end of file diff --git a/scripts/yMMzZ7daCqRlGT3N.js b/scripts/yMMzZ7daCqRlGT3N.js index 1c2ba5b..4b1e46a 100644 --- a/scripts/yMMzZ7daCqRlGT3N.js +++ b/scripts/yMMzZ7daCqRlGT3N.js @@ -1,4 +1,4 @@ -let item = args.opposedTest.attackerTest.item; +let item = args.sourceItem; if (!item.isMagical && (item.type == "weapon" || item.type == "trait")) { args.modifiers.other.push({label : this.effect.name, details : "Retirer l'Indice de Dégâts", value : -1 * (args.totalWoundLoss - args.opposedTest.result.differenceSL)}) diff --git a/scripts/yQziCK8G8I1RYkTj.js b/scripts/yQziCK8G8I1RYkTj.js index f4b25f3..a876e15 100644 --- a/scripts/yQziCK8G8I1RYkTj.js +++ b/scripts/yQziCK8G8I1RYkTj.js @@ -1,6 +1,6 @@ let add; -if (args.opposedTest?.attackerTest?.weapon?.isProjectiles && args.opposedTest?.result.hitloc?.value === "head") { - add = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : "Add 1 AP? Bascinet provides 4 AP instead of 3 against missile attacks from the front"}) +if (args.opposedTest?.attackerTest?.weapon?.isRanged && args.opposedTest?.result.hitloc?.value === "head") { + add = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : "Ajouter 1 PA ? Le Bascinet fournit 4 PA au lieu de 3 contre les attaques à distance de face"}) } if (add) { diff --git a/scripts/z9NEbIUBsKMaTuCz.js b/scripts/z9NEbIUBsKMaTuCz.js index 144e2e4..e571e4e 100644 --- a/scripts/z9NEbIUBsKMaTuCz.js +++ b/scripts/z9NEbIUBsKMaTuCz.js @@ -1,4 +1,4 @@ -if (args.opposedTest.result.hitloc && args.opposedTest.result.hitloc.value == "head") +if (args.opposedTest.result.hitloc && args.loc == "head") { args.actor.addCondition("entangled") } \ No newline at end of file diff --git a/scripts/zK38Rl5t9zbFi4Se.js b/scripts/zK38Rl5t9zbFi4Se.js index 132048b..1b383dc 100644 --- a/scripts/zK38Rl5t9zbFi4Se.js +++ b/scripts/zK38Rl5t9zbFi4Se.js @@ -1,4 +1,4 @@ -if (args.opposedTest.result.hitloc.value == this.item.system.location.key && args.totalWoundLoss > 0) +if (args.loc == this.item.system.location.key && args.totalWoundLoss > 0) { args.actor.addCondition("bleeding", 1); this.script.notification("Hémorragique ajouté") diff --git a/tools/copy-new-scripts.log b/tools/copy-new-scripts.log index fac1fc2..dc9d3ac 100644 --- a/tools/copy-new-scripts.log +++ b/tools/copy-new-scripts.log @@ -1,903 +1,271 @@ { - "date": "2026-02-26T20:43:28.136Z", + "date": "2026-05-17T22:10:31.699Z", "results": { - "total": 1983, - "existingInFR": 1538, - "newFiles": 445, + "total": 2112, + "existingInFR": 1983, + "newFiles": 129, "copied": [ - "0FNOq4J1AdPd2A0q.js", - "0J1yHP1jkGR9y89H.js", - "0YKQGbsKdHSmYGE7.js", - "0mrUnxzufYgsR0Ph.js", - "11ir8nibM5HD69na.js", - "1A87vGLh2PXH0rG0.js", - "1LDSzXeO5CzXgTOc.js", - "1XAilPQEyMWVPA5z.js", - "1kB2su7hLRYDhZ2H.js", - "1mNkLj9JYNr3ofC6.js", - "1wKVvxRTHOyV4Qdv.js", - "22bW97lkvCqisfHX.js", - "23HgjCB1oecxANvA.js", - "23PDHNZEnihcEvdK.js", - "2AdSBXw7IwCiqawQ.js", - "2NLINicPQWbuvp2n.js", - "2VNnVrtktdGUqXEV.js", - "2W9uMTT6iJhfQ044.js", - "2WSN306tL4apjRtD.js", - "2hzDv8ROulOe1elK.js", - "2sDH6RvoOAR40oqH.js", - "2vTVR0quRZQtjNfQ.js", - "2z6DazIpsfiRZHdl.js", - "2zpYzKVDNE5y9RLL.js", - "32EPIAz7Qm71ut3m.js", - "3AbonnSVfoSlGye8.js", - "3JEzEzF1SeYA9lsV.js", - "3VhUyqNY18PzeMKG.js", - "3hfMQkUKYI4rCuBy.js", - "3plV9WFqs2prfAdp.js", - "3sfD1nedXLzuYoXJ.js", - "3z3m1pmw03DbQzcb.js", - "454x3Q95pLvZm0Kx.js", - "49smPAj5J0INSFPI.js", - "4FGKZk2f0xrmIDnp.js", - "4WQ25VsJSUZ2DeRB.js", - "4ZR7p8G3OzOBWx0L.js", - "4fnTKgl0HW9ZrWyJ.js", - "4iuTz0uInAfMaoGl.js", - "4pQW4WLyhjbZR85k.js", - "4rb7LfMq9CTnlrpn.js", - "52mwb33mGrQjq89B.js", - "5Fe1ELaS6Gnvy0Cj.js", - "5QR83whGk4ZyuJcA.js", - "5QjaPBFbv5rIYpla.js", - "5o1XiceC4rutjMms.js", - "5rlneScoI5feQ3Di.js", - "5sI9iYh5j2nx2XyT.js", - "6JrUjs3g5x6bFnj3.js", - "6V3qHON3mcerlBlB.js", - "6ZS1rQLkNvMDO0Fp.js", - "6a5nBENmfxy93vGY.js", - "6fElmBxTjdAaubbK.js", - "6qUKKep5vhFYmo1J.js", - "6tjn0RH4VyOPFneS.js", - "715G1Bf0haOHvmYQ.js", - "7BgJe9YkbHTh3ucm.js", - "7Ck0fkzE4WQ62qVe.js", - "7H6wYyJ6cpaoc2QQ.js", - "7VAhXHov6pR1SkgD.js", - "7e8FgQUF2oANANmx.js", - "7szLG4VALuuy1cPm.js", - "84IB8CWa55XzoAkv.js", - "86ivOsBQAuu0UmFg.js", - "8ByuHnUZ4RNTdGVv.js", - "8Gan2EeGExBFSxmp.js", - "8N3Uqjq1ZxPxo4pk.js", - "8OwUgwZI8hOJt2hG.js", - "8RNziYGGb4sp3BGQ.js", - "8ZAUBSH9CM9OTpTL.js", - "93K85NnVwjVNXlZq.js", - "97yDvwmUqkwHktQj.js", - "9EVj4bmZJex45Mt7.js", - "9JnPK1jNUEso7Pv8.js", - "9RFoasDcFnYZ1txR.js", - "9fK07tqqZyPg7dpx.js", - "A3fvV69RS1lYgma0.js", - "ACgKpKrEEHoNGG0h.js", - "AHZ8f7dfN8jNsYk6.js", - "AHt3D7EHKWBcL3vu.js", - "ALuPRzf85dmkEfLo.js", - "AMxezwtYnWCF6Oza.js", - "AV2Kj6jgmIc45zKi.js", - "B6ZbY3bxTPg6nCng.js", - "B950b0XnIUYCdVwu.js", - "BAOv7moTxsKlT3JS.js", - "BNJRV66jlrp51qZK.js", - "BtyFhdGMKiMamGhM.js", - "C4LZnaX0MYgwrszj.js", - "C8Q4jf6LSyA3lQHS.js", - "CCK1iIfPmB398ziT.js", - "CiFeduksZJ6PRulx.js", - "CkE8NZOhzPkuRrKJ.js", - "DTiHS6RfwhF4THbf.js", - "DsE6rTSzxEn6uWMz.js", - "DuM5l2Yb4bdvDeaG.js", - "DxQnamsb2AuW0p2e.js", - "E0OhL9ZO8vb8A4qq.js", - "E2FhOfZzu2CqTSeA.js", - "E4CHDe1xfmcV3oGv.js", - "E6DMqfDeczqmVMFV.js", - "E7D4bxz8gy4e1wL7.js", - "EDAMEOzdBfkoKHxP.js", - "EGWF3LHav3e2zFL4.js", - "EQ5dtGW5kQhtAb87.js", - "EU5j0hnDTG9Z6d1e.js", - "EVBSHEC5nmmj2X41.js", - "EmXwcuycEH8slEn5.js", - "EmmG49pMOPHRwDzR.js", - "Ew3C2WmLCtc1KT46.js", - "FXuyiJoXdAh6WhRK.js", - "FYMLsxxg63nHNGAe.js", - "FYUPfYyTYZkxRLFT.js", - "FceC4TNNBvRnA7JM.js", - "Fk14eUaTRvIoCBB1.js", - "FkTwk8hfHpRLbAp2.js", - "FmLx9pwOkzqqU7Ph.js", - "Fvlc4RkeF4dHjW3m.js", - "GOq4TcnWbfyfCo2V.js", - "GZFsuynUhgZqwTGo.js", - "GbPEy22VuCNzlNv2.js", - "Gc8S5TYlVdV8NnOT.js", - "H2CJvApKMnfGNNoo.js", - "HASsi6wYHVALExWq.js", - "HGVGO217uW1k5YDh.js", - "HKhyn0kijKfzW6cw.js", - "HMC6hPND9DWLFfZE.js", - "HUKzssLxeQo1wbx9.js", - "Hcpn1gU58DIKIhty.js", - "HdTuY2IGhdlMDOy3.js", - "HfCxNd7mFGZH4s9Y.js", - "HfZAQWoY8n3clLlo.js", - "HiMBS6GeOwEydWYN.js", - "HrOBAXsEX073ReKl.js", - "I5DqzmfuTGwyFWLY.js", - "I7ieW0hNYvvX0KFg.js", - "I9QAPKbaXwMMMBT4.js", - "ID8mCcjkl7PCQhDq.js", - "IPPDvZdE8kn3H9z7.js", - "IR5URcjnCuWBFMoN.js", - "IsLAvY9ikR1cOJWw.js", - "J0IWUhxada2ONowP.js", - "J60gMzmsNau8j53K.js", - "JBoKPBr27C3PMoSD.js", - "JEbs0WlqhKNDOo5A.js", - "JKpC9pVATysq8k4G.js", - "JLn1B9eL53nSUq88.js", - "JQruHprM5R5vZ9DA.js", - "JToUa1mDQ2h3ILKF.js", - "JWEY8OS0ns1fNsQV.js", - "JeThJbOf6Xmbtgo1.js", - "JgCcgDVZX54slrWx.js", - "JhCMYHHYA860Kka8.js", - "JibNjuQrJRnY0yf9.js", - "Jk7OHqx06oCUVAzb.js", - "JstrA46EYSEuRSy5.js", - "JyTxUG5dNW670Sf7.js", - "KIoVBinAZK8sMOqD.js", - "KOR8aafB3D4FLoh6.js", - "KPQfupKuaf4LCv4R.js", - "KSjsDlsx3DD6cT16.js", - "KTBVDHUndI3qDOXM.js", - "KUx0deSF3xNzMucL.js", - "KkjkYAGI9Em1NgiQ.js", - "KoQJTwqoC7foST6v.js", - "KyUPYV1RXJxPOfyA.js", - "L9eAtDyaoHvqryk4.js", - "LYwio2f6xTiKg9dN.js", - "LeKLtvEDrWh4yHsx.js", - "Lg1oRg4oNRvucsvi.js", - "LjfScVGBf0Egr70E.js", - "LjpuZam0IYIbOhFs.js", - "Lpv2N9LK9loeumiW.js", - "Lrb1S2aK7SFVD0C7.js", - "Lu27iXtJVkrJ8bOx.js", - "M0XhKnWjG14pk3iH.js", - "M2FshTX4PjKFVU8y.js", - "M9VgeYGiUO97ZUW4.js", - "MECRxo8X0cfZh1rx.js", - "MJB6WbZSF6Briz30.js", - "MMv2B8TH7jxNCtdl.js", - "MMx8f5uJ15XOgJGg.js", - "MRH5rTTgUPdqo7SO.js", - "MSJWJEUrX7ZmMvAD.js", - "MWtT4Mhf7F1hqemx.js", - "Mp8UjuCLa9jdzhBS.js", - "N9kA46ZQ9LiRjy6T.js", - "NDvNGATDM2xPFJK0.js", - "NheyFTaMKupOgRJb.js", - "NkqtQaLEGYst0PUO.js", - "NnA4zpuO6iUXKhH7.js", - "NnDq4miIPNEtZUWb.js", - "Np8P8IPT2GYlrh6G.js", - "O1FwJHbDqZHwaYK8.js", - "OKivTxfbKZw5Lj3V.js", - "OeCgX3hIsfLfmGvC.js", - "OgSI0Z6SHjYuqKIz.js", - "OqLKL0PiCvYH2QxW.js", - "P29tT1eMMdAw3CPF.js", - "PMISUsaEDBA7D3od.js", - "PMNjdEAusVBfam09.js", - "PVjaKAHTKDA0rA9J.js", - "PWHKisZTZEgCANd8.js", - "PdClojv7yNgQpOUc.js", - "PoNnT5EqvLj2r5yf.js", - "Q1kUE8jcG7id3MHT.js", - "Q4EQgP4gZR8TTm7S.js", - "Q5gh5Y9dCdclcwsD.js", - "Q9EmlWmuDac83cJw.js", - "QPVVDPcJ4Xi5FmQl.js", - "QQ2gHThZHdO4yLLX.js", - "QfTBRGXVfwQSghmd.js", - "QjlGijPHAwAEX3mf.js", - "R4A2ozuhFbrjr6nj.js", - "RDtJXji3hgcKnEBk.js", - "RHyBLYT5oHf7EPnG.js", - "RNr9CwyvLhlnwD2h.js", - "RQPe7k09QdAyws67.js", - "RjcHrQ9inlFj9cUU.js", - "Rmk3UwD0zz4HlTHR.js", - "RprZWlnopSqZt7KZ.js", - "Rr82rh79nCkKHcBD.js", - "RrchOMpEdIvceJxl.js", - "SNjG7IvgQzvCGczR.js", - "SrCHfOJFZwDickqa.js", - "T3RfSt3VMEat3iDD.js", - "TOyQLrugFGzwc5nY.js", - "TU2xjbJ0zFtytF3J.js", - "TXBg7zWxPfWxFmUB.js", - "TdjlJro0RRVSh8g8.js", - "ToKlHDAjJOsC51ag.js", - "Tq45Nd8J3eTvHT41.js", - "TrIYdcG3jDER4WgY.js", - "TwwKxFjK6TNGKbRB.js", - "U4A8FDNmwBGTuQZO.js", - "U78c4oUjKwyUu6jT.js", - "U7lRf56BFaTfsC6B.js", - "U9xh2wriSqCosugW.js", - "UC6G3pFQwzUhrw6F.js", - "UTlgF4azrGQZsoDv.js", - "UaImulhbPURkLJg2.js", - "UsAHQecRlWL5PhP6.js", - "UvycHOjSPm5Zv9KJ.js", - "Ux7L2VL2fYfITST6.js", - "VAs1nXvicdQK18Do.js", - "VCnNWmRBH28Rx0JH.js", - "VJe23auRmrmZxdKM.js", - "VNOKTzCrFbZ6PJUj.js", - "VQaC6ynouW5EQCbC.js", - "VbL0TgaBAmYjrezZ.js", - "VlFUDaKUYoBYKYn0.js", - "VlHuDIAvPr8JM1P5.js", - "VneW4jhf2nXdMpuV.js", - "Vns6WrafVq8NjX7t.js", - "VqTrKPtxv9hpn0Hr.js", - "VtCzyfSnO1im0dgX.js", - "VurA2XNqC0d9U49C.js", - "VzO0ZDcTWvaBn4vm.js", - "WTRYAEzwxRuGENyI.js", - "Wqff6ICWYzvLDYC8.js", - "XClTZOjuhcxWLF51.js", - "XWbpSJrduXAhXAAV.js", - "Xf4FcZ4ZLdWmOXBa.js", - "XuFxKPYheYF4WMmQ.js", - "YDqpKJVy8ijEKdLX.js", - "YEBw2CzHYxsTpTy5.js", - "YFSgWRXel0bWE3EE.js", - "YMaxpXnml01bLGpO.js", - "YhhiWEQbox3WZA3Q.js", - "Z6OmmC0irJzxSnMH.js", - "ZCExF4uNFmHkGEbb.js", - "ZLspFT2I3ZdWWr2H.js", - "ZNW3ubbKIYXAyE48.js", - "Ze9E2zR1GFGWGMVH.js", - "ZfOhDMHPyEkThjEk.js", - "ZgF1sYdbAKaOuHmK.js", - "ZvbBM4gTJHPdU8jU.js", - "a0YU3whUm16wGBNu.js", - "a4Aza4a9v8JMU8dC.js", - "a4Q7RJpW0sqvfATw.js", - "a5WEJ2oxlcdOFWlL.js", - "a6gacHsvgwtsIFSQ.js", - "aAvJrAKLzXhS9qN6.js", - "abcQMF1LW27qA98R.js", - "afdmOvPGMpEdZvCb.js", - "b5prg1FLjCAvBjLy.js", - "bh2qDCKiAIWM0UPi.js", - "bhXUW7IJtEaUGAoV.js", - "bwx9wuEOJPF7btD1.js", - "c3KA1knL2NYNUEww.js", - "cAKqUBuJBsU85erO.js", - "cTYNaKbepMwqYsZ8.js", - "cV9JiAgUPOeUHKnS.js", - "cqYgZQk1C3kMARy5.js", - "d90GpOWwleOgTbOS.js", - "dAMtbn3uQwF8KpKU.js", - "dSie82gBJoln1V2i.js", - "dSmRhZ6o1bUcOSF9.js", - "dXGosSxdoYbET2O8.js", - "dfEgat3jz4EtWszH.js", - "dfnCK8jCPXNLM7Gh.js", - "dkiNmwFXztIVbuxg.js", - "dsXGavzXLerXR8Xg.js", - "dtFvpY96RPzNnphq.js", - "dwSgcFxKN3S0hLJL.js", - "eFVDAqG80veYmhpi.js", - "eGQAyzCFZAEQhyJl.js", - "ecpD6KWtNjMCvuyn.js", - "f062aa2BNClx08D6.js", - "f3rXusHh6VIpVPUl.js", - "f5Mp3kXwCFdPkW6N.js", - "fKzlu6fFE2th9uIJ.js", - "fP2edYbj6QjPPAjL.js", - "fYLSe6CrYciap5y8.js", - "g07HI7vyqiFXPB0o.js", - "gFUXBbTskQBKjxqm.js", - "gKPL3t4vlZAsvtGr.js", - "gPt4hUnaNqE5rVYF.js", - "gQ610vjGKmowl0rj.js", - "gnVpxOeBZpNF4HIF.js", - "gqZLfIr6svrtdwdC.js", - "gu72JaTs9GrSiVTd.js", - "h0DfPwUUOBjyAHMZ.js", - "h1XKoMuVnS0bagRO.js", - "hDC6lroDEPVBituR.js", - "hR1qD2kpFHF8JT8h.js", - "hnsmzvcuiUYB065I.js", - "iM6JLF8jDXMViReZ.js", - "iT0h3VZLEBQnn5Bx.js", - "iT3C15fMyQrj1RmG.js", - "ikaQXTvTWI5nAmUV.js", - "jRSgPhpfN7MH7TTp.js", - "jgO1Kf60Ctt6R0qO.js", - "jpcU8FFWSlQ3gD0L.js", - "jt8vTQBoMOMUccEt.js", - "k3FqFgsF6a3TkxAD.js", - "k8TC0yzp4xfOXD2n.js", - "kEaBLoIHt1FpQVKq.js", - "kMSdRskYDI2J1gnp.js", - "kUyVy3bfEZAGTeru.js", - "kWynO1lQzjiSs8RK.js", - "kYiDBPRKIokFkr4Z.js", - "kYmscP2HuXjDovBD.js", - "kkC5EhqA05U6U0gU.js", - "kmsGLWGxCY8Z8jVG.js", - "l1ntrpa8RE3Lg5xE.js", - "l8qFKSnMpy4P7XQR.js", - "lPudo1grrVp05i7a.js", - "lQOu46YmOiQNhCZR.js", - "lYYkGzqNshiYc7WI.js", - "lbcIoWiXgY07OJpi.js", - "lhemR8EP5tGNKout.js", - "mTnmPcjWmvScIBWY.js", - "mYL4i1vNlMl4vFYy.js", - "mr8qm5Bg6k1idZ6Q.js", - "mziJBUYcsrhkdcCJ.js", - "nD2QVg3DrPK3foMf.js", - "nEaF3jbCiVYD8jia.js", - "nIOeK0BrtdZeZW8X.js", - "ncIjDE6TFx88IQA1.js", - "njmMhHf9qjPBCcNn.js", - "nvrFhHHVq3KzirlR.js", - "nvrT2HhsiGSycaff.js", - "o3JUBKLvE6bBxK2n.js", - "o478K0vsLGzY8YTK.js", - "oEsUsI74yGTZ9CwU.js", - "oGdsGPgJWcyWkiWl.js", - "oWM43EdUiyHgUlfW.js", - "obIXhQXKFyyQoNNV.js", - "ofijDpDzoLphIp8R.js", - "p222EiR8RRtlPm31.js", - "p7NJB1PsY6X5q8OO.js", - "pAgiAGyaLJY10894.js", - "pHyXdPnWwoFrUA5n.js", - "pNPjXEoQGHLKzq0r.js", - "pSfA9mBk9Uw8QMLj.js", - "pq1YQffxtOcqCRTn.js", - "pzknBcJtZWeliE27.js", - "qTk96NKh14YOIShf.js", - "qaVde0sTuMBRi2nl.js", - "qijgjcOBCDmhglRX.js", - "quPcuKsq2fcild4a.js", - "qzGPJflVW7c2Ciim.js", - "rXMylpnEtZpwou6x.js", - "rdD6Ra954TlkzQCu.js", - "red2bt4PGgIWAdTR.js", - "rlTvhnDpj4lzfusf.js", - "rnioLwiJP7ps5Jwy.js", - "roKvPHDSpX4IV11C.js", - "rr4htuVq45onXdRG.js", - "rxB1AqfVMDqTRieE.js", - "s3Wg2xd6AlJ4sz3n.js", - "s7gJQdzuM3fz2zQK.js", - "sSMg43ZjnNmpytfj.js", - "sT3t7huqUVWpbCt3.js", - "sUHuj00IpoZ7Gd03.js", - "sWyO1DNaqb2EdHoW.js", - "sagKJM6oDFlw4ED2.js", - "sgS9rblPkQB36C8S.js", - "syBgPp7rOymCZejX.js", - "t56mnblo1kv3gM1M.js", - "tDrs0aNIYmZPsOoS.js", - "tG1qGqzBLmAR3WHm.js", - "tcZug8ehU6lyYBd9.js", - "tn6SwmjAuNzqE6dx.js", - "tnE8LF6E3svIlLca.js", - "tnilBagajWM8UGQt.js", - "tolkNN5P7oOC8GKZ.js", - "tuIsytv3jl2yAIb2.js", - "uACa6u4JLNMRgFlr.js", - "uSwkYENTOcnfRrqA.js", - "upfK6GM33qZCZjll.js", - "uwdQvZtzy2HVeEzx.js", - "ux3jaLpAUhZ5YqA6.js", - "v5aUWYPlFHKWnZ5Y.js", - "v6LIG7EwWYALxCpP.js", - "vj3zArmX27vCxYJW.js", - "vvdo1NxjmGVkmFCT.js", - "vzMxIDjRlQSxXtCW.js", - "w4JKuTECFmu3YmTR.js", - "wS6OIR3QN4mOUHn0.js", - "wsqNM4NHnwaAAQym.js", - "wzkxiKjxVEeNS1di.js", - "x2RLUUNB7BiIDYCP.js", - "x8XK2fzzXCnSwfjt.js", - "xRd6oA1QWLVpfoBm.js", - "xS2su09zcza9du09.js", - "xVYVegD692CCv8Yl.js", - "xWPgIZOQLba5nZ23.js", - "xobGBJbgFjQCrwvq.js", - "xvH4PKJasHcehOZz.js", - "yIGItnshXI4W46cp.js", - "yJuEWH4wVYuPZMvL.js", - "yRRzSKlcN3L7rEEe.js", - "yXUPiWuQ5o0JBY4i.js", - "yatUu0cd7iKs50rq.js", - "z5HfNUrHy5MS3K7a.js", - "zA6TDttpwMSMl7D8.js", - "zFYCaGR0wbFWjl4T.js", - "zLBLEDl3aGcAxai2.js", - "zR4WAjzXHTZuiu5G.js", - "zY4ZjY7uyKIKMYmX.js", - "ziG9H5Kdb7xC3dFE.js", - "zsiV6XEHlCNGLLPl.js", - "zzk2uRSFjFHB5kjw.js" + "0cNnOYQnj7nFL0mD.js", + "11QMAT1KYGJJmPlD.js", + "16c0m6PsDXWh86uN.js", + "19LL1oevrjmpD8DX.js", + "24Zp9hEvULQsR3lN.js", + "2C6UtWujISe4jqgS.js", + "2sN4VHAs4bo4pOjD.js", + "39mmD9wOsHWas3cl.js", + "3uIkDVzxNjzm5qIH.js", + "43W725G6C7QZ8rr6.js", + "4xqtTqMyOcrwVh63.js", + "5NE3teXZInHQXZ1K.js", + "5X8GbReUxUPWwXMT.js", + "63Yh0nrhCLLfzd14.js", + "6crZPdNEWptukssg.js", + "7IuX8wytm33iRGC3.js", + "7ykah8fvh2Y0o2Hi.js", + "8hCdSTjZqeuVyBGV.js", + "8sJSsjq6wx4IxXWn.js", + "A97EV1Yju3aT7Sng.js", + "ARQbVHKYK39d8vKJ.js", + "AdawSWiB45Vu40rQ.js", + "AhV9QfteQNqqXVjv.js", + "B08DMbt9gcj8uCTc.js", + "C9ARvMauPNwIHj6o.js", + "DBelNjOULhhAADVJ.js", + "DHzODnNNdZ24FNSg.js", + "FjmtA9s13s75DTAY.js", + "FtSG8J2s95hhjUMn.js", + "H7BFq8m8vnkm4Yux.js", + "HiDcm1jhG3sU39ME.js", + "IdTjIw1yduvCdwdR.js", + "J5XafRL0FyZnBPl2.js", + "JTW6557K8nI5p9mL.js", + "JVQK6VW73KxfeJJi.js", + "KxM4zmhQRDHaRybM.js", + "L3ehj3ud1OgjcgSv.js", + "Lj9H0O9XUk830CBt.js", + "LxEhkvdSEQic8VZ6.js", + "MQAMuPF4QqXl76SZ.js", + "MeHXlZ66R3X8luFT.js", + "N0h848GEkBbRDK2x.js", + "N8oUaIkE2Ne571ia.js", + "NO685xdEW0NtJCp7.js", + "Nd1djAF6dLEiLfwV.js", + "NgKdPxwH3vr6mkNi.js", + "NkZrMO4YPiQf0N5Q.js", + "OAemeERMAeGv06pE.js", + "OUef2n36h6lbrsjx.js", + "PaiSiMxCKx9IWmn1.js", + "Pc98GFZjvokeyUcs.js", + "PkHrZiuFokN0OyXi.js", + "QLE6dDm6Bns2J5Tl.js", + "QPuS9YsWAm4LUZWd.js", + "Qo8q0P5j9OKEAP70.js", + "RZibsagclQO5U6o9.js", + "SDwuKuqTsCBZ6hnb.js", + "SVnclT81zDqRLE5E.js", + "SdZ7xAEzJGVDCsaI.js", + "SdrCM66oViwRFF8I.js", + "UINefUJZN0GjcCbB.js", + "UbGzr86u3wqSEr2h.js", + "V1KCAPGMPvAz3F3g.js", + "VM2zbABURI9K3JwQ.js", + "VUFST9Tb3zL9vWvg.js", + "VYw9ipwoHArGVnyW.js", + "VswXxqDjU9IH8dX0.js", + "WDN1kNe7lMc3Zf3d.js", + "WP6opTZkvX3xwtJI.js", + "YjKiWcx7d2nwPy4L.js", + "ZZb57zYE7bJy7rfU.js", + "aSFPODz31zynXho3.js", + "b44tTtRjmI5jdihB.js", + "bHxGutf5lZy0kciK.js", + "bYXlyiRXtdRGYlm0.js", + "cPdtoRmvRC8PqH3x.js", + "chDtEQZoRMOrm2eE.js", + "chiUvs66IHiKTOcN.js", + "dLlcg8m8eiaVBmTg.js", + "drolLZoNuAXQFuPH.js", + "dtHJFFp2mmVsfil3.js", + "dtQH7ZBKfzewtTsq.js", + "fWNVINMVhEwf8k5b.js", + "fsvXI7tuL69Ukmec.js", + "g8Tmet9Ii3NvFqvf.js", + "hcUCeoIFwWPKa5K1.js", + "hfFGFWEKFZXtMKWo.js", + "hpBjbxWg0qLlwX2K.js", + "iWqn1fVeQ8IwZorj.js", + "idiZBzbALb5fXIbz.js", + "iphjuYnLhMMNXpGG.js", + "iqwojL5Ku26wsgnI.js", + "jTgzivraRKrrCOjH.js", + "k7J96MkvfX2GO6JS.js", + "kWHKp2tw3HzkgWCy.js", + "kb2pwRZAjbUbZwcz.js", + "kbh9urTsUcLiwMLH.js", + "knxDGP1YLbnPk03o.js", + "lDfPgVtZf3ULFPjU.js", + "lUcx8NUadgq3oFTY.js", + "mujAsg7US4R7eXhv.js", + "n3bUmtYaVljPdcJW.js", + "nCfWscZucItTYObJ.js", + "nlSJDfv4N9hrncHW.js", + "o0dJxmnrWAZVkGKM.js", + "pqpU9J1x23YLwWYG.js", + "qggycOtvFfaBr4Ax.js", + "r9N0cd9sp6iVG0es.js", + "rDexKQt0ctzdMKdR.js", + "rROfpTez9681wXWx.js", + "rXuOTYAOHCiW167c.js", + "sBXqivqv19SvN5cZ.js", + "slSRg5p8h34Vot34.js", + "slzh77d2DPtvsXk0.js", + "ssuryRgATzt6XksC.js", + "surdCPFakh2JAAHa.js", + "tki0DhoTecjq3LyZ.js", + "u2TxLqkTdoK8aHTo.js", + "v5K5HaHTZmVSJBdr.js", + "vJT2UOO7Ov7a7Rx4.js", + "vJgjAfwq8MuwE2HL.js", + "vwsrPDuVxeNOtdhA.js", + "wIdpkqPBmeVwSSQS.js", + "wIqIF9B43SyDgGYv.js", + "wKIGVpPddx7Y3SQH.js", + "wagZ4VV7431N3Sm8.js", + "x9Ah9e5xAGqCNFO3.js", + "xIIkfmgWfh3teEfr.js", + "yHAPfyaRfC4ijV6x.js" ], "errors": [] }, "files": [ - "0FNOq4J1AdPd2A0q.js", - "0J1yHP1jkGR9y89H.js", - "0YKQGbsKdHSmYGE7.js", - "0mrUnxzufYgsR0Ph.js", - "11ir8nibM5HD69na.js", - "1A87vGLh2PXH0rG0.js", - "1LDSzXeO5CzXgTOc.js", - "1XAilPQEyMWVPA5z.js", - "1kB2su7hLRYDhZ2H.js", - "1mNkLj9JYNr3ofC6.js", - "1wKVvxRTHOyV4Qdv.js", - "22bW97lkvCqisfHX.js", - "23HgjCB1oecxANvA.js", - "23PDHNZEnihcEvdK.js", - "2AdSBXw7IwCiqawQ.js", - "2NLINicPQWbuvp2n.js", - "2VNnVrtktdGUqXEV.js", - "2W9uMTT6iJhfQ044.js", - "2WSN306tL4apjRtD.js", - "2hzDv8ROulOe1elK.js", - "2sDH6RvoOAR40oqH.js", - "2vTVR0quRZQtjNfQ.js", - "2z6DazIpsfiRZHdl.js", - "2zpYzKVDNE5y9RLL.js", - "32EPIAz7Qm71ut3m.js", - "3AbonnSVfoSlGye8.js", - "3JEzEzF1SeYA9lsV.js", - "3VhUyqNY18PzeMKG.js", - "3hfMQkUKYI4rCuBy.js", - "3plV9WFqs2prfAdp.js", - "3sfD1nedXLzuYoXJ.js", - "3z3m1pmw03DbQzcb.js", - "454x3Q95pLvZm0Kx.js", - "49smPAj5J0INSFPI.js", - "4FGKZk2f0xrmIDnp.js", - "4WQ25VsJSUZ2DeRB.js", - "4ZR7p8G3OzOBWx0L.js", - "4fnTKgl0HW9ZrWyJ.js", - "4iuTz0uInAfMaoGl.js", - "4pQW4WLyhjbZR85k.js", - "4rb7LfMq9CTnlrpn.js", - "52mwb33mGrQjq89B.js", - "5Fe1ELaS6Gnvy0Cj.js", - "5QR83whGk4ZyuJcA.js", - "5QjaPBFbv5rIYpla.js", - "5o1XiceC4rutjMms.js", - "5rlneScoI5feQ3Di.js", - "5sI9iYh5j2nx2XyT.js", - "6JrUjs3g5x6bFnj3.js", - "6V3qHON3mcerlBlB.js", - "6ZS1rQLkNvMDO0Fp.js", - "6a5nBENmfxy93vGY.js", - "6fElmBxTjdAaubbK.js", - "6qUKKep5vhFYmo1J.js", - "6tjn0RH4VyOPFneS.js", - "715G1Bf0haOHvmYQ.js", - "7BgJe9YkbHTh3ucm.js", - "7Ck0fkzE4WQ62qVe.js", - "7H6wYyJ6cpaoc2QQ.js", - "7VAhXHov6pR1SkgD.js", - "7e8FgQUF2oANANmx.js", - "7szLG4VALuuy1cPm.js", - "84IB8CWa55XzoAkv.js", - "86ivOsBQAuu0UmFg.js", - "8ByuHnUZ4RNTdGVv.js", - "8Gan2EeGExBFSxmp.js", - "8N3Uqjq1ZxPxo4pk.js", - "8OwUgwZI8hOJt2hG.js", - "8RNziYGGb4sp3BGQ.js", - "8ZAUBSH9CM9OTpTL.js", - "93K85NnVwjVNXlZq.js", - "97yDvwmUqkwHktQj.js", - "9EVj4bmZJex45Mt7.js", - "9JnPK1jNUEso7Pv8.js", - "9RFoasDcFnYZ1txR.js", - "9fK07tqqZyPg7dpx.js", - "A3fvV69RS1lYgma0.js", - "ACgKpKrEEHoNGG0h.js", - "AHZ8f7dfN8jNsYk6.js", - "AHt3D7EHKWBcL3vu.js", - "ALuPRzf85dmkEfLo.js", - "AMxezwtYnWCF6Oza.js", - "AV2Kj6jgmIc45zKi.js", - "B6ZbY3bxTPg6nCng.js", - "B950b0XnIUYCdVwu.js", - "BAOv7moTxsKlT3JS.js", - "BNJRV66jlrp51qZK.js", - "BtyFhdGMKiMamGhM.js", - "C4LZnaX0MYgwrszj.js", - "C8Q4jf6LSyA3lQHS.js", - "CCK1iIfPmB398ziT.js", - "CiFeduksZJ6PRulx.js", - "CkE8NZOhzPkuRrKJ.js", - "DTiHS6RfwhF4THbf.js", - "DsE6rTSzxEn6uWMz.js", - "DuM5l2Yb4bdvDeaG.js", - "DxQnamsb2AuW0p2e.js", - "E0OhL9ZO8vb8A4qq.js", - "E2FhOfZzu2CqTSeA.js", - "E4CHDe1xfmcV3oGv.js", - "E6DMqfDeczqmVMFV.js", - "E7D4bxz8gy4e1wL7.js", - "EDAMEOzdBfkoKHxP.js", - "EGWF3LHav3e2zFL4.js", - "EQ5dtGW5kQhtAb87.js", - "EU5j0hnDTG9Z6d1e.js", - "EVBSHEC5nmmj2X41.js", - "EmXwcuycEH8slEn5.js", - "EmmG49pMOPHRwDzR.js", - "Ew3C2WmLCtc1KT46.js", - "FXuyiJoXdAh6WhRK.js", - "FYMLsxxg63nHNGAe.js", - "FYUPfYyTYZkxRLFT.js", - "FceC4TNNBvRnA7JM.js", - "Fk14eUaTRvIoCBB1.js", - "FkTwk8hfHpRLbAp2.js", - "FmLx9pwOkzqqU7Ph.js", - "Fvlc4RkeF4dHjW3m.js", - "GOq4TcnWbfyfCo2V.js", - "GZFsuynUhgZqwTGo.js", - "GbPEy22VuCNzlNv2.js", - "Gc8S5TYlVdV8NnOT.js", - "H2CJvApKMnfGNNoo.js", - "HASsi6wYHVALExWq.js", - "HGVGO217uW1k5YDh.js", - "HKhyn0kijKfzW6cw.js", - "HMC6hPND9DWLFfZE.js", - "HUKzssLxeQo1wbx9.js", - "Hcpn1gU58DIKIhty.js", - "HdTuY2IGhdlMDOy3.js", - "HfCxNd7mFGZH4s9Y.js", - "HfZAQWoY8n3clLlo.js", - "HiMBS6GeOwEydWYN.js", - "HrOBAXsEX073ReKl.js", - "I5DqzmfuTGwyFWLY.js", - "I7ieW0hNYvvX0KFg.js", - "I9QAPKbaXwMMMBT4.js", - "ID8mCcjkl7PCQhDq.js", - "IPPDvZdE8kn3H9z7.js", - "IR5URcjnCuWBFMoN.js", - "IsLAvY9ikR1cOJWw.js", - "J0IWUhxada2ONowP.js", - "J60gMzmsNau8j53K.js", - "JBoKPBr27C3PMoSD.js", - "JEbs0WlqhKNDOo5A.js", - "JKpC9pVATysq8k4G.js", - "JLn1B9eL53nSUq88.js", - "JQruHprM5R5vZ9DA.js", - "JToUa1mDQ2h3ILKF.js", - "JWEY8OS0ns1fNsQV.js", - "JeThJbOf6Xmbtgo1.js", - "JgCcgDVZX54slrWx.js", - "JhCMYHHYA860Kka8.js", - "JibNjuQrJRnY0yf9.js", - "Jk7OHqx06oCUVAzb.js", - "JstrA46EYSEuRSy5.js", - "JyTxUG5dNW670Sf7.js", - "KIoVBinAZK8sMOqD.js", - "KOR8aafB3D4FLoh6.js", - "KPQfupKuaf4LCv4R.js", - "KSjsDlsx3DD6cT16.js", - "KTBVDHUndI3qDOXM.js", - "KUx0deSF3xNzMucL.js", - "KkjkYAGI9Em1NgiQ.js", - "KoQJTwqoC7foST6v.js", - "KyUPYV1RXJxPOfyA.js", - "L9eAtDyaoHvqryk4.js", - "LYwio2f6xTiKg9dN.js", - "LeKLtvEDrWh4yHsx.js", - "Lg1oRg4oNRvucsvi.js", - "LjfScVGBf0Egr70E.js", - "LjpuZam0IYIbOhFs.js", - "Lpv2N9LK9loeumiW.js", - "Lrb1S2aK7SFVD0C7.js", - "Lu27iXtJVkrJ8bOx.js", - "M0XhKnWjG14pk3iH.js", - "M2FshTX4PjKFVU8y.js", - "M9VgeYGiUO97ZUW4.js", - "MECRxo8X0cfZh1rx.js", - "MJB6WbZSF6Briz30.js", - "MMv2B8TH7jxNCtdl.js", - "MMx8f5uJ15XOgJGg.js", - "MRH5rTTgUPdqo7SO.js", - "MSJWJEUrX7ZmMvAD.js", - "MWtT4Mhf7F1hqemx.js", - "Mp8UjuCLa9jdzhBS.js", - "N9kA46ZQ9LiRjy6T.js", - "NDvNGATDM2xPFJK0.js", - "NheyFTaMKupOgRJb.js", - "NkqtQaLEGYst0PUO.js", - "NnA4zpuO6iUXKhH7.js", - "NnDq4miIPNEtZUWb.js", - "Np8P8IPT2GYlrh6G.js", - "O1FwJHbDqZHwaYK8.js", - "OKivTxfbKZw5Lj3V.js", - "OeCgX3hIsfLfmGvC.js", - "OgSI0Z6SHjYuqKIz.js", - "OqLKL0PiCvYH2QxW.js", - "P29tT1eMMdAw3CPF.js", - "PMISUsaEDBA7D3od.js", - "PMNjdEAusVBfam09.js", - "PVjaKAHTKDA0rA9J.js", - "PWHKisZTZEgCANd8.js", - "PdClojv7yNgQpOUc.js", - "PoNnT5EqvLj2r5yf.js", - "Q1kUE8jcG7id3MHT.js", - "Q4EQgP4gZR8TTm7S.js", - "Q5gh5Y9dCdclcwsD.js", - "Q9EmlWmuDac83cJw.js", - "QPVVDPcJ4Xi5FmQl.js", - "QQ2gHThZHdO4yLLX.js", - "QfTBRGXVfwQSghmd.js", - "QjlGijPHAwAEX3mf.js", - "R4A2ozuhFbrjr6nj.js", - "RDtJXji3hgcKnEBk.js", - "RHyBLYT5oHf7EPnG.js", - "RNr9CwyvLhlnwD2h.js", - "RQPe7k09QdAyws67.js", - "RjcHrQ9inlFj9cUU.js", - "Rmk3UwD0zz4HlTHR.js", - "RprZWlnopSqZt7KZ.js", - "Rr82rh79nCkKHcBD.js", - "RrchOMpEdIvceJxl.js", - "SNjG7IvgQzvCGczR.js", - "SrCHfOJFZwDickqa.js", - "T3RfSt3VMEat3iDD.js", - "TOyQLrugFGzwc5nY.js", - "TU2xjbJ0zFtytF3J.js", - "TXBg7zWxPfWxFmUB.js", - "TdjlJro0RRVSh8g8.js", - "ToKlHDAjJOsC51ag.js", - "Tq45Nd8J3eTvHT41.js", - "TrIYdcG3jDER4WgY.js", - "TwwKxFjK6TNGKbRB.js", - "U4A8FDNmwBGTuQZO.js", - "U78c4oUjKwyUu6jT.js", - "U7lRf56BFaTfsC6B.js", - "U9xh2wriSqCosugW.js", - "UC6G3pFQwzUhrw6F.js", - "UTlgF4azrGQZsoDv.js", - "UaImulhbPURkLJg2.js", - "UsAHQecRlWL5PhP6.js", - "UvycHOjSPm5Zv9KJ.js", - "Ux7L2VL2fYfITST6.js", - "VAs1nXvicdQK18Do.js", - "VCnNWmRBH28Rx0JH.js", - "VJe23auRmrmZxdKM.js", - "VNOKTzCrFbZ6PJUj.js", - "VQaC6ynouW5EQCbC.js", - "VbL0TgaBAmYjrezZ.js", - "VlFUDaKUYoBYKYn0.js", - "VlHuDIAvPr8JM1P5.js", - "VneW4jhf2nXdMpuV.js", - "Vns6WrafVq8NjX7t.js", - "VqTrKPtxv9hpn0Hr.js", - "VtCzyfSnO1im0dgX.js", - "VurA2XNqC0d9U49C.js", - "VzO0ZDcTWvaBn4vm.js", - "WTRYAEzwxRuGENyI.js", - "Wqff6ICWYzvLDYC8.js", - "XClTZOjuhcxWLF51.js", - "XWbpSJrduXAhXAAV.js", - "Xf4FcZ4ZLdWmOXBa.js", - "XuFxKPYheYF4WMmQ.js", - "YDqpKJVy8ijEKdLX.js", - "YEBw2CzHYxsTpTy5.js", - "YFSgWRXel0bWE3EE.js", - "YMaxpXnml01bLGpO.js", - "YhhiWEQbox3WZA3Q.js", - "Z6OmmC0irJzxSnMH.js", - "ZCExF4uNFmHkGEbb.js", - "ZLspFT2I3ZdWWr2H.js", - "ZNW3ubbKIYXAyE48.js", - "Ze9E2zR1GFGWGMVH.js", - "ZfOhDMHPyEkThjEk.js", - "ZgF1sYdbAKaOuHmK.js", - "ZvbBM4gTJHPdU8jU.js", - "a0YU3whUm16wGBNu.js", - "a4Aza4a9v8JMU8dC.js", - "a4Q7RJpW0sqvfATw.js", - "a5WEJ2oxlcdOFWlL.js", - "a6gacHsvgwtsIFSQ.js", - "aAvJrAKLzXhS9qN6.js", - "abcQMF1LW27qA98R.js", - "afdmOvPGMpEdZvCb.js", - "b5prg1FLjCAvBjLy.js", - "bh2qDCKiAIWM0UPi.js", - "bhXUW7IJtEaUGAoV.js", - "bwx9wuEOJPF7btD1.js", - "c3KA1knL2NYNUEww.js", - "cAKqUBuJBsU85erO.js", - "cTYNaKbepMwqYsZ8.js", - "cV9JiAgUPOeUHKnS.js", - "cqYgZQk1C3kMARy5.js", - "d90GpOWwleOgTbOS.js", - "dAMtbn3uQwF8KpKU.js", - "dSie82gBJoln1V2i.js", - "dSmRhZ6o1bUcOSF9.js", - "dXGosSxdoYbET2O8.js", - "dfEgat3jz4EtWszH.js", - "dfnCK8jCPXNLM7Gh.js", - "dkiNmwFXztIVbuxg.js", - "dsXGavzXLerXR8Xg.js", - "dtFvpY96RPzNnphq.js", - "dwSgcFxKN3S0hLJL.js", - "eFVDAqG80veYmhpi.js", - "eGQAyzCFZAEQhyJl.js", - "ecpD6KWtNjMCvuyn.js", - "f062aa2BNClx08D6.js", - "f3rXusHh6VIpVPUl.js", - "f5Mp3kXwCFdPkW6N.js", - "fKzlu6fFE2th9uIJ.js", - "fP2edYbj6QjPPAjL.js", - "fYLSe6CrYciap5y8.js", - "g07HI7vyqiFXPB0o.js", - "gFUXBbTskQBKjxqm.js", - "gKPL3t4vlZAsvtGr.js", - "gPt4hUnaNqE5rVYF.js", - "gQ610vjGKmowl0rj.js", - "gnVpxOeBZpNF4HIF.js", - "gqZLfIr6svrtdwdC.js", - "gu72JaTs9GrSiVTd.js", - "h0DfPwUUOBjyAHMZ.js", - "h1XKoMuVnS0bagRO.js", - "hDC6lroDEPVBituR.js", - "hR1qD2kpFHF8JT8h.js", - "hnsmzvcuiUYB065I.js", - "iM6JLF8jDXMViReZ.js", - "iT0h3VZLEBQnn5Bx.js", - "iT3C15fMyQrj1RmG.js", - "ikaQXTvTWI5nAmUV.js", - "jRSgPhpfN7MH7TTp.js", - "jgO1Kf60Ctt6R0qO.js", - "jpcU8FFWSlQ3gD0L.js", - "jt8vTQBoMOMUccEt.js", - "k3FqFgsF6a3TkxAD.js", - "k8TC0yzp4xfOXD2n.js", - "kEaBLoIHt1FpQVKq.js", - "kMSdRskYDI2J1gnp.js", - "kUyVy3bfEZAGTeru.js", - "kWynO1lQzjiSs8RK.js", - "kYiDBPRKIokFkr4Z.js", - "kYmscP2HuXjDovBD.js", - "kkC5EhqA05U6U0gU.js", - "kmsGLWGxCY8Z8jVG.js", - "l1ntrpa8RE3Lg5xE.js", - "l8qFKSnMpy4P7XQR.js", - "lPudo1grrVp05i7a.js", - "lQOu46YmOiQNhCZR.js", - "lYYkGzqNshiYc7WI.js", - "lbcIoWiXgY07OJpi.js", - "lhemR8EP5tGNKout.js", - "mTnmPcjWmvScIBWY.js", - "mYL4i1vNlMl4vFYy.js", - "mr8qm5Bg6k1idZ6Q.js", - "mziJBUYcsrhkdcCJ.js", - "nD2QVg3DrPK3foMf.js", - "nEaF3jbCiVYD8jia.js", - "nIOeK0BrtdZeZW8X.js", - "ncIjDE6TFx88IQA1.js", - "njmMhHf9qjPBCcNn.js", - "nvrFhHHVq3KzirlR.js", - "nvrT2HhsiGSycaff.js", - "o3JUBKLvE6bBxK2n.js", - "o478K0vsLGzY8YTK.js", - "oEsUsI74yGTZ9CwU.js", - "oGdsGPgJWcyWkiWl.js", - "oWM43EdUiyHgUlfW.js", - "obIXhQXKFyyQoNNV.js", - "ofijDpDzoLphIp8R.js", - "p222EiR8RRtlPm31.js", - "p7NJB1PsY6X5q8OO.js", - "pAgiAGyaLJY10894.js", - "pHyXdPnWwoFrUA5n.js", - "pNPjXEoQGHLKzq0r.js", - "pSfA9mBk9Uw8QMLj.js", - "pq1YQffxtOcqCRTn.js", - "pzknBcJtZWeliE27.js", - "qTk96NKh14YOIShf.js", - "qaVde0sTuMBRi2nl.js", - "qijgjcOBCDmhglRX.js", - "quPcuKsq2fcild4a.js", - "qzGPJflVW7c2Ciim.js", - "rXMylpnEtZpwou6x.js", - "rdD6Ra954TlkzQCu.js", - "red2bt4PGgIWAdTR.js", - "rlTvhnDpj4lzfusf.js", - "rnioLwiJP7ps5Jwy.js", - "roKvPHDSpX4IV11C.js", - "rr4htuVq45onXdRG.js", - "rxB1AqfVMDqTRieE.js", - "s3Wg2xd6AlJ4sz3n.js", - "s7gJQdzuM3fz2zQK.js", - "sSMg43ZjnNmpytfj.js", - "sT3t7huqUVWpbCt3.js", - "sUHuj00IpoZ7Gd03.js", - "sWyO1DNaqb2EdHoW.js", - "sagKJM6oDFlw4ED2.js", - "sgS9rblPkQB36C8S.js", - "syBgPp7rOymCZejX.js", - "t56mnblo1kv3gM1M.js", - "tDrs0aNIYmZPsOoS.js", - "tG1qGqzBLmAR3WHm.js", - "tcZug8ehU6lyYBd9.js", - "tn6SwmjAuNzqE6dx.js", - "tnE8LF6E3svIlLca.js", - "tnilBagajWM8UGQt.js", - "tolkNN5P7oOC8GKZ.js", - "tuIsytv3jl2yAIb2.js", - "uACa6u4JLNMRgFlr.js", - "uSwkYENTOcnfRrqA.js", - "upfK6GM33qZCZjll.js", - "uwdQvZtzy2HVeEzx.js", - "ux3jaLpAUhZ5YqA6.js", - "v5aUWYPlFHKWnZ5Y.js", - "v6LIG7EwWYALxCpP.js", - "vj3zArmX27vCxYJW.js", - "vvdo1NxjmGVkmFCT.js", - "vzMxIDjRlQSxXtCW.js", - "w4JKuTECFmu3YmTR.js", - "wS6OIR3QN4mOUHn0.js", - "wsqNM4NHnwaAAQym.js", - "wzkxiKjxVEeNS1di.js", - "x2RLUUNB7BiIDYCP.js", - "x8XK2fzzXCnSwfjt.js", - "xRd6oA1QWLVpfoBm.js", - "xS2su09zcza9du09.js", - "xVYVegD692CCv8Yl.js", - "xWPgIZOQLba5nZ23.js", - "xobGBJbgFjQCrwvq.js", - "xvH4PKJasHcehOZz.js", - "yIGItnshXI4W46cp.js", - "yJuEWH4wVYuPZMvL.js", - "yRRzSKlcN3L7rEEe.js", - "yXUPiWuQ5o0JBY4i.js", - "yatUu0cd7iKs50rq.js", - "z5HfNUrHy5MS3K7a.js", - "zA6TDttpwMSMl7D8.js", - "zFYCaGR0wbFWjl4T.js", - "zLBLEDl3aGcAxai2.js", - "zR4WAjzXHTZuiu5G.js", - "zY4ZjY7uyKIKMYmX.js", - "ziG9H5Kdb7xC3dFE.js", - "zsiV6XEHlCNGLLPl.js", - "zzk2uRSFjFHB5kjw.js" + "0cNnOYQnj7nFL0mD.js", + "11QMAT1KYGJJmPlD.js", + "16c0m6PsDXWh86uN.js", + "19LL1oevrjmpD8DX.js", + "24Zp9hEvULQsR3lN.js", + "2C6UtWujISe4jqgS.js", + "2sN4VHAs4bo4pOjD.js", + "39mmD9wOsHWas3cl.js", + "3uIkDVzxNjzm5qIH.js", + "43W725G6C7QZ8rr6.js", + "4xqtTqMyOcrwVh63.js", + "5NE3teXZInHQXZ1K.js", + "5X8GbReUxUPWwXMT.js", + "63Yh0nrhCLLfzd14.js", + "6crZPdNEWptukssg.js", + "7IuX8wytm33iRGC3.js", + "7ykah8fvh2Y0o2Hi.js", + "8hCdSTjZqeuVyBGV.js", + "8sJSsjq6wx4IxXWn.js", + "A97EV1Yju3aT7Sng.js", + "ARQbVHKYK39d8vKJ.js", + "AdawSWiB45Vu40rQ.js", + "AhV9QfteQNqqXVjv.js", + "B08DMbt9gcj8uCTc.js", + "C9ARvMauPNwIHj6o.js", + "DBelNjOULhhAADVJ.js", + "DHzODnNNdZ24FNSg.js", + "FjmtA9s13s75DTAY.js", + "FtSG8J2s95hhjUMn.js", + "H7BFq8m8vnkm4Yux.js", + "HiDcm1jhG3sU39ME.js", + "IdTjIw1yduvCdwdR.js", + "J5XafRL0FyZnBPl2.js", + "JTW6557K8nI5p9mL.js", + "JVQK6VW73KxfeJJi.js", + "KxM4zmhQRDHaRybM.js", + "L3ehj3ud1OgjcgSv.js", + "Lj9H0O9XUk830CBt.js", + "LxEhkvdSEQic8VZ6.js", + "MQAMuPF4QqXl76SZ.js", + "MeHXlZ66R3X8luFT.js", + "N0h848GEkBbRDK2x.js", + "N8oUaIkE2Ne571ia.js", + "NO685xdEW0NtJCp7.js", + "Nd1djAF6dLEiLfwV.js", + "NgKdPxwH3vr6mkNi.js", + "NkZrMO4YPiQf0N5Q.js", + "OAemeERMAeGv06pE.js", + "OUef2n36h6lbrsjx.js", + "PaiSiMxCKx9IWmn1.js", + "Pc98GFZjvokeyUcs.js", + "PkHrZiuFokN0OyXi.js", + "QLE6dDm6Bns2J5Tl.js", + "QPuS9YsWAm4LUZWd.js", + "Qo8q0P5j9OKEAP70.js", + "RZibsagclQO5U6o9.js", + "SDwuKuqTsCBZ6hnb.js", + "SVnclT81zDqRLE5E.js", + "SdZ7xAEzJGVDCsaI.js", + "SdrCM66oViwRFF8I.js", + "UINefUJZN0GjcCbB.js", + "UbGzr86u3wqSEr2h.js", + "V1KCAPGMPvAz3F3g.js", + "VM2zbABURI9K3JwQ.js", + "VUFST9Tb3zL9vWvg.js", + "VYw9ipwoHArGVnyW.js", + "VswXxqDjU9IH8dX0.js", + "WDN1kNe7lMc3Zf3d.js", + "WP6opTZkvX3xwtJI.js", + "YjKiWcx7d2nwPy4L.js", + "ZZb57zYE7bJy7rfU.js", + "aSFPODz31zynXho3.js", + "b44tTtRjmI5jdihB.js", + "bHxGutf5lZy0kciK.js", + "bYXlyiRXtdRGYlm0.js", + "cPdtoRmvRC8PqH3x.js", + "chDtEQZoRMOrm2eE.js", + "chiUvs66IHiKTOcN.js", + "dLlcg8m8eiaVBmTg.js", + "drolLZoNuAXQFuPH.js", + "dtHJFFp2mmVsfil3.js", + "dtQH7ZBKfzewtTsq.js", + "fWNVINMVhEwf8k5b.js", + "fsvXI7tuL69Ukmec.js", + "g8Tmet9Ii3NvFqvf.js", + "hcUCeoIFwWPKa5K1.js", + "hfFGFWEKFZXtMKWo.js", + "hpBjbxWg0qLlwX2K.js", + "iWqn1fVeQ8IwZorj.js", + "idiZBzbALb5fXIbz.js", + "iphjuYnLhMMNXpGG.js", + "iqwojL5Ku26wsgnI.js", + "jTgzivraRKrrCOjH.js", + "k7J96MkvfX2GO6JS.js", + "kWHKp2tw3HzkgWCy.js", + "kb2pwRZAjbUbZwcz.js", + "kbh9urTsUcLiwMLH.js", + "knxDGP1YLbnPk03o.js", + "lDfPgVtZf3ULFPjU.js", + "lUcx8NUadgq3oFTY.js", + "mujAsg7US4R7eXhv.js", + "n3bUmtYaVljPdcJW.js", + "nCfWscZucItTYObJ.js", + "nlSJDfv4N9hrncHW.js", + "o0dJxmnrWAZVkGKM.js", + "pqpU9J1x23YLwWYG.js", + "qggycOtvFfaBr4Ax.js", + "r9N0cd9sp6iVG0es.js", + "rDexKQt0ctzdMKdR.js", + "rROfpTez9681wXWx.js", + "rXuOTYAOHCiW167c.js", + "sBXqivqv19SvN5cZ.js", + "slSRg5p8h34Vot34.js", + "slzh77d2DPtvsXk0.js", + "ssuryRgATzt6XksC.js", + "surdCPFakh2JAAHa.js", + "tki0DhoTecjq3LyZ.js", + "u2TxLqkTdoK8aHTo.js", + "v5K5HaHTZmVSJBdr.js", + "vJT2UOO7Ov7a7Rx4.js", + "vJgjAfwq8MuwE2HL.js", + "vwsrPDuVxeNOtdhA.js", + "wIdpkqPBmeVwSSQS.js", + "wIqIF9B43SyDgGYv.js", + "wKIGVpPddx7Y3SQH.js", + "wagZ4VV7431N3Sm8.js", + "x9Ah9e5xAGqCNFO3.js", + "xIIkfmgWfh3teEfr.js", + "yHAPfyaRfC4ijV6x.js" ] } \ No newline at end of file diff --git a/tools/script-comparison-data.json b/tools/script-comparison-data.json index 9edc13d..ccf5873 100644 --- a/tools/script-comparison-data.json +++ b/tools/script-comparison-data.json @@ -4,136 +4,227 @@ "01VFjGVxkjb5P1ve.js", "04bAiHISSW53w94Y.js", "06IaVCOC0RCJbxEf.js", + "07tvKnPT8ICtv2us.js", "08S8Ozi5b4EdwZp5.js", "09sSpnW8z2zcVEdf.js", + "0BP5l7bIkf744G1k.js", + "0IAc5VFR2ogXOaGE.js", + "0J1yHP1jkGR9y89H.js", "0KG3HoTNoZhaINIj.js", "0LCQtsiK2aUfYRmD.js", + "0PzfGjGhHQbxEwlb.js", + "0cNnOYQnj7nFL0mD.js", "0e0UZT2FodOJDdgW.js", "0e7OkamNAaAk4Oit.js", "0iTLDgFHO9Rgc010.js", - "0jTqyz0wRlK6XPF7.js", + "0kUalAsb4OhtYbaJ.js", "0vaYwAlMWTmOBl8k.js", + "0wmIC2MssUX6LW3N.js", + "0yyofYHeDRQlFliO.js", + "11QMAT1KYGJJmPlD.js", + "11uCC0mK2uL783al.js", "15C6LbCUmQgPEoDM.js", + "16c0m6PsDXWh86uN.js", "16nCOByUaSFDym1V.js", - "18MeEQ0As3JvER71.js", "1E47r2ba6IGe8uFK.js", "1IodsW9ImamYoEYz.js", + "1JwxZujbDcueLWBL.js", "1LDm3OB32skZe6Xv.js", "1MDOKny7IirJPoI6.js", + "1OpT3CXs07XFWWCT.js", + "1PPh4vHd5sPKtudZ.js", "1PQPxFjmRlulHHzo.js", "1UalUmNzjB4rp3SZ.js", + "1XAilPQEyMWVPA5z.js", "1ZrzpfVwPJHdwp23.js", + "1l7Jz2ZHbAWko7Vm.js", "1wEjrgff7ASxKVmy.js", + "1yOvw74jzFfaI87b.js", + "22PMOW0G5MWiBQmg.js", + "23vWiHUjxtRQ3Efz.js", + "24Zp9hEvULQsR3lN.js", "29wHhLMnuoVjfQtN.js", + "2AOo7KUyzMrgIlgM.js", + "2C6UtWujISe4jqgS.js", "2Cw5j0iGAnFNegWr.js", "2GYAd4OC888oQFBp.js", + "2IPTF0akWw9y48br.js", "2OqLHRqEBEjBm2LW.js", - "2QB0LjueuJcIaHaC.js", + "2S6XlGCdRlXuaaVw.js", "2WBq5gW780C6zfCp.js", + "2XXqxAF5s5Sws6qj.js", + "2XaJNYUMQAmSOsqi.js", + "2kRwCc31fuZgrsy8.js", "2mFNelLOAQ6iJsZl.js", "2miWWeRrEpq1beG4.js", "2p9IK6Y5Z4NQD6FY.js", + "2sN4VHAs4bo4pOjD.js", "2wk0yrRPlPsdqr3L.js", + "2yW0kuwLfgRzJR2S.js", + "2yctEihGmdCfTTVx.js", + "2z6DazIpsfiRZHdl.js", + "32EPIAz7Qm71ut3m.js", "33PWizq5F7pkKnQT.js", + "33US8YRgaMqYu2We.js", + "37UN17gb8suFeZIW.js", + "3AbonnSVfoSlGye8.js", "3CdYFcInQVCIBUiE.js", "3Cn2TlRahlm5LkSj.js", - "3LLiSgj6KGtgqcmo.js", "3R6Y4NpNTqPc83wh.js", + "3SuLF6SImYWEHMo2.js", "3TesBGh8HnlGuafu.js", "3Vbe6gdW8N0bIvXJ.js", "3aEzK0DehSHtVykd.js", + "3eSaX0BeaUalNkEP.js", "3fdCQ3h3iVuhdDs9.js", + "3j8yybMaAZSwzxIE.js", + "3jm0NoYpgB6ZuUSl.js", + "3l7MQSa10Kve2K3P.js", "3nTSOcCmNZpQWK8b.js", + "3na3lnAt3bfysvcD.js", "3tE8gFSl28EhCmo5.js", + "42UATqzohYML6a9t.js", + "43W725G6C7QZ8rr6.js", + "49smPAj5J0INSFPI.js", "4HN98hMdQJxM35pA.js", "4JVIy5xtVwvadoqv.js", - "4OlwxU60UqKg81yb.js", + "4Q3Mp04O2sMgKv9x.js", "4QoxhoekgVeZcQA7.js", + "4WQ25VsJSUZ2DeRB.js", "4XrAeL2DitxE8OaK.js", "4cOZzUvu1nytcqNn.js", "4cumLUlcuJ7m8C6t.js", "4drWKXjMgasxY7Jy.js", "4gkz3LR7CK1b8ulK.js", + "4jLe2XZQVUB8LztP.js", "4otpLq2TnDdgzpvc.js", "4rTmV3TNxctUe0ly.js", "4rhxLzau7jZ4SDxg.js", "4uAUUZmLgxBKSmXA.js", + "4xqtTqMyOcrwVh63.js", "52kbfuWrOh6dsTtd.js", "53HFDNuMnX1Aw1a4.js", + "55eYGvSXetDMK80S.js", + "5GHQxfxlmjyt1fNq.js", "5IoYTyedCMYwt3ys.js", + "5KIozV7HxyGvskeD.js", "5LdJCKfQem1AQK24.js", + "5MxRDXzUBPfp2KKD.js", + "5NE3teXZInHQXZ1K.js", + "5QR83whGk4ZyuJcA.js", + "5X8GbReUxUPWwXMT.js", "5Zxc13GBaJaxCf48.js", + "5gPAT5Bb2FvQwYNQ.js", "5lc1eHIYQNpSRWip.js", + "5rlneScoI5feQ3Di.js", "5sYpJkT2WXIe0gIZ.js", + "5z5nGwZC5RIwokev.js", + "6136BMmiGLwZ16H1.js", + "62Ky6bC1EnTllSJA.js", "65o8pQj6oGNnXce6.js", + "6A6ddQDJo23oOWtK.js", "6EXkbVTRBhKTEu81.js", "6Fe8M5MdklKS2olx.js", + "6HfCvw24X6oEe2vn.js", "6MSodMuZ5xk2JJJ9.js", "6Mjy0jDqczA8BxhS.js", + "6P2QNPKfwQ1xwxZT.js", "6U8xox4mBrn5eYIp.js", - "6Ws3ieQ7pG5poUyT.js", "6XWJWOUQPgKMsFul.js", - "6elUNF58TaiYjxcx.js", + "6a5nBENmfxy93vGY.js", + "6crZPdNEWptukssg.js", + "6frithfMs7Nbv0IZ.js", "6gRixT3zIOAberJb.js", + "6jp8slPU33oBQe1V.js", + "6maNAmREdataXmo4.js", + "6oSs8qKFNFz2lSmh.js", "6ubojp9zwbfJnosT.js", + "6uldpFvKOCoW92cC.js", + "713v1T8HNste94pr.js", "71DmrxCTKGYL4Z7X.js", "7F3miqRA0ceMUBIu.js", "7OmrMjaU48o2FEZi.js", "7ScfB4o1QhXnNUfq.js", "7ateEtT5HXg1vObY.js", + "7f6OsttTzE7Hvzfk.js", + "7n3SEAGRA5ESK8gV.js", + "7ykah8fvh2Y0o2Hi.js", + "86ivOsBQAuu0UmFg.js", "87rrZ3ojHrXa3lCn.js", "8AoA4bnstBtglRGZ.js", + "8BCzpjFU0GeA17Wp.js", "8K9tpCwvFC9INk5V.js", "8LmUVQxOwTLSeabg.js", + "8OwUgwZI8hOJt2hG.js", "8ShLVT0bK1eQpinj.js", - "8ThudCYRqkjQIwJH.js", + "8TRiAJ8thIKE4IoL.js", "8WJsecxdndaHRxxS.js", "8WeYU5e5LN9UeWFs.js", "8fefDfiYKFOWdPER.js", "8g2iitsgaJarKQpr.js", "8gCja0mfKt4nYVZc.js", + "8hCdSTjZqeuVyBGV.js", "8hIyWDyfbgGAig65.js", "8jvEVPUCg3rKG48Y.js", "8noxHUQKR55Kx1YN.js", "8oE0DTzz0krOfFlV.js", + "8pbVGsVFlDebu2Ac.js", "8vpAtJ93GIeye1qj.js", "8wG9l4T9fc1bM0TN.js", "8yBr6VbdKcrWUuqw.js", "91S2GnBFYFbxmOCK.js", "94eDAi6pkMhG3Ex9.js", "956dUb5sd6OtbWZR.js", + "96Y1yIH1lRjTs5hL.js", + "97yDvwmUqkwHktQj.js", + "98nKfcimlaPeM9h5.js", "9HWEDsnNxSykqbF5.js", "9MDi3ok9gPwtbALf.js", "9MwRUzRinhq1IjhG.js", + "9Yn9uViEjcuaESJ2.js", "9ZFPDCk8M2TQxh7x.js", "9bJGJrLqslV5lBya.js", + "9eL5JbQQmCY030ba.js", "9eWR4mdaoCSQawDT.js", "9nroaZDkW3WXNkB7.js", "9ob2lPnk3PDot9Tx.js", "9qWUuEF8F5nehF1y.js", "A3MW0UksYrHGa0Qw.js", + "A3XrFB7SvV2vcg1a.js", + "ACgKpKrEEHoNGG0h.js", "AFiB20FaOBmBv2Kz.js", + "AGD7zCyV4zruvnWu.js", + "AHt3D7EHKWBcL3vu.js", "AI6bFrjWk4NH9FBd.js", + "ARQbVHKYK39d8vKJ.js", "AS7CstSosuCrwZ19.js", "AVROqafFhKjN6TPR.js", "AWgZnm9xLyIWCDnp.js", "AZGXrZOQ4EzjxRL9.js", "AaPPmnv7AtxsRVUs.js", + "AdawSWiB45Vu40rQ.js", + "Adgs6Zs0FdefO6qx.js", + "Ah2wyywkL8hjJNXM.js", "AjC4dsiuhVCOnRGI.js", "AmOMCUaWLJ2iJAt5.js", "AmpDbT0BkDHeaRzf.js", + "ApaLcUhuty3EzJoP.js", + "AyNb5sj6FD2Z3Q5T.js", "AyS3iLljxHRKsHg4.js", "B063u4vrbvzMaCQt.js", + "B08DMbt9gcj8uCTc.js", "B1xgRS00RcTIZLnO.js", "B87v1twc65qyvUWi.js", - "BVNKF9omCppWPLys.js", + "BHbFqhJPzZI2txLs.js", + "BY4feKp244bQOWlB.js", "BZETMpgrI5k1ol5b.js", "BcXTujburrHpjpwa.js", "Be5rdfnZorbILhpC.js", "Bexspr5viPhHiFmU.js", - "Bv3431tnG3VKaTJr.js", + "Bj6bxItlgtI2sXVN.js", "ByhEa1BxQOyrOmqg.js", "BzDLuxBNw1QNIacg.js", + "C5NIkJwXL85Qbpe7.js", "C69xngEMghfwUx13.js", "CCwuu3bPLCpVGAmb.js", "CD4RnDpXZ9hnqVPQ.js", @@ -142,386 +233,727 @@ "CMUFtmNA1kkD1ay7.js", "CPQoK7NjzOwVTFXS.js", "Ca1fXHTA1e2QLx0D.js", + "CcR9i3UzUXx7ieep.js", "CicQ5REu9tbsc8wW.js", "CoImIH9OCMx9DfQZ.js", + "Cri5Q7ux6ni7zNVS.js", + "CxsKWGwQqtAaQdzX.js", + "CynUM4ZEiB9QbNQq.js", "D5XmzrUGFa1JN0cl.js", "DANLE5HxrkTNelhl.js", "DBafsY1HrclJRTtA.js", + "DBelNjOULhhAADVJ.js", + "DHzODnNNdZ24FNSg.js", "DL9vYNft9aXdV2aW.js", "DMQ0taEpBUJU5njV.js", + "DUFSlDO38fQWclBE.js", + "DVlZGbiuMIHEQOnM.js", "DcSJNRBXE9ZBBY7T.js", "Dew3Ks9yC4DynSMi.js", - "DmbWR9s5I8LHBwxB.js", + "DhZqJso1JWYtGrKk.js", "DpdSEHM6NMN1ey6h.js", "DqJFo74trI916qXN.js", + "DvJvHsjgkzIfFaks.js", + "DxM3NRgQYc7moMPc.js", + "Dy67jQmeGwHwV9NY.js", "DyZ1jH88EAp1ueOK.js", "Dzi2CKpYapRGwNVr.js", + "E0HHBSdQR3oH8KaL.js", + "E0OhL9ZO8vb8A4qq.js", "E1Xo4RVuN1YRRxg7.js", + "E2FhOfZzu2CqTSeA.js", "E2VfOVuju67qO3VL.js", "E6v4YZrvFikbdXoO.js", + "E7ksDLhihkJN4Vpt.js", + "EBNrA6FNX4d05EUx.js", + "ECUIJLcKt2TCSFS3.js", "EKkdyp51Wf4csw2B.js", + "ENGmwaItRXO5s0XY.js", + "ETrfkHI0B9YjJqM2.js", "EXiqepAIXmbqMiKa.js", "EYny6z5oTOhxGDfb.js", "EaSNOmXUxAkUHnm5.js", "Eay7GpDyfsEE40jT.js", "EiLaZW4b4ypw5sLV.js", + "ElHBPMMx37SZMvOC.js", "EpdMj9d9SYPeP44q.js", "ErgOwSiVnm9VLVHN.js", "Et4tPHlrkueLqP3T.js", "EwD053Fyy46b59ZI.js", "Eye6dranWpNsILjm.js", - "F2u4L4o0r1LTWeWK.js", "F4aGsdzJ9SYcX57F.js", + "F7BHb4a7fqWMnYxH.js", + "F7E0Dr3sT7kkc2p7.js", + "F8Bmh6w01YvKsBIO.js", "F9P8Nh4AKnqSGg8C.js", - "FAB12eLcSCAOOQwk.js", "FAf4iXj5LkdvukS2.js", + "FGIHAkNdYXbTnewG.js", + "FMA16PvoObBV8vDl.js", "FMSN5uRskkATexzB.js", "FUgCtIoj1Stgqxt7.js", "FX8ILw0VgbNxkObA.js", "FXwfqF0jpXlBQ9Y3.js", + "FYMLsxxg63nHNGAe.js", + "FbfJjYUyp0ArtZMb.js", + "FceC4TNNBvRnA7JM.js", "FciJSTq7dZsZIPgl.js", "FfTqCPxCoxwGDTQs.js", + "FjmtA9s13s75DTAY.js", + "Fk14eUaTRvIoCBB1.js", + "FqevMs0ukQ9WuUHl.js", + "FtSG8J2s95hhjUMn.js", + "FttdVBQiNssDAARh.js", "G1RletYc6BzigJrK.js", + "G9ZPojp8qdjiXKZ5.js", "GAO8AozttWOyRkta.js", "GEfWIFBSrXt0ldBM.js", "GFaTz8f6PBNWrlad.js", "GFkVnx4m9OwYsKGH.js", + "GNgMG95jfabBeIwy.js", "GNl5Zk7BZ2jhRV1I.js", + "GTZUO73pUJKpM1JB.js", "GUkpYdPwoC5pc9BT.js", + "GYhPhHIVrhx4pkgF.js", "GcIQtshex11AMmh2.js", + "GePFbu5kp2ymGYEQ.js", "Gh7OidY6UdpWBS1g.js", + "GjUD5L4h8FXGVgGQ.js", "GrF6tQ08jgKmUH4i.js", + "Gsilp71BmIyHHce6.js", + "GtfHQA9T1ip463le.js", + "GuSIY4Zqhc68qVEH.js", "GuUCErVbk5hrFzR3.js", "GuxbvztcvzJz2oH1.js", "H1z3nWW7Rj3Oisxy.js", "H3Wls12aVWAWTp9J.js", + "H3pZ9UeIzIz3luKh.js", "H7lcCU24gFDp7zK7.js", + "H8jDtK1Ewn4hL3A1.js", + "HGVGO217uW1k5YDh.js", "HOt2hHOiHDZ7oBgW.js", "HX6CjNapYdC0VmQ8.js", "HXJKkmpfxQUOnWOS.js", + "HYrl5aNMm8BAdqH7.js", + "HdTuY2IGhdlMDOy3.js", + "HiDcm1jhG3sU39ME.js", "Hq1G30lhJYvtOSNb.js", "HrYchgkdZBiu1yPF.js", - "HwbgUIbpX0D8JLOR.js", "I0Jo6cbNAJtXUloc.js", "I0oRZ7AWde5KI5jw.js", + "I2I4ZJjN3EUSow0t.js", + "I67tdJctEqXSQPE0.js", + "I8JS4z90PtWIG2nb.js", "I93i49wI9ZrDHT4n.js", + "IEDJHIYaZLhmrK4X.js", + "IFXsTRAVDUeVvcRc.js", "IG4zYqtN9fRSYE7q.js", "IKiZv9YSFmKmHo6a.js", + "ILqHxk7deotgI3KD.js", + "IM8nRo6Jx2I8RJ0L.js", "IN4ZFOPooqJtNuIQ.js", "IOroJBqTsWvoakJN.js", "IR86DuMbVdbGOJYt.js", + "IXXrxNSLqXEqtuDU.js", + "IhoCoul5okDx0jBa.js", "IkGegSuQwwVPhrjF.js", + "IkVcIRmmgQjsBUUf.js", "Ip8sctF9SIE1Z2vF.js", "IpoOOjYJs6RmVrpb.js", + "IrkWq7IiFS65bTvC.js", "IukS0clr1yAleacc.js", + "IurWrdbjsmMtTWuq.js", + "IuxMr6SFdJhqFtVD.js", "IzZcsSngI8TZH4d8.js", + "IzoOmDywGLqLNljN.js", "J1FPDdrXGctKDTZz.js", + "J5XafRL0FyZnBPl2.js", + "J60gMzmsNau8j53K.js", "J8aPichsl25t1QZ9.js", + "J8k4ahQdZhXDfU1l.js", "JFgXyb6bKjZJLmF8.js", + "JLn1B9eL53nSUq88.js", + "JTW6557K8nI5p9mL.js", + "JToUa1mDQ2h3ILKF.js", + "JVQK6VW73KxfeJJi.js", + "JWEY8OS0ns1fNsQV.js", "JZIn1dsKHFE3smJU.js", "JaiC5P6nIgctOacH.js", "JavuFNZ9Pj5elVLc.js", "JfOodll9a2Lw0fWg.js", "JjDzMnUxaWQePIYh.js", "JjiPprLSlSmmB5Ga.js", - "JwYZJGkZMSM2M3Si.js", + "Jnp5c09sPzDD61EK.js", "JwgFQmPQtXWAP94i.js", "K06v93N4FXb70mB7.js", + "KD4nCSdSXJVJmk0R.js", "KF69WqF4PSEtpdb2.js", "KG4TxnXiLLpfWOQO.js", "KJLAan0glJlyOyqF.js", "KQmb5B27eJ1lkbVL.js", + "KQzbrpb0T5a7it4k.js", + "KSGIwJxR0qn10RLX.js", "KT670CjGBEprx2fO.js", + "KVpDUEjHhd3nLa0f.js", "KVuPduDztyMZQNt9.js", "KXzDe7cN2vynHjJO.js", + "KkE8DtsTDYDyk1gN.js", "KnwYZbeRSBA94hfl.js", + "KoQJTwqoC7foST6v.js", "KuUkUmOOLf05I4Bp.js", "KuuWAhoSzk0rCxxw.js", + "KxIRA51YA0rktcSP.js", "KyswmGj1uG3QS3ng.js", "L1RMLvKtRPFtnczI.js", "L2cdQppcPwxz24hN.js", + "L3ehj3ud1OgjcgSv.js", + "L41ao2Mw1miE0yri.js", "L89UcafRHqUfxoux.js", + "L9pUSX8Z4y2zIAn7.js", "LAyLbcC0lOPwZP3U.js", "LHUUXfZVLBhWqRvb.js", "LLqAT9wEUGMLfDhU.js", "LOL2TGf8p8KxP14D.js", "LXEUhHuXe8keEPI9.js", + "LYwio2f6xTiKg9dN.js", "LedRsrVo2f7lm3Ix.js", "LgYyLg0Y2AQ1SKcS.js", + "Lh3Ccqx3utIu6w0d.js", "LjXPlgdXBdllnA3i.js", + "LjpuZam0IYIbOhFs.js", "LkPtgN9A36OI6Frh.js", "LlRhPGorLl5qJCU8.js", "Lm9IBkc918Duw3US.js", + "Lp261O9fgEXmgPf3.js", "LxdLkPxH3SFvYrCJ.js", + "LyAK0dVDS5L09yq2.js", "M0eOB2Jg9KzcN1gz.js", + "M5bh0heeafA2fQQ8.js", + "M6sb1yAdEAMlIvac.js", + "MB058H6OslhfBmxR.js", "MCK6WyjwYT28lsTN.js", + "MDLttXplnNthncGr.js", + "MFKhU9vp8bQpHP3I.js", "MI2GgNi3fZtUCtQD.js", "MIhYSuJ6MI9B65UT.js", + "MMx8f5uJ15XOgJGg.js", "MOZn375tGD2060cC.js", + "MQAMuPF4QqXl76SZ.js", + "MRH5rTTgUPdqo7SO.js", "McLR9YcgVUG3MooC.js", + "MeHXlZ66R3X8luFT.js", + "MfxzwJz2o9ho2hOM.js", "MgTqCMRjxhezT73T.js", "MgZreqq3Jua10c8s.js", "MkEcdViivk7abf1x.js", "MnXny8SCh6OceJc9.js", + "MnqQkXVp20Lw84I1.js", + "Mqbjr3t7IXwFnfCv.js", + "MwUzyAgd0yPnmZCH.js", "Myl1Ishu9GBraYUZ.js", - "NI3ZzIAlpQfVSjvf.js", + "N0h848GEkBbRDK2x.js", + "N6E9Jsd8n2ubCfz8.js", + "N7nGncsPrTz2ZbDA.js", + "N8oUaIkE2Ne571ia.js", + "NEKLTgJJsayC7tpF.js", + "NMZ3Fb164tUfwChF.js", "NNytXz5XFPrEF6dw.js", + "NO685xdEW0NtJCp7.js", "NQSvFWhmBQAyx5Zz.js", + "NX9fApO15NQuTipW.js", + "Na7Nanl9YmxZlTo7.js", + "Nd1djAF6dLEiLfwV.js", + "NdquQqyuOkGCj8Uo.js", + "NgKdPxwH3vr6mkNi.js", + "NheyFTaMKupOgRJb.js", "Nk6qAalTmc6UI2XQ.js", + "Np25JqEiaoqerEk8.js", + "NqFvdCKDLqIXaE9m.js", + "NrVFrIXM8GnIbojv.js", + "Nuth9S5UHIhpEuIC.js", + "NvaPNfZt5d9RqKSE.js", + "O7lXFZLrLdFaShGR.js", "O9fc0hLHdkTgSuLg.js", + "OAemeERMAeGv06pE.js", + "OBF6r2CsMOEokAsS.js", "OCFrGXAYfo9OYnhc.js", + "OF4sSVOvHoKuPk7L.js", "OJMgS8ZQv0j4tEFf.js", + "OKivTxfbKZw5Lj3V.js", "OMAUX1fnHyIpplul.js", + "OUef2n36h6lbrsjx.js", "OXoqtpOdfkURZbuL.js", + "OYLqLl6vikJD8flg.js", "Oa9FmLXRRZRpLrrq.js", "OcQe0zfksf1DCJYe.js", + "OeKeQAAcJhdI4Qky.js", "Ofn6vDbP3fZ4UlSc.js", + "On1itZhp0AOzNyyc.js", "OnkEe4ISru1hjJWP.js", "OqxeuZfZDfm9ax6h.js", "OvIELZLvnlN2H2uw.js", + "OxsBnnVI3Smpknpb.js", + "Oz7pWF9mEc1pQypj.js", + "PBW6IZtwawNHxB6y.js", + "PI1QNaKFeqood6d7.js", + "Pc98GFZjvokeyUcs.js", "Pg9C6nJX5QHIdqa9.js", + "PjOi61gB2nSYooLs.js", "PjRxGuUDKGmSmVDc.js", + "PkHrZiuFokN0OyXi.js", + "PsO7aTdELJt35eHP.js", + "Puv2wLrSVe6b1jLf.js", + "PwqTmw7rsG8hzqCS.js", + "Q1kUE8jcG7id3MHT.js", + "Q1trEhtqjIiDvFPF.js", "QF8LanKNoAlTkQG0.js", "QHQ7XmFOjT9wXgw1.js", "QKTA2TqZ77pvHWSJ.js", "QKjR6P1WEHXf4K77.js", + "QKt9ZYpVpznncfJ1.js", + "QLE6dDm6Bns2J5Tl.js", "QQPiREc50HT5W2Tr.js", "QaEUhlvxFPzowH0v.js", "QaGNsqKm2Nf0zGVm.js", "QbIYnshWeP1U8SUy.js", + "QjlGijPHAwAEX3mf.js", + "Qk7t2l5ep9RDVpgE.js", + "Qo8q0P5j9OKEAP70.js", "QqkE7rlqhkeRohFD.js", + "QqybHxNCzPEzG1Qh.js", + "QwHoqu2oO8QO8Mad.js", + "R4A2ozuhFbrjr6nj.js", "R5dOZWFxE2n6tooX.js", + "R6SnyF3y4Vsq6oga.js", "R95pDZMHnD9iHAl8.js", "RI8crJxeD8JLDwMh.js", "RJpglw5eVRM1f9t0.js", "RNHrSTfMLXm5sXkC.js", + "ROXCqAFSTLouJniL.js", + "RRK91ySi5SzYCRvy.js", + "RUpVgB0czqg95K1Q.js", + "RZibsagclQO5U6o9.js", "RZlMkxJz5apn0mUj.js", + "ReJpL0IVesKUbXgj.js", + "RgNdS87nO7RVawuw.js", + "RjcHrQ9inlFj9cUU.js", + "RlhOAKfN0ghrrooR.js", + "Rnpw6UQdJifLeuna.js", "RqWnhnwFxaHubgiA.js", + "Rr82rh79nCkKHcBD.js", "RsWXCcYHONf3ANlD.js", "RuW1PWUFxIbbSlIm.js", + "RyQtuiRykUCQ6Xag.js", + "S1QihXuvdEVzeRtB.js", + "S1SQe0Do7ZcuNV5j.js", "S3DCTw4yJ85eSaKp.js", + "S4793DLFhjMxpM8x.js", "S6tUyFJvGMV19mvP.js", "S95QqpX1cZyIVCPy.js", + "SDwuKuqTsCBZ6hnb.js", + "SLy1Fs3oXcHgFgjK.js", "SO4Aa9argKbuO9rQ.js", "SPOkFWZWziZk5b7A.js", "SRmfstEs278bP9Pz.js", "SSqGxyN9hw0HDmED.js", - "SThruXFhxUdNKCG4.js", "SUfCkHdJg7rttdM1.js", + "SVnclT81zDqRLE5E.js", + "SWIJjM2RCmzfr64u.js", + "SdrCM66oViwRFF8I.js", "SefcrhXsdYGFcCW6.js", + "SjDNjLBGsd9fYObo.js", + "SlzPn7ONIKab9URj.js", + "SreM9Jyj2XZjoezH.js", "Ssn21dxoMQiqD1y4.js", + "StAderQaQQsxb6Rv.js", "SvFKt9hMcFQjeILA.js", + "SwliIjjjFtZMnJH3.js", + "T5fiTzhXEQAv9Drf.js", "T74FEjfFrh3f6MKv.js", + "TCgEBuMPPd5SLAsc.js", "TEiNj5FgkoD3YbhS.js", + "TGN070HeJLl3gSMY.js", "TNWmIkuubqBn38he.js", "TQRL4mZhZohXg1Au.js", + "TSsHcn4EDulD03RU.js", + "TXBg7zWxPfWxFmUB.js", + "TXce477AiXHKbepk.js", "TY0xSQ00XXyEr49r.js", "TcqumwUFAL6V0cty.js", + "Td8M5K1P92GbM2IA.js", "TmaS8o33825QUMrx.js", "TnFobCxG4pxlYmKr.js", "TpZItJ5Ugbazaobd.js", + "TxfmxDGBj04AQQpt.js", "TzgmYRXFXRspIo1i.js", + "U1RUcgP8LD2qeGTm.js", + "U1UpSRJOSjPpO4HS.js", "U2xKn7R1gm8kiQm8.js", "U5ndCwcJ1s3Ns26w.js", + "UH5MIzqi2MvEqTwj.js", + "UUHQRPRrrRSr9MIA.js", "UWrzokgabRKUpnkG.js", "UXdlnmwVgjc1QpF2.js", "UYLXm2W6jVn21Age.js", + "UbGzr86u3wqSEr2h.js", + "UfkysrAftCs09Fct.js", + "UgQW0UMPOZ0jwfVJ.js", "Um6xMMiUftLXJxEt.js", + "UsuwsmU1TUQLQVM2.js", "UtqUthabeQ4rHDLQ.js", "Uvk1X7sEhvv77YkD.js", "UwjkHRAQHESdYXJs.js", "Ux4buMc7llF1Kg8p.js", + "V1KCAPGMPvAz3F3g.js", "V2lsVTi6q28eL5jl.js", "V7qmFwUMCY2tfziH.js", + "VAPsww9x3HAw1sKP.js", + "VJe23auRmrmZxdKM.js", "VKpKq4RSbI1KkUQK.js", + "VLdF2HPnCrNIgp7a.js", + "VM2zbABURI9K3JwQ.js", + "VRDS4lkwSAzbtvm4.js", "VTS4RzbmReI87K9a.js", - "VXERNoc5IazQGuGO.js", + "VTzpExK3QSCaFQPf.js", + "VUFST9Tb3zL9vWvg.js", "Vb7rgl8T4VRswbnZ.js", + "VbL0TgaBAmYjrezZ.js", "Vkuu70BZV4DPYO2Q.js", + "VneW4jhf2nXdMpuV.js", + "VswXxqDjU9IH8dX0.js", + "VtCzyfSnO1im0dgX.js", "VuE1mhrB6X6MYTzg.js", + "VzgTGb5QXKoyPNh3.js", + "W5qtA7Ul5cOj18Nd.js", + "WDN1kNe7lMc3Zf3d.js", "WJkwIrdj4NceOYe8.js", "WKXyVHQwQCNTfSKv.js", + "WP6opTZkvX3xwtJI.js", "WPQbVpD1uwSLAXq1.js", "WRe1eGmGVGejPcS8.js", "WY3DajPRGcMNt158.js", "WeTlTniskT3Ej6vg.js", + "WiYtNU2Y5BJfIpeM.js", "WnWA0e0bgqBsZp2L.js", + "Wo4wQKUxSItAhRzZ.js", + "WtbSIghR0q4euE7J.js", "WwxXgsNxlccmqTze.js", "WzMmwjZbhyCbHxyZ.js", "X08401eOhKJrhNf1.js", "X3bLbOfcJAftOMa7.js", + "X3vpmNUj9SL2CDnF.js", "X7ikFOGKYzTMr4d1.js", "XCAfy460IotarQek.js", + "XO9m2AvFRAAeEuty.js", + "XPpHYTTT0hqYuSfa.js", "XPxAKqPpPYE4E6B5.js", "XRrGBbplNLZpXnCH.js", + "XSbQKrrbjsN15Zp9.js", + "XWbpSJrduXAhXAAV.js", "XXnzUdsIYQ9Wjyu0.js", "XYaYeiVkc5GKYTjC.js", "XfRvVBTVIuAm8RaZ.js", + "XfSxXatjEYlPEbaK.js", "Xg4qHLsyXGuUZfT8.js", + "XjUXxUA0hbwjUatW.js", + "Xk9XPklxxTvFlwpI.js", "XthZ3GCC3WhsEI2g.js", "Xu5cED1MhT4ba7da.js", + "Y43z8YCohJMA8Ia7.js", "Y6ppJBerpM3TtSic.js", + "Y7McxsHFeGhwQx0J.js", + "YDANERWYHyJ2ACeo.js", + "YEBw2CzHYxsTpTy5.js", + "YHEIkBKWXKNPqglh.js", "YOKoZFlBEpFavfOS.js", "Yf2MmOzazzMdmoPU.js", + "YfRPSgJjvHvl50HW.js", "YjAIsFlxKTJvYs60.js", + "YjJcRdytVRm88qLn.js", + "YjKiWcx7d2nwPy4L.js", "YsS2RZsl2ZsqjhWV.js", + "YwLEw4BiKq4EMy57.js", "YyKU2rIRmFSCqSlW.js", "Z1zriXibT0mAmdhb.js", "Z30zYayPryXOjT5N.js", "Z41L3MwOpJdAjVaj.js", "Z4WrrlVGpPY4iUbG.js", + "ZCExF4uNFmHkGEbb.js", + "ZCkYe5XMVY1RWMXG.js", "ZCrfdLPOxiNDCDSg.js", + "ZEXhYJqqxF6QAixX.js", "ZEdDcBka21rnMuz5.js", "ZGlJnrIemqul24j7.js", "ZI2YnAAGoLpmVDIL.js", "ZJy2rvpKmUHXGrAi.js", "ZMwJad6v4G13SgjR.js", + "ZNu4B0OdjkM9lmtu.js", "ZOgtDW3mkTfeyc5M.js", - "ZYsMgB4BwXBJcpYf.js", + "ZTE8LdRblyG4yYoE.js", + "ZURBQYTYcP5jci5k.js", + "ZZb57zYE7bJy7rfU.js", "ZbuW8y7t9Y8oUFWq.js", + "ZdHvGvSJBsIuPphF.js", + "ZfOhDMHPyEkThjEk.js", + "ZfgPAtNKA5KrETer.js", "ZhuitY1KOU1Xe7cP.js", + "Znz4g56UH23SSCg7.js", + "ZqTW093qENOwGONP.js", "ZrePyV2spv3v65Tg.js", "ZsOHDb7XwmuUUWPL.js", "ZsQR3AVKi0v5U593.js", "ZuoIVv3nmlGhhdx0.js", "Zxh4RAENoaAQAaNg.js", "ZxtOdwsM2Sqj9Zam.js", + "a5WEJ2oxlcdOFWlL.js", + "a7pEvCycVnFBXGAQ.js", + "a81IMxqmMtHgYnIF.js", "a8RabrnJ08O07rDX.js", + "aCVtaW8ag1WibcAr.js", + "aFwNs7TMVF90i9JF.js", + "aIYUsBIDKWJ3CEtj.js", "aMHGjWyn6BXCI4pw.js", + "aPZiVhgwR0Xql6AM.js", + "aRvJUcgYqhRmmWYC.js", + "aSFPODz31zynXho3.js", + "abLWYtNTu1UVDQAs.js", "abVIvJBzuskNzCQv.js", + "aedzdFyjI80Ah3qC.js", "agsm3NI1NDtHRG4y.js", "ahbA7o5G9dzMFl76.js", "alJgj25l3239h2SW.js", "araS9qYWOAVrV8F7.js", "ayIbw2Vw2t9xg33P.js", "b1zMefdoZYtzCm7i.js", + "b2WaqRna5CFXmbDG.js", + "b44tTtRjmI5jdihB.js", + "b4CIeJF2L4E1qikC.js", + "b5DfAWtpV1x2R8If.js", + "b787rIfyHF5LnALd.js", "b8G4cjfn3RG2tEYX.js", + "b8XFmEUu1d2YNQ7F.js", "bBdXzBmxgFFBwMMS.js", "bL98Sr1TRLMPEdlk.js", - "bRiFHPC1StKxqNIC.js", + "bQyVajMN1ETwlzvM.js", "bRtZH0xRh8dgqMeW.js", "bWr8leucbWslBCYG.js", + "bYXlyiRXtdRGYlm0.js", + "bkbWgG9COvZWZbAX.js", "brNRqfpPqD2Ki0cM.js", "bwtQOSWn120NICkf.js", "bzaoWcieMFaU5B5l.js", "c31hjp7k0hlpdGBC.js", - "cAioHYtlxuOCwRLh.js", + "c7HTWfg3CbjN9e1M.js", "cApfxL7Ic0NKdoSr.js", "cBSy9CR5NZvcLRg8.js", + "cC7jjJDSVPi5BJUq.js", "cDBhmHn5kjgWBAlT.js", "cEg09bnvZD6Ysnpc.js", - "cJFDnq1HI4gXWcJo.js", "cOuukVo8WakDZIUj.js", + "cPdtoRmvRC8PqH3x.js", "cUFCL02JoaZObRcX.js", - "cUnbADgOQ4fMKgrH.js", + "cW8ZuQ9YIUG5uvhf.js", "cYPIXzl86a3LFsTE.js", + "cZVrzR4fxV86lxNW.js", "cgmA2N0MkjA7qIZy.js", - "ch5SD2XOQfcYo0X5.js", + "chDtEQZoRMOrm2eE.js", + "chiUvs66IHiKTOcN.js", + "cipTp0OS2bfKLjZS.js", "ckKbPfaTiQ2qBZdR.js", + "clO7l82UYMJ4XVks.js", "csLKDJKZaUK9vwLT.js", "ct6WGaRMfrcnHhyv.js", "cuqCtQsfLBBAGjnu.js", + "cxgGYbuiXM3NxIOI.js", "cysQDjlDzT8HdNeo.js", + "czZI8S09By0Mqlsr.js", "d29mu8vRt9AQUm0L.js", "d6mVm08o8SeklAcW.js", + "d90GpOWwleOgTbOS.js", "d9iU08yvqcffF026.js", + "dIxYt421K010eogY.js", + "dLlcg8m8eiaVBmTg.js", + "dM449AU0FQRnOc3l.js", "dM8FbRH2V8CpOkXw.js", + "dMeSZGdvw7zlnUKh.js", + "dSie82gBJoln1V2i.js", "dULCkRxtisuzQyuK.js", "dZ4c5pKDqQV02aIK.js", "dbHv7dAXgB2Oy1Fg.js", + "dbOSvpgcPjsc2uvq.js", "dbYjr4oG67Z880To.js", + "dcwY8dCd3PNCEzk6.js", "dh5mAlaOOLCBC0YQ.js", "dk02qSJfJaIo3Geh.js", "dkY7WRYjFVh8GB0m.js", "dqvHDMlcitLx1pUx.js", + "dr9VJKGY3TeGuzXj.js", + "drolLZoNuAXQFuPH.js", "dt85W8pzZ09w1QLi.js", + "dtHJFFp2mmVsfil3.js", + "dtQH7ZBKfzewtTsq.js", + "dxt3p07po06J9fO1.js", "dxxDFXNNqUsuMyUD.js", "e0TuMgYuI7ZtGoQr.js", + "e0eKVlOSk3Vw1HiD.js", + "e2JlsKoW8oaFjn6Y.js", + "e34s1XxHckAWfwHt.js", "e4HotRnEiyXR0pIu.js", + "e7IxnxePdXSy6L4E.js", "eAtqyBd1HsDWuBuI.js", + "eC61buStv62b3sN9.js", + "eFVDAqG80veYmhpi.js", "eHRv7f2BTtle6Y1K.js", "eHgk3HZ6eyLFTZ9o.js", + "eIiiDhJohYez26qY.js", + "eLxdRg8LX3AdYSEq.js", + "eTHJSRutCEpuyPkR.js", "eWWLmA2xINR321aK.js", + "eWvHTkxsjKuH2IKm.js", "eb69QPmNQEJXtk4l.js", + "ebDQH0MdGAG02CHl.js", + "egc02UIueJgEQMqx.js", "esuLwq4g5T8k1kLT.js", - "f4vvAGQ8OGoEbrgy.js", + "eu4mHsdZukvUEAGJ.js", + "eyrUJQAuHvdllCwi.js", "f6WnrJvoNkfoNN9Y.js", "f7WZvYle9iqefRsh.js", "f8cnfvGKJH3bYVGN.js", + "fA1dIV1ANo4RVEqy.js", + "fC4KcY9S6V30IJyX.js", "fEyKQqCjDwml3DXO.js", "fFGuTi0HLjwneMcJ.js", "fFi9JD4uCY9DPC5B.js", "fIUxKZMWJ8HMPmH9.js", + "fLg90csmdOOKmEE6.js", "fNUiKELi9e1vg7KY.js", + "fPKYkBllp7Et62lX.js", "fSTjJIqg5tvbwxKt.js", "fTw3mpSUOlkqVVUC.js", + "fUD4gMdKe6P3sFdJ.js", "fY0TsQwnU14fdPl2.js", "faRFSsrQylQRZFLk.js", + "fcY3pa72dELnOFXV.js", "ffvcCEazZBinHlUX.js", + "fiF9sM5UpcHMYa33.js", "fkFmNcesqqNTMhVn.js", "fl762icfKrt9ear2.js", + "fsvXI7tuL69Ukmec.js", "fve7tiyF5X9B7mHJ.js", - "g0SzfsLyW7aD2F19.js", - "g4t56A09yrpZaJQ2.js", + "fwiBeetIsvpXKtUc.js", + "fzTB7t3x4bLmAXji.js", + "g1L8OYO9nCOhdKGL.js", + "g8Tmet9Ii3NvFqvf.js", + "gKIPujyuFSn0No9v.js", "gL0ftUnK5TNXBRRt.js", - "gMIenSmLklAkB2Zm.js", "gOm8utR3HLQBT5hA.js", + "gPQrszvIgGlW9yM4.js", + "gQ610vjGKmowl0rj.js", + "gQJJaxbN83KSgi36.js", + "gSDhsSB8573joL64.js", "gVpFUka7qfGiEC1v.js", "ga6bQzPuoIiQQrKg.js", "gbhxWXboV9CytWNU.js", - "gh2KS1prBKcsSK6M.js", "gpPaCe6yER79l4u8.js", "gpuBg3y9rocJL7yT.js", "gsCnd3mf1vXFU2ei.js", "gxuBeGHwjZ7WfPeu.js", "h2GSoiCQ2ZSlTjf7.js", + "h4lnexDYAhyQuiR5.js", + "h8JqPMh2mM2uhpxk.js", + "hCzxUyO6mjLNIpaM.js", "hK0YMJfYbpbJZizO.js", + "hO2CFW9hygGSYuJ2.js", "hObTbWi4ZdwXimIW.js", "hOgha3ir8K9TVphO.js", "hSlEY2oh8quVmdXR.js", + "hTsnYKgw0kK10PiC.js", "hWWvkPbgIN3lxz1u.js", "hZAax4emLahEEqcZ.js", + "hadXFC43VKyrE9jC.js", + "hcUCeoIFwWPKa5K1.js", "hfO4INH3EeETDTFt.js", + "hhCs5VBKx50S5IsY.js", "hj7tI212neKIu9dh.js", + "hlHKeFWrOA8CsLr9.js", "hluehsCuBZYc1Ejt.js", + "hmk8zV1LTElHUI8A.js", + "hpBjbxWg0qLlwX2K.js", "ht7csu1KImHzpzL5.js", "huJcVpVn6Q7sQkFC.js", "hwHpIunCq3ifk2QU.js", + "hwOZxgt7e65iWvYz.js", + "hxmwtw5zAHyS2upG.js", "i59IpmZNLJEPWZ3L.js", "i7xl0jNpLnBT2h2l.js", + "i93PGV1lDSdi3BJu.js", + "iAo3wxMLA64rsKjj.js", "iBEPQ3NwtI9DfkEy.js", "iHn3YzvqNfbwzjZz.js", + "iLpq4yCFN6YACrYA.js", "iM4B3IZ4VtpZsl09.js", "iMDZLr7ueJWBnilj.js", + "iMu8BZ7eHMAbPEO1.js", "iVhi3Z6zPaf1bf8g.js", + "iWqn1fVeQ8IwZorj.js", + "iX0ctHYHg12pjaCU.js", "igVAVU7DOuzhNG14.js", + "ij3BLXzNk7eZ3V95.js", + "ikaQXTvTWI5nAmUV.js", "ioeTj5mx8jlA5EX5.js", + "iphjuYnLhMMNXpGG.js", "ipkkRffJh61WE7zR.js", "iqUvV1Vu81M3WyZ4.js", "iuYuf05BNuZ5fllI.js", + "iuoVkjFdL1rHdbqR.js", + "ivxpmCKu3pEMG05c.js", "j1AmrY1SxFJQyapo.js", "j3c6Y5aeA7nlFr9F.js", "j3zDMWkns32Yrxn3.js", - "j6Bf1iivH8cqSnnK.js", "jC8o5PbnqEvOoZ9N.js", - "jLsL4KRI6LEG9Ii2.js", + "jFKnf2UdoxAQx76R.js", + "jFwema0iwzBphxie.js", + "jGDk7avWFSnyFoql.js", + "jOSCsBRUO117spv8.js", + "jObJanFoev4N6ZRv.js", + "jOm7RxGFm1y6mCpN.js", + "jTgzivraRKrrCOjH.js", "jWkfoVpHLiRaHTza.js", + "jXbrIGxznqf1SNxZ.js", "jYJRO5XPyG7y6fih.js", + "jb1ouw0eIBVy3Wwg.js", "jbZPLb4wuqJpHLUx.js", "jfk5VDKMTIf4ee0v.js", "jmxlpyLrIuoxQtvU.js", "jrvj7bRyMBB9LixP.js", - "k0AkkBLtE8oZhBwn.js", + "jt8vTQBoMOMUccEt.js", + "k1Wdehpgdc0hP63E.js", "k7ldJfyW201HgRFh.js", "k9SvH4Lm3ZuI8S1N.js", "kBXVEnSWzaQZLkJH.js", "kIM4Fs1lFVV7TSnj.js", + "kUyVy3bfEZAGTeru.js", + "kWHKp2tw3HzkgWCy.js", + "kY50G53IXdNXX9Sc.js", + "kYTEqcs8JpO2OmB9.js", + "kYmscP2HuXjDovBD.js", "kbXDGAmWWD4CZJHB.js", + "kbh9urTsUcLiwMLH.js", + "kiolpXGbkmxfPiuI.js", + "knq8lNYLw0v757dQ.js", "kvnZz8yqdTZbErkr.js", + "kvqJbHBvFr6iGLcI.js", "lCOdnKz8XpnkDs6Q.js", + "lDIWlQvD6MGyP3QP.js", + "lDfPgVtZf3ULFPjU.js", "lFO6XdfUODmFArqx.js", + "lOzkngzye4RmvALp.js", + "lQJ68n3y1xDyNicE.js", "lRZhkh8pcu93QTKz.js", "lSOAZ4FG44bT4jh1.js", + "lU4s3UTtBkU38djI.js", + "lUcx8NUadgq3oFTY.js", + "laWHBP2jLrVxcgp9.js", + "lbcIoWiXgY07OJpi.js", "lj7vOpa6tHHZ9bBB.js", "ljGX2w8hCTyLAjRp.js", "ljpM7muMyxGD04EX.js", @@ -530,6 +962,7 @@ "m3qEVO5fseV6KHXa.js", "m58MpMZBblpq5LJu.js", "m84kG5cEPEByqHdd.js", + "m8qBlbH7ROoqa22o.js", "mBcLf11upaHS8AQq.js", "mGHKBkDp4omSaBlD.js", "mJ9eMPub4epJSf00.js", @@ -540,22 +973,39 @@ "maKr58mvvyKxFyC3.js", "masOBNgSi5HYkf3m.js", "mgLGN1XPzPE4dReN.js", - "mlulnXQo8XU8vKLD.js", + "mziJBUYcsrhkdcCJ.js", + "n3bUmtYaVljPdcJW.js", + "n8X4Vgmrs4M5pyHK.js", + "n99CqhPx3uABCU15.js", "nCWAflBj7Si2BI1Q.js", + "nCfWscZucItTYObJ.js", "nHJdlqbOP0ECgywb.js", + "nNwAFEURKlFhPcvA.js", "nSXzktHyNjGUXjaw.js", "nYtAjSArsNbrU2ob.js", "neaaVy6D6tfcst5P.js", + "ngMm7SgtVqVovFJG.js", + "njmMhHf9qjPBCcNn.js", + "nkbTnaeBpthyhw4J.js", "nlQA0shW8FCXjY7u.js", + "nlSJDfv4N9hrncHW.js", "nqWu0ZplxzRiUEAg.js", "nuIpPD4uaZRuJni8.js", + "nvrT2HhsiGSycaff.js", "nxNqWmmF6mJTnrLo.js", "nzh8d46l1ikhkz8Q.js", + "o0dJxmnrWAZVkGKM.js", "o1zD8mej9TWKNxUq.js", + "o478K0vsLGzY8YTK.js", + "o88xuUConwt0vFLw.js", + "oA197GIqHpU5WR9V.js", "oHenUKtaS3jT5xQn.js", + "oHmtdXWVwm7y7BtO.js", + "oV81zgbZsuTFG6L2.js", "oW1gtYVT5nrxDjM7.js", "ocBW3osTFnb5JCfe.js", "ofddAHvzn1xUueSG.js", + "ofijDpDzoLphIp8R.js", "ogJBAXTXyhTqACPO.js", "ohl803m0tUwNfKAk.js", "okr3TtzpFoefUuJS.js", @@ -564,63 +1014,101 @@ "pG5OVokZzCRHIrwz.js", "pLKv4moua6XhNdmA.js", "pPV9oEydXb7oi6jX.js", + "pRp6hoBJ0JQa4NNG.js", + "pSfA9mBk9Uw8QMLj.js", "pVSnn4Zw6y1EBDhv.js", + "pdvCwjxHI56EmxuU.js", "pnB9TzSEytkxk3Rb.js", + "ppc8L3WtIx6JzlAd.js", + "pqpU9J1x23YLwWYG.js", + "pvTcazVvW4v04otW.js", "pvk5OhTNdVgwXoUa.js", "px7eEdhOEt7zOTrq.js", "pzimrxrqpv282Oqb.js", "q3nRyXaxksdCiLFM.js", + "q5RgoYr12kBF6FA5.js", + "qITSQMvvkgj81fW1.js", "qK4q4o6cQhcGzFX3.js", "qTcK1TSjLTi0jNQK.js", "qUwnVlWpsmDom3RK.js", + "qZ8TBagp2d4dJAqI.js", "qZschZU0nee0kJlk.js", "qcyl98GYD55BkJsD.js", + "qhjU1QdsfqA8h5iI.js", "qjli5evn8UA9uTeZ.js", + "qmGwT929EiZ3lW2x.js", + "qmH61HmrEJcmQTiu.js", "qnJu82zgnfOsnqZV.js", + "qyBmkCJo5606o4J9.js", "r6hi5vMdLhTaaPfb.js", + "r9N0cd9sp6iVG0es.js", "rIISfbCShejmJNKw.js", "rLMaVNEGdZ6xj5Au.js", + "rROfpTez9681wXWx.js", "rRfff55c7elyvbCb.js", "rUGSx06BuBvX9kgf.js", "rVRDoxiWILo7d8FF.js", "rVpPNILEzWL9lj6b.js", - "rdaMhMyHrJjQ6vVC.js", - "re1UFtxvRRjpPB7Z.js", + "ratP9ByLjQPiLlFK.js", "rgSwSeB3shIMVMb6.js", + "rgnGu3IQrS8Vj9Op.js", + "roKvPHDSpX4IV11C.js", + "roYVcP5Zqcsa8jVw.js", "rqTT8yOyK4bUwbdm.js", "s07GKMPCvQ8Heorc.js", "s0kTuDE0qv68V2KI.js", + "s3Wg2xd6AlJ4sz3n.js", "s5bO0Sf0qpS27Tve.js", + "s6eZXfZkC1My6EXl.js", + "s7kW3lm2eU5IPrLP.js", "s8idWt9YdMTRfnjV.js", "s8xU6OOZbbfo6VIw.js", "s94yKZ4o5XN4JWM1.js", + "s9J1TUkpGdvSWvPO.js", "sAVpm7hFRHpbCLXm.js", "sHVLKIdPbzLVItCa.js", "sHfkTRqTWPg2JAGN.js", + "sKO8TcLIkCTnFvXu.js", "sQDh3g11pWchxpW9.js", + "sT3t7huqUVWpbCt3.js", "sYlGRLApZ3Ub24ea.js", "scfm5iWWBxWI6QaK.js", - "sjnoYbWpAugyDilW.js", "skVq3eDEYKFF2iZp.js", - "sm9d5lk6cM0OuUkf.js", + "slSRg5p8h34Vot34.js", + "slzh77d2DPtvsXk0.js", + "ssuryRgATzt6XksC.js", + "t48hkacYdOpzWvK9.js", "t8LYOuN5peEdWeXP.js", - "tCIT1a12Gt6k2ohA.js", "tFAKRRRfTjQfdQz3.js", + "tHBlC7SpYiQ7SUGo.js", "tKBq1nGZo8t6vvQ6.js", "tdICiJ26rJrDbxT6.js", + "tg9N6aUo8WRPKj3H.js", "thxlWeZbow8iE7xA.js", + "tkZ8Ybqu518LQYEn.js", + "tpz88eQFTjWHdFL5.js", + "u2TxLqkTdoK8aHTo.js", + "u3olS2p7Ls1JXfAH.js", + "u4fKgGFEnOCnvvsv.js", "u5dNZ0s3lWfL8KFb.js", "u6CYMSZADrfXd48Q.js", "uAy4w7y8Uu9POF8C.js", + "uCJk19rijMPRU8jg.js", + "uMvD2HWFNGqCmrBM.js", "uNYstk3eXmWamhzs.js", "uOHAsKlkFuIaAmjb.js", + "ucF4aiJ1gpDB333G.js", "ur2HAWDGSGvyAynU.js", - "v00nVCRKqqRvY28t.js", - "v18mmwUmuKiVfwzQ.js", "v4ITTsSY9EvCbhZP.js", + "v5aUWYPlFHKWnZ5Y.js", + "vBqrydNzHmEHClqZ.js", + "vJT2UOO7Ov7a7Rx4.js", "vM2BPwYhHQaBAt2C.js", + "vNUGuypkhx2P5YIA.js", "vNp9wgdSvnNEjZyS.js", "vPG4rV640aSzKzxe.js", + "vS2D9QUslR7ZtXXm.js", + "vSDMygIT9nNvEGWG.js", "vTebTUzXortx1Qut.js", "vUpMQlbwDiYfMCNS.js", "vY3xeTTL3ghPrJpN.js", @@ -629,16 +1117,32 @@ "vcM0IgsYVmfWrlO3.js", "vgfs0DXvF5iKrz1M.js", "vjyTKcNrJzX4XWnS.js", - "vvVhAqreedtmOR9b.js", + "vn13U388mwquGN9y.js", + "vphNSTVxfZjApblV.js", + "vtXJI2VGlU9vODXz.js", + "vzSj3vvPryp02EVC.js", "w3r54pKZQKaH2Yer.js", + "w4zubIHP0XgMXsFe.js", "w6tr8mWy0ZSUkHLt.js", "w7K0lbxQKJ2tsc6f.js", + "w8s2RUzA1jmyu7vy.js", "wAETU6aTRr9d4oCU.js", + "wAntJhgb8Og5vJXh.js", + "wFHjQyCR6Wzn6TeQ.js", + "wIdpkqPBmeVwSSQS.js", + "wLg8LbPAPbQgUg0Z.js", "wRxgpGmlUpe7nwzJ.js", "wUlYLBT59Efys5aS.js", + "wagZ4VV7431N3Sm8.js", + "wb1DpSdIhSqYG5cp.js", "wkY4Uj2NjT8mQNT4.js", + "x76tKw4L8dX00ikE.js", + "x9Ah9e5xAGqCNFO3.js", "x9G6Du5EWV6byf4C.js", + "xEE0ymsaH2tn2M99.js", + "xIIkfmgWfh3teEfr.js", "xIRU2SaqLeWmqGDI.js", + "xJZKVGE04o84Gibo.js", "xL4S0H1RP8hhXW7c.js", "xLKAuD6yzwjAL6tJ.js", "xMhhVol8Is3DJ3gb.js", @@ -648,51 +1152,64 @@ "xQnoRTHotZKrwPrx.js", "xRTmMwNfdirjsi8X.js", "xYTkj8jhSVOSoLbC.js", + "xcny1zYAphdfrKv9.js", "xcy5GOUSZ0meIejZ.js", "xgdhf0wlNP2cHIQx.js", - "xiyQSXozoLxt0MZs.js", + "xihniGjgqOhuaKWc.js", + "xkdQhZ9KKqmocNLO.js", + "xklncIMwQIespDxS.js", "xnHobI9HojObLHMp.js", "xot4JWCRzLkobHtL.js", "xpgXWoK2zDnG1uiF.js", "xq3RANOtmPhy77ne.js", + "xqWxV9w5ezBQdJkZ.js", "xvGxwv7X0Vq3vNqb.js", "y3agVFVBR8tVqWyx.js", + "y7hk7prQ0lLTyv1Y.js", + "y9fwuiqn44t13WAq.js", + "yAL0YwZWVm8o1nxa.js", + "yDvxF9llUYwJg0sE.js", + "yFMvxecXAZ6T2O0S.js", + "yHAPfyaRfC4ijV6x.js", + "yJuEWH4wVYuPZMvL.js", "yPxYRObUiqAIhlNB.js", + "yTmRoUstxHMso91c.js", + "yXUPiWuQ5o0JBY4i.js", + "yYNBZjmBnytXpRn3.js", "yamap8V6Gx2Z9Smu.js", + "ybxDG2ezvRx02LYx.js", "ynNCBAYwJFkTiXV1.js", + "ynV7tz0OdCwlsQp6.js", "yr1FmaTY18JXWa8s.js", "z14Tb2YKCjiE5ZTU.js", + "z8W5PAwBR0PXY6ty.js", "z926Cl2vxUfyLY0V.js", - "z9NEbIUBsKMaTuCz.js", "zBHTIBU8OlYj1YIO.js", + "zF1IKmobCB8ea58M.js", + "zI5hXv2NLGWqnmDD.js", + "zIErcRiBmIZRbary.js", "zUv9e0A3OEXWY9Mv.js", + "zWZG8OmxqTpzHjFV.js", + "zasFOZohkrdFIBwr.js", "zk44dFEGkylB7kW6.js", "zkc1gIPLj0VoAONT.js", "zphxI8VSWbNQCMBy.js", "zqShIJnrRReGgP94.js", + "zsoTVkHe4nHY1M52.js", "ztIkD5Zt6ko9D4Ca.js" ], "needsUpdate": [ { "file": "03mJu59V4iByWlsO.js", "wfrp4eSize": 1153, - "frSize": 1201, - "wfrp4eTexts": [], - "frTexts": [ - "

${this.actor.prototypeToken.name} :\n

    \n
  • Reçoit 3 états Empoisonnés, sans Test de Résistance possible
  • \n
  • Récupère ${this.actor.system.characteristics.t.bonus} Blessures
  • \n
  • Acuiert le Trait de Creature Régénération.
  • \n
\n C" - ] - }, - { - "file": "0BP5l7bIkf744G1k.js", - "wfrp4eSize": 70, - "frSize": 70, + "frSize": 1215, "wfrp4eTexts": [], "frTexts": [] }, { "file": "0FWto1oEr3jbWggw.js", "wfrp4eSize": 789, - "frSize": 766, + "frSize": 812, "wfrp4eTexts": [ "Could not find ${lore} spell. Try Again" ], @@ -703,22 +1220,22 @@ { "file": "0R0QAr3D024kWPfo.js", "wfrp4eSize": 552, - "frSize": 589, + "frSize": 577, "wfrp4eTexts": [ "Mutation table not found, please ensure a table with the ", "Item could not be found: ", "${item.name} added" ], "frTexts": [ - "La table des Mutations n", - "L", + "Table de Mutation introuvable, veuillez vous assurer qu", + "Impossible de trouver l", "${item.name} added" ] }, { "file": "0Uly7OmkH0zqYbxQ.js", "wfrp4eSize": 584, - "frSize": 585, + "frSize": 579, "wfrp4eTexts": [ "Dropped ${dropped.map(i => i.name).join(" ], @@ -729,35 +1246,69 @@ { "file": "0abwNjpzo3SbEOeO.js", "wfrp4eSize": 267, - "frSize": 270, + "frSize": 267, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "0yyofYHeDRQlFliO.js", - "wfrp4eSize": 68, - "frSize": 68, + "file": "0amHqfjTRp5ff6Op.js", + "wfrp4eSize": 150, + "frSize": 153, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "11uCC0mK2uL783al.js", - "wfrp4eSize": 134, - "frSize": 133, + "file": "0hgTyeaEhMBLwzUn.js", + "wfrp4eSize": 229, + "frSize": 229, "wfrp4eTexts": [], "frTexts": [] }, + { + "file": "0jTqyz0wRlK6XPF7.js", + "wfrp4eSize": 112, + "frSize": 112, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "0uUxvBLJC76WIIBC.js", + "wfrp4eSize": 179, + "frSize": 181, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "0wR0LWpfhLFA240I.js", + "wfrp4eSize": 219, + "frSize": 233, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "18MeEQ0As3JvER71.js", + "wfrp4eSize": 244, + "frSize": 242, + "wfrp4eTexts": [ + "EFFECT.CreatureBackInWater", + "EFFECT.CreatureOutOfWater" + ], + "frTexts": [ + "Effet.CreatureBackInWater", + "Effet.CreatureOutOfWater" + ] + }, { "file": "190PHSHKGaJ74wsR.js", "wfrp4eSize": 1169, - "frSize": 1060, + "frSize": 1191, "wfrp4eTexts": [], "frTexts": [] }, { "file": "1BT0MWM2cbhlEnrn.js", "wfrp4eSize": 1169, - "frSize": 1176, + "frSize": 1140, "wfrp4eTexts": [ "Could not find ${talent}" ], @@ -768,96 +1319,95 @@ { "file": "1CeYp5MlPcH68UIw.js", "wfrp4eSize": 2481, - "frSize": 2498, + "frSize": 2500, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" ], "frTexts": [ "Impossible de trouver ${talent}", - "Impossible de trouver ${trapping}" + "Could not find ${trapping}" ] }, { - "file": "1JwxZujbDcueLWBL.js", - "wfrp4eSize": 162, - "frSize": 168, - "wfrp4eTexts": [], - "frTexts": [] + "file": "1Du4e27M8WgP2iui.js", + "wfrp4eSize": 352, + "frSize": 342, + "wfrp4eTexts": [ + "Blinded while wearing the ${this.item.name}" + ], + "frTexts": [ + "Aveuglé en portant ${this.item.name}" + ] }, { - "file": "1OpT3CXs07XFWWCT.js", - "wfrp4eSize": 30, - "frSize": 30, + "file": "1UvL0XA1EpQtjDNn.js", + "wfrp4eSize": 237, + "frSize": 245, "wfrp4eTexts": [], "frTexts": [] }, { "file": "1ZArMNUI8qqH6zkX.js", "wfrp4eSize": 247, - "frSize": 242, + "frSize": 240, "wfrp4eTexts": [], "frTexts": [] }, { "file": "1exiWlVUHsXDLLAH.js", "wfrp4eSize": 62, - "frSize": 70, + "frSize": 75, "wfrp4eTexts": [ "Cannot enter ${this.effect.name}!" ], "frTexts": [ - "Ne peut saisir ${this.effect.name}!" + "Impossible d" ] }, { "file": "1fQr1Dg7DX0vfz3r.js", "wfrp4eSize": 134, - "frSize": 145, - "wfrp4eTexts": [], - "frTexts": [ - "Soins de ${healed} Blessures" - ] - }, - { - "file": "1jQq9v8fXK8zuEBU.js", - "wfrp4eSize": 853, - "frSize": 863, + "frSize": 138, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "1l7Jz2ZHbAWko7Vm.js", - "wfrp4eSize": 33, - "frSize": 33, + "file": "1jQq9v8fXK8zuEBU.js", + "wfrp4eSize": 853, + "frSize": 857, "wfrp4eTexts": [], "frTexts": [] }, { "file": "1wrPvP6lJwIAfmsl.js", "wfrp4eSize": 362, - "frSize": 371, + "frSize": 370, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "1yOvw74jzFfaI87b.js", - "wfrp4eSize": 27, - "frSize": 27, + "file": "23PDHNZEnihcEvdK.js", + "wfrp4eSize": 310, + "frSize": 334, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "23vWiHUjxtRQ3Efz.js", - "wfrp4eSize": 219, - "frSize": 218, - "wfrp4eTexts": [], - "frTexts": [] + "file": "2EAYX5G9Fh3HJwiP.js", + "wfrp4eSize": 134, + "frSize": 139, + "wfrp4eTexts": [ + "Removed Broken." + ], + "frTexts": [ + "Etat Brisé supprimé." + ] }, { - "file": "2AOo7KUyzMrgIlgM.js", - "wfrp4eSize": 137, - "frSize": 129, + "file": "2QB0LjueuJcIaHaC.js", + "wfrp4eSize": 352, + "frSize": 359, "wfrp4eTexts": [], "frTexts": [] }, @@ -872,39 +1422,46 @@ "Impossible d" ] }, + { + "file": "2Yh4vQm0ZJukRH1x.js", + "wfrp4eSize": 49, + "frSize": 50, + "wfrp4eTexts": [], + "frTexts": [] + }, { "file": "2cKarG9ToyW2ptCd.js", "wfrp4eSize": 338, - "frSize": 340, + "frSize": 339, "wfrp4eTexts": [ "None left!" ], "frTexts": [ - "Vide !" + "Plus rien !" ] }, { "file": "2rzxQlL7A9ujZ9uK.js", - "wfrp4eSize": 315, - "frSize": 316, + "wfrp4eSize": 318, + "frSize": 318, "wfrp4eTexts": [ "${this.effect.name}: Gained ${this.item.Advances} Advantage" ], "frTexts": [ - "${this.effect.name}: Gain de ${this.item.Advances} Avantages" + "${this.effect.name}: Gain de ${this.item.Advances} Avantage(s)" ] }, { - "file": "2yctEihGmdCfTTVx.js", - "wfrp4eSize": 88, - "frSize": 63, + "file": "2uyajbon5QX1CewS.js", + "wfrp4eSize": 44, + "frSize": 47, "wfrp4eTexts": [], "frTexts": [] }, { "file": "2zeP2nMSURjxrqYz.js", "wfrp4eSize": 282, - "frSize": 302, + "frSize": 290, "wfrp4eTexts": [ "No effect at 0 Wounds", "Healed ${this.actor.characteristics.t.bonus} Wounds" @@ -915,16 +1472,20 @@ ] }, { - "file": "33US8YRgaMqYu2We.js", - "wfrp4eSize": 29, - "frSize": 29, - "wfrp4eTexts": [], - "frTexts": [] + "file": "39mmD9wOsHWas3cl.js", + "wfrp4eSize": 300, + "frSize": 308, + "wfrp4eTexts": [ + "Cannot remove " + ], + "frTexts": [ + "Impossible de retirer " + ] }, { - "file": "37UN17gb8suFeZIW.js", - "wfrp4eSize": 133, - "frSize": 139, + "file": "3CeKfDcMEVgQlcXm.js", + "wfrp4eSize": 131, + "frSize": 135, "wfrp4eTexts": [], "frTexts": [] }, @@ -938,39 +1499,57 @@ { "file": "3IGO7xEjRjat937X.js", "wfrp4eSize": 232, - "frSize": 241, + "frSize": 255, "wfrp4eTexts": [ "Removing Fatigued Condition, disabled effect" ], "frTexts": [ - "Suppression de l" + "Etat Extenué - Suppression de la condition Extenué, effet désactivé" ] }, { - "file": "3eSaX0BeaUalNkEP.js", - "wfrp4eSize": 26, - "frSize": 26, + "file": "3KH6OE7L7uJESI2Z.js", + "wfrp4eSize": 213, + "frSize": 222, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "3jm0NoYpgB6ZuUSl.js", - "wfrp4eSize": 38, - "frSize": 38, + "file": "3VhUyqNY18PzeMKG.js", + "wfrp4eSize": 74, + "frSize": 83, + "wfrp4eTexts": [ + "Cannot Attack this target!" + ], + "frTexts": [ + "Impossible d" + ] + }, + { + "file": "3ixqbsEMfSSTzAXU.js", + "wfrp4eSize": 339, + "frSize": 349, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "3l7MQSa10Kve2K3P.js", - "wfrp4eSize": 215, - "frSize": 221, + "file": "4AO7Fowek5sSmE4g.js", + "wfrp4eSize": 491, + "frSize": 491, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "4KYraZSHAEYmL6xx.js", + "wfrp4eSize": 212, + "frSize": 218, "wfrp4eTexts": [], "frTexts": [] }, { "file": "4MQ7u4INxp51oyyR.js", "wfrp4eSize": 1932, - "frSize": 1952, + "frSize": 1961, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -980,10 +1559,28 @@ "Impossible de trouver ${trapping}" ] }, + { + "file": "4OlwxU60UqKg81yb.js", + "wfrp4eSize": 180, + "frSize": 178, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "4iu3CmOI19soOYuA.js", + "wfrp4eSize": 1255, + "frSize": 1284, + "wfrp4eTexts": [ + "Could not find ${trait.name}" + ], + "frTexts": [ + "Impossible de trouver ${trait.name}" + ] + }, { "file": "4ylzjgUdHY5D0yVh.js", "wfrp4eSize": 3410, - "frSize": 3359, + "frSize": 3461, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -996,23 +1593,28 @@ { "file": "58rFc9HiBoX66J6p.js", "wfrp4eSize": 444, - "frSize": 453, + "frSize": 445, "wfrp4eTexts": [], "frTexts": [] }, { "file": "5DI6cHAg1LHo54Yv.js", - "wfrp4eSize": 420, - "frSize": 426, + "wfrp4eSize": 423, + "frSize": 418, "wfrp4eTexts": [], - "frTexts": [ - "1 Point de Fortune volé à ${this.actor.name}" - ] + "frTexts": [] + }, + { + "file": "5GP9UJMvBZv6kWtI.js", + "wfrp4eSize": 741, + "frSize": 746, + "wfrp4eTexts": [], + "frTexts": [] }, { "file": "5JWC0l3JEpOsqbR9.js", "wfrp4eSize": 1767, - "frSize": 1783, + "frSize": 1792, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -1025,7 +1627,7 @@ { "file": "5JvKJZPcd6Hz5zvn.js", "wfrp4eSize": 1886, - "frSize": 1906, + "frSize": 1927, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -1036,30 +1638,37 @@ ] }, { - "file": "5M6IgCUncCwyxHok.js", - "wfrp4eSize": 1217, - "frSize": 1197, + "file": "5KVslRqhqzuFLyk4.js", + "wfrp4eSize": 108, + "frSize": 107, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "5MxRDXzUBPfp2KKD.js", - "wfrp4eSize": 38, - "frSize": 38, + "file": "5M6IgCUncCwyxHok.js", + "wfrp4eSize": 1217, + "frSize": 1216, "wfrp4eTexts": [], "frTexts": [] }, { "file": "5ScjIdRUOxblHdWS.js", "wfrp4eSize": 1217, - "frSize": 1212, + "frSize": 1224, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "5XAYjiq1i4M7Ky7j.js", + "wfrp4eSize": 1499, + "frSize": 1504, "wfrp4eTexts": [], "frTexts": [] }, { "file": "5dR7Erj3nwsxLAV7.js", "wfrp4eSize": 1954, - "frSize": 1976, + "frSize": 1989, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -1070,9 +1679,23 @@ ] }, { - "file": "62Ky6bC1EnTllSJA.js", - "wfrp4eSize": 253, - "frSize": 259, + "file": "5lpR78CLhYH6Mjnu.js", + "wfrp4eSize": 140, + "frSize": 142, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "5uokSqQsjgMapnCi.js", + "wfrp4eSize": 391, + "frSize": 388, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "64aJznxPMUHAuf7F.js", + "wfrp4eSize": 768, + "frSize": 768, "wfrp4eTexts": [], "frTexts": [] }, @@ -1086,35 +1709,56 @@ { "file": "6Aqq4F4Xui923sc6.js", "wfrp4eSize": 779, - "frSize": 754, + "frSize": 789, "wfrp4eTexts": [], - "frTexts": [ - "

${this.actor.prototypeToken.name} reçoit le Trait de Créatuer A Sang Froid et peut inverser n" - ] + "frTexts": [] + }, + { + "file": "6AsCMHZ4IYPq7Uxf.js", + "wfrp4eSize": 48, + "frSize": 49, + "wfrp4eTexts": [], + "frTexts": [] }, { "file": "6BmvV9c03FkfisnE.js", "wfrp4eSize": 1069, - "frSize": 1107, + "frSize": 1076, "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.name} porte le ${this.item.name}.
\n Il gagne +1 Point de Corruption point si un Test de Corruption est échoué, à appliquer manuellement.
Si le personnage porte le masque pendant plus d", - "${this.item.name} de ${this.actor.name} a été enlevé et a perdu ses propriétés. Cependant, les effets perdurent pendant [[1d10+4]] jours, après quoi ils devront être manuellement supprimés." - ] + "frTexts": [] }, { "file": "6H6vNjzvMGl2ZqCR.js", "wfrp4eSize": 285, - "frSize": 305, + "frSize": 304, "wfrp4eTexts": [], - "frTexts": [ - "Lame de Nurglitch: ${args.actor.name} doit réussir un Test d" - ] + "frTexts": [] + }, + { + "file": "6LMzIdmCSYctgmGx.js", + "wfrp4eSize": 134, + "frSize": 136, + "wfrp4eTexts": [], + "frTexts": [] }, { "file": "6QZUX7ZrFxOzqI0b.js", "wfrp4eSize": 252, - "frSize": 268, + "frSize": 254, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "6Ws3ieQ7pG5poUyT.js", + "wfrp4eSize": 312, + "frSize": 319, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "6elUNF58TaiYjxcx.js", + "wfrp4eSize": 246, + "frSize": 239, "wfrp4eTexts": [], "frTexts": [] }, @@ -1128,7 +1772,7 @@ { "file": "6jcTzK1XEuWqAacN.js", "wfrp4eSize": 142, - "frSize": 159, + "frSize": 153, "wfrp4eTexts": [ "Cannot use ${game.wfrp4e.config.locations[this.effect.getFlag(" ], @@ -1136,69 +1780,48 @@ "Impossible d" ] }, - { - "file": "6jp8slPU33oBQe1V.js", - "wfrp4eSize": 55, - "frSize": 55, - "wfrp4eTexts": [], - "frTexts": [] - }, { "file": "6kifXp2jXEaQVJsg.js", "wfrp4eSize": 215, - "frSize": 338, + "frSize": 229, "wfrp4eTexts": [], "frTexts": [] }, { "file": "6mpw9cGseG4W4eyd.js", "wfrp4eSize": 299, - "frSize": 311, + "frSize": 293, "wfrp4eTexts": [ "Advantage Subtracted", "Not enough Advantage!" ], "frTexts": [ - "Avvantage soustrait", + "Avantage retiré", "Pas assez d" ] }, - { - "file": "6oSs8qKFNFz2lSmh.js", - "wfrp4eSize": 100, - "frSize": 99, - "wfrp4eTexts": [], - "frTexts": [] - }, { "file": "6qJP0hpShEM43ohx.js", "wfrp4eSize": 844, - "frSize": 853, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "6uldpFvKOCoW92cC.js", - "wfrp4eSize": 293, - "frSize": 278, + "frSize": 850, "wfrp4eTexts": [], "frTexts": [] }, { "file": "6xTtJEhRc4OjcDTf.js", "wfrp4eSize": 174, - "frSize": 183, + "frSize": 196, "wfrp4eTexts": [ "Cannot update Fortune" ], "frTexts": [ - "Impossible de mettre à jour la Fortune" + "Impossible de mettre à jour la Chance" ] }, { "file": "7F6aGxZJjwxm5e5P.js", "wfrp4eSize": 640, - "frSize": 642, + "frSize": 649, "wfrp4eTexts": [ "Lost ${value} Wounds" ], @@ -1209,94 +1832,98 @@ { "file": "7JW9t8AYSDkkzG2V.js", "wfrp4eSize": 967, - "frSize": 1002, + "frSize": 957, "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.name} porte le ${this.item.name}.
\n Si le personnage porte le masque pendant plus d", - "${this.item.name} porté par ${this.actor.name} a été enlevé et a perdu ses capacités. Cependant, les effets perdurent pendant [[1d10+4]] jours, après quoi ils doivent être retirés manuellement." - ] + "frTexts": [] }, { "file": "7WR2hJjHPhHhHxAq.js", "wfrp4eSize": 236, - "frSize": 251, + "frSize": 252, "wfrp4eTexts": [ "Removed ${poisoned.conditionValue} Poisoned Conditions", "No Poisoned Conditions" ], "frTexts": [ - "Suppression de ${poisoned.conditionValue} états Empoisonné", - "Aucun état Empoisonné" + "SSuppression de ${poisoned.conditionValue} états Empoisonnés", + "Aucun état Empoisonné à supprimer." ] }, { "file": "7ZoFUMDG2WJd8RMg.js", "wfrp4eSize": 74, - "frSize": 91, - "wfrp4eTexts": [], - "frTexts": [ - "Revendiquer le Bonus de ${this.effect.name} " - ] - }, - { - "file": "7f6OsttTzE7Hvzfk.js", - "wfrp4eSize": 170, - "frSize": 168, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "7n3SEAGRA5ESK8gV.js", - "wfrp4eSize": 27, - "frSize": 27, + "frSize": 76, "wfrp4eTexts": [], "frTexts": [] }, { "file": "7w7QA7GBhzZ98OS0.js", "wfrp4eSize": 882, - "frSize": 874, + "frSize": 887, "wfrp4eTexts": [], "frTexts": [] }, { "file": "7wBWUw05q0igh508.js", "wfrp4eSize": 852, - "frSize": 860, + "frSize": 883, "wfrp4eTexts": [], "frTexts": [ - "

${this.actor.prototypeToken.name} gagne le Trait de Creature Insensible à la Douleur. Cet effet dure 1 heure, après quoi il disparait et le total des Blessures encaissés par le buveur sont encaissés d" + "

${this.actor.prototypeToken.name} a acquis le Trait de Créature Insensible à la douleur. Cet\n effet dure une heure, après quoi il se dissipe et l" ] }, { - "file": "8GyJgdHVBaLrHCY8.js", - "wfrp4eSize": 684, - "frSize": 689, + "file": "873KaarAnJ2qf1r2.js", + "wfrp4eSize": 93, + "frSize": 101, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "8TRiAJ8thIKE4IoL.js", - "wfrp4eSize": 196, - "frSize": 182, + "file": "8GyJgdHVBaLrHCY8.js", + "wfrp4eSize": 684, + "frSize": 685, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "8R7O63iC0yANtkJ9.js", + "wfrp4eSize": 185, + "frSize": 189, + "wfrp4eTexts": [ + "Cannot acquire Ablaze Condition" + ], + "frTexts": [ + "Ne peut recevoir un état En Flammes" + ] + }, + { + "file": "8ThudCYRqkjQIwJH.js", + "wfrp4eSize": 92, + "frSize": 91, "wfrp4eTexts": [], "frTexts": [] }, { "file": "8araLuwmBq8GKEw3.js", "wfrp4eSize": 310, - "frSize": 323, + "frSize": 322, "wfrp4eTexts": [], "frTexts": [] }, { "file": "8rq4GL5d5nCn4kO7.js", "wfrp4eSize": 240, - "frSize": 249, + "frSize": 243, "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.prototypeToken.name} regagne ${healed} Blessures" - ] + "frTexts": [] + }, + { + "file": "8sJSsjq6wx4IxXWn.js", + "wfrp4eSize": 273, + "frSize": 278, + "wfrp4eTexts": [], + "frTexts": [] }, { "file": "8tyMXDfHR8AJBdDu.js", @@ -1308,7 +1935,7 @@ { "file": "8xqYrBIf1Zhlwizg.js", "wfrp4eSize": 1193, - "frSize": 1190, + "frSize": 1174, "wfrp4eTexts": [], "frTexts": [] }, @@ -1319,24 +1946,10 @@ "wfrp4eTexts": [], "frTexts": [] }, - { - "file": "96Y1yIH1lRjTs5hL.js", - "wfrp4eSize": 102, - "frSize": 116, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "98nKfcimlaPeM9h5.js", - "wfrp4eSize": 129, - "frSize": 135, - "wfrp4eTexts": [], - "frTexts": [] - }, { "file": "9A7rYY3FKi5XLihG.js", "wfrp4eSize": 423, - "frSize": 437, + "frSize": 427, "wfrp4eTexts": [], "frTexts": [] }, @@ -1350,34 +1963,32 @@ { "file": "9WZa63lr0K3SsP4G.js", "wfrp4eSize": 192, - "frSize": 202, + "frSize": 199, "wfrp4eTexts": [ "Applied after effects" ], "frTexts": [ - "Applique après les effets" + "Effets secondaires appliqués" ] }, { - "file": "9Yn9uViEjcuaESJ2.js", - "wfrp4eSize": 232, - "frSize": 235, + "file": "9fNHye2N2DORR0A3.js", + "wfrp4eSize": 43, + "frSize": 39, "wfrp4eTexts": [], "frTexts": [] }, { "file": "A0OK0qAMmnf8iNJf.js", "wfrp4eSize": 382, - "frSize": 391, + "frSize": 386, "wfrp4eTexts": [], - "frTexts": [ - "Reçoit ${Math.abs(args.test.result.SL)} Points de Corruption" - ] + "frTexts": [] }, { "file": "A1odAcuRbq9797ZB.js", "wfrp4eSize": 1946, - "frSize": 1908, + "frSize": 1964, "wfrp4eTexts": [ "Could not find ${talent}" ], @@ -1388,92 +1999,113 @@ { "file": "A6DcKPzAGntzSCil.js", "wfrp4eSize": 187, - "frSize": 184, + "frSize": 202, "wfrp4eTexts": [], "frTexts": [] }, { "file": "ACtDCTLZXmd5uXjX.js", - "wfrp4eSize": 419, - "frSize": 430, + "wfrp4eSize": 400, + "frSize": 431, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "AGD7zCyV4zruvnWu.js", - "wfrp4eSize": 122, - "frSize": 121, + "file": "AI7iVbQMPzXMP5on.js", + "wfrp4eSize": 332, + "frSize": 334, "wfrp4eTexts": [], "frTexts": [] }, { "file": "AMI2wDJqsIZsoq1e.js", - "wfrp4eSize": 372, - "frSize": 368, - "wfrp4eTexts": [], - "frTexts": [ - "Émet un nuage de poudre noire nauséabonde. Active l" - ] - }, - { - "file": "Adgs6Zs0FdefO6qx.js", - "wfrp4eSize": 217, - "frSize": 215, + "wfrp4eSize": 375, + "frSize": 372, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "Ah2wyywkL8hjJNXM.js", - "wfrp4eSize": 31, - "frSize": 31, - "wfrp4eTexts": [], - "frTexts": [] + "file": "AYEiCx2Es3QtMY28.js", + "wfrp4eSize": 1243, + "frSize": 1250, + "wfrp4eTexts": [ + "Could not find ${c}" + ], + "frTexts": [ + "Impossible de trouver ${c}" + ] }, { - "file": "ApaLcUhuty3EzJoP.js", - "wfrp4eSize": 338, - "frSize": 352, + "file": "AhV9QfteQNqqXVjv.js", + "wfrp4eSize": 403, + "frSize": 417, "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.prototypeToken.name} voit ses points de Destin augmentés de ${current} à ${fortunePoints + current}" - ] + "frTexts": [] }, { "file": "AqHLHp4kH6KULk3e.js", "wfrp4eSize": 373, - "frSize": 387, + "frSize": 374, "wfrp4eTexts": [ "None left!" ], "frTexts": [ - "Aucun disponible!" + "Plus rien !" ] }, { - "file": "AyNb5sj6FD2Z3Q5T.js", - "wfrp4eSize": 128, - "frSize": 134, - "wfrp4eTexts": [], - "frTexts": [] + "file": "AvRbjpBfTX3mn3bz.js", + "wfrp4eSize": 575, + "frSize": 587, + "wfrp4eTexts": [ + "Set Liquid Fortification effect duration to 1 hour.", + "Reset Liquid Fortification effect duration to 1 hour." + ], + "frTexts": [ + "Durée de l", + "Durée de l" + ] }, { "file": "BD7bVTU2pVoRSRBe.js", "wfrp4eSize": 793, - "frSize": 802, + "frSize": 803, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "BHbFqhJPzZI2txLs.js", - "wfrp4eSize": 394, - "frSize": 447, + "file": "BEEvU2hE5ymcNOH9.js", + "wfrp4eSize": 381, + "frSize": 400, + "wfrp4eTexts": [ + "Fatigued added to " + ], + "frTexts": [ + "Etat Exténué ajouté à " + ] + }, + { + "file": "BVNKF9omCppWPLys.js", + "wfrp4eSize": 884, + "frSize": 896, + "wfrp4eTexts": [ + "You must control an Actor capable of performing a Strength Test" + ], + "frTexts": [ + "Vous devez contrôler un acteur capable d" + ] + }, + { + "file": "Bu0KUpGvfmFF7LJs.js", + "wfrp4eSize": 518, + "frSize": 555, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "Bj6bxItlgtI2sXVN.js", - "wfrp4eSize": 294, - "frSize": 268, + "file": "Bv3431tnG3VKaTJr.js", + "wfrp4eSize": 114, + "frSize": 114, "wfrp4eTexts": [], "frTexts": [] }, @@ -1487,7 +2119,7 @@ { "file": "CIxZYkHggBQ6EsHP.js", "wfrp4eSize": 62, - "frSize": 70, + "frSize": 64, "wfrp4eTexts": [ "Effect Used" ], @@ -1498,62 +2130,69 @@ { "file": "CS6O7UUjQcUJoOUP.js", "wfrp4eSize": 564, - "frSize": 380, + "frSize": 562, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "CUBpU1imu2eRS06C.js", + "wfrp4eSize": 268, + "frSize": 286, "wfrp4eTexts": [], "frTexts": [] }, { "file": "CW5Vlr57OaMkKJ8Q.js", "wfrp4eSize": 293, - "frSize": 304, + "frSize": 282, "wfrp4eTexts": [ "Advantage Subtracted", "Not enough Advantage!" ], "frTexts": [ - "Avantage soustrait", - "Pas assez d" + "Avantage retiré", + "Avantage retiré" ] }, { "file": "CWNGrg7se91RC95g.js", - "wfrp4eSize": 443, - "frSize": 460, + "wfrp4eSize": 483, + "frSize": 496, "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "CbfUDhUr5R4UnPPq.js", + "wfrp4eSize": 269, + "frSize": 276, + "wfrp4eTexts": [ + "Cannot remove Blinded condition." + ], "frTexts": [ - "${this.effect.name}: \n @Corruption[moderate]{Exposition Modérée à la Corruption}
\n ${args.actor.prototypeToken.name} doit réussir un \n Test de Corruption (Modéré)" + "Impossible de supprimer l" ] }, { "file": "Cjj4iLkdY1NaZRCi.js", - "wfrp4eSize": 599, - "frSize": 925, + "wfrp4eSize": 523, + "frSize": 539, "wfrp4eTexts": [], "frTexts": [] }, { "file": "ClkT2WG2UjVwQ97T.js", "wfrp4eSize": 413, - "frSize": 415, + "frSize": 409, "wfrp4eTexts": [], "frTexts": [] }, { "file": "DHxUKY9LMyifFgCi.js", "wfrp4eSize": 90, - "frSize": 94, + "frSize": 92, "wfrp4eTexts": [], "frTexts": [] }, - { - "file": "DVlZGbiuMIHEQOnM.js", - "wfrp4eSize": 413, - "frSize": 402, - "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.name} attaché à ${this.actor.getFlag(" - ] - }, { "file": "DWBxvzfWGcG7PVNP.js", "wfrp4eSize": 218, @@ -1562,56 +2201,70 @@ "frTexts": [] }, { - "file": "DhZqJso1JWYtGrKk.js", - "wfrp4eSize": 273, - "frSize": 279, + "file": "Dk4VF4UXSMK5SaVP.js", + "wfrp4eSize": 97, + "frSize": 108, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "DmbWR9s5I8LHBwxB.js", + "wfrp4eSize": 610, + "frSize": 634, "wfrp4eTexts": [], "frTexts": [] }, { "file": "E1vUepgop09FF5wy.js", "wfrp4eSize": 785, - "frSize": 813, + "frSize": 787, "wfrp4eTexts": [ "Not enough Advantage!", "Adding ${frenzy.name}", "Adding ${hatred.name}" ], "frTexts": [ - "Pas assez d", + "Avantage retiré", "Ajout de ${frenzy.name}", "Ajout de ${hatred.name}" ] }, { - "file": "E3om295BMQojnM2F.js", - "wfrp4eSize": 140, - "frSize": 147, - "wfrp4eTexts": [ - "Removed Fatigued" - ], - "frTexts": [ - "Fatigue supprimée" - ] - }, - { - "file": "EBNrA6FNX4d05EUx.js", - "wfrp4eSize": 30, - "frSize": 30, + "file": "E33J9JixYVGxaktQ.js", + "wfrp4eSize": 203, + "frSize": 210, "wfrp4eTexts": [], "frTexts": [] }, + { + "file": "E3om295BMQojnM2F.js", + "wfrp4eSize": 140, + "frSize": 138, + "wfrp4eTexts": [ + "Removed Fatigued" + ], + "frTexts": [ + "Retiré Exténué" + ] + }, { "file": "EC8cZmqrE095cDc2.js", "wfrp4eSize": 906, - "frSize": 914, + "frSize": 952, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "EHfOyVwYhFGWNjw1.js", + "wfrp4eSize": 202, + "frSize": 203, "wfrp4eTexts": [], "frTexts": [] }, { "file": "EJObiSth3WdcJOXN.js", "wfrp4eSize": 176, - "frSize": 186, + "frSize": 180, "wfrp4eTexts": [ "Adding Prone" ], @@ -1622,94 +2275,107 @@ { "file": "EJaBfqADqlo92Fx6.js", "wfrp4eSize": 219, - "frSize": 215, + "frSize": 211, "wfrp4eTexts": [], "frTexts": [] }, - { - "file": "ENGmwaItRXO5s0XY.js", - "wfrp4eSize": 255, - "frSize": 265, - "wfrp4eTexts": [], - "frTexts": [ - "Soigne ${this.actor.system.characteristics.t.bonus * 3} Blessures" - ] - }, { "file": "ERxrWzSpw8qwxFVi.js", "wfrp4eSize": 97, - "frSize": 105, + "frSize": 110, "wfrp4eTexts": [ "Cannot enter ${this.effect.name}!" ], "frTexts": [ - "Ne peut entrer ${this.effect.name}!" + "Impossible d" + ] + }, + { + "file": "ETfmit2Cx0Py77ai.js", + "wfrp4eSize": 1135, + "frSize": 1168, + "wfrp4eTexts": [ + "Could not find ${trait.name}" + ], + "frTexts": [ + ": -200\n}\nlet traits = [ {name:" ] }, { "file": "EdTChmSouS0MSmk5.js", "wfrp4eSize": 313, - "frSize": 352, + "frSize": 344, "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "EsZx8cY34quYG4MQ.js", + "wfrp4eSize": 362, + "frSize": 380, + "wfrp4eTexts": [ + "This Actor does not know any runes." + ], "frTexts": [ - "Peut effectuer une Action ou un Mouvement (en choisir un)", - "Ne peut pas effectuer d" + "Cet acteur ne connaît aucune rune." ] }, { - "file": "FMA16PvoObBV8vDl.js", - "wfrp4eSize": 263, - "frSize": 269, + "file": "F2u4L4o0r1LTWeWK.js", + "wfrp4eSize": 257, + "frSize": 266, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "FAB12eLcSCAOOQwk.js", + "wfrp4eSize": 85, + "frSize": 87, "wfrp4eTexts": [], "frTexts": [] }, { "file": "FPYNcxm21678boLT.js", "wfrp4eSize": 787, - "frSize": 785, + "frSize": 791, "wfrp4eTexts": [], "frTexts": [] }, { "file": "FSqUqSByMiztYOQM.js", "wfrp4eSize": 270, - "frSize": 294, + "frSize": 271, "wfrp4eTexts": [], - "frTexts": [ - "Infecté: ${args.actor.name} doit réussir un Test de Résistance Facile (+40) ou recevoir une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Blessure Purulente}" - ] + "frTexts": [] }, { "file": "FZFOC7bip0oiWEzk.js", - "wfrp4eSize": 196, - "frSize": 206, + "wfrp4eSize": 168, + "frSize": 178, "wfrp4eTexts": [ "Added Bleeding" ], "frTexts": [ - "Ajout d" + "Etat Hémorragique ajouté" ] }, { "file": "FiD3mvWIBHNNIuO9.js", - "wfrp4eSize": 227, - "frSize": 232, - "wfrp4eTexts": [], - "frTexts": [ - "Localisation changée : Tête" - ] - }, - { - "file": "FqevMs0ukQ9WuUHl.js", - "wfrp4eSize": 349, - "frSize": 345, + "wfrp4eSize": 249, + "frSize": 183, "wfrp4eTexts": [], "frTexts": [] }, { "file": "FtZf56VI6Qsspu0D.js", "wfrp4eSize": 1215, - "frSize": 1210, + "frSize": 1222, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "Fu8DTvSgLufcB5mr.js", + "wfrp4eSize": 1287, + "frSize": 1294, "wfrp4eTexts": [], "frTexts": [] }, @@ -1723,123 +2389,103 @@ { "file": "G7sFEnJlXZvfXL3V.js", "wfrp4eSize": 373, - "frSize": 384, + "frSize": 374, "wfrp4eTexts": [ "None left!" ], "frTexts": [ - "Aucun restant!" + "Plus rien !" ] }, { "file": "GRfCxtYzmEx2LYU7.js", - "wfrp4eSize": 449, - "frSize": 418, - "wfrp4eTexts": [], - "frTexts": [ - "Deux @UUID[Compendium.wfrp4e-eis.actors.iDy8SDTwJSlCzZMl]{Horreurs Bleues de Tzeentch} sortent de la chair hurlante de ${this.actor.name}, le tuant au passage." - ] - }, - { - "file": "GTZUO73pUJKpM1JB.js", - "wfrp4eSize": 257, - "frSize": 237, + "wfrp4eSize": 450, + "frSize": 449, "wfrp4eTexts": [], "frTexts": [] }, { "file": "GjkxWj9wCAclM9WA.js", "wfrp4eSize": 540, - "frSize": 580, + "frSize": 570, "wfrp4eTexts": [ "All Effects have been used. Reset to select them again" ], "frTexts": [ - "Tous les effets ont été utilisés. Les remettre à 0 pour les utiliser à nouveau" + "Tous les effets ont été utilisés. Réinitialisez pour les sélectionner à nouveau" ] }, { "file": "GsAyB5xnK3ASeoah.js", "wfrp4eSize": 1210, - "frSize": 1205, + "frSize": 1214, "wfrp4eTexts": [], "frTexts": [] }, { "file": "GzSFlqL1YrIK1dxh.js", - "wfrp4eSize": 802, - "frSize": 811, + "wfrp4eSize": 819, + "frSize": 810, "wfrp4eTexts": [], "frTexts": [] }, { "file": "GzsuEg7gZy1f0ljy.js", "wfrp4eSize": 242, - "frSize": 256, + "frSize": 248, "wfrp4eTexts": [ "Cleared ${bleeding.conditionValue} Bleeding Conditions", "No Bleeding Conditions" ], "frTexts": [ - "Suppression de ${bleeding.conditionValue} états Hémorragiques", - "Aucune Hémorragie" + "Suppression de ${bleeding.conditionValue} états Hémorragique", + "Aucun état Hémorragique" ] }, { "file": "H06Ysj7oPiemW7S6.js", "wfrp4eSize": 1383, - "frSize": 1392, + "frSize": 1382, "wfrp4eTexts": [], - "frTexts": [ - "${args.actor.name}" - ] + "frTexts": [] }, { "file": "H85k4L3yICm7cfIk.js", "wfrp4eSize": 1197, - "frSize": 1193, + "frSize": 1202, "wfrp4eTexts": [], "frTexts": [] }, { "file": "HG2fKOfruT5QV3A4.js", "wfrp4eSize": 929, - "frSize": 943, + "frSize": 951, "wfrp4eTexts": [], "frTexts": [] }, { "file": "HJ2X4ZtXei0BXbxf.js", - "wfrp4eSize": 441, - "frSize": 445, + "wfrp4eSize": 427, + "frSize": 448, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "HYrl5aNMm8BAdqH7.js", - "wfrp4eSize": 333, - "frSize": 133, + "file": "HgzIi6m6dkXbVWHp.js", + "wfrp4eSize": 119, + "frSize": 120, "wfrp4eTexts": [], "frTexts": [] }, { "file": "HmImVzvw6ecBy99l.js", - "wfrp4eSize": 173, - "frSize": 183, + "wfrp4eSize": 145, + "frSize": 182, "wfrp4eTexts": [ "Added Bleeding" ], "frTexts": [ - "Ajout Hémorragique" + "Etat Hémmoragique appliqué : 2 niveaux de saignement" ] }, { @@ -1849,6 +2495,13 @@ "wfrp4eTexts": [], "frTexts": [] }, + { + "file": "HwbgUIbpX0D8JLOR.js", + "wfrp4eSize": 182, + "frSize": 179, + "wfrp4eTexts": [], + "frTexts": [] + }, { "file": "I1J2m5uud84N50Lk.js", "wfrp4eSize": 162, @@ -1861,37 +2514,44 @@ ] }, { - "file": "IAGla7HJlYN0wa4H.js", - "wfrp4eSize": 275, - "frSize": 294, - "wfrp4eTexts": [], - "frTexts": [ - "Test de Force Mentale échoué, ${this.actor.prototypeToken.name} subit des @Symptom[Convulsions] pour [[1d10]] heures" - ] - }, - { - "file": "ILqHxk7deotgI3KD.js", - "wfrp4eSize": 269, - "frSize": 271, + "file": "I79D8V8OFzMCtL40.js", + "wfrp4eSize": 240, + "frSize": 261, "wfrp4eTexts": [], "frTexts": [] }, + { + "file": "IAGla7HJlYN0wa4H.js", + "wfrp4eSize": 275, + "frSize": 273, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "IDvpVMkR2HXoNpPp.js", + "wfrp4eSize": 36, + "frSize": 38, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "IdTjIw1yduvCdwdR.js", + "wfrp4eSize": 204, + "frSize": 212, + "wfrp4eTexts": [ + "Cannot remove " + ], + "frTexts": [ + "Impossible de retirer " + ] + }, { "file": "IfEu1hO8sKEZBpvg.js", "wfrp4eSize": 310, - "frSize": 309, + "frSize": 310, "wfrp4eTexts": [], "frTexts": [] }, - { - "file": "IrkWq7IiFS65bTvC.js", - "wfrp4eSize": 353, - "frSize": 370, - "wfrp4eTexts": [], - "frTexts": [ - "

${speaker.alias} tombe lourdements dans l" - ] - }, { "file": "IslMfFgpgQq2brpu.js", "wfrp4eSize": 135, @@ -1906,86 +2566,73 @@ { "file": "IupskvzvoGyD2H5o.js", "wfrp4eSize": 1703, - "frSize": 1343, + "frSize": 1745, "wfrp4eTexts": [ "Adding ", "Could not find any Blessings associated with ${god}." ], "frTexts": [ - "Adding ", - "Impossible de trouver any Blessings associated with ${god}." + "Ajout de ", + "Impossible de trouver des Bénédictions associées à ${god}." ] }, - { - "file": "IzoOmDywGLqLNljN.js", - "wfrp4eSize": 653, - "frSize": 648, - "wfrp4eTexts": [], - "frTexts": [] - }, { "file": "JXBUE0XuJOJNG7zE.js", "wfrp4eSize": 580, - "frSize": 587, + "frSize": 596, "wfrp4eTexts": [], "frTexts": [] }, { "file": "JhbZWZhOJ23yOBmG.js", "wfrp4eSize": 1210, - "frSize": 1205, + "frSize": 1214, "wfrp4eTexts": [], "frTexts": [] }, { "file": "Jjq3oPYbI26zjxME.js", "wfrp4eSize": 530, - "frSize": 531, + "frSize": 543, "wfrp4eTexts": [ "Dropped ${dropped.map(i => i.name).join(" ], "frTexts": [ - "Lache ${dropped.map(i => i.name).join(" + "Lâche ${dropped.map(i => i.name).join(" ] }, { "file": "JmZQRvdWjm9ykYfn.js", "wfrp4eSize": 137, - "frSize": 144, + "frSize": 143, "wfrp4eTexts": [], - "frTexts": [ - "Ne peut être surpris" - ] + "frTexts": [] }, { - "file": "Jnp5c09sPzDD61EK.js", - "wfrp4eSize": 185, - "frSize": 208, - "wfrp4eTexts": [ - "${args.actor.prototypeToken.name} must pass an Average (+20) Willpower Test to attack this target!" - ], - "frTexts": [ - "${args.actor.prototypeToken.name} doit réussir un Test Accessible (+20) de Force Mentale pour attaquer cette cible!" - ] + "file": "JwYZJGkZMSM2M3Si.js", + "wfrp4eSize": 476, + "frSize": 477, + "wfrp4eTexts": [], + "frTexts": [] }, { - "file": "KD4nCSdSXJVJmk0R.js", - "wfrp4eSize": 154, - "frSize": 160, + "file": "K54XxyNJa5PIWDEH.js", + "wfrp4eSize": 171, + "frSize": 176, "wfrp4eTexts": [], "frTexts": [] }, { "file": "KGK9vL1Yl0qmCeCN.js", "wfrp4eSize": 2503, - "frSize": 2502, + "frSize": 2525, "wfrp4eTexts": [], "frTexts": [] }, { "file": "KICZPwLvbUSxbDrE.js", "wfrp4eSize": 488, - "frSize": 512, + "frSize": 507, "wfrp4eTexts": [ "Cannot find table with key: mutatemental", "Item could not be found: ", @@ -1997,151 +2644,97 @@ "${item.name} added" ] }, - { - "file": "KQzbrpb0T5a7it4k.js", - "wfrp4eSize": 216, - "frSize": 216, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "KVpDUEjHhd3nLa0f.js", - "wfrp4eSize": 236, - "frSize": 242, - "wfrp4eTexts": [], - "frTexts": [] - }, { "file": "KmngDrPD72xn22kZ.js", "wfrp4eSize": 588, - "frSize": 606, + "frSize": 594, "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.prototypeToken.name} perd ${toughnessLost} points d" - ] + "frTexts": [] + }, + { + "file": "LNxKkPI37im0bSjy.js", + "wfrp4eSize": 226, + "frSize": 225, + "wfrp4eTexts": [], + "frTexts": [] }, { "file": "LQEWSN5KnHHATPsf.js", "wfrp4eSize": 262, - "frSize": 281, - "wfrp4eTexts": [], - "frTexts": [ - "${args.actor.name} doit réussir un Test Facile (+40) d" - ] - }, - { - "file": "Lp261O9fgEXmgPf3.js", - "wfrp4eSize": 241, - "frSize": 236, + "frSize": 263, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "LyAK0dVDS5L09yq2.js", - "wfrp4eSize": 246, - "frSize": 256, - "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.prototypeToken.name} récupère ${bonus} Blessures" - ] - }, - { - "file": "M5bh0heeafA2fQQ8.js", - "wfrp4eSize": 347, - "frSize": 345, - "wfrp4eTexts": [], - "frTexts": [ - "${this.effect.name} s" - ] - }, - { - "file": "MDLttXplnNthncGr.js", - "wfrp4eSize": 121, - "frSize": 120, + "file": "Lj9H0O9XUk830CBt.js", + "wfrp4eSize": 503, + "frSize": 503, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "MFKhU9vp8bQpHP3I.js", - "wfrp4eSize": 313, - "frSize": 313, + "file": "LxEhkvdSEQic8VZ6.js", + "wfrp4eSize": 797, + "frSize": 807, + "wfrp4eTexts": [ + "No Ingredients!", + "Affected " + ], + "frTexts": [ + "Aucun ingrédient !", + "Affecté : " + ] + }, + { + "file": "MPK7U4HLmIAsjdqs.js", + "wfrp4eSize": 152, + "frSize": 150, "wfrp4eTexts": [], "frTexts": [] }, { "file": "Me1wS5XdqUEy7OGt.js", "wfrp4eSize": 312, - "frSize": 335, + "frSize": 313, "wfrp4eTexts": [], - "frTexts": [ - "{this.actor.name} subit un ${crit} (localisation : ${loc}). Ne pas appliquer d" - ] + "frTexts": [] }, { "file": "MfxWXZwaZUjGSBqw.js", "wfrp4eSize": 145, - "frSize": 157, + "frSize": 156, "wfrp4eTexts": [ "Immune to Ablaze" ], "frTexts": [ - "Immunisé à En Flammes" + "Immunisé à l" ] }, - { - "file": "MfxzwJz2o9ho2hOM.js", - "wfrp4eSize": 46, - "frSize": 49, - "wfrp4eTexts": [], - "frTexts": [] - }, { "file": "MgMMoC4Umpg7fmNI.js", "wfrp4eSize": 1040, - "frSize": 1069, - "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.name} porte ${this.item.name}.
\n Il ne peut plus lancer de Sorts ni effectuer de Prières ni Miracles.
\n S", - "${this.item.name} sur ${this.actor.name} a été enlevé et à perdu ses propriétés. Cependant, les effets perdurent pendant [[1d10+4]] jours, après quoi ils devront être supprimés manuellement." - ] - }, - { - "file": "Mhb67xufvA9uWO21.js", - "wfrp4eSize": 356, - "frSize": 375, - "wfrp4eTexts": [], - "frTexts": [ - "Attaque Caudale: ${args.actor.prototypeToken.name} est désormais A Terre" - ] - }, - { - "file": "Mir4FMHQRdVqazAF.js", - "wfrp4eSize": 505, - "frSize": 529, + "frSize": 1051, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "MnqQkXVp20Lw84I1.js", - "wfrp4eSize": 331, - "frSize": 337, + "file": "Mhb67xufvA9uWO21.js", + "wfrp4eSize": 356, + "frSize": 368, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "Mir4FMHQRdVqazAF.js", + "wfrp4eSize": 505, + "frSize": 530, "wfrp4eTexts": [], "frTexts": [] }, { "file": "Msygc7oQQPB5fw0b.js", "wfrp4eSize": 633, - "frSize": 637, - "wfrp4eTexts": [], - "frTexts": [ - "Reçoit ${points.total} Point de Corruption", - "Perd ${points} Point de Corruption" - ] - }, - { - "file": "MwUzyAgd0yPnmZCH.js", - "wfrp4eSize": 242, - "frSize": 241, + "frSize": 639, "wfrp4eTexts": [], "frTexts": [] }, @@ -2152,58 +2745,37 @@ "wfrp4eTexts": [], "frTexts": [] }, - { - "file": "N7nGncsPrTz2ZbDA.js", - "wfrp4eSize": 51, - "frSize": 51, - "wfrp4eTexts": [], - "frTexts": [] - }, { "file": "N8hA6ysHCTlLd8Kj.js", "wfrp4eSize": 2107, - "frSize": 2142, + "frSize": 2131, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" ], "frTexts": [ "Impossible de trouver ${talent}", - "Impossible de trouver ${trapping}" + "Could not find ${trapping}" ] }, { - "file": "Na7Nanl9YmxZlTo7.js", - "wfrp4eSize": 56, - "frSize": 57, + "file": "NI3ZzIAlpQfVSjvf.js", + "wfrp4eSize": 255, + "frSize": 263, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "NdquQqyuOkGCj8Uo.js", - "wfrp4eSize": 485, - "frSize": 486, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "NrVFrIXM8GnIbojv.js", - "wfrp4eSize": 84, - "frSize": 86, + "file": "NkZrMO4YPiQf0N5Q.js", + "wfrp4eSize": 488, + "frSize": 493, "wfrp4eTexts": [], "frTexts": [] }, { "file": "O45vpR4jDbQQnmvJ.js", "wfrp4eSize": 477, - "frSize": 474, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "O7lXFZLrLdFaShGR.js", - "wfrp4eSize": 28, - "frSize": 28, + "frSize": 475, "wfrp4eTexts": [], "frTexts": [] }, @@ -2217,128 +2789,85 @@ { "file": "OGX4BneaYAnV25TO.js", "wfrp4eSize": 1076, - "frSize": 1041, + "frSize": 1110, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "OeKeQAAcJhdI4Qky.js", - "wfrp4eSize": 172, - "frSize": 179, - "wfrp4eTexts": [ - "Disabled!" - ], - "frTexts": [ - "Désactivé!" - ] + "file": "OYRUSP7Q0Je0jdCY.js", + "wfrp4eSize": 168, + "frSize": 169, + "wfrp4eTexts": [], + "frTexts": [] }, { "file": "OicQSEVZBbqLtrcf.js", "wfrp4eSize": 354, - "frSize": 376, + "frSize": 366, "wfrp4eTexts": [], - "frTexts": [ - "Guéri de ${choice.map(i => i.name).join(" - ] + "frTexts": [] }, { "file": "Op88kMtimSEWlY2h.js", "wfrp4eSize": 288, - "frSize": 301, + "frSize": 289, "wfrp4eTexts": [ "None left!" ], "frTexts": [ - "Aucun disponible!" + "Plus rien !" ] }, { "file": "OsLXutfXyQCAkhAf.js", "wfrp4eSize": 1207, - "frSize": 1203, + "frSize": 1212, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "OxsBnnVI3Smpknpb.js", - "wfrp4eSize": 199, - "frSize": 203, + "file": "PGHvFHBIygB5pnWT.js", + "wfrp4eSize": 143, + "frSize": 143, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "PaiSiMxCKx9IWmn1.js", + "wfrp4eSize": 158, + "frSize": 160, "wfrp4eTexts": [ - "${this.actor.name} loses 1 Advantage" + "Added Corruption" ], "frTexts": [ - "${this.actor.name} perd 1 Avantage" + "Corruption ajoutée" ] }, - { - "file": "Oz7pWF9mEc1pQypj.js", - "wfrp4eSize": 210, - "frSize": 184, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "PBW6IZtwawNHxB6y.js", - "wfrp4eSize": 49, - "frSize": 49, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "PI1QNaKFeqood6d7.js", - "wfrp4eSize": 649, - "frSize": 653, - "wfrp4eTexts": [], - "frTexts": [] - }, { "file": "PeZYj8b0vedyJj00.js", "wfrp4eSize": 574, - "frSize": 583, + "frSize": 579, "wfrp4eTexts": [], "frTexts": [] }, { "file": "Ph3TdQw1lGiFr049.js", "wfrp4eSize": 956, - "frSize": 968, + "frSize": 956, "wfrp4eTexts": [], "frTexts": [] }, { "file": "PmELrzD3RmF9qKkO.js", "wfrp4eSize": 497, - "frSize": 387, + "frSize": 504, "wfrp4eTexts": [], "frTexts": [] }, { "file": "Pn5fekTbkwlr61XU.js", "wfrp4eSize": 1216, - "frSize": 1211, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "PsO7aTdELJt35eHP.js", - "wfrp4eSize": 452, - "frSize": 400, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "PwqTmw7rsG8hzqCS.js", - "wfrp4eSize": 428, - "frSize": 430, - "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.name} subit @UUID[Compendium.${results.documentCollection}.${results.documentId}]{${results.text}}" - ] - }, - { - "file": "Q1trEhtqjIiDvFPF.js", - "wfrp4eSize": 73, - "frSize": 85, + "frSize": 1222, "wfrp4eTexts": [], "frTexts": [] }, @@ -2352,145 +2881,124 @@ { "file": "Q7eULXQ9AfDRmUGO.js", "wfrp4eSize": 1222, - "frSize": 1217, + "frSize": 1229, "wfrp4eTexts": [], "frTexts": [] }, + { + "file": "QLBxcP85duX1Z7LX.js", + "wfrp4eSize": 91, + "frSize": 90, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "QLUaOkwuSPvBp7jU.js", + "wfrp4eSize": 97, + "frSize": 110, + "wfrp4eTexts": [ + "Cannot attack targets that are not Entangled" + ], + "frTexts": [ + "Impossible d" + ] + }, { "file": "QNxmImpLTou6WdMQ.js", "wfrp4eSize": 208, - "frSize": 232, + "frSize": 222, "wfrp4eTexts": [], "frTexts": [] }, + { + "file": "QPuS9YsWAm4LUZWd.js", + "wfrp4eSize": 334, + "frSize": 347, + "wfrp4eTexts": [ + "Added modifiers to Skills: " + ], + "frTexts": [ + "Modificateurs ajoutés aux compétences : " + ] + }, { "file": "QRSACifDrvojIXHB.js", "wfrp4eSize": 299, - "frSize": 303, + "frSize": 294, "wfrp4eTexts": [ "No Conditions on this Actor" ], "frTexts": [ - "Aucun état sur cet Acteur" + "Aucun état sur cet acteur" ] }, { "file": "Qgn92fZyc3Psn8QJ.js", "wfrp4eSize": 572, - "frSize": 521, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "Qk7t2l5ep9RDVpgE.js", - "wfrp4eSize": 27, - "frSize": 27, + "frSize": 576, "wfrp4eTexts": [], "frTexts": [] }, { "file": "QoEOxRruQXYrZrv3.js", "wfrp4eSize": 403, - "frSize": 399, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "QqybHxNCzPEzG1Qh.js", - "wfrp4eSize": 36, - "frSize": 64, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "QwHoqu2oO8QO8Mad.js", - "wfrp4eSize": 187, - "frSize": 213, + "frSize": 418, "wfrp4eTexts": [], "frTexts": [] }, { "file": "R32U01LBjBrK1pns.js", "wfrp4eSize": 1504, - "frSize": 1505, + "frSize": 1518, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "R6SnyF3y4Vsq6oga.js", - "wfrp4eSize": 394, - "frSize": 447, + "file": "R3OfRdi6xv0e9mzB.js", + "wfrp4eSize": 40, + "frSize": 38, "wfrp4eTexts": [], "frTexts": [] }, { "file": "R8FBHZaaARA3z9pB.js", "wfrp4eSize": 1217, - "frSize": 1212, + "frSize": 1224, "wfrp4eTexts": [], "frTexts": [] }, { "file": "R8ecKGRzOr4ThvVa.js", "wfrp4eSize": 1214, - "frSize": 1209, + "frSize": 1218, "wfrp4eTexts": [], "frTexts": [] }, { "file": "RKIFGN583PQnqHGk.js", - "wfrp4eSize": 181, - "frSize": 188, + "wfrp4eSize": 153, + "frSize": 153, "wfrp4eTexts": [], - "frTexts": [ - "Ajout de 2 état Hémorragiques" - ] - }, - { - "file": "ROXCqAFSTLouJniL.js", - "wfrp4eSize": 238, - "frSize": 244, - "wfrp4eTexts": [], - "frTexts": [ - "${this.item.name} Surcharge!" - ] + "frTexts": [] }, { "file": "RPqgRUkiLY5thVbC.js", "wfrp4eSize": 1211, - "frSize": 1206, + "frSize": 1215, "wfrp4eTexts": [], "frTexts": [] }, { "file": "RSsGiDFibuqg3sHr.js", "wfrp4eSize": 377, - "frSize": 383, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "RlhOAKfN0ghrrooR.js", - "wfrp4eSize": 283, - "frSize": 289, - "wfrp4eTexts": [ - "Holed Ratings of ${this.actor.name} have been doubled." - ], - "frTexts": [ - "Holed Ratings of ${this.actor.name} have been doubled." - ] - }, - { - "file": "Rnpw6UQdJifLeuna.js", - "wfrp4eSize": 63, - "frSize": 72, + "frSize": 380, "wfrp4eTexts": [], "frTexts": [] }, { "file": "RvipIYj9H7n4UDMe.js", "wfrp4eSize": 1658, - "frSize": 1672, + "frSize": 1683, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -2503,114 +3011,124 @@ { "file": "RwMw848y13Jq2L4f.js", "wfrp4eSize": 646, - "frSize": 651, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "S1QihXuvdEVzeRtB.js", - "wfrp4eSize": 923, - "frSize": 936, + "frSize": 647, "wfrp4eTexts": [], "frTexts": [] }, { "file": "S3Dev4hleOYqDNe9.js", "wfrp4eSize": 705, - "frSize": 713, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "S4793DLFhjMxpM8x.js", - "wfrp4eSize": 106, - "frSize": 106, + "frSize": 705, "wfrp4eTexts": [], "frTexts": [] }, { "file": "SGr50Hq1AHIEzIFN.js", "wfrp4eSize": 286, - "frSize": 295, + "frSize": 292, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "SLy1Fs3oXcHgFgjK.js", - "wfrp4eSize": 335, - "frSize": 321, + "file": "SKn61f2ykhzuwMdw.js", + "wfrp4eSize": 290, + "frSize": 287, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "SWIJjM2RCmzfr64u.js", - "wfrp4eSize": 255, - "frSize": 254, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "StAderQaQQsxb6Rv.js", - "wfrp4eSize": 316, - "frSize": 322, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "T5fiTzhXEQAv9Drf.js", - "wfrp4eSize": 590, - "frSize": 594, + "file": "SThruXFhxUdNKCG4.js", + "wfrp4eSize": 343, + "frSize": 329, "wfrp4eTexts": [ - "Dropped ${dropped.map(i => i.name).join(" + "${this.actor.name} failed the Intelligence Test and gained Stunned Condition!" ], "frTexts": [ - "Laché ${dropped.map(i => i.name).join(" + "${this.actor.name} échou au test d" + ] + }, + { + "file": "SlrslcNdnYONcSH3.js", + "wfrp4eSize": 424, + "frSize": 424, + "wfrp4eTexts": [ + "No weapons equipped!", + "Not enough Fortune!" + ], + "frTexts": [ + "Aucune arme équipée!", + "Pas assez de Chance!" + ] + }, + { + "file": "T0KBl8iEkcPq08RI.js", + "wfrp4eSize": 246, + "frSize": 250, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "T4JEEDYCEIUbVHv4.js", + "wfrp4eSize": 381, + "frSize": 401, + "wfrp4eTexts": [ + "Fatigued added to " + ], + "frTexts": [ + "Etat Extenué ajouté à " ] }, { "file": "TAw9vXnfyIAl5DGs.js", "wfrp4eSize": 376, - "frSize": 386, + "frSize": 377, "wfrp4eTexts": [ "None left!" ], "frTexts": [ - "Quantité insuffisante!" + "Plus rien !" ] }, { "file": "TBpNFRL5uehs0fze.js", "wfrp4eSize": 269, - "frSize": 287, + "frSize": 270, "wfrp4eTexts": [ "None left!" ], "frTexts": [ - "Quantité insuffisante!" + "Plus rien !" ] }, { "file": "TCtXPvDpbfz1yrVZ.js", "wfrp4eSize": 1952, - "frSize": 1912, + "frSize": 1996, "wfrp4eTexts": [ "Could not find ${talent}" ], "frTexts": [ - "Impossible de trouver ${talent}" + "Impossible de trouver ${c.name}" ] }, { - "file": "TGN070HeJLl3gSMY.js", - "wfrp4eSize": 229, - "frSize": 226, + "file": "TKjBb75exjae87fa.js", + "wfrp4eSize": 93, + "frSize": 101, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "TpgK2aAe93ui3Rbs.js", + "wfrp4eSize": 238, + "frSize": 232, "wfrp4eTexts": [], "frTexts": [] }, { "file": "TwgdEucxcHloc4cX.js", "wfrp4eSize": 2626, - "frSize": 2724, + "frSize": 2685, "wfrp4eTexts": [ "Could not find ${c.name}" ], @@ -2618,102 +3136,79 @@ "Impossible de trouver ${c.name}" ] }, - { - "file": "TxfmxDGBj04AQQpt.js", - "wfrp4eSize": 321, - "frSize": 316, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "U1RUcgP8LD2qeGTm.js", - "wfrp4eSize": 27, - "frSize": 27, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "U1UpSRJOSjPpO4HS.js", - "wfrp4eSize": 319, - "frSize": 290, - "wfrp4eTexts": [ - "Added ${mutations[roll].name}" - ], - "frTexts": [ - "Ajout ${mutations[roll].name}" - ] - }, { "file": "U26XMie3Kjoddisj.js", "wfrp4eSize": 227, - "frSize": 236, + "frSize": 235, "wfrp4eTexts": [ "Cleared 1 Stunned Condition", "No Stunned Conditions" ], "frTexts": [ - "Suppression de 1 état Assomé", - "Aucun état Assomé" + "Suppression d", + "Aucune état Sonné à supprimer" ] }, { "file": "UDPsaymtZf39UsMk.js", "wfrp4eSize": 410, - "frSize": 247, + "frSize": 433, "wfrp4eTexts": [ "Fatigued added to " ], "frTexts": [ - "Fatigue ajouté à " + "Etat Extenué ajouté à " ] }, { - "file": "UH5MIzqi2MvEqTwj.js", - "wfrp4eSize": 268, - "frSize": 242, - "wfrp4eTexts": [], - "frTexts": [] + "file": "UINefUJZN0GjcCbB.js", + "wfrp4eSize": 113, + "frSize": 126, + "wfrp4eTexts": [ + "Cannot cast spells!" + ], + "frTexts": [ + "Impossible de lancer des sorts !" + ] }, { "file": "ULmZMLezDamerN04.js", "wfrp4eSize": 864, - "frSize": 852, + "frSize": 881, "wfrp4eTexts": [], "frTexts": [] }, { "file": "UQtXuQmUlTyDKqhe.js", "wfrp4eSize": 4069, - "frSize": 4096, + "frSize": 4117, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" ], "frTexts": [ - "Impossible de trouver ${talent}", - "Impossible de trouver ${trapping}" - ] - }, - { - "file": "UgQW0UMPOZ0jwfVJ.js", - "wfrp4eSize": 235, - "frSize": 250, - "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.prototypeToken.name} voit ses Points de Chance augmenter de ${current} à ${1 + current}" + "Could not find ${talent}", + "Could not find ${trapping}" ] }, { "file": "UlRSaZG4ZUU6fMND.js", "wfrp4eSize": 1224, - "frSize": 1219, + "frSize": 1231, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "UlygtNPSDlWPIFCI.js", + "wfrp4eSize": 69, + "frSize": 23, "wfrp4eTexts": [], "frTexts": [] }, { "file": "UnqnWi0dZYLf5fTT.js", "wfrp4eSize": 2626, - "frSize": 2535, + "frSize": 2684, "wfrp4eTexts": [ "Could not find ${c.name}" ], @@ -2722,47 +3217,47 @@ ] }, { - "file": "UsuwsmU1TUQLQVM2.js", - "wfrp4eSize": 173, - "frSize": 290, + "file": "V0b4yLTawjCnm9ke.js", + "wfrp4eSize": 196, + "frSize": 195, "wfrp4eTexts": [], "frTexts": [] }, { "file": "V1D2Uo3WDKYQePU3.js", "wfrp4eSize": 614, - "frSize": 627, + "frSize": 617, "wfrp4eTexts": [], "frTexts": [] }, { "file": "V9wD9FWHWxZUOGSI.js", "wfrp4eSize": 489, - "frSize": 502, + "frSize": 494, "wfrp4eTexts": [ "Fell Unconscious", "Gained ${fatigued} conditions" ], "frTexts": [ - "Tombe Incoscient", - "Subit ${fatigued} état Fatigué" + "Tombe inconscient", + "Reçoit ${fatigued} états Extenué" ] }, { "file": "V9xm4X1x3lPYTQaI.js", "wfrp4eSize": 147, - "frSize": 157, + "frSize": 152, "wfrp4eTexts": [ "Immune to Fear" ], "frTexts": [ - "Immunisé à la Peur" + "Immunisté à la Peur" ] }, { "file": "V9zm2hKUVLVZtAcN.js", "wfrp4eSize": 3124, - "frSize": 3154, + "frSize": 3146, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trait}", @@ -2770,66 +3265,77 @@ "Could not find ${spell}" ], "frTexts": [ - "Impossible de trouver ${talent}", - "Impossible de trouver ${trait}", - "Impossible de trouver ${trapping}", - "Impossible de trouver ${spell}" + "Introuvable : ${talent}", + "Introuvable : ${trait}", + "Introuvable : ${trapping}", + "Introuvable : ${spell}" ] }, - { - "file": "VAPsww9x3HAw1sKP.js", - "wfrp4eSize": 26, - "frSize": 26, - "wfrp4eTexts": [], - "frTexts": [] - }, { "file": "VINX6TBAJQznhVcN.js", "wfrp4eSize": 1242, - "frSize": 1239, + "frSize": 1276, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "VLdF2HPnCrNIgp7a.js", - "wfrp4eSize": 463, - "frSize": 461, + "file": "VOc9sKag2Vy4vGGZ.js", + "wfrp4eSize": 2202, + "frSize": 2219, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "VzgTGb5QXKoyPNh3.js", - "wfrp4eSize": 651, - "frSize": 655, + "file": "VXERNoc5IazQGuGO.js", + "wfrp4eSize": 394, + "frSize": 403, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "VYw9ipwoHArGVnyW.js", + "wfrp4eSize": 397, + "frSize": 398, + "wfrp4eTexts": [ + "Frenzied!" + ], + "frTexts": [ + "Frénésie !" + ] + }, + { + "file": "VcE8Hie2jbpuyuM3.js", + "wfrp4eSize": 904, + "frSize": 926, "wfrp4eTexts": [], "frTexts": [] }, { "file": "W9nyUNQStMr1pUHJ.js", - "wfrp4eSize": 169, - "frSize": 184, + "wfrp4eSize": 141, + "frSize": 151, "wfrp4eTexts": [ "Added Bleeding" ], "frTexts": [ - "Ajout de Hémorragique" + "Etat Hémorragique ajouté" ] }, { "file": "WB6sIpLEPC8YPX67.js", "wfrp4eSize": 153, - "frSize": 167, + "frSize": 162, "wfrp4eTexts": [ "Cannot Dodge!" ], "frTexts": [ - "Ne peut pas esquiver!" + "Impossible d" ] }, { "file": "WO5n7Vbx8AgoVrwC.js", "wfrp4eSize": 1755, - "frSize": 1769, + "frSize": 1788, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -2842,78 +3348,53 @@ { "file": "WR0Kqn8CF5iwToak.js", "wfrp4eSize": 1219, - "frSize": 1214, + "frSize": 1223, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "WiYtNU2Y5BJfIpeM.js", - "wfrp4eSize": 341, - "frSize": 345, - "wfrp4eTexts": [ - "Dropped ${dropped.map(i => i.name).join(" - ], - "frTexts": [ - "Lache ${dropped.map(i => i.name).join(" - ] - }, - { - "file": "Wo4wQKUxSItAhRzZ.js", - "wfrp4eSize": 394, + "file": "WaeL2I8VVJmBBKHk.js", + "wfrp4eSize": 433, "frSize": 447, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "X3vpmNUj9SL2CDnF.js", - "wfrp4eSize": 118, - "frSize": 120, + "file": "Wh1VV3javfzcV3bP.js", + "wfrp4eSize": 562, + "frSize": 537, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "XO9m2AvFRAAeEuty.js", - "wfrp4eSize": 225, - "frSize": 223, + "file": "WsN2R1qOzuLa2qyB.js", + "wfrp4eSize": 2203, + "frSize": 2220, "wfrp4eTexts": [], "frTexts": [] }, { "file": "XcvDYNZgJ2rpAdDV.js", "wfrp4eSize": 410, - "frSize": 252, + "frSize": 429, "wfrp4eTexts": [ "Fatigued added to " ], "frTexts": [ - "Etat Fatigué ajouté à " + "Etat Extenué ajouté à " ] }, { "file": "Xe8ijqWU3bbtq7ZY.js", - "wfrp4eSize": 176, - "frSize": 180, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "Xk9XPklxxTvFlwpI.js", - "wfrp4eSize": 41, - "frSize": 41, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "Y7McxsHFeGhwQx0J.js", - "wfrp4eSize": 359, - "frSize": 345, + "wfrp4eSize": 177, + "frSize": 176, "wfrp4eTexts": [], "frTexts": [] }, { "file": "Y8J66v8VTKUASGuK.js", "wfrp4eSize": 477, - "frSize": 481, + "frSize": 472, "wfrp4eTexts": [ "No Conditions on this Actor" ], @@ -2921,88 +3402,100 @@ "Aucun état sur cet acteur" ] }, - { - "file": "YHEIkBKWXKNPqglh.js", - "wfrp4eSize": 141, - "frSize": 133, - "wfrp4eTexts": [], - "frTexts": [] - }, { "file": "YJX7WnxzXXIVdH6P.js", "wfrp4eSize": 986, - "frSize": 954, + "frSize": 1008, "wfrp4eTexts": [], "frTexts": [] }, { "file": "YN8719gme9AxYtyY.js", "wfrp4eSize": 3213, - "frSize": 3230, + "frSize": 3279, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" ], "frTexts": [ - "Impossible de trouver ${talent}", - "Impossible de trouver ${trapping}" + "Could not find ${talent}", + "Could not find ${trapping}" ] }, { "file": "YQ2LnLxp0xgy3meI.js", "wfrp4eSize": 156, - "frSize": 153, + "frSize": 161, "wfrp4eTexts": [], "frTexts": [] }, { "file": "YRUTliBzAQvncGNX.js", "wfrp4eSize": 79, - "frSize": 87, + "frSize": 84, "wfrp4eTexts": [ "Added Fatigued" ], "frTexts": [ - "Ajout de Fatigué" + "Etat Exténué ajouté" ] }, { "file": "YaKnYEbmmZZtByJc.js", - "wfrp4eSize": 180, - "frSize": 187, + "wfrp4eSize": 181, + "frSize": 180, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "YjJcRdytVRm88qLn.js", - "wfrp4eSize": 33, - "frSize": 33, - "wfrp4eTexts": [], - "frTexts": [] + "file": "YdiQFkm8j48Xs7gI.js", + "wfrp4eSize": 391, + "frSize": 390, + "wfrp4eTexts": [ + "${args.test.targets[0].name} has been infected by Brain Rot" + ], + "frTexts": [ + "${args.test.targets[0].name} has been infected by Brain Rot" + ] }, { - "file": "YwLEw4BiKq4EMy57.js", - "wfrp4eSize": 580, - "frSize": 592, - "wfrp4eTexts": [], - "frTexts": [] + "file": "YrXhk2YJaWSChMhp.js", + "wfrp4eSize": 1087, + "frSize": 1101, + "wfrp4eTexts": [ + "${this.actor.name} now has Melee (Brawling) 55 and Weapon (Fists) +9" + ], + "frTexts": [ + "${this.actor.name} now has Melee (Brawling) 55 and Weapon (Fists) +9" + ] + }, + { + "file": "YsUdMhQ2AArcJIqy.js", + "wfrp4eSize": 1341, + "frSize": 1347, + "wfrp4eTexts": [ + "Could not find ${c}" + ], + "frTexts": [ + "Impossible de trouver ${c}" + ] }, { "file": "YySjPfSAPdMAfjsh.js", "wfrp4eSize": 423, - "frSize": 416, + "frSize": 417, "wfrp4eTexts": [], "frTexts": [] }, { "file": "Z52yZDm6lP6fOP3O.js", "wfrp4eSize": 132, - "frSize": 143, + "frSize": 131, "wfrp4eTexts": [ "Immune to Ablaze" ], "frTexts": [ - "Immunisé à En Flammes" + "Immunisé au feu" ] }, { @@ -3010,121 +3503,65 @@ "wfrp4eSize": 599, "frSize": 600, "wfrp4eTexts": [], - "frTexts": [ - "Choisir @UUID[${choice[0].uuid}]{${choice[0].name}}" - ] + "frTexts": [] }, { "file": "ZCBcwbVFHFTFRntb.js", "wfrp4eSize": 1217, - "frSize": 1212, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "ZCkYe5XMVY1RWMXG.js", - "wfrp4eSize": 32, - "frSize": 32, + "frSize": 1221, "wfrp4eTexts": [], "frTexts": [] }, { "file": "ZCuOjLAeENKN1Q4L.js", - "wfrp4eSize": 455, - "frSize": 420, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "ZEXhYJqqxF6QAixX.js", - "wfrp4eSize": 75, - "frSize": 75, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "ZNu4B0OdjkM9lmtu.js", - "wfrp4eSize": 221, - "frSize": 218, + "wfrp4eSize": 417, + "frSize": 451, "wfrp4eTexts": [], "frTexts": [] }, { "file": "ZRoG7GiMDQWso6gN.js", "wfrp4eSize": 1222, - "frSize": 1217, + "frSize": 1226, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "ZTE8LdRblyG4yYoE.js", - "wfrp4eSize": 266, - "frSize": 268, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "ZdHvGvSJBsIuPphF.js", - "wfrp4eSize": 70, - "frSize": 66, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "ZqTW093qENOwGONP.js", - "wfrp4eSize": 263, - "frSize": 269, + "file": "ZYsMgB4BwXBJcpYf.js", + "wfrp4eSize": 134, + "frSize": 134, "wfrp4eTexts": [], "frTexts": [] }, { "file": "a02tlRCXpaoaDjSN.js", "wfrp4eSize": 604, - "frSize": 568, + "frSize": 616, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "a7pEvCycVnFBXGAQ.js", - "wfrp4eSize": 228, - "frSize": 215, - "wfrp4eTexts": [], - "frTexts": [] + "file": "a4Q7RJpW0sqvfATw.js", + "wfrp4eSize": 381, + "frSize": 394, + "wfrp4eTexts": [ + "Fatigued added to " + ], + "frTexts": [ + "Exténué ajouté à " + ] }, { "file": "a8i0sA1RBnD8nHZt.js", "wfrp4eSize": 1398, - "frSize": 1394, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "aCVtaW8ag1WibcAr.js", - "wfrp4eSize": 124, - "frSize": 133, - "wfrp4eTexts": [], - "frTexts": [ - "${args.attacker.prototypeToken.name} récupère 1 Blessure." - ] - }, - { - "file": "aIYUsBIDKWJ3CEtj.js", - "wfrp4eSize": 80, - "frSize": 86, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "abLWYtNTu1UVDQAs.js", - "wfrp4eSize": 264, - "frSize": 268, + "frSize": 1400, "wfrp4eTexts": [], "frTexts": [] }, { "file": "aeBetniKqq5SD9Ou.js", "wfrp4eSize": 2685, - "frSize": 2700, + "frSize": 2696, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -3137,7 +3574,7 @@ { "file": "b2Kb4IuD22RhKhR0.js", "wfrp4eSize": 216, - "frSize": 225, + "frSize": 219, "wfrp4eTexts": [ "No target!" ], @@ -3145,60 +3582,77 @@ "Aucune cible!" ] }, - { - "file": "b2WaqRna5CFXmbDG.js", - "wfrp4eSize": 25, - "frSize": 25, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "b5DfAWtpV1x2R8If.js", - "wfrp4eSize": 113, - "frSize": 119, - "wfrp4eTexts": [], - "frTexts": [] - }, { "file": "bEVlJOOA1kLlzpWx.js", "wfrp4eSize": 2274, - "frSize": 2326, + "frSize": 2315, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" ], "frTexts": [ "Impossible de trouver ${talent}", - "Impossible de trouver ${trapping}" + "Could not find ${trapping}" ] }, { "file": "bLkt8VpTTPoTxW0W.js", - "wfrp4eSize": 174, - "frSize": 184, + "wfrp4eSize": 146, + "frSize": 156, "wfrp4eTexts": [ "Added Bleeding" ], "frTexts": [ - "Ajout d" + "Etat Hémorragique ajouté" ] }, { "file": "bMEFHPCei2evnZZw.js", "wfrp4eSize": 565, - "frSize": 566, + "frSize": 567, "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "bNhpJPWwoHLq68zD.js", + "wfrp4eSize": 1549, + "frSize": 1635, + "wfrp4eTexts": [ + "Skipping Tests to apply the tattoos", + "No Lore (Theology) skill found, cannot pass.", + "No Lore (Runes) skill found, cannot pass." + ], "frTexts": [ - "\n ${this.effect.name}:
\n ${args.actor.name} reçoit un état @Condition[Empoisonné], qui peut être résisté avec un Test de Résistance Difficile (-10)." + "Tests ignorés pour appliquer les tatouages", + "Compétence Savoir (Théologie) introuvable, impossible de continuer.", + "Compétence Savoir (Runes) introuvable, impossible de continuer." ] }, { - "file": "bQyVajMN1ETwlzvM.js", - "wfrp4eSize": 358, - "frSize": 364, + "file": "bRiFHPC1StKxqNIC.js", + "wfrp4eSize": 248, + "frSize": 264, "wfrp4eTexts": [], "frTexts": [] }, + { + "file": "bT4gLrE3W36DIP4k.js", + "wfrp4eSize": 257, + "frSize": 264, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "bgLeMqihLya2iobP.js", + "wfrp4eSize": 216, + "frSize": 233, + "wfrp4eTexts": [ + "Can only be applied to River Troll." + ], + "frTexts": [ + "Peut seulement être appliqué à un Troll des Rivières." + ] + }, { "file": "btPrQkGRKUkhNe3N.js", "wfrp4eSize": 47, @@ -3207,80 +3661,72 @@ "frTexts": [] }, { - "file": "cK1Jysfu5IMUUH0C.js", - "wfrp4eSize": 321, - "frSize": 334, - "wfrp4eTexts": [], - "frTexts": [ - "Protection améliorée de " - ] - }, - { - "file": "chUpiI3el8IO8MSs.js", - "wfrp4eSize": 261, - "frSize": 276, - "wfrp4eTexts": [], - "frTexts": [ - "Récupère ${woundsGained} Blessures" - ] - }, - { - "file": "dIxYt421K010eogY.js", - "wfrp4eSize": 333, - "frSize": 331, + "file": "c9xxdOCaQSwooK8n.js", + "wfrp4eSize": 144, + "frSize": 149, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "dM449AU0FQRnOc3l.js", - "wfrp4eSize": 90, - "frSize": 89, + "file": "cAioHYtlxuOCwRLh.js", + "wfrp4eSize": 93, + "frSize": 106, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "cJFDnq1HI4gXWcJo.js", + "wfrp4eSize": 254, + "frSize": 268, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "cK1Jysfu5IMUUH0C.js", + "wfrp4eSize": 321, + "frSize": 327, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "cUnbADgOQ4fMKgrH.js", + "wfrp4eSize": 642, + "frSize": 650, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "ch5SD2XOQfcYo0X5.js", + "wfrp4eSize": 473, + "frSize": 516, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "chUpiI3el8IO8MSs.js", + "wfrp4eSize": 242, + "frSize": 248, "wfrp4eTexts": [], "frTexts": [] }, { "file": "dWr3tkFoIzsAgelu.js", "wfrp4eSize": 594, - "frSize": 647, + "frSize": 595, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "dbOSvpgcPjsc2uvq.js", - "wfrp4eSize": 391, - "frSize": 386, + "file": "e3dBud1keWyhw6nw.js", + "wfrp4eSize": 232, + "frSize": 234, "wfrp4eTexts": [], "frTexts": [] }, - { - "file": "dcwY8dCd3PNCEzk6.js", - "wfrp4eSize": 226, - "frSize": 243, - "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.prototypeToken.name} voit ses Points de Destin augmentés de ${current} à ${current + 1}" - ] - }, - { - "file": "e34s1XxHckAWfwHt.js", - "wfrp4eSize": 281, - "frSize": 281, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "e7IxnxePdXSy6L4E.js", - "wfrp4eSize": 199, - "frSize": 209, - "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.prototypeToken.name} subit une @Table[crithead]{Blessure Critique} si il n" - ] - }, { "file": "ePPgxQOqL1Uhz2k9.js", "wfrp4eSize": 1649, - "frSize": 1906, + "frSize": 1674, "wfrp4eTexts": [ "Could not find ${talent}" ], @@ -3289,16 +3735,16 @@ ] }, { - "file": "ebDQH0MdGAG02CHl.js", - "wfrp4eSize": 470, - "frSize": 473, + "file": "eRVVn8YtU8nnOW2q.js", + "wfrp4eSize": 474, + "frSize": 474, "wfrp4eTexts": [], "frTexts": [] }, { "file": "ed7Sud9HM3uB2j6b.js", "wfrp4eSize": 523, - "frSize": 534, + "frSize": 525, "wfrp4eTexts": [ "Adding " ], @@ -3308,8 +3754,8 @@ }, { "file": "egDtqMxe3iekc6hv.js", - "wfrp4eSize": 240, - "frSize": 243, + "wfrp4eSize": 221, + "frSize": 224, "wfrp4eTexts": [], "frTexts": [] }, @@ -3320,10 +3766,17 @@ "wfrp4eTexts": [], "frTexts": [] }, + { + "file": "eieFcF4BxIvDTN3C.js", + "wfrp4eSize": 72, + "frSize": 77, + "wfrp4eTexts": [], + "frTexts": [] + }, { "file": "ekjJQHyMbZT2vqdc.js", "wfrp4eSize": 268, - "frSize": 291, + "frSize": 270, "wfrp4eTexts": [ "Used ${uses} times", "Used up" @@ -3333,135 +3786,150 @@ "Utilisé" ] }, + { + "file": "eq32dKXeTAbKhhLf.js", + "wfrp4eSize": 124, + "frSize": 137, + "wfrp4eTexts": [], + "frTexts": [] + }, { "file": "eqxE7nBO13yJS7hc.js", "wfrp4eSize": 206, - "frSize": 212, + "frSize": 211, "wfrp4eTexts": [], "frTexts": [] }, { "file": "ezGqDoC9hNRBnFTB.js", - "wfrp4eSize": 359, - "frSize": 363, + "wfrp4eSize": 375, + "frSize": 360, "wfrp4eTexts": [], "frTexts": [] }, { "file": "f29Pv6TQtgILxt1h.js", "wfrp4eSize": 767, - "frSize": 768, + "frSize": 765, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "f4vvAGQ8OGoEbrgy.js", + "wfrp4eSize": 478, + "frSize": 485, "wfrp4eTexts": [], "frTexts": [] }, { "file": "fEFfHFeJxkR0aIJK.js", - "wfrp4eSize": 366, - "frSize": 430, - "wfrp4eTexts": [], - "frTexts": [ - "Tous ceux dans un rayon de 7 mètres perde 1 Point de Blessure et doivent faire un Test de Résistance Difficile (-10) ou recevoir l" - ] - }, - { - "file": "fPKYkBllp7Et62lX.js", - "wfrp4eSize": 114, - "frSize": 90, + "wfrp4eSize": 369, + "frSize": 404, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "fcY3pa72dELnOFXV.js", - "wfrp4eSize": 28, - "frSize": 28, + "file": "fSDFCHAo97RLpwGU.js", + "wfrp4eSize": 468, + "frSize": 471, "wfrp4eTexts": [], "frTexts": [] }, { "file": "feMPZhhFeXRtKdKY.js", "wfrp4eSize": 274, - "frSize": 284, + "frSize": 275, "wfrp4eTexts": [ "None left!" ], "frTexts": [ - "Aucun restant!" + "Plus rien !" ] }, { - "file": "fiF9sM5UpcHMYa33.js", - "wfrp4eSize": 295, - "frSize": 295, - "wfrp4eTexts": [], - "frTexts": [] + "file": "fq2fqlWlrVfitkcB.js", + "wfrp4eSize": 1175, + "frSize": 1197, + "wfrp4eTexts": [ + "Could not find ${trait.name}" + ], + "frTexts": [ + ": -200\n}\nlet traits = [ {name:" + ] }, { "file": "ft0LaRWZT5WtnptP.js", "wfrp4eSize": 355, - "frSize": 366, + "frSize": 344, "wfrp4eTexts": [ "Advantage Subtracted", "Not enough Advantage!" ], "frTexts": [ - "Avantage soustrait", - "Pas assez d" + "Avantage retiré", + "Avantage retiré" ] }, { - "file": "fzTB7t3x4bLmAXji.js", - "wfrp4eSize": 231, - "frSize": 242, - "wfrp4eTexts": [ - "Healed ${roll.total} Wounds" - ], - "frTexts": [ - "Soins de ${roll.total} Blessures" - ] - }, - { - "file": "g1L8OYO9nCOhdKGL.js", - "wfrp4eSize": 533, - "frSize": 539, + "file": "fyjYWg7ekj8JJcmq.js", + "wfrp4eSize": 178, + "frSize": 175, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "gKIPujyuFSn0No9v.js", - "wfrp4eSize": 117, - "frSize": 138, - "wfrp4eTexts": [ - "Reset Powers" - ], - "frTexts": [ - "Ré-initialiser les pouvoirs" - ] + "file": "g0SzfsLyW7aD2F19.js", + "wfrp4eSize": 776, + "frSize": 785, + "wfrp4eTexts": [], + "frTexts": [] }, { - "file": "gPQrszvIgGlW9yM4.js", - "wfrp4eSize": 103, - "frSize": 79, + "file": "g4t56A09yrpZaJQ2.js", + "wfrp4eSize": 886, + "frSize": 890, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "gMIenSmLklAkB2Zm.js", + "wfrp4eSize": 314, + "frSize": 318, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "gh2KS1prBKcsSK6M.js", + "wfrp4eSize": 88, + "frSize": 87, "wfrp4eTexts": [], "frTexts": [] }, { "file": "goz8yTlMozlsz3uY.js", "wfrp4eSize": 1201, - "frSize": 1196, + "frSize": 1205, "wfrp4eTexts": [], "frTexts": [] }, { "file": "groEX1wJ9l00PkDF.js", "wfrp4eSize": 2361, - "frSize": 2371, + "frSize": 2376, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "gull3qgCahzk2xYu.js", + "wfrp4eSize": 286, + "frSize": 287, "wfrp4eTexts": [], "frTexts": [] }, { "file": "h766UvswLCsxcMow.js", "wfrp4eSize": 3017, - "frSize": 3045, + "frSize": 3029, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trait}", @@ -3471,55 +3939,53 @@ "frTexts": [ "Impossible de trouver ${talent}", "Impossible de trouver ${trait}", - "Impossible de trouver ${trapping}", - "Impossible de trouver ${spell}" + "Could not find ${trapping}", + "Could not find ${spell}" ] }, { "file": "hA8PzeiCsHqqlUZm.js", "wfrp4eSize": 215, - "frSize": 226, + "frSize": 225, "wfrp4eTexts": [], - "frTexts": [ - "Gaine de @Condition[Nausée] pour [[1d10]] heures" - ] + "frTexts": [] }, { - "file": "hCzxUyO6mjLNIpaM.js", - "wfrp4eSize": 284, - "frSize": 303, + "file": "hL3JUSY3xMA4zj2Q.js", + "wfrp4eSize": 391, + "frSize": 405, "wfrp4eTexts": [], - "frTexts": [ - "Récupération de ${woundsGained} Blessures" - ] + "frTexts": [] }, { "file": "hSImyYjL0CENTvXf.js", "wfrp4eSize": 646, - "frSize": 651, + "frSize": 648, "wfrp4eTexts": [], "frTexts": [] }, { "file": "hYNWp75ggWSTht55.js", "wfrp4eSize": 238, - "frSize": 267, - "wfrp4eTexts": [], - "frTexts": [ - "Peut effectuer un jet sur the @Table[crithead]{Coups Critiques à la Tête} au lieu de la localisation normale" - ] - }, - { - "file": "hhCs5VBKx50S5IsY.js", - "wfrp4eSize": 27, - "frSize": 27, + "frSize": 262, "wfrp4eTexts": [], "frTexts": [] }, + { + "file": "hfFGFWEKFZXtMKWo.js", + "wfrp4eSize": 326, + "frSize": 328, + "wfrp4eTexts": [ + "Added Corruption" + ], + "frTexts": [ + "Corruption ajoutée" + ] + }, { "file": "hhv7PrRdlf9sfC82.js", "wfrp4eSize": 1749, - "frSize": 1766, + "frSize": 1767, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -3530,23 +3996,16 @@ ] }, { - "file": "hlHKeFWrOA8CsLr9.js", - "wfrp4eSize": 80, - "frSize": 55, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "hmk8zV1LTElHUI8A.js", - "wfrp4eSize": 304, - "frSize": 313, + "file": "hpbraeEbjkXnmD75.js", + "wfrp4eSize": 176, + "frSize": 60, "wfrp4eTexts": [], "frTexts": [] }, { "file": "hpwJRAhCsXTp9bd9.js", "wfrp4eSize": 2554, - "frSize": 2426, + "frSize": 2628, "wfrp4eTexts": [ "Could not find ${talent}" ], @@ -3555,91 +4014,64 @@ ] }, { - "file": "hwOZxgt7e65iWvYz.js", - "wfrp4eSize": 354, - "frSize": 360, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "hxmwtw5zAHyS2upG.js", - "wfrp4eSize": 78, - "frSize": 84, + "file": "hqMwzPozAVTzoCxa.js", + "wfrp4eSize": 279, + "frSize": 276, "wfrp4eTexts": [], "frTexts": [] }, { "file": "i5AN97A7IOeygEFA.js", "wfrp4eSize": 395, - "frSize": 413, + "frSize": 404, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "iAo3wxMLA64rsKjj.js", - "wfrp4eSize": 74, - "frSize": 80, + "file": "iH9o7t8vGDn6pm1d.js", + "wfrp4eSize": 373, + "frSize": 370, "wfrp4eTexts": [], "frTexts": [] }, - { - "file": "iLpq4yCFN6YACrYA.js", - "wfrp4eSize": 131, - "frSize": 137, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "iMu8BZ7eHMAbPEO1.js", - "wfrp4eSize": 152, - "frSize": 166, - "wfrp4eTexts": [], - "frTexts": [ - "this.actor.prototypeToken.name Guérison de ${healed} Blessures" - ] - }, { "file": "iNAQJa5HyaEckknX.js", "wfrp4eSize": 596, - "frSize": 602, - "wfrp4eTexts": [], - "frTexts": [ - "Ne se rappelle plus du sort ${chosen.name}" - ] - }, - { - "file": "iO2hCDwyQ7v4qrOI.js", - "wfrp4eSize": 684, - "frSize": 682, + "frSize": 594, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "iX0ctHYHg12pjaCU.js", - "wfrp4eSize": 672, - "frSize": 664, + "file": "iO2hCDwyQ7v4qrOI.js", + "wfrp4eSize": 684, + "frSize": 677, "wfrp4eTexts": [], "frTexts": [] }, { "file": "id9ZdkERMZnZTWXt.js", "wfrp4eSize": 222, - "frSize": 232, + "frSize": 227, "wfrp4eTexts": [ "Immune to Fear" ], "frTexts": [ - "Immunisé à la Peur" + "Immunisté à la Peur" ] }, + { + "file": "idiZBzbALb5fXIbz.js", + "wfrp4eSize": 212, + "frSize": 213, + "wfrp4eTexts": [], + "frTexts": [] + }, { "file": "imKVsCy8rya2gkwO.js", "wfrp4eSize": 935, - "frSize": 937, + "frSize": 921, "wfrp4eTexts": [], - "frTexts": [ - "

${this.actor.prototypeToken.name} ne souffre des pénalités dues à l" - ] + "frTexts": [] }, { "file": "inPxRSx0CDj1nwAm.js", @@ -3648,117 +4080,152 @@ "wfrp4eTexts": [], "frTexts": [] }, + { + "file": "iqwojL5Ku26wsgnI.js", + "wfrp4eSize": 379, + "frSize": 392, + "wfrp4eTexts": [], + "frTexts": [] + }, { "file": "iuSoKntfJ4eAPafQ.js", "wfrp4eSize": 496, - "frSize": 455, + "frSize": 508, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "j6Bf1iivH8cqSnnK.js", + "wfrp4eSize": 83, + "frSize": 112, "wfrp4eTexts": [], "frTexts": [] }, { "file": "j98hvy6r9G2Vjmid.js", - "wfrp4eSize": 439, - "frSize": 468, + "wfrp4eSize": 479, + "frSize": 439, "wfrp4eTexts": [], - "frTexts": [ - "${this.effect.name}: \n @Corruption[minor]{Exposition Mineure à la Corruption}
\n ${args.actor.prototypeToken.name} doit réaliser un Test \n Accessible (+20%) de Corruption (Mineur)" - ] - }, - { - "file": "jFwema0iwzBphxie.js", - "wfrp4eSize": 420, - "frSize": 432, - "wfrp4eTexts": [], - "frTexts": [ - "${args.attacker.prototypeToken.name} guéri de ${woundsGained} Blessures" - ] - }, - { - "file": "jGDk7avWFSnyFoql.js", - "wfrp4eSize": 463, - "frSize": 479, - "wfrp4eTexts": [ - "Removed ${broken.name}, added ${item.name} (${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds)" - ], - "frTexts": [ - "Suppression de ${broken.name}, ajout de ${item.name} (${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds)" - ] + "frTexts": [] }, { "file": "jHgxpe6TJDlP3oTn.js", "wfrp4eSize": 443, - "frSize": 406, + "frSize": 455, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "jObJanFoev4N6ZRv.js", - "wfrp4eSize": 121, - "frSize": 120, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "jOm7RxGFm1y6mCpN.js", - "wfrp4eSize": 58, - "frSize": 58, + "file": "jLsL4KRI6LEG9Ii2.js", + "wfrp4eSize": 155, + "frSize": 275, "wfrp4eTexts": [], "frTexts": [] }, { "file": "jW87rmQLtROdVEhW.js", "wfrp4eSize": 266, - "frSize": 279, + "frSize": 267, "wfrp4eTexts": [], "frTexts": [] }, - { - "file": "jXbrIGxznqf1SNxZ.js", - "wfrp4eSize": 633, - "frSize": 627, - "wfrp4eTexts": [], - "frTexts": [ - "

${speaker.alias} est immergé dans la Elémentair de Mer et subit la @UUID[Compendium.wfrp4e-core.journals.JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.WCivInLZrqEtZzF4#drowning-and-suffocation]{Suffocation}

Il peut essayer de s" - ] - }, { "file": "jdS2u1tQPYeO55WI.js", "wfrp4eSize": 1609, - "frSize": 1573, + "frSize": 1625, "wfrp4eTexts": [], "frTexts": [] }, { "file": "jsgLEVYvMieyYT6L.js", "wfrp4eSize": 697, - "frSize": 718, + "frSize": 713, "wfrp4eTexts": [ "No Token Image path configured. The image path should be set in the first line of this script." ], "frTexts": [ - "Aucune image de Token configurée. Le chemin du token doit être configuré dans la première ligne de ce script." + "Aucun chemin d" + ] + }, + { + "file": "jvNuIbOtB46p0esq.js", + "wfrp4eSize": 383, + "frSize": 383, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "k0AkkBLtE8oZhBwn.js", + "wfrp4eSize": 252, + "frSize": 254, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "k465TgRelwcSUdS2.js", + "wfrp4eSize": 532, + "frSize": 526, + "wfrp4eTexts": [ + "This Actor does not have Trade (Engineering)!" + ], + "frTexts": [ + "Cet acteur n" + ] + }, + { + "file": "k5792iKWEqKmVZMk.js", + "wfrp4eSize": 51, + "frSize": 53, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "k7J96MkvfX2GO6JS.js", + "wfrp4eSize": 241, + "frSize": 243, + "wfrp4eTexts": [ + "Added Corruption" + ], + "frTexts": [ + "Corruption ajoutée" + ] + }, + { + "file": "kb2pwRZAjbUbZwcz.js", + "wfrp4eSize": 227, + "frSize": 236, + "wfrp4eTexts": [ + "${args.actor.prototypeToken.name} must pass an Difficult (-10) Willpower Test to attack this target!" + ], + "frTexts": [ + "${args.actor.prototypeToken.name} doit réussir un test de Volonté Difficile (-10) pour attaquer cette cible !" ] }, { "file": "kiJ6AiaYVUjt6aV6.js", "wfrp4eSize": 360, - "frSize": 337, + "frSize": 363, "wfrp4eTexts": [], "frTexts": [] }, { "file": "kvaN100w0nBUlLbj.js", "wfrp4eSize": 136, - "frSize": 144, + "frSize": 145, "wfrp4eTexts": [], - "frTexts": [ - "Immunisé aux Poisons" - ] + "frTexts": [] + }, + { + "file": "lG5lfAzNuM4t0rpM.js", + "wfrp4eSize": 36, + "frSize": 38, + "wfrp4eTexts": [], + "frTexts": [] }, { "file": "lII4KMRblqwFBlsV.js", "wfrp4eSize": 3094, - "frSize": 3123, + "frSize": 3115, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trait}", @@ -3768,39 +4235,14 @@ "frTexts": [ "Impossible de trouver ${talent}", "Impossible de trouver ${trait}", - "Impossible de trouver ${trapping}", - "Impossible de trouver ${spell}" + "Could not find ${trapping}", + "Could not find ${spell}" ] }, { "file": "lOIHiAIDtj91kllN.js", "wfrp4eSize": 294, - "frSize": 267, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "lOzkngzye4RmvALp.js", - "wfrp4eSize": 204, - "frSize": 213, - "wfrp4eTexts": [ - "Added " - ], - "frTexts": [ - "Ajout de " - ] - }, - { - "file": "lQJ68n3y1xDyNicE.js", - "wfrp4eSize": 78, - "frSize": 78, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "lU4s3UTtBkU38djI.js", - "wfrp4eSize": 206, - "frSize": 207, + "frSize": 300, "wfrp4eTexts": [], "frTexts": [] }, @@ -3814,136 +4256,163 @@ { "file": "laptAldsT0Fm1rDt.js", "wfrp4eSize": 273, - "frSize": 253, + "frSize": 301, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "lmBAZCtofsC8hHHG.js", + "wfrp4eSize": 741, + "frSize": 767, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "luEuwzYCUrch58Bp.js", + "wfrp4eSize": 153, + "frSize": 160, "wfrp4eTexts": [], "frTexts": [] }, { "file": "lvjcddwRiN9iGruy.js", "wfrp4eSize": 1914, - "frSize": 1924, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "m8qBlbH7ROoqa22o.js", - "wfrp4eSize": 26, - "frSize": 26, + "frSize": 1920, "wfrp4eTexts": [], "frTexts": [] }, { "file": "mPxmCsXYirAIT913.js", - "wfrp4eSize": 259, - "frSize": 263, + "wfrp4eSize": 292, + "frSize": 264, "wfrp4eTexts": [], "frTexts": [] }, { "file": "mRvLsSVxNyt8LVZb.js", "wfrp4eSize": 219, - "frSize": 215, + "frSize": 211, "wfrp4eTexts": [], "frTexts": [] }, + { + "file": "mlulnXQo8XU8vKLD.js", + "wfrp4eSize": 255, + "frSize": 255, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "mnvczEiu7gUSWvuV.js", + "wfrp4eSize": 276, + "frSize": 270, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "mujAsg7US4R7eXhv.js", + "wfrp4eSize": 165, + "frSize": 185, + "wfrp4eTexts": [ + "Cannot enact Pray Tests!" + ], + "frTexts": [ + "Impossible d" + ] + }, { "file": "n5RJqJL9fdRIxkuN.js", "wfrp4eSize": 298, - "frSize": 309, + "frSize": 287, "wfrp4eTexts": [ "Advantage Subtracted", "Not enough Advantage!" ], "frTexts": [ - "Avantage soustrait", - "Pas assez d" + "Avantage retiré", + "Avantage retiré" ] }, { "file": "nGTxNWBUBgTr87wU.js", - "wfrp4eSize": 381, - "frSize": 377, + "wfrp4eSize": 384, + "frSize": 381, "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "nZtN0zM49xTuG86V.js", + "wfrp4eSize": 299, + "frSize": 288, + "wfrp4eTexts": [ + "Advantage Subtracted", + "Not enough Advantage!" + ], "frTexts": [ - "Becomes lodged in the armour or flesh of the opponent. See @UUID[${this.item.uuid}]{${this.item.name}}." + "Avantage retiré", + "Avantage retiré" ] }, { "file": "naF5EWr1CBkYRZTK.js", "wfrp4eSize": 348, - "frSize": 657, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "ngMm7SgtVqVovFJG.js", - "wfrp4eSize": 335, - "frSize": 316, + "frSize": 353, "wfrp4eTexts": [], "frTexts": [] }, { "file": "njPP9wDAsdh4WHIj.js", - "wfrp4eSize": 347, - "frSize": 367, - "wfrp4eTexts": [], - "frTexts": [ - "Infctée: ${args.actor.name} doit réussir un Test Facile (+40) de Résistance ou subir une @UUID[Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb]{Blessure Purulente}" - ] - }, - { - "file": "nkSmu7v9WiAaK4vq.js", - "wfrp4eSize": 1214, - "frSize": 1209, + "wfrp4eSize": 328, + "frSize": 341, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "nkbTnaeBpthyhw4J.js", - "wfrp4eSize": 338, - "frSize": 352, + "file": "nkSmu7v9WiAaK4vq.js", + "wfrp4eSize": 1214, + "frSize": 1218, "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.prototypeToken.name} voit ses Points de Chance augmenter de ${current} à ${fortunePoints + current}" - ] + "frTexts": [] }, { "file": "nkdKBJ8ItqWiRAWL.js", "wfrp4eSize": 1039, - "frSize": 1063, + "frSize": 1045, "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.name} porte ${this.item.name}.
\n Il bénéficie de +50 aux Tests de Natation et peut respirer sous l", - "${this.item.name} porté par ${this.actor.name} a été enlevé et a perdu ses propriétés. Cependant, ses effets perdurent pendant [[1d10+4]] jours, après quoi il faudra les supprimer manuellement." - ] + "frTexts": [] }, { - "file": "o88xuUConwt0vFLw.js", - "wfrp4eSize": 231, - "frSize": 238, + "file": "o2QhtiLAmUEpDgBX.js", + "wfrp4eSize": 44, + "frSize": 47, "wfrp4eTexts": [], - "frTexts": [ - "Gagne ${points} Points de Chance" - ] + "frTexts": [] }, { "file": "oDNfCNyt5KaUYmg2.js", - "wfrp4eSize": 326, - "frSize": 339, + "wfrp4eSize": 327, + "frSize": 326, "wfrp4eTexts": [], "frTexts": [] }, { "file": "oPg4se8iQRD14kmB.js", "wfrp4eSize": 448, - "frSize": 443, + "frSize": 460, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "oQI06eh8mJ9UqETO.js", + "wfrp4eSize": 243, + "frSize": 241, "wfrp4eTexts": [], "frTexts": [] }, { "file": "oTXPA6rbPnYOKNmo.js", "wfrp4eSize": 3529, - "frSize": 3507, + "frSize": 3586, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -3953,28 +4422,17 @@ "Impossible de trouver ${trapping}" ] }, - { - "file": "oV81zgbZsuTFG6L2.js", - "wfrp4eSize": 186, - "frSize": 200, - "wfrp4eTexts": [], - "frTexts": [ - "Guérison de ${caster.system.characteristics.fel.bonus} Blessures" - ] - }, { "file": "oWa7RkScnl6lR5vd.js", "wfrp4eSize": 443, - "frSize": 452, + "frSize": 434, "wfrp4eTexts": [], - "frTexts": [ - "Test de Force Mentale échoué, ${this.actor.prototypeToken.name} @UUID[Compendium.wfrp4e-core.items.AGcJl5rHjkyIQBPP] pour [[1d10]] heures" - ] + "frTexts": [] }, { "file": "okW06V9UiPC4Vcrn.js", "wfrp4eSize": 1846, - "frSize": 1863, + "frSize": 1864, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -3987,57 +4445,77 @@ { "file": "pR4Q2OnPxXtwRVli.js", "wfrp4eSize": 389, - "frSize": 395, + "frSize": 408, "wfrp4eTexts": [ "Cannot suffer Critical Wounds", "Dormant for ${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds" ], "frTexts": [ - "Ne peut subir de Blessures Critiques", - "Endormi pour ${Math.ceil(CONFIG.Dice.randomUniform() * 10)} Rounds" + "Impossible de recevoir une Blessure Critique ", + "Endormi pendant ${Math.ceil(CONFIG.Dice.randomUniform() * 10)} tours" ] }, + { + "file": "pj7gjxHrnrZonC6U.js", + "wfrp4eSize": 245, + "frSize": 250, + "wfrp4eTexts": [], + "frTexts": [] + }, { "file": "pkKpxVqRHIzywerL.js", "wfrp4eSize": 136, - "frSize": 147, + "frSize": 151, "wfrp4eTexts": [ "Resisted Ablaze" ], "frTexts": [ - "Résiste à En Flammes" + "Résistance à l" + ] + }, + { + "file": "pqQkeUVpuZ0jOKnZ.js", + "wfrp4eSize": 727, + "frSize": 758, + "wfrp4eTexts": [ + "Mutation table not found, please ensure a table with the ", + "Rolled and applied mutations" + ], + "frTexts": [ + "Table de Mutation introuvable, veuillez vous assurer qu", + "TTirage de mutation effectué et appliqué" ] }, { "file": "q0LvphC8RDSyR0oY.js", "wfrp4eSize": 376, - "frSize": 382, + "frSize": 381, "wfrp4eTexts": [], "frTexts": [] }, { "file": "q8lOAWr2970sZeTw.js", "wfrp4eSize": 1224, - "frSize": 1219, + "frSize": 1228, "wfrp4eTexts": [], "frTexts": [] }, { "file": "qAEZgtu5CrfUkxhx.js", "wfrp4eSize": 621, - "frSize": 621, + "frSize": 612, "wfrp4eTexts": [], "frTexts": [] }, { "file": "qSwCYMMiIHmSV1X5.js", "wfrp4eSize": 416, - "frSize": 422, + "frSize": 417, "wfrp4eTexts": [ "None left!" ], "frTexts": [ - "None left!" + "Plus rien !" ] }, { @@ -4049,223 +4527,264 @@ }, { "file": "qmOt7h17hGAKqQe0.js", - "wfrp4eSize": 349, - "frSize": 505, + "wfrp4eSize": 330, + "frSize": 344, "wfrp4eTexts": [], "frTexts": [] }, { "file": "qu194dVXm9Vx1TGk.js", "wfrp4eSize": 529, - "frSize": 531, + "frSize": 541, "wfrp4eTexts": [], "frTexts": [] }, { "file": "qxzhPtysAjPWspKf.js", "wfrp4eSize": 130, - "frSize": 145, + "frSize": 150, "wfrp4eTexts": [ "Cannot enter ${this.effect.name}!" ], "frTexts": [ - "Ne peut entrer ${this.effect.name}!" + "Impossible d" ] }, { "file": "rBAoyhzeU3Q8MVSk.js", "wfrp4eSize": 1222, - "frSize": 1217, + "frSize": 1229, "wfrp4eTexts": [], "frTexts": [] }, { "file": "rCh3ltUrUMovd2Kc.js", "wfrp4eSize": 143, - "frSize": 150, + "frSize": 149, "wfrp4eTexts": [ "Cannot be surprised" ], "frTexts": [ - "Ne peut être surpris" + "Impossible d" + ] + }, + { + "file": "rDexKQt0ctzdMKdR.js", + "wfrp4eSize": 113, + "frSize": 127, + "wfrp4eTexts": [ + "Cannot use Bless or Invoke!" + ], + "frTexts": [ + "Impossible d" ] }, { "file": "rF0Z3hTUUnSxL3Mq.js", "wfrp4eSize": 2408, - "frSize": 2424, + "frSize": 2419, "wfrp4eTexts": [ "Adding ${items.map(i => i.name).join(" ], "frTexts": [ - "Ajout de ${items.map(i => i.name).join(" + "Adding ${items.map(i => i.name).join(" ] }, { "file": "rX8FTinyTMj9WJri.js", "wfrp4eSize": 1322, - "frSize": 1328, + "frSize": 1330, "wfrp4eTexts": [], - "frTexts": [ - "\n

${speaker.alias} sank due to having Holed (${totalHoled}) rating equal to, or exceeding its Toughness (${toughness })

\n

\n Holed due to Critical Damage: ${currentHoled}
\n Holed due to opened Gun Ports: ${openGunPorts}\n

\n " - ] + "frTexts": [] }, { "file": "ramav4ymrDDkPKK4.js", "wfrp4eSize": 215, - "frSize": 233, + "frSize": 209, "wfrp4eTexts": [ "Removed 1 Bleeding Condition", "No Bleeding Conditions" ], "frTexts": [ - "Suppression d", - "Aucun état Hémorragique" + "Retiré 1 Etat Hémmoragie", + "Aucun Etat Hémmoragie" ] }, { - "file": "ratP9ByLjQPiLlFK.js", - "wfrp4eSize": 53, - "frSize": 27, + "file": "rdaMhMyHrJjQ6vVC.js", + "wfrp4eSize": 65, + "frSize": 65, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "re1UFtxvRRjpPB7Z.js", + "wfrp4eSize": 449, + "frSize": 458, "wfrp4eTexts": [], "frTexts": [] }, { "file": "rly9iBUy8EX7NhQT.js", "wfrp4eSize": 1045, - "frSize": 1051, + "frSize": 1072, "wfrp4eTexts": [ "You must target exactly one Boat.", "You can only Constrict a Boat", "You can only Constrict vessels of Size Large or smaller" ], "frTexts": [ - "You must target exactly one Boat.", - "You can only Constrict a Boat", - "You can only Constrict vessels of Size Large or smaller", - "${speaker.alias} started wrapping itself around the ${target.name} and will be able to start crushing it after ${turns} turns." + "Vous devez cibler exactement un seul Bateau.", + "Vous ne pouvez Constrict qu", + "Vous ne pouvez Constrict que des navires de Taille Large ou plus petits" ] }, { "file": "rpxQU26BU7nwjtqY.js", "wfrp4eSize": 628, - "frSize": 632, + "frSize": 633, "wfrp4eTexts": [ "Dropped ${dropped.map(i => i.name).join(" ], "frTexts": [ - "Laché ${dropped.map(i => i.name).join(" + "Vous lâchez ${dropped.map(i => i.name).join(" ] }, { - "file": "s6eZXfZkC1My6EXl.js", - "wfrp4eSize": 207, - "frSize": 210, + "file": "s9KcytRE7i0cU06n.js", + "wfrp4eSize": 259, + "frSize": 263, "wfrp4eTexts": [], "frTexts": [] }, { "file": "sB4KB9bT3nQhAoqG.js", "wfrp4eSize": 576, - "frSize": 585, + "frSize": 586, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "sKO8TcLIkCTnFvXu.js", - "wfrp4eSize": 102, - "frSize": 114, + "file": "sBXqivqv19SvN5cZ.js", + "wfrp4eSize": 125, + "frSize": 142, "wfrp4eTexts": [ - "Cannot use ${this.item.system.location.value}!" + "Cannot make Language Tests!" ], "frTexts": [ - "Ne peut utiliser ${this.item.system.location.value}!" + "Impossible d" ] }, { "file": "sNSfDBIA2k17hPYI.js", "wfrp4eSize": 127, - "frSize": 137, + "frSize": 136, "wfrp4eTexts": [ "Ignore Ablaze" ], "frTexts": [ - "Ignore En Flammes" + "État En Flammes ignoré" ] }, { "file": "sPvfYQEnyAYNpIhF.js", "wfrp4eSize": 585, - "frSize": 546, + "frSize": 614, "wfrp4eTexts": [], "frTexts": [] }, { "file": "sZwLitzwKBTaFca3.js", "wfrp4eSize": 258, - "frSize": 264, + "frSize": 263, "wfrp4eTexts": [], "frTexts": [] }, { "file": "sbK1a7txpSoXFzyB.js", "wfrp4eSize": 576, - "frSize": 534, + "frSize": 595, "wfrp4eTexts": [], "frTexts": [] }, { "file": "shkBUtUuMPDKvFm7.js", "wfrp4eSize": 368, - "frSize": 380, + "frSize": 370, "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.prototypeToken.name} tombe de ${fallen} mètres" - ] + "frTexts": [] + }, + { + "file": "sjnoYbWpAugyDilW.js", + "wfrp4eSize": 324, + "frSize": 343, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "sm9d5lk6cM0OuUkf.js", + "wfrp4eSize": 93, + "frSize": 93, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "surdCPFakh2JAAHa.js", + "wfrp4eSize": 236, + "frSize": 262, + "wfrp4eTexts": [], + "frTexts": [] }, { "file": "svCqdytEOtqFXCcs.js", "wfrp4eSize": 3048, - "frSize": 3048, + "frSize": 3074, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" ], "frTexts": [ - "Impossible de trouver ${talent}", - "Impossible de trouver ${trapping}" + "Could not find ${talent}", + "Could not find ${trapping}" ] }, { "file": "sx7Ikn8WW00gBFb4.js", "wfrp4eSize": 838, - "frSize": 862, + "frSize": 849, "wfrp4eTexts": [ "Rolled Left", "Rolled Right", "Dropped ${dropped.map(i => i.name).join(" ], "frTexts": [ - "Résultat : gauche", - "Résultat : Droite", - "Laché ${dropped.map(i => i.name).join(" + "Bras Gauche", + "Bras Droit", + "Lâche ${dropped.map(i => i.name).join(" ] }, + { + "file": "syRJs8P4aBFB5USD.js", + "wfrp4eSize": 362, + "frSize": 363, + "wfrp4eTexts": [], + "frTexts": [] + }, { "file": "syqqBkyP5tGqZ78t.js", "wfrp4eSize": 348, - "frSize": 343, + "frSize": 348, "wfrp4eTexts": [ "Removed Immunity to Psychology, Adding ${roll.total} Broken Conditions" ], "frTexts": [ - "Immunité Psychologique a été supprimé de l" + "Removed Immunité Psychologique, Adding ${roll.total} Broken Conditions" ] }, { "file": "sz0PqS1kroMOzUZk.js", "wfrp4eSize": 2512, - "frSize": 2526, + "frSize": 2518, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -4276,98 +4795,142 @@ ] }, { - "file": "t48hkacYdOpzWvK9.js", - "wfrp4eSize": 30, - "frSize": 30, + "file": "tCIT1a12Gt6k2ohA.js", + "wfrp4eSize": 724, + "frSize": 730, "wfrp4eTexts": [], "frTexts": [] }, { "file": "tGVEV6TLl310mFLP.js", "wfrp4eSize": 347, - "frSize": 352, + "frSize": 351, "wfrp4eTexts": [], "frTexts": [] }, { "file": "tNTO1LVN7JqHf4YN.js", "wfrp4eSize": 381, - "frSize": 396, + "frSize": 376, "wfrp4eTexts": [], - "frTexts": [ - "Test de Force Mentale échoué, ${this.actor.prototypeToken.name} subit @Condition[Malaise] pour [[1d10]] heures" - ] + "frTexts": [] }, { "file": "tUwP7TjrOOOnaCYJ.js", "wfrp4eSize": 240, - "frSize": 249, + "frSize": 234, "wfrp4eTexts": [ "Cleared ${fatigued.conditionValue} Fatigued Conditions", "No Fatigued Conditions" ], "frTexts": [ - "Suppression de ${fatigued.conditionValue} états Fatigué", - "Aucun état Fatigué" + "Suppression de ${fatigued.conditionValue} états Extenué", + "Aucun état Extenué" ] }, { "file": "toSrgcvWq9b5eN0K.js", "wfrp4eSize": 283, - "frSize": 293, + "frSize": 287, "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "tyQLkRLk1AXB4g2u.js", + "wfrp4eSize": 383, + "frSize": 386, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "u46KnlxCjP42F6QY.js", + "wfrp4eSize": 171, + "frSize": 187, + "wfrp4eTexts": [ + "Personality table not found" + ], "frTexts": [ - "Localisation: ${location.description}" + "Table des Traits de personnalité introuvable" ] }, { - "file": "u3olS2p7Ls1JXfAH.js", - "wfrp4eSize": 91, - "frSize": 97, + "file": "uEVSUTTam4Z96JJ2.js", + "wfrp4eSize": 224, + "frSize": 233, "wfrp4eTexts": [], "frTexts": [] }, { "file": "uLBDnWC3S0lRitbj.js", "wfrp4eSize": 791, - "frSize": 789, + "frSize": 793, "wfrp4eTexts": [], - "frTexts": [ - "Reçoit un Point de Corruption" - ] + "frTexts": [] }, { - "file": "ucF4aiJ1gpDB333G.js", - "wfrp4eSize": 387, - "frSize": 385, + "file": "uRiAvo9fb3U7FIIy.js", + "wfrp4eSize": 143, + "frSize": 150, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "uZeNKQ24fToJ7qtY.js", + "wfrp4eSize": 337, + "frSize": 345, "wfrp4eTexts": [], "frTexts": [] }, { "file": "ugL5IBB6R2yWyMWd.js", - "wfrp4eSize": 1129, - "frSize": 1131, + "wfrp4eSize": 1149, + "frSize": 1094, "wfrp4eTexts": [], "frTexts": [] }, { "file": "uhCq5NwjQ2a2idPn.js", "wfrp4eSize": 1214, - "frSize": 1209, + "frSize": 1218, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "v00nVCRKqqRvY28t.js", + "wfrp4eSize": 252, + "frSize": 253, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "v18mmwUmuKiVfwzQ.js", + "wfrp4eSize": 217, + "frSize": 218, "wfrp4eTexts": [], "frTexts": [] }, { "file": "v4CCxVaVGf9i8U7X.js", "wfrp4eSize": 540, - "frSize": 844, + "frSize": 542, "wfrp4eTexts": [], "frTexts": [] }, + { + "file": "v5K5HaHTZmVSJBdr.js", + "wfrp4eSize": 537, + "frSize": 560, + "wfrp4eTexts": [ + "Random Creature table not found!" + ], + "frTexts": [ + "Table de créatures aléatoires introuvable !" + ] + }, { "file": "v5xrDWcrTNFJkyQB.js", "wfrp4eSize": 1651, - "frSize": 1834, + "frSize": 1688, "wfrp4eTexts": [ "Could not find ${talent}" ], @@ -4375,90 +4938,99 @@ "Impossible de trouver ${talent}" ] }, - { - "file": "vFUVWZ1l8wpTjLcx.js", - "wfrp4eSize": 437, - "frSize": 457, - "wfrp4eTexts": [ - "Target has higher Willpower, no effect" - ], - "frTexts": [ - "La cible a une Force Mentale supérieure, aucun effet" - ] - }, { "file": "vJQRBxDfPwHens0a.js", "wfrp4eSize": 475, - "frSize": 481, + "frSize": 475, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "vS2D9QUslR7ZtXXm.js", - "wfrp4eSize": 453, - "frSize": 433, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "vSDMygIT9nNvEGWG.js", - "wfrp4eSize": 483, - "frSize": 480, + "file": "vJgjAfwq8MuwE2HL.js", + "wfrp4eSize": 318, + "frSize": 322, "wfrp4eTexts": [], "frTexts": [] }, { "file": "vc4bELo0cWYoILfB.js", "wfrp4eSize": 212, - "frSize": 244, + "frSize": 214, "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "vejhfB9aI58iF1vr.js", + "wfrp4eSize": 1367, + "frSize": 1367, + "wfrp4eTexts": [ + "Could not find ${c}" + ], "frTexts": [ - "Guérison de ${choice[0]?.name}" + "Impossible de trouver ${c}" ] }, { "file": "vuzRRj5d9XdNYx3o.js", "wfrp4eSize": 130, - "frSize": 141, + "frSize": 136, "wfrp4eTexts": [ "Removed Broken" ], "frTexts": [ - "Etat Brisé supprimé" + "Etat Brisé supprimée" ] }, + { + "file": "vvVhAqreedtmOR9b.js", + "wfrp4eSize": 123, + "frSize": 124, + "wfrp4eTexts": [], + "frTexts": [] + }, { "file": "w4RuGIfseGoxXA3k.js", "wfrp4eSize": 1224, - "frSize": 1219, + "frSize": 1231, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "w4zubIHP0XgMXsFe.js", - "wfrp4eSize": 77, - "frSize": 77, + "file": "wBc8XvkAnv3j93vR.js", + "wfrp4eSize": 687, + "frSize": 716, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "wAntJhgb8Og5vJXh.js", - "wfrp4eSize": 36, - "frSize": 36, - "wfrp4eTexts": [], - "frTexts": [] + "file": "wIqIF9B43SyDgGYv.js", + "wfrp4eSize": 205, + "frSize": 213, + "wfrp4eTexts": [ + "Cannot remove " + ], + "frTexts": [ + "Impossible de retirer " + ] }, { "file": "wbM7tpw4TxvadcWm.js", "wfrp4eSize": 436, - "frSize": 452, + "frSize": 453, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "weDTna1dLMwHsNlJ.js", + "wfrp4eSize": 95, + "frSize": 99, "wfrp4eTexts": [], "frTexts": [] }, { "file": "whUSkaR1yem21bXp.js", "wfrp4eSize": 3059, - "frSize": 3087, + "frSize": 3434, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trait}", @@ -4466,16 +5038,17 @@ "Could not find ${spell}" ], "frTexts": [ - "Impossible de trouver ${talent}", - "Impossible de trouver ${trait}", - "Impossible de trouver ${trapping}", - "Impossible de trouver ${spell}" + "Could not find ${talent}", + "Could not find ${trapping}", + "Could not find ${spell}", + "Could not find ${trapping}", + "Could not find ${spell}" ] }, { "file": "wyTCozh9qGTx6yK0.js", "wfrp4eSize": 169, - "frSize": 186, + "frSize": 181, "wfrp4eTexts": [ "Does not need to make Fear or Terror tests" ], @@ -4484,16 +5057,20 @@ ] }, { - "file": "x76tKw4L8dX00ikE.js", - "wfrp4eSize": 283, - "frSize": 269, - "wfrp4eTexts": [], - "frTexts": [] + "file": "x1Ecj6MXY94kpcQq.js", + "wfrp4eSize": 475, + "frSize": 503, + "wfrp4eTexts": [ + "You must equip the ${this.item.name} to restore Wounds." + ], + "frTexts": [ + "Vous devez équiper le ${this.item.name} pour récupérer des points de blessures." + ] }, { "file": "x9iKFYYc4Ocy8PTS.js", "wfrp4eSize": 880, - "frSize": 909, + "frSize": 894, "wfrp4eTexts": [], "frTexts": [] }, @@ -4507,49 +5084,32 @@ { "file": "xUpKYT7BZCSmAfUy.js", "wfrp4eSize": 288, - "frSize": 306, + "frSize": 289, "wfrp4eTexts": [ "None left!" ], "frTexts": [ - "Quantité insuffisante!" + "Plus rien !" ] }, { "file": "xgplXZMs459X7XXM.js", "wfrp4eSize": 1034, - "frSize": 1062, - "wfrp4eTexts": [], - "frTexts": [ - "${this.actor.name} porte ${this.item.name}.
\n Il subit -20 à tout ses tests pour résister aux maladies.
\n Si il porte le masque pendant plus d", - "${this.item.name} porté par ${this.actor.name} a été enlevé et a perdu ses propriétés. Cependant, les effets perdurent pendant [[1d10+4]] jours, après quoi ils devront être supprimés manuellement." - ] - }, - { - "file": "xihniGjgqOhuaKWc.js", - "wfrp4eSize": 476, - "frSize": 221, + "frSize": 1045, "wfrp4eTexts": [], "frTexts": [] }, { - "file": "xklncIMwQIespDxS.js", - "wfrp4eSize": 316, - "frSize": 308, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "xqWxV9w5ezBQdJkZ.js", - "wfrp4eSize": 31, - "frSize": 31, + "file": "xiyQSXozoLxt0MZs.js", + "wfrp4eSize": 334, + "frSize": 339, "wfrp4eTexts": [], "frTexts": [] }, { "file": "y3F1K1sYBymPZCjz.js", "wfrp4eSize": 2686, - "frSize": 2698, + "frSize": 2729, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -4559,74 +5119,24 @@ "Impossible de trouver ${trapping}" ] }, - { - "file": "yAL0YwZWVm8o1nxa.js", - "wfrp4eSize": 356, - "frSize": 354, - "wfrp4eTexts": [], - "frTexts": [ - "[[3d10]] @UUID[Compendium.wfrp4e-core.actors.T79RqnDOAQLn3I1s]{zombies} sortent des décombres." - ] - }, { "file": "yCgH3N9AurIiAv0i.js", "wfrp4eSize": 1118, - "frSize": 979, + "frSize": 1121, "wfrp4eTexts": [], "frTexts": [] }, - { - "file": "yDvxF9llUYwJg0sE.js", - "wfrp4eSize": 883, - "frSize": 861, - "wfrp4eTexts": [ - "Repeater " - ], - "frTexts": [ - "Repeater " - ] - }, - { - "file": "yFMvxecXAZ6T2O0S.js", - "wfrp4eSize": 449, - "frSize": 405, - "wfrp4eTexts": [], - "frTexts": [ - "Deux @UUID[Compendium.wfrp4e-eis.actors.cLOGeMqUty61nYB9]{Horreurs bleus de Tzeentch} sortent du corps de ${this.actor.name}, le tuant au passage." - ] - }, { "file": "yMMzZ7daCqRlGT3N.js", - "wfrp4eSize": 290, - "frSize": 306, + "wfrp4eSize": 299, + "frSize": 277, "wfrp4eTexts": [], "frTexts": [] }, { "file": "yQziCK8G8I1RYkTj.js", "wfrp4eSize": 503, - "frSize": 465, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "yTmRoUstxHMso91c.js", - "wfrp4eSize": 195, - "frSize": 171, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "ybxDG2ezvRx02LYx.js", - "wfrp4eSize": 31, - "frSize": 31, - "wfrp4eTexts": [], - "frTexts": [] - }, - { - "file": "ynV7tz0OdCwlsQp6.js", - "wfrp4eSize": 357, - "frSize": 363, + "frSize": 512, "wfrp4eTexts": [], "frTexts": [] }, @@ -4640,65 +5150,77 @@ { "file": "yzN7ZNlgCiSVJqsU.js", "wfrp4eSize": 192, - "frSize": 202, + "frSize": 199, "wfrp4eTexts": [ "Applied after effects" ], "frTexts": [ - "Appliqué après les effets" + "Effets secondaires appliqués" ] }, { "file": "z8mwLihZQu0JtUHY.js", "wfrp4eSize": 3018, - "frSize": 3059, + "frSize": 3067, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" ], "frTexts": [ - "Impossible de trouver ${talent}", - "Impossible de trouver ${trapping}" + "Could not find ${talent}", + "Could not find ${trapping}" ] }, + { + "file": "z9NEbIUBsKMaTuCz.js", + "wfrp4eSize": 104, + "frSize": 103, + "wfrp4eTexts": [], + "frTexts": [] + }, + { + "file": "zGwtyjTUBeSQ110p.js", + "wfrp4eSize": 509, + "frSize": 508, + "wfrp4eTexts": [], + "frTexts": [] + }, { "file": "zIpl3SkWv8zzlr2D.js", "wfrp4eSize": 1133, - "frSize": 1144, + "frSize": 1154, "wfrp4eTexts": [], "frTexts": [] }, { "file": "zK38Rl5t9zbFi4Se.js", - "wfrp4eSize": 196, - "frSize": 208, + "wfrp4eSize": 168, + "frSize": 173, "wfrp4eTexts": [ "Added Bleeding" ], "frTexts": [ - "Ajout d" + "Hémorragique ajouté" ] }, { "file": "zL7ECmBBMAqf5Esn.js", "wfrp4eSize": 1058, - "frSize": 1000, + "frSize": 1080, "wfrp4eTexts": [], - "frTexts": [ - "

${this.item.name} caused an additional ${anchor.outerHTML} Critical Hits to the Hull!

  • ${uuids.join(" - ] + "frTexts": [] }, { "file": "zXh8rgMxWoCLTxVd.js", "wfrp4eSize": 1204, - "frSize": 1200, + "frSize": 1209, "wfrp4eTexts": [], "frTexts": [] }, { "file": "zadppy7FEbXvgUON.js", "wfrp4eSize": 1780, - "frSize": 1810, + "frSize": 1794, "wfrp4eTexts": [ "Could not find ${talent}", "Could not find ${trapping}" @@ -4711,32 +5233,25 @@ { "file": "zdGAvfL7zJ7wpYxG.js", "wfrp4eSize": 1217, - "frSize": 1212, + "frSize": 1224, "wfrp4eTexts": [], "frTexts": [] }, { "file": "zi8Z3NlwVj3IfgAW.js", "wfrp4eSize": 288, - "frSize": 306, + "frSize": 289, "wfrp4eTexts": [ "None left!" ], "frTexts": [ - "Quantité insuffisante!" + "Plus rien !" ] }, - { - "file": "zsoTVkHe4nHY1M52.js", - "wfrp4eSize": 160, - "frSize": 166, - "wfrp4eTexts": [], - "frTexts": [] - }, { "file": "zxG5KbliWE9xWNQD.js", "wfrp4eSize": 88, - "frSize": 100, + "frSize": 92, "wfrp4eTexts": [], "frTexts": [] } @@ -4746,14 +5261,34 @@ "file": "0FNOq4J1AdPd2A0q.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "0H2syk6qc0sCY0pj.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "0NAD1LNcVyAZ1fC7.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "0YKQGbsKdHSmYGE7.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "0hAbiNR1nFkpFMRz.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "0mrUnxzufYgsR0Ph.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "11ir8nibM5HD69na.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "19LL1oevrjmpD8DX.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "1A87vGLh2PXH0rG0.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -4774,6 +5309,10 @@ "file": "1wKVvxRTHOyV4Qdv.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "20fvE9nJmcfGYVzw.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "22bW97lkvCqisfHX.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -4786,6 +5325,10 @@ "file": "2AdSBXw7IwCiqawQ.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "2Ej6LUqn8frTRURo.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "2NLINicPQWbuvp2n.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -4814,10 +5357,18 @@ "file": "2vTVR0quRZQtjNfQ.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "2zpYzKVDNE5y9RLL.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "3JEzEzF1SeYA9lsV.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "3LLiSgj6KGtgqcmo.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "3hfMQkUKYI4rCuBy.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -4830,6 +5381,14 @@ "file": "3sfD1nedXLzuYoXJ.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "3uIkDVzxNjzm5qIH.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "3z3m1pmw03DbQzcb.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "454x3Q95pLvZm0Kx.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -4866,6 +5425,10 @@ "file": "5Fe1ELaS6Gnvy0Cj.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "5QjaPBFbv5rIYpla.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "5o1XiceC4rutjMms.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -4874,6 +5437,10 @@ "file": "5sI9iYh5j2nx2XyT.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "63Yh0nrhCLLfzd14.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "6JrUjs3g5x6bFnj3.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -4890,6 +5457,10 @@ "file": "6fElmBxTjdAaubbK.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "6nA5LPXneAahHX2W.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "6qUKKep5vhFYmo1J.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -4902,6 +5473,10 @@ "file": "715G1Bf0haOHvmYQ.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "7BgJe9YkbHTh3ucm.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "7Ck0fkzE4WQ62qVe.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -4910,6 +5485,18 @@ "file": "7H6wYyJ6cpaoc2QQ.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "7IuX8wytm33iRGC3.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "7T3iXgrL72fea67C.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "7UUS0gX2Pbi0HHiz.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "7VAhXHov6pR1SkgD.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -4922,16 +5509,20 @@ "file": "7szLG4VALuuy1cPm.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "7y89OcMmGbjRMgTg.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "84IB8CWa55XzoAkv.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, { - "file": "86ivOsBQAuu0UmFg.js", + "file": "8ByuHnUZ4RNTdGVv.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, { - "file": "8ByuHnUZ4RNTdGVv.js", + "file": "8Gan2EeGExBFSxmp.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, { @@ -4946,10 +5537,18 @@ "file": "8ZAUBSH9CM9OTpTL.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "8qOGotfGFA0HYQ6W.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "93K85NnVwjVNXlZq.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "9AMoFRATTAfdKlKN.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "9EVj4bmZJex45Mt7.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -4971,7 +5570,7 @@ "details": "Le système utilise maintenant localize() - script FR obsolète" }, { - "file": "ACgKpKrEEHoNGG0h.js", + "file": "A97EV1Yju3aT7Sng.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, { @@ -5014,6 +5613,14 @@ "file": "C4LZnaX0MYgwrszj.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "C8Q4jf6LSyA3lQHS.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "C9ARvMauPNwIHj6o.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "CCK1iIfPmB398ziT.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5086,6 +5693,14 @@ "file": "Ew3C2WmLCtc1KT46.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "FKEH7DeqU0FH4dkk.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "FPQp6XfbUH1BMafj.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "FXuyiJoXdAh6WhRK.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5126,6 +5741,10 @@ "file": "H2CJvApKMnfGNNoo.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "H7BFq8m8vnkm4Yux.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "HASsi6wYHVALExWq.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5146,10 +5765,6 @@ "file": "Hcpn1gU58DIKIhty.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, - { - "file": "HdTuY2IGhdlMDOy3.js", - "details": "Le système utilise maintenant localize() - script FR obsolète" - }, { "file": "HfCxNd7mFGZH4s9Y.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5158,6 +5773,10 @@ "file": "HfZAQWoY8n3clLlo.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "Hi005w1Ul17Q8Uty.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "HiMBS6GeOwEydWYN.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5166,6 +5785,10 @@ "file": "HrOBAXsEX073ReKl.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "I5DqzmfuTGwyFWLY.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "I7ieW0hNYvvX0KFg.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5202,6 +5825,10 @@ "file": "JEbs0WlqhKNDOo5A.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "JKpC9pVATysq8k4G.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "JQruHprM5R5vZ9DA.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5238,6 +5865,10 @@ "file": "KIoVBinAZK8sMOqD.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "KOR8aafB3D4FLoh6.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "KPQfupKuaf4LCv4R.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5258,6 +5889,10 @@ "file": "KkjkYAGI9Em1NgiQ.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "KxM4zmhQRDHaRybM.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "KyUPYV1RXJxPOfyA.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5302,20 +5937,28 @@ "file": "M9VgeYGiUO97ZUW4.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "MECRxo8X0cfZh1rx.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "MJB6WbZSF6Briz30.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "MKxYbHOrv0UuA7JB.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "MMv2B8TH7jxNCtdl.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, { - "file": "MMx8f5uJ15XOgJGg.js", + "file": "MSJWJEUrX7ZmMvAD.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, { - "file": "MSJWJEUrX7ZmMvAD.js", + "file": "MWtT4Mhf7F1hqemx.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, { @@ -5330,6 +5973,10 @@ "file": "NDvNGATDM2xPFJK0.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "NTFpkiGyBpOtrV0s.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "NkqtQaLEGYst0PUO.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5346,6 +5993,14 @@ "file": "Np8P8IPT2GYlrh6G.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "O1FwJHbDqZHwaYK8.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "OFViRemr1cpnO3af.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "OeCgX3hIsfLfmGvC.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5374,6 +6029,10 @@ "file": "PVjaKAHTKDA0rA9J.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "PWHKisZTZEgCANd8.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "PdClojv7yNgQpOUc.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5394,6 +6053,10 @@ "file": "Q9EmlWmuDac83cJw.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "QBBrzcSAe8QqE4WP.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "QPVVDPcJ4Xi5FmQl.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5418,6 +6081,18 @@ "file": "RNr9CwyvLhlnwD2h.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "RQPe7k09QdAyws67.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "RlVvlmhOfscaJqCd.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "Rmk3UwD0zz4HlTHR.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "RprZWlnopSqZt7KZ.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5426,10 +6101,18 @@ "file": "RrchOMpEdIvceJxl.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "SK8paBvnvc5YLFI1.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "SNjG7IvgQzvCGczR.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "SdZ7xAEzJGVDCsaI.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "SrCHfOJFZwDickqa.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5438,6 +6121,10 @@ "file": "T3RfSt3VMEat3iDD.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "TIoUbjOtj7PTK2t8.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "TOyQLrugFGzwc5nY.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5502,6 +6189,18 @@ "file": "UvycHOjSPm5Zv9KJ.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "Ux7L2VL2fYfITST6.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "UxVfVoH7cbC9ESDr.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "V4PcjtHde941wv6J.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "VAs1nXvicdQK18Do.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5510,6 +6209,10 @@ "file": "VCnNWmRBH28Rx0JH.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "VGuZMIR1lE8I1F1y.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "VNOKTzCrFbZ6PJUj.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5519,7 +6222,7 @@ "details": "Le système utilise maintenant localize() - script FR obsolète" }, { - "file": "VbL0TgaBAmYjrezZ.js", + "file": "VbI0Al6rJfypV3qY.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, { @@ -5546,6 +6249,14 @@ "file": "VzO0ZDcTWvaBn4vm.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "W2rdTwflbUVxFyfd.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "WOpRJluHKER1MdgI.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "WTRYAEzwxRuGENyI.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5567,11 +6278,15 @@ "details": "Le système utilise maintenant localize() - script FR obsolète" }, { - "file": "YDqpKJVy8ijEKdLX.js", + "file": "XzJotwVUIuQu6b0G.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, { - "file": "YEBw2CzHYxsTpTy5.js", + "file": "Y27MmN5KFw45d5vQ.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "YDqpKJVy8ijEKdLX.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, { @@ -5626,6 +6341,10 @@ "file": "aAvJrAKLzXhS9qN6.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "abcQMF1LW27qA98R.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "afdmOvPGMpEdZvCb.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5634,6 +6353,14 @@ "file": "b5prg1FLjCAvBjLy.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "bDS62ctjfnTU4xIu.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "bHxGutf5lZy0kciK.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "bh2qDCKiAIWM0UPi.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5642,6 +6369,10 @@ "file": "bhXUW7IJtEaUGAoV.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "bidoOQSAofp4NPf6.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "bwx9wuEOJPF7btD1.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5670,10 +6401,18 @@ "file": "dAMtbn3uQwF8KpKU.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "dEx8xfG7VLbN69Ha.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "dSmRhZ6o1bUcOSF9.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "dVF5ywnzeiZQx9ke.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "dXGosSxdoYbET2O8.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5706,6 +6445,18 @@ "file": "eGQAyzCFZAEQhyJl.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "ePv2YYcr4lz3AkGu.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "eViKAYOtuaOqo6c7.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "ecpD6KWtNjMCvuyn.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "f062aa2BNClx08D6.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5726,6 +6477,10 @@ "file": "fP2edYbj6QjPPAjL.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "fWNVINMVhEwf8k5b.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "fYLSe6CrYciap5y8.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5734,6 +6489,10 @@ "file": "g07HI7vyqiFXPB0o.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "g5y0tdoHCDs7cBy7.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "gFUXBbTskQBKjxqm.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5742,6 +6501,10 @@ "file": "gKPL3t4vlZAsvtGr.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "gPt4hUnaNqE5rVYF.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "gnVpxOeBZpNF4HIF.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5766,10 +6529,18 @@ "file": "hDC6lroDEPVBituR.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "hEDuYAgc1O1zG3Rr.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "hR1qD2kpFHF8JT8h.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "hg89FU1NAp8tIsgO.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "hnsmzvcuiUYB065I.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5786,6 +6557,10 @@ "file": "iT3C15fMyQrj1RmG.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "jOCLEsjNzERyVLsP.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "jRSgPhpfN7MH7TTp.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5822,10 +6597,6 @@ "file": "kYiDBPRKIokFkr4Z.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, - { - "file": "kYmscP2HuXjDovBD.js", - "details": "Le système utilise maintenant localize() - script FR obsolète" - }, { "file": "kkC5EhqA05U6U0gU.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5834,6 +6605,10 @@ "file": "kmsGLWGxCY8Z8jVG.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "knxDGP1YLbnPk03o.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "l1ntrpa8RE3Lg5xE.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5842,10 +6617,18 @@ "file": "l8qFKSnMpy4P7XQR.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "lMRsQRgjMexY9dxE.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "lPudo1grrVp05i7a.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "lQOu46YmOiQNhCZR.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "lYYkGzqNshiYc7WI.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5854,6 +6637,10 @@ "file": "lhemR8EP5tGNKout.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "m4eagTrVOXtotonR.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "mTnmPcjWmvScIBWY.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5867,7 +6654,7 @@ "details": "Le système utilise maintenant localize() - script FR obsolète" }, { - "file": "mziJBUYcsrhkdcCJ.js", + "file": "n5wowuDE8Dz1uBZn.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, { @@ -5938,6 +6725,10 @@ "file": "pzknBcJtZWeliE27.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "qDYJnO2JosPJrjpz.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "qTk96NKh14YOIShf.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5946,6 +6737,10 @@ "file": "qaVde0sTuMBRi2nl.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "qggycOtvFfaBr4Ax.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "qijgjcOBCDmhglRX.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5958,10 +6753,22 @@ "file": "qzGPJflVW7c2Ciim.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "rJ8pspSekyDLkiqG.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "rXMylpnEtZpwou6x.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "rXuOTYAOHCiW167c.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "rdD6Ra954TlkzQCu.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "red2bt4PGgIWAdTR.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -5974,10 +6781,6 @@ "file": "rnioLwiJP7ps5Jwy.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, - { - "file": "roKvPHDSpX4IV11C.js", - "details": "Le système utilise maintenant localize() - script FR obsolète" - }, { "file": "rr4htuVq45onXdRG.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -6030,6 +6833,10 @@ "file": "tcZug8ehU6lyYBd9.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "tki0DhoTecjq3LyZ.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "tn6SwmjAuNzqE6dx.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -6050,6 +6857,10 @@ "file": "tuIsytv3jl2yAIb2.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "uA5qaat5EXzkzltq.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "uACa6u4JLNMRgFlr.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -6058,6 +6869,10 @@ "file": "uSwkYENTOcnfRrqA.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "ulXfbycWUu36vdmS.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "upfK6GM33qZCZjll.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -6074,6 +6889,14 @@ "file": "v6LIG7EwWYALxCpP.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "vFUVWZ1l8wpTjLcx.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, + { + "file": "ve3RcfTi49rdYZU0.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "vj3zArmX27vCxYJW.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -6082,6 +6905,10 @@ "file": "vvdo1NxjmGVkmFCT.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "vwsrPDuVxeNOtdhA.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "vzMxIDjRlQSxXtCW.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -6090,10 +6917,18 @@ "file": "w4JKuTECFmu3YmTR.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "wKIGVpPddx7Y3SQH.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "wS6OIR3QN4mOUHn0.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "we6JUzDvybekAbtn.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "wsqNM4NHnwaAAQym.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -6143,11 +6978,11 @@ "details": "Le système utilise maintenant localize() - script FR obsolète" }, { - "file": "yXUPiWuQ5o0JBY4i.js", + "file": "yatUu0cd7iKs50rq.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, { - "file": "yatUu0cd7iKs50rq.js", + "file": "yvtF2t9aibxibAIM.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, { @@ -6178,6 +7013,10 @@ "file": "ziG9H5Kdb7xC3dFE.js", "details": "Le système utilise maintenant localize() - script FR obsolète" }, + { + "file": "zjTEhJuLcFVkzory.js", + "details": "Le système utilise maintenant localize() - script FR obsolète" + }, { "file": "zsiV6XEHlCNGLLPl.js", "details": "Le système utilise maintenant localize() - script FR obsolète" @@ -6187,405 +7026,7 @@ "details": "Le système utilise maintenant localize() - script FR obsolète" } ], - "onlyInFR": [ - "ZingXNvYyZ2BEvfY.js", - "tfdKU6nmvUtEjXE2.js" - ], - "onlyInWFRP4E": [ - "07tvKnPT8ICtv2us.js", - "0H2syk6qc0sCY0pj.js", - "0IAc5VFR2ogXOaGE.js", - "0NAD1LNcVyAZ1fC7.js", - "0PzfGjGhHQbxEwlb.js", - "0amHqfjTRp5ff6Op.js", - "0hAbiNR1nFkpFMRz.js", - "0hgTyeaEhMBLwzUn.js", - "0kUalAsb4OhtYbaJ.js", - "0uUxvBLJC76WIIBC.js", - "0wR0LWpfhLFA240I.js", - "0wmIC2MssUX6LW3N.js", - "1Du4e27M8WgP2iui.js", - "1PPh4vHd5sPKtudZ.js", - "1UvL0XA1EpQtjDNn.js", - "20fvE9nJmcfGYVzw.js", - "22PMOW0G5MWiBQmg.js", - "2EAYX5G9Fh3HJwiP.js", - "2Ej6LUqn8frTRURo.js", - "2IPTF0akWw9y48br.js", - "2S6XlGCdRlXuaaVw.js", - "2XXqxAF5s5Sws6qj.js", - "2XaJNYUMQAmSOsqi.js", - "2Yh4vQm0ZJukRH1x.js", - "2kRwCc31fuZgrsy8.js", - "2uyajbon5QX1CewS.js", - "2yW0kuwLfgRzJR2S.js", - "3CeKfDcMEVgQlcXm.js", - "3KH6OE7L7uJESI2Z.js", - "3SuLF6SImYWEHMo2.js", - "3ixqbsEMfSSTzAXU.js", - "3j8yybMaAZSwzxIE.js", - "3na3lnAt3bfysvcD.js", - "42UATqzohYML6a9t.js", - "4AO7Fowek5sSmE4g.js", - "4KYraZSHAEYmL6xx.js", - "4Q3Mp04O2sMgKv9x.js", - "4iu3CmOI19soOYuA.js", - "4jLe2XZQVUB8LztP.js", - "55eYGvSXetDMK80S.js", - "5GHQxfxlmjyt1fNq.js", - "5GP9UJMvBZv6kWtI.js", - "5KIozV7HxyGvskeD.js", - "5KVslRqhqzuFLyk4.js", - "5XAYjiq1i4M7Ky7j.js", - "5gPAT5Bb2FvQwYNQ.js", - "5lpR78CLhYH6Mjnu.js", - "5uokSqQsjgMapnCi.js", - "5z5nGwZC5RIwokev.js", - "6136BMmiGLwZ16H1.js", - "64aJznxPMUHAuf7F.js", - "6A6ddQDJo23oOWtK.js", - "6AsCMHZ4IYPq7Uxf.js", - "6HfCvw24X6oEe2vn.js", - "6LMzIdmCSYctgmGx.js", - "6P2QNPKfwQ1xwxZT.js", - "6frithfMs7Nbv0IZ.js", - "6maNAmREdataXmo4.js", - "6nA5LPXneAahHX2W.js", - "713v1T8HNste94pr.js", - "7T3iXgrL72fea67C.js", - "7UUS0gX2Pbi0HHiz.js", - "7y89OcMmGbjRMgTg.js", - "873KaarAnJ2qf1r2.js", - "8BCzpjFU0GeA17Wp.js", - "8R7O63iC0yANtkJ9.js", - "8pbVGsVFlDebu2Ac.js", - "8qOGotfGFA0HYQ6W.js", - "9AMoFRATTAfdKlKN.js", - "9eL5JbQQmCY030ba.js", - "9fNHye2N2DORR0A3.js", - "A3XrFB7SvV2vcg1a.js", - "AI7iVbQMPzXMP5on.js", - "AYEiCx2Es3QtMY28.js", - "AvRbjpBfTX3mn3bz.js", - "BEEvU2hE5ymcNOH9.js", - "BY4feKp244bQOWlB.js", - "Bu0KUpGvfmFF7LJs.js", - "C5NIkJwXL85Qbpe7.js", - "CUBpU1imu2eRS06C.js", - "CbfUDhUr5R4UnPPq.js", - "CcR9i3UzUXx7ieep.js", - "Cri5Q7ux6ni7zNVS.js", - "CxsKWGwQqtAaQdzX.js", - "CynUM4ZEiB9QbNQq.js", - "DUFSlDO38fQWclBE.js", - "Dk4VF4UXSMK5SaVP.js", - "DvJvHsjgkzIfFaks.js", - "DxM3NRgQYc7moMPc.js", - "Dy67jQmeGwHwV9NY.js", - "E0HHBSdQR3oH8KaL.js", - "E33J9JixYVGxaktQ.js", - "E7ksDLhihkJN4Vpt.js", - "ECUIJLcKt2TCSFS3.js", - "EHfOyVwYhFGWNjw1.js", - "ETfmit2Cx0Py77ai.js", - "ETrfkHI0B9YjJqM2.js", - "ElHBPMMx37SZMvOC.js", - "EsZx8cY34quYG4MQ.js", - "F7BHb4a7fqWMnYxH.js", - "F7E0Dr3sT7kkc2p7.js", - "F8Bmh6w01YvKsBIO.js", - "FGIHAkNdYXbTnewG.js", - "FKEH7DeqU0FH4dkk.js", - "FPQp6XfbUH1BMafj.js", - "FbfJjYUyp0ArtZMb.js", - "FttdVBQiNssDAARh.js", - "Fu8DTvSgLufcB5mr.js", - "G9ZPojp8qdjiXKZ5.js", - "GNgMG95jfabBeIwy.js", - "GYhPhHIVrhx4pkgF.js", - "GePFbu5kp2ymGYEQ.js", - "GjUD5L4h8FXGVgGQ.js", - "Gsilp71BmIyHHce6.js", - "GtfHQA9T1ip463le.js", - "GuSIY4Zqhc68qVEH.js", - "H8jDtK1Ewn4hL3A1.js", - "HgzIi6m6dkXbVWHp.js", - "Hi005w1Ul17Q8Uty.js", - "I2I4ZJjN3EUSow0t.js", - "I67tdJctEqXSQPE0.js", - "I79D8V8OFzMCtL40.js", - "I8JS4z90PtWIG2nb.js", - "IDvpVMkR2HXoNpPp.js", - "IEDJHIYaZLhmrK4X.js", - "IFXsTRAVDUeVvcRc.js", - "IM8nRo6Jx2I8RJ0L.js", - "IXXrxNSLqXEqtuDU.js", - "IhoCoul5okDx0jBa.js", - "IkVcIRmmgQjsBUUf.js", - "IurWrdbjsmMtTWuq.js", - "IuxMr6SFdJhqFtVD.js", - "J8k4ahQdZhXDfU1l.js", - "K54XxyNJa5PIWDEH.js", - "KSGIwJxR0qn10RLX.js", - "KkE8DtsTDYDyk1gN.js", - "KxIRA51YA0rktcSP.js", - "L41ao2Mw1miE0yri.js", - "L9pUSX8Z4y2zIAn7.js", - "LNxKkPI37im0bSjy.js", - "Lh3Ccqx3utIu6w0d.js", - "M6sb1yAdEAMlIvac.js", - "MB058H6OslhfBmxR.js", - "MKxYbHOrv0UuA7JB.js", - "MPK7U4HLmIAsjdqs.js", - "Mqbjr3t7IXwFnfCv.js", - "N6E9Jsd8n2ubCfz8.js", - "NEKLTgJJsayC7tpF.js", - "NMZ3Fb164tUfwChF.js", - "NTFpkiGyBpOtrV0s.js", - "NX9fApO15NQuTipW.js", - "Np25JqEiaoqerEk8.js", - "NqFvdCKDLqIXaE9m.js", - "Nuth9S5UHIhpEuIC.js", - "NvaPNfZt5d9RqKSE.js", - "OBF6r2CsMOEokAsS.js", - "OF4sSVOvHoKuPk7L.js", - "OFViRemr1cpnO3af.js", - "OYLqLl6vikJD8flg.js", - "OYRUSP7Q0Je0jdCY.js", - "On1itZhp0AOzNyyc.js", - "PGHvFHBIygB5pnWT.js", - "PjOi61gB2nSYooLs.js", - "Puv2wLrSVe6b1jLf.js", - "QBBrzcSAe8QqE4WP.js", - "QKt9ZYpVpznncfJ1.js", - "QLBxcP85duX1Z7LX.js", - "QLUaOkwuSPvBp7jU.js", - "R3OfRdi6xv0e9mzB.js", - "RRK91ySi5SzYCRvy.js", - "RUpVgB0czqg95K1Q.js", - "ReJpL0IVesKUbXgj.js", - "RgNdS87nO7RVawuw.js", - "RlVvlmhOfscaJqCd.js", - "RyQtuiRykUCQ6Xag.js", - "S1SQe0Do7ZcuNV5j.js", - "SK8paBvnvc5YLFI1.js", - "SKn61f2ykhzuwMdw.js", - "SjDNjLBGsd9fYObo.js", - "SlrslcNdnYONcSH3.js", - "SlzPn7ONIKab9URj.js", - "SreM9Jyj2XZjoezH.js", - "SwliIjjjFtZMnJH3.js", - "T0KBl8iEkcPq08RI.js", - "T4JEEDYCEIUbVHv4.js", - "TCgEBuMPPd5SLAsc.js", - "TIoUbjOtj7PTK2t8.js", - "TKjBb75exjae87fa.js", - "TSsHcn4EDulD03RU.js", - "TXce477AiXHKbepk.js", - "Td8M5K1P92GbM2IA.js", - "TpgK2aAe93ui3Rbs.js", - "UUHQRPRrrRSr9MIA.js", - "UfkysrAftCs09Fct.js", - "UlygtNPSDlWPIFCI.js", - "UxVfVoH7cbC9ESDr.js", - "V0b4yLTawjCnm9ke.js", - "V4PcjtHde941wv6J.js", - "VGuZMIR1lE8I1F1y.js", - "VOc9sKag2Vy4vGGZ.js", - "VRDS4lkwSAzbtvm4.js", - "VTzpExK3QSCaFQPf.js", - "VbI0Al6rJfypV3qY.js", - "VcE8Hie2jbpuyuM3.js", - "W2rdTwflbUVxFyfd.js", - "W5qtA7Ul5cOj18Nd.js", - "WOpRJluHKER1MdgI.js", - "WaeL2I8VVJmBBKHk.js", - "Wh1VV3javfzcV3bP.js", - "WsN2R1qOzuLa2qyB.js", - "WtbSIghR0q4euE7J.js", - "XPpHYTTT0hqYuSfa.js", - "XSbQKrrbjsN15Zp9.js", - "XfSxXatjEYlPEbaK.js", - "XjUXxUA0hbwjUatW.js", - "XzJotwVUIuQu6b0G.js", - "Y27MmN5KFw45d5vQ.js", - "Y43z8YCohJMA8Ia7.js", - "YDANERWYHyJ2ACeo.js", - "YdiQFkm8j48Xs7gI.js", - "YfRPSgJjvHvl50HW.js", - "YrXhk2YJaWSChMhp.js", - "YsUdMhQ2AArcJIqy.js", - "ZURBQYTYcP5jci5k.js", - "ZfgPAtNKA5KrETer.js", - "Znz4g56UH23SSCg7.js", - "a81IMxqmMtHgYnIF.js", - "aFwNs7TMVF90i9JF.js", - "aPZiVhgwR0Xql6AM.js", - "aRvJUcgYqhRmmWYC.js", - "aedzdFyjI80Ah3qC.js", - "b4CIeJF2L4E1qikC.js", - "b787rIfyHF5LnALd.js", - "b8XFmEUu1d2YNQ7F.js", - "bDS62ctjfnTU4xIu.js", - "bNhpJPWwoHLq68zD.js", - "bT4gLrE3W36DIP4k.js", - "bgLeMqihLya2iobP.js", - "bidoOQSAofp4NPf6.js", - "bkbWgG9COvZWZbAX.js", - "c7HTWfg3CbjN9e1M.js", - "c9xxdOCaQSwooK8n.js", - "cC7jjJDSVPi5BJUq.js", - "cW8ZuQ9YIUG5uvhf.js", - "cZVrzR4fxV86lxNW.js", - "cipTp0OS2bfKLjZS.js", - "clO7l82UYMJ4XVks.js", - "cxgGYbuiXM3NxIOI.js", - "czZI8S09By0Mqlsr.js", - "dEx8xfG7VLbN69Ha.js", - "dMeSZGdvw7zlnUKh.js", - "dVF5ywnzeiZQx9ke.js", - "dr9VJKGY3TeGuzXj.js", - "dxt3p07po06J9fO1.js", - "e0eKVlOSk3Vw1HiD.js", - "e2JlsKoW8oaFjn6Y.js", - "e3dBud1keWyhw6nw.js", - "eC61buStv62b3sN9.js", - "eIiiDhJohYez26qY.js", - "eLxdRg8LX3AdYSEq.js", - "ePv2YYcr4lz3AkGu.js", - "eRVVn8YtU8nnOW2q.js", - "eTHJSRutCEpuyPkR.js", - "eViKAYOtuaOqo6c7.js", - "eWvHTkxsjKuH2IKm.js", - "egc02UIueJgEQMqx.js", - "eieFcF4BxIvDTN3C.js", - "eq32dKXeTAbKhhLf.js", - "eu4mHsdZukvUEAGJ.js", - "eyrUJQAuHvdllCwi.js", - "fA1dIV1ANo4RVEqy.js", - "fC4KcY9S6V30IJyX.js", - "fLg90csmdOOKmEE6.js", - "fSDFCHAo97RLpwGU.js", - "fUD4gMdKe6P3sFdJ.js", - "fq2fqlWlrVfitkcB.js", - "fwiBeetIsvpXKtUc.js", - "fyjYWg7ekj8JJcmq.js", - "g5y0tdoHCDs7cBy7.js", - "gQJJaxbN83KSgi36.js", - "gSDhsSB8573joL64.js", - "gull3qgCahzk2xYu.js", - "h4lnexDYAhyQuiR5.js", - "h8JqPMh2mM2uhpxk.js", - "hEDuYAgc1O1zG3Rr.js", - "hL3JUSY3xMA4zj2Q.js", - "hO2CFW9hygGSYuJ2.js", - "hTsnYKgw0kK10PiC.js", - "hadXFC43VKyrE9jC.js", - "hg89FU1NAp8tIsgO.js", - "hpbraeEbjkXnmD75.js", - "hqMwzPozAVTzoCxa.js", - "i93PGV1lDSdi3BJu.js", - "iH9o7t8vGDn6pm1d.js", - "ij3BLXzNk7eZ3V95.js", - "iuoVkjFdL1rHdbqR.js", - "ivxpmCKu3pEMG05c.js", - "jFKnf2UdoxAQx76R.js", - "jOCLEsjNzERyVLsP.js", - "jOSCsBRUO117spv8.js", - "jb1ouw0eIBVy3Wwg.js", - "jvNuIbOtB46p0esq.js", - "k1Wdehpgdc0hP63E.js", - "k465TgRelwcSUdS2.js", - "k5792iKWEqKmVZMk.js", - "kY50G53IXdNXX9Sc.js", - "kYTEqcs8JpO2OmB9.js", - "kiolpXGbkmxfPiuI.js", - "knq8lNYLw0v757dQ.js", - "kvqJbHBvFr6iGLcI.js", - "lDIWlQvD6MGyP3QP.js", - "lG5lfAzNuM4t0rpM.js", - "lMRsQRgjMexY9dxE.js", - "laWHBP2jLrVxcgp9.js", - "lmBAZCtofsC8hHHG.js", - "luEuwzYCUrch58Bp.js", - "m4eagTrVOXtotonR.js", - "mnvczEiu7gUSWvuV.js", - "n5wowuDE8Dz1uBZn.js", - "n8X4Vgmrs4M5pyHK.js", - "n99CqhPx3uABCU15.js", - "nNwAFEURKlFhPcvA.js", - "nZtN0zM49xTuG86V.js", - "o2QhtiLAmUEpDgBX.js", - "oA197GIqHpU5WR9V.js", - "oHmtdXWVwm7y7BtO.js", - "oQI06eh8mJ9UqETO.js", - "pRp6hoBJ0JQa4NNG.js", - "pdvCwjxHI56EmxuU.js", - "pj7gjxHrnrZonC6U.js", - "ppc8L3WtIx6JzlAd.js", - "pqQkeUVpuZ0jOKnZ.js", - "pvTcazVvW4v04otW.js", - "q5RgoYr12kBF6FA5.js", - "qDYJnO2JosPJrjpz.js", - "qITSQMvvkgj81fW1.js", - "qZ8TBagp2d4dJAqI.js", - "qhjU1QdsfqA8h5iI.js", - "qmGwT929EiZ3lW2x.js", - "qmH61HmrEJcmQTiu.js", - "qyBmkCJo5606o4J9.js", - "rJ8pspSekyDLkiqG.js", - "rgnGu3IQrS8Vj9Op.js", - "roYVcP5Zqcsa8jVw.js", - "s7kW3lm2eU5IPrLP.js", - "s9J1TUkpGdvSWvPO.js", - "s9KcytRE7i0cU06n.js", - "syRJs8P4aBFB5USD.js", - "tHBlC7SpYiQ7SUGo.js", - "tg9N6aUo8WRPKj3H.js", - "tkZ8Ybqu518LQYEn.js", - "tpz88eQFTjWHdFL5.js", - "tyQLkRLk1AXB4g2u.js", - "u46KnlxCjP42F6QY.js", - "u4fKgGFEnOCnvvsv.js", - "uA5qaat5EXzkzltq.js", - "uCJk19rijMPRU8jg.js", - "uEVSUTTam4Z96JJ2.js", - "uMvD2HWFNGqCmrBM.js", - "uRiAvo9fb3U7FIIy.js", - "uZeNKQ24fToJ7qtY.js", - "ulXfbycWUu36vdmS.js", - "vBqrydNzHmEHClqZ.js", - "vNUGuypkhx2P5YIA.js", - "ve3RcfTi49rdYZU0.js", - "vejhfB9aI58iF1vr.js", - "vn13U388mwquGN9y.js", - "vphNSTVxfZjApblV.js", - "vtXJI2VGlU9vODXz.js", - "vzSj3vvPryp02EVC.js", - "w8s2RUzA1jmyu7vy.js", - "wBc8XvkAnv3j93vR.js", - "wFHjQyCR6Wzn6TeQ.js", - "wLg8LbPAPbQgUg0Z.js", - "wb1DpSdIhSqYG5cp.js", - "we6JUzDvybekAbtn.js", - "weDTna1dLMwHsNlJ.js", - "x1Ecj6MXY94kpcQq.js", - "xEE0ymsaH2tn2M99.js", - "xJZKVGE04o84Gibo.js", - "xcny1zYAphdfrKv9.js", - "xkdQhZ9KKqmocNLO.js", - "y7hk7prQ0lLTyv1Y.js", - "y9fwuiqn44t13WAq.js", - "yYNBZjmBnytXpRn3.js", - "yvtF2t9aibxibAIM.js", - "z8W5PAwBR0PXY6ty.js", - "zF1IKmobCB8ea58M.js", - "zGwtyjTUBeSQ110p.js", - "zI5hXv2NLGWqnmDD.js", - "zIErcRiBmIZRbary.js", - "zWZG8OmxqTpzHjFV.js", - "zasFOZohkrdFIBwr.js", - "zjTEhJuLcFVkzory.js" - ], - "total": 1505 + "onlyInFR": [], + "onlyInWFRP4E": [], + "total": 2112 } \ No newline at end of file diff --git a/tools/script-comparison-report.md b/tools/script-comparison-report.md index 3882384..7ede1d9 100644 --- a/tools/script-comparison-report.md +++ b/tools/script-comparison-report.md @@ -1,31 +1,38 @@ # Rapport de comparaison des scripts -Date: 2026-01-06T18:58:40.637Z +Date: 2026-05-17T22:20:07.432Z ## Résumé -- **Total de fichiers communs**: 1505 -- **Scripts identiques**: 671 +- **Total de fichiers communs**: 2112 +- **Scripts identiques**: 1197 - **Scripts nécessitant mise à jour**: 473 -- **Scripts utilisant localize() (obsolètes)**: 361 -- **Scripts uniquement dans FR**: 2 -- **Scripts uniquement dans WFRP4E**: 394 +- **Scripts utilisant localize() (obsolètes)**: 442 +- **Scripts uniquement dans FR**: 0 +- **Scripts uniquement dans WFRP4E**: 0 ## Scripts obsolètes (utilisant localize() dans WFRP4E) Ces scripts peuvent être supprimés du module FR car le système utilise maintenant les fichiers de localisation. - `0FNOq4J1AdPd2A0q.js` - Le système utilise maintenant localize() - script FR obsolète +- `0H2syk6qc0sCY0pj.js` - Le système utilise maintenant localize() - script FR obsolète +- `0NAD1LNcVyAZ1fC7.js` - Le système utilise maintenant localize() - script FR obsolète - `0YKQGbsKdHSmYGE7.js` - Le système utilise maintenant localize() - script FR obsolète +- `0hAbiNR1nFkpFMRz.js` - Le système utilise maintenant localize() - script FR obsolète - `0mrUnxzufYgsR0Ph.js` - Le système utilise maintenant localize() - script FR obsolète +- `11ir8nibM5HD69na.js` - Le système utilise maintenant localize() - script FR obsolète +- `19LL1oevrjmpD8DX.js` - Le système utilise maintenant localize() - script FR obsolète - `1A87vGLh2PXH0rG0.js` - Le système utilise maintenant localize() - script FR obsolète - `1LDSzXeO5CzXgTOc.js` - Le système utilise maintenant localize() - script FR obsolète - `1kB2su7hLRYDhZ2H.js` - Le système utilise maintenant localize() - script FR obsolète - `1mNkLj9JYNr3ofC6.js` - Le système utilise maintenant localize() - script FR obsolète - `1wKVvxRTHOyV4Qdv.js` - Le système utilise maintenant localize() - script FR obsolète +- `20fvE9nJmcfGYVzw.js` - Le système utilise maintenant localize() - script FR obsolète - `22bW97lkvCqisfHX.js` - Le système utilise maintenant localize() - script FR obsolète - `23HgjCB1oecxANvA.js` - Le système utilise maintenant localize() - script FR obsolète - `2AdSBXw7IwCiqawQ.js` - Le système utilise maintenant localize() - script FR obsolète +- `2Ej6LUqn8frTRURo.js` - Le système utilise maintenant localize() - script FR obsolète - `2NLINicPQWbuvp2n.js` - Le système utilise maintenant localize() - script FR obsolète - `2VNnVrtktdGUqXEV.js` - Le système utilise maintenant localize() - script FR obsolète - `2W9uMTT6iJhfQ044.js` - Le système utilise maintenant localize() - script FR obsolète @@ -33,10 +40,14 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `2hzDv8ROulOe1elK.js` - Le système utilise maintenant localize() - script FR obsolète - `2sDH6RvoOAR40oqH.js` - Le système utilise maintenant localize() - script FR obsolète - `2vTVR0quRZQtjNfQ.js` - Le système utilise maintenant localize() - script FR obsolète +- `2zpYzKVDNE5y9RLL.js` - Le système utilise maintenant localize() - script FR obsolète - `3JEzEzF1SeYA9lsV.js` - Le système utilise maintenant localize() - script FR obsolète +- `3LLiSgj6KGtgqcmo.js` - Le système utilise maintenant localize() - script FR obsolète - `3hfMQkUKYI4rCuBy.js` - Le système utilise maintenant localize() - script FR obsolète - `3plV9WFqs2prfAdp.js` - Le système utilise maintenant localize() - script FR obsolète - `3sfD1nedXLzuYoXJ.js` - Le système utilise maintenant localize() - script FR obsolète +- `3uIkDVzxNjzm5qIH.js` - Le système utilise maintenant localize() - script FR obsolète +- `3z3m1pmw03DbQzcb.js` - Le système utilise maintenant localize() - script FR obsolète - `454x3Q95pLvZm0Kx.js` - Le système utilise maintenant localize() - script FR obsolète - `4FGKZk2f0xrmIDnp.js` - Le système utilise maintenant localize() - script FR obsolète - `4ZR7p8G3OzOBWx0L.js` - Le système utilise maintenant localize() - script FR obsolète @@ -46,33 +57,43 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `4rb7LfMq9CTnlrpn.js` - Le système utilise maintenant localize() - script FR obsolète - `52mwb33mGrQjq89B.js` - Le système utilise maintenant localize() - script FR obsolète - `5Fe1ELaS6Gnvy0Cj.js` - Le système utilise maintenant localize() - script FR obsolète +- `5QjaPBFbv5rIYpla.js` - Le système utilise maintenant localize() - script FR obsolète - `5o1XiceC4rutjMms.js` - Le système utilise maintenant localize() - script FR obsolète - `5sI9iYh5j2nx2XyT.js` - Le système utilise maintenant localize() - script FR obsolète +- `63Yh0nrhCLLfzd14.js` - Le système utilise maintenant localize() - script FR obsolète - `6JrUjs3g5x6bFnj3.js` - Le système utilise maintenant localize() - script FR obsolète - `6V3qHON3mcerlBlB.js` - Le système utilise maintenant localize() - script FR obsolète - `6ZS1rQLkNvMDO0Fp.js` - Le système utilise maintenant localize() - script FR obsolète - `6fElmBxTjdAaubbK.js` - Le système utilise maintenant localize() - script FR obsolète +- `6nA5LPXneAahHX2W.js` - Le système utilise maintenant localize() - script FR obsolète - `6qUKKep5vhFYmo1J.js` - Le système utilise maintenant localize() - script FR obsolète - `6tjn0RH4VyOPFneS.js` - Le système utilise maintenant localize() - script FR obsolète - `715G1Bf0haOHvmYQ.js` - Le système utilise maintenant localize() - script FR obsolète +- `7BgJe9YkbHTh3ucm.js` - Le système utilise maintenant localize() - script FR obsolète - `7Ck0fkzE4WQ62qVe.js` - Le système utilise maintenant localize() - script FR obsolète - `7H6wYyJ6cpaoc2QQ.js` - Le système utilise maintenant localize() - script FR obsolète +- `7IuX8wytm33iRGC3.js` - Le système utilise maintenant localize() - script FR obsolète +- `7T3iXgrL72fea67C.js` - Le système utilise maintenant localize() - script FR obsolète +- `7UUS0gX2Pbi0HHiz.js` - Le système utilise maintenant localize() - script FR obsolète - `7VAhXHov6pR1SkgD.js` - Le système utilise maintenant localize() - script FR obsolète - `7e8FgQUF2oANANmx.js` - Le système utilise maintenant localize() - script FR obsolète - `7szLG4VALuuy1cPm.js` - Le système utilise maintenant localize() - script FR obsolète +- `7y89OcMmGbjRMgTg.js` - Le système utilise maintenant localize() - script FR obsolète - `84IB8CWa55XzoAkv.js` - Le système utilise maintenant localize() - script FR obsolète -- `86ivOsBQAuu0UmFg.js` - Le système utilise maintenant localize() - script FR obsolète - `8ByuHnUZ4RNTdGVv.js` - Le système utilise maintenant localize() - script FR obsolète +- `8Gan2EeGExBFSxmp.js` - Le système utilise maintenant localize() - script FR obsolète - `8N3Uqjq1ZxPxo4pk.js` - Le système utilise maintenant localize() - script FR obsolète - `8RNziYGGb4sp3BGQ.js` - Le système utilise maintenant localize() - script FR obsolète - `8ZAUBSH9CM9OTpTL.js` - Le système utilise maintenant localize() - script FR obsolète +- `8qOGotfGFA0HYQ6W.js` - Le système utilise maintenant localize() - script FR obsolète - `93K85NnVwjVNXlZq.js` - Le système utilise maintenant localize() - script FR obsolète +- `9AMoFRATTAfdKlKN.js` - Le système utilise maintenant localize() - script FR obsolète - `9EVj4bmZJex45Mt7.js` - Le système utilise maintenant localize() - script FR obsolète - `9JnPK1jNUEso7Pv8.js` - Le système utilise maintenant localize() - script FR obsolète - `9RFoasDcFnYZ1txR.js` - Le système utilise maintenant localize() - script FR obsolète - `9fK07tqqZyPg7dpx.js` - Le système utilise maintenant localize() - script FR obsolète - `A3fvV69RS1lYgma0.js` - Le système utilise maintenant localize() - script FR obsolète -- `ACgKpKrEEHoNGG0h.js` - Le système utilise maintenant localize() - script FR obsolète +- `A97EV1Yju3aT7Sng.js` - Le système utilise maintenant localize() - script FR obsolète - `AHZ8f7dfN8jNsYk6.js` - Le système utilise maintenant localize() - script FR obsolète - `ALuPRzf85dmkEfLo.js` - Le système utilise maintenant localize() - script FR obsolète - `AMxezwtYnWCF6Oza.js` - Le système utilise maintenant localize() - script FR obsolète @@ -83,6 +104,8 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `BNJRV66jlrp51qZK.js` - Le système utilise maintenant localize() - script FR obsolète - `BtyFhdGMKiMamGhM.js` - Le système utilise maintenant localize() - script FR obsolète - `C4LZnaX0MYgwrszj.js` - Le système utilise maintenant localize() - script FR obsolète +- `C8Q4jf6LSyA3lQHS.js` - Le système utilise maintenant localize() - script FR obsolète +- `C9ARvMauPNwIHj6o.js` - Le système utilise maintenant localize() - script FR obsolète - `CCK1iIfPmB398ziT.js` - Le système utilise maintenant localize() - script FR obsolète - `CiFeduksZJ6PRulx.js` - Le système utilise maintenant localize() - script FR obsolète - `CkE8NZOhzPkuRrKJ.js` - Le système utilise maintenant localize() - script FR obsolète @@ -101,6 +124,8 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `EmXwcuycEH8slEn5.js` - Le système utilise maintenant localize() - script FR obsolète - `EmmG49pMOPHRwDzR.js` - Le système utilise maintenant localize() - script FR obsolète - `Ew3C2WmLCtc1KT46.js` - Le système utilise maintenant localize() - script FR obsolète +- `FKEH7DeqU0FH4dkk.js` - Le système utilise maintenant localize() - script FR obsolète +- `FPQp6XfbUH1BMafj.js` - Le système utilise maintenant localize() - script FR obsolète - `FXuyiJoXdAh6WhRK.js` - Le système utilise maintenant localize() - script FR obsolète - `FYUPfYyTYZkxRLFT.js` - Le système utilise maintenant localize() - script FR obsolète - `FkTwk8hfHpRLbAp2.js` - Le système utilise maintenant localize() - script FR obsolète @@ -111,16 +136,18 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `GbPEy22VuCNzlNv2.js` - Le système utilise maintenant localize() - script FR obsolète - `Gc8S5TYlVdV8NnOT.js` - Le système utilise maintenant localize() - script FR obsolète - `H2CJvApKMnfGNNoo.js` - Le système utilise maintenant localize() - script FR obsolète +- `H7BFq8m8vnkm4Yux.js` - Le système utilise maintenant localize() - script FR obsolète - `HASsi6wYHVALExWq.js` - Le système utilise maintenant localize() - script FR obsolète - `HKhyn0kijKfzW6cw.js` - Le système utilise maintenant localize() - script FR obsolète - `HMC6hPND9DWLFfZE.js` - Le système utilise maintenant localize() - script FR obsolète - `HUKzssLxeQo1wbx9.js` - Le système utilise maintenant localize() - script FR obsolète - `Hcpn1gU58DIKIhty.js` - Le système utilise maintenant localize() - script FR obsolète -- `HdTuY2IGhdlMDOy3.js` - Le système utilise maintenant localize() - script FR obsolète - `HfCxNd7mFGZH4s9Y.js` - Le système utilise maintenant localize() - script FR obsolète - `HfZAQWoY8n3clLlo.js` - Le système utilise maintenant localize() - script FR obsolète +- `Hi005w1Ul17Q8Uty.js` - Le système utilise maintenant localize() - script FR obsolète - `HiMBS6GeOwEydWYN.js` - Le système utilise maintenant localize() - script FR obsolète - `HrOBAXsEX073ReKl.js` - Le système utilise maintenant localize() - script FR obsolète +- `I5DqzmfuTGwyFWLY.js` - Le système utilise maintenant localize() - script FR obsolète - `I7ieW0hNYvvX0KFg.js` - Le système utilise maintenant localize() - script FR obsolète - `I9QAPKbaXwMMMBT4.js` - Le système utilise maintenant localize() - script FR obsolète - `ID8mCcjkl7PCQhDq.js` - Le système utilise maintenant localize() - script FR obsolète @@ -130,6 +157,7 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `J0IWUhxada2ONowP.js` - Le système utilise maintenant localize() - script FR obsolète - `JBoKPBr27C3PMoSD.js` - Le système utilise maintenant localize() - script FR obsolète - `JEbs0WlqhKNDOo5A.js` - Le système utilise maintenant localize() - script FR obsolète +- `JKpC9pVATysq8k4G.js` - Le système utilise maintenant localize() - script FR obsolète - `JQruHprM5R5vZ9DA.js` - Le système utilise maintenant localize() - script FR obsolète - `JeThJbOf6Xmbtgo1.js` - Le système utilise maintenant localize() - script FR obsolète - `JgCcgDVZX54slrWx.js` - Le système utilise maintenant localize() - script FR obsolète @@ -139,11 +167,13 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `JstrA46EYSEuRSy5.js` - Le système utilise maintenant localize() - script FR obsolète - `JyTxUG5dNW670Sf7.js` - Le système utilise maintenant localize() - script FR obsolète - `KIoVBinAZK8sMOqD.js` - Le système utilise maintenant localize() - script FR obsolète +- `KOR8aafB3D4FLoh6.js` - Le système utilise maintenant localize() - script FR obsolète - `KPQfupKuaf4LCv4R.js` - Le système utilise maintenant localize() - script FR obsolète - `KSjsDlsx3DD6cT16.js` - Le système utilise maintenant localize() - script FR obsolète - `KTBVDHUndI3qDOXM.js` - Le système utilise maintenant localize() - script FR obsolète - `KUx0deSF3xNzMucL.js` - Le système utilise maintenant localize() - script FR obsolète - `KkjkYAGI9Em1NgiQ.js` - Le système utilise maintenant localize() - script FR obsolète +- `KxM4zmhQRDHaRybM.js` - Le système utilise maintenant localize() - script FR obsolète - `KyUPYV1RXJxPOfyA.js` - Le système utilise maintenant localize() - script FR obsolète - `L9eAtDyaoHvqryk4.js` - Le système utilise maintenant localize() - script FR obsolète - `LeKLtvEDrWh4yHsx.js` - Le système utilise maintenant localize() - script FR obsolète @@ -155,17 +185,22 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `M0XhKnWjG14pk3iH.js` - Le système utilise maintenant localize() - script FR obsolète - `M2FshTX4PjKFVU8y.js` - Le système utilise maintenant localize() - script FR obsolète - `M9VgeYGiUO97ZUW4.js` - Le système utilise maintenant localize() - script FR obsolète +- `MECRxo8X0cfZh1rx.js` - Le système utilise maintenant localize() - script FR obsolète - `MJB6WbZSF6Briz30.js` - Le système utilise maintenant localize() - script FR obsolète +- `MKxYbHOrv0UuA7JB.js` - Le système utilise maintenant localize() - script FR obsolète - `MMv2B8TH7jxNCtdl.js` - Le système utilise maintenant localize() - script FR obsolète -- `MMx8f5uJ15XOgJGg.js` - Le système utilise maintenant localize() - script FR obsolète - `MSJWJEUrX7ZmMvAD.js` - Le système utilise maintenant localize() - script FR obsolète +- `MWtT4Mhf7F1hqemx.js` - Le système utilise maintenant localize() - script FR obsolète - `Mp8UjuCLa9jdzhBS.js` - Le système utilise maintenant localize() - script FR obsolète - `N9kA46ZQ9LiRjy6T.js` - Le système utilise maintenant localize() - script FR obsolète - `NDvNGATDM2xPFJK0.js` - Le système utilise maintenant localize() - script FR obsolète +- `NTFpkiGyBpOtrV0s.js` - Le système utilise maintenant localize() - script FR obsolète - `NkqtQaLEGYst0PUO.js` - Le système utilise maintenant localize() - script FR obsolète - `NnA4zpuO6iUXKhH7.js` - Le système utilise maintenant localize() - script FR obsolète - `NnDq4miIPNEtZUWb.js` - Le système utilise maintenant localize() - script FR obsolète - `Np8P8IPT2GYlrh6G.js` - Le système utilise maintenant localize() - script FR obsolète +- `O1FwJHbDqZHwaYK8.js` - Le système utilise maintenant localize() - script FR obsolète +- `OFViRemr1cpnO3af.js` - Le système utilise maintenant localize() - script FR obsolète - `OeCgX3hIsfLfmGvC.js` - Le système utilise maintenant localize() - script FR obsolète - `OgSI0Z6SHjYuqKIz.js` - Le système utilise maintenant localize() - script FR obsolète - `OqLKL0PiCvYH2QxW.js` - Le système utilise maintenant localize() - script FR obsolète @@ -173,22 +208,30 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `PMISUsaEDBA7D3od.js` - Le système utilise maintenant localize() - script FR obsolète - `PMNjdEAusVBfam09.js` - Le système utilise maintenant localize() - script FR obsolète - `PVjaKAHTKDA0rA9J.js` - Le système utilise maintenant localize() - script FR obsolète +- `PWHKisZTZEgCANd8.js` - Le système utilise maintenant localize() - script FR obsolète - `PdClojv7yNgQpOUc.js` - Le système utilise maintenant localize() - script FR obsolète - `PoNnT5EqvLj2r5yf.js` - Le système utilise maintenant localize() - script FR obsolète - `Q4EQgP4gZR8TTm7S.js` - Le système utilise maintenant localize() - script FR obsolète - `Q5gh5Y9dCdclcwsD.js` - Le système utilise maintenant localize() - script FR obsolète - `Q9EmlWmuDac83cJw.js` - Le système utilise maintenant localize() - script FR obsolète +- `QBBrzcSAe8QqE4WP.js` - Le système utilise maintenant localize() - script FR obsolète - `QPVVDPcJ4Xi5FmQl.js` - Le système utilise maintenant localize() - script FR obsolète - `QQ2gHThZHdO4yLLX.js` - Le système utilise maintenant localize() - script FR obsolète - `QfTBRGXVfwQSghmd.js` - Le système utilise maintenant localize() - script FR obsolète - `RDtJXji3hgcKnEBk.js` - Le système utilise maintenant localize() - script FR obsolète - `RHyBLYT5oHf7EPnG.js` - Le système utilise maintenant localize() - script FR obsolète - `RNr9CwyvLhlnwD2h.js` - Le système utilise maintenant localize() - script FR obsolète +- `RQPe7k09QdAyws67.js` - Le système utilise maintenant localize() - script FR obsolète +- `RlVvlmhOfscaJqCd.js` - Le système utilise maintenant localize() - script FR obsolète +- `Rmk3UwD0zz4HlTHR.js` - Le système utilise maintenant localize() - script FR obsolète - `RprZWlnopSqZt7KZ.js` - Le système utilise maintenant localize() - script FR obsolète - `RrchOMpEdIvceJxl.js` - Le système utilise maintenant localize() - script FR obsolète +- `SK8paBvnvc5YLFI1.js` - Le système utilise maintenant localize() - script FR obsolète - `SNjG7IvgQzvCGczR.js` - Le système utilise maintenant localize() - script FR obsolète +- `SdZ7xAEzJGVDCsaI.js` - Le système utilise maintenant localize() - script FR obsolète - `SrCHfOJFZwDickqa.js` - Le système utilise maintenant localize() - script FR obsolète - `T3RfSt3VMEat3iDD.js` - Le système utilise maintenant localize() - script FR obsolète +- `TIoUbjOtj7PTK2t8.js` - Le système utilise maintenant localize() - script FR obsolète - `TOyQLrugFGzwc5nY.js` - Le système utilise maintenant localize() - script FR obsolète - `TU2xjbJ0zFtytF3J.js` - Le système utilise maintenant localize() - script FR obsolète - `TdjlJro0RRVSh8g8.js` - Le système utilise maintenant localize() - script FR obsolète @@ -205,24 +248,31 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `UaImulhbPURkLJg2.js` - Le système utilise maintenant localize() - script FR obsolète - `UsAHQecRlWL5PhP6.js` - Le système utilise maintenant localize() - script FR obsolète - `UvycHOjSPm5Zv9KJ.js` - Le système utilise maintenant localize() - script FR obsolète +- `Ux7L2VL2fYfITST6.js` - Le système utilise maintenant localize() - script FR obsolète +- `UxVfVoH7cbC9ESDr.js` - Le système utilise maintenant localize() - script FR obsolète +- `V4PcjtHde941wv6J.js` - Le système utilise maintenant localize() - script FR obsolète - `VAs1nXvicdQK18Do.js` - Le système utilise maintenant localize() - script FR obsolète - `VCnNWmRBH28Rx0JH.js` - Le système utilise maintenant localize() - script FR obsolète +- `VGuZMIR1lE8I1F1y.js` - Le système utilise maintenant localize() - script FR obsolète - `VNOKTzCrFbZ6PJUj.js` - Le système utilise maintenant localize() - script FR obsolète - `VQaC6ynouW5EQCbC.js` - Le système utilise maintenant localize() - script FR obsolète -- `VbL0TgaBAmYjrezZ.js` - Le système utilise maintenant localize() - script FR obsolète +- `VbI0Al6rJfypV3qY.js` - Le système utilise maintenant localize() - script FR obsolète - `VlFUDaKUYoBYKYn0.js` - Le système utilise maintenant localize() - script FR obsolète - `VlHuDIAvPr8JM1P5.js` - Le système utilise maintenant localize() - script FR obsolète - `Vns6WrafVq8NjX7t.js` - Le système utilise maintenant localize() - script FR obsolète - `VqTrKPtxv9hpn0Hr.js` - Le système utilise maintenant localize() - script FR obsolète - `VurA2XNqC0d9U49C.js` - Le système utilise maintenant localize() - script FR obsolète - `VzO0ZDcTWvaBn4vm.js` - Le système utilise maintenant localize() - script FR obsolète +- `W2rdTwflbUVxFyfd.js` - Le système utilise maintenant localize() - script FR obsolète +- `WOpRJluHKER1MdgI.js` - Le système utilise maintenant localize() - script FR obsolète - `WTRYAEzwxRuGENyI.js` - Le système utilise maintenant localize() - script FR obsolète - `Wqff6ICWYzvLDYC8.js` - Le système utilise maintenant localize() - script FR obsolète - `XClTZOjuhcxWLF51.js` - Le système utilise maintenant localize() - script FR obsolète - `Xf4FcZ4ZLdWmOXBa.js` - Le système utilise maintenant localize() - script FR obsolète - `XuFxKPYheYF4WMmQ.js` - Le système utilise maintenant localize() - script FR obsolète +- `XzJotwVUIuQu6b0G.js` - Le système utilise maintenant localize() - script FR obsolète +- `Y27MmN5KFw45d5vQ.js` - Le système utilise maintenant localize() - script FR obsolète - `YDqpKJVy8ijEKdLX.js` - Le système utilise maintenant localize() - script FR obsolète -- `YEBw2CzHYxsTpTy5.js` - Le système utilise maintenant localize() - script FR obsolète - `YFSgWRXel0bWE3EE.js` - Le système utilise maintenant localize() - script FR obsolète - `YMaxpXnml01bLGpO.js` - Le système utilise maintenant localize() - script FR obsolète - `YhhiWEQbox3WZA3Q.js` - Le système utilise maintenant localize() - script FR obsolète @@ -236,10 +286,14 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `a4Aza4a9v8JMU8dC.js` - Le système utilise maintenant localize() - script FR obsolète - `a6gacHsvgwtsIFSQ.js` - Le système utilise maintenant localize() - script FR obsolète - `aAvJrAKLzXhS9qN6.js` - Le système utilise maintenant localize() - script FR obsolète +- `abcQMF1LW27qA98R.js` - Le système utilise maintenant localize() - script FR obsolète - `afdmOvPGMpEdZvCb.js` - Le système utilise maintenant localize() - script FR obsolète - `b5prg1FLjCAvBjLy.js` - Le système utilise maintenant localize() - script FR obsolète +- `bDS62ctjfnTU4xIu.js` - Le système utilise maintenant localize() - script FR obsolète +- `bHxGutf5lZy0kciK.js` - Le système utilise maintenant localize() - script FR obsolète - `bh2qDCKiAIWM0UPi.js` - Le système utilise maintenant localize() - script FR obsolète - `bhXUW7IJtEaUGAoV.js` - Le système utilise maintenant localize() - script FR obsolète +- `bidoOQSAofp4NPf6.js` - Le système utilise maintenant localize() - script FR obsolète - `bwx9wuEOJPF7btD1.js` - Le système utilise maintenant localize() - script FR obsolète - `c3KA1knL2NYNUEww.js` - Le système utilise maintenant localize() - script FR obsolète - `cAKqUBuJBsU85erO.js` - Le système utilise maintenant localize() - script FR obsolète @@ -247,7 +301,9 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `cV9JiAgUPOeUHKnS.js` - Le système utilise maintenant localize() - script FR obsolète - `cqYgZQk1C3kMARy5.js` - Le système utilise maintenant localize() - script FR obsolète - `dAMtbn3uQwF8KpKU.js` - Le système utilise maintenant localize() - script FR obsolète +- `dEx8xfG7VLbN69Ha.js` - Le système utilise maintenant localize() - script FR obsolète - `dSmRhZ6o1bUcOSF9.js` - Le système utilise maintenant localize() - script FR obsolète +- `dVF5ywnzeiZQx9ke.js` - Le système utilise maintenant localize() - script FR obsolète - `dXGosSxdoYbET2O8.js` - Le système utilise maintenant localize() - script FR obsolète - `dfEgat3jz4EtWszH.js` - Le système utilise maintenant localize() - script FR obsolète - `dfnCK8jCPXNLM7Gh.js` - Le système utilise maintenant localize() - script FR obsolète @@ -256,26 +312,35 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `dtFvpY96RPzNnphq.js` - Le système utilise maintenant localize() - script FR obsolète - `dwSgcFxKN3S0hLJL.js` - Le système utilise maintenant localize() - script FR obsolète - `eGQAyzCFZAEQhyJl.js` - Le système utilise maintenant localize() - script FR obsolète +- `ePv2YYcr4lz3AkGu.js` - Le système utilise maintenant localize() - script FR obsolète +- `eViKAYOtuaOqo6c7.js` - Le système utilise maintenant localize() - script FR obsolète +- `ecpD6KWtNjMCvuyn.js` - Le système utilise maintenant localize() - script FR obsolète - `f062aa2BNClx08D6.js` - Le système utilise maintenant localize() - script FR obsolète - `f3rXusHh6VIpVPUl.js` - Le système utilise maintenant localize() - script FR obsolète - `f5Mp3kXwCFdPkW6N.js` - Le système utilise maintenant localize() - script FR obsolète - `fKzlu6fFE2th9uIJ.js` - Le système utilise maintenant localize() - script FR obsolète - `fP2edYbj6QjPPAjL.js` - Le système utilise maintenant localize() - script FR obsolète +- `fWNVINMVhEwf8k5b.js` - Le système utilise maintenant localize() - script FR obsolète - `fYLSe6CrYciap5y8.js` - Le système utilise maintenant localize() - script FR obsolète - `g07HI7vyqiFXPB0o.js` - Le système utilise maintenant localize() - script FR obsolète +- `g5y0tdoHCDs7cBy7.js` - Le système utilise maintenant localize() - script FR obsolète - `gFUXBbTskQBKjxqm.js` - Le système utilise maintenant localize() - script FR obsolète - `gKPL3t4vlZAsvtGr.js` - Le système utilise maintenant localize() - script FR obsolète +- `gPt4hUnaNqE5rVYF.js` - Le système utilise maintenant localize() - script FR obsolète - `gnVpxOeBZpNF4HIF.js` - Le système utilise maintenant localize() - script FR obsolète - `gqZLfIr6svrtdwdC.js` - Le système utilise maintenant localize() - script FR obsolète - `gu72JaTs9GrSiVTd.js` - Le système utilise maintenant localize() - script FR obsolète - `h0DfPwUUOBjyAHMZ.js` - Le système utilise maintenant localize() - script FR obsolète - `h1XKoMuVnS0bagRO.js` - Le système utilise maintenant localize() - script FR obsolète - `hDC6lroDEPVBituR.js` - Le système utilise maintenant localize() - script FR obsolète +- `hEDuYAgc1O1zG3Rr.js` - Le système utilise maintenant localize() - script FR obsolète - `hR1qD2kpFHF8JT8h.js` - Le système utilise maintenant localize() - script FR obsolète +- `hg89FU1NAp8tIsgO.js` - Le système utilise maintenant localize() - script FR obsolète - `hnsmzvcuiUYB065I.js` - Le système utilise maintenant localize() - script FR obsolète - `iM6JLF8jDXMViReZ.js` - Le système utilise maintenant localize() - script FR obsolète - `iT0h3VZLEBQnn5Bx.js` - Le système utilise maintenant localize() - script FR obsolète - `iT3C15fMyQrj1RmG.js` - Le système utilise maintenant localize() - script FR obsolète +- `jOCLEsjNzERyVLsP.js` - Le système utilise maintenant localize() - script FR obsolète - `jRSgPhpfN7MH7TTp.js` - Le système utilise maintenant localize() - script FR obsolète - `jgO1Kf60Ctt6R0qO.js` - Le système utilise maintenant localize() - script FR obsolète - `jpcU8FFWSlQ3gD0L.js` - Le système utilise maintenant localize() - script FR obsolète @@ -285,18 +350,21 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `kMSdRskYDI2J1gnp.js` - Le système utilise maintenant localize() - script FR obsolète - `kWynO1lQzjiSs8RK.js` - Le système utilise maintenant localize() - script FR obsolète - `kYiDBPRKIokFkr4Z.js` - Le système utilise maintenant localize() - script FR obsolète -- `kYmscP2HuXjDovBD.js` - Le système utilise maintenant localize() - script FR obsolète - `kkC5EhqA05U6U0gU.js` - Le système utilise maintenant localize() - script FR obsolète - `kmsGLWGxCY8Z8jVG.js` - Le système utilise maintenant localize() - script FR obsolète +- `knxDGP1YLbnPk03o.js` - Le système utilise maintenant localize() - script FR obsolète - `l1ntrpa8RE3Lg5xE.js` - Le système utilise maintenant localize() - script FR obsolète - `l8qFKSnMpy4P7XQR.js` - Le système utilise maintenant localize() - script FR obsolète +- `lMRsQRgjMexY9dxE.js` - Le système utilise maintenant localize() - script FR obsolète - `lPudo1grrVp05i7a.js` - Le système utilise maintenant localize() - script FR obsolète +- `lQOu46YmOiQNhCZR.js` - Le système utilise maintenant localize() - script FR obsolète - `lYYkGzqNshiYc7WI.js` - Le système utilise maintenant localize() - script FR obsolète - `lhemR8EP5tGNKout.js` - Le système utilise maintenant localize() - script FR obsolète +- `m4eagTrVOXtotonR.js` - Le système utilise maintenant localize() - script FR obsolète - `mTnmPcjWmvScIBWY.js` - Le système utilise maintenant localize() - script FR obsolète - `mYL4i1vNlMl4vFYy.js` - Le système utilise maintenant localize() - script FR obsolète - `mr8qm5Bg6k1idZ6Q.js` - Le système utilise maintenant localize() - script FR obsolète -- `mziJBUYcsrhkdcCJ.js` - Le système utilise maintenant localize() - script FR obsolète +- `n5wowuDE8Dz1uBZn.js` - Le système utilise maintenant localize() - script FR obsolète - `nD2QVg3DrPK3foMf.js` - Le système utilise maintenant localize() - script FR obsolète - `nEaF3jbCiVYD8jia.js` - Le système utilise maintenant localize() - script FR obsolète - `nIOeK0BrtdZeZW8X.js` - Le système utilise maintenant localize() - script FR obsolète @@ -314,16 +382,20 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `pNPjXEoQGHLKzq0r.js` - Le système utilise maintenant localize() - script FR obsolète - `pq1YQffxtOcqCRTn.js` - Le système utilise maintenant localize() - script FR obsolète - `pzknBcJtZWeliE27.js` - Le système utilise maintenant localize() - script FR obsolète +- `qDYJnO2JosPJrjpz.js` - Le système utilise maintenant localize() - script FR obsolète - `qTk96NKh14YOIShf.js` - Le système utilise maintenant localize() - script FR obsolète - `qaVde0sTuMBRi2nl.js` - Le système utilise maintenant localize() - script FR obsolète +- `qggycOtvFfaBr4Ax.js` - Le système utilise maintenant localize() - script FR obsolète - `qijgjcOBCDmhglRX.js` - Le système utilise maintenant localize() - script FR obsolète - `quPcuKsq2fcild4a.js` - Le système utilise maintenant localize() - script FR obsolète - `qzGPJflVW7c2Ciim.js` - Le système utilise maintenant localize() - script FR obsolète +- `rJ8pspSekyDLkiqG.js` - Le système utilise maintenant localize() - script FR obsolète - `rXMylpnEtZpwou6x.js` - Le système utilise maintenant localize() - script FR obsolète +- `rXuOTYAOHCiW167c.js` - Le système utilise maintenant localize() - script FR obsolète +- `rdD6Ra954TlkzQCu.js` - Le système utilise maintenant localize() - script FR obsolète - `red2bt4PGgIWAdTR.js` - Le système utilise maintenant localize() - script FR obsolète - `rlTvhnDpj4lzfusf.js` - Le système utilise maintenant localize() - script FR obsolète - `rnioLwiJP7ps5Jwy.js` - Le système utilise maintenant localize() - script FR obsolète -- `roKvPHDSpX4IV11C.js` - Le système utilise maintenant localize() - script FR obsolète - `rr4htuVq45onXdRG.js` - Le système utilise maintenant localize() - script FR obsolète - `rxB1AqfVMDqTRieE.js` - Le système utilise maintenant localize() - script FR obsolète - `s7gJQdzuM3fz2zQK.js` - Le système utilise maintenant localize() - script FR obsolète @@ -337,22 +409,30 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `tDrs0aNIYmZPsOoS.js` - Le système utilise maintenant localize() - script FR obsolète - `tG1qGqzBLmAR3WHm.js` - Le système utilise maintenant localize() - script FR obsolète - `tcZug8ehU6lyYBd9.js` - Le système utilise maintenant localize() - script FR obsolète +- `tki0DhoTecjq3LyZ.js` - Le système utilise maintenant localize() - script FR obsolète - `tn6SwmjAuNzqE6dx.js` - Le système utilise maintenant localize() - script FR obsolète - `tnE8LF6E3svIlLca.js` - Le système utilise maintenant localize() - script FR obsolète - `tnilBagajWM8UGQt.js` - Le système utilise maintenant localize() - script FR obsolète - `tolkNN5P7oOC8GKZ.js` - Le système utilise maintenant localize() - script FR obsolète - `tuIsytv3jl2yAIb2.js` - Le système utilise maintenant localize() - script FR obsolète +- `uA5qaat5EXzkzltq.js` - Le système utilise maintenant localize() - script FR obsolète - `uACa6u4JLNMRgFlr.js` - Le système utilise maintenant localize() - script FR obsolète - `uSwkYENTOcnfRrqA.js` - Le système utilise maintenant localize() - script FR obsolète +- `ulXfbycWUu36vdmS.js` - Le système utilise maintenant localize() - script FR obsolète - `upfK6GM33qZCZjll.js` - Le système utilise maintenant localize() - script FR obsolète - `uwdQvZtzy2HVeEzx.js` - Le système utilise maintenant localize() - script FR obsolète - `ux3jaLpAUhZ5YqA6.js` - Le système utilise maintenant localize() - script FR obsolète - `v6LIG7EwWYALxCpP.js` - Le système utilise maintenant localize() - script FR obsolète +- `vFUVWZ1l8wpTjLcx.js` - Le système utilise maintenant localize() - script FR obsolète +- `ve3RcfTi49rdYZU0.js` - Le système utilise maintenant localize() - script FR obsolète - `vj3zArmX27vCxYJW.js` - Le système utilise maintenant localize() - script FR obsolète - `vvdo1NxjmGVkmFCT.js` - Le système utilise maintenant localize() - script FR obsolète +- `vwsrPDuVxeNOtdhA.js` - Le système utilise maintenant localize() - script FR obsolète - `vzMxIDjRlQSxXtCW.js` - Le système utilise maintenant localize() - script FR obsolète - `w4JKuTECFmu3YmTR.js` - Le système utilise maintenant localize() - script FR obsolète +- `wKIGVpPddx7Y3SQH.js` - Le système utilise maintenant localize() - script FR obsolète - `wS6OIR3QN4mOUHn0.js` - Le système utilise maintenant localize() - script FR obsolète +- `we6JUzDvybekAbtn.js` - Le système utilise maintenant localize() - script FR obsolète - `wsqNM4NHnwaAAQym.js` - Le système utilise maintenant localize() - script FR obsolète - `wzkxiKjxVEeNS1di.js` - Le système utilise maintenant localize() - script FR obsolète - `x2RLUUNB7BiIDYCP.js` - Le système utilise maintenant localize() - script FR obsolète @@ -365,8 +445,8 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `xvH4PKJasHcehOZz.js` - Le système utilise maintenant localize() - script FR obsolète - `yIGItnshXI4W46cp.js` - Le système utilise maintenant localize() - script FR obsolète - `yRRzSKlcN3L7rEEe.js` - Le système utilise maintenant localize() - script FR obsolète -- `yXUPiWuQ5o0JBY4i.js` - Le système utilise maintenant localize() - script FR obsolète - `yatUu0cd7iKs50rq.js` - Le système utilise maintenant localize() - script FR obsolète +- `yvtF2t9aibxibAIM.js` - Le système utilise maintenant localize() - script FR obsolète - `z5HfNUrHy5MS3K7a.js` - Le système utilise maintenant localize() - script FR obsolète - `zA6TDttpwMSMl7D8.js` - Le système utilise maintenant localize() - script FR obsolète - `zFYCaGR0wbFWjl4T.js` - Le système utilise maintenant localize() - script FR obsolète @@ -374,6 +454,7 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - `zR4WAjzXHTZuiu5G.js` - Le système utilise maintenant localize() - script FR obsolète - `zY4ZjY7uyKIKMYmX.js` - Le système utilise maintenant localize() - script FR obsolète - `ziG9H5Kdb7xC3dFE.js` - Le système utilise maintenant localize() - script FR obsolète +- `zjTEhJuLcFVkzory.js` - Le système utilise maintenant localize() - script FR obsolète - `zsiV6XEHlCNGLLPl.js` - Le système utilise maintenant localize() - script FR obsolète - `zzk2uRSFjFHB5kjw.js` - Le système utilise maintenant localize() - script FR obsolète @@ -382,132 +463,140 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte ### 03mJu59V4iByWlsO.js - Taille WFRP4E: 1153 octets -- Taille FR: 1201 octets -- Textes FR:

    ${this.actor.prototypeToken.name} : -

      -
    • Reçoit 3 états Empoisonnés, sans Test de Résistance possible
    • -
    • Récupère ${this.actor.system.characteristics.t.bonus} Blessures
    • -
    • Acuiert le Trait de Creature Régénération.
    • -
    - C - -### 0BP5l7bIkf744G1k.js - -- Taille WFRP4E: 70 octets -- Taille FR: 70 octets +- Taille FR: 1215 octets ### 0FWto1oEr3jbWggw.js - Taille WFRP4E: 789 octets -- Taille FR: 766 octets +- Taille FR: 812 octets - Textes WFRP4E: Could not find ${lore} spell. Try Again - Textes FR: Impossible de trouver le sort ${lore}. Essayez à nouveau ### 0R0QAr3D024kWPfo.js - Taille WFRP4E: 552 octets -- Taille FR: 589 octets +- Taille FR: 577 octets - Textes WFRP4E: Mutation table not found, please ensure a table with the , Item could not be found: , ${item.name} added -- Textes FR: La table des Mutations n, L, ${item.name} added +- Textes FR: Table de Mutation introuvable, veuillez vous assurer qu, Impossible de trouver l, ${item.name} added ### 0Uly7OmkH0zqYbxQ.js - Taille WFRP4E: 584 octets -- Taille FR: 585 octets +- Taille FR: 579 octets - Textes WFRP4E: Dropped ${dropped.map(i => i.name).join( - Textes FR: Lache ${dropped.map(i => i.name).join( ### 0abwNjpzo3SbEOeO.js - Taille WFRP4E: 267 octets -- Taille FR: 270 octets +- Taille FR: 267 octets -### 0yyofYHeDRQlFliO.js +### 0amHqfjTRp5ff6Op.js -- Taille WFRP4E: 68 octets -- Taille FR: 68 octets +- Taille WFRP4E: 150 octets +- Taille FR: 153 octets -### 11uCC0mK2uL783al.js +### 0hgTyeaEhMBLwzUn.js -- Taille WFRP4E: 134 octets -- Taille FR: 133 octets +- Taille WFRP4E: 229 octets +- Taille FR: 229 octets + +### 0jTqyz0wRlK6XPF7.js + +- Taille WFRP4E: 112 octets +- Taille FR: 112 octets + +### 0uUxvBLJC76WIIBC.js + +- Taille WFRP4E: 179 octets +- Taille FR: 181 octets + +### 0wR0LWpfhLFA240I.js + +- Taille WFRP4E: 219 octets +- Taille FR: 233 octets + +### 18MeEQ0As3JvER71.js + +- Taille WFRP4E: 244 octets +- Taille FR: 242 octets +- Textes WFRP4E: EFFECT.CreatureBackInWater, EFFECT.CreatureOutOfWater +- Textes FR: Effet.CreatureBackInWater, Effet.CreatureOutOfWater ### 190PHSHKGaJ74wsR.js - Taille WFRP4E: 1169 octets -- Taille FR: 1060 octets +- Taille FR: 1191 octets ### 1BT0MWM2cbhlEnrn.js - Taille WFRP4E: 1169 octets -- Taille FR: 1176 octets +- Taille FR: 1140 octets - Textes WFRP4E: Could not find ${talent} - Textes FR: Impossible de trouver ${talent} ### 1CeYp5MlPcH68UIw.js - Taille WFRP4E: 2481 octets -- Taille FR: 2498 octets +- Taille FR: 2500 octets - Textes WFRP4E: Could not find ${talent}, Could not find ${trapping} -- Textes FR: Impossible de trouver ${talent}, Impossible de trouver ${trapping} +- Textes FR: Impossible de trouver ${talent}, Could not find ${trapping} -### 1JwxZujbDcueLWBL.js +### 1Du4e27M8WgP2iui.js -- Taille WFRP4E: 162 octets -- Taille FR: 168 octets +- Taille WFRP4E: 352 octets +- Taille FR: 342 octets +- Textes WFRP4E: Blinded while wearing the ${this.item.name} +- Textes FR: Aveuglé en portant ${this.item.name} -### 1OpT3CXs07XFWWCT.js +### 1UvL0XA1EpQtjDNn.js -- Taille WFRP4E: 30 octets -- Taille FR: 30 octets +- Taille WFRP4E: 237 octets +- Taille FR: 245 octets ### 1ZArMNUI8qqH6zkX.js - Taille WFRP4E: 247 octets -- Taille FR: 242 octets +- Taille FR: 240 octets ### 1exiWlVUHsXDLLAH.js - Taille WFRP4E: 62 octets -- Taille FR: 70 octets +- Taille FR: 75 octets - Textes WFRP4E: Cannot enter ${this.effect.name}! -- Textes FR: Ne peut saisir ${this.effect.name}! +- Textes FR: Impossible d ### 1fQr1Dg7DX0vfz3r.js - Taille WFRP4E: 134 octets -- Taille FR: 145 octets -- Textes FR: Soins de ${healed} Blessures +- Taille FR: 138 octets ### 1jQq9v8fXK8zuEBU.js - Taille WFRP4E: 853 octets -- Taille FR: 863 octets - -### 1l7Jz2ZHbAWko7Vm.js - -- Taille WFRP4E: 33 octets -- Taille FR: 33 octets +- Taille FR: 857 octets ### 1wrPvP6lJwIAfmsl.js - Taille WFRP4E: 362 octets -- Taille FR: 371 octets +- Taille FR: 370 octets -### 1yOvw74jzFfaI87b.js +### 23PDHNZEnihcEvdK.js -- Taille WFRP4E: 27 octets -- Taille FR: 27 octets +- Taille WFRP4E: 310 octets +- Taille FR: 334 octets -### 23vWiHUjxtRQ3Efz.js +### 2EAYX5G9Fh3HJwiP.js -- Taille WFRP4E: 219 octets -- Taille FR: 218 octets +- Taille WFRP4E: 134 octets +- Taille FR: 139 octets +- Textes WFRP4E: Removed Broken. +- Textes FR: Etat Brisé supprimé. -### 2AOo7KUyzMrgIlgM.js +### 2QB0LjueuJcIaHaC.js -- Taille WFRP4E: 137 octets -- Taille FR: 129 octets +- Taille WFRP4E: 352 octets +- Taille FR: 359 octets ### 2Qi1hwLYhdE6v6Hs.js @@ -516,41 +605,48 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte - Textes WFRP4E: Cannot Dodge! - Textes FR: Impossible d +### 2Yh4vQm0ZJukRH1x.js + +- Taille WFRP4E: 49 octets +- Taille FR: 50 octets + ### 2cKarG9ToyW2ptCd.js - Taille WFRP4E: 338 octets -- Taille FR: 340 octets +- Taille FR: 339 octets - Textes WFRP4E: None left! -- Textes FR: Vide ! +- Textes FR: Plus rien ! ### 2rzxQlL7A9ujZ9uK.js -- Taille WFRP4E: 315 octets -- Taille FR: 316 octets +- Taille WFRP4E: 318 octets +- Taille FR: 318 octets - Textes WFRP4E: ${this.effect.name}: Gained ${this.item.Advances} Advantage -- Textes FR: ${this.effect.name}: Gain de ${this.item.Advances} Avantages +- Textes FR: ${this.effect.name}: Gain de ${this.item.Advances} Avantage(s) -### 2yctEihGmdCfTTVx.js +### 2uyajbon5QX1CewS.js -- Taille WFRP4E: 88 octets -- Taille FR: 63 octets +- Taille WFRP4E: 44 octets +- Taille FR: 47 octets ### 2zeP2nMSURjxrqYz.js - Taille WFRP4E: 282 octets -- Taille FR: 302 octets +- Taille FR: 290 octets - Textes WFRP4E: No effect at 0 Wounds, Healed ${this.actor.characteristics.t.bonus} Wounds - Textes FR: Aucun effet à 0 Blessures, Soin de ${this.actor.characteristics.t.bonus} Blessures -### 33US8YRgaMqYu2We.js +### 39mmD9wOsHWas3cl.js -- Taille WFRP4E: 29 octets -- Taille FR: 29 octets +- Taille WFRP4E: 300 octets +- Taille FR: 308 octets +- Textes WFRP4E: Cannot remove +- Textes FR: Impossible de retirer -### 37UN17gb8suFeZIW.js +### 3CeKfDcMEVgQlcXm.js -- Taille WFRP4E: 133 octets -- Taille FR: 139 octets +- Taille WFRP4E: 131 octets +- Taille FR: 135 octets ### 3D5ImpMgpOTPucvv.js @@ -560,154 +656,102 @@ Ces scripts peuvent être supprimés du module FR car le système utilise mainte ### 3IGO7xEjRjat937X.js - Taille WFRP4E: 232 octets -- Taille FR: 241 octets +- Taille FR: 255 octets - Textes WFRP4E: Removing Fatigued Condition, disabled effect -- Textes FR: Suppression de l +- Textes FR: Etat Extenué - Suppression de la condition Extenué, effet désactivé -### 3eSaX0BeaUalNkEP.js +### 3KH6OE7L7uJESI2Z.js -- Taille WFRP4E: 26 octets -- Taille FR: 26 octets +- Taille WFRP4E: 213 octets +- Taille FR: 222 octets -### 3jm0NoYpgB6ZuUSl.js +### 3VhUyqNY18PzeMKG.js -- Taille WFRP4E: 38 octets -- Taille FR: 38 octets +- Taille WFRP4E: 74 octets +- Taille FR: 83 octets +- Textes WFRP4E: Cannot Attack this target! +- Textes FR: Impossible d -### 3l7MQSa10Kve2K3P.js +### 3ixqbsEMfSSTzAXU.js -- Taille WFRP4E: 215 octets -- Taille FR: 221 octets +- Taille WFRP4E: 339 octets +- Taille FR: 349 octets + +### 4AO7Fowek5sSmE4g.js + +- Taille WFRP4E: 491 octets +- Taille FR: 491 octets + +### 4KYraZSHAEYmL6xx.js + +- Taille WFRP4E: 212 octets +- Taille FR: 218 octets ### 4MQ7u4INxp51oyyR.js - Taille WFRP4E: 1932 octets -- Taille FR: 1952 octets +- Taille FR: 1961 octets - Textes WFRP4E: Could not find ${talent}, Could not find ${trapping} - Textes FR: Impossible de trouver ${talent}, Impossible de trouver ${trapping} +### 4OlwxU60UqKg81yb.js + +- Taille WFRP4E: 180 octets +- Taille FR: 178 octets + +### 4iu3CmOI19soOYuA.js + +- Taille WFRP4E: 1255 octets +- Taille FR: 1284 octets +- Textes WFRP4E: Could not find ${trait.name} +- Textes FR: Impossible de trouver ${trait.name} + ### 4ylzjgUdHY5D0yVh.js - Taille WFRP4E: 3410 octets -- Taille FR: 3359 octets +- Taille FR: 3461 octets - Textes WFRP4E: Could not find ${talent}, Could not find ${trapping} - Textes FR: Impossible de trouver ${talent}, Impossible de trouver ${trapping} ### 58rFc9HiBoX66J6p.js - Taille WFRP4E: 444 octets -- Taille FR: 453 octets +- Taille FR: 445 octets ### 5DI6cHAg1LHo54Yv.js -- Taille WFRP4E: 420 octets -- Taille FR: 426 octets -- Textes FR: 1 Point de Fortune volé à ${this.actor.name} +- Taille WFRP4E: 423 octets +- Taille FR: 418 octets + +### 5GP9UJMvBZv6kWtI.js + +- Taille WFRP4E: 741 octets +- Taille FR: 746 octets ### 5JWC0l3JEpOsqbR9.js - Taille WFRP4E: 1767 octets -- Taille FR: 1783 octets +- Taille FR: 1792 octets - Textes WFRP4E: Could not find ${talent}, Could not find ${trapping} - Textes FR: Impossible de trouver ${talent}, Impossible de trouver ${trapping} ### 5JvKJZPcd6Hz5zvn.js - Taille WFRP4E: 1886 octets -- Taille FR: 1906 octets +- Taille FR: 1927 octets - Textes WFRP4E: Could not find ${talent}, Could not find ${trapping} - Textes FR: Impossible de trouver ${talent}, Impossible de trouver ${trapping} +### 5KVslRqhqzuFLyk4.js + +- Taille WFRP4E: 108 octets +- Taille FR: 107 octets + ### 5M6IgCUncCwyxHok.js - Taille WFRP4E: 1217 octets -- Taille FR: 1197 octets - -### 5MxRDXzUBPfp2KKD.js - -- Taille WFRP4E: 38 octets -- Taille FR: 38 octets - -### 5ScjIdRUOxblHdWS.js - -- Taille WFRP4E: 1217 octets -- Taille FR: 1212 octets - -### 5dR7Erj3nwsxLAV7.js - -- Taille WFRP4E: 1954 octets -- Taille FR: 1976 octets -- Textes WFRP4E: Could not find ${talent}, Could not find ${trapping} -- Textes FR: Impossible de trouver ${talent}, Impossible de trouver ${trapping} - -### 62Ky6bC1EnTllSJA.js - -- Taille WFRP4E: 253 octets -- Taille FR: 259 octets - -### 65xE9OV5sA1ZWT7j.js - -- Taille WFRP4E: 377 octets -- Taille FR: 377 octets - -### 6Aqq4F4Xui923sc6.js - -- Taille WFRP4E: 779 octets -- Taille FR: 754 octets -- Textes FR:

    ${this.actor.prototypeToken.name} reçoit le Trait de Créatuer A Sang Froid et peut inverser n - -### 6BmvV9c03FkfisnE.js - -- Taille WFRP4E: 1069 octets -- Taille FR: 1107 octets -- Textes FR: ${this.actor.name} porte le ${this.item.name}.
    - Il gagne +1 Point de Corruption point si un Test de Corruption est échoué, à appliquer manuellement.
    Si le personnage porte le masque pendant plus d, ${this.item.name} de ${this.actor.name} a été enlevé et a perdu ses propriétés. Cependant, les effets perdurent pendant [[1d10+4]] jours, après quoi ils devront être manuellement supprimés. - -### 6H6vNjzvMGl2ZqCR.js - -- Taille WFRP4E: 285 octets -- Taille FR: 305 octets -- Textes FR: Lame de Nurglitch: ${args.actor.name} doit réussir un Test d - -### 6QZUX7ZrFxOzqI0b.js - -- Taille WFRP4E: 252 octets -- Taille FR: 268 octets +- Taille FR: 1216 octets ... et 423 autres fichiers -## Scripts uniquement dans WFRP4E (394) - -Ces scripts existent dans WFRP4E mais pas dans le module FR. - -- 07tvKnPT8ICtv2us.js -- 0H2syk6qc0sCY0pj.js -- 0IAc5VFR2ogXOaGE.js -- 0NAD1LNcVyAZ1fC7.js -- 0PzfGjGhHQbxEwlb.js -- 0amHqfjTRp5ff6Op.js -- 0hAbiNR1nFkpFMRz.js -- 0hgTyeaEhMBLwzUn.js -- 0kUalAsb4OhtYbaJ.js -- 0uUxvBLJC76WIIBC.js -- 0wR0LWpfhLFA240I.js -- 0wmIC2MssUX6LW3N.js -- 1Du4e27M8WgP2iui.js -- 1PPh4vHd5sPKtudZ.js -- 1UvL0XA1EpQtjDNn.js -- 20fvE9nJmcfGYVzw.js -- 22PMOW0G5MWiBQmg.js -- 2EAYX5G9Fh3HJwiP.js -- 2Ej6LUqn8frTRURo.js -- 2IPTF0akWw9y48br.js - -... et 374 autres - -## Scripts uniquement dans FR (2) - -Ces scripts existent dans le module FR mais plus dans WFRP4E (probablement supprimés). - -- ZingXNvYyZ2BEvfY.js -- tfdKU6nmvUtEjXE2.js - diff --git a/tools/translate-scripts.js b/tools/translate-scripts.js index 9285056..1a09a86 100644 --- a/tools/translate-scripts.js +++ b/tools/translate-scripts.js @@ -165,7 +165,7 @@ function processDirectory(dirPath) { // Main console.log('Début de la traduction des scripts...\n'); -const scriptsDir = path.join(__dirname, 'scripts'); +const scriptsDir = path.join(__dirname, '..', 'scripts'); const stats = processDirectory(scriptsDir); console.log('\n' + '='.repeat(60));